File: /disk001/machen/public_html/sonne/static/js/main.cd96d752.chunk.js
/*!
=========================================================
* Material Dashboard PRO React - v1.8.0
=========================================================
* Product Page: https://www.creative-tim.com/product/material-dashboard-pro-react
* Copyright 2019 Creative Tim (http://www.creative-tim.com)
* Coded by Creative Tim
=========================================================
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*/
/*! For license information please see main.cd96d752.chunk.js.LICENSE.txt */
(this.webpackJsonpMACHEN=this.webpackJsonpMACHEN||[]).push([[0],{1084:function(e,t){},1086:function(e,t){},1097:function(e,t){},1099:function(e,t){},1126:function(e,t){},1128:function(e,t){},1129:function(e,t){},1134:function(e,t){},1136:function(e,t){},1142:function(e,t){},1144:function(e,t){},1163:function(e,t){},1175:function(e,t){},1178:function(e,t){},1211:function(e,t,r){},1278:function(e,t,r){},1279:function(e,t,r){"use strict";r.r(t);var n={};r.r(n),r.d(n,"reduxFunction",(function(){return hr}));var a=r(0),o=r.n(a),i=r(40),c=r(184),l=Object(c.a)(),s=r(10),u=r(798),d=r(751),p={},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,t=arguments.length>1?arguments[1]:void 0;return"SET_LANGUAGE"===t.action&&t.value?t.value:e},h=r(1),m={fullScreen:!0,visible:!0,callBack:null,autoSave:!1,cards:!0},g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,t=arguments.length>1?arguments[1]:void 0;return"preLoader"===t.action&&t.value?Object(h.a)(Object(h.a)({},e),t.value):e},y={custom:{ColumnTitleColor:"linear-gradient(60deg, rgba(67,18,102,1), rgba(90,35,130,1))",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), rgba(67,18,102,1))",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",medium:"rgb(125,125,125)",mediumText:"rgb(150,150,150)",menu:"rgb(67,18,102)",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},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y,t=arguments.length>1?arguments[1]:void 0;return"SET_SESSION"===t.action&&t.value?Object(h.a)(Object(h.a)({},e),t.value):"CLEAR_SESSION"===t.action?Object(h.a)({},e):e},b={},x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b,t=arguments.length>1?arguments[1]:void 0;return"SET_FUNCTIONS"===t.action&&t.value?Object(h.a)(Object(h.a)({},e),t.value):e},_=r(574),w=r.n(_),E=r(575),O=r.n(E),j=r(576),k=r.n(j),S=r(577),L=r.n(S),C=r(752),I=r.n(C),F=r(753),T=r.n(F),N=r(754),P=r.n(N),A=r(755),D=r.n(A),z=r(139),M=r.n(z),B=r(756),$=r.n(B),Y=r(87),R=r.n(Y),G=r(418),H={version:G.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"}],status:[{value:"notStarted",label:"$__notStarted",icon:"query_builder",color:"#929497"},{value:"inProgress",label:"$__inProgress",icon:"play_circle_outline",color:"#011E41"},{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:"48h",label:"$__48hours"},{value:"24h",label:"$__24hours"},{value:"12h",label:"$__12hours"},{value:null,label:"$__6hours"},{value:"3h",label:"$__3hours"},{value:"1h",label:"$__1hour"}],plans:[{value:"p0",label:"$__saasPlanName0",settings:{}},{value:"p1",label:"$__saasPlanName1",settings:{}},{value:"p2",label:"$__saasPlanName2",settings:{}},{value:"p3",label:"$__saasPlanName3",settings:{}},{value:"p4",label:"$__saasPlanName4",settings:{}},{value:"p5",label:"$__saasPlanName5",settings:{}}],type:[{value:"plan",label:"$__plan",icon:"view_comfy",color:null},{value:"strength",label:"$__strength",icon:"arrow_upward",color:null},{value:"weakness",label:"$__weakness",icon:"arrow_downward",color:null},{value:"opportunity",label:"$__opportunity",icon:"trending_up",color:null},{value:"threat",label:"$__threat",icon:"trending_down",color:null},{value:"guideline",label:"$__guideline",icon:M.a,color:null},{value:"guidelineD",label:"$__guidelineD",icon:O.a,color:null},{value:"guidelineR",label:"$__guidelineR",icon:L.a,color:null},{value:"guidelineC",label:"$__guidelineC",icon:w.a,color:null},{value:"guidelineE",label:"$__guidelineE",icon:k.a,color:null},{value:"objective",label:"$__objective",icon:"gps_fixed",color:null},{value:"goal",label:"$__goal",icon:"flag",color:null},{value:"iniciative",label:"$__iniciative",icon:"play_arrow",color:null},{value:"task",label:"$__task",icon:"fact_check",color:null},{value:"meeting",label:"$__meeting",icon:"meeting_room",color:null},{value:"myTask",label:"$__myTask",icon:"person_pin",color:null},{value:"link",label:"$__radar",icon:"public",color:null},{value:"insight",label:"$__insight",icon:R.a,color:null}],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"}],fileExtensions:[{ext:["jpg","jpeg","jpe","jfif","gif","png","webp","svg","eps"],icon:!1,title:"image",viewer:"img"},{ext:["doc","docx","dot","doc","dotx","txt"],icon:I.a,title:"Microsoft Word",viewer:"microsoft"},{ext:["xls","xlt","ooxml","xlsx"],icon:T.a,title:"Microsoft Excel",viewer:"microsoft"},{ext:["ppt","pptx","ppsx","sldx"],icon:P.a,title:"Microsoft PowerPoint",viewer:"microsoft"},{ext:["pdf"],icon:$.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:"group",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",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:"unity",icon:"badge",module:"user",reqId:!1,view:{c:{pages:["units"],access:["master"],noId:!0}},hash:null,db:"users",iniModule:"userEdit",modules:["userEdit","delete","settings"],requireFields:["name"],disabledFields:["email"],data:{type:"client"}},{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"},fieldsPlaceholder:{name:"$__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","catenation","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:R.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","catenation","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","timeline","users","sendTo","log","files","timeLog","delete","settings"],hideFields:["image","recurrence"],requireFields:["name"],disabledFields:[],data:{status:"notStarted"},loadChildrens:!0,sharedIn:{attach:[],copy:["client"],shared:[]}},{name:"plan",icon:"tips_and_updates",module:"plan",reqId:!1,view:{sp:{pages:["templates"]}},db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","templateOptions","catenation","timeline","files","delete"],hideFields:["image","recurrence"],requireFields:["name"],disabledFields:[],data:{status:"notStarted"}},{name:"objective",icon:"gps_fixed",module:"planning",myTasks:!0,reqId:!0,view:{sp:{pages:["objectives"]}},db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","catenation","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","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","catenation","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","catenation","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","catenation","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","catenation","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:M.a,module:"matrix",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","catenation","recurrence","timeline","kpi","users","myDay","sendTo","log","files","timeLog","settings","delete"],hideFields:["image","imageUpload","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","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:L.a,module:"matrix",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","catenation","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:k.a,module:"matrix",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","catenation","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:w.a,module:"matrix",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","catenation","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:D.a,db:"cards",hash:["matrix"]},{name:"matrix",icon:M.a,db:"cards",hash:["matrix"]}],cards:{},users:{},feeds:{},notifications:{},loaded:!1,viewList:!1,myTasksMenuExpanded:!1,adminView:!1,adminViewLoader:!1,orderByTitle:!0,orderByTitlePosition:"ASC"},W=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:H,t=arguments.length>1?arguments[1]:void 0;return"SET_DB"===t.action&&t.value?Object(h.a)(Object(h.a)({},e),t.value):e},U={module:null,activeModule:"cardEdit",reqSave:!1,window:!1,id:null,data:{}},V=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:U,t=arguments.length>1?arguments[1]:void 0;return"SET_MODULE"===t.action&&t.value?Object(h.a)(Object(h.a)({},e),t.value):"CLEAR_MODULE"===t.action?Object(h.a)({},U):e},q={open:!1,miro:!1,files:[],file:0},X=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q,t=arguments.length>1?arguments[1]:void 0;return"LIGHTBOX"===t.action&&t.value?Object(h.a)(Object(h.a)({},e),t.value):"LIGHTBOX_CLOSE"===t.action?Object(h.a)({},q):e},K=r(29),J={notifications:[]},Z={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,paused:!0,inProgress:!0,completed:!0},priority:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},kpiType:[],iniKpiValue:null,endKpiValue:null}},Q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Z,t=arguments.length>1?arguments[1]:void 0;return"SEARCH"===t.action&&t.value?Object(h.a)(Object(h.a)({},e),t.value):"SEARCH_CLEAR"===t.action?{tags:[],userGroups:[],users:{userGroup:[],selected:{}},units:{userGroup:[],selected:{}},clients:{userGroup:[],selected:{}},groups:{userGroup:[],selected:{}},plans:{userGroup:[],selected:{}},sideModuleWindow:!1,clearFilter:!1,text:"",cards:{dateRange:[null,null],startDate:null,endDate:null,dateStatus:[],status:{all:!0,notStarted:!0,paused:!0,inProgress:!0,completed:!0},priority:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},kpiType:[],iniKpiValue:null,endKpiValue:null}}:e},ee={open:!1,nodeId:null,activeChats:[],activeModule:"users",groups:{},typing:{}},te=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ee,t=arguments.length>1?arguments[1]:void 0;return"SET_CHAT"===t.action&&t.value?Object(h.a)(Object(h.a)({},e),t.value):"CLOSE_CHAT"===t.action?Object(h.a)({},ee):e},re={total:0,lastNotification:0,firstNotification:0},ne=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:re,t=arguments.length>1?arguments[1]:void 0;return"SET_NOTIFICATIONS"===t.action&&t.value?Object(h.a)(Object(h.a)({},e),t.value):e},ae={},oe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ae,t=arguments.length>1?arguments[1]:void 0;return"SET_TIMELINE"===t.action&&t.value?Object(h.a)(Object(h.a)({},e),t.value):e},ie={cards:{},timeline:{}},ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ie,t=arguments.length>1?arguments[1]:void 0;return"TO_LOAD"===t.action&&t.value?Object(h.a)(Object(h.a)({},e),t.value):e},le={sideModuleWindow:!1,period:"$__last7Days",users:{},showDeleted:!1,showPrivate:!1},se=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:le,t=arguments.length>1?arguments[1]:void 0;return"SET_CONTROL"===t.action&&t.value?Object(h.a)(Object(h.a)({},e),t.value):"RESET_CONTROLS"===t.action?Object(h.a)({},e):e},ue=r(302);function de(){de=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var pe=de().mark(me),fe=de().mark(ge);function he(e){return e.next&&e.next(),!0}function me(e){return de().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(ue.c)({type:e.action,value:e.value});case 2:return t.next=4,Object(ue.b)(he,e);case 4:case"end":return t.stop()}}),pe)}function ge(){return de().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(ue.a)([Object(ue.e)("ASYNC",me),Object(ue.d)("ASYNC",me)]);case 2:case"end":return e.stop()}}),fe)}var ye=Object(u.a)(),ve=Object(s.e)(Object(s.c)({alert:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"NEW_ALERT":return Object(h.a)(Object(h.a)({},e),{},{notifications:[].concat(Object(K.a)(e.notifications),[Object(h.a)({key:t.value.options.key},t.value)])});case"CLOSE_ALERT":return Object(h.a)(Object(h.a)({},e),{},{notifications:e.notifications.map((function(e){return t.dismissAll||e.key===t.value?Object(h.a)(Object(h.a)({},e),{},{dismissed:!0}):Object(h.a)({},e)}))});case"REMOVE_ALERT":return Object(h.a)(Object(h.a)({},e),{},{notifications:e.notifications.filter((function(e){return e.key!==t.value}))});default:return e}},chat:te,controls:se,db:W,functions:x,languages:f,lightBox:X,notifications:ne,preLoader:g,search:Q,session:v,sideModule:V,timeline:oe,toLoad:ce}),Object(s.a)(ye,Object(d.routerMiddleware)(l)));ye.run(ge);var be=ve,xe=r(1413),_e=r(11),we=r(58),Ee=r(6),Oe=r(4),je=r(2),ke=r(119),Se=r.n(ke),Le=r(42),Ce=r.n(Le),Ie=r(7),Fe=r.n(Ie),Te=r(118),Ne=(r(1281),r(794)),Pe=r(793),Ae=(r(864),r(45)),De=r(1378),ze=r(1294),Me=r(1416),Be=r(1381),$e=r(1382),Ye=r(1293),Re=r(49),Ge=r(1292),He=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)},We={transition:"all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1)"},Ue={marginRight:"auto",marginLeft:"auto","&:before,&:after":{display:"table",content:'" "'},"&:after":{clear:"both"}},Ve={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"}},qe={fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif',fontWeight:"300",lineHeight:"1.5em"},Xe=["#9c27b0","#ab47bc","#8e24aa","#af2cc5","#7b1fa2"],Ke=["#ff9800","#ffa726","#fb8c00","#ffa21a","#f57c00","#faf2cc","#fcf8e3"],Je=["#f44336","#ef5350","#e53935","#f55a4e","#d32f2f","#ebcccc","#f2dede"],Ze=["#4caf50","#66bb6a","#43a047","#5cb860","#388e3c","#d0e9c6","#dff0d8"],Qe=["#00acc1","#26c6da","#00acc1","#00d3ee","#0097a7","#c4e3f3","#d9edf7"],et=["#e91e63","#ec407a","#d81b60","#eb3573","#c2185b"],tt=["#999","#777","#3C4858","#AAAAAA","#D2D2D2","#DDD","#555555","#333","#eee","#ccc","#e4e4e4","#E5E5E5","#f9f9f9","#f5f5f5","#495057","#e7e7e7","#212121","#c8c8c8","#505050"],rt={boxShadow:"0 10px 30px -12px rgba("+He("#000")+", 0.42), 0 4px 25px 0px rgba("+He("#000")+", 0.12), 0 8px 10px -5px rgba("+He("#000")+", 0.2)"},nt={boxShadow:"0 4px 20px 0 rgba("+He("#000")+",.14), 0 7px 10px -5px rgba("+He(Xe[0])+",.4)"},at={boxShadow:"0 4px 20px 0 rgba("+He("#000")+",.14), 0 7px 10px -5px rgba("+He(Qe[0])+",.4)"},ot={boxShadow:"0 4px 20px 0 rgba("+He("#000")+",.14), 0 7px 10px -5px rgba("+He(Ze[0])+",.4)"},it={boxShadow:"0 4px 20px 0 rgba("+He("#000")+",.14), 0 7px 10px -5px rgba("+He(Ke[0])+",.4)"},ct={boxShadow:"0 4px 20px 0 rgba("+He("#000")+",.14), 0 7px 10px -5px rgba("+He(Je[0])+",.4)"},lt={boxShadow:"0 4px 20px 0 rgba("+He("#000")+",.14), 0 7px 10px -5px rgba("+He(et[0])+",.4)"},st=Object(h.a)({background:"linear-gradient(60deg, "+Ke[1]+", "+Ke[2]+")"},it),ut=Object(h.a)({background:"linear-gradient(60deg, "+Ze[1]+", "+Ze[2]+")"},ot),dt=Object(h.a)({background:"linear-gradient(60deg, "+Je[1]+", "+Je[2]+")"},ct),pt=Object(h.a)({background:"linear-gradient(60deg, "+Qe[1]+", "+Qe[2]+")"},at),ft=Object(h.a)({background:"linear-gradient(60deg, "+Xe[1]+", "+Xe[2]+")"},nt),ht=Object(h.a)({background:"linear-gradient(60deg, "+et[1]+", "+et[2]+")"},lt),mt=(He("#000"),He("#000"),Object(h.a)({margin:"0 20px 10px",paddingTop:"10px",borderTop:"1px solid "+tt[8],height:"auto"},qe),{border:"0",borderRadius:"3px",boxShadow:"0 10px 20px -12px rgba("+He("#000")+", 0.42), 0 3px 20px 0px rgba("+He("#000")+", 0.12), 0 8px 10px -5px rgba("+He("#000")+", 0.2)",padding:"10px 0",transition:"all 150ms ease 0s"}),gt=(He(tt[6]),He("#000"),He("#000"),He("#000"),{color:tt[2],textDecoration:"none",fontWeight:"300",marginTop:"30px",marginBottom:"25px",minHeight:"32px",fontFamily:"'Roboto', 'Helvetica', 'Arial', sans-serif","& small":{color:tt[1],fontSize:"65%",fontWeight:"400",lineHeight:"1"}}),yt=Object(h.a)(Object(h.a)({},gt),{},{marginTop:"0",marginBottom:"3px",minHeight:"auto","& a":Object(h.a)(Object(h.a)({},gt),{},{marginTop:".625rem",marginBottom:"0.75rem",minHeight:"auto"})}),vt=r(1377),bt=r(18),xt=r(1288),_t=Object(bt.a)((function(e){return{tooltip:{backgroundColor:"#f5f5f9",color:"rgba(0, 0, 0, 0.87)",maxWidth:220,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"}}}))(xt.a);function wt(e){return o.a.createElement(_t,{title:e.title?Dt(e.title,1):""},"string"===typeof e.icon||"string"===typeof e.children?o.a.createElement(vt.a,{className:e.className?e.className:"",style:Object(h.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:Mt(e.color)||"rgb(125,125,125)",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(h.a)({width:e.size||"22px",height:e.size||"22px",fontSize:e.size||"22px",color:e.color||"rgb(125,125,125)",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}))}var Et=r(1379),Ot=Object(De.a)((function(e){return{root:{position:"relative"},bottom:{color:e.palette.grey["light"===e.palette.type?200:700],position:"absolute",left:0},top:{color:Mt("ColumnTitleColor"),animationDuration:"550ms",position:"absolute",left:0},circle:{strokeLinecap:"round"}}}));var jt=function(e){var t=Ot();return o.a.createElement("div",{className:t.root,style:{width:e.size?e.size:"25px",height:e.size?e.size:"25px"}},o.a.createElement(Et.a,Object.assign({variant:"determinate",className:t.bottom,size:e.size?e.size:25,thickness:4},e,{value:100})),o.a.createElement(Et.a,Object.assign({variant:"indeterminate",disableShrink:!0,className:t.top,classes:{circle:t.circle},size:e.size?e.size:25,thickness:4},e)))},kt=r(800),St=r(1380),Lt=Object(De.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"}}})),Ct=o.a.forwardRef((function(e,t){var r=Lt();return o.a.createElement("div",{className:r.root,style:Object(h.a)({},e.style?e.style:{})},o.a.createElement(_t,{title:e.title?e.title:"INSERT_BUTTON_TITLE"},o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},e.text&&o.a.createElement(Ge.a,Object.assign({disabled:!!e.load||!!e.disabled,onClick:e.onClick?function(t){t.preventDefault(),t.stopPropagation(),e.onClick()}:null},e.shadow?{className:"".concat(e.transparent?r.iconButtonStyleTransaparent:r.iconButtonStyleWhite)+" "+r.shadow}:{className:"".concat(e.transparent?r.iconButtonStyleTransaparent:r.iconButtonStyleWhite)},e.buttonStyle?{style:e.buttonStyle}:{}),o.a.createElement("div",{className:r.iconText},e.load?o.a.createElement("div",null,o.a.createElement(jt,{size:25,style:{margin:"auto",display:"flex"}}),o.a.createElement("span",{style:{marginLeft:"15px",color:"lightgray"}},e.loadText?e.loadText:Dt("$__saving"))):o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},o.a.createElement(St.a,{badgeContent:e.badgeContent,classes:{badge:r.badge},color:"secondary"},o.a.createElement(wt,{usePropagation:!!e.usePropagation,size:e.size?e.size:"22px",color:e.color?e.color:Mt("menu"),icon:e.icon?e.icon:"help_outline"})),o.a.createElement("span",{style:Object(h.a)(Object(h.a)({},e.textSize?{fontSize:e.textSize}:{}),{},{marginLeft:"5px",color:e.textColor?e.textColor:e.color?e.color:Mt("menu")})},e.text)))),!e.text&&o.a.createElement(kt.a,{onClick:e.onClick?function(t){e.onClick(),t.preventDefault(),t.stopPropagation()}:null,className:e.transparent?r.iconButtonStyleTransaparent:r.iconButtonStyleWhite},o.a.createElement(St.a,{badgeContent:e.badgeContent,color:"secondary",classes:{badge:r.badge}},o.a.createElement(wt,{usePropagation:!!e.usePropagation,size:e.size?e.size:"22px",color:e.color?e.color:Mt("menu"),icon:e.icon?e.icon:"help_outline"}))))))})),It=r(294),Ft=r.n(It);function Tt(){Tt=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Nt=Ft.a.create("true"===String("true")?{baseURL:"https://ws.machen.ai"}:{baseURL:"http://192.168.0.10:3001"});Ft.a.defaults.withCredentials=!0,Nt.interceptors.request.use(function(){var e=Object(Ee.a)(Tt().mark((function e(t){var r;return Tt().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)}}()),Nt.interceptors.response.use(function(){var e=Object(Ee.a)(Tt().mark((function e(t){return Tt().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}));var Pt=Nt;function At(){At=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}r(204).config();var Dt=function(e,t){if(e){var r=be.getState().languages||{},n=be.getState().session,a=n&&n.language?n.language:"pt-BR",o=e;if(!(e&&e.indexOf("$__")>-1))return e;e.split(" ").map((function(e,t){if(e&&e.indexOf("$__")>-1){var n=e.replace("$__","").trim().toLowerCase();r[n]||Pt.post("language/add",{name:n}),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 zt(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 Mt(e,t){if(be)return function(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}(be.getState().session.custom[e],t)||e}function Bt(e){return!!/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i.test(e)}function $t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Se()(JSON.stringify(e)).toString(),r=e.content?e.content:e.message;e.confirm&&(r=o.a.createElement("div",{style:{minWidth:"300px"}},r,o.a.createElement("div",{style:{display:"flex",width:"100%",marginTop:15,justifyContent:"center"}},o.a.createElement(Ct,{shadow:!0,title:Dt("$__confirm"),text:Dt("$__confirm"),color:"green",icon:"check",size:"25px",onClick:function(){e.confirm(),Te.b.dismiss(t)}}),o.a.createElement(Ct,{shadow:!0,title:Dt("$__cancel"),text:Dt("$__cancel"),color:"red",icon:"close",size:"25px",onClick:function(){Te.b.dismiss(t)},style:{marginLeft:15}})))),e.buttons&&e.buttons.length>0&&(r=o.a.createElement("div",{style:{minWidth:"300px"}},r,o.a.createElement("div",{style:{width:"100%",marginTop:15,justifyContent:"center"}},e.buttons.map((function(r,n){return o.a.createElement(Ct,Object.assign({key:n},r,{style:Object(h.a)(Object(h.a)({},e&&e.style?e.style:{}),{},{marginBottom:10}),onClick:function(){r.onClick&&r.onClick(),Te.b.dismiss(t)}}))})))));var n=Object(h.a)(Object(h.a)(Object(h.a)({toastId:t,position:Te.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(h.a)(Object(h.a)({},n),{},{position:Te.b.POSITION.BOTTOM_LEFT})),"right"===e.horizontal&&(n=Object(h.a)(Object(h.a)({},n),{},{position:Te.b.POSITION.BOTTOM_RIGHT})),"center"===e.horizontal&&(n=Object(h.a)(Object(h.a)({},n),{},{position:Te.b.POSITION.BOTTOM_CENTER})),Te.b.isActive(t)||("info"!==e.variant&&e.variant||Te.b.info(r,n),"success"===e.variant&&Te.b.success(r,n),"warning"===e.variant&&Te.b.warn(r,n),"error"===e.variant&&Te.b.error(r,n)),!0}var Yt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"decimal",r=arguments.length>2?arguments[2]:void 0,n=be.getState(),a=n.session,o=String(e).replace(",","."),i=t;if("number"===t||"time"===t)i="decimal";else if("percent"===i)o/=100;else 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(parseFloat(o))},Rt=function(){var e=Object(Ee.a)(At().mark((function e(t,r,n){var a,o,i,c=arguments;return At().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c.length>3&&void 0!==c[3]&&c[3],a=be.getState(),o=a.db,i="cards",o.cards[r._id]?i="cards":o.users[r._id]&&(i="users"),t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},Object(Oe.a)({},i,Object(h.a)(Object(h.a)({},be.getState().db[i]),{},Object(Oe.a)({},r._id,Object(h.a)(Object(h.a)({},be.getState().db[i][r._id]),{},{deleted:!0}))))));case 5:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),Gt=function(e){for(var t="\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\u0154\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff\u0155",r="",n=0;n<e.length;n++){for(var a=!1,o=0;o<t.length;o++)if(e.substr(n,1)==t.substr(o,1)){r+="AAAAAAACEEEEIIIIDNOOOOOOUUUUYRsBaaaaaaaceeeeiiiionoooooouuuuybyr".substr(o,1),a=!0;break}0==a&&(r+=e.substr(n,1))}return r},Ht=function(e,t,r){if(!t||t&&!t.trim())return o.a.createElement("span",{style:{wordBreak:"break-word"},dangerouslySetInnerHTML:{__html:zt(e)}});var n=zt(e).split(new RegExp("(".concat(t.replace("*.","."),")"),"gi"));return o.a.createElement("span",null," ",n.map((function(e,n){return o.a.createElement("span",{key:n,style:e.toLowerCase()===t.toLowerCase()?{fontWeight:"bold",paddingTop:"3px",paddingBottom:"3px",backgroundColor:"#ffff00b3",color:r?"#000000 !important":""}:{},dangerouslySetInnerHTML:{__html:zt(e)}})}))," ")},Wt=function(e){var t=zt(e).split("\n"),r="";return t.map((function(e){e.split(" ").map((function(e){var t=e.split("\n");if(t.length>1)t.map((function(e){if(e.indexOf(".youtube.com/watch?")>-1){var t=e.split("?")[1].split("v=")[1].split("&")[0];t&&(r+='<iframe width="560" height="315" style="width:100%; max-width:500px" src="https://www.youtube.com/embed/'.concat(t,'" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'))}else e.indexOf("http://")>-1||e.indexOf("https://")>-1?r+='<a style="word-break:break-all" href="'.concat(e.replace("<br/>",""),'" target="_blank">').concat(e,"</a>"):r+=e})),r+=" ";else if(t[0].indexOf(".youtube.com/watch?")>-1&&t[0].split("?").length>1&&t[0].split("?")[1].split("v=").length>1){var n=t[0].split("?")[1].split("v=")[1].split("&")[0];n&&(r+='<iframe width="560" height="315" style="width:100%; max-width:500px" src="https://www.youtube.com/embed/'.concat(n,'" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'))}else t[0].indexOf("http://")>-1||t[0].indexOf("https://")>-1?r+='<a href="'.concat(t[0].replace("<br/>",""),'" target="_blank">').concat(t[0],"</a>"):r+="".concat(e," ")})),r+=""})),r},Ut=function(){var e=be.getState().session,t={};return e&&e._access&&(t=e._access),t},Vt=function(){var e=Object(Ee.a)(At().mark((function e(t,r){var n,a,o=arguments;return At().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=o.length>2&&void 0!==o[2]&&o[2],a=be.getState(),a.db,n){e.next=14;break}return e.prev=3,e.next=6,Pt.put("/node/favorite",{_id:r});case 6:e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),console.log(e.t0);case 12:e.next=23;break;case 14:return e.prev=14,e.next=17,Pt.delete("/node/favorite/".concat(r));case 17:e.sent,e.next=23;break;case 20:e.prev=20,e.t1=e.catch(14),console.log(e.t1);case 23:case"end":return e.stop()}}),e,null,[[3,9],[14,20]])})));return function(t,r){return e.apply(this,arguments)}}(),qt=function(e){for(var t=e;1===t.length;)t="0"+t;return t},Xt=function(e,t){var r,n,a,o=e;if(o.indexOf("rgba")>-1){var i=(o=o.replace("rgba(","")).split(",");r=i[0],n=i[1],a=i[2]}else{if(0===o.indexOf("#")&&(o=o.slice(1)),3===o.length&&(o=o[0]+o[0]+o[1]+o[1]+o[2]+o[2]),6!==o.length)throw new Error("Invalid HEX color.");r=parseInt(o.slice(0,2),16),n=parseInt(o.slice(2,4),16),a=parseInt(o.slice(4,6),16)}return t?.299*r+.587*n+.114*a>186?"#000000":"#FFFFFF":(r=(255-r).toString(16),n=(255-n).toString(16),a=(255-a).toString(16),"#"+qt(r)+qt(n)+qt(a))},Kt=function(e){var t=parseInt(e);return e.low&&(t=parseInt(e.low)),Fe()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===Fe()(1e3*t).tz("America/Sao_Paulo").format("DD/MM/YYYY")?Fe()(1e3*t).tz("America/Sao_Paulo").format("H:mm"):Fe()(new Date).tz("America/Sao_Paulo").format("YYYY")===Fe()(1e3*t).tz("America/Sao_Paulo").format("YYYY")?Fe()(1e3*t).tz("America/Sao_Paulo").format("DD/MM H:mm"):Fe()(1e3*t).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm")},Jt={button:{minHeight:"auto",minWidth:"auto",backgroundColor:tt[0],color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+He(tt[0])+", 0.14), 0 3px 1px -2px rgba("+He(tt[0])+", 0.2), 0 1px 5px 0 rgba("+He(tt[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:"#FFF",backgroundColor:tt[0],boxShadow:"0 14px 26px -12px rgba("+He(tt[0])+", 0.42), 0 4px 23px 0px rgba("+He("#000")+", 0.12), 0 8px 10px -5px rgba("+He(tt[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:Mt("color"),boxShadow:"0 2px 2px 0 "+Mt("color",.14)+", 0 3px 1px -2px "+Mt("color",.2)+", 0 1px 5px 0 rgba("+Mt("color",.12),"&:hover,&:focus":{backgroundColor:Mt("color"),boxShadow:"0 14px 26px -12px "+Mt("color",.42)+", 0 4px 23px 0px "+Mt("color",.12)+", 0 8px 10px -5px rgba("+Mt("color",.2)}},custom_menuColor:{backgroundColor:Mt("menu"),boxShadow:"0 2px 2px 0 "+Mt("menu",.14)+", 0 3px 1px -2px "+Mt("menu",.2)+", 0 1px 5px 0 rgba("+Mt("menu",.12),"&:hover,&:focus":{backgroundColor:Mt("menu"),boxShadow:"0 14px 26px -12px "+Mt("menu",.42)+", 0 4px 23px 0px "+Mt("menu",.12)+", 0 8px 10px -5px rgba("+Mt("menu",.2)}},custom_mediumColor:{backgroundColor:Mt("medium"),boxShadow:"0 2px 2px 0 "+Mt("medium",.14)+", 0 3px 1px -2px "+Mt("medium",.2)+", 0 1px 5px 0 rgba("+Mt("medium",.12),"&:hover,&:focus":{backgroundColor:Mt("medium"),boxShadow:"0 14px 26px -12px "+Mt("medium",.42)+", 0 4px 23px 0px "+Mt("medium",.12)+", 0 8px 10px -5px rgba("+Mt("medium",.2)}},primary:{backgroundColor:Xe[0],boxShadow:"0 2px 2px 0 rgba("+He(Xe[0])+", 0.14), 0 3px 1px -2px rgba("+He(Xe[0])+", 0.2), 0 1px 5px 0 rgba("+He(Xe[0])+", 0.12)","&:hover,&:focus":{backgroundColor:Xe[0],boxShadow:"0 14px 26px -12px rgba("+He(Xe[0])+", 0.42), 0 4px 23px 0px rgba("+He("#000")+", 0.12), 0 8px 10px -5px rgba("+He(Xe[0])+", 0.2)"}},info:{backgroundColor:Qe[0],boxShadow:"0 2px 2px 0 rgba("+He(Qe[0])+", 0.14), 0 3px 1px -2px rgba("+He(Qe[0])+", 0.2), 0 1px 5px 0 rgba("+He(Qe[0])+", 0.12)","&:hover,&:focus":{backgroundColor:Qe[0],boxShadow:"0 14px 26px -12px rgba("+He(Qe[0])+", 0.42), 0 4px 23px 0px rgba("+He("#000")+", 0.12), 0 8px 10px -5px rgba("+He(Qe[0])+", 0.2)"}},success:{backgroundColor:Ze[0],boxShadow:"0 2px 2px 0 rgba("+He(Ze[0])+", 0.14), 0 3px 1px -2px rgba("+He(Ze[0])+", 0.2), 0 1px 5px 0 rgba("+He(Ze[0])+", 0.12)","&:hover,&:focus":{backgroundColor:Ze[0],boxShadow:"0 14px 26px -12px rgba("+He(Ze[0])+", 0.42), 0 4px 23px 0px rgba("+He("#000")+", 0.12), 0 8px 10px -5px rgba("+He(Ze[0])+", 0.2)"}},warning:{backgroundColor:Ke[0],boxShadow:"0 2px 2px 0 rgba("+He(Ke[0])+", 0.14), 0 3px 1px -2px rgba("+He(Ke[0])+", 0.2), 0 1px 5px 0 rgba("+He(Ke[0])+", 0.12)","&:hover,&:focus":{backgroundColor:Ke[0],boxShadow:"0 14px 26px -12px rgba("+He(Ke[0])+", 0.42), 0 4px 23px 0px rgba("+He("#000")+", 0.12), 0 8px 10px -5px rgba("+He(Ke[0])+", 0.2)"}},danger:{backgroundColor:Je[0],boxShadow:"0 2px 2px 0 rgba("+He(Je[0])+", 0.14), 0 3px 1px -2px rgba("+He(Je[0])+", 0.2), 0 1px 5px 0 rgba("+He(Je[0])+", 0.12)","&:hover,&:focus":{backgroundColor:Je[0],boxShadow:"0 14px 26px -12px rgba("+He(Je[0])+", 0.42), 0 4px 23px 0px rgba("+He("#000")+", 0.12), 0 8px 10px -5px rgba("+He(Je[0])+", 0.2)"}},rose:{backgroundColor:et[0],boxShadow:"0 2px 2px 0 rgba("+He(et[0])+", 0.14), 0 3px 1px -2px rgba("+He(et[0])+", 0.2), 0 1px 5px 0 rgba("+He(et[0])+", 0.12)","&:hover,&:focus":{backgroundColor:et[0],boxShadow:"0 14px 26px -12px rgba("+He(et[0])+", 0.42), 0 4px 23px 0px rgba("+He("#000")+", 0.12), 0 8px 10px -5px rgba("+He(et[0])+", 0.2)"}},white:{"&,&:focus,&:hover":{backgroundColor:"#FFF",color:tt[0]}},twitter:{backgroundColor:"#55acee",color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+He("#55acee")+", 0.14), 0 3px 1px -2px rgba("+He("#55acee")+", 0.2), 0 1px 5px 0 rgba("+He("#55acee")+", 0.12)","&:hover,&:focus,&:visited":{backgroundColor:"#55acee",color:"#FFF",boxShadow:"0 14px 26px -12px rgba("+He("#55acee")+", 0.42), 0 4px 23px 0px rgba("+He("#000")+", 0.12), 0 8px 10px -5px rgba("+He("#55acee")+", 0.2)"}},facebook:{backgroundColor:"#3b5998",color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+He("#3b5998")+", 0.14), 0 3px 1px -2px rgba("+He("#3b5998")+", 0.2), 0 1px 5px 0 rgba("+He("#3b5998")+", 0.12)","&:hover,&:focus":{backgroundColor:"#3b5998",color:"#FFF",boxShadow:"0 14px 26px -12px rgba("+He("#3b5998")+", 0.42), 0 4px 23px 0px rgba("+He("#000")+", 0.12), 0 8px 10px -5px rgba("+He("#3b5998")+", 0.2)"}},google:{backgroundColor:"#dd4b39",color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+He("#dd4b39")+", 0.14), 0 3px 1px -2px rgba("+He("#dd4b39")+", 0.2), 0 1px 5px 0 rgba("+He("#dd4b39")+", 0.12)","&:hover,&:focus":{backgroundColor:"#dd4b39",color:"#FFF",boxShadow:"0 14px 26px -12px rgba("+He("#dd4b39")+", 0.42), 0 4px 23px 0px rgba("+He("#000")+", 0.12), 0 8px 10px -5px rgba("+He("#dd4b39")+", 0.2)"}},linkedin:{backgroundColor:"#0976b4",color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+He("#0976b4")+", 0.14), 0 3px 1px -2px rgba("+He("#0976b4")+", 0.2), 0 1px 5px 0 rgba("+He("#0976b4")+", 0.12)","&:hover,&:focus":{backgroundColor:"#0976b4",color:"#FFF",boxShadow:"0 14px 26px -12px rgba("+He("#0976b4")+", 0.42), 0 4px 23px 0px rgba("+He("#000")+", 0.12), 0 8px 10px -5px rgba("+He("#0976b4")+", 0.2)"}},pinterest:{backgroundColor:"#cc2127",color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+He("#cc2127")+", 0.14), 0 3px 1px -2px rgba("+He("#cc2127")+", 0.2), 0 1px 5px 0 rgba("+He("#cc2127")+", 0.12)","&:hover,&:focus":{backgroundColor:"#cc2127",color:"#FFF",boxShadow:"0 14px 26px -12px rgba("+He("#cc2127")+", 0.42), 0 4px 23px 0px rgba("+He("#000")+", 0.12), 0 8px 10px -5px rgba("+He("#cc2127")+", 0.2)"}},youtube:{backgroundColor:"#e52d27",color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+He("#e52d27")+", 0.14), 0 3px 1px -2px rgba("+He("#e52d27")+", 0.2), 0 1px 5px 0 rgba("+He("#e52d27")+", 0.12)","&:hover,&:focus":{backgroundColor:"#e52d27",color:"#FFF",boxShadow:"0 14px 26px -12px rgba("+He("#e52d27")+", 0.42), 0 4px 23px 0px rgba("+He("#000")+", 0.12), 0 8px 10px -5px rgba("+He("#e52d27")+", 0.2)"}},tumblr:{backgroundColor:"#35465c",color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+He("#35465c")+", 0.14), 0 3px 1px -2px rgba("+He("#35465c")+", 0.2), 0 1px 5px 0 rgba("+He("#35465c")+", 0.12)","&:hover,&:focus":{backgroundColor:"#35465c",color:"#FFF",boxShadow:"0 14px 26px -12px rgba("+He("#35465c")+", 0.42), 0 4px 23px 0px rgba("+He("#000")+", 0.12), 0 8px 10px -5px rgba("+He("#35465c")+", 0.2)"}},github:{backgroundColor:tt[7],color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+He(tt[6])+", 0.14), 0 3px 1px -2px rgba("+He(tt[6])+", 0.2), 0 1px 5px 0 rgba("+He(tt[6])+", 0.12)","&:hover,&:focus":{backgroundColor:tt[7],color:"#FFF",boxShadow:"0 14px 26px -12px rgba("+He(tt[6])+", 0.42), 0 4px 23px 0px rgba("+He("#000")+", 0.12), 0 8px 10px -5px rgba("+He(tt[6])+", 0.2)"}},behance:{backgroundColor:"#1769ff",color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+He("#1769ff")+", 0.14), 0 3px 1px -2px rgba("+He("#1769ff")+", 0.2), 0 1px 5px 0 rgba("+He("#1769ff")+", 0.12)","&:hover,&:focus":{backgroundColor:"#1769ff",color:"#FFF",boxShadow:"0 14px 26px -12px rgba("+He("#1769ff")+", 0.42), 0 4px 23px 0px rgba("+He("#000")+", 0.12), 0 8px 10px -5px rgba("+He("#1769ff")+", 0.2)"}},dribbble:{backgroundColor:"#ea4c89",color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+He("#ea4c89")+", 0.14), 0 3px 1px -2px rgba("+He("#ea4c89")+", 0.2), 0 1px 5px 0 rgba("+He("#ea4c89")+", 0.12)","&:hover,&:focus":{backgroundColor:"#ea4c89",color:"#FFF",boxShadow:"0 14px 26px -12px rgba("+He("#ea4c89")+", 0.42), 0 4px 23px 0px rgba("+He("#000")+", 0.12), 0 8px 10px -5px rgba("+He("#ea4c89")+", 0.2)"}},reddit:{backgroundColor:"#ff4500",color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+He("#ff4500")+", 0.14), 0 3px 1px -2px rgba("+He("#ff4500")+", 0.2), 0 1px 5px 0 rgba("+He("#ff4500")+", 0.12)","&:hover,&:focus":{backgroundColor:"#ff4500",color:"#FFF",boxShadow:"0 14px 26px -12px rgba("+He("#ff4500")+", 0.42), 0 4px 23px 0px rgba("+He("#000")+", 0.12), 0 8px 10px -5px rgba("+He("#ff4500")+", 0.2)"}},simple:{"&,&:focus,&:hover":{color:"#FFF",background:"transparent",boxShadow:"none"},"&$primary":{"&,&:focus,&:hover,&:visited":{color:Xe[0]}},"&$info":{"&,&:focus,&:hover,&:visited":{color:Qe[0]}},"&$success":{"&,&:focus,&:hover,&:visited":{color:Ze[0]}},"&$warning":{"&,&:focus,&:hover,&:visited":{color:Ke[0]}},"&$rose":{"&,&:focus,&:hover,&:visited":{color:et[0]}},"&$danger":{"&,&:focus,&:hover,&:visited":{color:Je[0]}},"&$twitter":{"&,&:focus,&:hover,&:visited":{color:"#55acee"}},"&$facebook":{"&,&:focus,&:hover,&:visited":{color:"#3b5998"}},"&$google":{"&,&:focus,&:hover,&:visited":{color:"#dd4b39"}},"&$linkedin":{"&,&:focus,&:hover,&:visited":{color:"#0976b4"}},"&$pinterest":{"&,&:focus,&:hover,&:visited":{color:"#cc2127"}},"&$youtube":{"&,&:focus,&:hover,&:visited":{color:"#e52d27"}},"&$tumblr":{"&,&:focus,&:hover,&:visited":{color:"#35465c"}},"&$github":{"&,&:focus,&:hover,&:visited":{color:tt[7]}},"&$behance":{"&,&:focus,&:hover,&:visited":{color:"#1769ff"}},"&$dribbble":{"&,&:focus,&:hover,&:visited":{color:"#ea4c89"}},"&$reddit":{"&,&:focus,&:hover,&:visited":{color:"#ff4500"}}},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:tt[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"}}}},Zt=["color","round","children","fullWidth","disabled","simple","size","block","link","justIcon","className","muiClasses"],Qt=Object(De.a)(Jt),er=o.a.forwardRef((function(e,t){var r,n=Qt(),a=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,h=e.justIcon,m=e.className,g=e.muiClasses,y=Object(Re.a)(e,Zt),v=Ce()((r={},Object(Oe.a)(r,n.button,!0),Object(Oe.a)(r,n[d],d),Object(Oe.a)(r,n[a],a),Object(Oe.a)(r,n.round,i),Object(Oe.a)(r,n.fullWidth,l),Object(Oe.a)(r,n.disabled,s),Object(Oe.a)(r,n.simple,u),Object(Oe.a)(r,n.block,p),Object(Oe.a)(r,n.link,f),Object(Oe.a)(r,n.justIcon,h),Object(Oe.a)(r,m,m),r));return o.a.createElement(Ge.a,Object.assign({},y,{ref:t,classes:g,className:v}),c)})),tr=function(e){return{appBar:{backgroundColor:"transparent",boxShadow:"none",borderBottom:"0",marginBottom:"0",position:"absolute",width:"100%",paddingTop:"10px",zIndex:"1029",color:tt[6],border:"0",borderRadius:"3px",padding:"10px 0",transition:"all 150ms ease 0s",minHeight:"50px",display:"block"},container:Object(h.a)(Object(h.a)({},Ve),{},{minHeight:"50px"}),flex:{flex:1},title:Object(h.a)(Object(h.a)({},qe),{},{lineHeight:"30px",fontSize:"18px",borderRadius:"3px",textTransform:"none",color:"#FFF",letterSpacing:"unset","&:hover,&:focus":{background:"transparent",color:"#FFF"}}),appResponsive:{top:"8px"},primary:Object(h.a)({backgroundColor:Xe[0],color:"#FFF"},mt),info:Object(h.a)({backgroundColor:Qe[0],color:"#FFF"},mt),success:Object(h.a)({backgroundColor:Ze[0],color:"#FFF"},mt),warning:Object(h.a)({backgroundColor:Ke[0],color:"#FFF"},mt),danger:Object(h.a)({backgroundColor:Je[0],color:"#FFF"},mt),list:Object(h.a)(Object(h.a)({},qe),{},{fontSize:"12px",margin:0,marginRight:"-15px",paddingLeft:"0",listStyle:"none",color:"#FFF",paddingTop:"0",paddingBottom:"0"}),listItem:Object(Oe.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:"#FFF",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:"#FFF",background:"rgba("+He(tt[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("+He("#FFF")+", 0.1)"},drawerPaper:Object(h.a)(Object(h.a)(Object(h.a)(Object(h.a)({border:"none",bottom:"0",transitionProperty:"top, bottom, width",transitionDuration:".2s, .2s, .35s",transitionTimingFunction:"linear, linear, ease"},rt),{},{width:260},rt),{},{position:"fixed",display:"block",top:"0",height:"100vh",right:"0",left:"auto",visibility:"visible",overflowY:"visible",borderTop:"none",textAlign:"left",paddingRight:"0px",paddingLeft:"0"},We),{},{"&:before,&:after":{position:"absolute",zIndex:"3",width:"100%",height:"100%",content:'""',display:"block",top:"0"},"&:after":{background:"#000",opacity:".8"}}),sidebarButton:{"&,&:hover,&:focus":{color:"#FFF"},top:"-2px"}}},rr=r(235),nr=r.n(rr),ar=Object(De.a)(tr);function or(e){var t=o.a.useState(!1),r=Object(je.a)(t,2),n=(r[0],r[1],ar()),a=e.color,i=(e.brandText,Ce()(Object(Oe.a)({}," "+n[a],a)));Ye.a,n.list;return o.a.createElement(Be.a,{position:"static",className:n.appBar+i},o.a.createElement($e.a,null,o.a.createElement("div",{style:{display:"flex",justifyContent:"center",width:"100%"}},o.a.createElement("div",{style:{maxWidth:"222px"}},o.a.createElement("img",{src:nr.a,alt:"logo",style:{width:"100%"}})))))}var ir={block:{},left:{float:"left!important",display:"block"},right:{margin:"0",fontSize:"12px",float:"right!important",padding:"15px"},footer:Object(h.a)(Object(h.a)({bottom:"0",borderTop:"1px solid "+tt[15],padding:"15px 0"},qe),{},{zIndex:4}),container:Object(h.a)(Object(h.a)({zIndex:3},Ve),{},{position:"relative"}),containerFluid:Object(h.a)(Object(h.a)({zIndex:3},Ue),{},{position:"relative"}),a:{color:Xe[0],textDecoration:"none",backgroundColor:"transparent"},list:{marginBottom:"0",padding:"0",marginTop:"0"},inlineBlock:{display:"inline-block",padding:"0",width:"auto"},whiteColor:{"&,&:hover,&:focus":{color:"#FFF"}}},cr=Object(De.a)(ir);function lr(e){var t,r,n=cr(),a=e.fluid,i=e.white,c=(e.rtlActive,Ce()((t={},Object(Oe.a)(t,n.container,!a),Object(Oe.a)(t,n.containerFluid,a),Object(Oe.a)(t,n.whiteColor,i),t))),l=n.a+Ce()(Object(Oe.a)({}," "+n.whiteColor,i));Ce()((r={},Object(Oe.a)(r,n.block,!0),Object(Oe.a)(r,n.whiteColor,i),r));return o.a.createElement("footer",{className:n.footer},o.a.createElement("div",{className:c,style:{display:"flex",justifyContent:"center"}},o.a.createElement("div",{className:n.left},o.a.createElement(Ye.a,{className:n.list})),o.a.createElement("p",{className:n.center},"\xa9 ",1900+(new Date).getYear()," ",o.a.createElement("a",{href:"https://sonne.global",className:l,target:"_blank"},"SONNE GLOBAL")," | ".concat("$__footerDescription"!==Dt("$__footerDescription",1)?Dt("$__footerDescription",1):""))))}var sr=r(562),ur=r.n(sr),dr=r(563),pr=r(212),fr=r.n(pr);function hr(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}}var mr=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(Mt("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"}}},gr=r(270),yr=r.n(gr);var vr,br,xr=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(mr)((function(e){var t=e.classes,r=be.getState(),n=r.db,a=r.lightBox,i=o.a.useState(!1),c=Object(je.a)(i,2),l=c[0],s=c[1],u=o.a.useState(!1),d=Object(je.a)(u,2),p=d[0],f=d[1],m=o.a.useState(!1),g=Object(je.a)(m,2),y=g[0],v=g[1],b=o.a.useState(null),x=Object(je.a)(b,2),_=x[0],w=x[1],E=o.a.useState(null),O=Object(je.a)(E,2),j=O[0],k=O[1],S=o.a.useState(!0),L=Object(je.a)(S,2),C=L[0],I=L[1],F=o.a.useState(.5),T=Object(je.a)(F,2),N=T[0],P=T[1];o.a.useEffect((function(){l||(s(!0),window.addEventListener("keydown",(function(e){A(e)}),!1))})),o.a.useEffect((function(){if(a.open&&a.files.length>0&&a.file&&a.file!==_){f(!0),w(a.file);var e=be.getState().lightBox.files.filter((function(e){return e._id===a.file}))[0],t=e&&e.name?e.name.split("."):null,r=e&&e.file?"https://machen.azureedge.net/".concat(e.file):null,o=t.length>0?t[t.length-1]:null;"pdf"===(o?n.fileExtensions.filter((function(e){return e.ext.indexOf(o.toLowerCase())>-1})).length>0?n.fileExtensions.filter((function(e){return e.ext.indexOf(o.toLowerCase())>-1}))[0].viewer:"file":null)&&(I(!0),k(r));n.fileExtensions.filter((function(e){return e.ext.indexOf(o.toLowerCase())>-1})).length>0&&(n.fileExtensions.filter((function(e){return e.ext.indexOf(o.toLowerCase())>-1})).length>0&&n.fileExtensions.filter((function(e){return e.ext.indexOf(o.toLowerCase())>-1}))[0].icon?n.fileExtensions.filter((function(e){return e.ext.indexOf(o.toLowerCase())>-1}))[0].icon:"https://machen.azureedge.net/".concat(e.file)),setTimeout((function(){f(!1),k(r)}),1e3)}}),[a]);var A=function(e){if(39!==e.keyCode&&40!==e.keyCode&&37!==e.keyCode&&38!==e.keyCode&&27!==e.keyCode||1===be.getState().lightBox.files.length&&27!==e.keyCode)return!1;if(be.getState().lightBox.open){var t;if(be.getState().lightBox.files.map((function(e,r){e._id===be.getState().lightBox.file&&(t=r)})),39===e.keyCode||40===e.keyCode)t+1===be.getState().lightBox.files.length?t=0:t+=1,z("R");else{if(37!==e.keyCode&&38!==e.keyCode)return 27===e.keyCode&&void D();0===t?t=be.getState().lightBox.files.length-1:t-=1,z("L")}f(!0),setTimeout((function(){f(!1)}),1e3)}},D=function(){e.reduxFunction("ASYNC","LIGHTBOX_CLOSE"),window.removeEventListener("keydown",(function(e){A(e)}),!1)},z=function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;be.getState().lightBox.open&&(f(!0),be.getState().lightBox.files.map((function(e,r){e._id===be.getState().lightBox.file&&(t=r)})),"R"===y||"R"===r?t+1===be.getState().lightBox.files.length?t=0:t+=1:"L"!==y&&"L"!==r||(0===t?t=be.getState().lightBox.files.length-1:t-=1),be.getState().lightBox.files.length>0&&be.getState().lightBox.files[t]&&e.reduxFunction("ASYNC","LIGHTBOX",Object(h.a)(Object(h.a)({},be.getState().lightBox),{},{file:be.getState().lightBox.files[t]._id})),setTimeout((function(){f(!1),v(!1)}),700))};if(!be.getState().lightBox.open&&0===be.getState().lightBox.files.length)return null;var M=be.getState().lightBox.files.filter((function(e){return e._id===_}))[0];if(!M||!M.file)return o.a.createElement(o.a.Fragment,null);var B=M&&M.name?M.name.split("."):null,$=B.length>0?B[B.length-1]:null,Y=$?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,R=j,G=M&&M.file?"https://fl.machen.ai/?arq=".concat(M.file.replace("&","||MCH-ECOM||"),"&name=").concat(M.name.replace("&","||MCH-ECOM||")):null;return n.fileExtensions.filter((function(e){return e.ext.indexOf($.toLowerCase())>-1})).length>0&&(R=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(M.file)),o.a.createElement(ur.a,{onSwipeMove:function(e,t){e.x>100?v("L"):e.x<-100?v("R"):e.y<-100&&D()},onSwipeEnd:function(e){!1!==y&&z()}},o.a.createElement(ze.a,{className:t.backdrop,open:be.getState().lightBox.open,onClick:function(e){D()}},o.a.createElement("div",{className:t.header,onClick:function(e){D(),e.stopPropagation()}},o.a.createElement("div",{className:t.btClose},o.a.createElement(wt,{title:Dt("$__close","*"),color:Mt("light"),onClick:function(){D()}},"close"))),o.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"}},o.a.createElement("div",{className:t.content,style:{zIndex:1e3},onClick:function(e){e.stopPropagation()}},p?o.a.createElement("div",{className:t.loader},o.a.createElement(Et.a,null)):"img"===Y?o.a.createElement("div",{className:t.img},"string"===typeof j&&(-1===j.indexOf("https://")||j.indexOf("svg")>-1)?o.a.createElement(o.a.Fragment,null,"img"===Y&&R&&R.indexOf("svg")>-1&&o.a.createElement("a",{href:G},o.a.createElement("div",{style:{color:"#FFFFFF",fontWeight:"bolder",fontSize:"22px"}},o.a.createElement("img",{src:yr.a,style:{borderRadius:"15px",boxShadow:"0 1px 2px 2px rgba(0,0,0,0.1)",maxWidth:"100%",height:"100%",maxHeight:"100px"}}),Dt("$__clickHereToDownload",1)))):o.a.createElement("img",{src:"".concat(R),onError:function(e){return e.target.src=R}})):p||"movie"!==Y?p||"microsoft"!==Y?!p&&"pdf"===Y&&j?o.a.createElement("div",{className:t.embed},C&&o.a.createElement("div",{className:t.loader},o.a.createElement(Et.a,null)),o.a.createElement("div",{className:t.embed},o.a.createElement("div",{className:t.embed,style:{overflow:"auto"}},o.a.createElement("div",{className:t.embed,style:{zoom:"".concat(100*N,"%")}},o.a.createElement(dr.PDFReader,{url:j,scale:2,showAllPage:!0,onDocumentComplete:function(){I(!1)}}))),o.a.createElement("div",{style:{position:"absolute",right:"15px",top:"0px"}},o.a.createElement(wt,{title:Dt("$__zoomIn","*"),color:Mt("light"),size:"33px",onClick:function(){var e=N+.1;1!==parseFloat(e)&&(e=parseFloat(e).toFixed(2)),P(parseFloat(e))}},"zoom_in"),o.a.createElement(wt,{title:Dt("$__zonnOut","*"),color:Mt("light"),size:"33px",onClick:function(){var e=N-.1;1!==e&&(e=parseFloat(e).toFixed(2)),parseFloat(e)>0&&P(parseFloat(e))}},"zoom_out")))):p||"audio"!==Y?p||"file"!==Y?p?null:o.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(j)}):o.a.createElement("a",{href:G},o.a.createElement("div",{style:{color:"#FFFFFF",fontWeight:"bolder",fontSize:"22px"}},Dt("$__clickHereToDownload",1))):o.a.createElement(fr.a,{src:j,autoPlay:!0,controls:!0}):o.a.createElement("embed",{className:t.embed,id:"embed-docs",onLoad:function(e){e.target.style.display="none",e.target.style.display="flex"},onError:function(e){e.target.style.display="none",e.target.style.display="flex"},src:"https://view.officeapps.live.com/op/embed.aspx?src=".concat(j)}):o.a.createElement("video",{className:t.movie,src:j,controls:!0})),be.getState().lightBox.files.length>1&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:t.leftButtom},o.a.createElement(wt,{title:Dt("$__previous","*"),color:Mt("light"),size:"33px",onClick:function(){z("L")}},"keyboard_arrow_left")),o.a.createElement("div",{className:t.rightButtom},o.a.createElement(wt,{title:Dt("$__next","*"),color:Mt("light"),size:"33px",onClick:function(){z("R")}},"keyboard_arrow_right"))),o.a.createElement("div",{className:t.footer,onClick:function(e){e.stopPropagation()}},o.a.createElement("a",{href:G},o.a.createElement(wt,{title:Dt("$__download","*"),color:Mt("light"),size:"33px"},"get_app"))))))}))),_r=Ae.b.div(vr||(vr=Object(we.a)(["\n position: relative;\n width: 100%;\n height: 100%;\n padding-top: 20px;\n padding-bottom: 20px;\n"]))),wr=Ae.b.div(br||(br=Object(we.a)(["\n position: fixed;\n top: 0;\n left: 0;\n right: 25%;\n width: 100%;\n height: 100%;\n background-color: #ffffffeb;\n z-index: 7000;\n"])));function Er(e){return o.a.createElement("div",{id:"preloaderComponent"},e.fullScreen?o.a.createElement(wr,null,o.a.createElement(Et.a,{size:50|e.size})):o.a.createElement(_r,null,o.a.createElement(Et.a,null)))}var Or=function(e){return o.a.createElement("div",{style:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},o.a.createElement("div",{style:{width:"100%",maxWidth:"250px",height:"150px",display:"flex",alignItems:"center",justifyContent:"center"}},o.a.createElement(Er,null)))},jr=Object(De.a)((function(){return{customColor:{display:"flex",alignItems:"center","& .MuiBadge-badge":{backgroundColor:Mt("color"),color:Mt("light"),display:"flex",alignItems:"center",zIndex:"1500 !important"}},root:{"& .MuiBadge-badge":{display:"flex",alignItems:"center",zIndex:20}}}})),kr=Object(bt.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"}}}))(xt.a);function Sr(e){var t=jr(),r=o.a.useState(e.badgeVisible||!1),n=Object(je.a)(r,2),a=n[0],i=n[1],c=o.a.useState(e.tooltipprops&&e.tooltipprops.open?e.tooltipprops.open:(!e.tooltipprops||"false"!==String(e.tooltipprops.open))&&void 0),l=Object(je.a)(c,2),s=l[0],u=l[1];return o.a.useEffect((function(){e&&e.tooltipprops&&e.tooltipprops.open&&!s&&u(!0),e&&e.tooltipprops&&s&&"false"===String(e.tooltipprops.open)&&u(!1)})),o.a.createElement("div",{className:t.root},o.a.createElement(kr,{title:e.title&&"string"===typeof e.title?o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{color:Mt("darkText"),display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",height:"auto"}},Dt(e.title,1))):e.title?o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:t.customColor},o.a.createElement("div",{style:{position:"relative"}},e.title,e.onClose&&o.a.createElement(vt.a,{style:{position:"absolute",left:"5px",top:"0px",zIndex:10,cursor:"pointer"},onClick:function(){return e.onClose()},title:"close"},"close")))):"",className:null,open:s,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},o.a.createElement(St.a,{badgeContent:e.count,style:{opacity:1,fontSize:"5px"},max:e.max||9,anchorOrigin:{vertical:"top",horizontal:"right"},invisible:e.count&&!a},"string"===typeof e.icon?o.a.createElement(vt.a,{onMouseEnter:function(){return!e.badgeVisible&&i(!0)},onMouseLeave:function(){return!e.badgeVisible&&i(!1)},onClick:e.onClick?function(t){e.onClick(),t.stopPropagation()}:null,className:e.className,style:Object(h.a)({width:"fit-content",height:"fit-content",fontSize:e.size||"22px",color:e.color||Mt("medium"),opacity:!e.disabled||a?"1":"0.5",cursor:e.onClick?"pointer":""},e.style)},e.icon):o.a.createElement(e.icon,{onMouseEnter:function(){return!e.badgeVisible&&i(!0)},onMouseLeave:function(){return!e.badgeVisible&&i(!1)},onClick:e.onClick?function(t){e.onClick(),t.stopPropagation()}:null,className:e.className,style:Object(h.a)({width:e.size||"22px",height:e.size||"22px",fontSize:e.size||"22px",color:e.color||Mt("medium"),opacity:!e.disabled||a?"1":"0.5",cursor:e.onClick?"pointer":""},e.style)}))))}var Lr={button:Object(h.a)(Object(h.a)({},qe),{},{alignItems:"center",justifyContent:"center",cursor:"pointer",userSelect:"none","&$reverse":{}}),buttonText:Object(h.a)(Object(h.a)({},qe),{},{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"}},Cr=Object(De.a)(Lr),Ir=o.a.forwardRef((function(e,t){var r,n,a=Cr(),i=(e.reverse,e.text),c=Ce()((r={},Object(Oe.a)(r,a.button,!0),Object(Oe.a)(r,a.reverse,!!e.reverse),r)),l=Ce()((n={},Object(Oe.a)(n,a.buttonText,!0),Object(Oe.a)(n,a.reverse,!!e.reverse),n));return o.a.createElement("div",{className:e.text?l:c,onClick:function(){return e.onClick?e.onClick():null},style:Object(h.a)({},e.style)},o.a.createElement("div",{className:a.iconButton,style:{color:e.iconColor?Mt(e.iconColor):Mt("color"),backgroundColor:e.iconBackground?Mt(e.iconBackground):"none"}},e.icon?o.a.createElement(Sr,{className:e.iconBackground?a.icon:a.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(h.a)({},e.style?e.style:{})}):o.a.createElement(Sr,{className:e.iconBackground?a.icon:a.onlyIcon,icon:"stop_circle",color:e.iconColor,title:e.title||null,onClick:function(){return e.onClick?e.onClick():null},style:Object(h.a)({},e.style?e.style:{})})),i&&o.a.createElement("div",{className:a.text,style:{color:e.textColor?Mt(e.textColor):Mt("medium")}},i))})),Fr=r(1325),Tr=r(54),Nr=r.n(Tr);function Pr(){Pr=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Ar=Object(De.a)({users:{position:"relative",bottom:"0px",right:"2px",fontSize:"10px","& .MuiAvatarGroup-root":{justifyContent:"flex-end"},"& .MuiAvatar-root":{width:"25px",height:"25px",fontSize:"10px"}}}),Dr=function(e){var t=be.getState(),r=t.session,n=t.functions.socket,a=o.a.useState(e.data),i=Object(je.a)(a,2),c=i[0],l=i[1],s=Ar();o.a.useEffect((function(){l(e.data)}),[e.data]);var u=function(){var t=Object(Ee.a)(Pr().mark((function t(a,o){var i,s;return Pr().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})).map((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(s=c)._reactions[a][r._id],l(s)):l(Object(h.a)(Object(h.a)({},c),{},{_reactions:Object(h.a)(Object(h.a)({},c._reactions),{},Object(Oe.a)({},a,Object(Oe.a)({},r._id,Object(h.a)(Object(h.a)(Object(h.a)(Object(h.a)({},r.displayName?{displayName:r.displayName}:{}),r.name?{name:r.name}:{}),r.image?{image:r.image}:{}),{},{reactDate:{low:Fe()().tz("America/Sao_Paulo").unix("X")}}))))}));case 4:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();c._reactions&&Object.keys(c._reactions).length>0&&Object.keys(c._reactions).map((function(e){Object.keys(c._reactions[e]).length>0&&Object.keys(c._reactions[e]).map((function(t){t===r._id&&e}))}));var d=function(t){var n=t.react,a=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)?o.a.createElement(o.a.Fragment,null):o.a.createElement(Ir,{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]?a||Mt("menu"):"lightgray",size:"18px",onClick:function(){u(n,!!(c._reactions&&c._reactions[n]&&c._reactions[n][r._id]))},title:c._reactions&&c._reactions[n]&&Object.keys(c._reactions[n]).length>0?o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{position:"relative",width:"100%",paddingBottom:3,borderBottom:"1px solid lightgray",marginBottom:"7px"}},Dt("$__".concat(n),1)),o.a.createElement("div",{className:s.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 o.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},o.a.createElement(Fr.a,{alt:c._reactions[n][e].name,src:c._reactions[n][e].image||Nr.a}),o.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(Fe()(1e3*c._reactions[n][e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})))):Dt("$__".concat(n),1)})};return o.a.createElement("div",{onClick:function(e){e.stopPropagation()}},o.a.createElement("div",{style:{display:"flex",minWidth:"fit-content",justifyContent:"center"}},o.a.createElement(d,{react:"like",primaryIcon:"thumb_up",secondaryIcon:"thumb_up_off_alt"}),o.a.createElement(d,{react:"nolike",primaryIcon:"thumb_down",secondaryIcon:"thumb_down_off_alt"}),o.a.createElement(d,{react:"love",primaryIcon:"favorite",secondaryIcon:"favorite_border",color:"red"}),o.a.createElement(d,{react:"approve",primaryIcon:"verified",color:"green"}),o.a.createElement(d,{react:"attention",primaryIcon:"report_problem",color:"red"}),e.children&&o.a.createElement(o.a.Fragment,null,e.children)))},zr={tags:Object(h.a)(Object(h.a)({},qe),{},{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(h.a)(Object(h.a)({},qe),{},{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:Mt("light")}})},Mr=r(791),Br=r(1383),$r=r(1291),Yr=r(801),Rr=r(1289);function Gr(){Gr=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}Object(De.a)((function(e){return{iconButtonStyleTransaparent:{padding:"3px",margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},iconButtonStyleWhite:{padding:"3px",margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));var Hr=function(e){var t=o.a.useState(!1),r=Object(je.a)(t,2),n=r[0],a=r[1],i=o.a.useState(e.color?e.color:"rgba(200,200,200,1)"),c=Object(je.a)(i,2),l=c[0],s=c[1],u=o.a.useRef(null),d=function(t){u.current&&u.current.contains(t.target)||(a(!1),e.onClose&&e.onClose())},p=function(){var t=Object(Ee.a)(Gr().mark((function t(r){return Gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.onChange&&e.onChange(r),a(!n),!e._id){t.next=5;break}return t.next=5,Pt.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 o.a.createElement("div",{className:"cardColorPicker",style:Object(h.a)({},e.style?e.style:{}),onClick:function(e){e.stopPropagation(),e.preventDefault()},onDrag:function(e){e.stopPropagation(),e.preventDefault()},onDragStart:function(e){e.stopPropagation(),e.preventDefault()},onDragEnter:function(e){e.stopPropagation(),e.preventDefault()},onDragCapture:function(e){e.stopPropagation(),e.preventDefault()},onDragEnterCapture:function(e){e.stopPropagation(),e.preventDefault()},onDragOver:function(e){e.stopPropagation()}},o.a.createElement(xt.a,{title:Dt("$__color",1)},o.a.createElement("div",{ref:u,style:Object(h.a)(Object(h.a)({},e.label?{borderRadius:7,padding:7,color:l?Xt(l,!0):"#FFFFFF",fontSize:12}:{width:e.size?e.size:21,height:e.size?e.size:21}),{},{margin:3,backgroundColor:l,borderRadius:e.size?e.size:21,cursor:"pointer"}),onClick:function(){a((function(e){return!e}))}},e.label?e.label:"")),o.a.createElement(Rr.a,{open:n,anchorEl:u.current,role:void 0,transition:!0,disablePortal:!!e.disablePortal},(function(t){var r=t.TransitionProps;t.placement;return o.a.createElement($r.a,Object.assign({},r,{style:{transformOrigin:"right center"}}),o.a.createElement(Yr.a,null,o.a.createElement(Br.a,{onClickAway:d},o.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()}},o.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",marginTop:"-5px",justifyContent:"end"}},o.a.createElement(Ct,{title:Dt("$__cancel",1),color:"lightgrey",icon:"close",onClick:function(){s(e.color?e.color:"rgba(200,200,200,1)"),a(!n)},size:"30px"}),e.color?o.a.createElement(Ct,{title:Dt("$__removeColor",1),color:"red",icon:"format_color_reset",onClick:function(){p(null)},size:"30px"}):o.a.createElement(o.a.Fragment,null),o.a.createElement(Ct,{title:Dt("$__saveColor",1),color:"green",icon:"save",onClick:function(){p(l)},size:"30px"})),o.a.createElement(Mr.a,{color:l,onChange:function(e,t){s("rgba(".concat(e.rgb.r,", ").concat(e.rgb.g,", ").concat(e.rgb.b,", ").concat(e.rgb.a,")")),t.stopPropagation()},disableAlpha:!0}),o.a.createElement("div",{style:{clear:"both"}})))))})))},Wr=Object(De.a)(zr);var Ur=function(e){var t=Wr(),r=o.a.useState(!!e.showOptions&&e.showOptions),n=Object(je.a)(r,2),a=n[0],i=n[1],c=o.a.useState(!1),l=Object(je.a)(c,2),s=l[0],u=l[1],d=o.a.useState([]),p=Object(je.a)(d,2),f=p[0],h=p[1];return o.a.useEffect((function(){return h(be.getState().db[e.dbNode?e.dbNode:"tag"]),function(){h([]),i(!1),u(!1)}}),[e]),o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:a||e.expanded?t.tagsOver:t.tags,onClick:function(t){e.options&&e.options.length>0&&!a&&i(!0),t.stopPropagation()},onMouseOver:function(){u(!0)},onMouseLeave:function(){setTimeout((function(){u(!1)}),500)}},f&&f.length>0&&e.options&&e.options.filter((function(e){return e.value})).map((function(t,r){var n=t;if(be.getState().db.tag.filter((function(e){return e.value===t.value})).length>0){n=be.getState().db.tag.filter((function(e){return e.value===t.value}))[0];var c=f.filter((function(e){return e.value===n.value})).length>0&&f.filter((function(e){return e.value===n.value}))[0].color?f.filter((function(e){return e.value===n.value}))[0].color:Mt("medium");return o.a.createElement("div",{key:r,className:"tag",style:{position:"relative",float:"left",whiteSpace:"nowrap",backgroundColor:c},onClick:function(){e.colorPicker||i(!1)}},!e.showOptions&&a&&e.colorPicker?o.a.createElement(Hr,{label:n.label,color:c,_id:n.value,onChange:function(e){var t=n;t.color=e,be.getState().functions.socket.emit("tag.UPD",t)}}):(a||e.expanded)&&o.a.createElement("div",{className:"tag",style:{backgroundColor:c,color:n.color?Xt(n.color,!0):"#FFFFFF"}},n.label))}})),!e.showOptions&&a&&!e.expanded&&s&&o.a.createElement("div",{style:{position:"absolute",top:"0",right:"0"}},o.a.createElement(xt.a,{title:Dt("$__hideTags")},o.a.createElement(o.a.Fragment,null,o.a.createElement(kt.a,{onClick:function(e){i(!1)}},o.a.createElement(wt,{size:"22px",color:Mt("medium"),icon:"visibility_off"})))))))},Vr=r(1385),qr=r(1384),Xr=Object(De.a)((function(e){return{iconButtonStyleTransaparent:{padding:"3px",margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},iconButtonStyleWhite:{padding:"3px",margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));var Kr=Object(a.memo)((function(e){var t=Xr(),r=o.a.useState(!1),n=Object(je.a)(r,2),a=n[0],i=n[1],c=o.a.useRef(null),l=function(t){t.preventDefault(),t.stopPropagation(),c.current&&c.current.contains(t.target)||(i(!1),e.onClose&&e.onClose())};function s(t){"Tab"===t.key&&(t.preventDefault(),i(!1),e.onClose&&e.onClose())}return e.options&&0!==e.options.length?o.a.createElement("div",{style:Object(h.a)({zIndex:"100 !important"},e.style?e.style:{})},o.a.createElement(xt.a,{title:Dt("$__options",1)},e.text?o.a.createElement(Ge.a,{ref:c,"aria-controls":a?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){i((function(e){return!e})),!a&&e.onOpen&&e.onOpen(),a&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},o.a.createElement(o.a.Fragment,null,o.a.createElement("span",{style:{marginRight:"15px",color:e.textColor?e.textColor:e.color?e.color:Mt("menu"),overflow:"hidden",textOverflow:"ellipsis",width:"90%",maxWidth:e.maxWidth?e.maxWidth:"90%",whiteSpace:"nowrap"}},e.text),o.a.createElement(wt,{usePropagation:!0,size:e.size?e.size:"20px",color:e.btColor?e.btColor:Mt("menu"),icon:e.icon?e.icon:e.horizontalButton?"more_horiz":"more_vert"}))):o.a.createElement(kt.a,{ref:c,"aria-controls":a?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){i((function(e){return!e})),!a&&e.onOpen&&e.onOpen(),a&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},o.a.createElement(wt,{usePropagation:!0,size:e.size?e.size:"20px",color:e.btColor?e.btColor:Mt("menu"),icon:e.icon?e.icon:e.horizontalButton?"more_horiz":"more_vert"}))),o.a.createElement(Rr.a,{open:a,anchorEl:c.current,role:void 0,transition:!0,style:{zIndex:"100 !important"}},(function(t){var r=t.TransitionProps;t.placement;return o.a.createElement($r.a,Object.assign({},r,{style:{transformOrigin:"right center",zIndex:"100 !important"}}),o.a.createElement(Yr.a,null,o.a.createElement(Br.a,{onClickAway:l},o.a.createElement(qr.a,{autoFocusItem:a,id:"menu-list-grow",onKeyDown:s,style:{zIndex:"100 !important"}},e.options.filter((function(e){return e&&!e.hide})).map((function(t,r){return o.a.createElement(Vr.a,{key:r,style:{color:t&&t.color?t.color:Mt("menu")},onClick:function(r){i(!1),e.onClose&&e.onClose(),t.onClick&&t.onClick(),r.preventDefault(),r.stopPropagation()}},t.render?t.render:t.avatar?o.a.createElement(Fr.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)):o.a.createElement(wt,{usePropagation:!0,icon:t.icon,style:{margin:"none !important"},color:t.color?t.color:Mt("menu")}),!t.render&&o.a.createElement("span",{style:{marginLeft:"7px"}},Dt(t.name,1)))}))))))}))):o.a.createElement(o.a.Fragment,null)}));function Jr(){Jr=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Zr=Ft.a.create("true"===String("true")?{baseURL:"https://machen.azurewebsites.net/api"}:{baseURL:"http://192.168.0.10:7071/api"});Ft.a.defaults.withCredentials=!0,Zr.interceptors.request.use(function(){var e=Object(Ee.a)(Jr().mark((function e(t){var r;return Jr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return 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 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),Zr.interceptors.response.use(function(){var e=Object(Ee.a)(Jr().mark((function e(t){return Jr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),(function(e){var t=Promise.reject(e.response);return e&&e.response&&e.response.status&&401===e.response.status&&"/login"!==window.location.pathname&&"/register"!==window.location.pathname&&"/activate"!==window.location.pathname&&console.log(e),t}));var Qr=Zr;r(580);function en(){en=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var tn=function(){var e=Object(Ee.a)(en().mark((function e(t,r){var n,a,o,i,c,l=arguments;return en().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=l.length>2&&void 0!==l[2]&&l[2],a=l.length>3?l[3]:void 0,(o=r).originalName=o.name,(i=new FormData).append("file",o,o.name),i.append("id",t),e.next=9,new Promise(function(){var e=Object(Ee.a)(en().mark((function e(t,r){var n,o,l;return en().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!a||!a.onUploadProgress){e.next=9;break}return n=a.onUploadProgress,e.next=5,Pt.post("upload/file/",i,{onUploadProgress:n});case 5:(o=e.sent)&&(c=o.data),e.next=13;break;case 9:return e.next=11,Pt.post("upload/file/",i);case 11:(l=e.sent)&&(c=l.data);case 13:e.next=19;break;case 15:e.prev=15,e.t0=e.catch(0),a&&a.onUploadError&&a.onUploadError(e.t0),r(!1);case 19:return e.prev=19,t(!0),e.finish(19);case 22:case"end":return e.stop()}}),e,null,[[0,15,19,22]])})));return function(t,r){return e.apply(this,arguments)}}());case 9:if(!e.sent){e.next=18;break}if(n){e.next=15;break}return e.abrupt("return","https://machen.azureedge.net/".concat(c.file));case 15:return e.abrupt("return",c);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)}}();function rn(){rn=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var nn=function(){var e=Object(Ee.a)(rn().mark((function e(t){var r,n,a;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=be.getState().sideModule.data).status&&delete r.status,(n=window.location.hash.split("/"))[0]=n[0].replace("#",""),e.prev=4,e.next=7,Pt.post("feed/save",Object(h.a)(Object(h.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(h.a)(Object(h.a)({},be.getState().sideModule),{},{id:a.data._id,data:Object(h.a)({},r)})),console.log(a),t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{feeds:Object(h.a)(Object(h.a)({},be.getState().db.feeds),{},Object(Oe.a)({},r._id,Object(h.a)(Object(h.a)(Object(h.a)({},r),be.getState().db.feeds&&be.getState().db.feeds[r._id]?be.getState().db.feeds[r._id]:{}),{},{_parent:Object(h.a)(Object(h.a)({},be.getState().db.feeds&&be.getState().db.feeds[r._id]&&be.getState().db.feeds[r._id]._parent?be.getState().db.feeds[r._id]._parent:{}),{},Object(Oe.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)}}(),an=function(){var e=Object(Ee.a)(rn().mark((function e(t){var r,n,a,o=arguments;return rn().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(Ee.a)(rn().mark((function e(n,a){var o,i;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Qr.post("/Feed_List_V2",r);case 3:(o=e.sent)&&o.data&&(i={},o.data.map((function(e){var t={};e.parents&&e.parents.length>0&&e.parents.map((function(e){t=Object(h.a)(Object(h.a)({},t),{},Object(Oe.a)({},e._id,Object(h.a)({idRel:e.idRel},e.i)))})),i=Object(h.a)(Object(h.a)({},i),{},Object(Oe.a)({},e.data._id,Object(h.a)(Object(h.a)(Object(h.a)({},e.data),e.hide?{hide:!0}:{}),{},{feed:[Object(h.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(h.a)(Object(h.a)({},be.getState().db),{},{feeds:Object(h.a)(Object(h.a)({},be.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 on(){on=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var cn=function(){var e=Object(Ee.a)(on().mark((function e(t,r){return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise(function(){var e=Object(Ee.a)(on().mark((function e(n,a){var o;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r||be.getState().db.cards[r]){e.next=14;break}return e.prev=1,e.next=4,Qr.get("/M_Card_ById/?cardId=".concat(r));case 4:(o=e.sent)&&o.data&&o.data[r]&&(t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},r,Object(h.a)(Object(h.a)({},be.getState().db.cards[r]),o.data[r])),o.data)})),n(!0)),e.next=14;break;case 8:e.prev=8,e.t0=e.catch(1),console.group("loadCard::ERR::"),console.log(e.t0),console.groupEnd(),n(!0);case 14:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t,r){return e.apply(this,arguments)}}());case 2:if(!e.sent){e.next=5;break}return e.abrupt("return",!0);case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),ln=function(){var e=Object(Ee.a)(on().mark((function e(t,r){var n,a,o,i,c,l,s,u,d,p,f,m,g,y,v,b,x,_,w,E,O,j,k,S,L,C,I;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Fe()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),n=r.idRel,a=r.adminView,o=void 0!==a&&a,i=r.callback,c=void 0===i?null:i,l=r.cardLoad,s=void 0===l?"my":l,u=r.completed,d=void 0!==u&&u,p=r.status,f=r.deleted,m=void 0!==f&&f,g=r.archived,y=void 0!==g&&g,v=r.templates,b=void 0!==v&&v,x=r.allStatus,_=void 0!==x&&x,w=r.completedDays,E=void 0===w?7:w,O=!1,("search"===s||t.ignoreLoader)&&(O=!0),j=be.getState(),k=j.session,S=Object(h.a)({},k.cards.load),L=Se()("".concat(JSON.stringify(r))).toString(),!(Object.keys(S).length>0&&S[L])){e.next=9;break}return e.abrupt("return",!0);case 9:return t.reduxFunction("ASYNC","SET_SESSION",Object(h.a)(Object(h.a)({},be.getState().session),{},{cards:Object(h.a)(Object(h.a)({},be.getState().session.cards),{},{load:Object(h.a)(Object(h.a)({},be.getState().session.cards.load),{},Object(Oe.a)({},L,O?"completed":"loading"))})})),C=(C=String(be.getState().session.dashboard.period).replace("$__last","")).replace("Days",""),e.next=14,new Promise(function(){var e=Object(Ee.a)(on().mark((function e(r){var a,i;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Qr.post("/Card_List/",Object(h.a)(Object(h.a)(Object(h.a)({idRel:n,adminView:o,load:s,completed:d,archived:y,templates:b,status:p,allStatus:_},d?{completedDays:E||C}:{}),t.search?{search:t.search}:{}),t.deleted||m?{deleted:!0}:{}));case 3:if(!(a=e.sent)||!a.data){e.next=10;break}return i=a.data,e.next=8,sn(t,i);case 8:e.sent&&(t.reduxFunction("ASYNC","SET_SESSION",Object(h.a)(Object(h.a)({},be.getState().session),{},{cards:Object(h.a)(Object(h.a)({},be.getState().session.cards),{},{load:Object(h.a)(Object(h.a)({},be.getState().session.cards.load),{},Object(Oe.a)({},L,"completed"))})})),c&&c(),r(!0));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 14:if(!(I=e.sent)){e.next=18;break}return t.reduxFunction("ASYNC","preLoader",Object(h.a)(Object(h.a)({},be.getState().preLoader),{},{cards:!1})),e.abrupt("return",I);case 18:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),sn=function(){var e=Object(Ee.a)(on().mark((function e(t,r){var n,a,o;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=be.getState(),a=n.session,e.next=3,new Promise((function(e,t){var n={};r.filter((function(e){return e&&e.data&&e.data._id})).length>0?r.filter((function(e){return e&&e.data&&e.data._id})).map((function(t,o){var i=t.data._id;if(!be.getState().db.cards[t.data._id]){var c={};t.users.length>0&&t.users.map((function(e){var r=null;t&&t.myDayUsers&&t.myDayUsers.filter((function(e){return e._id})).length>0&&(r=t.myDayUsers.filter((function(t){return t._id===e._id})).length>0?t.myDayUsers.filter((function(t){return t._id===e._id}))[0].date:null),c=Object(h.a)(Object(h.a)({},c),{},Object(Oe.a)({},e._id,Object(h.a)(Object(h.a)({},e),r?{myDay:r}:{})))})),t&&t.data&&t.data.planId&&delete t.data.planId,n=Object(h.a)(Object(h.a)({},n),{},Object(Oe.a)({},i,Object(h.a)(Object(h.a)(Object(h.a)(Object(h.a)({},be.getState().db.cards[i]&&be.getState().db.cards[i]._selected?{_selected:!0}:{}),t.data),{},{_isFavorite:"false"===String(t.favorite),_myDay:t.myDay,_parent:t.parent,_planId:t.plan,_users:c,_tags:t.tags,_aspects:t.aspects?t.aspects:[],_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(Oe.a)({},t.timer._id,Object(h.a)(Object(h.a)({},t.timer),{},{userId:a._id}))}:{})))}o+1===r.filter((function(e){return e&&e.data&&e.data._id})).length&&e(n)})):e({})}));case 3:if(!(o=e.sent)){e.next=7;break}return t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),o)}),(function(){})),e.abrupt("return",o);case 7:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),un=function(){var e=Object(Ee.a)(on().mark((function e(t,r){var n,a,o,i,c,l,s=arguments;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=s.length>2&&void 0!==s[2]&&s[2],a=s.length>3&&void 0!==s[3]?s[3]:null,o=s.length>4&&void 0!==s[4]?s[4]:"my",i=s.length>5&&void 0!==s[5]&&s[5],c=s.length>6?s[6]:void 0,e.next=7,ln(t,{idRel:r,adminView:n,callback:a,cardLoad:o,completed:i,status:c});case 7:if(!(l=e.sent)){e.next=10;break}return e.abrupt("return",l);case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),dn=function(){var e=Object(Ee.a)(on().mark((function e(t){var r,n,a=arguments;return on().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(Ee.a)(on().mark((function e(a,o){return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("/sp"!==window.location.pathname||36===n[0].length||"archived"!==n[1]){e.next=6;break}return e.next=3,ln(t,{cardLoad:"plans",archived:!0});case 3:return e.next=5,ln(t,{cardLoad:"plans",archived:!0,completed:!0,completedDays:r});case 5:a(!0);case 6:if("/sp"!==window.location.pathname||36===n[0].length||"completed"!==n[1]){e.next=10;break}return e.next=9,ln(t,{cardLoad:"plans",completed:!0,completedDays:r});case 9:a(!0);case 10:if("/sp"!==window.location.pathname||36===n[0].length||"templates"!==n[1]){e.next=14;break}return e.next=13,ln(t,{cardLoad:"templates",templates:!0});case 13:a(!0);case 14:if("/sp"!==window.location.pathname||36===n[0].length||"admin"!==n[1]){e.next=18;break}return e.next=17,ln(t,{cardLoad:"plans",adminView:!0});case 17:a(!0);case 18:if("/sp"!==window.location.pathname||36===n[0].length||"deleted"!==n[1]){e.next=22;break}return e.next=21,ln(t,{cardLoad:"plans",deleted:!0});case 21:a(!0);case 22:if("/d"!==window.location.pathname&&"/login"!==window.location.pathname&&"/"!==window.location.pathname||"dayTasks"===n[1]){e.next=26;break}return e.next=25,ln(t,{cardLoad:"dashboard"});case 25:a(!0);case 26:if("/d"!==window.location.pathname||"dayTasks"!==n[1]){e.next=31;break}return console.log("495-------------------------"),e.next=30,ln(t,{adminView:!0,cardLoad:"myDay"});case 30:a(!0);case 31:if("/d"!==window.location.pathname||"ourTasks"!==n[1]){e.next=35;break}return e.next=34,ln(t,{adminView:!0,cardLoad:"myDay"});case 34:a(!0);case 35:if("/sp"!==window.location.pathname||!n[0]||36!==n[0].length){e.next=41;break}return e.next=38,ln(t,{idRel:n[0],cardLoad:"plan"});case 38:return e.next=40,ln(t,{idRel:n[0],cardLoad:"plan",completed:!0,completedDays:r});case 40:a(!0);case 41:if("/sp"===window.location.pathname&&36!==n[0].length&&a(!0),"/sp"!==window.location.pathname||36===n[0].length||"archived"!==n[1]){e.next=45;break}return e.next=45,ln(t,{cardLoad:"plans",archived:!0});case 45:if("/sp"!==window.location.pathname||36===n[0].length||"templates"!==n[1]){e.next=48;break}return e.next=48,ln(t,{cardLoad:"templates"});case 48:if("/sp"!==window.location.pathname||36===n[0].length||"deleted"!==n[1]){e.next=51;break}return e.next=51,ln(t,{cardLoad:"plans",deleted:!0});case 51:if("/library"!==window.location.pathname){e.next=55;break}return e.next=54,ln(t,{cardLoad:"plans"});case 54:a(!0);case 55:if("/calendar"!==window.location.pathname){e.next=59;break}return e.next=58,ln(t,{cardLoad:"calendar",iniDate:"",endDate:""});case 58:a(!0);case 59:if("/bright-and-connected"!==window.location.pathname){e.next=64;break}if("tab"!==n[0]||"home"===n[1]){e.next=63;break}return e.next=63,ln(t,{cardLoad:"bc"});case 63:a(!0);case 64:if("/c"!==window.location.pathname){e.next=69;break}if("tab"!==n[0]||"users"===n[1]){e.next=68;break}return e.next=68,ln(t,{cardLoad:"plans"});case 68:a(!0);case 69:if("/t"!==window.location.pathname){e.next=90;break}if(n[1]&&(!n[1]||"myTasks"!==n[1])){e.next=76;break}return e.next=73,ln(t,{cardLoad:"myResponsible"});case 73:return e.next=75,ln(t,{cardLoad:"myResponsible",completed:!0,completedDays:r});case 75:a(!0);case 76:if(!n[1]||"myDay"!==n[1]&&"ourDay"!==n[1]){e.next=80;break}return e.next=79,ln(t,{cardLoad:"myDay",completed:!0,completedDays:r});case 79:a(!0);case 80:if(!n[1]||"myTasks"===n[1]||"myDay"===n[1]){e.next=90;break}return e.next=83,ln(t,{cardLoad:"in"});case 83:return e.next=85,ln(t,{cardLoad:"in",completed:!0,completedDays:r});case 85:return e.next=87,ln(t,{cardLoad:"myResponsible"});case 87:return e.next=89,ln(t,{cardLoad:"myResponsible",completed:!0,completedDays:r});case 89:a(!0);case 90:if("/tags"!==window.location.pathname){e.next=100;break}return e.next=93,ln(t,{cardLoad:"in"});case 93:return e.next=95,ln(t,{cardLoad:"in",completed:!0,completedDays:r});case 95:return e.next=97,ln(t,{cardLoad:"myResponsible"});case 97:return e.next=99,ln(t,{cardLoad:"myResponsible",completed:!0,completedDays:r});case 99:a(!0);case 100:if("/masterAdmin"!==window.location.pathname&&"/plataformAdministrator"!==window.location.pathname||a(!0),"/subscriptionUpgrade"===window.location.pathname&&a(!0),36!==n[0].length||!be.getState().db.cards||be.getState().db.cards[n[0]]&&!be.getState().db.cards[n[0]]){e.next=108;break}if(!(be.getState().db.cards&&be.getState().db.cards[n[0]]&&n[0])||be.getState().db.cards[n[0]]._loadedFeeds){e.next=108;break}if("bright-and-connected"!==n[1]){e.next=108;break}return e.next=107,an(Object(h.a)(Object(h.a)({},t),{},{fnIdentification:"Layout/pageDataRequest() - withHASH"}),36===n[0].length?n[0]:null);case 107:a(!0);case 108:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}());case 5:if(!e.sent){e.next=8;break}return e.abrupt("return",!0);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),pn=r(1417);function fn(){fn=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var hn=function(){var e=Object(Ee.a)(fn().mark((function e(t){var r,n,a,o,i,c,l,s,u=arguments;return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=u.length>1&&void 0!==u[1]&&u[1],n=u.length>2?u[2]:void 0,(a=window.location.hash.split("/"))[0]=a[0].replace("#",""),36!==a[0].length&&(a[0]=null),o=Object(h.a)({},n),i=o._id?Object(h.a)({},be.getState().db.cards[o._id]):{},c=null,o.order&&String(o.order.low)&&(o.order=o.order.low),"chatGroup"===o.type&&o._planId&&(delete o._planId,delete o._parent,delete o.idRel),Object.keys(o).map((function(e){return"file"===e&&(c=o[e],delete o.file),(o[e]&&o[e].low||o[e]&&o[e].low&&"0"===String(o[e].low))&&(o[e]=o[e].low),o})),o._id&&(!o._id||36===o._id.length)){e.next=21;break}return window.location.pathname.indexOf("sp")>-1&&!o._parent&&(o._parent=o._parent?o._parent:a[0]?a[0]:null),o._parent&&(o.idRel=o._parent),window.location.pathname.indexOf("sp")>-1&&a[0]&&36===a[0].length&&(o._planId=a[0]),e.next=17,bn(t,Object(h.a)(Object(h.a)({},o),{},{oldData:i}),c,r);case 17:return l=e.sent,e.abrupt("return",l);case 21:return e.next=23,xn(t,Object(h.a)(Object(h.a)({},o),{},{oldData:i}),c,r);case 23:if(s=e.sent,!(o&&o.type&&o.type.indexOf("guideline")>-1&&"guideline"!==o.type&&Object.keys(be.getState().db.cards).filter((function(e){return(be.getState().db.cards[e]._planId===a[0]||be.getState().db.cards[e]._parent===a[0])&&!0===be.getState().db.cards[e]._selected})).length>0)){e.next=27;break}return e.next=27,vn(o._id);case 27:return e.abrupt("return",s);case 28:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),mn=function(){var e=Object(Ee.a)(fn().mark((function e(t,r){var n,a;return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(t&&t.store&&be.getState().functions&&be.getState().functions.socket,be.getState().functions.socket),e.next=3,Pt.post("timer/start",{idRel:r,startTime:Fe()().unix("X")});case 3:if(!(a=e.sent)){e.next=7;break}return n.emit("card.UPD",{cardId:r,cardData:Object(h.a)(Object(h.a)({},be.getState().db.cards[r]),{},{_kpiTimer:Object(h.a)(Object(h.a)({},be.getState().db.cards[r]._kpiTimer&&be.getState().db.cards[r]._kpiTimer),{},Object(Oe.a)({},a.data._id,Object(h.a)({},a.data)))})}),e.abrupt("return",a.data);case 7:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),gn=function(){var e=Object(Ee.a)(fn().mark((function e(t,r){var n,a;return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(t&&t.store&&be.getState().functions&&be.getState().functions.socket,be.getState().functions.socket),e.next=3,Pt.put("timer/stop",{idRel:r});case 3:if(!(a=e.sent)){e.next=7;break}return n.emit("card.UPD",{cardId:r,cardData:Object(h.a)(Object(h.a)({},be.getState().db.cards[r]),{},{_kpiTimer:Object(h.a)(Object(h.a)({},be.getState().db.cards[r]._kpiTimer&&be.getState().db.cards[r]._kpiTimer),{},Object(Oe.a)({},a.data._id,Object(h.a)({},a.data)))})}),e.abrupt("return",a.data);case 7:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),yn=function(){var e=Object(Ee.a)(fn().mark((function e(t,r,n){var a,o,i;return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=(t&&t.store&&be.getState().functions&&be.getState().functions.socket,be.getState().functions.socket),e.next=3,Pt.delete("timer/run/".concat(n),{idRel:r});case 3:if(o=e.sent,(i=be.getState().db.cards[r]._kpiTimer)[n]&&delete i[n],!o){e.next=10;break}return t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},r,Object(h.a)(Object(h.a)({},be.getState().db.cards[r]),{},{_kpiTimer:i})))})),a.emit("card.TimerDelete",{cardId:r,timerId:n}),e.abrupt("return",!0);case 10:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),vn=function(){var e=Object(Ee.a)(fn().mark((function e(t){var r,n,a;return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=window.location.hash.split("/"))[0]=r[0].replace("#",""),n=Object.keys(be.getState().db.cards).filter((function(e){if((be.getState().db.cards[e]._planId===r[0]||be.getState().db.cards[e]._parent===r[0])&&!0===be.getState().db.cards[e]._selected&&be.getState().db.cards[e].type&&be.getState().db.cards[e].type.indexOf("guideline")>-1)return!0}))[0],a=Object.keys(be.getState().db.cards).filter((function(e){return(be.getState().db.cards[e]._planId===r[0]||be.getState().db.cards[e]._parent===r[0])&&!0===be.getState().db.cards[e]._selected&&be.getState().db.cards[e].type&&-1===be.getState().db.cards[e].type.indexOf("guideline")})),Pt.put("matrix/aspects",{_id:n,_parent:r[0],aspects:a}),t&&t.reduxFunction&&t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},n,Object(h.a)(Object(h.a)({},be.getState().db.cards[n]),{},{_aspects:a})))})),e.abrupt("return",!0);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),bn=function(){var e=Object(Ee.a)(fn().mark((function e(t,r,n){var a,o,i,c,l,s,u,d,p=arguments;return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=p.length>3&&void 0!==p[3]&&p[3],o=(t&&t.store&&be.getState().functions&&be.getState().functions.socket,be.getState().functions.socket),be.getState().db.dataType,i=be.getState(),c=i.session,l=i.db,(s=window.location.hash.split("/"))[0]=s[0].replace("#",""),u=new Promise(function(){var e=Object(Ee.a)(fn().mark((function e(i,u){return fn().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"),o.emit("data",{module:"cards",method:"post",action:"add"},r,function(){var e=Object(Ee.a)(fn().mark((function e(o){return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r._users=Object(Oe.a)({},c._id,{name:l.users[c._id].name?l.users[c._id].name:null,displayName:l.users[c._id].displayName?l.users[c._id].displayName:null,image:l.users[c._id].image?l.users[c._id].image:null,access:5,_id:c._id}),!(r.type&&r.type.indexOf("guideline")>-1)){e.next=4;break}return e.next=4,vn(o.id);case 4:r.myTask&&delete r.myTask,r._loaded=!0,r._loadTimeline=!0,o.id&&(a||t.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},be.getState().sideModule),{},{id:o.id,data:Object(h.a)(Object(h.a)(Object(h.a)({},be.getState().sideModule.data),r),{},{_id:o.id})})),r._id=o.id,parseInt(r.order)>=0&&(r.order={low:r.order}),r=Object(h.a)(Object(h.a)({},r),o.data),t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},r._id,Object(h.a)(Object(h.a)({},r),{},{created_at:Fe()().tz("America/Sao_Paulo").unix("x"),updated_at:{low:Fe()().tz("America/Sao_Paulo").unix("x")}})))})),_n(t,r._id,Object(Oe.a)({},o.log._id,Object(h.a)(Object(h.a)({},o.log),{},{_parent:r._id}))),n?xn(t,Object(h.a)({},r),n,a):"tab"===s[0]&&"myDay"===s[1]&&(Ln(t,{_id:o.id,userId:c._id,option:!0},{new:!0,user:c._id,cardId:r._id,cardData:Object(h.a)({},r)}),_n(t,r._id,Object(Oe.a)({},o.log._id,Object(h.a)(Object(h.a)({},o.log),{},{_parent:r._id}))))),i(Object(h.a)(Object(h.a)({},r),{},{created_at:Fe()().tz("America/Sao_Paulo").unix("x"),updated_at:{low:Fe()().tz("America/Sao_Paulo").unix("x")}}));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}catch(u){console.log(u)}case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),e.next=9,u;case 9:return d=e.sent,e.abrupt("return",d);case 11:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),xn=function(){var e=Object(Ee.a)(fn().mark((function e(t,r,n){var a,o,i;return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=Object(h.a)({},r),i=(t&&t.store&&be.getState().functions&&be.getState().functions.socket,be.getState().functions.socket),!n){e.next=7;break}return e.next=5,tn(a._id,n);case 5:o=e.sent,a.image=o;case 7:return(!n||n&&o)&&(t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},a._id,Object(h.a)(Object(h.a)(Object(h.a)({},be.getState().db.cards[a._id]),a),{},{_users:Object(h.a)({},be.getState().db.cards[a._id]._users)})))})),i.emit("data",{module:"cards",method:"put",action:"update220527"},a,function(){var e=Object(Ee.a)(fn().mark((function e(r){var n,o;return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a.order&&parseInt(a.order)>=0&&(a.order={low:a.order}),r&&r.log&&r.log._id&&_n(t,a._id,Object(Oe.a)({},r.log._id,Object(h.a)(Object(h.a)({},r.log),{},{_parent:[a._id]}))),n=be.getState(),o=n.db,!(a.type&&a._id&&a.type.indexOf("guideline")>-1&&"guideline"!==a.type&&Object.keys(o.cards).filter((function(e){return o.cards[e]._parent===a._id&&o.dataType.filter((function(t){return t.name===o.cards[e].type&&"swot"===t.module})).length>0})))){e.next=6;break}return e.next=6,vn(a._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)}}(),_n=function(e,t,r){var n=be.getState().timeline[t]?be.getState().timeline[t]:{};n=Object(h.a)(Object(h.a)({},n),r),e.reduxFunction("ASYNC","SET_TIMELINE",Object(h.a)(Object(h.a)({},be.getState().timeline),{},Object(Oe.a)({},t,n)))},wn=function(){var e=Object(Ee.a)(fn().mark((function e(t,r){return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t&&t.store&&be.getState().functions&&be.getState().functions.socket,be.getState().functions.socket).emit("data",{module:"cards",method:"put",action:"restore"},{_id:r._id},function(){var e=Object(Ee.a)(fn().mark((function e(n){return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:On(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)}}(),En=function(){var e=Object(Ee.a)(fn().mark((function e(t,r,n){var a,o,i,c=arguments;return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=c.length>3&&void 0!==c[3]&&c[3],o=be.getState(),i=o.db,n?On(t,{cardId:r._id,childrens:r.childrensDelete},!0):(t&&t.store&&be.getState().functions&&be.getState().functions.socket,be.getState().functions.socket).emit("data",{module:"cards",method:"put",action:"delete"},{_id:r._id,deleted:!0,childrensDelete:a,client:i.cards[r._id]&&i.cards[r._id].client?i.cards[r._id].client:i.cards[r._id]&&i.cards[r._id]._planId&&i.cards[i.cards[r._id]._planId]&&i.cards[i.cards[r._id]._planId].client?i.cards[i.cards[r._id]._planId].client:null},function(){var e=Object(Ee.a)(fn().mark((function e(n){return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:On(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)}}(),On=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=Object(h.a)({},be.getState().db.cards);if(n[t.cardId]=Object(h.a)(Object(h.a)({},n[t.cardId]),{},{deleted:r}),t.childrens){var a=Bn(t.cardId);Object.keys(a).map((function(e){n[e]=Object(h.a)(Object(h.a)({},n[e]),{},{deleted:r})}))}e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),n)}))},jn=function(){var e=Object(Ee.a)(fn().mark((function e(t,r){return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},r._id,Object(h.a)(Object(h.a)({},be.getState().db.cards[r._id]?be.getState().db.cards[r._id]:{}),r)))}));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),kn=function(){var e=Object(Ee.a)(fn().mark((function e(t,r){var n,a,o,i,c,l;return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=be.getState(),a=n.db,o=a.cards,i=o[r],(c=window.location.hash.split("/"))[0]=c[0].replace("#",""),36!==c[0].length&&(c[0]=null),l={},Object.keys(a.cards).filter((function(e){return a.cards[e]&&!a.cards[e].deleted&&(a.cards[e]._planId===c[0]||a.cards[e]._parent===c[0])})).map((function(e){l=Object(h.a)(Object(h.a)({},l),{},Object(Oe.a)({},e,a.cards[e]))})),Object.keys(l).map((function(e){l[e]&&l[e].type&&-1===l[e].type.indexOf("guideline")&&-1===l[e].type.indexOf("objective")&&-1===l[e].type.indexOf("goal")&&(l[e]=Object(h.a)(Object(h.a)({},l[e]),{},{_selected:!1}))})),i&&i._aspects&&i._aspects.length>0&&i._aspects.map((function(e){l[e]&&(l[e]=Object(h.a)(Object(h.a)({},l[e]),{},{_selected:!0}))})),t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},o),l)}));case 11:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Sn=function(){var e=Object(Ee.a)(fn().mark((function e(t,r,n){var a;return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=Fe()().tz("America/Sao_Paulo").unix("x"),t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},r._id,Object(h.a)(Object(h.a)(Object(h.a)({},n&&n.data?n.data:{}),be.getState().db.cards[r._id]),{},{_users:Object(h.a)(Object(h.a)(Object(h.a)({},be.getState().db.cards[r._id]&&be.getState().db.cards[r._id]._users?be.getState().db.cards[r._id]._users:{}),n&&n.data&&n.data._users?n.data._users:{}),{},Object(Oe.a)({},r.userId,Object(h.a)(Object(h.a)(Object(h.a)({},be.getState().db.cards[r._id]&&be.getState().db.cards[r._id]._users&&be.getState().db.cards[r._id]._users[r.userId]?be.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.option?a:null})))})))}));case 2:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),Ln=function(){var e=Object(Ee.a)(fn().mark((function e(t,r,n){var a,o;return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=Fe()().tz("America/Sao_Paulo").unix("x"),Sn(t,r,n),(o=(t&&t.store&&be.getState().functions&&be.getState().functions.socket,be.getState().functions.socket)).emit("data",{module:"cards",method:"post",action:"setMyDay"},Object(h.a)(Object(h.a)({},r),{},{createDate:a})),o.emit("card.UPD",{new:n,user:W._id,cardId:r._id,cardData:Object(h.a)(Object(h.a)({},be.getState().db.cards[r._id]),{},{_users:Object(h.a)(Object(h.a)({},be.getState().db.cards[r._id]._users),{},Object(Oe.a)({},r.userId,Object(h.a)(Object(h.a)({},be.getState().db.cards[r._id]._users[r.userId]),{},{myDay:r.option?a:null})))})}),be.getState().sideModule.id&&be.getState().sideModule.id===r._id&&t.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},be.getState().sideModule),{},{data:Object(h.a)(Object(h.a)({},be.getState().sideModule.data),{},{_users:Object(h.a)(Object(h.a)({},be.getState().db.cards[r._id]._users),{},Object(Oe.a)({},r.userId,Object(h.a)(Object(h.a)({},be.getState().db.cards[r._id]._users[r.userId]),{},{myDay:r.option?a:null})))})}));case 6:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),Cn=function(){var e=Object(Ee.a)(fn().mark((function e(t,r){return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Pt.put("/cards/moveTo",Object(h.a)({},r));case 3:if(!e.sent){e.next=7;break}return In(t,r),e.abrupt("return",!0);case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),$t({message:"".concat(Dt("$__tryAgainOrContactSupport",1),". ERROR: cMoveTo->API~887"),variant:"error",persist:!1,horizontal:"right"});case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t,r){return e.apply(this,arguments)}}(),In=function(){var e=Object(Ee.a)(fn().mark((function e(t,r){var n;return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=be.getState().db.cards,e.next=3,new Promise(function(){var e=Object(Ee.a)(fn().mark((function e(t,a){var o;return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Yn(r.cardId);case 2:(o=e.sent)&&o.length>0?o.map((function(e,a){n[e]&&(n[e]=Object(h.a)(Object(h.a)({},n[e]),{},{_planId:r.planId})),a+1===o.length&&t(!0)})):t(!0);case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}());case 3:e.sent&&(n[r.cardId]&&(n[r.cardId]=Object(h.a)(Object(h.a)({},n[r.cardId]),{},{_parent:r.newRel,_planId:r.planId})),t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),n)})));case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Fn=function(){var e=Object(Ee.a)(fn().mark((function e(t,r){var n,a;return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(be.getState().db.cards[r.cardId]){e.next=7;break}return e.next=3,cn(t,r.cardId);case 3:e.sent&&(n=be.getState().db.cards[r.cardId]&&be.getState().db.cards[r.cardId]._users?be.getState().db.cards[r.cardId]._users:{},r.isResponsible&&Object.keys(n).map((function(e){e!==r.userId&&(n[e].isResponsible=null)})),t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},r.cardId,Object(h.a)(Object(h.a)({},be.getState().db.cards[r.cardId]?be.getState().db.cards[r.cardId]:{}),{},{_users:Object(h.a)(Object(h.a)({},n),{},Object(Oe.a)({},r.userId,Object(h.a)(Object(h.a)(Object(h.a)(Object(h.a)(Object(h.a)({},r.userData?r.userData:{}),be.getState().db.users[r.userId]?be.getState().db.users[r.userId]:{}),be.getState().db.cards[r.cardId]&&be.getState().db.cards[r.cardId]._users&&be.getState().db.cards[r.cardId]._users[r.userId]?be.getState().db.cards[r.cardId]._users[r.userId]:{}),r.isResponsible?{isResponsible:!0}:{}),r.access?{access:r.access}:{})))})))}))),e.next=10;break;case 7:a=be.getState().db.cards[r.cardId]&&be.getState().db.cards[r.cardId]._users?be.getState().db.cards[r.cardId]._users:{},r.isResponsible&&Object.keys(a).map((function(e){e!==r.userId&&(a[e].isResponsible=null)})),t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},r.cardId,Object(h.a)(Object(h.a)({},be.getState().db.cards[r.cardId]?be.getState().db.cards[r.cardId]:{}),{},{_users:Object(h.a)(Object(h.a)({},a),{},Object(Oe.a)({},r.userId,Object(h.a)(Object(h.a)(Object(h.a)(Object(h.a)(Object(h.a)({},be.getState().db.cards[r.cardId]&&be.getState().db.cards[r.cardId]._users&&be.getState().db.cards[r.cardId]._users[r.userId]?be.getState().db.cards[r.cardId]._users[r.userId]:{}),a[r.userId]?a[r.userId]:{}),r.userData?r.userData:{}),r.isResponsible?{isResponsible:!0}:{}),r.access?{access:r.access}:{})))})))}));case 10:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Tn=function(){var e=Object(Ee.a)(fn().mark((function e(t,r){return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pt.put("cards/unlinkChildrens",{cardId:r.cardId,planId:r._planId});case 2:e.sent&&(t&&t.store&&be.getState().functions&&be.getState().functions.socket,be.getState().functions.socket).emit("card.unlinkChildrens",{cardId:r.cardId,planId:r._planId});case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Nn=function(){var e=Object(Ee.a)(fn().mark((function e(t,r){var n;return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=be.getState().db.cards,{},Object.keys(n).filter((function(e){return n[e]._parent===r.cardId})).map((function(e){n[e]._parent=n[e]._planId})),t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:n}));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Pn=function(){var e=Object(Ee.a)(fn().mark((function e(t){var r,n,a,o,i;return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=be.getState(),n=r.db,a=r.session,o=be.getState().db.cards[t],!be.getState().db.cards[t]){e.next=18;break}if(i={},(!be.getState().db.cards[t].private||be.getState().db.cards[t].private&&be.getState().db.cards[t]._users&&be.getState().db.cards[t]._users[a._id])&&(i=Object(Oe.a)({},t,{_id:o._id,type:o.type,name:o.name,icon:o.type&&n&&n.dataType?n.dataType.filter((function(e){return e.name===o.type}))[0].icon:"topic"})),!o._parent){e.next=15;break}return e.t0=h.a,e.t1=h.a,e.t2={},e.next=11,Pn(o._parent);case 11:e.t3=e.sent,e.t4=(0,e.t1)(e.t2,e.t3),e.t5=i,i=(0,e.t0)(e.t4,e.t5);case 15:return e.abrupt("return",i);case 18:return e.abrupt("return",{});case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),An=function(){var e=Object(Ee.a)(fn().mark((function e(t,r){return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t&&t.store&&be.getState().functions&&be.getState().functions.socket,be.getState().functions.socket).emit("data",{module:"cards",method:"put",action:"link"},r,function(){var e=Object(Ee.a)(fn().mark((function e(t){return fn().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)}}(),Dn=function(e){var t=be.getState(),r=t.db,n=t.session,a=Object(h.a)({},r.cards[e]);if(r.cards[e]){var o=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&&(o=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(o)&&(o=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(o)&&(o=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)),o}return 0},zn=function(e,t,r){var n=be.getState(),a=n.db,o=n.session,i=Object(h.a)({},e?a.cards[e]:{}),c=Object(h.a)(Object(h.a)(Object(h.a)({},c),i._users?i._users:{}),a.users);if(i._planId&&a.cards[i._planId]&&a.cards[i._planId]._users&&a.cards[i._planId]._users[o._id]&&Object.keys(a.cards[i._planId]._users).map((function(e){a.users[e]&&e!==o._id&&a.users[e]._parent&&!a.users[a.users[e]._parent]&&(c=Object(h.a)(Object(h.a)({},c),{},Object(Oe.a)({},e,Object(h.a)(Object(h.a)({},a.cards[i._planId]._users[e]),{},{_id:e,type:"external"}))))})),i._parent&&a.cards[i._parent]&&a.cards[i._parent]._users&&a.cards[i._parent]._users[o._id]&&Object.keys(a.cards[i._parent]._users).map((function(e){a.users[e]&&e!==o._id&&a.users[e]._parent&&!a.users[a.users[e]._parent]&&(c=Object(h.a)(Object(h.a)({},c),{},Object(Oe.a)({},e,Object(h.a)(Object(h.a)({},a.cards[i._parent]._users[e]),{},{_id:e,type:"external"}))))})),(!r||r&&!r.isArray)&&c){var l={};return Object.keys(c).map((function(e){(!t||t&&t.indexOf(c[e].type)>-1)&&(l=Object(h.a)(Object(h.a)({},l),{},Object(Oe.a)({},e,c[e])))})),l}if(r&&r.isArray&&c){var s=[];return Object.keys(c).map((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{}},Mn=function(){var e=Object(Ee.a)(fn().mark((function e(t,r,n){var a,o;return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=new Promise(function(){var e=Object(Ee.a)(fn().mark((function e(t,a){return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pt.post("/cards/copy",{from:r,to:n});case 2:e.sent&&t(!0);case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),e.next=3,a;case 3:return o=e.sent,e.abrupt("return",o);case 5:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),Bn=function e(t){var r=be.getState().db.cards,n=Object(Oe.a)({},t,!0);return Object.keys(r).filter((function(e){return r[e]._parent===t})).map((function(t){n=Object(h.a)(Object(h.a)({},n),e(t))})),n},$n=function(){var e=Object(Ee.a)(fn().mark((function e(t,r){var n,a,o,i;return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.data&&t.data._id?be.getState().db.cards[t.data._id]:{},a=(t&&t.store&&be.getState().functions&&be.getState().functions.socket,be.getState().functions.socket),i=o=r,"completed"===o.status?i=Object(h.a)(Object(h.a)({},i),{},{completed_at:{low:Fe()().unix("X")}}):o=Object(h.a)(Object(h.a)({},i),{},{completed_at:null});try{a.emit("data",{module:"cards",method:"put",action:"status"},Object(h.a)({_id:n._id},o),Object(Ee.a)(fn().mark((function e(){return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},n._id,Object(h.a)(Object(h.a)({},be.getState().db.cards[n._id]),i)))}));case 1:case"end":return e.stop()}}),e)}))))}catch(c){console.log(c)}case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Yn=function(){var e=Object(Ee.a)(fn().mark((function e(t){var r,n,a,o,i,c=arguments;return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=c.length>1&&void 0!==c[1]?c[1]:null,n=c.length>2?c[2]:void 0,a=be.getState().db.cards,o=[],!((i=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){i.map(function(){var n=Object(Ee.a)(fn().mark((function n(a,c){var l;return fn().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Yn(a,r,t);case 2:l=n.sent,-1===o.indexOf(a)&&o.push(a),l&&l.length>0?l.map((function(t,r){-1===o.indexOf(t)&&o.push(t),r+1===l.length&&c+1===i.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)}}(),Rn=function(){var e=Object(Ee.a)(fn().mark((function e(t,r,n){var a,o;return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Yn(r,n);case 2:a=e.sent,o=be.getState().db.cards,a&&a.length>0&&a.map((function(e){o[e]=Object(h.a)(Object(h.a)({},o[e]),{},{status:n,completed_at:"completed"===n?{low:Fe()().unix("X")}:null},"completed"===n?{_parentCompleted:{cardId:r,completed_at:{low:Fe()().unix("X")}}}:{_parentCompleted:null})})),o[r]=Object(h.a)(Object(h.a)({},o[r]),{},{status:n,completed_at:"completed"===n?{low:Fe()().unix("X")}:null}),t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:o}));case 7:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),Gn=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=be.getState(),n=r.session,a=be.getState().db.cards[e]&&be.getState().db.cards[e]._notifications?be.getState().db.cards[e]._notifications:{};Object.keys(a).map((function(e){return a[e]=parseInt(a[e])}));var o=0;return t&&console.log(a),Object.keys(a).filter((function(e){return"total"!==e})).map((function(r){t&&console.log(r),be.getState().db.cards[e]&&be.getState().db.cards[e]._users&&be.getState().db.cards[e]._users[n._id]&&be.getState().timeline[e]&&parseInt(a[r])<Object.keys(be.getState().timeline[e]).filter((function(t){return be.getState().timeline[e][t]&&be.getState().timeline[e][t].type&&be.getState().timeline[e][t].type===r})).length?(a[r]=be.getState().timeline&&be.getState().timeline[e]&&Object.keys(be.getState().timeline[e]).length>0?Object.keys(be.getState().timeline[e]).filter((function(t){if(n&&n._id&&parseInt(be.getState().timeline[e][t].created_at)>1650666142&&be.getState().timeline[e][t].type===r&&be.getState().timeline[e][t].user&&be.getState().timeline[e][t].user._id!==n._id&&(!be.getState().timeline[e][t].readedBy||be.getState().timeline[e][t].readedBy&&!be.getState().timeline[e][t].readedBy[n._id]))return!0})).length:0,o+=parseInt(a[r])):(a[r]=parseInt(a[r]),o+=parseInt(a[r]))})),Object(h.a)(Object(h.a)({},a),{},{total:o})},Hn=Object(De.a)((function(e){return{iconButtonStyle:{margin:0,marginTop:"-8px",backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));var Wn=function(e){var t=Hn(),r=Gn(e.nodeId);return r.total<1?o.a.createElement(o.a.Fragment,null):o.a.createElement("div",{id:"notificationsBt",style:{top:0,zIndex:3}},o.a.createElement(Ct,{className:t.iconButtonStyle,badgeContent:r.total,color:Mt("menu"),icon:0===r.total?"notifications_none":"notifications_active",size:"17px",transparent:!0}))},Un=r(799),Vn=r(767),qn=r.n(Vn);function Xn(){Xn=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Kn=["$__last7Days","$__last15Days","$__last30Days","$__last60Days","$__last90Days","$__last180Days","$__last365Days"];var Jn=Object(_e.b)((function(e){return{store:{session:e.session}}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState().session,r=o.a.useState(null),n=Object(je.a)(r,2),a=n[0],i=n[1],c=Boolean(a),l=function(){var t=Object(Ee.a)(Xn().mark((function t(r){var n;return Xn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i(null),"string"!==typeof r){t.next=7;break}return e.reduxFunction("ASYNC","SET_SESSION",Object(h.a)(Object(h.a)({},be.getState().session),{},{period:r,dashboard:Object(h.a)(Object(h.a)({},be.getState().session),{},{period:r})})),n=(n=String(r).replace("$__last","")).replace("Days",""),t.next=7,dn(e,n);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return o.a.createElement("div",null,o.a.createElement(kt.a,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:function(e){i(e.currentTarget)},style:Object(h.a)({},e.style?e.style:{})},o.a.createElement(qn.a,null)),o.a.createElement(Un.a,{id:"long-menu",anchorEl:a,keepMounted:!0,open:c,onClose:l,PaperProps:{style:{maxHeight:216,width:"20ch"}}},Kn.map((function(e){return o.a.createElement(Vr.a,{key:e,selected:e===t.dashboard.period,onClick:function(t){return l(e)}},Dt(e,1))}))))})),Zn=r(1386),Qn=Object(bt.a)({root:Object(h.a)(Object(h.a)({},qe),{},{color:Mt("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:Mt("mediumText"),marginTop:"standard"===Mt("fieldVariant")||"filled"===Mt("fieldVariant")?"-10px":0},"& label.Mui-focused":{color:Mt("mediumText"),marginTop:"standard"===Mt("fieldVariant")||"filled"===Mt("fieldVariant")?"-10px":0},"& .MuiInput-underline:after":{borderBottomColor:Mt("line")},"& .MuiOutlinedInput-root":{borderRadius:Mt("fieldRadius"),"& fieldset":{borderColor:Mt("line")},"&.Mui-focused fieldset":{borderColor:Mt("line")}},"& .MuiFilledInput-root":{borderRadius:Mt("fieldRadius"),"& fieldset":{borderColor:Mt("line")},"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")},"&.Mui-focused":{borderBottomColor:Mt("line"),"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Mt("fieldVariant")?0:"filled"===Mt("fieldVariant")?"-15px":0,borderRadius:Mt("fieldRadius"),"& fieldset":{borderColor:Mt("line")},"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")},"&.Mui-focused":{borderBottomColor:Mt("line"),"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")}}}})})(Zn.a);function ea(){ea=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var ta=Object(De.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:Mt("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Mt("color"),fontWeight:"500",alignItems:"center"}},iconButtonStyle:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"},padding:"3px"}}}));var ra=function(e){var t=be.getState(),r=t.session,n=t.functions,a=t.db,i=n.socket,c=ta(),l=o.a.useState(!1),s=Object(je.a)(l,2),u=s[0],d=s[1],p=o.a.useState(e.title?e.title.trim():null),f=Object(je.a)(p,2),m=f[0],g=f[1],y=o.a.useState(!1),v=Object(je.a)(y,2),b=v[0],x=v[1],_=o.a.useState(!1),w=Object(je.a)(_,2),E=w[0],O=w[1];o.a.useEffect((function(){u||(!e.title&&e.editable&&x(!0),d(!0))}),[e.title]);var j=function(){var t=Object(Ee.a)(ea().mark((function t(r){return ea().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:try{e._id&&i.emit("data",{module:"node",method:"put",action:"update",noLog:!0},Object(h.a)({_id:e._id},r)),e.onEdit&&e.onEdit(m,e._id?e._id:null)}catch(n){console.log(n)}x(!1);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return o.a.createElement("div",{className:c.header,style:Object(h.a)({minHeight:e.style&&e.style.minHeight?e.style.minHeight:"30px"},e.style)},o.a.createElement("div",{className:!e.onExpanding||b?c.content:c.contentWithExpand},o.a.createElement("div",{className:c.info},!e.private||be.getState().controls.showPrivate||E?o.a.createElement(o.a.Fragment,null,e.icon&&o.a.createElement("div",{className:c.headerIcon,style:{color:e.color?e.color:Mt("color")}},o.a.createElement(Sr,{size:"calc(".concat(e.fontSize," + 4px)")||!1,icon:e.icon,color:"parent",title:e.iconTitle?e.iconTitle.substring(0,1).toUpperCase().concat(e.iconTitle.substring(1)):""})),e.searchText?o.a.createElement("div",{style:Object(h.a)({marginLeft:"7px"},e.searchTextStyle?e.searchTextStyle:{})},Ht(e.title?e.title:"",e.searchText,!!e.dark)):o.a.createElement("div",{className:c.headerTitle,style:Object(h.a)({fontSize:e.fontSize?e.fontSize:"14px",color:e.color?e.color:Mt("color"),marginLeft:e.icon?"7px":"none"},e.textStyle?e.textStyle:{})},b?o.a.createElement("div",{style:Object(h.a)({position:"relative",float:"left",width:"100%",paddingTop:"10px",paddingLeft:"7px",display:"flex",alignItems:"center",justifyContent:"space-between"},e.inputStyle?e.inputStyle:{}),onClick:function(e){e.stopPropagation()}},o.a.createElement(Qn,{style:{width:"calc(100% - 60px)"},label:e.fieldName?e.fieldName:Dt("$__nameOfCard",1),variant:Mt("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){g(e.target.value)},onKeyDown:function(t){13===t.keyCode&&m&&j({name:m}),27===t.keyCode&&(x(!1),g(e.value?e.value:e.title?e.title.trim():""))}},value:m,placeholder:Dt("$__titleOfCard_placeholder",1),autoFocus:!e.noAutoFocus,multiline:!!e.multiline}),o.a.createElement(Sr,{color:Mt("medium"),onClick:function(){return b?x(!1):e.onCancel()},icon:"cancel",title:Dt("$__close","*"),size:e.actionsSize||"25px"}),o.a.createElement(Sr,{color:"green",icon:"save",onClick:function(){b?j({name:m}):e.onSave()},title:Dt("$__save"," * "),size:e.actionsSize||"25px"})):o.a.createElement(xt.a,{title:e.title?e.title:""},o.a.createElement("div",{style:Object(h.a)({},e.expanded?{width:"100%"}:{width:"100%",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:e.viewAllName&&!0===e.viewAllName?"":"nowrap"}),onDoubleClick:function(){e.onEdit&&e.editable&&(g(e.value?e.value:e.title?e.title.trim():""),x(!0))}},"".concat(e.showOrder?"".concat(e.showOrder,". "):"").concat(e.title&&e.title.indexOf("$__")>-1?Dt(e.title,1):e.title?function(e){var t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}(e.title):""))))):o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:c.headerIcon,style:{color:"lightgray"}},o.a.createElement(Sr,{size:"calc(".concat(e.fontSize," + 4px)")||!1,icon:"private_connectivity",color:"parent",title:e.iconTitle?e.iconTitle.substring(0,1).toUpperCase().concat(e.iconTitle.substring(1)):""})),o.a.createElement("div",{style:{marginLeft:"7px",fontSize:12,color:"lightgray"}},e.privateTitle?e.privateTitle:Dt("$__privateActivity")))),e.periodFilter&&r&&r.period&&o.a.createElement("div",{style:{position:"absolute",right:0,textAlign:"right",color:"#FFFFFF",display:"flex",alignItems:"center",whiteSpace:"nowrap"}},Dt(r.period),o.a.createElement(Jn,{style:{color:"#FFFFFF",height:"20px",width:"20px"}}))),!b&&o.a.createElement("div",{style:{position:"absolute",right:7,padding:"3px 0px",display:"flex",alignItems:"center",borderRadius:7,backgroundColor:"rgba(250,250,250,0.7)"},onClick:function(e){e.preventDefault(),e.stopPropagation()}},!e.moreButton&&o.a.createElement(Wn,{nodeId:e._id}),e.moreButton&&o.a.createElement("div",{style:{position:"absolute",top:0,right:0,display:"flex",alignItems:"center"},onClick:function(e){e.stopPropagation()}},!e.private||be.getState().controls.showPrivate||E?o.a.createElement(o.a.Fragment,null,e.colorPicker&&o.a.createElement("div",{style:{zIndex:1e3}},o.a.createElement(Hr,{color:e._id&&a.cards[e._id]&&a.cards[e._id].color?a.cards[e._id].color:null,_id:e._id,onChange:function(t){e.colorPicker(t)},style:{zIndex:5e3}})),e.options&&e.options.length>0&&e.options.filter((function(e){if(e&&e.name&&("$__removeSelection"===e.name||"$__selectThis"===e.name))return!0})).length>0&&o.a.createElement(xt.a,{title:Dt(e.options.filter((function(e){if(e&&e.name&&("$__removeSelection"===e.name||"$__selectThis"===e.name))return!0}))[0].name)},o.a.createElement(kt.a,{onClick:function(t){e.options.filter((function(e){if(e&&e.name&&("$__removeSelection"===e.name||"$__selectThis"===e.name))return!0}))[0].onClick()},className:c.iconButtonStyle},o.a.createElement(wt,{size:"22px",color:Mt("menu"),icon:e.options.filter((function(e){if(e&&e.name&&("$__removeSelection"===e.name||"$__selectThis"===e.name))return!0}))[0].icon,usePropagation:!0}))),e.onExpanding&&o.a.createElement(xt.a,{title:Dt(e.isExpanded?"$__collapse":"$__expand")},o.a.createElement(kt.a,{onClick:function(t){e.onExpanding()},className:c.iconButtonStyle},o.a.createElement(wt,{size:"22px",color:Mt("menu"),icon:e.isExpanded?"expand_less":"expand_more",usePropagation:!0}))),e.options&&e.options.length>0&&o.a.createElement(Kr,Object.assign({noButton:!0,options:[].concat(Object(K.a)(e.options),Object(K.a)(e.private&&E?[{color:"lightblue",icon:"lock",name:"$__lockThisPrivateCard",onClick:function(){O((function(e){return!e})),e.setPrivate&&e.setPrivate(!E)},show:"hover"}]:[]))},e.optionsProps?e.optionsProps:{}))):o.a.createElement(o.a.Fragment,null,o.a.createElement(Ct,{title:Dt("$__showPrivateActivity","*"),color:"lightGray",icon:"lock_open",onClick:function(){O((function(e){return!e})),e.setPrivate&&e.setPrivate(!E)},size:"21px",style:{padding:"0px !important"}})))))},na=r(234),aa=r.n(na),oa=function(e){return{root:{position:"relative"},timeInfo:{display:"flex",alignItems:"center",color:"grey",width:"calc(100% - 15px)",position:"relative",float:"left",marginBottom:"7px","& .text":{marginLeft:"7px"}},dataSave:{padding:"7px"},fieldSet:{padding:"7px",width:"calc(100% - 50px)"},progress:{},progressPercentage:{}}};r(519);function ia(){ia=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}r(520);var ca=Object(_e.b)((function(e){return{}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(oa)((function(e){var t=e.classes,r=be.getState().functions.socket,n=o.a.useState(!1),a=Object(je.a)(n,2),i=(a[0],a[1]),c=o.a.useState(""),l=Object(je.a)(c,2),s=l[0],u=l[1],d=o.a.useState(0),p=Object(je.a)(d,2),f=p[0],m=p[1],g=e.timer||{},y=e.data||{},v=function(){var e=Object(Ee.a)(ia().mark((function e(t,r){var n;return ia().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i(!0),n=String(f),(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)),m(n);case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();if(!y)return null;var b=function(){var t=Object(Ee.a)(ia().mark((function t(){var n,a;return ia().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.timer||s?(n=isNaN(f)?f.replace(",","."):f,a={_id:Object(pn.a)(),cardId:y._id,idRel:y._id,value:e.PositiveValue?n:"-".concat(n),type:"kpi",kpi_type:y.kpi_type?y.kpi_type:null,message:s||""},e.timer&&(a=Object(h.a)(Object(h.a)({},a),{},{value:g.diff,ini:g.created_at,fin:g.updated_at,type:"timer",to:g.to})),r.emit("data",{module:"timeline",method:"post",action:"add"},Object(h.a)({},a)),e.callBack&&e.callBack(),e.timer&&!e.manualAdd&&yn(e,y._id,g._id),m(0),u("")):$t({message:Dt("$__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?o.a.createElement("div",{className:t.dataSave},o.a.createElement("fieldset",null,o.a.createElement("legend",{style:{color:Mt("color")}},Dt("$__new",1)),!e.timer&&o.a.createElement(Qn,{placeholder:Dt("$__value",1),value:Yt(f||0,"time"===y.kpi_type?"number":y.kpi_type,y.kpi_currency?y.kpi_currency:null),InputLabelProps:{shrink:!0},InputProps:{onKeyDown:function(e){v(e,"ini")}}}),o.a.createElement(Qn,{multiline:!0,placeholder:Dt("$__description",1),onChange:function(e){return u(e.target.value)},value:s,InputProps:{autoComplete:"new-password"}}),o.a.createElement("div",{style:{display:"flex",textAlign:"right"}},o.a.createElement(Ct,{title:Dt("$__save",1),color:"green",icon:"save",onClick:function(){return b()},size:"25px",transparent:!0}),(!e.timer||e.manualAdd)&&o.a.createElement(Ct,{title:Dt("$__cancel",1),color:"lightgrey",icon:"cancel",onClick:function(){e.callBack&&e.callBack()},size:"25px",transparent:!0})))):o.a.createElement("div",null,"NO DATA RECEIVED")}))),la=r(1387);function sa(){sa=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var ua=function(){var e=Object(Ee.a)(sa().mark((function e(t){var r,n,a,o,i,c,l,s;return sa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(t&&t.store&&be.getState().functions&&be.getState().functions.socket,be.getState().functions.socket),n=be.getState(),a=n.sideModule,o=a.data,i=be.getState().db[a.db][a.id]||{},!1,!1,(c=window.location.hash.split("/"))[0]=c[0].replace("#",""),JSON.stringify(i)!==JSON.stringify(o)&&!0,"user"===o.type&&c&&c.length>2&&c[2]&&36===c[2].length&&(o.type="user",o._parent=c[2]),Object.keys(o).map((function(e){"file"===e&&(!0,!0),(i&&i[e]&&o[e]!==i[e]||!i&&o)&&!0,(o[e]&&o[e].low||o[e]&&o[e].low&&"0"===String(o[e].low))&&(o[e]=o[e].low)})),l=o.file||null,delete o.file,"new"!==o._id&&o._id){e.next=24;break}return e.prev=14,r.emit("data",{module:"user",method:"post",action:"add"},Object(h.a)(Object(h.a)({},o),{},{oldData:i}),function(){var e=Object(Ee.a)(sa().mark((function e(n){var a;return sa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o._id=n.id,o._token={_id:n.tokenId},!l){e.next=8;break}return e.next=5,tn(o._id,l);case 5:e.t0=e.sent,e.next=9;break;case 8:e.t0=o.image;case 9:a=e.t0,o.image=a,r.emit("data",{module:"user",method:"put",action:"update"},Object(h.a)(Object(h.a)({},o),{},{image:a,oldData:i})),t.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},be.getState().sideModule),{},{id:n.id,data:Object(h.a)(Object(h.a)({},be.getState().sideModule.data),{},{_id:n.id})}));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.abrupt("return",!0);case 19:e.prev=19,e.t0=e.catch(14),console.log(e.t0);case 22:e.next=34;break;case 24:if(!l){e.next=30;break}return e.next=27,tn(o._id,l);case 27:e.t1=e.sent,e.next=31;break;case 30:e.t1=o.image;case 31:return s=e.t1,(l&&s||!l)&&r.emit("data",{module:"user",method:"put",action:"update"},Object(h.a)(Object(h.a)({},o),{},{image:s,oldData:i}),function(){var e=Object(Ee.a)(sa().mark((function e(t){return sa().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 34:case"end":return e.stop()}}),e,null,[[14,19]])})));return function(t){return e.apply(this,arguments)}}(),da=function(){var e=Object(Ee.a)(sa().mark((function e(t){var r,n,a,o;return sa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(t&&t.store&&be.getState().functions&&be.getState().functions.socket,be.getState().functions.socket),n=be.getState(),a=n.sideModule,o=a.data,r.emit("data",{module:"user",method:"post",action:"access"},{_id:o._id,email:o.email,name:o.name,access:o._access,safety:o._safety},function(){var e=Object(Ee.a)(sa().mark((function e(t){return sa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.emit("user.ACCESS",Object(Oe.a)({_id:o._id},o._id,Object(h.a)({},o)));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.abrupt("return",!0);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),pa=function(e,t){var r=Object(h.a)({},t[t._id]?t[t._id]:{});be.getState().db.users[t._id]&&(r=Object(h.a)(Object(h.a)({},be.getState().db.users[t._id]),r)),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{users:Object(h.a)(Object(h.a)({},be.getState().db.users),{},Object(Oe.a)({},t._id,Object(h.a)({},r)))}))};function fa(e){return ha.apply(this,arguments)}function ha(){return(ha=Object(Ee.a)(sa().mark((function e(t){var r;return sa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=be.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,Qr.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),e.abrupt("return",!0);case 14:return e.abrupt("return",!1);case 15:case"end":return e.stop()}}),e,null,[[5,11]])})))).apply(this,arguments)}function ma(e){return ga.apply(this,arguments)}function ga(){return(ga=Object(Ee.a)(sa().mark((function e(t){return sa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Qr.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 ya(e,t){return va.apply(this,arguments)}function va(){return(va=Object(Ee.a)(sa().mark((function e(t,r){return sa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Pt.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 ba(e,t){return xa.apply(this,arguments)}function xa(){return(xa=Object(Ee.a)(sa().mark((function e(t,r){return sa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Pt.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 _a=function(e,t,r,n){var a;a=(e&&e.store&&be.getState().functions&&be.getState().functions.socket,be.getState().functions.socket);var o=be.getState().db;return Fn(e,{cardId:n,userId:t,access:r,userData:{name:be.getState().db.users[t].name,displayName:be.getState().db.users[t].displayName?be.getState().db.users[t].displayName:null,image:be.getState().db.users[t].image?be.getState().db.users[t].image:null}}),a.emit("data",{module:"cards",method:"post",action:"access"},{client:o.cards[n].client?o.cards[n].client:o.cards[n]._planId&&o.cards[o.cards[n]._planId]&&o.cards[o.cards[n]._planId].client?o.cards[o.cards[n]._planId].client:null,cardType:o.cards[n].type,cardId:n,parentUser:o.cards[n]._parent,userId:t,access:r,userData:{name:be.getState().db.users[t].name,displayName:be.getState().db.users[t].displayName?be.getState().db.users[t].displayName:null,image:be.getState().db.users[t].image?be.getState().db.users[t].image:null}},function(){var e=Object(Ee.a)(sa().mark((function e(t){return sa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log(t);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),!0},wa=function(){var e=Object(Ee.a)(sa().mark((function e(t,r){var n,a,o;return sa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(t&&t.store&&be.getState().functions&&be.getState().functions.socket,be.getState().functions.socket),a=be.getState(),o=a.db,n.emit("data",{module:"cards",method:"post",action:"userResponsible"},Object(h.a)({client:o.cards[r.cardId].client?o.cards[r.cardId].client:o.cards[r.cardId]._planId&&o.cards[o.cards[r.cardId]._planId]&&o.cards[o.cards[r.cardId]._planId].client?o.cards[o.cards[r.cardId]._planId].client:null},r),function(){var e=Object(Ee.a)(sa().mark((function e(t){return sa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.abrupt("return",!0);case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();function Ea(){Ea=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Oa=Object(De.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 ja=Object(_e.b)((function(e){return{store:e}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=Oa(),r=o.a.useState(!1),n=Object(je.a)(r,2),a=n[0],i=n[1],c=o.a.useRef(null),l=e.data,s=be.getState(),u=s.db,d=s.session,p=s.functions,f=s.sideModule,h=(p.socket,o.a.useState([])),m=Object(je.a)(h,2),g=m[0],y=(m[1],o.a.useState(0)),v=Object(je.a)(y,2),b=(v[0],v[1],o.a.useState([])),x=Object(je.a)(b,2),_=x[0],w=x[1],E=zn(l&&l._id?l._id:null),O=f&&f.id?Dn(f.id):0,j=function(e){c.current&&c.current.contains(e.target)||i(!1)};function k(e){"Tab"===e.key&&(e.preventDefault(),i(!1))}var S=function(){var t=Object(Ee.a)(Ea().mark((function t(r){var n;return Ea().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=_,e.multiple?0===n.filter((function(e){return e===r})).length?n.push(r):n.splice(n.indexOf(r),1):n=[r],w(n),e.onSelect&&e.onSelect(n),e.multiple||i(!1);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),L=function(){var t=Object(Ee.a)(Ea().mark((function t(r){var n;return Ea().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.multiple&&((n=_).splice(n.indexOf(r),1),w(n));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),C=function(t){var r=t.pr,n=!1;return(!e.data||E[r]&&E[r].access&&E[d._id]&&E[d._id].access&&parseInt(E[d._id].access)>=parseInt(E[r].access)||!E[r]&&(E[d._id]&&E[d._id].access&&parseInt(E[d._id].access)>=3||l._parent&&u.cards[l._parent]._users[d._id]&&u.cards[l._parent]._users[d._id].access&&parseInt(u.cards[l._parent]._users[d._id].access)>=3||l._planId&&u.cards[l._planId]._users[d._id]&&u.cards[l._planId]._users[d._id].access&&parseInt(u.cards[l._planId]._users[d._id].access)>=3)||O>3)&&(n=!0),E[r]?o.a.createElement(Vr.a,{onClick:n?function(){S(r)}:null,disabled:!n},o.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center",cursor:"pointer"}},o.a.createElement(Fr.a,{alt:E[r].name||null,src:E[r].image||null},E[r]&&E[r].name?E[r].name.substr(0,1):""),o.a.createElement("span",{style:{marginLeft:"15px"}},E[r].name||E[r].name))):o.a.createElement(o.a.Fragment,null)};return o.a.createElement("div",{onClick:function(e){e.stopPropagation()}},o.a.createElement(Ge.a,{ref:c,"aria-controls":a?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){(!l||e.permission||l&&E&&E[d._id]&&E[d._id].access&&parseInt(E[d._id].access)>3||O>3)&&(i((function(e){return!e})),t.stopPropagation())},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},0===_.length?Dt("$__selectUser"):o.a.createElement("div",null,o.a.createElement(la.a,{max:e.noLimit?300:4,style:{flexWrap:"wrap",display:"inline-flex"}},_.map((function(t){return o.a.createElement(xt.a,{key:t,title:E[t].displayName?E[t].displayName:E[t].name},o.a.createElement("div",{style:{display:"flex",alignItems:"center"},onClick:function(r){e.multiple&&(L(t),r.preventDefault(),r.stopPropagation())}},o.a.createElement(Fr.a,{alt:E[t].name,src:E[t].image||null,style:{width:e&&e.avatarSize?e&&e.avatarSize:"none",height:e&&e.avatarSize?e.avatarSize:"none"}},E[t].name.substr(0,1)),!e.multiple&&o.a.createElement("span",{style:{marginLeft:15}},E[t].displayName?E[t].displayName:E[t].name)))})),e.multiple&&o.a.createElement(xt.a,{title:Dt("$__selectUser")},o.a.createElement(Fr.a,{alt:"ADD",src:null},"+"))))),o.a.createElement(Rr.a,{open:a,anchorEl:c.current,role:void 0,transition:!0,style:{zIndex:1300}},(function(t){var r,n=t.TransitionProps,i=t.placement;return o.a.createElement($r.a,Object.assign({},n,{style:{transformOrigin:"bottom"===i?"center top":"center bottom",maxHeight:"333px",overflowY:"auto"}}),o.a.createElement(Yr.a,null,o.a.createElement("div",{style:(r={position:"relative",width:"100%",paddingBottom:g&&g.length?"66px":0},Object(Oe.a)(r,"width","100%"),Object(Oe.a)(r,"display","flex"),Object(Oe.a)(r,"justifyContent","space-between"),r)},o.a.createElement(Br.a,{onClickAway:j},o.a.createElement(qr.a,{autoFocusItem:a,id:"menu-list-grow",onKeyDown:k},o.a.createElement(Vr.a,{disabled:!0},Dt("$__selectUser","*")),Object.keys(E).filter((function(t){return!E[t]._parent&&(!(!e.includeMe&&t===d._id)&&((!e.ignoreId||t!==e.ignoreId)&&"user"===E[t].type))})).sort((function(e,t){return E[e].name<E[t].name?-1:E[e].name>E[t].name?1:0})).map((function(e){return E&&E[e]&&E[e]._id&&o.a.createElement(C,{pr:e,key:e})})))))))})))})),ka=r(434);function Sa(){Sa=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}r(520);var La=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(oa)((function(e){var t,r=e.classes,n=be.getState(),a=n.db,i=n.session,c=a.cards,l=o.a.useState(!1),s=Object(je.a)(l,2),u=s[0],d=s[1],p=o.a.useState(!1),f=Object(je.a)(p,2),m=f[0],g=f[1],y=o.a.useState(!1),v=Object(je.a)(y,2),b=v[0],x=v[1],_=o.a.useState({}),w=Object(je.a)(_,2),E=w[0],O=w[1],j=o.a.useState(Object(h.a)({},be.getState().db.cards[e.data._id])),k=Object(je.a)(j,2),S=k[0],L=k[1],C=o.a.useState([]),I=Object(je.a)(C,2),F=I[0],T=I[1],N=o.a.useState(Fe()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")),P=Object(je.a)(N,2),A=P[0],D=P[1],z=o.a.useState(Fe()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")),M=Object(je.a)(z,2),B=M[0],$=M[1],Y=parseFloat(S.kpi_ini),R=parseFloat(S.kpi_fin);o.a.useEffect((function(){(!u||S&&JSON.stringify(be.getState().db.cards[e.data._id])!==JSON.stringify(S))&&(t&&clearTimeout(t),W(),L(Object(h.a)({},be.getState().db.cards[e.data._id])),d(!0),H(e.data._id))}));var G=[e.data._id],H=function(){var e=Object(Ee.a)(Sa().mark((function e(t,r){var n;return Sa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object.keys(c).filter((function(e){return c[e].kpi_useParent&&c[e]._parent===t}));case 2:return(n=e.sent).length>0?n.map(function(){var e=Object(Ee.a)(Sa().mark((function e(t){return Sa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,H(t,!0);case 2:G.push(t),T(Array.from(new Set(G)));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()):r||T(G),e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),W=function(){var t=be.getState().db.cards[e.data._id];if(t&&t._kpiTimer&&Object.keys(t._kpiTimer).filter((function(e){return t._kpiTimer[e].userId===i._id})).length>0){var r=t._kpiTimer[Object.keys(t._kpiTimer).filter((function(e){return t._kpiTimer[e].userId===i._id}))[0]];r.diff=Fe()().tz("America/Sao_Paulo").unix("x")-r.created_at,U(r,!!r.updated_at)}else g(!1),O({}),x(!1);0===Object.keys(E).length&&e.manualAdd&&(O({created_at:Fe()(A).tz("America/Sao_Paulo").unix("X"),updated_at:Fe()(B).tz("America/Sao_Paulo").unix("X")}),U({created_at:Fe()(A).tz("America/Sao_Paulo").unix("X"),updated_at:Fe()(B).tz("America/Sao_Paulo").unix("X")},!!E.updated_at))},U=function(e,r){var n=e,a=!1;e.updated_at?(n.diff=parseInt(e.updated_at)-parseInt(e.created_at),m||g(!0)):(n.diff=Fe()().tz("America/Sao_Paulo").unix("x")-parseInt(e.created_at),b||(x(!0),a=!0));var o=parseInt(n.diff);if(o<60)n.diffText="".concat(n.diff," ").concat(Dt("$__seconds",1));else if(o>3600){var i=Math.trunc(o/3600);o-=3600*i;var c=Math.trunc(o/60)>0?Math.trunc(o/60):0,l=(o-=60*c)>0?o:0;n.diffText="".concat(i," hora").concat(i>1?"s":""," ").concat(c," ").concat(Dt("$__minutes",1)," ").concat(l," ").concat(Dt("$__seconds",1))}else{var s=Math.trunc(o/60)>0?Math.trunc(o/60):0,u=(o-=60*s)>0?o:0;n.diffText="".concat(s," ").concat(Dt("$__minutes",1)," ").concat(u," ").concat(Dt("$__seconds",1))}O(Object(h.a)(Object(h.a)({},E),n)),r||e.updated_at||!a||(t=setTimeout((function(){W()}),1e3))};if(!S)return null;var V=function(){var t=Object(Ee.a)(Sa().mark((function t(){var r;return Sa().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mn(e,S._id);case 2:(r=t.sent)&&(U(r),x(!0));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),q=function(){var t=Object(Ee.a)(Sa().mark((function t(){var r;return Sa().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return x(!1),t.next=3,gn(e,S._id);case 3:(r=t.sent)&&O(Object(h.a)(Object(h.a)({},E),r));case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),X=Object(h.a)({},ka.model),K=[],J=[],Z={};F.map((function(e){Z=Object(h.a)(Object(h.a)({},Z),a.cards[e]._timeline||{})})),Z=Object.keys(Z).filter((function(e){return"kpi"===Z[e].type})).map((function(e){return Z[e]}));var Q="time"!==S.kpi_type?parseFloat(Y):0,ee=parseFloat(Y)-parseFloat(R);ee<0&&(ee*=-1),Z&&Object.keys(Z).length>0&&Object.keys(Z).sort((function(e,t){return Z[e].created_at<Z[t].created_at?-1:1})).map((function(e,t){Q=parseFloat(Q)+parseFloat(Z[e].value),K.push({meta:Z[e].value,total:Q,value:parseFloat(Y)>parseFloat(R)?100-Math.floor(100*Q/ee):Math.floor(100*Q/ee)}),J.push(t+1),t+1===Object.keys(Z).length&&(X=Object(h.a)(Object(h.a)({},X),{},{data:{labels:J,series:[[].concat(K)]},options:Object(h.a)(Object(h.a)({},X.options),{},{low:0,high:100,plugins:[aa.a.plugins.tooltip({tooltipFnc:function(e,t){return"".concat(e>0?"+":"")+Yt(e,"time"===S.kpi_type?"number":S.kpi_type)+"<br>"+Yt(t,"percent")}})],axisX:{showGrid:!1},axisY:{showGrid:!1},onlyInteger:!0})}))}));var te=Y<R?R-Y:Y-R;Z&&Object.keys(Z).length>0&&Object.keys(Z).map((function(e){te=parseFloat(te)+parseFloat(Z[e].value)}));var re=Math.ceil(Y<R?R-Y:Y-R);return(re=100*Math.ceil(te)/re-100)<0&&(re*=-1),e.data?o.a.createElement("div",{className:r.root},o.a.createElement("fieldset",null,o.a.createElement("legend",{style:{color:Mt("color")}},e.manualAdd?Dt("$__timerLog",1):Dt("$__timer",1)),e.manualAdd&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:r.timeInfo},o.a.createElement(wt,{color:"color",icon:"schedule"}),o.a.createElement(Qn,{label:Dt("$__initialDate",1),variant:Mt("fieldVariant",1),name:"startDate",InputLabelProps:{shrink:!0},type:"datetime-local",InputProps:{autoComplete:"start-date",onChange:function(e){D(e.target.value),U(Object(h.a)(Object(h.a)({},E),{},{created_at:Fe()(e.target.value).tz("America/Sao_Paulo").unix("X")}),!0)}},value:A})),o.a.createElement("div",{className:r.timeInfo},o.a.createElement(wt,{color:"color",icon:"watch_later"}),o.a.createElement(Qn,{label:Dt("$__finalDate",1),variant:Mt("fieldVariant",1),name:"endDate",InputLabelProps:{shrink:!0},type:"datetime-local",inputProps:{min:Fe()(A).tz("America/Sao_Paulo").format("YYYY-MM-DDTHH:mm")},InputProps:{autoComplete:"new-password",onChange:function(e){$(e.target.value),U(Object(h.a)(Object(h.a)({},E),{},{updated_at:Fe()(e.target.value).tz("America/Sao_Paulo").unix("X")}),!0)}},value:B})),E&&E.diffText&&o.a.createElement("div",{className:r.timeInfo},o.a.createElement(wt,{color:"color",icon:"hourglass_full"}),o.a.createElement("div",{className:"text"},E.diffText)),o.a.createElement(ja,{includeMe:!0,data:a.cards[S._id],avatarSize:"33px",permission:e.permission,noLimit:!0,multiple:!0,onSelect:function(e){U(Object(h.a)(Object(h.a)({},E),{},{to:e}),!0)}})),m||e.manualAdd?o.a.createElement("div",null,!e.manualAdd&&E&&E.created_at&&E.updated_at&&E.diffText&&Fe()(1e3*E.created_at).isValid()&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:r.timeInfo},o.a.createElement(wt,{color:"color",icon:"schedule"}),o.a.createElement("div",{className:"text"},Fe()(1e3*E.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm:ss"))),o.a.createElement("div",{className:r.timeInfo},o.a.createElement(wt,{color:"color",icon:"watch_later"}),o.a.createElement("div",{className:"text"},Fe()(1e3*E.updated_at).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm:ss"))),o.a.createElement("div",{className:r.timeInfo},o.a.createElement(wt,{color:"color",icon:"hourglass_full"}),o.a.createElement("div",{className:"text"},E.diffText))),o.a.createElement(ca,{manualAdd:!!e.manualAdd,data:S,timer:E,callBack:function(){g(!1),e.callBack&&e.callBack()}})):o.a.createElement("div",{className:r.time},!b&&R&&Q?o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:r.timeInfo},o.a.createElement(wt,{color:60*R<Q?"red":"color",icon:"schedule"}),o.a.createElement("div",{className:"text",style:{color:60*R<Q?"red":"grey"}},Dt("$__timeLeft",1),": ",60*R-Q>-60&&60*R-Q<60?"".concat(60*R-Q," ").concat(Dt("$__seconds",1)," "):"".concat(Math.trunc((60*R-Q)/60)," ").concat(Dt("$__minutes",1)," ").concat(60*R-Q-60*Math.trunc((60*R-Q)/60)," ").concat(Dt("$__seconds",1)," "))),o.a.createElement("div",{className:r.timeInfo},o.a.createElement(wt,{color:"color",onClick:function(){V()},title:"playRegisterLogWork"},"play_circle_outline"),o.a.createElement("div",{className:"text"},Q<60?"".concat(Q," ").concat(Dt("$__seconds",1)," "):"".concat(Math.trunc(Q/60)," ").concat(Dt("$__minutes",1)," ").concat(Q-60*Math.trunc(Q/60)," ").concat(Dt("$__seconds",1)," ")))):o.a.createElement("div",{className:r.timeInfo},o.a.createElement(wt,{color:"color",onClick:function(){$t({message:Dt("$__confirmStopTimer",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){q()}})}},"pause_circle_filled"),o.a.createElement("div",{className:"text"},E.diffText))))):o.a.createElement("div",null,"NO DATA RECEIVED")}))),Ca=r(1421),Ia=Object(bt.a)({root:{"&:hover":{backgroundColor:"transparent"},color:Mt("color")}})(Ca.a),Fa=r(1388);function Ta(){Ta=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Na=Object(De.a)((function(e){return{iconButtonStyleTransaparent:{margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.9)"},"& .MuiAvatarGroup-avatar":{border:"none",zIndex:0}},iconButtonStyleWhite:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"},"& .MuiAvatarGroup-avatar":{border:"none",zIndex:0}}}}));var Pa,Aa,Da=Object(_e.b)((function(e){return{cards:e.db.cards}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=Na(),r=o.a.useState(!1),n=Object(je.a)(r,2),a=n[0],i=n[1],c=o.a.useRef(null),l=be.getState(),s=l.db,u=l.session,d=l.functions.socket,p=o.a.useState(e.data?e.data:{}),f=Object(je.a)(p,2),m=f[0],g=f[1],y=o.a.useState([]),v=Object(je.a)(y,2),b=v[0],x=v[1],_=o.a.useState([]),w=Object(je.a)(_,2),E=w[0],O=w[1],j=o.a.useState(0),k=Object(je.a)(j,2),S=(k[0],k[1]),L=o.a.useState(""),C=Object(je.a)(L,2),I=C[0],F=C[1],T=o.a.useState(!1),N=Object(je.a)(T,2),P=N[0],A=N[1],D=o.a.useState(!1),z=Object(je.a)(D,2),M=z[0],B=z[1],$=zn(m._id);o.a.useEffect((function(){m._id&&e.cards[m._id]&&JSON.stringify(e.cards[m._id])!==JSON.stringify(m)&&g(e.cards[m._id])}),[e.cards]);var Y=Ut(),R=Dn(m._id),G=!1;R>3&&(G=!0),!G&&Y.plan&&Y.planAdmin&&(G=!0);var H=window.location.hash.split("/");H[0]=H[0].replace("#","");var W=function(e){c.current&&c.current.contains(e.target)||(i(!1),B(!1),O([]))};function U(e){"Tab"===e.key&&(e.preventDefault(),i(!1))}var V=function(){var t=Object(Ee.a)(Ta().mark((function t(r,n){var a;return Ta().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=1,m&&"plan"===m.type&&(a=3),n?a=n:m._planId&&s.cards[m._planId]&&s.cards[m._planId]._users&&s.cards[m._planId]._users[r]&&s.cards[m._planId]._users[r].access&&(a=m._parent&&s.cards[m._parent]&&s.cards[m._parent]._users&&s.cards[m._parent]._users[r]&&s.cards[m._parent]._users[r].access&&parseInt(s.cards[m._parent]._users[r].access)>parseInt(s.cards[m._planId]._users[r].access)?parseInt(s.cards[m._parent]._users[r].access):parseInt(s.cards[m._planId]._users[r].access)),g(Object(h.a)(Object(h.a)({},m),{},{_users:Object(h.a)(Object(h.a)({},m._users),{},Object(Oe.a)({},r,{_id:r,name:be.getState().db.users[r].name,image:be.getState().db.users[r].image||null}))})),!!(m&&m._users&&m._users[r]),t.next=7,_a(e,r,a,m._id);case 7:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),q=function(){var e=Object(Ee.a)(Ta().mark((function e(t){return Ta().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Pt.put("cards/removeAccess/",{cardId:m._id,userIds:b})&&b.map((function(e){d.emit("card.ACCESS_DELETE",{userId:e,cardId:m._id})})),x([]);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),X=function(){var t=Object(Ee.a)(Ta().mark((function t(){return Ta().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:E.map((function(t){Ln(e,{_id:m._id,userId:t,option:!0})})),B(!1);case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),K=function(t){var r=t.pr,n=!1;e.permission&&(n=!0);var a=!1;return m._users&&m._users[r]&&m._users[r].myDay&&m._users[r].myDay&&Fe()(1e3*parseInt(m._users[r].myDay)).tz("America/Sao_Paulo").format("DD/MM/YYYY")===Fe()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")&&(a=!0),$[r]?o.a.createElement(Vr.a,{onClick:n?function(){}:null,disabled:!n},o.a.createElement("div",{style:Object(h.a)({position:"relative",width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},n?{}:{cursor:"pointer"})},o.a.createElement(Fr.a,{alt:$[r].name||null,src:$[r].image||null},$[r]&&$[r].name?$[r].name.substr(0,1):""),$[r].name||$[r].name,o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(Ia,Object.assign({},M?{checked:!!(a||E.indexOf(r)>-1)}:{checked:!!m._users[r]},{disabled:!(!M||!a),onClick:n?function(){if(M){var e=Array.from(E);-1===e.indexOf(r)?e.push(r):e.indexOf(r)>-1&&e.splice(e.indexOf(r),1),O(e)}else!function(e){var t=Array.from(b);m._users[e]&&-1===t.indexOf(e)?(t.push(e),x(t),S(t.length)):m._users[e]&&t.indexOf(e)>-1?(t.splice(t.indexOf(e),1),x(t),S(t.length)):m._users[e]||V(e)}(r)}:null,color:"default"}))),b.indexOf(r)>-1&&o.a.createElement("div",{style:{height:"2px",width:"100%",backgroundColor:"red",position:"absolute",top:"50%"}}))):o.a.createElement(o.a.Fragment,null)};return o.a.createElement("div",{onClick:function(e){e.stopPropagation()}},o.a.createElement(Ge.a,{ref:c,"aria-controls":a?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){(e.permission||m&&m._users&&m._users[u._id]&&m._users[u._id].access&&parseInt(m._users[u._id].access)>3)&&(i((function(e){return!e})),t.stopPropagation())},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},0===Object.keys(m._users).length?Dt("$__selectUsers"):o.a.createElement("div",{style:{display:"flex"}},Object.keys(m._users).sort((function(e,t){return m._users[e].name<m._users[t].name?-1:m._users[e].name>m._users[t].name?1:0})).map((function(t,r){var n=!1;if(m._users[t].myDay&&m._users[t].myDay&&Fe()(1e3*parseInt(m._users[t].myDay)).tz("America/Sao_Paulo").format("DD/MM/YYYY")===Fe()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")&&(n=!0),m._users[t]&&m._users[t].name){var a=e.noLimit?7:e.limit?e.limit:7;if(r<a)return o.a.createElement("div",{key:t,style:{marginLeft:-7,position:"relative"}},o.a.createElement(xt.a,{title:"".concat(m._users[t].name).concat(n?" (".concat(Dt("$__inMyDay"),")"):""),key:t},o.a.createElement(Fr.a,{overlap:"circular",alt:m._users[t].name,src:m._users[t].image||null,style:{width:n?"27px":e.avatarSize?e.avatarSize:"none",height:n?"27px":e.avatarSize?e.avatarSize:"none",border:n?"2px #ff8800 solid":"none"}},m._users[t].name.substr(0,1))),n&&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(wt,{icon:"hourglass_top",size:"10px",color:"#FFFFFF"})));if(r===a){var i=Object.keys(m._users).length-a;return o.a.createElement(xt.a,{title:o.a.createElement("ul",{style:{listingStyle:"none",padding:0}},Object.keys(m._users).sort((function(e,t){return m._users[e].name<m._users[t].name?-1:m._users[e].name>m._users[t].name?1:0})).map((function(t,r){var n=!1;if(m._users[t].myDay&&m._users[t].myDay&&Fe()(1e3*parseInt(m._users[t].myDay)).tz("America/Sao_Paulo").format("DD/MM/YYYY")===Fe()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")&&(n=!0),r>=a&&m._users[t]&&m._users[t].name)return o.a.createElement("li",{key:t,style:{display:"flex",alignItems:"center"}},o.a.createElement(Fr.a,{overlap:"circular",alt:m._users[t].name,src:m._users[t].image||null,style:{width:e.avatarSize?e.avatarSize:"22px",height:e.avatarSize?e.avatarSize:"22px",border:n?"2px #ff8800 solid":"none",marginRight:7}},m._users[t].name.substr(0,1)),m._users[t].name)}))),key:r},o.a.createElement(Fr.a,{style:{width:e.avatarSize?e.avatarSize:27,height:e.avatarSize?e.avatarSize:27,border:"none"},alt:"+".concat(i)},o.a.createElement("span",{style:{fontSize:10}},"+".concat(i))))}}})))),o.a.createElement(Rr.a,{open:a,anchorEl:c.current,role:void 0,transition:!0},(function(e){var t,r=e.TransitionProps,n=e.placement;return o.a.createElement($r.a,Object.assign({},r,{style:{transformOrigin:"bottom"===n?"center top":"center bottom",maxHeight:"333px",minHeight:"333px",overflowY:"auto"}}),o.a.createElement(Yr.a,{onClick:function(e){e.preventDefault(),e.stopPropagation()}},o.a.createElement("div",{style:(t={position:"relative",width:"100%",paddingBottom:b&&b.length>0||E&&E.length>0?"50px":0},Object(Oe.a)(t,"width","100%"),Object(Oe.a)(t,"display","flex"),Object(Oe.a)(t,"justifyContent","space-between"),t),onClick:function(e){e.preventDefault(),e.stopPropagation()}},o.a.createElement(Br.a,{onClickAway:W},o.a.createElement("div",{style:{}},P&&o.a.createElement("div",{style:{position:"relative",marginTop:15,width:"100%",padding:"4px 15px",fontSize:"16px",color:"lightGray"}},o.a.createElement(Qn,{id:"quickUser_Search",label:Dt("$__searchByName",1),variant:Mt("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:o.a.createElement(Fa.a,{position:"end",style:{cursor:"pointer"},onClick:function(){F(""),A(!1)}},o.a.createElement(wt,{icon:"close"})),onChange:function(e){F(e.target.value)},onBlur:function(e){}},value:I,placeholder:Dt("$__searchByName",1),autoFocus:!0})),o.a.createElement(qr.a,{autoFocusItem:a,id:"menu-list-grow",onKeyDown:U},M?o.a.createElement("div",{style:{position:"relative",overflow:"auto"}},o.a.createElement(Vr.a,{disabled:!0},Dt("$__selectUsersToMyDay","*")),Object.keys(m._users).filter((function(e){if(e!==u._id)return!0})).sort((function(e,t){return $[e].name<$[t].name?-1:$[e].name>$[t].name?1:0})).map((function(e){return $&&$[e]&&$[e]._id&&o.a.createElement(K,{pr:e,key:e})}))):o.a.createElement("div",null,o.a.createElement(Vr.a,{disabled:!0},Dt("$__internalUsers","*")),Object.keys($).filter((function(e){if((!I||I&&$[e].name.toLowerCase().indexOf(I.toLowerCase())>-1)&&"client"!==$[e].type&&"group"!==$[e].type&&"account"!==$[e].type&&"consultant"!==$[e].type&&!$[e].deleted&&!$[e]._parent)return!0})).sort((function(e,t){return $[e].name<$[t].name?-1:$[e].name>$[t].name?1:0})).map((function(e){return $&&$[e]&&$[e]._id&&o.a.createElement(K,{pr:e,key:e})})),Object.keys($).filter((function(e){if((!I||I&&$[e].name.toLowerCase().indexOf(I.toLowerCase())>-1)&&"client"!==$[e].type&&"group"!==$[e].type&&"account"!==$[e].type&&"consultant"!==$[e].type&&!$[e].deleted&&(m._planId&&s.cards[m._planId]&&s.cards[m._planId].client&&$[e]._parent&&$[e]._parent===s.cards[m._planId].client||m.client&&$[e]._parent===m.client||m._parent&&s.cards[m._parent]&&s.cards[m._parent].client&&$[e]._parent&&$[e]._parent===s.cards[m._parent].client))return!0})).length>0&&o.a.createElement(Vr.a,{disabled:!0},Dt("$__ClientGroupUsers","*")),Object.keys($).filter((function(e){if((!I||I&&$[e].name.toLowerCase().indexOf(I.toLowerCase())>-1)&&"client"!==$[e].type&&"group"!==$[e].type&&"account"!==$[e].type&&"consultant"!==$[e].type&&!$[e].deleted&&(m._planId&&s.cards[m._planId]&&s.cards[m._planId].client&&$[e]._parent&&$[e]._parent===s.cards[m._planId].client||m.client&&$[e]._parent===m.client||m._parent&&s.cards[m._parent]&&s.cards[m._parent].client&&$[e]._parent&&$[e]._parent===s.cards[m._parent].client))return!0})).sort((function(e,t){return $[e].name<$[t].name?-1:$[e].name>$[t].name?1:0})).map((function(e){return $&&$[e]&&$[e]._id&&o.a.createElement(K,{pr:e,key:e})})),Object.keys($).filter((function(e){if((!I||I&&$[e].name.toLowerCase().indexOf(I.toLowerCase())>-1)&&"consultant"===$[e].type&&!$[e].deleted)return!0})).length>0&&o.a.createElement(Vr.a,{disabled:!0},Dt("$__consultants","*")),Object.keys($).filter((function(e){if((!I||I&&$[e].name.toLowerCase().indexOf(I.toLowerCase())>-1)&&"consultant"===$[e].type&&!$[e].deleted)return!0})).sort((function(e,t){return $[e].name<$[t].name?-1:$[e].name>$[t].name?1:0})).map((function(e){return $&&$[e]&&$[e]._id&&o.a.createElement(K,{pr:e,key:e})})))),P||M?o.a.createElement(o.a.Fragment,null):o.a.createElement("div",{style:{position:"absolute",right:15,top:10}},o.a.createElement(Ct,{title:Dt("$__searchUser",1),color:Mt("menu"),icon:"search",onClick:function(){A(!0)},size:"25px"})),P||M||!G?M?o.a.createElement("div",{style:{position:"absolute",right:15,top:10}},o.a.createElement(Ct,{title:Dt("$__back",1),color:Mt("menu"),icon:"arrow_back",onClick:function(){B(!1)},size:"25px"})):o.a.createElement(o.a.Fragment,null):o.a.createElement("div",{style:{position:"absolute",right:45,top:10}},o.a.createElement(Ct,{title:Dt("$__sendToMyDay",1),color:"orange",icon:"schedule_send",onClick:function(){B(!0)},size:"25px"}))))),b&&b.length>0&&o.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()}},Dt("$__confirmSelectedUsersRemove"),o.a.createElement(Ct,{title:Dt("$__remove",1),color:"#FFFFFF",icon:"delete_forever",onClick:function(){q()},size:"25px",transparent:!0})),M&&E&&E.length>0&&o.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()}},o.a.createElement(la.a,{style:{flexWrap:"wrap"}},E.map((function(e,t){return e&&be.getState().db.users[e]?o.a.createElement(xt.a,{title:be.getState().db.users[e].name,key:e},o.a.createElement(Fr.a,{alt:be.getState().db.users[e].name,src:be.getState().db.users[e].image||null,style:{width:"23px",height:"23px"}},be.getState().db.users[e].name.substr(0,1))):o.a.createElement(o.a.Fragment,null)}))),o.a.createElement(Ct,{title:Dt("$__sendToMyDay",1),color:"#FFFFFF",icon:"schedule_send",onClick:function(){X()},size:"25px",transparent:!0}))))})))})),za={containerNoShadow:Object(h.a)(Object(h.a)({},qe),{},(Pa={position:"relative",border:"0.5px solid ".concat(Mt("light")),borderRadius:"2px",padding:"0px",backgroundColor:"#FFFFFF"},Object(Oe.a)(Pa,"padding","3px"),Object(Oe.a)(Pa,"minWidth","150px"),Object(Oe.a)(Pa,"display","flow-root"),Pa)),container:Object(h.a)(Object(h.a)({},qe),{},(Aa={position:"relative",border:"0.5px solid ".concat(Mt("light")),borderRadius:"2px",padding:"0px",backgroundColor:"#FFFFFF"},Object(Oe.a)(Aa,"padding","3px"),Object(Oe.a)(Aa,"minWidth","150px"),Object(Oe.a)(Aa,"display","flow-root"),Object(Oe.a)(Aa,"boxShadow","0px 0px 10px rgba(0,0,0,0.1)"),Aa)),parent:{width:"100%",padding:"0 5px","& .title":{color:Mt("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Mt("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:"33vw",height:"25vh","@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:Mt("medium"),fontSize:"10px",display:"flex"},lateDates:{position:"relative",float:"left",width:"100%",marginTop:"7px",padding:"0 5px",marginRight:"15px",color:"red",fontSize:"10px",display:"flex"},dateInfo:{marginRight:"15px",display:"flex",alignItems:"center"},usersContent:{minHeight:"20px",minWidth:"40px",zIndex:"0 !important"},users:{position:"absolute",bottom:"0px",right:"2px",fontSize:"10px","& .MuiAvatarGroup-root":{justifyContent:"flex-end"},"& .MuiAvatar-root":{width:"25px",height:"25px",fontSize:"10px"}}};var Ma=Object(bt.a)(za)((function(e){var t=e.classes;return o.a.createElement("div",null,o.a.createElement("div",null,o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:t.infos},o.a.createElement("div",{className:t.imagePreview,style:{background:Mt("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},o.a.createElement("div",{style:{marginTop:"calc(-48% - 10px)",display:"flex",justifyContent:"center",alignItems:"center"}},o.a.createElement(wt,{icon:"lock",size:"39px",color:"rgba(250,250,250,0.77)"})))))))})),Ba=r(768),$a=r.n(Ba),Ya=r(1389),Ra={root:{position:"relative",width:"100%",background:"transparent !important","& .MuiLinearProgress-indeterminate":{background:"transparent !important"},"& .MuiLinearProgress-bar":{background:"".concat(Mt("linearProgress")," !important")},"& .text":{position:"absolute",width:"40px",right:"-40px",top:"-9px",textAlign:"right",textSize:"11px",fontWeight:"bold",color:Mt("color")}},bar:{borderRadius:7}};var Ga=Object(bt.a)(Ra)((function(e){var t=e.classes,r=Object(h.a)({},e);return r.showText&&delete r.showText,o.a.createElement("div",{className:t.root,style:e.showText?{width:"calc(100% - 40px)"}:{}},o.a.createElement(Ya.a,r),e.showText&&o.a.createElement("div",{className:"text"},Math.floor(e.value),"%"))})),Ha=Object(De.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 Wa=function(e){var t=Ha(),r=o.a.useState(!1),n=Object(je.a)(r,2),a=n[0],i=n[1],c=o.a.useRef(null),l=function(e){c.current&&c.current.contains(e.target)||i(!1)};return o.a.createElement("div",{onClick:function(e){e.stopPropagation()},style:{zIndex:100}},o.a.createElement(xt.a,{title:Dt("$__options",1)},o.a.createElement(kt.a,{ref:c,"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},o.a.createElement(wt,{usePropagation:!0,size:e.size?e.size:"20px",color:e.iconColor?e.iconColor:Mt("menu"),icon:e.icon?e.icon:"design_services"}))),o.a.createElement(Rr.a,{open:a,anchorEl:c.current,role:void 0,transition:!0},(function(t){var r=t.TransitionProps,n=t.placement;return o.a.createElement($r.a,Object.assign({},r,{style:{transformOrigin:"bottom"===n?"center top":"center bottom"}}),o.a.createElement(Yr.a,null,o.a.createElement(Br.a,{onClickAway:l},o.a.createElement("div",{onClick:function(e){e.stopPropagation(),e.preventDefault()}},o.a.cloneElement(e.children,{callBack:function(e){i(!1)}})))))})))};function Ua(){Ua=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}r(204).config();var Va=function(){var e=Object(Ee.a)(Ua().mark((function e(t,r){var n,a,o,i,c,l,s;return Ua().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n={},a=be.getState(),o=a.db,i=a.session,c=r.id,!be.getState().timeline[c]){e.next=13;break}if("users"===r.db&&(c=r.readedBy),l={},o.users[r.readedBy]?l=o.users[r.readedBy]:o.cards[c]&&o.cards[c]._users&&o.cards[c]._users[r.readedBy]&&(l=o.cards[c]._users[r.readedBy]),l!=={}){e.next=9;break}return e.abrupt("return",!1);case 9:s="cards",o.cards[c]?n=Object(h.a)({},be.getState().timeline&&be.getState().timeline[c]?Object(Oe.a)({},c,be.getState().timeline[c]):{}):(s="users",console.log("USER",r.readedBy),n=Object(h.a)(Object(h.a)({},be.getState().timeline&&be.getState().timeline[c]?Object(Oe.a)({},c,be.getState().timeline[c]):{}),be.getState().timeline&&be.getState().timeline[r.readedBy]?Object(Oe.a)({},r.readedBy,be.getState().timeline[r.readedBy]):{})),Object.keys(n).map((function(e,t){Object.keys(n[e]).filter((function(t,a){return"cards"===s&&e===c&&n[e][t]&&("all"===r.type||n[e][t].type&&n[e][t].type===r.type)&&(!n[e][t].readedBy||n[e][t].readedBy&&!n[e][t].readedBy[i._id])||"users"===s&&(e===r.id&&n[e][t].user&&n[e][t].user._id&&n[e][t].user._id===r.readedBy||e===r.readedBy&&n[e][t].user&&n[e][t].user._id&&n[e][t].user._id===r.id)&&n[e][t].user&&n[e][t].user._id&&(n[e][t].user._id===r.id||n[e][t].user._id===r.readedBy)})).map((function(t,a){n=Object(h.a)(Object(h.a)({},n),{},Object(Oe.a)({},e,Object(h.a)(Object(h.a)(Object(h.a)({},be.getState().timeline[e]),n[e]),{},Object(Oe.a)({},t,Object(h.a)(Object(h.a)(Object(h.a)({},be.getState().timeline[e][t]),n[e][t]),{},{readedBy:Object(h.a)(Object(h.a)(Object(h.a)({},be.getState().timeline[e][t].readedBy?be.getState().timeline[e][t].readedBy:{}),n[e][t].readedBy?n[e][t].readedBy:{}),{},Object(Oe.a)({},r.readedBy,Object(h.a)(Object(h.a)({},l),{},{readedDate:{low:Fe()().unix("x")}})))})))))}))})),t.reduxFunction("ASYNC","SET_TIMELINE",Object(h.a)(Object(h.a)({},be.getState().timeline),n));case 13:return o&&o.cards&&o.cards[c]&&o.cards[c]._notifications&&o.cards[c]._notifications[r.type]&&("all"!==r.type?t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},c,Object(h.a)(Object(h.a)({},be.getState().db.cards[c]),{},{_notifications:Object(h.a)(Object(h.a)({},be.getState().db.cards[c]._notifications),{},Object(Oe.a)({},r.type,0))})))})):t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},c,Object(h.a)(Object(h.a)({},be.getState().db.cards[c]),{},{_notifications:{comment:0,log:0,timer:0,kpi:0}})))}))),e.abrupt("return",!0);case 15:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),qa=function(){var e=Object(Ee.a)(Ua().mark((function e(t,r){var n,a,o,i,c,l,s;return Ua().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=be.getState(),a=n.db,o=n.timeline,i=n.session,c={},a.users[r.user]?c=a.users[r.user]:r.user&&a[r.db]&&o[r.nodeId]&&o[r.nodeId]._users&&o[r.nodeId]._users[r.user]&&(c=o[r.nodeId]._users[r.user]),o[r.nodeId]&&!o[r.nodeId][r.message]&&o[i._id][r.message]&&(r.nodeId=i._id),a[r.db]&&o[r.nodeId]&&o[r.nodeId][r.message]&&(l=Object(h.a)(Object(h.a)({},o[r.nodeId][r.message]&&o[r.nodeId][r.message]._reactions?o[r.nodeId][r.message]._reactions:{}),{},Object(Oe.a)({},r.react,Object(h.a)(Object(h.a)({},o[r.nodeId][r.message]&&o[r.nodeId][r.message]._reactions&&o[r.nodeId][r.message]._reactions[r.react]?o[r.nodeId][r.message]._reactions[r.react]:{}),{},Object(Oe.a)({},r.user,Object(h.a)(Object(h.a)({},c),{},{reactDate:{low:Fe()().tz("America/Sao_Paulo").unix("x")}}))))),Object.keys(l).map((function(e){e!==r.react&&Object.keys(l[e]).map((function(t){l[e][t]&&t===r.user&&delete l[e][t]}))})),s=Object(h.a)(Object(h.a)({},o),{},Object(Oe.a)({},r.nodeId,Object(h.a)(Object(h.a)({},o[r.nodeId]),{},Object(Oe.a)({},r.message,Object(h.a)(Object(h.a)({},o[r.nodeId][r.message]),{},{_reactions:l}))))),t.reduxFunction("ASYNC","SET_TIMELINE",s));case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Xa=function(e,t){var r=t,n=be.getState().timeline,a=r._parent?r._parent:r.cardId?r.cardId:r.node;r.to&&(r.to.map((function(e){var t=be.getState().db.users[e];r._toUser=Object(h.a)(Object(h.a)({},r._toUser?r._toUser:{}),{},Object(Oe.a)({},e,{_id:e,name:t.displayName?t.displayName:t.name,image:t.image?t.image:null}))})),delete r.to),a&&r.comment&&e.reduxFunction("ASYNC","SET_TIMELINE",Object(h.a)(Object(h.a)({},n),{},Object(Oe.a)({},a,Object(h.a)(Object(h.a)({},n[a]),{},Object(Oe.a)({},r.comment._id,Object(h.a)(Object(h.a)(Object(h.a)(Object(h.a)({},n[a]&&n[a][r.comment._id]?n[a][r.comment._id]:{}),r.comment),r._toUser?{_toUser:r._toUser}:{}),{},{type:n[a]&&n[a][r.comment._id]&&n[a][r.comment._id].type?n[a][r.comment._id].type:r&&r.comment&&r.comment.type?r.comment.type:n[a]&&n[a][r.comment._id]&&n[a]&&n[a][r.comment._id].type?n[a]&&n[a][r.comment._id].type:"comment",readedBy:Object(h.a)(Object(h.a)({},n[a]&&n[a][r.comment._id]&&n[a][r.comment._id].readedBy?n[a][r.comment._id].readedBy:{}),r.comment&&r.comment.readedBy?r.comment.readedBy:{})}))))))},Ka=function(){var e=Object(Ee.a)(Ua().mark((function e(t,r){var n,a,o,i,c,l,s,u,d,p,f,m,g,y,v,b,x,_;return Ua().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.ids,a=r.db,o=r.type,i=r.limit,c=void 0!==i&&i,l=r.skip,s=void 0===l?0:l,u=r.toId,d=void 0===u?null:u,p=r.ini,f=void 0!==p&&p,m=r.reqChildrens,g=void 0!==m&&m,y=be.getState(),v=y.session,Object(h.a)({},v.timeline.load),b=[],x=[],"string"===typeof n?x.push(n):x=n,x&&x.length>0&&x.map((function(e){be.getState().db.cards[e];-1===b.indexOf(e)&&b.push(e)})),!(b.length>0)){e.next=15;break}return e.next=10,new Promise(function(){var e=Object(Ee.a)(Ua().mark((function e(n,i){var l,u,p,m,y;return Ua().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(b.length>0)){e.next=28;break}return e.prev=1,e.next=4,Qr.post("/M_Timeline_Get_V3",{nodesIds:b,db:a,type:o||"comment",skip:parseInt(s),limit:c,toId:d,ini:f,reqChildrens:g});case 4:if(!((l=e.sent)&&l.data&&l.data.length>0)){e.next=20;break}if(u=Object(h.a)({},be.getState().timeline),l.data.map((function(e){var t={},r={};e&&e.params&&e.params.readedBy&&e.params.readedBy.filter((function(e){return e._id})).length>0&&e.params.readedBy.map((function(e){t=Object(h.a)(Object(h.a)({},t),{},Object(Oe.a)({},e._id,e))})),e&&e.params&&e.params.reactions&&e.params.reactions.filter((function(e){return e._id})).length>0&&e.params.reactions.map((function(e){r=Object(h.a)(Object(h.a)({},r),{},Object(Oe.a)({},e.type,Object(h.a)(Object(h.a)({},r[e.type]),{},Object(Oe.a)({},e._id,e))))})),u=Object(h.a)(Object(h.a)({},u),{},Object(Oe.a)({},e.nodeId,Object(h.a)(Object(h.a)({},u&&u[e.nodeId]?u[e.nodeId]:{}),{},Object(Oe.a)({},e.data._id,Object(h.a)(Object(h.a)(Object(h.a)({},e.data),e.params),{},{readedBy:t,_reactions:r})))))})),!(r.ini&&be.getState().chat&&!be.getState().chat.nodeId&&u&&Object.keys(u).length)){e.next=16;break}return p=0,m=null,y=u||{},e.next=14,new Promise((function(e,t){y&&Object.keys(y).length>0&&Object.keys(y).map((function(t,r){y[t]&&Object.keys(y[t]).length>0&&Object.keys(y[t]).map((function(n,a){y[t]&&y[t][n]&&y[t][n].created_at&&parseInt(y[t][n].created_at)>p&&(be.getState().db.cards[t]&&"chatGroup"===be.getState().db.cards[t].type||be.getState().db.users[t])&&(p=parseInt(y[t][n].created_at),m=t!==v._id?t:y[t][n].user._id),a+1===Object.keys(y[t]).length&&r+1===Object.keys(y).length&&e(!0)}))}))}));case 14:e.sent&&m&&t.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},be.getState().chat),{},{nodeId:m}));case 16:t.reduxFunction("ASYNC","SET_TIMELINE",Object(h.a)(Object(h.a)({},be.getState().timeline),u)),n({result:!0,total:l.data.length,timelines:u}),e.next=21;break;case 20:n({result:!0,total:l.data.length});case 21:e.next=28;break;case 23:e.prev=23,e.t0=e.catch(1),console.group("loadTimeline::ERR::"),console.log(e.t0),console.groupEnd();case 28:case"end":return e.stop()}}),e,null,[[1,23]])})));return function(t,r){return e.apply(this,arguments)}}());case 10:if(!(_=e.sent)){e.next=13;break}return e.abrupt("return",_);case 13:e.next=16;break;case 15:return e.abrupt("return",{result:!0,total:0});case 16:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Ja=function(){var e=be.getState(),t=e.db,r=e.session,n=e.timeline,a=0,o=0,i=0,c=0;return Object.keys(t.cards).filter((function(e){return"chatGroup"===t.cards[e].type&&!t.cards[e].deleted&&t.cards[e]._users&&t.cards[e]._users[r._id]})).map((function(e){return be.getState().db.cards[e]})).map((function(e){n[e._id]&&Object.keys(n[e._id]).length>0&&e._users&&e._users[r._id]&&(e.client?o+=Object.keys(n[e._id]).filter((function(t){return"comment"===n[e._id][t].type&&n[e._id][t].user._id!==r._id&&(!n[e._id][t].readedBy||n[e._id][t].readedBy&&!n[e._id][t].readedBy[r._id])})).length:a+=Object.keys(n[e._id]).filter((function(t){return"comment"===n[e._id][t].type&&n[e._id][t].user&&n[e._id][t].user._id!==r._id&&(!n[e._id][t].readedBy||n[e._id][t].readedBy&&!n[e._id][t].readedBy[r._id])})).length)})),r&&r._id&&t.users&&t.users[r._id]&&n[r._id]&&(i+=Math.ceil(Object.keys(n[r._id]).filter((function(e){return n[r._id][e]&&"comment"===n[r._id][e].type&&n[r._id][e].user&&n[r._id][e].user._id&&n[r._id][e].user._id!==r._id&&t.users[n[r._id][e].user._id]&&!t.users[n[r._id][e].user._id]._parent&&(!n[r._id][e].readedBy||n[r._id][e].readedBy&&!n[r._id][e].readedBy[r._id])})).length)),r&&t.users[r._id]&&n[r._id]&&(c+=Math.ceil(Object.keys(n[r._id]).filter((function(e){return n[r._id][e]&&"comment"===n[r._id][e].type&&n[r._id][e].user&&n[r._id][e].user._id&&n[r._id][e].user._id!==r._id&&t.users[n[r._id][e].user._id]&&t.users[n[r._id][e].user._id]._parent&&(!n[r._id][e].readedBy||n[r._id][e].readedBy&&!n[r._id][e].readedBy[r._id])})).length)),{total:a+i+o+c,groups:a,externalGroups:o,users:i,externalUsers:c}},Za=function(){var e=Object(Ee.a)(Ua().mark((function e(t,r){var n,a;return Ua().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(t&&t.store&&be.getState().functions&&be.getState().functions.socket,be.getState().functions.socket),e.next=3,new Promise(function(){var e=Object(Ee.a)(Ua().mark((function e(a,o){return Ua().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.emit("data",{module:"chat",method:"put",action:"cancel"},r,(function(e){var n=r.idRel,o=be.getState().session;be.getState().timeline[o._id]&&be.getState().timeline[o._id][r.id]&&(n=o._id),t.reduxFunction("ASYNC","SET_TIMELINE",Object(h.a)(Object(h.a)({},be.getState().timeline),{},Object(Oe.a)({},n,Object(h.a)(Object(h.a)({},be.getState().timeline[n]),{},Object(Oe.a)({},r.id,Object(h.a)(Object(h.a)({},be.getState().timeline&&be.getState().timeline[n]&&be.getState().timeline[n][r.id]),{},{deleted:!0},r.deletedReason?{deletedReason:r.deletedReason}:{})))))),a(!0)}));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}());case 3:if(!(a=e.sent)){e.next=6;break}return e.abrupt("return",a);case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();function Qa(){Qa=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}r(520);var eo,to,ro=Object(_e.b)((function(e){return{store:{timeline:e.timeline,cards:e.db.cards}}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(oa)((function(e){var t=e.classes,r=e.data,n=be.getState(),a=n.db,i=n.timeline,c=a.cards,l=o.a.useState(!1),s=Object(je.a)(l,2),u=s[0],d=s[1],p=o.a.useState(!0),f=Object(je.a)(p,2),m=(f[0],f[1]),g=o.a.useState(!0),y=Object(je.a)(g,2),v=y[0],b=y[1],x=o.a.useState([]),_=Object(je.a)(x,2),w=_[0],E=_[1],O=parseFloat(r.kpi_ini),j=parseFloat(r.kpi_fin);o.a.useEffect((function(){u||(d(!0),L(e.data._id),k())}),[]),o.a.useEffect((function(){L(e.data._id)}),[c]);var k=function(){var t=Object(Ee.a)(Qa().mark((function t(){return Qa().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!i||i[r._id]&&(!i[r._id]||0!==Object.keys(i[r._id]).filter((function(e){return"kpi"===i[r._id][e].type})).length)){t.next=7;break}return t.next=3,Ka(Object(h.a)(Object(h.a)({},e),{},{fnIdentification:"Timeline/Index/init()"}),{ids:[r._id],db:"cards",reqChildrens:!0,type:"kpi",limit:!0});case 3:t.sent&&b(!1),t.next=8;break;case 7:b(!1);case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),S=[e.data._id],L=function(){var e=Object(Ee.a)(Qa().mark((function e(t,r){var n;return Qa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=Object.keys(c).filter((function(e){return c[e].kpi_useParent&&c[e]._parent===t}))).length>0?n.map(function(){var e=Object(Ee.a)(Qa().mark((function e(t){return Qa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:L(t,!0),S.push(t),E(Array.from(new Set(S)));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()):r||E(S),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 C=Object(h.a)({},ka.model),I=[],F=[],T={};w.map((function(e){T=Object(h.a)(Object(h.a)({},T),i[e]||{})})),T=Object.keys(T).filter((function(e){return"kpi"===T[e].type&&T[e].kpi_type===r.kpi_type})).map((function(e){return T[e]}));var N="time"!==r.kpi_type?parseFloat(O):0,P=parseFloat(O)-parseFloat(j),A=0;P<0&&(P*=-1),T&&Object.keys(T).length>0&&Object.keys(T).sort((function(e,t){return T[e].created_at<T[t].created_at?-1:1})).map((function(e,t){N=parseFloat(N)+parseFloat(T[e].value),A+=parseFloat(T[e].value),I.push({meta:T[e].value,total:N,value:parseFloat(O)>parseFloat(j)?100-Math.floor(100*N/P):Math.floor(100*N/P)}),F.push(t+1),t+1===Object.keys(T).length&&(C=Object(h.a)(Object(h.a)({},C),{},{data:{labels:F,series:[[].concat(I)]},options:Object(h.a)(Object(h.a)({},C.options),{},{low:0,high:100,plugins:[aa.a.plugins.tooltip({tooltipFnc:function(e,t,n){return"".concat(e>0?"+":"")+Yt(e,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null)+"<br>"+Yt(t,"percent")}})],axisX:{showGrid:!1},axisY:{showGrid:!1},onlyInteger:!0})}))}));var D=O<j?j-O:O-j,z=D;T&&Object.keys(T).length>0&&Object.keys(T).map((function(e){D=parseFloat(D)+parseFloat(T[e].value)}));var M=z-(D-z),B=z-(z-D),$=Math.ceil(O<j?j-O:O-j);return($=100*Math.ceil(D)/$-100)<0&&($*=-1),e.data?v?o.a.createElement("div",{style:{position:"absolute",bottom:0,left:"7px",right:"7px"}},o.a.createElement(Ga,null)):o.a.createElement("div",{className:t.root},o.a.createElement(o.a.Fragment,null,e.chartShow&&"time"!==r.kpi_type&&"task"!==r.kpi_type&&T.length>0&&o.a.createElement("div",{style:{backgroundColor:Mt("color")}},o.a.createElement($a.a,{className:"ct-chart-white-colors",data:C.data,type:"Line",options:C.options,listener:C.animation})),"task"!==r.kpi_type&&o.a.createElement("fieldset",{style:{position:"relative"}},o.a.createElement("legend",{style:{color:Mt("color")}},Dt("$__progress",1)),o.a.createElement("div",{style:{position:"relative",textSize:"11px",color:Mt("color")}},"time"===r.kpi_type?Dt("$__minTime",1):Dt("$__maxTime",1),": ",Yt(O||0,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null),"/ ","time"===r.kpi_type?Dt("$__maxTime",1):Dt("$__targetValue",1),": ",Yt(j||0,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null)),o.a.createElement("div",{className:t.progress},o.a.createElement(Ga,{variant:"determinate",size:100,value:$,showText:!0,onClick:function(){}})),o.a.createElement("div",{style:{position:"relative",textSize:"11px",fontWeight:"bold",color:Mt("color")}},Dt("".concat(O>j?"$__balance":"time"===r.kpi_type?"$__availableTime":"$__targetValue"),1),": ",Yt(O<j?M:B||0,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null)),o.a.createElement("div",{style:{position:"relative",textSize:"11px",fontWeight:"bold",color:A>0?Mt("green"):"red"}},Dt("$__accomplished",1),": ",Yt(A||0,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null)),o.a.createElement("div",{style:{position:"absolute",right:"0px",top:"-33px",display:"flex"}},($>=0&&$<100&&j>O||$>0&&$<=100&&j<O)&&o.a.createElement(Wa,{icon:"add_circle",iconColor:Mt("blue"),onClick:function(){m(!0)},transparent:!0},o.a.createElement(ca,{data:r,PositiveValue:!0,callBack:function(){}})),($>=0&&$<100&&j<O||$>0&&$<=100&&j>O)&&o.a.createElement(Wa,{icon:"remove_circle",iconColor:"orange",onClick:function(){m(!1)},transparent:!0},o.a.createElement(ca,{data:r,PositiveValue:!1,callBack:function(){}})))),"task"===r.kpi_type&&o.a.createElement("div",{className:t.time},"TASK"))):o.a.createElement("div",null,"NO DATA RECEIVED")}))),no=r(53),ao={container:Object(h.a)(Object(h.a)({},qe),{},(eo={position:"relative",border:"0.5px solid ".concat(Mt("light")),borderRadius:"2px",padding:"0px",backgroundColor:"#FFFFFF",boxShadow:"0px 0px 10px rgba(0,0,0,0.1)"},Object(Oe.a)(eo,"padding","3px"),Object(Oe.a)(eo,"minWidth","150px"),Object(Oe.a)(eo,"display","flow-root"),eo)),cardContainer:Object(h.a)(Object(h.a)({},qe),{},{position:"relative",minWidth:"150px",display:"flow-root"}),parent:{width:"100%",padding:"0 5px","& .title":{color:Mt("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Mt("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:Mt("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"}}};function oo(){oo=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var io,co=Ae.b.div(to||(to=Object(we.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(Mt("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 "})),lo=Object(_e.b)((function(){return{}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(ao)((function(e){var t=e.classes,r=be.getState().db,n=e.data&&e.data._id?be.getState().db.cards[e.data._id]:{},a=o.a.useState(n.name?n.name:""),i=Object(je.a)(a,2),c=i[0],l=i[1],s=o.a.useState(!1),u=Object(je.a)(s,2),d=u[0],p=u[1],f=function(){var t=Object(Ee.a)(oo().mark((function t(r){return oo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:$n(Object(h.a)(Object(h.a)({},e),{},{data:{_id:n._id}}),r),p(!1);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),m=function(){var t=Object(Ee.a)(oo().mark((function t(){var r;return oo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Qr.post("/Card_Count",{id:n._id});case 2:(r=t.sent)&&parseInt(r.data)>0&&"completed"!==n.status?$t({message:Dt("$__concludeWithChildrensNotConcludedConfirm",1),autoClose:5e4,buttons:[{shadow:!0,title:Dt("$__concludeAll"),text:Dt("$__concludeAll"),color:"green",icon:"close",size:"25px",onClick:function(){$n(Object(h.a)(Object(h.a)({},e),{},{data:{_id:n._id}}),{status:"completed"===n.status?"inProgress":"completed"}),r&&parseInt(r.data)>0&&Rn(e,n._id,"completed"===n.status?"inProgress":"completed")},style:{marginLeft:15}},{shadow:!0,title:Dt("$__cancel"),text:Dt("$__cancel"),color:"red",icon:"close",size:"25px",onClick:function(){},style:{marginLeft:15}}],variant:"warning",persist:!1,horizontal:"right"}):($n(Object(h.a)(Object(h.a)({},e),{},{data:{_id:n._id}}),{status:"completed"===n.status?"inProgress":"completed"}),r&&parseInt(r.data)>0&&Rn(e,n._id,"completed"===n.status?"inProgress":"completed"));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),g=function(){var e=Object(Ee.a)(oo().mark((function e(){return oo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:$t({message:Dt("$__confirmDeleteThisFullDescription",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){f({deleted:!0})}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return o.a.createElement(co,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}),o.a.createElement("div",e.provided&&e.provided.dragHandleProps,d?o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px",display:"flex",alignItems:"center"}},o.a.createElement("div",{style:{width:"calc(100% - 50px)",display:"flex"}},o.a.createElement(Qn,{label:Dt("$__taskTitle"),variant:Mt("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){l(e.target.value)},onBlur:function(e){""===e.target.value&&p(!d)},onKeyDown:function(e){13===e.keyCode&&c&&f({name:c}),27===e.keyCode&&(p(!d),l())}},autoFocus:!0,value:c,placeholder:Dt("$__taskTitlePlaceholder")})),o.a.createElement("div",{style:{display:"flex"}},o.a.createElement("div",{onClick:function(){return f({name:c})}},o.a.createElement(wt,{color:"green",icon:"save",title:Dt("$__save","*"),size:e.actionsSize||"25px"})),o.a.createElement("div",{onClick:function(){p(!d),l("")}},o.a.createElement(wt,{color:Mt("medium"),icon:"cancel",title:Dt("$__cancel","*"),size:e.actionsSize||"25px"}))))):o.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}},!e.noDelete&&(!e.showCard||!e.dragStatus&&e.showCard)&&o.a.createElement(wt,{onClick:function(){return g()},color:"lightgrey"},"delete_forever"),o.a.createElement("div",Object.assign({style:{width:"100%",padding:"0px 7px",wordBreak:"break-word"},onDoubleClick:function(){p(!d)}},e.provided?{provided:e.provided}:{},e.snapshot?{snapshot:e.snapshot}:{}),e.showCard?o.a.createElement(ii,{db:"cards",data:e.data,viewTimer:!0,viewAllName:!0}):n.name?n.name:Dt("$__new",1)),"completed"!==n.status||e.showCard?o.a.createElement(o.a.Fragment,null):o.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"}},o.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?o.a.createElement("div",{style:{position:"absolute",right:33,top:"calc(50% - 15px)",fontSize:10,textAlign:"right",backgroundColor:"#f1f1f1",paddingLeft:7}},Kt(n.completed_at)):o.a.createElement(o.a.Fragment,null)),(!e.showCard||!e.dragStatus&&e.showCard)&&o.a.createElement(Ct,{title:"completed"!==n.status?Dt("$__conclude",1):Dt("$__undoConclude",1),color:"completed"!==n.status?"lightgrey":"grey",icon:"completed"!==n.status?"radio_button_unchecked":"check_circle",onClick:function(){m()},transparent:!0}))))})));function so(){so=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var uo=Ae.b.div(io||(io=Object(we.a)(["\n background-color:none\n ","\n "])),(function(e){return e.isDragDisable?"":e.isDragging?"opacity:0.88":""})),po=Object(_e.b)((function(e){return{cards:e.db.cards}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState(),r=t.db,n=t.session,a=be.getState().functions.socket,i=o.a.useState(e.name?e.name:""),c=Object(je.a)(i,2),l=c[0],s=c[1],u=o.a.useState(!1),d=Object(je.a)(u,2),p=d[0],f=d[1],m=o.a.useState(!1),g=Object(je.a)(m,2),y=g[0],v=g[1],b=Fe()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),x=o.a.useState(!e.myDay),_=Object(je.a)(x,2),w=(_[0],_[1],window.location.hash.split("/"));w[0]=w[0].replace("#",""),36!==w[0].length&&(w[0]=null);var E={};be.getState().db[e.db]&&be.getState().db[e.db][e.nodeId]&&(E=be.getState().db[e.db][e.nodeId]);var O=Object.keys(be.getState().db.cards).filter((function(t){return!(e.myDay||!(!e.noChecklist&&be.getState().db.cards[t]&&!be.getState().db.cards[t].deleted&&be.getState().db.cards[t].checklist&&be.getState().db.cards[t]._parent===e.nodeId||e.noChecklist&&!be.getState().db.cards[t].deleted&&!be.getState().db.cards[t].checklist&&be.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&&Fe()(new Date(1e3*r.cards[t]._users[n._id].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===b&&be.getState().db.cards[t])||be.getState().db.cards[t].deleted||be.getState().db.cards[t].checklist)||void 0)})).sort((function(e,t){var n=r.cards[e].order&&String(r.cards[e].order.low)?parseInt(r.cards[e].order.low):parseInt(r.cards[e].order),a=r.cards[t].order&&String(r.cards[t].order.low)?parseInt(r.cards[t].order.low):parseInt(r.cards[t].order);return n<a?-1:n>a?1:0})).map((function(e){return e})),j=function(){var t=Object(Ee.a)(so().mark((function t(){var r,a;return so().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=be.getState().functions.socket,a="task",e.noChecklist&&E&&E.type&&(E.type.indexOf("guideline")>-1&&(a="objective"),"objective"===E.type&&(a="goal"),"goal"===E.type&&(a="task")),r.emit("data",{module:"cards",method:"post",action:"add"},{_parent:E&&E._id?E._id:null,planId:E._planId?E._planId:null,name:l,type:a,checklist:!e.noChecklist,status:"notStarted"},function(){var t=Object(Ee.a)(so().mark((function t(r){var a;return so().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:a=Object(h.a)(Object(h.a)({},r.data),{},{_parent:E._id,_timeline:Object(Oe.a)({},r.log._id,Object(h.a)(Object(h.a)({},r.log),{},{_parent:[r.id]})),_users:Object(Oe.a)({},n._id,{name:be.getState().db.users[n._id].name?be.getState().db.users[n._id].name:null,displayName:be.getState().db.users[n._id].displayName?be.getState().db.users[n._id].displayName:null,image:be.getState().db.users[n._id].image?be.getState().db.users[n._id].image:null,access:5,_id:n._id})}),e.myDay?Ln(e,{_id:r.id,userId:n._id,option:!0},{new:!0,user:n._id,cardId:r.id,data:a}):Sn(e,{_id:r.id,userId:n._id,option:!0},{new:!0,user:n._id,cardId:r.id,data:a}),s("");case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),k=function(){var t=Object(Ee.a)(so().mark((function t(n){var o,i,c,l,s,u;return so().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(v(!1),o=n.destination,i=n.source,c=n.draggableId,l=Array.from(O.filter((function(e){return"completed"!==r.cards[e].status})).map((function(e){return e}))),console.log(c,i.index,o.index,O.filter((function(e){return"completed"!==r.cards[e].status})).map((function(e){return e}))),o){t.next=6;break}return t.abrupt("return",!1);case 6:if(o.droppableId!==i.droppableId||o.id!==i.index){t.next=8;break}return t.abrupt("return",!1);case 8:return(s=l).splice(i.index,1),s.splice(o.index,0,c),O.filter((function(e){return"completed"===r.cards[e].status})).length>0&&O.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(e){s.push(e)})),t.next=14,setTimeout(500);case 14:return console.log(s),a.emit("data",{module:"cards",method:"put",action:"reorder"},{cards:s}),u=Object(h.a)({},be.getState().db.cards),s.map((function(e,t){return u=Object(h.a)(Object(h.a)({},u),{},Object(Oe.a)({},e,Object(h.a)(Object(h.a)({},r.cards[e]),{},{order:{low:t}}))),!0})),e.reduxFunction("IMMEDIATE","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)({},u)})),t.abrupt("return");case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),S=function(){var e=Object(Ee.a)(so().mark((function e(t){return so().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v(!0);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),L=function(){var e=Object(Ee.a)(so().mark((function e(t){return so().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 o.a.createElement("div",{style:{width:"100%"},onClick:function(e){return e.stopPropagation()}},e.showProgress&&O.length>0?o.a.createElement("div",{style:{position:"relative",width:"100%"}},o.a.createElement("div",{style:{position:"absolute",right:7,bottom:0,fontSize:9,color:Mt("menu"),fontWeight:"bold"}},O.filter((function(e){return"completed"===r.cards[e].status})).length,"/",o.a.createElement("span",{style:{fontWeight:"normal"}},O.length)),o.a.createElement("div",{style:{position:"relative",width:"100%",height:5,backgroundColor:"lightGray"}},o.a.createElement("div",{style:{position:"absolute",top:0,left:0,bottom:0,backgroundColor:Mt("menu"),width:"".concat(100/O.length*O.filter((function(e){return"completed"===r.cards[e].status})).length,"%")}}))):o.a.createElement(o.a.Fragment,null),O.filter((function(e){return"completed"!==r.cards[e].status})).length>0?o.a.createElement(no.a,{onDragEnd:k,onDragStart:S,onDragUpdate:L},o.a.createElement(no.c,{droppableId:"Drop_tasks",type:"column",direction:"vertical"},(function(t,n){return o.a.createElement(uo,Object.assign({ref:t.innerRef},t.droppableProps,{isDraggingOver:n.isDraggingOver}),O.filter((function(e){return"completed"!==r.cards[e].status})).sort((function(e,t){var n=r.cards[e].order&&String(r.cards[e].order.low)?parseInt(r.cards[e].order.low):parseInt(r.cards[e].order),a=r.cards[t].order&&String(r.cards[t].order.low)?parseInt(r.cards[t].order.low):parseInt(r.cards[t].order);return n<a?-1:n>a?1:0})).map((function(t,n){return o.a.createElement(no.b,{draggableId:t,index:n,key:"".concat(t).concat(n)},(function(n,a){return o.a.createElement(lo,{dragStatus:y,provided:n,snapshot:a,data:r.cards[t],db:"cards",selectable:!0,noDelete:!!e.noDelete&&e.noDelete,showCard:!!e.showCard})}))})),t.placeholder)}))):o.a.createElement(o.a.Fragment,null),O.filter((function(e){return"completed"===r.cards[e].status})).length>0?o.a.createElement(o.a.Fragment,null,O.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 o.a.createElement("div",{key:"".concat(t).concat(n)},o.a.createElement(lo,{data:r.cards[t],db:"cards",selectable:!0,noDelete:!!e.noDelete&&e.noDelete,showCard:!!e.showCard}))}))):o.a.createElement(o.a.Fragment,null),!p&&o.a.createElement("div",{style:{position:"relative",float:"right",width:"100%",padding:"7px",display:"flex",alignContent:"flex-end",justifyContent:"center"}},o.a.createElement("div",null,o.a.createElement(Ir,{reverse:!0,text:Dt("$__add","*"),icon:"add_box",iconColor:Mt("medium"),onClick:function(){f(!p)}}))),p&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px",display:"flex",alignItems:"center"}},o.a.createElement("div",{style:{width:"calc(100% - 50px)",display:"flex"}},o.a.createElement(Qn,{label:Dt("$__taskTitle"),variant:Mt("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){s(e.target.value)},onBlur:function(e){""===e.target.value&&f(!p)},onKeyDown:function(e){13===e.keyCode&&l&&j(),27===e.keyCode&&(f(!p),s(""))}},autoFocus:!0,value:l,placeholder:Dt("$__taskTitlePlaceholder")})),o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(Ct,{title:Dt("$__save",1),color:"green",icon:"save",onClick:function(e){j()},transparent:!0}),o.a.createElement(Ct,{title:Dt("$__cancel",1),color:"lightgrey",icon:"cancel",onClick:function(e){f(!p),s("")},transparent:!0})))))}));function fo(){fo=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var ho=function(e){var t=be.getState(),r=t.db,n=t.session,a=o.a.useState({}),i=Object(je.a)(a,2),c=i[0],l=i[1];o.a.useEffect((function(){e.id&&r.cards[e.id]&&u()}),[e.id]);var s=Ut(),u=(Dn(e.id),function(){var t=Object(Ee.a)(fo().mark((function t(){return fo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=l,t.next=3,Pn(e.id);case 3:t.t1=t.sent,(0,t.t0)(t.t1);case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}());if(0===Object.keys(c).length)return null;var d=Object.keys(c).map((function(t,a){var i=Dn(t);if(c[t].icon&&c[t].type&&c[t].name)return o.a.createElement("div",{style:{marginRight:"10px",width:"100%"},key:a},o.a.createElement("div",{style:{display:"flex",cursor:"pointer"},onClick:e.open&&(s.planAdmin||s.planModerate||i>=1)&&(!r.cards[c[t]._id].private||r.cards[c[t]._id].private&&r.cards[c[t]._id]._users&&r.cards[c[t]._id]._users[n._id])?function(r){e.open(c[t]._id),r.stopPropagation()}:null},o.a.createElement(Sr,{icon:c[t].icon,title:"".concat(Dt("$__".concat(c[t].type),"*"),": ").concat(c[t].name),size:"16px",color:Mt("color")}),o.a.createElement("span",{style:{marginLeft:"5px"}},c[t].name)))}));return o.a.createElement("div",{style:{width:"calc(100% - 5px)"},onClick:function(e){e.stopPropagation()}},e.showLegend?o.a.createElement("fieldset",{style:{marginBottom:"14px",width:"100%"}},o.a.createElement("legend",null,Dt("$__connectedIn",1)),d):d)},mo=r(1427),go={root:Object(h.a)({},qe),aspectsTitle:{width:"100%",fontWeight:"bold",padding:"3px",color:Mt("color"),display:"flex",alignItems:"center"}},yo=Object(De.a)(go);var vo=Object(_e.b)((function(e){return{store:e}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState().db,r=yo(),n=o.a.useState(!1),a=Object(je.a)(n,2),i=(a[0],a[1]),c=o.a.useState([]),l=Object(je.a)(c,2),s=l[0],u=l[1];o.a.useEffect((function(){i(!0);var r=[];e.data&&e.data.length>0&&e.data.map((function(e){r.push(t.cards[e])})),u(r)}),[e]);var d="guidelineD"===e.type||"guidelineR"===e.type?s.filter((function(e){return e&&"strength"===e.type})):s.filter((function(e){return e&&"weakness"===e.type})),p="guidelineD"===e.type||"guidelineE"===e.type?s.filter((function(e){return e&&"threat"===e.type})):s.filter((function(e){return e&&"opportunity"===e.type})),f="guidelineD"===e.type||"guidelineR"===e.type?"strength":"weakness",h="guidelineD"===e.type||"guidelineE"===e.type?"threat":"opportunity",m="guidelineD"===e.type||"guidelineR"===e.type?"forces":"weaknesses",g="guidelineD"===e.type||"guidelineE"===e.type?"threats":"opportunities";return o.a.createElement("div",{className:r.root},o.a.createElement("div",{className:r.aspectsTitle},o.a.createElement(wt,{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:Mt("color"),title:Dt(f,1)}),o.a.createElement("span",{style:{marginLeft:"5px"}},Dt("$__internalAspects",1)," - ",Dt("$__".concat(m),1))),d&&d.length>0&&d.sort((function(e,t){return e.name-t.name})).map((function(e,t){return o.a.createElement(mo.a,{size:"small",label:e.name,title:e.name,style:{margin:"3px",maxWidth:"100%",overflow:"hidden"},key:e._id})})),o.a.createElement("div",{className:r.aspectsTitle},o.a.createElement(wt,{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:Mt("color"),title:Dt(h,1)}),o.a.createElement("span",{style:{marginLeft:"5px"}},Dt("$__externalAspects",1)," - ",Dt("$__".concat(g),1))),p&&p.length>0&&p.sort((function(e,t){return e.name-t.name})).map((function(e,t){return o.a.createElement(mo.a,{size:"small",label:e.name,title:e.name,style:{margin:"3px",maxWidth:"100%",overflow:"hidden"},key:e._id})})))})),bo=r(581),xo=r.n(bo);function _o(){_o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var wo=Object(_e.b)((function(e){return{}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(za)(Object(a.memo)((function(e){var t=e.classes,r=be.getState(),n=r.db,a=r.session,i=r.timeline,c=o.a.useState(null),s=Object(je.a)(c,2),u=s[0],d=s[1],p=o.a.useState(!0),f=Object(je.a)(p,2),m=f[0],g=f[1],y=o.a.useState([]),v=Object(je.a)(y,2),b=v[0],x=(v[1],o.a.useState(!1)),_=Object(je.a)(x,2),w=_[0],E=_[1],O=o.a.useState(!1),j=Object(je.a)(O,2),k=j[0],S=j[1],L=o.a.useState(!1),C=Object(je.a)(L,2),I=C[0],F=C[1],T=e.data&&e.data._id?be.getState().db.cards[e.data._id]:{},N=Ut(),P=window.location.hash.split("/");P[0]=P[0].replace("#",""),o.a.useEffect((function(){return w||(T._parent&&n.cards[T._parent]&&n.cards[T._parent]._loaded&&E(!0),!e.onlyOption&&n.dataType&&T&&T.type&&n.dataType.filter((function(e){return e.name===T.type})).length>0&&n.dataType.filter((function(e){return e.name===T.type}))[0].loadChildrens&&A()),function(){E(!1)}}),[T,T.image,T._parent,e.searchText]),o.a.useEffect((function(){if(T._parent&&(!P[0]||P[0]&&36!==P[0].length)){var t=function(){var r=Object(Ee.a)(_o().mark((function r(a){return _o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n.cards[a]){r.next=8;break}return F(!0),r.next=4,ln(Object(h.a)(Object(h.a)({},e),{},{ignoreLoader:!0}),{idRel:[a],cardLoad:"parents"});case 4:r.sent&&F(!1),r.next=9;break;case 8:n.cards[a]&&n.cards[a]._parent?t(n.cards[a]._parent)&&F(!1):F(!1);case 9:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}();(function(){var e=Object(Ee.a)(_o().mark((function e(){return _o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t(T._parent);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()}else F(!1)}),[]);var A=function(){var t=Object(Ee.a)(_o().mark((function t(){return _o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!w){t.next=4;break}if(T._loadTimeline&&(!T._loadTimeline||T._loadTimeline.kpi)||!T.kpi_type||"task"===T.kpiType||"timer"===T.kpiType||"time"===T.kpiType){t.next=4;break}return t.next=4,Ka(Object(h.a)(Object(h.a)({},e),{},{fnIdentification:"Card/index/init()"}),{ids:[T._id],db:"cards",type:"kpi"});case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();if(I)return o.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"}},o.a.createElement("span",{style:{color:Mt("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},Dt("$__loadingData")),o.a.createElement(Ga,null));if(!T||!e.data||!e.data._id)return null;var D=function(){var t=Object(Ee.a)(_o().mark((function t(){var r,n=arguments;return _o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=n.length>0&&void 0!==n[0]?n[0]:"cardEdit",e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},e.store.sideModule),{},{db:e.db,id:T._id,module:"cardEdit",activeModule:r,data:T}));case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return o.a.createElement("div",null,o.a.createElement("div",null,o.a.createElement("div",Object.assign({},e.provided&&e.provided.dragHandleProps,{style:{display:"none"}})),o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:t.infos,onClick:function(t){e.onClick&&e.onClick()}},T.image&&(T.image||e.Avatar||T.image||e.Avatar)&&!a.cards.hide.image?o.a.createElement("div",{className:t.imagePreview,style:u?{backgroundImage:'url("'.concat(u||Nr.a,'")')}:{background:Mt("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},T.image&&!u&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{marginTop:"calc(-48% - ".concat("insight"===T.type||"link"===T.type?"10px":"0px",")"),display:"flex",justifyContent:"center",alignItems:"center"}},"insight"===T.type||"link"===T.type?o.a.createElement(wt,{icon:R.a,size:"39px",color:"rgba(250,250,250,0.77)"}):o.a.createElement("img",{src:xo.a,style:{width:"25%"}})),!m&&o.a.createElement("div",{style:{position:"absolute",marginTop:"calc(-48% + 0px)",zIndex:1}},o.a.createElement(Er,null))),(!u||e.Avatar||T.image!==u)&&o.a.createElement(o.a.Fragment,null,o.a.createElement("img",{className:t.image,src:"".concat(T.image?T.image:Nr.a),onError:function(e){T.image?d(null):g(!0)},onLoad:function(t){d("".concat(e.Avatar&&!T.image?Nr.a:T.image))},width:"100%"}))):e.Avatar&&!a.cards.hide.image&&o.a.createElement("div",{className:n.viewList?t.imagePreviewList:t.imagePreview,style:{background:Mt("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},o.a.createElement("div",{style:{marginTop:"calc(-48% - ".concat("insight"===T.type||"link"===T.type?"10px":"0px",")"),display:"flex",justifyContent:"center",alignItems:"center"}},"insight"===T.type||"link"===T.type?o.a.createElement(wt,{icon:R.a,size:"39px",color:"rgba(250,250,250,0.77)"}):o.a.createElement("img",{src:xo.a,style:{width:"25%"}}))),"swot"!==n.dataType.filter((function(e){return e.name===T.type}))[0].module&&(T._parent&&T._parent!==T._id||T._planId&&T._planId!==T._id)&&o.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",paddingTop:"7px"}},"SQUASH"===T.name&&console.log(T),n.cards[T._parent]?o.a.createElement(ho,{id:T._parent&&be.getState().db.cards[T._parent]?T._parent:T._planId&&be.getState().db.cards[T._planId]?T._planId:null,open:function(t){!function(t){var r=Dn(t);"plan"===n.cards[t].type?parseInt(r)>2||N.owner||N.plan&&(N.planAdmin||N.planModerate)?l.push("sp#".concat(t,"/dashboard")):parseInt(r)>0&&e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},be.getState().sideModule),{},{db:e.db,id:t,module:"timeline",activeModule:"timeline",data:T})):parseInt(r)>0&&e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},be.getState().sideModule),{},{db:"cards",id:t,module:"cardEdit",activeModule:"cardEdit",data:T}))}(t)},loading:I,showLegend:!e.Resume}):o.a.createElement(o.a.Fragment,null)),o.a.createElement("div",{style:!n.viewList||e.ignoreList?{}:{position:"relative",float:"left",width:"100%"}},(T._aspects&&T._aspects.length>0||T._aspects&&T._aspects.length>0)&&o.a.createElement(vo,{data:T._aspects,type:T.type}),!e.searchText&&T.description&&o.a.createElement(xt.a,{title:T.description||""},e.Resume?o.a.createElement("div",{className:t.description},T.description.substr(0,150),"..."):o.a.createElement("div",{className:t.description,style:{wordBreak:"break-word"},dangerouslySetInnerHTML:{__html:zt(T.description)}})),T.kpi_type&&!a.cards.hide.kpi&&o.a.createElement(ro,{data:T,chartShow:!a.cards.hide.kpiChart}),o.a.createElement(la.a,{max:100,className:t.indicators},(T._timelineCount&&T._timelineCount>0||i[T._id]&&Object.keys(i[T._id]).filter((function(e){return"comment"===i[T._id][e].type})).length>0)&&o.a.createElement(Sr,{className:t.indicatorsIcon,icon:"timeline",title:"$__timeline",size:"16px",onClick:function(){return!e.onlyOption&&D("timeline")},disabled:!0,count:i[T._id]&&Object.keys(i[T._id]).filter((function(e){return"comment"===i[T._id][e].type})).length>0?Object.keys(i[T._id]).filter((function(e){return"comment"===i[T._id][e].type})).length:T._timelineCount}),(T._logCount&&T._logCount>0||i[T._id]&&Object.keys(i[T._id]).filter((function(e){return"log"===i[T._id][e].type})).length>0)&&o.a.createElement(Sr,{className:t.indicatorsIcon,icon:"history",title:"$__log",size:"16px",onClick:function(){return!e.onlyOption&&D("log")},disabled:!0}),(T._kpiCount&&T._kpiCount>0||i[T._id]&&Object.keys(i[T._id]).filter((function(e){return"kpi"===i[T._id][e].type})).length>0)&&o.a.createElement(Sr,{className:t.indicatorsIcon,icon:"analytics",title:"$__kpi",size:"16px",onClick:function(){return!e.onlyOption&&D("kpi")},disabled:!0,count:i[T._id]&&Object.keys(i[T._id]).filter((function(e){return"kpi"===i[T._id][e].type})).length>0?Object.keys(i[T._id]).filter((function(e){return"kpi"===i[T._id][e].type})).length:T._kpiCount}),(T._timerCount&&T._timerCount>0||i[T._id]&&Object.keys(i[T._id]).filter((function(e){return"timer"===i[T._id][e].type})).length>0)&&o.a.createElement(Sr,{className:t.indicatorsIcon,icon:"timer",title:"$__timeSheet",size:"16px",onClick:function(){return!e.onlyOption&&D("timeLog")},disabled:!0,count:i[T._id]&&Object.keys(i[T._id]).filter((function(e){return"timer"===i[T._id][e].type})).length>0?Object.keys(i[T._id]).filter((function(e){return"timer"===i[T._id][e].type})).length:T._timerCount}),T&&T._id&&be.getState().db.cards&&Object.keys(be.getState().db.cards).length>0&&Object.keys(be.getState().db.cards).filter((function(e){return T&&T._id&&be.getState().db.cards[e]&&be.getState().db.cards[e].checklist&&be.getState().db.cards[e]._parent===T._id})).length>0&&o.a.createElement(Sr,{className:t.indicatorsIcon,icon:"checklist",title:"$__listOfTasks",size:"16px",onClick:function(){return!e.onlyOption&&S(!k)},disabled:!0,count:be.getState().db.cards&&Object.keys(be.getState().db.cards).length>0&&Object.keys(be.getState().db.cards).filter((function(e){return T&&T._id&&be.getState().db.cards[e]&&be.getState().db.cards[e].checklist&&be.getState().db.cards[e]._parent===T._id})).length}),!e.showChildrens&&Object.keys(b).length>0&&Object.keys(b).map((function(e,r){return"null"!==String(e)&&"undefined"!==String(e)?o.a.createElement(Sr,{key:r,className:t.indicatorsIcon,icon:n.dataType.filter((function(t){return t.name===e}))[0].icon,title:Dt("$__".concat(e),1),size:"16px",count:b[e],disabled:!0}):null}))),("link"===T.type||"insight"===T.type)&&o.a.createElement("div",{className:t.dates},o.a.createElement("div",{className:t.dateInfo},o.a.createElement(Sr,{className:t.dateIco,icon:"event_available",title:"$__pubDate",size:"14px",disabled:!0}),Fe()(1e3*T.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm")))))),(k||"link"!==T.type&&"insight"!==T.type&&"plan"!==T.type&&Object.keys(be.getState().db.cards).filter((function(e){return be.getState().db.cards[e]&&be.getState().db.cards[e].checklist&&be.getState().db.cards[e]._parent===T._id})).length>0)&&o.a.createElement("div",{style:{position:"relative",width:"calc(100%)",top:"16px",clear:"both",marginBottom:"16px"}},o.a.createElement("div",{style:{padding:"7px",backgroundColor:"rgba(0,0,0,0.05)",fontSize:"16px",borderTopLeftRadius:7,borderTopRightRadius:7}},Dt("$__checklist",1)),o.a.createElement(po,{nodeId:T._id,db:"cards",noDelete:!0,showProgress:!0}),o.a.createElement("div",{style:{clear:"both"}}))))})))),Eo=r(769),Oo=r.n(Eo),jo=r(770),ko=r.n(jo),So=r(435),Lo=r(298),Co=r(436),Io=r.n(Co),Fo=Object(De.a)((function(e){return{iconButtonStyle:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));function To(e){var t=Fo();return o.a.createElement(xt.a,{title:e.title?e.title:""},o.a.createElement(kt.a,{onClick:e.onClick?function(t){e.onClick()}:null,className:t.iconButtonStyle},o.a.createElement(wt,{usePropagation:!0,size:e.size?e.size:"20px",color:e.color?e.color:Mt("menu"),icon:e.icon?e.icon:"circle"})))}var No=r(1391),Po={control:{backgroundColor:"#fff",fontSize:14,fontFamily:"Roboto",fontWeight:"normal",lineHeight:"17px"},"&multiLine":{control:{fontFamily:"Roboto"},highlighter:{padding:9,border:"1px solid transparent",boxSizing:"border-box",overflow:"hidden",maxHeight:150},input:{padding:9,border:"1px solid silver",overflow:"auto",maxHeight:150,borderColor:"transparent"}},"&singleLine":{display:"inline-block",width:180,lineHeight:"17px",highlighter:{lineHeight:"17px",padding:1,border:"2px inset transparent"},input:Object(Oe.a)({border:"none",lineHeight:"17px",padding:1},"border","2px inset")},suggestions:{position:"absolute",list:{backgroundColor:"white",border:"1px solid rgba(0,0,0,0.15)",borderRadius:"7px 7px",boxShadow:"0 0 3px 5px rgba(0,0,0,0.05)",fontSize:14,zIndex:200,maxHeight:"151px !important",overflow:"auto !important"},item:{padding:"5px 15px",borderBottom:"1px solid rgba(0,0,0,0.15)","&focused":{backgroundColor:Mt("color")}},zIndex:500,bottom:"100%",top:"none",left:"33px",height:"auto",maxHeight:"151px !important",overflow:"auto !important"}},Ao=function(e){var t,r,n;return{root:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px"},rootRelative:{position:"relative",top:"0px",left:"0px",right:"0px",bottom:"0px"},content:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",overflowY:"auto",backgroundColor:"rgba(249,249,249,1)"},timeline:{listStyle:"none",padding:"0",position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",width:"100%","& .file-drop-target":{width:"100%",display:"flex",position:"absolute",bottom:"0px",left:"0px",right:"0px",height:"auto"}},scrollEnd:{marginTop:"160px",position:"relative",width:"100%",height:"0px",marginBottom:"-100px"},timelineSimple:{position:"relative",overflowX:"auto",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(Oe.a)(t,e.breakpoints.down("sm"),{left:"30px !important"}),Object(Oe.a)(t,"color","#FFF"),Object(Oe.a)(t,"width","30px"),Object(Oe.a)(t,"height","30px"),Object(Oe.a)(t,"lineHeight","25px"),Object(Oe.a)(t,"fontSize","12px"),Object(Oe.a)(t,"textAlign","center"),Object(Oe.a)(t,"position","absolute"),Object(Oe.a)(t,"bottom","23px"),Object(Oe.a)(t,"left","50%"),Object(Oe.a)(t,"marginLeft","-24px"),Object(Oe.a)(t,"zIndex","1"),Object(Oe.a)(t,"borderTopRightRadius","50%"),Object(Oe.a)(t,"borderTopLeftRadius","50%"),Object(Oe.a)(t,"borderBottomRightRadius","50%"),Object(Oe.a)(t,"borderBottomLeftRadius","50%"),Object(Oe.a)(t,"display","flex"),Object(Oe.a)(t,"alignItems","center"),Object(Oe.a)(t,"justifyContent","center"),t),timelineSimpleBadge:{left:"30px"},custom:{backgroundColor:Mt("color"),boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He("#000")+", 0.4)"},info:{backgroundColor:Qe[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Qe[0])+", 0.4)"},success:{backgroundColor:Ze[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Ze[0])+", 0.4)"},danger:{backgroundColor:Je[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Je[0])+", 0.4)"},warning:{backgroundColor:Ke[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Ke[0])+", 0.4)"},primary:{backgroundColor:Xe[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Xe[0])+", 0.4)"},badgeIcon:{width:"14px",height:"14px"},timelinePanel:(r={},Object(Oe.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(Oe.a)(r,"width","45%"),Object(Oe.a)(r,"float","left"),Object(Oe.a)(r,"padding","7px"),Object(Oe.a)(r,"marginBottom","5px"),Object(Oe.a)(r,"position","relative"),Object(Oe.a)(r,"boxShadow","0 1px 4px 0 rgba("+He("#000")+", 0.14)"),Object(Oe.a)(r,"borderRadius","6px"),Object(Oe.a)(r,"color","rgba("+He("#000")+", 0.87)"),Object(Oe.a)(r,"background","#FFF"),Object(Oe.a)(r,"&:before",{position:"absolute",bottom:"16px",right:"-15px",display:"inline-block",borderTop:"15px solid transparent",borderLeft:"15px solid "+tt[10],borderRight:"0 solid "+tt[10],borderBottom:"15px solid transparent",content:'" "'}),Object(Oe.a)(r,"&:after",{position:"absolute",bottom:"16px",right:"-14px",display:"inline-block",borderTop:"14px solid transparent",borderLeft:"14px solid #FFF",borderRight:"0 solid #FFF",borderBottom:"14px solid transparent",content:'" "'}),r),timelineSimplePanel:{width:"calc(100% - 60px)"},timelinePanelInverted:Object(Oe.a)({},e.breakpoints.up("sm"),{float:"right",backgroundColor:"#FFF","&: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:Mt("medium")},footerLine:{position:"relative",marginTop:"10px",marginBottom:"5px"},dropFile:{display:"none"},onDropFile:Object(Oe.a)({position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",zIndex:"5",display:"flex",alignItems:"center",justifyContent:"center",color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.77)"},"zIndex",11),editor:{position:"absolute",bottom:"0px",height:"auto",width:"calc(100% - 0px)",zIndex:10},editorRelative:{position:"relative",bottom:"0px",minHeight:"50px",height:"auto",width:"calc(100% - 0px)",zIndex:10},files:{display:"inline-table",position:"absolute",backgroundColor:"rgba(250,250,250,0.95)",width:"100%",bottom:0},textEditor:{zIndex:100},textEditorIcon:{cursor:"pointer",color:Mt("color")},progressBar:{backgroundColor:"".concat(Mt("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(Mt("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Mt("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(h.a)(Object(h.a)({},qe),{},{"& textarea":Object(h.a)(Object(h.a)({},qe),{},{padding:"7px",borderRadius:"7px",fontSize:"16px",width:"calc(100% - 14px)",minHeight:"38px",border:"solid 1px rgba(0,0,0,0.1)"}),"& .sugestions":{top:"none !important",bottom:"40px",border:"solid 10px red"},"& textarea::placeholder":{color:"rgba(0,0,0,0.2)"}}),mentionWrapper:{width:"100%",background:"transparent",fontSize:"0.9rem",color:" #a9b5c4","&&.mentionWrapper__control":{borderRadius:"25px",border:"1px solid #3a546f",minHeight:"45px","&& .mentionWrapper__highlighter":{padding:"0.7rem 1rem"},"&& .mentionWrapper__input":(n={padding:"0.7rem 1rem",outline:0,border:0,resize:"none"},Object(Oe.a)(n,"outline","none"),Object(Oe.a)(n,"fontSize","0.9rem"),Object(Oe.a)(n,"color","#7288a3"),Object(Oe.a)(n,"borderColor"," #3a546f"),Object(Oe.a)(n,"overflow","hidden"),Object(Oe.a)(n,"&& :: placeholder",{color:"#7288a3"}),n)}}}},Do=r(1390),zo=["children","className"],Mo=Object(De.a)({grid:{margin:"0",width:"100%"}});function Bo(e){var t=Mo(),r=e.children,n=e.className,a=Object(Re.a)(e,zo);return o.a.createElement(Do.a,Object.assign({container:!0},a,{className:t.grid+" "+n}),r)}var $o=["children","className"],Yo=Object(De.a)({grid:{padding:"0 15px !important"}});function Ro(e){var t=Yo(),r=e.children,n=e.className,a=Object(Re.a)(e,$o);return o.a.createElement(Do.a,Object.assign({item:!0},a,{className:t.grid+" "+n}),r)}function Go(){Go=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Ho=Object(_e.b)((function(){return{}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Ao)((function(e){var t=be.getState(),r=t.db,n=t.session,a=e.classes,i=o.a.useState(!1),c=Object(je.a)(i,2),l=c[0],s=c[1],u=o.a.useState(""),d=Object(je.a)(u,2),p=d[0],f=d[1],m=o.a.useState(!1),g=Object(je.a)(m,2),y=g[0],v=g[1],b=o.a.useState(!1),x=Object(je.a)(b,2),_=x[0],w=x[1],E=o.a.useState([]),O=Object(je.a)(E,2),j=O[0],k=O[1],S=o.a.useState([]),L=Object(je.a)(S,2),C=L[0],I=L[1],F=o.a.useState({}),T=Object(je.a)(F,2),N=T[0],P=T[1],A=o.a.useState(null),D=Object(je.a)(A,2),z=D[0],M=D[1],B=o.a.useState(null),$=Object(je.a)(B,2),Y=$[0],R=$[1],G=o.a.useState(!1),H=Object(je.a)(G,2),W=H[0],U=H[1],V=o.a.useState([]),q=Object(je.a)(V,2),X=q[0],J=q[1],Z=o.a.useState(!1),Q=Object(je.a)(Z,2),ee=Q[0],te=Q[1],re=o.a.useState(!1),ne=Object(je.a)(re,2),ae=(ne[0],ne[1],o.a.createRef()),oe=Ut(),ie=0;n._id&&r.cards[e.nodeId]&&r.cards[e.nodeId]._users&&r.cards[e.nodeId]._users[Object.keys(r.cards[e.nodeId]._users).find((function(e){return e.indexOf(n._id)>-1}))]&&(ie=r.cards[e.nodeId]._users[Object.keys(r.cards[e.nodeId]._users).find((function(e){return e.indexOf(n._id)>-1}))]);var ce=window.location.hash.split("/");ce[0]=ce[0].replace("#",""),o.a.useEffect((function(){l||s(!0)}),[]);var le=function(){var e=Object(Ee.a)(Go().mark((function e(){return Go().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),se=function(){var e,t=[];if(e=p){var r=e.split("@[");r.length>0&&r.map((function(e){if(e){var r=e.split("](")[1];r&&(r=r.split(")")[0])&&36===r.length&&t.push(r)}}))}return t},ue=function(){var t=Object(Ee.a)(Go().mark((function t(){var a,o,i,c;return Go().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:a=be.getState().functions.socket,te(!1),j.length>0&&v(!0),o=[],i=se(),r.cards[e.nodeId]&&"chatGroup"!==r.cards[e.nodeId].type&&r.cards[e.nodeId]._users&&Object.keys(r.cards[e.nodeId]._users).length>0&&Object.keys(r.cards[e.nodeId]._users).filter((function(e){return e!==n._id&&-1===i.indexOf(e)})).map((function(e){o.push(e)})),c={_id:Object(pn.a)(),idRel:e.nodeId,replyData:e.replyData?e.replyData:{},reply:e.replyData?e.replyData._id:null,message:p,type:"comment",mentions:se(),notifyUsers:o,filesCount:j.length>0?j.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"},f(""),Y&&(c=Object(h.a)(Object(h.a)({},c),{},{urlPreview:JSON.stringify(Y)}),R(null)),Xa(e,Object(h.a)(Object(h.a)({},c),{},{user:Object(h.a)({},r.users[n._id]),files:{}})),a.emit("data",{module:"timeline",method:"post",action:"add"},c,(function(t){if(t._id){var n=Object(h.a)(Object(h.a)({},t.comment),{},{_parent:e.nodeId,_client:r.cards[e.nodeId]&&r.cards[e.nodeId].client?r.cards[e.nodeId].client:null});j.length>0?fe({comment:n,dataMessage:c}):(e.onSending&&e.onSending(),Y&&(n=Object(h.a)(Object(h.a)({},n),{},{urlPreview:JSON.stringify(Y)})),i.map(function(){var t=Object(Ee.a)(Go().mark((function t(n){return Go().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r.cards[e.nodeId]||r.cards[e.nodeId]._users&&(!r.cards[e.nodeId]._users||r.cards[e.nodeId]._users[n])){t.next=3;break}return t.next=3,_a(e,n,2,e.nodeId);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),I([]),k([]),J([]),R(null),U(!1),v(!1),e.onSending&&e.onSending(),a.emit("timeline.COMMENT",{node:e.nodeId,comment:n,db:e.db?e.db:"cards"},(function(e){})))}}));case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),de=function(){var e=Object(Ee.a)(Go().mark((function e(t,r){var n;return Go().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Math.round(100*t.loaded/t.total),P(Object(h.a)(Object(h.a)({},N),{},Object(Oe.a)({},r,n)));case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),pe=function(){var e=Object(Ee.a)(Go().mark((function e(t,r){return Go().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:M({options:t,fi:r}),P({});case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),fe=function(){var t=Object(Ee.a)(Go().mark((function t(r){var n,a,o,i,c,l=arguments;return Go().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=l.length>1&&void 0!==l[1]?l[1]:0,a=l.length>2&&void 0!==l[2]?l[2]:[],o=be.getState().functions.socket,i=r.comment,(c=Array.from(j)).map(function(){var t=Object(Ee.a)(Go().mark((function t(l,s){var u,d;return Go().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s!==n){t.next=5;break}return t.next=3,tn(i._id,l,!0,{onUploadProgress:function(e){return de(e,s)},onUploadError:function(e){pe(r,s)}});case 3:(u=t.sent)&&((d=Array.from(a)).push(u),I(d),c.length>n+1?fe(r,n+1,d):c.length===n+1&&(i.files=d,o.emit("timeline.COMMENT",{node:e.nodeId,comment:i,db:e.db?e.db:"cards"},(function(e){})),I([]),k([]),R(null),U(!1),v(!1),e.onSending&&e.onSending()));case 5:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}());case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),he=function(){var e=Object(Ee.a)(Go().mark((function e(t){return Go().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:k([].concat(Object(K.a)(j),Object(K.a)(Object.keys(t).map((function(e){return t[e]}))))),w(!1);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),me=function(){var e=Object(Ee.a)(Go().mark((function e(t){var r,n,a,o,i;return Go().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=be.getState().functions.socket,f(t),!t||!(t.indexOf("http://")>-1||t.indexOf("https://")>-1)){e.next=10;break}return n="",a=[],t.indexOf(" ")>-1?a=t.split(" "):t.indexOf("\n")>-1?a=t.split("\n"):a.push(t),o=new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i"),e.next=9,a.map((function(e){(e.indexOf("http://")>-1||e.indexOf("https://")>-1)&&o.test(e)&&(n=e)}));case 9:if(!Y&&n&&-1===X.indexOf(n)||n&&Y&&-1===X.indexOf(n)&&Y.link!==n){if(U(!0),-1===t.indexOf("youtube.com/watch?"))try{r.emit("data",{module:"link",method:"post",action:"exist"},{idRel:ce[0],url:n},(function(e){e&&e.title&&e.img&&e.contentSnippet?R(e):(U(!1),U(!1))}))}catch(c){U(!1),(i=X).push(n),J(i),console.log(c)}t.indexOf("youtube.com/watch?")>-1&&U(!1)}case 10:t.indexOf("youtube.com/watch?");case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ge=[];return r.cards[e.nodeId]&&r.cards[e.nodeId]._users&&Object.keys(r.cards[e.nodeId]._users).map((function(t){if(t&&null!==t&&void 0!==t&&t!==n._id&&r.cards[e.nodeId]._users[t].name&&r.users[t]&&!r.users[t].deleted){var a=r.cards[e.nodeId]._users[t]._id,o=r.cards[e.nodeId]._users[t].name?r.cards[e.nodeId]._users[t].name:r.cards[e.nodeId]._users[t].name.split(" ").length>0?r.cards[e.nodeId]._users[t].name.split(" ")[0]:r.cards[e.nodeId]._users[t].name;a&&0===Object.keys(ge).filter((function(e){return ge[e].id===a})).length&&ge.push({id:a,display:o})}})),(oe&&(oe.owner||oe.planAdmin||oe.planModerate)||ie&&ie.access&&parseInt(ie.access)>3)&&Object.keys(r.users).filter((function(t){return!(r.users[t].deleted||"client"===r.users[t].type||"group"===r.users[t].type||"account"===r.users[t].type||!(r.cards[e.nodeId]&&r.cards[e.nodeId].client&&(!r.users[t]._parent||r.users[t]._parent===r.cards[e.nodeId].client)||r.cards[e.nodeId]&&!r.cards[e.nodeId].client&&r.cards[e.nodeId]._planId&&r.cards[r.cards[e.nodeId]._planId]&&r.cards[r.cards[e.nodeId]._planId].client&&(!r.users[t]._parent||r.users[t]._parent===r.cards[r.cards[e.nodeId]._planId].client)||r.cards[e.nodeId]&&!r.cards[e.nodeId].client&&!r.users[t]._parent))})).map((function(t){t&&null!==t&&void 0!==t&&t!==n._id&&0===Object.keys(ge).filter((function(e){if(ge[e].id===t)return!0})).length&&ge.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})})),o.a.createElement(So.FileDrop,{ref:ae,className:e.relative?a.rootRelative:a.root,onDragOver:function(){!e.disabledSend&&w(!0)},onDrop:he,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"},o.a.createElement(o.a.Fragment,null,e.nodeId&&!e.disabledSend?o.a.createElement("div",{className:e.relative?a.editorRelative:a.editor,style:e.editorStyle?e.editorStyle:{}},o.a.createElement("div",{className:a.files,style:{paddingBottom:"80px"}},o.a.createElement(Bo,null,j&&j.length>0&&j.map((function(e,t){var n=e.name.split("."),i="attachment";return r.fileExtensions.filter((function(e){return e.ext.indexOf(n[n.length-1].toLowerCase())>-1})).length>0&&(i=r.fileExtensions.filter((function(e){return e.ext.indexOf(n[n.length-1].toLowerCase())>-1}))[0].icon||URL.createObjectURL(e)),o.a.createElement(Ro,{key:t,xl:4,lg:4,md:4,sm:12,xs:12},o.a.createElement("div",{style:{position:"relative",padding:7}},o.a.createElement("div",{style:{position:"relative",float:"left",width:"50px",height:"50px",marginRight:"7px",overflow:"hidden"}},"string"===typeof i&&-1===i.indexOf("blob:")&&-1===i.indexOf("svg")?o.a.createElement(wt,{icon:i,size:"50px"}):o.a.createElement("img",{src:i,style:{width:"100%",height:"100%"}})),o.a.createElement("div",null,e.name,C&&C.length>0&&C[t]?o.a.createElement(wt,{icon:"cloud_done",color:"green"}):y?o.a.createElement(o.a.Fragment,null):o.a.createElement(wt,{icon:"delete_forever",color:"red",onClick:function(){return function(e){var t=Array.from(j);t.splice(e,1),k(t)}(t)}})),z&&z.fi===t?o.a.createElement(Ct,{title:Dt("$__uploadFiles",1),text:Dt("$__fileSendErrorClickToReSend"),color:"red",icon:"upload",onClick:function(){fe({comment:z.options.comment},z.fi,C),M(null)},size:"25px"}):N&&String(N[t])&&N[t]<100?o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{minWidth:177}},o.a.createElement(Ya.a,{variant:"buffer",className:a.progressBar,value:N[t]<90?N[t]:90,valueBuffer:N[t]})),o.a.createElement("div",{style:{color:Mt("color"),fontSize:10,marginLeft:15}},N[t]<90?N[t]:90,"%"))):o.a.createElement(o.a.Fragment,null)))})))),o.a.createElement("div",{className:a.textEditor},W&&!Y&&o.a.createElement("div",{className:a.urlPreview,style:{width:"100%",height:"150px"}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement("div",{style:{marginLeft:"7px",width:"200px",height:"110px",maxWidth:"50%"}},o.a.createElement(No.a,{variant:"rect",style:{width:"200px",height:"110px",maxWidth:"100%"}})),o.a.createElement("div",{style:{marginLeft:"7px",width:"100%",height:"25px"}},o.a.createElement(No.a,{variant:"text",height:25,style:{marginBottom:"7px"}}),o.a.createElement(No.a,{variant:"text",height:10}),o.a.createElement(No.a,{variant:"text",height:10}),o.a.createElement(No.a,{variant:"text",height:10}),o.a.createElement(No.a,{variant:"text",height:10}),o.a.createElement(No.a,{variant:"text",height:10}),o.a.createElement(No.a,{variant:"text",height:10})))),Y&&o.a.createElement(Bo,{style:{marginBottom:15,backgroundColor:"#FFFFFF",padding:7}},o.a.createElement("div",{style:{position:"absolute",right:"20px"}},o.a.createElement(Ct,{title:Dt("$__removePreview"),color:"red",icon:"delete_forever",size:"14px",onClick:function(){R(null),U(!1)}})),Y.img&&o.a.createElement(Ro,{xs:12,sm:6,md:4,lg:3,xl:2},o.a.createElement("img",{style:{width:"-webkit-fill-available"},src:"".concat(Y.img?Y.img:Nr.a),alt:Y.title||Y.link})),o.a.createElement(Ro,{xs:12,sm:6,md:8,lg:9,xl:10},o.a.createElement("div",{style:{fontSize:"14px",color:Mt("menu"),fontWeight:"bold"}},Y.title),Y.site&&o.a.createElement("div",{style:{fontSize:"12px"}},Y.site),Y.contentSnippet&&o.a.createElement("div",{style:{fontSize:"12px",color:"gray"}},Y.contentSnippet),o.a.createElement("a",{style:{marginTop:"15px",fontWeight:"bold",fontSize:"12px"},href:Y.link,target:"_blank"},Dt("$__openLink","*")))),z?o.a.createElement("div",{style:{position:"relative",height:"60px",backgroundColor:"#ffffff",width:"100%",padding:15,textAlign:"center",display:"flex",justifyContent:"center"}},o.a.createElement(Ct,{title:Dt("$__fileSendErrorClickToReSend",1),text:Dt("$__fileSendErrorClickToReSend"),color:"red",icon:"upload",onClick:function(){fe({comment:z.options.comment},z.fi,C),M(null)},size:"25px"})):y?o.a.createElement("div",{style:{position:"relative",height:"60px",backgroundColor:"#ffffff",width:"100%",padding:15}},Dt("$__sending",1),o.a.createElement(Ya.a,{className:a.progressBar})):o.a.createElement("div",{style:{position:"relative",height:"auto",backgroundColor:"#ffffff",borderRadius:"7px",borderColor:"rgba(0,0,0,0.05)",boxShadow:"0 3px 3px 3px rgba(0,0,0,0.033)",display:"flex",alignItems:"center",padding:"3px 0px 4px 0px"}},o.a.createElement(Lo.b,{value:p.trim().length>0?p:"",onChange:function(e){me(e.target.value),le()},onPaste:function(e){he(e.clipboardData.files)},placeholder:Dt("$__writeMessage"),style:Object(h.a)(Object(h.a)({},Po),{},{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():p.length>0&&p.trim()&&p.trim().length>0?ue():f(""))},autoFocus:!0,placement:"top",forceSuggestionsAboveCursor:!0,autosize:{minRows:1,maxRows:6}},o.a.createElement(Lo.a,{trigger:"@",data:ge,renderSuggestion:function(t,n,a){var i=r.users[t.id]?r.users[t.id]:t;if(t&&t.id)return o.a.createElement("div",{style:{display:"flex",alignItems:"center",position:"relative"}},o.a.createElement(Fr.a,{style:{position:"relative",width:"25px",height:"25px",marginRight:"7px"},alt:a,src: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}),o.a.createElement("div",null,o.a.createElement("div",null,a),i&&i._parent&&be.getState().db.users[i._parent]&&be.getState().db.users[i._parent].name?o.a.createElement("div",{style:{fontSize:11,color:"lightgray",marginTop:-3}},be.getState().db.users[i._parent].name):o.a.createElement(o.a.Fragment,null)),i&&i._parent&&be.getState().db.users[i._parent]&&be.getState().db.users[i._parent].image?o.a.createElement("div",{style:{position:"absolute",bottom:4,right:-7,width:15,height:15,borderRadius:"50%",backgroundImage:"url(".concat(be.getState().db.users[i._parent].image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):o.a.createElement(o.a.Fragment,null))},style:{backgroundColor:Mt("color",.5),lineHeight:"17px",borderRadius:"7px",padding:"3px 2px",marginLeft:"-4px",fontWeight:"bold"}})),o.a.createElement("div",{style:{position:"absolute",right:"0px",bottom:"0px",cursor:"pointer",zIndex:100,display:"flex",alignItems:"center"}},o.a.createElement(To,{title:Dt("$__emojis",1),icon:ee?"highlight_off":"sentiment_very_satisfied",color:Mt("medium"),onClick:function(){te(!ee)}}),!y&&o.a.createElement("div",{className:a.actionButton},o.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 he(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"}),o.a.createElement(wt,{icon:"attachment",color:Mt("medium"),size:"22px"})),!y&&(p.trim().length>0||j.length>0)&&o.a.createElement(To,{title:Dt("$__pressENTERtoSendorClickHere",1),icon:"send",color:Mt("menu"),onClick:function(){return ue()}}),e.closeOption&&o.a.createElement(wt,{title:Dt("$__pressCRTL+ENTERtoSend",1),icon:"close",color:Mt("color"),onClick:function(){return e.onClose()}}),ee&&o.a.createElement("div",{style:{position:"absolute",bottom:"44px",right:"40px",zIndex:100}},o.a.createElement(Io.a,{onEmojiClick:function(e,t){f("".concat(p," ").concat(t.emoji))},groupVisibility:{recently_used:!1}})))))):o.a.createElement("div",{className:e.relative?a.editorRelative:a.editor,style:{backgroundColor:"rgba(230,230,230,1)"}},Dt("$__avaiableForViewingOnly")),o.a.createElement("div",{className:_?a.onDropFile:a.dropFile,onDragLeave:function(){!e.disabledSend&&w(!1)}},Dt("$__dropTheFileToAttach","*"))))}))),Wo={header:Object(h.a)(Object(h.a)({},qe),{},{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:Mt("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Mt("color"),fontWeight:"500",alignItems:"center"}}};function Uo(){Uo=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Vo=Object(De.a)(Wo);var qo=Object(_e.b)((function(e,t){return{}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState(),r=t.session,n=t.functions.socket,a=Vo(),i=o.a.useState(!1),c=Object(je.a)(i,2),l=c[0],s=c[1],u=o.a.useState(!1),d=Object(je.a)(u,2),p=d[0],f=d[1],m=o.a.useState(e.title?e.title.trim():null),g=Object(je.a)(m,2),y=g[0],v=g[1],b=o.a.useState(!1),x=Object(je.a)(b,2),_=x[0],w=x[1],E=o.a.useState(!1),O=Object(je.a)(E,2),j=O[0],k=O[1],S=e.customButtons&&e.customButtons.filter((function(e){return!1!==e}));o.a.useEffect((function(){l||(!e.title&&e.editable&&w(!0),s(!0))}));var L=function(){var t=Object(Ee.a)(Uo().mark((function t(){return Uo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:try{e._id&&n.emit("data",{module:"node",method:"put",action:"update",noLog:!0},{_id:e._id,name:y}),e.onEdit&&e.onEdit(y,e._id?e._id:null)}catch(r){console.log(r)}w(!1);case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return o.a.createElement("div",{className:a.header,style:Object(h.a)({minHeight:"30px",display:"flex",alignItems:"center"},e.style),onMouseEnter:function(){return f(!0)},onMouseLeave:function(){j||f(!1)}},o.a.createElement("div",{className:a.content},o.a.createElement("div",{className:a.info},e.icon&&o.a.createElement("div",{className:a.headerIcon,style:{color:e.color?e.color:Mt("color")}},o.a.createElement(Sr,{size:"calc(".concat(e.fontSize," + 4px)")||!1,icon:e.icon,color:"parent",title:e.iconTitle?e.iconTitle.substring(0,1).toUpperCase().concat(e.iconTitle.substring(1)):""})),e.searchText?o.a.createElement("div",{style:{marginLeft:"7px"}},Ht(e.title?e.title:"",e.searchText)):o.a.createElement("div",{className:a.headerTitle,style:{fontSize:e.fontSize?e.fontSize:"16px",color:e.color?e.color:Mt("color"),paddingRight:"7px",marginLeft:e.icon?"7px":"none"},onDoubleClick:function(){e.onEdit&&e.editable&&(v(e.title?e.title.trim():""),w(!0))}},_?o.a.createElement("div",{style:{position:"relative",float:"left",width:"90%",paddingTop:"7px"}},o.a.createElement(Qn,{label:Dt("$__nameOfCard",1),variant:Mt("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){v(e.target.value)},onKeyDown:function(t){13===t.keyCode&&y&&L(),27===t.keyCode&&(w(!1),v(e.title?e.title.trim():""))}},value:y,placeholder:Dt("$__titleOfCard_placeholder",1),autoFocus:!e.noAutoFocus,multiline:!!e.multiline})):o.a.createElement(xt.a,{title:e.tooltipText?e.tooltipText:e.title?e.title:""},o.a.createElement("div",{style:Object(h.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?Dt(e.title,1):e.title?function(e){var t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}(e.title):""))))),e.periodFilter&&r&&r.period&&o.a.createElement("div",{style:{display:"flex",whiteSpace:"nowrap",marginRight:7}},Dt(r.period),o.a.createElement(Jn,{style:{color:Mt("menu"),height:"20px",width:"20px"}})),o.a.createElement("div",{className:a.actionButtons,style:Object(h.a)({},e.actionButtonsStyle?e.actionButtonsStyle:{})},(_||e.onSave)&&o.a.createElement(Ct,{title:Dt("$__save",1),color:"green",icon:"save",onClick:function(){_?e.noCancel?y&&L():L():e.onSave()},size:e.actionsSize||"25px",transparent:!0}),(_||e.onCancel)&&o.a.createElement(Ct,{title:Dt("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){_?e.noCancel?y&&w(!1):w(!1):e.onCancel()},size:e.actionsSize||"25px",transparent:!0}),!_&&e.timelineMessage&&p&&o.a.createElement("div",{className:a.button,style:{opacity:p?"1":"0"}},o.a.createElement(Sr,{onClick:function(){return k(!0)},icon:"add_comment",size:"20px",tooltipprops:j?{open:j,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,PopperProps:{disablePortal:!0},interactive:!0}:{},title:j?o.a.createElement("div",{style:{position:"relative",minWidth:"220px"}},o.a.createElement(Ho,{nodeId:e._id,onSending:function(){f(!1),k(!1)},onClose:function(){k(!1),f(!1)},relative:!0,closeOption:!0})):"$__addComment"})),!_&&S&&S.map((function(e,t){return e&&e.component?e.component:e&&!1!==e&&null!==e&&(p||"hover"!==e.show)&&o.a.createElement("div",Object.assign({key:t,className:a.button},e.provided),o.a.createElement(Ct,{title:e.title?Dt(e.title,1):Dt(e.name,1),color:Mt(e.color||"lightgrey"),icon:e.icon,onClick:function(t){e.onClick&&e.onClick(t)},onMouseLeave:function(){j||f(!1)},onClose:e.onClose?function(){e.onClose&&e.onClose(),f(!1)}:null,size:e.actionsSize||"16px",transparent:!0,badgeContent:e.count?e.count:null}))})),e.children)))})),Xo=r(1392),Ko=(r(979),function(){return{root:{},viewer:{alignItems:"center",justifyContent:"center",display:"flex"},image:{width:"100%",backgroundColor:"rgba(60,60,60)",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%",backgroundColor:"rgba(60,60,60,0.1)",padding:"15px","&:hover":{backgroundColor:"rgba(60,60,60,0.3)"}},cropper:{overflow:"hidden","& .cropper-container":{width:"100% !important",overflow:"hidden !important"}},circleCropper:{overflow:"hidden","& .cropper-container":{width:"100% !important",overflow:"hidden !important"},"& .cropper-view-box":{borderRadius:"50%"}}}});function Jo(){Jo=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Zo=o.a.createRef(null);var Qo=Object(_e.b)((function(e){return{store:e}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Ko)((function(e){var t=o.a.useState(null),r=Object(je.a)(t,2),n=r[0],a=r[1],i=o.a.useState(!1),c=Object(je.a)(i,2),l=c[0],s=c[1],u=o.a.useState(null),d=Object(je.a)(u,2),p=d[0],f=d[1],h=o.a.useState([]),m=Object(je.a)(h,2),g=m[0],y=m[1],v=o.a.useRef(null),b=e.classes;o.a.useEffect((function(){x()}),[]),o.a.useEffect((function(){x()}),[e.files]);var x=function(){var t=g;e.files&&(Object.keys(e.files).map((function(r){0===t.filter((function(e){return e._id===r})).length&&t.push(e.files[r])})),y(t))},_=function(){var t=Object(Ee.a)(Jo().mark((function t(r){var n,o,i,c,l,u;return Jo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Zo.current.getCroppedCanvas().toDataURL(),a(n),f(null),s(!1),o=v.current.files[0].name,i=v.current.files[0].type,t.next=8,w(n,o,i);case 8:return c=t.sent,{maxSizeMB:.5,maxWidthOrHeight:e.maxWidthOrHeight?e.maxWidthOrHeight:600,useWebWorker:!0},t.prev=10,l=new Promise((function(t){return ko.a.imageFileResizer(c,e.maxWidthOrHeight?e.maxWidthOrHeight:600,e.maxWidthOrHeight?e.maxWidthOrHeight:600,c.type.replace("image/",""),50,0,(function(e){t(w(e,o,i))}))})),t.next=14,l.then((function(e){return e}));case 14:(u=t.sent)&&e.onChange&&e.onChange(n,u),t.next=21;break;case 18:t.prev=18,t.t0=t.catch(10),console.log(t.t0);case 21:case"end":return t.stop()}}),t,null,[[10,18]])})));return function(e){return t.apply(this,arguments)}}(),w=function(e,t,r){return fetch(e).then((function(e){return e.arrayBuffer()})).then((function(e){return new File([e],t,{type:r})}))};return o.a.createElement("div",{className:b.root},o.a.createElement("div",{className:b.viewer},!n&&!e.img&&e.avatar&&e.avatarIcon&&o.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",marginTop:"15px"}},o.a.createElement("div",{style:{width:"133px",height:"133px",top:"-4px",left:"-13px",borderRadius:"50%",border:"solid 2px ".concat(Mt("color")),zIndex:"5 !important",background:Mt("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},o.a.createElement(wt,{size:"40px",color:"rgba(250,250,250,0.77)"},e.avatarIcon))),e.avatar||!n&&!e.img?e.avatar&&(n||e.img)?o.a.createElement("div",{style:{width:"133px",height:"133px",top:"-4px",left:"-13px",borderRadius:"50%",border:"solid 2px ".concat(Mt("color")),zIndex:"5 !important",background:Mt("AvatarBackground"),backgroundImage:'url("'.concat(n||e.img,'")'),backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"cover",display:"flex",alignItems:"center",justifyContent:"center"}}):o.a.createElement(o.a.Fragment,null):o.a.createElement("img",{className:e.avatar?b.avatarImage:b.image,src:"".concat(n||e.img),style:{cursor:"pointer"},onError:function(t){return t.target.src=n||e.img},width:"100%",alt:"",onClick:function(){!function(){if(g&&g.length>0){var t=g.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})}}()}})),o.a.createElement("div",null,e.onChange?o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{padding:"7px"},onClick:function(){v.current.click()}},o.a.createElement(Ir,{text:Dt(n||e.img?"$__changeImage":"$__addImage",1),icon:n||e.img?"image":"add_a_photo",textColor:"color",iconColor:"color"})),o.a.createElement("input",{type:"file",onChange:function(e){!function(e){s(!0);var t=new FileReader;if(null!=e.files[0]){var r=e.files[0];t.onloadend=function(){f(t.result),s(!0)},t.readAsDataURL(r)}else s(!1)}(e.target)},ref:v,id:"file-picker",name:"image",accept:".jpg,.jpeg,.png,.gif",style:{display:"none"}})):o.a.createElement(o.a.Fragment,null)),o.a.createElement(Xo.a,{fullWidth:!0,onClose:function(){return s(!1)},"aria-labelledby":"simple-dialog-title",open:l},o.a.createElement("div",{style:{position:"relative",marginLeft:"10px",width:"calc(100% - 10px)",height:"45px"}},o.a.createElement(qo,{title:Dt("$__cropImage",1),icon:"crop",onSave:function(){_()},onCancel:function(){s(!1)},actionButtonsStyle:{top:0}})),o.a.createElement(Oo.a,{className:e.avatar?b.circleCropper:b.cropper,ref:Zo,src:p||null,style:{height:"50vh",width:"100%",margin:"auto",padding:"0px"},aspectRatio:e.ignoreAspect?null:e.aspectRatio?e.aspectRatio:e.avatar?1:16/9,guides:!0,viewMode:2})))})));function ei(){ei=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var ti,ri=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(za)((function(e){e.classes;var t=be.getState(),r=t.db,n=(t.session,t.timeline,t.functions,o.a.useState({})),a=Object(je.a)(n,2),i=a[0],c=a[1];o.a.useEffect((function(){c(Object(h.a)(Object(h.a)(Object(h.a)({},e.toTemplate&&r.cards[e.cardId].name?{name:"".concat(Dt("$__template")," - ").concat(r.cards[e.cardId].name)}:{}),e.toTemplate&&r.cards[e.cardId].description?{description:r.cards[e.cardId].description}:{}),e.toTemplate&&r.cards[e.cardId].image?{image:r.cards[e.cardId].image}:{}))}),[]);var s=o.a.useState({}),u=Object(je.a)(s,2),d=u[0],p=u[1],f=o.a.useState(0),m=Object(je.a)(f,2),g=m[0],y=m[1],v=be.getState().db.cards[e.cardId]&&be.getState().db.cards[e.cardId].type?r.dataType.filter((function(t){return t.name===be.getState().db.cards[e.cardId].type}))[0]:{},b=function(){var t=Object(Ee.a)(ei().mark((function t(){var n,a;return ei().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!i||i.name){t.next=4;break}p(Object(h.a)(Object(h.a)({},d),{},{name:!0})),t.next=15;break;case 4:return y(1),t.prev=5,n=Object(h.a)(Object(h.a)(Object(h.a)({},r.cards[e.cardId]),i),{},{templateId:r.cards[e.cardId]._id,created_at:null,isTemplate:!!e.toTemplate||null,order:null,updated_at:null,_id:null,_planId:null}),t.next=9,hn(e,!0,n);case 9:(a=t.sent)&&a._id&&(y(2),setTimeout((function(){x(a._id)}),1500)),t.next=15;break;case 13:t.prev=13,t.t0=t.catch(5);case 15:case"end":return t.stop()}}),t,null,[[5,13]])})));return function(){return t.apply(this,arguments)}}(),x=function(){var t=Object(Ee.a)(ei().mark((function t(r){return ei().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Mn(e,e.cardId,r);case 3:t.sent&&(y(3),setTimeout((function(){_(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)}}(),_=function(){var t=Object(Ee.a)(ei().mark((function t(r){var n,a;return ei().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ln(e,{idRel:[r],cardLoad:"plans"});case 2:return n=t.sent,t.next=5,ln(e,{idRel:[r],cardLoad:"plans",completed:!0});case 5:a=t.sent,n&&a&&(y(4),setTimeout((function(){e.onComplete&&e.onComplete(),e.toTemplate?l.push("sp#tab/templates"):l.push("sp#".concat(r,"/dashboard"))}),500));case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return g>0?o.a.createElement(Yr.a,{style:{padding:"7px"}},o.a.createElement(ra,{title:"".concat(i.name?i.name:r.cards[e.cardId].name," "),icon:v&&v.icon?v.icon:"help",iconTitle:"$__".concat(r.cards[e.cardId].type),color:Mt("medium"),fontSize:"16px"}),1===g&&o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",clear:"both"}},o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Dt("$__installingTemplate")),o.a.createElement(Ga,null)),2===g&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex"}},o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Dt("$__templateInstalled")),o.a.createElement(wt,{icon:"done_all",color:"green"})),o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginTop:"15px"}},o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Dt("$__copyingData")),o.a.createElement(Ga,null))),3===g&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex"}},o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Dt("$__templateInstalled")),o.a.createElement(wt,{icon:"done_all",color:"green"})),o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex",marginTop:"15px"}},o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Dt("$__copiedData")),o.a.createElement(wt,{icon:"done_all",color:"green"})),o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginTop:"15px"}},o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Dt("$__preparingToRedirect")),o.a.createElement(Ga,null))),4===g&&o.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center"}},o.a.createElement("div",{style:{position:"relative",float:"left",padding:"15px",display:"flex",justifyContent:"center",borderRadius:"50%",border:"solid 1px green"}},o.a.createElement(wt,{icon:"done_all",color:"green",size:"50px"}))),o.a.createElement("div",{style:{clear:"both"}})):o.a.createElement(Yr.a,{style:{padding:"7px"}},o.a.createElement(ra,{title:"".concat(Dt("$__template",1),": ").concat(r.cards[e.cardId].name),icon:v&&v.icon?v.icon:"help",iconTitle:"$__".concat(r.cards[e.cardId].type),color:Mt("medium"),fontSize:"16px"}),o.a.createElement("div",null,o.a.createElement(Qo,{img:e.toTemplate&&r.cards[e.cardId].image?r.cards[e.cardId].image:null,onChange:function(e,t){c(Object(h.a)(Object(h.a)({},i),{},{image:e,file:t}))},placeholder:""}),o.a.createElement(Qn,{error:d&&d.name,helperText:Dt("$__youMustDefineAName"),label:"".concat(Dt("$__customName",1)),variant:Mt("fieldVariant"),name:"name",defaultValue:e.toTemplate&&r.cards[e.cardId].name?"".concat(Dt("$__template")," - ").concat(r.cards[e.cardId].name):null,InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:o.a.createElement(Fa.a,{position:"start"},o.a.createElement(wt,{icon:"view_headline"})),onChange:function(e){c(Object(h.a)(Object(h.a)({},i),{},{name:e.target.value})),d&&d.name&&p(Object(h.a)(Object(h.a)({},d),{},{name:!1}))}},placeholder:Dt(e.toTemplate?"$__templateName_placeholder":"$__planName_placeholder",1)}),o.a.createElement(Qn,{label:"".concat(Dt("$__customDescription",1)),variant:Mt("fieldVariant"),name:"description",defaultValue:e.toTemplate&&r.cards[e.cardId].description?r.cards[e.cardId].description:null,InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:o.a.createElement(Fa.a,{position:"start"},o.a.createElement(wt,{icon:"toc"})),onChange:function(e){c(Object(h.a)(Object(h.a)({},i),{},{description:e.target.value}))}},placeholder:Dt(e.toTemplate?"$__templateDescription_placeholder":"$__planDescription_placeholder",1),multiline:!0})),o.a.createElement("div",{style:{position:"relative",width:"100%",clear:"both",padding:"7px",backgroundColor:"#4caf50",marginTop:"7px",cursor:"pointer"},onClick:function(e){b(),e.stopPropagation()}},o.a.createElement(Ir,{text:Dt("$__ready","*"),icon:"done_all",iconColor:"#FFFFFF",textColor:"#FFFFFF"})),o.a.createElement("div",{style:{position:"relative",width:"100%",clear:"both",padding:"7px",backgroundColor:"lightgrey",cursor:"pointer"},onClick:function(t){e.onComplete(),t.stopPropagation()}},o.a.createElement(Ir,{text:Dt("$__cancel","*"),icon:"close",iconColor:"#FFFFFF",textColor:"#FFFFFF",onClick:e.onComplete?function(){e.onComplete()}:null})))})));function ni(){ni=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var ai=Object(De.a)(za),oi=Ae.b.div(ti||(ti=Object(we.a)(["\n minWidth:200px;\n background-color:#fff;\n marginBottom:7px;\n\n ","\n ","\n ","\n ","\n ","\n width:calc(100%) !important;\n\n ","\n ","\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.selected?"border-bottom:solid 5px ".concat(Mt("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(Mt("menu")," !important;"):""})),ii=Object(_e.b)((function(e){return{cardsExpanded:e.db.cardsExpanded,showPrivate:e.controls.showPrivate,cards:e.db.cards}}),(function(e){return Object(s.b)(n,e)}))(Object(a.memo)((function e(t){var r,n=ai(),a=be.getState(),i=a.db,c=a.session,s=a.functions.socket,u=o.a.useState(null),d=Object(je.a)(u,2),p=d[0],f=d[1],m=o.a.useState(!1),g=Object(je.a)(m,2),y=g[0],v=g[1],b=o.a.useState(!1),x=Object(je.a)(b,2),_=x[0],w=x[1],E=o.a.useState(!1),O=Object(je.a)(E,2),j=O[0],k=O[1],S=o.a.useState(!1),L=Object(je.a)(S,2),C=L[0],I=L[1];if(o.a.useEffect((function(){return f(be.getState().db.cards[t.data._id]),function(){f({})}}),[t.data]),!p)return o.a.createElement(o.a.Fragment,null);var F=Ut(),T=Dn(p._id),N=window.location.hash.split("/");if(N[0]=N[0].replace("#",""),!p||!t.data||!t.data._id)return null;var P=function(){var e=Object(Ee.a)(ni().mark((function e(){var r,n,a;return ni().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r={},Object.keys(i.cards).filter((function(e){return i.cards[e]&&!i.cards[e].deleted&&(i.cards[e]._planId===N[0]||i.cards[e]._parent===N[0])})).map((function(e){r=Object(h.a)(Object(h.a)({},r),{},Object(Oe.a)({},e,i.cards[e]))})),n=Object(h.a)({},be.getState().db.cards),a=!p._selected,"swot"!==i.dataType.filter((function(e){return e.name===p.type}))[0].module&&Object.keys(r).filter((function(e){return r[e]._id!==p._id&&r[e].type&&r[e].type===p.type})).map((function(e){r[e]._selected&&(r[e]._selected=!1)})),p.type.indexOf("guideline")>-1&&Object.keys(r).map((function(e){r[e]._selected&&(r[e]._selected=!1)})),p.type.indexOf("objective")>-1&&Object.keys(r).filter((function(e){return"goal"===r[e].type})).map((function(e){r[e]._selected&&(r[e]._selected=!1)})),t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)(Object(h.a)({},n),r),{},Object(Oe.a)({},p._id,Object(h.a)(Object(h.a)(Object(h.a)({},be.getState().db.cards[p._id]),r[p._id]),{},{_selected:a})))})),"swot"===be.getState().db.dataType.filter((function(e){return e.name===p.type}))[0].module&&vn(t),a&&"matrix"===be.getState().db.dataType.filter((function(e){return e.name===p.type}))[0].module&&kn(t,p._id);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),A=function(){var e=Object(Ee.a)(ni().mark((function e(){var r,n=arguments;return ni().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(h.a)(Object(h.a)({},be.getState().sideModule),{},{db:t.db,id:p._id,module:"cardEdit",activeModule:r,data:p}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),D=function(){var e=Object(Ee.a)(ni().mark((function e(){var r;return ni().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qr.post("/Card_Count",{id:p._id});case 2:r=e.sent,parseInt(r.data)>0?$t({message:Dt("$__concludeWithChildrensNotConcludedConfirm",1),autoClose:5e4,buttons:[{shadow:!0,title:Dt("$__concludeAll"),text:Dt("$__concludeAll"),color:"green",icon:"close",size:"25px",onClick:function(){$n(Object(h.a)(Object(h.a)({},t),{},{data:{_id:p._id}}),{status:"completed"===p.status?"inProgress":"completed"}),r&&parseInt(r.data)>0&&Rn(t,p._id,"completed"===p.status?"inProgress":"completed")},style:{marginLeft:15}},{shadow:!0,title:Dt("$__cancel"),text:Dt("$__cancel"),color:"red",icon:"close",size:"25px",onClick:function(){},style:{marginLeft:15}}],variant:"warning",persist:!1,horizontal:"right"}):($n(Object(h.a)(Object(h.a)({},t),{},{data:{_id:p._id}}),{status:"completed"===p.status?"inProgress":"completed"}),r&&parseInt(r.data)>0&&Rn(t,p._id,"completed"===p.status?"inProgress":"completed"));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),z=function(){var e=Object(Ee.a)(ni().mark((function e(t){return ni().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:parseInt(T)>2||F.owner||F.plan&&(F.planAdmin||F.planModerate)?l.push("sp#".concat(t,"/dashboard")):A("timeline");case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),M=function(){var e=Object(Ee.a)(ni().mark((function e(){return ni().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:$t({message:Dt("$__confirmDeleteThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){En(t,{_id:p._id},!1),t.directDeletion||t.reduxFunction("ASYNC","CLEAR_MODULE")}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),B=function(){var e=Object(Ee.a)(ni().mark((function e(){return ni().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:$t({message:Dt("$__confirmRestoreThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){wn(t,{_id:p._id})}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),$=Object.keys(be.getState().db.cards).filter((function(e){return be.getState().db.cards[e]&&!0===be.getState().db.cards[e]._selected&&be.getState().db.cards[e].type&&be.getState().db.cards[e].type.indexOf("guideline")>-1})).length>0,Y=y||!t.notGlobalExpanded&&!!(t.expanded||p._expanded||t.cardsExpanded),R=t.cardColorPicker?function e(t,r){var n=t.color||null,a=!(!t.color||!r);if(t._parent&&be.getState().db.cards[t._parent]){var o=e(be.getState().db.cards[t._parent],!0);if(o.color)return o}return{parent:a,color:n}}(p):{},G=!!(F&&(F.owner||F.plan&&(F.planAdmin||F.planModerate))||T>2),H={button:!1,date:null};H=p&&p._users&&Object.keys(p._users).filter((function(e){return e===c._id})).length>0&&i.dataType.filter((function(e){return e.name===p.type})).length>0&&i.dataType.filter((function(e){return e.name===p.type}))[0].modules.indexOf("myDay")>-1?p._users[Object.keys(p._users).filter((function(e){return e===c._id}))[0]].myDay?{button:!0,date:p._users[Object.keys(p._users).filter((function(e){return e===c._id}))[0]].myDay}:{button:!0,date:null}:{button:!1,date:null};var W={},U={};return Object.keys(be.getState().db.cards).map((function(e){p&&p._id&&i.dataType&&!be.getState().db.cards[e].deleted&&be.getState().db.cards[e].type&&be.getState().db.cards[e]._parent===p._id&&("swot"!==p.type&&i.dataType.filter((function(t){return t.name===be.getState().db.cards[e].type&&!be.getState().db.cards[e].checklist})).length>0&&i.dataType.filter((function(t){return t.name===be.getState().db.cards[e].type}))[0].module&&"swot"!==i.dataType.filter((function(t){return t.name===be.getState().db.cards[e].type}))[0].module?(W[be.getState().db.cards[e].type]=null==W[be.getState().db.cards[e].type]?1:W[be.getState().db.cards[e].type]+1,U[be.getState().db.cards[e].type]=null==U[be.getState().db.cards[e].type]?1:U[be.getState().db.cards[e].type]+1):("plan"===p.type&&(W.swot=null==W.swot?1:W.swot+1),U[be.getState().db.cards[e].type]=null==U[be.getState().db.cards[e].type]?1:U[be.getState().db.cards[e].type]+1))})),p&&p.private&&(!p._users||p._users&&!p._users[c._id])?o.a.createElement(o.a.Fragment,null):_?o.a.createElement(ri,{cardId:p._id,toTemplate:!p.isTemplate,onComplete:function(){w(!1)}}):o.a.createElement(oi,Object.assign({},t.provided&&t.provided.draggableProps,t.provided&&t.provided.dragHandleProps,t.key?{key:t.key}:{},{ref:t.provided&&t.provided.innerRef,isDragging:t.snapshot&&t.snapshot.isDragging,isDragDisable:p.isDragDisable||t.isDragDisable||!1,inLine:t.inLine,className:t.noShadow?n.containerNoShadow:n.container,selectable:t.showSelected,selected:p._selected,priority:p.priority&&i.priority.filter((function(e){return String(e.value)===String(p.priority)})).length>0?i.priority.filter((function(e){return String(e.value)===String(p.priority)}))[0].color:null,locked:t.locked||!1,snapshot:t.snapshot||null,isCombining:!(!t.snapshot||!t.snapshot.combineTargetFor),onMouseOver:function(){k(!0)},onMouseLeave:function(){setTimeout((function(){k(!1)}),100)},onClick:function(e){t.selectable||!t.onClick&&(!t.locked&&t.showSelected&&$||t.selectable)?P():!t.onClick||t.selectable||t.locked?t.locked||t.onlyOption||"plan"!==p.type?t.locked||A():z(p._id):t.onClick()},onContextMenu:function(e){}}),("completed"===p.status||t.cardColorPicker&&R.color)&&o.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",cursor:"pointer"}},o.a.createElement("div",{style:{position:"absolute",backgroundColor:t.cardColorPicker&&R.color?R.color:"rgba(0,0,0,1)",opacity:R.color?.2:.1,top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",cursor:"pointer"}})),o.a.createElement(o.a.Fragment,null,t.snapshot&&t.snapshot.combineTargetFor&&o.a.createElement("div",{style:{backgroundColor:Mt("menu"),padding:"7px 3px",color:"#FFFFFF",fontWeight:"bold",textAlign:"center"}},Dt("$__dropHereToLink")),("insight"===p.type||"link"===p.type)&&p._createdBy&&i.users[p._createdBy]&&o.a.createElement("div",{style:{width:"calc(100% - 0px)",alignItems:"center",padding:"7px",display:"inline-flex",borderBottom:"solid 1px rgba(0,0,0,0.03)"}},o.a.createElement("div",{style:{position:"relative",float:"left"}},o.a.createElement(xt.a,{title:i.users[p._createdBy].name},o.a.createElement(Fr.a,{alt:i.users[p._createdBy].name,src:i.users[p._createdBy].image||null},i.users[p._createdBy].name.substr(0,1)))),o.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(100% - 70px)",flexDirection:"column",paddingLeft:"7px"}},o.a.createElement("div",{style:{color:Mt("menu"),fontWeight:"bold",fontSize:"16px"}},i.users[p._createdBy].displayName?i.users[p._createdBy].displayName:i.users[p._createdBy].name.split(" ")[0]),o.a.createElement("div",null,Fe()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===Fe()(1e3*p.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(Fe()(1e3*p.created_at).tz("America/Sao_Paulo").format("H:mm")):Fe()(new Date).tz("America/Sao_Paulo").format("YYYY")===Fe()(1e3*p.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(Fe()(1e3*p.created_at).tz("America/Sao_Paulo").format("DD/MM H:mm")):"".concat(Fe()(1e3*p.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm")))),o.a.createElement("div",{style:{width:"24px",float:"right"}},o.a.createElement(wt,{icon:p.type&&i&&i.dataType&&i.dataType.filter((function(e){return e.name===p.type}))[0]&&i.dataType.filter((function(e){return e.name===p.type}))[0].icon||"$__topic"}))),o.a.createElement(ra,{private:p.private,setPrivate:function(e){I(e),t.setPrivate&&t.setPrivate(e)},viewAllName:t.viewAllName,title:"".concat(p.name?p.name:Dt("$__new",1)," "),searchText:t.searchText?t.searchText:null,icon:p.type&&i&&i.dataType&&i.dataType.filter((function(e){return e.name===p.type}))[0]&&i.dataType.filter((function(e){return e.name===p.type}))[0].icon||"$__topic",iconTitle:"$__".concat(p.type),color:Mt("medium"),editable:!(p.name||t.onlyOption&&!t.editable),_id:p._id,locked:!("link"!==p.type&&!t.locked),colorPicker:G&&t.cardColorPicker&&R&&!R.parent?function(e){(!R.color&&e||R.color&&R.color!==e)&&t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},p._id,Object(h.a)(Object(h.a)({},be.getState().db.cards[p._id]),{},{color:e})))}))}:null,onEdit:"completed"!==p.status&&T&&parseInt(T)>1||F&&F.plan&&(F.owner||F.planAdmin||F.planEdit||F.planModerate)?function(e){t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},p._id,Object(h.a)(Object(h.a)({},be.getState().db.cards[p._id]),{},{name:e})))})),s.emit("card.UPD",Object(Oe.a)({},p._id,Object(h.a)(Object(h.a)({},be.getState().db.cards[p._id]),{},{name:e})))}:null,moreButton:!p.deleted&&j,options:t.onlyOption||t.showSelected||t.locked?[]:[p.url&&{name:"$__openLinkinNewTab",icon:"launch",onClick:function(){window.open(p.url,"_blank")}},!p.archived&&!p.isTemplate&&"plan"===p.type&&{name:p._isFavorite?"$__removeFromFavorite":"$__addToFavorite",icon:p._isFavorite?"favorite":"favorite_border",color:Mt("medium"),onClick:function(){var e=Object(Ee.a)(ni().mark((function e(){return ni().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Vt(t,p._id,!!p._isFavorite),t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},p._id,Object(h.a)(Object(h.a)({},be.getState().db.cards[p._id]),{},{_isFavorite:!p._isFavorite})))}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},!p.archived&&"completed"!==p.status&&H&&H.button&&{name:Fe()(new Date(1e3*H.date)).format("YYYY/MM/DD")===Fe()().format("YYYY/MM/DD")?"$__removeOfMyDate":"$__addOnMyDay",icon:Fe()(new Date(1e3*H.date)).format("YYYY/MM/DD")===Fe()().format("YYYY/MM/DD")?"auto_delete":"alarm_add",color:Fe()(new Date(1e3*H.date)).format("YYYY/MM/DD")===Fe()().format("YYYY/MM/DD")?"red":"lightblue",show:"hover",onClick:function(){var e=!(H&&H.date&&(!H||!H.date||Fe()(new Date(1e3*H.date)).format("YYYY/MM/DD")===Fe()().format("YYYY/MM/DD")));Ln(t,{_id:p._id,userId:c._id,option:e}),t.myDayClick&&t.myDayClick()}},!p.archived&&!t.onlyOption&&(T&&parseInt(T)>1||F.owner||F.planAdmin||F.planEdit||F.planModerate)&&{name:"$__edit",icon:"edit",onClick:function(){t.onAction&&t.onAction(),A()},show:"hover"},!p.archived&&!p.isTemplate&&p._users&&"completed"!==p.status&&p._users[c._id]&&(!p._kpiTimer||0===Object.keys(p._kpiTimer).length||p._kpiTimer&&Object.keys(p._kpiTimer).length>0&&0===Object.keys(p._kpiTimer).filter((function(e){return c&&c._id&&e&&p._kpiTimer[e]&&p._kpiTimer[e].userId&&p._kpiTimer[e].userId===c._id})).length)&&{name:"$__timerStart",icon:"play_circle_outline",color:"blue",show:"hover",onClick:function(){$t({message:Dt("$__confirmStartTimer",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){mn(t,p._id),!(H&&H.date&&(!H||!H.date||Fe()(new Date(1e3*H.date)).format("YYYY/MM/DD")===Fe()().format("YYYY/MM/DD")))&&Ln(t,{_id:p._id,userId:c._id,option:!0}),t.myDayClick&&t.myDayClick()}})}},p._users&&"completed"!==p.status&&p._users[c._id]&&{name:"$__complete",icon:"check_circle",color:"green",show:"hover",onClick:function(){var e=Object(Ee.a)(ni().mark((function e(){return ni().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:D();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},!p.archived&&!t.onlyOption&&(t.selectOption||t.viewButton)&&(p.type.indexOf("guideline")>-1||p.type.indexOf("objective")>-1||p.type.indexOf("goal")>-1)&&{name:p._selected?"$__removeSelection":"$__selectThis",icon:p._selected?"visibility_off":"visibility",hide:!0,onClick:function(){P()}},!p.isTemplate&&"plan"===p.type&&{name:"$__copyToTemplates",icon:"copy_all",onClick:function(){w(!0)}},p&&!p.isTemplate&&"plan"===p.type&&!p.archived&&(p._users&&p._users[c._id]&&p._users[c._id].access&&5===parseInt(p._users[c._id].access)||F&&F.planAdmin)&&{name:Dt("$__shelve"),icon:"archive",onClick:function(){xn(t,{_id:p._id,archived:!0})}},(T&&5===parseInt(T)||F.owner||F.planAdmin||F.planEdit)&&!t.disableDelete&&{name:"$__delete",icon:"delete_forever",color:"red",onClick:function(){t.directDeletion||p.archived||0===i.dataType.filter((function(e){return e.name===p.type})).length||i.dataType.filter((function(e){return e.name===p.type})).length>0&&"swot"===i.dataType.filter((function(e){return e.name===p.type}))[0].module?M():A("delete"),t.onAction&&t.onAction()},show:"hover"},p&&!p.isTemplate&&"plan"===p.type&&p.archived&&(p._users&&p._users[c._id]&&p._users[c._id].access&&parseInt(5===p._users[c._id])||F&&F.planAdmin)&&{name:Dt("$__unarchive"),icon:"archive",onClick:function(){xn(t,{_id:p._id,archived:null})}},!p.isTemplate&&!p.archived&&(t.my||t.showCompleteOption)&&{name:"$__completed"!==p.status?"$__markasdone":"$__concluded",icon:"check_circle_outline",color:"completed"!==p.status?"lightgray":"green",onClick:function(){var e=Object(Ee.a)(ni().mark((function e(){return ni().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:D();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}],isExpanded:Y,onExpanding:t.expanded||be.getState().db.cardsExpanded?null:function(){return v((function(e){return!e}))},onClick:function(e){}}),p._kpiTimer&&Object.keys(p._kpiTimer).length>0&&0!==Object.keys(p._kpiTimer).filter((function(e){return p._kpiTimer[e].userId===c._id})).length&&o.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"},onClick:function(e){e.stopPropagation()}},o.a.createElement(La,{data:p})),Y&&(!p.private||p.private&&(C||be.getState().controls.showPrivate))?o.a.createElement(o.a.Fragment,null,o.a.createElement(wo,Object.assign({},t,{private:!!p.private,expanded:!0,onClick:function(e){}})),(t.resume&&t.showChildrens||Y)&&Object.keys(U).length>0&&o.a.createElement(la.a,{max:100,className:n.indicators,style:{flexFlow:"wrap"}},Object.keys(U).map((function(e,r){return"null"!==String(e)&&"undefined"!==String(e)?o.a.createElement(Sr,{key:"".concat(r,"_").concat(e),className:n.indicatorsIcon,icon:i.dataType.filter((function(t){return t.name===e}))[0].icon,title:Dt("$__".concat(e),1),size:"16px",count:W[e],disabled:!0,onClick:t.onClickChildrens?function(){t.onClickChildrens(e)}:null}):null}))),o.a.createElement("div",null,t.searchText&&p.description&&o.a.createElement("div",{className:n.description},Ht(p.description,t.searchText)),(p.startDate&&Fe()(p.startDate).isValid()||p.endDate&&Fe()(p.endDate).isValid()||!p.isTemplate&&Y&&p&&p._users&&Object.keys(p._users).length>0)&&o.a.createElement("div",{style:Object(h.a)({position:"relative",display:"flex",width:"100%"},Y?{height:"45px"}:{})},o.a.createElement("div",{className:p.endDate&&Fe()(new Date(1e3*p.endDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")<Fe()().format("YYYY-MM-DD")?n.lateDates:n.dates},p.startDate&&Fe()(p.startDate).isValid()&&o.a.createElement("div",{className:n.dateInfo},o.a.createElement(Sr,{className:n.dateIco,icon:"insert_invitation",title:"$__startDate",size:"14px",disabled:!0}),new Date(1e3*p.startDate)instanceof Date&&!isNaN(new Date(1e3*p.startDate))?Fe()(new Date(1e3*p.startDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):Fe()(p.startDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")),p.endDate&&Fe()(p.endDate).isValid()&&o.a.createElement("div",{className:n.dateInfo},o.a.createElement(Sr,{className:n.dateIco,icon:"event_available",title:"$__endDate",size:"14px",disabled:!0}),new Date(1e3*p.endDate)instanceof Date&&!isNaN(new Date(1e3*p.endDate))?Fe()(new Date(1e3*p.endDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):Fe()(p.endDate).tz("America/Sao_Paulo").format("DD/MM/YYYY"))),!p.isTemplate&&Y&&p&&p._users&&Object.keys(p._users).length>0&&o.a.createElement("div",{className:n.usersContent},o.a.createElement("div",{className:n.users},o.a.createElement(Da,{data:p,permission:G,transparent:!0,myDay:!0})))))):Y?o.a.createElement(o.a.Fragment,null,o.a.createElement(Ma,null)):o.a.createElement(o.a.Fragment,null),o.a.createElement(Ur,{options:p._tags,expanded:!(!Y||"plan"===p.type||"link"===p.type||"insight"===p.type)})),o.a.createElement("div",{style:{clear:"both"}}),p.isTemplate&&o.a.createElement("div",{style:{position:"relative",width:"100%",clear:"both",padding:"7px",backgroundColor:Mt("menu"),marginTop:"7px",cursor:"pointer"},onClick:function(e){e.stopPropagation(),w(!0)}},o.a.createElement(Ir,{text:Dt("$__useThisTemplate","*"),icon:"auto_awesome",iconColor:"#FFFFFF",textColor:"#FFFFFF"})),p._recurrenceId&&o.a.createElement("div",{style:{position:"absolute",bottom:"0px",right:"0px",display:"flex",fontSize:"11px",color:"lightgrey",alignItems:"center"}},p.recurrenceCreatedDate?Fe()(p.recurrenceCreatedDate).format("DD/MM/YYYY"):"",o.a.createElement(Sr,{className:n.indicatorsIcon,icon:"history",color:"lightgrey",size:"25px",title:t.noShowRecurrenceCard?"".concat(Dt("$__recurrence")).concat(p.recurrenceCreatedDate?": ".concat(Fe()(p.recurrenceCreatedDate).format("DD/MM/YYYY")):""):o.a.createElement("div",{style:{maxWidth:"280px"}},Dt("$__recurrentActivityFrom"),":",o.a.createElement(e,(r={db:"cards",data:i.cards[p._recurrenceId]},Object(Oe.a)(r,"db","cards"),Object(Oe.a)(r,"Avatar",!0),Object(Oe.a)(r,"ignoreList",!0),Object(Oe.a)(r,"onlyOption",!0),r)))})),!j&&"completed"===p.status&&p.completed_at&&p.completed_at.low&&o.a.createElement("div",{style:{backgroundColor:"rgba(0,0,0,0.4)",position:"absolute",height:"2px",left:0,right:0,top:"20px"}},o.a.createElement("div",{style:{position:"absolute",right:0,bottom:-12,color:"#FFF",fontSize:10,padding:3,backgroundColor:"rgba(0,0,0,0.66)"}},Dt("$__completeDate"),":",Kt(p.completed_at))),p.deleted?o.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",cursor:"pointer"}},o.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"}},o.a.createElement(Ct,{title:Dt("$__restoreThis",1),text:Dt("$__restoreThis",1),color:"#FFFFFF",icon:"restore_from_trash",onClick:function(){B()},size:"17px",textSize:"17px",transparent:!0}))):o.a.createElement(o.a.Fragment,null))}))),ci=Object(bt.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}}}}))(St.a),li=Object(De.a)((function(e){return{root:{display:"flex","& > *":{margin:e.spacing(1)}}}}));function si(e){var t=li();return o.a.createElement("div",{className:t.root},o.a.createElement(ci,{overlap:"circular",anchorOrigin:e.anchorOrigin?e.anchorOrigin:{vertical:"bottom",horizontal:"left"},variant:e.variant},e.children))}var ui=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",overflowX:"auto",marginTop:"0px",padding:"0 0 80px",width:"-webkit-fill-available","&:before":{left:"15px"}},timelineSimpleWithHeader:{position:"relative",overflowX:"auto",marginTop:"60px",padding:"0 0 80px",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:"#FFF",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:"#FFF",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:Mt("color"),boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He("#000")+", 0.4)"},info:{backgroundColor:Qe[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Qe[0])+", 0.4)"},success:{backgroundColor:Ze[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Ze[0])+", 0.4)"},danger:{backgroundColor:Je[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Je[0])+", 0.4)"},warning:{backgroundColor:Ke[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Ke[0])+", 0.4)"},primary:{backgroundColor:Xe[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Xe[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("+He("#000")+", 0.14)",borderRadius:"6px",color:"rgba("+He("#000")+", 0.87)",background:Mt("timelineMyMessage")},timelinePanelInverted:{maxWidth:"calc(100% - 70px)",float:"left",padding:"7px",marginLeft:"40px",marginBottom:"5px",position:"relative",boxShadow:"0 1px 4px 0 rgba("+He("#000")+", 0.14)",borderRadius:"6px",color:"rgba("+He("#000")+", 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:Mt("medium"),padding:"0 7px"},footerLine:{position:"relative",marginTop:"10px",marginBottom:"5px"},dropFile:{display:"none"},onDropFile:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",alignItems:"center",justifyContent:"center",color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.77)",zIndex:1},editor:Object(Oe.a)({position:"absolute",bottom:"0px",padding:"10px",height:"auto",width:"calc(100% - 0px)",zIndex:10},"padding","7px"),files:{display:"inline-table",position:"relative"},textEditorIcon:{cursor:"pointer",color:Mt("color")},progressBar:{backgroundColor:"".concat(Mt("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(Mt("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Mt("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"}}}},di=r(475),pi=r.n(di),fi=r(476),hi=r.n(fi),mi=r(477),gi=r.n(mi),yi=r(771),vi=r.n(yi),bi=r(478),xi=r.n(bi),_i=r(1393),wi=function(e){return{popperClose:{pointerEvents:"none",display:"none !important"},popperNav:Object(Oe.a)({},e.breakpoints.down("sm"),{position:"static !important",left:"unset !important",top:"unset !important",transform:"none !important",willChange:"unset !important","& > div":{boxShadow:"none !important",marginLeft:"0rem",marginRight:"0rem",transition:"none !important",marginTop:"0px !important",marginBottom:"0px !important",padding:"0px !important",backgroundColor:"transparent !important","& ul li":{color:"#FFF !important",margin:"10px 15px 0!important",padding:"10px 15px !important","&:hover":{backgroundColor:"hsla(0,0%,78%,.2)",boxShadow:"none"}}}}),manager:{"& > div > button:first-child > span:first-child, & > div > a:first-child > span:first-child":{width:"100%"}},innerManager:{"& > div > button,& > div > a":{margin:"0px !important",color:"inherit !important",padding:"10px 20px !important","& > span:first-child":{width:"100%",justifyContent:"flex-start"}}},target:{"& > button:first-child > span:first-child, & > a:first-child > span:first-child":{display:"inline-block"},"& $caret":{marginLeft:"0px"}},dropdown:{borderRadius:"3px",border:"0",boxShadow:"0 2px 5px 0 rgba("+He("#000")+", 0.26)",top:"100%",zIndex:"1000",minWidth:"160px",padding:"5px 0",margin:"2px 0 0",fontSize:"12px",textAlign:"left",listStyle:"none",backgroundColor:"#FFF",backgroundClip:"padding-box"},menuList:{padding:"0"},popperResponsive:Object(Oe.a)({zIndex:"1200"},e.breakpoints.down("sm"),{zIndex:"1640",position:"static",float:"none",width:"auto",marginTop:"0",backgroundColor:"transparent",border:"0",boxShadow:"none",color:"black"}),dropdownItem:Object(h.a)(Object(h.a)({},qe),{},{fontSize:"13px",padding:"10px 20px",margin:"0 5px",borderRadius:"2px",position:"relative",transition:"all 150ms linear",display:"block",clear:"both",fontWeight:"400",height:"100%",color:tt[7],whiteSpace:"nowrap",minHeight:"unset"}),darkHover:{"&:hover":{boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(tt[16])+", 0.4)",backgroundColor:tt[16],color:"#FFF"}},primaryHover:{"&:hover":Object(h.a)({backgroundColor:Xe[0],color:"#FFF"},nt)},infoHover:{"&:hover":Object(h.a)({backgroundColor:Qe[0],color:"#FFF"},at)},successHover:{"&:hover":Object(h.a)({backgroundColor:Ze[0],color:"#FFF"},ot)},warningHover:{"&:hover":Object(h.a)({backgroundColor:Ke[0],color:"#FFF"},it)},dangerHover:{"&:hover":Object(h.a)({backgroundColor:Je[0],color:"#FFF"},ct)},roseHover:{"&:hover":Object(h.a)({backgroundColor:et[0],color:"#FFF"},lt)},dropdownItemRTL:{textAlign:"right"},dropdownDividerItem:{margin:"5px 0",backgroundColor:"rgba("+He("#000")+", 0.12)",height:"1px",overflow:"hidden"},buttonIcon:{width:"20px",height:"20px"},caret:{transition:"all 150ms ease-in",display:"inline-block",width:"0",height:"0",marginLeft:"4px",verticalAlign:"middle",borderTop:"4px solid",borderRight:"4px solid transparent",borderLeft:"4px solid transparent"},caretActive:{transform:"rotate(180deg)"},caretDropup:{transform:"rotate(180deg)"},caretRTL:{marginRight:"4px"},dropdownHeader:{display:"block",padding:"0.1875rem 1.25rem",fontSize:"0.75rem",lineHeight:"1.428571",color:tt[1],whiteSpace:"nowrap",fontWeight:"inherit",marginTop:"10px",minHeight:"unset","&:hover,&:focus":{backgroundColor:"transparent",cursor:"auto"}},noLiPadding:{padding:"0"}}},Ei=Object(De.a)(wi);function Oi(e){var t,r,n,a=o.a.useState(null),i=Object(je.a)(a,2),c=i[0],l=i[1],s=Ei(),u=function(e){c.contains(e.target)||l(null)},d=function(t){l(null),e&&e.onClick&&e.onClick(t)},p=e.buttonText,f=e.buttonIcon,h=e.dropdownList,m=e.buttonProps,g=e.dropup,y=e.dropdownHeader,v=e.caret,b=e.hoverColor,x=e.dropPlacement,_=e.rtlActive,w=e.noLiPadding,E=e.innerDropDown,O=e.navDropdown,j=Ce()((t={},Object(Oe.a)(t,s.caret,!0),Object(Oe.a)(t,s.caretDropup,g&&!c),Object(Oe.a)(t,s.caretActive,Boolean(c)&&!g),Object(Oe.a)(t,s.caretRTL,_),t)),k=Ce()((r={},Object(Oe.a)(r,s.dropdownItem,!0),Object(Oe.a)(r,s[b+"Hover"],!0),Object(Oe.a)(r,s.noLiPadding,w),Object(Oe.a)(r,s.dropdownItemRTL,_),r)),S=o.a.createElement(qr.a,{role:"menu",className:s.menuList},void 0!==y?o.a.createElement(Vr.a,{onClick:function(){return d(y)},className:s.dropdownHeader},y):null,h.map((function(e,t){return e.divider?o.a.createElement(_i.a,{key:t,onClick:function(){return d("divider")},className:s.dropdownDividerItem}):void 0!==e.props&&"multi"===e.props["data-ref"]?o.a.createElement(Vr.a,{key:t,className:k,style:{overflow:"visible",padding:0}},e):o.a.createElement(Vr.a,{key:t,onClick:function(){return d(e)},className:k},e)})));return o.a.createElement("div",{className:E?s.innerManager:s.manager},o.a.createElement("div",{className:void 0!==p?"":s.target},o.a.createElement(er,Object.assign({"aria-label":"Notifications","aria-owns":c?"menu-list":null,"aria-haspopup":"true"},m,{onClick:function(e){c&&c.contains(e.target)?l(null):l(e.currentTarget)}}),void 0!==f?o.a.createElement(e.buttonIcon,{className:s.buttonIcon}):null,void 0!==p?p:null,v?o.a.createElement("b",{className:j}):null)),o.a.createElement(Rr.a,{open:Boolean(c),anchorEl:c,transition:!0,disablePortal:!0,placement:x,className:Ce()((n={},Object(Oe.a)(n,s.popperClose,!c),Object(Oe.a)(n,s.popperResponsive,!0),Object(Oe.a)(n,s.popperNav,Boolean(c)&&O),n))},(function(){return o.a.createElement($r.a,{in:Boolean(c),id:"menu-list",style:g?{transformOrigin:"0 100% 0"}:{transformOrigin:"0 0 0"}},o.a.createElement(Yr.a,{className:s.dropdown},E?S:o.a.createElement(Br.a,{onClickAway:u},S)))})))}Oi.defaultProps={caret:!0,dropup:!1,hoverColor:"primary"};pi.a,hi.a,gi.a,xi.a,pi.a,hi.a,gi.a,xi.a;var ji=[{inverted:!0,badgeColor:"danger",badgeIcon:pi.a,title:"Some Title",titleColor:"danger",body:o.a.createElement("p",null,"Wifey made the best Father","'","s Day meal ever. So thankful so happy so blessed. Thank you for making my family We just had fun with the \u201cfuture\u201d theme !!! It was a fun night all together ... The always rude Kanye Show at 2am Sold Out Famous viewing @ Figueroa and 12th in downtown."),footerTitle:"11 hours ago via Twitter"},{badgeColor:"success",badgeIcon:hi.a,title:"Another One",titleColor:"success",body:o.a.createElement("p",null,"Thank God for the support of my wife and real friends. I also wanted to point out that it\u2019s the first album to go number 1 off of streaming!!! I love you Ellen and also my number one design rule of anything I do from shoes to music to homes is that Kim has to like it....")},{inverted:!0,badgeColor:"info",badgeIcon:gi.a,title:"Another Title",titleColor:"info",body:o.a.createElement("div",null,o.a.createElement("p",null,"Called I Miss the Old Kanye That\u2019s all it was Kanye And I love you like Kanye loves Kanye Famous viewing @ Figueroa and 12th in downtown LA 11:10PM"),o.a.createElement("p",null,"What if Kanye made a song about Kanye Roy\xe8re doesn","'","t make a Polar bear bed but the Polar bear couch is my favorite piece of furniture we own It wasn\u2019t any Kanyes Set on his goals Kanye")),footer:o.a.createElement(Oi,{buttonIcon:xi.a,buttonProps:{round:!0,style:{marginBottom:"0"},color:"info"},dropdownList:["Action","Another action","Something else here",{divider:!0},"Separated link"]})},{badgeColor:"warning",badgeIcon:vi.a,title:"Another One",titleColor:"warning",body:o.a.createElement("p",null,"Tune into Big Boy","'","s 92.3 I","'","m about to play the first single from Cruel Winter also to Kim\u2019s hair and makeup Lorraine jewelry and the whole style squad at Balmain and the Yeezy team. Thank you Anna for the invite thank you to the whole Vogue team")}],ki=new Date,Si=ki.getFullYear(),Li=ki.getMonth(),Ci=ki.getDate(),Ii=(new Date(Si,Li,1),new Date(Si,Li,1),new Date(Si,Li,Ci-1,10,30),new Date(Si,Li,Ci-1,11,30),new Date(Si,Li,Ci+7,12,0),new Date(Si,Li,Ci+7,14,0),new Date(Si,Li,Ci-2),new Date(Si,Li,Ci-2),new Date(Si,Li,Ci+1,19,0),new Date(Si,Li,Ci+1,22,30),new Date(Si,Li,21),new Date(Si,Li,22),new Date(Si,Li,21),new Date(Si,Li,22),Object(_e.b)((function(e){return{}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(ui)((function(e){var t=e.classes,r=be.getState(),n=r.db,a=r.session,i=r.functions,c=r.timeline,l=i.socket,s=o.a.useState(!1),u=Object(je.a)(s,2),d=u[0],p=u[1],f=o.a.useState(!1),m=Object(je.a)(f,2),g=m[0],y=m[1],v=o.a.useState(!1),b=Object(je.a)(v,2),x=b[0],_=b[1],w=o.a.useState(null),E=Object(je.a)(w,2),O=E[0],j=E[1],k=o.a.useState(null),S=Object(je.a)(k,2),L=S[0],C=S[1],I=o.a.useState(!1),F=Object(je.a)(I,2),T=F[0],N=F[1],P=o.a.useState(!1),A=Object(je.a)(P,2),D=A[0],z=A[1],M=o.a.useState(null),B=Object(je.a)(M,2),$=B[0],Y=B[1],R=null,G=e.storie;if(G&&G._parent&&n.cards[G._parent]?G._parent:G&&G.idRel&&n.cards[G.idRel]&&G.idRel,G.filesCount&&G.filesCount>0&&ji.user&&ji.user._id&&ji.user._id!==a._id&&(!ji.files||ji.files&&ji.files.length<G.filesCount))return o.a.createElement(o.a.Fragment,null);var H=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];y(!0),e&&clearTimeout(R)},W=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;R=setTimeout((function(){y(!1)}),e)},U=function(t){var r={react:t,user:a._id,db:e.db,nodeId:e.storie.idRel?e.storie.idRel:e.storie._parent?e.storie._parent:e.nodeId?e.nodeId:null,message:e.storie._id};qa(e,r),l.emit("data",{module:"timeline",method:"post",action:"interact"},r)};if(!G)return null;var V="";"timer"===G.type&&String(G.ini)&&String(G.fin)&&(V=G.fin-G.ini);var q=null;G.urlPreview&&(q=JSON.parse(G.urlPreview));var X,K=Dt(function(e){var t,r;if(G&&G._parent&&n.cards[G._parent]?t=G._parent:G&&G.idRel&&n.cards[G.idRel]&&(t=G.idRel),r=e,e){var a=e.split("@[");a.length>0&&a.map((function(e){if(e){var a="@[".concat(e.split(")")[0],")"),o=e.split("](")[1];if(o)if((o=o.split(")")[0])&&36===o.length&&n.cards[t]&&n.cards[t]._users&&n.cards[t]._users[o]){var i=n.cards[t]._users&&n.cards[t]._users[o]&&n.cards[t]._users[o].name||n.cards[t]._users&&n.cards[t]._users[o]&&n.cards[t]._users[o].name?n.cards[t]._users[o].name:Dt("$__hideUser","*");r=r.replace(a,'<span style="color:'.concat(Mt("menu"),'"><b>').concat(i,"</b></span>"))}else if(o&&36===o.length&&n.users[o]){var c=n.users[o]&&n.users[o].name?n.users[o].name:e.split("](")[0];r=r.replace(a,'<span style="color:'.concat(Mt("menu"),'"><b>').concat(c,"</b></span>"))}else{var l=e.split("](")[0];r=r.replace(a,'<span style="color:'.concat(Mt("menu"),'"><b>').concat(l,"</b></span>"))}}return!0}))}return r}(G.message));G._reactions&&Object.keys(G._reactions).length>0&&Object.keys(G._reactions).map((function(e){Object.keys(G._reactions[e]).length>0&&Object.keys(G._reactions[e]).map((function(t){t===a._id&&(X=e)}))}));var J=!1;e.storie&&e.storie.user&&e.storie.user._id===a._id&&(J=!0);var Z=function(){$t({message:Dt("$__confirmCancel",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Za(e,{id:G._id,idRel:G.idRel,deletedReason:O,deleted:!0}),G.deleted=!0,C(!1),j(null)}})};if(!G.filesCount&&""===G.message&&G.cardId&&G.cardId!==e.nodeId&&!be.getState().db.cards[G.cardId])return null;var Q=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=t.name.split("."),i=a[a.length-1],c="attachment";n.fileExtensions.filter((function(e){return e.ext.indexOf(i.toLowerCase())>-1})).length>0&&(c=n.fileExtensions.filter((function(e){return e.ext.indexOf(i.toLowerCase())>-1}))[0].icon||"https://fl.machen.ai/?arq=".concat(t.file.replace("&","||MCH-ECOM||"),"&name=").concat(t.name.replace("&","||MCH-ECOM||")));var l="img";return n.fileExtensions.filter((function(e){return e.ext.indexOf(i.toLowerCase())>-1})).length>0&&n.fileExtensions.filter((function(e){return e.ext.indexOf(i.toLowerCase())>-1}))[0].viewer&&(l=n.fileExtensions.filter((function(e){return e.ext.indexOf(i.toLowerCase())>-1}))[0].viewer),o.a.createElement("div",{key:t._id,style:{position:"relative",display:"flex",alignItems:"center",marginBottom:"5px",whiteSpace:"nowrap",textOverflow:"ellipsis",cursor:"pointer",overflow:"hidden",padding:"7px",zIndex:"10 !important",borderRadius:"15px",width:"img"===l?r<4?"33%":"25%":"movie"===l||"audio"===l?"50%":"20%",maxWidth:"img"===l?"440px":"none",minWidth:"img"===l||"movie"!==l&&"audio"!==l&&"string"===typeof c&&-1===c.indexOf("blob:")&&-1===c.indexOf("svg")||"movie"!==l&&"audio"!==l&&!("img"===l&&c&&c.indexOf("svg")>-1)?"140px":"100%"},onClick:function(r){e.openLightBox&&e.openLightBox(t._id),r.preventDefault()},title:t.name},("img"===l||"movie"!==l&&"audio"!==l&&"string"===typeof c&&-1===c.indexOf("blob:")&&-1===c.indexOf("svg")||"movie"!==l&&"audio"!==l&&!("img"===l&&c&&c.indexOf("svg")>-1))&&o.a.createElement(xt.a,{title:t.name},o.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"===l&&"string"===typeof c&&c.indexOf("https")>-1&&-1===c.indexOf("svg")&&o.a.createElement("img",{src:"".concat(c),style:{borderRadius:"15px",boxShadow:"0 1px 2px 2px rgba(0,0,0,0.1)",maxWidth:"100%",height:"100%",maxHeight:"33vh"},onError:function(e){G.created_at&&"string"===typeof G.created_at&&parseInt(G.created_at)>Fe()().unix("X")-60&&(e.target.src=c)}}),"movie"!==l&&"string"===typeof c&&-1===c.indexOf("blob:")&&-1===c.indexOf("svg")?o.a.createElement(wt,{icon:c,size:"50px"}):"movie"!==l&&!("img"===l&&c&&c.indexOf("svg")>-1)&&o.a.createElement("img",{src:c,style:{width:"100%",height:"100%"}}),"img"===l&&c&&c.indexOf("svg")>-1&&o.a.createElement("img",{src:yr.a,style:{borderRadius:"15px",boxShadow:"0 1px 2px 2px rgba(0,0,0,0.1)",maxWidth:"100%",height:"100%",maxHeight:"33vh"}}),"movie"===l&&o.a.createElement("video",{style:{width:"100%"},src:"https://machen.azureedge.net/".concat(t.file),controls:!0}),"audio"===l&&o.a.createElement(fr.a,{src:"https://machen.azureedge.net/".concat(t.file),controls:!0}))};return o.a.createElement("div",{style:Object(h.a)(Object(h.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},o.a.createElement("div",{className:"message",style:Object(h.a)(Object(h.a)({position:"relative",maxWidth:"calc(100% - 15px)",float:J?"right":"left"},J?{marginRight:"15px"}:{marginLeft:"15px"}),{},{width:"auto",minWidth:"303px",marginBottom:"20px"}),onMouseLeave:function(){W(1e3)},onMouseOver:function(){e.isReply||H(!0)},onClick:function(){e.isReply||H(!0)}},e.showUserName&&!J&&o.a.createElement("div",{style:{position:"relative",width:"100%",fontWeight:"bold",fontSize:"12px",color:Mt("menu")}},G.user.name?G.user.name:G.user.fullName),o.a.createElement("div",{style:{position:"relative",float:J?"right":"left",padding:"7px 15px",width:"100%",background:J?"linear-gradient(33deg, rgba(250, 250, 250, 1), rgba(235,227,241, 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"}},G&&G.filesCount&&parseInt(G.filesCount)>0&&G.files&&0===Object.keys(G.files).length?o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{position:"relative",justifyContent:"center",alignItems:"center",color:"lightgray"}},Dt("$__transferringFile".concat(parseInt(G.filesCount)>1?"s":""))),o.a.createElement("div",{className:"files",style:{position:"relative",maxWidth:"calc(100% - 15px)",width:"100%",display:"flex"}},G.filesCount&&G.filesCount>0&&(!ji.files||ji.files&&ji.files.length<G.filesCount)?o.a.createElement(o.a.Fragment,null,"HOUVE UM PROBLEMA AO ENVIAR OS ARQUIVOS"):o.a.createElement(o.a.Fragment,null))):o.a.createElement(o.a.Fragment,null),G.files&&Object.keys(G.files).length>0?o.a.createElement("div",{className:"files",style:Object(h.a)(Object(h.a)({position:"relative",maxWidth:"calc(100% - 15px)",float:J?"right":"left"},J?{marginRight:"15px"}:{marginLeft:"15px"}),{},{width:"100%",display:"flex",justifyContent:J?"flex-end":"none",flexWrap:"wrap"})},Object.keys(G.files).map((function(e,t){return Q(G.files[e],Object.keys(G.files[e]).length)}))):G.files&&G.files.length>0?o.a.createElement("div",{className:"files",style:Object(h.a)(Object(h.a)({position:"relative",maxWidth:"calc(100% - 15px)",float:J?"right":"left"},J?{marginRight:"15px"}:{marginLeft:"15px"}),{},{width:"100%",display:"flex",justifyContent:J?"flex-end":"none",flexWrap:"wrap"})},G.files.map((function(e,t){return Q(e,e.length)}))):o.a.createElement(o.a.Fragment,null),!e.isReply&&e.storie&&e.storie.reply&&c&&(c[e.nodeId]&&c[e.nodeId][e.storie.reply]||c[a._id]&&c[a._id][e.storie.reply])&&o.a.createElement("div",{style:{position:"relative",width:"calc(100% - 20px)",opacity:.66,display:"flex",justifyContent:"center",marginBottom:"7px"}},o.a.createElement(Ii,{isReply:!0,storie:c[e.nodeId]&&c[e.nodeId][e.storie.reply]?c[e.nodeId][e.storie.reply]:c[a._id][e.storie.reply],db:e.db,nodeId:e.nodeId,openLightBox:function(t){e.openLightBox&&e.openLightBox(t)},messageClick:function(){e.replyClick&&e.replyClick()}})),G.deleted?o.a.createElement("div",{style:{color:"lightGray",height:33,padding:7}},Dt("$__removed","*"),"*"):function(){if("comment"===G.type&&G.message)return o.a.createElement("div",null,G.urlPreview&&q.img&&q.title&&q.contentSnippet?o.a.createElement(Bo,{style:{marginBottom:15}},!d&&q.img&&o.a.createElement(Ro,{xs:12,sm:6,md:4,lg:3,xl:2},o.a.createElement("img",{style:{width:"-webkit-fill-available"},src:"".concat(q.img),onError:function(e){p(!0)},alt:q.title||q.link})),o.a.createElement(Ro,{xs:12,sm:6,md:8,lg:9,xl:10},o.a.createElement("div",{style:{fontSize:"14px",color:Mt("menu"),fontWeight:"bold"}},q.title),q.site&&o.a.createElement("div",{style:{fontSize:"12px"}},q.site),q.contentSnippet&&o.a.createElement("div",{style:{fontSize:"12px",color:"gray"}},q.contentSnippet),o.a.createElement("a",{style:{marginTop:"15px",fontWeight:"bold",fontSize:"12px"},href:q.link,target:"_blank"},Dt("$__openLink","*")))):o.a.createElement(o.a.Fragment,null),o.a.createElement(Ro,{xs:12,sm:12,md:12,lg:12,xl:12},Ht(Wt(K),e.searchText)));if("comment"===G.type&&!G.message&&G.cardId!==e.nodeId&&be.getState().db.cards[G.cardId])return o.a.createElement(ii,{db:"cards",data:be.getState().db.cards[G.cardId],Avatar:!0,expanded:!0,ignoreList:!0});if("log"===G.type){var r={};return"$__updated"===G.message?(r=JSON.parse(G.newData),o.a.createElement("div",null,o.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},o.a.createElement(wt,{color:"color",icon:"history",style:{marginRight:"10px"}}),G.message.indexOf("$__")>-1?Dt(G.message,1):G.message," "),G.newData&&o.a.createElement("ul",{style:{position:"relative",width:"98%"}},Object.keys(r).map((function(e,t){if("_id"===e||"client"===e||"planId"===e||"_parent"===e||"owner"===e||"image"===e);else{if("status"===e)return o.a.createElement("li",{key:t},"STATUS: ",Dt("$__".concat(r[e]),1));if("kpi_type"===e||"priority"===e||"risk"===e||"complexity"===e||"impact"===e)return o.a.createElement("li",{key:t},Dt("$__".concat(e),1),": ",Dt("$__".concat(r[e]),1));if("name"===e||"description"===e)return o.a.createElement("li",{key:t},Dt("$__".concat(e),1),": ",r[e]);if("url"===e)return o.a.createElement("li",{key:t},"url",": ",o.a.createElement("a",{href:r[e],target:"blank"},r[e]));if("_tags"!==e&&"string"===typeof r[e]&&"kpi_ini"!==e&&"kpi_fin"!==e&&"startDate"!==e&&"endDate"!==e&&"updated_at"!==e&&"created_at"!==e&&"content"!==e)return o.a.createElement("li",{key:t},Dt("$__".concat(e),1),": ",r[e].indexOf("$__")>-1?Dt("$__".concat(r[e]),1):r[e]);if("kpi_ini"===e||"kpi_fin"===e){r.kpi_type?r.kpi_type:n.cards[G.idRel]&&n.cards[G.idRel].kpi_type&&n.cards[G.idRel].kpi_type;return o.a.createElement("li",{key:t},Dt("$__".concat(e),1),": ",Yt(r[e],G.kpi_type?G.kpi_type:"decimal"))}if("startDate"===e||"endDate"===e||"updated_at"===e||"created_at"===e)return o.a.createElement("li",{key:t},Dt("$__".concat(e),1),": ",r[e]?Fe()(new Date(1e3*r[e])).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm"):Dt("$__removed"));if("boolean"===typeof r[e])return o.a.createElement("li",{key:t},Dt("$__".concat(e),1),": ",r[e]?Dt("$__enable",1):Dt("$__disable",1));if("_tags"===e)return o.a.createElement("li",{key:t},"TAGS: ",o.a.createElement(Ur,{options:r[e],showOptions:!0}))}}))),o.a.createElement("div",{style:{clear:"both"}}))):o.a.createElement("div",{style:{position:"relative",width:"100%"}},o.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},o.a.createElement(wt,{color:"color",icon:"history",style:{marginRight:"10px"}}),o.a.createElement("div",{style:{wordBreak:"break-word"}},Ht(Wt(K),e.searchText))),G.cardId&&be.getState().db.cards[G.cardId]?o.a.createElement("div",{style:Object(h.a)(Object(h.a)({position:"relative",maxWidth:"285px"},e.boxStyle&&e.boxStyle.maxWidth?{maxWidth:e.boxStyle.maxWidth}:{}),{},{width:"100%",display:"block"})},o.a.createElement(ii,{db:"cards",data:be.getState().db.cards[G.cardId],Avatar:!0,ignoreList:!0})):o.a.createElement(o.a.Fragment,null))}if("timer"===G.type){var a=V,i="";if(V<60)i="".concat(a," ").concat(Dt("$__seconds",1));else if(V>3600){var c=Math.trunc(a/3600);a-=3600*c;var l=Math.trunc(a/60)>0?Math.trunc(a/60):0,s=(a-=60*l)>0?a:0;i="".concat(c," hora").concat(c>1?"s":""," ").concat(l," ").concat(Dt("$__minutes",1)," ").concat(s," ").concat(Dt("$__seconds",1))}else{var u=Math.trunc(a/60)>0?Math.trunc(a/60):0,f=(a-=60*u)>0?a:0;i="".concat(u," ").concat(Dt("$__minutes",1)," ").concat(f," ").concat(Dt("$__seconds",1))}return L?o.a.createElement("div",null,o.a.createElement("div",{style:{position:"relative",width:"100%",marginTop:"33px"}},o.a.createElement(Qn,{label:Dt("$__cancelReason",1),variant:Mt("standard"),name:"cancelReason",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,onChange:function(e){j(e.target.value)}},placeholder:Dt("$__cancelReason_placeholder",1)})),o.a.createElement("div",{style:{position:"absolute",right:"7px",top:"7px",display:"flex"}},o.a.createElement(Ct,{transparent:!0,title:Dt("$__cancel","*"),color:Mt("lightgrey"),icon:"cancel",onClick:function(){C(!1),j(null)},size:"25px"}),o.a.createElement(Ct,{transparent:!0,title:Dt("$__save",1),color:"green",icon:"playlist_add_check",onClick:function(){Z()},size:"25px"}))):o.a.createElement("div",null,o.a.createElement("div",null,G&&G._toUser&&Object.keys(G._toUser).length>0&&o.a.createElement("div",{className:t.timeInfo},o.a.createElement(la.a,{max:300,style:{flexWrap:"wrap",display:"inline-flex",border:"none"}},Object.keys(G._toUser).map((function(e){return o.a.createElement(xt.a,{key:e,title:G._toUser[e].displayName?G._toUser[e].displayName:G._toUser[e].name},o.a.createElement(Fr.a,{alt:G._toUser[e].name,src:G._toUser[e].image||null,style:{width:27,height:27,border:"none"}},G._toUser[e].name.substr(0,1)))})))),o.a.createElement("div",{className:t.timeInfo},o.a.createElement(wt,{color:"color",icon:"schedule"}),o.a.createElement("div",{className:"text"},Fe()(1e3*G.ini).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"))),o.a.createElement("div",{className:t.timeInfo},o.a.createElement(wt,{color:"color",icon:"watch_later"}),o.a.createElement("div",{className:"text"},Fe()(1e3*G.fin).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"))),o.a.createElement("div",{className:t.timeInfo},o.a.createElement(wt,{color:"color",icon:"hourglass_full"}),o.a.createElement("div",{className:"text"},i))),o.a.createElement("div",null,K),G.deleted&&G.deletedReason&&o.a.createElement("div",null,Dt("$__cancelReason",1),": ",G.deletedReason),o.a.createElement("div",{style:{clear:"both"}}),G.deleted||!g&&!Fe()(G.created_at).unix("x")?o.a.createElement(o.a.Fragment,null):o.a.createElement("div",{style:{position:"absolute",right:"7px",top:"7px"}},o.a.createElement(Kr,{transparent:!0,options:[{name:"$__cancelThis",icon:"cancel",onClick:function(){C(!0)},show:"hover"}]})))}if("kpi"===G.type){var m=G&&G.balance?G.balance:0;return o.a.createElement("div",null,G.cardId?o.a.createElement(ii,{db:"cards",data:be.getState().db.cards[G.cardId],ignoreList:!0,noOptions:!0}):o.a.createElement(o.a.Fragment,null),o.a.createElement("div",null,K),o.a.createElement("div",{className:parseFloat(G.value)>0?t.valuePositive:t.valueNegative},Yt(G.value,G.kpi_type?G.kpi_type:"decimal")),!e.stories&&o.a.createElement("div",{className:t.lastValue},Dt("$__balance",1),": ",Yt(m,G.kpi_type?G.kpi_type:"decimal")),o.a.createElement("div",{style:{clear:"both"}}))}}()),G.user&&o.a.createElement("div",{style:Object(h.a)(Object(h.a)({position:"absolute"},J?{right:"-20px"}:{left:"-20px"}),{},{bottom:0})},o.a.createElement(si,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},variant:G.user&&G.user._id&&a.users&&a.users[G.user._id]?"dot":"standard"},o.a.createElement(Fr.a,{alt:G.user.displayName?G.user.displayName:G.user.name,src:"".concat(G.user.image),style:{width:"22px",height:"22px"}}))),o.a.createElement("div",{style:Object(h.a)(Object(h.a)({position:"absolute"},J?{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"})},Fe()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===Fe()(1e3*G.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(Fe()(1e3*G.created_at).tz("America/Sao_Paulo").format("H:mm")):Fe()(new Date).tz("America/Sao_Paulo").format("YYYY")===Fe()(1e3*G.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(Fe()(1e3*G.created_at).tz("America/Sao_Paulo").format("DD/MM H:mm")):"".concat(Fe()(1e3*G.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm")),G.readedBy&&Object.keys(G.readedBy).length>0&&o.a.createElement(xt.a,{title:o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:t.users},Object.keys(G.readedBy).sort((function(e,t){return G&&G.readedBy[e]&&G.readedBy[e].readedDate&&G.readedBy[t]&&G.readedBy[t].readedDate&&String(G.readedBy[e].readedDate.low)&&String(G.readedBy[t].readedDate.low)&&parseInt(G.readedBy[e].readedDate.low)<parseInt(G.readedBy[t].readedDate.low)?-1:G&&G.readedBy[e]&&G.readedBy[e].readedDate&&G.readedBy[t]&&G.readedBy[t].readedDate&&String(G.readedBy[e].readedDate.low)&&String(G.readedBy[t].readedDate.low)&&parseInt(G.readedBy[e].readedDate.low)>parseInt(G.readedBy[t].readedDate.low)?1:0})).map((function(e,t){return G.user._id!==e&&G.readedBy&&G.readedBy[e]&&G.readedBy[e].name&&o.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},o.a.createElement(Fr.a,{alt:G.readedBy[e].name,src:G.readedBy[e].image||null}),o.a.createElement("span",{style:{paddingLeft:"7px"}},G.readedBy[e].displayName?G.readedBy[e].displayName:G.readedBy[e].name,G.readedBy[e].readedDate&&G.readedBy[e].readedDate.low&&" (".concat(Fe()(1e3*G.readedBy[e].readedDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))}))))},o.a.createElement("div",null,o.a.createElement(wt,{color:"#FFFFFF",size:"14px",style:{marginLeft:"7px"}},"done_all"))),!G.deleted&&G._reactions&&Object.keys(G._reactions).length>0&&o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},G&&G._reactions.like&&Object.keys(G._reactions.like).length>0&&o.a.createElement(Ir,{icon:"thumb_up",iconColor:Mt("menu"),title:o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:t.users},Object.keys(G._reactions.like).sort((function(e,t){return G._reactions.like[e].reactDate&&String(G._reactions.like[e].reactDate.low)&&G._reactions.like[t].reactDate&&String(G._reactions.like[t].reactDate.low)&&parseInt(G._reactions.like[e].reactDate.low)<parseInt(G._reactions.like[t].reactDate.low)?-1:G._reactions.like[e].reactDate&&String(G._reactions.like[e].reactDate.low)&&G._reactions.like[t].reactDate&&String(G._reactions.like[t].reactDate.low)&&parseInt(G._reactions.like[e].reactDate.low)>parseInt(G._reactions.like[t].reactDate.low)?1:0})).map((function(e,t){return o.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},o.a.createElement(Fr.a,{alt:G._reactions.like[e].name,src:G._reactions.like[e].image||Nr.a}),o.a.createElement("span",{style:{paddingLeft:"7px"}},G._reactions.like[e].displayName?G._reactions.like[e].displayName:G._reactions.like[e].name,G._reactions.like[e].reactDate&&G._reactions.like[e].reactDate.low&&" (".concat(Fe()(1e3*G._reactions.like[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})))),style:{fontSize:"12px",margin:0}}),G&&G._reactions&&G._reactions.nolike&&Object.keys(G._reactions.nolike).length>0&&o.a.createElement(Ir,{icon:"thumb_down",iconColor:Mt("medium"),style:{fontSize:"12px",margin:0},title:o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:t.users},Object.keys(G._reactions.nolike).sort((function(e,t){return G._reactions.nolike[e].reactDate&&String(G._reactions.nolike[e].reactDate.low)&&G._reactions.nolike[t].reactDate&&String(G._reactions.nolike[t].reactDate.low)&&parseInt(G._reactions.nolike[e].reactDate.low)<parseInt(G._reactions.nolike[t].reactDate.low)?-1:G._reactions.nolike[e].reactDate&&String(G._reactions.nolike[e].reactDate.low)&&G._reactions.nolike[t].reactDate&&String(G._reactions.nolike[t].reactDate.low)&&parseInt(G._reactions.nolike[e].reactDate.low)>parseInt(G._reactions.nolike[t].reactDate.low)?1:0})).map((function(e,t){return o.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},o.a.createElement(Fr.a,{alt:G._reactions.nolike[e].name,src:G._reactions.nolike[e].image||Nr.a}),o.a.createElement("span",{style:{paddingLeft:"7px"}},G._reactions.nolike[e].displayName?G._reactions.nolike[e].displayName:G._reactions.nolike[e].name,G._reactions.nolike[e].reactDate&&G._reactions.nolike[e].reactDate.low&&" (".concat(Fe()(1e3*G._reactions.nolike[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))}))))}),G&&G._reactions&&G._reactions.love&&Object.keys(G._reactions.love).length>0&&o.a.createElement(Ir,{icon:"favorite",iconColor:Mt("medium"),style:{fontSize:"12px",margin:0},title:o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:t.users},Object.keys(G._reactions.love).sort((function(e,t){return G._reactions.love[e].reactDate&&String(G._reactions.love[e].reactDate.low)&&G._reactions.love[t].reactDate&&String(G._reactions.love[t].reactDate.low)&&parseInt(G._reactions.love[e].reactDate.low)<parseInt(G._reactions.love[t].reactDate.low)?-1:G._reactions.love[e].reactDate&&String(G._reactions.love[e].reactDate.low)&&G._reactions.love[t].reactDate&&String(G._reactions.love[t].reactDate.low)&&parseInt(G._reactions.love[e].reactDate.low)>parseInt(G._reactions.love[t].reactDate.low)?1:0})).map((function(e,t){return o.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},o.a.createElement(Fr.a,{alt:G._reactions.love[e].name,src:G._reactions.love[e].image||Nr.a}),o.a.createElement("span",{style:{paddingLeft:"7px"}},G._reactions.love[e].displayName?G._reactions.love[e].displayName:G._reactions.love[e].name,G._reactions.love[e].reactDate&&G._reactions.love[e].reactDate.low&&" (".concat(Fe()(1e3*G._reactions.love[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))}))))}),G&&G._reactions&&G._reactions.approve&&Object.keys(G._reactions.approve).length>0&&o.a.createElement(Ir,{icon:"verified",iconColor:"green",style:{fontSize:"12px",margin:0},title:o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:t.users},Object.keys(G._reactions.approve).sort((function(e,t){return G._reactions.approve[e].reactDate&&String(G._reactions.approve[e].reactDate.low)&&G._reactions.approve[t].reactDate&&String(G._reactions.approve[t].reactDate.low)&&parseInt(G._reactions.approve[e].reactDate.low)<parseInt(G._reactions.approve[t].reactDate.low)?-1:G._reactions.approve[e].reactDate&&String(G._reactions.approve[e].reactDate.low)&&G._reactions.approve[t].reactDate&&String(G._reactions.approve[t].reactDate.low)&&parseInt(G._reactions.approve[e].reactDate.low)>parseInt(G._reactions.approve[t].reactDate.low)?1:0})).map((function(e,t){return o.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},o.a.createElement(Fr.a,{alt:G._reactions.approve[e].name,src:G._reactions.approve[e].image||Nr.a}),o.a.createElement("span",{style:{paddingLeft:"7px"}},G._reactions.approve[e].displayName?G._reactions.approve[e].displayName:G._reactions.approve[e].name,G._reactions.approve[e].reactDate&&G._reactions.approve[e].reactDate.low&&" (".concat(Fe()(1e3*G._reactions.approve[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))}))))}),G&&G._reactions&&G._reactions.attention&&Object.keys(G._reactions.attention).length>0&&o.a.createElement(Ir,{icon:"report_problem",iconColor:"red",style:{fontSize:"12px",margin:0},title:o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:t.users},Object.keys(G._reactions.attention).sort((function(e,t){return G._reactions.attention[e].reactDate&&String(G._reactions.attention[e].reactDate.low)&&G._reactions.attention[t].reactDate&&String(G._reactions.attention[t].reactDate.low)&&parseInt(G._reactions.attention[e].reactDate.low)<parseInt(G._reactions.attention[t].reactDate.low)?-1:G._reactions.attention[e].reactDate&&String(G._reactions.attention[e].reactDate.low)&&G._reactions.attention[t].reactDate&&String(G._reactions.attention[t].reactDate.low)&&parseInt(G._reactions.attention[e].reactDate.low)>parseInt(G._reactions.attention[t].reactDate.low)?1:0})).map((function(e,t){return o.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},o.a.createElement(Fr.a,{alt:G._reactions.attention[e].name,src:G._reactions.attention[e].image||Nr.a}),o.a.createElement("span",{style:{paddingLeft:"7px"}},G._reactions.attention[e].displayName?G._reactions.attention[e].displayName:G._reactions.attention[e].name,G._reactions.attention[e].reactDate&&G._reactions.attention[e].reactDate.low&&" (".concat(Fe()(1e3*G._reactions.attention[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))}))))})),!e.isReply&&o.a.createElement("div",{style:{position:"relative",float:"left",marginLeft:"7px",marginRight:"7px"}},g&&!e.noReactions&&!G.deleted&&o.a.createElement("div",{style:{display:"flex",minWidth:"fit-content",justifyContent:"center"},onMouseOver:function(e){H(!0)},onMouseLeave:W},o.a.createElement(wt,{icon:X&&"like"===X?"thumb_up":"thumb_up_off_alt",iconColor:Mt(X&&"like"===X?"menu":"medium"),title:Dt("$__like",1),size:"18px",onClick:function(){U("like")},onMouseLeave:W}),o.a.createElement(wt,{icon:X&&"nolike"===X?"thumb_down":"thumb_down_off_alt",title:Dt("$__notlike",1),iconColor:Mt(X&&"nolike"===X?"menu":"medium"),size:"18px",onClick:function(){U("nolike")},onMouseLeave:W}),o.a.createElement(wt,{icon:X&&"love"===X?"favorite":"favorite_border",title:Dt("$__love",1),iconColor:Mt(X&&"love"===X?"menu":"medium"),size:"18px",onClick:function(){U("love")},onMouseLeave:W}),o.a.createElement(wt,{icon:"verified",title:Dt("$__approve",1),iconColor:X&&"approve"===X?"green":Mt("medium"),size:"18px",onClick:function(){U("approve")},onMouseLeave:W}),o.a.createElement(wt,{icon:"report_problem",title:Dt("$__attention",1),iconColor:X&&"attention"===X?"red":Mt("medium"),size:"18px",onClick:function(){U("attention")},onMouseLeave:W}),G&&G.user&&G.user._id===a._id&&o.a.createElement(wt,{icon:"forward",title:Dt("$__forwardThisMessage",1),iconColor:"deepskyblue",size:"18px",onClick:function(){N(!0)},onMouseLeave:W}),o.a.createElement(wt,{icon:"reply",title:Dt("$__replyThisMessage",1),iconColor:"deepskyblue",size:"18px",onClick:function(){_(!0),W(),e.onOpenReply&&setTimeout((function(){e.onOpenReply()}),100)},onMouseLeave:W}),!G.deleted&&"comment"===G.type&&G.user&&G.user._id&&G.user._id===a._id&&parseInt(G.created_at)>parseInt(Fe()().unix("x"))-180?o.a.createElement(Ct,{id:"chat_message_delete",title:Dt("$__delete","*"),color:"red",icon:"delete_forever",onClick:function(){Z()},size:"18px",transparent:!0}):o.a.createElement(o.a.Fragment,null))))),x&&(e.nodeId||e.storie.idRel||e.storie._parent)&&o.a.createElement("div",{style:{width:"100%",position:"relative",display:"flex",alignItems:"center",minWidth:"150px",justifyContent:J?"flex-end":"flex-start"},id:"editor_".concat(G._id,"_sending")},o.a.createElement(wt,null,"subdirectory_arrow_right"),o.a.createElement("div",{style:{minWidth:"300px",width:"100%"}},o.a.createElement(Ho,{nodeId:e.nodeId?e.nodeId:e.storie.idRel?e.storie.idRel:null,closeOption:!0,db:e.db?e.db:"cards",replyData:e.storie,onSending:function(){_(!1)},onClose:function(){_(!1)},relative:!0}))),o.a.createElement(Xo.a,{fullWidth:!0,"aria-labelledby":"simple-dialog-title",open:T},o.a.createElement("div",{className:"forwardMessage"},o.a.createElement("div",{style:{position:"relative",marginLeft:"10px",marginTop:"5px",width:"calc(100% - 10px)"}},o.a.createElement(ra,{title:Dt("$__forwardMessage",1),icon:"forward",onCancel:function(){N(!1)}})),o.a.createElement("div",{style:{padding:15}},o.a.createElement(ja,{hideSelected:!0,avatarSize:"33px",permission:e.permission,noLimit:!0,ignoreId:e.nodeId?e.nodeId:e.storie.idRel?e.storie.idRel:null,onSelect:function(e){Y(e)}})),o.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},o.a.createElement(Ct,{shadow:!0,title:Dt("$__cancel"),text:Dt("$__cancel"),color:"lightgrey",icon:"close",size:"25px",onClick:function(){N(!1),Y(null)}}),$&&o.a.createElement("div",{style:{marginLeft:"15px"}},o.a.createElement(Ct,{shadow:!0,title:Dt("$__forward"),text:Dt("$__forward"),icon:"forward",size:"25px",load:!!D,onClick:function(){z(!0),function(e,t){var r;r=(e&&e.store&&be.getState().functions&&be.getState().functions.socket,be.getState().functions.socket);var n=be.getState(),a=(n.db,n.session,Object(h.a)(Object(h.a)({},t),{},{forwardedId:t._id,_id:Object(pn.a)(),created_at:"".concat(Fe()().tz("America/Sao_Paulo").unix("x"))}));a._reactions&&delete a._reactions,a.readedBy&&delete a.readedBy,a._reactions&&delete a._reactions,a._toUser&&delete a._toUser,t._forwardToId.map((function(t){Xa(e,{comment:Object(h.a)(Object(h.a)({},a),{},{idRel:t}),node:t}),r.emit("data",{module:"timeline",method:"post",action:"add"},Object(h.a)(Object(h.a)({},a),{},{idRel:t}),(function(e){}))}))}(e,Object(h.a)(Object(h.a)({},G),{},{_forwardToId:$})),setTimeout((function(){N(!1),Y(null),e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},be.getState().chat),{},{db:"users",nodeId:$[0],loading:!1})),z(!1)}),6e3)}}))))))}))));var Fi=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(mr)((function(e){var t=e.classes,r=be.getState(),n=(r.db,r.lightBox,o.a.useState(!1)),a=Object(je.a)(n,2),i=a[0],c=a[1],l=o.a.useState(!1),s=Object(je.a)(l,2),u=s[0],d=(s[1],o.a.useState(!1)),p=Object(je.a)(d,2),f=(p[0],p[1],o.a.useState(null)),h=Object(je.a)(f,2),m=(h[0],h[1],o.a.useState(null)),g=Object(je.a)(m,2),y=(g[0],g[1],o.a.useState(!0)),v=Object(je.a)(y,2),b=(v[0],v[1],o.a.useState(.5)),x=Object(je.a)(b,2);return x[0],x[1],o.a.useEffect((function(){i||c(!0)})),be.getState().lightBox.miro||be.getState().lightBox.miroBoard?be.getState().lightBox.miro||be.getState().lightBox.miroBoard?o.a.createElement(ze.a,{className:t.backdrop,open:be.getState().lightBox.miro},o.a.createElement("div",{className:t.header},o.a.createElement("div",{className:t.btClose},o.a.createElement(wt,{title:Dt("$__close","*"),color:Mt("light"),onClick:function(){e.reduxFunction("ASYNC","LIGHTBOX_CLOSE")}},"close"))),o.a.createElement("div",{className:t.content,style:{zIndex:1e3}},u?o.a.createElement("div",{className:t.loader},o.a.createElement(Et.a,null)):o.a.createElement("iframe",{style:{position:"absolute",width:"100%",height:"100%"},src:"https://miro.com/app/live-embed/".concat(be.getState().lightBox.miroBoard,"=/?embedAutoplay=true&moveToViewport=-23165,-5837,13803,7546")}))):null:o.a.createElement(o.a.Fragment,null)})));var Ti=function(e){return o.a.createElement("div",{id:"sideModule_closeButton",style:{position:"fixed",display:"inline-flex",paddingLeft:"10px",top:"7px",right:0,backgroundColor:"#FFFFFF"}},e.saveLoader&&o.a.createElement(o.a.Fragment,null,o.a.createElement(jt,{size:"25px"})),!e.saveLoader&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{id:"sideModule_saveOptions",style:{display:"flex"}},e.save&&o.a.createElement(Ct,{id:"sideModule_saveButton",title:Dt("$__save",1),color:Mt("color"),icon:"save",onClick:function(){e.save()},size:"25px"}),e.saveClose&&o.a.createElement(Ct,{id:"sideModule_saveAndCloseButton",title:Dt("$__saveAndClose",1),color:"green",icon:"playlist_add_check",onClick:function(){e.saveClose()},size:"25px"})),e.close&&o.a.createElement(Ct,{title:Dt("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){e.close()},size:"25px"})))},Ni=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(h.a)(Object(h.a)({},qe),{},{position:"absolute",right:"0px",top:"0px",bottom:"0px",width:"440px",zIndex:"1100",backgroundColor:"rgba(255,255,255,1)"}),modulePopup:Object(h.a)(Object(h.a)({},qe),{},{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(h.a)(Object(h.a)({},qe),{},{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(h.a)(Object(h.a)({},qe),{},{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:Mt("color"),color:Mt("light")}}},Pi={};function Ai(){Ai=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Di=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Pi)((function(e){var t=o.a.useState(""),r=Object(je.a)(t,2),n=r[0],a=r[1],i=o.a.useState(!1),c=Object(je.a)(i,2),l=c[0],s=c[1],u=o.a.useState([]),d=Object(je.a)(u,2),p=d[0],f=d[1],h=be.getState(),m=(h.db,h.functions.socket,window.location.hash.split("/"));m[0]=m[0].replace("#",""),o.a.useEffect((function(){if(e.text.length>1&&e.text!==n){a(e.text);var t=setTimeout((function(){return g()}),1e3);return s(!0),function(){return clearTimeout(t)}}}),[e.text]);var g=function(){var t=Object(Ee.a)(Ai().mark((function t(){var r;return Ai().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,Qr.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(),f(r.data),s(!1)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log("COMPONENTS/TIMELINE/SEARCH/MESSAGES/SearchMessages():::",t.t0);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(){return t.apply(this,arguments)}}();return o.a.createElement("div",{style:{width:"100%",maxHeight:"70vh"}},o.a.createElement("div",{style:{positin:"relative",width:"100%"}},l&&o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},o.a.createElement(Ga,null)),o.a.createElement(Bo,null,Object.keys(p).length>0&&o.a.createElement(Ro,{xs:12,sm:12,md:12,lg:12,xl:12},Object.keys(p).map((function(t,r){return o.a.createElement("div",{key:t,style:{position:"relative",float:"left",width:"calc(100% - 20px)",marginLeft:"10px",marginRight:"10px",marginBottom:"22px",clear:"both"}},o.a.createElement(Ii,{messageClick:e.onAction?function(){e.onAction(p[t])}:null,searchText:e.text.trim(),storie:p[t],hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId}))}))))))})));var zi=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Pi)((function(e){be.getState().db;var t,r=o.a.useState(""),n=Object(je.a)(r,2),a=n[0],i=n[1],c=o.a.useState(!1),l=Object(je.a)(c,2),s=l[0],u=l[1],d=o.a.useState(!1),p=Object(je.a)(d,2),f=p[0],h=p[1],m=window.location.hash.split("/");return m[0]=m[0].replace("#",""),o.a.createElement("div",{style:{position:"relative",zIndex:10,padding:10,backgroundColor:"rgba(250,250,250,0.9)",borderRadius:"25px"}},s?o.a.createElement(o.a.Fragment,null,o.a.createElement(Qn,{label:Dt("$__searchInChat"),variant:Mt("fieldVariant"),name:"searchInChat",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"close",color:"lightgray",onClick:function(){i(""),h(!1),u(!1)}})),onChange:function(e,t){i(e.target.value),h(!0)},onBlur:function(){""===a&&(i(""),h(!1),u(!1))}},placeholder:Dt("$__searchInChat"),value:Gt(a).toLowerCase(),autofocus:!0})):o.a.createElement(Ct,{title:Dt("$__search",1),color:"grey",icon:"search",onClick:function(e){u((function(e){return!e}))},transparent:!0}),""!==a&&a.length>1&&f&&o.a.createElement("div",{style:{position:"absolute",bottom:0,left:"7px",right:"7px"}},o.a.createElement(Ga,null)),""!==a&&a.length>1&&o.a.createElement("div",{style:(t={position:"absolute",top:"50px",right:"15px",backgroundColor:"#FFFFFF",maxHeight:"calc(100vh - 60px)",height:"auto",overflow:"hidden",overflowY:"auto",boxShadow:"0 3px 3px 3px rgba(0,0,0,0.1)"},Object(Oe.a)(t,"maxHeight","90vh"),Object(Oe.a)(t,"maxWidth","666px"),Object(Oe.a)(t,"zIndex",2001),t)},o.a.createElement(Di,{nodeId:e.nodeId,db:e.db,text:a,onFinish:function(e){h(!1)},onAction:function(t){e.onAction&&e.onAction(t),i(""),h(!1),u(!1)}})))}))),Mi=r(772),Bi=r.n(Mi);function $i(){$i=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Yi=Object(_e.b)((function(e){var t={};if(e.chat&&e.chat.open&&e.db.cards&&e.db.cards[e.chat.nodeId])t=Object(Oe.a)({},e.chat.nodeId,e.timeline[e.chat.nodeId]);else if(e.chat&&e.chat.open){var r;r={},Object(Oe.a)(r,e.chat.nodeId,e.timeline[e.chat.nodeId]?e.timeline[e.chat.nodeId]:{}),Object(Oe.a)(r,e.session._id,e.timeline[e.session._id]?e.timeline[e.session._id]:{}),t=r}else t=Object(h.a)({},e.timeline);return{store:{timeline:t}}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(ui)((function(e){var t=e.classes,r=be.getState(),n=r.session,a=(r.functions,r.chat),i=r.timeline,c=o.a.useState(!0),l=Object(je.a)(c,2),s=l[0],u=l[1],d=o.a.useState(0),p=Object(je.a)(d,2),f=p[0],m=p[1],g=o.a.useState(null),y=Object(je.a)(g,2),v=y[0],b=y[1],x=o.a.useState(e.type?e.type:"comment"),_=Object(je.a)(x,2),w=_[0],E=_[1],O=o.a.useState(null),j=Object(je.a)(O,2),k=j[0],S=j[1],L=o.a.useState(!1),C=Object(je.a)(L,2),I=C[0],F=C[1],T=o.a.useState(!1),N=Object(je.a)(T,2),P=N[0],A=N[1],D=o.a.useState([]),z=Object(je.a)(D,2),M=z[0],B=z[1],$=o.a.useState(!1),Y=Object(je.a)($,2),R=Y[0],G=Y[1],H=o.a.useState({}),W=Object(je.a)(H,2),U=W[0],V=(W[1],e.nodeId?be.getState().db["".concat(e.db?e.db:"cards")][e.nodeId]:{}),q=be.getState().db.users[e.nodeId]?"users":"cards",X=o.a.createRef(),K=[],J=[];be.getState().db.cards[e.nodeId]&&i[e.nodeId]&&Object.keys(i[e.nodeId]).map((function(t){return J.push(i[e.nodeId][t])}));"kpi"===w&&function t(r){Object.keys(be.getState().db.cards).filter((function(e){return be.getState().db.cards[e]._parent===r&&be.getState().db.cards[e].kpi_useParent&&be.getState().db.cards[e].kpi_type===be.getState().db.cards[r].kpi_type})).map((function(r){e.store.timeline[r]&&Object.keys(e.store.timeline[r]).filter((function(t){return"kpi"===e.store.timeline[r][t].type&&!e.store.timeline[r][t].deleted})).map((function(t){return J.push(e.store.timeline[r][t])})),t(r)}))}(e.nodeId);var Z={};be.getState().db.users[e.nodeId]&&(i&&i[n._id]&&Object.keys(i[n._id]).filter((function(t){return e.store.timeline[n._id]&&e.store.timeline[n._id][t]&&e.store.timeline[n._id][t].user&&e.store.timeline[n._id][t].user._id===e.nodeId&&0===J.filter((function(e){return e._id===t})).length})).map((function(t){J.push(e.store.timeline[n._id][t])})),i&&i[e.nodeId]&&Object.keys(i[e.nodeId]).filter((function(t){return e.store.timeline[e.nodeId]&&e.store.timeline[e.nodeId][t]&&e.store.timeline[e.nodeId][t].user&&e.store.timeline[e.nodeId][t].user._id===n._id&&0===J.filter((function(e){return e._id===t})).length})).map((function(t){J.push(e.store.timeline[e.nodeId][t])})),J=Object.keys(J).sort((function(e,t){return parseInt(J[e].created_at)<parseInt(J[t].created_at)?-1:parseInt(J[e].created_at)>parseInt(J[t].created_at)?1:0})).filter((function(t){return J[t].user&&J[t].user._id&&(J[t].user._id===n._id||J[t].user._id===e.nodeId)})).map((function(e){return Z[J[e]._id]=o.a.createRef(),J[e]}))),Object.keys(J).map((function(e){Z[J[e]._id]=o.a.createRef()})),e.kpi_type&&(J=Object.keys(J).filter((function(t){return J[t].kpi_type===e.kpi_type||J[t].reply})).map((function(e){return Z[J[e]._id]=o.a.createRef(),J[e]})));var Q=V&&V.kpi_ini?parseFloat(V.kpi_ini):0;o.a.useEffect((function(){return ee(),function(){u(!0),m(0),b(null),E(e.type?e.type:"comment"),S(null),F(!1),A(!1),B([]),G(!1)}}),[]),o.a.useEffect((function(){setTimeout((function(){S(null)}),2e3)}),[k]),o.a.useEffect((function(){!P&&document.getElementById("tms_".concat(e.nodeId))&&(document.getElementById("tms_".concat(e.nodeId)).addEventListener("resize",(function(e){return re()})),A(!0))})),o.a.useEffect((function(){var e=setTimeout((function(){}),1e5);return R&&(e=setTimeout((function(){ee(),G(!1)}),300)),function(){clearTimeout(e)}}),[R]);var ee=function(){var t=Object(Ee.a)($i().mark((function t(){var r,a;return $i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(r=be.getState().functions.socket)&&J&&e.nodeId&&q&&J.length>0&&J.filter((function(e){return e&&e.user&&e.user._id!==n._id&&(!e.readedBy||e.readedBy&&!e.readedBy[n._id])})).length>0&&(r.emit("data",{module:"chat",method:"put",action:"read"},{readedBy:n._id,id:e.nodeId,db:q,type:w}),Va(e,{readedBy:n._id,id:e.nodeId,db:q,type:w}),be.getState().db&&be.getState().db.cards&&be.getState().db.cards[e.nodeId]&&(a=0,U&&U[w]&&(a=parseInt(U[w])),e.reduxFunction("ASYNC","SET_NOTIFICATIONS",Object(h.a)(Object(h.a)({},be.getState().notifications),{},{total:be.getState().notifications.total-a})),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},e.nodeId,Object(h.a)({},be.getState().db.cards[e.nodeId])))}))));case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();o.a.useEffect((function(){return v!==e.nodeId?(m(0),u(!0),b(e.nodeId),re(!0),setTimeout((function(){re(!0)}),300),E(e.type?e.type:"comment")):w!==e.type&&E(e.type?e.type:"comment"),s&&ee(),function(){return!1}}),[e.nodeId,e.type,a]),o.a.useEffect((function(){!e.noAutoScroll&&s&&(re(),setTimeout((function(){re()}),300)),JSON.stringify(J)!==JSON.stringify(M)&&B(J)}),[JSON.stringify(J)]),o.a.useEffect((function(){M.filter((function(e){return n&&n._id&&e&&e.user&&e.user._id!==n._id&&(!e.readedBy||!e.readedBy[n._id])})).length>0&&ne()}),[JSON.stringify(M)]),o.a.useEffect((function(){J.filter((function(e){return e.type===w})).length<10&&(F(!0),te())}),[w,JSON.stringify(a)]);var te=function(){var t=Object(Ee.a)($i().mark((function t(){return $i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ka(Object(h.a)(Object(h.a)({},e),{},{fnIdentification:"Timeline/Index/init()",force:!0}),Object(h.a)({ids:e.nodeId,db:q,type:e.type?e.type:"comment"},"kpi"===e.type?{limit:!1,skip:!1,reqChildrens:!0}:{limit:!0,skip:J.filter((function(t){return t.type===e.type})).length>0?J.filter((function(t){return t.type===e.type})).length-1:0,reqChildrens:!1}));case 2:t.sent,F(!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),re=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(s||t){var r=document.getElementById("tms_".concat(e.nodeId));r&&(r.scrollTop=r.scrollHeight),ne()}},ne=function(){var e=Object(Ee.a)($i().mark((function e(t){return $i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s&&J.filter((function(e){return e&&e.user&&n&&n._id&&e.user._id!==n.id&&(!e.readedBy||e.readedBy&&!e.readedBy[n._id])})).length>0&&G(!0);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ae=function(){var t=Object(Ee.a)($i().mark((function t(){var r,n;return $i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=document.getElementById("tms_".concat(e.nodeId)))&&(r.scrollTop>r.scrollHeight-window.innerHeight-50?u(!0):u(!1)),!(r.scrollTop<50&&f<J.length)){t.next=9;break}return m(J.length),n=Object.keys(J).length>0&&Object.keys(J).filter((function(e){var t=t||"comment";if(J[e].type===t||J[e].reply&&Object.keys(J).filter((function(r){return J[r]&&J[r]._id===J[e].reply&&J[r].type===t})).length>0)return!0})).sort((function(e,t){return parseInt(J[e].created_at)<parseInt(J[t].created_at)?-1:J[e].created_at>J[t].created_at?1:0})).map((function(e){return J[e]}))[0],t.next=7,Ka(Object(h.a)(Object(h.a)({},e),{},{fnIdentification:"Timeline/Index/scrollFunction()"}),{ids:[e.nodeId],db:q,type:"comment",limit:!0,skip:J.length});case 7:t.sent&&n&&n._id&&oe(n._id);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),oe=function(){var t=Object(Ee.a)($i().mark((function t(r){var a,o,i,c=arguments;return $i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=c.length>1&&void 0!==c[1]&&c[1],F(!0),S(r),!e.store.timeline[e.nodeId]||e.store.timeline[e.nodeId][r]||"users"===q&&("users"!==q||!e.store.timeline[n._id]||e.store.timeline[n._id][r])){t.next=10;break}return t.next=6,Ka(Object(h.a)(Object(h.a)({},e),{},{fnIdentification:"Timeline/Index/scrollFunction()"}),{ids:[e.nodeId],db:q,toId:r});case 6:t.sent&&r&&setTimeout((function(){oe(r)}),1e3),t.next=11;break;case 10:a?(document.getElementById("msg_".concat(r)).scrollIntoView({behavior:"smooth"}),u(!1),F(!1)):(o=document.getElementById("msg_".concat(r)))&&o.offsetTop?(i=o.offsetTop,document.getElementById("tms_".concat(e.nodeId)).scrollTop=i,F(!1)):F(!1);case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:t.root},o.a.createElement("div",{className:(e.nodeId,t.content)},o.a.createElement("div",{className:t.timeline},o.a.createElement("ul",{className:e.showHeader?t.timelineSimpleWithHeader:t.timelineSimple,ref:X,id:"tms_".concat(e.nodeId),onScroll:function(e){ae(e)},style:{zIndex:1}},J&&Object.keys(J).length>0&&Object.keys(J).filter((function(e){if((!J[e].deleted||J[e].deleted&&J[e].user&&J[e].user._id&&J[e].user._id===n._id)&&(J[e].type===w||J[e].reply&&Object.keys(J).filter((function(t){return J[t]&&J[t]._id===J[e].reply&&J[t].type===w})).length>0))return!0})).sort((function(e,t){return J[e].created_at<J[t].created_at?-1:J[e].created_at>J[t].created_at?1:0})).map((function(r,n){var i=J[r];return Q=parseFloat(parseFloat(Q)+parseFloat(i.value)),i.balance=Q,i.files&&Object.keys(i.files).length>0&&Object.keys(i.files).map((function(e,t){var r=i.files[e];K.push(r)})),o.a.createElement("li",{className:t.item+""+Bi.a.MessageHighlight,key:i._id,ref:Z[i._id],id:"msg_".concat(i._id),style:Object(h.a)(Object(h.a)({},n-1===Object.keys(J).filter((function(e){var t=t||"comment";if(J[e].type===t||J[e].reply&&Object.keys(J).filter((function(r){return J[r]&&J[r]._id===J[e].reply&&J[r].type===t})).length>0)return!0})).length?{marginBottom:"80px !important"}:{}),k===i._id?{padding:"7px",backgroundColor:"#f4ebff",cursor:"pointer",marginBottom:"15px"}:{}),onClick:k?function(e){S(null),e.preventDefault()}:null},o.a.createElement(Ii,{openLightBox:function(t){var r;r=t,e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:K,file:r})},storie:i,reply:i&&i.reply&&J.filter((function(e){return e._id===i.reply})).length>0?J.filter((function(e){return e._id===i.reply}))[0]:null,hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId,replyClick:function(){oe(i.reply,!0)},showUserName:!!(a&&a.nodeId&&be.getState().db.cards&&be.getState().db.cards[a.nodeId]),onOpenReply:function(){Object.keys(J).length-1===n&&re(!0)}}),o.a.createElement("div",{style:{marginBottom:"15px",clear:"both"}}))})),o.a.createElement("div",{style:{clear:"both"}})),I?o.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}},o.a.createElement(Er,null)):e.noSearch?o.a.createElement(o.a.Fragment,null):o.a.createElement("div",{style:{position:"absolute",top:0,right:0}},o.a.createElement(zi,{db:q,nodeId:e.nodeId,onAction:function(e){oe(e._id,!0)}}))),!s&&o.a.createElement("div",{style:{position:"absolute",bottom:"100px",right:"15px",width:"33px",height:"33px",zIndex:100}},o.a.createElement(Ir,{icon:"arrow_downward",iconColor:"red",size:"33px",onClick:function(){re(!0)}}))),e.nodeId&&!e.disabledSend&&(!be.getState().db.cards[e.nodeId]||be.getState().db.cards[e.nodeId]&&(!be.getState().db.cards[e.nodeId].onlyAdminsSendMessages||be.getState().db.cards[e.nodeId]._users&&be.getState().db.cards[e.nodeId]._users[n._id]&&be.getState().db.cards[e.nodeId]._users[n._id].access>4))?o.a.createElement(o.a.Fragment,null,"users"!==q||"users"===q&&be.getState().db.users&&be.getState().db.users[e.nodeId]&&!be.getState().db.users[e.nodeId].deleted?o.a.createElement(Ho,{onSending:function(){u(!0),re(!0)},db:e.db?e.db:"cards",nodeId:e.nodeId,editorStyle:{padding:"7px"}}):o.a.createElement(o.a.Fragment,null)):be.getState().db.cards[e.nodeId]&&"chatGroup"===be.getState().db.cards[e.nodeId].type&&o.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:Mt("menu")}},Dt("$__onlyAdminsCanSendMessages",1))))}))),Ri=r(1419);function Gi(){Gi=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Hi=Object(_e.b)((function(e,t){return{}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=function(){var t=Object(Ee.a)(Gi().mark((function t(r,n){var a,o,i;return Gi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=n,o=be.getState().db[e.dbNode],!e.ws){t.next=9;break}return t.next=5,a.map(function(){var t=Object(Ee.a)(Gi().mark((function t(r,n){var i,c,l;return Gi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.value||!e.dbNode||0!==o.filter((function(e){return r&&r.label&&e.label===r.label||r&&r===e.label})).length){t.next=7;break}return t.next=3,Pt.post("node/add/".concat(e.dbNode),{name:r.trim(),secondaryParent:e.secondaryParent?e.secondaryParent:null});case 3:(i=t.sent)&&(0===o.filter((function(e){return e.value===i.data.id})).length&&(o.push({value:i.data.id,label:r}),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},Object(Oe.a)({},e.dbNode,o)))),0===a.filter((function(e){return e.value===i.data.id})).length&&(a.splice(n,1),a.push({value:i.data.id,label:r}))),t.next=8;break;case 7:o.filter((function(e){return r&&r.label&&e.label===r.label||r&&r===e.label})).length>0&&(c=o.filter((function(e){return r&&r.label&&e.label===r.label||r&&r===e.label}))[0])&&0===a.filter((function(e){return e.value===c.value})).length&&(a.splice(n,1),a.push({value:c.value,label:c.label}));case 8:return l=[],a.filter((function(e){e&&e.value&&l.push(e)})),a=Array.from(l),t.abrupt("return",a);case 12:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}());case 5:i=t.sent,Promise.all(i).then((function(){e.onChange&&e.onChange(r,a)})),t.next=10;break;case 9:e.onChange&&e.onChange(r,a);case 10:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),r=Object(h.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,o.a.createElement(Ri.a,Object.assign({},r,{onChange:function(e,r){t(e,r)}}))})),Wi=Object(bt.a)({root:Object(h.a)(Object(h.a)({},qe),{},{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:Mt("color")},"& label.MuiFormLabel-filled":{color:Mt("color"),marginTop:"standard"===Mt("fieldVariant")||"filled"===Mt("fieldVariant")?"-10px":0},"& label.Mui-focused":{color:Mt("color"),marginTop:"standard"===Mt("fieldVariant")||"filled"===Mt("fieldVariant")?"-10px":0},"& .MuiInput-underline:after":{borderBottomColor:Mt("line")},"& .MuiOutlinedInput-root":{borderRadius:Mt("fieldRadius"),"& fieldset":{borderColor:Mt("line")},"&.Mui-focused fieldset":{borderColor:Mt("line")}},"& .MuiFilledInput-root":{borderRadius:Mt("fieldRadius"),"& fieldset":{borderColor:Mt("line")},"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")},"&.Mui-focused":{borderBottomColor:Mt("line"),"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Mt("fieldVariant")?0:"filled"===Mt("fieldVariant")?"-15px":0,borderRadius:Mt("fieldRadius"),color:"#FFFFFF","& fieldset":{borderColor:Mt("line")},"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")},"&.Mui-focused":{borderBottomColor:Mt("line"),"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")}}}})})(Zn.a),Ui={labelTop:Object(h.a)(Object(h.a)({},qe),{},{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:Mt("color")},"& label.MuiFormLabel-filled":{color:Mt("color"),marginTop:"standard"===Mt("fieldVariant")||"filled"===Mt("fieldVariant")?"-10px":"0px"},"& label.Mui-focused":{color:Mt("color"),marginTop:"standard"===Mt("fieldVariant")||"filled"===Mt("fieldVariant")?"-10px":"0px"},"& .MuiInput-underline:after":{borderBottomColor:Mt("line")},"& .MuiOutlinedInput-root":{borderRadius:Mt("fieldRadius"),"& fieldset":{borderColor:Mt("line")},"&.Mui-focused fieldset":{borderColor:Mt("line")}},"& .MuiFilledInput-root":{borderRadius:Mt("fieldRadius"),"& fieldset":{borderColor:Mt("line")},"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")},"&.Mui-focused":{borderBottomColor:Mt("line"),"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Mt("fieldVariant")?"0px":"filled"===Mt("fieldVariant")?"-15px":"0px",borderRadius:Mt("fieldRadius"),color:"#FFFFFF","& fieldset":{borderColor:Mt("line")},"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")},"&.Mui-focused":{borderBottomColor:Mt("line"),"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")}}}}),noLabel:Object(h.a)(Object(h.a)({},qe),{},{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:Mt("color")},"& label.MuiFormLabel-filled":{display:"none"},"& label.Mui-focused":{display:"none"},"& .MuiInput-underline:after":{borderBottomColor:Mt("line")},"& .MuiOutlinedInput-root":{borderRadius:Mt("fieldRadius"),"& fieldset":{borderColor:Mt("line")},"&.Mui-focused fieldset":{borderColor:Mt("line")}},"& .MuiFilledInput-root":{borderRadius:Mt("fieldRadius"),"& fieldset":{borderColor:Mt("line")},"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")},"&.Mui-focused":{borderBottomColor:Mt("line"),"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")}}},"& .MuiInputLabel-outlined":{display:"none",marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{borderRadius:Mt("fieldRadius"),color:"#FFFFFF","& fieldset":{borderColor:Mt("line")},"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")},"&.Mui-focused":{borderBottomColor:Mt("line"),"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")}}}}),labelTopLight:Object(h.a)(Object(h.a)({},qe),{},{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:Mt("color")},"& label.MuiFormLabel-filled":{color:Mt("color"),marginTop:"standard"===Mt("fieldVariant")||"filled"===Mt("fieldVariant")?"-10px":"0px"},"& label.Mui-focused":{color:Mt("color"),marginTop:"standard"===Mt("fieldVariant")||"filled"===Mt("fieldVariant")?"-10px":"0px"},"& .MuiInput-underline:after":{borderBottomColor:Mt("line")},"& .MuiOutlinedInput-root":{borderRadius:Mt("fieldRadius"),"& fieldset":{borderColor:Mt("line")},"&.Mui-focused fieldset":{borderColor:Mt("line")}},"& .MuiFilledInput-root":{borderRadius:Mt("fieldRadius"),"& fieldset":{borderColor:Mt("line")},"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")},"&.Mui-focused":{borderBottomColor:Mt("line"),"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Mt("fieldVariant")?"0px":"filled"===Mt("fieldVariant")?"-15px":"0px",borderRadius:Mt("fieldRadius"),"& fieldset":{borderColor:Mt("line")},"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")},"&.Mui-focused":{borderBottomColor:Mt("line"),"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")}}}}),noLabelLight:Object(h.a)(Object(h.a)({},qe),{},{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:Mt("color")},"& label.MuiFormLabel-filled":{display:"none"},"& label.Mui-focused":{display:"none"},"& .MuiInput-underline:after":{borderBottomColor:Mt("line")},"& .MuiOutlinedInput-root":{borderRadius:Mt("fieldRadius"),"& fieldset":{borderColor:Mt("line")},"&.Mui-focused fieldset":{borderColor:Mt("line")}},"& .MuiFilledInput-root":{borderRadius:Mt("fieldRadius"),"& fieldset":{borderColor:Mt("line")},"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")},"&.Mui-focused":{borderBottomColor:Mt("line"),"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")}}},"& .MuiInputLabel-outlined":{display:"none",marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{borderRadius:Mt("fieldRadius"),"& fieldset":{borderColor:Mt("line")},"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")},"&.Mui-focused":{borderBottomColor:Mt("line"),"&::before":{borderBottomColor:Mt("line")},"&::after":{borderBottomColor:Mt("line")}}}})},Vi=Object(De.a)(Ui),qi=Object(bt.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)"}}}}))(mo.a);var Xi=function(e){var t=Vi(),r=o.a.useState([]),n=Object(je.a)(r,2),a=n[0],i=n[1];return o.a.useEffect((function(){i(e.value)}),[e.value]),o.a.createElement(Hi,{className:e.dark?e.noLabel?t.noLabel:t.labelTop:e.noLabel?t.noLabelLight:t.labelTopLight,value:a,options:e.options||[],getOptionLabel:function(e){return e&&e.label?Dt(e.label,1):""},name:"autoComplete_".concat(e.name||""),style:{width:"100%"},multiple:e.multiple||!1,limitTags:e.multiple?e.limitTags?e.limitTags:2:null,freeSolo:e.freeSolo||!1,disableClearable:e.disableClearable||!1,disabled:e.disabled,renderInput:function(t){return e.dark?o.a.createElement(Wi,Object.assign({},t,{label:Dt(e.placeholder||"$__values","*"),variant:"standard",InputProps:Object(h.a)(Object(h.a)({},t.InputProps),e.InputProps)})):o.a.createElement(Qn,Object.assign({},t,{label:Dt(e.placeholder||"$__values","*"),variant:"standard",InputProps:Object(h.a)(Object(h.a)({},t.InputProps),e.InputProps)}))},renderOption:function(e){return o.a.createElement("div",{style:{zIndex:3e3}},e.label)},renderTags:function(t,r){return t.map((function(t,n){return e.colorPicker?o.a.createElement(Hr,{key:n,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)}},o.a.createElement(qi,Object.assign({label:t&&t.label?t.label:null,style:{backgroundColor:t.color||Mt("color"),boxShadow:"0 0 7px 3px rgba(0,0,0,0.05)",color:Mt("lightText")}},r({index:n})))):o.a.createElement(qi,Object.assign({key:n,label:t&&t.label?t.label:null,style:{backgroundColor:t.color||Mt("color"),boxShadow:"0 0 7px 3px rgba(0,0,0,0.05)",color:Mt("lightText")}},r({index:n})))}))},onChange:function(t,r){e.onChange&&e.onChange(r);var n=[];e.multiple?(r.map((function(e){e&&e.label?n.push(e):n.push({label:e})})),i(n)):i(r)},dbNode:e.dbNode?e.dbNode:"tag",add:!(!e.add||!0!==e.add),inNode:e.inNode?e.inNode:null,secondaryParent:e.secondaryParent?e.secondaryParent:null,ws:!0})},Ki={instruction:{},picture:{}};function Ji(){Ji=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Zi=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Ki)((function(e){var t=o.a.useState([]),r=Object(je.a)(t,2),n=r[0],a=r[1];o.a.useEffect((function(){if(e.data.values){var t=[];e.data.values.filter((function(e){return e.value})).map((function(e){t.push(e)})),a(t)}}),[e.data]);var i=function(){var t=Object(Ee.a)(Ji().mark((function t(r){return Ji().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.callBack&&e.callBack(r),a(r);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return o.a.createElement("div",null,o.a.createElement(Xi,{dbNode:e.dbNode?e.dbNode:"tag",secondaryParent:e.secondaryParent?e.secondaryParent:null,options:e.options?e.options:[],style:{width:"100%"},name:e.name?e.name:"multInput",ws:!0,add:!0,colorPicker:!0,multiple:!0,freeSolo:!0,disableClearable:!0,disabled:!!e.disabled,value:n,placeholder:e.placeholder||null,onChange:function(e){i(e)},colorPickerCallBack:function(t){e.colorPickerCallBack&&e.colorPickerCallBack(t)}}))}))),Qi=r(1394),ec=Object(bt.a)({switchBase:{color:Mt("medium"),"&$checked":{color:Mt("color")},"&$checked + $track":{backgroundColor:Mt("color")}},checked:{},track:{}})(Qi.a),tc=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:Mt("color")}}},switch:{fontSize:"16px",fontWeight:"bold",color:Mt("medium")},accessDescription:{fontSize:"14px",color:Mt("medium")}}};function rc(){rc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var nc=Object(_e.b)((function(e,t){return{tag:e.db.tag,userGroup:e.db.userGroup,sideModule:e.sideModule}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(tc)((function(e){var t=e.classes,r=be.getState(),n=r.sideModule,a=r.db,i=(r.session,a.users),c=a.dataType,l=n.data,s=o.a.useState(!Bt(l&&l.email?l.email:"")),u=Object(je.a)(s,2),d=u[0],p=u[1],f=o.a.useState(!1),m=Object(je.a)(f,2),g=m[0],y=m[1],v=Ut(),b=function(t){var r=t.value;r&&y(!0),e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},n),{},{data:Object(h.a)(Object(h.a)({},n.data),{},Object(Oe.a)({},t.name,r))}))},x=function(t){g&&!t?$t({message:Dt("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},_=function(){var t=Object(Ee.a)(rc().mark((function t(r){var a;return rc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return y(!1),t.next=3,fa(l.email);case 3:if(a=t.sent,l.name){t.next=8;break}$t({message:Dt("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=20;break;case 8:if(-1!==c.filter((function(e){return e.name===l.type}))[0].disabledFields.indexOf("email")||!d){t.next=12;break}$t({message:d,variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=20;break;case 12:if(-1!==c.filter((function(e){return e.name===l.type}))[0].disabledFields.indexOf("email")||!(!Bt(n.data.email)||i[l._id]&&l.email!==i[l._id].email&&a)){t.next=16;break}p(Dt("$__invalidEmail",1)),t.next=20;break;case 16:return t.next=18,ua(e);case 18:t.sent&&($t({message:Dt("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&x(!0));case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),w=!1;return v&&v.user&&(v.userAdmin||v.userEdit)&&(w=!0),console.log(l),l.independentAccount&&(w=!1),o.a.createElement("div",null,o.a.createElement(Ti,{save:w&&g?function(){return _()}:null,saveClose:w&&g?function(){return _(!0)}:null,close:function(){return x(!0)}}),w||!w&&n.data.image,o.a.createElement("div",{id:"sideModule_user_foto"},o.a.createElement(Qo,{maxWidthOrHeight:600,img:n.data&&n.data.image?n.data.image:null,onChange:w?function(e,t){b({name:"file",value:t})}:null,avatar:!0,avatarIcon:l.type&&"user"!==l.type?l.type&&"group"!==l.type?"business":"groups":"person"})),o.a.createElement("form",{className:t.data,autoComplete:"off",id:"sideModule_user_data"},o.a.createElement(Qn,{id:"sideModule_user_fullName",label:Dt("$__fullName",1),variant:Mt("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"person"})),onChange:function(e){b(e.target)},onBlur:function(e){if(l&&!l.name){var t=e.target.value?"".concat(e.target.value.split(" ")[0]," ").concat(e.target.value.split(" ")[1]?e.target.value.split(" ")[1]:""):"";b({name:"name",value:t.trim()})}}},value:l&&l.fullName?l.fullName:"",placeholder:Dt("$__fullName",1),autoFocus:!0,disabled:!w}),o.a.createElement(Qn,{id:"sideModule_user_displayName",label:Dt("$__displayName",1),variant:Mt("fieldVariant"),name:"name",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"view_comfy_ind"})),onChange:function(e){b(e.target)},onBlur:function(e){b(e.target)}},value:l&&l.name?l.name:"",placeholder:Dt("$__displayName",1),disabled:!w}),-1===c.filter((function(e){return e.name===l.type}))[0].disabledFields.indexOf("email")&&o.a.createElement(Qn,{id:"sideModule_user_email",label:Dt("$__email",1),variant:Mt("fieldVariant"),name:"email",type:"email",helperText:d,InputProps:{autoComplete:"new-password",className:!d&&l.email&&Bt(l&&l.email?l.email:"")?"":"invalid",endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"alternate_email"})),onChange:function(e){p(null),b(e.target)},onBlur:function(){var e=Object(Ee.a)(rc().mark((function e(t){var r;return rc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(l._id&&"new"!==l._id&&i[l._id]&&i[l._id].email!==t.target.value||!l._id||"new"===l._id)){e.next=9;break}if(!Bt(t.target.value)||i[l._id]&&t.target.value===i[l._id].email){e.next=8;break}return e.next=4,fa(t.target.value);case 4:r=e.sent,p(r?Dt("$__emailAlreadyExists",1):null),e.next=9;break;case 8:p(Dt("$__invalidEmail",1));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},value:l&&l.email?l.email:"",placeholder:Dt("$__email",1),disabled:!w}),w&&v&&v.user&&(v.userAdmin||v.userEdit)?o.a.createElement(o.a.Fragment,null,o.a.createElement("fieldset",{style:{marginBottom:"14px"},id:"sideModule_user_tags"},o.a.createElement(Zi,{data:{values:l.tags||[],_id:l._id},options:be.getState().db.tag?be.getState().db.tag:[],placeholder:"$__tagsPlaceholder",dbNode:"tag",callBack:function(e){b({name:"tags",value:e})},secondaryParent:l._parent,colorPickerCallBack:function(e){be.getState().functions.socket.emit("tag.UPD",e)}})),o.a.createElement("fieldset",{style:{marginBottom:"14px"},id:"sideModule_user_group"},o.a.createElement(Zi,{data:{values:l.groups||[],_id:l._id},options:be.getState().db.userGroup?be.getState().db.userGroup:[],placeholder:"$__userGroupPlaceholder",dbNode:"userGroup",callBack:function(e){b({name:"groups",value:e})},secondaryParent:l._parent,colorPickerCallBack:function(e){}}))):o.a.createElement(o.a.Fragment,null)))})));function ac(e){var t=o.a.useState({cPassword:"",password:""}),r=Object(je.a)(t,2),n=r[0],a=r[1],i=o.a.useState(!1),c=Object(je.a)(i,2),l=c[0],s=c[1],u=o.a.useState(0),d=Object(je.a)(u,2),p=d[0],f=d[1],m=o.a.useState(0),g=Object(je.a)(m,2),y=g[0],v=g[1];o.a.useEffect((function(){e.clear&&e.clear!==y&&(v(e.clear),a({cPassword:"",password:""}),s(!1))}));return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{textAlign:"left"}},o.a.createElement("p",null,Dt("$__passwordTip_1")),o.a.createElement("p",null,Dt("$__passwordTip_2")),o.a.createElement("ul",null,o.a.createElement("li",null,Dt("$__passwordTip_3")),o.a.createElement("li",null,Dt("$__passwordTip_4")),o.a.createElement("li",null,Dt("$__passwordTip_5")),o.a.createElement("li",null,Dt("$__passwordTip_6")),o.a.createElement("li",null,Dt("$__passwordTip_7")))),o.a.createElement(Qn,{label:Dt("$__password",1),variant:"standard",name:"password_primary",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:n.password,endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,null,"lock_outline")),autoComplete:"new-password",onChange:function(e){a(Object(h.a)(Object(h.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:f(0);break;case 1:f(1);break;case 2:f(2);break;case 3:f(3);break;case 4:f(4)}e.length<8&&f(0)}(e.target.value),p>2&&n.password===e.target.value?s(!0):s(!1)}},value:n.password}),o.a.createElement(Qn,{label:Dt("$__passwordConfirm",1),variant:"standard",name:"password_secondary",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:n.cPassword,endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{color:l?"green":"lightgray"},l?"verified":"check")),autoComplete:"new-password",onChange:function(t){a(Object(h.a)(Object(h.a)({},n),{},{cPassword:t.target.value})),p>2&&n.password===t.target.value?(s(!0),e.onConfirmed(t.target.value)):(s(!1),e.onConfirmed(null))}},value:n.cPassword}),n.password&&p>0&&o.a.createElement("div",{style:{position:"relative",width:"100%",margin:"auto",marginBottom:"7px",padding:"3px 0"}},1===p?Dt("$__passwordTooWeak",1):2===p?Dt("weakPassword",1):3===p?Dt("$__goodPassword",1):4===p?Dt("$__veryGoodPassword",1):null),n.password&&o.a.createElement("div",{style:{position:"relative",width:"100%",margin:"auto",height:"13px",padding:"3px 0",border:"1px solid rgba(0,0,0,0.1)"}},p>=0&&o.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(20% - 6px)",height:"5px",backgroundColor:"red",margin:"0 3px"}}),p>=1&&o.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(20% - 6px)",height:"5px",backgroundColor:"rgb(129,153,179)",margin:"0 3px"}}),p>=2&&o.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(20% - 6px)",height:"5px",backgroundColor:"rgb(95,151,254)",margin:"0 3px"}}),p>=3&&o.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(20% - 6px)",height:"5px",backgroundColor:"rgb(42,66,255)",margin:"0 3px"}}),4===p&&o.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(20% - 6px)",height:"5px",backgroundColor:"rgb(38,165,45)",margin:"0 3px"}})))}var oc=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:Mt("medium")}}};function ic(){ic=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var cc=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(oc)((function(e){var t,r=e.classes,n=be.getState(),a=n.sideModule,i=(n.db,n.session),c=n.functions.socket,l=a.data,s=o.a.useState(!1),u=Object(je.a)(s,2),d=u[0],p=u[1],f=o.a.useState(null),m=Object(je.a)(f,2),g=m[0],y=m[1],v=o.a.useState(0),b=Object(je.a)(v,2),x=b[0],_=b[1],w=Ut(),E=function(t){return p(!0),e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},a),{},{data:Object(h.a)(Object(h.a)({},a.data),{},{_access:Object(h.a)(Object(h.a)({},a.data._access),{},Object(Oe.a)({},t.name,t.value))})})),!0},O=function(t){!t&&d?$t({message:Dt("$__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(Ee.a)(ic().mark((function t(r){return ic().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return p(!1),t.next=3,da(e);case 3:t.sent&&($t({message:Dt("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&O(!0));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),k=function(){var e=Object(Ee.a)(ic().mark((function e(){return ic().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c.emit("data",{module:"user",method:"post",action:"accessSendInvite"},{_id:be.getState().sideModule.data._id,name:be.getState().sideModule.data.name,email:be.getState().sideModule.data.email},(function(e){$t({message:Dt("$__invitedEmailSended",1),variant:"success",persist:!1,horizontal:"center"})}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),S=function(){var e=Object(Ee.a)(ic().mark((function e(){return ic().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Pt.post("/user/new-password",{userId:l._id,password:g});case 3:e.sent&&(y(null),$t({message:Dt("$__passwordChanged",1),variant:null,persist:!1,horizontal:"right",confirm:null})),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),$t({message:"".concat(Dt("$__invalidRequest",1)," | ").concat(Dt("$__contactSupport",1)),variant:"warning",persist:!1,horizontal:"right",confirm:null});case 10:_(x+1);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}();return l._access&&l._access.owner&&i._id!==l._id||i._id===l._id?o.a.createElement("div",null,o.a.createElement(Ti,{save:d?function(){return j()}:null,saveClose:d?function(){return j(!0)}:null,close:function(){return O(!0)}}),o.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},o.a.createElement("div",{style:{position:"relative",width:"100%"}},o.a.createElement(ac,{onConfirmed:function(e){y(e)},clear:x})),g&&o.a.createElement("div",{style:(t={display:"flex",padding:"7px 15px",margin:"auto",cursor:"pointer",backgroundColor:"green",marginTop:"15px"},Object(Oe.a)(t,"display","flex"),Object(Oe.a)(t,"alignItems","center"),Object(Oe.a)(t,"justifyContent","center"),Object(Oe.a)(t,"borderRadius","7px"),t),onClick:function(){S()}},o.a.createElement(Ir,{icon:"save",text:Dt("$__save","*"),title:!Dt("$__save","*"),iconColor:Mt("lightText"),textColor:Mt("lightText")})))):o.a.createElement("div",null,o.a.createElement(Ti,{save:d?function(){return j()}:null,saveClose:d?function(){return j(!0)}:null,close:function(){return O(!0)}}),o.a.createElement("div",{className:r.data},l._access&&"owner"===l._access?o.a.createElement("fieldset",null,o.a.createElement("div",{className:r.accessDescription},o.a.createElement("i",null," ",Dt("$__youAreAccountOwner",1)))):o.a.createElement("fieldset",null,o.a.createElement("div",{className:r.switch},o.a.createElement(ec,{checked:!(!l._access||!l._access.enabled),onChange:function(e){E({name:"enabled",value:!l._access||!l._access.enabled})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__permitPlataformAccess",1)),o.a.createElement("div",{className:r.accessDescription},o.a.createElement("i",null,Dt("$__userAccess_PlataformAccessDescription",1)))),l._access&&l._access.enabled&&o.a.createElement(o.a.Fragment,null,o.a.createElement(o.a.Fragment,null,console.log(l),l._token&&o.a.createElement("fieldset",{style:{backgroundColor:"rgba(255,0,0,0.1)"}},o.a.createElement("i",null,Dt("$__unregisteredUserAlert",1)),o.a.createElement(Ir,{text:Dt("$__sendInviteEmail",1),icon:"contact_mail",onClick:function(){k()}})),l._token&&l._token._id&&o.a.createElement("fieldset",{style:{backgroundColor:"rgba(255,0,0,0.1)"}},o.a.createElement("i",null,Dt("$__urlToActivate",1)),o.a.createElement("input",{type:"text",value:"".concat("true"===String("true")?"https://software.machen.ai":"http://localhost:3000","/activate?token=").concat(l._token._id),onClick:function(e){e.target.select()},onChange:function(e){console.log("a")}}))),o.a.createElement("fieldset",null,o.a.createElement("legend",null,o.a.createElement(ec,{checked:!(!l._access||!l._access.user),onChange:function(e){E({name:"user",value:!l._access||!l._access.user})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__users",1)),l._access&&(!l._access||l._access.user&&!1!==l._access.user)?o.a.createElement(o.a.Fragment,null,!l._access.userAdmin&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:r.switch},o.a.createElement(ec,{checked:!(!l._access||!l._access.userRead),onChange:function(e){E({name:"userRead",value:!l._access||!l._access.userRead})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__read",1)),o.a.createElement("div",{className:r.switch},o.a.createElement(ec,{checked:!(!l._access||!l._access.userInteract),onChange:function(e){E({name:"userInteract",value:!l._access||!l._access.userInteract})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__interact",1)),o.a.createElement("div",{className:r.switch},o.a.createElement(ec,{checked:!(!l._access||!l._access.userEdit),onChange:function(e){E({name:"userEdit",value:!l._access||!l._access.userEdit})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__edit",1))),o.a.createElement("div",{className:r.switch},o.a.createElement(ec,{checked:!(!l._access||!l._access.userAdmin),onChange:function(e){E({name:"userAdmin",value:!l._access||!l._access.userAdmin})},name:"checkeduserAdmin",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__admin",1))):o.a.createElement("div",{className:r.accessDescription},o.a.createElement("i",null,Dt("$__userAccess_UserAccessDescription",1)))),o.a.createElement("fieldset",null,o.a.createElement("legend",null,o.a.createElement(ec,{checked:!(!l._access||!l._access.plan),onChange:function(e){E({name:"plan",value:!l._access||!l._access.plan})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__plan",1)),l._access&&(!l._access||l._access.plan&&!1!==l._access.plan)?o.a.createElement(o.a.Fragment,null,!l._access.planAdmin&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:r.switch},o.a.createElement(ec,{checked:!(!l._access||!l._access.planRead),onChange:function(e){E({name:"planRead",value:!l._access||!l._access.planRead})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__read",1)),o.a.createElement("div",{className:r.switch},o.a.createElement(ec,{checked:!(!l._access||!l._access.planEdit),onChange:function(e){E({name:"planEdit",value:!l._access||!l._access.planEdit})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__edit",1)),o.a.createElement("div",{className:r.switch},o.a.createElement(ec,{checked:!(!l._access||!l._access.createTemplate),onChange:function(e){E({name:"createTemplate",value:!l._access||!l._access.createTemplate})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__createTemplate",1)),o.a.createElement("div",{className:r.switch},o.a.createElement(ec,{checked:!(!l._access||!l._access.planModerate),onChange:function(e){E({name:"planModerate",value:!l._access||!l._access.planModerate})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__moderate",1))),o.a.createElement("div",{className:r.switch},o.a.createElement(ec,{checked:!(!l._access||!l._access.planAdmin),onChange:function(e){E({name:"planAdmin",value:!l._access||!l._access.planAdmin})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__admin",1))):o.a.createElement("div",{className:r.accessDescription},o.a.createElement("i",null,Dt("$__userAccess_StrategyAndPlansAccessDescription")))),w&&w.master?o.a.createElement("fieldset",null,o.a.createElement("legend",null,o.a.createElement(ec,{checked:!(!l._access||!l._access.feed),onChange:function(e){E({name:"feed",value:!l._access||!l._access.feed})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__feed",1)),l._access&&(!l._access||l._access.feed&&!1!==l._access.feed)?o.a.createElement(o.a.Fragment,null,!l._access.feedAdmin&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:r.switch},o.a.createElement(ec,{checked:!(!l._access||!l._access.feedEdit),onChange:function(e){E({name:"feedEdit",value:!l._access||!l._access.feedEdit})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__edit",1)),o.a.createElement("div",{className:r.switch},o.a.createElement(ec,{checked:!(!l._access||!l._access.feedModerate),onChange:function(e){E({name:"feedModerate",value:!l._access||!l._access.feedModerate})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__moderate",1))),o.a.createElement("div",{className:r.switch},o.a.createElement(ec,{checked:!(!l._access||!l._access.feedAdmin),onChange:function(e){E({name:"feedAdmin",value:!l._access||!l._access.feedAdmin})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__admin",1))):o.a.createElement("div",{className:r.accessDescription},o.a.createElement("i",null,Dt("$__feedAccess_StrategyAndPlansAccessDescription")))):o.a.createElement(o.a.Fragment,null))))})));function lc(){lc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var sc=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(oc)((function(e){e.classes;var t,r,n,i=be.getState(),c=i.sideModule,l=(i.db,i.session,i.functions.socket,c.data,o.a.useState(!1)),s=Object(je.a)(l,2),u=s[0],d=(s[1],o.a.useState((t={image:null},Object(Oe.a)(t,"image",null),Object(Oe.a)(t,"status",!1),t))),p=Object(je.a)(d,2),f=p[0],m=p[1],g=o.a.useState(null),y=Object(je.a)(g,2),v=y[0],b=y[1];Object(a.useEffect)((function(){x()}),[]);var x=function(){var e=Object(Ee.a)(lc().mark((function e(){var t,r;return lc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qr.post("/M_User_TwoFactor",{action:"has"});case 2:if(!((t=e.sent)&&t.data&&t.data.result)){e.next=7;break}m(Object(h.a)(Object(h.a)(Object(h.a)({},f),t.data.result),{},{status:!0})),e.next=11;break;case 7:return e.next=9,Qr.post("/M_User_TwoFactor",{action:"create"});case 9:(r=e.sent)&&m(Object(h.a)(Object(h.a)(Object(h.a)({},f),r.data.result),{},{status:!1}));case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_=function(){var e=Object(Ee.a)(lc().mark((function e(){var t;return lc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qr.post("/M_User_TwoFactor",{action:"verify",code:v});case 2:(t=e.sent)&&t.data&&t.data.result?m(Object(h.a)(Object(h.a)({},f),{},{status:!0})):($t({message:Dt("$__invalidToken",1),variant:"warning",persist:!1,horizontal:"right"}),m(Object(h.a)(Object(h.a)({},f),{},{status:!1}))),b(null);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),w=function(){var e=Object(Ee.a)(lc().mark((function e(){var t,r;return lc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qr.post("/M_User_TwoFactor",{action:"disable",code:v});case 2:(t=e.sent)&&t.data&&t.data.result?(m((r={image:null},Object(Oe.a)(r,"image",null),Object(Oe.a)(r,"status",!1),r)),x()):$t({message:Dt("$__invalidToken",1),variant:"warning",persist:!1,horizontal:"right"}),b(null);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return o.a.createElement("div",null,o.a.createElement(Ti,{close:function(){u?$t({message:Dt("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")}}),f.status?o.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},o.a.createElement("div",{style:{textAlign:"left"}},o.a.createElement("p",null,Dt("$__disableTokenTip_1")),o.a.createElement("p",null,Dt("$__disableTokenTip_2")),o.a.createElement("ul",null,o.a.createElement("li",null,Dt("$__disableTokenTip_3")),o.a.createElement("li",null,Dt("$__disableTokenTip_4")),o.a.createElement("li",null,Dt("$__disableTokenTip_5")),o.a.createElement("li",null,Dt("$__disableTokenTip_6")),o.a.createElement("li",null,Dt("$__disableTokenTip_7")))),o.a.createElement(Qn,{label:Dt("$__token",1),variant:"standard",name:"token",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:v,endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,null,"lock_outline")),autoComplete:"new-password",onChange:function(e){b(e.target.value)}},autoComplete:"new-password",value:v,max:6}),o.a.createElement("div",{style:(n={display:"flex",padding:"7px 15px",margin:"auto",cursor:"pointer",backgroundColor:"red",marginTop:"15px"},Object(Oe.a)(n,"display","flex"),Object(Oe.a)(n,"alignItems","center"),Object(Oe.a)(n,"justifyContent","center"),Object(Oe.a)(n,"borderRadius","7px"),n),onClick:function(){w()}},o.a.createElement(Ir,{icon:"toggle_on",text:Dt("$__disableToken","*"),title:Dt("$__disableToken","*"),iconColor:Mt("lightText"),textColor:Mt("lightText")}))):o.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},o.a.createElement("div",{style:{position:"relative",width:"100%"}},f.image&&o.a.createElement("img",{src:f.image})),o.a.createElement("div",{style:{textAlign:"left"}},o.a.createElement("p",null,Dt("$__tokenTip_1")),o.a.createElement("p",null,Dt("$__tokenTip_2")),o.a.createElement("ul",null,o.a.createElement("li",null,Dt("$__tokenTip_3")),o.a.createElement("li",null,Dt("$__tokenTip_4")),o.a.createElement("li",null,Dt("$__tokenTip_5")),o.a.createElement("li",null,Dt("$__tokenTip_6")),o.a.createElement("li",null,Dt("$__tokenTip_7")))),o.a.createElement("fieldset",null,o.a.createElement("legend",null,Dt("$__token",1)),o.a.createElement(Qn,{label:Dt("$__token",1),variant:"standard",name:"token",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:v,endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,null,"lock_outline")),autoComplete:"new-token",onChange:function(e){b(e.target.value)}},placeholder:Dt("$__token","*"),autoComplete:"new-token",value:v,max:6})),!f.status&&v&&6===v.length&&o.a.createElement("div",{style:(r={display:"flex",padding:"7px 15px",margin:"auto",cursor:"pointer",backgroundColor:"green",marginTop:"15px"},Object(Oe.a)(r,"display","flex"),Object(Oe.a)(r,"alignItems","center"),Object(Oe.a)(r,"justifyContent","center"),Object(Oe.a)(r,"borderRadius","7px"),r),onClick:function(){_()}},o.a.createElement(Ir,{icon:"check",text:Dt("$__activeToken","*"),title:!Dt("$__activeToken","*"),iconColor:Mt("lightText"),textColor:Mt("lightText")}))))})));function uc(){uc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var dc=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(oc)((function(e){var t=e.classes,r=be.getState(),n=r.sideModule,a=r.db,i=o.a.useState(!1),c=Object(je.a)(i,2),l=c[0],s=c[1],u=o.a.useState(n.data),d=Object(je.a)(u,2),p=d[0],f=d[1],m=o.a.useState(n.data&&n.data.language?n.data.language:null),g=Object(je.a)(m,2),y=g[0],v=g[1],b=function(t){var r=Object(h.a)(Object(h.a)({},p),{},Object(Oe.a)({},t.name,t.value));v(t.value),e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},n),{},{data:Object(h.a)(Object(h.a)({},n.data),{},Object(Oe.a)({},t.name,t.value))})),s(!0),f(r)},x=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];l&&!t?$t({message:Dt("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},_=function(){var t=Object(Ee.a)(uc().mark((function t(r){return uc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s(!1),t.next=3,ua(e);case 3:t.sent&&($t({message:Dt("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),e.reduxFunction("ASYNC","SET_SESSION",Object(h.a)(Object(h.a)({},be.getState().session),{},{language:y})),r&&(x(!0),setTimeout((function(){window.location.reload()}),1500)));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),w=Ut(),E=!1;return w&&w.user&&(w.userAdmin||w.userEdit)&&(E=!0),o.a.createElement("div",null,o.a.createElement(Ti,{save:l?function(){return _()}:null,saveClose:l?function(){return _(!0)}:null,close:function(){return x(!0)}}),o.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},o.a.createElement("fieldset",null,o.a.createElement("legend",null,Dt("$__language",1)),o.a.createElement(Hi,{id:"combo-box-demo",options:a.languages,getOptionLabel:function(e){return Dt(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:p&&p.language&&a.languages?a.languages.filter((function(e){return String(e.value)===String(p.language)}))[0]:a.languages[0],renderInput:function(e){return o.a.createElement(Qn,Object.assign({},e,{label:Dt("$__language",1),variant:Mt("fieldVariant"),value:p&&p.language&&a.languages?a.languages.filter((function(e){return String(e.value)===String(p.language)}))[0]:a.languages[0]}))},onChange:function(e,t){b({name:"language",value:t.value})}})),o.a.createElement("fieldset",null,o.a.createElement("legend",null,Dt("$__sessionDuration",1)),o.a.createElement("div",null,Dt("$__sessionDurationDescription",1)),o.a.createElement(Hi,{id:"combo-box-demo",options:a.expiresIn,getOptionLabel:function(e){return Dt(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:p&&p.expiresIn&&a.expiresIn?a.expiresIn.filter((function(e){return String(e.value)===String(p.expiresIn)}))[0]:a.expiresIn.filter((function(e){return!e.value}))[0],renderInput:function(e){return o.a.createElement(Qn,Object.assign({},e,{label:Dt("$__expiresIn",1),variant:Mt("fieldVariant"),value:p&&p.expiresIn&&a.expiresIn?a.expiresIn.filter((function(e){return String(e.value)===String(p.expiresIn)}))[0]:a.expiresIn.filter((function(e){return!e.value}))[0]}))},onChange:function(e,t){b({name:"expiresIn",value:t.value})}})),be.getState().session.isResale?o.a.createElement("fieldset",{style:{marginBottom:"14px"}},be.getState().db.users[p._id].independentAccount?o.a.createElement("div",{style:{color:"gray",fontSize:11}},Dt("$__thisIsAIndependentAccountExplain",1)):o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:t.switch},o.a.createElement(ec,{checked:!!p.independentAccount,onChange:function(e){E&&b({name:"independentAccount",value:!p.independentAccount})},name:"independentAccount",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__turnIntoIndependentAccount",1)),o.a.createElement("div",{style:{color:"gray",fontSize:11}},Dt("$__turnIntoIndependentAccountExplain",1)))):o.a.createElement(o.a.Fragment,null)))})));function pc(){pc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var fc=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(oc)((function(e){var t=e.classes,r=be.getState(),n=r.sideModule,a=(r.db,o.a.useState(!1)),i=Object(je.a)(a,2),c=i[0],l=i[1],s=o.a.useState(n.data),u=Object(je.a)(s,2),d=u[0],p=u[1],f=o.a.useState(n.data&&n.data.language?n.data.language:null),m=Object(je.a)(f,2),g=(m[0],m[1],function(t){var r=Object(h.a)(Object(h.a)({},d),{},Object(Oe.a)({},t.name,t.value));e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},n),{},{data:Object(h.a)(Object(h.a)({},n.data),{},Object(Oe.a)({},t.name,t.value))})),l(!0),p(r)}),y=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];c&&!t?$t({message:Dt("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},v=function(){var t=Object(Ee.a)(pc().mark((function t(r){return pc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l(!1),t.next=3,ua(e);case 3:t.sent&&($t({message:Dt("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&y(!0));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),b=Ut(),x=!1;return b&&b.user&&(b.userAdmin||b.userEdit)&&(x=!0),o.a.createElement("div",null,o.a.createElement(Ti,{save:c?function(){return v()}:null,saveClose:c?function(){return v(!0)}:null,close:function(){return y(!0)}}),o.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},o.a.createElement("fieldset",null,o.a.createElement("legend",null,Dt("$__limitNumberOfUsers",1)),o.a.createElement("div",null,Dt("$__limitUsersExplain",1),o.a.createElement(Qn,{label:Dt("$__numberOfUsers"),variant:"outlined",name:"maxUsers",type:"number",min:0,max:99999,InputLabelProps:{shrink:!0},InputProps:{type:"number",onChange:function(e){g({name:"maxUsers",value:e.target.value>0?e.target.value:0})}},value:d.maxUsers||0}))),be.getState().session.isResale?o.a.createElement("fieldset",{style:{marginBottom:"14px"}},be.getState().db.users[d._id].independentAccount?o.a.createElement("div",{style:{color:"gray",fontSize:11}},Dt("$__thisIsAIndependentAccountExplain",1)):o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:t.switch},o.a.createElement(ec,{checked:!!d.independentAccount,onChange:function(e){x&&g({name:"independentAccount",value:!d.independentAccount})},name:"independentAccount",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__turnIntoIndependentAccount",1)),o.a.createElement("div",{style:{color:"gray",fontSize:11}},Dt("$__turnIntoIndependentAccountExplain",1)))):o.a.createElement(o.a.Fragment,null)))}))),hc=r(773),mc=r.n(hc),gc=r(774),yc=r.n(gc);function vc(){vc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var bc=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(oc)((function(e){e.classes;var t,r=be.getState(),n=r.sideModule,i=(r.db,r.session,r.functions.socket,n.data,o.a.useState(!1)),c=Object(je.a)(i,2),l=c[0],s=(c[1],o.a.useState((t={image:null},Object(Oe.a)(t,"image",null),Object(Oe.a)(t,"status",!1),t))),u=Object(je.a)(s,2),d=(u[0],u[1],o.a.useState(null)),p=Object(je.a)(d,2);p[0],p[1],Object(a.useEffect)((function(){f()}),[]);var f=function(){var e=Object(Ee.a)(vc().mark((function e(){return vc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return o.a.createElement("div",null,o.a.createElement(Ti,{close:function(){l?$t({message:Dt("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")}}),o.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},o.a.createElement("div",{style:{textAlign:"left"}},o.a.createElement("p",null,Dt("$__mobileTokenTip_1")),o.a.createElement("ul",null,o.a.createElement("li",null,Dt("$__mobileTokenTip_2")),o.a.createElement("li",null,Dt("$__mobileTokenTip_3")),o.a.createElement("li",null,Dt("$__mobileTokenTip_4")))),o.a.createElement("img",{src:yc.a,style:{width:"52%"}}),o.a.createElement("img",{src:mc.a,style:{width:"52%",marginTop:"33px"}})))}))),xc=Object(_e.b)((function(e){return{timeline:e.timeline&&e.sideModule.id&&e.timeline[e.sideModule.id]?e.timeline[e.sideModule.id]:{},sideModule:e.sideModule}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Ni)((function(e){var t=e.classes,r=e.sideModule,n={};return e.count&&(n=Gn(r.id)),o.a.createElement("div",{className:t.MenuButton,id:"sideModule_buttom_".concat(e.module)},o.a.createElement(kt.a,{onClick:function(){e.openModule(e.module)}},o.a.createElement(St.a,{badgeContent:e.count&&n&&n[e.count]?n[e.count]:null,color:"secondary"},o.a.createElement(wt,{disabled:r.activeModule!==e.module,icon:e.icon,size:e.size,color:Mt("light"),title:e.title})),r.activeModule===e.module&&o.a.createElement(wt,{className:t.MenuButton_arrow,color:Mt("color"),icon:"play_arrow"})))}))),_c=r(1395),wc=r(775),Ec=r.n(wc);function Oc(e){var t=o.a.useState(!1),r=Object(je.a)(t,2),n=r[0],a=r[1],i=o.a.useRef(null),c=o.a.useState(0),l=Object(je.a)(c,2),s=l[0],u=l[1];o.a.useEffect((function(){u(e.value?e.value:e.defaultValue?e.defaultValue:0)}),[e.value]);var d=function(){a((function(e){return!e}))},p=function(e){i.current&&i.current.contains(e.target)||a(!1)};return o.a.createElement(o.a.Fragment,null,o.a.createElement(_c.a,{variant:"text",ref:i,"aria-label":"split button"},o.a.createElement(Ge.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),o.a.createElement(Ge.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},o.a.createElement(Ec.a,null))),o.a.createElement(Rr.a,{open:n,anchorEl:i.current,role:void 0,transition:!0},(function(t){var r=t.TransitionProps,n=t.placement;return o.a.createElement($r.a,Object.assign({},r,{style:{transformOrigin:"bottom"===n?"center top":"center bottom"}}),o.a.createElement(Yr.a,null,o.a.createElement(Br.a,{onClickAway:p},o.a.createElement(qr.a,{id:"split-button-menu"},e.options.map((function(t,r){return o.a.createElement(Vr.a,{key:t.value,selected:t.value===s,onClick:function(){u(t.value),d(),e.onChange&&e.onChange(t.value)}},t.label)}))))))})))}var jc=Object(De.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)}}})),kc={recurrence:"0",recurrenceRepeatDays:null,recurrenceEndDate:null,recurrenceLimit:null,recurrenceMyDay:null,recurrenceOnlyCompleted:null,recurrenceDuplicateCard:null};var Sc=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=o.a.useState({recurrence:"0"}),r=Object(je.a)(t,2),n=r[0],a=r[1],i=jc();o.a.useEffect((function(){a({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})}),[]),o.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=Fe()(1e3*e.data.startDate).tz("America/Sao_Paulo").add(r,"d").format("YYYY-MM-DD");return Fe()(1e3*e.data.startDate).tz("America/Sao_Paulo").add(r,"d").unix("X")<Fe()().tz("America/Sao_Paulo").unix("X")&&(n=Fe()().tz("America/Sao_Paulo").add(r,"d").format("YYYY-MM-DD")),Object(h.a)(Object(h.a)({},t),{},{recurrenceNextDate:n})}(t)),t.recurrence&&parseInt(t.recurrence)>0&&parseInt(t.recurrence)<31&&(r=Object(h.a)(Object(h.a)({},r),{},{recurrenceNextDate:Fe()().tz("America/Sao_Paulo").add(parseInt(t.recurrence),"days").format("YYYY-MM-DD")})),"everyFriday"===t.recurrence&&(r=Object(h.a)(Object(h.a)({},r),{},{recurrenceNextDate:Fe()().tz("America/Sao_Paulo").add(1,"weeks").isoWeekday(5).format("YYYY-MM-DD")})),"everyMonday"===t.recurrence&&(r=Object(h.a)(Object(h.a)({},r),{},{recurrenceNextDate:Fe()().tz("America/Sao_Paulo").add(1,"weeks").isoWeekday(1).format("YYYY-MM-DD")})),"everyFirstMonthDay"===t.recurrence&&(r=Object(h.a)(Object(h.a)({},r),{},{recurrenceNextDate:Fe()().tz("America/Sao_Paulo").add(1,"month").format("YYYY-MM-01")})),a(r),e.onChange&&e.onChange(r)};return o.a.createElement("div",{id:"RecurrencySettings",className:i.root},o.a.createElement("div",{className:i.options},Dt("$__recurrence"),o.a.createElement(Oc,{options:[{value:"0",label:Dt("$__nonrecurrence")},{value:"1",label:Dt("$__everyDay")},{value:"7",label:Dt("$__weekly")},{value:"15",label:Dt("$__every15days")},{value:"30",label:Dt("$__every30days")},{value:"everyFirstMonthDay",label:Dt("$__everyFirstMonthDay")},{value:"everyMonday",label:Dt("$__everyMonday")},{value:"everyFriday",label:Dt("$__everyFriday")},{value:"custom",label:Dt("$__custom")}],value:n&&n.recurrence?n.recurrence:"0",onChange:function(e){c("0"===e?Object(h.a)(Object(h.a)({},kc),{},{recurrence:null,recurrenceRepeatDays:null}):"custom"!==e?{recurrence:"".concat(e),recurrenceRepeatDays:null}:Object(h.a)(Object(h.a)({},n),{},{recurrence:"".concat(e),recurrenceNextDate:null,recurrenceRepeatDays:1}))}})),n&&n.recurrence&&"0"!==String(n.recurrence)&&o.a.createElement("div",{className:i.custom},Dt("$__preffers",1),n&&"custom"===n.recurrence&&o.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},Dt("$__repeatEvery",1),o.a.createElement(Qn,{style:{width:"100px"},variant:Mt("standard"),name:"recurrenceRepeatDays",type:"number",min:"1",InputLabelProps:{shrink:!0},InputProps:{min:1,autoComplete:"new-password",endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"replay_10"}),Dt("$__days").toLowerCase()),onChange:function(e){parseInt(e.target.value)>0&&c(Object(h.a)(Object(h.a)({},n),{},{recurrenceRepeatDays:e.target.value}))}},defaultValue:n.recurrenceRepeatDays?n.recurrenceRepeatDays:1})),o.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},Dt("$__limitDate",1),o.a.createElement(Qn,{style:{width:"200px"},variant:Mt("standard"),name:"endDate",InputLabelProps:{shrink:!0},type:"date",InputProps:{endAdornment:n.recurrenceEndDate?o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"clear",onClick:function(){c(Object(h.a)(Object(h.a)({},n),{},{recurrenceEndDate:null}))}})):null,autoComplete:"new-password",onBlur:function(e){c(Object(h.a)(Object(h.a)({},n),{},{recurrenceEndDate:e.target.value?Fe()(e.target.value).tz("America/Sao_Paulo").format("YYYY-MM-DD"):null}))},onChange:function(e){c(Object(h.a)(Object(h.a)({},n),{},{recurrenceEndDate:e.target.value?Fe()(e.target.value).tz("America/Sao_Paulo").format("YYYY-MM-DD"):null}))}},defaultValue:e.data.recurrenceEndDate?e.data.recurrenceEndDate:null})),o.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},Dt("$__recurrenceDuplicateCard",1),o.a.createElement(ec,{checked:!!n.recurrenceDuplicateCard,onChange:function(e){c(Object(h.a)(Object(h.a)({},n),{},{recurrenceDuplicateCard:!n.recurrenceDuplicateCard},n.recurrenceDuplicateCard?{recurrenceCopyCatenation:!1}:{}))},name:"duplicate",inputProps:{"aria-label":"secondary checkbox"}})),n.recurrenceDuplicateCard&&o.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},Dt("$__copyCatenation",1),o.a.createElement(ec,{checked:!!n.recurrenceCopyCatenation,onChange:function(e){c(Object(h.a)(Object(h.a)({},n),{},{recurrenceCopyCatenation:!n.recurrenceCopyCatenation}))},name:"recurrenceCopyCatenation",inputProps:{"aria-label":"secondary checkbox"}}))))}));function Lc(){Lc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Cc=Object(_e.b)((function(e){return{tags:e.db.tag}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Ki)((function(e){var t=o.a.useState([]),r=Object(je.a)(t,2),n=r[0],a=r[1];o.a.useEffect((function(){if(e.data.values){var t=[];e.data.values.map((function(e){be.getState().db.tag.filter((function(t){return t.value===e.value})).length>0&&t.push(e)})),a(t)}}),[e.data]);var i=function(){var t=Object(Ee.a)(Lc().mark((function t(r){return Lc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.callBack&&e.callBack(r),a(r);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return o.a.createElement("div",null,o.a.createElement(Xi,{dbNode:e.dbNode?e.dbNode:"tag",secondaryParent:e.secondaryParent?e.secondaryParent:null,options:be.getState().db.tag?be.getState().db.tag:[],style:{width:"100%"},name:"tag",ws:!0,add:!0,colorPicker:!0,multiple:!0,freeSolo:!0,disableClearable:!0,disabled:!!e.disabled,value:n,placeholder:e.placeholder||null,onChange:function(e){i(e)},colorPickerCallBack:function(e){be.getState().functions.socket.emit("tag.UPD",e)}}))}))),Ic=r(479),Fc=r.n(Ic),Tc=r(797);r(658);var Nc=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(wt,{size:"22px",color:Mt("color"),icon:"today",onClick:e.onClick}))})),Pc=function(e){return Object(Ic.registerLocale)("pt",Tc.a),o.a.createElement("div",{style:Object(h.a)(Object(h.a)(Object(h.a)({width:"100%"},e.horizontal?{display:"flex",alignItems:"center"}:{}),e.style?e.style:{}),{},{justifyContent:"center"})},o.a.createElement("div",{style:Object(h.a)({},e.horizontal?{width:e.onClear?"calc(50% - 11px)":""}:{})},o.a.createElement(Fc.a,Object.assign({locale:"pt",placeholderText:Dt("$__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.maxDate?e.maxDate:null},e.type&&"datetime"===e.type?{timeInputLabel:Dt("$__time"),dateFormat:"dd/MM/yyyy HH:mm",showTimeInput:!0}:{dateFormat:"dd/MM/yyyy"},{customInput:o.a.createElement(Nc,null),showYearDropdown:!0}))),e.range?o.a.createElement("div",{style:Object(h.a)({},e.horizontal?{marginLeft:7,width:e.onClear?"calc(50% - 18px)":"calc(50% - 7px)"}:{marginTop:7})},o.a.createElement(Fc.a,Object.assign({locale:"pt",placeholderText:Dt("$__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:Dt("$__time"),dateFormat:"dd/MM/yyyy HH:mm",showTimeInput:!0}:{dateFormat:"dd/MM/yyyy"},{customInput:o.a.createElement(Nc,null),showYearDropdown:!0}))):o.a.createElement(o.a.Fragment,null),e.onClear&&(e.startDate||e.endDate)?o.a.createElement("div",{style:Object(h.a)({display:"flex",justifyContent:e.clearButtonPosition?e.clearButtonPosition:"center"},e.horizontal?{}:{paddingTop:3})},o.a.createElement(Ct,Object.assign({color:Mt("lightgray"),icon:"clear",onClick:e.onClear,size:"15px"},e.horizontal?{}:{title:Dt("$__clearDate","*"),text:Dt("$__clearDate","*")}))):o.a.createElement(o.a.Fragment,null))};function Ac(){Ac=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Dc=Object(_e.b)((function(e){return{sideModule:e.sideModule}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(tc)((function(e){var t,r=e.classes,n=be.getState(),a=n.db,i=n.sideModule,c=n.session,l=o.a.useState({}),s=Object(je.a)(l,2),u=s[0],d=s[1],p=o.a.useState({}),f=Object(je.a)(p,2),m=f[0],g=f[1],y=o.a.useState(!1),v=Object(je.a)(y,2),b=v[0],x=v[1],_=o.a.useState(!1),w=Object(je.a)(_,2),E=w[0],O=w[1],j=o.a.useState(!1),k=Object(je.a)(j,2),S=k[0],L=k[1],C=o.a.useState(!1),I=Object(je.a)(C,2),F=I[0],T=I[1],N=o.a.useState(null),P=Object(je.a)(N,2),A=P[0],D=P[1],z=o.a.useState(null),M=Object(je.a)(z,2),B=M[0],$=M[1],Y=o.a.useState(!1),R=Object(je.a)(Y,2),G=(R[0],R[1],o.a.useState(!1)),H=Object(je.a)(G,2),W=(H[0],H[1],o.a.useState(!1)),U=Object(je.a)(W,2),V=U[0],q=U[1],X=o.a.useState(0),J=Object(je.a)(X,2),Z=J[0],Q=J[1],ee=o.a.useState(!1),te=Object(je.a)(ee,2),re=te[0],ne=te[1],ae=o.a.useState(!1),oe=Object(je.a)(ae,2),ie=(oe[0],oe[1]),ce=Ut(),le=Dn(i.id);o.a.useEffect((function(){u._id!==i.data._id&&(d(i.data),x(!1)),F||(i.data.startDate&&D(i.data&&i.data.startDate?i.data.startDate:null),i.data.endDate&&$(i.data&&i.data.endDate?i.data.endDate:null),d(i.data),x(!1),"link"!==u.type||u.name||fe(),T(!0),se()),i.data.name&&""!==i.data.name.trim()&&"link"===i.data.type&&"new"===i.data._id&&(x(!0),e.reqSave&&e.reqSave(!0))}),[i.data,u]),o.a.useEffect((function(){!u.name||u.name&&""===u.name.trim?(x(!1),ie(!0)):(x(!0),ie(!1))}),[m]);var se=function(){var t=Object(Ee.a)(Ac().mark((function t(){return Ac().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ln(Object(h.a)(Object(h.a)({},e),{},{ignoreLoader:!0}),{idRel:[i.data._id],cardLoad:"parents"});case 2:t.sent&&ne(!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ue=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(t.value&&!i.data[t.name]&&!u[t.name]||i.data[t.name]&&i.data[t.name]!==t.value||n)&&e.reqSave&&e.reqSave(!0);var a=Object(h.a)(Object(h.a)({},u),{},Object(Oe.a)({},t.name,t.value));r&&r.name&&r.value&&(a=Object(h.a)(Object(h.a)(Object(h.a)({},u),a),{},Object(Oe.a)({},r.name,r.value))),d(a),g(Object(h.a)(Object(h.a)({},m),{},Object(Oe.a)({},t.name,t.value),r&&r.name&&r.value?Object(Oe.a)({},r.name,r.value):{}))},de=function(t){b&&!t?$t({message:Dt("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},pe=function(){var t=Object(Ee.a)(Ac().mark((function t(){var r,n=arguments;return Ac().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n.length>0&&void 0!==n[0]&&n[0],E){t.next=19;break}if(x(!1),e.reqSave&&e.reqSave(!1),u.status||(u.status="notStarted"),"new"===i.id&&i.data&&d(Object(h.a)(Object(h.a)({},u),i.data)),e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},i),{},{data:u})),u.name&&(!u.name||""!==u.name.trim())){t.next=12;break}O(!1),$t({message:Dt("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=19;break;case 12:return t.next=14,hn(Object(h.a)(Object(h.a)({},e),{},{store:Object(h.a)(Object(h.a)({},e.store),{},{db:Object(h.a)({},be.getState().db)})}),r,u);case 14:t.sent&&(m&&m.status&&($n(Object(h.a)(Object(h.a)({},e),{},{data:{_id:u._id}}),{status:m.status}),Rn(e,u._id,m.status)),O(!1),$t({message:Dt("$__DataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null})),x(!1),e.reqSave&&e.reqSave(!1),r&&de(!0);case 19:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),fe=function(){var t=Object(Ee.a)(Ac().mark((function t(){var r;return Ac().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Pt.post("/link/content",{url:u.url});case 2:r=t.sent,d(Object(h.a)(Object(h.a)({},u),{},{content:r.data.article})),x(!0),e.reqSave&&e.reqSave(!0);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),he=i.data&&i.data.type?a.dataType.filter((function(e){return e.name===i.data.type}))[0]:{},me=null;if(u._parent&&(me=be.getState().db.cards[u._parent]),!u)return null;var ge=be.getState().db.cards[u._id]&&be.getState().db.cards[u._id]._users&&be.getState().db.cards[u._id]._users[c._id]&&be.getState().db.cards[u._id]._users[c._id].myDay?be.getState().db.cards[u._id]._users[c._id].myDay:null,ye=!!(!ge||ge&&ge&&Fe()(new Date(1e3*ge)).format("YYYY/MM/DD")!==Fe()().format("YYYY/MM/DD")),ve=!!e.permission&&e.permission;return!ve&&parseInt(le)>=3&&(ve=!0),o.a.createElement(o.a.Fragment,null,o.a.createElement(Ti,{save:b?function(){O(!0),pe()}:null,saveClose:b?function(){O(!0),pe(!0)}:null,saveLoader:E,close:function(){e.onClose&&e.onClose()}}),o.a.createElement("div",{className:r.root},(!he.hideFields||he.hideFields&&-1===he.hideFields.indexOf("imageUpload")&&ve)&&o.a.createElement(Qo,{img:u?u.image:null,onChange:function(e,t){ue({name:"image",value:e}),ue({name:"file",value:t})},files:u._files?u._files:{},maxWidthOrHeight:600,avatar:"chatGroup"===u.type,aspectRatio:"chatGroup"===u.type?null:16/9}),(!he.hideFields||he.hideFields&&-1===he.hideFields.indexOf("image")||!ve&&u.image)&&o.a.createElement("div",{className:r.image,style:{backgroundImage:"url(".concat(u.image,")")}}),o.a.createElement("div",{className:r.data},u.url&&o.a.createElement("div",{style:{width:"100%",textAlign:"right"}},o.a.createElement("a",{href:u.url,target:"_blank",style:{color:Mt("menu"),fontWeight:"bold"}},Dt("$__openlink","*"))),(u._parent||u._planId)&&re?o.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"auto"}},o.a.createElement("span",{style:{color:Mt("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},Dt("$__loadingdata")),o.a.createElement(Ga,null)):(u._parent&&a.cards[u._parent]||u._planId&&a.cards[u._planId])&&o.a.createElement(ho,{id:u._parent?u._parent:u._planId?u._planId:null,open:function(t){e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},be.getState().sideModule),{},{db:"cards",id:t,module:"cardEdit",activeModule:"cardEdit",data:be.getState().db.cards[t]}))}}),o.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},u._id&&a.cards[u._id]&&a.cards[u._id]._users&&o.a.createElement(Da,{data:a.cards[u._id],noLimit:!0,avatarSize:"33px",permission:ve}),ve&&u._id&&36===u._id.length&&he.hideFields&&-1===he.hideFields.indexOf("myDay")&&o.a.createElement(Ct,{title:Dt(ge&&Fe()(new Date(1e3*ge)).format("YYYY/MM/DD")===Fe()().format("YYYY/MM/DD")?"$__removeOfMyDate":"$__addOnMyDay",1),color:ge&&Fe()(new Date(1e3*ge)).format("YYYY/MM/DD")===Fe()().format("YYYY/MM/DD")?"red":"lightblue",icon:ge&&Fe()(new Date(1e3*ge)).format("YYYY/MM/DD")===Fe()().format("YYYY/MM/DD")?"auto_delete":"alarm_add",onClick:function(){Ln(e,{_id:u._id,userId:c._id,option:ye}),e.myDayClick&&e.myDayClick()},size:"25px"})),o.a.createElement("fieldset",{style:{marginBottom:"14px"}},o.a.createElement("legend",null,Dt("$__data",1)),o.a.createElement(Qn,{label:Dt(he&&he.fieldsTitle&&he.fieldsTitle.name?he.fieldsTitle.name:"$__titleOfCard",1),variant:Mt("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"view_headline"})),onChange:function(e){ue(e.target)}},value:u&&u.name?u.name:"",placeholder:Dt(he&&he.fieldsPlaceholder&&he.fieldsPlaceholder.name?he.fieldsPlaceholder.name:"$__titleOfCard_placeholder",1),disabled:!(ve&&"completed"!==u.status&&!(he&&he.disabledFields&&he.disabledFields.indexOf("name")>-1))}),o.a.createElement(Qn,{label:Dt("$__description",1),variant:Mt("fieldVariant"),name:"description",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"toc"})),onChange:function(e){ue(e.target)}},value:u&&u.description?u.description:"",placeholder:Dt("$__descriptionOfCard_placeholder",1),disabled:!(ve&&"completed"!==u.status&&!(he&&he.disabledFields&&he.disabledFields.indexOf("description")>-1))}),o.a.createElement(Qn,{label:Dt(he&&he.fieldsTitle&&he.fieldsTitle.name?he.fieldsTitle.name:"$__URL",1),variant:Mt("fieldVariant"),name:"url",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"http"})),onChange:function(e){ue(e.target)}},value:u&&u.url?u.url:"",placeholder:"https://domain.com",disabled:!(ve&&"completed"!==u.status&&!(he&&he.disabledFields&&he.disabledFields.indexOf("name")>-1))}),u.url?o.a.createElement("div",{style:{width:"100%",textAlign:"right"}},o.a.createElement("a",{href:u.url,target:"_blank",style:{color:Mt("menu"),fontWeight:"bold"}},Dt("$__openlink","*"))):o.a.createElement(o.a.Fragment,null)),ve&&(!he.hideFields||he.hideFields&&-1===he.hideFields.indexOf("client"))&&(!u.client||u.client&&a.users[u.client])&&o.a.createElement(Hi,{id:"combo-box-demo",options:Object.keys(a.users).filter((function(e){return"client"===a.users[e].type||"group"===a.users[e].type||"sic"===a.users[e].type})).sort((function(e,t){return a.users[e].name<a.users[t].name?-1:a.users[e].name>a.users[t].name?1:0})).map((function(e){return{label:a.users[e].name,value:String(a.users[e]._id)}})),getOptionLabel:function(e){return Dt(e.label,1)},style:{width:"100%"},name:"client",value:u&&u.client?Object.keys(a.users).filter((function(e){return u.client&&a.users[e]._id===u.client})).map((function(e){return{label:a.users[e].name,value:String(a.users[e]._id)}}))[0]:null,renderInput:function(e){return o.a.createElement(Qn,Object.assign({},e,{label:Dt("$__account",1),variant:Mt("fieldVariant"),value:u&&u.client?Object.keys(a.users).filter((function(e){return u.client&&a.users[e]._id===u.client})).map((function(e){return{label:a.users[e].name,value:String(a.users[e]._id)}}))[0]:null}))},onChange:function(e,t){ue({name:"client",value:t&&t.value?String(t.value):null})},disabled:!(ve&&"completed"!==u.status&&!(he&&he.disabledFields&&he.disabledFields.indexOf("client")>-1))}),!(!ve&&!u.startDate&&!u.endDate)&&(!he.hideFields||he.hideFields&&-1===he.hideFields.indexOf("deadline"))&&o.a.createElement("fieldset",{style:{marginBottom:"14px"}},o.a.createElement("legend",null,Dt("$__deadline",1)),u.endDate||u.startDate||S?o.a.createElement(o.a.Fragment,null,o.a.createElement(Pc,{type:"datetime",clearButtonPosition:"flex-end",onChangeStartDate:function(e){var t={startDate:Fe()(e).unix("X")};D(Fe()(e).unix("X")),(!B||B<Fe()(e).unix("X"))&&(t=Object(h.a)(Object(h.a)({},t),{},{endDate:Fe()("".concat(Fe()(e).format("YYYY-MM-DD")," 23:59:59")).unix("X")}),$(Fe()("".concat(Fe()(e).format("YYYY-MM-DD")," 23:59:59")).unix("X"))),d(Object(h.a)(Object(h.a)({},u),t)),x(!0)},onChangeEndDate:function(e){var t={endDate:Fe()(e).unix("X")};$(Fe()(e).unix("X")),A||(t=Object(h.a)(Object(h.a)({},t),{},{startDate:Fe()("".concat(Fe()(e).format("YYYY-MM-DD")," 00:00:00")).unix("X")}),D(Fe()("".concat(Fe()(e).format("YYYY-MM-DD")," 00:00:00")).unix("X"))),d(Object(h.a)(Object(h.a)({},u),t)),x(!0)},range:!0,startDate:A?new Date(1e3*A):null,endDate:B?new Date(1e3*B):null,onClear:function(){D(null),$(null),d(Object(h.a)(Object(h.a)({},u),{},{startDate:null,endDate:null,recurrence:null})),L(!1),x(!0)}}),o.a.createElement("div",{style:{position:"relative",width:"fit-content",float:"right",display:"flex",justifyContent:"right"}},o.a.createElement(Oc,{options:[{value:0,label:"Manual"},{value:7,label:"7 ".concat(Dt("$__days").toLowerCase())},{value:15,label:"15 ".concat(Dt("$__days").toLowerCase())},{value:30,label:"30 ".concat(Dt("$__days").toLowerCase())},{value:60,label:"60 ".concat(Dt("$__days").toLowerCase())},{value:90,label:"90 ".concat(Dt("$__days").toLowerCase())},{value:180,label:"180 ".concat(Dt("$__days").toLowerCase())},{value:365,label:"365 ".concat(Dt("$__days").toLowerCase())}].concat(Object(K.a)(me&&me.startDate&&me.endDate?[{value:"parent",label:"".concat(Dt("$__useParentDate")," ").concat(Fe()(1e3*me.startDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")," - ").concat(Fe()(1e3*me.endDate).tz("America/Sao_Paulo").format("DD/MM/YYYY"))}]:[])),value:Z||"",onChange:function(e){"parent"!==e&&0!==e?($(Fe()(new Date(1e3*A)).tz("America/Sao_Paulo").add(e,"days").unix("X")),ue({name:"endDate",value:Fe()(new Date(1e3*A)).tz("America/Sao_Paulo").add(e,"days").unix("X")},null,!0)):"parent"===e&&(me.startDate&&(D(me.startDate),ue({name:"startDate",value:me.startDate},me.endDate?{name:"endDate",value:me.endDate}:null,!0),me.endDate&&$(me.endDate)),!me.startDate&&me.endDate&&($(me.endDate),ue({name:"endDate",value:me.endDate},null,!0))),Q(e)}})),o.a.createElement("div",{className:r.switch,style:{position:"relative",width:"100%",float:"left",display:"flex",alignItems:"center",justifyContent:"space-between"}},Dt("$__freeChildrenDate",1),o.a.createElement(ec,{checked:!!u.freeChildrenDate,onChange:function(e){ue({name:"freeChildrenDate",value:!u.freeChildrenDate})},name:"freeChildrenDate",inputProps:{"aria-label":"secondary checkbox"},disabled:!(ve&&"completed"!==u.status&&!(he&&he.disabledFields&&he.disabledFields.indexOf("freeChildrenDate")>-1))})),u.startDate&&Fe()(u.startDate).isValid()&&(!he.hideFields||he.hideFields&&-1===he.hideFields.indexOf("recurrence"))&&o.a.createElement("div",{style:{width:"311px",position:"relative",float:"left"}},u._recurrenceId?o.a.createElement("div",{style:{marginTop:"15px"}},Dt("$__recurrentActivityFrom"),":",o.a.createElement(ii,(t={db:"cards",data:a.cards[u._recurrenceId]},Object(Oe.a)(t,"db","cards"),Object(Oe.a)(t,"Avatar",!0),Object(Oe.a)(t,"ignoreList",!0),Object(Oe.a)(t,"onlyOption",!0),t))):o.a.createElement("div",null,o.a.createElement(Sc,{data:u,onChange:function(e){d(Object(h.a)(Object(h.a)(Object(h.a)({},u),e),{},{recurrenceNextDate:Fe()("".concat(e.recurrenceNextDate," 06:00:00")).tz("America/Sao_Paulo").format("YYYY-MM-DD")})),x(!0)}}),u.recurrence&&"0"!==u.recurrence&&u.recurrenceNextDate&&o.a.createElement("div",{style:{marginTop:"7px"}},o.a.createElement(Pc,{clearButtonPosition:"flex-end",onChangeStartDate:function(e){var t={recurrenceNextDate:Fe()(e).tz("America/Sao_Paulo").format("YYYY-MM-DD")};d(Object(h.a)(Object(h.a)({},u),t)),x(!0)},startDate:u.recurrenceNextDate?new Date(1e3*Fe()("".concat(u.recurrenceNextDate," 06:00:00")).tz("America/Sao_Paulo").unix("X")):null,onClear:function(){d(Object(h.a)(Object(h.a)({},u),{},{recurrenceNextDate:null})),x(!0)}}))))):ve?o.a.createElement(Ir,{text:Dt("$__addDeadline",1),icon:"timer",onClick:function(){L(!0),D(Fe()("".concat(Fe()().format("YYYY-MM-DD")," 00:00:00")).unix("X")),ue({name:"startDate",value:Fe()("".concat(Fe()().format("YYYY-MM-DD")," 00:00:00")).unix("X")},"parent"!==Z?{name:"endDate",value:Fe()("".concat(Fe()().format("YYYY-MM-DD")," 23:59:59")).add(Z,"days").unix("X")}:null),"parent"!==Z&&$(Fe()("".concat(Fe()().format("YYYY-MM-DD")," 23:59:59")).add(Z,"days").unix("X"))}}):o.a.createElement(o.a.Fragment,null)),(!he.hideFields||he.hideFields&&-1===he.hideFields.indexOf("tags"))&&o.a.createElement("fieldset",{style:{marginBottom:"14px"}},o.a.createElement("legend",null,Dt("$__tags",1)),o.a.createElement(Cc,{data:{values:u._tags?u._tags:[]},callBack:function(e){ve&&ue({name:"_tags",value:e})},disabled:!(ve&&"completed"!==u.status&&!(he&&he.disabledFields&&he.disabledFields.indexOf("_tags")>-1))})),(!he.hideFields||he.hideFields&&(-1===he.hideFields.indexOf("priority")||-1===he.hideFields.indexOf("status")))&&o.a.createElement("fieldset",{style:{marginBottom:"14px"}},(!he.hideFields||he.hideFields&&-1===he.hideFields.indexOf("priority"))&&o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},o.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},o.a.createElement(Hi,{id:"combo-box-demo",options:a.priority,getOptionLabel:function(e){return Dt(e.label,1)},style:{width:"100%"},name:"priority",disableClearable:!0,value:u&&u.priority&&a.priority?a.priority.filter((function(e){return String(e.value)===String(u.priority)}))[0]:a.priority[0],renderInput:function(e){return o.a.createElement(Qn,Object.assign({},e,{label:Dt("$__priority",1),variant:Mt("fieldVariant"),disabled:!(ve&&"completed"!==u.status&&!(he&&he.disabledFields&&he.disabledFields.indexOf("priority")>-1)),inputProps:Object(h.a)(Object(h.a)({},e&&e.inputProps?e.inputProps:{}),{},{style:Object(h.a)(Object(h.a)({},e&&e.inputProps&&e.inputProps.style?e.inputProps.style:{}),{},{paddingLeft:7,marginTop:3,marginLeft:-5,width:"calc(100% - 7px)",color:u&&u.priority?a.priority.filter((function(e){return String(e.value)===String(u.priority)}))[0].color:a.priority[0].color,borderLeft:"solid 3.33px ".concat(u&&u.priority?a.priority.filter((function(e){return String(e.value)===String(u.priority)}))[0].color:a.priority[0].color)})}),value:u&&u.priority&&a.priority?a.priority.filter((function(e){return String(e.value)===String(u.priority)}))[0]:a.priority[0]}))},onChange:function(e,t){ve&&ue({name:"priority",value:t.value})},renderOption:function(e,t){t.inputValue;return o.a.createElement("span",{style:{color:e.color}},Dt(e.label,1))}})),o.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},o.a.createElement(Hi,{id:"combo-box-demo",options:a.priority,getOptionLabel:function(e){return Dt(e.label,1)},style:{width:"100%"},name:"risk",disableClearable:!0,value:u&&u.risk&&a.priority?a.priority.filter((function(e){return String(e.value)===String(u.risk)}))[0]:a.priority[0],renderInput:function(e){return o.a.createElement(Qn,Object.assign({},e,{label:Dt("$__risk",1),variant:Mt("fieldVariant"),disabled:!(ve&&"completed"!==u.status&&!(he&&he.disabledFields&&he.disabledFields.indexOf("priority")>-1)),inputProps:Object(h.a)(Object(h.a)({},e&&e.inputProps?e.inputProps:{}),{},{style:Object(h.a)(Object(h.a)({},e&&e.inputProps&&e.inputProps.style?e.inputProps.style:{}),{},{paddingLeft:7,marginTop:3,marginLeft:-5,width:"calc(100% - 7px)",color:u&&u.risk?a.priority.filter((function(e){return String(e.value)===String(u.risk)}))[0].color:a.priority[0].color,borderLeft:"solid 3.33px ".concat(u&&u.risk?a.priority.filter((function(e){return String(e.value)===String(u.risk)}))[0].color:a.priority[0].color)})}),value:u&&u.risk&&a.priority?a.priority.filter((function(e){return String(e.value)===String(u.risk)}))[0]:a.priority[0]}))},onChange:function(e,t){ve&&ue({name:"risk",value:t.value})},renderOption:function(e,t){t.inputValue;return o.a.createElement("span",{style:{color:e.color}},Dt(e.label,1))}})),o.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},o.a.createElement(Hi,{id:"combo-box-demo",options:a.priority,getOptionLabel:function(e){return Dt(e.label,1)},style:{width:"100%"},name:"complexity",disableClearable:!0,value:u&&u.complexity&&a.priority?a.priority.filter((function(e){return String(e.value)===String(u.complexity)}))[0]:a.priority[0],renderInput:function(e){return o.a.createElement(Qn,Object.assign({},e,{label:Dt("$__complexity",1),variant:Mt("fieldVariant"),disabled:!(ve&&"completed"!==u.status&&!(he&&he.disabledFields&&he.disabledFields.indexOf("priority")>-1)),inputProps:Object(h.a)(Object(h.a)({},e&&e.inputProps?e.inputProps:{}),{},{style:Object(h.a)(Object(h.a)({},e&&e.inputProps&&e.inputProps.style?e.inputProps.style:{}),{},{paddingLeft:7,marginTop:3,marginLeft:-5,width:"calc(100% - 7px)",color:u&&u.complexity?a.priority.filter((function(e){return String(e.value)===String(u.complexity)}))[0].color:a.priority[0].color,borderLeft:"solid 3.33px ".concat(u&&u.complexity?a.priority.filter((function(e){return String(e.value)===String(u.complexity)}))[0].color:a.priority[0].color)})}),value:u&&u.complexity&&a.priority?a.priority.filter((function(e){return String(e.value)===String(u.complexity)}))[0]:a.priority[0]}))},onChange:function(e,t){ve&&ue({name:"complexity",value:t.value})},renderOption:function(e,t){t.inputValue;return o.a.createElement("span",{style:{color:e.color}},Dt(e.label,1))}})),o.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},o.a.createElement(Hi,{id:"combo-box-demo",options:a.priority,getOptionLabel:function(e){return Dt(e.label,1)},style:{width:"100%"},name:"impact",disableClearable:!0,value:u&&u.impact&&a.priority?a.priority.filter((function(e){return String(e.value)===String(u.impact)}))[0]:a.priority[0],renderInput:function(e){return o.a.createElement(Qn,Object.assign({},e,{label:Dt("$__impact",1),variant:Mt("fieldVariant"),disabled:!(ve&&"completed"!==u.status&&!(he&&he.disabledFields&&he.disabledFields.indexOf("priority")>-1)),inputProps:Object(h.a)(Object(h.a)({},e&&e.inputProps?e.inputProps:{}),{},{style:Object(h.a)(Object(h.a)({},e&&e.inputProps&&e.inputProps.style?e.inputProps.style:{}),{},{paddingLeft:7,marginTop:3,marginLeft:-5,width:"calc(100% - 7px)",color:u&&u.impact?a.priority.filter((function(e){return String(e.value)===String(u.impact)}))[0].color:a.priority[0].color,borderLeft:"solid 3.33px ".concat(u&&u.impact?a.priority.filter((function(e){return String(e.value)===String(u.impact)}))[0].color:a.priority[0].color)})}),value:u&&u.impact&&a.priority?a.priority.filter((function(e){return String(e.value)===String(u.impact)}))[0]:a.priority[0]}))},onChange:function(e,t){ve&&ue({name:"impact",value:t.value})},renderOption:function(e,t){t.inputValue;return o.a.createElement("span",{style:{color:e.color}},Dt(e.label,1))}}))),(!he.hideFields||he.hideFields&&-1===he.hideFields.indexOf("status"))&&o.a.createElement(Hi,{id:"combo-box-demo",options:a.status,getOptionLabel:function(e){return Dt(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:u&&u.status&&a.status?a.status.filter((function(e){return String(e.value)===String(u.status)}))[0]:a.status[0],renderInput:function(e){return o.a.createElement(Qn,Object.assign({},e,{label:Dt("$__status",1),variant:Mt("fieldVariant"),disabled:!(ve&&!(he&&he.disabledFields&&he.disabledFields.indexOf("status")>-1)),value:u&&u.status&&a.status?a.status.filter((function(e){return String(e.value)===String(u.status)}))[0]:a.status[0]}))},onChange:function(e,t){ve&&ue({name:"status",value:t.value})}})),(le>4||ce&&ce.plan&&ce.planAdmin)&&"plan"===u.type&&"completed"!==u.status&&o.a.createElement(o.a.Fragment,null,V||u.miroBoard?V?o.a.createElement("fieldset",{style:{marginBottom:"14px"}},o.a.createElement("legend",null,Dt("$__MiroBoard",1)),o.a.createElement(Qn,{label:Dt("$__MiroBoardCode"),variant:Mt("fieldVariant"),name:"boardCode",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"save",color:"green",onClick:function(){return q(!1)}})),onChange:function(e,t){ue({name:"miroBoard",value:e.target.value})}},value:u&&u.miroBoard?u.miroBoard:"",placeholder:Dt("$__MiroBoardCodePlaceholder",1),disabled:!(ve&&"completed"!==u.status&&!(he&&he.disabledFields&&he.disabledFields.indexOf("miroBoard")>-1))})):u.miroBoard&&o.a.createElement("fieldset",{style:{marginBottom:"14px"}},o.a.createElement("legend",null,Dt("$__MiroBoard",1)),o.a.createElement(Ir,{text:Dt("$__openMiroBoard",1),icon:"developer_board",onClick:function(){e.reduxFunction("ASYNC","LIGHTBOX",{miro:!0,miroBoard:u.miroBoard})}}),o.a.createElement(Ir,{text:Dt("$__editBoard",1),icon:"insert_link",onClick:function(){q(!0)}})):o.a.createElement("fieldset",{style:{marginBottom:"14px"}},o.a.createElement("legend",null,Dt("$__MiroBoard",1)),o.a.createElement(Ir,{text:Dt("$__addBoard",1),icon:"developer_board",onClick:function(){q(!0)}}))),(!he.hideFields||he.hideFields&&-1===he.hideFields.indexOf("private"))&&o.a.createElement("fieldset",{style:{marginBottom:"14px"}},o.a.createElement("div",{className:r.switch},o.a.createElement(ec,{checked:!!u.private,onChange:function(e){ve&&ue({name:"private",value:!u.private})},name:"private",inputProps:{"aria-label":"secondary checkbox"},disabled:!(ve&&"completed"!==u.status&&!(he&&he.disabledFields&&he.disabledFields.indexOf("private")>-1))}),Dt("$__private",1))),ve&&"chatGroup"===u.type&&o.a.createElement("fieldset",{style:{marginBottom:"14px"}},o.a.createElement("div",{className:r.switch},o.a.createElement(ec,{checked:!!u.onlyAdminsSendMessages,onChange:function(e){ve&&ue({name:"onlyAdminsSendMessages",value:!u.onlyAdminsSendMessages})},name:"onlyAdmins",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__onlyAdminsCanSendMessage",1))))))}))),zc=r(792),Mc=r(1402),Bc=r(1424),$c=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:Mt("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:Mt("medium")}}};function Yc(){Yc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Rc=Object(_e.b)((function(e){return{store:{sideModule:e.sideModule}}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)($c)((function(e){var t=e.classes,r=be.getState(),n=r.db,a=r.sideModule,i=r.session,c=r.timeline,l=a.data||{},s=o.a.useState(!l.kpi_type),u=Object(je.a)(s,2),d=(u[0],u[1],o.a.useState(l.kpi_type?"timeline":"settings")),p=Object(je.a)(d,2),f=p[0],m=p[1],g=o.a.useState(!(!l._id||"new"!==l._id||!l.name)),y=Object(je.a)(g,2),v=y[0],b=y[1],x=o.a.useState({}),_=Object(je.a)(x,2),w=_[0],E=_[1];o.a.useEffect((function(){v&&e.reqSave&&e.reqSave()}),[v]);var O=Ut(),j=Dn(a.id),k=!1;(parseInt(j)>=4||O.plan&&O.planAdmin)&&(k=!0),i._id&&n.cards[l._id]&&n.cards[l._id]._users&&n.cards[l._id]._users[Object.keys(n.cards[l._id]._users).find((function(e){return e.indexOf(i._id)>-1}))]&&(j=n.cards[l._id]._users[Object.keys(n.cards[l._id]._users).find((function(e){return e.indexOf(i._id)>-1}))]);var S=window.location.hash.split("/");S[0]=S[0].replace("#","");var L=c[l._id]||{};L=Object.keys(L).filter((function(e){return"kpi"===L[e].type})).map((function(e){return L[e]}));var C=null,I=0;l._parent&&be.getState().db.cards[l._parent]&&be.getState().db.cards[l._parent].kpi_type&&"task"!==be.getState().db.cards[l._parent].kpi_type&&(C=be.getState().db.cards[l._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(be.getState().db.cards).filter((function(e){return be.getState().db.cards[e]._parent&&be.getState().db.cards[e]._parent===C._id&&be.getState().db.cards[e].kpi_type===C.kpi_type&&be.getState().db.cards[e].kpi_useParent})).map((function(e){parseInt(C.kpi_ini)>parseInt(C.kpi_fin&&parseInt(be.getState().db.cards[e].kpi_ini))?I-=parseInt(be.getState().db.cards[e].kpi_ini):parseInt(be.getState().db.cards[e].kpi_fin)&&(I-=parseInt(be.getState().db.cards[e].kpi_fin))})));var F=function(t){(t.value&&!a.data[t.name]||a.data[t.name]&&a.data[t.name]!==t.value)&&b(!0);var r=Object(h.a)(Object(h.a)({},a.data),{},Object(Oe.a)({},t.name,t.value));r.kpi_ini||(r=Object(h.a)(Object(h.a)({},r),{},{kpi_ini:0})),r.kpi_fin||(r=Object(h.a)(Object(h.a)({},r),{},{kpi_fin:0})),!r.kpi_useParent&&"false"!==!String(r.kpi_useParent)&&C&&C.kpi_type===t.value&&(r=Object(h.a)(Object(h.a)({},r),{},{kpi_useParent:!0})),e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},a),{},{data:r}))},T=function(){var t=Object(Ee.a)(Yc().mark((function t(){var r,n=arguments;return Yc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n.length>0&&void 0!==n[0]&&n[0],b(!1),!("time"===a.data.kpi_type&&parseInt(a.data.kpi_fin)<parseInt(a.data.kpi_ini))){t.next=6;break}$t({message:Dt("$__invalidMaximumMinutes",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=15;break;case 6:if(0!==parseInt(a.data.kpi_fin)||0!==parseInt(a.data.kpi_ini)){t.next=10;break}$t({message:Dt("$__feelKpiValue",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=15;break;case 10:return t.next=12,hn(e,!0,a.data);case 12:t.sent&&$t({message:Dt("$__kpiDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&e.reduxFunction("ASYNC","CLEAR_MODULE");case 15:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),N=function(){var e=Object(Ee.a)(Yc().mark((function e(t,r){var n,a,o=arguments;return Yc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=o.length>2&&void 0!==o[2]?o[2]:0,a="",(a="backspace"===t.key.toLowerCase()&&l&&String(l["kpi_".concat(r)])?String(l["kpi_".concat(r)]).substr(0,String(l["kpi_".concat(r)]).length-1):"".concat(l&&l["kpi_".concat(r)]?l["kpi_".concat(r)]:"").concat(t.key))&&a.indexOf(",")>-1&&(a=a.substr(0,a.indexOf(",")+3)),l.kpi_useParent&&n&&parseInt(a.replace(/[^0-9.,]*/g,""))>n?(E(Object(h.a)(Object(h.a)({},w),{},Object(Oe.a)({},"kpi_".concat("ini"===r?"ini":"fin"),!0))),F({name:"kpi_".concat("ini"===r?"ini":"fin"),value:n})):(E(Object(h.a)(Object(h.a)({},w),{},Object(Oe.a)({},"kpi_".concat("ini"===r?"ini":"fin"),!1))),F({name:"kpi_".concat("ini"===r?"ini":"fin"),value:"time"===l.kpi_type?a.replace(/[^0-9]*/g,""):a.replace(/[^0-9.,]*/g,"")}));case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),P=function(){var t=Object(Ee.a)(Yc().mark((function t(r){return Yc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},a),{},{data:Object(h.a)(Object(h.a)({},a.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)}}(),A=0;return Object.keys(n.cards).filter((function(e){return n.cards[e]&&n.cards[e]._parent&&n.cards[e]._parent===l._id&&n.cards[e].kpi_useParent})).map((function(e,t){A=parseInt(l.kpi_ini)>parseInt(l.kpi_fin)?A+parseInt(n.cards[e].kpi_ini)-parseInt(n.cards[e].kpi_fin):A+parseInt(n.cards[e].kpi_fin)-parseInt(n.cards[e].kpi_ini)})),o.a.createElement("div",null,o.a.createElement(Ti,{save:v&&k?function(){T()}:null,saveClose:v&&k?function(){T(!0)}:null,close:function(){e.onClose&&e.onClose(v)}}),o.a.createElement("div",{style:{posision:"absolute",top:5,left:0,right:0}},k?o.a.createElement("div",{style:{width:"100%",position:"relative",display:"flex",flexDirection:"row-reverse"}},o.a.createElement(Ct,{title:Dt("$__changeKpiType",1),color:Mt("settings"===f?"menu":"color"),icon:"tune",onClick:function(){return m("settings")},size:"25px",transparent:!0}),o.a.createElement(Ct,{title:Dt("$__chart",1),color:Mt("chart"===f?"menu":"color"),icon:"analytics",onClick:function(){return m("chart")},size:"25px",transparent:!0}),o.a.createElement(Ct,{title:Dt("$__statement",1),color:Mt("timeline"===f?"menu":"color"),icon:"receipt",onClick:function(){return m("timeline")},size:"25px",transparent:!0})):o.a.createElement("div",null),"chart"===f?o.a.createElement(ro,{data:l,chartShow:!0}):"settings"===f?o.a.createElement("fieldset",{style:{textAlign:"center"}},o.a.createElement("legend",null,Dt("$__measurementeType",1)),0===Object.keys(n.cards).filter((function(e){return n.cards[e]._parent===l._id&&n.cards[e].kpi_useParent})).length?o.a.createElement(Bc.a,{value:l&&l.kpi_type?l.kpi_type:"task",exclusive:!0,onChange:function(e,t){F({name:"kpi_type",value:t})}},o.a.createElement(Mc.a,{value:"decimal"},o.a.createElement(wt,{title:Dt("$__decimal",1),color:"color"},"filter_9_plus")),o.a.createElement(Mc.a,{value:"currency"},o.a.createElement(wt,{title:Dt("$__currency",1),color:"color"},"attach_money")),o.a.createElement(Mc.a,{value:"percent"},o.a.createElement(xt.a,{title:Dt("$__percentage",1)},o.a.createElement("span",{style:{color:"".concat(Mt("color")),fontSize:"22px"}},"%"))),o.a.createElement(Mc.a,{value:"time"},o.a.createElement(wt,{title:Dt("$__time",1),color:"color"},"hourglass_top")),o.a.createElement(Mc.a,{value:"task"},o.a.createElement(wt,{title:Dt("$__task",1),color:"color"},"task"))):"decimal"===l.kpi_type?o.a.createElement(wt,{title:Dt("$__decimal",1),color:"color"},"filter_9_plus"):"currency"===l.kpi_type?o.a.createElement(wt,{title:Dt("$__currency",1),color:"color"},"attach_money"):"percent"===l.kpi_type?o.a.createElement(wt,{title:Dt("$__percentage",1),color:"color"},"percent"):o.a.createElement(wt,{title:Dt("$__task",1),color:"color"},"task"),(Object.keys(n.cards).filter((function(e){return n.cards[e]._parent===l._id&&n.cards[e].kpi_useParent})).length,o.a.createElement(o.a.Fragment,null)),C&&C.kpi_type&&C.kpi_type===l.kpi_type?o.a.createElement(o.a.Fragment,null,o.a.createElement("fieldset",{style:{marginTop:7}},o.a.createElement("legend",{style:{color:"gray",fontSize:12}},Dt("$__parentKpi",1)),l.kpi_useParent?o.a.createElement(o.a.Fragment,null,o.a.createElement("fieldset",{style:{marginTop:3}},o.a.createElement("legend",{style:{color:"blue",fontSize:12}},C&&parseInt(C.kpi_ini)>parseInt(C.kpi_fin)?Dt("$__notAllocatedBudget",1):Dt("$__notAllocatedGoal",1)),Yt(I,"time"===C.kpi_type?"number":C.kpi_type,C.kpi_currency?C.kpi_currency:null))):o.a.createElement(o.a.Fragment,null),o.a.createElement("div",{className:t.switch},o.a.createElement(ec,{checked:!!l.kpi_useParent,onChange:function(e){P({name:"kpi_useParent",value:!l.kpi_useParent})},name:"kpi_useParent",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__useParentKpi",1)),l.kpi_useParent?o.a.createElement(o.a.Fragment,null):o.a.createElement("div",{style:{color:"red"}},Dt("$__independentKPIDescription")),o.a.createElement("div",null))):o.a.createElement(o.a.Fragment,null),l&&l.kpi_type&&"task"!==l.kpi_type&&o.a.createElement(o.a.Fragment,null,"currency"!==l.kpi_type||l.kpi_useParent||0!==Object.keys(n.cards).filter((function(e){return n.cards[e]._parent===l._id&&n.cards[e].kpi_useParent})).length?Object.keys(n.cards).filter((function(e){return n.cards[e]._parent===l._id&&n.cards[e].kpi_useParent})).length>0?o.a.createElement("fieldset",{style:{marginTop:7}},o.a.createElement("legend",{style:{color:"gray",fontSize:12}},Dt("$__allocatedKpiActivities",1)),o.a.createElement("ul",{style:{listStyle:"none",padding:0}},Object.keys(n.cards).filter((function(e){return n.cards[e]._parent===l._id&&n.cards[e].kpi_useParent})).map((function(e,t){var r=0;r=parseInt(l.kpi_ini)>parseInt(l.kpi_fin)?parseInt(n.cards[e].kpi_ini)-parseInt(n.cards[e].kpi_fin):parseInt(n.cards[e].kpi_fin)-parseInt(n.cards[e].kpi_ini);var a=0;return c&&c[e]&&Object.keys(c[e]).filter((function(t){return c[e][t]&&c[e][t].value})).length>0&&Object.keys(c[e]).filter((function(t){return c[e][t]&&c[e][t].value})).map((function(t){a+=parseFloat(c[e][t].value)})),o.a.createElement("li",{key:"ca-".concat(e)},o.a.createElement(ii,{db:"cards",data:be.getState().db.cards[e],notGlobalExpanded:!0,ignoreList:!0}),o.a.createElement("div",{style:{width:"100%",height:22}},o.a.createElement(zc.a,{data:[{ranges:[0,parseInt(l.kpi_ini)>parseInt(l.kpi_fin)?parseInt(l.kpi_ini)-parseInt(l.kpi_fin):parseInt(l.kpi_fin)-parseInt(l.kpi_ini)],measures:[r],markers:[a]}],minValue:parseInt(l.kpi_ini)>parseInt(l.kpi_fin)?parseInt(l.kpi_fin):parseInt(l.kpi_ini),maxValue:parseInt(l.kpi_ini)<parseInt(l.kpi_fin)?parseInt(l.kpi_fin):parseInt(l.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"})),o.a.createElement("div",{style:{marginTop:0,fontSize:12,color:"black",width:"100%",textAlign:"left"}},Yt(r,"time"===l.kpi_type?"number":l.kpi_type,l.kpi_currency?l.kpi_currency:null)))})))):o.a.createElement(o.a.Fragment,null):o.a.createElement(Hi,{id:"combo-box-demo",options:n.currency,getOptionLabel:function(e){return Dt(e.label,1)},style:{width:"100%"},name:"currency",disableClearable:!0,value:l&&l.kpi_currency&&n.currency?n.currency.filter((function(e){return String(e.value)===String(l.kpi_currency)}))[0]:n.currency[0],renderInput:function(e){return o.a.createElement(Qn,Object.assign({},e,{label:Dt("$__currency",1),variant:Mt("fieldVariant"),value:l&&l.kpi_currency&&n.currency?n.currency.filter((function(e){return String(e.value)===String(l.kpi_currency)}))[0]:n.currency[0]}))},onChange:function(e,t){F({name:"kpi_currency",value:t.value})}}),o.a.createElement("div",{style:{display:"flex",marginTop:"14px",justifyContent:l.kpi_useParent?"center":"space-between"}},!l.kpi_useParent||l.kpi_useParent&&C&&parseInt(C.kpi_ini)>parseInt(C.kpi_fin)?o.a.createElement("div",{style:{width:"calc(50% - 7px)"}},o.a.createElement(Qn,{label:l.kpi_useParent?Dt("$__budget"):"time"===l.kpi_type?Dt("$__minimumMinutes",1):Dt("$__initialValue",1),variant:"outlined",name:"kpi_ini",error:!(!w||!w.kpi_ini),helperText:w&&w.kpi_ini?Dt("$__valueExceedAllocatedValue",1):null,InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onKeyDown:function(e){N(e,"ini",I)}},value:Yt(l&&l.kpi_ini?l.kpi_ini:0,"time"===l.kpi_type?"number":l.kpi_type,l.kpi_useParent&&C.kpi_currency?C.kpi_currency:l.kpi_currency?l.kpi_currency:null)})):o.a.createElement(o.a.Fragment,null),!l.kpi_useParent||l.kpi_useParent&&C&&parseInt(C.kpi_ini)<parseInt(C.kpi_fin)?o.a.createElement("div",{style:{width:"calc(50% - 7px)"}},o.a.createElement(Qn,{label:l.kpi_useParent?Dt("$__goal"):"time"===l.kpi_type?Dt("$__maximumMinutes",1):Dt("$__finalValue",1),variant:"outlined",name:"kpi_fin",error:!(!w||!w.kpi_fin),helperText:w&&w.kpi_fin?Dt("$__valueExceedAllocatedValue",1):null,InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onKeyDown:function(e){N(e,"fin",I)}},value:Yt(l&&l.kpi_fin?l.kpi_fin:0,"time"===l.kpi_type?"number":l.kpi_type,l.kpi_useParent&&C.kpi_currency?C.kpi_currency:l.kpi_currency?l.kpi_currency:null)})):o.a.createElement(o.a.Fragment,null)),o.a.createElement("div",{className:t.switch},o.a.createElement(ec,{checked:!!l.kpi_reqMessage,onChange:function(e){F({name:"kpi_reqMessage",value:!l.kpi_reqMessage})},name:"kpi_reqMessage",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__reqDescription",1)))):o.a.createElement("div",{style:{position:"absolute",top:30,bottom:0,left:0,right:0}},o.a.createElement(ro,{data:l,chartShow:!1}),o.a.createElement(Yi,{noSearch:!0,nodeId:l._id,type:"kpi",db:"cards",disabledSend:!0,loadTimeline:!0,kpi_type:l.kpi_type}))))}))),Gc=function(e){return{root:{position:"relative",float:"left",width:"calc(100% - 20px)",margin:"10px"},progress:{marginLeft:"7px",width:"calc(100% - 14px)"},image:{width:"100%",paddingTop:"48%",backgroundPosition:"center",backgroundSize:"cover"}}};var Hc=Object(_e.b)((function(e){return{store:e}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Gc)((function(e){var t=e.classes,r=be.getState().sideModule,n=r.data||{};return o.a.createElement("div",{className:t.root},r.data.image&&o.a.createElement("div",{className:t.image,style:{backgroundImage:"url(".concat(r.data.image,")")}}),n.kpi_type&&o.a.createElement(ro,{data:n,chartShow:!0}))})));function Wc(e){var t=Object(De.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:Mt(e.color?e.color:"color"),borderColor:Mt(e.color?e.color:"color"),color:Mt("lightText"),"&:hover":{backgroundColor:Mt(e.color?e.color:"color",.8),borderColor:Mt(e.color?e.color:"color"),boxShadow:"0 0 0 0.2rem ".concat(Mt(e.color?e.color:"color",.2))},"&:active":{boxShadow:"none",backgroundColor:Mt(e.color?e.color:"color"),borderColor:Mt(e.color?e.color:"color")},"&:focus":{boxShadow:"0 0 0 0.2rem ".concat(Mt(e.color?e.color:"color",.2))}}})();return!e.color||e.color&&-1===["default","inherit","primary","secondary"].indexOf(e.color)?o.a.createElement(Ge.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):o.a.createElement(Ge.a,{variant:e.variant?e.variant:"contained",color:"primary",style:e.style?e.style:{},onClick:e.onClick?function(){return e.onClick()}:null},e.children)}function Uc(){Uc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Vc,qc,Xc=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(tc)((function(e){var t=e.classes,r=be.getState(),n=r.db,a=r.sideModule,i=(r.session,a.data||{}),c=o.a.useState(!1),l=Object(je.a)(c,2),s=l[0],u=l[1],d=o.a.useState(!1),p=Object(je.a)(d,2),f=p[0],m=p[1];o.a.useEffect((function(){f||("link"===i.type&&"new"===i._id&&u(!0),m(!0))}));var g=function(t){s&&!t?$t({message:Dt("$__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(Ee.a)(Uc().mark((function t(){var r,n=arguments;return Uc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n.length>0&&void 0!==n[0]&&n[0],u(!1),a.data.name){t.next=6;break}$t({message:Dt("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=11;break;case 6:return t.next=8,hn(e,!0,a.data);case 8:t.sent&&$t({message:Dt("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&g(!0);case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),v=function(){var t=Object(Ee.a)(Uc().mark((function t(){return Uc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:$t({message:Dt("$__unlinkCardsConfirm",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){var t=Object(Ee.a)(Uc().mark((function t(){return Uc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Tn(e,{cardId:i._id,_planId:i._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)}}(),b=n.dataType.filter((function(e){return e.name===a.data.type}))[0];return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:t.btClose},o.a.createElement("div",{style:{position:"fixed",right:"7px",display:"inline-flex",backgroundColor:"#FFFFFF",paddingLeft:"10px"}},s&&o.a.createElement(o.a.Fragment,null,o.a.createElement(wt,{color:Mt("color"),icon:"save",title:Dt("$__save","*"),size:"25px",onClick:function(){y()}}),o.a.createElement(wt,{color:Mt("green"),icon:"playlist_add_check",title:Dt("$__saveAndClose","*"),size:"25px",onClick:function(){y(!0)}})),o.a.createElement(wt,{color:Mt("medium"),icon:"cancel",title:Dt("$__close","*"),size:"25px",onClick:function(){return g(!0)}}))),o.a.createElement("div",{className:t.root},Object.keys(n.cards).filter((function(e){return n.cards[e]._parent===i._id&&!n.cards[e].checklist})).length>0?o.a.createElement("fieldset",{style:{textAlign:"center"}},o.a.createElement("legend",{style:{color:Mt("color")}},Dt("$__unLinkCards",1)),o.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Dt("$__unLinkCardsDescription",1)),o.a.createElement(Wc,{onClick:function(){v()}},Dt("$__unLinkCards",1))):o.a.createElement("fieldset",{style:{marginBottom:"14px"}},(!b.hideFields||b.hideFields&&-1===b.hideFields.indexOf("type"))&&o.a.createElement(Hi,{id:"combo-box-demo",options:e.store.db.type,getOptionLabel:function(e){return Dt(e.label,1)},style:{width:"100%"},name:"type",disableClearable:!0,value:i&&i.type&&e.store.db&&e.store.db.type?e.store.db.type.filter((function(e){return String(e.value)===String(i.type)}))[0]:e.store.db.type[0],renderInput:function(t){return o.a.createElement(Qn,Object.assign({},t,{label:Dt("$__cardType",1),variant:Mt("fieldVariant"),value:i&&i.type&&e.store.db&&e.store.db.type?e.store.db.type.filter((function(e){return String(e.value)===String(i.type)}))[0]:e.store.db.type[0]}))},onChange:function(t,r){!function(t,r){(t.value&&!a.data[t.name]||a.data[t.name]&&a.data[t.name]!==t.value)&&u(!0);var n=Object(h.a)(Object(h.a)({},a.data),{},Object(Oe.a)({},t.name,t.value));r&&r.name&&r.value&&(n=Object(h.a)(Object(h.a)({},n),{},Object(Oe.a)({},r.name,r.value))),e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},a),{},{data:n}))}({name:"type",value:r.value})}}))))})));function Kc(){Kc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Jc=Ae.b.div(Vc||(Vc=Object(we.a)(["\n background-color:none\n "]))),Zc=(Ae.b.div(qc||(qc=Object(we.a)(["background-color:red\n padding:7px"]))),Object(_e.b)((function(e){return{cards:e.db.cards}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState(),r=t.db,n=t.session,a=be.getState().functions.socket,i=o.a.useState(e.name?e.name:""),c=Object(je.a)(i,2),l=c[0],s=c[1],u=o.a.useState(!1),d=Object(je.a)(u,2),p=d[0],f=d[1],m=o.a.useState(!1),g=Object(je.a)(m,2),y=g[0],v=g[1],b=window.location.hash.split("/");b[0]=b[0].replace("#",""),36!==b[0].length&&(b[0]=null),o.a.useEffect((function(){x()}),[]);var x=function(){var t=Object(Ee.a)(Kc().mark((function t(){return Kc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,un(Object(h.a)(Object(h.a)({},e),{},{ignoreLoader:!0}),[e.nodeId],!1,null,"childrens");case 2:t.sent&&v(!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),_={};be.getState().db[e.db]&&be.getState().db[e.db][e.nodeId]&&(_=be.getState().db[e.db][e.nodeId]);var w=Object.keys(be.getState().db.cards).filter((function(t){if(!be.getState().db.cards[t].deleted&&!be.getState().db.cards[t].checklist&&!be.getState().db.cards[t]._recurrenceId&&be.getState().db.cards[t]._parent===e.nodeId&&(!be.getState().db.cards[t].private||be.getState().db.cards[t].private&&be.getState().db.cards[t]._users[n._id]))return!0})).map((function(e){return e})),E=function(){var e=Object(Ee.a)(Kc().mark((function e(){var t,r;return Kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=be.getState().functions.socket,r="task",_&&_.type&&(_.type.indexOf("guideline")>-1&&(r="objective"),"objective"===_.type&&(r="goal"),"goal"===_.type&&(r="task")),t.emit("data",{module:"cards",method:"post",action:"add"},{_parent:_._id,planId:_._planId?_._planId:null,name:l,type:r,status:"notStarted"},function(){var e=Object(Ee.a)(Kc().mark((function e(r){return Kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.emit("card.UPD",{cardId:r.id,cardData:Object(h.a)(Object(h.a)({},r.data),{},{_planId:_._planId?_._planId:null,_parent:_._id,_timeline:Object(Oe.a)({},r.log._id,Object(h.a)(Object(h.a)({},r.log),{},{_parent:[r.id]})),_users:Object(Oe.a)({},n._id,{name:be.getState().db.users[n._id].name?be.getState().db.users[n._id].name:null,displayName:be.getState().db.users[n._id].displayName?be.getState().db.users[n._id].displayName:null,image:be.getState().db.users[n._id].image?be.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 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O=function(){var t=Object(Ee.a)(Kc().mark((function t(n){var o,i,c,l,s,u;return Kc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=Object.keys(be.getState().db.cards).filter((function(t){if(be.getState().db.cards[t]&&be.getState().db.cards[t].checklist&&be.getState().db.cards[t]._parent===e.nodeId)return!0})).sort((function(e,t){return r.cards[e].order&&r.cards[t].order&&String(r.cards[e].order.low)&&String(r.cards[t].order.low)&&parseInt(r.cards[e].order.low)<parseInt(r.cards[t].order.low)?-1:r.cards[e].order&&r.cards[t].order&&String(r.cards[e].order.low)&&String(r.cards[t].order.low)&&parseInt(r.cards[e].order.low)>parseInt(r.cards[t].order.low)?1:0})).map((function(e){return e})),i=n.destination,c=n.source,l=n.draggableId,i){t.next=4;break}return t.abrupt("return",!1);case 4:if(i.droppableId!==c.droppableId||i.id!==c.index){t.next=6;break}return t.abrupt("return",!1);case 6:return(s=o).splice(c.index,1),s.splice(i.index,0,l),a.emit("data",{module:"cards",method:"put",action:"reorder"},{cards:s}),u={},s.map((function(e,t){return u=Object(h.a)(Object(h.a)({},u),{},Object(Oe.a)({},e,r.cards[e])),u=Object(h.a)(Object(h.a)({},u),{},Object(Oe.a)({},e,Object(h.a)(Object(h.a)({},u[e]),{},{order:{low:t}}))),!0})),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),u)})),t.abrupt("return");case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),j=function(){var e=Object(Ee.a)(Kc().mark((function e(t){return Kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),k=function(){var e=Object(Ee.a)(Kc().mark((function e(t){return Kc().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 y?o.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"}},o.a.createElement("span",{style:{color:Mt("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},Dt("$__loadingCatenation")),o.a.createElement(Ga,null)):o.a.createElement("div",{style:{width:"100%"}},o.a.createElement(no.a,{onDragEnd:O,onDragStart:j,onDragUpdate:k},o.a.createElement(no.c,{droppableId:"Drop_tasks",type:"column",direction:"vertical"},(function(e,t){return o.a.createElement(Jc,Object.assign({ref:e.innerRef},e.droppableProps,{isDraggingOver:t.isDraggingOver}),w.sort((function(e,t){return r.cards[e].name<r.cards[t].name?-1:r.cards[e].name>r.cards[t].name?1:0})).map((function(e,t){return o.a.createElement(no.b,{draggableId:e,index:t,key:e},(function(t,n){return o.a.createElement(ii,{provided:t,snapshot:n,data:r.cards[e],db:"cards",onlyOption:!0,showCompleteOption:!0,directDeletion:!0,editable:!0})}))})),e.placeholder)}))),!p&&o.a.createElement("div",{style:{position:"relative",float:"right",width:"100%",padding:"7px",display:"flex",alignContent:"flex-end",justifyContent:"center"}},o.a.createElement("div",null,o.a.createElement(Ir,{reverse:!0,text:Dt("$__add","*"),icon:"add_box",iconColor:Mt("medium"),onClick:function(){f(!p)}}))),p&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px",display:"flex",alignItems:"center"}},o.a.createElement("div",{style:{width:"calc(100% - 50px)",display:"flex"}},o.a.createElement(Qn,{label:Dt("$__taskTitle"),variant:Mt("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){s(e.target.value)},onBlur:function(e){""===e.target.value&&f(!p)},onKeyDown:function(e){13===e.keyCode&&l&&E(),27===e.keyCode&&(f(!p),s(""))}},autoFocus:!0,value:l,placeholder:Dt("$__taskTitlePlaceholder")})),o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(Ct,{title:Dt("$__save",1),color:"green",icon:"save",onClick:function(e){E()},transparent:!0}),o.a.createElement(Ct,{title:Dt("$__cancel",1),color:"lightgrey",icon:"cancel",onClick:function(e){f(!p),s("")},transparent:!0})))))})));function Qc(){Qc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var el=Object(_e.b)((function(e){return{store:e}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState(),r=t.sideModule,n=t.db,a=t.functions,i=t.session,c=a.socket,l=o.a.useState(!1),s=Object(je.a)(l,2),u=s[0],d=s[1],p=o.a.useState(!1),f=Object(je.a)(p,2),m=f[0],g=f[1],y=o.a.useState(!1),v=Object(je.a)(y,2),b=v[0],x=v[1],_=o.a.useState(null),w=Object(je.a)(_,2),E=w[0],O=w[1],j=o.a.useState({}),k=Object(je.a)(j,2),S=k[0],L=k[1],C=r.data||{};o.a.useEffect((function(){m||("user"===C.type&&T(),g(!0))})),o.a.useEffect((function(){var e=Bn(C._id);L(e)}),[C._id]);var I=function(){var t=Object(Ee.a)(Qc().mark((function t(){return Qc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:$t({message:Dt("$__confirmDeleteThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){En(e,{_id:C._id},!1),Rt(e,{_id:C._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 t=Object(Ee.a)(Qc().mark((function t(){return Qc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:$t({message:Dt("$__confirmDeleteThisAndAllLinkedsActivies",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){En(e,{_id:C._id},!1,!0),e.reduxFunction("ASYNC","CLEAR_MODULE")}});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),T=function(){var t=Object(Ee.a)(Qc().mark((function t(){return Qc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ln(e,{idRel:C._id});case 2:t.sent&&x(!0);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),N=function(){var e=Object(Ee.a)(Qc().mark((function e(){return Qc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:x(!0),c.emit("data",{module:"user",method:"post",action:"migrate"},{from:C._id,fromData:C,to:E,toData:n.users[E]},Object(Ee.a)(Qc().mark((function e(){var t;return Qc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:d(!0),t=Object(h.a)({},n.cards),Object.keys(t).filter((function(e){return t[e]._users&&t[e]._users[C._id]})).map((function(e){t[e]._users[E]||(t[e]._users=Object(h.a)(Object(h.a)({},t[e]._users),{},Object(Oe.a)({},E,{access:t[e]._users[C._id].access,_id:E}))),delete t[e]._users[C._id]})),x(!0);case 4:case"end":return e.stop()}}),e)}))));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=[];return Object.keys(n.cards).filter((function(e){return!!(n.cards[e]&&n.cards[e]._users&&Object.keys(n.cards[e]._users).length>0&&1===Object.keys(n.cards[e]._users).filter((function(e){return e===C._id})).length)})).map((function(e){"swot"!==C.type&&n.dataType.filter((function(t){return t.name===n.cards[e].type}))[0]&&n.dataType.filter((function(t){return t.name===n.cards[e].type}))[0].module&&"swot"!==n.dataType.filter((function(t){return t.name===n.cards[e].type}))[0].module||"swot"===C.type&&"swot"===n.dataType.filter((function(t){return t.name===n.cards[e].type}))[0].module?P[n.cards[e].type]=P[n.cards[e].type]?P[n.cards[e].type]+1:1:P.swot=null==P.swot?1:P.swot+1})),o.a.createElement("div",{style:{width:"100%"}},o.a.createElement(Ti,{close:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}),C._id&&n.cards[C._id]&&o.a.createElement(o.a.Fragment,null,o.a.createElement("fieldset",{style:{textAlign:"center"}},o.a.createElement("legend",{style:{color:Mt("color")}},Dt("$__deleteOptions",1)),o.a.createElement("fieldset",{style:{textAlign:"center"}},o.a.createElement("legend",{style:{color:Mt("color")}},Dt("$__deleteActivity",1)),o.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Dt("$__deleteThisActivity",1)),o.a.createElement(Wc,{onClick:function(){I()}},Dt("$__delete",1))),Object.keys(S).length>0&&o.a.createElement("fieldset",{style:{textAlign:"center"}},o.a.createElement("legend",{style:{color:Mt("color")}},Dt("$__thisActivityHasOtherLinkedsActivities",1)),o.a.createElement("div",{style:{textAlign:"center",width:"100%",color:"red"}},Dt("$__deleteAllActiviesLinkedAlert",1)),o.a.createElement(Wc,{onClick:function(){F()}},Dt("$__deleteAll",1))))),C._id&&n.users[C._id]&&("client"===n.users[C._id].type||"group"===n.users[C._id].type||"sic"===n.users[C._id].type)&&o.a.createElement("fieldset",{style:{textAlign:"center"}},o.a.createElement("legend",{style:{color:Mt("color")}},Dt("$__deleteOptions",1)),o.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object.keys(n.users).filter((function(e){return n.users[e]._parent===C._id})).length>0?Dt("$__delete".concat(n.users[C._id].type,"WithUsersDescription"),1):Dt("$__delete".concat(n.users[C._id].type,"NoUsersDescription"),1)),o.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Dt("$__deleteThisDescription",1)),o.a.createElement(Wc,{onClick:function(){I()}},Dt("$__deleteThis",1))),C._id&&n.users[C._id]&&"client"!==n.users[C._id].type&&"group"!==n.users[C._id].type&&"sic"!==n.users[C._id].type&&o.a.createElement(o.a.Fragment,null,b?o.a.createElement(o.a.Fragment,null,Object.keys(P).length>0&&!u?o.a.createElement(o.a.Fragment,null,o.a.createElement("fieldset",null,o.a.createElement("legend",{style:{color:Mt("color")}},Dt("$__thisUserHas",1)),o.a.createElement("div",{style:{position:"relative",marginTop:"22px",bottom:"7px",width:"100%",fontSize:"12px",color:Mt("mediumText"),display:"flex",justifyContent:"center"}},Object.keys(P).length>0&&Object.keys(P).map((function(e,t){return"null"!==String(e)&&"undefined"!==String(e)&&o.a.createElement(Sr,{key:t,icon:n.dataType.filter((function(t){return t.name===e}))[0].icon,title:Dt("$__".concat(e),1),size:"16px",count:P[e],disabled:!0})})))),E?o.a.createElement("fieldset",null,o.a.createElement("legend",null,Dt("$__selectedUserToMigrationCards")),o.a.createElement("div",{style:{cursor:"pointer",marginBottom:"7px",display:"flex",alignItems:"center"},onClick:function(){O(null)}},o.a.createElement(Fr.a,{alt:n.users[E].name,src:n.users[E].image||null,style:{marginRight:"15px"}},n.users[E].name.substr(0,1)),o.a.createElement("span",null,n.users[E].name)),o.a.createElement(Wc,{onClick:function(){$t({message:Dt("$__confirmUserTransferData",1),autoClose:5e4,buttons:[{shadow:!0,title:Dt("$__confirm"),text:Dt("$__confirm"),color:"green",icon:"done_all",size:"25px",style:{marginLeft:15},onClick:function(){N()}},{shadow:!0,title:Dt("$__cancel"),text:Dt("$__cancel"),color:"red",icon:"close",size:"25px",style:{marginLeft:15},onClick:function(){}}],variant:"warning",persist:!1,horizontal:"right"})}},Dt("$__migrate",1))):o.a.createElement("fieldset",null,o.a.createElement("legend",null,Dt("$__chooseAUserToTransferCardsBeforeDeletingUser")),Object.keys(n.users).filter((function(e){return e!==C._id&&"client"!==n.users[e].type&&"group"!==n.users[e].type&&(!n.users[e]._parent||n.users[e]._parent===i.account)&&!n.users[e].deleted&&(!C._parent||C._parent&&n.users[e]._parent===C._parent)})).map((function(e){return o.a.createElement("div",{style:{cursor:"pointer",marginBottom:"7px",display:"flex",alignItems:"center"},onClick:function(){O(e)},key:e},o.a.createElement(Fr.a,{alt:n.users[e].name,src:n.users[e].image||null,style:{marginRight:"15px"}},n.users[e].name.substr(0,1)),o.a.createElement("span",null,n.users[e].name))}))),o.a.createElement("fieldset",{style:{textAlign:"center"}},o.a.createElement("legend",{style:{color:Mt("color")}},Dt("$__deactivateThis",1)),o.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Dt("$__deactivateWhithoutMigration",1)),o.a.createElement(Wc,{onClick:function(){I()}},Dt("$__deactivateThis",1)))):o.a.createElement("fieldset",{style:{textAlign:"center"}},o.a.createElement("legend",{style:{color:Mt("color")}},Dt("$__deactivateThis",1)),o.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Dt("$__deactivateUserDescription",1)),o.a.createElement(Wc,{onClick:function(){I()}},Dt("$__deactivateThis",1)))):o.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",marginTop:"33px"}},o.a.createElement(jt,null))))})),tl=Object(De.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 rl(e){var t=tl(),r=Object(h.a)({},e);return r.title&&delete r.title,e.title?o.a.createElement(xt.a,{title:e.title},o.a.createElement(Fr.a,Object.assign({},r,{className:t[e.size]}),e.children)):o.a.createElement(Fr.a,Object.assign({},r,{className:t[e.size]}),e.children)}function nl(){nl=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var al=function(e){var t=be.getState(),r=t.timeline,n=t.functions,a=t.session,i=n.socket,c=be.getState().db,l=o.a.useState(e.data),s=Object(je.a)(l,2),u=s[0],d=s[1],p=u.name.split("."),f=p[p.length-1],m=o.a.useState(!1),g=Object(je.a)(m,2),y=(g[0],g[1],o.a.useState(p[0])),v=Object(je.a)(y,2);v[0],v[1],"blob"===u.name&&(u.name="".concat(Dt("$__coverImage","*"),".jpg"),f="jpg");var b="attachment";be.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(f.toLowerCase())>-1})).length>0&&(b=be.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(f.toLowerCase())>-1}))[0].icon||"https://machen.azureedge.net/".concat(u.file));var x=function(){var e=Object(Ee.a)(nl().mark((function e(t){return nl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{i.emit("data",{module:"node",method:"put",action:"update"},Object(h.a)({_id:u._id},t),Object(Ee.a)(nl().mark((function e(){return nl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:d(Object(h.a)(Object(h.a)({},u),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)}}(),_="img";return c.fileExtensions.filter((function(e){return e.ext.indexOf(f.toLowerCase())>-1})).length>0&&c.fileExtensions.filter((function(e){return e.ext.indexOf(f.toLowerCase())>-1}))[0].viewer&&(_=c.fileExtensions.filter((function(e){return e.ext.indexOf(f.toLowerCase())>-1}))[0].viewer),o.a.createElement("div",null,o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginBottom:"5px",cursor:"pointer"}},o.a.createElement("div",{style:{position:"relative",width:"100%"}},o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},u.in&&u.in.private?o.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"}},o.a.createElement(wt,{icon:"lock",size:"17px"})):o.a.createElement(o.a.Fragment,null,"string"===typeof b&&-1===b.indexOf("https")&&-1===b.indexOf("svg")?o.a.createElement("div",{style:{position:"relative",float:"left",width:"33px",height:"33px",alignItems:"center",display:"flex"},onClick:function(t){e.openLightBox&&e.openLightBox()}},o.a.createElement(wt,{icon:b,size:"33px"})):o.a.createElement("div",{style:{position:"relative",float:"left",width:"33px",height:"33px",alignItems:"center",backgroundImage:'url("'.concat(b,'")'),backgroundSize:"cover",backgroundRepeat:"no-repeat",borderRadius:7},onClick:function(t){e.openLightBox&&e.openLightBox()}})),o.a.createElement("div",{style:{display:"flex",paddingLeft:15,alignItems:"center",maxWidth:"calc(100% - 40px)"}},u.in&&u.in.name&&o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},"User"===u.in.db&&u.in._id===a._id?o.a.createElement("div",null,o.a.createElement(rl,{alt:u.createdBy.name,src:u.createdBy.image,style:{width:"21px",height:"21px"}},u.createdBy.name)):o.a.createElement(o.a.Fragment,null),"User"===u.in.db&&u.in._id!==a._id?o.a.createElement("div",null,o.a.createElement(rl,{alt:u.in.name,src:u.in.image,style:{width:"21px",height:"21px"}},u.in.name)):o.a.createElement(o.a.Fragment,null),o.a.createElement(ra,{private:!(!u.in||!u.in.private),title:"".concat("User"===u.in.db?"".concat(Dt("$__chatWithUser","*")," - ").concat(u.in._id!==a._id?"".concat(u.in.name):"".concat(u.createdBy.name)):"chatGroup"===u.in.type?"".concat(Dt("$__chatGroup","*")," - ").concat(u.in.name):"User"!==u.in.db&&"chatGroup"!==u.in.type?"".concat(u.in.name):""),icon:"User"===u.in.db||"chatGroup"===u.in.type?null:u.in.type&&c&&c.dataType&&c.dataType.filter((function(e){return e.name===u.in.type}))[0]&&c.dataType.filter((function(e){return e.name===u.in.type}))[0].icon||"$__topic",color:Mt("medium"),style:{padding:"7px",minHeight:"21px !important",textAlign:"left"},textStyle:!0}),o.a.createElement("span",{style:{marginRight:7}},"/")),o.a.createElement(ra,{private:!(!u.in||!u.in.private),privateTitle:Dt("$__privateFile"),title:u.name,value:u.name.replace(".".concat(f),""),searchText:e.searchText?e.searchText:null,color:e.dark?Mt("lightgray"):Mt("gray"),editable:!!e.admin,_id:u._id,dark:!!e.dark,inputStyle:e.dark?{backgroundColor:"rgba(250,250,250,0.8)",borderRadius:7}:null,textStyle:{fontSize:12,fontWeight:"normal"},searchTextStyle:Object(h.a)({fontSize:12},e.dark?{color:"#FFFFFF"}:{}),style:{minHeight:"21px !important"},onEdit:e.admin?function(e){x({name:"".concat(e,".").concat(f)})}:null}))),"audio"===_&&o.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"}},o.a.createElement(fr.a,{src:"https://machen.azureedge.net/".concat(u.file),controls:!0})),u.createdBy&&o.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center",color:e.dark?"lightgray":"gray",fontSize:10,marginLeft:"57px",clear:"both"}},u.in&&!u.in.private?o.a.createElement(o.a.Fragment,null,o.a.createElement("span",{style:{color:"lightgray",fontSize:10,marginRight:7}},Dt("$__sendedBy"),":"),o.a.createElement(rl,{alt:u.createdBy.name,src:u.createdBy.image,style:{width:"15px",height:"15px"}},u.createdBy.name),o.a.createElement("span",{style:{marginLeft:3}},u.createdBy.name)):o.a.createElement(o.a.Fragment,null),o.a.createElement("span",{style:{marginLeft:3}},Kt(u.created_at)))),e.showParent&&(u.timelineId||u.message)&&(c.cards[u.cardId]&&r[u.cardId]&&r[u.cardId][u.timelineId]||u.message)&&o.a.createElement("div",{style:{width:"100%",marginBottom:"33px"}},o.a.createElement(Ii,{openLightBox:function(t){e.openLightBox&&e.openLightBox(t)},storie:c.cards[u.cardId]&&r[u.cardId]&&r[u.cardId][u.timelineId]?r[u.cardId][u.timelineId]:u.message,db:"cards",nodeId:u.cardId}),o.a.createElement("div",{style:{clear:"both"}})),e.showParent&&u.cardId&&c.cards[u.cardId]&&o.a.createElement("div",{style:{width:"100%",top:"33px"}},o.a.createElement(ii,{db:"cards",data:c.cards[u.cardId],showConnectedIn:!0})),o.a.createElement("div",{style:{width:"100%",height:"1px",backgroundColor:"rgba(0,0,0,0.1)",marginTop:"15px"}})))};function ol(){ol=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var il=function(){var e=Object(Ee.a)(ol().mark((function e(t){var r,n,a,o,i,c;return ol().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.ids,t.searchText,n=t.skip,void 0===n?null:n,a=t.limit,void 0===a?null:a,o=t.asc,void 0!==o&&o,i=t.childrens,void 0!==i&&i,e.next=3,new Promise(function(){var e=Object(Ee.a)(ol().mark((function e(n,a){var o,i;return ol().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Qr.post("/Files_List/",{ids:r,type:t.type?t.type:"cards"});case 3:(o=e.sent)&&o.data&&(i=o.data,n(i)),e.next=13;break;case 7:e.prev=7,e.t0=e.catch(0),console.group("loadFiles::ERR::"),console.log(e.t0),console.groupEnd(),a(!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)}}(),cl=function(){var e=Object(Ee.a)(ol().mark((function e(t){var r;return ol().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise(function(){var e=Object(Ee.a)(ol().mark((function e(r,n){var a;return ol().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Qr.post("/Files_Folders/",{ids:t&&t.ids?t.ids:[],childrens:!(!t||!t.childrens)&&t.childrens});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)}}(),ll=function(){var e=Object(Ee.a)(ol().mark((function e(t){var r,n,a,o,i,c,l,s,u,d,p;return ol().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(Ee.a)(ol().mark((function e(a,i){var l,u;return ol().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Qr.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 sl(){sl=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var ul,dl,pl=Object(_e.b)((function(){return{}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState(),r=t.db,n=t.session,a=o.a.useState(!0),i=Object(je.a)(a,2),c=i[0],l=i[1],s=o.a.useState([]),u=Object(je.a)(s,2),d=u[0],p=u[1],f=o.a.useState(""),m=Object(je.a)(f,2),g=m[0],y=m[1],v=[];o.a.useEffect((function(){return b(),function(){p([]),l(!0)}}),[e.nodeId]);var b=function(){var t=Object(Ee.a)(sl().mark((function t(){var n;return sl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,il({ids:[e.nodeId],type:r.cards[e.nodeId]?"cards":"users"});case 2:(n=t.sent)&&(p(n),l(!1));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),x=function(t){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:v,file:t})};return o.a.createElement("div",{style:{position:"relative",width:"100%",height:"100%"},id:"sideModule_files"},(!g&&d.length>10||g)&&o.a.createElement("div",{style:{position:"relative",padding:"10px"}},o.a.createElement(Qn,{label:Dt("$__fileNameSearch",1),variant:Mt("fieldVariant"),name:"name",id:"sideModule_files_search",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"find_in_page"})),onChange:function(e){y(e.target.value)}},value:Gt(g).toLowerCase(),placeholder:Dt("$__fileNameSearch")})),o.a.createElement("div",{style:{position:"absolute",bottom:0,top:d&&d.length>10?63:0,padding:15,left:0,right:0},id:"sideModule_files_list"},o.a.createElement("legend",{style:{display:"flex",alignItems:"center",color:e.dark?Mt("color"):Mt("menu"),fontSize:14}},o.a.createElement(wt,{color:Mt("color"),icon:"folder_open",title:Dt("$__files","*"),size:"20px",style:{marginRight:"15px"}}),Dt("$__files","*")),o.a.createElement("ul",{style:{listStyle:"none",padding:"0px",position:"absolute",bottom:0,top:33,overflowY:"auto",overflowX:"hidden",left:15,right:15}},0===d.length&&o.a.createElement("li",{style:{width:"100%",textAlign:"center",color:e.dark?Mt("color"):Mt("menu")}},o.a.createElement(Ga,null),Dt(c?"$__checkingFiles":"$__hasNoFiles","*")),d&&d.length>0&&d.filter((function(e){return!g||""===g||g&&e.data.name.toLowerCase().indexOf(g.toLocaleLowerCase())>-1})).sort((function(e,t){return parseInt(e.data.created_at)<parseInt(t.data.created_at)})).map((function(t,a){v.push(t.data);var i=Object(h.a)(Object(h.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),o.a.createElement("li",{key:t.data._id,onClick:c?null:function(e){x(t.data._id),e.preventDefault()},id:"sideModule_files_file_".concat(t.data._id)},o.a.createElement(al,{data:i,resume:!0,dark:!!e.dark,admin:c,searchText:g,openLightBox:function(){x(t.data._id)}}))})))))}));function fl(){fl=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var hl=Ae.b.div(ul||(ul=Object(we.a)(["\n background-color:none;\n "]))),ml=(Ae.b.div(dl||(dl=Object(we.a)(["background-color:red;\n padding:7px;"]))),Object(_e.b)((function(e){return{store:e}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState(),r=t.db,n=(t.session,be.getState().functions.socket),a=o.a.useState(e.name?e.name:""),i=Object(je.a)(a,2),c=(i[0],i[1],o.a.useState(!1)),l=Object(je.a)(c,2),s=(l[0],l[1],window.location.hash.split("/"));s[0]=s[0].replace("#",""),36!==s[0].length&&(s[0]=null),be.getState().db[e.db]&&be.getState().db[e.db][e.nodeId]&&be.getState().db[e.db][e.nodeId];var u=Object.keys(be.getState().db.cards).filter((function(t){if(!be.getState().db.cards[t].deleted&&!be.getState().db.cards[t].checklist&&be.getState().db.cards[t]._recurrenceId&&be.getState().db.cards[t]._parent===e.nodeId)return!0})).map((function(e){return e})),d=function(){var t=Object(Ee.a)(fl().mark((function t(a){var o,i,c,l,s,u;return fl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=Object.keys(be.getState().db.cards).filter((function(t){if(be.getState().db.cards[t]&&be.getState().db.cards[t].checklist&&be.getState().db.cards[t]._parent===e.nodeId)return!0})).sort((function(e,t){return r.cards[e].order&&r.cards[t].order&&String(r.cards[e].order.low)&&String(r.cards[t].order.low)&&parseInt(r.cards[e].order.low)<parseInt(r.cards[t].order.low)?-1:r.cards[e].order&&r.cards[t].order&&String(r.cards[e].order.low)&&String(r.cards[t].order.low)&&parseInt(r.cards[e].order.low)>parseInt(r.cards[t].order.low)?1:0})).map((function(e){return e})),i=a.destination,c=a.source,l=a.draggableId,i){t.next=4;break}return t.abrupt("return",!1);case 4:if(i.droppableId!==c.droppableId||i.id!==c.index){t.next=6;break}return t.abrupt("return",!1);case 6:return(s=o).splice(c.index,1),s.splice(i.index,0,l),n.emit("data",{module:"cards",method:"put",action:"reorder"},{cards:s}),u={},s.map((function(e,t){return u=Object(h.a)(Object(h.a)({},u),{},Object(Oe.a)({},e,r.cards[e])),u=Object(h.a)(Object(h.a)({},u),{},Object(Oe.a)({},e,Object(h.a)(Object(h.a)({},u[e]),{},{order:{low:t}}))),!0})),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),u)})),t.abrupt("return");case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),p=function(){var e=Object(Ee.a)(fl().mark((function e(t){return fl().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)}}(),f=function(){var e=Object(Ee.a)(fl().mark((function e(t){return fl().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 o.a.createElement("div",{style:{width:"100%"}},o.a.createElement(no.a,{onDragEnd:d,onDragStart:p,onDragUpdate:f},o.a.createElement(no.c,{droppableId:"Drop_tasks",type:"column",direction:"vertical"},(function(e,t){return o.a.createElement(hl,Object.assign({ref:e.innerRef},e.droppableProps,{isDraggingOver:t.isDraggingOver}),u.sort((function(e,t){return r.cards[e].order&&r.cards[t].order&&String(r.cards[e].order.low)&&String(r.cards[t].order.low)&&parseInt(r.cards[e].order.low)<parseInt(r.cards[t].order.low)?-1:r.cards[e].order&&r.cards[t].order&&String(r.cards[e].order.low)&&String(r.cards[t].order.low)&&parseInt(r.cards[e].order.low)>parseInt(r.cards[t].order.low)?1:0})).map((function(e,t){return o.a.createElement(no.b,{draggableId:e,index:t,key:e},(function(t,n){return o.a.createElement(ii,{provided:t,snapshot:n,data:r.cards[e],db:"cards",onlyOption:!0,showCompleteOption:!0,directDeletion:!0,editable:!0,noShowRecurrenceCard:!0})}))})),e.placeholder)}))))}))),gl=r(1414),yl=function(e){return{root:Object(Oe.a)({height:"auto",transform:"translateZ(0px)",flexGrow:1,zIndex:1e3},"height","100vh"),speedDial:{position:"absolute",bottom:e.spacing(2),right:e.spacing(2),"& .MuiFab-root":{backgroundColor:Mt("color"),color:Mt("lightText"),display:"flex",alignItems:"center",justifyContent:"center"}},speedDialInvisible:{right:e.spacing(2),bottom:"-60px",position:"absolute","& .MuiFab-root":{backgroundColor:Mt("color"),color:Mt("lightText"),display:"flex",alignItems:"center",justifyContent:"center"},"& .MuiButtonBase-root":{}}}};function vl(){vl=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var bl=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(yl)((function(e){var t=e.classes,r=be.getState().functions.socket,n=o.a.useState({name:"plan"}),a=Object(je.a)(n,2),i=a[0],c=a[1],l=o.a.useState(""),s=Object(je.a)(l,2),u=s[0],d=s[1],p=o.a.useState(""),f=Object(je.a)(p,2),m=f[0],g=(f[1],o.a.useState(null)),y=Object(je.a)(g,2),v=y[0],b=y[1],x=o.a.useState(0),_=Object(je.a)(x,2),w=_[0],E=_[1],O=be.getState(),j=O.db,k=O.session,S=j.cards,L=be.getState().sideModule.data;o.a.useEffect((function(){Object(Ee.a)(vl().mark((function t(){return vl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,un(e,null,!1,null,"plans",!1);case 2:case"end":return t.stop()}}),t)})))()}),[]);var C=o.a.useRef(null),I=[];j.dataType.filter((function(e){return e.sendTo})).map((function(e){I.push({name:e.name})}));var F=j.users[Object.keys(j.users).find((function(e){return e.indexOf(k._id)>-1}))]._access,T=0;k._id&&j.cards[L._id]&&j.cards[L._id]._users&&j.cards[L._id]._users[Object.keys(j.cards[L._id]._users).find((function(e){return e.indexOf(k._id)>-1}))]&&(T=j.cards[L._id]._users[Object.keys(j.cards[L._id]._users).find((function(e){return e.indexOf(k._id)>-1}))]);var N=window.location.hash.split("/");N[0]=N[0].replace("#","");var P=S;P=Object.keys(P).filter((function(e){if(!P[e].archived&&!P[e].deleted&&(P[e]._users&&P[e]._id!==L._id&&P[e]._users[k._id]&&parseInt(P[e]._users[k._id].access)>2||F&&(F.owner||F.planAdmin||F.planModerate)||T&&T.access&&parseInt(T.access)>2))return!0})).map((function(e){return P[e]})),u&&(P=Object.keys(P).filter((function(e){if(P[e]&&P[e].name&&P[e].name.toLowerCase().indexOf(u.toLowerCase())>-1)return!0})).map((function(e){return P[e]}))),i&&(P=Object.keys(P).filter((function(e){if(P[e]&&P[e].type&&P[e].type===i.name)return!0})).map((function(e){return P[e]}))),P=Object.keys(P).filter((function(e){return L.type&&P[e].type&&j.dataType.filter((function(e){return e.name===L.type}))&&j.dataType.filter((function(e){return e.name===L.type})).length>0&&j.dataType.filter((function(e){return e.name===L.type}))[0].sharedIn&&(j.dataType.filter((function(e){return e.name===L.type}))[0].sharedIn.copy.indexOf(P[e].type)>-1||j.dataType.filter((function(e){return e.name===L.type}))[0].sharedIn.attach.indexOf(P[e].type)>-1||j.dataType.filter((function(e){return e.name===L.type}))[0].sharedIn.shared.indexOf(P[e].type)>-1)})).map((function(e){return P[e]}));var A=function(){var t=Object(Ee.a)(vl().mark((function t(){var n;return vl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n={_id:Object(pn.a)(),cardId:L._id,idRel:v,_parent:v,type:"comment",message:m||"",shared:!0},Xa(e,Object(h.a)(Object(h.a)({},n),{},{user:Object(h.a)({},j.users[k._id]),files:{}})),r.emit("data",{module:"timeline",method:"post",action:"add"},n,(function(e){})),b(null),c({name:"plan"});case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),D=function(){var t=Object(Ee.a)(vl().mark((function t(){return vl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:$t({message:Dt("$__confirmMoveCard",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){var t={cardId:L._id,newRel:v,planId:j.cards[v]._planId?j.cards[v]._planId:"plan"===j.cards[v].type?v:null,oldRel:L._parent};Cn(e,t)&&(b(null),c({name:"plan"}))}});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return o.a.createElement("div",{className:t.root},o.a.createElement("div",{style:{width:"100%",padding:"15px"},ref:C},v&&j.cards[v]&&o.a.createElement(o.a.Fragment,null,o.a.createElement(ii,{db:"cards",data:j.cards[v],onlyOption:!0}),o.a.createElement("fieldset",{style:{maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},o.a.createElement("legend",null,Dt("$__action")),j.dataType.filter((function(e){return e.name===L.type})).length>0&&j.dataType.filter((function(e){return e.name===L.type}))[0].sharedIn&&j.dataType.filter((function(e){return e.name===L.type}))[0].sharedIn.shared&&j.dataType.filter((function(e){return e.name===L.type}))[0].sharedIn.shared.indexOf(j.cards[v].type)>-1&&o.a.createElement(Wc,{style:{position:"relative",float:"left",margin:"3px"},onClick:function(){return A()}},Dt("$__share","*"))),j.dataType.filter((function(e){return e.name===L.type})).length>0&&j.dataType.filter((function(e){return e.name===L.type}))[0].sharedIn&&j.dataType.filter((function(e){return e.name===L.type}))[0].sharedIn.attach&&j.dataType.filter((function(e){return e.name===L.type}))[0].sharedIn.attach.indexOf(j.cards[v].type)>-1&&o.a.createElement("fieldset",{style:{maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},o.a.createElement("legend",null,Dt("$__AttachInCard")),o.a.createElement(Wc,{style:{position:"relative",float:"left",margin:"3px"},onClick:function(){return D()}},Dt("$__Attach","*"))),o.a.createElement("fieldset",{style:{maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},o.a.createElement(Wc,{style:{position:"relative",float:"left",margin:"3px"},color:"red",onClick:function(){b(null)}},Dt("$__cancel","*"))))),o.a.createElement("div",{style:{padding:"15px"}},o.a.createElement(Hi,{dbNode:"typeFilter",options:I,getOptionLabel:function(e){return Dt("$__".concat(e.name),1)},style:{width:"100%"},name:"typeFilter",disableClearable:!0,value:i,renderInput:function(e){return o.a.createElement(Qn,Object.assign({},e,{label:Dt("$__cardType",1),variant:Mt("outlined")}))},onChange:function(e,t){c(t)}})),o.a.createElement("div",{style:{padding:"15px"}},o.a.createElement(Qn,{label:Dt("$__search",1),variant:"outlined",name:"search",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){d(e.target.value),E(0)}},value:u})),o.a.createElement("div",{style:{maxWidth:"100%"}},Object.keys(P).length>25&&o.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center"}},o.a.createElement(gl.a,{count:Object.keys(P).length,size:"small",page:w,onChange:function(e,t){E(t)}})),Object.keys(P).filter((function(e){return!v||(!(!v||P[e]._parent!==v&&P[e]._planId!==v)||void 0)})).map((function(e,t){if(t<=25*(w+1)&&t>=25*w)return o.a.createElement(ii,{db:"cards",key:t,data:P[e],notGlobalExpanded:!0,onlyOption:!0,onClick:function(t){b(P[e]._id),E(0),C.current.scrollIntoView()}})}))))}))),xl=r(244),_l=r(482),wl=r.n(_l);var El=function(e){var t=wl.a.ExcelFile,r=wl.a.ExcelFile.ExcelSheet,n=wl.a.ExcelFile.ExcelColumn,a=e.data,i=[],c=[],l=0,s=0,u=0,d=0;if(a&&Object.keys(a).length>0){Object.keys(a).map((function(e){var t=[];a[e]._times&&Object.keys(a[e]._times>0)&&Object.keys(a[e]._times).map((function(r){var n=be.getState().db.cards[a[e]._times[r].cardId],o=parseInt(a[e]._times[r].fin)-parseInt(a[e]._times[r].ini);l+=o;var c=o,s="",u=0,d=0,p=0;o<60?s="".concat(c," ").concat(Dt("$__seconds",1)):o>3600?(c-=3600*(u=Math.trunc(c/3600)),p=(c-=60*(d=Math.trunc(c/60)>0?Math.trunc(c/60):0))>0?c:0,s="".concat(u," ").concat(Dt("$__hour",1)).concat(u>1?"s":""," ").concat(d," ").concat(Dt("$__minutes",1)," ").concat(p," ").concat(Dt("$__seconds",1))):(p=(c-=60*(d=Math.trunc(c/60)>0?Math.trunc(c/60):0))>0?c:0,s="".concat(d," ").concat(Dt("$__minutes",1)," ").concat(p," ").concat(Dt("$__seconds",1))),i.push({name:a[e].name,email:a[e].email,type:Dt("$__".concat(n.type),1),card:n.name,description:a[e]._times[r].message,iniData:Fe()(1e3*a[e]._times[r].ini).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),finalData:Fe()(1e3*a[e]._times[r].fin).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),total:s,hours:u,minutes:d,seconds:p}),t.push({name:a[e].name,email:a[e].email,type:Dt("$__".concat(n.type),1),card:n.name,description:a[e]._times[r].message,iniData:Fe()(1e3*a[e]._times[r].ini).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),finalData:Fe()(1e3*a[e]._times[r].fin).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),total:s,hours:u,minutes:d,seconds:p})})),t.push({name:"",email:"",type:"",card:"",description:"",iniData:"",finalData:"",total:a[e].timerText,hours:"",minutes:"",seconds:""}),c=Object(h.a)(Object(h.a)({},c),{},Object(Oe.a)({},e,t))}));var p=l,f="";l<60?(d=p,f="".concat(p," ").concat(Dt("$__seconds",1))):l>3600?(p-=3600*(s=Math.trunc(p/3600)),d=(p-=60*(u=Math.trunc(p/60)>0?Math.trunc(p/60):0))>0?p:0,f="".concat(s," ").concat(Dt("$__hour",1)).concat(s>1?"s":""," ").concat(u," ").concat(Dt("$__minutes",1)," ").concat(d," ").concat(Dt("$__seconds",1))):(d=(p-=60*(u=Math.trunc(p/60)>0?Math.trunc(p/60):0))>0?p:0,f="".concat(u," ").concat(Dt("$__minutes",1)," ").concat(d," ").concat(Dt("$__seconds",1))),i.push({name:"",type:"",card:"",description:"",iniData:"",finalData:"",total:f,hours:"",minutes:"",seconds:""})}return o.a.createElement(t,{filename:"".concat(Fe()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDTHHMM"),"_").concat(a.name),element:o.a.createElement(Ct,{title:Dt("$__export"),text:Dt("$__export"),icon:"file_download",size:"25px"})},o.a.createElement(r,{data:i,name:"timeSheet"},o.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Dt("$__name",1)),value:"name"}),o.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Dt("$__email",1)),value:"email"}),o.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Dt("$__type",1)),value:"type"}),o.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Dt("$__card",1)),value:"card"}),o.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Dt("$__description",1)),value:"description"}),o.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Dt("$__initialTimer",1)),value:"iniData"}),o.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Dt("$__finalTimer",1)),value:"finalData"}),o.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Dt("$__totalTime",1)),value:"total"}),o.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Dt("$__hours",1)),value:"hours"}),o.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Dt("$__minutes",1)),value:"minutes"}),o.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Dt("$__seconds",1)),value:"seconds"})),c&&Object.keys(c).length>0&&Object.keys(c).map((function(e,t){var a=c[e][0].name;return o.a.createElement(r,{data:c[e],name:a,key:e},o.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Dt("$__name",1)),value:"name"}),o.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Dt("$__email",1)),value:"email"}),o.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Dt("$__type",1)),value:"type"}),o.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Dt("$__card",1)),value:"card"}),o.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Dt("$__description",1)),value:"description"}),o.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Dt("$__initialTimer",1)),value:"iniData"}),o.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Dt("$__finalTimer",1)),value:"finalData"}),o.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Dt("$__totalTime",1)),value:"total"}),o.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Dt("$__hours",1)),value:"hours"}),o.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Dt("$__minutes",1)),value:"minutes"}),o.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Dt("$__seconds",1)),value:"seconds"}))})))},Ol={card:{border:"0",marginBottom:"30px",marginTop:"30px",borderRadius:"6px",color:"rgba("+He("#000")+", 0.87)",background:"#FFF",width:"100%",boxShadow:"0 1px 4px 0 rgba("+He("#000")+", 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("+He("#000")+", 0.56), 0 4px 25px 0px rgba("+He("#000")+", 0.12), 0 8px 10px -5px rgba("+He("#000")+", 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("+He("#000")+", 0.56)",borderRadius:"6px"},"& small":{color:"rgba("+He("#FFF")+", 0.7) !important"}},cardPricing:{textAlign:"center","&:after":{backgroundColor:"rgba("+He("#000")+", 0.7) !important"},"& ul":{listStyle:"none",padding:0,maxWidth:"240px",margin:"10px auto"},"& ul li":{color:tt[0],textAlign:"center",padding:"12px 0px",borderBottom:"1px solid rgba("+He(tt[0])+",0.3)"},"& ul li:last-child":{border:0},"& ul li b":{color:tt[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:"#FFF",borderColor:"rgba("+He("#FFF")+",0.3)","& b, & svg,& .fab,& .fas,& .far,& .fal,& .material-icons":{color:"#FFF",fontWeight:"700"}}},cardProduct:{marginTop:"30px"},primary:{background:"linear-gradient(60deg,"+Xe[1]+","+Xe[4]+")","& h1 small":{color:"rgba("+He("#FFF")+", 0.8)"},color:"#FFF"},info:{background:"linear-gradient(60deg,"+Qe[1]+","+Qe[4]+")","& h1 small":{color:"rgba("+He("#FFF")+", 0.8)"},color:"#FFF"},success:{background:"linear-gradient(60deg,"+Ze[1]+","+Ze[4]+")","& h1 small":{color:"rgba("+He("#FFF")+", 0.8)"},color:"#FFF"},warning:{background:"linear-gradient(60deg,"+Ke[1]+","+Ke[4]+")","& h1 small":{color:"rgba("+He("#FFF")+", 0.8)"},color:"#FFF"},danger:{background:"linear-gradient(60deg,"+Je[1]+","+Je[4]+")","& h1 small":{color:"rgba("+He("#FFF")+", 0.8)"},color:"#FFF"},rose:{background:"linear-gradient(60deg,"+et[1]+","+et[4]+")","& h1 small":{color:"rgba("+He("#FFF")+", 0.8)"},color:"#FFF"},cardChart:{"& p":{marginTop:"0px",paddingTop:"0px"}},cardLogin:{transform:"translate3d("+He("#000")+")",transition:"all 300ms linear"}},jl=["className","children","plain","profile","blog","raised","background","pricing","color","product","testimonial","chart","login"],kl=Object(De.a)(Ol);function Sl(e){var t,r=kl(),n=e.className,a=e.children,i=e.plain,c=e.profile,l=e.blog,s=e.raised,u=e.background,d=e.pricing,p=e.color,f=e.product,h=e.testimonial,m=e.chart,g=e.login,y=Object(Re.a)(e,jl),v=Ce()((t={},Object(Oe.a)(t,r.card,!0),Object(Oe.a)(t,r.cardPlain,i),Object(Oe.a)(t,r.cardProfile,c||h),Object(Oe.a)(t,r.cardBlog,l),Object(Oe.a)(t,r.cardRaised,s),Object(Oe.a)(t,r.cardBackground,u),Object(Oe.a)(t,r.cardPricingColor,d&&void 0!==p||d&&void 0!==u),Object(Oe.a)(t,r[p],p),Object(Oe.a)(t,r.cardPricing,d),Object(Oe.a)(t,r.cardProduct,f),Object(Oe.a)(t,r.cardChart,m),Object(Oe.a)(t,r.cardLogin,g),Object(Oe.a)(t,n,void 0!==n),t));return o.a.createElement("div",Object.assign({className:v},y),a)}var Ll={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("+He("#FFF")+", 0.8)"}}},cardBodyProfile:{marginTop:"15px"},cardBodyCalendar:{padding:"0px !important"}},Cl=["className","children","background","plain","formHorizontal","pricing","signup","color","profile","calendar"],Il=Object(De.a)(Ll);function Fl(e){var t,r=Il(),n=e.className,a=e.children,i=e.background,c=e.plain,l=e.formHorizontal,s=e.pricing,u=e.signup,d=e.color,p=e.profile,f=e.calendar,h=Object(Re.a)(e,Cl),m=Ce()((t={},Object(Oe.a)(t,r.cardBody,!0),Object(Oe.a)(t,r.cardBodyBackground,i),Object(Oe.a)(t,r.cardBodyPlain,c),Object(Oe.a)(t,r.cardBodyFormHorizontal,l),Object(Oe.a)(t,r.cardPricing,s),Object(Oe.a)(t,r.cardSignup,u),Object(Oe.a)(t,r.cardBodyColor,d),Object(Oe.a)(t,r.cardBodyProfile,p),Object(Oe.a)(t,r.cardBodyCalendar,f),Object(Oe.a)(t,n,void 0!==n),t));return o.a.createElement("div",Object.assign({className:m},h),a)}var Tl={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:"#FFF"},"&: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("+He("#000")+", 0.24), 0 8px 10px -5px rgba("+He("#000")+", 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:"#FFF","&:not($cardHeaderText):not($cardHeaderIcon)":Object(h.a)({},st)},successCardHeader:{color:"#FFF","&:not($cardHeaderText):not($cardHeaderIcon)":Object(h.a)({},ut)},dangerCardHeader:{color:"#FFF","&:not($cardHeaderText):not($cardHeaderIcon)":Object(h.a)({},dt)},infoCardHeader:{color:"#FFF","&:not($cardHeaderText):not($cardHeaderIcon)":Object(h.a)({},pt)},primaryCardHeader:{color:"#FFF","&:not($cardHeaderText):not($cardHeaderIcon)":Object(h.a)({},ft)},roseCardHeader:{color:"#FFF","&:not($cardHeaderText):not($cardHeaderIcon)":Object(h.a)({},ht)},customCardHeader:{color:"#FFF","&:not($cardHeaderText):not($cardHeaderIcon)":Object(h.a)({},{})}},Nl=["className","children","color","plain","image","contact","signup","stats","icon","text"],Pl=Object(De.a)(Tl);function Al(e){var t,r=Pl(),n=e.className,a=e.children,i=e.color,c=e.plain,l=e.image,s=e.contact,u=e.signup,d=e.stats,p=e.icon,f=e.text,h=Object(Re.a)(e,Nl),m=Ce()((t={},Object(Oe.a)(t,r.cardHeader,!0),Object(Oe.a)(t,r[i+"CardHeader"],i),Object(Oe.a)(t,r.cardHeaderPlain,c),Object(Oe.a)(t,r.cardHeaderImage,l),Object(Oe.a)(t,r.cardHeaderContact,s),Object(Oe.a)(t,r.cardHeaderSignup,u),Object(Oe.a)(t,r.cardHeaderStats,d),Object(Oe.a)(t,r.cardHeaderIcon,p),Object(Oe.a)(t,r.cardHeaderText,f),Object(Oe.a)(t,n,void 0!==n),t));return o.a.createElement("div",Object.assign({className:m},h),a)}var Dl=r(1426),zl=r(1404),Ml=r(1403),Bl=r(1405),$l=r(1320);function Yl(){Yl=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Rl=Object(De.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 Gl=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))((function(e){Rl();var t=be.getState(),r=t.db,n=(t.session,t.timeline),a=o.a.useState(!1),i=Object(je.a)(a,2),c=i[0],l=i[1],s=o.a.useState(1),u=Object(je.a)(s,2),d=(u[0],u[1],o.a.useState(Fe()(new Date).tz("America/Sao_Paulo").subtract(720,"d").format("YYYY-MM-DD"))),p=Object(je.a)(d,2),f=p[0],m=p[1],g=o.a.useState(Fe()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DD")),y=Object(je.a)(g,2),v=y[0],b=y[1],x=o.a.useState(!1),_=Object(je.a)(x,2),w=_[0],E=_[1],O=o.a.useState({}),j=Object(je.a)(O,2),k=j[0],S=j[1],L=o.a.useState({}),C=Object(je.a)(L,2),I=C[0],F=C[1];Fe()().format("YYYY/MM/DD"),o.a.useEffect((function(){c||(l(!0),T())}));var T=function(){var t=Object(Ee.a)(Yl().mark((function t(){var n,a,o;return Yl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=[],a=[],o=Bn(e.nodeId),F(o),Object.keys(o).map((function(e){(!r.cards[e]._loadTimeline||r.cards[e]._loadTimeline&&!r.cards[e]._loadTimeline.timer)&&n.push(e),(!r.cards[e]._loadTimeline||r.cards[e]._loadTimeline&&!r.cards[e]._loadTimeline.log)&&a.push(e)})),t.next=7,Ka(Object(h.a)(Object(h.a)({},e),{},{fnIdentification:"Card/index/init()"}),{ids:n,db:"cards",type:"timer"});case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),N={},P={};Object.keys(I).filter((function(e){if(n[e]&&Object.keys(n[e]).filter((function(t){return"timer"===n[e][t].type})).length>0)return!0})).map((function(e){Object.keys(n[e]).filter((function(t){return"timer"===n[e][t].type&&!n[e][t].deleted})).map((function(t){n[e][t]._toUser&&Object.keys(n[e][t]._toUser).length>0&&Object.keys(n[e][t]._toUser).map((function(r){P=Object(h.a)(Object(h.a)({},P),{},Object(Oe.a)({},r,Object(h.a)({},n[e][t]._toUser[r]?n[e][t]._toUser[r]:{})))}))})),Object.keys(n[e]).filter((function(t){if("timer"===n[e][t].type&&!n[e][t].deleted&&(0===Object.keys(k).length||Object.keys(k).length>0&&Object.keys(k).filter((function(r){return k[r]&&(n[e][t].user&&!n[e][t]._toUser&&n[e][t].user._id===r||n[e][t]._toUser&&n[e][t]._toUser[r])})).length>0))return!0})).map((function(t){var r=n[e][t]._toUser?n[e][t]._toUser:Object(Oe.a)({},n[e][t].user._id,n[e][t].user);Object.keys(r).map((function(a){if(parseInt(n[e][t].ini)>=Fe()("".concat(f," 00:00:01")).unix("X")&&parseInt(n[e][t].fin)<=Fe()("".concat(v," 23:59:59")).unix("X")){parseInt(n[e][t].fin)-parseInt(n[e][t].ini);var o=parseInt(n[e][t].fin)-parseInt(n[e][t].ini),i=o=N&&N[a]&&N[a].totalTimer?parseInt(N[a].totalTimer)+(parseInt(n[e][t].fin)-parseInt(n[e][t].ini)):parseInt(n[e][t].fin)-parseInt(n[e][t].ini),c="",l="";if(o<60)c="".concat(i," ").concat(Dt("$__seconds",1)),c="".concat(i,"s");else if(o>3600){var s=Math.trunc(i/3600);i-=3600*s;var u=Math.trunc(i/60)>0?Math.trunc(i/60):0,d=(i-=60*u)>0?i:0;c="".concat(s," ").concat(Dt("$__hour",1)).concat(s>1?"s":""," ").concat(u," ").concat(Dt("$__minutes",1)," ").concat(d>0?"".concat(d," ").concat(Dt("$__seconds",1)):""),l="".concat(s,"H ").concat(u,"M ").concat(d," S")}else{var p=Math.trunc(i/60)>0?Math.trunc(i/60):0,m=(i-=60*p)>0?i:0;c="".concat(p," ").concat(Dt("$__minutes",1)," ").concat(m>0?"".concat(m," ").concat(Dt("$__seconds",1)):""),l="".concat(p,"M ").concat(m," S")}N=Object(h.a)(Object(h.a)({},N),{},Object(Oe.a)({},a,Object(h.a)(Object(h.a)(Object(h.a)(Object(h.a)({},N[a]?N[a]:{}),r[a]?r[a]:{}),N&&N[a]&&N[a].totalTimer?{totalTimer:parseInt(N[a].totalTimer)+(parseInt(n[e][t].fin)-parseInt(n[e][t].ini))}:{totalTimer:parseInt(n[e][t].fin)-parseInt(n[e][t].ini)}),{},{timerText:c,timerTextMini:l,_times:Object(h.a)(Object(h.a)({},N[a]&&N[a]._times?N[a]._times:{}),{},Object(Oe.a)({},t,Object(h.a)(Object(h.a)({},n[e][t]),{},{cardId:e})))})))}1}))}))}));var A=function(e){return o.a.createElement("div",{style:{width:"100%",marginBottom:"10px",display:"flex",alignItems:"center"}},e.data&&e.data.name&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{width:"33px"}},o.a.createElement(xt.a,{title:e.data.name},o.a.createElement(Fr.a,{alt:e.data.name,src:e.data.image||null,style:{width:"33px",height:"33px"}},e.data.name.substr(0,1)))),o.a.createElement("div",{style:{marginLeft:"10px",fontWeight:"bold",color:Mt("menu"),width:"33%",minWidth:"150px"}},e.data.name)),o.a.createElement("div",{style:{marginLeft:"10px",fontWeight:"bold",color:Mt("menu")}},e.data.timerText))},D=function(e){k[e]&&Object.keys(k).filter((function(e){return k[e]})).length<=1?S({}):S(Object(h.a)(Object(h.a)({},k),{},Object(Oe.a)({},e,!k[e])))};return o.a.createElement(Sl,null,o.a.createElement(qo,{title:Dt("$__timeSheet",1),icon:"update",color:Mt("color"),style:{background:Mt("ColumnTitleColor"),padding:"7px"},customButtons:[!w&&{title:"$__timeSheetExport",icon:"file_download",color:Mt("color"),onClick:function(){E(!w)}}]}),w&&o.a.createElement("div",{style:{padding:"15px"}},o.a.createElement("fieldset",{style:{position:"relative",width:"100%",marginLeft:"7px",display:"flex",justifyContent:"space-between",marginBottom:"14px",marginTop:"7px"}},o.a.createElement("legend",null,Dt("$__timeCourse",1)),o.a.createElement(Qn,{label:Dt("$__initialDate",1),variant:Mt("fieldVariant",1),name:"startDate",style:{marginRight:"15px"},InputLabelProps:{shrink:!0},type:"date",inputProps:{max:v||null},InputProps:{autoComplete:"new-password",onChange:function(e){m(e.target.value)}},value:f}),o.a.createElement(Qn,{label:Dt("$__endDate",1),variant:Mt("fieldVariant"),name:"endDate",type:"date",min:f||null,InputLabelProps:{shrink:!0},inputProps:{min:f||null},InputProps:{autoComplete:"new-password",onChange:function(e){b(e.target.value)}},value:v})),r.users&&Object.keys(r.users).length>0&&o.a.createElement(Dl.a,{style:{width:"100%"}},o.a.createElement(Ml.a,{style:{minWidth:"100%"},expandIcon:o.a.createElement(wt,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},o.a.createElement("div",{style:{color:Mt("color"),fontSize:"12px"}},Dt("$__users"),o.a.createElement(la.a,{max:6},Object.keys(k).length>0&&Object.keys(k).map((function(e,t){return"unassigned"!==e&&k[e]?o.a.createElement(xt.a,{title:r.users[e].name,key:t},o.a.createElement(Fr.a,{alt:r.users[e].name,src:r.users[e].image||null},r.users[e].name.substr(0,1))):"unassigned"===e&&k[e]&&o.a.createElement(xt.a,{title:Dt("$__unassigned",1),key:t},o.a.createElement(Fr.a,{alt:Dt("$__unassignedSGL",1)},Dt("$__unassignedSGL",1)))}))))),o.a.createElement(zl.a,{style:{minWidth:"100%"}},o.a.createElement($l.a,null,o.a.createElement(Bl.a,{style:{minWidth:"100%"},control:o.a.createElement(o.a.Fragment,null,o.a.createElement(Fr.a,{alt:"NA"},Dt("NA",1)),o.a.createElement(Ia,{checked:!(!k||!k.unassigned),onChange:function(){D("unassigned")},color:"default"})),label:Dt("$__unassigned")}),Object.keys(P).map((function(e){return r.users&&r.users[e]&&r.users[e]._id&&o.a.createElement(o.a.Fragment,{key:e},o.a.createElement(Bl.a,{key:e,style:{minWidth:"100%"},control:o.a.createElement(o.a.Fragment,null,o.a.createElement(Fr.a,{alt:r.users[e].name.substr(0,1),src:r.users[e].image||null},r.users[e].name.substr(0,1)),o.a.createElement(Ia,{checked:!(!k||!k[e]),onChange:function(){D(e)},color:"default"})),label:r.users[e].name||r.users[e].name}))}))))),o.a.createElement("div",{style:{display:"flex",justifyContent:"center",marginTop:"7px"}},o.a.createElement(El,{data:N}),o.a.createElement(Ct,{title:Dt("$__closeFilter"),text:Dt("$__closeFilter"),color:"lightgrey",textColor:"lightgrey",icon:"cancel",onClick:function(){E(!w)},size:"25px"}))),o.a.createElement(Al,{style:{height:"333px"}},o.a.createElement(xl.a,{data:Object(K.a)(Object.keys(N).sort((function(e,t){return parseInt(N[e].totalTimer)>parseInt(N[t].totalTimer)?-1:parseInt(N[e].totalTimer)<parseInt(N[t].totalTimer)?1:0})).map((function(e,t){return{id:N[e].name,label:N[e].name,value:N[e].totalTimer,color:"#929497",textMini:N[e].timerText}}))),legends:[{anchor:"right",direction:"column",justify:!1,translateX:-20,translateY:-100,itemsSpacing:0,itemWidth:100,itemHeight:18,itemTextColor:"#999",itemDirection:"left-to-right",itemOpacity:1,symbolSize:18,symbolShape:"circle",effects:[{on:"hover",style:{itemTextColor:"#000"}}]}],enableArcLabels:!1,colors:{scheme:"purpleRed_green"},activeOuterRadiusOffset:8,arcLabelsTextColor:{from:"color",modifiers:[["brighter",3]]},borderWidth:1,cornerRadius:3,enableArcLinkLabels:!1,innerRadius:.5,leavesOnly:!0,margin:{top:10,right:80,bottom:10,left:0},padAngle:1.3,sortByValue:!0})),o.a.createElement(Fl,null,o.a.createElement(Bo,null,Object.keys(N).sort((function(e,t){return parseInt(N[e].totalTimer)>parseInt(N[t].totalTimer)?-1:parseInt(N[e].totalTimer)<parseInt(N[t].totalTimer)?1:0})).map((function(e,t){return o.a.createElement(A,{data:N[e],key:e})})))),o.a.createElement("div",{style:{color:"#CCCCCC",fontSize:"12px",padding:"15px",textAlign:"center"}},"plan"===r.cards[e.nodeId].type?Dt("$__timeSheetShowingAllTimesRegisteredInAllActivitiesOfPlan"):Dt("$__timeSheetShowingAllTimesRegisteredInActivityAndLinkedActivities")))})),Hl=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:Mt("color")}}},timeline:{position:"absolute",width:"100%",bottom:"0px"},avatar:{width:"22px",height:"22px"},switch:{fontSize:"16px",fontWeight:"bold",color:Mt("medium")}}};var Wl=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Hl)((function(e){var t=e.classes,r=be.getState(),n=r.db,a=r.sideModule,i=r.session,c=a.data||{},l=o.a.useState(!(!c._id||"new"!==c._id||!c.name)),s=Object(je.a)(l,2),u=(s[0],s[1],o.a.useState(!1)),d=Object(je.a)(u,2),p=d[0],f=d[1],m=o.a.useState("timeline"),g=Object(je.a)(m,2),y=g[0],v=g[1];Ut(),i._id&&n.cards[c._id]&&n.cards[c._id]._users&&n.cards[c._id]._users[Object.keys(n.cards[c._id]._users).find((function(e){return e.indexOf(i._id)>-1}))]&&n.cards[c._id]._users[Object.keys(n.cards[c._id]._users).find((function(e){return e.indexOf(i._id)>-1}))];var b=window.location.hash.split("/");b[0]=b[0].replace("#","");var x=n.cards[c._id]._timeline||{};return x=Object.keys(x).filter((function(e){return"kpi"===x[e].type})).map((function(e){return x[e]})),c._parent&&c._parent!==b[0]&&be.getState().db.cards[c._parent],o.a.createElement("div",null,!p&&o.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},"chart"!==y&&o.a.createElement(Ct,{title:Dt("$__add"),text:Dt("$__add"),icon:"more_time",size:"25px",onClick:function(){f(!0)}}),"chart"!==y&&o.a.createElement(Ct,{title:Dt("$__showChart"),text:Dt("$__showChart"),icon:"analytics",size:"25px",onClick:function(){v("chart")}}),"timeline"!==y&&o.a.createElement(Ct,{title:Dt("$__showTimeline"),text:Dt("$__showTimeline"),icon:"timeline",size:"25px",onClick:function(){v("timeline")}})),"chart"===y&&o.a.createElement("div",{style:{width:"calc(100% - 30px)",marginLeft:"15px"}},o.a.createElement(Gl,{nodeId:c._id})),p&&o.a.createElement("div",{className:t.timeline,style:{top:"0px",backgroundColor:"#FFFFFF"}},o.a.createElement(La,{data:c,manualAdd:!0,callBack:function(){f(!1)}})),(p||"timeline"===y)&&o.a.createElement("div",{style:Object(h.a)(Object(h.a)({position:"absolute"},p?{top:333}:{top:35}),{},{left:0,right:0,bottom:0})},o.a.createElement(Yi,{nodeId:c._id,type:"timer",db:"cards",disabledSend:!0,loadTimeline:!0})))}))),Ul=r(12),Vl=r(1420),ql=Object(De.a)({root:{"&:hover":{backgroundColor:"transparent"}},icon:{borderRadius:"50%",width:16,height:16,boxShadow:"inset 0 0 0 1px ".concat(Mt("color",.2),", inset 0 -1px 0 ").concat(Mt("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(Mt("color",.6)),outlineOffset:2},"input:hover ~ &":{backgroundColor:"#ebf1f5"},"input:disabled ~ &":{boxShadow:"none",background:"rgba(206,217,224,.5)"}},checkedIcon:{backgroundColor:Mt("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:Mt("color",1)}}});var Xl=function(e){var t=ql();return o.a.createElement(Vl.a,Object.assign({className:t.root,disableRipple:!0,color:"default",checkedIcon:o.a.createElement("span",{className:Object(Ul.a)(t.icon,t.checkedIcon)}),icon:o.a.createElement("span",{className:t.icon})},e))},Kl=r(1406),Jl=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(Mt("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(Mt("color",.2)),borderRadius:"5px",display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:"16px",paddingRight:"7px",fontWeight:"bold",fontSize:"12px",color:Mt("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(Mt("color",.2)),borderRadius:"0 0 5px 5px",display:"flex",alignItems:"center",paddingLeft:"16px",fontSize:"12px",color:Mt("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(Mt("color",.2)),borderRadius:"0 0 5px 5px",paddingTop:"15px",paddingLeft:"16px",fontSize:"12px",fontWeight:"bold",color:Mt("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:Mt("medium")},accessDescription:{fontSize:"12px",color:Mt("medium")}}},Zl=r(301),Ql=r.n(Zl);function es(){es=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var ts=Object(_e.b)((function(e){return{store:e}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Jl)((function(e){var t=e.classes,r=be.getState(),n=r.db,a=r.sideModule,i=r.session,c=o.a.useState({id:null}),l=Object(je.a)(c,2),s=l[0],u=l[1],d=o.a.useState(!1),p=Object(je.a)(d,2),f=p[0],m=p[1],g=o.a.useState(!1),y=Object(je.a)(g,2),v=y[0],b=y[1],x=o.a.useState(""),_=Object(je.a)(x,2),w=_[0],E=_[1],O=o.a.useState(!1),j=Object(je.a)(O,2),k=j[0],S=j[1],L=n.cards[a.data._id],C=Object(h.a)({},n.users),I=Object(h.a)({},n.users),F=Object(h.a)(Object(h.a)(Object(h.a)({},L&&L._users?Object(h.a)({},L._users):{}),L._parent&&n.cards[L._parent]&&n.cards[L._parent]._users?Object(h.a)({},n.cards[L._parent]._users):{}),L._planId&&n.cards[L._planId]&&n.cards[L._planId]._users?Object(h.a)({},n.cards[L._planId]._users):{}),T={},N=zn(L._id,["external"],{isArray:!0}),P=window.location.hash.split("/");P[0]=P[0].replace("#","");var A=Ut(),D=L&&L._id&&n.cards[L._id]&&n.cards[L._id]._users&&Object.keys(n.cards[L._id]._users).length>0?n.cards[L._id]._users[Object.keys(n.cards[L._id]._users).find((function(e){return e.indexOf(i._id)>-1}))]:0;if(o.a.useEffect((function(){if(!v){b(!0);L._planId&&n.cards[L._planId]&&n.cards[L._planId].client?n.cards[L._planId].client:L.client&&L.client}})),!a||!a.data)return null;var z=function(){var t=Object(Ee.a)(es().mark((function t(r,o){var i;return es().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=1,L&&"plan"===L.type&&(i=3),o?i=o:L._planId&&n.cards[L._planId]&&n.cards[L._planId]._users&&n.cards[L._planId]._users[r]&&n.cards[L._planId]._users[r].access&&(i=L._parent&&n.cards[L._parent]&&n.cards[L._parent]._users&&n.cards[L._parent]._users[r]&&n.cards[L._parent]._users[r].access&&parseInt(n.cards[L._parent]._users[r].access)>parseInt(n.cards[L._planId]._users[r].access)?parseInt(n.cards[L._parent]._users[r].access):parseInt(n.cards[L._planId]._users[r].access)),!!(n.cards[a.data._id]&&n.cards[a.data._id]._users&&n.cards[a.data._id]._users[r]),t.next=6,_a(e,r,i,a.data._id);case 6:t.sent&&(m(!1),u({_id:null}));case 8:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),M=function(){var t=Object(Ee.a)(es().mark((function t(r,o){var i,c;return es().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=Pt.delete("cards/access/".concat(a.data._id,"__").concat(r)),c=Object(h.a)({},n.cards[a.data._id]._users),i&&(o&&e.reduxFunction("ASYNC","CLEAR_MODULE"),delete c[r],m(!1),u({_id:null}));case 3:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();if(!L)return null;if(C=C&&Object.keys(C).length>0&&Object.keys(C).filter((function(e){return L&&L._users&&L._users[C[e]._id]&&!L._users[C[e]._id].deleted||L._users&&Object.keys(L._users).indexOf(e)>-1})).map((function(e){return C[e]})).sort((function(e,t){return e.name<t.name?-1:0})),I=Object.keys(I).filter((function(e){return!I[e].companyName&&(!w||w&&I[e].name.toLowerCase().indexOf(w.toLowerCase())>-1)&&"client"!==I[e].type&&"group"!==I[e].type&&"account"!==I[e].type&&"external"!==I[e].type&&!I[e].deleted&&(!L._users||L._users&&!L._users[I[e]._id])})).map((function(e){return I[e]})).sort((function(e,t){return e.name<t.name?-1:(e.name,t.name,0)})),F=Object.keys(F).filter((function(e){return!n.users[e]&&36===e.length&&!F[e].deleted&&(!w||w&&I[e].name.toLowerCase().indexOf(w.toLowerCase())>-1)})).map((function(e){return F[e]})).sort((function(e,t){return e.name<t.name?-1:(e.name,t.name,0)})),L._planId&&n.cards[L._planId]&&n.cards[L._planId].client||L.client){var B=L.client?L.client:n.cards[L._planId].client;T=Object.keys(I).filter((function(e){return I[e]._parent===B&&(!w||w&&I[e].name.toLowerCase().indexOf(w.toLowerCase())>-1)&&"client"!==I[e].type&&"group"!==I[e].type&&"account"!==I[e].type&&"external"!==I[e].type})).map((function(e){return I[e]})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})),I=Object.keys(I).filter((function(e){return!I[e]._parent&&(!w||w&&I[e].name.toLowerCase().indexOf(w.toLowerCase())>-1)&&"client"!==I[e].type&&"group"!==I[e].type&&"account"!==I[e].type})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})).map((function(e){return I[e]}))}return L.client||(I=Object.keys(I).filter((function(e){return!I[e]._parent&&(!w||w&&I[e].name.toLowerCase().indexOf(w.toLowerCase())>-1)&&"client"!==I[e].type&&"group"!==I[e].type&&"account"!==I[e].type})).map((function(e){return I[e]})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0}))),o.a.createElement("div",{className:t.root},k&&o.a.createElement("div",{style:{marginTop:15,width:"100%",padding:"4px 15px",fontSize:"16px",color:"lightGray"}},o.a.createElement(Qn,{id:"quickUser_Search",label:Dt("$__searchByName",1),variant:Mt("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:o.a.createElement(Fa.a,{position:"end",style:{cursor:"pointer"},onClick:function(){E(""),S(!1)}},o.a.createElement(wt,{icon:"close"})),onChange:function(e){E(e.target.value)},onBlur:function(e){}},value:w,placeholder:Dt("$__searchByName",1),autoFocus:!0})),o.a.createElement("fieldset",null,o.a.createElement("legend",{style:{color:Mt("color")}},Dt("$__permittedUsers",1)),C&&C.map((function(r,n){var c=1;return L._users&&L._users[r._id]&&L._users[r._id].access&&(c=String(L._users[r._id].access)),(!s._id||s._id&&r._id===s._id)&&o.a.createElement("div",{className:t.user,key:n},s._id===r._id?o.a.createElement("div",{className:t.accessEditing},(s._id!==i._id||A.plan&&A.planAdmin)&&o.a.createElement("div",{style:{marginTop:"30px"}},o.a.createElement(Kl.a,{defaultValue:String(c),"aria-label":"gender",name:"customized-radios",onChange:function(e){u(Object(h.a)(Object(h.a)({},s),{},{access:e.target.value})),m(!0)}},"plan"!==L.type&&(D&&parseInt(D.access)>=1||A&&A.plan&&(A.planAdmin||A.planModerate))&&o.a.createElement(Bl.a,{value:"1",control:o.a.createElement(Xl,null),label:Dt("$__execution",1)}),"plan"!==L.type&&"chatGroup"!==L.type&&(D&&parseInt(D.access)>=2||A&&A.plan&&(A.planAdmin||A.planModerate))&&o.a.createElement(Bl.a,{value:"2",control:o.a.createElement(Xl,null),label:Dt("$__participant",1)}),(D&&parseInt(D.access)>=3||A&&A.plan&&(A.planAdmin||A.planModerate))&&o.a.createElement(Bl.a,{value:"3",control:o.a.createElement(Xl,null),label:Dt("$__leader",1)}),"chatGroup"!==L.type&&(D&&parseInt(D.access)>=4||A&&A.plan&&(A.planAdmin||A.planModerate))&&o.a.createElement(Bl.a,{value:"4",control:o.a.createElement(Xl,null),label:Dt("$__manager",1)}),(D&&parseInt(D.access)>=5||A&&A.plan&&(A.planAdmin||A.planModerate))&&o.a.createElement(Bl.a,{value:"5",control:o.a.createElement(Xl,null),label:Dt("$__admin",1)}))),"chatGroup"!==L.type?o.a.createElement("ul",{id:"ACTIVE_USERS_LIST",style:{position:"relative",float:"left",width:"100%"}},1===parseInt(s.access)&&o.a.createElement("li",null,Dt("$__readOnlyTodo",1)),parseInt(s.access)>1&&o.a.createElement("li",null,Dt("$__interact",1)),parseInt(s.access)>2&&o.a.createElement(o.a.Fragment,null,"plan"===a.data.type&&o.a.createElement(o.a.Fragment,null,o.a.createElement("li",null,Dt("$__access",1)," BRIGHT & CONNECTED"),o.a.createElement("li",null,Dt("$__access",1)," INSIGHTS")),o.a.createElement("li",null,Dt("$__update",1))),parseInt(s.access)>3&&o.a.createElement("li",null,Dt("$__userEdit",1)),parseInt(s.access)>=4&&o.a.createElement(o.a.Fragment,null,"plan"===a.data.type&&o.a.createElement(o.a.Fragment,null,o.a.createElement("li",null,Dt("$__access",1)," MATRIX SWOT")),o.a.createElement("li",null,Dt("$__settings",1))),5===parseInt(s.access)&&o.a.createElement("li",null,Dt("$__deleteActivity",1))):o.a.createElement("ul",{id:"ACTIVE_USERS_LIST",style:{position:"relative",float:"left",width:"100%"}},parseInt(s.access)>1&&o.a.createElement("li",null,Dt("$__viewAndInteract",1)),parseInt(s.access)>2&&o.a.createElement(o.a.Fragment,null,o.a.createElement("li",null,Dt("$__addAndRemoveUsers",1)),o.a.createElement("li",null,Dt("$__update",1))),5===parseInt(s.access)&&o.a.createElement("li",null,Dt("$__deleteGroup",1))),o.a.createElement("div",{className:t.btActions},f&&o.a.createElement(Ct,{transparent:!0,title:Dt("$__save"),icon:"save",color:Mt("color"),onClick:function(){z(s._id,s.access)}}),C.length>1&&o.a.createElement(Ct,{transparent:!0,title:s._id!==i._id?Dt("$__removeAccess",1):Dt("$__getOut",1),icon:s._id!==i._id?"delete_forever":"logout",color:"red",onClick:function(){$t({message:s._id!==i._id?Dt("$__confirmRemoveUser",1):Dt("$__confirmGetOut",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){M(s._id,s._id===i._id)}})}}),o.a.createElement(Ct,{transparent:!0,title:Dt("$__close","*"),icon:"undo",color:Mt("medium"),onClick:function(){f?$t({message:Dt("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){u({_id:null}),m(!1)}}):(u({_id:null}),m(!1))}})),L._users[s._id]&&!L._users[s._id].isResponsible&&o.a.createElement("div",{className:t.switch,style:{position:"relative",width:"100%",float:"left",display:"flex",alignItems:"center",justifyContent:"space-between"}},o.a.createElement(Ct,{transparent:!0,title:Dt("$__setAsResponsible"),text:Dt("$__setAsResponsible"),icon:"admin_panel_settings",size:"25px",onClick:function(){$t({message:Dt("$__confirmSetAsResponsibleCard",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){wa(e,{cardId:a.data._id,userId:s._id})}})}}))):o.a.createElement("div",{className:t.access,style:{cursor:"pointer"},onClick:function(){(r&&(!r._access||r._access&&"owner"!==r._access)&&(D&&String(D.access)&&parseInt(D.access)>2&&parseInt(D.access)>=parseInt(c)||A&&A.plan&&(A.planAdmin||A.planModerate))||r._id===i._id)&&u({_id:r._id,access:c})}},"owner"===r._access?Dt("$__owner",1):Dt("1"===c?"$__execution":"2"===c?"$__participant":"3"===c?"$__leader":"4"===c?"$__manager":"5"===c?"$__admin":"$__execution",1)),o.a.createElement("div",{className:t.name},r.name,L._users[r._id]&&L._users[r._id].isResponsible?o.a.createElement("span",{style:{fontSize:"9px",fontWeight:"normal",color:"#CCCCCC"}},Dt("$__responsible",1)):"",o.a.createElement("div",{style:{zIndex:10}},o.a.createElement(Kr,{horizontalButton:!0,transparent:!0,size:"14px",btColor:Mt("color"),options:[{name:"$__setAsResponsible",icon:"admin_panel_settings",onClick:function(){$t({message:Dt("$__confirmSetAsResponsibleCard",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){wa(e,{cardId:a.data._id,userId:r._id})}})}}].concat(Object(K.a)(r&&(!r._access||r._access&&"owner"!==r._access)&&(D&&String(D.access)&&parseInt(D.access)>2&&parseInt(D.access)>=parseInt(c)||A&&A.plan&&(A.planAdmin||A.planModerate))||r._id===i._id?[{name:"$__editAccess",icon:"manage_accounts",onClick:function(){u({_id:r._id,access:c})}},{name:"$__removeAccess",icon:"delete_forever",color:"red",onClick:function(){$t({message:r._id!==i._id?Dt("$__confirmRemoveUser",1):Dt("$__confirmGetOut",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){M(r._id,r._id===i._id)}})}}]:[]))}))),o.a.createElement("div",{className:t.avatar,style:{backgroundImage:'url("'.concat(r.image?r.image:Ql.a,'")')}}))}))),!s._id&&o.a.createElement(o.a.Fragment,null,F&&F.length>0&&!s._id&&o.a.createElement("fieldset",{style:{marginTop:"7px"}},o.a.createElement("legend",{style:{color:Mt("color")}},Dt("$__activeExternalUsers",1)),F.map((function(e,r){return o.a.createElement("div",{className:t.user,key:r},o.a.createElement("div",{className:t.name},e.name),o.a.createElement("div",{className:t.avatar,style:{backgroundImage:'url("'.concat(e.image?e.image:Ql.a,'")')}}))}))),T&&T.length>0&&!s._id&&o.a.createElement("fieldset",{style:{marginTop:"7px"}},o.a.createElement("legend",{style:{color:Mt("color")}},Dt("$__users",1)),T.map((function(e,r){return o.a.createElement("div",{className:t.user,key:r},o.a.createElement("div",{className:t.name},e.name),o.a.createElement("div",{className:t.avatar,style:{backgroundImage:'url("'.concat(e.image?e.image:Ql.a,'")')}}),o.a.createElement("div",{className:t.access},o.a.createElement(Ct,{transparent:!0,title:Dt("$__add"),icon:"person_add",size:"20px",onClick:function(){z(e._id)}})))}))),I&&I.length>0&&!s._id&&o.a.createElement("fieldset",{style:{marginTop:"7px"}},o.a.createElement("legend",{style:{color:Mt("color")}},Dt("$__accountUsers",1)),I.map((function(e,r){return o.a.createElement("div",{className:t.user,key:r},o.a.createElement("div",{className:t.name},e.name),o.a.createElement("div",{className:t.avatar,style:{backgroundImage:'url("'.concat(e.image?e.image:Ql.a,'")')}}),o.a.createElement("div",{className:t.access},o.a.createElement(Ct,{transparent:!0,title:Dt("$__add"),icon:"person_add",size:"20px",onClick:function(){z(e._id)}})))}))),N&&N.length>0&&o.a.createElement("fieldset",{style:{marginTop:"7px"}},o.a.createElement("legend",{style:{color:Mt("color")}},Dt("$__externalUsers",1)),N.filter((function(e){return!L._users||!L._users[e._id]})).map((function(e,r){return o.a.createElement("div",{className:t.user,key:r},o.a.createElement("div",{className:t.name},e.name),o.a.createElement("div",{className:t.avatar,style:{backgroundImage:'url("'.concat(e.image?e.image:Ql.a,'")')}}),o.a.createElement("div",{className:t.access},o.a.createElement(Ct,{transparent:!0,title:Dt("$__add"),icon:"person_add",size:"20px",onClick:function(){z(e._id)}})))})))),k?o.a.createElement(o.a.Fragment,null):o.a.createElement("div",{style:{position:"absolute",right:15,top:0}},o.a.createElement(Ct,{title:Dt("$__search",1),color:Mt("menu"),icon:"search",onClick:function(){S(!0)},size:"25px"})))}))),rs=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:Mt("color")}}},loader:{position:"relative",width:"100%",height:"40px",textAlign:"center","& .MuiCircularProgress-root":{color:"".concat(Mt("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(Mt("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:Mt("medium")}}};function ns(){ns=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var as=Object(De.a)(rs);var os=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=as(),r=be.getState(),n=r.sideModule,a=r.session,i=r.db,c=n.data||{},l=o.a.useState(!1),s=Object(je.a)(l,2),u=s[0],d=s[1],p=o.a.useState(!1),f=Object(je.a)(p,2),m=f[0],g=f[1],y=o.a.useState(!1),v=Object(je.a)(y,2),b=v[0],x=(v[1],o.a.useRef()),_=0,w=Ut(),E=window.location.hash.split("/");E[0]=E[0].replace("#",""),E[0]&&36===E[0].length&&(_=Dn(E[0]));var O=function(t){""===c.name||"name"===t.name&&""===t.value?d(!1):c._lock&&(t.value&&!n.data[t.name]||n.data[t.name]&&n.data[t.name]!==t.value)&&d(!0),e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},n),{},{data:Object(h.a)(Object(h.a)({},n.data),{},Object(Oe.a)({},t.name,t.value))}))},j=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];u&&!t?$t({message:Dt("$__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(Ee.a)(ns().mark((function t(r){return ns().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(d(!1),n.data.name){t.next=5;break}$t({message:Dt("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=9;break;case 5:return t.next=7,nn(e,!0);case 7:t.sent?($t({message:Dt("$__feedSigned",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&j(!0)):($t({message:Dt("$__AnErrorHasOccurredPleaseTryAgain",1),variant:"error",persist:!1,horizontal:"right",confirm:null}),d(!0));case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),S=function(){var t=Object(Ee.a)(ns().mark((function t(r){var a,o,i;return ns().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r){t.next=38;break}if(-1!==r.indexOf("http")){t.next=6;break}$t({message:"".concat(Dt("$__invalidUrl",1),": ").concat(Dt("$__urlMustContainHttps",1)),variant:"error",persist:!1,horizontal:"right",confirm:null}),e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},n),{},{data:Object(h.a)(Object(h.a)({},n.data),{},{url:""})})),t.next=38;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=37;break}if(g(!0),"feed"!==n.data.type){t.next=22;break}return t.prev=10,t.next=13,Pt.post("/feed/exist",{url:r});case 13:a=t.sent,e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},n),{},{data:Object(h.a)(Object(h.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&&g(!1),a.data.title&&d(!0),t.next=22;break;case 19:t.prev=19,t.t0=t.catch(10),L(r);case 22:if("link"!==n.data.type){t.next=37;break}return t.prev=23,(o=window.location.hash.split("/"))[0]=o[0].replace("#",""),t.next=28,Pt.post("/link/exist",{idRel:o[0],url:r});case 28:i=t.sent,e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},be.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&&g(!1),i.data.title&&d(!0),t.next=37;break;case 34:t.prev=34,t.t1=t.catch(23),$t({message:"".concat(Dt("$__invalidFeedUrl",1),": ").concat(Dt("$__pleaseVerifyTheFeedAddress",1)),variant:"error",persist:!1,horizontal:"right",confirm:null});case 37:return t.abrupt("return");case 38:return t.abrupt("return",!1);case 39:case"end":return t.stop()}}),t,null,[[10,19],[23,34]])})));return function(e){return t.apply(this,arguments)}}(),L=function(){var t=Object(Ee.a)(ns().mark((function t(r){var a;return ns().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Pt.post("/feed/request/",{url:r});case 3:a=t.sent,e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},n),{},{data:Object(h.a)(Object(h.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&&g(!1),a.data.title&&d(!0),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),$t({message:"".concat(Dt("$__invalidFeedUrl",1),": ").concat(Dt("$__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)}}(),C=!!e.permission&&e.permission;return!C&&parseInt(_)>=3&&(C=!0),o.a.createElement("div",null,o.a.createElement("div",{className:t.btClose},o.a.createElement("div",{style:{position:"fixed",display:"inline-flex",paddingLeft:"10px",top:"7px",right:0,backgroundColor:"#FFFFFF"}},C&&u&&o.a.createElement(Ti,{save:u?function(){k()}:null,saveClose:u?function(){k(!0)}:null,saveLoader:b,close:function(){e.onClose&&e.onClose()}}),o.a.createElement(Ct,{title:Dt("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){e.onClose&&e.onClose()},size:"25px"}))),o.a.createElement("div",{className:t.data},console.log(c._lock),c._lock?o.a.createElement(o.a.Fragment,null,o.a.createElement(Qn,Object.assign({label:Dt("$__titleOfFeed",1),variant:Mt("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"view_headline"})),onChange:function(e){O(e.target)}},value:c&&c.name?c.name:"",placeholder:Dt("$__titleOfFeed_placeholder")},a&&"7806912b-4c7d-4f4f-b9e0-b93fc8f08776"!==a.account?{disabled:!0}:{})),o.a.createElement(Qn,{label:Dt("$__customTitle",1),variant:Mt("fieldVariant"),name:"customTitle",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"title"})),onChange:function(e){O(e.target)}},value:c&&c.customTitle?c.customTitle:"",placeholder:Dt("$__customTitle",1)}),a&&"7806912b-4c7d-4f4f-b9e0-b93fc8f08776"!==a.account?o.a.createElement(o.a.Fragment,null,o.a.createElement(Qn,{label:Dt("$__nameOfFontData",1),variant:Mt("fieldVariant"),name:"font",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"copyright"})),onChange:function(e){O(e.target)}},value:c&&c.font?c.font:"",placeholder:Dt("$__nameOfFontData",1)}),o.a.createElement(Qn,{label:Dt("$__descriptionOfRss",1),variant:Mt("fieldVariant"),name:"description",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"subtitles"})),onChange:function(e){O(e.target)}},value:c&&c.description?c.description:"",placeholder:Dt("$__descriptionOfRss",1)})):o.a.createElement(o.a.Fragment,null),o.a.createElement(Qn,{label:Dt("$__customDescription",1),variant:Mt("fieldVariant"),name:"customDescription",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"subtitles"})),onChange:function(e){O(e.target)}},value:c&&c.customDescription?c.customDescription:"",placeholder:Dt("$__customDescription",1)}),o.a.createElement(Qn,{label:Dt("$__url","*"),variant:Mt("fieldVariant"),ref:x,name:"url",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"http"})),onChange:function(e){O(e.target)},onBlur:function(e){S(e.target.value)}},value:c&&c.url?c.url:"",placeholder:"http://www.domain.xpto/rss...",disabled:!!c._lock}),w&&w.feed&&(w.feedAdmin||w.feedModerate)&&o.a.createElement("fieldset",{style:{marginBottom:"14px"}},o.a.createElement("legend",null,Dt("$__tags",1)),o.a.createElement(Cc,{data:{values:c._tags?c._tags:[]},callBack:function(e){O({name:"_tags",value:e})}})),w&&w.feed&&w.feedAdmin?o.a.createElement("fieldset",{style:{marginBottom:"14px"}},o.a.createElement(Hi,{id:"combo-box-demo",options:i.plans,getOptionLabel:function(e){return Dt(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 o.a.createElement(Qn,Object.assign({},e,{label:Dt("$__avaiablefromplan",1),variant:Mt("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){C&&O({name:"plans",value:t.value})}})):o.a.createElement(o.a.Fragment,null),o.a.createElement("div",{className:t.switch},o.a.createElement(ec,{checked:!!c.private,onChange:function(e){O({name:"private",value:!c.private})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__private",1))):o.a.createElement(Qn,{label:Dt("$__feedUrl","*"),variant:Mt("fieldVariant"),ref:x,name:"url",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"rss_feed"})),onChange:function(e){O(e.target)},onBlur:function(e){S(e.target.value)}},value:c&&c.url?c.url:"",placeholder:"http://www.domain.xpto/rss...",disabled:!!c._lock}),!c._lock&&!m&&o.a.createElement(Ir,{text:Dt("link"===n.data.type?"$__validUrl":"$__validFeedUrl",1),icon:"check",onClick:function(){return S(x.current.value)}}),m&&o.a.createElement("div",{className:t.loader},o.a.createElement(jt,null)),c.feed&&c.feed.length>0&&o.a.createElement("ul",{className:t.preview},o.a.createElement("div",{className:t.previewTitle},Dt("$__preview",1)),c.feed.map((function(e,r){return o.a.createElement("li",{key:r},e&&e.title&&o.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.title},className:t.feedTitle}),o.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.contentSnippet},className:t.feedContent}),o.a.createElement("div",{className:t.feedFooter},o.a.createElement("div",{className:t.feedDate},Fe()(e.pubDate).format("DD/MM/YYYY HH:MM")),o.a.createElement("div",{className:t.feedLink},o.a.createElement("a",{href:e.link,target:"_blank"},Dt("$__openLink","*")))))})))))}));function is(){is=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var cs=Object(De.a)(rs);var ls=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=cs(),r=be.getState().sideModule,n=r.data||{},a=o.a.useState(!1),i=Object(je.a)(a,2),c=i[0],l=i[1],s=o.a.useState(!1),u=Object(je.a)(s,2),d=u[0],p=u[1],f=o.a.useState(!1),m=Object(je.a)(f,2),g=m[0],y=(m[1],o.a.useRef()),v=0,b=window.location.hash.split("/");b[0]=b[0].replace("#",""),b[0]&&36===b[0].length&&(v=Dn(b[0]));var x=function(t){""===n.name||"name"===t.name&&""===t.value?l(!1):n._lock&&(t.value&&!r.data[t.name]||r.data[t.name]&&r.data[t.name]!==t.value)&&l(!0),e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},r),{},{data:Object(h.a)(Object(h.a)({},r.data),{},Object(Oe.a)({},t.name,t.value))}))},_=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];c&&!t?$t({message:Dt("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},w=function(){var t=Object(Ee.a)(is().mark((function t(n){return is().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l(!1),r.data.name){t.next=5;break}$t({message:Dt("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=9;break;case 5:return t.next=7,nn(e,!0);case 7:t.sent?($t({message:Dt("$__feedSigned",1),variant:null,persist:!1,horizontal:"right",confirm:null}),n&&_(!0)):($t({message:Dt("$__AnErrorHasOccurredPleaseTryAgain",1),variant:"error",persist:!1,horizontal:"right",confirm:null}),l(!0));case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),E=function(){var t=Object(Ee.a)(is().mark((function t(n){var a,o,i;return is().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}$t({message:"".concat(Dt("$__invalidUrl",1),": ").concat(Dt("$__urlMustContainHttps",1)),variant:"error",persist:!1,horizontal:"right",confirm:null}),e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},r),{},{data:Object(h.a)(Object(h.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 p(!0),t.prev=10,(o=window.location.hash.split("/"))[0]=o[0].replace("#",""),t.next=15,Pt.post("/link/exist",{idRel:o[0],url:a});case 15:i=t.sent,e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},be.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&&p(!1),i.data.title&&l(!0),t.next=24;break;case 21:t.prev=21,t.t0=t.catch(10),$t({message:"".concat(Dt("$__invalidFeedUrl",1),": ").concat(Dt("$__pleaseVerifyTheFeedAddress",1)),variant:"error",persist:!1,horizontal:"right",confirm:null});case 24:t.next=28;break;case 26:$t({message:"".concat(Dt("$__invalidUrl",1),": ").concat(Dt("$__pleaseVerifyTheUrl",1)),variant:"error",persist:!1,horizontal:"right",confirm:null}),e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},r),{},{data:Object(h.a)(Object(h.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)}}(),O=!!e.permission&&e.permission;return!O&&parseInt(v)>=3&&(O=!0),o.a.createElement("div",null,o.a.createElement("div",{className:t.btClose},o.a.createElement("div",{style:{position:"fixed",display:"inline-flex",paddingLeft:"10px",top:"7px",right:0,backgroundColor:"#FFFFFF"}},g&&o.a.createElement(o.a.Fragment,null,o.a.createElement(jt,{size:"25px"})),O&&c&&o.a.createElement(o.a.Fragment,null,o.a.createElement(Ct,{title:Dt("$__save","*"),color:Mt("color"),icon:"save",onClick:function(){w()},size:"25px"}),o.a.createElement(Ct,{title:Dt("$__saveAndClose",1),color:"green",icon:"playlist_add_check",onClick:function(){w(!0)},size:"25px"})),o.a.createElement(Ct,{title:Dt("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){e.onClose&&e.onClose()},size:"25px"}))),o.a.createElement("div",{className:t.data},n._lock&&o.a.createElement(o.a.Fragment,null,o.a.createElement(Qn,{label:Dt("$__titleOfUrl",1),variant:Mt("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"view_headline"})),onChange:function(e){x(e.target)}},value:n&&n.name?n.name:"",placeholder:Dt("$__titleOfUrl_placeholder"),disabled:!0}),o.a.createElement(Qn,{label:Dt("$__customTitle",1),variant:Mt("fieldVariant"),name:"customTitle",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"title"})),onChange:function(e){x(e.target)}},value:n&&n.customTitle?n.customTitle:"",placeholder:Dt("$__customTitle",1)}),o.a.createElement(Qn,{label:Dt("$__nameOfFontData",1),variant:Mt("fieldVariant"),name:"font",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"copyright"})),onChange:function(e){x(e.target)}},value:n&&n.font?n.font:"",placeholder:Dt("$__nameOfFontData",1)}),o.a.createElement(Qn,{label:Dt("$__descriptionOfUrl",1),variant:Mt("fieldVariant"),name:"description",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"subtitles"})),onChange:function(e){x(e.target)}},value:n&&n.description?n.description:"",placeholder:Dt("$__descriptionOfUrl",1)}),o.a.createElement(Qn,{label:Dt("$__customDescription",1),variant:Mt("fieldVariant"),name:"customDescription",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"subtitles"})),onChange:function(e){x(e.target)}},value:n&&n.customDescription?n.customDescription:"",placeholder:Dt("$__customDescription",1)}),o.a.createElement("div",{className:t.switch},o.a.createElement(ec,{checked:!!n.private,onChange:function(e){x({name:"private",value:!n.private})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__private",1))),o.a.createElement(Qn,{label:Dt("$__url","*"),variant:Mt("fieldVariant"),ref:y,name:"url",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"http"})),onChange:function(e){x(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&&!d&&o.a.createElement(Ir,{text:Dt("$__validUrl",1),icon:"check",onClick:function(){return E(y.current.value)}}),d&&o.a.createElement("div",{className:t.loader},o.a.createElement(jt,null)),n.feed&&n.feed.length>0&&o.a.createElement("ul",{className:t.preview},o.a.createElement("div",{className:t.previewTitle},Dt("$__preview",1)),n.feed.map((function(e,r){return o.a.createElement("li",{key:r},e&&e.title&&o.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.title},className:t.feedTitle}),o.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.contentSnippet},className:t.feedContent}),o.a.createElement("div",{className:t.feedFooter},o.a.createElement("div",{className:t.feedDate},Fe()(e.pubDate).format("DD/MM/YYYY HH:MM")),o.a.createElement("div",{className:t.feedLink},o.a.createElement("a",{href:e.link,target:"_blank"},Dt("$__openLink","*")))))})))))}));var ss=Object(_e.b)((function(e){return{sideModule:e.sideModule}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Ni)((function(e){var t=be.getState(),r=t.sideModule,n=t.db,a=t.session,i=o.a.useState(!1),c=Object(je.a)(i,2),l=c[0],s=c[1],u=o.a.useState(!1),d=Object(je.a)(u,2),p=d[0],f=d[1];if(o.a.useEffect((function(){r.id&&(p||"timeline"!==r.activeModule||(f(!0),s(!1)))}),[r]),!r.data||!r.data.type||0===n.dataType.filter((function(e){return e.name===r.data.type})).length)return null;if(r&&!r.id)return null;var m=e.classes,g=r.data;console.log(g);var y=window.location.hash.split("/");y[0]=y[0].replace("#","");var v=Ut(),b=Dn(r.id),x=[{name:"userEdit",icon:"notes",title:"$__userEdit",reqId:!1,module:nc,closeOption:!1,permission:0},{name:"feedEdit",icon:"rss_feed",title:"$__feedEdit",reqId:!1,module:os,closeOption:!1,permission:3,template:!0},{name:"link",icon:"link",title:"$__link",reqId:!1,module:ls,permission:3,closeOption:!1,hide:!0,template:!0},{name:"timeline",icon:"timeline",title:"$__timeline",reqId:!0,module:Yi,props:{type:"comment",nodeId:r.id,db:"cards",loadTimeline:!0},closeOption:!0,permission:0,count:"comment"},{name:"log",icon:"history",title:"$__log",reqId:!0,module:Yi,props:{type:"log",nodeId:r.id,db:"cards",loadTimeline:!0,disabledSend:!0},closeOption:!0,permission:3,count:"log"},{name:"checklist",icon:"checklist",title:"$__taskList",reqId:!0,module:po,closeOption:!0,permission:3,props:{nodeId:r.data._id,db:r.db?r.db:"cards"},template:!0},{name:"catenation",icon:"account_tree",title:"$__catenation",reqId:!0,module:Zc,closeOption:!0,permission:3,props:{nodeId:r.data._id,db:r.db?r.db:"cards"},template:!0},{name:"recurrence",icon:"update",title:"$__recurrence",reqId:!0,module:ml,closeOption:!0,permission:3,props:{nodeId:r.data._id,db:r.db?r.db:"cards"},template:!0},{name:"files",icon:"folder",title:"$__files",reqId:!0,module:pl,closeOption:!0,permission:3,props:{nodeId:r.id,db:r.db}},{name:"access",icon:a._id===g._id?"vpn_key":"security",title:a._id===g._id?"$__changePassword":"$__access",reqId:!0,module:cc,closeOption:!1,permission:a._id===g._id?0:4}].concat(Object(K.a)(a._id===g._id?[{name:"twoFactor",icon:"pin",title:"$__twoFactorAuthenticator",reqId:!0,module:sc,closeOption:!1,permission:a._id===g._id?0:6,ownerLock:!0},{name:"mobile",icon:"phone_iphone",title:"$__mobile",reqId:!0,module:bc,closeOption:!1,permission:a._id===g._id?0:6,ownerLock:!0}]:[]),[{name:"resume",icon:"blur_on",title:"$__resume",resume:!0,reqId:!0,module:Hc,closeOption:!0,permission:2,template:!0},{name:"cardEdit",icon:"subject",title:"$__edition",reqId:!1,module:Dc,closeOption:!1,permission:1,buttonsCount:3,template:!0},{name:"users",icon:"supervised_user_circle",title:"$__users",reqId:!0,module:ts,closeOption:!0,permission:3,template:!0}],Object(K.a)(a&&a._id!==g._id?[{name:"delete",icon:"delete_sweep",title:"$__delete",reqId:!0,module:el,closeOption:!0,permission:5,template:!0}]:[]),Object(K.a)(b>=4||b&&b<4&&g.kpi_type&&"task"!==g.kpi_type||v&&v.plan&&v.planAdmin?[{name:"kpi",icon:"analytics",title:"$__kpi",reqId:!0,module:Rc,closeOption:!1,permission:3,count:"kpi"}]:[]),[{name:"timeLog",icon:"timer",title:"$__timerLog",reqId:!0,module:Wl,closeOption:!0,permission:0,count:"timer"},{name:"sendTo",icon:"share",title:"$__sendTo",reqId:!0,module:bl,closeOption:!0,permission:3,template:!0}],Object(K.a)("client"===g.type||"group"===g.type||"unity"===g.type?[{name:"settings",icon:"admin_panel_settings",title:"$__settings",reqId:!0,module:fc,closeOption:!1,permission:1,template:!0}]:[]),Object(K.a)("user"===g.type&&a._id===g._id?[{name:"settings",icon:"admin_panel_settings",title:"$__settings",reqId:!0,module:dc,closeOption:!1,permission:1,template:!0}]:"user"!==g.type?[{name:"settings",icon:"settings",title:"$__settings",reqId:!0,module:Xc,closeOption:!1,permission:5,template:!0}]:[])),_=x.filter((function(e){return e.name===r.activeModule}))[0];if(!_||!_.module)return null;var w=function(t){l?$t({message:Dt("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){s(!1),r.activeModule=t,e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)({},r))}}):(r.activeModule=t,e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)({},r)))},E=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];l||t?$t({message:Dt("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE"),s(!1)}}):(e.reduxFunction("ASYNC","CLEAR_MODULE"),s(!1))},O=!(!r||!("new"===r.id||("user"===g.type||"client"===g.type)&&v&&v.user&&(v.userAdmin||v.userModerate)||"user"!==g.type&&"client"!==g.type&&"chatGroup"!==g.type&&v&&(v.owner||v.plan&&(v.planAdmin||v.planModerate))||"chatGroup"===g.type&&(!g.client||g.client&&n.users[g.client])&&v&&(v.owner||v.plan&&(v.planAdmin||v.planModerate)))),j=function e(t){if(!t)return!1;var r=!1,n=be.getState().db.cards[t];return!!n&&(n&&n.isTemplate?r=!0:n&&n._planId&&n._planId!==n._id&&be.getState().db.cards[n._planId]?r=e(n._planId):n&&n._parent&&be.getState().db.cards[n._parent]&&(r=e(n._parent)),r)}(g._id),k=(r.data.type?n.dataType.filter((function(e){return e.name===r.data.type}))[0]:[]).modules;return r&&r.id?o.a.createElement("div",{className:m.lock},o.a.createElement("div",{className:m.backdrop,onClick:function(e){e.stopPropagation(),E()}}),o.a.createElement("div",{className:a.sideModuleWindow&&"popup"===a.sideModuleWindow?m.modulePopup:a.sideModuleWindow&&"expanded"===a.sideModuleWindow?m.moduleExpanded:a.sideModuleWindow&&"fullScreen"===a.sideModuleWindow?m.moduleFullScreen:m.module,id:"sideModule"},o.a.createElement("div",{className:m.menu,style:{backgroundColor:Mt("menu"),borderRight:"solid 3px ".concat(Mt("line"))},id:"sideModule_menu"},o.a.createElement("div",{className:m.menuButtons_resume}),k.map((function(e,t){var n=x.filter((function(t){return t.name.trim()===e.trim()&&!t.resume&&!t.hide}))[0];if(n&&(("user"===g.type||"client"===g.type)&&(v&&v.user&&(v.userAdmin||v.userModerate&&n.permission<=4||v.userEdit&&n.permission<=3)||g._id===a._id&&n.permission<=3)||"user"!==g.type&&"client"!==g.type&&"account"!==g.type&&v&&v.plan&&(v.planAdmin||v.planModerate&&n.permission<=4)||("user"!==g.type||"client"!==g.type||"account"!==g.type)&&b&&String(b)&&parseInt(b)>=parseInt(n.permission))){if(n.ownerLock&&v&&!v.owner&&g._access&&g._access.owner&&a._id!==g._id)return null;if((!j||r.data&&j&&n.template)&&(n&&!n.reqId||n&&(n.reqId||!n.reqId)&&36===r.id.length)){if("recurrence"===n.name&&Object.keys(be.getState().db.cards).filter((function(e){if(!be.getState().db.cards[e].deleted&&!be.getState().db.cards[e].checklist&&be.getState().db.cards[e]._recurrenceId&&be.getState().db.cards[e]._recurrenceId===r.data._id)return!0})).length>0)return o.a.createElement(xc,{key:t,icon:n.icon,module:n.name,title:Dt(n.title,1),count:n.count?n.count:null,openModule:function(e){w(e)}});if("recurrence"!==n.name)return o.a.createElement(xc,{key:t,icon:n.icon,module:n.name,title:Dt(n.title,1),count:n.count?n.count:null,openModule:function(e){w(e)}})}}}))),o.a.createElement("div",{id:"sideModule_header"},o.a.createElement(qo,{title:r&&r.data&&r.data.name||"".concat(Dt("$__create")," ").concat(Dt("$__".concat(r.data.type))),icon:r&&r.data&&r.data.type&&n.dataType.filter((function(e){return e.name===r.data.type}))[0].icon||"view_comfy",style:{paddingLeft:"50px",width:"calc(100% - 0px)",minHeight:"50px",marginTop:"-4px"},color:Mt("menu")}),_.closeOption&&o.a.createElement(Ti,{close:function(){return E()}})),o.a.createElement("div",{className:m.content},o.a.createElement(_.module,Object.assign({},_.props,{permission:O,onClose:function(e){E(e)},reqSave:function(e){s(e)}}))),o.a.createElement("div",{className:m.subTitle,id:"sideModule_subTitle"},Dt(_.title.toLowerCase(),1)))):null}))),us=r(781),ds=r.n(us),ps=Object(bt.a)({root:{"& .MuiPaper-root":{overflow:"visible"}}})(Xo.a);function fs(){fs=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var hs=function(e,t){var r=be.getState().db.tag;r.filter((function(e){return e.value===t.value})).length>0?r.map((function(e,n){e.value===t.value&&(r[n]=Object(h.a)(Object(h.a)({},r[n]),t))})):r.push(t),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{tag:Object(K.a)(r)}))},ms=function(){var e=Object(Ee.a)(fs().mark((function e(t,r){return fs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Pt.delete("/tag/unique/".concat(r._id),Object(h.a)({},r))&&gs(t,r);case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),gs=function(e,t){var r=[];be.getState().db.tag.map((function(e){e.value!==t._id&&r.push(e)})),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{tag:r}))},ys=function(){var e=Object(Ee.a)(fs().mark((function e(t,r){return fs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Pt.put("/tag/unlink/",Object(h.a)({},r))&&vs(t,r);case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),vs=function(e,t){var r=[],n=be.getState(),a=n.session,o=n.db;o.tag.map((function(e){var n=e;e.value===t._id&&(n=Object(h.a)(Object(h.a)({},n),{},{count:0})),r.push(n)}));var i=Object(h.a)({},o.cards);Object.keys(i).filter((function(e){return i[e]._users&&i[e]._users[a._id]&&i[e]._tags&&i[e]._tags.filter((function(e){return e.value===t._id})).length>0})).map((function(e){var r=[];i[e]._tags.map((function(e){e.value!==t._id&&r.push(e)})),i[e]._tags=r})),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},o),{},{tag:r,cards:i}))},bs=function(e){return Object(h.a)(Object(h.a)({},qe),{},{menu:{position:"relative",borderRight:Mt("color")},menuExpanded:{position:"relative",borderRight:Mt("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:Mt("color")},buttonColorExpanded:{position:"relative",float:"left",width:"calc(100% + 20px)",padding:"12px 12px 12px 20px",marginLeft:"-12px",display:"flex",backgroundColor:Mt("color")},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Mt("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"}})};r(1211);function xs(){xs=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var _s=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=Object(De.a)(bs)(),r=be.getState(),n=r.db,a=r.session,i=n.tag,c=o.a.useState(!1),s=Object(je.a)(c,2),u=s[0],d=s[1],p=o.a.useState(null),f=Object(je.a)(p,2),m=f[0],g=f[1],y=o.a.useState(!1),v=Object(je.a)(y,2),b=v[0],x=v[1],_=o.a.useState(!1),w=Object(je.a)(_,2),E=w[0],O=w[1],j=o.a.useState(!1),k=Object(je.a)(j,2),S=k[0],L=k[1],C=o.a.useState({}),I=Object(je.a)(C,2),F=I[0],T=I[1],N=o.a.useState(!1),P=Object(je.a)(N,2),A=P[0],D=P[1],z=o.a.useState(null),M=Object(je.a)(z,2),B=M[0],$=M[1],Y=o.a.useState([]),R=Object(je.a)(Y,2),G=R[0],H=R[1],W=o.a.useState([]),U=Object(je.a)(W,2),V=U[0],q=U[1];o.a.useEffect((function(){q(i),K()}),[B,S]),o.a.useEffect((function(){u&&V&&JSON.stringify(i)!==JSON.stringify(V)&&K()}),[JSON.stringify(i)]),o.a.useEffect((function(){u||(K(),d(!0),e.onLoad&&e.onLoad())}),[]);var X=Ut(),K=function(){var e=[];i.filter((function(e){var t=B?Gt(B.toLowerCase().trim()):"",r=Gt(e.label.toLowerCase().trim());if(!B||B&&r.indexOf(t)>-1)return!0})).sort((function(e,t){return Gt(e.label.toLowerCase().trim())<Gt(t.label.toLowerCase().trim())?-1:Gt(e.label.toLowerCase().trim())>Gt(t.label.toLowerCase().trim())?1:0})).map((function(t){var r=t;r.count=Object.keys(n.cards).filter((function(e){return n.cards[e]._users&&n.cards[e]._users[a._id]&&n.cards[e]._tags&&n.cards[e]._tags.filter((function(e){return e.value===r.value})).length>0})).length,r.countOthers=Object.keys(n.cards).filter((function(e){return n.cards[e]._users&&!n.cards[e]._users[a._id]&&n.cards[e]._tags&&n.cards[e]._tags.filter((function(e){return e.value===r.value})).length>0})).length,(S||!S&&parseInt(r.count)>0)&&0===e.filter((function(e){return e.id===r.label.substr(0,1)})).length?e.push({id:r.label.substr(0,1),text:r.label.substr(0,1),children:[Object(h.a)({id:r.value,text:r.label},r)]}):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&&e.filter((function(e){return e.id===r.label.substr(0,1)}))[0].children.push(Object(h.a)({id:r.value,text:r.label},r))})),H(e)},J=function(){T({}),D(!1),O(!1)},Z=function(e){O(!0),T(e||{})},Q=function(){var t=Object(Ee.a)(xs().mark((function t(){var r;return xs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(D(!0),!F.value){t.next=15;break}return t.prev=2,t.next=5,Pt.put("tag/update",{_id:F.value,name:F.name?F.name:F.label,color:F.newColor?F.newColor:F.color?F.color:null});case 5:t.sent&&(hs(e,{value:F.value,label:F.name?F.name:F.label,color:F.newColor?F.newColor:F.color},!0),D(!1),J()),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(2),console.log(t.t0),D(!1);case 13:t.next=26;break;case 15:return t.prev=15,t.next=18,Pt.post("tag/add",{name:F.name,color:F.newColor?F.newColor:F.color?F.color:null});case 18:(r=t.sent)&&r.data&&(L(!0),hs(e,r.data,!0),D(!1),J()),t.next=26;break;case 22:t.prev=22,t.t1=t.catch(15),console.log(t.t1),D(!1);case 26:case"end":return t.stop()}}),t,null,[[2,9],[15,22]])})));return function(){return t.apply(this,arguments)}}(),ee=function(){var t=Object(Ee.a)(xs().mark((function t(r){return xs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:$t({message:Dt("$__confirmDeleteTag",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){ms(e,{_id:r.value})}});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),te=function(){var t=Object(Ee.a)(xs().mark((function t(r){return xs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:$t({message:Dt("$__confirmUnlinkTag",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){ys(e,{_id:r.value})}});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return o.a.createElement("div",{onMouseLeave:function(){b||setTimeout((function(){g(null)}),1e3)}},o.a.createElement("div",{className:t.menu},o.a.createElement("div",{style:{marginTop:"5px"}},o.a.createElement(ra,{title:Dt("$__tags",1),icon:"bookmarks",iconTitle:Dt("$__tags",1),color:Mt("color"),fontSize:"16px",moreButton:!0,options:[{name:"$__addTag",icon:"add_box",color:Mt("color"),show:"hover",onClick:function(){Z()}},X&&X.plan&&X.planAdmin&&!S&&{name:"$__showAllTags",icon:"style",color:Mt("color"),show:"hover",onClick:function(){L(!0)}},S&&{name:"$__onlyMyTags",icon:"loyalty",color:Mt("color"),show:"hover",onClick:function(){L(!1)}}],optionsProps:{transparent:!0}})),o.a.createElement("div",{className:t.separator}),o.a.createElement("div",null,o.a.createElement(Qn,{label:Dt("$__search",1),variant:Mt("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:B?o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"cancel",color:"green",onClick:function(){return $(null)}})):null,onChange:function(e){$(e.target.value)}},placeholder:Dt("$__nameOfTagSearch_placeholder",1)}))),o.a.createElement("div",{style:{position:"absolute",top:"112px",bottom:0,overflow:"auto",padding:"3px",paddingTop:"7px",listStyle:"none",width:"100%"}},o.a.createElement(ds.a,{collapse:"ALL",items:G,renderItem:function(e){return e.item.value?o.a.createElement("div",{style:{width:"100%",cursor:"pointer",display:"flex"},onMouseOver:function(){X&&X.plan&&X.planAdmin&&g(e.item.value)}},o.a.createElement("div",{style:Object(h.a)({zIndex:0,maxWidth:"90%",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},e.item.color?{borderLeft:"solid 6px ".concat(e.item.color),paddingLeft:"7px"}:{}),onClick:function(){var t;t=e.item,l.push("tags#".concat(t.value))}},e.item.text," ",e.item.count?"(".concat(e.item.count,")"):""),m&&e.item.value===m&&o.a.createElement("div",{style:{zIndex:1}},o.a.createElement(Kr,{horizontalButton:!0,transparent:!0,size:"14px",btColor:Mt("color"),onOpen:function(){x(!0)},onClose:function(){x(!1)},options:[{name:"$__edit",icon:"edit",onClick:function(){Z(e.item)}},(0===parseInt(e.item.count)&&0===parseInt(e.item.countOthers)||parseInt(e.item.count)>0&&0===parseInt(e.item.countOthers))&&{name:"$__delete",icon:"delete_forever",onClick:function(){ee(e.item)}},parseInt(e.item.count)>0&&parseInt(e.item.countOthers)>0&&{name:"$__unlinkMyActivities",icon:"label_off",onClick:function(){te(e.item)}}]}))):o.a.createElement("div",{style:{fontWeight:"bold",color:Mt("color"),fontSize:"12px"}},e.item.text)},onChange:function(e){}})),o.a.createElement(ps,{fullWidth:!0,"aria-labelledby":"simple-dialog-title",open:E,style:{overflow:"visible !important"}},o.a.createElement("div",{style:{position:"relative",marginLeft:"10px",marginTop:"5px",width:"calc(100% - 10px)"}},o.a.createElement(ra,{title:F.value?Dt("$__editTag",1):Dt("$__newTag",1),icon:"label",onCancel:function(){O(!1)}})),o.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."),o.a.createElement("div",{style:{padding:"15px"}},o.a.createElement(Qn,{error:!(!F||F.label&&0!==F.label.length),helperText:"Campo de nome da etiqueta deve ter o compimento m\xednimo de 1 caractere",label:Dt("$__name",1),variant:Mt("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){T(Object(h.a)(Object(h.a)({},F),{},{name:e.target.value}))}},defaultValue:F&&F.label?F.label:null,placeholder:Dt("$__nameOfTag_placeholder",1)})),o.a.createElement("div",{style:{display:"flex",padding:"15px",overflow:"visible"}},o.a.createElement("span",{style:{marginRight:"7px"}},Dt("$__tagColor"),":"),o.a.createElement(Hr,{disablePortal:!0,color:F.color,onChange:function(e){T(Object(h.a)(Object(h.a)({},F),{},{newColor:e}))}},F.color||F.newColor?o.a.createElement("div",{className:"tag",style:{backgroundColor:F.newColor?F.newColor:F.color,width:"22px",height:"22px",borderRadius:"50%",cursor:"pointer"}}):o.a.createElement("div",{className:"tag",style:{fontWeight:"bold"}},Dt("$__clickHereToAddColor")))),o.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},o.a.createElement(Ct,{shadow:!0,title:Dt("$__cancel"),text:Dt("$__cancel"),color:"lightgrey",icon:"close",size:"25px",onClick:function(){O(!1)}}),F&&(F.name||F.newColor)&&o.a.createElement("div",{style:{marginLeft:"15px"}},o.a.createElement(Ct,{shadow:!0,title:Dt("$__save"),text:Dt("$__save"),icon:"save",size:"25px",load:!!A,onClick:function(){Q()}})))))})),ws=r(1299),Es=r(1326),Os=r(1300),js=r(1296),ks={disabled:{"&:before":{borderColor:"transparent !important"}},underline:{"&:hover:not($disabled):before,&:before":{borderColor:tt[4]+"!important",borderWidth:"1px !important"},"&:after":{borderColor:Xe[0]},"& + p":{fontWeight:"300"}},underlineError:{"&:after":{borderColor:Je[0]}},underlineSuccess:{"&:after":{borderColor:Ze[0]}},labelRoot:Object(h.a)(Object(h.a)({},qe),{},{color:tt[3]+" !important",fontWeight:"400",fontSize:"12px",lineHeight:"1.42857",top:"10px",letterSpacing:"unset","& + $underline":{marginTop:"0px"}}),labelRootError:{color:Je[0]+" !important"},labelRootSuccess:{color:Ze[0]+" !important"},formControl:{margin:"0 0 16px 0",paddingTop:"27px",position:"relative",verticalAlign:"unset","& svg,& .fab,& .far,& .fal,& .fas,& .material-icons":{color:tt[14]}},whiteUnderline:{"&:hover:not($disabled):before,&:before":{backgroundColor:"#FFF"},"&:after":{backgroundColor:"#FFF"}},input:{color:tt[14],height:"unset","&,&::placeholder":{fontSize:"12px",fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif',fontWeight:"400",lineHeight:"1.42857",opacity:"1"},"&::placeholder":{color:tt[3]}},whiteInput:{"&,&::placeholder":{color:"#FFF",opacity:"1"}}},Ss=Object(De.a)(ks);function Ls(e){var t,r,n,a,i,c=Ss(),l=e.formControlProps,s=e.labelText,u=e.id,d=e.labelProps,p=e.inputProps,f=e.error,h=e.white,m=e.inputRootCustomClasses,g=e.success,y=e.helperText,v=Ce()((t={},Object(Oe.a)(t," "+c.labelRootError,f),Object(Oe.a)(t," "+c.labelRootSuccess,g&&!f),t)),b=Ce()((r={},Object(Oe.a)(r,c.underlineError,f),Object(Oe.a)(r,c.underlineSuccess,g&&!f),Object(Oe.a)(r,c.underline,!0),Object(Oe.a)(r,c.whiteUnderline,h),r)),x=Ce()(Object(Oe.a)({},m,void 0!==m)),_=Ce()((n={},Object(Oe.a)(n,c.input,!0),Object(Oe.a)(n,c.whiteInput,h),n));i=void 0!==l?Ce()(l.className,c.formControl):c.formControl;var w=Ce()((a={},Object(Oe.a)(a,c.labelRootError,f),Object(Oe.a)(a,c.labelRootSuccess,g&&!f),a));return o.a.createElement(ws.a,Object.assign({},l,{className:i}),void 0!==s?o.a.createElement(Es.a,Object.assign({className:c.labelRoot+" "+v,htmlFor:u},d),s):null,o.a.createElement(js.a,Object.assign({classes:{input:_,root:x,disabled:c.disabled,underline:b},id:u},p)),void 0!==y?o.a.createElement(Os.a,{id:u+"-text",className:w},y):null)}var Cs={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"+tt[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"+tt[8]}},Is=["className","children","plain","profile","pricing","testimonial","stats","chart","product"],Fs=Object(De.a)(Cs);function Ts(e){var t,r=Fs(),n=e.className,a=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(Re.a)(e,Is),h=Ce()((t={},Object(Oe.a)(t,r.cardFooter,!0),Object(Oe.a)(t,r.cardFooterPlain,i),Object(Oe.a)(t,r.cardFooterProfile,c||s),Object(Oe.a)(t,r.cardFooterPricing,l),Object(Oe.a)(t,r.cardFooterTestimonial,s),Object(Oe.a)(t,r.cardFooterStats,u),Object(Oe.a)(t,r.cardFooterChart,d||p),Object(Oe.a)(t,n,void 0!==n),t));return o.a.createElement("div",Object.assign({className:h},f),a)}var Ns=function(e){return{container:Object(h.a)(Object(h.a)({},Ve),{},Object(Oe.a)({zIndex:"4"},e.breakpoints.down("sm"),{paddingBottom:"100px"})),cardTitle:Object(h.a)(Object(h.a)({},yt),{},{color:"#FFF"}),textCenter:{textAlign:"center"},justifyContentCenter:{justifyContent:"center !important"},customButtonClass:{"&,&:focus,&:hover":{color:"#FFF"},marginLeft:"5px",marginRight:"5px"},inputAdornment:{marginRight:"18px"},inputAdornmentIcon:{color:tt[6]},cardHidden:{opacity:"0",transform:"translate3d(0, -60px, 0)"},cardHeader:{marginBottom:"20px"},socialLine:{padding:"0.9375rem 0"}}};function Ps(){Ps=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var As=Object(De.a)(Ns);var Ds=r(1425),zs=r(1408),Ms=r(1415),Bs=Object(De.a)((function(e){return{backdrop:{zIndex:e.zIndex.drawer+1,color:Mt("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 $s(e){var t=Bs(),r=o.a.useState(!1),n=Object(je.a)(r,2),a=n[0],i=n[1],c=o.a.useState("add_photo_alternate"),l=Object(je.a)(c,2),s=l[0],u=l[1];return o.a.createElement(o.a.Fragment,null,a?o.a.createElement(ze.a,{className:t.backdrop,open:a,onClick:function(){return i(!1)}},o.a.createElement("div",{className:t.box},Gs&&Object.keys(Gs).map((function(r,n){return o.a.createElement("div",{key:n,className:t.list},o.a.createElement("div",{className:t.title},r),o.a.createElement("div",{className:t.iconList},Gs[r]&&Gs[r].map((function(r,n){return o.a.createElement("div",{key:n,className:t.icon},o.a.createElement(wt,{icon:r,size:"30px",color:Mt("color"),onClick:function(){u(r),i(!1),e.callBack&&e.callBack(r)}}))}))))})))):o.a.createElement(wt,{icon:s,size:"30px",onClick:function(){return i(!0)}}))}var Ys,Rs,Gs={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"]};function Hs(){Hs=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Ws=Ae.b.div(Ys||(Ys=Object(we.a)(["\n background-color:none;\n\n "]))),Us=Ae.b.div(Rs||(Rs=Object(we.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 "]))),Vs=Object(_e.b)((function(e){return{store:e}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=o.a.useState(null),r=Object(je.a)(t,2),n=r[0],a=r[1],i=o.a.useState(""),c=Object(je.a)(i,2),l=c[0],s=c[1],u=o.a.useState(""),d=Object(je.a)(u,2),p=d[0],f=d[1],m=o.a.useState({}),g=Object(je.a)(m,2),y=g[0],v=g[1],b=o.a.useState({open:!1,name:""}),x=Object(je.a)(b,2),_=x[0],w=x[1],E=be.getState().db,O=be.getState().functions.socket,j=function(){var e=Object(Ee.a)(Hs().mark((function e(t){var r,n,a,o,i,c;return Hs().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(E.cards.boardModels.boards[n.droppableId].columnOrder),i=n.droppableId,o.splice(n.index,1),o.splice(r.index,0,a),Pt.put("column/reorder",{columns:o}),c={_parent:"boardModels",_board:i,_order:o},O.emit("column.REORDER",c),e.abrupt("return");case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),k=function(){var e=Object(Ee.a)(Hs().mark((function e(t){var r,o,i,c;return Hs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Array.from(E.cards.boardModels.boards[t].columnOrder),e.prev=1,i={},n){e.next=10;break}return e.next=6,Pt.post("column/add",{board:t,name:l,icon:p});case 6:o=e.sent,i={cards:[],name:l,_id:o.data.id,icon:p},e.next=14;break;case 10:return e.next=12,Pt.put("column/update",{_id:n,board:t,name:l,icon:p});case 12:o=e.sent,i={name:l,_id:o.data.id,icon:p};case 14:o&&(n||r.push(o.data.id),c={_parent:"boardModels",_columnId:o.data.id,_board:t,_cardColumn:"boardModels",_columnData:i,_columnsOrder:r},O.emit("column.UPD",c),v(!1),s(""),f(""),a(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)}}(),S=function(){var e=Object(Ee.a)(Hs().mark((function e(t,r){var n,a;return Hs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=be.getState().functions.socket,e.prev=1,e.next=4,Pt.delete("column/run/".concat(r,"__").concat(t),{board:t,name:l,icon:p});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)}}(),L=function(){var t=Object(Ee.a)(Hs().mark((function t(){var r;return Hs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Pt.post("boards/add",{name:_.name});case 3:r=t.sent,e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},{boardModels:Object(h.a)(Object(h.a)({},be.getState().db.cards.boardModels),{},{boards:Object(h.a)(Object(h.a)({},be.getState().db.cards.boardModels.boards),r.data)})})})),w({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 o.a.createElement(Bo,null,E.cards&&E.cards.boardModels&&E.cards.boardModels.boards&&Object.keys(E.cards.boardModels.boards).map((function(t){return o.a.createElement(no.a,{onDragEnd:j,key:t},o.a.createElement(Ro,{md:3},o.a.createElement("fieldset",{style:{width:"100%"}},o.a.createElement("legend",null,E.cards.boardModels.boards[t].name),o.a.createElement(no.c,{droppableId:t,type:"column",direction:"vertical"},(function(r,n){return o.a.createElement(Ws,Object.assign({ref:r.innerRef},r.droppableProps,{isDraggingOver:n.isDraggingOver}),!e.noList&&E.cards&&E.cards.boardModels&&E.cards.boardModels.boards&&E.cards.boardModels.boards[t]&&E.cards.boardModels.boards[t].columnOrder&&E.cards.boardModels.boards[t].columnOrder.map((function(e,r){return o.a.createElement(no.b,{draggableId:e,index:r,key:"".concat(e,"-").concat(r)},(function(r){return o.a.createElement(Us,Object.assign({},r,{ref:r.innerRef},r.draggableProps,{isDragging:n.isDragging},r.dragHandleProps),E.cards.boardModels.boards[t].columns[e].name&&o.a.createElement(qo,{title:E.cards.boardModels.boards[t].columns[e].name||"",icon:E.cards.boardModels.boards[t].columns[e].icon||null,iconTitle:"A",fontSize:"16px",customButtons:[{name:"delete",icon:"delete_forever",onClick:function(){S(t,e)},show:"hover"},{name:"edit",icon:"edit",onClick:function(){s(E.cards.boardModels.boards[t].columns[e].name),f(E.cards.boardModels.boards[t].columns[e].icon||null),a(e),v(Object(Oe.a)({},t,{open:!0}))},show:"hover"}]}))}))})),y&&y[t]&&y[t].open?o.a.createElement(o.a.Fragment,null,o.a.createElement(Us,null,o.a.createElement("div",{style:{position:"relative",float:"left",width:"40px",height:"auto",display:"flex",justifyContent:"center",alignItems:"center"}},o.a.createElement($s,{callBack:function(e){f(e)}})),o.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(100% - 40px)"}},o.a.createElement(Qn,{label:Dt("$__nameOfColumn",1),variant:"outlined",name:"NewColumn",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){s(e.target.value)},onKeyPress:function(e){"Enter"===e.key&&e.target.value.length>0&&k(t)}},value:l,placeholder:Dt("$__name",1),styles:{marginBotton:"0px !important"},autoFocus:!0}))),o.a.createElement("div",{style:{display:"inline-flex",alignItems:"center",width:"100%",justifyContent:"center"}},o.a.createElement(Ir,{icon:"save",text:Dt("$__save","*"),onClick:function(){k(t)}}),o.a.createElement(Ir,{icon:Dt("$__cancel","*"),iconColor:"red",text:Dt("$__cancel","*"),onClick:function(){s(""),v({})}}))):o.a.createElement(Ir,{icon:"add_box",text:Dt("$__addColumn",1),onClick:function(){v(Object(Oe.a)({},t,{open:!0}))}}),r.placeholder)})))))})),o.a.createElement("div",null,_.open?o.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(100% - 40px)"}},o.a.createElement(Qn,{label:Dt("$__boardName",1),variant:"outlined",name:"boardName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){w(Object(h.a)(Object(h.a)({},_),{},{name:e.target.value}))},onKeyPress:function(e){"Enter"===e.key&&e.target.value.length>0&&L()}},value:_&&_.name,placeholder:Dt("$__name",1),styles:{marginBotton:"0px !important"},autoFocus:!0}),o.a.createElement("div",{style:{display:"inline-flex",alignItems:"center",width:"100%",justifyContent:"center"}},o.a.createElement(Ir,{icon:"save",text:Dt("$__save","*"),onClick:function(){L()}}),o.a.createElement(Ir,{icon:"cancel",iconColor:"red",text:Dt("$__cancel","*"),onClick:function(){s(""),w({open:!1,name:""})}}))):o.a.createElement(Ir,{icon:"add_box",text:Dt("$__addBoard",1),onClick:function(){w(Object(h.a)(Object(h.a)({},_),{},{open:!0}))}})))})),qs=r(1418),Xs=function(e){return{root:Object(h.a)(Object(h.a)({},qe),{},{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:Mt("dark"),color:Mt("light")},column:{padding:"7px 15px",fontWeight:"bold",borderRight:"solid 1px ".concat(Mt("light",.4)),width:"300px"},column2:{padding:"7px 15px",fontWeight:"bold",borderRight:"solid 1px ".concat(Mt("light",.4)),width:"calc(100% - 300px)"},body:{color:Mt("medium"),position:"relative",clear:"both",display:"flex",alignItems:"center",borderBottom:"solid 1px ".concat(Mt("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(Mt("medium",.2))}}},chip:{margin:"3px"}}};function Ks(){Ks=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Js=Object(_e.b)((function(e){return{languages:e.languages}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Xs)((function(e){var t=e.classes,r=be.getState(),n=r.languages,a=r.db,i=be.getState().functions.socket,c=o.a.useState(!1),l=Object(je.a)(c,2),u=l[0],d=l[1],p=o.a.useState(0),f=Object(je.a)(p,2),h=f[0],m=f[1],g=o.a.useState(25),y=Object(je.a)(g,2),v=y[0],b=y[1],x=o.a.useState(""),_=Object(je.a)(x,2),w=_[0],E=_[1],O=function(){var e=Object(Ee.a)(Ks().mark((function e(t,r,n,a){return Ks().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t?i.emit("language.UPD",{alias:r,locale:n,text:a}):i.emit("data",{module:"language",method:"post",action:"addLocale"},{alias:r,locale:n,text:a});case 1:case"end":return e.stop()}}),e)})));return function(t,r,n,a){return e.apply(this,arguments)}}();return a.myTasksMenuExpanded,o.a.createElement("div",{style:{width:"100%"}},o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Dt("$__page")," ",h+1," ",Dt("$__of")," ",Math.ceil(Object.keys(n).length/v),o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},o.a.createElement(qs.a,{component:"div",count:Object.keys(n).length,page:h,onChangePage:function(e,t){m(t)},rowsPerPage:v,onChangeRowsPerPage:function(e){b(parseInt(e.target.value,10))},labelRowsPerPage:Dt("$__cardsPerPage")}))),o.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center"}},o.a.createElement(Qn,{label:Dt("$__search",1),variant:Mt("fieldVariant"),value:w,onChange:function(e){E(e.target.value)}}),o.a.createElement(Ir,{text:Dt("$__showOnlyEmpty","*"),icon:u?"subtitles_off":"subtitles",iconColor:Mt("medium"),onClick:function(){d(!u)}})),o.a.createElement(Yr.a,{className:t.root},o.a.createElement("div",{className:t.header},o.a.createElement("div",{className:t.column},Dt("alias",1)),o.a.createElement("div",{className:t.column},"Portugues"),o.a.createElement("div",{className:t.column},"Ingles")),o.a.createElement("div",{className:t.body},o.a.createElement("ul",null,n&&Object.keys(n)&&Object.keys(n).length>0&&Object.keys(n).filter((function(e){if((!w||w&&(e.indexOf(w)>-1||n[e]&&n[e].locales&&Object.keys(n[e].locales).filter((function(t){return n[e].locales[t].name.indexOf(w)>-1})).length>0))&&(u&&n[e]&&(!n[e].locales||!n[e].locales["pt-BR"]||!n[e].locales["pt-BR"].name)||!u))return!0})).sort((function(e,t){return e<s.b?-1:e>t?1:0})).map((function(e,r){if(r<=(h+1)*v&&r>=h*v)return o.a.createElement("li",{key:e.trim()},o.a.createElement("div",{className:t.column},e),o.a.createElement("div",{className:t.column},o.a.createElement("div",{style:{position:"relative"}},o.a.createElement(qo,{key:"".concat(e,"_pt-BR"),title:n[e].locales&&n[e].locales["pt-BR"]&&n[e].locales["pt-BR"].name&&n[e].locales["pt-BR"].name,editable:!0,_id:n[e].locales&&n[e].locales["pt-BR"]&&n[e].locales["pt-BR"].id&&n[e].locales["pt-BR"].id,onEdit:function(t,r){O(r,e,"pt-BR",t)},color:Mt("menu"),noAutoFocus:!0,multiline:!0}))),o.a.createElement("div",{className:t.column},o.a.createElement("div",{style:{position:"relative"}},o.a.createElement(qo,{key:"".concat(e,"_en-US"),title:n[e].locales&&n[e].locales["en-US"]&&n[e].locales["en-US"].name&&n[e].locales["en-US"].name,editable:!0,_id:n[e].locales&&n[e].locales["en-US"]&&n[e].locales["en-US"].id&&n[e].locales["en-US"].id,onEdit:function(t,r){O(r,e,"en-US",t)},color:Mt("menu"),noAutoFocus:!0,multiline:!0}))))}))))))})));function Zs(){Zs=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Qs=Object(_e.b)((function(){return{}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Xs)((function(e){e.classes;var t=be.getState(),r=(t.languages,t.db),n=function(){var e=Object(Ee.a)(Zs().mark((function e(){return Zs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qr.get("/Feed_Realocate");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),a=function(){var e=Object(Ee.a)(Zs().mark((function e(){var t;return Zs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qr.post("/Feed_List");case 2:(t=e.sent)&&console.log(t.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),i=!!r.myTasksMenuExpanded;return o.a.createElement("div",{style:i?{width:"calc(100% - 400x)",marginLeft:"388px"}:{width:"calc(100% - 138px)",marginLeft:"138px"}},o.a.createElement(Wc,{style:{position:"relative",float:"left",margin:"3px"},color:"blue",onClick:function(){n("User")}},Dt("$__feedRealocate","*")),o.a.createElement(Wc,{style:{position:"relative",float:"left",margin:"3px"},color:"blue",onClick:function(){a()}},Dt("$__Readfeeds","*")))}))),eu=["children","value","index"];function tu(e){var t=e.children,r=e.value,n=e.index,a=Object(Re.a)(e,eu);return o.a.createElement("div",Object.assign({role:"tabpanel",hidden:r!==n,id:"scrollable-strength-tabpanel-".concat(n),"aria-labelledby":"scrollable-strength-tab-".concat(n)},a),r===n&&o.a.createElement(Ds.a,{p:3},t))}function ru(e){return{id:"scrollable-strength-tab-".concat(e),"aria-controls":"scrollable-strength-tabpanel-".concat(e)}}var nu=Object(De.a)((function(e){return{root:{flexGrow:1,width:"100%",backgroundColor:e.palette.background.paper}}}));var au=Object(_e.b)((function(e){return{history:e.db.history}}),(function(e){return Object(s.b)(n,e)}))((function(e){nu();var t=be.getState().db,r=o.a.useState(0),n=Object(je.a)(r,2),a=n[0],i=n[1],c=o.a.useState(!1),s=Object(je.a)(c,2),u=s[0],d=s[1],p=o.a.useState(""),f=Object(je.a)(p,2),h=f[0],m=f[1];o.a.useEffect((function(){if(!u){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),String(e[0])&&i(Math.ceil(e[0])),d(!0)}}));var g=function(e){be.getState().functions.socket.emit("global",{fn:e})};return t.myTasksMenuExpanded,o.a.createElement("div",null,o.a.createElement(Be.a,{position:"static",color:"default"},o.a.createElement(Ms.a,{value:a,onChange:function(e,t){i(t),l.push("#".concat(t))},variant:"scrollable",scrollButtons:"on",indicatorColor:"primary",textColor:"primary","aria-label":""},o.a.createElement(zs.a,Object.assign({label:"Data",icon:o.a.createElement(wt,{color:(Mt(0===a?"medium":"color"),1)},"Data")},ru(0))),o.a.createElement(zs.a,Object.assign({label:"Languages",icon:o.a.createElement(wt,{color:(Mt(1===a?"medium":"color"),1)},"translate")},ru(1))),o.a.createElement(zs.a,Object.assign({label:"Versions",icon:o.a.createElement(wt,{color:(Mt(2===a?"medium":"color"),1)},"app_registration")},ru(2))))),o.a.createElement(tu,{value:a,index:0},o.a.createElement("div",null,o.a.createElement(Qs,null))),o.a.createElement(tu,{value:a,index:1},o.a.createElement("div",null,o.a.createElement(Js,null))),o.a.createElement(tu,{value:a,index:2},o.a.createElement("div",null,o.a.createElement("input",{type:"text",value:h,onChange:function(e){m(e.target.value)}}),o.a.createElement(Wc,{style:{position:"relative",float:"left",margin:"3px"},color:"primary",onClick:function(){g("version")}},Dt("$__send","*")),o.a.createElement(Wc,{style:{position:"relative",float:"left",margin:"3px"},color:"primary",onClick:function(){g("logout")}},Dt("$__logout","*")),o.a.createElement(Wc,{style:{position:"relative",float:"left",margin:"3px"},color:"primary",onClick:function(){g("reload")}},Dt("$__reload","*")))),o.a.createElement(tu,{value:a,index:3},o.a.createElement("div",null,o.a.createElement(Vs,null))),o.a.createElement(tu,{value:a,index:4},Dt("$__accounts",1)),o.a.createElement(tu,{value:a,index:5},Dt("$__users",1)),o.a.createElement(tu,{value:a,index:6},Dt("$__support",1)),o.a.createElement(tu,{value:a,index:7},Dt("$__finance",1)))})),ou=function(){return Object(h.a)(Object(h.a)({},Ui),{},{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:Mt("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:Mt("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:Mt("menu"),"& .selectedCard":{position:"relative",float:"left",width:"250px",height:"33px",display:"flex !important",alignItems:"center"}},flex:{flex:1},title:Object(h.a)(Object(h.a)({},qe),{},{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(h.a)(Object(h.a)({},qe),{},{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(Mt("light")," !important"),"&,&:hover,&:focus":{color:"inherit"}}),page:{position:"relative",color:Mt("line"),fontSize:"16px",textTransform:"uppercase",cursor:"pointer","& a":{color:"#FFFFFF"}},pageLink:{position:"relative",float:"left",color:Mt("light"),margin:"7px",fontSize:"14px",cursor:"pointer",userSelect:"none","&:hover":{fontWeight:"bold"},"& a":{color:"#FFFFFF"}},pageLinkActive:{color:Mt("line"),margin:"7px",fontSize:"14px",cursor:"pointer",userSelect:"none",fontWeight:"bold"},activeArrow:{position:"absolute",left:"calc(50% - 11px)",bottom:"-23px",transform:"rotate(-90deg)"}})},iu=Object(De.a)(ou);var cu=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=iu(),r=be.getState(),n=r.session,a=r.search,i=r.db,c=o.a.useState(!1),l=Object(je.a)(c,2),s=(l[0],l[1],Ut(),[]),u=window.location.hash.split("/");u[0]=u[0].replace("#",""),36!==u[0].length&&(u[0]=null);var d=window.location.pathname.split("/"),p="/".concat(d[1]),f=1;if(u[0]){var h=i.cards[u[0]]||{};(f=h&&h._users&&Object.keys(h._users).length>0?h._users[Object.keys(h._users).find((function(e){return e.indexOf(n._id)>-1}))]:0)&&f.access&&(f=f.access)}return u[1]&&ff.filter((function(e){return e.path===p})).length>0&&ff.filter((function(e){return e.path===p}))[0].tabs&&ff.filter((function(e){return e.path===p}))[0].tabs.length>0?(ff.filter((function(e){return e.path===p}))[0].tabs&&ff.filter((function(e){return e.path===p}))[0].tabs).map((function(e){e.path===u[1]&&(s=e.searchFields)})):ff.filter((function(e){return e.path===p})).length>0&&ff.filter((function(e){return e.path===p}))[0].searchFields&&(s=ff.filter((function(e){return e.path===p}))[0].searchFields),JSON.stringify(Z)===JSON.stringify(a)?o.a.createElement(o.a.Fragment,null):o.a.createElement("div",{style:{}},o.a.createElement(Bo,null,o.a.createElement(Ro,{xs:12,sm:9,md:9,lg:9,xl:9},o.a.createElement("span",{style:{color:Mt("medium"),fontWeight:"bold",fontSize:"18px",display:"flex",alignItems:"center"}},o.a.createElement(wt,{size:"18px"},"search"),Dt("$__appliedFilters"))),o.a.createElement(Ro,{xs:12,sm:3,md:3,lg:3,xl:3},o.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},o.a.createElement(Ir,{reverse:!0,icon:"clear_all",text:Dt("$__clearFilter","*"),onClick:function(){e.reduxFunction("ASYNC","SEARCH_CLEAR")}}))),s&&s.indexOf("text")>-1&&a.text&&o.a.createElement(Ro,{xs:6,sm:4,md:2,lg:2,xl:2},o.a.createElement("div",{className:t.textField,style:{width:"100%"}},Dt("$__text"),": ",a.text)),s&&s.indexOf("status")>-1&&JSON.stringify(a.cards.status)!==JSON.stringify(Z.cards.status)&&o.a.createElement(Ro,{xs:6,sm:4,md:2,lg:2,xl:2},o.a.createElement("div",{style:{color:Mt("color"),fontSize:"16px"}},o.a.createElement("div",{style:{position:"relative",float:"left"}},Dt("$__status")),Object.keys(a.cards.status).map((function(e,t){if(a.cards.status[e]&&"all"!==e)return o.a.createElement(xt.a,{title:Dt(i.status.filter((function(t){return t.value===e}))[0].label,1),key:t},o.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"}}))})))),s&&s.indexOf("priority")>-1&&JSON.stringify(a.cards.priority)!==JSON.stringify(Z.cards.priority)&&o.a.createElement(Ro,{xs:6,sm:4,md:2,lg:2,xl:2},o.a.createElement("div",{style:{color:Mt("color"),fontSize:"16px"}},o.a.createElement("div",{style:{position:"relative",float:"left"}},Dt("$__priority")),Object.keys(a.cards.priority).map((function(e,t){if(a.cards.priority[e]&&"all"!==e)return o.a.createElement(xt.a,{title:Dt(i.priority.filter((function(t){return String(t.value)===String(e)}))[0].label,1),key:t},o.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"}}))})))),s&&s.indexOf("users")>-1&&JSON.stringify(a.users)!==JSON.stringify(Z.users)&&o.a.createElement(Ro,{xs:6,sm:4,md:2,lg:2,xl:2},o.a.createElement("div",{style:{color:Mt("color"),fontSize:"16px"}},Dt("$__users"),o.a.createElement(la.a,{max:6},Object.keys(be.getState().search.users.selected).length>0&&Object.keys(be.getState().search.users.selected).map((function(e,t){return"unassigned"!==e&&be.getState().search.users.selected[e]?o.a.createElement(xt.a,{title:i.users[e].name,key:t},o.a.createElement(Fr.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&&be.getState().search.users.selected[e]&&o.a.createElement(xt.a,{title:Dt("$__unassigned",1),key:t},o.a.createElement(Fr.a,{style:{width:"30px",height:"30px"},alt:Dt("$__unassigned",1),src:Nr.a},Dt("$__unassigned",1)))}))))),s&&s.indexOf("units")>-1&&JSON.stringify(a.units)!==JSON.stringify(Z.units)&&Object.keys(i.users).filter((function(e){return"user"!==i.users[e].type})).length>0&&s.indexOf("units")>-1&&o.a.createElement(Ro,{xs:6,sm:4,md:2,lg:2,xl:2},o.a.createElement("div",{style:{color:Mt("color"),fontSize:"16px"}},Dt("$__units"),o.a.createElement(la.a,{max:6},Object.keys(be.getState().search.units.selected).length>0&&Object.keys(be.getState().search.units.selected).map((function(e,t){return"unassigned"!==e&&be.getState().search.units.selected[e]?o.a.createElement(xt.a,{title:i.users[e].name,key:t},o.a.createElement(Fr.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&&be.getState().search.units.selected[e]&&o.a.createElement(xt.a,{title:Dt("$__unassigned",1),key:t},o.a.createElement(Fr.a,{style:{width:"30px",height:"30px"},alt:Dt("$__unassigned",1),src:Nr.a},Dt("$__unassigned",1)))}))))),Object.keys(i.cards).filter((function(e){return"plan"===i.cards[e].type})).length>0&&s.indexOf("plans")>-1&&o.a.createElement(Ro,{xs:6,sm:4,md:2,lg:2,xl:2},o.a.createElement("div",{style:{color:Mt("color"),fontSize:"16px"}},Dt("$__plans"),o.a.createElement(la.a,{max:6},Object.keys(be.getState().search.plans.selected).length>0&&Object.keys(be.getState().search.plans.selected).map((function(e,t){return"unassigned"!==e&&be.getState().search.plans.selected[e]?o.a.createElement(xt.a,{title:i.cards[e].name,key:t},o.a.createElement(Fr.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&&be.getState().search.plans.selected[e]&&o.a.createElement(xt.a,{title:Dt("$__unassigned",1),key:t},o.a.createElement(Fr.a,{style:{width:"30px",height:"30px"},alt:Dt("$__unassigned",1),src:Nr.a},Dt("$__unassigned",1)))}))))),o.a.createElement(Ro,{xs:12,sm:12,md:12,lg:12,xl:12})))})),lu=function(e){return{card:{width:"calc(20% - 20px)",minWidth:"250px",maxWidth:"400px",margin:"10px",placeSelf:"flex-end"}}},su=r(210),uu=r.n(su);var du=Object(_e.b)((function(e,t){return{store:{db:{cards:Object.keys(e.db.cards).filter((function(t){return"insight"===e.db.cards[t].type&&!e.db.cards[t].deleted&&(!e.db.cards[t].private||e.db.cards[t].private&&e.db.cards[t]._users&&e.db.cards[t]._users[e.session._id])})).sort((function(t,r){return e.db.cards[t].created_at>e.db.cards[r].created_at?-1:0})).map((function(t){return e.db.cards[t]}))}}}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(lu)((function(e){var t=be.getState(),r=t.db,n=t.search,a=(t.session,o.a.useState(0)),i=Object(je.a)(a,2),c=i[0],l=i[1],s=o.a.useState(e.max?e.max:24),u=Object(je.a)(s,2),d=u[0],p=u[1],f=window.location.hash.split("/");f[0]=f[0].replace("#","");var m=e.store.db.cards;return m=m.filter((function(e){return!!(e.description&&e.description.toLowerCase().indexOf(n.text.toLowerCase())>-1||e&&e.name&&e.name.toLowerCase().indexOf(n.text.toLowerCase())>-1)})).map((function(e){return e})),n.tags.length>0&&(m=m.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return n.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),o.a.createElement("div",{style:{position:"relative",justifyContent:"space-between",margin:"auto",width:"100%"}},!e.noPagination&&Object.keys(m).length>d&&o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Dt("$__page")," ",c+1," ",Dt("$__of")," ",Math.ceil(Object.keys(m).length/d),o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},o.a.createElement(qs.a,{component:"div",count:Object.keys(m).length,page:c,onChangePage:function(e,t){l(t)},rowsPerPage:d,onChangeRowsPerPage:function(e){p(parseInt(e.target.value,10))},labelRowsPerPage:Dt("$__insightsPerPage")}))),o.a.createElement(Bo,{style:Object(h.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},Object.keys(m).map((function(e,t){if(t+1<=(c+1)*d&&t>=c*d)return o.a.createElement(Ro,{key:m[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},o.a.createElement(ii,{db:"cards",data:r.cards[m[e]._id],expanded:!0,Avatar:!0,Resume:!0,showConnectedIn:!0,LoadParent:!0}))}))),!e.noPagination&&Object.keys(m).length>d&&o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Dt("$__page")," ",c+1," ",Dt("$__of")," ",Math.ceil(Object.keys(m).length/d),o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},o.a.createElement(qs.a,{component:"div",count:Object.keys(m).length,page:c,onChangePage:function(e,t){l(t)},rowsPerPage:d,onChangeRowsPerPage:function(e){p(parseInt(e.target.value,10))},labelRowsPerPage:Dt("$__insightsPerPage")}))))})));var pu=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(lu)((function(e){var t=be.getState(),r=t.db,n=t.search,a=o.a.useState(0),i=Object(je.a)(a,2),c=i[0],l=i[1],s=o.a.useState(e.max?e.max:24),u=Object(je.a)(s,2),d=u[0],p=u[1],f=window.location.hash.split("/");f[0]=f[0].replace("#","");var m={};return m=(m=Object.keys(r.cards).filter((function(e){return"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})),n.tags.length>0&&(m=m.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return n.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),o.a.createElement("div",{style:{position:"relative",justifyContent:"space-between",margin:"auto",width:"100%"}},!e.noPagination&&Object.keys(m).length>25&&o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Dt("$__page")," ",c+1," ",Dt("$__of")," ",Math.ceil(Object.keys(m).length/d),o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},o.a.createElement(qs.a,{component:"div",count:Object.keys(m).length,page:c,onChangePage:function(e,t){l(t)},rowsPerPage:d,onChangeRowsPerPage:function(e){p(parseInt(e.target.value,10))},labelRowsPerPage:Dt("$__cardsPerPage")}))),o.a.createElement(Bo,{style:Object(h.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},Object.keys(m).map((function(e,t){if(t+1<=(c+1)*d&&t+1>=c*d)return o.a.createElement(Ro,{key:m[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},o.a.createElement(ii,{db:"cards",data:m[e],expanded:!0,Avatar:!0,Resume:!0,showConnectedIn:!0,LoadParent:!0}))}))),!e.noPagination&&Object.keys(m).length>25&&o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Dt("$__page")," ",c+1," ",Dt("$__of")," ",Math.ceil(Object.keys(m).length/d),o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},o.a.createElement(qs.a,{component:"div",count:Object.keys(m).length,page:c,onChangePage:function(e,t){l(t)},rowsPerPage:d,onChangeRowsPerPage:function(e){p(parseInt(e.target.value,10))},labelRowsPerPage:Dt("$__cardsPerPage")}))))}))),fu=r(782),hu=r.n(fu),mu=r(591),gu=r.n(mu),yu=r(592),vu=r.n(yu),bu=function(e){return{feed:{backgroundColor:"rgba(255,255,255,1)",margin:"auto",boxShadow:"0 0 7px 3px rgba(0,0,0,0.05)",width:"-webkit-fill-available",marginBottom:"15px",borderTopRightRadius:22},infos:{padding:"7px",cursor:"pointer"},feedRotate:{width:"calc(20% - 20px)",minWidth:"250px",maxWidth:"400px",backgroundColor:"rgba(255,255,255,1)",padding:"7px 7px 20px 7px",boxShadow:"0 0 7px 3px rgba(0,0,0,0.05)",placeSelf:"flex-end",cursor:"pointer"},image:{width:"100%",paddingTop:"calc((9 / 16) * 100%)",backgroundPosition:"center",backgroundRepeat:"no-repeat"},linkTitle:{marginTop:"7px",width:"100%",height:"auto",fontWeight:"bold",minHeight:"65px"},linkContent:{width:"100%",marginTop:"7px",height:"87px",textOverflow:"ellipsis",overflow:"hidden"},feedFooter:{marginTop:"7px",width:"100%",textAlign:"right",justifyContent:"space-between",borderTop:"1px solid rgba(0,0,0,0.05)",paddingTop:"3px",display:"flex",marginBottom:"7px"},feedDate:{position:"relative",left:"0px",fontSize:"12px",float:"left"},feedLink:{position:"relative",left:"0px",fontSize:"12px",float:"right",display:"flex"}}};var xu=Object(_e.b)((function(e){return{}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(bu)((function(e){var t=e.data,r=e.classes,n=o.a.useState(t.img),a=Object(je.a)(n,2),i=a[0],c=a[1],l=o.a.useState({backgroundSize:"contain"}),s=Object(je.a)(l,2),u=s[0],d=s[1];return o.a.createElement("div",{className:r.feed,onClick:e.clickChannel?function(){return e.clickChannel()}:null,style:Object(h.a)(Object(h.a)({},e.clickChannel?{cursor:"pointer"}:{}),{},{position:"relative"})},o.a.createElement("div",{style:{display:"none"}},o.a.createElement("img",{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?d({backgroundSize:"contain"}):d({backgroundSize:"cover"}))}})),o.a.createElement("div",{className:r.image,style:Object(h.a)({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},i?Object(h.a)({backgroundImage:'url("'.concat(i,'")')},u):{background:Mt("AvatarBackground")}),onClick:function(){e.clickChannel||window.open(t.link,"_blank")}},!i&&o.a.createElement("div",{style:{marginTop:"calc(-48% - 10px)",display:"flex",justifyContent:"center",alignItems:"center"}},o.a.createElement(wt,{icon:R.a,size:"39px",color:"rgba(250,250,250,0.77)"})),!e.clickChannel&&o.a.createElement("div",{style:{position:"absolute",top:7,right:7}},o.a.createElement(Ct,{title:Dt("$__sendToRadar","*"),color:Mt("menu"),icon:"settings_input_antenna",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},be.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"})),o.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,backgroundColor:"rgba(0,0,0,0.5)",padding:"3px 7px",color:"white",fontSize:11}},Fe()(t.isoDate?t.isoDate:t.pubDate).format("DD/MM/YYYY HH:MM"))),o.a.createElement(_t,{title:o.a.createElement(o.a.Fragment,null,!e.clickChannel&&o.a.createElement("a",{href:t.link,target:"_blank",rel:"noopener noreferrer",style:{fontSize:"14px",fontWeight:"bold"}},Dt("$__clickHereToReadNews",1)))},o.a.createElement("div",{className:r.infos,onClick:function(){e.clickChannel||window.open(t.link,"_blank")}},o.a.createElement("div",{className:r.linkTitle},o.a.createElement("div",{dangerouslySetInnerHTML:{__html:t&&t.title&&vu()(t.title)?t.title:t.title?gu()(t.title):""}})),o.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.contentSnippet&&vu()(t.contentSnippet)?t.contentSnippet:t.contentSnippet?gu()(t.contentSnippet):""},className:r.linkContent}),o.a.createElement("div",{className:r.feedFooter},o.a.createElement("div",{className:r.feedLink},!e.clickChannel&&o.a.createElement("a",{href:t.link,target:"_blank",rel:"noopener noreferrer",style:{fontSize:"14px",fontWeight:"bold"}},Dt("$__readMore",1)))))),o.a.createElement("div",{style:{top:-30}},o.a.createElement(Ur,{options:e._tags})))})));var _u=Object(bt.a)(bu)((function(e){var t=e.data,r=e.classes;return o.a.createElement("div",{className:r.feed,onClick:e.clickChannel?function(){return e.clickChannel()}:null},o.a.createElement("div",{className:r.image,style:{background:Mt("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},o.a.createElement("div",{style:{marginTop:"calc(-48% + 0px)",display:"flex",justifyContent:"center",alignItems:"center"}},o.a.createElement(wt,{icon:R.a,size:"47px",color:"rgba(250,250,250,0.77)"}))),o.a.createElement("div",{className:r.infos},o.a.createElement("div",{className:r.linkTitle},Dt("$__attention")),o.a.createElement("div",{className:r.linkContent},Dt("$__weHaveNotFoundYetLink")),o.a.createElement("div",{className:r.feedFooter},o.a.createElement("div",{className:r.feedDate},Fe()(t.created_at&&t.created_at.low?t.created_at.low:t.created_at).format("DD/MM/YYYY HH:MM")))))}));function wu(){wu=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Eu=Object(_e.b)((function(e){return{store:e}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(bu)((function(e){var t=be.getState(),r=t.db,n=t.session,a=e.data,i=Ut(),c=window.location.hash.split("/");if(c[0]=c[0].replace("#",""),!a)return null;var s=function(){var t=Object(Ee.a)(wu().mark((function t(o){var i,l;return wu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=c[0]&&36===c[0].length?a._parent[c[0]].idRel:a._parent[n.account].idRel,a._parent&&1===Object.keys(a._parent).length&&0===Object.keys(a._parent).filter((function(e){return be.getState().db.cards[e]})).length&&a._parent[Object.keys(a._parent)[0]].idRel&&(i=a._parent[Object.keys(a._parent)[0]].idRel),t.next=4,Pt.put("/rel/update",{_id:i,customTitle:o});case 4:t.sent,l=be.getState().db.feeds,a._parent&&1===Object.keys(a._parent).length&&0===Object.keys(a._parent).filter((function(e){return be.getState().db.cards[e]})).length&&a._parent[Object.keys(a._parent)[0]].idRel?l[a._id]=Object(h.a)(Object(h.a)({},l[a._id]),{},{_parent:Object(h.a)(Object(h.a)({},l[a._id]._parent),{},Object(Oe.a)({},Object.keys(a._parent)[0],Object(h.a)(Object(h.a)({},l[a._id]._parent[Object.keys(a._parent)[0]]),{},{customTitle:o})))}):l[a._id]=Object(h.a)(Object(h.a)({},l[a._id]),{},{_parent:Object(h.a)(Object(h.a)({},l[a._id]._parent),{},Object(Oe.a)({},c[0],Object(h.a)(Object(h.a)({},l[a._id]._parent[c[0]]),{},{customTitle:o})))}),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},r),{},{feeds:l})),e.onChange&&e.onChange();case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),u=function(){var e=Object(Ee.a)(wu().mark((function e(t){return wu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:$t({message:Dt("$__confirmDeleteThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){d(t)}});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),d=function(){var t=Object(Ee.a)(wu().mark((function t(n){var o,i;return wu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=n||c[0],t.next=3,Pt.delete("feed/unfollow/".concat(o,"__").concat(a._id));case 3:t.sent,(i=Object(h.a)({},be.getState().db.feeds))[a._id]&&i[a._id]._parent&&i[a._id]._parent[o]&&delete i[a._id]._parent[o],n&&i[a._id]&&delete i[a._id],e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},r),{},{feeds:Object(h.a)({},i)})),e.onChange&&setTimeout((function(){e.onChange()}),400);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),p=function(){var t=Object(Ee.a)(wu().mark((function t(n){var o,i=arguments;return wu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i.length>1&&void 0!==i[1]&&i[1],t.next=3,Pt.put("feed/visible/",{feedId:a._id,visible:!a||!a.hide});case 3:t.sent,o=a,o=Object(h.a)(Object(h.a)({},o),{},{hide:!a||!a.hide}),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},r),{},{feeds:Object(h.a)(Object(h.a)({},r.feeds),{},Object(Oe.a)({},a._id,Object(h.a)(Object(h.a)({},r.feeds[a._id]),o)))}));case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return a._parent&&Object.keys(a._parent).map((function(e){c[0]&&36===c[0].length&&c[0]===e?a.customTitle=a._parent[e].customTitle:Object.keys(a._parent).length>0&&(a.customTitle=a._parent[Object.keys(a._parent)[0]].customTitle)})),o.a.createElement("div",{style:{position:"relative",height:"auto",cursor:"pointer",width:"100%"}},o.a.createElement(ra,Object.assign({title:a.customTitle?a.customTitle:a.name,icon:"chrome_reader_mode",fontSize:"20px",onEdit:function(e,t){return s(e)},editable:!!(c[0]&&36===c[0].length&&i&&i.plan&&(i.planAdmin||i.planModerate)||a._parent&&1===Object.keys(a._parent).length&&0===Object.keys(a._parent).filter((function(e){return be.getState().db.cards[e]})).length),moreButton:!0},c[0]&&"tab"===c[0]&&i&&i.plan&&(i.planAdmin||i.planModerate)?Object(h.a)({},a._parent&&Object.keys(a._parent).length>0&&{options:[{name:a.hide?Dt("$__folowRSS"):Dt("$__hideRSS"),icon:a.hide?"visibility":"visibility_off",onClick:function(){p()}}].concat(Object(K.a)(i&&i.feed&&(i.feedAdmin||i.feedModerate)?[{name:Dt("$__edit"),icon:"settings_suggest",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},be.getState().sideModule),{},{db:"feeds",id:a._id,module:"feedEdit",activeModule:"feedEdit",data:Object(h.a)(Object(h.a)({},a),{},{_lock:!0,_admin:!!e.admin})}))}}]:[]),Object(K.a)(function(){if(e.data._parent){var t=[];return Object.keys(e.data._parent).map((function(a){if(be.getState().db.cards[a]&&be.getState().db.cards[a]._users&&be.getState().db.cards[a]._users[n._id]){var i=be.getState().db.cards[a];t=[].concat(Object(K.a)(t),[{name:i.name,icon:"view_comfy",render:o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{marginRight:"10px",width:"100%",display:"flex"}},o.a.createElement("div",{style:{width:"33px"}},o.a.createElement(Sr,{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:Mt("menu")})),o.a.createElement("div",{style:{width:"calc(100% - 7px)",display:"flex",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}},i.name))),onClick:function(){l.push("sp#".concat(a,"/bright-and-connected"))}}])}else 1===Object.keys(e.data._parent).length&&(t=[].concat(Object(K.a)(t),[{name:Dt("$__globalAccount"),icon:"rss_feed",render:o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{marginRight:"10px",width:"100%",display:"flex"}},o.a.createElement("div",{style:{width:"33px"}},o.a.createElement(Sr,{icon:"rss_feed",title:Dt("$__globalAccount"),size:"22px",color:Mt("menu")})),o.a.createElement("div",{style:{width:"calc(100% - 7px)",display:"flex",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}},Dt("$__globalAccount}")),o.a.createElement("div",{style:{width:"16px"}},o.a.createElement(Sr,{icon:"delete_forever",title:Dt("$__delete"),size:"22px",color:"red",onClick:function(){u(a)}})))),onClick:function(){u(a)}}]))})),t}}()))}):i&&i.plan&&(i.planAdmin||i.planModerate)?{options:[{name:Dt("$__deleteRSS"),icon:"delete_forever",onClick:function(){u()}}]}:{})),o.a.createElement("div",{style:{padding:"0",display:"flex",marginBottom:"15px",flexFlow:"wrap",marginTop:"15px"}},a.feed&&Object.keys(a.feed).length>0?Object.keys(a.feed).sort((function(e,t){return a.feed[e].isoDate&&a.feed[t].isoDate&&a.feed[e].isoDate<a.feed[t].isoDate?1:-1})).map((function(e,t){var r=a.feed[e],n=hu.a.MD5(r.link);if(a&&0===t)return o.a.createElement(xu,{key:n,data:r,_tags:a._tags,clickChannel:function(){l.push("".concat(window.location.pathname).concat(window.location.hash,"/").concat(a._id))}})})):o.a.createElement(_u,{data:a,clickChannel:function(){l.push("".concat(window.location.pathname).concat(window.location.hash,"/").concat(a._id))}})))})));var Ou=Object(_e.b)((function(e){return{store:e}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(bu)((function(e){e.data;var t=e.classes;return o.a.createElement("div",{className:t.feed},o.a.createElement(No.a,{variant:"rect",animation:"wave",style:{borderRadius:0,paddingTop:"calc((9 / 16) * 100%)",width:"100%",borderTopRightRadius:22}}),o.a.createElement("div",{className:t.infos},o.a.createElement("div",{className:t.linkTitle},o.a.createElement(No.a,{variant:"rect",animation:"wave",style:{width:"100%",height:"12px",marginBottom:10}}),o.a.createElement(No.a,{variant:"rect",animation:"wave",style:{width:"100%",height:"12px",marginBottom:10}}),o.a.createElement(No.a,{variant:"rect",animation:"wave",style:{width:"100%",height:"12px",marginBottom:10}})),o.a.createElement("div",{className:t.linkContent},o.a.createElement(No.a,{variant:"rect",style:{marginTop:15,borderRadius:7,width:"100%",height:8,marginBottom:12}}),o.a.createElement(No.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8,marginBottom:12}}),o.a.createElement(No.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8,marginBottom:12}}),o.a.createElement(No.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8,marginBottom:12}})),o.a.createElement("div",{className:t.feedFooter},o.a.createElement("div",{className:t.feedDate,style:{width:"50%",height:"20px",display:"flex",alignItems:"center"}},o.a.createElement("div",{style:{width:"100%",height:"8px"}},o.a.createElement(No.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8}}))))))})));function ju(){ju=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var ku=Object(_e.b)((function(e){return{store:e}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(bu)((function(e){var t=e.data,r=(e.classes,be.getState().db),n=o.a.useState(0),a=Object(je.a)(n,2),i=a[0],c=a[1],l=o.a.useState(0),s=Object(je.a)(l,2),u=s[0],d=s[1],p=o.a.useState(e.max?e.max:21),f=Object(je.a)(p,2),m=f[0],g=f[1],y=o.a.useState([]),v=Object(je.a)(y,2),b=v[0],x=v[1],_=o.a.useState([]),w=Object(je.a)(_,2),E=w[0],O=w[1],j=o.a.useState(0),k=Object(je.a)(j,2),S=(k[0],k[1]),L=o.a.useState(!0),C=Object(je.a)(L,2),I=C[0],F=C[1],T=o.a.useState(!1),N=Object(je.a)(T,2),P=N[0],A=N[1];o.a.useEffect((function(){var t=window.location.hash.split("/");t[0]=t[0].replace("#",""),JSON.stringify(t)!==JSON.stringify(b)&&x(t),F(!0),e.max&&(S(e.max),g(e.max))}),[]),o.a.useEffect((function(){b.length>0&&!P&&(D(i,m),b[2]&&36!==b[2].length&&F(!0),A(!0))}),[b]),o.a.useEffect((function(){u>Object.keys(E).length&&(F(!0),D(i,m))}),[i,m]),o.a.useEffect((function(){F(!1)}),[E]);var D=function(){var e=Object(Ee.a)(ju().mark((function e(t,r){var n,a;return ju().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0===u||u>Object.keys(E).length)){e.next=9;break}return F(!0),e.next=4,Qr.post("/Feed_Links",{ids:b[2]&&b[2].length?b[2]:null,skip:t*r,limit:r});case 4:n=e.sent,a=Array.from(E),n&&n.data&&n.data.links&&n.data.links.map((function(e){0===a.filter((function(t){return t.link===e.link})).length&&a.push(e)})),n.data&&n.data.total&&0===u&&d(n.data.total),O(a);case 9:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),z=function(){var n=Object(Ee.a)(ju().mark((function n(a){var o;return ju().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Pt.put("/rel/update",{_id:t.idRel,customTitle:a});case 2:n.sent,(o=r.cards[b[0].replace("#","")]._feeds)[t._id]=Object(h.a)(Object(h.a)({},o[t._id]),{},{customTitle:a}),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},r),{},{cards:Object(h.a)(Object(h.a)({},r.cards),{},Object(Oe.a)({},b[0].replace("#",""),Object(h.a)(Object(h.a)({},r.cards[b[0].replace("#","")]),{},{_feeds:o})))}));case 6:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),M=function(){var n=Object(Ee.a)(ju().mark((function n(a){var o,i;return ju().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return window.history.back(),o=a.replace("#",""),n.next=4,Pt.delete("feed/unfollow/".concat(o,"__").concat(t._id));case 4:n.sent,delete(i=r.cards[o]._feeds)[t._id],e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},r),{},{cards:Object(h.a)(Object(h.a)({},r.cards),{},Object(Oe.a)({},o,Object(h.a)(Object(h.a)({},r.cards[o]),{},{_feeds:i})))}));case 8:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),B=function(){for(var e=[],t=0;t<m;t++)e.push(o.a.createElement(Ro,{xs:12,sm:6,md:4,lg:3,xl:2,key:"sk_".concat(t)},o.a.createElement(Ou,null)));return o.a.createElement(o.a.Fragment,null,e)};return o.a.createElement("div",null,t&&(t.customTitle||t.name)&&o.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:33}},o.a.createElement("div",{style:{position:"relative",width:"100%",float:"left",marginBottom:"15px",display:"flex"}},o.a.createElement(Ir,{icon:"undo",text:Dt("$__back","*"),onClick:function(){return window.history.back()}}),b[0]&&"bright-and-connected"===b[1]&&b[2]&&o.a.createElement(Ir,{icon:"delete_sweep",text:Dt("$__removeChannel","*"),onClick:function(){$t({message:Dt("$__confirmRemoveChannel",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){M(b[0])}})}})),o.a.createElement(qo,{title:"".concat(t.customTitle?t.customTitle:t.name),icon:"chrome_reader_mode",fontSize:"20px",onEdit:function(e,t){return z(e)},editable:!0})),o.a.createElement("div",{style:Object(h.a)(Object(h.a)({},e.horizontal?{position:"relative",width:"100%"}:{position:"absolute",top:t&&(t.customTitle||t.name)?50:0,left:0,right:0,bottom:0}),{},{padding:"0px 15px",overflow:"auto"}),id:"linkList",onScroll:function(t){!function(t){var r=document.getElementById("linkList");!I&&r.scrollTop+window.innerHeight+400>r.scrollHeight&&!e.horizontal&&c(i+1)}()}},o.a.createElement(Bo,{style:Object(h.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},u>0&&E.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 o.a.createElement(Ro,{key:e._id,xs:12,sm:6,md:4,lg:3,xl:2},o.a.createElement(xu,{db:"cards",data:e}))})),I?o.a.createElement(B,null):o.a.createElement(o.a.Fragment,null))))}))),Su=function(e){return{}};function Lu(){Lu=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Cu=Object(_e.b)((function(e,t){return{store:{feeds:e.db.feeds}}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Su)((function(e){var t,r=be.getState(),n=r.search,a=r.session,i=o.a.useState(!0),c=Object(je.a)(i,2),l=c[0],s=c[1],u=o.a.useState({}),d=Object(je.a)(u,2),p=d[0],f=d[1],m=o.a.useState([]),g=Object(je.a)(m,2),y=g[0],v=g[1];o.a.useEffect((function(){x()}),[e.store.feeds]),o.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(y)&&v(e)})),o.a.useEffect((function(){b()}),[y]);var b=function(){var t=Object(Ee.a)(Lu().mark((function t(){return Lu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s(!0),"hideFeeds"!==y[1]){t.next=8;break}return t.next=4,an(Object(h.a)(Object(h.a)({},e),{},{fnIdentification:"Views/BrightAndConnected/Feeds -- iniFeeds()"}),{showHidden:!0});case 4:t.sent&&x(),t.next=16;break;case 8:if(0!==Object.keys(be.getState().db.feeds).filter((function(e){return!be.getState().db.feeds[e].hide})).length){t.next=15;break}return t.next=11,an(Object(h.a)(Object(h.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(be.getState().db.feeds).length>0&&(e=Object(h.a)(Object(h.a)({},e),be.getState().db.feeds));var t={};Object.keys(e).filter((function(t){return e[t]&&e[t].name&&e[t].name.toLowerCase().indexOf(n.text.toLowerCase())>-1||e[t].customTitle&&e[t].customTitle.toLowerCase().indexOf(n.text.toLowerCase())>-1||e[t].customDescription&&e[t].customDescription.toLowerCase().indexOf(n.text.toLowerCase())>-1})).map((function(r){(Object.keys(n.plans.selected).length>0&&Object.keys(n.plans.selected).map((function(t){return n.plans.selected[t]&&e[r]._parent[t]})).length>0||0===Object.keys(n.plans.selected).length)&&(t=Object(h.a)(Object(h.a)({},t),{},Object(Oe.a)({},r,e[r])))})),f(t),s(!1)};return l?o.a.createElement("div",{style:{position:"absolute",top:"0px",bottom:0,left:0,right:0}},o.a.createElement(Ga,null)):y[2]&&36===y[2].length?o.a.createElement("div",null,o.a.createElement(ku,{follow:!0})):o.a.createElement("div",{style:(t={width:"100%"},Object(Oe.a)(t,"width","calc(100% - 20px)"),Object(Oe.a)(t,"position","relative"),Object(Oe.a)(t,"display","flex"),t)},o.a.createElement(Bo,null,p&&Object.keys(p).length>0&&Object.keys(p).filter((function(t){if(36===y[0].length&&be.getState().db.cards[y[0]]&&p[t]._parent&&Object.keys(p[t]._parent).length>0&&p[t]._parent[y[0]])return!0;if("tab"===y[0]){var r=!1;if(p[t].hide&&(r=!0),!e.showHidden&&!r)return!0;if(e.showHidden&&r)return!0}})).sort((function(e,t){var r=p[e].customTitle?p[e].customTitle.toLowerCase().trim():p[e].name.toLowerCase().trim(),n=p[t].customTitle?p[t].customTitle.toLowerCase().trim():p[t].name.toLowerCase().trim();return y[0]&&36!==y[0].length&&(a&&a.account&&p[e]._parent&&p[e]._parent[a.account]&&p[e]._parent[a.account].customTitle&&(r=p[e]._parent[a.account].customTitle.toLowerCase().trim()),a&&a.account&&p[t]._parent&&p[t]._parent[a.account]&&p[t]._parent[a.account].customTitle&&(n=p[t]._parent[a.account].customTitle.toLowerCase().trim())),r<n?-1:r>n?1:0})).map((function(e,t){var r=p[e];return o.a.createElement(Ro,{xs:12,sm:6,md:4,lg:3,xl:2,key:e},o.a.createElement(Eu,{data:r,follow:!0,onChange:function(){x()}}))}))))}))),Iu={control:{backgroundColor:"#fff",fontSize:14,fontFamily:"Roboto",fontWeight:"normal",lineHeight:"17px"},"&multiLine":{control:{fontFamily:"Roboto"},highlighter:{padding:9,border:"1px solid transparent",boxSizing:"border-box",overflow:"hidden",maxHeight:150},input:{padding:9,border:"1px solid silver",overflow:"auto",maxHeight:150,borderColor:"transparent"}},"&singleLine":{display:"inline-block",width:180,lineHeight:"17px",highlighter:{lineHeight:"17px",padding:1,border:"2px inset transparent"},input:Object(Oe.a)({border:"none",lineHeight:"17px",padding:1},"border","2px inset")},suggestions:{position:"absolute",bottom:"100%",top:"none",left:"33px",maxHeight:"217px !important",overflow:"auto !important",list:{position:"absolute",width:"300px",backgroundColor:"white",border:"1px solid rgba(0,0,0,0.15)",borderRadius:"7px 7px",boxShadow:"0 0 3px 5px rgba(0,0,0,0.09)",fontSize:14,maxHeight:"217px",overflow:"auto"},item:{padding:"5px 15px",borderBottom:"1px solid rgba(0,0,0,0.15)","&focused":{backgroundColor:Mt("color")}}}},Fu=function(e){var t,r,n;return{root:{position:"absolute",top:0,left:0,right:0,bottom:0},rootRelative:{position:"relative",top:0,left:0,right:0,bottom:0},content:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowY:"auto",backgroundColor:"rgba(249,249,249,1)"},timeline:{listStyle:"none",padding:0,position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",width:"100%","& .file-drop-target":{width:"100%",display:"flex",position:"absolute",bottom:0,left:0,right:0,height:"auto"}},scrollEnd:{marginTop:"160px",position:"relative",width:"100%",height:0,marginBottom:"-100px"},timelineSimple:{position:"relative",overflowX:"auto",padding:0,width:"-webkit-fill-available","&:before":{left:"15px"}},item:{marginBottom:"5px",position:"relative",width:"calc(100% - 15px)","&:before,&:after":{content:'" "',display:"table"},"&:after":{clear:"both"}},timelineBadge:(t={},Object(Oe.a)(t,e.breakpoints.down("sm"),{left:"30px !important"}),Object(Oe.a)(t,"color","#FFF"),Object(Oe.a)(t,"width","30px"),Object(Oe.a)(t,"height","30px"),Object(Oe.a)(t,"lineHeight","25px"),Object(Oe.a)(t,"fontSize","12px"),Object(Oe.a)(t,"textAlign","center"),Object(Oe.a)(t,"position","absolute"),Object(Oe.a)(t,"bottom","23px"),Object(Oe.a)(t,"left","50%"),Object(Oe.a)(t,"marginLeft","-24px"),Object(Oe.a)(t,"zIndex","1"),Object(Oe.a)(t,"borderTopRightRadius","50%"),Object(Oe.a)(t,"borderTopLeftRadius","50%"),Object(Oe.a)(t,"borderBottomRightRadius","50%"),Object(Oe.a)(t,"borderBottomLeftRadius","50%"),Object(Oe.a)(t,"display","flex"),Object(Oe.a)(t,"alignItems","center"),Object(Oe.a)(t,"justifyContent","center"),t),timelineSimpleBadge:{left:"30px"},custom:{backgroundColor:Mt("color"),boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He("#000")+", 0.4)"},info:{backgroundColor:Qe[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Qe[0])+", 0.4)"},success:{backgroundColor:Ze[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Ze[0])+", 0.4)"},danger:{backgroundColor:Je[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Je[0])+", 0.4)"},warning:{backgroundColor:Ke[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Ke[0])+", 0.4)"},primary:{backgroundColor:Xe[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Xe[0])+", 0.4)"},badgeIcon:{width:"14px",height:"14px"},timelinePanel:(r={},Object(Oe.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(Oe.a)(r,"width","45%"),Object(Oe.a)(r,"float","left"),Object(Oe.a)(r,"padding","7px"),Object(Oe.a)(r,"marginBottom","5px"),Object(Oe.a)(r,"position","relative"),Object(Oe.a)(r,"boxShadow","0 1px 4px 0 rgba("+He("#000")+", 0.14)"),Object(Oe.a)(r,"borderRadius","6px"),Object(Oe.a)(r,"color","rgba("+He("#000")+", 0.87)"),Object(Oe.a)(r,"background","#FFF"),Object(Oe.a)(r,"&:before",{position:"absolute",bottom:"16px",right:"-15px",display:"inline-block",borderTop:"15px solid transparent",borderLeft:"15px solid "+tt[10],borderRight:"0 solid "+tt[10],borderBottom:"15px solid transparent",content:'" "'}),Object(Oe.a)(r,"&:after",{position:"absolute",bottom:"16px",right:"-14px",display:"inline-block",borderTop:"14px solid transparent",borderLeft:"14px solid #FFF",borderRight:"0 solid #FFF",borderBottom:"14px solid transparent",content:'" "'}),r),timelineSimplePanel:{width:"calc(100% - 60px)"},timelinePanelInverted:Object(Oe.a)({},e.breakpoints.up("sm"),{float:"right",backgroundColor:"#FFF","&:before":{borderLeftWidth:0,borderRightWidth:"15px",left:"-15px",right:"auto"},"&:after":{borderLeftWidth:0,borderRightWidth:"14px",left:"-14px",right:"auto"}}),timelineHeading:{marginBottom:0},timelineBody:{fontSize:"12px",lineHeight:"21px"},timelineFooter:{zIndex:"1",position:"relative",float:"left",width:"100%",display:"inline-flex",justifyContent:"space-between"},footerUser:{display:"flex",alignItems:"center",fontSize:"12px",fontWeight:"bold",color:Mt("medium")},footerLine:{position:"relative",marginTop:"10px",marginBottom:"5px"},dropFile:{display:"none"},onDropFile:Object(Oe.a)({position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:"5",display:"flex",alignItems:"center",justifyContent:"center",color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.77)"},"zIndex",11),editor:{position:"absolute",bottom:0,height:"auto",width:"calc(100% - 0px)"},editorRelative:{position:"relative",bottom:0,minHeight:"50px",height:"auto",width:"calc(100% - 0px)",zIndex:10},files:{display:"inline-table",position:"relative",backgroundColor:"rgba(250,250,250,0.9)",width:"100%"},textEditor:{},textEditorIcon:{cursor:"pointer",color:Mt("color")},progressBar:{backgroundColor:"".concat(Mt("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(Mt("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Mt("color")," !important")}},actionButton:{alignItems:"center",cursor:"pointer",float:"left",height:"20px",position:"relative",textAlign:"center",width:"30px"},sendingMessage:{width:"100%"},valuePositive:{positive:"relative",float:"left",color:"blue"},valueNegative:{positive:"relative",float:"left",color:"red"},lastValue:{positive:"relative",float:"right",color:"grey"},timeInfo:{display:"flex",alignItems:"center",color:"grey",width:"100%",position:"relative",float:"left",marginBottom:"7px","& .text":{marginLeft:"7px"}},urlPreview:{position:"absolute",width:"100%",top:"-90px",maxHeight:"120px",background:"linear-gradient(60deg, rgba(250,250,250,1), rgba(250,250,250,0.9))",padding:"7px",display:"flex",overflow:"auto",alignItems:"center","& img":{maxWidth:"20%",height:"auto",position:"relative",float:"left",marginTop:0,marginRight:"7px"},"& .data":{position:"relative",float:"left",width:"75%","& .title":{fontSize:"16px",fontWeight:"bold"},"& .siteName":{fontSize:"14px",fontWeight:"bold",color:"#909090"},"& .contentSnippet":{fontSize:"12px",color:"#909090"}}},mentionInput:Object(h.a)(Object(h.a)({},qe),{},{"& textarea":Object(h.a)(Object(h.a)({},qe),{},{padding:"7px",borderRadius:"7px",fontSize:"16px",width:"calc(100% - 14px)",minHeight:"38px",border:"solid 1px rgba(0,0,0,0.1)"}),"& .sugestions":{top:"none !important",bottom:"40px",border:"solid 10px red"},"& textarea::placeholder":{color:"rgba(0,0,0,0.2)"}}),mentionWrapper:{width:"100%",background:"transparent",fontSize:"0.9rem",color:" #a9b5c4","&&.mentionWrapper__control":{borderRadius:"25px",border:"1px solid #3a546f",minHeight:"45px","&& .mentionWrapper__highlighter":{padding:"0.7rem 1rem"},"&& .mentionWrapper__input":(n={padding:"0.7rem 1rem",outline:0,border:0,resize:"none"},Object(Oe.a)(n,"outline","none"),Object(Oe.a)(n,"fontSize","0.9rem"),Object(Oe.a)(n,"color","#7288a3"),Object(Oe.a)(n,"borderColor"," #3a546f"),Object(Oe.a)(n,"overflow","hidden"),Object(Oe.a)(n,"&& :: placeholder",{color:"#7288a3"}),n)}}}};function Tu(){Tu=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Nu=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Fu)((function(e){var t=be.getState(),r=t.db,n=t.session,a=(t.chat,e.classes),i=be.getState().functions.socket,c=o.a.useState(!1),l=Object(je.a)(c,2),s=l[0],u=l[1],d=o.a.useState(""),p=Object(je.a)(d,2),f=p[0],m=p[1],g=o.a.useState(!1),y=Object(je.a)(g,2),v=y[0],b=y[1],x=o.a.useState(!1),_=Object(je.a)(x,2),w=_[0],E=_[1],O=o.a.useState([]),j=Object(je.a)(O,2),k=j[0],S=j[1],L=o.a.useState([]),C=Object(je.a)(L,2),I=C[0],F=C[1],T=o.a.useState(null),N=Object(je.a)(T,2),P=N[0],A=N[1],D=o.a.useState(!1),z=Object(je.a)(D,2),M=z[0],B=z[1],$=o.a.useState([]),Y=Object(je.a)($,2),R=Y[0],G=Y[1],H=o.a.useState(!1),W=Object(je.a)(H,2),U=W[0],V=W[1],q=o.a.createRef(),X=o.a.createRef(),J=Ut(),Z=0;n._id&&r.cards[e.nodeId]&&r.users&&r.users[Object.keys(r.users).find((function(e){return e.indexOf(n._id)>-1}))]&&(Z=r.users[Object.keys(r.users).find((function(e){return e.indexOf(n._id)>-1}))]);var Q=window.location.hash.split("/");Q[0]=Q[0].replace("#",""),o.a.useEffect((function(){s||u(!0)}));var ee=function(){var e,t=[];if(e=f){var r=e.split("@[");r.length>0&&r.map((function(e){if(e){"@[".concat(e.split(")")[0],")");var r=e.split("](")[1];r&&(r=r.split(")")[0])&&36===r.length&&t.push(r)}}))}return t},te=function(){var t=Object(Ee.a)(Tu().mark((function t(){var a,o,c;return Tu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:V(!1),b(!0),a=[],o=ee(),console.log(e),c={_id:Object(pn.a)(),idRel:e.nodeId,replyData:e.replyData?e.replyData:{},reply:e.replyData?e.replyData._id:null,message:f,type:"comment",mentions:ee(),notifyUsers:a,filesCount:k.length>0?k.length:0,_parent:e.nodeId,_client:r.cards[e.nodeId]&&r.cards[e.nodeId].client?r.cards[e.nodeId].client:null},P&&(c=Object(h.a)(Object(h.a)({},c),{},{urlPreview:JSON.stringify(P)})),Xa(e,Object(h.a)(Object(h.a)({},c),{},{user:Object(h.a)({},r.users[n._id]),files:{}})),i.emit("data",{module:"timeline",method:"post",action:"add"},c,(function(t){if(console.log(t),t._id)if(k.length>0)re(t);else{e.onSending&&e.onSending();var n=Object(h.a)(Object(h.a)({},t),{},{_parent:e.nodeId,_client:r.cards[e.nodeId]&&r.cards[e.nodeId].client?r.cards[e.nodeId].client:null});P&&(n=Object(h.a)(Object(h.a)({},n),{},{urlPreview:JSON.stringify(P)})),o.map(function(){var t=Object(Ee.a)(Tu().mark((function t(n){return Tu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r.cards[e.nodeId]||r.users&&(!r.users||r.users[n])){t.next=3;break}return t.next=3,_a(e,n,2,e.nodeId);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),F([]),S([]),G([]),m(""),A(null),b(!1),e.onSending&&e.onSending()}})),m(""),A(null);case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),re=function(){var t=Object(Ee.a)(Tu().mark((function t(r){var n;return Tu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Array.from(k),t.next=3,Promise.all(n.map(function(){var e=Object(Ee.a)(Tu().mark((function e(t,n){var a;return Tu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return F([].concat(Object(K.a)(I),[t])),e.next=3,tn(r._id,t,!0);case 3:return a=e.sent,e.abrupt("return",a);case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}())).then((function(t){e.onSending&&e.onSending(),r.files=t,r._parent=e.nodeId,i.emit("timeline.COMMENT",{node:e.nodeId,comment:r,db:e.db?e.db:"cards"},(function(e){})),F([]),S([]),m(""),A(null),b(!1),e.onSending&&e.onSending()}));case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ne=function(){var e=Object(Ee.a)(Tu().mark((function e(t){return Tu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:S([].concat(Object(K.a)(k),Object(K.a)(Object.keys(t).map((function(e){return t[e]}))))),E(!1);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ae=function(){var e=Object(Ee.a)(Tu().mark((function e(t){var r,n,a,o;return Tu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m(t),!t||!(t.indexOf("http://")>-1||t.indexOf("https://")>-1)){e.next=9;break}return r="",n=[],t.indexOf(" ")>-1?n=t.split(" "):t.indexOf("\n")>-1?n=t.split("\n"):n.push(t),a=new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i"),e.next=8,n.map((function(e){(e.indexOf("http://")>-1||e.indexOf("https://")>-1)&&a.test(e)&&(r=e)}));case 8:if(!P&&r&&-1===R.indexOf(r)||r&&P&&-1===R.indexOf(r)&&P.link!==r){B(!0);try{i.emit("data",{module:"link",method:"post",action:"exist"},{idRel:Q[0],url:r},(function(e){A(e),B(!1)}))}catch(c){B(!1),(o=R).push(r),G(o),console.log(c)}}case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),oe=[];return r.cards[e.nodeId]&&r.users&&Object.keys(r.users).map((function(e){if(e&&null!==e&&void 0!==e&&e!==n._id&&r.users[e].name&&r.users[e]&&!r.users[e].deleted){var t=r.users[e]._id,a=r.users[e].name?r.users[e].name:r.users[e].name.split(" ").length>0?r.users[e].name.split(" ")[0]:r.users[e].name;t&&0===Object.keys(oe).filter((function(e){return oe[e].id===t})).length&&oe.push({id:t,display:a})}})),(J&&(J.owner||J.planAdmin||J.planModerate)||Z&&Z.access&&parseInt(Z.access)>3)&&Object.keys(r.users).filter((function(e){return!r.users[e].deleted&&"client"!==r.users[e].type&&"group"!==r.users[e].type&&"account"!==r.users[e].type&&!r.users[e]._parent})).map((function(t){t&&null!==t&&void 0!==t&&t!==n._id&&0===Object.keys(oe).filter((function(e){if(oe[e].id===t)return!0})).length&&oe.push({id:t,display:e.nodeId&&r.cards[e.nodeId]&&r.users&&r.users[t]&&r.users[t].name?r.users[t].name:r.users[t].displayName?r.users[t].displayName:r.users[t].name})})),o.a.createElement(So.FileDrop,{ref:q,className:e.relative?a.rootRelative:a.root,onDragOver:function(){!e.disabledSend&&E(!0)},onClick:function(){X&&X.current&&X.current.focus()},onDrop:ne,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"},o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:e.relative?a.editorRelative:a.editor,style:e.editorStyle?e.editorStyle:{},onClick:function(){X&&X.current&&X.current.focus()}},o.a.createElement("div",{className:a.files},k&&k.length>0&&k.map((function(t,r){var n=t.name.split("."),a="attachment";return e.store.db.fileExtensions.filter((function(e){return e.ext.indexOf(n[n.length-1].toLowerCase())>-1})).length>0&&(a=e.store.db.fileExtensions.filter((function(e){return e.ext.indexOf(n[n.length-1].toLowerCase())>-1}))[0].icon||URL.createObjectURL(t)),o.a.createElement("div",{key:r,style:{position:"relative",float:"left",width:"100%",display:"flex",alignItems:"center",marginBottom:"5px"}},o.a.createElement("div",{style:{position:"relative",float:"left",width:"50px",height:"50px",marginRight:"7px",overflow:"hidden"}},"string"===typeof a&&-1===a.indexOf("blob:")&&-1===a.indexOf("svg")?o.a.createElement(wt,{icon:a,size:"50px"}):o.a.createElement("img",{src:a,style:{width:"100%",height:"100%"}})),I.length>0&&I[r]&&I[r].name===t.name?o.a.createElement(wt,{icon:"cloud_done",color:"green"}):v?o.a.createElement(o.a.Fragment,null):o.a.createElement(wt,{icon:"delete_forever",color:"red",onClick:function(){return function(e){var t=Array.from(k);t.splice(e,1),S(t)}(r)}}),t.name)}))),o.a.createElement("div",{className:a.textEditor},M&&!P&&o.a.createElement("div",{className:a.urlPreview,style:{width:"100%",height:"150px"}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement("div",{style:{marginLeft:"7px",width:"200px",height:"110px",maxWidth:"50%"}},o.a.createElement(No.a,{variant:"rect",style:{width:"200px",height:"110px",maxWidth:"100%"}})),o.a.createElement("div",{style:{marginLeft:"7px",width:"100%",height:"25px"}},o.a.createElement(No.a,{variant:"text",height:25,style:{marginBottom:"7px"}}),o.a.createElement(No.a,{variant:"text",height:10}),o.a.createElement(No.a,{variant:"text",height:10}),o.a.createElement(No.a,{variant:"text",height:10}),o.a.createElement(No.a,{variant:"text",height:10}),o.a.createElement(No.a,{variant:"text",height:10}),o.a.createElement(No.a,{variant:"text",height:10})))),P&&o.a.createElement("div",{className:a.urlPreview},o.a.createElement("img",{src:"".concat(P.img?P.img:Nr.a),onError:function(e){e.target.src=Nr.a},alt:P.title}),o.a.createElement("div",{className:"data"},o.a.createElement("div",{className:"title"},P.title),P.site&&o.a.createElement("div",{className:"siteName"},P.site),P.contentSnippet&&o.a.createElement("div",{className:"contentSnippet"},P.contentSnippet)),o.a.createElement(To,{title:Dt("$__removeLink",1),icon:"delete_forever",color:"red",onClick:function(){return A(null)}})),v?o.a.createElement("div",{className:a.sendingMessage},Dt("$__sending",1),o.a.createElement(Ya.a,{className:a.progressBar})):o.a.createElement("div",{style:{position:"relative",height:"auto",backgroundColor:"#ffffff",border:"solid 1px rgba(0,0,0,0.05)",display:"flex",alignItems:"center",zIndex:1}},o.a.createElement(Lo.b,{ref:X,value:f,onChange:function(e){ae(e.target.value)},onPaste:function(e){ne(e.clipboardData.files)},placeholder:e.placeholder?e.placeholder:Dt("$__writeMessage"),style:Object(h.a)(Object(h.a)({},Iu),{},{position:"relative",width:"calc(100% - 130px)",paddingRight:"7px",background:"none",border:"none",overflow:"auto !important"}),onKeyDown:function(e){13==e.keyCode&&(e.shiftKey?e.stopPropagation():f.trim()&&te())},placement:"top",forceSuggestionsAboveCursor:!0,autosize:{minRows:1,maxRows:6}},o.a.createElement(Lo.a,{trigger:"@",data:oe,renderSuggestion:function(e,t,n){if(e&&e.id)return o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},o.a.createElement(Fr.a,{style:{width:"25px",height:"25px",marginRight:"7px"},alt:n,src:r.users[e.id]&&r.users[e.id].image||r.users[e.id]&&r.users[e.id].image?r.users[e.id].image:null}),n)}})),o.a.createElement("div",{style:{position:"absolute",right:"0px",bottom:"0px",cursor:"pointer",display:"flex",alignItems:"center"}},o.a.createElement(To,{title:Dt("$__emojis",1),icon:U?"highlight_off":"sentiment_very_satisfied",color:Mt("medium"),onClick:function(){V(!U)}}),!v&&o.a.createElement("div",{className:a.actionButton},o.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 ne(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"}),o.a.createElement(wt,{icon:"attachment",color:Mt("medium"),size:"22px"})),!v&&(f||k.length>0)&&o.a.createElement(To,{title:Dt("$__pressENTERtoSendorClickHere",1),icon:"send",color:Mt("menu"),onClick:function(){return te()}}),e.closeOption&&o.a.createElement(wt,{title:Dt("$__pressCRTL+ENTERtoSend",1),icon:"close",color:Mt("color"),onClick:function(){return e.onClose()}}),U&&o.a.createElement("div",{style:{position:"absolute",bottom:"44px",right:"40px"}},o.a.createElement(Io.a,{onEmojiClick:function(e,t){m("".concat(f," ").concat(t.emoji))},groupVisibility:{recently_used:!1}})))))),o.a.createElement("div",{className:w?a.onDropFile:a.dropFile,onDragLeave:function(){!e.disabledSend&&E(!1)}},Dt("$__dropTheFileToAttach","*"))))}))),Pu=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(ui)((function(e){var t=e.classes,r=be.getState(),n=r.db,a=r.session,i=r.functions,c=(r.timeline,i.socket,o.a.useState(!1)),l=Object(je.a)(c,2),s=l[0],u=l[1],d=o.a.useState(!1),p=Object(je.a)(d,2),f=(p[0],p[1]),h=o.a.useState(!1),m=Object(je.a)(h,2),g=(m[0],m[1],o.a.useState(null)),y=Object(je.a)(g,2),v=(y[0],y[1],o.a.useState(null)),b=Object(je.a)(v,2),x=(b[0],b[1],null);w&&w._parent&&n.cards[w._parent]?w._parent:w&&w.idRel&&n.cards[w.idRel]&&w.idRel;var _=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];f(!0),e&&clearTimeout(x)},w=e.storie;if(!w)return null;"timer"===w.type&&String(w.ini)&&String(w.fin)&&(w.fin,w.ini);var E=null;w.urlPreview&&(E=JSON.parse(w.urlPreview));var O=function(e){var t,r;if(w&&w._parent&&n.cards[w._parent]?t=w._parent:w&&w.idRel&&n.cards[w.idRel]&&(t=w.idRel),r=e,e){var a=e.split("@[");a.length>0&&a.map((function(e){if(e){var a="@[".concat(e.split(")")[0],")"),o=e.split("](")[1];if(o)if((o=o.split(")")[0])&&36===o.length&&n.cards[t]&&n.cards[t]._users&&n.cards[t]._users[o]){var i=n.cards[t]._users&&n.cards[t]._users[o]&&n.cards[t]._users[o].name||n.cards[t]._users&&n.cards[t]._users[o]&&n.cards[t]._users[o].name?n.cards[t]._users[o].name:Dt("$__hideUser","*");r=r.replace(a,'<span style="color:'.concat(Mt("menu"),'"><b>').concat(i,"</b></span>"))}else if(o&&36===o.length&&n.users[o]){var c=n.users[o]&&n.users[o].name||n.users[o].name?n.users[o].name:Dt("$__hideUser","*");r=r.replace(a,'<span style="color:'.concat(Mt("menu"),'"><b>').concat(c,"</b></span>"))}}return!0}))}return r}(w.message);w._reactions&&Object.keys(w._reactions).length>0&&Object.keys(w._reactions).map((function(e){Object.keys(w._reactions[e]).length>0&&Object.keys(w._reactions[e]).map((function(t){t===a._id&&e}))}));var j=!1;e.storie&&e.storie.user&&e.storie.user._id===a._id&&(j=!0);return""===w.message&&w.cardId&&w.cardId!==e.nodeId&&!be.getState().db.cards[w.cardId]?null:o.a.createElement("div",null,o.a.createElement("div",{className:"message",style:{position:"relative",float:"left",width:"100%",marginBottom:"20px",display:"flex",alignItems:"center"},onMouseLeave:function(){!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;x=setTimeout((function(){f(!1)}),e)}(1e3)},onMouseOver:function(){e.isReply||_(!0)},onClick:function(){e.isReply||_(!0)}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement("div",{style:{position:"relative",float:"left",fontSize:"10px",fontWeight:"bold",display:"flex",alignItems:"center",whiteSpace:"nowrap",marginRight:"15px"}},o.a.createElement(si,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},variant:w.user&&w.user._id&&a.users&&a.users[w.user._id]?"dot":"standard"},o.a.createElement(Fr.a,{alt:w.user.displayName?w.user.displayName:w.user.name,src:"".concat(w.user.image),style:{width:"22px",height:"22px"}})),w.user.displayName?w.user.displayName:w.user.name," ",o.a.createElement("span",{style:{fontSize:"10px"}},"(",Fe()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===Fe()(1e3*w.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(Fe()(1e3*w.created_at).tz("America/Sao_Paulo").format("H:mm")):Fe()(new Date).tz("America/Sao_Paulo").format("YYYY")===Fe()(1e3*w.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(Fe()(1e3*w.created_at).tz("America/Sao_Paulo").format("DD/MM H:mm")):"".concat(Fe()(1e3*w.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm")),")"))),o.a.createElement("div",null,w.files&&Object.keys(w.files).length>0&&o.a.createElement("div",{className:"files",style:{position:"relative",display:"flex",justifyContent:j?"flex-end":"none",flexWrap:"wrap"}},w.files&&Object.keys(w.files).length>0&&Object.keys(w.files).map((function(t,r){var a=w.files[t],i=a.name.split("."),c=i[i.length-1],l="attachment";n.fileExtensions.filter((function(e){return e.ext.indexOf(c.toLowerCase())>-1})).length>0&&(l=n.fileExtensions.filter((function(e){return e.ext.indexOf(c.toLowerCase())>-1}))[0].icon||"https://machen.azureedge.net/".concat(a.file));var s="img";return n.fileExtensions.filter((function(e){return e.ext.indexOf(c.toLowerCase())>-1})).length>0&&n.fileExtensions.filter((function(e){return e.ext.indexOf(c.toLowerCase())>-1}))[0].viewer&&(s=n.fileExtensions.filter((function(e){return e.ext.indexOf(c.toLowerCase())>-1}))[0].viewer),o.a.createElement("div",{key:t,style:{position:"relative",display:"flex",alignItems:"center",marginBottom:"5px",whiteSpace:"nowrap",textOverflow:"ellipsis",cursor:"pointer",overflow:"hidden",padding:"7px",zIndex:"10 !important",borderRadius:"15px",width:"img"===s?Object.keys(w.files).length<4?"33%":"25%":"movie"===s||"audio"===s?"50%":"20%",maxWidth:"img"===s?"440px":"none",minWidth:"img"===s||"movie"!==s&&"audio"!==s&&"string"===typeof l&&-1===l.indexOf("blob:")&&-1===l.indexOf("svg")||"movie"!==s&&"audio"!==s&&!("img"===s&&l&&l.indexOf("svg")>-1)?"140px":"100%"},onClick:function(r){e.openLightBox&&e.openLightBox(w.files[t]._id),r.preventDefault()},title:w.files[t].name},("img"===s||"movie"!==s&&"audio"!==s&&"string"===typeof l&&-1===l.indexOf("blob:")&&-1===l.indexOf("svg")||"movie"!==s&&"audio"!==s&&!("img"===s&&l&&l.indexOf("svg")>-1))&&o.a.createElement(xt.a,{title:w.files[t].name},o.a.createElement("div",{style:{position:"absolute",bottom:"7px",left:"7px",right:"7px",padding:"3px",background:"rgba(0,0,0,0.8)",color:"#FFFFFF",borderRadius:"0px 0px 15px 15px",overflow:"hidden",textOverflow:"ellipsis"}},w.files[t].name)),"img"===s&&"string"===typeof l&&l.indexOf("https")>-1&&-1===l.indexOf("svg")&&o.a.createElement("img",{src:"".concat(l),style:{borderRadius:"15px",boxShadow:"0 1px 2px 2px rgba(0,0,0,0.1)",maxWidth:"100%",height:"100%",maxHeight:"33vh"},onError:function(e){w.created_at&&"string"===typeof w.created_at&&parseInt(w.created_at)>Fe()().unix("X")-60&&(e.target.src=l)}}),"movie"!==s&&"string"===typeof l&&-1===l.indexOf("blob:")&&-1===l.indexOf("svg")?o.a.createElement(wt,{icon:l,size:"50px"}):"movie"!==s&&!("img"===s&&l&&l.indexOf("svg")>-1)&&o.a.createElement("img",{src:l,style:{width:"100%",height:"100%"}}),"img"===s&&l&&l.indexOf("svg")>-1&&o.a.createElement("img",{src:yr.a,style:{borderRadius:"15px",boxShadow:"0 1px 2px 2px rgba(0,0,0,0.1)",maxWidth:"100%",height:"100%",maxHeight:"33vh"}}),"movie"===s&&o.a.createElement("video",{style:{width:"100%"},src:"https://machen.azureedge.net/".concat(a.file),controls:!0}),"audio"===s&&o.a.createElement(fr.a,{src:"https://machen.azureedge.net/".concat(a.file),controls:!0}))}))),function(){if("comment"===w.type&&w.message&&!w.urlPreview)return o.a.createElement("div",{style:{wordBreak:"break-word"}},Ht(O,e.searchText));if("comment"===w.type&&w.message&&w.urlPreview){var r=O.replace(E.link,'<a href="'.concat(E.link,'" target="_blank">').concat(E.link,"</a>"));return o.a.createElement("div",null,o.a.createElement("div",{style:{position:"relative",width:"100%"}},o.a.createElement("div",{className:t.urlPreview},!s&&E.img&&o.a.createElement("img",{src:"".concat(E.img),onError:function(e){u(!0)},alt:E.title||E.link}),o.a.createElement("div",{className:"data"},o.a.createElement("div",{className:"title"},E.title),E.site&&o.a.createElement("div",{className:"siteName"},E.site),E.contentSnippet&&o.a.createElement("div",{className:"contentSnippet"},E.contentSnippet))),o.a.createElement("a",{style:{position:"relative",float:"right",fontWeight:"bold",fontSize:"12px",color:"#000000",zIndex:1},href:E.link,target:"_blank"},Dt("$__openLink","*"))),o.a.createElement("div",{dangerouslySetInnerHTML:{__html:zt(r,!0,"\n","\n")}}))}}())))}))),Au=function(e){return{root:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowY:"auto"},content:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowY:"auto",backgroundColor:"rgba(249,249,249,1)"},timeline:{listStyle:"none",padding:"0",position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",width:"100%","& .file-drop-target":{width:"100%"}},scrollEnd:{marginTop:"160px",position:"relative",width:"100%",height:0,marginBottom:"-100px"},scrollEndNoEditor:{marginTop:"30px",position:"relative",width:"100%",height:0,marginBottom:"-100px"},timelineSimple:{position:"relative",overflowX:"auto",marginTop:0,padding:"0 0 20px",width:"-webkit-fill-available","&:before":{left:"15px"},"&:after":{clear:"both"}},timelineSimpleWithHeader:{position:"relative",overflowX:"auto",marginTop:"60px",padding:"0 0 50px",width:"-webkit-fill-available","&:before":{left:"15px"}},item:{marginBottom:"5px",position:"relative",paddingLeft:"15px",width:"calc(100% - 15px)","&:before,&:after":{content:"",display:"table"},"&:after":{clear:"both"}},timelineBadge:{color:"#FFF",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:"#FFF",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:Mt("color"),boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He("#000")+", 0.4)"},info:{backgroundColor:Qe[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Qe[0])+", 0.4)"},success:{backgroundColor:Ze[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Ze[0])+", 0.4)"},danger:{backgroundColor:Je[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Je[0])+", 0.4)"},warning:{backgroundColor:Ke[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Ke[0])+", 0.4)"},primary:{backgroundColor:Xe[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Xe[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("+He("#000")+", 0.14)",borderRadius:"6px",color:"rgba("+He("#000")+", 0.87)",background:Mt("timelineMyMessage")},timelinePanelInverted:{maxWidth:"calc(100% - 70px)",float:"left",padding:"7px",marginLeft:"40px",marginBottom:"5px",position:"relative",boxShadow:"0 1px 4px 0 rgba("+He("#000")+", 0.14)",borderRadius:"6px",color:"rgba("+He("#000")+", 0.87)",background:"#ffffff"},timelineHeading:{marginBottom:0,display:"flex",alignItems:"center"},timelineDate:{display:"flex",alignItems:"center",padding:"5px",backgroundColor:"#CCCCCC"},timelineBody:{overflowWrap:"anywhere",fontSize:"12px",lineHeight:"21px",position:"relative",width:"100%",float:"left"},timelineLog:{fontSize:"12px",lineHeight:"21px"},timelineFooter:{zIndex:"1",position:"relative",float:"left",width:"100%",display:"inline-flex",justifyContent:"space-between"},footerUser:{display:"flex",alignItems:"center",fontSize:"12px",fontWeight:"bold",color:Mt("medium"),padding:"0 7px"},footerLine:{position:"relative",marginTop:"10px",marginBottom:"5px"},dropFile:{display:"none"},onDropFile:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.77)",zIndex:1},editor:{position:"absolute",bottom:0,minHeight:"50px",padding:"10px",height:"auto",width:"calc(100% - 0px)",backgroundColor:"rgba(240,240,240,1)",zIndex:10},files:{display:"inline-table",position:"relative"},textEditor:{},textEditorIcon:{cursor:"pointer",color:Mt("color")},progressBar:{backgroundColor:"".concat(Mt("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(Mt("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Mt("color")," !important")}},actionButton:{alignItems:"center",cursor:"pointer",float:"left",height:"30px",position:"relative",textAlign:"center",width:"30px"},sendingMessage:{width:"100%"},valuePositive:{positive:"relative",float:"left",color:"blue"},valueNegative:{positive:"relative",float:"left",color:"red"},lastValue:{positive:"relative",float:"right",color:"grey"},timeInfo:{display:"flex",alignItems:"center",color:"grey",width:"100%",position:"relative",float:"left",marginBottom:"7px","& .text":{marginLeft:"7px"}},urlPreview:{position:"relative",float:"left",marginBottom:"33px","& img":{maxWidth:"20%",height:"auto",marginTop:"30px",marginRight:"7px"},"& .data":{"& .title":{fontSize:"16px",fontWeight:"bold"},"& .siteName":{fontSize:"14px",fontWeight:"bold",color:"#909090"},"& .contentSnippet":{fontSize:"12px",color:"#909090"}}},users:{position:"relative",bottom:0,right:"2px",fontSize:"10px","& .MuiAvatarGroup-root":{justifyContent:"flex-end"},"& .MuiAvatar-root":{width:"25px",height:"25px",fontSize:"10px"}}}};function Du(){Du=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var zu=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Au)((function(e){var t=e.classes,r=be.getState(),n=r.db,a=r.session,i=r.functions,c=(r.chat,r.timeline),l=i.socket,s=o.a.useState(e.stories||{}),u=Object(je.a)(s,2),d=u[0],p=u[1],f=o.a.useState(!0),m=Object(je.a)(f,2),g=m[0],y=m[1],v=o.a.useState(!1),b=Object(je.a)(v,2),x=b[0],_=(b[1],o.a.useState(!1)),w=Object(je.a)(_,2),E=w[0],O=(w[1],[]);o.a.useEffect((function(){return c&&c[e.data._id]&&Object.keys(c[e.data._id]).length!==Object.keys(d).length&&p(c[e.data._id]),function(){}}),[c]),o.a.useEffect((function(){e.data._id&&j()}),[e.data]);var j=function(){var t=Object(Ee.a)(Du().mark((function t(){var r;return Du().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ka(Object(h.a)(Object(h.a)({},e),{},{fnIdentification:"Timeline/social/init()"}),{ids:[e.data._id],db:"cards",type:"comment",limit:E,skip:x});case 2:(r=t.sent)&&r.timelines&&r.timelines[e.data._id]?(p(r.timelines[e.data._id]),setTimeout((function(){y(!1)}),300)):r&&r.result&&setTimeout((function(){y(!1)}),300);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),k=function(t){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:O,file:t})},S=function(){var t=Object(Ee.a)(Du().mark((function t(){return Du().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object.keys(d).filter((function(e){if(d[e].user&&d[e].user._id!==a._id&&(!d[e].readedBy||d[e].readedBy&&!d[e].readedBy[a._id]))return!0})).length>0&&(Va(e,{readedBy:a._id,id:e.nodeId,db:n.cards[e.nodeId]?"cards":"users"}),l.emit("data",{module:"chat",method:"put",action:"read"},{readedBy:a._id,id:e.nodeId,db:n.cards[e.nodeId]?"cards":"users",_client:n.cards[e.nodeId]&&n.cards[e.nodeId].client?n.cards[e.nodeId].client:null}));case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return g?o.a.createElement("div",{style:{width:"100%"}},o.a.createElement(No.a,{variant:"text",height:11,style:{marginBottom:"3px"}}),o.a.createElement(No.a,{variant:"text",height:11,style:{marginBottom:"3px"}}),o.a.createElement(No.a,{variant:"text",height:11,style:{marginBottom:"3px"}})):o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},o.a.createElement("ul",{className:t.timelineSimple,id:"tms_".concat(e.nodeId),style:{zIndex:1}},d&&Object.keys(d).length>0&&Object.keys(d).sort((function(e,t){return parseInt(d[e].created_at)<parseInt(d[t].created_at)?-1:parseInt(d[e].created_at)>parseInt(d[t].created_at)?1:0})).map((function(r,n){var i=d[r];return!e.showUnReaded&&n>Object.keys(d).length-4?(i.files&&Object.keys(i.files).length>0&&Object.keys(i.files).map((function(e,t){var r=i.files[e];O.push(r)})),o.a.createElement("li",{key:r},o.a.createElement(Pu,{openLightBox:function(e){k(e)},storie:i,reply:i.reply?d[i.reply]:null,hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId}))):e.showUnReaded&&i&&i.user&&i.user._id!==a._id&&(!i.readedBy||i.readedBy&&!i.readedBy[a._id])?(i.files&&Object.keys(i.files).length>0&&Object.keys(i.files).map((function(e,t){var r=i.files[e];O.push(r)})),o.a.createElement("li",{className:t.item,key:r,style:{}},o.a.createElement(Pu,{openLightBox:function(e){k(e)},storie:i,reply:i.reply?d[i.reply]:null,hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId}))):void 0})),o.a.createElement("div",{style:{marginBottom:"15px",clear:"both"}})),e.data&&e.data._id&&o.a.createElement(Nu,{nodeId:e.data._id,onSending:function(){S()},placeholder:"Escreva um coment\xe1rio"}))})));var Mu=Object(_e.b)((function(e){return{store:e}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(bu)((function(e){var t=e.classes,r=o.a.useState({}),n=Object(je.a)(r,2),a=n[0],i=n[1];return o.a.useEffect((function(){i(e.data)}),[]),o.a.createElement("div",{className:t.feed,style:{cursor:"pointer"},onClick:e.onClick?function(){return e.onClick()}:null},a&&a.img&&o.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"}},o.a.createElement("img",{src:a.img,style:{width:"100%"},onError:function(){i(Object(h.a)(Object(h.a)({},a),{},{img:null}))}})),o.a.createElement("div",{className:t.infos},o.a.createElement("div",{className:t.linkTitle,dangerouslySetInnerHTML:{__html:a.title}}),o.a.createElement("div",{dangerouslySetInnerHTML:{__html:a.contentSnippet},className:t.linkContent}),o.a.createElement("div",{className:t.feedFooter,onClick:function(e){e.stopPropagation()}},o.a.createElement("div",{className:t.feedDate},Fe()(a.isoDate?a.isoDate:a.pubDate).format("DD/MM/YYYY HH:MM")),a.title&&a.title.indexOf("Violet ganham")>-1&&console.log(a),o.a.createElement(Dr,{data:a},o.a.createElement("div",{style:{marginLeft:"15px"}},o.a.createElement(Ir,{icon:"settings_input_antenna",title:Dt("$__sendToRadar",1),iconColor:Mt("menu"),size:"18px",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},be.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{_id:"new",type:"link",name:a.title,description:a.contentSnippet,pubDate:a.isoDate?a.isoDate:a.pubDate,image:a.img,url:a.link}}))}})))),!e.hideTimeline&&o.a.createElement("div",{className:t.feedFooter,onClick:function(e){e.stopPropagation()}},o.a.createElement(zu,{data:a}))))})));function Bu(){Bu=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var $u=Object(_e.b)((function(){return{}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(bu)((function(e){var t=e.data,r=o.a.useState(0),n=Object(je.a)(r,2),a=n[0],i=n[1],c=o.a.useState(0),l=Object(je.a)(c,2),s=l[0],u=l[1],d=o.a.useState(7),p=Object(je.a)(d,2),f=p[0],m=(p[1],o.a.useState([])),g=Object(je.a)(m,2),y=g[0],v=g[1],b=o.a.useState([]),x=Object(je.a)(b,2),_=x[0],w=x[1],E=o.a.useState(!0),O=Object(je.a)(E,2),j=O[0],k=O[1],S=o.a.useState(!1),L=Object(je.a)(S,2),C=L[0],I=L[1];o.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(y)&&v(e),k(!0)}),[]),o.a.useEffect((function(){y.length>0&&!C&&(F(a,f),y[2]&&36!==y[2].length&&k(!0),I(!0))}),[y]),o.a.useEffect((function(){s>Object.keys(_).length&&(k(!0),F(a,f))}),[a,f]),o.a.useEffect((function(){k(!1)}),[_]);var F=function(){var e=Object(Ee.a)(Bu().mark((function e(t,r){var n,a,o;return Bu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0===s||s>Object.keys(_).length)){e.next=17;break}return k(!0),e.prev=2,e.next=5,Qr.post("/Feed_Social_V2",{ids:null,skip:t*r,limit:r});case 5:n=e.sent,a={},o=0,console.log(n),n&&n.data&&n.data.length>0&&n.data.map((function(e){var t={};e.reactions&&e.reactions.filter((function(e){return e&&e.user&&e.user._id})).length>0&&e.reactions.map((function(e){t=Object(h.a)(Object(h.a)({},t),{},Object(Oe.a)({},e.react.type,Object(h.a)(Object(h.a)({},t&&t[e.react.type]?t&&t[e.react.type]:{}),{},Object(Oe.a)({},e.user._id,Object(h.a)(Object(h.a)({},e.user),{},{reactDate:e.react.created_at})))))})),a=Object(h.a)(Object(h.a)({},a),{},Object(Oe.a)({},e.link._id,Object(h.a)(Object(h.a)({},e.link),{},{_reactions:t}))),e.total>o&&(o=e.total)})),u(o),w(Object(h.a)(Object(h.a)({},_),a)),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(2),console.log(e.t0);case 17:case"end":return e.stop()}}),e,null,[[2,14]])})));return function(t,r){return e.apply(this,arguments)}}();return o.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0,top:0}},o.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");!j&&t.scrollHeight-t.scrollTop<2500&&i(a+1)}()}},o.a.createElement(Bo,null,s>0&&Object.keys(_).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 o.a.createElement(Bo,{key:e,style:{display:"flex",justifyContent:"center"}},o.a.createElement(Ro,{xs:12,sm:10,md:8,lg:6,xl:6},o.a.createElement(Mu,{db:"cards",data:_[e],onClick:function(){window.open(_[e].link,"_blank")}})))}))),j&&o.a.createElement("div",{style:{position:"relative",width:"100%"}},o.a.createElement(Ga,null))))})));function Yu(){Yu=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Ru=Object(_e.b)((function(e){return{store:e}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(bu)((function(e){var t=e.data,r=(e.classes,be.getState().db,o.a.useState(0)),n=Object(je.a)(r,2),a=(n[0],n[1],o.a.useState(0)),i=Object(je.a)(a,2),c=i[0],l=(i[1],o.a.useState(5)),s=Object(je.a)(l,2),u=(s[0],s[1],o.a.useState([])),d=Object(je.a)(u,2),p=d[0],f=d[1],m=o.a.useState([]),g=Object(je.a)(m,2),y=g[0],v=g[1],b=o.a.useState(!0),x=Object(je.a)(b,2),_=x[0],w=x[1],E=o.a.useState(!1),O=Object(je.a)(E,2),j=O[0],k=O[1];o.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(p)&&f(e),w(!0)}),[]),o.a.useEffect((function(){p.length>0&&!j&&(S(),p[2]&&36!==p[2].length&&w(!0),k(!0))}),[p]);var S=function(){var e=Object(Ee.a)(Yu().mark((function e(t,r){var n,a;return Yu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0===c||c>Object.keys(y).length)){e.next=13;break}return w(!0),e.prev=2,e.next=5,Qr.post("/Feed_Social",{id:p[2]});case 5:n=e.sent,a={},n&&n.data&&n.data.links?(a=Object(h.a)(Object(h.a)({},a),n.data.links),v(Object(h.a)(Object(h.a)({},y),a)),w(!1)):w(!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 o.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0,top:0}},o.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"},o.a.createElement(Bo,null,Object.keys(y).length>0?Object.keys(y).sort((function(e,t){return y[e].isoDate&&y[t].isoDate&&y[e].isoDate<y[t].isoDate?1:y[e].isoDate&&y[t].isoDate&&y[e].isoDate>y[t].isoDate?-1:0})).map((function(e){return o.a.createElement(Bo,{key:e,style:{display:"flex",justifyContent:"center"}},o.a.createElement(Ro,{xs:12,sm:6,md:6,lg:6,xl:6},o.a.createElement(Mu,{db:"cards",data:y[e],onClick:function(){window.open(y[e].link,"_blank")}})))})):o.a.createElement(Bo,{style:{display:"flex",justifyContent:"center"}},o.a.createElement(Ro,{xs:12,sm:6,md:6,lg:6,xl:6},"A feed solicitado n\xe3o pode ser exibido"))),_&&o.a.createElement("div",{style:{position:"relative",width:"100%"}},o.a.createElement(Ga,null))))})));var Gu=Object(_e.b)((function(e){return{history:e.db.history}}),(function(e){return Object(s.b)(n,e)}))((function(e){window.location.hash.split("/")[0].replace("#","")||l.push("bright-and-connected#tab/home");var t=window.location.hash.split("/");return t[0]=t[0].replace("#",""),o.a.createElement("div",null,t[1]&&("radar"===t[1]||"insight-boards"===t[1])&&be.getState().session.cards.load&&Object.keys(be.getState().session.cards.load).length>0&&Object.keys(be.getState().session.cards.load).filter((function(e){return"loading"===be.getState().session.cards.load[e]})).length>0&&o.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"}},o.a.createElement("span",{style:{color:Mt("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},Dt("$__loadingData")),o.a.createElement(Ga,null)),t[1]&&"home"===t[1]&&o.a.createElement(o.a.Fragment,null,o.a.createElement(cu,null),o.a.createElement($u,null)),t[1]&&"read"===t[1]&&o.a.createElement(o.a.Fragment,null,o.a.createElement(cu,null),o.a.createElement(Ru,null)),t[1]&&"insight-boards"===t[1]&&o.a.createElement(o.a.Fragment,null,o.a.createElement(cu,null),o.a.createElement(du,null)),t[1]&&"radar"===t[1]&&o.a.createElement(o.a.Fragment,null,o.a.createElement(cu,null),o.a.createElement(pu,null)),t[1]&&("feeds"===t[1]||"bright-and-connected"===t[1])&&o.a.createElement(o.a.Fragment,null,o.a.createElement(cu,null),o.a.createElement(Cu,null)),t[1]&&"hideFeeds"===t[1]&&o.a.createElement(o.a.Fragment,null,o.a.createElement(cu,null),o.a.createElement(Cu,{showHidden:!0})),t[1]&&"allNews"===t[1]&&o.a.createElement(o.a.Fragment,null,o.a.createElement(cu,null),o.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0,top:0}},o.a.createElement(ku,null))))})),Hu=r(594),Wu=r(323),Uu=r.n(Wu),Vu=r(783),qu=r.n(Vu),Xu=(r(1251),new Date),Ku=Xu.getFullYear(),Ju=Xu.getMonth(),Zu=(Xu.getDate(),[{title:"TECH WEEKLY",allDay:!1,start:new Date(Ku,Ju,1,17,0),end:new Date(Ku,Ju,1,18,0),color:"default"},{title:"GENERAL MEETING",allDay:!1,start:new Date(Ku,Ju,1,9,0),end:new Date(Ku,Ju,1,11,0),color:"green"},{title:"EXAME CRIS",start:new Date(Ku,Ju,1,12,0),end:new Date(Ku,Ju,1,14,0),allDay:!1,color:"red"}]);console.log(Zu);var Qu=Object(Hu.b)(Uu.a),ed={allDay:"Dia Inteiro",previous:"<",next:">",today:"Hoje",month:"M\xeas",week:"Semana",day:"Dia",agenda:"Agenda",date:"Data",time:"Hora",event:"Evento",showMore:function(e){return"+ (".concat(e,") Eventos")}};function td(e){var t=e.event;return o.a.createElement("span",null,o.a.createElement("strong",null,t.title),t.desc&&": "+t.desc)}function rd(e){e.localizer.messages;var t=e.label,r=function(t){e.onNavigate(t)};return o.a.createElement("div",{className:"rbc-toolbar"},o.a.createElement("span",{className:"rbc-btn-group"},o.a.createElement("button",{type:"button",onClick:function(){r("PREV")},style:{backgroundColor:Mt("menu")}},"Prev")),o.a.createElement("span",{className:"rbc-toolbar-label"},t),o.a.createElement("span",{className:"rbc-btn-group"},o.a.createElement("button",{type:"button",onClick:function(){r("NEXT")},style:{backgroundColor:Mt("menu")}},"Next")),o.a.createElement("span",{className:"rbc-btn-group"},o.a.createElement("button",{type:"button",onClick:function(){r("TODAY")},style:{backgroundColor:Mt("menu")}},"Today")),o.a.createElement("span",{className:"rbc-btn-group"},o.a.createElement("button",{type:"button",onClick:function(){r("DATE")},style:{backgroundColor:Mt("menu")}},"Date")),o.a.createElement("span",{className:"rbc-btn-group"},o.a.createElement("button",{type:"button",onClick:function(){r("dayGridMonth")},style:{backgroundColor:Mt("menu")}},"DayGrid")))}var nd=Object(De.a)(Jt);var ad=Object(_e.b)((function(e){return{loaders:e.session.cards.load}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)($c)((function(e){return o.a.createElement(o.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&&o.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"}},o.a.createElement("span",{style:{color:Mt("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},Dt("$__loadingData")),o.a.createElement(Ga,null)))}))),od={widgetsContent:{backgroundColor:"#FFFFFF",height:"calc(100vh - 200px)",maxHeight:"calc(100vh - 350px)",position:"relative",overflowX:"auto"}},id=r(784),cd=r.n(id),ld=r(785),sd=r.n(ld);var ud=Object(_e.b)((function(e){return{store:{cards:e.db.cards,session:e.session}}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(od)((function(e){var t,r=be.getState(),n=r.db,a=r.session,i=n.dataType,c=n.users,s=o.a.useState(!1),u=Object(je.a)(s,2),d=u[0],p=u[1],f=Object.keys(be.getState().db.cards).filter((function(e){return be.getState().db.cards[e]&&!be.getState().db.cards[e].checklist&&i.filter((function(t){return t.name===be.getState().db.cards[e].type})).length>0})).map((function(e){return be.getState().db.cards[e]})),m=Fe()().format("YYYY-MM-DD"),g=window.location.hash.split("/");g[0]=g[0].replace("#","");var y=String(a.dashboard.period).replace("$__last","");y=y.replace("Days","");var v=f.filter((function(e){if(e._users&&!e.deleted&&!e.checklist&&e._users[a._id]&&"completed"!==e.status&&(e._users[a._id].myDay&&Fe()(new Date(1e3*e._users[a._id].myDay)).tz("America/Sao_Paulo").unix("x")>Fe()().subtract(15,"days").unix("x")&&Fe()(new Date(1e3*e._users[a._id].myDay)).tz("America/Sao_Paulo").unix("x")<Fe()(new Date(m)).unix("x")||e._users[a._id].isResponsible&&(e.endDate&&Fe()(new Date(1e3*e.endDate)).tz("America/Sao_Paulo").unix("x")<Fe()().unix("x")||e.startDate&&Fe()(new Date(1e3*e.startDate)).tz("America/Sao_Paulo").unix("x")>Fe()(new Date(m)).subtract(15,"days").unix("x"))&&(e._users[a._id]&&!e._users[a._id].myDay||e._users[a._id].myDay&&Fe()(new Date(1e3*e._users[a._id].myDay)).tz("America/Sao_Paulo").format("YYYY-MM-DD")!==m&&Fe()(new Date(1e3*e._users[a._id].myDay)).tz("America/Sao_Paulo").format("YYYY-MM-DD")>Fe()(new Date).tz("America/Sao_Paulo").subtract(30,"d").format("YYYY-MM-DD"))))return!0})).sort((function(e,t){return be.getState().db.orderByTitle&&"ASC"===be.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()<t.name.toLowerCase().trim()||be.getState().db.orderByTitle&&"DESC"===be.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()>t.name.toLowerCase().trim()?-1:be.getState().db.orderByTitle?0:!be.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 o.a.createElement("div",{style:{width:"calc(100%)",display:"flex",alignItems:"center",justifyContent:"center"},key:t._id},o.a.createElement(ii,{db:"cards",data:t,noShadow:!0}),o.a.createElement(Ge.a,{onClick:function(){Ln(e,{_id:t._id,userId:a._id,option:!0})}},o.a.createElement(wt,{icon:"add",color:Mt("menu"),title:Dt("$__addOnMyDay")})))})),b=f.filter((function(e){return"completed"!==e.status&&!e.deleted&&!e.archived&&e._users&&e._users[a._id]&&(!e._users[a._id].myDay||e._users[a._id].myDay&&Fe()(new Date(1e3*e._users[a._id].myDay)).tz("America/Sao_Paulo").format("YYYY-MM-DD")!==m)&&(e.endDate&&Fe()(new Date(1e3*e.endDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")>=Fe()().format("YYYY-MM-DD")&&Fe()(new Date(1e3*e.endDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")<=Fe()(new Date(m)).add(10,"days").format("YYYY-MM-DD")||e.startDate&&Fe()(new Date(1e3*e.startDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")>=Fe()().format("YYYY-MM-DD")&&Fe()(new Date(1e3*e.startDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")<=Fe()(new Date(m)).add(10,"days").format("YYYY-MM-DD"))})).sort((function(e,t){return be.getState().db.orderByTitle&&"ASC"===be.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()<t.name.toLowerCase().trim()||be.getState().db.orderByTitle&&"DESC"===be.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()>t.name.toLowerCase().trim()?-1:be.getState().db.orderByTitle?0:!be.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 o.a.createElement(ii,{db:"cards",key:e._id,data:e,noShadow:!0})})),x=c&&Object.keys(c).length>0?c[Object.keys(c).find((function(e){return a&&a._id&&c[e]&&c[e]._id&&c[e]._id.indexOf(a._id)>-1}))]:{},_=new Date,w=_.getHours()>=0&&_.getHours()<5?"$__goodNight":_.getHours()>=5&&_.getHours()<12?"$__goodMorning":_.getHours()>=12&&_.getHours()<18?"$__goodAfternoon":"$__goodNight",E=Object.keys(n.cards).filter((function(e){return n.cards[e]&&!n.cards[e].deleted&&!n.cards[e].archived&&"plan"===n.cards[e].type&&n.cards[e]._users&&n.cards[e]._users[a._id]&&"completed"!==n.cards[e].status&&n.cards[e]._isFavorite}));return o.a.createElement("div",{style:{width:"100%"}},o.a.createElement(Bo,{style:{boxShadow:"0 5px 7px 1px rgba(0,0,0,0.03)",backgroundColor:"rgba(250,250,250,0.07)"}},o.a.createElement(Ro,{xs:12,sm:12,md:6,lg:6,xl:6},o.a.createElement("div",{style:{display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center",marginBottom:"33px"},id:"view_dashboard_welcomeMessage"},o.a.createElement("div",{style:{fontSize:"16px",padding:"15px 0",fontWeight:"bold",width:"100%",textAlign:"left",color:Mt("menu"),paddingLeft:"15px"}},Dt(w,1),", ",x&&x.displayName?x.displayName:x.name?x.name:"","!"),o.a.createElement(Bo,{style:{width:"100%"}},o.a.createElement(Ro,{xs:12,sm:12,md:6,lg:6,xl:6},o.a.createElement("img",{src:sd.a,width:800,height:610,style:{width:"100%",height:"auto",borderRadius:17,boxShadow:"0 0 7px 1px rgba(0,0,0,0.1)"}})),o.a.createElement(Ro,{xs:12,sm:12,md:6,lg:6,xl:6},o.a.createElement("div",{style:{position:"relative",paddingBottom:33,height:"100%"}},o.a.createElement("div",{style:{fontSize:"16px",color:Mt("medium"),paddingRight:15},dangerouslySetInnerHTML:{__html:zt(Dt("$__supportWelcomeMessage",1))}}),o.a.createElement("div",{style:{position:"absolute",bottom:0,left:0}},o.a.createElement(Ct,{title:Dt("$__clickToaccessSupportPage","*"),text:Dt("$__clickToaccessSupportPage"),color:Mt("menu"),icon:"help_outline",onClick:function(){window.open("https://support.machen.ai/","_blank")},size:"17px"}))))))),o.a.createElement(Ro,{xs:12,sm:12,md:6,lg:6,xl:6},o.a.createElement("img",{src:cd.a,width:800,height:640,style:{width:"100%",height:"auto"}}))),E.length>0?o.a.createElement(Bo,{style:{marginTop:"33px",marginBottom:"33px"}},o.a.createElement(Ro,{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}},o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginBottom:33}},o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",color:Mt("menu"),fontWeight:"bold",fontSize:"16px",marginTop:"16px",display:"flex",alignItems:"center",justifyContent:"space-between"}},Dt("$__favoritePlans"),E.length>3?o.a.createElement(Ct,{title:"".concat(Dt("$__viewAllFavorites","*")," (").concat(E.length,")"),text:"".concat(Dt("$__viewAllFavorites","*")," (").concat(E.length,")"),color:Mt("menu"),icon:"favorite",transparent:!0,onClick:function(){l.push("sp#tab/home")},size:"25px"}):o.a.createElement(o.a.Fragment,null)),o.a.createElement(Bo,null,E.sort((function(e,t){var r=n.cards[e].updated_at&&n.cards[e].updated_at.low?n.cards[e].updated_at.low:0,a=n.cards[t].updated_at&&n.cards[t].updated_at.low?n.cards[t].updated_at.low:0;return r>a?-1:r<a?1:0})).map((function(e,t){if(t<4)return o.a.createElement(Ro,{xs:12,sm:6,md:4,lg:3,xl:2,key:n.cards[e]._id,style:{marginTop:"33px",cursor:"pointer"},onClick:function(){l.push("sp#".concat(n.cards[e]._id,"/dashboard"))}},o.a.createElement("div",{style:{display:"flex",alignItems:"center",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}},o.a.createElement(wt,{icon:"view_comfy",color:Mt("menu"),style:{marginRight:"7px"}}),n.cards[e].name),o.a.createElement("div",{style:Object(h.a)(Object(h.a)({position:"relative",float:"left",width:"100%",paddingTop:"60%",display:"flex",alignItems:"center",justifyContent:"center"},n.cards[e].image?{backgroundImage:'url("'.concat(n.cards[e].image,'")')}:{background:Mt("AvatarBackground")}),{},{backgroundSize:"cover",backgroundPosition:"center center",marginTop:"7px"})},!n.cards[e].image&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{marginTop:"calc(-50% - 10px)"}},o.a.createElement(wt,{icon:M.a,size:"46px",color:"rgba(250,250,250,0.77)"})))),o.a.createElement("div",{style:{display:"flex",alignItems:"center",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",width:"100%",position:"relative",fontWeight:"normal",color:Mt("medium"),fontSize:"14px",paddingTop:"7px"}},n.cards[e].description))})))),o.a.createElement("div",{style:{clear:"both"}}))):o.a.createElement(o.a.Fragment,null),o.a.createElement(Bo,{style:{paddingBottom:33,marginTop:33}},o.a.createElement(Ro,{xs:12,sm:12,md:6,lg:6,xl:6,style:{borderRight:"2px solid ".concat(Mt("menu"))},id:"view_dashboard_myDay"},o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"0 16px"}},d?o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",color:Mt("menu"),fontWeight:"bold",fontSize:"16px",marginBottom:"16px",display:"flex",alignItems:"center"}},o.a.createElement(Ge.a,{onClick:function(){p(!1)}},o.a.createElement(wt,{icon:"undo",color:Mt("menu"),title:Dt("$__backToMyDay")})),Dt("$__taskSuggestions")),o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",color:Mt("medium"),fontWeight:"bold",fontSize:"12px",marginBottom:"16px",display:"flex",alignItems:"center"},id:"view_dashboardSuggestionsAddButton"},"Clique no + para adicionar as tarefas ao seu dia."),o.a.createElement("div",null,v)):o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",color:Mt("menu"),fontWeight:"bold",fontSize:"16px",marginBottom:"16px"}},Dt("$__myDay"),v.length>0&&o.a.createElement("div",{style:(t={color:Mt("menu"),fontSize:"16px",marginTop:"7px",cursor:"pointer",textAlign:"left",padding:"7px"},Object(Oe.a)(t,"color","#f50057"),Object(Oe.a)(t,"display","flex"),Object(Oe.a)(t,"alignItems","center"),t),onClick:function(){p(!0)},id:"view_dashboard_myDaySuggestionsOptions"},o.a.createElement(wt,{icon:"info",color:Mt("medium"),style:{marginRight:"15px"}}),Dt("$__clickHereToCheckTaskSuggestions"))),o.a.createElement("div",null,o.a.createElement(po,{noChecklist:!0,noDelete:!0,showCard:!0,myDay:!0,db:"cards"}),o.a.createElement("div",{style:{clear:"both"}}))))),o.a.createElement(Ro,{xs:12,sm:12,md:6,lg:6,xl:6,style:{borderRight:"2px solid ".concat(Mt("menu"))},id:"view_dashboard_nextTasks"},o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"0 16px"}},o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",color:Mt("menu"),fontWeight:"bold",fontSize:"16px",marginBottom:"16px"}},Dt("$__nextTasks")),o.a.createElement("div",null,b)))),o.a.createElement(Bo,{style:{paddingBottom:33}},o.a.createElement(Ro,{xs:12,sm:12,md:12,lg:12,xl:12},o.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"}},o.a.createElement("div",{style:{position:"relative",height:40,marginBottom:15}},o.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:Mt("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"space-between",color:Mt("color"),padding:"0 15px"}},o.a.createElement("div",{style:{display:"flex"}},Dt("$__lastNews","*")),o.a.createElement(Ct,{title:Dt("$__save","*"),text:Dt("$__viewAllNews"),color:"white",icon:"feed",transparent:!0,onClick:function(){l.push("bright-and-connected#tab/allNews")},size:"25px"}))),o.a.createElement(ku,{max:6,horizontal:!0}))),o.a.createElement(Ro,{xs:12,sm:12,md:12,lg:12,xl:12},o.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"}},o.a.createElement("div",{style:{position:"relative",height:40,marginBottom:15}},o.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:Mt("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"space-between",color:Mt("color"),padding:"0 15px"}},o.a.createElement("div",{style:{display:"flex"}},Dt("$__lastAddRadar","*")),o.a.createElement(Ct,{title:Dt("$__save","*"),text:Dt("$__viewAllRadar"),color:"white",icon:"settings_input_antenna",transparent:!0,onClick:function(){l.push("bright-and-connected#tab/radar")},size:"25px"}))),o.a.createElement(pu,{max:6,horizontal:!0,noPagination:!0}))),o.a.createElement(Ro,{xs:12,sm:12,md:12,lg:12,xl:12},o.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"}},o.a.createElement("div",{style:{position:"relative",height:40,marginBottom:15}},o.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:Mt("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"space-between",color:Mt("color"),padding:"0 15px"}},o.a.createElement("div",{style:{display:"flex"}},Dt("$__lastAddInsights","*")),o.a.createElement(Ct,{title:Dt("$__save","*"),text:Dt("$__viewAllInsights"),color:"white",icon:uu.a,transparent:!0,onClick:function(){l.push("bright-and-connected#tab/insight-boards")},size:"25px"}))),o.a.createElement(du,{max:6,horizontal:!0,noPagination:!0})))))}))),dd=r(483),pd=r.n(dd);var fd=function(e){var t=be.getState(),r=t.db,n=t.session,a=(r.dataType,e.data),i=Fe()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),c=o.a.useState(null),l=Object(je.a)(c,2),s=l[0],u=l[1],d=Object.keys(be.getState().db.cards).filter((function(e){return be.getState().db.cards[e]})).map((function(e){return be.getState().db.cards[e]})).filter((function(e){return e._users&&!e.checklist&&!e.deleted&&e._users[a._id]&&e._users[a._id].myDay&&(!e.private||e.private&&e._users[n._id])&&Fe()(new Date(1e3*parseInt(e._users[a._id].myDay))).tz("America/Sao_Paulo").format("YYYY/MM/DD")===i})).sort((function(e,t){return be.getState().db.orderByTitle&&"ASC"===be.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()<t.name.toLowerCase().trim()||be.getState().db.orderByTitle&&"DESC"===be.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()>t.name.toLowerCase().trim()?-1:be.getState().db.orderByTitle?0:!be.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 o.a.createElement(ii,{db:"cards",key:t,data:e,showStatus:!0,onlyOption:!0})}));return o.a.createElement("div",{style:{width:"100%",minHeight:"120px",backgroundColor:"#FFFFFF",boxShadow:"0 0 9px 3px rgba(0,0,0,0.2)",position:"relative"}},o.a.createElement("div",{style:{backgroundColor:Mt("menu"),height:"43px",paddingLeft:"45px",fontSize:"12px",color:"#FFFFFF",fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"space-between"}},o.a.createElement("div",{style:{maxWidth:"calc(100% - 10px)",textOverflow:"ellipsis ",whiteSpace:"nowrap",overflow:"hidden"}},(a.name,a.name)," (",d.length,")")),!s||a.image&&a.image!==s?o.a.createElement("img",{style:{width:"37px",height:"37px",top:"3x",left:"3px",borderRadius:"50%",border:"solid 2px ".concat(Mt("color")),zIndex:"5 !important",position:"absolute",backgroundColor:"".concat(Mt("color"))},src:"".concat(a.image?a.image:pd.a),onError:function(e){e.target.src="".concat(pd.a)},onLoad:function(e){u("".concat(a.image?a.image:pd.a))},width:"100%"}):o.a.createElement("div",{style:{width:"37px",height:"37px",top:"3px",left:"3px",borderRadius:"50%",border:"solid 2px ".concat(Mt("color")),zIndex:"5 !important",position:"absolute",backgroundColor:"".concat(Mt("color")),backgroundImage:'url("'.concat(s,'")'),backgroundSize:"cover",backgroundPosition:"center center"}}),o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{width:"100%",maxHeight:"calc(50vh - 90px)",overflowX:"auto"}},d)))};function hd(){hd=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var md=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(od)((function(e){var t=be.getState().db,r=t.dataType,n=t.users,a=Fe()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),i=o.a.useState(!1),c=Object(je.a)(i,2),l=c[0],s=c[1],u=Ut();if(o.a.useEffect((function(){return l||(be.getState().session.cards.adminViewLoader||d(),s(!0)),function(){e.reduxFunction("ASYNC","SET_SESSION",Object(h.a)(Object(h.a)({},be.getState().session),{},{cards:Object(h.a)(Object(h.a)({},be.getState().session.cards),{},{adminView:!1})}))}}),[]),u&&u.plan&&!u.planAdmin&&!u.planModerate)return o.a.createElement(o.a.Fragment,null);var d=function(){var t=Object(Ee.a)(hd().mark((function t(r){return hd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.reduxFunction("ASYNC","SET_SESSION",Object(h.a)(Object(h.a)({},be.getState().session),{},{cards:Object(h.a)(Object(h.a)({},be.getState().session.cards),{},{adminView:!be.getState().session.cards.adminView})}));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),p=Object.keys(be.getState().db.cards).filter((function(e){return be.getState().db.cards[e]&&r.filter((function(t){return t.name===be.getState().db.cards[e].type})).length>0})).map((function(e){return be.getState().db.cards[e]})),f=Object.keys(n).filter((function(e){return!n[e].deleted&&"user"===n[e].type&&(!n[e]._parent||""===n[e]._parent)&&p.filter((function(t){return t._users&&t._users[e]&&t._users[e].myDay&&Fe()(new Date(1e3*parseInt(t._users[e].myDay))).tz("America/Sao_Paulo").format("YYYY/MM/DD")===a})).length>0})).sort((function(e,t){return n[e].name<n[t].name?-1:n[e].name>n[t].name?1:0})).map((function(e){return n[e]}));return o.a.createElement("div",{style:{width:"100%"}},o.a.createElement(Bo,null,o.a.createElement(Ro,{xs:12,sm:12,md:12,lg:12,xl:12,style:{display:"flex",justifyContent:"space-between"}},o.a.createElement("div",{style:{fontSize:"33px",padding:"15px 0",fontWeight:"bold",color:Mt("menu")}},Dt("$__dayTasks",1))),f.map((function(e){return o.a.createElement(Ro,{xs:12,sm:12,md:3,lg:3,xl:3,key:e._id,style:{marginBottom:"7px"}},o.a.createElement(fd,{data:e}))}))))})));var gd=Object(_e.b)((function(e){return{history:e.db.history}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(od)((function(e){var t=window.location.hash.split("/");return t[0]=t[0].replace("#",""),window.location.hash.split("/")[0].replace("#","")||l.push("d#tab/resume"),o.a.createElement("div",null,o.a.createElement(ad,null),"tab"===t[0]&&"resume"===t[1]&&o.a.createElement(ud,null),"tab"===t[0]&&"dayTasks"===t[1]&&o.a.createElement(md,null))}))),yd=function(){return{contentCenter:{position:"absolute",top:"50%",left:"50%",zIndex:"3",transform:"translate(-50%,-50%)",textAlign:"center",color:"#FFF",padding:"0 15px",width:"100%",maxWidth:"880px"},title:Object(h.a)(Object(h.a)({},gt),{},{fontSize:"13.7em",color:"#FFF",letterSpacing:"14px",fontWeight:"700"}),subTitle:{fontSize:"2.25rem",marginTop:"0",marginBottom:"8px"},description:{fontSize:"1.125rem",marginTop:"0",marginBottom:"8px"}}},vd=Object(De.a)(yd);function bd(){bd=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var xd=Object(_e.b)((function(e){return{showPrivate:e.controls.showPrivate,history:e.db.history}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState(),r=t.db,n=t.session,a=o.a.useState(!1),i=Object(je.a)(a,2),c=i[0],l=i[1],s=o.a.useState(null),u=Object(je.a)(s,2),d=u[0],p=u[1],f=o.a.useState([]),m=Object(je.a)(f,2),g=(m[0],m[1]),y=o.a.useState(0),v=Object(je.a)(y,2),b=v[0],x=v[1],_=o.a.useState(10),w=Object(je.a)(_,2),E=w[0],O=w[1],j=o.a.useState(!1),k=Object(je.a)(j,2),S=k[0],L=(k[1],o.a.useState(I)),C=Object(je.a)(L,2),I=C[0],F=(C[1],o.a.useState([])),T=Object(je.a)(F,2),N=T[0],P=T[1],A=o.a.useState(0),D=Object(je.a)(A,2),z=D[0],M=D[1],B=o.a.useState("created_at"),$=Object(je.a)(B,2),Y=$[0],R=$[1],G=o.a.useState(!0),H=Object(je.a)(G,2),W=H[0],U=H[1],V=o.a.useState(""),q=Object(je.a)(V,2),X=q[0],K=q[1],J=o.a.useState(!0),Z=Object(je.a)(J,2),Q=Z[0],ee=Z[1],te=o.a.useState({}),re=Object(je.a)(te,2),ne=re[0],ae=re[1],oe=o.a.useState(""),ie=Object(je.a)(oe,2),ce=ie[0],le=ie[1],se=o.a.useState({all:{name:Dt("$__all",1),icon:"inventory",open:!1,size:0,type:"all"},users:{name:Dt("$__users",1),open:!1,size:0,type:"user"},plans:{name:Dt("$__plans",1),open:!1,size:0,type:"plan"},myCards:{name:Dt("$__unlinkedCards",1),open:!1,size:0,type:"myTask"}}),ue=Object(je.a)(se,2),de=(ue[0],ue[1],window.location.hash.split("/"));de[0]=de[0].replace("#","");var pe=null;de[0]&&36===de[0].length&&be.getState().db.cards[de[0]]&&be.getState().db.cards[de[0]]._users&&be.getState().db.cards[de[0]]._users[n._id]&&(pe=de[0]),o.a.useEffect((function(){return he({id:pe}),fe({id:pe}),cl(),function(){P([]),ee(!0)}}),[]),o.a.useEffect((function(){he({id:d})}),[d]),o.a.useEffect((function(){x(0),ee(!0),g([]),c||l(!0);var e=setTimeout((function(){he({id:pe})}),1e3);return function(){return clearTimeout(e)}}),[X]),o.a.useEffect((function(){he({id:pe})}),[S,b,E,Y,W]);var fe=function(){var e=Object(Ee.a)(bd().mark((function e(t,r){var n,a;return bd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,cl({ids:t&&t.id?[t.id]:[],childrens:!1,type:t.type?t.type:null});case 2:(n=e.sent)&&(a=r||ne,n.map((function(e){a=Object(h.a)(Object(h.a)({},a),{},Object(Oe.a)({},e._id,Object(h.a)(Object(h.a)({},a[e._id]?a[e._id]:{}),e)))})),ae(a));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),he=function(){var e=Object(Ee.a)(bd().mark((function e(t){var r;return bd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ll({ids:t&&t.id?[t.id]:[],type:t&&t.type||"cards",limit:E,skip:b*E,asc:!W,orderBy:Y||"created_at",search:X});case 2:(r=e.sent)&&(M(r&&r[0]&&r[0].total?parseInt(r[0].total):0),P(r),ee(!1));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),me=[],ge=function(e){var t=Y,r=W;Y===e?r=!W:t=e,R(t),U(r)},ye=function(){var e=Object(Ee.a)(bd().mark((function e(t){var r,n,a,o,i,c,l=arguments;return bd().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=ne,c=Object(h.a)(Object(h.a)({},c),{},Object(Oe.a)({},a,Object(h.a)(Object(h.a)({},c[a]),{},{open:r,loading:!0}))),0===Object.keys(ne).filter((function(e){return ne[e].parent===a})).length?fe({id:a,type:i},c):ae(c);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ve=function(e,t){return o.a.createElement("div",{key:t,style:{cursor:"pointer",borderLeft:"solid 0.5px lightgray",paddingLeft:7},onClick:function(r){(!e.private||e.private&&be.getState().controls.showPrivate)&&(ye({id:t},!ne[t]||!ne[t].open),p(t)),r.preventDefault(),r.stopPropagation()}},o.a.createElement(qo,{title:"".concat(e.private&&!be.getState().controls.showPrivate?Dt("$__private"):e.name),tooltipText:"".concat(e.private&&!be.getState().controls.showPrivate?Dt("$__private"):e.name),icon:(e.private&&!be.getState().controls.showPrivate?"private_connectivity":e.type&&r&&r.dataType&&r.dataType.filter((function(t){return t.name===e.type}))[0].icon)||"$__topic",fontSize:"12px",color:e.private&&!be.getState().controls.showPrivate?"lightgray":Mt(d&&d===t?"color":"gray")}),ne[t]&&ne[t].open?xe(t):o.a.createElement(o.a.Fragment,null))},xe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return o.a.createElement("div",{style:{marginLeft:7}},Object.keys(ne).filter((function(t){return!e||e&&ne[t].parent===e})).length>0?Object.keys(ne).filter((function(t){return!e||e&&ne[t].parent===e})).sort((function(e,t){return ne[e].name.toLowerCase().trim()<ne[t].name.toLowerCase().trim()?-1:ne[e].name.toLowerCase().trim()>ne[t].name.toLowerCase().trim()?1:0})).map((function(e){return ve(ne[e],e)})):o.a.createElement(o.a.Fragment,null))};return o.a.createElement("div",{style:e.expanded?{width:"calc(100% - 220px)",marginLeft:"220px"}:{width:"calc(100% - 0px)",marginLeft:"0px"}},o.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"}},o.a.createElement(Qn,{label:Dt("$__search","*"),variant:"standard",autoFocus:!0,value:X,InputProps:{endAdornment:o.a.createElement(Fa.a,{position:"start"},o.a.createElement(wt,{color:Mt("color")},"search")),onChange:function(e){K(e.target.value)},onKeyDown:function(e){}}}),o.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center"}},o.a.createElement(Ct,{id:"sideModule_saveButton",title:Dt("created_at"===Y&&W?"$__mostRecent":"$__olderFirst",1),color:"created_at"===Y?Mt("color"):"gray",icon:"calendar_month",onClick:function(){ge("created_at")},size:"25px"}),"created_at"===Y&&o.a.createElement("div",{style:Object(h.a)(Object(h.a)({position:"absolute"},W?{bottom:0}:{top:0}),{},{right:-5})},o.a.createElement(wt,{size:"15px",color:Mt("menu"),style:{marginLeft:"-3px"}},W?"south":"north"))),o.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center"}},o.a.createElement(Ct,{id:"sideModule_saveButton",title:Dt("name"===Y&&W?"$__nameDesc":"$__nameAsc",1),color:"name"===Y?Mt("color"):"gray",icon:"sort_by_alpha",onClick:function(){ge("name")},size:"25px"}),"name"===Y&&o.a.createElement("div",{style:Object(h.a)(Object(h.a)({position:"absolute"},W?{bottom:0}:{top:0}),{},{right:-5})},o.a.createElement(wt,{size:"15px",color:Mt("menu"),style:{marginLeft:"-3px"}},W?"south":"north")))),o.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)"}},o.a.createElement("div",{style:{position:"absolute",width:333,height:"100%",minHeight:1,padding:15,backgroundColor:"#f4f4f4",borderRight:"solid 0.77px lightGray",display:"flow-root"}},o.a.createElement("div",{style:{display:"flex",marginTop:-10}},o.a.createElement(qo,{title:Dt("$__folders",1),icon:"folder",fontSize:"20px",color:Mt("menu")}),o.a.createElement(Qn,{label:Dt("$__search","*"),variant:"standard",autoFocus:!0,value:ce,InputProps:{endAdornment:o.a.createElement(Fa.a,{position:"start"},o.a.createElement(wt,{color:Mt("lightgray")},"search")),onChange:function(e){le(e.target.value)},onKeyDown:function(e){}}})),o.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(ne).filter((function(e){return((!de[0]||de[0]&&36!==de[0].length)&&!ne[e].parent||de&&de[0]&&36===de[0].length&&ne[e]&&ne[e].parent&&ne[e].parent===de[0])&&(""===ce||ce&&ne[e].name.toLowerCase().indexOf(ce.toLowerCase().trim())>-1)})).sort((function(e,t){return ne[e].name.toLowerCase().trim()<ne[t].name.toLowerCase().trim()?-1:ne[e].name.toLowerCase().trim()>ne[t].name.toLowerCase().trim()?1:0})).map((function(e){return ve(ne[e],e)})))),o.a.createElement("div",{style:{position:"relative",float:"left",marginLeft:333,width:"calc(100% - 333px)",overflowY:"auto"}},o.a.createElement("div",{style:{position:"relative",width:"100%",padding:"15px"}},o.a.createElement("div",{style:{position:"relative",float:"left",minWidth:177}},o.a.createElement(qo,{title:Dt("$__files",1),icon:"cloud",fontSize:"20px",color:Mt("menu")})),o.a.createElement("div",{style:{position:"relative",float:"right",display:"flex",alignItems:"center",marginTop:-10}},Dt("$__page")," ",b+1," ",Dt("$__of")," ",Math.ceil(z/E),o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},o.a.createElement(qs.a,{component:"div",count:z,page:b,onPageChange:function(e,t){x(t)},rowsPerPage:E,onRowsPerPageChange:function(e){O(parseInt(e.target.value,10))},labelRowsPerPage:Dt("$__filesPerPage")})))),Q?o.a.createElement(Ga,null):N&&N.length>0?N.map((function(t,r){me.push(t.data);var a=Object(h.a)(Object(h.a)({},t.data),{},{createdBy:t.createdBy,in:t.in});return o.a.createElement("div",{key:"file_".concat(a._id).concat(r),style:{position:"relative",width:"100%",paddingTop:"7px",paddingLeft:"15px",clear:"both"}},o.a.createElement(al,{data:a,openLightBox:function(){return function(t){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:me,file:t})}(a._id)},admin:!!(a.createdBy._id===n._id||a.in._id===n._id||a.access&&parseInt(a.access)>2)}),o.a.createElement("div",{style:{clear:"both"}}))})):o.a.createElement(o.a.Fragment,null),z>10?o.a.createElement("div",{style:{position:"relative",width:"100%",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Dt("$__page")," ",b+1," ",Dt("$__of")," ",Math.ceil(z/E),o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},o.a.createElement(qs.a,{component:"div",count:z,page:b,onPageChange:function(e,t){x(t)},rowsPerPage:E,onRowsPerPageChange:function(e){O(parseInt(e.target.value,10))},labelRowsPerPage:Dt("$__filesPerPage")}))):o.a.createElement(o.a.Fragment,null)),o.a.createElement("div",{style:{clear:"both"}})))})),_d=(r(1252),r(571)),wd=r.n(_d);function Ed(){Ed=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Od=Object(De.a)(Ns);var jd=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=o.a.useState({email:null,password:null}),r=Object(je.a)(t,2),n=r[0],a=r[1],i=o.a.useState(null),c=Object(je.a)(i,2),l=c[0],s=c[1],u=o.a.useState(!1),d=Object(je.a)(u,2),p=d[0],f=d[1],m=o.a.useState(null),g=Object(je.a)(m,2),y=g[0],v=g[1],b=o.a.useState(!1),x=Object(je.a)(b,2),_=x[0],w=x[1],E=Od(),O=function(){var t=Object(Ee.a)(Ed().mark((function t(){var r;return Ed().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("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(Dt("$__emailDomainNotPermitedForThisAddress",1))}),t.next=25;break;case 4:if(n.email){t.next=8;break}e.callback({fn:"alert",variant:"warning",horizontal:"center",message:"".concat(Dt("$__alertLoginEmptyEmail",1))}),t.next=25;break;case 8:if(n.password){t.next=12;break}e.callback({fn:"alert",variant:"warning",horizontal:"center",message:"".concat(Dt("$__alertLoginEmptyPassword",1))}),t.next=25;break;case 12:return w(!0),t.prev=13,t.next=16,Qr.post("/M_Login",{login:n.email,password:n.password});case 16:(r=t.sent)&&(r.data&&400===r.data.code?e.callback({fn:"alert",variant:"warning",horizontal:"center",message:"".concat(Dt("$__".concat(r.data.error),1))}):r&&r.data&&r.data.twoFactor?(v(r.data.token),f(!0)):r.data.token&&(localStorage.setItem("TOKEN",r.data.token),e.callback&&e.callback({fn:"login",token:r.data.token}))),t.next=24;break;case 20:t.prev=20,t.t0=t.catch(13),console.log(t.t0),e.callback({fn:"alert",variant:"warning",horizontal:"center",message:"".concat(Dt("$__alertServerConectionLogin",1))});case 24:setTimeout((function(){w(!1)}),1500);case 25:case"end":return t.stop()}}),t,null,[[13,20]])})));return function(){return t.apply(this,arguments)}}();console.log(window.location.origin);var j=function(){var t=Object(Ee.a)(Ed().mark((function t(){var r;return Ed().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(w(!0),l&&(!l||6===l.length)){t.next=5;break}$t({message:Dt("$__invalidToken",1),variant:"warning",persist:!1,horizontal:"right"}),t.next=10;break;case 5:return t.next=7,Qr.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})):$t({message:Dt("$__invalidToken",1),variant:"warning",persist:!1,horizontal:"right"}),s(null);case 10:setTimeout((function(){w(!1)}),1500);case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),k=function(){var t=Object(Ee.a)(Ed().mark((function t(r){var n;return Ed().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r){t.next=4;break}e.callback({fn:"alert",message:Dt("$__loginAlertRecoveryEmailEmpty")}),t.next=14;break;case 4:return t.prev=4,t.next=7,Qr.get("/M_User_RecoveryPass/?email=".concat(r));case 7:(n=t.sent)&&n.data?e.callback({fn:"alert",message:Dt("$__loginAlertRecoveryEmailSended")}):e.callback({fn:"alert",message:Dt("$__loginAlertRecoveryInvalidEmail")}),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),e.callback({fn:"alert",message:Dt("$__loginAlertRecoveryError")});case 14:case"end":return t.stop()}}),t,null,[[4,11]])})));return function(e){return t.apply(this,arguments)}}();return o.a.createElement("div",{className:E.container},o.a.createElement(Bo,{style:{display:"flex",justifyContent:"center"}},o.a.createElement(Ro,{xl:4,lg:4,md:4,sm:12,xs:12},o.a.createElement(Sl,{db:"cards",login:!0},o.a.createElement(Al,{className:"".concat(E.cardHeader," ").concat(E.textCenter),color:"primary",style:{background:"linear-gradient(60deg, rgba(67,18,102,1), rgba(114,47,162,1))",boxShadow:"0 4px 20px 0 rgba(15,18,35,0.14), 0 7px 10px -5px rgba(15,18,35,0.4)"}},o.a.createElement("h4",{className:E.cardTitle},Dt("$__login"))),o.a.createElement(Fl,null,p?o.a.createElement(o.a.Fragment,null,o.a.createElement("fieldset",null,o.a.createElement("legend",null,Dt("$__token",1)),o.a.createElement(Qn,{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:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(vt.a,{className:E.inputAdornmentIcon},"pin")),type:"number",autoComplete:!1},autoComplete:"new-password"}))):o.a.createElement(o.a.Fragment,null,o.a.createElement(Ls,{labelText:Dt("$__email"),id:"email",formControlProps:{fullWidth:!0},inputProps:{onChange:function(e){a(Object(h.a)(Object(h.a)({},n),{},{email:e.target.value}))},onLoad:function(e){a(Object(h.a)(Object(h.a)({},n),{},{email:e.target.value}))},endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wd.a,{className:E.inputAdornmentIcon}))}}),o.a.createElement(Ls,{labelText:Dt("$__password"),id:"password",formControlProps:{fullWidth:!0},inputProps:{onChange:function(e){a(Object(h.a)(Object(h.a)({},n),{},{password:e.target.value}))},onLoad:function(e){a(Object(h.a)(Object(h.a)({},n),{},{password:e.target.value}))},onKeyDown:function(e){13===e.keyCode&&O()},endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(vt.a,{className:E.inputAdornmentIcon},"lock_outline")),type:"password",autoComplete:"off"}}),o.a.createElement(Ir,{icon:"lock",text:Dt("$__recoveryPass","*"),reverse:!0,style:{float:"right"},onClick:function(){k(n.email)}}))),o.a.createElement(Ts,{className:E.justifyContentCenter},p?o.a.createElement(er,{style:{backgroundColor:_?"gray":"#c0b283",color:"#FFFFFF"},simple:!0,size:"lg",block:!0,onClick:function(){return j()}},Dt("$__validateTokenAndSigin"),_?o.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0}},o.a.createElement(Ga,null)):o.a.createElement(o.a.Fragment,null)):o.a.createElement(er,{style:{backgroundColor:_?"gray":"#c0b283",color:"#FFFFFF"},simple:!0,size:"lg",block:!0,onClick:function(){return O()}},Dt("$__sigin"),_?o.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0}},o.a.createElement(Ga,null)):o.a.createElement(o.a.Fragment,null)))))))})),kd=Object(De.a)(yd);var Sd=Object(De.a)(yd);var Ld={container:Object(h.a)(Object(h.a)({},qe),{},{position:"relative",border:"0.5px solid ".concat(Mt("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:Mt("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Mt("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:Mt("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 Cd,Id,Fd=Object(bt.a)(Ld)(Object(a.memo)((function(e){var t=e.data,r=be.getState().db,n=[],a=r.cards,i=function(e,t){if(!t.isDropAnimating)return Object(h.a)({},e);var r=t.dropAnimation,n=r.moveTo,a=(r.curve,r.duration,"translate(".concat(n.x,"px, ").concat(n.y,"px)"));return Object(h.a)(Object(h.a)({},e),{},{clear:"both",transition:"all 0.1s ease",transform:"".concat(a," ").concat(""),border:"solid 3px ".concat(Mt("color")),backgroundColor:Mt("color"),padding:"3px"})};return Object.keys(a).map((function(e){return a[e]._parent===t._id&&(n[a[e].type]=null==n[a[e].type]?1:n[a[e].type]+1),!1})),o.a.createElement(no.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 o.a.createElement("div",Object.assign({ref:t.innerRef},t.draggableProps,t.dragHandleProps,{style:i(t.draggableProps.style,r)}),o.a.createElement(ii,{data:e.data,db:e.db,showOrder:e.showOrder||!1,showSelected:e.showSelected||!1,locked:e.locked||!1,viewButton:e.viewButton||!1,showConnectedIn:!!e.showConnectedIn,isDragging:r.isDragging&&!r.isDropAnimating,snapshot:r,cardColorPicker:!!e.cardColorPicker}))}))}))),Td={container:{borderRadius:"2px",marginRight:"7px",marginLeft:"7px",marginBottom:"15px",height:"min-content",width:"100%"},title:Object(h.a)(Object(h.a)({},qe),{},{padding:"3px 0px",width:"100%",margin:"0px",background:Mt("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:Mt("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(Mt("light")),borderRadius:"2px",display:"block",backgroundColor:"#FFFFFF",boxShadow:"0px 0px 10px rgba(0,0,0,0.1)",overflow:"hidden",padding:"3px"}};function Nd(){Nd=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Pd,Ad=Ae.b.div(Cd||(Cd=Object(we.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 ")})),Dd=Ae.b.div(Id||(Id=Object(we.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(Mt("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 "})),zd=Object(_e.b)((function(e){return{store:{search:e.search}}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Td)((function(e){Fe()().tz("America/Sao_Paulo").format("YYYY/MM/DD");var t=be.getState(),r=t.search,n=t.session,a=t.db,i=e.classes,c=o.a.useState(""),l=Object(je.a)(c,2),s=l[0],u=l[1],d=o.a.useState(!1),p=Object(je.a)(d,2),f=p[0],m=p[1],g=window.location.hash.split("/");g[0]=g[0].replace("#",""),36!==g[0].length&&(g[0]=null);var y=e.cards;r&&r.cards&&(r.cards.startDate||r.cards.endDate)&&(y=y.filter((function(e){return!!(e&&r.cards.startDate&&e.startDate&&e.startDate>=r.cards.startDate&&r.cards.endDate&&e.endDate&&e.endDate<=r.cards.endDate)})).map((function(e){return e}))),r.text&&(y=y.filter((function(e){return!!(e&&e.name&&e.name.toLowerCase().indexOf(r.text.toLowerCase())>-1)})).map((function(e){return e}))),y=(y=y.filter((function(e){return!(e.status&&!(e&&e.status&&r.cards.status[e.status]))})).map((function(e){return e}))).filter((function(e){return!!(e&&e.priority&&r.cards.priority[e.priority]||r.cards.priority.null&&!e.priority)})).map((function(e){return e})),Object.keys(r.users.selected).length>0&&Object.keys(r.users.selected).map((function(e){r.users.selected[e]&&(y=y.filter((function(t){var n=!1;if("unassigned"===e)t&&t._users&&0===Object.keys(t._users).length&&(n=!0);else if(t&&t._users&&Object.keys(t._users).length>0)return Object.keys(t._users).map((function(e){r.users.selected[e]&&(n=!0)})),n})).map((function(e){return e})))})),Object.keys(r.units.selected).length>0&&(y=r.units.selected.unassigned?y.filter((function(e){if(!e._planId||e._planId&&a.cards[e._planId]&&!a.cards[e._planId].client)return!0})).map((function(e){return e})):y.filter((function(e){var t=!1;return Object.keys(a.cards).filter((function(e){if(a.cards[e].client&&r.units.selected[a.cards[e].client])return!0})).map((function(r){e._planId&&e._planId===a.cards[r]._id&&(t=!0)})),t})).map((function(e){return e}))),Object.keys(r.groups.selected).length>0&&(y=r.groups.selected.unassigned?y.filter((function(e){if(!e._planId||e._planId&&a.cards[e._planId]&&!a.cards[e._planId].client)return!0})).map((function(e){return e})):y.filter((function(e){var t=!1;return Object.keys(a.cards).filter((function(e){if(a.cards[e].client&&r.groups.selected[a.cards[e].client])return!0})).map((function(r){e._planId&&e._planId===a.cards[r]._id&&(t=!0)})),t})).map((function(e){return e}))),Object.keys(r.plans.selected).filter((function(e){return e})).length>0&&(y=y.filter((function(e){if(r.plans.selected[e._planId])return!0})).map((function(e){return e}))),r.tags.length>0&&(y=y.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return r.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e})));var v=String(n.dashboard.period).replace("$__last","");v=v.replace("Days","");var b=Fe()(new Date).tz("America/Sao_Paulo").subtract(parseInt(v),"d").format("YYYY-MM-DDT00:00"),x=Fe()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59");e&&e.periodFilter&&(y=y.filter((function(e){if("completed"===e.status&&e.completed_at&&(e.completed_at.low&&Fe()(new Date(1e3*e.completed_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=x&&Fe()(new Date(1e3*e.completed_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=b||e.completed_at&&!e.completed_at.low&&Fe()(new Date(1e3*e.completed_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=x&&Fe()(new Date(1e3*e.completed_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=b)||"completed"!==e.status&&e.updated_at&&(e.updated_at.low&&Fe()(new Date(1e3*e.updated_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=x&&Fe()(new Date(1e3*e.updated_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=b||e.updated_at&&!e.updated_at.low&&Fe()(new Date(1e3*e.updated_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=x&&Fe()(new Date(1e3*e.updated_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=b))return!0})).map((function(e){return e}))),e.showDeleted||be.getState().controls.deleted||(y=y.filter((function(e){return!e.deleted})).map((function(e){return e})));var _=i.cardList+" "+Ce()(Object(Oe.a)({},i.mainPanelWithPerfectScrollbar,navigator.platform.indexOf("Win")>-1)),w=function(){var t=Object(Ee.a)(Nd().mark((function t(){var r;return Nd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(r=be.getState().functions.socket).emit("data",{module:"cards",method:"post",action:"add"},{_parent:e.selectedParent?e.selectedParent:g[0]?g[0]:null,_planId:g[0]&&36===g[0].length?g[0]:null,name:s,type:e.typeAdd?e.typeAdd:e.columnId.length<36?e.columnId:null,status:"notStarted"},function(){var t=Object(Ee.a)(Nd().mark((function t(a){return Nd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.emit("card.UPD",{cardId:a.id,cardData:Object(h.a)(Object(h.a)({name:s,type:e.columnId,order:a.order,_planId:g[0]&&36===g[0].length?g[0]:null},a.data),{},{_parent:e.selectedParent?e.selectedParent:g[0]?g[0]:null,_timeline:Object(Oe.a)({},a.log._id,Object(h.a)(Object(h.a)({},a.log),{},{_parent:[a.id]})),_users:Object(Oe.a)({},n._id,{name:be.getState().db.users[n._id].name?be.getState().db.users[n._id].name:null,displayName:be.getState().db.users[n._id].displayName?be.getState().db.users[n._id].displayName:null,image:be.getState().db.users[n._id].image?be.getState().db.users[n._id].image:null,access:5,_id:n._id})})});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),u("");case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return o.a.createElement(no.b,{draggableId:e.columnId?String(e.columnId):"NOT_ID_SENDED",index:e.index},(function(t){return o.a.createElement(Ad,Object.assign({},!e.isDropDisabled&&t.draggableProps,e,{ref:t.innerRef}),o.a.createElement("div",Object.assign({},t.draggableProps,t.dragHandleProps,{style:{display:"none"}})),o.a.createElement("div",!e.isDropDisabled&&t.dragHandleProps,o.a.createElement(qo,{title:Dt(e.column.name,1),icon:e.column.icon||"topic",color:Mt("menu"),style:{padding:"7px"},customButtons:[e.columnsSettings&&{name:"settings",icon:"more_horiz",color:Mt("color"),onClick:function(){return console.log("s")},show:"hover"}],periodFilter:!(!e||!e.periodFilter)})),o.a.createElement(no.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 o.a.createElement(Dd,Object.assign({className:_,ref:t.innerRef},t.droppableProps,{isDraggingOver:r.isDraggingOver,inLine:e.inLine},e),y.sort((function(t,r){if("completed"===e.columnId){var n=t.completed_at&&t.completed_at.low?parseInt(t.completed_at.low):"string"===typeof t.completed_at?t.completed_at:0,a=r.completed_at&&r.completed_at.low?parseInt(r.completed_at.low):"string"===typeof r.completed_at?r.completed_at:0;return n>a?-1:n<a?1:0}return function(e,t){return be.getState().db.orderByTitle&&"ASC"===be.getState().db.orderByTitlePosition?Gt(e.name.toLowerCase().trim())<Gt(t.name.toLowerCase().trim())?-1:Gt(e.name.toLowerCase().trim())>Gt(t.name.toLowerCase().trim())?1:0:be.getState().db.orderByTitle&&"DESC"===be.getState().db.orderByTitlePosition?Gt(e.name.toLowerCase().trim())<Gt(t.name.toLowerCase().trim())?1:Gt(e.name.toLowerCase().trim())>Gt(t.name.toLowerCase().trim())?-1:0:be.getState().db.orderByTitle?0:!be.getState().db.orderByTitle&&e.order&&t.order&&e.order.low&&t.order.low&&String(e.order)&&String(t.order)&&String(e.order.low)&&String(t.order.low)&&parseInt(e.order.low)<parseInt(t.order.low)?-1:!be.getState().db.orderByTitle&&e.order&&t.order&&String(e.order)&&String(t.order)&&e.order.low&&t.order.low&&String(e.order.low)&&String(t.order.low)&&parseInt(e.order.low)>parseInt(t.order.low)?1:0}(t,r)})).map((function(t,r){if(t)return o.a.createElement("div",{key:t._id||t.id?t._id:null},o.a.createElement(Fd,{data:t,inLine:e.inLine,isDragDisable:e.column.isDragDisable,db:e.db,showOrder:e.showOrder||!1,showSelected:e.showSelected||!1,locked:e.locked||!1,inLineAdd:e.inLineAdd||!1,viewButton:e.viewButton||!1,cardColorPicker:!!e.cardColorPicker}))})),e.inLineAdd&&!f&&o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px"}},o.a.createElement(Ir,{text:Dt("$__add","*"),icon:"add_box",iconColor:Mt("medium"),onClick:function(){m(!f)}})),e.inLineAdd&&f&&o.a.createElement("div",{className:i.cardAdd,style:{position:"relative",float:"left",width:"100%",padding:"7px",display:"flex",alignItems:"center"}},o.a.createElement("div",{style:{width:"calc(100% - 50px)",display:"flex"}},o.a.createElement(Qn,{label:Dt("$__nameOfCard"),variant:Mt("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){u(e.target.value)},onBlur:function(e){""===e.target.value&&m(!f)},onKeyDown:function(e){13===e.keyCode&&s&&w(),27===e.keyCode&&(m(!f),u(""))}},autoFocus:!0,value:s,placeholder:Dt("$__titleOfCard_placeholder")})),o.a.createElement("div",{style:{display:"flex"}},o.a.createElement("div",{className:i.button,onClick:function(){return w()}},o.a.createElement(wt,{color:"green",icon:"save",title:Dt("$__save","*"),size:e.actionsSize||"25px"})),o.a.createElement("div",{className:i.button,onClick:function(){m(!f),u("")}},o.a.createElement(wt,{color:Mt("medium"),icon:"cancel",title:Dt("$__cancel","*"),size:e.actionsSize||"25px"})))),t.placeholder,o.a.createElement("div",{style:{clear:"both"}}))})))}))})));function Md(){Md=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Bd=Ae.b.div(Pd||(Pd=Object(we.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 ".concat(e.style):" display: flex;\n width: 100%;\n ".concat(e.style,"\n @media(min-width: 960px) {\n display: flex;\n }\n ")})),$d=Object(_e.b)((function(e){return{store:{cards:e.db.cards}}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState().db,r=function(){var r=Object(Ee.a)(Md().mark((function r(n){var a,o,i,c,l,s,u,d,p,f,m,g;return Md().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=be.getState().functions.socket,o=n.destination,i=n.source,c=n.draggableId,l=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(s=i.droppableId,u=o.droppableId,d=Array.from(e.cards.filter((function(e){return e.status===s})).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}))),s!==u||be.getState().db.orderByTitle){r.next=21;break}return(p=Array.from(e.cards.filter((function(e){return e.status===s})).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),p.splice(o.index,0,c),p.map((function(e,t){l[e]=Object(h.a)(Object(h.a)({},l[e]),{},{order:{low:t}})})),f=Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},t.cards),l)}),e.reduxFunction("ASYNC","SET_DB",Object(h.a)({},f)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:c,source:i.droppableId,destination:o.droppableId,destinationCards:p,sourceCards:[],columnName:"status"}),r.abrupt("return");case 21:d.splice(i.index,1),(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(o.index,0,c),d.map((function(e,r){t.cards[e].order&&t.cards[e].order.low?t.cards[e].order.low=parseInt(r):t.cards[e]=Object(h.a)(Object(h.a)({},t.cards[e]),{},Object(Oe.a)({},"order",Object(Oe.a)({},"low",parseInt(r))))})),m.map((function(e,r){t.cards[e].order&&t.cards[e].order.low?t.cards[e].order.low=parseInt(r):t.cards[e]=Object(h.a)(Object(h.a)({},t.cards[e]),{},Object(Oe.a)({},"order",Object(Oe.a)({},"low",parseInt(r))))})),g=Object(h.a)(Object(h.a)({},t),{},{cards:Object(h.a)(Object(h.a)({},t.cards),{},Object(Oe.a)({},c,Object(h.a)(Object(h.a)({},t.cards[c]),{},{status:u,completed_at:"completed"===u?{low:Fe()().tz("America/Sao_Paulo").unix("x")}:null,updated_at:{low:Fe()().tz("America/Sao_Paulo").unix("x")},order:{low:o.index}})))}),e.reduxFunction("ASYNC","SET_DB",Object(h.a)({},g)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:c,source:i.droppableId,destination:o.droppableId,destinationCards:m,columnName:"status",sourceCards:d});case 29:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),n=function(){var e=Object(Ee.a)(Md().mark((function e(t){return Md().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)}}(),a=function(){var e=Object(Ee.a)(Md().mark((function e(t){return Md().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 o.a.createElement(no.a,{onDragEnd:r,onDragStart:n,onDragUpdate:a},o.a.createElement(no.c,{droppableId:"ALL-COLUMNS-STATUS",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal"),isDropDisabled:!0},(function(t){return o.a.createElement(Bd,Object.assign({},e,{ref:t.innerRef}),be.getState().db.status.map((function(t,r){var n={name:t.label,icon:t.icon,cards:[],emptyHide:!1};return o.a.createElement(zd,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(h.a)(Object(h.a)({},e),{},{id:e._id})})),index:r,columnsSettings:!1,locked:!1,columnStyle:{flex:r,width:"25%"},viewButton:e.viewButton||!1,periodFilter:!(!t.props||!t.props.periodFilter)}))})),t.placeholder,o.a.createElement("div",{style:{clear:"both"}}))})))}));var Yd=Object(_e.b)((function(e){return{history:e.db.history,cards:e.db.cards}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState(),r=t.db,n=t.session,a=t.search,i=r.dataType,c=o.a.useState(!1),s=Object(je.a)(c,2),u=s[0],d=s[1],p=Fe()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),f=(Fe()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),Ut(),window.location.hash.split("/"));if(f[0]=f[0].replace("#",""),o.a.useEffect((function(){u||d(!0)}),[r.cards,a,r.users]),window.location.hash.split("/")[0].replace("#","")||l.push("t#tab/myTasks"),!r.cards)return null;var m=Object.keys(e.cards).filter((function(t){return e.cards[t]&&"chatGroup"!==e.cards[t].type&&"plan"!==e.cards[t].type&&"link"!==e.cards[t].type&&"insight"!==e.cards[t].type&&i.filter((function(r){return r.name===e.cards[t].type})).length>0&&!e.cards[t].checklist&&!e.cards[t].deleted})).map((function(t){return e.cards[t]}));return m=be.getState().session.cards.adminView?m.filter((function(e){if(!e.private||e.private&&e._users&&Object.keys(e._users).filter((function(e){return e===n._id})).length>0)return!0})):m.filter((function(e){if(e._users&&Object.keys(e._users).filter((function(e){return e===n._id})).length>0)return!0})),f[1]&&"allTasks"===f[1]&&(m=m.filter((function(e){return i.filter((function(t){return t.name===e.type}))[0].myTasks&&"objective"!==e.type&&"goal"!==e.type&&"plan"!==e.type&&-1===e.type.indexOf("guideline")})),"allTasks"),f[1]&&"myTasks"===f[1]&&(m=m.filter((function(e){return i.filter((function(t){return t.name===e.type}))[0].myTasks&&"objective"!==e.type&&"goal"!==e.type&&"plan"!==e.type&&-1===e.type.indexOf("guideline")&&e._users&&Object.keys(e._users).filter((function(t){return t===n._id&&e._users[t].isResponsible})).length>0})),"myTasks"),"tab"===f[0]&&"planningCards"===f[1]&&(m=m.filter((function(e){return i.filter((function(t){return t.name===e.type}))[0].myTasks&&"objective"!==e.type&&"goal"!==e.type&&"plan"!==e.type&&-1===e.type.indexOf("guideline")&&e._planId})),"planningCards"),"tab"===f[0]&&"guidelines"===f[1]&&(m=m.filter((function(e){if(e.type.indexOf("guideline")>-1)return!0})),"guidelines"),"tab"===f[0]&&"unreaded"===f[1]&&(m=m.filter((function(e){if(Gn(e._id).total>0)return!0})),"unreaded"),"tab"===f[0]&&"objectives"===f[1]&&(m=m.filter((function(e){return"objective"===e.type})),"objectives"),"tab"===f[0]&&"goals"===f[1]&&(m=m.filter((function(e){return"goal"===e.type})),"goals"),"tab"===f[0]&&"myDay"===f[1]&&(m=m.filter((function(e){return e._users&&e._users[n._id]&&e._users[n._id].myDay&&Fe()(new Date(1e3*e._users[n._id].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===p})).map((function(e){return e})),"myDay"),"tab"===f[0]&&"ourDay"===f[1]&&(m=m.filter((function(e){return!(!e||!e._users)&&Object.keys(e._users).filter((function(t){return t&&e._users[t]&&e._users[t].myDay&&Fe()(new Date(1e3*e._users[t].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===p})).length>0})).map((function(e){return e})),"ourDay"),"tab"===f[0]&&"private"===f[1]&&(m=m.filter((function(e){return e.private})).map((function(e){return e})),"nextTasks"),"tab"===f[0]&&"nextTasks"===f[1]&&(m=m.filter((function(e){return e.startDate&&Fe()(new Date(1e3*e.startDate)).tz("America/Sao_Paulo").format()>=Fe()(new Date(p)).tz("America/Sao_Paulo").format()})).map((function(e){return e})),"nextTasks"),"tab"===f[0]&&"lateTasks"===f[1]&&(m=m.filter((function(e){return e.endDate&&Fe()(new Date(1e3*e.endDate)).tz("America/Sao_Paulo").format()<=Fe()(new Date(p)).tz("America/Sao_Paulo").format()&&"completed"!==e.status})).map((function(e){return e})),"lateTasks"),"tab"===f[0]&&"unlinkedCards"===f[1]&&(m=m.filter((function(e){return!e.parent&&!e._parent})).map((function(e){return e})),"lateTasks"),o.a.createElement("div",{style:e.expanded?{width:"calc(100% - 220px)",marginLeft:"220px"}:{width:"calc(100% - 0px)",marginLeft:"0px"}},o.a.createElement(ad,null),o.a.createElement("div",{style:{position:"relative",width:"100%",marginTop:"7px"}},o.a.createElement(cu,null)),o.a.createElement("div",{style:{position:"relative",width:"100%"}},o.a.createElement(qo,{title:null,icon:null,color:Mt("menu"),style:{background:"transparent",padding:"7px"},customButtons:[{title:r.orderByTitle?"$__orderByName":"$__orderByManualOrder",icon:r.orderByTitle?"sort":"format_list_numbered",color:Mt("menu"),onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{orderByTitle:!r.orderByTitle}))}},r.orderByTitle&&{title:"ASC"===r.orderByTitlePosition?"$__asc":"$__desc",icon:"ASC"===r.orderByTitlePosition?"text_rotation_down":"text_rotate_up",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{orderByTitlePosition:"ASC"===r.orderByTitlePosition?"DESC":"ASC"}))}}]})),o.a.createElement("div",{style:{position:"relative",minHeight:"calc(100vh - 150px)",marginTop:"7px",width:"100%",overflowX:"auto",overflowY:"hidden"}},o.a.createElement($d,{cards:m,inLine:r.viewList,showConnectedIn:!0}),o.a.createElement("div",{style:{clear:"both"}})))}));function Rd(){Rd=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Gd=Object(_e.b)((function(e){return{store:{languages:e.languages}}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Xs)((function(e){var t=o.a.useState([]),r=Object(je.a)(t,2);r[0],r[1],o.a.useEffect((function(){n()}),[]);var n=function(){var e=Object(Ee.a)(Rd().mark((function e(){var t;return Rd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qr.post("/Admin_ReqAccounts");case 2:t=e.sent,console.log(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return o.a.createElement("div",{style:{width:"100%"}},"Resume")})));function Hd(){Hd=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Wd=Object(_e.b)((function(e){return{store:{languages:e.languages}}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Xs)((function(e){var t=e.classes,r=o.a.useState({}),n=Object(je.a)(r,2),a=n[0],i=n[1],c=be.getState().functions.socket,l=o.a.useState(!1),s=Object(je.a)(l,2),u=s[0],d=s[1],p=o.a.useState(0),f=Object(je.a)(p,2),h=f[0],m=f[1],g=o.a.useState(25),y=Object(je.a)(g,2),v=y[0],b=y[1],x=o.a.useState(""),_=Object(je.a)(x,2),w=_[0],E=_[1];o.a.useEffect((function(){i(be.getState().languages)}),[JSON.stringify(be.getState().languages)]);var O=function(){var e=Object(Ee.a)(Hd().mark((function e(t,r,n,a){return Hd().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 o.a.createElement("div",{style:{width:"100%"}},o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Dt("$__page")," ",h+1," ",Dt("$__of")," ",Math.ceil(Object.keys(a).length/v),o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},o.a.createElement(qs.a,{component:"div",count:Object.keys(a).length,page:h,onChangePage:function(e,t){m(t)},rowsPerPage:v,onChangeRowsPerPage:function(e){b(parseInt(e.target.value,10))},labelRowsPerPage:Dt("$__aliasPerPage")}))),o.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center"}},o.a.createElement(Qn,{label:Dt("$__search",1),variant:Mt("fieldVariant"),value:w,onChange:function(e){E(e.target.value)}}),o.a.createElement(Ir,{text:Dt(u?"$__all":"$__onlyEmpty","*"),icon:u?"subtitles_off":"subtitles",iconColor:Mt("medium"),onClick:function(){d(!u)}})),o.a.createElement(Yr.a,{className:t.root},o.a.createElement("div",{className:t.header},o.a.createElement("div",{className:t.column},Dt("$__alias",1)),o.a.createElement("div",{className:t.column},Dt("$__translation",1))),o.a.createElement("div",{className:t.body},o.a.createElement("ul",null,a&&Object.keys(a)&&Object.keys(a).length>0&&Object.keys(a).filter((function(e){if((!w||w&&(e.indexOf(w)>-1||a[e]&&a[e].locales&&a[e].locales.filter((function(e){return e.name.toLowerCase().indexOf(w.toLowerCase())>-1})).length>0))&&(u&&a[e]&&(!a[e].locales||a[e].locales&&(0===!a[e].locales.filter((function(e){return"pt-BR"===e.locale})).length||a[e].locales.filter((function(e){return"pt-BR"===e.locale})).length>0&&!a[e].locales.filter((function(e){return"pt-BR"===e.locale}))[0].name||0===a[e].locales.filter((function(e){return"en-US"===e.locale})).length||a[e].locales.filter((function(e){return"en-US"===e.locale})).length>0&&!a[e].locales.filter((function(e){return"en-US"===e.locale}))[0].name||0===a[e].locales.filter((function(e){return"es-ES"===e.locale})).length||a[e].locales.filter((function(e){return"es-ES"===e.locale})).length>0&&!a[e].locales.filter((function(e){return"es-ES"===e.locale}))[0].name))||!u))return!0})).sort((function(e,t){return e<t?-1:e>t?1:0})).map((function(e,r){if(r<=(h+1)*v&&r>=h*v)return o.a.createElement("li",{key:e.trim()},o.a.createElement("div",{className:t.column},e),o.a.createElement("div",{className:t.column2},o.a.createElement("fieldset",{style:{marginBottom:15}},o.a.createElement("legend",null,"Portugu\xeas - Brasil"),o.a.createElement("div",{style:{position:"relative"}},o.a.createElement(qo,{key:"".concat(e,"_pt-BR"),title:a[e].locales&&a[e].locales.length>0&&a[e].locales.filter((function(e){return"pt-BR"===e.locale})).length>0&&a[e].locales.filter((function(e){return"pt-BR"===e.locale}))[0].name,_id:a[e].locales&&a[e].locales.length>0&&a[e].locales.filter((function(e){return"pt-BR"===e.locale})).length>0&&a[e].locales.filter((function(e){return"pt-BR"===e.locale}))[0]._id,editable:!0,onEdit:function(t,r){O(r,e,"pt-BR",t)},color:Mt("menu"),noAutoFocus:!0,multiline:!0,noCancel:!0}))),o.a.createElement("fieldset",{style:{marginBottom:15}},o.a.createElement("legend",null,"Ingl\xeas - Internacional"),o.a.createElement(qo,{key:"".concat(e,"_en-US"),editable:!0,title:a[e].locales&&a[e].locales.length>0&&a[e].locales.filter((function(e){return"en-US"===e.locale})).length>0&&a[e].locales.filter((function(e){return"en-US"===e.locale}))[0].name,_id:a[e].locales&&a[e].locales.length>0&&a[e].locales.filter((function(e){return"en-US"===e.locale})).length>0&&a[e].locales.filter((function(e){return"en-US"===e.locale}))[0]._id,onEdit:function(t,r){O(r,e,"en-US",t)},color:Mt("menu"),noAutoFocus:!0,multiline:!0,noCancel:!0})),o.a.createElement("fieldset",{style:{marginBottom:15}},o.a.createElement("legend",null,"Espanhol"),o.a.createElement(qo,{key:"".concat(e,"_es-ES"),editable:!0,title:a[e].locales&&a[e].locales.length>0&&a[e].locales.filter((function(e){return"es-ES"===e.locale})).length>0&&a[e].locales.filter((function(e){return"es-ES"===e.locale}))[0].name,_id:a[e].locales&&a[e].locales.length>0&&a[e].locales.filter((function(e){return"es-ES"===e.locale})).length>0&&a[e].locales.filter((function(e){return"es-ES"===e.locale}))[0]._id,onEdit:function(t,r){O(r,e,"es-ES",t)},color:Mt("menu"),noAutoFocus:!0,multiline:!0,noCancel:!0}))))}))))))})));var Ud=Object(_e.b)((function(e){return{history:e.db.history}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(od)((function(e){var t=be.getState().session,r=window.location.hash.split("/");r[0]=r[0].replace("#","");var n=o.a.useState(null),a=Object(je.a)(n,2),i=a[0],c=a[1],l=o.a.useState(null),s=Object(je.a)(l,2),u=s[0],d=s[1];return t._access.master?(window.location.hash.split("/")[0].replace("#",""),o.a.createElement("div",null,!r[0]&&o.a.createElement(Gd,null),"tab"===r[0]&&"languages"===r[1]&&o.a.createElement(Wd,null),"tab"===r[0]&&"tests"===r[1]&&o.a.createElement("div",{style:{width:"300px"}},o.a.createElement(Pc,{type:"datetime",onChangeStartDate:function(e){console.log(Fe()(e).format("YYYY-MM-DD 23:59:59").unix("X")),c(Fe()(e).unix("X"))},onChangeEndDate:function(e){d(Fe()(e).unix("X"))},range:!0,startDate:i?new Date(1e3*i):null,endDate:u?new Date(1e3*u):null,onClear:function(){c(null),d(null)}})))):o.a.createElement("div",null,"ACCESS DENIED")}))),Vd={badge:{borderRadius:"12px",padding:"5px 12px",textTransform:"uppercase",fontSize:"10px",fontWeight:"700",lineHeight:"1",color:"#FFF",textAlign:"center",verticalAlign:"baseline",display:"inline-block"},primary:{backgroundColor:Xe[0]},warning:{backgroundColor:Ke[0]},danger:{backgroundColor:Je[0]},success:{backgroundColor:Ze[0]},info:{backgroundColor:Qe[0]},rose:{backgroundColor:et[0]},gray:{backgroundColor:tt[0]}};Object(De.a)(Vd);var qd=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",overflowX:"auto",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:"#FFF",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:"#FFF",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:Mt("color"),boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He("#000")+", 0.4)"},info:{backgroundColor:Qe[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Qe[0])+", 0.4)"},success:{backgroundColor:Ze[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Ze[0])+", 0.4)"},danger:{backgroundColor:Je[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Je[0])+", 0.4)"},warning:{backgroundColor:Ke[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Ke[0])+", 0.4)"},primary:{backgroundColor:Xe[0],boxShadow:"0 4px 20px 0px rgba("+He("#000")+", 0.14), 0 7px 10px -5px rgba("+He(Xe[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("+He("#000")+", 0.14)",borderRadius:"6px",color:"rgba("+He("#000")+", 0.87)",background:Mt("timelineMyMessage")},timelinePanelInverted:{maxWidth:"calc(100% - 70px)",float:"left",padding:"7px",marginLeft:"40px",marginBottom:"5px",position:"relative",boxShadow:"0 1px 4px 0 rgba("+He("#000")+", 0.14)",borderRadius:"6px",color:"rgba("+He("#000")+", 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:Mt("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:Mt("color")},progressBar:{backgroundColor:"".concat(Mt("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(Mt("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Mt("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 Xd(){Xd=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Kd=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(qd)((function(e){var t=e.classes,r=be.getState(),n=r.db,a=r.session,i=r.functions,c=(r.chat,r.timeline),l=i.socket,s=o.a.useState(e.stories||{}),u=Object(je.a)(s,2),d=u[0],p=u[1],f=[];o.a.useEffect((function(){m()}),[e.stories,e.nodeId,JSON.stringify(c)]);var m=function(){var t={};c[a._id]&&Object.keys(c[a._id]).filter((function(t){return c[a._id][t]&&c[a._id][t].user&&c[a._id][t].user._id&&c[a._id][t].user._id===e.nodeId})).map((function(e){t=Object(h.a)(Object(h.a)({},t),{},Object(Oe.a)({},e,c[a._id][e]))})),c[e.nodeId]&&Object.keys(c[e.nodeId]).map((function(r){t=Object(h.a)(Object(h.a)({},t),{},Object(Oe.a)({},r,c[e.nodeId][r]))})),p(t)},g=function(t){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:f,file:t})},y=function(){var t=Object(Ee.a)(Xd().mark((function t(){return Xd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:l.emit("data",{module:"chat",method:"put",action:"read"},{readedBy:a._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 o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginBottom:"15px"}},o.a.createElement("ul",{className:t.timelineSimple,id:"tms_".concat(e.nodeId),style:{zIndex:1}},d&&Object.keys(d).length>0&&Object.keys(d).sort((function(e,t){return parseInt(d[e].created_at)<parseInt(d[t].created_at)?-1:parseInt(d[e].created_at)>parseInt(d[t].created_at)?1:0})).map((function(r,n){var i=d[r];return!e.showUnReaded&&n>Object.keys(d).length-4?(i.files&&Object.keys(i.files).length>0&&Object.keys(i.files).map((function(e,t){var r=i.files[e];f.push(r)})),o.a.createElement("li",{className:t.item,key:r,style:{}},o.a.createElement(Ii,{openLightBox:function(e){g(e)},storie:i,reply:i.reply?d[i.reply]:null,hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId}))):e.showUnReaded&&i&&i.user&&i.user._id!==a._id&&(!i.readedBy||i.readedBy&&!i.readedBy[a._id])?(i.files&&Object.keys(i.files).length>0&&Object.keys(i.files).map((function(e,t){var r=i.files[e];f.push(r)})),o.a.createElement("li",{className:t.item,key:r,style:{}},o.a.createElement(Ii,{openLightBox:function(e){g(e)},storie:i,reply:i.reply?d[i.reply]:null,hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId}))):void 0})),o.a.createElement("div",{style:{marginBottom:"15px",clear:"both"}})),o.a.createElement(Ho,{nodeId:e.nodeId,onSending:function(){y()}}))})));function Jd(){Jd=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Zd=Object(De.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 Qd=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=o.a.useState(!1),r=Object(je.a)(t,2),n=r[0],a=r[1],i=be.getState(),c=i.db,l=i.chat,s=i.timeline,u=e.data,d=Zd();o.a.useEffect((function(){n||a(!0)}));var p="cards";u.nodeId&&be.getState().db.users[u.nodeId]&&(p="users");var f=function(){var t=Object(Ee.a)(Jd().mark((function t(r,n){return Jd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:be.getState().db[n][r]._loadTimeline?e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},l),{},{open:!0,db:n,nodeId:r,loading:!1})):(Ka(Object(h.a)(Object(h.a)({},e),{},{fnIdentification:"Notifications/Index/openChat()"}),{id:[r],db:n}),e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},l),{},{open:!0,db:n,nodeId:r,loading:!0}))),e.openChat(r,n);case 2:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();if("timeline"===u.module&&(!u.inNode||!u.inNode.type||!be.getState().db||!be.getState().db[p]))return o.a.createElement(o.a.Fragment,null);if(!u.byUser||u.byUser&&!c.users[u.byUser]||u.inNode&&u.inNode.type&&u.inNode._id&&!be.getState().db[p][u.inNode._id])return o.a.createElement(o.a.Fragment,null);var m=function(){var e="";return e=Fe()().tz("America/Sao_Paulo").format("DD/MM/YYYY")===Fe()(1e3*u.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(Dt("$__today",1)," ").concat(Fe()(1e3*u.created_at).tz("America/Sao_Paulo").format("HH:MM")):Fe()().tz("America/Sao_Paulo").format("YYYY")===Fe()(1e3*u.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(Fe()(1e3*u.created_at).tz("America/Sao_Paulo").format("DD/MM HH:MM")):"".concat(Fe()(1e3*u.created_at).tz("America/Sao_Paulo").format("YYYY/DD/MM HH:MM")),o.a.createElement("div",{style:{position:"relative"}},o.a.createElement("div",{style:{position:"relative",alignItems:"center",display:"flex",textSize:"10px",width:"100%",color:Mt("medium"),justifyContent:"space-between"}},o.a.createElement(rl,{alt:c.users[u.byUser].name,src:c.users[u.byUser].image||null,size:"sm"},c.users[u.byUser].name.substr(0,1)),o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Dt(u.description)," - ",e,u.readed&&o.a.createElement(wt,{icon:"done_all",color:Mt("medium"),title:"$__readed"}))))};return o.a.createElement("div",{className:u.readed?d.Readed:d.unReaded},o.a.createElement("div",{style:{textAlign:"center",width:"100%",padding:"7px",maxWidth:"100%"}}),"timeline"===u.module&&!e.showTimeline&&u.inNode&&u.inNode.type&&u.inNode._id&&be.getState().db[p]&&be.getState().db[p][u.inNode._id]&&s[u.inNode._id]&&s[u.inNode._id][u.nodeId]&&o.a.createElement("div",{style:{display:"flex",cursor:"pointer"},onClick:function(){var t;"User"===u.inNode.type&&(u&&u.inNode&&u.inNode._id&&be.getState().db&&be.getState().db.users&&be.getState().db.users[u.inNode._id]&&s[u.inNode._id]&&Object.keys(s[u.inNode._id]).length>0&&s[u.inNode._id][u.nodeId]&&(t=s[u.inNode._id][u.nodeId].user._id),f(t,"users"));"Card"===u.inNode.type&&("chatGroup"!==be.getState().db.cards[u.inNode._id].type?e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},be.getState().sideMudule),{},{db:"cards",id:u.inNode._id,module:"cardEdit",activeModule:"timeline",data:be.getState().db.cards[u.inNode._id]})):f(u.inNode._id,"cards"))}},o.a.createElement(Ii,{storie:u&&u.inNode&&u.inNode._id&&be.getState().db&&be.getState().db[p]&&be.getState().db[p][u.inNode._id]&&s[u.inNode._id]&&Object.keys(s[u.inNode._id]).length>0&&s[u.inNode._id][u.nodeId]?s[u.inNode._id][u.nodeId]:{},boxStyle:{width:"calc(100% - 10px) !important"},db:p})),"card"===u.module&&c[p]&&c[p][u.nodeId]&&o.a.createElement("div",{style:"chatGroup"===be.getState().db.cards[u.nodeId].type?{cursor:"pointer"}:{},onClick:function(e){"chatGroup"===be.getState().db.cards[u.nodeId].type&&f(u.nodeId,"cards")}},o.a.createElement(m,null),o.a.createElement(ii,{db:"cards",data:be.getState().db.cards[u.nodeId],expanded:!0,onlyOption:"chatGroup"===be.getState().db.cards[u.nodeId].type,onClick:function(e){"chatGroup"===be.getState().db.cards[u.nodeId].type&&f(u.nodeId,"cards")}})),e.showTimeline&&c[p]&&c[p][u.inNode._id]&&o.a.createElement(Bo,null,o.a.createElement(Ro,{xs:12,sm:12,md:4,lg:4,xl:4},o.a.createElement("div",{style:"chatGroup"===be.getState().db.cards[u.inNode._id].type?{cursor:"pointer"}:{},onClick:function(e){"chatGroup"===be.getState().db.cards[u.inNode._id].type&&f(u.inNode._id,"cards")}},o.a.createElement(m,null),o.a.createElement(ii,{db:"cards",data:be.getState().db.cards[u.inNode._id],expanded:!0,onlyOption:"chatGroup"===be.getState().db.cards[u.inNode._id].type,onClick:function(e){"chatGroup"===be.getState().db.cards[u.inNode._id].type&&f(u.inNode._id,"cards")}}))),o.a.createElement(Ro,{xs:12,sm:12,md:8,lg:8,xl:8},o.a.createElement("div",{style:{position:"relative",width:"100%",minHeight:"250px"}},o.a.createElement(Kd,{nodeId:u.inNode._id,stories:u&&u.inNode&&u.inNode._id&&be.getState().db.cards[u.inNode._id]&&s[u.inNode._id]?s[u.inNode._id]:{},db:"cards"})))))})),ep=function(e){var t,r;return{bar:{position:"fixed",top:"0px",left:"0px",width:"147px",height:"calc(100vh - 0px)",backgroundColor:Mt("menu")},item:{height:"47px",alignItems:"center",width:"100%",display:"flex"},itemButtom:(t={width:"100%",padding:"7px",color:Mt("color",.8),"&:hover":{color:Mt("color",1),backgroundColor:"rgba(255,255,255,0.1)",borderRadius:"0px"},display:"flex",fontSize:"12px",fontWeight:"bold",alignItems:"center"},Object(Oe.a)(t,"alignItems","center"),Object(Oe.a)(t,"cursor","pointer"),t),itemButtomActive:{width:"100%",padding:"7px",color:Mt("color",1),backgroundColor:"rgba(255,255,255,0.2)",borderRadius:"0px",display:"flex",alignItems:"center",fontSize:"12px",fontWeight:"bold",cursor:"pointer"},themeExample:(r={},Object(Oe.a)(r,e.breakpoints.up("md"),{left:"auto !important",right:"0 !important"}),Object(Oe.a)(r,e.breakpoints.down("sm"),{left:"0 !important",right:"auto !important"}),r),module:{position:"fixed",top:"0px",left:"147px",width:"50px",height:"100vh",backgroundColor:"rgba(246,246,246,1)",boxShadow:"inset 4px 0px 3px 0px rgb(0 0 0 / 17%)",borderRight:"solid 4px ".concat(Mt("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(Mt("color")),padding:"7px",overflowX:"auto"},moduleTitle:{width:"100%",height:"30px",fontSize:"18px",color:Mt("color"),fontWeight:"bold",paddingLeft:"7px",marginTop:"15px"},sidebarWrapperWithPerfectScrollbar:{},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Mt("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"},logoImg:{width:"66%",marginTop:"15px",justifyContent:"center"},user:{zIndex:"150 !important"}}};function tp(){tp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}r(204).config();var rp=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(ep)((function(e){var t=be.getState(),r=t.db,n=t.session,a=t.chat,i=t.notifications,c=t.timeline,s=e.classes,u=o.a.useState(!1),d=Object(je.a)(u,2),p=d[0],f=d[1],m=o.a.useState(null),g=Object(je.a)(m,2),y=g[0],v=g[1],b=window.location.hash.split("/");b[0]=b[0].replace("#",""),o.a.useEffect((function(){p||f(!0)}),[i]);var x=function(){var t=Object(Ee.a)(tp().mark((function t(o,i,s){var u,d,p,f=arguments;return tp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:u=f.length>3&&void 0!==f[3]?f[3]:"users",!o||window.location.pathname===o&&i!==y||l.push(o),v(i),d=null,r&&r.users&&c[n._id]&&a&&!a.nodeId&&!s&&(p=Object.keys(c[n._id]).sort((function(e,t){return Math.floor(c[n._id][e].created_at)>Math.floor(c[n._id][t].created_at)})).map((function(e){return c[n._id][e]})),d=p.length>0?p[0].user._id:null),"chat"!==i||s?"chat"===i&&s?e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},a),{},{open:!0,db:u,nodeId:s})):e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},a),{},{open:!1})):e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},a),{},{open:!0,db:u,nodeId:d}));case 6:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),_=[],w=[];Object.keys(i).sort((function(e,t){return parseInt(i[e].created_at)>parseInt(i[t].created_at)?-1:1})).filter((function(e){return"card"===i[e].module})).sort((function(e,t){return i[e].created_at.low-i[t].created_at.low})).map((function(e,t){-1===w.indexOf(i[e].nodeId)&&(_.push(e),w.push(i[e].nodeId))}));var E=[],O=[];return Object.keys(i).sort((function(e,t){return parseInt(i[e].created_at)>parseInt(i[t].created_at)?-1:1})).filter((function(e){return"timeline"===i[e].module})).sort((function(e,t){return i[e].created_at.low-i[t].created_at.low})).map((function(e,t){i[e].inNode&&i[e].inNode._id&&-1===O.indexOf(i[e].inNode._id)&&(E.push(e),O.push(i[e].inNode._id))})),r.myTasksMenuExpanded,o.a.createElement("div",null,o.a.createElement(Bo,null,o.a.createElement(Ro,{xs:12,sm:12,md:12,lg:12,xl:12},o.a.createElement("div",{className:s.moduleTitle},Dt("$__notifications"))),o.a.createElement(Ro,{xs:12,sm:6,md:4,lg:4,xl:4},o.a.createElement("div",{className:s.moduleTitle},Dt("$__cardsUpdated")),_.map((function(e){if(!b[1]||b[1]&&("important"===b[1]||"favorite"===b[1]||"archive"===b[1]||"latest"===b[1]))return o.a.createElement(Qd,{data:i[e],key:e})}))),o.a.createElement(Ro,{xs:12,sm:6,md:8,lg:8,xl:8},o.a.createElement("div",{className:s.moduleTitle},Dt("$__timelineUpdated")),E.map((function(e){if(!b[1]||b[1]&&("important"===b[1]||"favorite"===b[1]||"archive"===b[1]||"latest"===b[1]))return o.a.createElement(Qd,{data:i[e],key:e,openChat:function(e,t){return x(null,"chat",e,t)},showTimeline:!0,timeline:i[e]&&i[e].inNode&&i[e].inNode._id&&r.cards[i[e].inNode._id]&&c[i[e].inNode._id]?c[i[e].inNode._id]:{}})})))))}))),np={root:{position:"relative",width:"100%",backgroundColor:"".concat(Mt("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"#FFFFFF !important"},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Mt("color")," !important")},"& .text":{position:"absolute",width:"40px",right:"-40px",top:"-9px",textAlign:"right",textSize:"11px",fontWeight:"bold",color:Mt("color")}},bar:{borderRadius:7}};var ap=Object(bt.a)(np)((function(e){var t=e.classes;return o.a.createElement("div",{className:t.root},o.a.createElement(Ya.a,null))})),op=r(1324),ip={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:Xe[0]+"!important"},checkedIcon:{width:"20px",height:"20px",border:"1px solid rgba("+He("#000")+", .54)",borderRadius:"3px",display:"flex",justifyContent:"center",alignItems:"center"},uncheckedIcon:{width:"0px",height:"0px",padding:"9px",border:"1px solid rgba("+He("#000")+", .54)",borderRadius:"3px",display:"flex",justifyContent:"center",alignItems:"center"},disabledCheckboxAndRadio:{"& $checkedIcon,& $uncheckedIcon,& $radioChecked,& $radioUnchecked":{borderColor:"#000",opacity:"0.26",color:"#000"}},label:{cursor:"pointer",paddingLeft:"0",color:tt[3],fontSize:"12px",lineHeight:"1.428571429",fontWeight:"400",display:"inline-flex",transition:"0.3s ease all",letterSpacing:"unset"},labelHorizontal:{color:"rgba("+He("#000")+", 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("+He("#000")+", 0.26)",cursor:"pointer",display:"inline-flex",fontSize:"12px",lineHeight:"1.428571429",fontWeight:"400",paddingTop:"22px",marginRight:"0"},labelError:{color:Je[0]},radio:{color:Xe[0]+"!important"},radioChecked:{width:"16px",height:"16px",border:"1px solid "+Xe[0],borderRadius:"50%"},radioUnchecked:{width:"0px",height:"0px",padding:"7px",border:"1px solid rgba("+He("#000")+", .54)",borderRadius:"50%"},inlineChecks:{marginTop:"8px"},iconCheckbox:{height:"116px",width:"116px",color:tt[0],padding:"0",margin:"0 auto 20px","& > span:first-child":{borderWidth:"4px",borderStyle:"solid",borderColor:tt[9],textAlign:"center",verticalAlign:"middle",borderRadius:"50%",color:"inherit",transition:"all 0.2s"},"&:hover":{color:et[0],"& > span:first-child":{borderColor:et[0]}}},iconCheckboxChecked:{color:et[0],"& > span:first-child":{borderColor:et[0]}},iconCheckboxIcon:{fontSize:"40px",lineHeight:"111px"},switchBase:{color:Xe[0]+"!important"},switchIcon:{boxShadow:"0 1px 3px 1px rgba("+He("#000")+", 0.4)",color:"#FFF !important",border:"1px solid rgba("+He("#000")+", .54)"},switchIconChecked:{borderColor:Xe[0],transform:"translateX(0px)!important"},switchBar:{width:"30px",height:"15px",backgroundColor:"rgb("+He(tt[18])+")",borderRadius:"15px",opacity:"0.7!important"},switchChecked:{"& + $switchBar":{backgroundColor:"rgba("+He(Xe[0])+", 1) !important"},"& $switchIcon":{borderColor:Xe[0]}}},cp=Object(h.a)(Object(h.a)({},ip),{},{cardTitle:Object(h.a)(Object(h.a)({},yt),{},{textAlign:"center"}),container:Object(h.a)(Object(h.a)({},Ve),{},{position:"relative",zIndex:"3"}),cardSignup:{borderRadius:"6px",boxShadow:"0 16px 24px 2px rgba("+He("#000")+", 0.14), 0 6px 30px 5px rgba("+He("#000")+", 0.12), 0 8px 10px -5px rgba("+He("#000")+", 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:tt[6]},textFields:{margin:"15px 0"},checkboxLabelControl:{margin:"0"},checkboxLabel:{fontSize:"12px",marginLeft:"6px",color:"rgba("+He("#000")+", 0.26)"}});function lp(){lp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var sp=Object(De.a)(cp);var up=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState(),r=t.db,n=(t.search,r.dataType),a=o.a.useState("currency"),i=Object(je.a)(a,2),c=(i[0],i[1],window.location.hash.split("/"));if(c[0]=c[0].replace("#",""),!r.cards)return o.a.createElement("div",null);var l=Object.keys(r.cards).filter((function(t){if(!r.cards[t].checklist&&r.cards[t]._planId===c[0]&&("actions"===e.type&&r.cards[t]&&r.cards[t].type&&"objective"!==r.cards[t].type&&"goal"!==r.cards[t].type&&"plan"!==r.cards[t].type&&"link"!==r.cards[t].type&&"insight"!==r.cards[t].type&&"chatGroup"!==r.cards[t].type&&-1===r.cards[t].type.indexOf("guideline")&&"swot"!==n.filter((function(e){return e.name===r.cards[t].type}))[0].module||"guidelines"===e.type&&r.cards[t].type.indexOf("guideline")>-1||"objectives"===e.type&&r.cards[t].type.indexOf("objective")>-1||"goals"===e.type&&r.cards[t].type.indexOf("goal")>-1))return!0})).map((function(e){return r.cards[e]}));return o.a.createElement("div",null,o.a.createElement(qo,{title:null,icon:null,color:Mt("menu"),style:{background:"transparent",padding:"7px"},customButtons:[{title:r.orderByTitle?"$__orderByName":"$__orderByManualOrder",icon:r.orderByTitle?"sort":"format_list_numbered",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{orderByTitle:!r.orderByTitle}))}},r.orderByTitle&&{title:"ASC"===r.orderByTitlePosition?"$__asc":"$__desc",icon:"ASC"===r.orderByTitlePosition?"text_rotation_down":"text_rotate_up",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{orderByTitlePosition:"ASC"===r.orderByTitlePosition?"DESC":"ASC"}))}}]}),o.a.createElement($d,{cards:l}))})),dp=r(796),pp=r(1297);function fp(){fp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var hp=Object(_e.b)((function(e){var t=window.location.hash.split("/");return t[0]=t[0].replace("#",""),{store:{cards:Object.keys(e.db.cards).filter((function(r){return e.db.cards[r]._planId&&e.db.cards[r]._planId===t[0]}))}}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState(),r=t.db,n=(t.session,o.a.useState(!1)),a=Object(je.a)(n,2),i=a[0],c=a[1],l=o.a.useState(1),s=Object(je.a)(l,2),u=s[0],d=s[1],p=o.a.useState(1),f=Object(je.a)(p,2),m=f[0],g=f[1],y=o.a.useState(1),v=Object(je.a)(y,2),b=v[0],x=v[1],_=o.a.useState({editor:!1,text:"",height:"auto"}),w=Object(je.a)(_,2),E=w[0],O=w[1],j=o.a.useState(!1),k=Object(je.a)(j,2),S=k[0],L=k[1],C=o.a.useState({type:"comment",disabledSend:!1}),I=Object(je.a)(C,2),F=I[0],T=I[1],N=Fe()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),P=window.location.hash.split("/");P[0]=P[0].replace("#",""),36!==P[0].length&&(P[0]=null);var A=Ut(),D=Dn(P[0]);o.a.useEffect((function(){i||(O(r.cards[P[0]].note?Object(h.a)(Object(h.a)({},E),{},{text:r.cards[P[0]].note?r.cards[P[0]].note:""}):Object(h.a)({},E)),c(!0))}));var z=function(){var t=Object(Ee.a)(fp().mark((function t(n){return fp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!E.text&&!n){t.next=5;break}return t.next=3,hn(e,!1,Object(h.a)(Object(h.a)({},r.cards[P[0]]),{},{note:n?null:E.text}));case 3:t.sent&&$t({message:Dt("$__noteSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null});case 5:L(!1);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();if(!P[0]||!P[0]||!r.cards[P[0]])return o.a.createElement(o.a.Fragment,null);var B=Gn(P[0]);return o.a.createElement("div",{style:{width:"calc(100% + 30px)",paddingBottom:"30px",marginLeft:"-15px"}},o.a.createElement(Bo,null,o.a.createElement(Ro,{xs:12,sm:6,md:6,lg:6,style:{padding:0}},o.a.createElement("div",{style:{width:"100%"}},o.a.createElement(Sl,{style:{marginTop:"0"}},o.a.createElement(ra,{title:Dt("$__planResume",1),icon:"blur_on",color:Mt("color"),style:{background:Mt("ColumnTitleColor"),padding:"7px"},moreButton:!0,optionsProps:{transparent:!0,btColor:Mt("color")},options:D&&parseInt(D)>3||A.owner||A.planAdmin||A.planEdit||A.planModerate?[{name:"$__edit",icon:"edit",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},be.getState().sideModule),{},{db:"cards",id:P[0],module:"cardEdit",activeModule:"cardEdit",data:r.cards[P[0]]}))}}]:[],actionButtonsStyle:{top:"-9px !important"}}),o.a.createElement(Fl,null,o.a.createElement("div",{style:{width:"100%",color:Mt("menu")}},o.a.createElement("span",{style:{fontWeight:"bold"}},Dt("$__name",1),":")," ",r.cards[P[0]].name),o.a.createElement("div",{style:{width:"100%",color:Mt("menu")}},o.a.createElement("span",{style:{fontWeight:"bold"}},Dt("$__description",1),":")," ",r.cards[P[0]].description),!r.cards[P[0]].isTemplate&&r.cards[P[0]]&&r.cards[P[0]]._users&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{width:"100%",marginTop:"15px",color:Mt("menu"),fontWeight:"bold"}},Dt("$__users","*"),":"),o.a.createElement(Da,{data:r.cards[P[0]],noLimit:!0,avatarSize:"33px",permission:e.permission}))))),o.a.createElement("div",{style:{width:"100%"}},o.a.createElement("div",null,o.a.createElement(Sl,{style:{marginTop:"0"}},o.a.createElement(qo,{title:Dt("$__notes",1),icon:"note",color:Mt("color"),style:{background:Mt("ColumnTitleColor"),padding:"7px"},customButtons:[].concat(Object(K.a)(E.text?[{title:"$__cleanNote",icon:"clear_all",onClick:function(){z(!0)}}]:[]),[S&&{title:"$__saveNote",icon:"save",onClick:function(){z()}},S&&{title:"$__cancel",icon:"cancel",onClick:function(){O(Object(h.a)(Object(h.a)({},E),{},{text:r.cards[P[0]].note,editor:!1})),L(!1)}}])}),o.a.createElement(Fl,{style:{display:"flex",justifyContent:"center"}},E.text||E.editor?E.editor?o.a.createElement(pp.a,{style:{borderRadius:"7px",border:"0px",padding:"7px",fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif',fontSize:"16px",minWidth:"calc(100% - 0px)",maxWidth:"calc(100% - 0px)"},placeholder:Dt("$__planNotePlaceholder"),onChange:function(e){L(!0),O(Object(h.a)(Object(h.a)({},E),{},{text:e.target.value}))},onBlur:function(e){""!==e.target.value&&e.target.value!==r.cards[P[0]].note||(L(!1),O(Object(h.a)(Object(h.a)({},E),{},{editor:!1})))},autoFocus:!0,spellcheck:!1},E.text):o.a.createElement("div",{style:{fontSize:"16px",width:"100%"},onClick:function(){O(Object(h.a)(Object(h.a)({},E),{},{editor:!0}))},dangerouslySetInnerHTML:{__html:zt(E.text)}}):o.a.createElement("div",{style:{display:"flex",alignItems:"center",userSelect:"none",cursor:"pointer"},onClick:function(){O(Object(h.a)(Object(h.a)({},E),{},{editor:!0}))}},o.a.createElement("div",{style:{padding:"7px",border:"dotted 1px rgba(0,0,0,0.2)",borderRadius:"7px"}},o.a.createElement(wt,{size:"33px",color:"rgba(0,0,0,0.2)"},"add")),o.a.createElement("div",{style:{color:"rgba(0,0,0,0.2)",fontSize:"22px",fontWeight:"bold",marginLeft:"15px"}},Dt("$__addNote")))))))),o.a.createElement(Ro,{xs:12,sm:6,md:6,lg:6},o.a.createElement("div",null,o.a.createElement(Sl,{style:{marginTop:"0",height:"500px"}},o.a.createElement(qo,{title:Dt("$__timeline",1),icon:"blur_on",color:Mt("color"),style:{background:Mt("ColumnTitleColor"),padding:"7px"},customButtons:[{name:"$__timeline",icon:"timeline",actionsSize:"22px",count:B.comment,onClick:function(){T({type:"comment",disabledSend:!1})}},{name:"$__log",icon:"history",actionsSize:"22px",count:B.log,onClick:function(){T({type:"log",disabledSend:!0})}},{name:"$__timer",icon:"timer",actionsSize:"22px",count:B.timer,onClick:function(){T({type:"timer",disabledSend:!0})}},{name:"$__kpi",icon:"analytics",actionsSize:"22px",count:B.kpi,onClick:function(){T({type:"kpi",disabledSend:!0})}}],actionButtonsStyle:{top:"-9px !important"}}),o.a.createElement(Fl,null,o.a.createElement(Yi,Object(h.a)({nodeId:P[0],db:"cards",loadTimeline:!0},F)))))),o.a.createElement(Ro,{xs:12,sm:12,md:12,lg:12},o.a.createElement(Bo,null,o.a.createElement(Ro,{xs:12,sm:6,md:6,lg:3},o.a.createElement(Sl,null,o.a.createElement(ra,{title:Dt("$__matrix",1),icon:M.a,color:Mt("color"),style:{background:Mt("ColumnTitleColor"),padding:"7px"}}),o.a.createElement(Al,{style:{height:"300px",display:"flex"}},o.a.createElement(dp.a,{data:{name:"root",children:[{name:Dt("$__guidelines",1),value:Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&r.cards[e].type.indexOf("guideline")>-1})).length},{name:Dt("$__strength",1),value:Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"strength"===r.cards[e].type})).length},{name:Dt("$__weakness",1),value:Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"weakness"===r.cards[e].type})).length},{name:Dt("$__opportunity",1),value:Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"opportunity"===r.cards[e].type})).length},{name:Dt("$__threat",1),value:Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"threat"===r.cards[e].type})).length}]},margin:{top:20,right:20,bottom:20,left:20},id:"name",colors:{scheme:"purpleRed_green"},colorBy:"id",childColor:{from:"color",modifiers:[["brighter",.4]]},padding:1,leavesOnly:!0,enableLabels:!0,label:"value",labelTextColor:"#FFFFFF",borderColor:{from:"color",modifiers:[["darker",.3]]},animate:!1})),o.a.createElement(Fl,null,o.a.createElement("h3",null,o.a.createElement("small",null,Dt("$__total",1),": ",Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&(r.cards[e].type.indexOf("guideline")>-1||"strength"===r.cards[e].type||"weakness"===r.cards[e].type||"opportunity"===r.cards[e].type||"threat"===r.cards[e].type)})).length)),o.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(wt,{icon:M.a}),o.a.createElement("span",{style:{marginLeft:"15px"}},Dt("$__guidelines",1))),o.a.createElement("div",null,Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&r.cards[e].type.indexOf("guideline")>-1})).length)),o.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(wt,null,"arrow_upward"),o.a.createElement("span",{style:{marginLeft:"15px"}},Dt("$__strength",1))),o.a.createElement("div",null,Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&!r.cards[e].checklist&&!r.cards[e].deleted&&"strength"===r.cards[e].type})).length)),o.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(wt,null,"arrow_downward"),o.a.createElement("span",{style:{marginLeft:"15px"}},Dt("$__weakness",1))),o.a.createElement("div",null,Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&!r.cards[e].checklist&&!r.cards[e].deleted&&"weakness"===r.cards[e].type})).length)),o.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(wt,null,"trending_up"),o.a.createElement("span",{style:{marginLeft:"15px"}},Dt("$__opportunity",1))),o.a.createElement("div",null,Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&!r.cards[e].checklist&&!r.cards[e].deleted&&"opportunity"===r.cards[e].type})).length)),o.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(wt,null,"trending_down"),o.a.createElement("span",{style:{marginLeft:"15px"}},Dt("$__threat",1))),o.a.createElement("div",null,Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&!r.cards[e].checklist&&!r.cards[e].deleted&&"threat"===r.cards[e].type})).length))))),o.a.createElement(Ro,{xs:12,sm:6,md:6,lg:3},o.a.createElement(Sl,null,o.a.createElement(ra,{title:Dt("$__objectives",1),icon:"gps_fixed",color:Mt("color"),style:{background:Mt("ColumnTitleColor"),padding:"7px"}}),o.a.createElement(Al,{style:{height:"300px",display:"flex"}},o.a.createElement(xl.a,{data:[].concat(Object(K.a)(r.status.map((function(e,t){return{id:Dt(e.label,1),label:Dt(e.label,1),value:Object.keys(r.cards).filter((function(t){return r.cards[t]._planId===P[0]&&!r.cards[t].checklist&&!r.cards[t].deleted&&"objective"===r.cards[t].type&&r.cards[t].status&&r.cards[t].status===e.value})).length,color:e.color}}))),[{id:Dt("$__late",1),label:Dt("$__late",1),value:Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&!r.cards[e].checklist&&!r.cards[e].deleted&&"completed"!==r.cards[e].status&&"objective"===r.cards[e].type&&r.cards[e].endDate&&Fe()(new Date(1e3*r.cards[e].endDate)).tz("America/Sao_Paulo").format()<=Fe()(new Date(N)).tz("America/Sao_Paulo").format()})).length,color:"red"}]),colors:["#929497","#011E41","#EBA900","#5A7F71","red"],margin:{top:17,right:17,bottom:17,left:17},arcLabelsTextColor:{from:"color",modifiers:[["brighter",3]]},innerRadius:.5,padAngle:3,cornerRadius:3,activeOuterRadiusOffset:8,borderWidth:1,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1})),o.a.createElement(Fl,null,o.a.createElement("h3",null,o.a.createElement("small",null,Dt("$__total",1),": ",Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"objective"===r.cards[e].type})).length)),r.status.map((function(e,t){return o.a.createElement("div",{key:"".concat(t,"_").concat(e.value),style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(wt,{color:e.color},e.icon),o.a.createElement("span",{style:{marginLeft:"15px"}},Dt(e.label,1))),o.a.createElement("div",null,Object.keys(r.cards).filter((function(t){return r.cards[t]._planId===P[0]&&"objective"===r.cards[t].type&&r.cards[t].status&&r.cards[t].status===e.value})).length))})),o.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(wt,{color:"red"},"assignment_late"),o.a.createElement("span",{style:{marginLeft:"15px"}},Dt("$__late",1))),o.a.createElement("div",null,Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&!r.cards[e].checklist&&!r.cards[e].deleted&&"completed"!==r.cards[e].status&&"objective"===r.cards[e].type&&r.cards[e].endDate&&Fe()(new Date(1e3*r.cards[e].endDate)).tz("America/Sao_Paulo").format()<=Fe()(new Date(N)).tz("America/Sao_Paulo").format()})).length))))),o.a.createElement(Ro,{xs:12,sm:6,md:6,lg:3},o.a.createElement(Sl,null,o.a.createElement(ra,{title:Dt("$__goals",1),icon:"flag",color:Mt("color"),style:{background:Mt("ColumnTitleColor"),padding:"7px"}}),o.a.createElement(Al,{style:{height:"300px",display:"flex"}},o.a.createElement(xl.a,{data:[].concat(Object(K.a)(r.status.map((function(e,t){return{id:Dt(e.label,1),label:Dt(e.label,1),value:Object.keys(r.cards).filter((function(t){return r.cards[t]._planId===P[0]&&"goal"===r.cards[t].type&&r.cards[t].status&&r.cards[t].status===e.value})).length,color:e.color}}))),[{id:Dt("$__late",1),label:Dt("$__late",1),value:Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&!r.cards[e].checklist&&!r.cards[e].deleted&&"completed"!==r.cards[e].status&&"goal"===r.cards[e].type&&r.cards[e].endDate&&Fe()(new Date(1e3*r.cards[e].endDate)).tz("America/Sao_Paulo").format()<=Fe()(new Date(N)).tz("America/Sao_Paulo").format()})).length,color:"red"}]),colors:["#929497","#011E41","#EBA900","#5A7F71","red"],margin:{top:17,right:17,bottom:17,left:17},arcLabelsTextColor:{from:"color",modifiers:[["brighter",3]]},innerRadius:.5,padAngle:3,cornerRadius:3,activeOuterRadiusOffset:8,borderWidth:1,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1})),o.a.createElement(Fl,null,o.a.createElement("h3",null,o.a.createElement("small",null,Dt("$__total",1),": ",Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"goal"===r.cards[e].type})).length)),r.status.map((function(e,t){return o.a.createElement("div",{key:"".concat(t,"_").concat(e.value),style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(wt,{color:e.color},e.icon),o.a.createElement("span",{style:{marginLeft:"15px"}},Dt(e.label,1))),o.a.createElement("div",null,Object.keys(r.cards).filter((function(t){return r.cards[t]._planId===P[0]&&"goal"===r.cards[t].type&&r.cards[t].status&&r.cards[t].status===e.value})).length))})),o.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(wt,{color:"red"},"assignment_late"),o.a.createElement("span",{style:{marginLeft:"15px"}},Dt("$__late",1))),o.a.createElement("div",null,Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&!r.cards[e].checklist&&!r.cards[e].deleted&&"completed"!==r.cards[e].status&&"goal"===r.cards[e].type&&r.cards[e].endDate&&Fe()(new Date(1e3*r.cards[e].endDate)).tz("America/Sao_Paulo").format()<=Fe()(new Date(N)).tz("America/Sao_Paulo").format()})).length))))),o.a.createElement(Ro,{xs:12,sm:6,md:6,lg:3},o.a.createElement(Sl,null,o.a.createElement(ra,{title:Dt("$__actions",1),icon:"play_arrow",color:Mt("color"),style:{background:Mt("ColumnTitleColor"),padding:"7px"}}),o.a.createElement(Al,{style:{height:"300px",display:"flex"}},o.a.createElement(xl.a,{data:[].concat(Object(K.a)(r.status.map((function(e,t){return{id:Dt(e.label,1),label:Dt(e.label,1),value:Object.keys(r.cards).filter((function(t){return r.cards[t]._planId===P[0]&&r.cards[t].status&&r.cards[t].status===e.value&&("iniciative"===r.cards[t].type||"task"===r.cards[t].type||"meeting"===r.cards[t].type||"iniciative"===r.cards[t].type||"myTask"===r.cards[t].type)})).length,color:e.color}}))),[{id:Dt("$__late",1),label:Dt("$__late",1),value:Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&!r.cards[e].checklist&&!r.cards[e].deleted&&"completed"!==r.cards[e].status&&("iniciative"===r.cards[e].type||"task"===r.cards[e].type||"meeting"===r.cards[e].type||"iniciative"===r.cards[e].type||"myTask"===r.cards[e].type)&&r.cards[e].endDate&&Fe()(new Date(1e3*r.cards[e].endDate)).tz("America/Sao_Paulo").format()<=Fe()(new Date(N)).tz("America/Sao_Paulo").format()})).length,color:"red"}]),colors:["#929497","#011E41","#EBA900","#5A7F71","red"],margin:{top:17,right:17,bottom:17,left:17},arcLabelsTextColor:{from:"color",modifiers:[["brighter",3]]},innerRadius:.5,padAngle:3,cornerRadius:3,activeOuterRadiusOffset:8,borderWidth:1,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1})),o.a.createElement(Fl,null,o.a.createElement("h3",null,o.a.createElement("small",null,Dt("$__total",1),": ",Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&("iniciative"===r.cards[e].type||"task"===r.cards[e].type||"meeting"===r.cards[e].type||"iniciative"===r.cards[e].type||"myTask"===r.cards[e].type)})).length)),r.status.map((function(e,t){return o.a.createElement("div",{key:"".concat(t,"_").concat(e.value),style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(wt,{color:e.color},e.icon),o.a.createElement("span",{style:{marginLeft:"15px"}},Dt(e.label,1))),o.a.createElement("div",null,Object.keys(r.cards).filter((function(t){return r.cards[t]._planId===P[0]&&("iniciative"===r.cards[t].type||"task"===r.cards[t].type||"meeting"===r.cards[t].type||"iniciative"===r.cards[t].type||"myTask"===r.cards[t].type)&&r.cards[t].status&&r.cards[t].status===e.value})).length))})),o.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(wt,{color:"red"},"assignment_late"),o.a.createElement("span",{style:{marginLeft:"15px"}},Dt("$__late",1))),o.a.createElement("div",null,Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&!r.cards[e].checklist&&!r.cards[e].deleted&&"completed"!==r.cards[e].status&&("iniciative"===r.cards[e].type||"task"===r.cards[e].type||"meeting"===r.cards[e].type||"iniciative"===r.cards[e].type||"myTask"===r.cards[e].type)&&r.cards[e].endDate&&Fe()(new Date(1e3*r.cards[e].endDate)).tz("America/Sao_Paulo").format()<=Fe()(new Date(N)).tz("America/Sao_Paulo").format()})).length)))))))),o.a.createElement(Bo,null,Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"completed"!==r.cards[e].status&&r.cards[e].startDate&&Fe()(new Date(1e3*r.cards[e].startDate)).tz("America/Sao_Paulo").format()>=Fe()(new Date(N)).tz("America/Sao_Paulo").format()})).length>0&&o.a.createElement(Ro,{md:6,xs:12},o.a.createElement(Sl,null,o.a.createElement(ra,{title:Dt("$__nextActivities",1),icon:"pending_actions",color:Mt("color"),style:{background:Mt("ColumnTitleColor"),padding:"7px"}}),o.a.createElement(Fl,null,o.a.createElement(Bo,null,Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&!r.cards[e].deleted&&"completed"!==r.cards[e].status&&r.cards[e].startDate&&Fe()(new Date(1e3*r.cards[e].startDate)).tz("America/Sao_Paulo").format()>=Fe()(new Date(N)).tz("America/Sao_Paulo").format()})).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})).map((function(e,t){if(t>=7*(m-1)&&t<7*m)return o.a.createElement(ii,Object(Oe.a)({db:"cards",key:e,data:r.cards[e]},"db","cards"))})),Math.ceil(Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"completed"!==r.cards[e].status&&r.cards[e].startDate&&Fe()(new Date(1e3*r.cards[e].startDate)).tz("America/Sao_Paulo").format()>=Fe()(new Date(N)).tz("America/Sao_Paulo").format()})).length/7)>1&&o.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center"}},o.a.createElement(gl.a,{page:m,count:Math.ceil(Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"completed"!==r.cards[e].status&&r.cards[e].startDate&&Fe()(new Date(1e3*r.cards[e].startDate)).tz("America/Sao_Paulo").format()>=Fe()(new Date(N)).tz("America/Sao_Paulo").format()})).length/7),onChange:function(e,t){g(t)}})))))),Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"completed"!==r.cards[e].status&&r.cards[e].endDate&&Fe()(new Date(1e3*r.cards[e].endDate)).tz("America/Sao_Paulo").format()<=Fe()(new Date(N)).tz("America/Sao_Paulo").format()})).length>0&&o.a.createElement(Ro,{md:6,xs:12},o.a.createElement(Sl,null,o.a.createElement(ra,{title:Dt("$__lateActivities",1),icon:"pending_actions",color:Mt("color"),style:{background:Mt("ColumnTitleColor"),padding:"7px"}}),o.a.createElement(Fl,null,o.a.createElement(Bo,null,Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"completed"!==r.cards[e].status&&r.cards[e].endDate&&Fe()(new Date(1e3*r.cards[e].endDate)).tz("America/Sao_Paulo").format()<=Fe()(new Date(N)).tz("America/Sao_Paulo").format()})).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})).map((function(e,t){if(t>=7*(b-1)&&t<7*b)return o.a.createElement(ii,Object(Oe.a)({db:"cards",key:e,data:r.cards[e]},"db","cards"))})),Math.ceil(Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"completed"!==r.cards[e].status&&r.cards[e].endDate&&Fe()(new Date(1e3*r.cards[e].endDate)).tz("America/Sao_Paulo").format()<=Fe()(new Date(N)).tz("America/Sao_Paulo").format()})).length/7)>1&&o.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center"}},o.a.createElement(gl.a,{page:b,count:Math.ceil(Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"completed"!==r.cards[e].status&&r.cards[e].endDate&&Fe()(new Date(1e3*r.cards[e].endDate)).tz("America/Sao_Paulo").format()<=Fe()(new Date(N)).tz("America/Sao_Paulo").format()})).length/7),onChange:function(e,t){x(t)}})))))),Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"completed"===r.cards[e].status})).length>0&&o.a.createElement(Ro,{md:6,xs:12},o.a.createElement(Sl,null,o.a.createElement(ra,{title:Dt("$__lastCompletedCards",1),icon:"pending_actions",color:Mt("color"),style:{background:Mt("ColumnTitleColor"),padding:"7px"}}),o.a.createElement(Fl,null,o.a.createElement(Bo,null,Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"completed"===r.cards[e].status})).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})).map((function(e,t){if(t>=7*(u-1)&&t<7*u)return o.a.createElement(ii,{db:"cards",key:e,data:r.cards[e]})})),Math.ceil(Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"completed"===r.cards[e].status})).length/7)>1&&o.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center"}},o.a.createElement(gl.a,{page:u,count:Math.ceil(Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"completed"===r.cards[e].status})).length/7),onChange:function(e,t){d(t)}})))))),Object.keys(r.cards).filter((function(e){if(r.cards[e]._planId===P[0]&&r.cards[e]._users&&Object.keys(r.cards[e]._users).filter((function(t){return r.cards[e]._users[t].myDay&&Fe()(new Date(1e3*r.cards[e]._users[t].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===N})).length>0)return!0})).length>0&&o.a.createElement(Ro,{md:6,xs:12},o.a.createElement(Sl,null,o.a.createElement(ra,{title:Dt("$__todayTasks",1),icon:"today",color:Mt("color"),style:{background:Mt("ColumnTitleColor"),padding:"7px"}}),o.a.createElement(Fl,null,o.a.createElement(Bo,null,Object.keys(r.cards).filter((function(e){if(r.cards[e]._planId===P[0]&&r.cards[e]._users&&Object.keys(r.cards[e]._users).filter((function(t){return r.cards[e]._users[t].myDay&&Fe()(new Date(1e3*r.cards[e]._users[t].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===N})).length>0)return!0})).map((function(e){return o.a.createElement(ii,Object(Oe.a)({db:"cards",key:e,data:r.cards[e]},"db","cards"))})))))),o.a.createElement(Ro,{md:6,xs:12},o.a.createElement(Gl,{nodeId:P[0]}))))}));var mp,gp=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(lu)((function(e){e.classes;var t=be.getState(),r=t.db,n=t.search,a=o.a.useState(0),i=Object(je.a)(a,2),c=i[0],l=i[1],s=o.a.useState(25),u=Object(je.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(r.cards).filter((function(e){return r.cards[e]._parent&&r.cards[e]._parent===f[0]&&"insight"===r.cards[e].type&&!r.cards[e].deleted})).sort((function(e,t){return r.cards[e].created_at>r.cards[t].created_at?-1:0})).map((function(e){return r.cards[e]}))).filter((function(e){return e.description&&e.description.toLowerCase().indexOf(n.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(n.text.toLowerCase())>-1})).map((function(e){return e})):(h=Object.keys(r.cards).filter((function(e){return!r.cards[e]._parent&&"insight"===r.cards[e].type})).sort((function(e,t){return r.cards[e].created_at>r.cards[t].created_at?-1:0})).map((function(e){return r.cards[e]}))).filter((function(e){return e.description&&e.description.toLowerCase().indexOf(n.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(n.text.toLowerCase())>-1})).map((function(e){return e})),o.a.createElement("div",{style:{position:"relative",justifyContent:"space-between",margin:"auto",width:"100%"}},Object.keys(h).length>25&&o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Dt("$__page")," ",c+1," ",Dt("$__of")," ",Math.ceil(Object.keys(h).length/d),o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},o.a.createElement(qs.a,{component:"div",count:Object.keys(h).length,page:c,onChangePage:function(e,t){l(t)},rowsPerPage:d,onChangeRowsPerPage:function(e){p(parseInt(e.target.value,10))},labelRowsPerPage:Dt("$__insightsPerPage")}))),o.a.createElement(Bo,null,Object.keys(h).map((function(e,t){if(t<=(c+1)*d&&t>=c*d)return o.a.createElement(Ro,{key:h[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},o.a.createElement(ii,{db:"cards",data:h[e],expanded:!0,Avatar:!0,Resume:!0}))}))),Object.keys(h).length>25&&o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Dt("$__page")," ",c+1," ",Dt("$__of")," ",Math.ceil(Object.keys(h).length/d),o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},o.a.createElement(qs.a,{component:"div",count:Object.keys(h).length,page:c,onChangePage:function(e,t){l(t)},rowsPerPage:d,onChangeRowsPerPage:function(e){p(parseInt(e.target.value,10))},labelRowsPerPage:Dt("$__insightsPerPage")}))))})));function yp(){yp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var vp,bp=Ae.b.div(mp||(mp=Object(we.a)(["\n background-color:none;\n "]))),xp=Object(_e.b)((function(e){return{store:e}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState(),r=t.db,n=t.session,a=be.getState().functions.socket,i=o.a.useState(e.defaultName?e.defaultName:""),c=Object(je.a)(i,2),l=c[0],s=c[1],u=o.a.useState(!1),d=Object(je.a)(u,2),p=d[0],f=d[1],m=window.location.hash.split("/");m[0]=m[0].replace("#",""),36!==m[0].length&&(m[0]=null);var g=function(){var t=Object(Ee.a)(yp().mark((function t(){var r;return yp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(r=be.getState().functions.socket).emit("data",{module:"cards",method:"post",action:"add"},{_parent:m[0],planId:m[0]&&36===m[0].length?m[0]:null,name:l,type:e.cardType,status:"notStarted"},function(){var e=Object(Ee.a)(yp().mark((function e(t){return yp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.emit("card.UPD",{cardId:t.id,cardData:Object(h.a)(Object(h.a)({},t.data),{},{_parent:m[0],_timeline:Object(Oe.a)({},t.log._id,Object(h.a)(Object(h.a)({},t.log),{},{_parent:[t.id]})),_users:Object(Oe.a)({},n._id,{name:be.getState().db.users[n._id].name?be.getState().db.users[n._id].name:null,displayName:be.getState().db.users[n._id].displayName?be.getState().db.users[n._id].displayName:null,image:be.getState().db.users[n._id].image?be.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)}}()),s("");case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),y=function(){var t=Object(Ee.a)(yp().mark((function t(n){var o,i,c,l,s;return yp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=n.destination,i=n.source,c=n.draggableId,o){t.next=3;break}return t.abrupt("return",!1);case 3:if(o.droppableId!==i.droppableId||o.id!==i.index){t.next=5;break}return t.abrupt("return",!1);case 5:return(l=e.cards).splice(i.index,1),l.splice(o.index,0,c),Pt.put("cards/reorder",{cards:l}),s={},l.map((function(e,t){return(s=Object(h.a)(Object(h.a)({},s),{},Object(Oe.a)({},e,r.cards[e])))[e].order||(s[e].order.low=t),s[e].order.low=t,!0})),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),s)})),a.emit("card.UPD",s),t.abrupt("return");case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),v=function(){var e=Object(Ee.a)(yp().mark((function e(t){return yp().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)}}(),b=function(){var e=Object(Ee.a)(yp().mark((function e(t){return yp().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 o.a.createElement(o.a.Fragment,null,o.a.createElement(no.a,{onDragEnd:y,onDragStart:v,onDragUpdate:b},o.a.createElement(no.c,{droppableId:"Drop_".concat(e.cardType||""),type:"column",direction:"vertical"},(function(t,n){return o.a.createElement(bp,Object.assign({ref:t.innerRef},t.droppableProps,{isDraggingOver:n.isDraggingOver}),e.cards.map((function(e,t){return o.a.createElement(no.b,{draggableId:e,index:t,key:e},(function(t,n){return o.a.createElement(ii,{provided:t,snapshot:n,data:r.cards[e],db:"cards",viewButton:!0,selectOption:!0})}))})),t.placeholder)}))),!p&&o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px"}},o.a.createElement(Ir,{text:Dt("$__add","*"),icon:"add_box",iconColor:Mt("medium"),onClick:function(){f(!p)}})),p&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px",display:"flex",alignItems:"center"}},o.a.createElement("div",{style:{width:"calc(100% - 50px)",display:"flex"}},o.a.createElement(Qn,{label:Dt("$__nameOfCard"),variant:Mt("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){s(e.target.value)},onBlur:function(e){""===e.target.value&&f(!p)},onKeyDown:function(e){13===e.keyCode&&l&&g(),27===e.keyCode&&(f(!p),s(""))}},autoFocus:!0,value:l,placeholder:Dt("$__titleOfCard_placeholder")})),o.a.createElement("div",{style:{display:"flex"}},o.a.createElement("div",{onClick:function(){return g()}},o.a.createElement(wt,{color:"green",icon:"save",title:Dt("$__save","*"),size:e.actionsSize||"25px"})),o.a.createElement("div",{onClick:function(){f(!p),s("")}},o.a.createElement(wt,{color:Mt("medium"),icon:"cancel",title:Dt("$__cancel","*"),size:e.actionsSize||"25px"}))))))})),_p=r(1295),wp=r(1410),Ep=r(1411),Op=r(1409),jp=r(474),kp=Object(De.a)({avatar:{backgroundColor:jp.a[100],color:jp.a[600]}});function Sp(e){kp();var t=e.open,r=(e.selectedValue,e.onClose);return o.a.createElement(Xo.a,{onClose:function(){r()},"aria-labelledby":"simple-dialog-title",open:t},e&&e.title&&o.a.createElement(Op.a,{id:"simple-dialog-title"},e.title),o.a.createElement(Ye.a,null,e.options.map((function(e,t){return o.a.createElement(_p.a,{button:!0,onClick:function(){e.onClick&&e.onClick(),r()},key:t},o.a.createElement(wp.a,null,o.a.createElement(wt,{icon:e.icon})),o.a.createElement(Ep.a,{primary:Dt(e.name,1)}))}))))}function Lp(e){var t=o.a.useState(!1),r=Object(je.a)(t,2),n=r[0],a=r[1],i=o.a.useState(null),c=Object(je.a)(i,2),l=c[0],s=c[1];return o.a.createElement(o.a.Fragment,null,o.a.createElement(Ir,{text:e.text?e.text:null,icon:e.icon?e.icon:"add_box",size:e.iconSize?e.iconSize:null,iconColor:e.iconColor?e.iconColor:Mt("medium"),onClick:function(){a(!0)}}),o.a.createElement(Sp,{selectedValue:l,open:n,onClose:function(){var e;a(!1),s(e)},options:e.options}))}function Cp(){Cp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Ip=Ae.b.div(vp||(vp=Object(we.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 ")})),Fp=Object(_e.b)((function(e){return{store:{cards:e.db.cards}}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState().db,r=o.a.useState(!1),n=Object(je.a)(r,2),a=n[0],i=n[1];o.a.useEffect((function(){a||(i(!0),kn(e))}));var c=function(){var r=Object(Ee.a)(Cp().mark((function r(n){var a,o,i,c,l,s,u,d,p,f,m,g,y;return Cp().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=be.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(l=i.droppableId,s=o.droppableId,u=Array.from(e.cards.filter((function(e){return e.type===l&&!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}))),l!==s){r.next=21;break}return(d=Array.from(e.cards.filter((function(e){return e.type===l&&!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),d.splice(o.index,0,c),p={},d.map((function(e,r){p[e]=Object(h.a)(Object(h.a)({},t.cards[e]),{},{order:{low:r}})})),f=Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},t.cards),p)}),e.reduxFunction("ASYNC","SET_DB",Object(h.a)({},f)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:c,source:i.droppableId,destination:o.droppableId,destinationCards:d,columnName:"type",sourceCards:[]}),r.abrupt("return");case 21:u.splice(i.index,1),m=Array.from(e.cards.filter((function(e){return e.type===s})).sort((function(e,t){return e.order&&t.order&&e.order.low&&t.order.low&&parseInt(e.order.low)<parseInt(t.order.low)?-1:1})).map((function(e){return e._id}))),console.log(m),m.splice(o.index,0,c),g=Object(h.a)({},t.cards),u.map((function(e,t){g=Object(h.a)(Object(h.a)({},g),{},Object(Oe.a)({},e,Object(h.a)(Object(h.a)({},g[e]?g[e]:{}),{},{order:{low:t}})))})),m.map((function(e,t){g=Object(h.a)(Object(h.a)({},g),{},Object(Oe.a)({},e,Object(h.a)(Object(h.a)({},g[e]?g[e]:{}),{},{order:{low:t}})))})),y=Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},g),{},Object(Oe.a)({},c,Object(h.a)(Object(h.a)({},g[c]),{},{type:s,order:{low:o.index}})))}),e.reduxFunction("ASYNC","SET_DB",Object(h.a)({},y)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:c,source:i.droppableId,destination:o.droppableId,destinationCards:m,columnName:"type",sourceCards:u});case 31:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}();return o.a.createElement(no.a,{onDragEnd:c},o.a.createElement(no.c,{droppableId:"ALL-COLUMNS-STATUS",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal")},(function(r){return o.a.createElement(Ip,Object.assign({},e,{ref:r.innerRef}),t.swot.map((function(t,r){var n={name:t.label,icon:t.icon,cards:[],emptyHide:!1};return o.a.createElement(zd,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(h.a)(Object(h.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 Tp,Np=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t,r=be.getState().db,n=r.dataType,a=o.a.useState(!1),i=Object(je.a)(a,2),c=i[0],l=i[1],s=r.cards,u=window.location.hash.split("/");u[0]=u[0].replace("#",""),u[0]&&36!==u[0].length&&(u[0]=null),o.a.useEffect((function(){c||(l(!0),_())}));var d={};Object.keys(r.cards).filter((function(e){return r.cards[e]&&!r.cards[e].deleted&&(r.cards[e]._planId===u[0]||r.cards[e]._parent===u[0])})).map((function(e){d=Object(h.a)(Object(h.a)({},d),{},Object(Oe.a)({},e,r.cards[e]))}));var p,f=Object.keys(d).filter((function(e){return!0===d[e]._selected&&d[e].type&&d[e].type.indexOf("guideline")>-1&&d[e]._parent===u[0]}))[0]||null,m=Object.keys(d).filter((function(e){return!0===d[e]._selected&&d[e].type&&"objective"===d[e].type}))[0]||null,g=Object.keys(d).filter((function(e){return!0===d[e]._selected&&d[e].type&&"goal"===d[e].type}))[0]||null,y=Object.keys(d).filter((function(e){return"guidelineR"===d[e].type&&d[e]._parent===u[0]&&!d[e].deleted})).sort((function(e,t){return d[e].order&&String(d[e].order.low)&&d[t].order&&String(d[t].order.low)&&parseInt(d[e].order.low)>parseInt(d[t].order.low)?1:-1})),v=Object.keys(d).filter((function(e){return"guidelineC"===d[e].type&&d[e]._parent===u[0]&&!d[e].deleted})).sort((function(e,t){return d[e].order&&String(d[e].order.low)&&d[t].order&&String(d[t].order.low)&&parseInt(d[e].order.low)>parseInt(d[t].order.low)?1:-1})),b=Object.keys(d).filter((function(e){return"guidelineE"===d[e].type&&d[e]._parent===u[0]&&!d[e].deleted})).sort((function(e,t){return d[e].order&&String(d[e].order.low)&&d[t].order&&String(d[t].order.low)&&parseInt(d[e].order.low)>parseInt(d[t].order.low)?1:-1})),x=Object.keys(d).filter((function(e){return"guidelineD"===d[e].type&&d[e]._parent===u[0]&&!d[e].deleted})).sort((function(e,t){return d[e].order&&String(d[e].order.low)&&d[t].order&&String(d[t].order.low)&&parseInt(d[e].order.low)>parseInt(d[t].order.low)?1:-1})),_=function(){var t=Object(h.a)({},be.getState().db.cards);Object.keys(d).map((function(e){d[e]&&d[e]._selected&&(d[e]._selected=!1)})),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},t),d)}))};g?p=Object.keys(d).filter((function(e){return d[e]._parent===g&&!d[e].checklist})):m?p=Object.keys(d).filter((function(e){return d[e]._parent===m&&!d[e].checklist})):f&&(p=Object.keys(d).filter((function(e){return d[e]._parent===f&&!d[e].checklist})));var w=Object.keys(d).filter((function(e){return d[e]._parent===u[0]})),E=d&&Object.keys(d).filter((function(e){return d[e]&&d[e]._selected&&d[e].type&&d[e].type.indexOf("guideline")>-1}));return o.a.createElement("div",{style:{width:"inherit"}},!m&&o.a.createElement(o.a.Fragment,null,o.a.createElement(Me.a,{smDown:!0},o.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 7px)",marginRight:"14px",padding:"7px",background:Mt("ColumnTitleColor"),color:Mt("color"),fontSize:"16px",fontWeight:"bold",marginBottom:"15px",textAlign:"center"}},Dt("$__internalAspects",1)),o.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 7px)",padding:"7px",background:Mt("ColumnTitleColor"),color:Mt("color"),fontSize:"16px",fontWeight:"bold",marginBottom:"15px",textAlign:"center"}},Dt("$__externalAspects",1))),o.a.createElement(Me.a,{smUp:!0},o.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(100% - 7px)",padding:"7px",background:Mt("ColumnTitleColor"),color:Mt("color"),fontSize:"16px",fontWeight:"bold",marginBottom:"15px",textAlign:"center"}},Dt("$__s.W.O.T","*"))),o.a.createElement(Fp,(t={cards:w.map((function(e){return d[e]})),showSelected:Object.keys(d).filter((function(e){return!0===d[e]._selected})).length>0,lockColumns:E.length>0&&"guidelineD"===d[E[0]].type?["strength","threat"]:E.length>0&&"guidelineR"===d[E[0]].type?["strength","opportunity"]:E.length>0&&"guidelineE"===d[E[0]].type?["weakness","threat"]:E.length>0&&"guidelineC"===d[E[0]].type?["weakness","opportunity"]:null,columnStyle:{minWidth:"calc(25% - 14px)"},showOrder:!0},Object(Oe.a)(t,"showSelected",Object.keys(d).filter((function(e){return!0===d[e]._selected})).length>0),Object(Oe.a)(t,"inLineAdd",!0),t))),o.a.createElement(Bo,null,o.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(100% - 28px)",marginRight:"14px",marginLeft:"14px",padding:"7px",background:Mt("ColumnTitleColor"),color:Mt("color"),fontSize:"16px",fontWeight:"bold",marginBottom:"15px",textAlign:"center"}},f?Dt("$__planning",1):"MATRIX SWOT"),f?o.a.createElement(o.a.Fragment,null,o.a.createElement(Ro,{md:3,sm:12,xs:12},o.a.createElement("div",null,o.a.createElement(qo,{title:"MATRIX SWOT",icon:n.filter((function(e){return"matrix"===e.name}))[0].icon,color:Mt("color"),style:{background:Mt("ColumnTitleColor"),padding:"7px"}}),o.a.createElement(ii,{data:s[f],db:"cards",selectOption:!0,expanded:!0}),o.a.createElement(Ir,{icon:"undo",text:Dt("$__backToMatrix","*"),onClick:function(){_("guideline")}})),m&&o.a.createElement("div",null,o.a.createElement(qo,{title:Dt("$__objective",1),icon:n.filter((function(e){return"objective"===e.name}))[0].icon,color:Mt("color"),style:{background:Mt("ColumnTitleColor"),padding:"7px"}}),o.a.createElement(ii,{data:s[m],db:"cards",selectOption:!0,expanded:!0})),g&&o.a.createElement("div",null,o.a.createElement(qo,{title:Dt("$__goal",1),icon:n.filter((function(e){return"goal"===e.name}))[0].icon,color:Mt("color"),style:{background:Mt("ColumnTitleColor"),padding:"7px"},customButtons:[{title:"$__new",icon:"add_box",color:Mt("menu"),onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},be.getState().sideModule),{},{id:"new",activeModule:n.filter((function(e){return"goal"===e.name}))[0].iniModule,db:"cards",data:{type:"goal",_parent:m,status:"notStarted"}}))}}]}),o.a.createElement(ii,{data:s[g],db:"cards",selectOption:!0,expanded:!0}))),o.a.createElement(Ro,{md:9,sm:12,xs:12},o.a.createElement(qo,{title:Dt(m&&!g?"$__goals":m?"$__actions":"$__objectives",1),icon:m&&!g?n.filter((function(e){return"goal"===e.name}))[0].icon:m?"view_column":n.filter((function(e){return"objective"===e.name}))[0].icon,color:Mt("color"),style:{background:Mt("ColumnTitleColor"),padding:"7px"},actionButtonsStyle:{position:"absolute",top:0,bottom:0,display:"flex",itemAligns:"center"},customButtons:[g?{component:o.a.createElement(Lp,{iconColor:Mt("color"),options:n.filter((function(e){return"agile"===e.module})).map((function(t){return{icon:t.icon,name:Dt("$__".concat(t.name),1),onClick:function(){return e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},be.getState().sideModule),{},{id:"new",db:"cards",data:{type:t.name,_parent:g,status:"notStarted"}}))}}}))})}:{title:"$__new",icon:"add_box",color:Mt("color"),actionsSize:"22px",show:!0,onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},be.getState().sideModule),{},{id:"new",activeModule:n.filter((function(e){return"objective"===e.name}))[0].iniModule,db:"cards",data:m?{type:"goal",_parent:m,status:"notStarted"}:{type:"objective",_parent:f,status:"notStarted"}}))}}]}),o.a.createElement($d,{cards:p.map((function(e){return d[e]})),viewButton:!0}))):o.a.createElement(Ro,{md:12},o.a.createElement(Bo,{style:{paddingBottom:"33px"}},o.a.createElement(Ro,{md:3,sm:12,xs:12},o.a.createElement(qo,{title:Dt("$__guidelineR",1),icon:n.filter((function(e){return"matrix"===e.name}))[0].icon,color:Mt("color"),style:{background:Mt("ColumnTitleColor"),padding:"7px"}}),o.a.createElement("div",{style:{position:"relative",width:"100%",padding:"7px",minHeight:"130px",backgroundColor:"#F9F9F9",borderRadius:"0 0 7px 7px"}},o.a.createElement("div",{style:{position:"relative",width:"100%",color:Mt("menu"),fontWeight:"bold",paddingBottom:"7px",borderBottom:"solid 1px #e4e4e4",textAlign:"center"}},Dt("$__guidelineRtypes",1)),o.a.createElement("div",{style:{position:"relative",width:"100%",color:Mt("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Dt("$__guidelineRdetails",1))),o.a.createElement(xp,{cards:y,cardType:"guidelineR"})),o.a.createElement(Ro,{md:3,sm:12,xs:12},o.a.createElement(qo,{title:Dt("$__guidelineD",1),icon:n.filter((function(e){return"matrix"===e.name}))[0].icon,color:Mt("color"),style:{background:Mt("ColumnTitleColor"),padding:"7px"}}),o.a.createElement("div",{style:{position:"relative",width:"100%",padding:"7px",minHeight:"130px",backgroundColor:"#F9F9F9",borderRadius:"0 0 7px 7px"}},o.a.createElement("div",{style:{position:"relative",width:"100%",color:Mt("menu"),fontWeight:"bold",paddingBottom:"7px",borderBottom:"solid 1px #e4e4e4",textAlign:"center"}},Dt("$__guidelineDtypes",1)),o.a.createElement("div",{style:{position:"relative",width:"100%",color:Mt("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Dt("$__guidelineDdetails",1))),o.a.createElement(xp,{cards:x,cardType:"guidelineD"})),o.a.createElement(Ro,{md:3,sm:12,xs:12},o.a.createElement(qo,{title:Dt("$__guidelineC",1),icon:n.filter((function(e){return"matrix"===e.name}))[0].icon,color:Mt("color"),style:{background:Mt("ColumnTitleColor"),padding:"7px"}}),o.a.createElement("div",{style:{position:"relative",width:"100%",padding:"7px",minHeight:"130px",backgroundColor:"#F9F9F9",borderRadius:"0 0 7px 7px"}},o.a.createElement("div",{style:{position:"relative",width:"100%",color:Mt("menu"),fontWeight:"bold",paddingBottom:"7px",borderBottom:"solid 1px #e4e4e4",textAlign:"center"}},Dt("$__guidelineCtypes",1)),o.a.createElement("div",{style:{position:"relative",width:"100%",color:Mt("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Dt("$__guidelineCdetails",1))),o.a.createElement(xp,{cards:v,cardType:"guidelineC"})),o.a.createElement(Ro,{md:3,sm:12,xs:12},o.a.createElement(qo,{title:Dt("$__guidelineE",1),icon:n.filter((function(e){return"matrix"===e.name}))[0].icon,color:Mt("color"),style:{background:Mt("ColumnTitleColor"),padding:"7px"}}),o.a.createElement("div",{style:{position:"relative",width:"100%",padding:"7px",minHeight:"130px",backgroundColor:"#F9F9F9",borderRadius:"0 0 7px 7px"}},o.a.createElement("div",{style:{position:"relative",width:"100%",color:Mt("menu"),fontWeight:"bold",paddingBottom:"7px",borderBottom:"solid 1px #e4e4e4",textAlign:"center"}},Dt("$__guidelineEtypes",1)),o.a.createElement("div",{style:{position:"relative",width:"100%",color:Mt("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Dt("$__guidelineEdetails",1))),o.a.createElement(xp,{cards:b,cardType:"guidelineE"}))))))}));function Pp(){Pp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Ap=Ae.b.div(Tp||(Tp=Object(we.a)(["\nposition:absolute;\nheight:100%;\n","\n","\n @media(max-width: 959px) {\n display: contents !important;\n width: -webkit-fill-available;\n height:auto;\n }\n "])),(function(e){return!e.inLine&&e.styles&&e.styles.discountHeight&&"height:calc(100vh - ".concat(e.styles.discountHeight,"px);")}),(function(e){return e.inLine?"display: block;\n width: -webkit-fill-available;\n ".concat(e.style):" display: flex;\n width: 100%;\n ".concat(e.style,"\n @media(min-width: 960px) {\n display: flex;\n }\n ")})),Dp=Object(_e.b)((function(e){var t=window.location.hash.split("/");t[0]=t[0].replace("#","");var r={};return t[0]&&36===t[0].length&&e.db.cards[t[0]]&&(r=Object.keys(e.db.cards).filter((function(r){return e.db.cards[r]._planId===t[0]||e.db.cards[r]._id===t[0]}))),{store:{cards:r}}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState(),r=t.db,n=t.search,a=r.dataType,i=o.a.useState(!1),c=Object(je.a)(i,2),l=c[0],s=c[1],u=o.a.useState({}),d=Object(je.a)(u,2),p=d[0],f=d[1],m=window.location.hash.split("/");m[0]=m[0].replace("#",""),36!==m[0].length&&(m[0]=null);var g={};Object.keys(r.cards).filter((function(t){var n=Gn(t);if(r.cards[t]&&(r.cards[t]._planId===m[0]||r.cards[t]._parent===m[0])&&(e.showCompleted||!e.showCompleted&&"completed"!==r.cards[t].status)&&(!e.onlyUnReaded||e.onlyUnReaded&&n.total>0))return!0})).map((function(e){g=Object(h.a)(Object(h.a)({},g),{},Object(Oe.a)({},e,r.cards[e]))}));var y=Object.keys(g).filter((function(e){return g[e]&&g[e].type&&!0===g[e]._selected&&g[e].type.indexOf("guideline")>-1})).length>0?Object.keys(g).filter((function(e){return g[e]&&g[e].type&&!0===g[e]._selected&&g[e].type.indexOf("guideline")>-1}))[0]:null,v=Object.keys(g).filter((function(e){return g[e]&&!0===g[e]._selected&&"objective"===g[e].type})).length>0?Object.keys(g).filter((function(e){return g[e]&&!0===g[e]._selected&&"objective"===g[e].type}))[0]:null,b=Object.keys(g).filter((function(e){return!0===g[e]._selected&&"goal"===g[e].type})).length>0?Object.keys(g).filter((function(e){return!0===g[e]._selected&&"goal"===g[e].type}))[0]:null,x=[{value:"guidelines",type:"guideline",label:"$__guidelines",icon:"alt_route",viewButton:!0,selectedParent:null},{value:"objectives",type:"objective",label:"$__objectives",icon:a.filter((function(e){return"objective"===e.name}))[0].icon,viewButton:!0,selectedParent:y},{value:"goals",type:"goal",label:"$__goals",icon:a.filter((function(e){return"goal"===e.name}))[0].icon,viewButton:!0,selectedParent:v||y},{value:"actions",type:"iniciative",label:"$__actions",icon:"double_arrow",selectedParent:b||v||y}],_={};_.guidelines=Object.keys(g).filter((function(e){return(g[e]._parent===m[0]||g[e]._planId===m[0])&&g[e].type&&g[e].type.indexOf("guideline")>-1}))||null,_.objectives=Object.keys(g).filter((function(e){return g[e].type&&"objective"===g[e].type&&(_.guidelines.indexOf(g[e]._parent)>-1||!y&&g[e]._planId===m[0]||!1)}))||null,_.objectives=Object.keys(g).filter((function(e){return"objective"===g[e].type&&!g[e].checklist&&(y&&g[e]._parent===y||!y&&g[e]._planId===m[0])})),_.objectives2=Object.keys(g).filter((function(e){if("objective"===g[e].type&&g[e]._parent!==y&&!g[e].checklist&&_.objectives.indexOf(g[e]._parent)>-1)return!0})),_.objectives2.map((function(e){-1===_.objectives.indexOf(e)&&_.objectives.push(e)})),_.goals=Object.keys(g).filter((function(e){return g[e].type&&"goal"===g[e].type&&(!v&&_.objectives.indexOf(g[e]._parent)>-1||v&&g[e]._parent===v||!v&&y&&g[e]._parent===y||!y&&!v&&g[e]._planId===m[0])}))||null,_.goals2=Object.keys(g).filter((function(e){return"goal"===g[e].type&&!g[e].checklist&&_.goals.indexOf(g[e]._parent)>-1})),_.goals2.map((function(e){-1===_.goals.indexOf(e)&&_.goals.push(e)})),_.actions=Object.keys(g).filter((function(e){return g[e].type&&!g[e].checklist&&"plan"!==g[e].type&&"objective"!==g[e].type&&"goal"!==g[e].type&&"feed"!==g[e].type&&"link"!==g[e].type&&"insight"!==g[e].type&&"link"!==g[e].type&&"chatGroup"!==g[e].type&&-1===g[e].type.indexOf("guideline")&&a.filter((function(t){return t.name===g[e].type})).length>0&&"swot"!==a.filter((function(t){return t.name===g[e].type}))[0].module&&(b&&g[e]._parent===b||!b&&v&&(g[e]._parent===v||_.goals.indexOf(g[e]._parent)>-1)||!b&&!v&&y&&(g[e]._parent===y||_.objectives.indexOf(g[e]._parent)>-1||_.goals.indexOf(g[e]._parent)>-1)||!b&&!v&&!y&&(!y&&_.guidelines.indexOf(g[e]._parent)>-1||!v&&_.objectives.indexOf(g[e]._parent)>-1||!b&&_.goals.indexOf(g[e]._parent)>-1)||!b&&!v&&!y&&!y&&!v&&!b&&g[e]._planId===m[0])}))||null,_.guidelines&&(_.guidelines=_.guidelines.filter((function(e){return y?g[e]._selected:g[e]})).map((function(e){return g[e]})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})),n.text&&(_.guidelines=_.guidelines.filter((function(e){return!!(e&&e.name&&e.name.toLowerCase().indexOf(n.text.toLowerCase())>-1)})).map((function(e){return e}))),n.tags.length>0&&(_.guidelines=_.guidelines.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return n.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),_.guidelines=_.guidelines.filter((function(e){return!!(e&&e.status&&n.cards.status[e.status]||!e.status&&n.cards.status.notStarted)})).map((function(e){return e})),_.guidelines=_.guidelines.filter((function(e){return!!(e&&e.priority&&n.cards.priority[e.priority]||n.cards.priority.null&&!e.priority)})).map((function(e){return e})),Object.keys(n.users.selected).length>0&&Object.keys(n.users.selected).map((function(e){n.users.selected[e]&&(_.guidelines=_.guidelines.filter((function(t){return"unassigned"===e?!(!t._users||0!==Object.keys(t._users).length):t&&t._users&&Object.keys(t._users).length>0?Object.keys(t._users).map((function(e){return!!n.users.selected[e]}))[0]:void 0})).map((function(e){return e})))}))),_.objectives&&(_.objectives=_.objectives.filter((function(e){return g[e]&&g[e]._selected&&v?g[e]._selected:g[e]})).map((function(e){return g[e]})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})),n.text&&(_.objectives=_.objectives.filter((function(e){return!!(e&&e.name&&e.name.toLowerCase().indexOf(n.text.toLowerCase())>-1)})).map((function(e){return e}))),n.tags.length>0&&(_.objectives=_.objectives.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return n.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),_.objectives=_.objectives.filter((function(e){return!!(e&&e.status&&n.cards.status[e.status])})).map((function(e){return e})),_.objectives=_.objectives.filter((function(e){return!!(e&&e.priority&&n.cards.priority[e.priority]||n.cards.priority.null&&!e.priority)})).map((function(e){return e})),Object.keys(n.users.selected).length>0&&Object.keys(n.users.selected).map((function(e){n.users.selected[e]&&(_.objectives=_.objectives.filter((function(t){return"unassigned"===e?!(!t._users||0!==Object.keys(t._users).length):t&&t._users&&Object.keys(t._users).length>0?Object.keys(t._users).map((function(e){return!!n.users.selected[e]}))[0]:void 0})).map((function(e){return e})))}))),_.goals&&(_.goals=_.goals.filter((function(e){return b&&g[e]&&g[e]._selected?g[e]._selected:g[e]})).map((function(e){return g[e]})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})),n.text&&(_.goals=_.goals.filter((function(e){return!!(e&&e.name&&e.name.toLowerCase().indexOf(n.text.toLowerCase())>-1)})).map((function(e){return e}))),n.tags.length>0&&(_.goals=_.goals.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return n.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),_.goals=_.goals.filter((function(e){return!!(e&&e.status&&n.cards.status[e.status])})).map((function(e){return e})),_.goals=_.goals.filter((function(e){return!!(e&&e.priority&&n.cards.priority[e.priority]||n.cards.priority.null&&!e.priority)})).map((function(e){return e})),Object.keys(n.users.selected).length>0&&Object.keys(n.users.selected).map((function(e){n.users.selected[e]&&(_.goals=_.goals.filter((function(t){return"unassigned"===e?!(!t._users||0!==Object.keys(t._users).length):t&&t._users&&Object.keys(t._users).length>0?Object.keys(t._users).map((function(e){return!!n.users.selected[e]}))[0]:void 0})).map((function(e){return e})))}))),_.actions&&(_.actions=_.actions.map((function(e){return g[e]})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})),n.text&&(_.actions=_.actions.filter((function(e){return!!(e&&e.name&&e.name.toLowerCase().indexOf(n.text.toLowerCase())>-1)})).map((function(e){return e}))),n.tags.length>0&&(_.actions=_.actions.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return n.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),_.actions=_.actions.filter((function(e){return!!(e&&e.status&&n.cards.status[e.status])})).map((function(e){return e})),_.actions=_.actions.filter((function(e){return!!(e&&e.priority&&n.cards.priority[e.priority]||n.cards.priority.null&&!e.priority)})).map((function(e){return e})),Object.keys(n.users.selected).length>0&&Object.keys(n.users.selected).map((function(e){n.users.selected[e]&&(_.actions=_.actions.filter((function(t){return"unassigned"===e?!(!t._users||0!==Object.keys(t._users).length):t&&t._users&&Object.keys(t._users).length>0?Object.keys(t._users).map((function(e){return!!n.users.selected[e]}))[0]:void 0})).map((function(e){return e})))})));var w=function(){var t=Object(Ee.a)(Pp().mark((function t(n){var a,o,i,c,l,u,d,p,m;return Pp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=n.destination,o=n.source,i=n.draggableId,r.cards,!n.combine){t.next=5;break}return $t({message:"".concat(Dt("$__confirmLink",1),": ").concat(be.getState().db.cards[i].name," >>> ").concat(be.getState().db.cards[n.combine.draggableId]?be.getState().db.cards[n.combine.draggableId].name:""),variant:"warning",persist:!0,horizontal:"right",confirm:function(){An(e,{cardId:i,cardToLink:n.combine.draggableId})}}),t.abrupt("return");case 5:if(a){t.next=7;break}return t.abrupt("return",!1);case 7:if(a.droppableId!==o.droppableId||a.id!==o.index){t.next=9;break}return t.abrupt("return",!1);case 9:if(c=o.droppableId,l=a.droppableId,u=Array.from(Object.keys(g).filter((function(e){return g[e].status===c})).sort((function(e,t){return g[e].order&&g[t].order&&String(g[e].order.low)&&String(g[t].order.low)&&parseInt(g[e].order.low)<parseInt(g[t].order.low)?-1:1})).map((function(e){return e._id}))),c!==l||be.getState().db.orderByTitle){t.next=21;break}return t.abrupt("return");case 21:u.splice(o.index,1),(d=Array.from(Object.keys(g).filter((function(e){return e.status===l})).sort((function(e,t){return g[e].order&&g[t].order&&String(g[e].order.low)&&String(g[t].order.low)&&parseInt(g[e].order.low)<parseInt(g[t].order.low)?-1:1})).map((function(e){return e._id})))).splice(a.index,0,i),u.map((function(e,t){r.cards[e].order&&r.cards[e].order.low?r.cards[e].order.low=parseInt(t):r.cards[e]=Object(h.a)(Object(h.a)({},r.cards[e]),{},Object(Oe.a)({},"order",Object(Oe.a)({},"low",parseInt(t))))})),d.map((function(e,t){r.cards[e].order&&r.cards[e].order.low?r.cards[e].order.low=parseInt(t):r.cards[e]=Object(h.a)(Object(h.a)({},r.cards[e]),{},Object(Oe.a)({},"order",Object(Oe.a)({},"low",parseInt(t))))})),p=Bn(i),m={_id:i,type:a.droppableId,_childrens:p,_objectives:_.objectives.filter((function(e){return p[e._id]})).map((function(e){return e})),_goals:_.goals.filter((function(e){return p[e._id]})).map((function(e){return e}))},f(m),r.cards[i].type.indexOf("guideline")>-1&&"guideline"!==r.cards[i].type?$t({message:Dt("$__youCantMoveGuidelineWithSwotLinked",1),variant:"error",persist:!1,horizontal:"center"}):"guideline"===r.cards[i].type&&"guideline"!==a.droppableId&&(_.objectives.filter((function(e){return e._parent===i})).length>0||_.goals.filter((function(e){return e._parent===i})).length>0)||r.cards[i].type.indexOf("objective")>-1&&"guideline"!==a.droppableId&&"objective"!==a.droppableId&&_.goals.filter((function(e){return e._parent===i})).length>0?s(!0):$t({message:"".concat(Dt("$__confirmTransformIn",1),": ").concat(Dt("$__".concat(a.droppableId))),variant:"warning",persist:!0,horizontal:"right",confirm:function(){E(m)}});case 30:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),E=function(){var t=Object(Ee.a)(Pp().mark((function t(r){var n;return Pp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r,p&&p._id&&(n=p),t.next=4,xn(e,n);case 4:e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},n._id,Object(h.a)(Object(h.a)({},be.getState().db.cards[n._id]),{},{type:n.type})))})),f({});case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),O=function(){var t=Object(Ee.a)(Pp().mark((function t(r){var n;return Pp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n="goals"===r?p._goals:p._objectives,_[r].filter((function(e){return p._childrens[e._id]})).map(function(){var t=Object(Ee.a)(Pp().mark((function t(a,o){return Pp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.filter((function(e){return e._id===a._id})).map((function(e){e.type="goals"===r?"task":"goal"})),t.next=3,xn(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)}}()),f(Object(h.a)(Object(h.a)({},p),"goals"===r?{_goals:n}:{_objectives:n}));case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),j=function(){var t=Object(Ee.a)(Pp().mark((function t(){return Pp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,xn(e,{_id:p._id,type:p.type});case 2:s(!1),f({});case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),k=function(){var e=Object(Ee.a)(Pp().mark((function e(t){return Pp().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)}}(),S=function(){var e=Object(Ee.a)(Pp().mark((function e(t){return Pp().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 o.a.createElement("div",null,o.a.createElement(no.a,{onDragEnd:w,onDragStart:k,onDragUpdate:S},o.a.createElement(no.c,{droppableId:"ALL-COLUMNS-TYPE",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal"),isDropDisabled:!0},(function(t){return o.a.createElement(Ap,Object.assign({},e,{ref:t.innerRef}),x.map((function(t,r){var n={name:t.label,icon:t.icon,cards:[],emptyHide:!1};return o.a.createElement(zd,Object.assign({},e,{key:t.value,columnId:t.type,isDropDisabled:!0,column:n,cards:_&&_[t.value]?_[t.value]:[],index:r,columnsSettings:!1,locked:!1,columnStyle:{minWidth:"200px"},viewButton:t.viewButton,isCombineEnabled:!0,inLineAdd:!0,selectedParent:t.selectedParent,cardColorPicker:!!e.showColors}))})),t.placeholder)}))),o.a.createElement(Xo.a,{fullWidth:!0,"aria-labelledby":"simple-dialog-title",open:l},o.a.createElement("div",{style:{position:"relative",marginLeft:"10px",marginTop:"5px",width:"calc(100% - 10px)"}},o.a.createElement(ra,{title:Dt("$__attention",1),icon:"label",onCancel:function(){s(!1)}})),o.a.createElement("div",{style:{color:"#CCCCCC",padding:"15px"}},p._childrens&&!p._skipGoals&&p._goals.length>0&&p._goals.filter((function(e){return be.getState().db.cards[e._id]&&be.getState().db.cards[e._id].type===e.type})).length>0&&o.a.createElement(o.a.Fragment,null,o.a.createElement("span",{style:{color:"gray"}},"#NEED_TRANSLATE:: Voc\xea possui metas vinculadas aos objetivos/ou diretrizes que deseja migrar. Voc\xea deseja transformar essas metas em a\xe7\xf5es?",o.a.createElement("p",{style:{color:"red"}},"Essa a\xe7\xe3o s\xf3 pode ser desfeita manualmente")),p._goals.filter((function(e){return be.getState().db.cards[e._id]&&be.getState().db.cards[e._id].type===e.type})).sort((function(e,t){return be.getState().db.orderByTitle&&"ASC"===be.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()<t.name.toLowerCase().trim()||be.getState().db.orderByTitle&&"DESC"===be.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()>t.name.toLowerCase().trim()?-1:be.getState().db.orderByTitle?0:!be.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){var n;return o.a.createElement("div",{style:{width:"calc(100%)",display:"flex",alignItems:"center",justifyContent:"center"},key:t._id},o.a.createElement(ii,(n={db:"cards",data:t},Object(Oe.a)(n,"db","cards"),Object(Oe.a)(n,"noShadow",!0),n)),o.a.createElement(Ge.a,{onClick:function(){xn(e,{_id:t._id,type:"task"})}},o.a.createElement(wt,{icon:"change_circle",color:Mt("menu"),title:Dt("$__transformInTask")})))})),o.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},o.a.createElement(Ct,{shadow:!0,title:Dt("$__skipAll"),text:Dt("$__skipAll"),color:"lightgrey",icon:"skip_next",size:"25px",onClick:function(){f(Object(h.a)(Object(h.a)({},p),{},{_skipGoals:!0}))}}),o.a.createElement("div",{style:{marginLeft:"15px"}},o.a.createElement(Ct,{shadow:!0,title:Dt("$__changeAllInTasks"),text:Dt("$__changeAllInTasks"),icon:"change_circle",size:"25px",onClick:function(){O("goals"),f(Object(h.a)(Object(h.a)({},p),{},{_skipGoals:!0}))}})))),p._childrens&&!p._skipObjectives&&p._objectives.length>0&&p._objectives.filter((function(e){return be.getState().db.cards[e._id]&&be.getState().db.cards[e._id].type===e.type})).length>0&&o.a.createElement(o.a.Fragment,null,o.a.createElement("span",{style:{color:"gray"}},"#NEED_TRANSLATE:: Voc\xea possui OBJETIVOS vinculadas aos \xe0 diretriz que deseja migrar. Voc\xea deseja transformar em metas?",o.a.createElement("p",{style:{color:"red"}},"Essa a\xe7\xe3o s\xf3 pode ser desfeita manualmente")),p._objectives.filter((function(e){return be.getState().db.cards[e._id]&&be.getState().db.cards[e._id].type===e.type})).sort((function(e,t){return be.getState().db.orderByTitle&&"ASC"===be.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()<t.name.toLowerCase().trim()||be.getState().db.orderByTitle&&"DESC"===be.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()>t.name.toLowerCase().trim()?-1:be.getState().db.orderByTitle?0:!be.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 o.a.createElement("div",{style:{width:"calc(100%)",display:"flex",alignItems:"center",justifyContent:"center"},key:t._id},o.a.createElement(ii,{db:"cards",data:t,noShadow:!0}),o.a.createElement(Ge.a,{onClick:function(){xn(e,{_id:t._id,type:"goal"})}},o.a.createElement(wt,{icon:"change_circle",color:Mt("menu"),title:Dt("$__transformInGoal")})))})),o.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},o.a.createElement(Ct,{shadow:!0,title:Dt("$__skipAll"),text:Dt("$__skipAll"),color:"lightgrey",icon:"skip_next",size:"25px",onClick:function(){f(Object(h.a)(Object(h.a)({},p),{},{_skipObjectives:!0}))}}),o.a.createElement("div",{style:{marginLeft:"15px"}},o.a.createElement(Ct,{shadow:!0,title:Dt("$__changeAllInGoal"),text:Dt("$__changeAllInGoal"),icon:"change_circle",size:"25px",onClick:function(){O("objectives"),f(Object(h.a)(Object(h.a)({},p),{},{_skipObjectives:!0}))}}))),o.a.createElement("div",{style:{marginLeft:"15px"}},o.a.createElement(Ct,{shadow:!0,title:Dt("$__cancel"),text:Dt("$__cancel"),icon:"cancel",size:"25px",onClick:function(){s(!1)}}))),(p&&p._childrens&&Object.keys(p._childrens).length>0&&0===p._goals.filter((function(e){return be.getState().db.cards[e._id]&&be.getState().db.cards[e._id].type===e.type})).length&&0===p._objectives.filter((function(e){return be.getState().db.cards[e._id]&&be.getState().db.cards[e._id].type===e.type})).length||p._skipGoals&&p._goals.length>0&&p._skipObjectives&&p._objectives.length>0)&&o.a.createElement(o.a.Fragment,null,o.a.createElement("span",{style:{color:"red"}},"#NEED_TRANSLATE:: Clique em salvar para finalizar as migra\xe7\xf5es."),o.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},o.a.createElement(Ct,{shadow:!0,title:Dt("$__cancel"),text:Dt("$__cancel"),color:"lightgrey",icon:"close",size:"25px",onClick:function(){s(!1),f({})}}),o.a.createElement("div",{style:{marginLeft:"15px"}},o.a.createElement(Ct,{shadow:!0,title:Dt("$__save"),text:Dt("$__save"),icon:"done_all",size:"25px",onClick:function(){j()}})))))))})),zp=Object(De.a)(ou);var Mp=Object(_e.b)((function(e){return{store:{search:e.search,users:e.db.users}}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=zp(),r=be.getState(),n=r.session,a=r.search,i=r.db,c=o.a.useState(!1),l=Object(je.a)(c,2),s=l[0],u=l[1],d=o.a.useState(""),p=Object(je.a)(d,2),f=p[0],m=p[1],g=o.a.useState(""),y=Object(je.a)(g,2),v=y[0],b=y[1],x=o.a.useState(""),_=Object(je.a)(x,2),w=(_[0],_[1],o.a.useState("")),E=Object(je.a)(w,2),O=E[0],j=E[1],k=o.a.useState(""),S=Object(je.a)(k,2),L=S[0],C=S[1],I=[],F=window.location.hash.split("/");F[0]=F[0].replace("#",""),36!==F[0].length&&(F[0]=null);var T=window.location.pathname.split("/"),N="/".concat(T[1]),P=1;if(F[0]){var A=i.cards[F[0]]||{};(P=A&&A._users&&Object.keys(A._users).length>0?A._users[Object.keys(A._users).find((function(e){return e.indexOf(n._id)>-1}))]:0)&&P.access&&(P=P.access)}var D=function(t){be.getState().search.users.selected[t]&&Object.keys(be.getState().search.users.selected).filter((function(e){return be.getState().search.users.selected[e]})).length<=1?e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},be.getState().search),{},{users:Object(h.a)(Object(h.a)({},be.getState().search.users),{},{selected:{}})})):e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},be.getState().search),{},{users:Object(h.a)(Object(h.a)({},be.getState().search.users),{},{selected:Object(h.a)(Object(h.a)({},be.getState().search.users.selected&&be.getState().search.users.selected),{},Object(Oe.a)({},t,!be.getState().search.users.selected[t]))})}))},z=function(e){be.getState().search.groups.selected&&Object.keys(be.getState().search.groups.selected).length>0?$t({message:Dt("$__alertGroupsFilterClear",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){M(e,!0)}}):M(e,!1)},M=function(t,r){be.getState().search.units.selected[t]&&Object.keys(be.getState().search.units.selected).filter((function(e){return be.getState().search.units.selected[e]})).length<=1?e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},be.getState().search),{},{units:Object(h.a)(Object(h.a)({},be.getState().search.units),{},{selected:{}})},r?{groups:{selected:{}}}:{})):e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},be.getState().search),{},{units:Object(h.a)(Object(h.a)({},be.getState().search.units),{},{selected:Object(h.a)(Object(h.a)({},be.getState().search.units.selected&&be.getState().search.units.selected),{},Object(Oe.a)({},t,!be.getState().search.units.selected[t]))})},r?{groups:{selected:{}}}:{}))},B=function(t){be.getState().search.plans.selected[t]&&Object.keys(be.getState().search.plans.selected).filter((function(e){return be.getState().search.plans.selected[e]})).length<=1?e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},be.getState().search),{},{plans:Object(h.a)(Object(h.a)({},be.getState().search.plans),{},{selected:{}})})):e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},be.getState().search),{},{plans:Object(h.a)(Object(h.a)({},be.getState().search.plans),{},{selected:Object(h.a)(Object(h.a)({},be.getState().search.plans.selected&&be.getState().search.plans.selected),{},Object(Oe.a)({},t,!be.getState().search.plans.selected[t]))})}))};return F[1]&&ff.filter((function(e){return e.path===N})).length>0&&ff.filter((function(e){return e.path===N}))[0].tabs&&ff.filter((function(e){return e.path===N}))[0].tabs.length>0?(ff.filter((function(e){return e.path===N}))[0].tabs&&ff.filter((function(e){return e.path===N}))[0].tabs).map((function(e){e.path===F[1]&&(I=e.searchFields)})):ff.filter((function(e){return e.path===N})).length>0&&ff.filter((function(e){return e.path===N}))[0].searchFields&&(I=ff.filter((function(e){return e.path===N}))[0].searchFields),o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{position:"relative",width:"100%",padding:"0px",marginBottom:"15px"}},I&&I.length>0&&I.indexOf("text")>-1&&o.a.createElement("div",{className:t.textField,style:{width:"100%"}},o.a.createElement(Qn,{className:t.noLabelLight,label:Dt("$__search","*"),variant:"standard",autoFocus:!0,value:a.text,InputProps:{endAdornment:o.a.createElement(Fa.a,{position:"start"},o.a.createElement(wt,{color:Mt("color")},"search")),onChange:function(t){e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},be.getState().search),{},{text:t.target.value}))},onKeyDown:function(e){"27"===String(e.which)&&u(!1)}}})),I.indexOf("period")>-1&&o.a.createElement(o.a.Fragment,null,"PERIOD"),I.indexOf("date")>-1?o.a.createElement(o.a.Fragment,null,o.a.createElement(Pc,{type:"datetime",onChangeStartDate:function(t){var r={startDate:Fe()(t).unix("x")};(!be.getState().search.cards.endDate||be.getState().search.cards.endDate<Fe()(t).unix("x"))&&(r=Object(h.a)(Object(h.a)({},r),{},{endDate:Fe()("".concat(Fe()(t).format("YYYY-MM-DD")," 23:59:59")).add(1,"week").unix("X")})),e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},be.getState().search),{},{cards:Object(h.a)(Object(h.a)({},be.getState().search.cards),r)}))},onChangeEndDate:function(t){e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},be.getState().search),{},{cards:Object(h.a)(Object(h.a)({},be.getState().search.cards),{},{endDate:Fe()(t).unix("x")})}))},range:!0,startDate:be.getState().search.cards.startDate?new Date(1e3*be.getState().search.cards.startDate):null,endDate:be.getState().search.cards.endDate?new Date(1e3*be.getState().search.cards.endDate):null,onClear:function(){e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},be.getState().search),{},{cards:Object(h.a)(Object(h.a)({},be.getState().search.cards),{},{startDate:null,endDate:null})}))}})):o.a.createElement(o.a.Fragment,null),I.indexOf("tags")>-1?o.a.createElement(Xi,{dbNode:"tag",options:be.getState().db.tag,style:{width:"100%"},name:"tag",ws:!0,multiple:!0,value:a.tags,placeholder:Dt("$__tags"),onChange:function(t){e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},be.getState().search),{},{tags:t}))}}):o.a.createElement(o.a.Fragment,null),I.indexOf("status")>-1&&o.a.createElement(Dl.a,{style:{width:"100%",padding:0}},o.a.createElement(Ml.a,{style:{minWidth:"100%"},expandIcon:o.a.createElement(wt,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},o.a.createElement("div",{style:{color:Mt("color"),fontSize:"16px"}},o.a.createElement("div",{style:{position:"relative",float:"left"}},Dt("$__status")),Object.keys(a.cards.status).map((function(e,t){if(a.cards.status[e]&&"all"!==e)return o.a.createElement(xt.a,{title:Dt(i.status.filter((function(t){return t.value===e}))[0].label,1),key:t},o.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"}}))})))),o.a.createElement(zl.a,{style:{minWidth:"100%"}},o.a.createElement($l.a,{style:{width:"100%"}},o.a.createElement(Bl.a,{style:{minWidth:"100%"},control:o.a.createElement(Ia,{checked:!(!be.getState().search.cards.status||!be.getState().search.cards.status.all),onChange:function(){var t={};i.status.map((function(e){t=Object(h.a)(Object(h.a)({},t),{},Object(Oe.a)({},e.value,!be.getState().search.cards.status.all))})),e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},be.getState().search),{},{cards:Object(h.a)(Object(h.a)({},be.getState().search.cards),{},{status:Object(h.a)(Object(h.a)({},t),{},{all:!be.getState().search.cards.status.all})})}))},color:"default"}),label:Dt("$__allStatus")}),i.status.map((function(t,r){return o.a.createElement(o.a.Fragment,{key:r},o.a.createElement(Bl.a,{style:{minWidth:"100%"},control:o.a.createElement(Ia,{indeterminate:!!be.getState().search.cards.status.all,checked:!(!be.getState().search.cards.status||!be.getState().search.cards.status[t.value]),onChange:function(){var r=be.getState().search.cards.status;r.all&&i.status.map((function(e){r[e.value]=!1,r.all=!1})),e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},be.getState().search),{},{cards:Object(h.a)(Object(h.a)({},be.getState().search.cards),{},{status:Object(h.a)(Object(h.a)({},r),{},Object(Oe.a)({},t.value,!!r.all||!be.getState().search.cards.status[t.value]))})}))},color:"default"}),label:Dt(t.label)}))}))))),I.indexOf("priority")>-1&&o.a.createElement(Dl.a,{style:{width:"100%"}},o.a.createElement(Ml.a,{style:{minWidth:"100%"},expandIcon:o.a.createElement(wt,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},o.a.createElement("div",{style:{color:Mt("color"),fontSize:"16px"}},o.a.createElement("div",{style:{position:"relative",float:"left"}},Dt("$__priority")),Object.keys(a.cards.priority).map((function(e,t){if(a.cards.priority[e]&&"all"!==e)return o.a.createElement(xt.a,{title:Dt(i.priority.filter((function(t){return String(t.value)===String(e)}))[0].label,1),key:t},o.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"}}))})))),o.a.createElement(zl.a,{style:{minWidth:"100%"}},o.a.createElement($l.a,{style:{width:"100%"}},o.a.createElement(Bl.a,{style:{minWidth:"100%"},control:o.a.createElement(Ia,{checked:!(!be.getState().search.cards.priority||!be.getState().search.cards.priority.all),onChange:function(){var t=be.getState().search.cards.priority;t.all?i.priority.map((function(e){t[String(e.value)]=!1})):i.priority.map((function(e){t[String(e.value)]=!0})),e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},be.getState().search),{},{cards:Object(h.a)(Object(h.a)({},be.getState().search.cards),{},{priority:Object(h.a)(Object(h.a)({},t),{},{all:!be.getState().search.cards.priority.all})})}))},color:"default"}),label:Dt("$__allPriorities")}),i.priority.map((function(t,r){return o.a.createElement(o.a.Fragment,{key:r},o.a.createElement(Bl.a,{style:{minWidth:"100%",borderLeft:"3px solid ".concat(t.color)},control:o.a.createElement(Ia,{indeterminate:!(!be.getState().search.cards.priority||!be.getState().search.cards.priority.all),checked:!(!be.getState().search.cards.priority||!be.getState().search.cards.priority[t.value]),onChange:function(){var r=be.getState().search.cards.priority;r.all&&i.priority.map((function(e){r[String(e.value)]=!1,r.all=!1})),e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},be.getState().search),{},{cards:Object(h.a)(Object(h.a)({},be.getState().search.cards),{},{priority:Object(h.a)(Object(h.a)({},r),{},Object(Oe.a)({},t.value,!!r.all||!be.getState().search.cards.priority[t.value]))})}))},color:"default"}),label:Dt(t.label)}))}))))),i.users&&Object.keys(i.users).length>0&&Object.keys(i.users).filter((function(e){return i.users[e]&&i.users[e].type&&"user"!==i.users[e].type&&!i.users[e].deleted&&Object.keys(i.cards).filter((function(t){return i.cards[t]&&i.cards[t].client&&i.cards[t].client===e&&i.cards[t]._users&&i.cards[t]._users[n._id]})).length>0})).length>0&&I.indexOf("units")>-1&&a&&a.groups&&a.groups.selected&&0===Object.keys(a.groups.selected).length&&a.plans&&a.plans.selected&&0===Object.keys(a.plans.selected).length&&o.a.createElement(Dl.a,{style:{width:"100%"}},o.a.createElement(Ml.a,{style:{minWidth:"100%"},expandIcon:o.a.createElement(wt,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},o.a.createElement("div",{style:{color:Mt("color"),fontSize:"16px"}},Dt("$__units"),o.a.createElement(la.a,{max:6},Object.keys(be.getState().search.units.selected).length>0&&Object.keys(be.getState().search.units.selected).map((function(e,t){return"unassigned"!==e&&be.getState().search.units.selected[e]?o.a.createElement(xt.a,{title:i.users[e].name,key:t},o.a.createElement(Fr.a,{alt:i.users[e].name,src:i.users[e].image||null},i.users[e].name.substr(0,1))):"unassigned"===e&&be.getState().search.units.selected[e]&&o.a.createElement(xt.a,{title:Dt("$__unassigned",1),key:t},o.a.createElement(Fr.a,{alt:Dt("$__unassigned",1),src:Nr.a},Dt("$__unassigned",1)))}))))),o.a.createElement(zl.a,{style:{minWidth:"100%"}},o.a.createElement($l.a,{style:{width:"100%"}},o.a.createElement(Qn,{className:t.noLabelLight,label:Dt("$__search","*"),variant:"standard",autoFocus:!0,value:O,InputProps:{endAdornment:o.a.createElement(Fa.a,{position:"start"},o.a.createElement(wt,{color:Mt("color")},"search")),onChange:function(e){j(e.target.value)}}}),o.a.createElement(Bl.a,{style:{minWidth:"100%"},control:o.a.createElement(o.a.Fragment,null,o.a.createElement(Fr.a,{alt:"NA",src:Nr.a},Dt("$__unassigned",1)),o.a.createElement(Ia,{checked:!(!be.getState().search.units.selected||!be.getState().search.units.selected.unassigned),onChange:function(){z("unassigned")},color:"default"})),label:Dt("$__unassigned")}),Object.keys(i.users).filter((function(e){return"user"!==i.users[e].type&&!i.users[e].deleted&&Object.keys(i.cards).filter((function(t){return i.cards[t]&&i.cards[t].client&&i.cards[t].client===e&&i.cards[t]._users&&i.cards[t]._users[n._id]})).length>0&&(""===O||i.users[e].name.toLowerCase().indexOf(O.toLowerCase())>-1)})).map((function(e){return o.a.createElement(o.a.Fragment,{key:e},o.a.createElement(Bl.a,{key:e,style:{minWidth:"100%"},control:o.a.createElement(o.a.Fragment,null,o.a.createElement(Fr.a,{alt:i.users[e].name,src:i.users[e].image||null},i.users[e].name.substr(0,1)),o.a.createElement(Ia,{checked:!(!be.getState().search.units.selected||!be.getState().search.units.selected[e]),onChange:function(){z(e)},color:"default"})),label:i.users[e].name||i.users[e].name}))}))))),i.users&&Object.keys(i.users).length>0&&I.indexOf("users")>-1&&o.a.createElement(Dl.a,{style:{width:"100%"}},o.a.createElement(Ml.a,{style:{minWidth:"100%"},expandIcon:o.a.createElement(wt,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},o.a.createElement("div",{style:{color:Mt("color"),fontSize:"16px"}},Dt("$__users"),o.a.createElement(la.a,{max:6},Object.keys(be.getState().search.users.selected).length>0&&Object.keys(be.getState().search.users.selected).map((function(e,t){return"unassigned"!==e&&be.getState().search.users.selected[e]?o.a.createElement(xt.a,{title:i.users[e].name,key:t},o.a.createElement(Fr.a,{alt:i.users[e].name,src:i.users[e].image||null},i.users[e].name.substr(0,1))):"unassigned"===e&&be.getState().search.users.selected[e]&&o.a.createElement(xt.a,{title:Dt("$__unassigned",1),key:t},o.a.createElement(Fr.a,{alt:Dt("$__unassigned",1),src:Nr.a},Dt("$__unassigned",1)))}))))),o.a.createElement(zl.a,{style:{minWidth:"100%"}},o.a.createElement($l.a,{style:{width:"100%"}},o.a.createElement("div",{style:{position:"relative",display:"flex",width:"100%",alignItems:"center"}},o.a.createElement(ec,{checked:v,onChange:function(){b((function(e){return!e}))},name:"showAllUsers",inputProps:{"aria-label":"secondary checkbox"}}),Dt("$__showAllUsers",1)),o.a.createElement("div",{style:{position:"relative",display:"flex",width:"100%",alignItems:"center"}},o.a.createElement(Fr.a,{alt:"NA",src:Nr.a},Dt("$__unassignedsgl",1)),o.a.createElement(Ia,{checked:!(!be.getState().search.users.selected||!be.getState().search.users.selected.unassigned),onChange:function(){D("unassigned")},color:"default"})),o.a.createElement(Qn,{className:t.noLabelLight,label:Dt("$__search","*"),variant:"standard",autoFocus:!0,value:f,InputProps:{endAdornment:o.a.createElement(Fa.a,{position:"start"},o.a.createElement(wt,{color:Mt("color")},"search")),onChange:function(e){m(e.target.value)}}}),Object.keys(i.users).filter((function(e){return"user"===i.users[e].type&&!i.users[e].deleted&&(0===Object.keys(a.units.selected).length||Object.keys(a.units.selected).length>0&&Object.keys(a.units.selected).filter((function(t){return t===e})).length>0)&&(""===f||""!==f&&(i.users[e]&&i.users[e].name&&i.users[e].name.toLowerCase().indexOf(f.toLowerCase())>-1||i.users[e].email.toLowerCase().indexOf(f.toLowerCase())>-1))})).sort((function(e,t){return i.users[e].name.trim().toLowerCase()<i.users[t].name.trim().toLowerCase()?-1:i.users[e].name.trim().toLowerCase()>i.users[t].name.trim().toLowerCase()?1:0})).map((function(e){return i.users&&i.users[e]&&i.users[e]._id&&o.a.createElement(o.a.Fragment,{key:e},o.a.createElement(Bl.a,{key:e,style:{minWidth:"100%"},control:o.a.createElement(o.a.Fragment,null,o.a.createElement(St.a,{color:"secondary"},o.a.createElement(si,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},variant:n.users&&n.users[i.users[e]._id]?"dot":"standard"},o.a.createElement(Fr.a,{alt:i.users[e].name,src:i.users[e].image||null},i.users[e].name.substr(0,1)))),o.a.createElement(Ia,{checked:!(!be.getState().search.users.selected||!be.getState().search.users.selected[e]),onChange:function(){D(e)},color:"default"})),label:i.users[e].name}))}))))),Object.keys(i.cards).filter((function(e){return"plan"===i.cards[e].type&&!i.cards[e].deleted&&!i.cards[e].archived&&i.cards[e]._users&&i.cards[e]._users[n._id]&&Object.keys(i.cards).filter((function(t){return!i.cards[t].deleted&&i.cards[t]._planId===e&&i.cards[t]._users&&i.cards[t]._users[n._id]})).length>0})).length>0&&I.indexOf("plans")>-1&&o.a.createElement(Dl.a,{style:{width:"100%"}},o.a.createElement(Ml.a,{style:{minWidth:"100%"},expandIcon:o.a.createElement(wt,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},o.a.createElement("div",{style:{color:Mt("color"),fontSize:"16px"}},Dt("$__plans"),o.a.createElement(la.a,{max:6},Object.keys(be.getState().search.plans.selected).length>0&&Object.keys(be.getState().search.plans.selected).map((function(e,t){return"unassigned"!==e&&be.getState().search.plans.selected[e]?o.a.createElement(xt.a,{title:i.cards[e].name,key:t},o.a.createElement(Fr.a,{alt:i.cards[e].name,src:i.cards[e].image||null,style:{width:33,height:33}},i.cards[e].name.substr(0,1))):"unassigned"===e&&be.getState().search.plans.selected[e]&&o.a.createElement(xt.a,{title:Dt("$__unassigned",1),key:t},o.a.createElement(Fr.a,{alt:Dt("$__unassigned",1),src:Nr.a},Dt("$__unassigned",1)))}))))),o.a.createElement(zl.a,{style:{minWidth:"100%",width:"100%"}},o.a.createElement($l.a,{style:{width:"100%"}},o.a.createElement(Qn,{className:t.noLabelLight,label:Dt("$__search","*"),variant:"standard",autoFocus:!0,value:L,InputProps:{endAdornment:o.a.createElement(Fa.a,{position:"start"},o.a.createElement(wt,{color:Mt("color")},"search")),onChange:function(e){C(e.target.value)}}}),o.a.createElement(Bl.a,{style:{minWidth:"100%"},control:o.a.createElement(o.a.Fragment,null,o.a.createElement(Fr.a,{alt:"NA",src:Nr.a},Dt("$__unassigned",1)),o.a.createElement(Ia,{checked:!(!be.getState().search.plans.selected||!be.getState().search.plans.selected.unassigned),onChange:function(){B("unassigned")},color:"default"})),label:Dt("$__unassigned")}),Object.keys(i.cards).filter((function(e){return"plan"===i.cards[e].type&&!i.cards[e].deleted&&!i.cards[e].archived&&i.cards[e]._users&&i.cards[e]._users[n._id]&&Object.keys(i.cards).filter((function(t){return!i.cards[t].deleted&&i.cards[t]._planId===e&&i.cards[t]._users&&i.cards[t]._users[n._id]})).length>0&&(0===Object.keys(a.units.selected).length&&0===Object.keys(a.groups.selected).length||Object.keys(a.units.selected).length>0&&Object.keys(a.units.selected).filter((function(t){return t===i.cards[e].client})).length>0||Object.keys(a.groups.selected).length>0&&Object.keys(a.groups.selected).filter((function(t){return t===i.cards[e].client})).length>0)&&(""===L||i.cards[e].name.toLowerCase().indexOf(L.toLowerCase())>-1)})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})).map((function(e){return o.a.createElement(o.a.Fragment,{key:e},o.a.createElement(Bl.a,{key:e,style:{width:"calc(100% - 15px)",paddingRight:"15px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},control:o.a.createElement(o.a.Fragment,null,o.a.createElement(Fr.a,{alt:i.cards[e].name,src:i.cards[e].image||null},i.cards[e].name.substr(0,1)),o.a.createElement(Ia,{checked:!(!be.getState().search.plans.selected||!be.getState().search.plans.selected[e]),onChange:function(){B(e)},color:"default"})),label:i.cards[e].name||i.cards[e].name,title:i.cards[e].name||i.cards[e].name}))}))))),o.a.createElement("div",{style:{padding:"5px",width:"100%",display:"flex",justifyContent:"flex-end"},onClick:function(){u(!s)}},o.a.createElement(Ir,{reverse:!0,icon:"clear_all",text:Dt("$__clearFilter","*"),onClick:function(){e.reduxFunction("ASYNC","SEARCH_CLEAR",{})}}))))})),Bp=Object(De.a)((function(e){return{iconButtonStyleTransaparent:{padding:3,margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},iconButtonStyleWhite:{padding:3,margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));var $p=function(e){var t=Bp(),r=o.a.useState(!1),n=Object(je.a)(r,2),a=n[0],i=n[1],c=o.a.useRef(null),l=function(t){c.current&&c.current.contains(t.target)||(i(!1),e.onClose&&e.onClose())};return o.a.createElement("div",{style:Object(h.a)({zIndex:"100 !important"},e.style?e.style:{})},o.a.createElement(xt.a,{title:Dt("$__options",1)},e.hideText?o.a.createElement(kt.a,{ref:c,"aria-controls":a?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){i((function(e){return!e})),!a&&e.onOpen&&e.onOpen(),a&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},o.a.createElement(wt,{usePropagation:!0,size:e.size?e.size:"20px",color:e.btColor?e.btColor:Mt("menu"),icon:e.icon?e.icon:e.horizontalButton?"more_horiz":"more_vert"})):o.a.createElement(Ge.a,{ref:c,"aria-controls":a?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){i((function(e){return!e})),!a&&e.onOpen&&e.onOpen(),a&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},o.a.createElement(o.a.Fragment,null,o.a.createElement("span",{style:{marginRight:"15px",color:e.textColor?e.textColor:e.color?e.color:Mt("menu"),overflow:"hidden",textOverflow:"ellipsis",width:"90%",maxWidth:e.maxWidth?e.maxWidth:"90%",whiteSpace:"nowrap"}},Dt("$__filter")),o.a.createElement(wt,{usePropagation:!0,size:e.size?e.size:"20px",color:e.btColor?e.btColor:Mt("menu"),icon:"filter_alt"})))),o.a.createElement(Rr.a,{open:a,anchorEl:c.current,role:void 0,transition:!0,style:{zIndex:"100 !important"}},(function(e){var t=e.TransitionProps;e.placement;return o.a.createElement($r.a,Object.assign({},t,{style:{transformOrigin:"right center",zIndex:"100 !important"}}),o.a.createElement(Yr.a,null,o.a.createElement(Br.a,{onClickAway:l},o.a.createElement("div",{style:{padding:"15px"}},o.a.createElement(Mp,{onChange:function(e){console.log(e)}})))))})))};function Yp(){Yp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Rp=Object(_e.b)((function(){return{}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState().db,r=o.a.useState(!1),n=Object(je.a)(r,2),a=n[0],i=n[1],c=o.a.useState(!0),l=Object(je.a)(c,2),s=l[0],u=l[1],d=o.a.useState(!1),p=Object(je.a)(d,2),f=p[0],m=p[1],g=o.a.useState(!1),y=Object(je.a)(g,2),v=y[0],b=y[1],x=o.a.useState(!1),_=Object(je.a)(x,2),w=_[0],E=_[1],O=window.location.hash.split("/");O[0]=O[0].replace("#",""),o.a.useEffect((function(){return function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(h.a)(Object(h.a)({},be.getState().controls),{},{deleted:!1}))}}),[]),o.a.useEffect((function(){v&&j()}),[v]);var j=function(){var t=Object(Ee.a)(Yp().mark((function t(){var r;return Yp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return E(!0),(r=window.location.hash.split("/"))[0]=r[0].replace("#",""),t.next=5,ln(e,{idRel:r[0],cardLoad:"deleted"});case 5:t.sent&&E(!1);case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),k=0;return Object.keys(t.cards).filter((function(e){var r=Gn(e);if(t.cards[e]&&!t.cards[e].deleted&&(t.cards[e]._planId===O[0]||t.cards[e]._parent===O[0])&&(a||!a&&"completed"!==t.cards[e].status)&&r.total>0)return!0})).map((function(e){var t=Gn(e);k+=t.total})),o.a.createElement("div",null,o.a.createElement(Ro,{md:12,sm:12,xs:12},o.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},o.a.createElement($p,{style:{marginRight:"7px"}}),o.a.createElement(Kr,{text:Dt("$__options"),icon:"settings",horizontalButton:!0,size:"21px",color:"lightgray",btColor:"lightgray",options:[{name:"ASC"===t.orderByTitlePosition?Dt("$__orderByAsc"):Dt("$__orderByDesc"),icon:"ASC"===t.orderByTitlePosition?"text_rotation_down":"text_rotate_up",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{orderByTitlePosition:"ASC"===t.orderByTitlePosition?"DESC":"ASC"}))}},{name:Dt(s?"$__hideCatenationColors":"$__showCatenationColors"),icon:"palette",color:s?"lightGray":Mt("menu"),onClick:function(){u((function(e){return!e}))}}]}),o.a.createElement("div",{style:{marginLeft:"7px",display:"flex",alignItems:"center"}},o.a.createElement(Ct,{title:Dt(a?"$__hideCompleted":"$__showCompleted","*"),text:Dt(a?"$__hideCompleted":"$__showCompleted","*"),color:a?Mt("menu"):"lightGray",icon:a?"toggle_on":"toggle_off",onClick:function(){i((function(e){return!e}))},size:"21px",style:{padding:"0px !important"}}),k>0?o.a.createElement(Ct,{title:Dt(f?"$__hideUnreaded":"$__showUnreaded","*"),text:Dt(f?"$__hideUnreaded":"$__showUnreaded","*"),color:f?Mt("menu"):"lightGray",icon:f?"toggle_on":"toggle_off",onClick:function(){m((function(e){return!e}))},badgeContent:k,size:"21px",style:{marginLeft:"7px",padding:"0px !important"}}):o.a.createElement(o.a.Fragment,null),o.a.createElement("div",{style:{marginLeft:15}},o.a.createElement(Ct,{title:be.getState().controls.deleted?Dt("$__hideDeleted"):Dt("$__showDeleted"),color:be.getState().controls.deleted?"red":"lightgray",load:w,icon:"recycling",onClick:function(){b((function(e){return!e})),e.reduxFunction("ASYNC","SET_CONTROL",Object(h.a)(Object(h.a)({},be.getState().controls),{},{deleted:!v}))},size:"21px",style:{padding:"0px !important"}}))))),o.a.createElement(Ro,{md:12,style:{marginLeft:"-30px"}},o.a.createElement(Dp,{nodeId:O[0]||null,showCompleted:a,showColors:s,onlyUnReaded:f})))}));var Gp=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(lu)((function(e){e.classes;var t=be.getState(),r=t.db,n=t.search,a=o.a.useState(0),i=Object(je.a)(a,2),c=i[0],l=i[1],s=o.a.useState(25),u=Object(je.a)(s,2),d=u[0],p=u[1],f=o.a.useState(!1),h=Object(je.a)(f,2),m=(h[0],h[1],window.location.hash.split("/"));m[0]=m[0].replace("#","");var g={};return g=36===m[0].length?(g=Object.keys(r.cards).filter((function(e){return r.cards[e]._parent&&r.cards[e]._parent===m[0]&&"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})),o.a.createElement("div",{style:{position:"relative",justifyContent:"space-between",margin:"auto",width:"100%"}},Object.keys(g).length>25&&o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Dt("$__page")," ",c+1," ",Dt("$__of")," ",Math.ceil(Object.keys(g).length/d),o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},o.a.createElement(qs.a,{component:"div",count:Object.keys(g).length,page:c,onChangePage:function(e,t){l(t)},rowsPerPage:d,onChangeRowsPerPage:function(e){p(parseInt(e.target.value,10))},labelRowsPerPage:Dt("$__cardsPerPage")}))),o.a.createElement(Bo,null,Object.keys(g).map((function(e,t){if(t<=(c+1)*d&&t>=c*d)return o.a.createElement(Ro,{key:g[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},o.a.createElement(ii,{db:"cards",data:g[e],expanded:!0,Avatar:!0,Resume:!0}))}))),Object.keys(g).length>25&&o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Dt("$__page")," ",c+1," ",Dt("$__of")," ",Math.ceil(Object.keys(g).length/d),o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},o.a.createElement(qs.a,{component:"div",count:Object.keys(g).length,page:c,onChangePage:function(e,t){l(t)},rowsPerPage:d,onChangeRowsPerPage:function(e){p(parseInt(e.target.value,10))},labelRowsPerPage:Dt("$__cardsPerPage")}))))}))),Hp=r(462),Wp=r.n(Hp);var Up=Object(_e.b)((function(e){return{store:{plans:Object.keys(e.db.cards).filter((function(t){return"plan"===e.db.cards[t].type}))}}}),(function(e){return Object(s.b)(n,e)}))(Object(a.memo)((function(e){var t=be.getState(),r=t.db,n=t.session,a=t.search,i=Ut(),c=window.location.hash.split("/");c[0]=c[0].replace("#","");var l=[];return l=Object.keys(r.cards).filter((function(e){return"plan"===r.cards[e].type&&!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]})),l=i&&!i.owner&&!i.planAdmin&&!i.planEdit&&!i.planRead&&!i.planModerate&&r.cards&&n&&n._id||!r.adminView?Object.keys(r.cards).filter((function(e){return"plan"===r.cards[e].type&&r.cards[e]&&(!r.cards[e].private||r.cards[e].private&&r.cards[e]._users&&r.cards[e]._users[n._id])&&("templates"===c[1]||"templates"!==c[1]&&r.cards[e]._users&&Object.keys(r.cards[e]._users).filter((function(e){return e===n._id})).length>0||"admin"===c[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"plan"===r.cards[e].type&&r.cards[e]&&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]})),console.log(l.filter((function(e){if(e.isTemplate)return!0})).map((function(e){return e})).length),a.text&&(l=l.filter((function(e){return!!(e&&e.name&&e.name.toLowerCase().indexOf(a.text.toLowerCase())>-1)})).map((function(e){return e}))),l=(l=l.filter((function(e){return!!(e&&e.status&&a.cards.status[e.status]||!e.status&&a.cards.status.notStarted)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.priority&&a.cards.priority[e.priority]||a.cards.priority.null&&!e.priority)})).map((function(e){return e})),Object.keys(a.users.selected).length>0&&(l=l.filter((function(e){var t=!1;if(!a.users.selected.unassigned||e._users&&0!==Object.keys(e._users).length){if(!a.users.selected.unassigned&&e&&e._users&&Object.keys(e._users).length>0)return Object.keys(e._users).filter((function(e){a.users.selected[e]&&(t=!0)})),t}else t=!0})).map((function(e){return e}))),Object.keys(a.units.selected).length>0&&(l=l.filter((function(e){return!(!a.units.selected.unassigned||e.client)||(!(!e.client||!a.units.selected[e.client]||!0!==a.units.selected[e.client])||void 0)})).map((function(e){return e}))),a.tags.length>0&&(l=l.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return a.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),o.a.createElement(Bo,{style:{marginTop:"7px"}},l&&l.length>0&&l.filter((function(e){if(!e.deleted&&(!e._planId||e._planId&&0===l.filter((function(t){return t._id===e._planId})).length)&&("templates"!==c[1]&&!e.isTemplate||"templates"===c[1]&&e.isTemplate)&&("archived"===c[1]&&e.archived||"archived"!==c[1]&&!e.archived))return!0})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})).map((function(e){var t;return o.a.createElement(Ro,{key:e._id,xs:12,sm:6,md:4,lg:3,xl:2},o.a.createElement(ii,(t={db:"cards",data:e},Object(Oe.a)(t,"db","cards"),Object(Oe.a)(t,"Avatar",!0),Object(Oe.a)(t,"expanded",!0),Object(Oe.a)(t,"ignoreList",!0),t)))})),r.loaded&&(!l||0===l.length)&&o.a.createElement("div",{style:{width:"100%",height:"calc(100vh - 150px)",display:"flex",alignItems:"center",justifyContent:"center"}},o.a.createElement("img",{src:Wp.a})))}))),Vp=r(484),qp=r.n(Vp),Xp=r(485),Kp=r.n(Xp);function Jp(){Jp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Zp=function(e){var t=be.getState().db.users,r=be.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 o.a.createElement("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap"}},Object.keys(t).filter((function(r){return t[r]&&t[r]._parent===e.id})).length>0&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{width:"100%"}},Dt("$__users",1),":"),o.a.createElement(la.a,{max:12},Object.keys(t).filter((function(r){return t[r]&&t[r]._parent===e.id})).map((function(e,r){return o.a.createElement(xt.a,{title:t[e].name,key:e},o.a.createElement(Fr.a,{alt:t[e].name,src:t[e].image||null,style:{width:"23px",height:"23px"}},t[e].name.substr(0,1)))})))),n.length>0&&o.a.createElement("div",{style:{width:"100%"}},n.map((function(e,t){return o.a.createElement("div",{key:"".concat(e._id,"-").concat(t)},o.a.createElement(ii,{data:e,db:"cards",Avatar:!1,expanded:!1,ignoreList:!0,notGlobalExpanded:!0}))}))))},Qp=Object(_e.b)((function(e){return{store:e}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Ni)((function(e){var t=e.data,r=(e.classes,be.getState()),n=r.db,a=r.session,i=o.a.useState(!1),c=Object(je.a)(i,2),s=c[0],u=c[1],d=o.a.useState(null),p=Object(je.a)(d,2),f=p[0],m=p[1];Fe()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),o.a.useEffect((function(){s||(u(!0),g())}));var g=function(){var e=Object(Ee.a)(Jp().mark((function e(){return Jp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),y=window.location.hash.split("/");y[0]=y[0].replace("#","");var v=[],b={};return Object.keys(n.cards).filter((function(e){return!!(n.cards[e]&&"chatGroup"!==n.cards[e].type&&"link"!==n.cards[e].type&&"insight"!==n.cards[e].type&&n.cards[e]._users&&Object.keys(n.cards[e]._users).length>0&&1===Object.keys(n.cards[e]._users).filter((function(e){return e===t._id})).length)})).map((function(e){if(n.dataType.filter((function(t){return t.name===n.cards[e].type}))[0]&&n.dataType.filter((function(t){return t.name===n.cards[e].type}))[0].module&&"swot"!==n.dataType.filter((function(t){return t.name===n.cards[e].type}))[0].module||"swot"===n.dataType.filter((function(t){return t.name===n.cards[e].type}))[0].module){var t,r;if("completed"!==n.cards[e].status)b=Object(h.a)(Object(h.a)({},b),{},(t={},Object(Oe.a)(t,n.cards[e].status,b&&b[n.cards[e].status]?b[n.cards[e].status]+1:1),Object(Oe.a)(t,"total",b.total?b.total+1:1),Object(Oe.a)(t,"late",n.cards[e].endDate&&Fe()(new Date(1e3*n.cards[e].endDate)).tz("America/Sao_Paulo").format()<=Fe()().tz("America/Sao_Paulo").format()?b.late?b.late+1:1:b.late?b.late:0),t));else b=Object(h.a)(Object(h.a)({},b),{},(r={},Object(Oe.a)(r,"completed",b&&b.completed?b.completed+1:1),Object(Oe.a)(r,"total",b.total?b.total+1:1),r));v[n.cards[e].type]=v[n.cards[e].type]?v[n.cards[e].type]+1:1}else v.swot=null==v.swot?1:v.swot+1})),v=[],b={},e.expanded?o.a.createElement("div",{style:Object(h.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},o.a.createElement("div",{style:{backgroundColor:Mt("menu"),height:"43px",paddingLeft:"60px",fontSize:"12px",color:"#FFFFFF",fontWeight:"bold",textOverflow:"ellipsis ",whiteSpace:"nowrap",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"space-between",left:"15px"}},(t.name,t.name),!e.resume&&o.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},!e.noActions&&o.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},o.a.createElement(wt,{color:Mt("color"),icon:"close",onClick:function(){l.push("c#tab/".concat(y[1]))}})))),!f&&t.image?o.a.createElement("img",{style:{width:"70px",height:"70px",top:"-20px",left:"-6px",borderRadius:"50%",border:"solid 2px ".concat(Mt("color")),zIndex:"5 !important",position:"absolute",backgroundColor:"".concat(Mt("color"))},src:"".concat(t.image?t.image:t.type&&"user"!==t.type?Kp.a:qp.a),onError:function(e){m(null)},onLoad:function(e){m("".concat(t.image?t.image:t.type&&"user"!==t.type?Kp.a:qp.a))},width:"100%"}):t.image?o.a.createElement("div",{style:{width:"50px",height:"50px",top:"-4px",left:"-13px",borderRadius:"50%",border:"solid 2px ".concat(Mt("color")),zIndex:"5 !important",position:"absolute",background:Mt("AvatarBackground"),backgroundImage:'url("'.concat(f,'")'),backgroundSize:"cover",backgroundPosition:"center center"}}):o.a.createElement("div",{style:{width:"50px",height:"50px",top:"-4px",left:"-13px",borderRadius:"50%",border:"solid 2px ".concat(Mt("color")),zIndex:"5 !important",position:"absolute",background:Mt("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},t.type&&"user"!==t.type?o.a.createElement(wt,{size:"16px",color:"rgba(250,250,250,0.77)"},"business"):o.a.createElement(wt,{size:"16px",color:"rgba(250,250,250,0.77)"},"person"))):o.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"}},o.a.createElement("div",{style:{backgroundColor:Mt("menu"),height:"43px",paddingLeft:"95px",fontSize:"12px",color:"#FFFFFF",fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"space-between"}},o.a.createElement("div",{style:{maxWidth:"calc(100% - 10px)",textOverflow:"ellipsis ",whiteSpace:"nowrap",overflow:"hidden"}},(t.name,t.name)),!e.resume&&o.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},!e.noActions&&!t.independentAccount&&(!t._parent||t._parent&&be.getState().db.users[t._parent]&&!be.getState().db.users[t._parent].independentAccount)&&o.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},o.a.createElement(wt,{color:Mt("color"),icon:"create",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},n.sideModule),{},{id:t._id,activeModule:"userEdit",db:"users",data:Object(h.a)({type:"user"},t)}))}})),!e.noActions&&"user"!==t.type&&o.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},o.a.createElement(wt,{color:Mt("color"),icon:"contacts",onClick:function(){l.push("c#tab/units/".concat(t._id))}})),!e.noActions&&"sic"===t.type&&o.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},o.a.createElement(wt,{color:Mt("color"),icon:"badge",onClick:function(){l.push("c#tab/units/".concat(t._id))}})))),t.image&&(!f||t.image&&t.image!==f)?o.a.createElement("img",{style:{width:"90px",height:"90px",top:"-24px",left:"-6px",borderRadius:"50%",border:"solid 2px ".concat(Mt("color")),zIndex:"5 !important",position:"absolute",backgroundColor:"".concat(Mt("color"))},src:"".concat(t.image?t.image:t.type&&"user"!==t.type?Kp.a:qp.a),onError:function(e){},onLoad:function(e){m("".concat(t.image?t.image:null))},width:"100%"}):t.image?o.a.createElement("div",{style:{width:"90px",height:"90px",top:"-24px",left:"-6px",borderRadius:"50%",border:"solid 2px ".concat(Mt("color")),zIndex:"5 !important",position:"absolute",background:Mt("AvatarBackground"),backgroundImage:'url("'.concat(f,'")'),backgroundSize:"cover",backgroundPosition:"center center"}}):o.a.createElement("div",{style:{width:"90px",height:"90px",top:"-24px",left:"-6px",borderRadius:"50%",border:"solid 2px ".concat(Mt("color")),zIndex:"5 !important",position:"absolute",background:Mt("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},t.type&&"user"!==t.type?o.a.createElement(wt,{size:"33px",color:"rgba(250,250,250,0.77)"},"business"):o.a.createElement(wt,{size:"33px",color:"rgba(250,250,250,0.77)"},"person")),e.children?e.children:o.a.createElement(o.a.Fragment,null,t.groups&&t.groups.length>0?o.a.createElement("div",{style:{position:"relative",width:"100%",fontSize:"12px",color:Mt("mediumText"),paddingLeft:"94px",paddingRight:"15px",marginTop:"15px"}},t.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"===t.type?o.a.createElement("div",{style:{position:"relative",width:"100%",fontSize:"12px",color:Mt("mediumText"),paddingLeft:"94px",marginTop:"15px"}},Dt("$__doesntBelongToAGroup")):o.a.createElement(o.a.Fragment,null),!e.noShowUsers&&"user"!==t.type&&o.a.createElement("div",{style:{marginTop:"11px",width:"100%",padding:"15px"}},o.a.createElement(Zp,Object.assign({id:t._id},e))),"user"===t.type&&Object.keys(v).length>0?o.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)?o.a.createElement(Sr,{key:t,style:{padding:3},icon:n.dataType.filter((function(t){return t.name===e}))[0].icon,title:Dt("$__".concat(e),1),size:"16px",count:v[e],disabled:!0}):null}))):o.a.createElement(o.a.Fragment,null),"user"===t.type&&b&&b.total>0?o.a.createElement("div",{style:{display:"flex",width:"100%",paddingLeft:"15px",paddingRight:"15px",flexFlow:"wrap",paddingTop:15,paddingBottom:15}},o.a.createElement("fieldset",{style:{padding:7,width:"calc(100% - 14px)"}},o.a.createElement("legend",{style:{color:"lightgray",fontSize:12}},Dt("$__openActivities")),o.a.createElement("h3",null,o.a.createElement("small",null,Dt("$__total",1),": ",b.total)),n.status.filter((function(e){return"completed"!==e.value})).map((function(e,t){return o.a.createElement("div",{key:"".concat(t,"_").concat(e.value),style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(wt,{color:e.color},e.icon),o.a.createElement("span",{style:{marginLeft:"15px"}},Dt(e.label,1))),o.a.createElement("div",null,b[e.value]?b[e.value]:0))})),o.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(wt,{color:"red"},"assignment_late"),o.a.createElement("span",{style:{marginLeft:"15px"}},Dt("$__late",1))),o.a.createElement("div",null,b.late)))):o.a.createElement(o.a.Fragment,null),!e.resume&&o.a.createElement(Ur,{options:t.tags,showOptions:!1}),e.resume&&o.a.createElement("div",null,o.a.createElement(si,{overlap:"circular",anchorOrigin:{vertical:"top",horizontal:"left"},variant:a.users&&a.users[t._id]?"dot":"standard"},o.a.createElement(wt,{size:"27px"},"chat")))))})));var ef=function(e){var t=be.getState().db,r=[];return e.plans.map((function(e){0===r.filter((function(t){return t._id===e.client})).length&&t.users[e.client]&&r.push(t.users[e.client])})),o.a.createElement(o.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 o.a.createElement(Ro,{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"}},o.a.createElement(Qp,{data:t,expanded:!1,noActions:!0,style:{height:"calc(100% - 34px)",margin:0},completed:!!e.completed}))})))},tf=function(e){return o.a.createElement(o.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 o.a.createElement(Ro,{key:"".concat(e._id,"_").concat(t),xs:12,sm:6,md:4,lg:3,xl:2},o.a.createElement(ii,{data:e,db:"cards",Avatar:!0,expanded:!0,ignoreList:!0}))})))},rf=Object(_e.b)((function(e){return{store:{plans:Object.keys(e.db.cards).filter((function(t){return"plan"===e.db.cards[t].type&&!e.db.cards[t].archived&&!e.db.cards[t].deleted}))}}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState(),r=t.db,n=t.session,a=t.search,i=Ut(),c=window.location.hash.split("/");c[0]=c[0].replace("#","");var l=[];return l=Object.keys(r.cards).filter((function(t){return"plan"===r.cards[t].type&&!r.cards[t].deleted&&!r.cards[t].isTemplate&&!r.cards[t].archived&&(!e.completed&&"completed"!==r.cards[t].status||e.completed&&"completed"===r.cards[t].status)})).sort((function(e,t){return r.cards[e].order&&r.cards[t].order&&parseInt(r.cards[e].order.low)<parseInt(r.cards[t].order.low)?-1:r.cards[e].order&&r.cards[t].order&&parseInt(r.cards[e].order.low)>parseInt(r.cards[t].order.low)?1:0})).map((function(e){return r.cards[e]})),l=i&&!i.owner&&!i.planAdmin&&!i.planEdit&&!i.planRead&&!i.planModerate&&r.cards&&n&&n._id||!r.adminView?l.filter((function(e){return"plan"===e.type&&e&&e._users&&Object.keys(e._users).filter((function(e){return e===n._id})).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})):l.filter((function(e){return"plan"===e.type&&e&&e._users&&(Object.keys(e._users).filter((function(e){return e===n._id})).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})),a.text&&(l=l.filter((function(e){return!!(e&&e.name&&e.name.toLowerCase().indexOf(a.text.toLowerCase())>-1)})).map((function(e){return e}))),l=(l=l.filter((function(e){return!!(e&&e.status&&a.cards.status[e.status]||!e.status&&a.cards.status.notStarted)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.priority&&a.cards.priority[e.priority]||a.cards.priority.null&&!e.priority)})).map((function(e){return e})),Object.keys(a.users.selected).length>0&&(l=l.filter((function(e){var t=!1;if(!a.users.selected.unassigned||e._users&&0!==Object.keys(e._users).length){if(!a.users.selected.unassigned&&e&&e._users&&Object.keys(e._users).length>0)return Object.keys(e._users).filter((function(e){a.users.selected[e]&&(t=!0)})),t}else t=!0})).map((function(e){return e}))),Object.keys(a.units.selected).length>0&&(l=l.filter((function(e){return!(!a.units.selected.unassigned||e.client)||(!(!e.client||!a.units.selected[e.client]||!0!==a.units.selected[e.client])||void 0)})).map((function(e){return e}))),a.tags.length>0&&(l=l.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return a.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),o.a.createElement("div",null,l.filter((function(e){return e._isFavorite})).length>0&&o.a.createElement("div",{style:{marginBottom:"33px"}},o.a.createElement(qo,{title:Dt("$__myFavoritePlans",1),icon:"favorite",color:Mt("menu")}),o.a.createElement(Bo,null,o.a.createElement(tf,{plans:l.filter((function(e){return e._isFavorite&&!e.private})).map((function(e){return e}))}))),l.filter((function(e){return e._isFavorite&&e.private})).length>0&&o.a.createElement("div",{style:{marginBottom:"33px"}},o.a.createElement(qo,{title:Dt("$__myFavoritePrivatePlans",1),icon:"private_connectivity",color:Mt("menu")}),o.a.createElement(Bo,null,o.a.createElement(tf,{plans:l.filter((function(e){return e._isFavorite&&e.private})).map((function(e){return e}))}))),l.filter((function(e){return e.client&&r.users[e.client]})).length>0&&o.a.createElement("div",{style:{marginBottom:"33px"}},o.a.createElement(qo,{title:Dt("$__customerPlanning",1),icon:"business",color:Mt("menu")}),o.a.createElement(Bo,null,o.a.createElement(ef,{plans:l.filter((function(e){return e.client})).map((function(e){return e})),completed:!!e.completed}))),l.filter((function(e){return!e.client&&!e.private})).length>0&&o.a.createElement("div",{style:{marginBottom:"33px"}},o.a.createElement(qo,{title:Dt("$__accountPlanning",1),icon:"work",color:Mt("menu")}),o.a.createElement(Bo,null,o.a.createElement(tf,{plans:l.filter((function(e){return!e.client&&!e.private})).map((function(e){return e}))}))),l.filter((function(e){return e.client&&!r.users[e.client]})).length>0&&o.a.createElement("div",{style:{marginBottom:"33px"}},o.a.createElement(qo,{title:Dt("$__consultingPlanning",1),icon:"work",color:Mt("menu")}),o.a.createElement(Bo,null,o.a.createElement(tf,{plans:l.filter((function(e){return e.client&&!r.users[e.client]})).map((function(e){return e}))}))),l.filter((function(e){return!e.client&&e.private})).length>0&&o.a.createElement("div",{style:{marginBottom:"33px"}},o.a.createElement(qo,{title:Dt("$__privatePlanning",1),icon:"private_connectivity",color:Mt("menu")}),o.a.createElement(Bo,null,o.a.createElement(tf,{plans:l.filter((function(e){return!e.client&&e.private})).map((function(e){return e}))}))),r.loaded&&(!l||0===l.length)&&o.a.createElement("div",{style:{width:"100%",height:"calc(100vh - 150px)",display:"flex",alignItems:"center",justifyContent:"center"}},o.a.createElement("img",{src:Wp.a})))}));function nf(){nf=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var af=Object(_e.b)((function(e){return{history:e.db.history}}),(function(e){return Object(s.b)(n,e)}))(Object(a.memo)((function(e){var t=o.a.useState(!1),r=Object(je.a)(t,2),n=r[0],a=r[1],i=o.a.useState(null),c=Object(je.a)(i,2),s=c[0],u=c[1],d=be.getState().db,p=o.a.useState([]),f=Object(je.a)(p,2),m=f[0],g=f[1];Ut(),o.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(m)&&g(e)}),[window.location.hash]),o.a.useEffect((function(){return function(){var t=Object(h.a)({},be.getState().db.cards);Object.keys(t).filter((function(e){return t[e]._selected})).map((function(e){t[e]._selected=!1})),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)({},t)}))}}),[]),o.a.useEffect((function(){n||(y(),a(!0)),m[0]&&36===m[0].length&&m[0]!==s&&d.cards[m[0]]&&y();var e=setTimeout((function(){document.getElementById("mainPannel").scrollTo(0,0)}),100);return function(){clearTimeout(e)}}),[m,s]);var y=function(){var e=Object(Ee.a)(nf().mark((function e(){return nf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:m[0]===s&&"archived"!==m[1]&&"StrategyAndPlans"!==m[1]||u(m[0]);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();window.location.hash.split("/")[0].replace("#","")||l.push("sp#tab/home");var v=window.location.hash.split("/");return v[0]=v[0].replace("#",""),o.a.createElement("div",null,o.a.createElement(ad,null),(!v[0]||v[0]&&36!==v[0].replace("#","").length)&&"home"===v[1]?o.a.createElement(o.a.Fragment,null,o.a.createElement(rf,null)):(!v[0]||v[0]&&36!==v[0].replace("#","").length)&&"completed"===v[1]?o.a.createElement(o.a.Fragment,null,console.log("COMPLETED*****************"),o.a.createElement(rf,{completed:!0})):(!v[0]||v[0]&&36!==v[0].replace("#","").length)&&o.a.createElement(Up,null),v[1]&&"matrix"===v[1]&&o.a.createElement(Np,null),v[1]&&("actions"===v[1]||"guidelines"===v[1]||"objectives"===v[1]||"goals"===v[1])&&v[0]&&be.getState().db.cards[v[0].replace("#","")]&&o.a.createElement(up,{type:v[1]}),v[1]&&"dashboard"===v[1]&&o.a.createElement(hp,null),v[1]&&"overview"===v[1]&&o.a.createElement(Rp,null),v[1]&&"bright-and-connected"===v[1]&&o.a.createElement(o.a.Fragment,null,o.a.createElement(Gu,null)),v[1]&&"insight-boards"===v[1]&&o.a.createElement(gp,null),v[1]&&"radar"===v[1]&&o.a.createElement(Gp,null),v[1]&&"library"===v[1]&&o.a.createElement(xd,null),v[1]&&"planningBoard"===v[1]&&o.a.createElement("iframe",{style:{position:"absolute",width:"calc(100% - 30px)",height:"100%",border:"none"},src:"https://miro.com/app/live-embed/".concat(be.getState().db.cards[v[0]].miroBoard,"=/?embedAutoplay=true&moveToViewport=-23165,-5837,13803,7546")}))})));function of(){of=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var cf=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Pi)((function(e){var t=o.a.useState(null),r=Object(je.a)(t,2),n=r[0],a=r[1],i=o.a.useState(!1),c=Object(je.a)(i,2),l=c[0],s=c[1],u=o.a.useState([]),d=Object(je.a)(u,2),p=d[0],f=d[1],m=o.a.useState([]),g=Object(je.a)(m,2),y=g[0],v=g[1],b=be.getState(),x=b.db,_=b.session,w=x.dataType,E=Ut();o.a.useEffect((function(){if(y.length>0&&y[0]!==n){a(y[0]);var e=setTimeout((function(){return O()}),400);return function(){return clearTimeout(e)}}}),[x.cards,x.tag,y]),o.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(y)&&v(e)})),o.a.useEffect((function(){var e=setTimeout((function(){return O()}),400);return function(){return clearTimeout(e)}}),[x.cards,x.tag]);var O=function(){var t=Object(Ee.a)(of().mark((function t(){var r,n;return of().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new Promise((function(e,t){e(Object.keys(x.cards).filter((function(e){return(E.owner||E&&E.plan&&E.planAdmin||_._id&&x.cards[e]._users&&x.cards[e]._users[Object.keys(x.cards[e]._users).find((function(e){return e.indexOf(_._id)>-1}))])&&y[0]&&x.tag&&x.tag.filter((function(e){return e.value===y[0]})).length>0&&x.cards[e]._tags&&x.cards[e]._tags.filter((function(e){return e.value===y[0]})).length>0&&!x.cards[e].deleted&&(!x.cards[e]._planId||x.cards[e]._planId&&x.cards[x.cards[e]._planId]&&!x.cards[x.cards[e]._planId].deleted)&&(!x.cards[e].private||x.cards[e].private&&x.cards[e]._users&&x.cards[e]._users[_._id])})))})),t.next=3,r.then((function(e){return e}));case 3:(n=t.sent)&&(f(n),s(!1),e.onFinish&&e.onFinish());case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return 0===p.length||y[0]&&0===x.tag.filter((function(e){return e.value===y[0]})).length?o.a.createElement("div",{style:{width:"100%"}},(l||be.getState().session.cards.load&&Object.keys(be.getState().session.cards.load).length>0&&Object.keys(be.getState().session.cards.load).filter((function(e){return"loading"===be.getState().session.cards.load[e]})).length>0)&&o.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"}},o.a.createElement("span",{style:{color:Mt("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},Dt("$__loadingData")),o.a.createElement(Ga,null)),x.tag&&x.tag.filter((function(e){return e.value===y[0]})).length>0&&o.a.createElement("div",{style:Object(h.a)({position:"relative",padding:"5px 10px",borderRadius:"8px",width:"fit-content",display:"flex",alignItems:"center"},x.tag.filter((function(e){return e.value===y[0]}))[0].color?{backgroundColor:x.tag.filter((function(e){return e.value===y[0]}))[0].color,color:x.tag.filter((function(e){return e.value===y[0]}))[0].color?Xt(x.tag.filter((function(e){return e.value===y[0]}))[0].color,!0):Mt("menu")}:{})},o.a.createElement(wt,{size:"22px",color:x.tag.filter((function(e){return e.value===y[0]}))[0].color?Xt(x.tag.filter((function(e){return e.value===y[0]}))[0].color,!0):Mt("menu"),icon:"tag"}),o.a.createElement("span",{style:{marginLeft:"7px"}},x.tag.filter((function(e){return e.value===y[0]}))[0].label))):o.a.createElement("div",{style:{width:"100%"}},l&&o.a.createElement("div",{style:{position:"absolute",bottom:0,left:"7px",right:"7px"}},o.a.createElement(Ga,null)),x.tag.filter((function(e){return e.value===y[0]})).length>0&&o.a.createElement("div",{style:Object(h.a)({position:"relative",padding:"5px 10px",borderRadius:"8px",width:"fit-content",display:"flex",alignItems:"center"},x.tag.filter((function(e){return e.value===y[0]})).length>0&&x.tag.filter((function(e){return e.value===y[0]}))[0].color?{backgroundColor:x.tag.filter((function(e){return e.value===y[0]}))[0].color,color:x.tag.filter((function(e){return e.value===y[0]}))[0].color?Xt(x.tag.filter((function(e){return e.value===y[0]}))[0].color,!0):Mt("menu")}:{})},o.a.createElement(wt,{size:"22px",color:x.tag.filter((function(e){return e.value===y[0]}))[0].color?Xt(x.tag.filter((function(e){return e.value===y[0]}))[0].color,!0):Mt("menu"),icon:"tag"}),o.a.createElement("span",{style:{marginLeft:"7px"}},x.tag.filter((function(e){return e.value===y[0]}))[0].label)),o.a.createElement("div",{style:{positin:"relative",width:"100%"}},o.a.createElement(Bo,null,p.filter((function(e){return x.cards[e].type.indexOf("plan")>-1})).length>0&&o.a.createElement(Ro,{xs:12,sm:12,md:12,lg:12,xl:12},o.a.createElement(qo,{title:Dt("$__plans",1),icon:w.filter((function(e){return"plan"===e.name}))[0].icon,color:Mt("menu"),filterText:e.text,style:{padding:"7px"}}),o.a.createElement(Bo,null,p.filter((function(e){return"plan"===x.cards[e].type})).map((function(t,r){var n;return o.a.createElement(Ro,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},o.a.createElement(ii,(n={db:"cards",data:x.cards[t]},Object(Oe.a)(n,"db","cards"),Object(Oe.a)(n,"showConnectedIn",!0),Object(Oe.a)(n,"searchText",e.text),Object(Oe.a)(n,"expanded",!0),Object(Oe.a)(n,"onAction",e.onAction?function(){e.onAction()}:null),n)))})))),p.filter((function(e){return x.cards[e].type.indexOf("guideline")>-1})).length>0&&o.a.createElement(Ro,{xs:12,sm:12,md:12,lg:12,xl:12},o.a.createElement(qo,{title:Dt("$__guidelines",1),icon:w.filter((function(e){return"guideline"===e.name}))[0].icon,color:Mt("menu"),style:{padding:"7px"}}),o.a.createElement(Bo,null,p.filter((function(e){return x.cards[e].type.indexOf("guideline")>-1})).map((function(t,r){var n;return o.a.createElement(Ro,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},o.a.createElement(ii,(n={db:"cards",data:x.cards[t]},Object(Oe.a)(n,"db","cards"),Object(Oe.a)(n,"showConnectedIn",!0),Object(Oe.a)(n,"searchText",e.text),Object(Oe.a)(n,"expanded",!0),Object(Oe.a)(n,"onAction",e.onAction?function(){e.onAction()}:null),n)))})))),p.filter((function(e){return x.cards[e].type.indexOf("objective")>-1})).length>0&&o.a.createElement(Ro,{xs:12,sm:12,md:12,lg:12,xl:12},o.a.createElement(qo,{title:Dt("$__objectives",1),icon:w.filter((function(e){return"objective"===e.name}))[0].icon,color:Mt("menu"),style:{padding:"7px"}}),o.a.createElement(Bo,null,p.filter((function(e){return x.cards[e].type.indexOf("objective")>-1})).map((function(t,r){var n;return o.a.createElement(Ro,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},o.a.createElement(ii,(n={db:"cards",data:x.cards[t]},Object(Oe.a)(n,"db","cards"),Object(Oe.a)(n,"showConnectedIn",!0),Object(Oe.a)(n,"searchText",e.text),Object(Oe.a)(n,"expanded",!0),Object(Oe.a)(n,"onAction",e.onAction?function(){e.onAction()}:null),n)))})))),p.filter((function(e){return x.cards[e].type.indexOf("goal")>-1})).length>0&&o.a.createElement(Ro,{xs:12,sm:12,md:12,lg:12,xl:12},o.a.createElement(qo,{title:Dt("$__goals",1),icon:w.filter((function(e){return"goal"===e.name}))[0].icon,color:Mt("menu"),style:{padding:"7px"}}),o.a.createElement(Bo,null,p.filter((function(e){return x.cards[e].type.indexOf("goal")>-1})).map((function(t,r){var n;return o.a.createElement(Ro,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},o.a.createElement(ii,(n={db:"cards",data:x.cards[t]},Object(Oe.a)(n,"db","cards"),Object(Oe.a)(n,"showConnectedIn",!0),Object(Oe.a)(n,"searchText",e.text),Object(Oe.a)(n,"expanded",!0),Object(Oe.a)(n,"onAction",e.onAction?function(){e.onAction()}:null),n)))})))),p.filter((function(e){return w.filter((function(t){return t.name===x.cards[e].type})).length>0&&w.filter((function(t){return t.name===x.cards[e].type}))[0]&&w.filter((function(t){return t.name===x.cards[e].type}))[0].myTasks&&"objective"!==x.cards[e].type&&"goal"!==x.cards[e].type&&"plan"!==x.cards[e].type&&-1===x.cards[e].type.indexOf("guideline")})).length>0&&o.a.createElement(Ro,{xs:12,sm:12,md:12,lg:12,xl:12},o.a.createElement(qo,{title:Dt("$__actions",1),icon:"double_arrow",color:Mt("menu"),style:{padding:"7px"}}),o.a.createElement(Bo,null,p.filter((function(e){return w.filter((function(t){return t.name===x.cards[e].type})).length>0&&w.filter((function(t){return t.name===x.cards[e].type}))[0]&&w.filter((function(t){return t.name===x.cards[e].type}))[0].myTasks&&"objective"!==x.cards[e].type&&"goal"!==x.cards[e].type&&"plan"!==x.cards[e].type&&-1===x.cards[e].type.indexOf("guideline")})).map((function(t,r){var n;return o.a.createElement(Ro,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},o.a.createElement(ii,(n={db:"cards",data:x.cards[t]},Object(Oe.a)(n,"db","cards"),Object(Oe.a)(n,"showConnectedIn",!0),Object(Oe.a)(n,"searchText",e.text),Object(Oe.a)(n,"expanded",!0),Object(Oe.a)(n,"onAction",e.onAction?function(){e.onAction()}:null),n)))})))),p.filter((function(e){return"insight"===x.cards[e].type||"link"===x.cards[e].type})).length>0&&o.a.createElement(Ro,{xs:12,sm:12,md:12,lg:12,xl:12},o.a.createElement(qo,{title:"BRIGHT & CONNECTED",icon:R.a,color:Mt("menu"),style:{padding:"7px"}}),o.a.createElement(Bo,null,p.filter((function(e){return"insight"===x.cards[e].type||"link"===x.cards[e].type})).map((function(t,r){var n;return o.a.createElement(Ro,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},o.a.createElement(ii,(n={db:"cards",data:x.cards[t]},Object(Oe.a)(n,"db","cards"),Object(Oe.a)(n,"showConnectedIn",!0),Object(Oe.a)(n,"expanded",!0),Object(Oe.a)(n,"Avatar",!0),Object(Oe.a)(n,"Resume",!0),Object(Oe.a)(n,"onAction",e.onAction?function(){e.onAction()}:null),n)))})))))))})));var lf=Object(_e.b)((function(e){return{store:e}}),(function(e){return Object(s.b)(n,e)}))((function(e){return o.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"calc(100vh - 115px)"}},e.provisorio||"N\xe3o Autorizado")})),sf={root:{}};function uf(){var e=be.getState().db.users;return{maxUsers:be.getState().session.maxUsers&&be.getState().session.maxUsers.low||0,usedUsers:Object.keys(e).filter((function(t){if(!e[t].deleted&&"user"===e[t].type&&(!e[t]._parent||e[t]._parent&&e[e[t]._parent]))return!0})).length}}var df=Object(_e.b)((function(e){return{users:e.db.users,page:e.db.history}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(sf)((function(e){var t=o.a.useState([]),r=Object(je.a)(t,2),n=r[0],a=r[1],i=be.getState(),c=i.db,s=(i.session,i.search),u=c.users,d=Ut(),p=uf();o.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(n)&&a(e)}));var f=Object.keys(u).filter((function(e){return!u[e].deleted})).map((function(e){return u[e]}));s.text&&(f=f.filter((function(e){return!!(e.name&&e.name.toLowerCase().indexOf(s.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(s.text.toLowerCase())>-1||e.email&&e.email.toLowerCase().indexOf(s.text.toLowerCase())>-1)})).map((function(e){return e}))),"tab"===n[0]&&"users"===n[1]&&(f=f.filter((function(e){return"user"===e.type&&!e._parent})).map((function(e){return e}))),"tab"===n[0]&&"units"===n[1]&&(f=f.filter((function(e){return"user"!==e.type})).map((function(e){return e}))),s.users&&s.users.userGroup.length>0&&(f=f.filter((function(e){return e.groups.filter((function(e){return e.value===s.users.userGroup[0].value})).length>0})).map((function(e){return e}))),s.tags.length>0&&(f=f.filter((function(e){return e.tags&&e.tags.length>0&&e.tags.filter((function(e){var t=!1;return s.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),s.userGroups.length>0&&(f=f.filter((function(e){return e.groups&&e.groups.length>0&&e.groups.filter((function(e){var t=!1;return s.userGroups.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e})));var h=Object.keys(u).map((function(e){return u[e]})),m=Object.keys(u).map((function(e){return u[e]}));return console.log(m.filter((function(e){return"user"===e.type&&e.name.indexOf("Eudes")>-1})).map((function(e){return e}))),s.text&&(h=h.filter((function(e){return!!(e.name&&e.name.toLowerCase().indexOf(s.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(s.text.toLowerCase())>-1||e.email&&e.email.toLowerCase().indexOf(s.text.toLowerCase())>-1)})).map((function(e){return e}))),"tab"===n[0]&&"units"===n[1]&&n[2]&&36===n[2].length&&(h=h.filter((function(e){return"user"===e.type&&e._parent===n[2]})).map((function(e){return e})),console.log("XXXXXXXXXXXXXXXXXXXXXXXXXXXX",h)),s.users&&s.users.userGroup.length>0&&(h=h.filter((function(e){return e.groups.filter((function(e){return e.value===s.users.userGroup[0].value})).length>0})).map((function(e){return e}))),s.tags.length>0&&(h=h.filter((function(e){return e.tags&&e.tags.length>0&&e.tags.filter((function(e){var t=!1;return s.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),s.userGroups.length>0&&(h=h.filter((function(e){return e.groups&&e.groups.length>0&&e.groups.filter((function(e){var t=!1;return s.userGroups.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),!d||d.owner||d.user?(window.location.hash.split("/")[0].replace("#","")||l.push("c#tab/units"),o.a.createElement("div",null,p.maxUsers&&("users"===n[1]||n[2]&&36===n[2].length)?o.a.createElement(Bo,{style:{justifyContent:"flex-end",paddingBottom:17}},o.a.createElement(Ro,{xs:12,sm:6,md:4,lg:3,xl:2},o.a.createElement("div",{style:{width:"100%",height:"22px",boxShadow:"0 0 7px 2px rgba(0,0,0,0.3)",borderRadius:11,backgroundColor:"gray",overflow:"hidden",position:"relative"}},o.a.createElement("div",{style:{width:"".concat(100/p.maxUsers*p.usedUsers,"%"),height:"100%",background:Mt("ColumnTitleColor")}}),o.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,width:"100%",height:"22px",textAlign:"center",color:"#FFFFFF",fontSize:12}},Dt("$__activeUsers",1),": ",p.usedUsers," | ",Dt("$__limit",1),": ",p.maxUsers)))):o.a.createElement(o.a.Fragment,null),o.a.createElement(ad,null),o.a.createElement("div",{style:{marginLeft:"-30px",width:"calc(100% + 30px)"}},o.a.createElement(cu,null),o.a.createElement(Bo,null,f.sort((function(e,t){return e&&e.name&&e.name<t.name||u&&e&&e.name&&e.name<t.name?-1:1})).map((function(e,t){return!n[2]||n[2]&&e._id===n[2]?o.a.createElement(Ro,{key:e._id,xs:12,sm:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&c.users[n[2]]?12:6,md:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&c.users[n[2]]?12:4,lg:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&c.users[n[2]]?12:4,xl:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&c.users[n[2]]?12:3,style:{minWidth:"300px"}},o.a.createElement(Qp,{data:e,expanded:!!(n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&c.users[n[2]])})):!n[2]&&o.a.createElement(Ro,{key:e._id,xs:12,sm:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&c.users[n[2]]?12:6,md:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&c.users[n[2]]?12:4,lg:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&c.users[n[2]]?12:3,xl:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&c.users[n[2]]?12:3},o.a.createElement(Qp,{data:e,expanded:!!(n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&c.users[n[2]])}))})),"tab"===n[0]&&"units"===n[1]&&n[2]&&36===n[2].length&&h.filter((function(e){return!e.deleted})).sort((function(e,t){return e&&e.name&&e.name<t.name||u&&e&&e.name&&e.name<t.name?-1:1})).map((function(e,t){return o.a.createElement(Ro,{key:"".concat(e._id,"-").concat(t),xs:12,sm:6,md:4,lg:3,xl:2},o.a.createElement(Qp,{data:e}))})))))):o.a.createElement(lf,null)}))),pf=Object(De.a)(yd);var ff=[{path:"/d",name:"DASHBOARD",alias:"Dashboard",icon:"dashboard",component:gd,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:!0},access:["planAdmin","planModerate"]}]},{path:"/bright-and-connected",name:"BRIGHTANDCONNECTED",alias:"brightandconnected",icon:R.a,component:Gu,show:!0,auth:!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:uu.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:df,show:!0,auth:!0,search:!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:"units",icon:"business",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","userGroup"]}]},{path:"/sp",name:"Strategy & Plans",alias:"plan",icon:"view_comfy",component:af,show:!0,auth:!0,search:!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:!0},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:"dashboard",name:"dashboard",alias:"home",icon:"dashboard",show:!0,auth:!0,permission:4,search:!1,searchFields:[],hashId:!0,templates:!0},{path:"overview",name:"OVERVIEW",alias:"overview",icon:"select_all",show:!0,auth:!0,permission:4,search:!0,searchFields:["text","tags","users","priority","status","date"],hashId:!0,templates:!0},{path:"matrix",name:"MATRIX SWOT",alias:"matrix",icon:M.a,show:!0,auth:!0,permission:4,search:!1,searchFields:["text","tags","users"],hashId:!0,templates:!0},{path:"guidelines",name:"guidelines",alias:"guidelines",icon:"alt_route",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","priority","groups","status","date"],hashId:!0},{path:"objectives",name:"objectives",alias:"objectives",icon:"gps_fixed",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","priority","groups","status","date"],hashId:!0},{path:"goals",name:"goals",alias:"goals",icon:"flag",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","priority","groups","status","date"],hashId:!0},{path:"actions",name:"ACTIONS",alias:"actions",icon:"playlist_play",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","priority","status","date"],hashId:!0},{path:"bright-and-connected",name:"feeds",alias:"feeds",icon:"menu_book",show:!0,auth:!0,permission:3,search:!1,searchFields:["tags","text"],hashId:!0,templates:!0},{path:"radar",name:"radar",alias:"radar",icon:"settings_input_antenna",show:!0,auth:!0,permission:3,search:!0,searchFields:["tags","text"],hashId:!0,templates:!0},{path:"insight-boards",name:"INSIGHTS",alias:"insights",icon:uu.a,show:!0,auth:!0,permission:3,search:!0,searchFields:["tags","text"],hashId:!0,templates:!0},{path:"library",name:"library",alias:"library",icon:"folder",show:!0,auth:!0,permission:3,search:!0,searchFields:["text"],hashId:!0}]},{path:"/t",name:"Tasks",alias:"tasks",component:Yd,icon:"recent_actors",show:!0,auth:!0,permission:1,hashId:!1,search:!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,access:["planAdmin","planModerate"],search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"allTasks",name:"allTasks",alias:"allTasks",icon:"how_to_reg",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"myTasks",name:"myTasks",alias:"myTasks",icon:"admin_panel_settings",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"unreaded",name:"unreaded",alias:"unreaded",icon:"notifications_active",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"private",name:"private",alias:"private",icon:"private_connectivity",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"unlinkedCards",name:"unlinkedCards",alias:"unlinkedCards",icon:"link_off",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"planningCards",name:"planningCards",alias:"planningCards",icon:"apps",show:!0,auth:!0,access:["planAdmin","planModerate"],permission:5,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"guidelines",name:"guidelines",alias:"plansGuidelines",icon:M.a,show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"objectives",name:"objectives",alias:"plansObjectives",icon:"gps_fixed",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"goals",name:"goals",alias:"plansGoals",icon:"flag",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"lateTasks",name:"lateTasks",alias:"lateTasks",icon:"playlist_play",show:!1,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"nextTasks",name:"nextTasks",alias:"nextTasks",icon:"playlist_play",show:!1,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]}]},{path:"/tags",name:"Tags",alias:"Tags",component:cf,icon:"turned_in",show:!0,auth:!0,search:!0,permission:1},{path:"/plataformAdministrator",name:"BackOffice",alias:"BackOffice",icon:"business",component:au,show:!1,auth:!0,search:!1,tabs:[{path:"languages",name:"languages",alias:"languages",icon:"translate",show:!0}]},{path:"/masterAdmin",name:"masterAdmin",alias:"masterAdmin",icon:"admin_panel_settings",component:Ud,show:!1,auth:!0,search:!1,tabs:[{path:"users",name:"users",alias:"users",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:rp,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=o.a.useState({cPassword:null,password:null}),n=Object(je.a)(r,2),a=n[0],i=n[1],c=As();t.get("token")&&36===t.get("token").length||l.push("/");var s=function(){var r=Object(Ee.a)(Ps().mark((function r(){var n;return Ps().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,Pt.post("/user/new-password",{token:t.get("token"),password:a.password});case 3:(n=r.sent)&&(localStorage.setItem("TOKEN",n.data.token),e.callback&&setTimeout((function(){l.push("/login")}),3e3)),r.next=10;break;case 7:r.prev=7,r.t0=r.catch(0),e.callback({fn:"alert",message:"".concat(Dt("$__invalidRequest",1)," | ").concat(Dt("$__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 o.a.createElement("div",{className:c.container},o.a.createElement(Bo,null,o.a.createElement(Ro,{xl:4,lg:4,md:4,sm:12,xs:12},o.a.createElement("form",null,o.a.createElement(Sl,{db:"cards",login:!0},o.a.createElement(Al,{className:"".concat(c.cardHeader," ").concat(c.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)"}},o.a.createElement("h4",{className:c.cardTitle},Dt("$__createPassword",1))),o.a.createElement(Fl,null,o.a.createElement(ac,{onConfirmed:function(e){i(Object(h.a)(Object(h.a)({},a),{},{password:e}))}})),o.a.createElement(Ts,{className:c.justifyContentCenter},a&&a.password&&o.a.createElement(er,{style:{color:"rgba(15,18,35,1)"},simple:!0,size:"lg",block:!0,onClick:function(){return s()}},Dt("$__save","*"))))))))},show:!0,auth:!1},{path:"/login",name:"Login Page",mini:"L",component:jd,show:!0,auth:!1},{path:"/register",name:"Register Page",mini:"R",component:function(e){var t=o.a.useState([]),r=Object(je.a)(t,2),n=r[0],a=r[1],i=o.a.useState(!1),c=Object(je.a)(i,2),s=c[0],u=c[1],d=o.a.useState(""),p=Object(je.a)(d,2),f=p[0],h=p[1],m=o.a.useState(""),g=Object(je.a)(m,2),y=g[0],v=g[1],b=o.a.useState(!1),x=Object(je.a)(b,2),_=x[0],w=x[1],E=o.a.useState(""),O=Object(je.a)(E,2),j=O[0],k=O[1],S=o.a.useState(""),L=Object(je.a)(S,2),C=L[0],I=L[1],F=o.a.useState(!1),T=Object(je.a)(F,2),N=T[0],P=T[1],A=o.a.useState(!1),D=Object(je.a)(A,2),z=D[0],M=D[1],B=o.a.useState(!1),$=Object(je.a)(B,2),Y=$[0],R=$[1],G=o.a.useState(null),H=Object(je.a)(G,2),W=H[0],U=H[1],V=sp(),q=function(){var e=Object(Ee.a)(lp().mark((function e(t){return lp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u(!0),!Bt(t)){e.next=8;break}return e.next=4,ma(t);case 4:e.sent?(k(Dt("$__emailAlreadyExists",1)),v(""),w(!1)):(k(null),w(!0),ba(f,t)),e.next=10;break;case 8:k(Dt("$__invalidEmail",1)),v("");case 10:u(!1);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),X=function(){var e=Object(Ee.a)(lp().mark((function e(){return lp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(C.length>=6)){e.next=9;break}return u(!0),e.next=4,ya(C,y);case 4:e.sent?(M(!0),P(!1)):P(!0),u(!1),e.next=10;break;case 9:P(!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),J=function(){var t=Object(Ee.a)(lp().mark((function t(){var r;return lp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u(!0),t.prev=1,t.next=4,Pt.post("user/register-final-step/",{name:f,email:y,token:C,password:W,login:!0});case 4:(r=t.sent)&&(localStorage.setItem("TOKEN",r.data.token),e.callback&&setTimeout((function(){l.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 o.a.createElement("div",{className:V.container},o.a.createElement(Bo,null,o.a.createElement(Ro,{xs:12,sm:10,md:6},o.a.createElement(Sl,{db:"cards",className:V.cardSignup},o.a.createElement("h2",{className:V.cardTitle},Dt("$__register",1)),o.a.createElement(Fl,null,o.a.createElement(Bo,null,o.a.createElement(Ro,{xs:12},o.a.createElement("div",null,o.a.createElement(Qn,{className:V.textFields,label:Dt("$__fullName",1),variant:"standard",name:Dt("$__fullName",1),InputLabelProps:{shrink:!0},InputProps:{endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{className:V.inputAdornmentIcon},"account_box")),autoComplete:"new-password",onChange:function(e){h(e.target.value)}},value:f}),o.a.createElement(Qn,{label:Dt("$__email",1),variant:Mt("fieldVariant"),name:"email",type:"email",helperText:j,InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",className:!j&&y&&Bt(y)?"":"invalid",endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"alternate_email"})),onChange:function(e){w(!1),k(null),v(e.target.value)},onBlur:function(){var e=Object(Ee.a)(lp().mark((function e(t){return lp().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.a.createElement(Ir,{icon:"navigate_next",text:Dt("$__continue","*"),reverse:!0,style:{float:"right"},onClick:function(){q(y)}}),_&&y&&o.a.createElement(o.a.Fragment,null,o.a.createElement(Qn,{label:Dt("$__emailToken",1),variant:Mt("fieldVariant"),helperText:Dt(N?"registerEmailTokenError":"registerEmailTokenDescription"),type:"password",name:"emailToken",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",className:N?"invalid":"",endAdornment:o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"keyboard"})),onChange:function(e){k(null),I(e.target.value)}},value:C,placeholder:"****"}),o.a.createElement(Ir,{icon:"reply_all",text:Dt("$__resendCode","*"),reverse:!0,style:{float:"right"},onClick:function(){ba(f,y)}}),!z&&o.a.createElement(Ir,{icon:"navigate_next",text:Dt("$__continue","*"),reverse:!0,style:{float:"right"},onClick:function(){X()}})),_&&z&&o.a.createElement(o.a.Fragment,null,o.a.createElement(ac,{onConfirmed:function(e){U(e)}}),o.a.createElement(op.a,{open:Y,onClose:function(){return R(!1)},"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description"},o.a.createElement("div",{style:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",justifyContent:"center",alignItems:"center"}},o.a.createElement("div",{style:{position:"relative",width:"80vw",maxHeight:"80vh",overflowY:"auto",backgroundColor:"#FFFFFF",padding:"15px",margin:"auto"}},o.a.createElement("div",{style:{position:"absolute",right:"3px",top:"3px"}},o.a.createElement(wt,{size:"33px",color:"black",onClick:function(){R(!1)}},"close")),o.a.createElement("p",null,"Lorem ipsum dolor sit amet, consectetur adipiscing elit. In nisl sapien, scelerisque non enim quis, mollis euismod ante. Nunc facilisis quam ullamcorper, interdum ante non, congue magna. Maecenas euismod nisl sed risus pretium placerat. Nulla dictum dolor sed tincidunt mollis. Nam elit urna, elementum at mattis fringilla, pharetra sed ipsum. Ut eleifend ullamcorper nulla, consequat cursus arcu efficitur eget. Ut et leo sed lacus molestie aliquam. In molestie cursus est vel luctus. Aliquam ut vehicula augue, vitae venenatis ligula. Sed lobortis velit quis quam rutrum, ut pretium arcu semper. Proin a fermentum sem. Phasellus nec auctor elit. Nullam auctor quam ut ullamcorper mattis."),o.a.createElement("p",null,"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Integer et enim congue, pulvinar elit facilisis, sollicitudin neque. Nulla interdum justo arcu, eu tincidunt arcu suscipit at. Vestibulum quis elementum ante. Mauris et odio in mi ornare tincidunt. Nulla mattis ex vitae magna hendrerit, non interdum dui lobortis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed pretium lorem a orci tempor convallis. Aliquam nec dapibus dolor. Nulla arcu lacus, posuere dictum risus sed, volutpat aliquet nibh. Cras tincidunt viverra finibus."),o.a.createElement("p",null,"Nam in scelerisque lectus, nec aliquam mauris. Ut id nisl sit amet lectus posuere placerat quis vel odio. Fusce ultrices ultricies lobortis. Proin sodales sit amet lorem vel viverra. Donec ac libero quis leo malesuada faucibus. Phasellus eu placerat purus. Suspendisse lectus dolor, consectetur sit amet pretium sed, luctus non nulla. In sed pulvinar est. Fusce vitae ligula quis quam tempus tincidunt. Ut congue faucibus mollis. Vestibulum ac diam id metus rhoncus bibendum non quis leo. Donec tempus non ligula sit amet vehicula. Phasellus id lectus ac neque maximus ullamcorper vel non massa."),o.a.createElement("p",null,"Donec augue lorem, bibendum vitae egestas sit amet, placerat eu elit. In sapien neque, volutpat sit amet sagittis quis, rutrum sit amet turpis. Quisque cursus ligula at mattis blandit. Donec erat arcu, pellentesque eu odio at, blandit viverra nisl. In sagittis felis nec enim facilisis, dapibus commodo enim feugiat. Proin volutpat elit id sem malesuada euismod. Morbi pulvinar tristique diam non luctus. Aliquam ligula enim, efficitur non nunc ac, vestibulum convallis diam. Quisque varius metus a dui ultricies sagittis."),o.a.createElement("p",null,"Quisque vitae convallis arcu, vel convallis leo. Sed in pellentesque tortor. Nulla tristique lacinia tempus. Pellentesque ut neque elementum, accumsan ante sit amet, malesuada nulla. Nam ac vulputate leo. Vestibulum leo mi, consectetur id odio eu, vulputate tincidunt quam. Maecenas finibus purus eget tincidunt vulputate. Etiam a semper felis, et varius lacus. Pellentesque condimentum sollicitudin magna et mollis. Nam sit amet elit rhoncus, pretium enim sed, fringilla sapien. Proin convallis sed velit quis imperdiet. Sed iaculis, velit in tempus mattis, ante neque aliquam augue, ac porttitor nulla tellus in mauris. In elementum lobortis turpis et imperdiet. Praesent auctor placerat ullamcorper. Donec eu facilisis justo.")))),o.a.createElement(Bl.a,{classes:{root:V.checkboxLabelControl,label:V.checkboxLabel},control:o.a.createElement(Ca.a,{tabIndex:-1,onClick:function(){return function(e){var t=n.indexOf(e),r=Object(K.a)(n);-1===t?r.push(e):r.splice(t,1),a(r)}(1)},checkedIcon:o.a.createElement("div",{className:V.checkedIcon},o.a.createElement(wt,{size:"16px"},"check")),icon:o.a.createElement("div",{className:V.uncheckedIcon},o.a.createElement(wt,{size:"16px",color:"red"},"remove")),classes:{checked:V.checked,root:V.checkRoot}}),label:o.a.createElement("span",null,Dt("$__iAgreeToThe",1)," ",o.a.createElement("span",{onClick:function(){return R(!0)},style:{color:"blue"}},"terms and conditions"),".")}),o.a.createElement("div",{className:V.center},n.indexOf(1)>-1&&W&&o.a.createElement(er,{round:!0,color:"custom_color",onClick:function(){return J()}},"Get started"))))))),s&&o.a.createElement("div",{style:{position:"absolute",bottom:"0px",width:"100%"}},o.a.createElement(ap,null))))))},show:!0,auth:!1},{path:"/error-page",name:"Error Page",mini:"E",component:function(){var e=vd();return o.a.createElement("div",{className:e.contentCenter},o.a.createElement(Bo,null,o.a.createElement(Ro,{md:12},o.a.createElement("h1",{className:e.title},"404"),o.a.createElement("h2",{className:e.subTitle},"Page not found :("),o.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=kd();return o.a.createElement("div",{className:e.contentCenter},o.a.createElement(Bo,null,o.a.createElement(Ro,{md:12},o.a.createElement("h1",{className:e.title},"\\o/"),o.a.createElement("h2",{className:e.subTitle},"Plataforma em atualiza\xe7\xe3o :)"),o.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=Sd();return o.a.createElement("div",{className:e.contentCenter},o.a.createElement(Bo,null,o.a.createElement(Ro,{md:12},o.a.createElement("h1",{className:e.title},'"/'),o.a.createElement("h2",{className:e.subTitle},"Parece que voc\xea est\xe1 OFF-LINE"),o.a.createElement("h4",{className:e.description,style:{color:"#FFFFFF"}},"Verifique a conex\xe3o de sua internet e tente novamente."),o.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."),o.a.createElement("h4",{className:e.description,style:{color:"#FFFFFF"}},o.a.createElement("a",{href:"/login",target:"_self"},"Clique aqui para tentar novamente")))))},show:!1,auth:!1}]},{path:"/calendar",name:"Calendar",icon:"date_range",component:function(){var e=nd(),t=o.a.useState(Zu),r=Object(je.a)(t,2),n=r[0],a=r[1],i=o.a.useState(null),c=Object(je.a)(i,2),l=c[0],s=c[1],u=function(e,t){var r=n;r.push({title:e,start:t.start,end:t.end}),s(null),a(r)},d=function(){s(null)};return o.a.createElement("div",null,l,o.a.createElement(Bo,null,o.a.createElement(Ro,{xs:12,sm:12,md:12},o.a.createElement(Sl,null,o.a.createElement(Fl,{calendar:!0},o.a.createElement(Hu.a,Object(Oe.a)({selectable:!0,localizer:Qu,events:n,messages:ed,defaultView:"month",scrollToTime:new Date(1970,1,1,6),defaultDate:new Date,onSelectEvent:function(e){return function(e){window.alert(e.title)}(e)},onSelectSlot:function(t){return function(t){s(o.a.createElement(qu.a,{input:!0,showCancel:!0,style:{display:"block",marginTop:"-100px"},title:"Input something",onConfirm:function(e){return u(e,t)},onCancel:function(){return d()},confirmBtnCssClass:e.button+" "+e.success,cancelBtnCssClass:e.button+" "+e.danger}))}(t)},startAccessor:"start",endAccessor:"end",components:{toolbar:rd},eventPropGetter:function(e,t,r,n){var a={backgroundColor:"lightgrey",color:"black",borderRadius:0,border:"none"};return e.isMine&&(a.backgroundColor="lightgreen"),{className:"",style:a}}},"components",{event:td,toolbar:rd})))))))},show:!0,auth:!0,search:!0,permission:1,searchFields:["text","tags","users","priority","units","groups","status","date"]},{path:"/library",name:"library",alias:"library",component:xd,icon:"folder",show:!0,auth:!0,permission:1,hashId:!1,search:!0,searchFields:["text"]},{path:"/subscriptionUpgrade",name:"subscriptionUpgrade",alias:"subscriptionUpgrade",component:function(){var e=pf();return o.a.createElement("div",{className:e.contentCenter},o.a.createElement(Bo,null,o.a.createElement(Ro,{md:12},o.a.createElement("h1",{className:e.title,style:{color:Mt("color")}},"\\o/"),o.a.createElement("h2",{className:e.subTitle,style:{color:Mt("menu")}},"Voc\xea j\xe1 utilizou o n\xfamero de usu\xe1rios contratados"),o.a.createElement("h4",{className:e.description,style:{color:Mt("menu")}},"Entre em contato com nossos consultores para solicitar um upgrade do seu plano."))))},icon:"upgrade",show:!0,auth:!0,permission:1,hashId:!1}],hf=function(e){return Object(h.a)(Object(h.a)({},qe),{},{menu:{position:"relative",borderRight:Mt("color"),display:"flex",flexDirection:"column",alignItems:"center"},menuExpanded:{position:"relative",borderRight:Mt("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:Mt("color")},buttonColorExpanded:{position:"relative",float:"left",width:"calc(100% + 20px)",padding:"12px 12px 12px 20px",marginLeft:"-12px",display:"flex",backgroundColor:Mt("color")},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Mt("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"}})};function mf(){mf=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var gf=function(e){var t=be.getState().db,r=window.location.hash.split("/");r[0]=r[0].replace("#","");var n=Ut(),a=r[0]&&36===r[0].length&&t.cards[r[0]]&&"plan"===t.cards[r[0]].type?Dn(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:Nr.a,c=[];return t.cards[r[0]]&&t.cards[r[0]].client&&Object.keys(t.cards).filter((function(e){return!t.cards[e].deleted&&t.cards[e].client&&t.cards[e].client===t.cards[r[0]].client})).length>1&&Object.keys(t.cards).filter((function(e){return!t.cards[e].deleted&&t.cards[e].client===t.cards[r[0]].client&&"plan"===t.cards[e].type})).map((function(e){c.push(Object(h.a)(Object(h.a)({name:t.cards[e].name},t.cards[e].image?{avatar:t.cards[e].image}:{icon:"view_comfy"}),{},{onClick:function(){l.push("sp#".concat(t.cards[e]._id,"/dashboard"))}}))})),o.a.createElement(_t,{title:o.a.createElement(o.a.Fragment,null,t.cards[r[0]].name)},o.a.createElement("div",{style:Object(h.a)({display:"flex",width:"100%",justifyContent:"left",alignItems:"center"},a&&parseInt(a)>3||n.owner||n.planAdmin||n.planEdit||n.planModerate?{cursor:"pointer"}:{}),id:"plan_identification",onClick:function(){(a&&parseInt(a)>3||n.owner||n.planAdmin||n.planEdit||n.planModerate)&&e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},be.getState().sideModule),{},{db:"cards",id:r[0],module:"cardEdit",activeModule:"cardEdit",data:t.cards[r[0]]}))}},o.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&&o.a.createElement("div",{style:{width:"100%",zIndex:1}},t.cards[r[0]].client&&t.users[t.cards[r[0]].client]&&o.a.createElement("div",{style:{fontSize:"12px",fontWeight:"bold",marginLeft:"15px"}},t.users[t.cards[r[0]].client].name),o.a.createElement("div",{style:{fontSize:"12px",marginLeft:"7px",maxWidth:"calc(100% - 60px)",display:"flex",justifyContent:"space-between"},id:"client_plan_switch"},0===c.length?t.cards[r[0]].name:o.a.createElement(Kr,{text:t.cards[r[0]].name,icon:"change_circle",transparent:!0,maxWidth:"200px",options:c})))))},yf=Object(_e.b)((function(e){return{store:{search:e.search}}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState(),r=t.db,n=t.search,a=o.a.useState(!1),i=Object(je.a)(a,2),c=i[0],s=i[1],u=o.a.useState(!1),d=Object(je.a)(u,2),p=d[0],f=d[1],m=Object(De.a)(hf)(),g=window.location.pathname.split("/"),y="/".concat(g[1]),v=e.expanded;o.a.useEffect((function(){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(h.a)(Object(h.a)({},be.getState().session),{},{cards:Object(h.a)(Object(h.a)({},be.getState().session.cards),{},{adminViewLoader:!1,adminView:!1})}))}),[n.users.selected]);var b=window.location.hash.split("/");b[0]=b[0].replace("#","");var x="".concat(y,"#").concat(b[0]?b[0]:"tab"),_=Ut(),w=(b[0]&&36===b[0].length&&r.cards[b[0]]&&"plan"===r.cards[b[0]].type&&Dn(b[0]),function(t){s(t);var r=be.getState().db.cards;Object.keys(r).map((function(e){t&&r[e]&&!r[e]._expanded&&(r[e]._expanded=t),!t&&r[e]&&r[e]._expanded&&(r[e]._expanded=t)})),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cardsExpanded:t,cards:r}))}),E=function(){var t=Object(Ee.a)(mf().mark((function t(r){var n;return mf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(f(!0),be.getState().session.cards.adminViewLoader){t.next=8;break}return t.next=4,un(e,null,!0);case 4:n=t.sent,(be.getState().session.cards.adminViewLoader||n)&&(f(!1),e.reduxFunction("ASYNC","SET_SESSION",Object(h.a)(Object(h.a)({},be.getState().session),{},{cards:Object(h.a)(Object(h.a)({},be.getState().session.cards),{},{adminViewLoader:!0,adminView:!be.getState().session.cards.adminView})}))),t.next=10;break;case 8:f(!1),e.reduxFunction("ASYNC","SET_SESSION",Object(h.a)(Object(h.a)({},be.getState().session),{},{cards:Object(h.a)(Object(h.a)({},be.getState().session.cards),{},{adminViewLoader:!0,adminView:!be.getState().session.cards.adminView})}));case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),O=function(e){l.push(e)};return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:v?m.menuExpanded:m.menu},o.a.createElement("div",{className:v?m.buttonExpanded:m.button},o.a.createElement(Ir,{icon:v?"menu_open":"read_more",text:v?Dt("$__collapsingMenu",1):null,title:v?null:Dt("$__expandingMenu",1),iconColor:Mt("medium"),textColor:Mt("medium"),onClick:function(){e.subMenuExpanded(!v)},size:"21px"})),ff.filter((function(e){return!(b[1]&&e.tabs&&e.tabs.filter((function(e){return e.path===b[1]})).length>0&&!1===e.tabs.filter((function(e){return e.path===b[1]}))[0].search)&&(e.path===y&&"true"===String(e.search)||void 0)})).length>0&&!e.chat&&o.a.createElement("div",{className:v?m.buttonExpanded:m.button,id:"sideBar_subMenu_filters"},o.a.createElement(Ir,{icon:"filter_alt",text:v?Dt("$__filters",1):null,title:v?null:Dt("$__filters",1),iconColor:Mt("medium"),textColor:Mt("medium"),onClick:function(){e.subMenuExpanded(!v)},size:"21px"})),v&&o.a.createElement(o.a.Fragment,null,ff.filter((function(e){return!(b[1]&&e.tabs&&e.tabs.filter((function(e){return e.path===b[1]})).length>0&&!1===e.tabs.filter((function(e){return e.path===b[1]}))[0].search)&&(e.path===y&&"true"===String(e.search)||void 0)})).length>0&&!e.chat&&o.a.createElement("div",{style:{position:"relative",width:"100%",clear:"both"},id:"sideBar_subMenu_filters_options"},o.a.createElement(Mp,null))),("/files"===window.location.pathname||"/t"===window.location.pathname||"/d"===window.location.pathname||"/sp"===window.location.pathname&&b[0]&&36===b[0].length)&&o.a.createElement(o.a.Fragment,null,c?o.a.createElement("div",{className:v?m.buttonExpanded:m.button,id:"sideBar_subMenu_options_collapseCards"},o.a.createElement(Ir,{text:v?Dt("$__collapseCards",1):null,textColor:Mt("medium"),title:v?null:Dt("$__collapseCards",1),icon:"close_fullscreen",iconColor:Mt("medium"),onClick:function(){w(!1)},size:"21px"})):o.a.createElement("div",{className:v?m.buttonExpanded:m.button,id:"sideBar_subMenu_options_expandingCards"},o.a.createElement(Ir,{text:v?Dt("$__expandingCards",1):null,textColor:Mt("medium"),title:v?null:Dt("$__expandingCards",1),icon:"open_in_full",iconColor:Mt("medium"),onClick:function(){w(!0)},size:"21px"}))),("/d"===y&&"dayTasks"===b[1]||"/t"===y&&n&&n.users&&n.users.selected&&Object.keys(n.users.selected).filter((function(e){return!0===n.users.selected[e]})).length>0||"/sp"===y&&!b[0])&&_&&(_.owner||_.plan&&(_.planAdmin||_.planModerate))&&o.a.createElement("div",{className:v?m.buttonExpanded:m.button,style:{display:"flex"}},p?o.a.createElement(Et.a,{size:25,style:{margin:"auto",display:"flex"}}):o.a.createElement(Ir,{text:v?Dt("$__adminViewDescription",1):null,title:v?null:Dt("$__adminViewDescription",1),textColor:be.getState().session.cards.adminView?Mt("color"):Mt("medium"),iconColor:be.getState().session.cards.adminView?Mt("color"):Mt("medium"),icon:"groups",id:"sideBar_subMenu_options_setAdminView",onClick:function(){E()},size:"21px"})),"/t"===window.location.pathname&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:v?m.buttonExpanded:m.button,id:"sideBar_subMenu_options_setAdminView"},o.a.createElement(Ir,{text:v?Dt("$__viewInColumns",1):null,textColor:r.viewList?Mt("medium"):Mt("color"),iconColor:r.viewList?Mt("medium"):Mt("color"),title:v?null:Dt("$__viewInColumns",1),icon:"view_column",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{viewList:!1}))},size:"21px"})),o.a.createElement("div",{className:v?m.buttonExpanded:m.button,id:"sideBar_subMenu_options_viewInList"},o.a.createElement(Ir,{text:v?Dt("$__viewInList",1):null,title:v?null:Dt("$__viewInList",1),icon:"list",iconColor:r.viewList?Mt("color"):Mt("medium"),textColor:r.viewList?Mt("color"):Mt("medium"),onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{viewList:!0}))},size:"21px"}))),o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:m.separator}),b[0]&&36===b[0].length&&r.cards[b[0]]&&o.a.createElement("div",{style:{zIndex:1},id:"sideBar_subMenu_plan_infos"},o.a.createElement(gf,Object.assign({expanded:v},e))),ff.filter((function(e){return e.path===y})).length>0&&ff.filter((function(e){return e.path===y}))[0].tabs&&ff.filter((function(e){return e.path===y}))[0].tabs.length>0&&(ff.filter((function(e){return e.path===y}))[0].hashId&&b[0]&&36===b[0].length||!ff.filter((function(e){return e.path===y}))[0].hashId)&&o.a.createElement(o.a.Fragment,null,ff.filter((function(e){return e.path===y}))[0].tabs.filter((function(e){return!e.hashId&&(!b[0]||b[0]&&b[0].length<36)||e.hashId&&b[0]&&36===b[0].length})).map((function(e,t){var n=!1,a=b[0]&&36===b[0].length?r.cards[b[0]]:null;if(e&&e.access&&e.access.length>0?e.access.map((function(e){_[e]&&(n=!0)})):e&&!e.access&&(n=!0),a&&a.isTemplate&&!e.templates&&(n=!1),e&&e.AppAccess&&e.AppAccess.planAdmin&&!(_&&_.plan&&_.planAdmin)&&(n=!1),(_.owner||_&&_.enabled&&n)&&e.show)return o.a.createElement("div",{className:v?m.buttonExpanded:m.button,key:t,id:"sideBar_subMenu_plan_".concat(e.alias)},o.a.createElement(Ir,{text:v?"matrix"===e.alias?"MATRIX SWOT":Dt("$__".concat(e.alias),1):null,title:v?null:"matrix"===e.alias?"MATRIX SWOT":Dt("$__".concat(e.alias),1),icon:e.icon,iconColor:b[1]===e.path?Mt("color"):Mt("medium"),textColor:b[1]===e.path?Mt("color"):Mt("medium"),onClick:function(){O("".concat(x,"/").concat(e.path))},size:"21px"}))}))),b[0]&&36===b[0].length&&r.cards[b[0]]&&r.cards[b[0]].miroBoard&&o.a.createElement("div",{className:v?m.buttonExpanded:m.button,id:"sideBar_subMenu_plan_miroBoard"},o.a.createElement(Ir,{text:v?Dt("$__planningBoard",1):null,title:v?null:Dt("$__planningBoard",1),icon:"developer_board",iconColor:"planningBoard"===b[1]?Mt("color"):Mt("medium"),textColor:"planningBoard"===b[1]?Mt("color"):Mt("medium"),onClick:function(){O("".concat(x,"/","planningBoard"))},size:"21px"})),"/t"===window.location.pathname&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:m.separator}),o.a.createElement("div",{className:v?m.buttonExpanded:m.button,id:"sideBar_subMenu_lastTasks"},o.a.createElement(Ir,{text:v?Dt("$__lateTasks",1):null,title:v?null:Dt("$__lateTasks",1),icon:"event_busy",iconColor:"late"===b[1]?Mt("color"):Mt("medium"),textColor:"late"===b[1]?Mt("color"):Mt("medium"),onClick:function(){l.push("t#tab/lateTasks")},size:"21px"})),o.a.createElement("div",{className:v?m.buttonExpanded:m.button,id:"sideBar_subMenu_nextTasks"},o.a.createElement(Ir,{text:v?Dt("$__nextTasks",1):null,title:v?null:Dt("$__nextTasks",1),icon:"date_range",iconColor:"nextTasks"===b[1]?Mt("color"):Mt("medium"),textColor:"nextTasks"===b[1]?Mt("color"):Mt("medium"),onClick:function(){l.push("t#tab/nextTasks")},size:"21px"}))))))}));function vf(){vf=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}r(204).config();var bf=Object(_e.b)((function(e){return{store:{timeline:e.timeline,toLoad:e.toLoad}}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(ep)((function(e){var t=be.getState(),r=(t.db,t.session,t.chat),n=t.timeline,a=e.classes,i=o.a.useState(!1),c=Object(je.a)(i,2),s=c[0],u=c[1],d=o.a.useState(null),p=Object(je.a)(d,2),f=p[0],m=p[1],g=o.a.useState(0),y=Object(je.a)(g,2),v=y[0],b=y[1],x=o.a.useState(!1),_=Object(je.a)(x,2),w=(_[0],_[1],window.location.hash.split("/"));w[0]=w[0].replace("#",""),Ut(),o.a.useEffect((function(){var e=Ja();b(e)}),[JSON.stringify(n)]);var E=function(){var t=Object(Ee.a)(vf().mark((function t(n,a,o){var i,c=arguments;return vf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=c.length>3&&void 0!==c[3]?c[3]:"users","tags"===a?(u(e.subMenuExpanded),e.setSubMenuExpanded(!1)):e.setSubMenuExpanded(s),!n||window.location.pathname===n&&a!==f||l.push(n),"chat"===a?e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},r),{},{open:!0,db:i,nodeId:o})):(m(a),e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},r),{},{open:!1})));case 4:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}();return document.title="".concat(v&&v.total&&v.total>0?"(".concat(v.total,") "):"","MACHEN"),o.a.createElement("div",{className:a.root},o.a.createElement("div",{className:a.bar,id:"sideBar"},o.a.createElement("div",{className:a.logoMini,id:"sideBar_logoMini",style:{width:"100%",justifyContent:"space-between",display:"flex",cursor:"pointer"}},o.a.createElement("img",{src:nr.a,alt:"logo",style:{width:"calc(100% - 70px)",marginLeft:"15px"},onClick:function(){E("/d#tab/resume","dashboard")}}),o.a.createElement("div",{style:{padding:"7px",marginRight:"7px",cursor:"pointer"},onClick:function(){e.menuExpand()},id:"sideBar_button_hideMenu"},o.a.createElement(wt,{icon:"menu",title:"$__hideMenu",size:"22px",color:Mt("color")}))),o.a.createElement("div",{style:{position:"absolute",top:"100px",bottom:"0px",overflowX:"auto",width:"100%"}},o.a.createElement("div",{className:a.item,id:"sideBar_button_dashboard"},o.a.createElement("div",{className:"/d"===window.location.pathname?a.itemButtomActive:a.itemButtom,onClick:function(){E("/d#tab/resume","dashboard")}},o.a.createElement(wt,{icon:"dashboard",badgeColor:"primary",color:"parent",badgeVisible:!0,title:"$__dashboard",size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Dt("$__dashboard","*"))),o.a.createElement("div",{className:a.item,id:"sideBar_button_brightAndConnected"},o.a.createElement("div",{className:"/bright-and-connected"===window.location.pathname?a.itemButtomActive:a.itemButtom,onClick:function(){E("/bright-and-connected#tab/home","bright-and-connected")}},o.a.createElement(wt,{icon:R.a,badgeColor:"primary",color:"parent",badgeVisible:!0,title:"BRIGHT & CONNECTED",size:"21px",style:{marginRight:"7px"}}),"BRIGHT & CONNECTED")),o.a.createElement("div",{className:a.item,id:"sideBar_button_StrategyAndPlans"},o.a.createElement("div",{className:"/sp"===window.location.pathname?a.itemButtomActive:a.itemButtom,onClick:function(){E("/sp#tab/home","StrategyAndPlans")}},o.a.createElement(wt,{icon:"view_comfy",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Dt("$__StrategyAndPlans"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Dt("$__StrategyAndPlans","*"))),o.a.createElement("div",{className:a.item,id:"sideBar_button_myTasks"},o.a.createElement("div",{className:"/t"===window.location.pathname?a.itemButtomActive:a.itemButtom,onClick:function(){E("/t#tab/myTasks","myTasks")}},o.a.createElement(wt,{icon:"task",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Dt("$__activities"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Dt("$__activities","*"))),o.a.createElement("div",{className:a.item,id:"sideBar_button_library"},o.a.createElement("div",{className:"/library"===window.location.pathname?a.itemButtomActive:a.itemButtom,onClick:function(){E("/library","library")}},o.a.createElement(wt,{icon:"folder",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Dt("$__library"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Dt("$__library","*"))),o.a.createElement("div",{className:a.item,id:"sideBar_button_tags"},o.a.createElement("div",{className:"/tags"===window.location.pathname?a.itemButtomActive:a.itemButtom,onClick:function(){E("/tags","tags")}},o.a.createElement(wt,{icon:"turned_in",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Dt("$__tags"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Dt("$__tags","*"))),"true"!==String("true")&&o.a.createElement("div",{className:a.item,id:"sideBar_button_calendar"},o.a.createElement("div",{className:"/calendar"===window.location.pathname?a.itemButtomActive:a.itemButtom,onClick:function(){E("/calendar","calendar")}},o.a.createElement(wt,{icon:"event",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Dt("$__calendar"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Dt("$__calendar","*"))),o.a.createElement("div",{className:a.separator}),o.a.createElement("div",{className:a.item,id:"sideBar_button_chat"},o.a.createElement("div",{className:be.getState().chat.open?a.itemButtomActive:a.itemButtom,onClick:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},r),{},{open:!be.getState().chat.open}))}},o.a.createElement(St.a,{badgeContent:v&&v.total?v.total:0,color:"secondary"},o.a.createElement(wt,{icon:"chat",color:"parent",title:"$__chat",size:"21px",style:{marginBottom:"0px",marginRight:"7px"}})),Dt("$__chat","*"))),o.a.createElement("div",{className:a.item,id:"sideBar_button_calendar"},o.a.createElement("div",{className:a.itemButtom,onClick:function(){window.open("https://support.machen.ai","_blank")}},o.a.createElement(wt,{icon:"help_outline",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Dt("$__support"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Dt("$__support","*")))),!r.open&&"myDay"!==f&&"timer"!==f&&"chat"!==f&&("/t"===window.location.pathname||"/sp"===window.location.pathname||"/c"===window.location.pathname||"/d"===window.location.pathname||"/bright-and-connected"===window.location.pathname||"/library"===window.location.pathname||"/notifications"===window.location.pathname||"/calendar"===window.location.pathname||"/masterAdmin"===window.location.pathname)&&o.a.createElement("div",{className:e.subMenuExpanded?a.moduleExpanded:a.module,id:"sideBar_subMenu"},o.a.createElement(yf,{hashs:w,subMenuExpanded:function(t){e.setSubMenuExpanded(t)},expanded:e.subMenuExpanded})),!r.open&&"myDay"!==f&&"timer"!==f&&"chat"!==f&&"/tags"===window.location.pathname&&o.a.createElement("div",{className:a.moduleExpanded,id:"sideBar_session_tags"},o.a.createElement(_s,{onLoad:function(){e.setSubMenuExpanded(!0)},onExit:function(){return e.setSubMenuExpanded(!1)}})),o.a.createElement("div",{style:{position:"absolute",bottom:0,left:15,color:"#c0b283",fontSize:"10px"}},"V:",G.version)))})));function xf(){xf=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var _f=Object(De.a)((function(){return{iconButtonStyle:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));var wf=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))((function(e){_f();var t=be.getState(),r=t.db,n=t.timeline,a=t.session,i=t.chat,c=o.a.useState(!1),l=Object(je.a)(c,2),s=(l[0],l[1]),u=o.a.useState(!1),d=Object(je.a)(u,2),p=d[0],f=d[1],m=o.a.useState({}),g=Object(je.a)(m,2),y=g[0],v=g[1],b=o.a.useState("users"),x=Object(je.a)(b,2),_=(x[0],x[1],o.a.useRef(null)),w=Ut();o.a.useEffect((function(){s(!0),E()}),[JSON.stringify(n)]);var E=function(){var e=Object(Ee.a)(xf().mark((function e(){var t;return xf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Ja(),v(t),0===y.total&&f(!1);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O=function(e){_.current&&_.current.contains(e.target)||f(!1)},j=Object(h.a)({},be.getState().db.users),k={};j=(j=Object.keys(j).filter((function(e){return e!==a._id})).map((function(e){return be.getState().db.users[e]})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0}))).map((function(e){e.unReadedCount=0;var t=Object(h.a)({},n[a._id]||{});t=Object.keys(t).filter((function(r){return t[r]&&t[r].user&&t[r].user._id===e._id&&"comment"===t[r].type})).map((function(e){return t[e]}));var o=Object(h.a)({},r.users[e._id]&&n[e._id]?r.users[e._id]&&n[e._id]:{});o=Object.keys(o).filter((function(e){return o[e]&&o[e].user&&o[e].user._id===a._id&&"comment"===o[e].type})).map((function(e){return o[e]}));var i=[].concat(Object(K.a)(t),Object(K.a)(o));return i=i.sort((function(e,t){return Math.ceil(e.created_at)<Math.ceil(t.created_at)?-1:1})).map((function(e){return e})),"boolean"!==typeof e&&i&&i.length>0&&i[i.length-1]?(k=Object(h.a)(Object(h.a)({},k),{},Object(Oe.a)({},e._id,Object(h.a)(Object(h.a)({},r.users[e._id]),{},{type:"user",_lastMessage:i[i.length-1],unReadedCount:t.filter((function(e){return!e.readedBy||e.readedBy&&!e.readedBy[a._id]})).length}))),e._lastMessage=i[i.length-1],e.unReadedCount=t.filter((function(e){return!e.readedBy||e.readedBy&&!e.readedBy[a._id]})).length):(e._lastMessage={created_at:0},e.unReadedCount=0),e}));var S=Object.keys(be.getState().db.cards).filter((function(e){return"chatGroup"===r.cards[e].type&&!r.cards[e].deleted&&(r.cards[e]._users&&r.cards[e]._users[a._id]||!r.cards[e].private&&r.adminView&&w&&(w.owner||w.admin))})).map((function(e){return be.getState().db.cards[e]}));return S&&S.length>0&&(S=S.filter((function(e){if(e._users&&e._users[a._id])return!0})).map((function(e){var t;n[e._id]&&Object.keys(n[e._id]).length>0&&(t=Object.keys(n[e._id]).filter((function(t){return n[e._id]&&n[e._id][t]&&"comment"===n[e._id][t].type})).sort((function(t,r){return n[e._id][t]&&n[e._id][r]&&String(n[e._id][t].created_at)&&String(n[e._id][r].created_at)&&parseInt(n[e._id][t].created_at)>parseInt(n[e._id][r].created_at)?-1:n[e._id][t]&&n[e._id][r]&&String(n[e._id][t].created_at)&&String(n[e._id][r].created_at)&&parseInt(n[e._id][t].created_at)<parseInt(n[e._id][r].created_at)?1:0}))),e&&e._id&&t&&t.length>0&&n[e._id]&&n[e._id][t[0]]&&n[e._id][t[0]].created_at&&(k=Object(h.a)(Object(h.a)({},k),{},Object(Oe.a)({},e._id,Object(h.a)(Object(h.a)({},r.cards[e._id]),{},{type:"group",_lastMessage:n[e._id][t[0]]}))))}))),o.a.createElement("div",{id:"chatNotificationsBt",style:{zIndex:"100 !important"}},o.a.createElement(Ge.a,{ref:_,"aria-controls":p?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){y&&y.total?f((function(e){return!e})):e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},i),{},{open:!i.open}))}},o.a.createElement(St.a,{badgeContent:y&&y.total?y.total:0,color:"secondary"},o.a.createElement(wt,{icon:"chat_bubble_outline",color:"parent",title:"$__chat"}))),y&&y.total>0&&o.a.createElement(Rr.a,{open:p,anchorEl:_.current,role:void 0,transition:!0,disablePortal:!0,style:{width:"400px"}},(function(t){var c=t.TransitionProps,l=t.placement;return o.a.createElement($r.a,Object.assign({},c,{style:{transformOrigin:"bottom"===l?"center top":"center bottom"}}),o.a.createElement(Yr.a,null,o.a.createElement(Br.a,{onClickAway:O},o.a.createElement("div",{style:{padding:10,maxHeight:"70vh",overflowX:"auto",overflowY:"auto"}},Object.keys(k).filter((function(e){if((!be.getState().db.cards[e]||be.getState().db.cards[e]&&!be.getState().db.cards[e].deleted)&&n&&(n[e]&&Object.keys(n[e]).length>0&&Object.keys(n[e]).filter((function(t){return a&&a._id&&n[e][t].user._id!==a._id&&(!n[e][t].readedBy||!n[e][t].readedBy[a._id])})).length>0||n[a._id]&&Object.keys(n[a._id]).length>0&&Object.keys(n[a._id]).filter((function(t){return a&&a._id&&n[a._id][t].user._id===e&&(!n[a._id][t].readedBy||!n[a._id][t].readedBy[a._id])})).length>0))return!0})).sort((function(e,t){var r=k[e]._lastMessage&&String(k[e]._lastMessage.created_at)?Math.ceil(k[e]._lastMessage.created_at):0,n=k[t]._lastMessage&&String(k[t]._lastMessage.created_at)?Math.ceil(k[t]._lastMessage.created_at):0;return r>n?-1:r<n?1:0})).map((function(t,c){var l=k[t];return o.a.createElement("div",{key:l._id,style:{display:"flex",width:"100%",padding:15,boxShadow:"0 0 7px 7px rgba(0,0,0,0.05)"}},o.a.createElement(_t,{title:o.a.createElement(o.a.Fragment,null,l.name?l.name:l.name&&l.name.split(" ").lenth>0?l.name.split(" ")[0]:"",!l.name&&l.name&&l.name.split(" ").lenth>0?l.name.split(" ")[0]:"")},o.a.createElement("div",{style:{position:"relative",width:"100%"}},o.a.createElement("div",{style:{display:"flex",alignItems:"center",cursor:"pointer"},onClick:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},i),{},{db:r.cards[l._id]?"cards":"users",nodeId:l._id,loading:!1,open:!0}))}},o.a.createElement(St.a,{badgeContent:n&&n[l._id]&&Object.keys(n[l._id]).length>0?Object.keys(n[l._id]).filter((function(e){return a&&a._id&&n[l._id][e].user._id!==a._id&&(!n[l._id][e].readedBy||!n[l._id][e].readedBy[a._id])})).length:n&&n[a._id]&&Object.keys(n[a._id]).length>0?Object.keys(n[a._id]).filter((function(e){return a&&a._id&&n[a._id][e].user._id===l._id&&(!n[a._id][e].readedBy||!n[a._id][e].readedBy[a._id])})).length:0,color:"secondary",style:{width:"37px",height:"29px",display:"flex",alignItems:"center",marginLeft:"-12px"}},o.a.createElement(si,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},variant:a.users&&a.users[l._id]?"dot":"standard"},o.a.createElement(o.a.Fragment,null,o.a.createElement(Fr.a,{alt:l.displayName?l.displayName:l.name,src:"".concat(l.image),style:{width:"29px",height:"29px"}}),l._parent&&be.getState().db.users[l._parent]&&be.getState().db.users[l._parent].image?o.a.createElement("div",{style:{position:"absolute",bottom:4,right:-7,width:15,height:15,borderRadius:"50%",backgroundImage:"url(".concat(be.getState().db.users[l._parent].image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):o.a.createElement(o.a.Fragment,null)))),o.a.createElement("div",{style:{fontSize:"14px",maxWidth:"calc(100% - 30px)",paddingLeft:"7px",color:"gray",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}},l.name?l.name:l.name&&l.name.split(" ").lenth>0?l.name.split(" ")[0]:"",!l.name&&l.name&&l.name.split(" ").lenth>0?l.name.split(" ")[0]:"",l._parent&&be.getState().db.users[l._parent]?o.a.createElement("div",{style:{fontSize:10,color:"lightgray",marginTop:"-7px"}},be.getState().db.users[l._parent].name):o.a.createElement(o.a.Fragment,null))),o.a.createElement("div",{style:{}},o.a.createElement(Kd,{nodeId:t,showUnReaded:!0,stories:{},db:"users"})))))}))))))})))}));function Ef(){Ef=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Of=Object(De.a)((function(){return{iconButtonStyle:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));var jf=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))((function(e){Of();var t=be.getState(),r=t.db,n=t.timeline,a=t.session,i=(t.chat,o.a.useState(!1)),c=Object(je.a)(i,2),l=(c[0],c[1]),s=o.a.useState(!1),u=Object(je.a)(s,2),d=u[0],p=u[1],f=o.a.useState({}),h=Object(je.a)(f,2),m=h[0],g=h[1],y=o.a.useState("users"),v=Object(je.a)(y,2),b=v[0],x=v[1],_=o.a.useRef(null),w=Fe()().tz("America/Sao_Paulo").format("YYYY/MM/DD");Ut(),o.a.useEffect((function(){l(!0),E()}),[n]);var E=function(){var e=Object(Ee.a)(Ef().mark((function e(){var t;return Ef().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Ja(),g(t),m.total>0&&0===m.users&&x("groups"),"groups"===b&&m.total>0&&0===m.groups&&x("users");case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O=function(e){_.current&&_.current.contains(e.target)||p(!1)},j=Object.keys(r.cards).filter((function(e){return!r.cards[e].deleted&&!r.cards[e].checklist&&r.cards[e]._users&&r.cards[e]._users[a._id]&&r.cards[e]._users[a._id].myDay&&Fe()(new Date(1e3*r.cards[e]._users[a._id].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===w})).map((function(e){return r.cards[e]}));return 0===j.length?o.a.createElement(o.a.Fragment,null):o.a.createElement("div",{id:"notificationsBt",style:{zIndex:"100 !important"}},o.a.createElement(Ge.a,{ref:_,"aria-controls":d?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){p((function(e){return!e}))}},o.a.createElement(St.a,{badgeContent:j.filter((function(e){return"completed"!==e.status})).length,color:"secondary"},o.a.createElement(wt,{icon:"hourglass_empty",color:"parent",title:"$__myDay"}))),j.length>0&&o.a.createElement(Rr.a,{open:d,anchorEl:_.current,role:void 0,transition:!0,disablePortal:!0,style:{width:"400px"}},(function(e){var t=e.TransitionProps,r=e.placement;return o.a.createElement($r.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),o.a.createElement(Yr.a,null,o.a.createElement(Br.a,{onClickAway:O},o.a.createElement("div",{style:{height:"auto",maxHeight:"calc(90vh - 80px)",width:"100%",overflowY:"auto"}},o.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"7px"}},Dt("$__myDay")),o.a.createElement(po,{noChecklist:!0,noDelete:!0,showCard:!0,myDay:!0,db:"cards"})))))})))}));function kf(){kf=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Sf=Object(De.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 Lf=Object(_e.b)((function(e){return{store:e}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState(),r=(t.db,t.chat),n=t.notifications,a=t.timeline,i=t.functions,c=t.session,l=i.socket,s=e.data,u=o.a.useState(!1),d=Object(je.a)(u,2),p=d[0],f=d[1],m=Sf(),g="cards";s&&s.cardId&&be.getState().db.users[s.cardId]&&(g="users");var y=function(){var t=Object(Ee.a)(kf().mark((function t(a){var o;return kf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!be.getState().db.cards[a]||"chatGroup"!==be.getState().db.cards[a].type){t.next=8;break}return o=[s.cardId],Object.keys(n).length>0&&Object.keys(n).filter((function(e){return n[e].nodeId===a||n[e].inNode&&n[e].inNode._id===a})).map((function(e){-1===o.indexOf(e)&&o.push(e)})),t.next=5,Va(e,{readedBy:c._id,id:e.nodeId,db:"cards",type:"log"});case 5:t.sent,l.emit("data",{module:"chat",method:"put",action:"read"},{readedBy:c._id,id:e.nodeId,db:"cards",type:"log"}),e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},r),{},{open:!0,db:"cards",nodeId:s.cardId}));case 8:e.onClick&&e.onClick();case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),v=function(){var t=Object(Ee.a)(kf().mark((function t(){var r;return kf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=Gn(s.cardId),e.reduxFunction("ASYNC","SET_NOTIFICATIONS",Object(h.a)(Object(h.a)({},be.getState().notifications),{},{total:be.getState().notifications.total-r.total})),be.getState().db&&be.getState().db.cards&&be.getState().db.cards[s.cardId]&&e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},s.cardId,Object(h.a)(Object(h.a)({},be.getState().db.cards[s.cardId]),{},{_notifications:{comment:0,kpi:0,timer:0,log:0}})))})),Va(e,{readedBy:c._id,id:s.cardId,db:"cards",type:"all"}),l.emit("data",{module:"chat",method:"put",action:"read"},{readedBy:c._id,id:s.cardId,db:"cards",type:"all"},(function(){})),e.onRead&&e.onRead();case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),b=Object.keys(a[s.cardId]).filter((function(e){return c&&c._id&&a[s.cardId]&&a[s.cardId][e]&&a[s.cardId][e].user&&a[s.cardId][e].user._id&&a[s.cardId][e].user._id!==c._id&&(!a[s.cardId][e].readedBy||a[s.cardId][e].readedBy&&!a[s.cardId][e].readedBy[c._id])}));return o.a.createElement("div",{className:s.readed?m.Readed:m.unReaded,onClick:function(){},style:{width:369,overflow:"auto"}},s.cardId&&be.getState().db.cards[s.cardId]&&o.a.createElement("div",{style:be.getState().db.cards[s.cardId]&&"chatGroup"===be.getState().db.cards[s.cardId].type?{cursor:"pointer"}:{},onClick:"chatGroup"===be.getState().db.cards[s.cardId].type?function(e){y(s.cardId)}:null},o.a.createElement(ii,{setPrivate:function(e){f(e)},db:"cards",data:be.getState().db.cards[s.cardId],onlyOption:"chatGroup"===be.getState().db.cards[s.cardId].type,onClick:"chatGroup"===be.getState().db.cards[s.cardId].type?function(e){y(s.cardId)}:null})),b.length>0&&(!be.getState().db.cards[s.cardId].private||be.getState().db.cards[s.cardId].private&&(be.getState().controls.showPrivate||p))?o.a.createElement(o.a.Fragment,null,b.sort((function(e,t){return parseInt(a[s.cardId][e].created_at)>parseInt(a[s.cardId][t].created_at)?-1:parseInt(a[s.cardId][e].created_at)<parseInt(a[s.cardId][t].created_at)?1:0})).map((function(t,r){return o.a.createElement("div",{key:"".concat(t).concat(r),style:{position:"relative",marginBottom:"7px",display:"-webkit-box"}},o.a.createElement(Ii,{storie:Object(h.a)(Object(h.a)({},be.getState().timeline&&be.getState().timeline[s.cardId]&&be.getState().timeline[s.cardId][t]?be.getState().timeline[s.cardId][t]:{}),{},{idRel:t.nodeId}),boxStyle:{width:"calc(100% - 10px) !important",maxWidth:"285px"},db:g,noReactions:!0,noReply:!0,openLightBox:function(r){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:be.getState().timeline[s.cardId][t].files?be.getState().timeline[s.cardId][t].files:[],file:r})}}),r+1===b.length?o.a.createElement("div",{style:{position:"absolute",height:"93px",left:0,bottom:-10,right:8,background:"linear-gradient(0deg, rgba(255,255,255,1) 34%, rgba(255,255,255,0) 100%)"}},o.a.createElement("div",{style:{position:"absolute",bottom:0,display:"flex",justifyContent:"space-between",width:"100%"}},o.a.createElement(Ct,{title:Dt("$__open",1),text:Dt("$__open",1),color:Mt("color"),icon:"launch",onClick:"chatGroup"===be.getState().db.cards[s.cardId].type?function(e){y(s.cardId)}:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},be.getState().sideModule),{},{db:"cards",id:s.cardId,module:"cardEdit",activeModule:"cardEdit",data:be.getState().db.cards[s.cardId]}))},size:"13px",textSize:"13px",style:{padding:"0px !important"}}),o.a.createElement(Ct,{title:Dt("$__markAsRead",1),text:Dt("$__markAsRead",1),color:Mt("color"),icon:"mark_chat_read",onClick:function(){v()},size:"13px",textSize:"13px",style:{padding:"0px !important"}}))):o.a.createElement(o.a.Fragment,null))}))):o.a.createElement(o.a.Fragment,null))}));function Cf(){Cf=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var If=Object(_e.b)((function(e){return{store:{notifications:e.notifications,timeline:e.timeline,session:e.session,cards:e.db.cards}}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState(),r=t.notifications,n=t.session,a=t.timeline,i=t.functions.socket,c=o.a.useState(!1),l=Object(je.a)(c,2),s=(l[0],l[1]),u=o.a.useState(!1),d=Object(je.a)(u,2),p=d[0],f=d[1],m=o.a.useState(7),g=Object(je.a)(m,2),y=g[0],v=g[1],b=o.a.useState(!1),x=Object(je.a)(b,2),_=x[0],w=x[1],E=o.a.useRef(null);o.a.useEffect((function(){return O(),function(){return!1}}),[]);var O=function(){var t=Object(Ee.a)(Cf().mark((function t(){var r,n,a,o,i,c,l,s,u=arguments;return Cf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=u.length>0&&void 0!==u[0]?u[0]:0,n=u.length>1&&void 0!==u[1]?u[1]:0,f(!0),t.next=5,Qr.post("/M_UnReadedList",{skip:r,limit:n});case 5:if(a=t.sent,o=0,i=0,c=0,!(a&&a.data&&a.data.length>0)){t.next=21;break}return l=Object(h.a)({},be.getState().timeline),s=[],t.next=14,new Promise((function(e,t){a.data.map((function(t,r){o=t.total,s.push(t.card),t.timeline&&t.timeline.length>0&&t.timeline.map((function(e){var t={},r={};e&&e.params&&e.params.readedBy&&e.params.readedBy.filter((function(e){return e._id})).length>0&&e.params.readedBy.map((function(e){t=Object(h.a)(Object(h.a)({},t),{},Object(Oe.a)({},e._id,e))})),e&&e.params&&e.params.reactions&&e.params.reactions.filter((function(e){return e._id})).length>0&&e.params.reactions.map((function(e){r=Object(h.a)(Object(h.a)({},r),{},Object(Oe.a)({},e.type,Object(h.a)(Object(h.a)({},r[e.type]),{},Object(Oe.a)({},e._id,e))))})),parseInt(i)<parseInt(e.data.created_at)&&(i=parseInt(e.data.created_at)),(0===c||c>parseInt(e.data.created_at))&&(c=parseInt(e.data.created_at)),l=Object(h.a)(Object(h.a)({},l),{},Object(Oe.a)({},e.nodeId,Object(h.a)(Object(h.a)({},l&&l[e.nodeId]?l[e.nodeId]:{}),{},Object(Oe.a)({},e.data._id,Object(h.a)(Object(h.a)(Object(h.a)({},e.data),e.params),{},{readedBy:t,_reactions:r})))))})),r+1===a.data.length&&e(!0)}))}));case 14:t.sent&&e.reduxFunction("ASYNC","SET_NOTIFICATIONS",{total:o>0?o:0,lastNotification:i,firstNotification:c}),e.reduxFunction("ASYNC","SET_TIMELINE",Object(h.a)(Object(h.a)({},be.getState().timeline),l)),sn(e,s),f(!1),t.next=22;break;case 21:f(!1);case 22:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),j=function(){var t=Object(Ee.a)(Cf().mark((function t(){return Cf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:$t({message:Dt("$__confirmClearAllNotifications",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){w(!1);var t=Object(h.a)({},be.getState().timeline);Object.keys(t).map((function(e){t&&t[e]&&Object.keys(t[e]).filter((function(r){return be.getState().db.cards[e]&&"chatGroup"!==be.getState().db.cards[e].type&&(!t[e][r].readedBy||t[e][r].readedBy&&!t[e][r].readedBy[n._id])})).map((function(r){delete t[e][r]}))})),e.reduxFunction("ASYNC","SET_TIMELINE",{timeline:t}),e.reduxFunction("ASYNC","SET_NOTIFICATIONS",{total:0,lastNotification:0,firstNotification:0});try{i.emit("data",{module:"notifications",method:"put",action:"readedAll"},{})}catch(r){console.log(r)}}});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),k=function(e){E.current&&E.current.contains(e.target)||w(!1)},S=0,L=0;return Object.keys(be.getState().db.cards).filter((function(e){var t=be.getState().db.cards[e];if("chatGroup"!==t.type&&t._users&&t._users[n._id]&&a[e]&&Object.keys(a[e]).filter((function(t){return n&&n._id&&a&&a[e]&&a[e][t]&&a[e][t].user&&a[e][t].user._id&&a[e][t].user._id!==n._id&&(!a[e][t].readedBy||a[e][t].readedBy&&!a[e][t].readedBy[n._id])})).length>0)return!0})).map((function(e,t){a[e]&&Object.keys(a[e]).filter((function(t){return n&&n._id&&a[e]&&a[e][t]&&a[e][t].user&&a[e][t].user._id&&a[e][t].user._id!==n._id&&(!a[e][t].readedBy||a[e][t].readedBy&&!a[e][t].readedBy[n._id])})).map((function(){t<=y&&(L+=1),S+=1}))})),r.total>S&&(S=r.total),0===S?o.a.createElement(o.a.Fragment,null):o.a.createElement("div",{id:"notificationsBt",style:{zIndex:"100 !important"}},o.a.createElement(Ge.a,{ref:E,"aria-controls":_?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){s(!(S>0)),w((function(e){return!e}))}},o.a.createElement(St.a,{badgeContent:S,color:"secondary"},o.a.createElement(wt,{icon:0===S?"notifications_none":"notifications_active",color:"parent",title:"$__notifications"}))),o.a.createElement(Rr.a,{open:_,anchorEl:E.current,role:void 0,transition:!0,disablePortal:!0},(function(e){var t=e.TransitionProps,r=e.placement;return o.a.createElement($r.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),o.a.createElement(Yr.a,null,o.a.createElement(Br.a,{onClickAway:k},o.a.createElement("div",{style:{height:"auto",maxHeight:"calc(90vh - 80px)",width:"369px",overflowY:"auto"}},o.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"7px",width:"-webkit-fill-available"}},o.a.createElement("div",null,Dt("$__notifications")),S>0?o.a.createElement(Ct,{title:Dt("$__clearNotifications",1),text:Dt("$__clearNotifications",1),color:Mt("color"),icon:"clear_all",onClick:function(){j()},size:"21px",style:{padding:"0px !important"}}):o.a.createElement(o.a.Fragment,null)),Object.keys(be.getState().db.cards).filter((function(e){var t=be.getState().db.cards[e];if("chatGroup"!==t.type&&t._users&&t._users[n._id]&&a[e]&&Object.keys(a[e]).filter((function(t){return n&&n._id&&a&&a[e]&&a[e][t]&&a[e][t].user&&a[e][t].user._id&&a[e][t].user._id!==n._id&&(!a[e][t].readedBy||a[e][t].readedBy&&!a[e][t].readedBy[n._id])})).length>0)return!0})).sort((function(e,t){var r=0,o=0;return a[e]&&Object.keys(a[e]).filter((function(t){return n&&n._id&&a&&a[e]&&a[e][t]&&a[e][t].user&&a[e][t].user._id&&a[e][t].user._id!==n._id&&(!a[e][t].readedBy||a[e][t].readedBy&&!a[e][t].readedBy[n._id])})).map((function(t){parseInt(a[e][t].created_at)>r&&(r=parseInt(a[e][t].created_at))})),a[t]&&Object.keys(a[t]).filter((function(e){return a[t][e].user._id!==n._id&&(!a[t][e].readedBy||a[t][e].readedBy&&!a[t][e].readedBy[n._id])})).map((function(e){parseInt(a[t][e].created_at)>r&&(o=parseInt(a[t][e].created_at))})),r>o?-1:r<o?1:0})).map((function(e,t){return t<=y?o.a.createElement("div",{key:"".concat(t).concat(e)},o.a.createElement(Lf,{data:{cardId:e},onRead:function(){if(parseInt(be.getState().notifications.total)>L){y&&parseInt(y);setTimeout((function(){O(0,8)}),1e3)}},onClick:function(){w(!1)}})):o.a.createElement(o.a.Fragment,{key:"".concat(t).concat(e)})})),parseInt(be.getState().notifications.total)>L?o.a.createElement("div",{style:{width:"calc(100% - 14px)",display:"flex",justifyContent:"center",padding:7}},p?o.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},o.a.createElement("span",{style:{color:Mt("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},Dt("$__loadingNotifications")),o.a.createElement(Ga,null)):o.a.createElement(Ct,{title:Dt("$__seeMoreNotifications",1),text:Dt("$__seeMoreNotifications",1),color:Mt("menu"),icon:"notifications_active",onClick:function(){O(y),v(y+7)},size:"21px",style:{padding:"0px !important"}})):o.a.createElement(o.a.Fragment,null)))))})))}));var Ff=Object(_e.b)((function(e){return{users:e.users}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=o.a.useState(!1),r=Object(je.a)(t,2),n=r[0],a=r[1],i=o.a.useRef(null),c=be.getState().db,s=(c.users,Ut(),window.location.hash.split("/"));s[0]=s[0].replace("#","");var u=null;36===s[0].length||s[2]&&36===s[2].length?36===s[0].length?u=s[0]:36===s[2].length&&(u=s[2]):u=null;var d=window.location.pathname.replace("/","").toLowerCase(),p=c.dataType.filter((function(e){if(("sp"===d||!e.hash&&!u||e.hash&&u)&&e.view&&Object.keys(e.view).filter((function(e){return e===d})).length>0&&(!e.view[d].pages||s[1]&&e.view[d].pages.indexOf(s[1])>-1||!s[1]&&e.view[d].pages.indexOf("none")>-1))return e})),f=function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=uf();console.log(n),"users"===t.db&&t.data&&"user"===t.data.type&&n.usedUsers>=n.maxUsers?l.push("subscriptionUpgrade#users"):e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},be.getState().sideModule),{},{id:"new",activeModule:t.iniModule,db:t.db,data:Object(h.a)({type:t.name,_parent:s[0]&&c.cards[s[0]]?s[0]:null},"user"===t.data.type?{}:Object(h.a)({status:"notStarted"},r?{isTemplate:!0}:{}))}))},m=function(e){i.current&&i.current.contains(e.target)||a(!1)};function g(e){"Tab"===e.key&&(e.preventDefault(),a(!1))}return 0===p.length?o.a.createElement(o.a.Fragment,null):o.a.createElement("div",{id:"QuickAddBt"},o.a.createElement(Ge.a,{ref:i,"aria-controls":n?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){1===p.length?f(p[0],!(!s[1]||"template"!==s[1])):p.length>1&&a((function(e){return!e}))}},o.a.createElement(wt,{usePropagation:!0,size:"27px",color:Mt("menu")},"add_box")),o.a.createElement(Rr.a,{open:n,anchorEl:i.current,role:void 0,transition:!0,disablePortal:!0},(function(e){var t=e.TransitionProps,r=e.placement;return o.a.createElement($r.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),o.a.createElement(Yr.a,null,o.a.createElement(Br.a,{onClickAway:m},o.a.createElement(qr.a,{autoFocusItem:n,id:"menu-list-grow",onKeyDown:g},p.sort((function(e,t){return e.name>t.name?-1:0})).map((function(e,t){return o.a.createElement(Vr.a,{key:t,style:{color:Mt("menu")},onClick:function(){a(!1),f(e)}},o.a.createElement(wt,{icon:e.icon,style:{margin:"none !important"},color:Mt("menu")}),o.a.createElement("span",{style:{marginLeft:"7px"}},Dt("$__".concat(e.name),1)))}))))))})))}));function Tf(){Tf=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Nf=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState(),r=t.db,n=t.timeline,a=t.session,i=(t.chat,o.a.useState(!1)),c=Object(je.a)(i,2),l=(c[0],c[1]),s=o.a.useState(!1),u=Object(je.a)(s,2),d=u[0],p=u[1],f=o.a.useState({}),h=Object(je.a)(f,2),m=h[0],g=h[1],y=o.a.useState("users"),v=Object(je.a)(y,2),b=v[0],x=v[1],_=o.a.useRef(null);Fe()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),Ut(),o.a.useEffect((function(){l(!0),w()}),[n]);var w=function(){var e=Object(Ee.a)(Tf().mark((function e(){var t;return Tf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Ja(),g(t),m.total>0&&0===m.users&&x("groups"),"groups"===b&&m.total>0&&0===m.groups&&x("users");case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),E=function(e){_.current&&_.current.contains(e.target)||p(!1)},O=Object.keys(r.cards).filter((function(e){return r.cards[e]&&r.cards[e]._kpiTimer&&r.cards[e]&&r.cards[e]._users&&Object.keys(r.cards[e]._kpiTimer).filter((function(t){return r.cards[e]._kpiTimer&&r.cards[e]._kpiTimer[t]&&r.cards[e]._kpiTimer[t].userId&&a&&a._id&&r.cards[e]._kpiTimer[t].userId===a._id})).length>0&&Object.keys(r.cards[e]._users).filter((function(e){return a&&a._id&&e===a._id})).length>0})).map((function(e){return r.cards[e]}));return 0===O.length?o.a.createElement(o.a.Fragment,null):o.a.createElement("div",{id:"notificationsBt",style:{zIndex:"100 !important"}},o.a.createElement(Ge.a,{ref:_,"aria-controls":d?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){p((function(e){return!e}))}},o.a.createElement(St.a,{badgeContent:O.length,color:"secondary"},o.a.createElement(wt,{icon:"timer",color:"parent",title:"$__timersInProgress"}))),O.length>0&&o.a.createElement(Rr.a,{open:d,anchorEl:_.current,role:void 0,transition:!0,disablePortal:!0,style:{width:"400px"}},(function(e){var t=e.TransitionProps,r=e.placement;return o.a.createElement($r.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),o.a.createElement(Yr.a,null,o.a.createElement(Br.a,{onClickAway:E},o.a.createElement("div",{style:{height:"auto",maxHeight:"calc(90vh - 80px)",width:"100%",overflowY:"auto"}},o.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"7px"}},Dt("$__timersInProgress")),O.map((function(e,t){return o.a.createElement(ii,{db:"cards",key:t,data:e,notGlobalExpanded:!0,viewTimer:!0})}))))))})))}));function Pf(){Pf=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Af=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Pi)((function(e){var t=o.a.useState(""),r=Object(je.a)(t,2),n=r[0],a=r[1],i=o.a.useState(!1),c=Object(je.a)(i,2),l=c[0],s=c[1],u=o.a.useState([]),d=Object(je.a)(u,2),p=d[0],f=d[1],m=o.a.useState(!1),g=Object(je.a)(m,2),y=g[0],v=g[1],b=o.a.useState(!1),x=Object(je.a)(b,2),_=x[0],w=x[1],E=o.a.useState("all"),O=Object(je.a)(E,2),j=O[0],k=O[1],S=be.getState(),L=S.db,C=S.session,I=Ut(),F=window.location.hash.split("/");F[0]=F[0].replace("#",""),o.a.useEffect((function(){if(e.text.length>1&&e.text!==n){a(e.text);var t=setTimeout((function(){}),15e3);return clearTimeout(t),t=setTimeout((function(){return T()}),1e3),s(!0),function(){return clearTimeout(t)}}}),[e.text]),o.a.useEffect((function(){if(e.completed!==y&&e.text&&e.text.length>1){f([]),s(!0),v(!y),w(!0);var t=setTimeout((function(){return T()}),1e3);return function(){return clearTimeout(t)}}}),[e.completed]),o.a.useEffect((function(){if(e.deleted!==_&&e.text&&e.text.length>1){f([]),s(!0),w(!_),v(!0);var t=setTimeout((function(){return T()}),1e3);return function(){return clearTimeout(t)}}}),[e.deleted]);var T=function(){var t=Object(Ee.a)(Pf().mark((function t(){var r;return Pf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,un(Object(h.a)(Object(h.a)({},e),{},{search:e.text,ignoreLoader:!0,deleted:e.deleted}),null,!1,null,"search",e.completed);case 2:(r=t.sent)&&setTimeout((function(){N(r)}),300);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),N=function(){var t=Object(Ee.a)(Pf().mark((function t(r){var n,a,o;return Pf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object(h.a)(Object(h.a)({},be.getState().db.cards),r),a=new Promise((function(t,r){t(Object.keys(n).filter((function(t){return"chatGroup"!==n[t].type&&!n[t].checklist&&(!e.completed&&n[t]&&"completed"!==n[t].status||e.completed&&n[t]&&"completed"===n[t].status)&&(I.owner||I.planAdmin||C._id&&n[t]._users&&n[t]._users[C._id])&&e.text&&(n[t].name&&n[t].name.toLowerCase().indexOf(e.text.toLowerCase())>-1||n[t].description&&n[t].description.toLowerCase().indexOf(e.text.toLowerCase())>-1)&&(!e.deleted&&!n[t].deleted||e.deleted&&n[t].deleted)&&(!n[t].private||n[t].private&&n[t]._users&&n[t]._users[C._id])})))})),t.next=4,a.then((function(e){return e}));case 4:(o=t.sent)&&(f(o),s(!1),e.onFinish&&e.onFinish(o.length));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return o.a.createElement("div",{style:{width:"100%"}},o.a.createElement("div",{style:{positin:"relative",width:"100%",minHeight:"100px"}},l&&o.a.createElement(Bo,null,o.a.createElement(Ro,{xs:12,sm:12,md:12,lg:12,xl:12},o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},o.a.createElement(Ga,null)))),o.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},o.a.createElement("div",{style:{width:"177px",padding:7,display:"flex",flexDirection:"column",marginRight:"solid 1px lightgray"}},p.length>1?o.a.createElement("div",{style:{backgroundColor:"all"===j?"rgba(0,0,0,0.08)":"",padding:"0 3px"}},o.a.createElement(Ct,{title:Dt("$__allResults","*"),text:Dt("$__allResults","*"),color:"all"===j?Mt("menu"):"lightGray",icon:"manage_search",onClick:function(){k("all")},size:"17px",style:{padding:"0px 3px !important"},transparent:!0})):o.a.createElement(o.a.Fragment,null),L.type.filter((function(e){return p.filter((function(t){return L.cards[t].type===e.value})).length>0})).map((function(e,t){return o.a.createElement("div",{key:t,style:{backgroundColor:"asset"===j?"rgba(0,0,0,0.08)":"",padding:"0 3px",display:"flex",justifyContent:"space-between",alignItems:"center"}},o.a.createElement(Ct,{title:Dt("".concat(e.label),"*"),text:Dt("".concat(e.label),"*"),color:j===e.value?Mt("menu"):"lightGray",icon:e.icon,onClick:function(){k(e.value)},size:"17px",style:{padding:"0px 3px !important"},transparent:!0}),o.a.createElement("div",{style:{backgroundColor:j===e.value?Mt("menu",1):Mt("menu",.5),fontSize:9,color:"#FFFFFF",borderRadius:11,width:22,height:22,display:"flex",alignItems:"center",justifyContent:"center"}},p.filter((function(t){return L.cards[t].type===e.value})).length))}))),o.a.createElement("div",{style:{width:"calc(100% - 177px)",padding:7,display:"flex",flexDirection:"column"}},o.a.createElement(Bo,null,L.type.filter((function(e){return"all"!==j&&e.value===j||"all"===j&&p.filter((function(t){return L.cards[t].type===e.value})).length>0})).map((function(t,r){return o.a.createElement(o.a.Fragment,null,o.a.createElement(Ro,{xs:12,sm:12,md:12,lg:12,xl:12},o.a.createElement(qo,{title:Dt(t.label,1),icon:t.icon,color:Mt("menu"),style:{padding:"7px"}}),p.filter((function(e){return L.cards[e].type===t.value})).sort((function(e,t){return L.cards[e].name<L.cards[t].name?-1:L.cards[e].name>L.cards[t].name?1:0})).map((function(t,r){return o.a.createElement(Ro,{key:t,md:12,style:{minWidth:"300px"}},o.a.createElement(ii,{data:L.cards[t],db:"cards",showConnectedIn:!0,searchText:e.text,expanded:!1,onAction:function(){e.onAction()}}))}))))})))))))})));Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Pi)((function(e){return o.a.createElement(o.a.Fragment,null)})));function Df(){Df=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var zf=Object(_e.b)((function(e){return{store:e}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t,r=be.getState(),n=r.timeline,a=r.functions.socket,i=be.getState().db,c=o.a.useState(!1),l=Object(je.a)(c,2),s=l[0],u=l[1],d=o.a.useState(e.data),p=Object(je.a)(d,2),f=p[0],m=p[1],g=f.name.split("."),y=g[g.length-1],v=o.a.useState(!1),b=Object(je.a)(v,2),x=b[0],_=b[1],w=o.a.useState(g[0]),E=Object(je.a)(w,2),O=E[0],j=E[1],k=o.a.useState(g[0]),S=Object(je.a)(k,2),L=S[0],C=S[1];o.a.useEffect((function(){L||C(!0)}),[e.data]),"blob"===f.name&&(f.name="".concat(Dt("$__coverImage","*"),".jpg"),y="jpg");var I="attachment";be.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(y.toLowerCase())>-1})).length>0&&(I=be.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(y.toLowerCase())>-1}))[0].icon||"https://machen.azureedge.net/".concat(f.file));var F=function(){var e=Object(Ee.a)(Df().mark((function e(t){return Df().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{a.emit("data",{module:"node",method:"put",action:"update"},Object(h.a)({_id:f._id},t),Object(Ee.a)(Df().mark((function e(){return Df().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:m(Object(h.a)(Object(h.a)({},f),t)),_(!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)}}();return o.a.createElement("div",{style:{width:"100%"}},o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginBottom:"5px",cursor:"pointer"}},e.resume?o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"},onClick:function(t){e.openLightBox&&e.openLightBox()}},o.a.createElement("div",{style:{position:"relative",float:"left",width:"33px",height:"33px",alignItems:"center",display:"flex",overflow:"hidden"}},"string"===typeof I&&-1===I.indexOf("https")&&-1===I.indexOf("svg")?o.a.createElement(wt,{icon:I,size:"33px"}):o.a.createElement("img",{src:I,width:"100%",style:{width:"auto",height:"auto",maxHeight:"77%"},onError:function(e){return e.target.src=I}})),o.a.createElement("div",{style:{marginLeft:"7px",width:"calc(100% - 80px)",maxWidth:"calc(100% - 80px)",minWidth:"150px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}},Ht(f.name,e.searchText)),i.users[f.createdBy]&&o.a.createElement("div",{style:{position:"absolute",right:"10px",top:"7px",zIndex:"10"}},o.a.createElement(la.a,{max:7},o.a.createElement(xt.a,{title:i.users[f.createdBy].displayName?i.users[f.createdBy].displayName:i.users[f.createdBy].name},o.a.createElement(rl,{alt:i.users[f.createdBy].displayName?i.users[f.createdBy].displayName:i.users[f.createdBy].name,src:"".concat(i.users[f.createdBy].image),style:{width:"15px",height:"15px"}},i.users[f.createdBy].name.substr(0,1)))))),e.showParent&&(f.timelineId||f.message)&&(i.cards[f.cardId]&&n[f.cardId]&&n[f.cardId][f.timelineId]||f.message)&&o.a.createElement("div",{style:{width:"100%",marginBottom:"33px"}},o.a.createElement(Ii,{openLightBox:function(t){e.openLightBox&&e.openLightBox(t)},storie:i.cards[f.cardId]&&n[f.cardId]&&n[f.cardId][f.timelineId]?n[f.cardId][f.timelineId]:f.message,db:"cards",nodeId:f.cardId}),o.a.createElement("div",{style:{clear:"both"}})),e.showParent&&f.cardId&&i.cards[f.cardId]&&o.a.createElement("div",{style:{width:"100%",top:"33px"}},o.a.createElement(ii,{db:"cards",data:i.cards[f.cardId],showConnectedIn:!0})),o.a.createElement("div",{style:{width:"100%",height:"1px",backgroundColor:"rgba(0,0,0,0.1)",marginTop:"15px"}})):o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginTop:"7px",padding:"15px",display:"flex",alignItems:"center",height:"70px"}},o.a.createElement("div",{style:{position:"absolute",top:"0px",width:"calc(100% - 30px)",borderBottom:"solid 1.5px ".concat(Mt("color")),alignItems:"center",display:"flex",color:Mt("color")}},o.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(){_(!0)}},x?o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px",display:"flex",alignItems:"center"}},o.a.createElement("div",{style:{width:"calc(100% - 50px)",display:"flex"}},o.a.createElement(Qn,{label:Dt("$__taskTitle"),variant:Mt("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){j(e.target.value)},onBlur:function(e){""===e.target.value&&_(!x)},onKeyDown:function(e){13===e.keyCode&&O&&F({name:"".concat(O,".").concat(y)}),27===e.keyCode&&(_(!x),j())}},autoFocus:!0,value:O,placeholder:Dt("$__taskTitlePlaceholder")})),o.a.createElement("div",{style:{display:"flex"}},o.a.createElement("div",{onClick:function(){return F({name:"".concat(O,".").concat(y)})}},o.a.createElement(wt,{color:"green",icon:"save",title:Dt("$__save","*"),size:e.actionsSize||"25px"})),o.a.createElement("div",{onClick:function(){_(!x),j("")}},o.a.createElement(wt,{color:Mt("medium"),icon:"cancel",title:Dt("$__cancel","*"),size:e.actionsSize||"25px"}))))):o.a.createElement("div",{style:{width:"100%"}},f.in&&f.in.name&&o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},"User"===f.in.db?o.a.createElement(xt.a,{title:f.in.name},o.a.createElement(rl,{alt:f.in.name,src:f.in.image,style:{width:"15px",height:"15px"}},f.in.name)):o.a.createElement(o.a.Fragment,null),o.a.createElement(ra,{title:f.in.name,icon:"User"===f.in.db?null:f.in.type&&i&&i.dataType&&i.dataType.filter((function(e){return e.name===f.in.type}))[0]&&i.dataType.filter((function(e){return e.name===f.in.type}))[0].icon||"$__topic",color:Mt("medium"),style:{padding:"7px",width:"calc(100% - 30px)",textAlign:"left"},textStyle:!0})),o.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",padding:"0 15px"}},o.a.createElement("div",{style:(t={position:"relative",float:"left",width:"33px",height:"33px",marginRight:"7px",alignItems:"center"},Object(Oe.a)(t,"height","50px"),Object(Oe.a)(t,"display","flex"),Object(Oe.a)(t,"justifyContent","center"),t)},"string"===typeof I&&-1===I.indexOf("https")&&-1===I.indexOf("svg")?o.a.createElement(wt,{icon:I,size:"33px"}):o.a.createElement("div",{style:{position:"absolute",width:"33px",height:"33px",margin:"7px",borderRadius:"50%",overflow:"hidden",backgroundImage:'url("'.concat(I,'")'),backgroundPosition:"center center",backgroundSize:"cover"}})),f.name),f.createdBy&&o.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center",color:e.dark?"lightgray":"gray",fontSize:10,marginLeft:"42px",clear:"both"}},o.a.createElement(rl,{alt:f.createdBy.name,src:f.createdBy.image,style:{width:"15px",height:"15px"}},f.createdBy.name),o.a.createElement("span",{style:{marginLeft:3}},f.createdBy.name," - (",Kt(f.created_at),")")))),o.a.createElement("div",{style:{width:"130px",textAlign:"center",borderRight:"solid 1.5px ".concat(Mt("color")),alignItems:"center",justifyContent:"center",display:"flex",fontSize:"12px"}},Fe()(new Date(1e3*f.created_at)).format("DD/MM/YYYY HH:mm")),o.a.createElement("div",{style:{width:"130px",borderRight:"solid 1.5px ".concat(Mt("color")),alignItems:"center",justifyContent:"center",display:"flex",overflow:"visible"}},i.users[f.createdBy]&&o.a.createElement(xt.a,{title:i.users[f.createdBy].name},o.a.createElement(o.a.Fragment,null,o.a.createElement(rl,{size:"sm",src:"".concat(i.users[f.createdBy].image)},i.users[f.createdBy].name.substr(0,1))))),o.a.createElement("div",{style:{width:"300px",textAlign:"left",borderRight:"solid 1.5px ".concat(Mt("color")),paddingLeft:"15px",alignItems:"center",justifyContent:"center",display:"flex"}}),o.a.createElement("div",{style:{width:"130px",textAlign:"left",paddingLeft:"15px",alignItems:"center",justifyContent:"center",display:"flex"}},o.a.createElement(xt.a,{title:Dt("$__showFile")},o.a.createElement(wt,{onClick:e.openLightBox?function(){e.openLightBox()}:null},"pageview")),(f.timelineId||f.message)&&o.a.createElement(xt.a,{title:Dt("$__viewMessage")},o.a.createElement(wt,{size:"20px",onClick:function(){u(!s)}},"feedback")))))),(f.timelineId||f.message)&&s&&(i.cards[f.cardId]&&n[f.cardId]&&n[f.cardId][f.timelineId]||f.message)&&o.a.createElement("div",{style:{width:"100%"}},o.a.createElement(Ii,{openLightBox:function(t){e.openLightBox&&e.openLightBox(t)},storie:i.cards[f.cardId]&&n[f.cardId]&&n[f.cardId][f.timelineId]?n[f.cardId][f.timelineId]:f.message,db:"cards",nodeId:f.cardId})))}));function Mf(){Mf=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Bf=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Pi)((function(e){var t=o.a.useState(""),r=Object(je.a)(t,2),n=r[0],a=r[1],i=o.a.useState(!1),c=Object(je.a)(i,2),l=c[0],s=c[1],u=o.a.useState([]),d=Object(je.a)(u,2),p=d[0],f=d[1],h=be.getState(),m=h.db,g=h.functions,y=m.dataType,v=(g.socket,setTimeout((function(){}),1e3),[]),b=window.location.hash.split("/");b[0]=b[0].replace("#",""),o.a.useEffect((function(){if(e.text.length>1&&e.text!==n){a(e.text);var t=setTimeout((function(){return x()}),1e3);return s(!0),function(){return clearTimeout(t)}}}),[e.text]);var x=function(){var t=Object(Ee.a)(Mf().mark((function t(){var r;return Mf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Qr.get("/M_Files_Search/?text=".concat(e.text));case 2:(r=t.sent)&&r.data&&(e.onFinish&&e.onFinish(Object.keys(r.data).length),f(r.data),s(!1));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return o.a.createElement("div",{style:{width:"100%"}},o.a.createElement("div",{style:{positin:"relative",width:"100%"}},l&&o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},o.a.createElement(Ga,null)),o.a.createElement(Bo,null,Object.keys(p).length>0&&o.a.createElement(Ro,{xs:12,sm:12,md:12,lg:12,xl:12},o.a.createElement(qo,{title:Dt("$__files",1),icon:y.filter((function(e){return"plan"===e.name}))[0].icon,color:Mt("menu"),filterText:e.text,style:{padding:"7px"}}),Object.keys(p).map((function(t,r){return v.push(p[t]),o.a.createElement(Ro,{key:t,md:12},o.a.createElement(zf,{data:p[t],searchText:e.text,resume:!0,showParent:!0,openLightBox:function(){var r;r=p[t]._id,e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:v,file:r}),e.onAction&&e.onAction()}}))}))))))}))),$f=r(786),Yf=r.n($f),Rf=function(e){return{avatar:{width:"30px",height:"30px",backgroundSize:"cover",borderRadius:"50%"},component:{marginTop:"15px",marginRight:"8px",marginBottom:"15px",zIndex:"10",display:"flex",alignItems:"center",justifyContent:"center"},selectedName:{display:"inline-flex",cursor:"pointer"},selectedNameText:{textDecoration:"none",fontSize:"12px",fontFamily:"Soleto"}}};function Gf(){Gf=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Hf=Object(_e.b)((function(){return{}}),(function(e){return Object(s.b)(n,e)}))(Yf()(Rf)((function(e){var t=be.getState(),r=t.db,n=t.session,a=be.getState().functions.socket,i=o.a.useState(!1),c=Object(je.a)(i,2),l=c[0],s=c[1],u=o.a.useRef(null),d=function(e){u.current&&u.current.contains(e.target)||s(!1)};function p(e){"Tab"===e.key&&(e.preventDefault(),s(!1))}var f=o.a.useRef(l);o.a.useEffect((function(){!0===f.current&&!1===l&&u.current.focus(),f.current=l}),[l]);var m=function(){var e=Object(Ee.a)(Gf().mark((function e(){return Gf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a.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)}}(),g=e.classes,y=r.users,v=y&&Object.keys(y).length>0?y[Object.keys(y).find((function(e){return n&&n._id&&y[e]&&y[e]._id&&y[e]._id.indexOf(n._id)>-1}))]:{};return v&&v.name?o.a.createElement("div",{className:g.component},o.a.createElement("div",{className:g.selectedName,onClick:function(e){s((function(e){return!e}))}},o.a.createElement("div",{ref:u,className:g.selectedNameText,style:{color:Mt("light")||"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center"}},o.a.createElement(_t,{title:o.a.createElement(o.a.Fragment,null,(v.name,v.name))},o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"33px",height:"33px",borderRadius:"50%",border:"solid 1px ".concat(Mt("menu"))}},o.a.createElement("div",{style:{display:"flex",width:"90%",height:"90%",backgroundImage:'url("'.concat(v.image,'")'),backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",borderRadius:"50%"}})))))),o.a.createElement("div",{style:{zIndex:10}},o.a.createElement(Rr.a,{open:l,anchorEl:u.current,role:void 0,transition:!0,disablePortal:!0},(function(t){var a=t.TransitionProps,i=t.placement;return o.a.createElement($r.a,Object.assign({},a,{style:{transformOrigin:"bottom"===i?"center top":"center bottom"}}),o.a.createElement(Yr.a,null,o.a.createElement(Br.a,{onClickAway:d},o.a.createElement(qr.a,{autoFocusItem:l,id:"menu-list-grow",onKeyDown:p},o.a.createElement(Vr.a,{onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},r.sideModule),{},{id:n._id,activeModule:"userEdit",db:"users",data:Object(h.a)({type:"user"},r.users[n._id])}))}},Dt("$__myProfile",1)),o.a.createElement(Vr.a,{onClick:function(){return m()}},Dt("$__logout",1))))))})))):null})));var Wf=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Pi)((function(e){var t=be.getState(),r=t.db,n=t.session,a=t.chat,i=o.a.useState(""),c=Object(je.a)(i,2),s=c[0],u=c[1],d=o.a.useState(0),p=Object(je.a)(d,2),f=p[0],m=p[1],g=o.a.useState(0),y=Object(je.a)(g,2),v=y[0],b=y[1],x=o.a.useState(0),_=Object(je.a)(x,2),w=_[0],E=_[1],O=o.a.useState(!1),j=Object(je.a)(O,2),k=j[0],S=j[1],L=o.a.useState(!1),C=Object(je.a)(L,2),I=C[0],F=C[1],T=o.a.useState("asset"),N=Object(je.a)(T,2),P=N[0],A=N[1],D=o.a.useState(!1),z=Object(je.a)(D,2),M=z[0],B=(z[1],Ut()),$=o.a.useState({title:null,icon:null,sTitle:null,sIcon:null}),Y=Object(je.a)($,2),R=Y[0],G=Y[1],H=o.a.useRef(null),W=window.location.hash.split("/");W[0]=W[0].replace("#",""),o.a.useEffect((function(){U()}),[e]),o.a.useEffect((function(){}),[f,v,w]);var U=function(){var e={};ff.filter((function(e){return e.path===window.location.pathname})).length>0&&(e=ff.filter((function(e){return e.path===window.location.pathname}))[0]);var t=Dt("$__".concat(e.alias),1),n=e.icon,a="";"plan"===e.alias&&W[0]&&r.cards[W[0]]&&(t="".concat(Dt("$__".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=Dt("$__".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 o.a.createElement("div",{style:{position:"absolute",top:"-4px",right:0,left:0,display:"flex",alignItems:"center",zIndex:"10 !important"},id:"top_"},o.a.createElement(Bo,null,o.a.createElement(Ro,{xs:10,sm:4,md:4,lg:4,xl:4,style:{display:"flex",alignItems:"center"},id:"top_menuHideShow"},!e.expanded&&o.a.createElement(Ge.a,{style:{width:"50px"},onClick:function(){e.menuExpand()}},o.a.createElement(wt,{icon:"menu",title:"$__showMenu",size:"27px",color:Mt("menu")})),o.a.createElement("div",{id:"top_pageTitle",style:{color:Mt("menu"),marginLeft:"22px",fontSize:"12px",fontWeight:"bold"}},R.sTitle?"".concat(R.title," - ").concat("matrix"===R.sTitle.toLowerCase()?"MATRIX SWOT":R.sTitle):R.title)),o.a.createElement(Ro,{xs:12,sm:4,md:4,lg:4,xl:4,style:{display:"flex",justifyContent:"flex-start",alignItems:"center",zIndex:"10 !important"},id:"top_search"},o.a.createElement("div",{style:{position:"relative",width:"calc(100% - 15px)",zIndex:"10 !important"}},o.a.createElement(Qn,{ref:H,label:Dt("$__search",1),variant:Mt("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:""!==s?o.a.createElement(Fa.a,{position:"end"},o.a.createElement(wt,{icon:"close",onClick:function(){u(""),S(!1),F(!1)}})):null,onChange:function(e){u(e.target.value),S(!0),F(!0)}},value:s,placeholder:Dt("$__searchInMachen")}),""!==s&&s.length>1&&o.a.createElement(Br.a,{onClickAway:function(){u(""),S(!1),F(!1)}},o.a.createElement(Rr.a,{open:!!s,anchorEl:H.current,role:void 0,transition:!0,disablePortal:!0,style:{position:"absolute",zIndex:3,bottom:0,left:"5px",right:"5px",minWidth:"500px"}},(function(e){var t=e.TransitionProps;e.placement;return o.a.createElement($r.a,Object.assign({},t,{style:{transformOrigin:"center bottom",zIndex:"3",maxHeight:"calc(100vh - 177px)",overflowY:"auto"}}),o.a.createElement(Yr.a,{style:{zIndex:"3",boxShadow:"0 7px 15px rgba(0,0,0,0.33) !important"}},o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{display:"flex",borderBottom:"solid 2px rgba(0,0,0,0.22)",backgroundColor:"#f1f1f1",justifyContent:"space-between"}},o.a.createElement("div",{style:{backgroundColor:"asset"===P?"rgba(0,0,0,0.08)":"",padding:"0 3px"}},o.a.createElement(Ct,{title:Dt("$__asset","*"),text:Dt("$__asset","*"),color:"asset"===P?Mt("menu"):"lightGray",icon:"play_circle_outline",onClick:function(){A("asset"),S(!0),F(!0),m(0),b(0),E(0)},size:"17px",style:{padding:"0px 3px !important"},transparent:!0})),o.a.createElement("div",{style:{backgroundColor:"completed"===P?"rgba(0,0,0,0.08)":"",padding:"0 3px"}},o.a.createElement(Ct,{title:Dt("$__completed","*"),text:Dt("$__completed","*"),color:"completed"===P?Mt("menu"):"lightGray",icon:"verified",onClick:function(){A("completed"),S(!0),F(!0),m(0),b(0),E(0)},size:"17px",style:{padding:"0px 3px !important"},transparent:!0})),o.a.createElement("div",{style:{backgroundColor:"deleted"===P?"rgba(0,0,0,0.08)":"",padding:"0 3px"}},o.a.createElement(Ct,{title:Dt("$__deleted","*"),text:Dt("$__deleted","*"),color:"deleted"===P?Mt("menu"):"lightGray",icon:"delete_forever",onClick:function(){A("deleted"),S(!0),F(!0),m(0),b(0),E(0)},size:"17px",style:{padding:"0px 3px !important"},transparent:!0}))),"0"!==String(f)||"0"!==String(w)||k||I?o.a.createElement(o.a.Fragment,null):o.a.createElement("div",{style:{textAlign:"center",fontSize:"16px",color:"red",marginTop:33,marginBottom:33}},Dt("$__noResultsFound")),o.a.createElement(Af,{text:s,onFinish:function(e){m(e),S(!1)},onAction:function(){u(""),S(!1),m(0),b(0),E(0)},completed:"completed"===P,deleted:"deleted"===P,adminView:M}),o.a.createElement(Bf,{text:s,onFinish:function(e){E(e),F(!1)},onAction:function(){u(""),m(0),b(0),E(0)}}))))}))))),o.a.createElement(Ro,{xs:5,sm:4,md:4,lg:4,xl:4,style:{display:"flex",justifyContent:"flex-end",alignItems:"center",zIndex:2001}},o.a.createElement("div",{id:"top_quickAdd"},o.a.createElement(Ff,{hashs:W})),o.a.createElement(wf,null),o.a.createElement("div",{id:"top_notifications"},o.a.createElement(If,{loader:!(!e.loaders||!e.loaders.notifications)})),o.a.createElement("div",{id:"top_timers"},o.a.createElement(Nf,null)),o.a.createElement("div",{id:"top_myDay"},o.a.createElement(jf,null)),o.a.createElement("div",{id:"top_moreOptions"},o.a.createElement(Kr,{transparent:!0,size:"27px",icon:"settings",btColor:"lightgray",options:[].concat(Object(K.a)(B&&B.user&&(B.userAdmin||B.userModerate)?[{name:"$__users",icon:"account_box",onClick:function(){l.push("c#tab/users"),e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},a),{},{open:!1}))}},{name:"$__units",icon:"business",onClick:function(){l.push("c#tab/units"),e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},a),{},{open:!1}))}}]:[]),[{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(){l.push("plataformAdministrator"),e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},a),{},{open:!1}))},show:"hover"},{name:Dt(be.getState().controls.showPrivate?"$__lockMyPrivateActivities":"$__showMyPrivateActivities",1),icon:be.getState().controls.showPrivate?"private_connectivity":"lock_open",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(h.a)(Object(h.a)({},be.getState().controls),{},{showPrivate:!be.getState().controls.showPrivate}))},show:"hover"}])})),o.a.createElement("div",{style:{marginLeft:"15px"},id:"top_user"},o.a.createElement(Hf,null)))))}))),Uf=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:Mt("color",.33)},userActiveExtended:Object(Oe.a)({display:"inherit",height:"37px",alignItems:"center",justifyContent:"center",backgroundColor:Mt("color",.33)},"justifyContent","left"),name:{position:"absolute",top:"5px",left:"36px",right:"0px",height:"30px",border:"1px solid ".concat(Mt("color",.2)),backgroundColor:"#FFFFFF",borderRadius:"5px",display:"flex",alignItems:"center",paddingLeft:"22px",fontWeight:"bold",fontSize:"14px",color:Mt("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(Mt("color",.2)),backgroundColor:"#FFFFFF",borderRadius:"5px",display:"flex",alignItems:"center",paddingLeft:"22px",paddingTop:"3px",fontSize:"12px",color:Mt("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(Mt("color",.2)),backgroundColor:"#FFFFFF",borderRadius:"5px",display:"flex",fontWeight:"bold",alignItems:"center",paddingLeft:"22px",paddingTop:"3px",fontSize:"12px",color:Mt("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(Mt("color",.2)),borderRadius:"0 0 5px 5px",display:"flex",alignItems:"center",paddingLeft:"16px",fontSize:"14px",color:Mt("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(Mt("color",.2)),borderRadius:"0 0 5px 5px",display:"flex",alignItems:"center",paddingLeft:"16px",fontSize:"14px",fontWeight:"bold",color:Mt("color"),backgroundColor:"#FFFFFF",boxShadow:"0px 3px 7px 1px rgba(0,0,0,0.05)","& ul":{fontSize:"12px"}}}};var Vf=Object(_e.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}}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Uf)((function(e){var t=e.classes,r=e.store,n=r.chat,a=r.session,i=r.timeline,c=(r.db,!!e.expanded),l=Ut(),s=Object(h.a)({},be.getState().db.users),u={};s=(s=Object.keys(s).filter((function(e){return e!==a._id&&"user"===s[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=Object(h.a)({},i[a._id]||{});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(h.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]&&n[e].user&&n[e].user._id===a._id&&"comment"===n[e].type})).map((function(e){return n[e]}));var o=[].concat(Object(K.a)(r),Object(K.a)(n));return o=o.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?(u=Object(h.a)(Object(h.a)({},u),{},Object(Oe.a)({},t._id,Object(h.a)(Object(h.a)({},e.store.users[t._id]),{},{type:"user",_lastMessage:o[o.length-1]?o[o.length-1]:null,unReadedCount:r.filter((function(e){return"comment"===e.type&&(!e.readedBy||e.readedBy&&!e.readedBy[a._id])})).length}))),t._lastMessage=o[o.length-1]?o[o.length-1]:null,t.unReadedCount=r.filter((function(e){return"comment"===e.type&&(!e.readedBy||e.readedBy&&!e.readedBy[a._id])})).length):(t._lastMessage=null,t.unReadedCount=0),t}));var d=Object.keys(be.getState().db.cards).filter((function(t){return"chatGroup"===be.getState().db.cards[t].type&&!be.getState().db.cards[t].deleted&&(be.getState().db.cards[t]._users&&be.getState().db.cards[t]._users[a._id]||!be.getState().db.cards[t].private&&e.store.adminView&&l&&(l.owner||l.admin))})).map((function(e){return be.getState().db.cards[e]}));return d&&d.length>0&&d.filter((function(e){if(e._users&&e._users[a._id])return!0})).map((function(e){var t;i[e._id]&&Object.keys(i[e._id]).length>0&&(t=Object.keys(i[e._id]).filter((function(t){return i[e._id]&&i[e._id][t]&&"comment"===i[e._id][t].type})).sort((function(t,r){return i[e._id][t]&&i[e._id][r]&&String(i[e._id][t].created_at)&&String(i[e._id][r].created_at)&&parseInt(i[e._id][t].created_at)>parseInt(i[e._id][r].created_at)?-1:i[e._id][t]&&i[e._id][r]&&String(i[e._id][t].created_at)&&String(i[e._id][r].created_at)&&parseInt(i[e._id][t].created_at)<parseInt(i[e._id][r].created_at)?1:0}))),u=e&&e._id&&t&&t.length>0&&i[e._id]&&i[e._id][t[0]]&&i[e._id][t[0]].created_at?Object(h.a)(Object(h.a)({},u),{},Object(Oe.a)({},e._id,Object(h.a)(Object(h.a)({},be.getState().db.cards[e._id]),{},{type:"group",_lastMessage:i[e._id][t[0]]}))):Object(h.a)(Object(h.a)({},u),{},Object(Oe.a)({},e._id,Object(h.a)(Object(h.a)({},be.getState().db.cards[e._id]),{},{type:"group"})))})),o.a.createElement("div",{className:t.root},Object.keys(u).filter((function(t){return(!be.getState().db.cards[t]||be.getState().db.cards[t]&&!be.getState().db.cards[t].deleted)&&(!e.find||""===e.find||e.find&&(u[t].name.toLowerCase().indexOf(e.find.toLowerCase())>-1||u[t]._parent&&be.getState().db.users[u[t]._parent]&&be.getState().db.users[u[t]._parent].name&&be.getState().db.users[u[t]._parent].name.toLowerCase().indexOf(e.find.toLowerCase())>-1))&&(c||!c&&u[t]&&u[t]._lastMessage)&&(!e.onLine||e.onLine&&a.users&&a.users[t])})).sort((function(e,t){var r=u[e]._lastMessage&&String(u[e]._lastMessage.created_at)?Math.ceil(u[e]._lastMessage.created_at):0,n=u[t]._lastMessage&&String(u[t]._lastMessage.created_at)?Math.ceil(u[t]._lastMessage.created_at):0;return c?u[e].name.toLowerCase()<u[t].name.toLowerCase()?-1:u[e].name.toLowerCase()>u[t].name.toLowerCase()?1:0:r>n?-1:r<n?1:0})).map((function(r,l){var s=u[r],d=0;return i[s._id]&&(d+=Object.keys(i[s._id]).filter((function(e){return i[s._id]&&i[s._id][e]&&i[s._id][e].user&&i[s._id][e].user._id&&a&&a._id&&i[s._id][e].user._id!==a._id&&"comment"===i[s._id][e].type&&(!i[s._id][e].readedBy||!i[s._id][e].readedBy[a._id])})).length),i[a._id]&&(d+=Object.keys(i[a._id]).filter((function(e){return i[a._id]&&i[a._id][e]&&!i[a._id][e].deleted&&i[a._id][e].user&&i[a._id][e].user._id===s._id&&"comment"===i[a._id][e].type&&(!i[a._id][e].readedBy||!i[a._id][e].readedBy[a._id])})).length),o.a.createElement("div",{key:s._id,className:n&&n.nodeId===s._id?c?t.userActiveExtended:t.userActive:c?t.userExtended:t.user,style:{width:"100%",marginBottom:5,padding:3},onClick:function(){e.openChat(s._id)}},o.a.createElement(_t,{title:o.a.createElement(o.a.Fragment,null,s.name?s.name:s.name&&s.name.split(" ").lenth>0?s.name.split(" ")[0]:"",!s.name&&s.name&&s.name.split(" ").lenth>0?s.name.split(" ")[0]:"")},o.a.createElement("div",{style:{position:"relative",width:"100%"}},c?o.a.createElement("div",{style:{display:"flex",width:"100%",justifyContent:"left",alignItems:"center"}},o.a.createElement(St.a,{badgeContent:d,color:"secondary",style:{width:"37px",height:"29px",display:"flex",alignItems:"center",marginLeft:"-12px"}},o.a.createElement(si,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},variant:a.users&&a.users[s._id]?"dot":"standard"},o.a.createElement(o.a.Fragment,null,o.a.createElement(Fr.a,{alt:s.displayName?s.displayName:s.name,src:"".concat(s.image),style:{width:"29px",height:"29px"}}),s._parent&&e.store.users[s._parent]&&e.store.users[s._parent].image?o.a.createElement("div",{style:{position:"absolute",bottom:4,right:-7,width:15,height:15,borderRadius:"50%",backgroundImage:"url(".concat(e.store.users[s._parent].image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):o.a.createElement(o.a.Fragment,null)))),o.a.createElement("div",{style:{fontSize:"14px",maxWidth:"calc(100% - 30px)",paddingLeft:"7px",color:"gray",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}},s.name?s.name:s.name&&s.name.split(" ").lenth>0?s.name.split(" ")[0]:"",!s.name&&s.name&&s.name.split(" ").lenth>0?s.name.split(" ")[0]:"",s._parent&&e.store.users[s._parent]?o.a.createElement("div",{style:{fontSize:10,color:"lightgray",marginTop:"-7px"}},e.store.users[s._parent].name):o.a.createElement(o.a.Fragment,null))):o.a.createElement(St.a,{badgeContent:d,color:"secondary",style:{width:"29px",height:"29px",display:"flex",alignItems:"center"}},o.a.createElement(si,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},variant:a.users&&a.users[s._id]?"dot":"standard"},o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:Object(h.a)(Object(h.a)({width:33,height:33},s.deleted?{border:"solid 2px red"}:{}),{},{borderRadius:"50%",backgroundColor:s.image?"none":"lightgray",backgroundImage:'url("'.concat(s.image,'")'),backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",display:"flex",justifyContent:"center",alignItems:"center"})},o.a.createElement("span",{style:{color:Mt("menu"),fontWeight:"bold",letterSpacing:"-2px !important"}},s.image?"":"".concat(s.name.substr(0,1).toUpperCase()).concat(s.name.split(" ").length>1?" ".concat(s.name.split(" ")[1].substr(0,1).toUpperCase()):""))),s._parent&&e.store.users[s._parent]&&e.store.users[s._parent].image?o.a.createElement("div",{style:{position:"absolute",bottom:4,right:-7,width:15,height:15,borderRadius:"50%",backgroundImage:"url(".concat(e.store.users[s._parent].image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):o.a.createElement(o.a.Fragment,null)))))))})))}))),qf=function(e){return Object(h.a)(Object(h.a)({},qe),{},{menu:{position:"absolute",borderRight:Mt("color"),background:Mt("ColumnTitleColor"),top:0,left:0,right:0,bottom:0,overflowY:"auto",overflowX:"hidden",display:"flex",flexDirection:"column",alignItems:"center"},menuExpanded:{position:"absolute",borderRight:Mt("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:Mt("color"),alignItems:"center",width:"-webkit-fill-available"},buttonColorExpanded:{position:"relative",float:"left",padding:"12px",display:"flex",backgroundColor:Mt("color"),alignItems:"center",width:"100%"},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Mt("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"}})};function Xf(){Xf=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var Kf=Object(_e.b)((function(e,t){return{store:{timeline:e.timeline,cards:e.db.cards,users:e.db.users}}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState(),r=t.db,n=t.session,a=t.chat,i=t.timeline,c=o.a.useState("chats"),l=Object(je.a)(c,2),s=l[0],u=l[1],d=o.a.useState(""),p=Object(je.a)(d,2),f=p[0],m=p[1],g=Object(De.a)(qf)(),y=!!e.expanded,v=window.location.hash.split("/");v[0]=v[0].replace("#",""),o.a.useEffect((function(){u("chats")}),[e.expanded]),Ut();var b=function(){var t=Object(Ee.a)(Xf().mark((function t(r,n){var o;return Xf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=be.getState().db.cards[r]?"cards":"users",m(""),be.getState().db[o]&&be.getState().db[o][r]&&!be.getState().db[o][r]._loadTimeline?e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},a),{},{db:n,nodeId:r,loading:"users"!==n})):e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},a),{},{db:n,nodeId:r,loading:!1})),e.subMenuExpanded(!1),u("chats");case 5:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),x=Object(h.a)({},be.getState().db.users);return x=(x=Object.keys(x).filter((function(e){return e!==n._id})).map((function(e){return be.getState().db.users[e]})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0}))).map((function(e){e.unReadedCount=0;var t=Object(h.a)({},i[n._id]||{});t=Object.keys(t).filter((function(r){return t[r]&&t[r].user&&t[r].user._id===e._id&&"comment"===t[r].type})).map((function(e){return t[e]}));var a=Object(h.a)({},r.users[e._id]&&i[e._id]?r.users[e._id]&&i[e._id]:{});a=Object.keys(a).filter((function(e){return a[e]&&a[e].user&&a[e].user._id===n._id&&"comment"===a[e].type})).map((function(e){return a[e]}));var o=[].concat(Object(K.a)(t),Object(K.a)(a));return o=o.sort((function(e,t){return Math.ceil(e.created_at)<Math.ceil(t.created_at)?-1:1})).map((function(e){return e})),"boolean"!==typeof e&&o&&o.length>0&&o[o.length-1]?(e._lastMessage=o[o.length-1],e.unReadedCount=t.filter((function(e){return!e.readedBy||e.readedBy&&!e.readedBy[n._id]})).length):(e._lastMessage={created_at:0},e.unReadedCount=0),e})),o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:y?g.menuExpanded:g.menu,style:{paddingTop:5}},y&&("internalGroups"===s||"externalGroups"===s)&&o.a.createElement("div",{className:y?g.buttonColorExpanded:g.buttonColor,style:{marginTop:"-15px"}},o.a.createElement(Ir,{text:y?Dt("$__newGroup","*"):null,title:y?null:Dt("$__newGroup","*"),icon:"add_box",iconColor:"#FFFFFF",textColor:"#FFFFFF",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},be.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{type:"chatGroup",status:"inProgress"}}))}})),o.a.createElement("div",{className:g.button,style:{display:"flex",height:"46px",marginBottom:"7px",width:"100%"}},y?o.a.createElement("div",{className:g.textField,style:{width:"100%"}},o.a.createElement(Qn,{className:g.noLabelLight,label:Dt("$__search","*"),variant:"standard",autoFocus:!0,value:f,InputProps:{endAdornment:o.a.createElement(Fa.a,{position:"start"},o.a.createElement(wt,{color:Mt("color")},"search")),onChange:function(e){m(e.target.value)}}})):o.a.createElement(Ir,{title:y?null:Dt("$__search","*"),icon:"search",iconColor:Mt(""!==f?"color":"medium"),textColor:Mt(""!==f?"color":"medium"),onClick:function(){e.subMenuExpanded(!0)}})),o.a.createElement("div",{style:{position:"absolute",top:y?50:40,bottom:7,overflowY:"auto",overflowX:"hidden",left:y?7:0,paddingLeft:y?5:0,right:0,paddingTop:7}},o.a.createElement(Vf,{expanded:y,openChat:function(e){return b(e,"cards")},find:f,onLine:e.onLine}))))}));var Jf=Object(_e.b)((function(e){return{typing:e.chat.typing}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t=be.getState().session,r=o.a.useState({}),n=Object(je.a)(r,2),a=n[0],i=n[1];return o.a.useEffect((function(){i(e.typing)}),[e.typing]),a&&e.nodeId&&e.nodeId!==t._id&&a.me&&a.me[e.nodeId]?o.a.createElement("div",{style:{marginLeft:15,fontSite:12,color:"lightgray",fontWeight:"normal"}},Dt("$__typing"),"..."):e.nodeId&&a&&a[e.nodeId]&&Object.keys(a[e.nodeId]).filter((function(r){return t&&t._id&&r!==t._id&&a[e.nodeId][r]})).length>0?o.a.createElement("div",{style:{marginLeft:15,fontSite:12,color:"lightgray",fontWeight:"normal",display:"flex",alignItems:"center"}},Object.keys(a[e.nodeId]).filter((function(r){return r!==t._id&&a[e.nodeId][r]})).map((function(t,r){var n="";if(be.getState().db.cards[e.nodeId]._users[t].name)n=be.getState().db.cards[e.nodeId]._users[t].name;else if(be.getState().db.cards[e.nodeId]._users[t].name){var a=be.getState().db.cards[e.nodeId]._users[t].name.split(" ");n="".concat(a[0]).concat(a.length>1?" ".concat(a[a.length-1]):"")}return o.a.createElement(xt.a,{title:n,key:t},o.a.createElement(Fr.a,{style:{width:22,height:22,border:"none"},alt:n,src:be.getState().db.cards[e.nodeId]._users[t].image||null},n.substr(0,1)))})),o.a.createElement("span",{style:{marginLeft:7}},Dt("$__typing"),"...")):o.a.createElement(o.a.Fragment,null)})),Zf=function(e){return Object(h.a)(Object(h.a)({},qe),{},{menu:{position:"relative",borderRight:Mt("color")},menuExpanded:{position:"relative",borderRight:Mt("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:Mt("color")},buttonColorExpanded:{position:"relative",float:"left",width:"calc(100% + 20px)",padding:"20px",marginLeft:"-12px",display:"flex",backgroundColor:Mt("color")},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Mt("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"}})};var Qf=Object(_e.b)((function(e){return{store:{chat:e.chat,lightBox:e.lightBox,online:e.session.users}}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(Zf)((function(e){var t=e.classes,r=be.getState(),n=r.chat,a=r.db,i=r.session,c=o.a.useState(!1),l=Object(je.a)(c,2),s=l[0],u=l[1],d=o.a.useState(!1),p=Object(je.a)(d,2),f=p[0],m=p[1],g=o.a.useState(!1),y=Object(je.a)(g,2),v=y[0],b=y[1],x=o.a.useState(!1),_=Object(je.a)(x,2),w=_[0],E=_[1],O=Ut();o.a.useEffect((function(){be.getState()&&(be.getState().lightBox&&be.getState().lightBox.open||be.getState().sideModule&&be.getState().sideModule.id)?m(!0):setTimeout((function(){m(!1)}),500)}),[e.store.lightBox,e.store.sideModule]);var j=Ja(),k=function(){var t=document.getElementsByClassName("Toastify__toast").length,r=document.getElementsByClassName("forwardMessage").length;0===t&&0===r&&e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},n),{},{open:!1}))};if(!n.open)return o.a.createElement(o.a.Fragment,null);var S=be.getState().db.cards&&be.getState().db.cards[n.nodeId]?"cards":"users";return o.a.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:3e3,backgroundColor:"rgba(250,250,250,0.7)"}},o.a.createElement(Br.a,{onClickAway:function(){f||k()}},o.a.createElement("div",{style:Object(h.a)(Object(h.a)(Object(h.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"})},o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:Mt("ColumnTitleColor"),display:"flex",alignItems:"center"}},o.a.createElement("div",{style:{position:"absolute",left:13}},o.a.createElement(Ct,{id:"chat_menu",title:Dt("$__menu","*"),color:Mt("color"),icon:"menu",onClick:function(){u((function(e){return!e})),s&&b(!1)},size:"25px",transparent:!0})),s?o.a.createElement("div",{style:{position:"absolute",left:45}},o.a.createElement(Ct,{id:"addGroup",title:Dt("$__createChatGroup","*"),color:Mt("color"),icon:"add_circle_outline",onClick:function(){k(),e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},be.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{type:"chatGroup",status:"inProgress"}}))},size:"25px",transparent:!0})):o.a.createElement(o.a.Fragment,null),s?o.a.createElement("div",{style:{position:"absolute",left:80}},o.a.createElement(Ct,{id:"chat_menu",title:"".concat(Dt("$__showOnlyOnline","*")," ").concat(Object.keys(i.users).filter((function(e){return i.users[e]&&e!==i._id})).length>0?" (".concat(Object.keys(i.users).filter((function(e){return i.users[e]&&e!==i._id})).length,")"):""),text:"".concat(Dt("$__showOnlyOnline","*")," ").concat(Object.keys(i.users).filter((function(e){return i.users[e]&&e!==i._id})).length>0?" (".concat(Object.keys(i.users).filter((function(e){return i.users[e]&&e!==i._id})).length,")"):""),color:Mt("color"),icon:v?"toggle_on":"toggle_off",onClick:function(){b((function(e){return!e}))},size:"25px",textSize:"11px",transparent:!0})):o.a.createElement(o.a.Fragment,null),o.a.createElement("div",{style:{position:"absolute",left:s?320:53,right:80,color:Mt("light"),fontSize:"12px",fontWeight:"bold"}},a[S]&&a[S][n.nodeId]?o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},o.a.createElement(si,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},variant:"users"===S&&a[S][n.nodeId]._id&&i.users&&i.users[n.nodeId]?"dot":"standard"},o.a.createElement(Fr.a,{alt:"users"===S&&a[S][n.nodeId].displayName?a[S][n.nodeId].displayName:a[S][n.nodeId].name,src:"".concat(a[S][n.nodeId].image),style:{width:"30px",height:"30px"}})),o.a.createElement("div",{style:{fontSize:"14px"}},a[S][n.nodeId].name),n&&n.nodeId&&be.getState().db.cards[n.nodeId]&&"chatGroup"===be.getState().db.cards[n.nodeId].type&&be.getState().db.cards[n.nodeId]._users&&Object.keys(be.getState().db.cards[n.nodeId]._users).length>0&&o.a.createElement("div",{classes:t.avatarGroup,style:{marginLeft:15}},o.a.createElement(la.a,{max:150},Object.keys(be.getState().db.cards[n.nodeId]._users).length>0&&Object.keys(be.getState().db.cards[n.nodeId]._users).map((function(e,t){var r="";if(be.getState().db.cards[n.nodeId]._users[e].name)r=be.getState().db.cards[n.nodeId]._users[e].name;else if(be.getState().db.cards[n.nodeId]._users[e].name){var a=be.getState().db.cards[n.nodeId]._users[e].name.split(" ");r="".concat(a[0]).concat(a.length>1?" ".concat(a[a.length-1]):"")}if(t<17)return o.a.createElement(xt.a,{title:r,key:t},o.a.createElement(Fr.a,{style:{width:22,height:22,border:"none"},alt:r,src:be.getState().db.cards[n.nodeId]._users[e].image||null},r.substr(0,1)));if(17===t){var i=Object.keys(be.getState().db.cards[n.nodeId]._users).length-17;return o.a.createElement(xt.a,{title:o.a.createElement("ul",{style:{listingStyle:"none",padding:0}},Object.keys(be.getState().db.cards[n.nodeId]._users).map((function(e,t){if(t>16&&be.getState().db.cards[n.nodeId]._users[e]&&be.getState().db.cards[n.nodeId]._users[e].name)return o.a.createElement("li",null,be.getState().db.cards[n.nodeId]._users[e].name)}))),key:t},o.a.createElement(Fr.a,{style:{width:22,height:22,border:"none"},alt:"+".concat(i)},o.a.createElement("span",{style:{fontSize:10}},"+".concat(i))))}})))),o.a.createElement(Jf,{nodeId:n.nodeId})):o.a.createElement("div",null,Dt("$__chats",1))),o.a.createElement("div",{style:{position:"absolute",right:5,display:"flex"}},n&&n.nodeId?o.a.createElement(Ct,{id:"chat_files",title:Dt("$__files","*"),color:Mt("lightgray"),icon:"folder_special",onClick:function(){E((function(e){return!e}))},size:"25px",transparent:!0}):o.a.createElement(o.a.Fragment,null),n&&n.nodeId&&be.getState().db.cards[n.nodeId]&&"chatGroup"===be.getState().db.cards[n.nodeId].type&&be.getState().db.cards[n.nodeId]._users&&be.getState().db.cards[n.nodeId]._users[i._id]&&(parseInt(be.getState().db.cards[n.nodeId]._users[i._id].access)>4||O&&O.user&&O.plan&&O.userAdmin&&O.planAdmin)&&o.a.createElement(Ct,{id:"chat_settings",title:Dt("$__preffers","*"),color:Mt("lightgray"),icon:"settings",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},be.getState().sideModule),{},{id:n.nodeId,activeModule:"cardEdit",db:"cards",data:Object(h.a)({},be.getState().db.cards[n.nodeId]?be.getState().db.cards[n.nodeId]:{})})),k()},size:"25px",transparent:!0}),o.a.createElement(Ct,{id:"chat_closeButton",title:Dt("$__close","*"),color:Mt("light"),icon:"close",onClick:function(){k(),b(!1)},size:"25px",transparent:!0}))),o.a.createElement("div",{style:Object(h.a)({position:"absolute",top:40,left:0,bottom:0,backgroundColor:"rgba(246,246,246,1)",borderRight:"solid 4px ".concat(Mt("color")),padding:"7px"},s?{width:"311px"}:{width:"60px"})},o.a.createElement(Kf,{closeButton:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},n),{},{open:!1})),b(!1)},chat:!0,unReadCountGroup:j&&j.groups?j.groups:0,unReadCountUser:j&&j.users?j.users:0,count:j,subMenuExpanded:function(e){u(e),b(!1)},expanded:s,onLine:v})),o.a.createElement("div",{style:{position:"absolute",left:s?312:55,top:40,right:w&&n.nodeId?333:0,bottom:0,backgroundColor:"white"}},n.nodeId?o.a.createElement(Yi,{types:["comment"],nodeId:n.nodeId,db:be.getState().db.cards[n.nodeId]?"cards":"users",confirmRead:!0,loading:!!n.loading,hideCards:!0,chat:!0}):o.a.createElement(o.a.Fragment,null)),w&&n.nodeId?o.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)"}},o.a.createElement(pl,{nodeId:n.nodeId,dark:!1})):o.a.createElement(o.a.Fragment,null)))))}))),eh=function(e){var t,r;return{root:{position:"fixed",top:"0px",left:"0px",width:"100%",height:"100vh",zIndex:100},rootHide:{position:"fixed",top:"0px",left:"0px",width:"100%",height:"50px",display:"flex",alignItems:"center",zIndex:100},topLogo:{position:"fixed",top:"0px",left:"0px",width:"100%",height:"50px",display:"flex",alignItems:"center",zIndex:100,justifyContent:"space-between"},bar:{backgroundColor:Mt("menu"),position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:100},item:{height:"66px",alignItems:"center",width:"100%",display:"flex"},itemButtom:(t={padding:"7px",color:Mt("color",.8),"&:hover":{color:Mt("color",1),backgroundColor:"rgba(255,255,255,0.1)",borderRadius:"7px"},display:"flex",alignItems:"center"},Object(Oe.a)(t,"alignItems","center"),Object(Oe.a)(t,"cursor","pointer"),t),itemButtomActive:{width:"100%",padding:"7px",color:Mt("color",1),backgroundColor:"rgba(255,255,255,0.2)",borderRadius:"7px",display:"flex",alignItems:"center",cursor:"pointer"},themeExample:(r={},Object(Oe.a)(r,e.breakpoints.up("md"),{left:"auto !important",right:"0 !important"}),Object(Oe.a)(r,e.breakpoints.down("sm"),{left:"0 !important",right:"auto !important"}),r),module:{position:"fixed",top:"0px",left:"147px",width:"70px",height:"100vh",backgroundColor:"rgba(246,246,246,1)",borderRight:"solid 4px ".concat(Mt("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(Mt("color")),padding:"7px",overflowX:"auto"},moduleTitle:{width:"100%",height:"30px",fontSize:"18px",color:Mt("color"),fontWeight:"bold",paddingLeft:"7px",marginTop:"15px"},sidebarWrapperWithPerfectScrollbar:{},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Mt("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 th(){th=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}r(204).config();var rh=Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(eh)((function(e){var t=be.getState(),r=t.chat,n=t.notifications,a=e.classes,i=o.a.useState(!1),c=Object(je.a)(i,2),s=c[0],u=c[1],d=o.a.useState(null),p=Object(je.a)(d,2),f=p[0],m=p[1],g=window.location.hash.split("/");g[0]=g[0].replace("#",""),o.a.useEffect((function(){s||u(!0)}),[n]);var y=function(){var t=Object(Ee.a)(th().mark((function t(n,a,o){var i,c=arguments;return th().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=c.length>3&&void 0!==c[3]?c[3]:"users",!n||window.location.pathname===n&&a!==f||l.push(n),"chat"===a?e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},r),{},{open:!0,db:i,nodeId:o})):(m(a),e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},r),{},{open:!1}))),e.menuExpand&&e.menuExpand();case 4:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),v=Ja();return document.title="".concat(v&&v.total&&v.total>0?"(".concat(v.total,") "):"","MACHEN"),e.expanded?o.a.createElement("div",{className:a.root},o.a.createElement("div",{className:a.bar},o.a.createElement("div",{className:a.topLogo,id:"sideBar_logoMini"},o.a.createElement("img",{src:nr.a,alt:"logo",className:a.logoImg,style:{width:"111px",marginLeft:"15px"}}),o.a.createElement(Ct,{title:Dt("$__hideMenu",1),color:Mt("color"),icon:"menu",onClick:e.menuExpand?function(){e.menuExpand()}:null,transparent:!0})),o.a.createElement("div",{style:{position:"absolute",top:"120px",bottom:"0px",overflowX:"auto",width:"100%"}},o.a.createElement("div",{className:a.item,id:"sideBar_button_dashboard"},o.a.createElement("div",{className:"/d"===window.location.pathname?a.itemButtomActive:a.itemButtom,onClick:function(){y("/d","dashboard")}},o.a.createElement(wt,{icon:"dashboard",badgeColor:"primary",color:"parent",badgeVisible:!0,title:"$__dashboard",size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Dt("$__dashboard","*"))),o.a.createElement("div",{className:a.item,id:"sideBar_button_chat"},o.a.createElement("div",{className:r.open?a.itemButtomActive:a.itemButtom,onClick:function(){e.menuExpand&&e.menuExpand(),e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},r),{},{open:!r.open}))}},o.a.createElement(St.a,{badgeContent:v&&v.total?v.total:0,color:"secondary"},o.a.createElement(wt,{icon:"chat",color:"parent",title:"$__chat",size:"27px",style:{marginBottom:"7px",marginRight:"15px"}})),Dt("$__chat","*"))),o.a.createElement("div",{className:a.separator}),o.a.createElement("div",{className:a.item,id:"sideBar_button_StrategyAndPlans"},o.a.createElement("div",{className:"/sp"===window.location.pathname?a.itemButtomActive:a.itemButtom,onClick:function(){y("/sp","StrategyAndPlans")}},o.a.createElement(wt,{icon:"view_comfy",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Dt("$__StrategyAndPlans"),size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Dt("$__StrategyAndPlans","*"))),o.a.createElement("div",{className:a.item,id:"sideBar_button_myTasks"},o.a.createElement("div",{className:"/t"===window.location.pathname?a.itemButtomActive:a.itemButtom,onClick:function(){y("/t","myTasks")}},o.a.createElement(wt,{icon:"task",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Dt("$__mytasks"),size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Dt("$__mytasks","*"))),o.a.createElement("div",{className:a.item,id:"sideBar_button_library"},o.a.createElement("div",{className:"/library"===window.location.pathname?a.itemButtomActive:a.itemButtom,onClick:function(){y("/library","library")}},o.a.createElement(wt,{icon:"folder",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Dt("$__library"),size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Dt("$__library","*"))),o.a.createElement("div",{className:a.item,id:"sideBar_button_brightandconnected"},o.a.createElement("div",{className:"/bright-and-connected"===window.location.pathname?a.itemButtomActive:a.itemButtom,onClick:function(){y("/bright-and-connected","bright-and-connected")}},o.a.createElement(wt,{icon:R.a,badgeColor:"primary",color:"parent",badgeVisible:!0,title:"BRIGHT & CONNECTED",size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),"BRIGHT & CONNECTED"))))):o.a.createElement("div",{className:a.rootHide},o.a.createElement("div",{className:a.mainButton,id:"sideBar_logoMini"},o.a.createElement("img",{src:nr.a,alt:"logo",className:a.logoImg,style:{width:"111px",marginLeft:"15px"},onClick:function(){e.menuExpand()}}),o.a.createElement(Ct,{title:Dt("$__showMenu",1),color:Mt("menu"),icon:"menu",onClick:e.menuExpand?function(){e.menuExpand()}:null,transparent:!0})))}))),nh=r(787),ah=r.n(nh);function oh(){oh=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}r(204).config();var ih=function(){var e=Object(Ee.a)(oh().mark((function e(t,r){var n,a,o;return oh().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=be.getState(),a=n.db,o="cards",a.cards[r._id]?o="cards":a.users[r._id]&&(o="users"),be.getState().db&&be.getState().db[o]&&be.getState().db[o][r._id]&&t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},Object(Oe.a)({},o,Object(h.a)(Object(h.a)({},be.getState().db[o]),{},Object(Oe.a)({},r._id,Object(h.a)(Object(h.a)({},be.getState().db[o][r._id]),r))))));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),ch=r(795),lh=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"},content:{marginTop:"0px",padding:"15px"},container:Object(h.a)({},Ue),map:{marginTop:"0px"},mainPanelSidebarMini:Object(Oe.a)({},e.breakpoints.up("md"),{width:"calc(100% - 0px)"})}},sh=function(e){return{wrapper:{height:"auto",minHeight:"100vh",position:"relative",top:"0"},fullPage:{padding:"120px 0",position:"relative",minHeight:"100vh",display:"flex!important",margin:"0",border:"0",color:"#FFF",alignItems:"center",backgroundSize:"cover",backgroundPosition:"center center",height:"100%","& footer":{position:"absolute",bottom:"0",width:"100%",border:"none !important"},"&:before":{backgroundColor:"rgba("+He("#000")+", 0.22)"},"&:before,&:after":{display:"block",content:'""',position:"absolute",width:"100%",height:"100%",top:"0",left:"0",zIndex:"2"}}}},uh=(r(1274),r(1422)),dh=r(1423),ph=r(1412);Object(_e.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(s.b)(n,e)}))(Object(bt.a)(yl)((function(e){var t=e.classes,r=o.a.useState(!1),n=Object(je.a)(r,2),a=n[0],i=n[1],c=o.a.useState(e.hidden||!1),l=Object(je.a)(c,2),s=l[0],u=(l[1],be.getState()),d=(u.db,u.session,u.chat),p=(Ut(),window.location.hash.split("/"));p[0]=p[0].replace("#","");var f=null;36===p[0].length||p[2]&&36===p[2].length?36===p[0].length?f=p[0]:36===p[2].length&&(f=p[2]):f=null;var m=window.location.pathname.replace("/","").toLowerCase(),g=e.store.db.dataType.filter((function(e){if(e.view&&Object.keys(e.view).filter((function(e){return e===m})).length>0&&(!e.view[m].pages||p[1]&&e.view[m].pages.indexOf(p[1])>-1||!p[1]&&e.view[m].pages.indexOf("none")>-1))return e}));return o.a.createElement("div",{className:t.root},o.a.createElement(o.a.Fragment,null,o.a.createElement(ze.a,{style:{zIndex:1e3},open:a}),e.children,(d.open&&!d.nodeId&&g.length>0||!d.open&&g.length>0)&&o.a.createElement(uh.a,{ariaLabel:"",className:t.speedDial,hidden:s,icon:o.a.createElement(dh.a,null),onClose:function(){return i(!1)},onOpen:function(){i(!0)},open:a},g.sort((function(e,t){return e.name>t.name?-1:0})).map((function(t,r){return o.a.createElement(ph.a,{key:r,icon:o.a.createElement(wt,{icon:t.icon,color:Mt("light")}),tooltipTitle:Dt("$__".concat(t.name),1),tooltipOpen:!0,onClick:function(){!function(t,r){var n=null;f&&36===f.length&&(n=f),e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},e.store.sideModule),{},{id:"new",activeModule:t.iniModule,db:t.db,data:Object(h.a)(Object(h.a)({},t.data),{},{type:t.name,_parent:n,status:"notStarted"})}))}(t)}})})))))})));var fh,hh=r(789);function mh(){mh=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(k){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};c(h,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==t&&r.call(g,a)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=f,c(y,"constructor",f),c(f,"constructor",p),p.displayName=c(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):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),u},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),w(r),u}},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;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var gh=new Audio(r.n(hh).a);r(204).config();var yh="true"===String("true")?"https://ws.machen.ai":"http://192.168.0.10:3001";var vh=Object(Ae.b)(Te.a)(fh||(fh=Object(we.a)(["\n // https://styled-components.com/docs/faqs#how-can-i-override-styles-with-higher-specificity\n &&&.Toastify__toast-container {\n min-width:407px !important;\n }\n .Toastify__toast {\n \n }\n .Toastify__toast-body {}\n .Toastify__progress-bar {}\n"]))),bh=Object(_e.b)((function(e){return{}}),(function(e){return Object(s.b)(n,e)}))((function(e){var t,r,n=Object.assign({},e),a=be.getState(),i=a.session,c=a.chat,s=o.a.useState(null),u=Object(je.a)(s,2),d=u[0],p=u[1],f=o.a.useState(!1),m=Object(je.a)(f,2),g=m[0],y=m[1],v=o.a.useState(!1),b=Object(je.a)(v,2),x=b[0],_=b[1],w=o.a.useState(""),E=Object(je.a)(w,2),O=(E[0],E[1]),j=o.a.useState(!0),k=Object(je.a)(j,2),S=k[0],L=k[1],C=o.a.useState(!1),I=Object(je.a)(C,2),F=I[0],T=(I[1],o.a.useState(!1)),N=Object(je.a)(T,2),P=N[0],A=N[1],D=o.a.useState(!0),z=Object(je.a)(D,2),M=z[0],B=(z[1],o.a.useState(!1)),$=Object(je.a)(B,2),Y=$[0],R=$[1],G=o.a.useState(!0),H=Object(je.a)(G,2),U=H[0],V=H[1],q=o.a.useState(!1),X=Object(je.a)(q,2),J=X[0],Z=X[1],Q=o.a.useState(!1),ee=Object(je.a)(Q,2),te=ee[0],re=(ee[1],o.a.useState()),ne=Object(je.a)(re,2),ae=ne[0],oe=ne[1],ie=o.a.useState([]),ce=Object(je.a)(ie,2),le=ce[0],se=ce[1],ue=o.a.useState(!1),de=Object(je.a)(ue,2),pe=de[0],fe=de[1],he=o.a.useState(!1),me=Object(je.a)(he,2),ge=me[0],ye=me[1],ve=o.a.useState(!1),_e=Object(je.a)(ve,2),we=_e[0],ke=_e[1],Le=(Object(Ne.a)().setIsOpen,Object(De.a)(g?lh:sh))(),Ie=o.a.createRef(),Te=Le.mainPanel+" "+Ce()((t={},Object(Oe.a)(t,Le.mainPanelSidebarMini,M),Object(Oe.a)(t,Le.mainPanelWithPerfectScrollbar,navigator.platform.indexOf("Win")>-1),t)),Ae=o.a.createRef();o.a.useEffect((function(){Y||(Be(),R(!0))}),[]),o.a.useEffect((function(){i&&i._isBeta&&!ge&&ye(!0),oe(Xe(ff))}),[i]),o.a.useEffect((function(){var t=window.location.hash.split("/");t[0]=t[0].replace("#",""),JSON.stringify(t)!==JSON.stringify(le)&&(se(t),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{history:"".concat(window.location.pathname).concat(window.location.hash)})),le.length>1&&He(t))})),o.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),g&&He(e)}),[g]);var Be=function(){var e=Object(Ee.a)(mh().mark((function e(t){var r,n;return mh().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(!g&&!Y||t)&&(window.addEventListener("dragover",(function(e){e.preventDefault()}),!1),window.addEventListener("drop",(function(e){e.preventDefault()}),!1),0,n=setInterval((function(){1}),1e3),window.addEventListener("focus",function(){var e=Object(Ee.a)(mh().mark((function e(t){var a;return mh().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=Fe()().tz("America/Sao_Paulo").unix("X"),r&&a-r>60&&$e(!0),e.next=4,localStorage.getItem("TOKEN");case 4:e.sent,n||(n=setInterval((function(){1}),1e3));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),window.addEventListener("blur",(function(){clearInterval(n),n=0,r=Fe()().tz("America/Sao_Paulo").unix("X")})),$e(),R(!0),setInterval((function(){$e(!0)}),18e5)),!S&&g&&localStorage.getItem("TOKEN")&&window.innerWidth,le&&le[0]&&le[1]&&le[1]!==d?p(le[1]):le&&le[1]||(p(null),O(null));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),$e=function(){var t=Object(Ee.a)(mh().mark((function t(r){var n,a,o,i,c,s,u=arguments;return mh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=u.length>1&&void 0!==u[1]?u[1]:0,r){t.next=44;break}return t.prev=2,t.next=5,Qr.post("/M_User_VerifySession");case 5:return a=t.sent,o=a&&a.data&&a.data.user&&a.data.user.language?{locale:a.data.user.language}:{all:!0},"#tab/languages"===window.location.hash&&(o={all:!0}),t.next=10,Qr.post("/M_Languages_V2",o);case 10:if(i=t.sent,!(a&&a.data&&a.data.token)){t.next=35;break}if(localStorage.setItem("TOKEN",a.data.token),e.reduxFunction("ASYNC","SET_SESSION",Object(h.a)({},a.data.user)),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{users:Object(h.a)({},a.data.users?a.data.users:{})})),!i||!a){t.next=31;break}if(e.reduxFunction("ASYNC","SET_LANGUAGE",Object(h.a)({},i.data)),y(!0),"Notification"in window){t.next=22;break}console.log("Esse browser n\xe3o suporta notifica\xe7\xf5es desktop"),t.next=25;break;case 22:if("denied"===Notification.permission){t.next=25;break}return t.next=25,Notification.requestPermission();case 25:return"/"!==window.location.pathname&&0!==ff.filter((function(e){return e.auth&&e.path===window.location.pathname})).length||l.push("/d#tab/resume"),Ve(),Ye(),t.abrupt("return",!0);case 31:e.reduxFunction("ASYNC","SET_LANGUAGE",Object(h.a)({},i.data)),y(!1);case 33:t.next=37;break;case 35:e.reduxFunction("ASYNC","SET_LANGUAGE",Object(h.a)({},i.data)),S&&L(!1);case 37:t.next=42;break;case 39:t.prev=39,t.t0=t.catch(2),5===n?(A(!0),g&&y(!1),S&&L(!1),setTimeout((function(){window.open("/login","_self")}),6e4)):$e(r,n+1);case 42:t.next=65;break;case 44:return t.prev=44,t.next=47,Qr.post("/M_User_VerifySession",{ignoreUsers:!0});case 47:if(c=t.sent,s=be.getState().session,!(c&&c.data&&c.data.token)){t.next=57;break}if(localStorage.setItem("TOKEN",c.data.token),e.reduxFunction("ASYNC","SET_SESSION",Object(h.a)({},c.data.user)),!(c.data&&s&&s._id&&c.data.user&&s._id!==c.data.user._id)){t.next=55;break}return window.location.reload(),t.abrupt("return");case 55:t.next=60;break;case 57:localStorage.setItem("TOKEN",null),e.reduxFunction("ASYNC","CLEAR_SESSION"),"/login"!==window.location.pathname&&setTimeout((function(){window.open("/login","_self")}),300);case 60:t.next=65;break;case 62:t.prev=62,t.t1=t.catch(44),n>5?(localStorage.setItem("TOKEN",null),e.reduxFunction("ASYNC","CLEAR_SESSION"),"/login"!==window.location.pathname&&setTimeout((function(){window.open("/login","_self")}),300)):setTimeout((function(){$e(r,n+1)}),3e3);case 65:case"end":return t.stop()}}),t,null,[[2,39],[44,62]])})));return function(e){return t.apply(this,arguments)}}(),Ye=function(){var t=Object(Ee.a)(mh().mark((function t(){var r,n;return mh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Re(),t.prev=1,t.next=4,Qr.get("/M_Tags_List");case 4:(r=t.sent)&&r.data&&e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.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,Qr.get("/M_User_Group_List");case 16:(n=t.sent)&&n.data&&e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.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)}}(),Re=function(){var t=Object(Ee.a)(mh().mark((function t(r){var n,a;return mh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Qr.post("/M_User_List_V3",{id:r});case 3:(n=t.sent)&&n.data&&(a={},n.data.map(function(){var e=Object(Ee.a)(mh().mark((function e(t,r){return mh().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=Object(h.a)(Object(h.a)({},a),{},Object(Oe.a)({},t.data._id,Object(h.a)(Object(h.a)(Object(h.a)(Object(h.a)(Object(h.a)(Object(h.a)(Object(h.a)(Object(h.a)({},be.getState().db.users&&be.getState().db.users[t.data._id]?be.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!==be.getState().session.account?{_parent:t._parent}:{})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{users:Object(h.a)(Object(h.a)({},be.getState().db.users),a)}))),t.next=12;break;case 7:t.prev=7,t.t0=t.catch(0),console.group("Layout-ReqUsers::ERR::"),console.log(t.t0),console.groupEnd();case 12:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e){return t.apply(this,arguments)}}(),Ge=function(){var t=Object(Ee.a)(mh().mark((function t(){return mh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ln(e,{cardLoad:"chat"});case 2:return t.next=4,Ka(Object(h.a)(Object(h.a)({},e),{},{fnIdentification:"Layouts/Index/loadData()-Users"}),{ids:[be.getState().session._id],db:"users",type:"comment",ini:!0});case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),He=function(){var t=Object(Ee.a)(mh().mark((function t(r){var n=arguments;return mh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.length>1&&void 0!==n[1]&&n[1],t.next=3,ln(e,{cardLoad:"myDay"});case 3:if(ln(Object(h.a)({},e),{cardLoad:"plans"}),!(g&&"/"!==window.location.pathname&&e&&e.reduxFunction)){t.next=14;break}return t.next=7,dn(e);case 7:if(!t.sent){t.next=12;break}return L(!1),Ge(),t.abrupt("return",!0);case 12:t.next=15;break;case 14:return t.abrupt("return",!0);case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),We=function(){},Ue=function(){var t=Object(Ee.a)(mh().mark((function t(r,n){return mh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:be.getState().db[n][r]&&!be.getState().db[n][r]._loadTimeline?e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},c),{},{open:!0,db:n,nodeId:r})):e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},c),{},{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)}}(),Ve=function(){var t=Object(Ee.a)(mh().mark((function t(){var n;return mh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(ch.a)(yh,{transports:["websocket","polling"],query:{token:localStorage.getItem("TOKEN")}});case 2:return(n=t.sent)&&(r=n,Je(),e.reduxFunction("ASYNC","SET_FUNCTIONS",{socket:n})),t.abrupt("return",!0);case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),qe=function(){var e=Object(Ee.a)(mh().mark((function e(t){return mh().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&&$t(Object(h.a)({},t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Xe=function t(r){return r.map((function(r,n){var a;if(r.AppAccess&&console.log(r.AppAccess,i._access,Object.keys(r.AppAccess).filter((function(e){return i._access[e]})).length>0),r.auth&&(!e.AppAccess||e.AppAccess&&i._access))return a=r.component,r.views&&r.views.length>0&&t(r.views),o.a.createElement(xe.b,{path:r.path,component:function(){return o.a.createElement(a,null)},key:n,expanded:U})}))},Ke=function(){var t=Object(Ee.a)(mh().mark((function t(r){return mh().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)}}(),Je=function(){r.on("global",(function(e){"version"===e.fn&&$t({message:Dt("$__appNewVersionAvaiable",1),hideiconvariant:!0,variant:"info",persist:!0,horizontal:"right",confirm:function(){window.location.reload()}}),"logout"===e.fn&&Ke(),"reload"===e.fn&&window.location.reload()})),r.on("SWOT.UPD",(function(t){!function(e,t){be.getState().db.cards[t._id]&&!be.getState().db.cards[t._id]._selected&&t&&t._selected&&delete t._selected,e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},t._id,Object(h.a)(Object(h.a)({},be.getState().db.cards[t._id]),{},{_aspects:t.aspects})))})),e.reduxFunction("ASYNC","preLoader",Object(h.a)(Object(h.a)({},be.getState().preLoader),{},{autoSave:!0}))}(Object(h.a)(Object(h.a)({},e),{},{store:be.getState(),_sessionId:i._id}),t)})),r.on("card.ADD",(function(t){console.log(t),t._id&&ln(Object(h.a)(Object(h.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"card",idRel:t._id})})),r.on("card.UPD",(function(t){!function(e,t){var r=be.getState().db.tag;be.getState().db.cards&&be.getState().db.cards[t.cardId]&&(t.cardData&&t.cardData._tags&&t.cardData._tags.length>0&&t.cardData._tags.map((function(e){be.getState().db.cards[t.cardId]&&be.getState().db.cards[t.cardId]._tags&&0===be.getState().db.cards[t.cardId]._tags.filter((function(t){return t.value===e.value})).length&&r.filter((function(t){return t.value===e.value})).map((function(e){e.count=e.count+1}))})),be.getState().db.cards[t.cardId]._tags&&be.getState().db.cards[t.cardId]._tags.map((function(e){t.cardData._tags&&0===t.cardData._tags.filter((function(t){return t.value===e.value})).length&&r.filter((function(t){return t.value===e.value})).map((function(e){e.count=e.count-1}))}))),(!t.new||t.new&&t.user!==W._id)&&e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},t.cardId,Object(h.a)(Object(h.a)(Object(h.a)({},be.getState().db.cards[t.cardId]?be.getState().db.cards[t.cardId]:{}),t.cardData),{},{_notifications:be.getState().db.cards&&be.getState().db.cards[t.cardId]&&be.getState().db.cards[t.cardId]._notifications?be.getState().db.cards[t.cardId]._notifications:{comment:0,log:0,timer:0,kpi:0},createdBy:t.user?t.user:null}))),tag:r}))}(e,t)})),r.on("card.UPDATE",(function(t){jn(e,t)})),r.on("card.ACCESS_UPD",(function(t){Fn(e,t)})),r.on("card.ACCESS_DELETE",(function(t){!function(e,t){if(!be.getState().db.cards[t.cardId])return!0;var r=Object(h.a)({},be.getState().db.cards[t.cardId]);r._users[t.userId]&&delete r._users[t.userId],e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},t.cardId,Object(h.a)({},r)))}))}(e,t)})),r.on("card.REORDER",(function(t){!function(e,t){var r=be.getState().db.cards,n=t.cards;n&&n.length>0&&(n.map((function(e,t){r=Object(h.a)(Object(h.a)({},r),{},Object(Oe.a)({},e,Object(h.a)(Object(h.a)({},r[e]),{},{order:{low:t}})))})),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),r)})))}(e,t)})),r.on("card.DELETE",(function(t){En(e,t,!0)})),r.on("card.unlinkChildrens",(function(t){Nn(e,t)})),r.on("card.changePlanId",(function(t){var r=window.location.hash.split("/");r[0]=r[0].replace("#","");var n=be.getState().session.cards.load,a=Se()("".concat(JSON.stringify({idRel:r[0],cardLoad:"plan"}))).toString();r[0]===t.planId||Object.keys(n).length>0&&n[a]?ln(Object(h.a)(Object(h.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"plan",idRel:t.cardId,force:!0}):In(e,t)})),r.on("node.UPDATE",(function(t){ih(e,t)})),r.on("column.UPD",(function(t){!function(e,t){if(be.getState().db.cards[t._cardColumn]){var r=Object(h.a)(Object(h.a)({},be.getState().db.cards[t._cardColumn].boards[t._board].columns[t._columnId]),t._columnData),n=Object(K.a)(be.getState().db.cards[t._cardColumn].boards[t._board].columnOrder);t._columnsOrder&&(n=t._columnsOrder),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},t._cardColumn,Object(h.a)(Object(h.a)({},be.getState().db.cards[t._cardColumn]),{},{boards:Object(h.a)(Object(h.a)({},be.getState().db.cards[t._cardColumn].boards),{},Object(Oe.a)({},t._board,Object(h.a)(Object(h.a)({},be.getState().db.cards[t._cardColumn].boards[t._board]),{},{columnOrder:n,columns:Object(h.a)(Object(h.a)({},be.getState().db.cards[t._cardColumn].boards[t._board].columns),{},Object(Oe.a)({},t._columnId,r))})))})))}))}kn(e)}(e,t)})),r.on("column.DELETE",(function(t){!function(e,t){if(be.getState().db.cards[t._parent]){var r=Object(K.a)(be.getState().db.cards[t._parent].boards[t._board].columnOrder),n=Object(h.a)({},be.getState().db.cards[t._parent].boards[t._board].columns);delete n[t._deleted],r.splice(r.indexOf(t._deleted),1),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},t._parent,Object(h.a)(Object(h.a)({},be.getState().db.cards[t._parent]),{},{boards:Object(h.a)(Object(h.a)({},be.getState().db.cards[t._parent].boards),{},Object(Oe.a)({},t._board,Object(h.a)(Object(h.a)({},be.getState().db.cards[t._parent].boards[t._board]),{},{columnOrder:r,columns:n})))})))}))}}(e,t)})),r.on("column.REORDER",(function(t){!function(e,t){if(be.getState().db.cards[t._parent]){var r=t._order;e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{cards:Object(h.a)(Object(h.a)({},be.getState().db.cards),{},Object(Oe.a)({},t._parent,Object(h.a)(Object(h.a)({},be.getState().db.cards[t._parent]),{},{boards:Object(h.a)(Object(h.a)({},be.getState().db.cards[t._parent].boards),{},Object(Oe.a)({},t._board,Object(h.a)(Object(h.a)({},be.getState().db.cards[t._parent].boards[t._board]),{},{columnOrder:r})))})))}))}}(e,t)})),r.on("column.CARDS",(function(t){!function(e,t){var r=be.getState().db,n=Object(Oe.a)({},t.cardId,Object(h.a)(Object(h.a)({},r.cards[t.cardId]),{},{boards:Object(h.a)(Object(h.a)({},r.cards[t.cardId].boards),{},Object(Oe.a)({},t.boardId,Object(h.a)(Object(h.a)({},r.cards[t.cardId].boards[t.boardId]),{},{columns:t.columns})))}));e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},r),{},{cards:Object(h.a)(Object(h.a)({},r.cards),n)}))}(e,t)}));var t={};r.on("timeline.TYPING",(function(r){t[r.typingUser]&&clearTimeout(t[r.typingUser]),be.getState().chat&&be.getState().chat.typing&&(!be.getState().chat.typing[r.group?r.group:"me"]||be.getState().chat.typing[r.group?r.group:"me"]&&!be.getState().chat.typing[r.group?r.group:"me"][r.typingUser])&&e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},be.getState().chat),{},{typing:Object(h.a)(Object(h.a)({},be.getState().chat.typing),{},Object(Oe.a)({},r.group?r.group:"me",Object(h.a)(Object(h.a)({},be.getState().chat.typing[r.group?r.group:"me"]),{},Object(Oe.a)({},r.typingUser,!0))))})),t=Object(h.a)(Object(h.a)({},t),{},Object(Oe.a)({},r.typingUser,setTimeout((function(){e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},be.getState().chat),{},{typing:Object(h.a)(Object(h.a)({},be.getState().chat.typing),{},Object(Oe.a)({},r.group?r.group:"me",Object(h.a)(Object(h.a)({},be.getState().chat.typing[r.group?r.group:"me"]),{},Object(Oe.a)({},r.typingUser,!1))))}))}),3e3)))})),r.on("timeline.COMMENT",(function(t){if(t.idRel===be.getState().session._id&&t.comment&&t.comment.user&&t.comment.user._id&&!be.getState().db.users[t.comment.user._id]&&Re(t.comment.user._id),Xa(e,t),t.idRel===be.getState().session._id&&be.getState().db.users[t.comment.user._id]&&(!be.getState().chat.open||be.getState().chat.open&&t.comment&&t.comment.user&&t.comment.user._id!==be.getState().chat.nodeId)){t._parent===be.getState().session._id&&gh.play(),t.comment.nodeId=t.nodeId;var r=Object(h.a)(Object(h.a)({},t.comment),{},{nodeId:t.comment._parent,idRel:t.nodeId});if(t._parent===be.getState().session._id){var n=new Notification("".concat(t.comment.user.name," ").concat(Dt("$__sendedANewMessage",1)),{body:t.comment.message?t.comment.message:Dt("$__".concat(t.comment.type),1)});n.onclick=function(e){e.preventDefault(),window.focus(),n.close()},$t({message:Dt("$__newMessage",1),content:o.a.createElement("div",{style:{display:"flex",cursor:"pointer",backgroundColor:"#none"},onClick:function(e){Ue(r.user._id,"users"),e.stopPropagation()}},o.a.createElement(Ii,{storie:r,noReactions:!0,inverted:!0})),hideiconvariant:!0,variant:"info",persist:!1,horizontal:"right",confirm:null})}}})),r.on("timeline.DEL",(function(t){var r=be.getState(),n=(r.timeline,r.session),a=be.getState().timeline[t.idRel]&&be.getState().timeline[t.idRel][t.id]?t.idRel:n._id;be.getState().timeline&&be.getState().timeline[a]&&be.getState().timeline[a][t.id]&&e.reduxFunction("ASYNC","SET_TIMELINE",Object(h.a)(Object(h.a)({},be.getState().timeline),{},Object(Oe.a)({},a,Object(h.a)(Object(h.a)({},be.getState().timeline[a]),{},Object(Oe.a)({},t.id,Object(h.a)(Object(h.a)({},be.getState().timeline[a][t.id]),{},{deleted:!0},t.deletedReason?{deletedReason:t.deletedReason}:{}))))))})),r.on("user.UPD",(function(t){pa(e,t)})),r.on("user.CONNECT",(function(t){e.reduxFunction("ASYNC","SET_SESSION",Object(h.a)(Object(h.a)({},be.getState().session),{},{users:Object(h.a)(Object(h.a)({},be.getState().session.users),{},Object(Oe.a)({},t.user,"offline"===t.status?null:t.status))}))})),r.on("user.DISCONNECT",(function(t){e.reduxFunction("ASYNC","SET_SESSION",Object(h.a)(Object(h.a)({},be.getState().session),{},{users:Object(h.a)(Object(h.a)({},be.getState().session.users),{},Object(Oe.a)({},t.user,"offline"!==t.status&&t.status))}))})),r.on("users.STATUS",(function(t){e.reduxFunction("ASYNC","SET_SESSION",Object(h.a)(Object(h.a)({},be.getState().session),{},{users:Object(h.a)(Object(h.a)({},be.getState().session.users),t.users)}))})),r.on("user.ACCESS",(function(t){pa(e,t)})),r.on("userGroup.UPD",(function(t){hs(e,t,!0)})),r.on("feed.ADD",(function(t){!function(e,t){var r=Object(Oe.a)({},t._id,Object(h.a)(Object(h.a)(Object(h.a)({},be.getState().db.feeds&&be.getState().db.feeds[t._id]&&be.getState().db.feeds[t._id].feed?{feed:be.getState().db.feeds[t._id].feed}:{}),t.data),{},{_parent:Object(h.a)(Object(h.a)({},be.getState().db.feeds&&be.getState().db.feeds[t._id]&&be.getState().db.feeds[t._id]._parent?be.getState().db.feeds[t._id]._parent:{}),{},Object(Oe.a)({},t._parent,Object(h.a)({},t.rel)))}));e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{feeds:Object(h.a)(Object(h.a)({},be.getState().db.feeds),r)}))}(e,t)})),r.on("language.UPD",(function(t){!function(e,t){var r=be.getState().languages[t.alias]&&be.getState().languages[t.alias].locales?Array.from(be.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(h.a)(Object(h.a)({},be.getState().languages),{},Object(Oe.a)({},t.alias,Object(h.a)(Object(h.a)({},be.getState().languages[t.alias]&&be.getState().languages[t.alias]),{},{locales:r}))))}(e,t)})),r.on("tag.UPD",(function(t){hs(e,t,!0)})),r.on("tag.DEL",(function(t){gs(e,t,!0)})),r.on("tag.UNLINK",(function(t){vs(e,t,!0)})),r.on("logout",(function(e){e.user===be.getState().session._id&&Ke()})),r.on("notifications.ADD",function(){var t=Object(Ee.a)(mh().mark((function t(r){return mh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:console.log("?????"),be.getState().session._id===r.userId&&r.notify&&e.reduxFunction("ASYNC","SET_NOTIFICATIONS",Object(h.a)(Object(h.a)({},be.getState().notifications),{},Object(Oe.a)({},r.notify._id,r.notify)));case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),r.on("chat.STATUS",(function(t){e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},be.getState().db),{},{users:Object(h.a)(Object(h.a)({},be.getState().db.users),{},Object(Oe.a)({},t.user,Object(h.a)(Object(h.a)({},be.getState().db.users[t.user]),{},{chatStatus:t.status})))}))})),r.on("chat.READED",(function(t){Va(e,t)})),r.on("chat.INTERACT",(function(t){qa(e,t)}));var n=setTimeout((function(){}),5e3);r.on("disconnect",(function(){ke(!0),n=setTimeout((function(){_(!0)}),5e3)})),r.on("connect",(function(){setTimeout((function(){r.emit("data",{module:"user",method:"post",action:"logout"},{notThis:!0})}),2e3),we&&(ke(!1),$e(!0)),clearTimeout(n),_(!1)}))};return S?o.a.createElement("div",{style:{position:"fixed",top:"0px",bottom:"0px",left:"0px",right:"0px"}},o.a.createElement(Or,null)):(P&&"/offline-detect"!==window.location.pathname&&l.push("offline-detect"),F&&"/maintenance-mode"!==window.location.pathname&&l.push("maintenance-mode"),F||P||"/maintenance-mode"!==window.location.pathname&&"/offline-detect"!==window.location.pathname||l.push("login"),o.a.createElement("div",{style:{position:"fixed",top:"0px",bottom:"0px",left:g&&U?"calc(198px + ".concat(J?"264px":"0px",")"):"0px",right:"0px"},onContextMenu:function(){}},g?o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:Le.wrapper},o.a.createElement(Me.a,{xsDown:!0},U&&o.a.createElement(bf,Object.assign({routes:ff,handleDrawerToggle:We,menuExpand:function(){V((function(e){return!e}))},setSubMenuExpanded:function(e){Z(e)},subMenuExpanded:J},n))),o.a.createElement(Me.a,{smUp:!0},o.a.createElement(rh,Object.assign({routes:ff,handleDrawerToggle:We,menuExpand:function(){V((function(e){return!e}))},setSubMenuExpanded:function(e){Z(e)},subMenuExpanded:J,expanded:U},n))),o.a.createElement("div",{className:Te,ref:Ae,id:"mainPannel"},o.a.createElement("div",{className:Le.content},o.a.createElement("div",{className:Le.container},o.a.createElement(xe.d,null,ae,o.a.createElement(xe.a,{from:"/",to:"/d#tab/resume"}))))),o.a.createElement(ss,null)),o.a.createElement(Me.a,{smDown:!0},o.a.createElement(Wf,{menuExpand:function(){V((function(e){return!e}))},expanded:U,loaders:{notifications:!te}}))):o.a.createElement("div",null,!F&&o.a.createElement(or,n),o.a.createElement("div",{className:Le.wrapper,ref:Ie},o.a.createElement("div",{className:Le.fullPage,style:{backgroundImage:"url("+ah.a+")"}},o.a.createElement(xe.d,null,function e(t){return t.map((function(t,n){return t.views?e(t.views):(a=t.component,!t.auth&&a?o.a.createElement(xe.b,{path:t.path,component:function(){return o.a.createElement(a,{callback:function(e){qe(e)},socket:r})},key:n,socket:r}):void 0);var a}))}(ff),o.a.createElement(xe.a,{from:"*",to:P?"/offline-detect":F?"/maintenance-mode":"/login"})),o.a.createElement(lr,{white:!0})))),o.a.createElement(xr,null),o.a.createElement(Fi,null),o.a.createElement(ze.a,{open:x,className:Le.backdrop},o.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"}},o.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center"}},o.a.createElement(wt,{color:"ColumnTitleColor",size:"77px"},"cloud_off")),o.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",marginTop:"15px"}},Dt("$__noInternetConnection","*")))),o.a.createElement("div",null),o.a.createElement(Qf,{expanded:U,subMenuExpanded:J}),o.a.createElement(Pe.a,{steps:[{selector:"#wellcome",content:"Seja bem vindo \xe0 MACHEN"},{selector:"#sideBar",content:"Menu de navega\xe7\xe3o"},{selector:"#chatNotificationsBt",content:"Aqui voc\xea ser\xe1 notificado sempre que receber alguma mensagem"},{selector:"#notificationsBt",content:"Aqui voc\xea encontra suas notifica\xe7\xf5es de atividades na plataforma"},{selector:"#sideBar_button_StrategyAndPlans",content:"Vamos cadastrar um plano?<n>????</n>"}],isOpen:pe,onRequestClose:function(){return fe(!1)}}),o.a.createElement(vh,{pauseOnFocusLoss:!0})))})),xh=(r(1278),function(e){var t=e.store,r=e.history;return o.a.createElement(_e.a,{store:t},o.a.createElement(xe.c,{history:r},o.a.createElement(xe.b,{exact:!0,patch:"/:params",component:bh})))});r(204).config(),-1===window.location.hostname.indexOf("192.168")&&-1===window.location.hostname.indexOf("localhost")&&(console.log=function(){}),Object(i.render)(o.a.createElement(xh,{store:be,history:l}),document.getElementById("root"))},139:function(e,t,r){var n=r(69);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(93)).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},210:function(e,t,r){var n=r(69);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(93)).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},235:function(e,t,r){e.exports=r.p+"static/media/logoMachen.c1ab9af8.svg"},270: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="},301: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="},418:function(e){e.exports=JSON.parse('{"name":"MACHEN","version":"3.0.957","private":true,"dependencies":{"@date-io/date-fns":"1.3.13","@emotion/react":"^11.9.0","@emotion/styled":"^11.8.1","@fortawesome/react-fontawesome":"^0.1.14","@material-ui/core":"^4.11.0","@material-ui/icons":"^4.5.1","@material-ui/lab":"^4.0.0-alpha.56","@material-ui/pickers":"^3.2.10","@mui/material":"^5.8.1","@nivo/bar":"^0.70.1","@nivo/bullet":"^0.79.1","@nivo/circle-packing":"^0.70.1","@nivo/core":"^0.70.1","@nivo/pie":"^0.70.1","@nivo/sankey":"^0.70.1","@reactour/tour":"^2.10.0","axios":"^0.21.1","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","crypto-js":"^4.0.0","date-fns":"^2.16.1","dotenv":"^6.2.0","draft-js":"^0.11.7","emoji-picker-react":"^3.4.7","fg-loadcss":"^3.1.0","file-saver":"^1.3.3","history":"4.9.0","import":"0.0.6","install":"^0.13.0","jquery":"^3.5.1","material-table":"^1.69.0","moment":"2.24.0","moment-timezone":"^0.5.31","node-sass":"^4.13.1","nouislider":"14.0.2","npm":"^7.6.0","pdf-lib":"^1.16.0","perfect-scrollbar":"1.4.0","react":"^18.2.0","react-audio-player":"^0.17.0","react-beautiful-dnd":"^13.0.0","react-big-calendar":"^0.40.2","react-bootstrap-sweetalert":"4.4.1","react-chartist":"0.13.3","react-color":"^2.19.3","react-contextmenu":"^2.14.0","react-cropper":"^1.3.0","react-custom-scroll":"^4.2.1","react-data-export":"^0.6.0","react-datepicker":"^4.8.0","react-datetime":"2.16.3","react-dom":"^16.9.0","react-draft-wysiwyg":"^1.14.7","react-easy-swipe":"0.0.18","react-export-excel":"^0.5.3","react-fetch-preloader":"0.0.3","react-file-drop":"^3.0.7","react-file-viewer":"^1.2.1","react-google-login":"^5.2.2","react-image-file-resizer":"^0.4.7","react-jvectormap":"0.0.12","react-keyed-file-browser":"^1.10.0","react-loading-skeleton":"^3.0.1","react-mentions":"^4.1.1","react-nestable":"^2.0.0","react-number-format":"^4.4.1","react-popper":"^2.2.4","react-render-html":"^0.6.0","react-router-dom":"5.0.1","react-router-redux":"^4.0.8","react-scripts":"^3.4.3","react-select":"^3.1.0","react-sound":"^1.2.0","react-swipeable-views":"0.13.3","react-table":"6.10.0","react-tagsinput":"3.19.0","react-toastify":"9.0.0","reactjs-pdf-reader":"^1.0.12","reactour":"^1.18.7","redux-saga":"^1.1.3","socket.io-client":"^4.4.1","styled-components":"^5.2.0","utf-8-validate":"^5.0.9","utf8":"^3.0.0","uuid":"^8.3.2"},"scripts":{"start":"react-scripts start","build":"react-scripts build && gulp licenses","test":"react-scripts test --env=jsdom","eject":"react-scripts eject","deploy":"npm run build","lint:check":"eslint . --ext=js,jsx; exit 0","lint:fix":"eslint . --ext=js,jsx --fix; exit 0","install:clean":"rm -rf node_modules/ && rm -rf package-lock.json && npm install && npm start","compile-sass":"node-sass src/assets/scss/material-dashboard-pro-react.scss src/assets/css/material-dashboard-pro-react.css","minify-sass":"node-sass src/assets/scss/material-dashboard-pro-react.scss src/assets/css/material-dashboard-pro-react.min.css --output-style compressed","map-sass":"node-sass src/assets/scss/material-dashboard-pro-react.scss src/assets/css/material-dashboard-pro-react.css --source-map true"},"optionalDependencies":{"@types/googlemaps":"3.37.3","@types/markerclustererplus":"2.1.33","ajv":"6.10.2","typescript":"3.5.3"},"devDependencies":{"envify":"^4.1.0","eslint-config-prettier":"6.0.0","eslint-plugin-prettier":"3.1.0","gulp":"^4.0.2","gulp-append-prepend":"1.0.8","prettier":"1.18.2","terser":"^5.14.1","terser-brunch":"^4.1.0","uglifyify":"^5.0.2"},"browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":[]}}')},434:function(e,t,r){var n=r(234),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"}}}},462:function(e,t,r){e.exports=r.p+"static/media/strategy-pt.625a0c5b.png"},483:function(e,t,r){e.exports=r.p+"static/media/userCover.49044f68.jpg"},519:function(e,t,r){},54:function(e,t,r){e.exports=r.p+"static/media/fundo-sonne.6de93583.png"},574:function(e,t,r){var n=r(69);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(93)).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},575:function(e,t,r){var n=r(69);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(93)).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},576:function(e,t,r){var n=r(69);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(93)).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},577:function(e,t,r){var n=r(69);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(93)).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},581:function(e,t,r){e.exports=r.p+"static/media/machen.b9c661d3.svg"},658:function(e,t,r){},752:function(e,t,r){e.exports=r.p+"static/media/microsoftWord.113ac212.svg"},753:function(e,t,r){e.exports=r.p+"static/media/microsoftExcel.c59164de.svg"},754:function(e,t,r){e.exports=r.p+"static/media/microsoftPowerpoint.0e97c564.svg"},755:function(e,t,r){var n=r(69);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(93)).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},756:function(e,t,r){e.exports=r.p+"static/media/pdf.3d17c449.svg"},772:function(e,t,r){},773:function(e,t,r){e.exports=r.p+"static/media/googlePlay-ptBR.6583181e.png"},774:function(e,t,r){e.exports=r.p+"static/media/appleStore-ptBR.2049e321.png"},784:function(e,t,r){e.exports=r.p+"static/media/Mockup_App_WEB.0ed158a4.png"},785:function(e,t,r){e.exports=r.p+"static/media/supportMockup.ec51b4aa.png"},787:function(e,t,r){e.exports=r.p+"static/media/fundoLogin.a16e608c.jpg"},789:function(e,t,r){e.exports=r.p+"static/media/notification.d7241ff2.mp3"},845:function(e,t,r){e.exports=r(1279)},855:function(e,t){},87:function(e,t,r){var n=r(69);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(93)).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}},[[845,1,2]]]);
//# sourceMappingURL=main.cd96d752.chunk.js.map