File: /disk001/machen/public_html/sonne/static/js/main.2de2a420.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.2de2a420.chunk.js.LICENSE.txt */
(this.webpackJsonpMACHEN=this.webpackJsonpMACHEN||[]).push([[0],{1046:function(e,t){},1047:function(e,t){},1048:function(e,t){},1049:function(e,t){},1050:function(e,t){},1253:function(e,t){},1255:function(e,t){},1266:function(e,t){},1268:function(e,t){},1293:function(e,t){},1295:function(e,t){},1296:function(e,t){},1301:function(e,t){},1303:function(e,t){},1309:function(e,t){},1311:function(e,t){},1330:function(e,t){},1342:function(e,t){},1345:function(e,t){},1378:function(e,t,r){},1430:function(e,t,r){},1431:function(e,t,r){},1554:function(e,t,r){},1555:function(e,t,r){"use strict";r.r(t);var n={};r.r(n),r.d(n,"reduxFunction",(function(){return Nr}));var a,o=r(0),i=r.n(o),c=r(39),l=r(201),s=Object(l.a)(),u=r(9),d=r(941),p=r(896),f=r(25),h=r(1),m={notifications:[]},g={copy:[],selected:[],action:null},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,t=arguments.length>1?arguments[1]:void 0;return"SET_CARD"===t.action&&t.value?Object(h.a)(Object(h.a)({},e),t.value):"CLEAR_CARD"===t.action?Object(h.a)({},g):e},y={open:!1,nodeId:null,activeChats:[],activeModule:"users",groups:{},typing:{}},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y,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)({},y):e},x={timelines:{},unreadeds:{}},_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x,t=arguments.length>1?arguments[1]:void 0;return"SET_CHATS"===t.action&&t.value?Object(h.a)(Object(h.a)({},e),t.value):"CLEAR_CHATS"===t.action?Object(h.a)({},x):e},w={sideModuleWindow:!1,period:"$__last7Days",users:{},showDeleted:!1,hidePrivate:!1,lockPrivate:!1,unlockedPrivates:0},E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w,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},O=r(4),j=r(653),k=r.n(j),S=r(654),L=r.n(S),C=r(655),I=r.n(C),F=r(656),T=r.n(F),N=r(897),A=r.n(N),D=r(898),P=r.n(D),z=r(899),$=r.n(z),M=r(900),B=r.n(M),Y=r(173),G=r.n(Y),R=r(901),H=r.n(R),W=r(97),U=r.n(W),V=r(477),q={version:V.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:"12h",label:"$__12hours"},{value:null,label:"$__6hours"},{value:"3h",label:"$__3hours"},{value:"1h",label:"$__1hour"}],passwordExpire:[{value:"30",label:"$__30days"},{value:"60",label:"$__60days"},{value:"90",label:"$__90days"}],plans:[{value:"p0",label:"$__saasPlanName0",settings:Object(O.a)({space:5368709120,admins:1,price:0,onBoarding:!1,brightAndConnected:{feed:!1,feedDays:!1,radarLimit:25,insight:!1},plan:{activeLimit:2,planClient:!1,clientAdmin:!1,machenPlan:!1,templates:!1,guidelineLimit:2,feedLimit:4,radarLimit:25,insightLimit:25},task:{activeLimit:25,filter:!1,kpi:!1,timeSheet:!1,recurrence:!1},files:{uploadLimit:26214400},chat:{groupUsersLimit:7},support:{email:!0,priority:0,chat:!1},mobile:{},addOn:{learneng:!1,denkenDiscount:0}},"onBoarding",{technician:!1,custom:!1})},{value:"p1",label:"$__saasPlanName1",settings:Object(O.a)({space:26843545600,admins:1,price:149,onBoarding:0,whiteLabel:!1,brightAndConnected:{feed:!0,feedDays:15,radarLimit:0,insight:!0},plan:{planLimit:0,planClient:!0,clientAdmin:1,machenPlan:!0,templates:!0,guidelineLimit:0,feedLimit:0,radarLimit:0,insightLimit:0},task:{activeLimit:0,filter:!0,kpi:!0,timeSheet:!0,recurrence:!0},files:{uploadLimit:104857600},chat:{groupLimit:0},support:{email:!0,priority:0,chat:!0},mobile:{},addOn:{learneng:!0,denkenDiscount:5}},"onBoarding",{technician:1e3,custom:4990})},{value:"p2",label:"$__saasPlanName2",settings:Object(O.a)({space:53687091200,admins:9,price:890,onBoarding:4990,brightAndConnected:{feed:!0,feedDays:0,radarLimit:0,insight:!0},plan:{planLimit:0,planClient:!0,clientAdmin:2,machenPlan:!0,templates:!0,guidelineLimit:0,feedLimit:0,radarLimit:0,insightLimit:0},task:{activeLimit:0,filter:!0,kpi:!0,timeSheet:!0,recurrence:!0},files:{uploadLimit:314572800},chat:{groupLimit:0},support:{email:!0,priority:0,chat:!0},mobile:{},addOn:{learneng:!0,denkenDiscount:0,whiteLabel:!1}},"onBoarding",{technician:1e3,custom:4990})},{value:"p3",label:"$__saasPlanName3",settings:Object(O.a)({space:107374182400,admins:19,price:1790,onBoarding:6990,brightAndConnected:{feed:!0,feedDays:0,radarLimit:0,insight:!0},plan:{planLimit:0,planClient:!0,clientAdmin:3,machenPlan:!0,templates:!0,guidelineLimit:0,feedLimit:0,radarLimit:0,insightLimit:0},task:{activeLimit:0,filter:!0,kpi:!0,timeSheet:!0,recurrence:!0},files:{uploadLimit:314572800},chat:{groupLimit:0},support:{email:!0,priority:0,chat:!0},mobile:{},addOn:{learneng:!0,denkenDiscount:0,whiteLabel:!1}},"onBoarding",{technician:1e3,custom:4990})},{value:"p4",label:"$__saasPlanName4",settings:Object(O.a)({space:214748364800,admins:49,price:3990,onBoarding:10990,brightAndConnected:{feed:!0,feedDays:0,radarLimit:0,insight:!0},plan:{planLimit:0,planClient:!0,clientAdmin:3,machenPlan:!0,templates:!0,guidelineLimit:0,feedLimit:0,radarLimit:0,insightLimit:0},task:{activeLimit:0,filter:!0,kpi:!0,timeSheet:!0,recurrence:!0},files:{uploadLimit:314572800},chat:{groupLimit:0},support:{email:!0,priority:0,chat:!0},mobile:{},addOn:{learneng:!0,denkenDiscount:0,whiteLabel:!1}},"onBoarding",{technician:1e3,custom:4990})},{value:"p5",label:"$__saasPlanName5",settings:Object(O.a)({space:0,admins:0,price:0,onBoarding:0,brightAndConnected:{feed:!0,feedDays:0,radarLimit:0,insight:!0},plan:{planLimit:0,planClient:!0,clientAdmin:3,machenPlan:!0,templates:!0,guidelineLimit:0,feedLimit:0,radarLimit:0,insightLimit:0},task:{activeLimit:0,filter:!0,kpi:!0,timeSheet:!0,recurrence:!0},files:{uploadLimit:314572800},chat:{groupLimit:0},support:{email:!0,priority:0,chat:!0},mobile:{},addOn:{learneng:!0,denkenDiscount:0,whiteLabel:!1}},"onBoarding",{technician:!0,custom:4990})}],type:[{value:"plan",label:"$__plan",icon:"view_comfy",color:null,calendar:!1},{value:"strength",label:"$__strength",icon:"arrow_upward",color:null,calendar:!1},{value:"weakness",label:"$__weakness",icon:"arrow_downward",color:null,calendar:!1},{value:"opportunity",label:"$__opportunity",icon:"trending_up",color:null,calendar:!1},{value:"threat",label:"$__threat",icon:"trending_down",color:null,calendar:!1},{value:"guideline",label:"$__guideline",icon:G.a,color:null,calendar:!0},{value:"guidelineD",label:"$__guidelineD",icon:L.a,color:null,calendar:!0},{value:"guidelineR",label:"$__guidelineR",icon:T.a,color:null,calendar:!0},{value:"guidelineC",label:"$__guidelineC",icon:k.a,color:null,calendar:!0},{value:"guidelineE",label:"$__guidelineE",icon:I.a,color:null,calendar:!0},{value:"objective",label:"$__objective",icon:"gps_fixed",color:null,calendar:!0},{value:"goal",label:"$__goal",icon:"flag",color:null,calendar:!0},{value:"iniciative",label:"$__iniciative",icon:"play_arrow",color:null,calendar:!0},{value:"task",label:"$__task",icon:"fact_check",color:null,calendar:!0},{value:"meeting",label:"$__meeting",icon:"meeting_room",color:null,calendar:!0},{value:"myTask",label:"$__myTask",icon:"person_pin",color:null,calendar:!0},{value:"link",label:"$__radar",icon:"public",color:null,calendar:!0},{value:"insight",label:"$__insight",icon:U.a,color:null,calendar:!0}],dateStatus:[{value:"notStarted",label:"$__notStarted",icon:"query_builder"},{value:"inProgress",label:"$__inProgress",icon:"play_circle_outline"}],priority:[{value:null,label:"$__none",color:"#c6c6c6"},{value:"normal",label:"$__normal",color:"#c6c6c6"},{value:"low",label:"$__low",color:"#faba00"},{value:"medium",label:"$__medium",color:"#ff7c32"},{value:"high",label:"$__high",color:"#ff0000"}],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:A.a,title:"Microsoft Word",viewer:"microsoft"},{ext:["xls","xlt","ooxml","xlsx"],icon:P.a,title:"Microsoft Excel",viewer:"microsoft"},{ext:["ppt","pptx","ppsx","sldx"],icon:$.a,title:"Microsoft PowerPoint",viewer:"microsoft"},{ext:["pdf"],icon:H.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:U.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:G.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:L.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:T.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:I.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: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:"swot",icon:B.a,db:"cards",hash:["matrix"]},{name:"matrix",icon:G.a,db:"cards",hash:["matrix"]}],cards:{},users:{},feeds:{},notifications:{},loaded:!1,viewList:!1,myTasksMenuExpanded:!1,adminView:!1,adminViewLoader:!1,orderByTitle:!0,orderByTitlePosition:"ASC"},X=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q,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},K={},J=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K,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},Z={},Q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Z,t=arguments.length>1?arguments[1]:void 0;return"SET_LANGUAGE"===t.action&&t.value?t.value:e},ee={open:!1,miro:!1,files:[],file:0},te=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ee,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)({},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={fullScreen:!0,visible:!0,callBack:null,autoSave:!1,cards:!0},oe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ae,t=arguments.length>1?arguments[1]:void 0;return"preLoader"===t.action&&t.value?Object(h.a)(Object(h.a)({},e),t.value):e},ie={tags:[],userGroups:[],users:{userGroup:[],selected:{}},units:{userGroup:[],selected:{}},clients:{userGroup:[],selected:{}},groups:{userGroup:[],selected:{}},plans:{userGroup:[],selected:{}},sideModuleWindow:!1,clearFilter:!1,text:"",cards:(a={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}},Object(O.a)(a,"priority",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(O.a)(a,"risk",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(O.a)(a,"complexity",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(O.a)(a,"impact",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(O.a)(a,"kpiType",[]),Object(O.a)(a,"iniKpiValue",null),Object(O.a)(a,"endKpiValue",null),a)},ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ie,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?ie:e},le={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},se=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:le,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},ue={cards:{load:{}},timeline:{load:{}}},de=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ue,t=arguments.length>1?arguments[1]:void 0;return"SET_SESSION_LOADS"===t.action&&t.value?Object(h.a)(Object(h.a)({},e),t.value):"CLEAR_SESSION_LOADS"===t.action?Object(h.a)({},e):e},pe={module:null,activeModule:"cardEdit",reqSave:!1,window:!1,id:null,data:{}},fe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pe,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)({},pe):e},he={},me=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:he,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},ge={cards:{},timeline:{}},ve=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ge,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},ye={users:{}},be=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ye,t=arguments.length>1?arguments[1]:void 0;return"SET_USERS_STATUS"===t.action&&t.value?Object(h.a)(Object(h.a)({},e),t.value):"CLEAR_USERS_STATUS"===t.action?Object(h.a)({},e):e},xe=r(340);function _e(){_e=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 we=_e().mark(je),Ee=_e().mark(ke);function Oe(e){return e.next&&e.next(),!0}function je(e){return _e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(xe.c)({type:e.action,value:e.value});case 2:return t.next=4,Object(xe.b)(Oe,e);case 4:case"end":return t.stop()}}),we)}function ke(){return _e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(xe.a)([Object(xe.e)("ASYNC",je),Object(xe.d)("ASYNC",je)]);case 2:case"end":return e.stop()}}),Ee)}var Se=Object(d.a)(),Le=Object(u.e)(Object(u.c)({alert:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,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(f.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:b,chats:_,card:v,controls:E,db:X,functions:J,languages:Q,lightBox:te,notifications:ne,preLoader:oe,search:ce,session:se,sideModule:fe,timeline:me,toLoad:ve,sessionLoads:de,usersStatus:be}),Object(u.a)(Se,Object(p.routerMiddleware)(s)));Se.run(ke);var Ce=Le,Ie=r(1682),Fe=r(11),Te=r(63),Ne=r(6),Ae=r(3),De=r(127),Pe=r.n(De),ze=r(36),$e=r.n(ze),Me=r(7),Be=r.n(Me),Ye=r(121),Ge=(r(1557),r(999),r(41)),Re=r(1568),He=r(1647),We=r(16),Ue=r(1646),Ve=Object(We.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"}}}))(Ue.a),qe=(r(1e3),r(273)),Xe=r.n(qe);function Ke(){Ke=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Je=Xe.a.create("true"===String("true")?{baseURL:"https://ws.machen.ai"}:{baseURL:"http://localhost:3001"});Xe.a.defaults.withCredentials=!0,Je.interceptors.request.use(function(){var e=Object(Ne.a)(Ke().mark((function e(t){var r;return Ke().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=localStorage.getItem("TOKEN"))&&(t.headers.Authorization="Bearer ".concat(r)),e.abrupt("return",t);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),Je.interceptors.response.use(function(){var e=Object(Ne.a)(Ke().mark((function e(t){return Ke().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 Ze=Je;function Qe(){Qe=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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(162).config();var et=window.location.hostname.indexOf("localhost")>-1&&"true"===String("true"),tt=function(e,t){if(e){var r=Ce.getState().languages||{},n=Ce.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();et&&!r[n]&&Ze.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 rt(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 nt(e,t){if(/^#([0-9a-f]{3}|[0-9a-f]{6})$/gi.test(e)){var r=e.substr(1);r=3==r.length?r.replace(/(.)/g,"$1$1"):r;var n=parseInt(r,16);return"rgba(".concat([n>>16&255,n>>8&255,255&n],", ").concat(t||1,")")}return t&&e&&e.indexOf("rgb")>-1&&-1===e.indexOf("rgba")?e.replace(")",", ".concat(t,")")).replace("rgb(","rgba("):e}function at(e,t){if(Ce)return nt(Ce.getState().session.custom[e],t)||e}function ot(e){return!!/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i.test(e)}function it(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Pe()(JSON.stringify(e)).toString(),r=e.content?e.content:e.message;e.confirm&&(r=i.a.createElement("div",{style:{minWidth:"300px"}},r,i.a.createElement("div",{style:{display:"flex",width:"100%",marginTop:15,justifyContent:"center"}},i.a.createElement(Ct,{shadow:!0,title:tt("$__confirm"),text:tt("$__confirm"),color:"green",icon:"check",size:"25px",onClick:function(){e.confirm(),Ye.b.dismiss(t)}}),i.a.createElement(Ct,{shadow:!0,title:tt("$__cancel"),text:tt("$__cancel"),color:"red",icon:"close",size:"25px",onClick:function(){Ye.b.dismiss(t)},style:{marginLeft:15}})))),e.buttons&&e.buttons.length>0&&(r=i.a.createElement("div",{style:{minWidth:"300px"}},r,i.a.createElement("div",{style:{width:"100%",marginTop:15,justifyContent:"center"}},e.buttons.map((function(r,n){return i.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(),Ye.b.dismiss(t)}}))})))));var n=Object(h.a)(Object(h.a)(Object(h.a)({toastId:t,position:Ye.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:Ye.b.POSITION.BOTTOM_LEFT})),"right"===e.horizontal&&(n=Object(h.a)(Object(h.a)({},n),{},{position:Ye.b.POSITION.BOTTOM_RIGHT})),"center"===e.horizontal&&(n=Object(h.a)(Object(h.a)({},n),{},{position:Ye.b.POSITION.BOTTOM_CENTER})),Ye.b.isActive(t)||("info"!==e.variant&&e.variant||Ye.b.info(r,n),"success"===e.variant&&Ye.b.success(r,n),"warning"===e.variant&&Ye.b.warn(r,n),"error"===e.variant&&Ye.b.error(r,n)),!0}var ct=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(!e)return"";var r=e.replace(/\D/g,"");if((r.match(/./g)||[]).length>1){var n=(r=e.replace(",",".")).split(".");if(1===n.length)return parseFloat(r);r=r.replaceAll(".".concat(n[n.length-1]),""),r=String(r).replaceAll(".","");var a=n[n.length-1].substring(0,t);r="".concat(r,".").concat(a)}return r},lt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"decimal",r=arguments.length>2?arguments[2]:void 0;if(!e)return"";var n=Ce.getState(),a=n.session,o=String(e).replace(",","."),i=t;if("number"===i||"time"===i||"decimal"===i)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(o)},st=function(){var e=Object(Ne.a)(Qe().mark((function e(t,r,n){var a,o,i,c=arguments;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c.length>3&&void 0!==c[3]&&c[3],a=Ce.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)({},Ce.getState().db),{},Object(O.a)({},i,Object(h.a)(Object(h.a)({},Ce.getState().db[i]),{},Object(O.a)({},r._id,Object(h.a)(Object(h.a)({},Ce.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)}}(),ut=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},dt=function(e,t,r){if(!t||t&&!t.trim())return i.a.createElement("span",{style:{wordBreak:"break-word"},dangerouslySetInnerHTML:{__html:rt(e)}});var n=rt(e).split(new RegExp("(".concat(t.replace("*.","."),")"),"gi"));return i.a.createElement("span",null," ",n.map((function(e,n){return i.a.createElement("span",{key:n,style:e.toLowerCase()===t.toLowerCase()?{fontWeight:"bold",paddingTop:"3px",paddingBottom:"3px",backgroundColor:"#ffff00b3",color:r?"#000000 !important":""}:{},dangerouslySetInnerHTML:{__html:rt(e)}})}))," ")},pt=function(e){var t=rt(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 if(e.indexOf("//youtu.be/")>-1){var n=e.split(".be/")[1];n&&(r+='<iframe width="560" height="315" style="width:100%; max-width:500px" src="https://www.youtube.com/embed/'.concat(n,'" title="YouTube video player" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'))}else e.indexOf("http://")>-1||e.indexOf("https://")>-1?r+='<a style="word-break:break-all" href="'.concat(e.replace("<br/>",""),'" target="_blank">').concat(e,"</a>"):r+=e})),r+=" ";else if(t[0].indexOf(".youtube.com/watch?")>-1&&t[0].split("?").length>1&&t[0].split("?")[1].split("v=").length>1){var n=t[0].split("?")[1].split("v=")[1].split("&")[0];n&&(r+='<iframe width="560" height="315" style="width:100%; max-width:500px" src="https://www.youtube.com/embed/'.concat(n,'" title="YouTube video player" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'))}else t[0].indexOf("http://")>-1||t[0].indexOf("https://")>-1?r+='<a href="'.concat(t[0].replace("<br/>",""),'" target="_blank">').concat(t[0],"</a>"):r+="".concat(e," ")})),r+=""})),r},ft=function(){var e=Ce.getState().session,t={};return e&&e._access&&(t=e._access),t},ht=function(){var e=Object(Ne.a)(Qe().mark((function e(t,r){var n,a,o=arguments;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=o.length>2&&void 0!==o[2]&&o[2],a=Ce.getState(),a.db,n){e.next=14;break}return e.prev=3,e.next=6,Ze.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,Ze.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)}}(),mt=function(e){for(var t=e;1===t.length;)t="0"+t;return t},gt=function(e,t){var r,n,a,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"#FFFFFF",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#000000",c=e;if(c.indexOf("rgba")>-1){var l=(c=c.replace("rgba(","")).split(",");r=l[0],n=l[1],a=l[2]}else{if(0===c.indexOf("#")&&(c=c.slice(1)),3===c.length&&(c=c[0]+c[0]+c[1]+c[1]+c[2]+c[2]),6!==c.length)throw new Error("Invalid HEX color.");r=parseInt(c.slice(0,2),16),n=parseInt(c.slice(2,4),16),a=parseInt(c.slice(4,6),16)}return t?.299*r+.587*n+.114*a>186?i:o:(r=(255-r).toString(16),n=(255-n).toString(16),a=(255-a).toString(16),"#"+mt(r)+mt(n)+mt(a))},vt=function(e){var t=0;return t=e.low?parseInt(e.low):parseInt(e),Be()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===Be()(1e3*t).tz("America/Sao_Paulo").format("DD/MM/YYYY")?Be()(1e3*t).tz("America/Sao_Paulo").format("H:mm"):Be()(new Date).tz("America/Sao_Paulo").format("YYYY")===Be()(1e3*t).tz("America/Sao_Paulo").format("YYYY")?Be()(1e3*t).tz("America/Sao_Paulo").format("DD/MM H:mm"):Be()(1e3*t).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm")};function yt(e){return e>=1073741824?e=(e/1073741824).toFixed(2)+" GB":e>=1048576?e=(e/1048576).toFixed(2)+" MB":e>=1024?e=(e/1024).toFixed(2)+" KB":e>1?e+=" bytes":1==e?e+=" byte":e="0 bytes",e}function bt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===e)return"0 Bytes";var r=1024,n=t<0?0:t,a=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.floor(Math.log(e)/Math.log(r));return parseFloat((e/Math.pow(r,o)).toFixed(n))+" "+a[o]}function xt(e){return i.a.createElement(Ve,{title:e.title?tt(e.title,1):""},"string"===typeof e.icon||"string"===typeof e.children?i.a.createElement(He.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:at(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):i.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 _t=r(1648),wt=r(1649),Et=Object(_t.a)((function(e){return{root:{position:"relative"},bottom:{color:e.palette.grey["light"===e.palette.type?200:700],position:"absolute",left:0},top:{color:at("ColumnTitleColor"),animationDuration:"550ms",position:"absolute",left:0},circle:{strokeLinecap:"round"}}}));var Ot=function(e){var t=Et();return i.a.createElement("div",{className:t.root,style:{width:e.size?e.size:"25px",height:e.size?e.size:"25px"}},i.a.createElement(wt.a,Object.assign({variant:"determinate",className:t.bottom,size:e.size?e.size:25,thickness:4},e,{value:100})),i.a.createElement(wt.a,Object.assign({variant:"indeterminate",disableShrink:!0,className:t.top,classes:{circle:t.circle},size:e.size?e.size:25,thickness:4},e)))},jt=r(943),kt=r(1567),St=r(1650),Lt=Object(_t.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"}}}));var Ct=function(e,t){var r=Lt();return i.a.createElement("div",{className:r.root,style:Object(h.a)({},e.style?e.style:{})},i.a.createElement(Ve,{title:e.title?e.title:"INSERT_BUTTON_TITLE"},i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},e.text&&i.a.createElement(kt.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}:{}),i.a.createElement("div",{className:r.iconText},e.load?i.a.createElement("div",null,i.a.createElement(Ot,{size:25,style:{margin:"auto",display:"flex"}}),i.a.createElement("span",{style:{marginLeft:"15px",color:"lightgray"}},e.loadText?e.loadText:tt("$__saving"))):i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},e.icon?i.a.createElement(St.a,{overlap:"rectangular",badgeContent:e.badgeContent,classes:{badge:r.badge},color:"secondary"},i.a.createElement(xt,{usePropagation:!!e.usePropagation,size:e.size?e.size:"22px",color:e.color?e.color:at("menu"),icon:e.icon?e.icon:"help_outline"})):i.a.createElement(i.a.Fragment,null),i.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:at("menu")})},e.text)))),!e.text&&i.a.createElement(jt.a,{onClick:e.onClick?function(t){e.onClick(),t.preventDefault(),t.stopPropagation()}:null,className:e.transparent?r.iconButtonStyleTransaparent:r.iconButtonStyleWhite},i.a.createElement(St.a,{badgeContent:e.badgeContent,color:"secondary",classes:{badge:r.badge},overlap:"rectangular"},i.a.createElement(xt,{usePropagation:!!e.usePropagation,size:e.size?e.size:"22px",color:e.color?e.color:at("menu"),icon:e.icon?e.icon:"help_outline"}))))))};function It(){It=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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}function Ft(e){var t=i.a.useState(!!Ce.getState().session.consent),r=Object(Ae.a)(t,2),n=r[0],a=(r[1],i.a.useState(!1)),o=Object(Ae.a)(a,2),c=o[0],l=o[1],s=i.a.useState(!1),u=Object(Ae.a)(s,2),d=u[0],p=u[1],f=i.a.useState(!0),m=Object(Ae.a)(f,2),g=m[0],v=m[1];i.a.useEffect((function(){setTimeout((function(){v(!1)}),6e3)}),[c]);var y=function(){var e=Object(Ne.a)(It().mark((function e(){var t;return It().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v(!0),p(!0),t={accepted_at:"".concat(Be()().unix("X")),privacy:"Data de cria\xe7\xe3o: 31 de dezembro de 2021, \xdaltima atualiza\xe7\xe3o: 06 de janeiro de 2022",terms:"Data de cria\xe7\xe3o: 31 de dezembro de 2021, \xdaltima atualiza\xe7\xe3o: 06 de janeiro de 2022"},Ce.getState().functions.socket.emit("data",{module:"user",method:"post",action:"consent"},{version:JSON.stringify(t)});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return d?i.a.createElement(i.a.Fragment,null):i.a.createElement("div",{id:"policyAndTermsConsent"},i.a.createElement(Re.a,{style:{zIndex:3e4,backdropFilter:"blur(7px) sepia(90%)",display:"flex",alignItems:"center",justifyContent:"center"},open:!n,onClick:function(e){}},i.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",backgroundColor:"#FFFFFF"})},i.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:at("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"center",color:at("color"),fontWeight:"bold"}},tt("$__TermsOfUseAndPrivacyPolicy")),i.a.createElement("div",{style:{position:"absolute",top:40,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"}},c?i.a.createElement("iframe",{style:{position:"absolute",top:0,left:0,right:0,bottom:40,width:"100%",height:"calc(100% - 40px)"},width:"100%",height:"100%",src:"https://sonne.global/SONNE-Termos-de-Servicos-2022-01-07.pdf"}):i.a.createElement("iframe",{style:{position:"absolute",top:0,left:0,right:0,bottom:40,width:"100%",height:"calc(100% - 40px)"},width:"100%",height:"100%",src:"https://sonne.global/SONNE-Politica-de-Privacidade-2022-01-07.pdf"})),i.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0,height:40,display:"flex",justifyContent:"center"}},i.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginLeft:33}},i.a.createElement(Ct,{id:"policyButtonConsent",title:tt(c?"$__accepted":"$__IReadAndIAgree","*"),text:c?null:tt("$__IReadAndIAgree","*"),color:c?"green":at("menu"),icon:"verified",onClick:c?null:function(){l(!0)},size:"25px"}),c?tt("$__PrivacyPolicy","*"):i.a.createElement(i.a.Fragment,null)),c&&!g?i.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},i.a.createElement(Ct,{id:"termsofuseButtonConsent",title:tt("$__IReadAndIAgreeTheTermsOfUse","*"),text:tt("$__IReadAndIAgreeTheTermsOfUse","*"),color:at("menu"),icon:"verified",onClick:function(){y()},size:"25px"})):i.a.createElement(i.a.Fragment,null)))))}var Tt=r(30),Nt=r(31),At=r(42),Dt=r(43),Pt=function(e){Object(At.a)(r,e);var t=Object(Dt.a)(r);function r(e){var n;return Object(Tt.a)(this,r),(n=t.call(this,e)).state={hasError:!1,error:null,errorInfo:null},n}return Object(Nt.a)(r,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,errorInfo:t}),-1===window.location.hostname.indexOf("192.168")&&-1===window.location.hostname.indexOf("localhost")&&-1===window.location.hostname.indexOf("hom2022.machen")&&-1===window.location.hostname.indexOf("sonne.machen")&&console.log(e,t)}},{key:"render",value:function(){return this.state.hasError?i.a.createElement("div",null,tt("$__ComponentErrorRefreshOrSupportMessage")):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0}}}]),r}(i.a.Component),zt=r(1686),$t=r(1651),Mt=r(1652),Bt=r(1569),Yt=r(59),Gt=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)},Rt={transition:"all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1)"},Ht={marginRight:"auto",marginLeft:"auto","&:before,&:after":{display:"table",content:'" "'},"&:after":{clear:"both"}},Wt={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"}},Ut={fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif',fontWeight:"300",lineHeight:"1.5em"},Vt=["#9c27b0","#ab47bc","#8e24aa","#af2cc5","#7b1fa2"],qt=["#ff9800","#ffa726","#fb8c00","#ffa21a","#f57c00","#faf2cc","#fcf8e3"],Xt=["#f44336","#ef5350","#e53935","#f55a4e","#d32f2f","#ebcccc","#f2dede"],Kt=["#4caf50","#66bb6a","#43a047","#5cb860","#388e3c","#d0e9c6","#dff0d8"],Jt=["#00acc1","#26c6da","#00acc1","#00d3ee","#0097a7","#c4e3f3","#d9edf7"],Zt=["#e91e63","#ec407a","#d81b60","#eb3573","#c2185b"],Qt=["#999","#777","#3C4858","#AAAAAA","#D2D2D2","#DDD","#555555","#333","#eee","#ccc","#e4e4e4","#E5E5E5","#f9f9f9","#f5f5f5","#495057","#e7e7e7","#212121","#c8c8c8","#505050"],er={boxShadow:"0 10px 30px -12px rgba("+Gt("#000")+", 0.42), 0 4px 25px 0px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt("#000")+", 0.2)"},tr={boxShadow:"0 4px 20px 0 rgba("+Gt("#000")+",.14), 0 7px 10px -5px rgba("+Gt(Vt[0])+",.4)"},rr={boxShadow:"0 4px 20px 0 rgba("+Gt("#000")+",.14), 0 7px 10px -5px rgba("+Gt(Jt[0])+",.4)"},nr={boxShadow:"0 4px 20px 0 rgba("+Gt("#000")+",.14), 0 7px 10px -5px rgba("+Gt(Kt[0])+",.4)"},ar={boxShadow:"0 4px 20px 0 rgba("+Gt("#000")+",.14), 0 7px 10px -5px rgba("+Gt(qt[0])+",.4)"},or={boxShadow:"0 4px 20px 0 rgba("+Gt("#000")+",.14), 0 7px 10px -5px rgba("+Gt(Xt[0])+",.4)"},ir={boxShadow:"0 4px 20px 0 rgba("+Gt("#000")+",.14), 0 7px 10px -5px rgba("+Gt(Zt[0])+",.4)"},cr=Object(h.a)({background:"linear-gradient(60deg, "+qt[1]+", "+qt[2]+")"},ar),lr=Object(h.a)({background:"linear-gradient(60deg, "+Kt[1]+", "+Kt[2]+")"},nr),sr=Object(h.a)({background:"linear-gradient(60deg, "+Xt[1]+", "+Xt[2]+")"},or),ur=Object(h.a)({background:"linear-gradient(60deg, "+Jt[1]+", "+Jt[2]+")"},rr),dr=Object(h.a)({background:"linear-gradient(60deg, "+Vt[1]+", "+Vt[2]+")"},tr),pr=Object(h.a)({background:"linear-gradient(60deg, "+Zt[1]+", "+Zt[2]+")"},ir),fr=(Gt("#000"),Gt("#000"),Object(h.a)({margin:"0 20px 10px",paddingTop:"10px",borderTop:"1px solid "+Qt[8],height:"auto"},Ut),{border:"0",borderRadius:"3px",boxShadow:"0 10px 20px -12px rgba("+Gt("#000")+", 0.42), 0 3px 20px 0px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt("#000")+", 0.2)",padding:"10px 0",transition:"all 150ms ease 0s"}),hr=(Gt(Qt[6]),Gt("#000"),Gt("#000"),Gt("#000"),{color:Qt[2],textDecoration:"none",fontWeight:"300",marginTop:"30px",marginBottom:"25px",minHeight:"32px",fontFamily:"'Roboto', 'Helvetica', 'Arial', sans-serif","& small":{color:Qt[1],fontSize:"65%",fontWeight:"400",lineHeight:"1"}}),mr=Object(h.a)(Object(h.a)({},hr),{},{marginTop:"0",marginBottom:"3px",minHeight:"auto","& a":Object(h.a)(Object(h.a)({},hr),{},{marginTop:".625rem",marginBottom:"0.75rem",minHeight:"auto"})}),gr={button:{minHeight:"auto",minWidth:"auto",backgroundColor:Qt[0],color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+Gt(Qt[0])+", 0.14), 0 3px 1px -2px rgba("+Gt(Qt[0])+", 0.2), 0 1px 5px 0 rgba("+Gt(Qt[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:Qt[0],boxShadow:"0 14px 26px -12px rgba("+Gt(Qt[0])+", 0.42), 0 4px 23px 0px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt(Qt[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:at("color"),boxShadow:"0 2px 2px 0 "+at("color",.14)+", 0 3px 1px -2px "+at("color",.2)+", 0 1px 5px 0 rgba("+at("color",.12),"&:hover,&:focus":{backgroundColor:at("color"),boxShadow:"0 14px 26px -12px "+at("color",.42)+", 0 4px 23px 0px "+at("color",.12)+", 0 8px 10px -5px rgba("+at("color",.2)}},custom_menuColor:{backgroundColor:at("menu"),boxShadow:"0 2px 2px 0 "+at("menu",.14)+", 0 3px 1px -2px "+at("menu",.2)+", 0 1px 5px 0 rgba("+at("menu",.12),"&:hover,&:focus":{backgroundColor:at("menu"),boxShadow:"0 14px 26px -12px "+at("menu",.42)+", 0 4px 23px 0px "+at("menu",.12)+", 0 8px 10px -5px rgba("+at("menu",.2)}},custom_mediumColor:{backgroundColor:at("medium"),boxShadow:"0 2px 2px 0 "+at("medium",.14)+", 0 3px 1px -2px "+at("medium",.2)+", 0 1px 5px 0 rgba("+at("medium",.12),"&:hover,&:focus":{backgroundColor:at("medium"),boxShadow:"0 14px 26px -12px "+at("medium",.42)+", 0 4px 23px 0px "+at("medium",.12)+", 0 8px 10px -5px rgba("+at("medium",.2)}},primary:{backgroundColor:Vt[0],boxShadow:"0 2px 2px 0 rgba("+Gt(Vt[0])+", 0.14), 0 3px 1px -2px rgba("+Gt(Vt[0])+", 0.2), 0 1px 5px 0 rgba("+Gt(Vt[0])+", 0.12)","&:hover,&:focus":{backgroundColor:Vt[0],boxShadow:"0 14px 26px -12px rgba("+Gt(Vt[0])+", 0.42), 0 4px 23px 0px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt(Vt[0])+", 0.2)"}},info:{backgroundColor:Jt[0],boxShadow:"0 2px 2px 0 rgba("+Gt(Jt[0])+", 0.14), 0 3px 1px -2px rgba("+Gt(Jt[0])+", 0.2), 0 1px 5px 0 rgba("+Gt(Jt[0])+", 0.12)","&:hover,&:focus":{backgroundColor:Jt[0],boxShadow:"0 14px 26px -12px rgba("+Gt(Jt[0])+", 0.42), 0 4px 23px 0px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt(Jt[0])+", 0.2)"}},success:{backgroundColor:Kt[0],boxShadow:"0 2px 2px 0 rgba("+Gt(Kt[0])+", 0.14), 0 3px 1px -2px rgba("+Gt(Kt[0])+", 0.2), 0 1px 5px 0 rgba("+Gt(Kt[0])+", 0.12)","&:hover,&:focus":{backgroundColor:Kt[0],boxShadow:"0 14px 26px -12px rgba("+Gt(Kt[0])+", 0.42), 0 4px 23px 0px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt(Kt[0])+", 0.2)"}},warning:{backgroundColor:qt[0],boxShadow:"0 2px 2px 0 rgba("+Gt(qt[0])+", 0.14), 0 3px 1px -2px rgba("+Gt(qt[0])+", 0.2), 0 1px 5px 0 rgba("+Gt(qt[0])+", 0.12)","&:hover,&:focus":{backgroundColor:qt[0],boxShadow:"0 14px 26px -12px rgba("+Gt(qt[0])+", 0.42), 0 4px 23px 0px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt(qt[0])+", 0.2)"}},danger:{backgroundColor:Xt[0],boxShadow:"0 2px 2px 0 rgba("+Gt(Xt[0])+", 0.14), 0 3px 1px -2px rgba("+Gt(Xt[0])+", 0.2), 0 1px 5px 0 rgba("+Gt(Xt[0])+", 0.12)","&:hover,&:focus":{backgroundColor:Xt[0],boxShadow:"0 14px 26px -12px rgba("+Gt(Xt[0])+", 0.42), 0 4px 23px 0px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt(Xt[0])+", 0.2)"}},rose:{backgroundColor:Zt[0],boxShadow:"0 2px 2px 0 rgba("+Gt(Zt[0])+", 0.14), 0 3px 1px -2px rgba("+Gt(Zt[0])+", 0.2), 0 1px 5px 0 rgba("+Gt(Zt[0])+", 0.12)","&:hover,&:focus":{backgroundColor:Zt[0],boxShadow:"0 14px 26px -12px rgba("+Gt(Zt[0])+", 0.42), 0 4px 23px 0px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt(Zt[0])+", 0.2)"}},white:{"&,&:focus,&:hover":{backgroundColor:"#FFF",color:Qt[0]}},twitter:{backgroundColor:"#55acee",color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+Gt("#55acee")+", 0.14), 0 3px 1px -2px rgba("+Gt("#55acee")+", 0.2), 0 1px 5px 0 rgba("+Gt("#55acee")+", 0.12)","&:hover,&:focus,&:visited":{backgroundColor:"#55acee",color:"#FFF",boxShadow:"0 14px 26px -12px rgba("+Gt("#55acee")+", 0.42), 0 4px 23px 0px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt("#55acee")+", 0.2)"}},facebook:{backgroundColor:"#3b5998",color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+Gt("#3b5998")+", 0.14), 0 3px 1px -2px rgba("+Gt("#3b5998")+", 0.2), 0 1px 5px 0 rgba("+Gt("#3b5998")+", 0.12)","&:hover,&:focus":{backgroundColor:"#3b5998",color:"#FFF",boxShadow:"0 14px 26px -12px rgba("+Gt("#3b5998")+", 0.42), 0 4px 23px 0px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt("#3b5998")+", 0.2)"}},google:{backgroundColor:"#dd4b39",color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+Gt("#dd4b39")+", 0.14), 0 3px 1px -2px rgba("+Gt("#dd4b39")+", 0.2), 0 1px 5px 0 rgba("+Gt("#dd4b39")+", 0.12)","&:hover,&:focus":{backgroundColor:"#dd4b39",color:"#FFF",boxShadow:"0 14px 26px -12px rgba("+Gt("#dd4b39")+", 0.42), 0 4px 23px 0px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt("#dd4b39")+", 0.2)"}},linkedin:{backgroundColor:"#0976b4",color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+Gt("#0976b4")+", 0.14), 0 3px 1px -2px rgba("+Gt("#0976b4")+", 0.2), 0 1px 5px 0 rgba("+Gt("#0976b4")+", 0.12)","&:hover,&:focus":{backgroundColor:"#0976b4",color:"#FFF",boxShadow:"0 14px 26px -12px rgba("+Gt("#0976b4")+", 0.42), 0 4px 23px 0px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt("#0976b4")+", 0.2)"}},pinterest:{backgroundColor:"#cc2127",color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+Gt("#cc2127")+", 0.14), 0 3px 1px -2px rgba("+Gt("#cc2127")+", 0.2), 0 1px 5px 0 rgba("+Gt("#cc2127")+", 0.12)","&:hover,&:focus":{backgroundColor:"#cc2127",color:"#FFF",boxShadow:"0 14px 26px -12px rgba("+Gt("#cc2127")+", 0.42), 0 4px 23px 0px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt("#cc2127")+", 0.2)"}},youtube:{backgroundColor:"#e52d27",color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+Gt("#e52d27")+", 0.14), 0 3px 1px -2px rgba("+Gt("#e52d27")+", 0.2), 0 1px 5px 0 rgba("+Gt("#e52d27")+", 0.12)","&:hover,&:focus":{backgroundColor:"#e52d27",color:"#FFF",boxShadow:"0 14px 26px -12px rgba("+Gt("#e52d27")+", 0.42), 0 4px 23px 0px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt("#e52d27")+", 0.2)"}},tumblr:{backgroundColor:"#35465c",color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+Gt("#35465c")+", 0.14), 0 3px 1px -2px rgba("+Gt("#35465c")+", 0.2), 0 1px 5px 0 rgba("+Gt("#35465c")+", 0.12)","&:hover,&:focus":{backgroundColor:"#35465c",color:"#FFF",boxShadow:"0 14px 26px -12px rgba("+Gt("#35465c")+", 0.42), 0 4px 23px 0px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt("#35465c")+", 0.2)"}},github:{backgroundColor:Qt[7],color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+Gt(Qt[6])+", 0.14), 0 3px 1px -2px rgba("+Gt(Qt[6])+", 0.2), 0 1px 5px 0 rgba("+Gt(Qt[6])+", 0.12)","&:hover,&:focus":{backgroundColor:Qt[7],color:"#FFF",boxShadow:"0 14px 26px -12px rgba("+Gt(Qt[6])+", 0.42), 0 4px 23px 0px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt(Qt[6])+", 0.2)"}},behance:{backgroundColor:"#1769ff",color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+Gt("#1769ff")+", 0.14), 0 3px 1px -2px rgba("+Gt("#1769ff")+", 0.2), 0 1px 5px 0 rgba("+Gt("#1769ff")+", 0.12)","&:hover,&:focus":{backgroundColor:"#1769ff",color:"#FFF",boxShadow:"0 14px 26px -12px rgba("+Gt("#1769ff")+", 0.42), 0 4px 23px 0px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt("#1769ff")+", 0.2)"}},dribbble:{backgroundColor:"#ea4c89",color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+Gt("#ea4c89")+", 0.14), 0 3px 1px -2px rgba("+Gt("#ea4c89")+", 0.2), 0 1px 5px 0 rgba("+Gt("#ea4c89")+", 0.12)","&:hover,&:focus":{backgroundColor:"#ea4c89",color:"#FFF",boxShadow:"0 14px 26px -12px rgba("+Gt("#ea4c89")+", 0.42), 0 4px 23px 0px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt("#ea4c89")+", 0.2)"}},reddit:{backgroundColor:"#ff4500",color:"#FFF",boxShadow:"0 2px 2px 0 rgba("+Gt("#ff4500")+", 0.14), 0 3px 1px -2px rgba("+Gt("#ff4500")+", 0.2), 0 1px 5px 0 rgba("+Gt("#ff4500")+", 0.12)","&:hover,&:focus":{backgroundColor:"#ff4500",color:"#FFF",boxShadow:"0 14px 26px -12px rgba("+Gt("#ff4500")+", 0.42), 0 4px 23px 0px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt("#ff4500")+", 0.2)"}},simple:{"&,&:focus,&:hover":{color:"#FFF",background:"transparent",boxShadow:"none"},"&$primary":{"&,&:focus,&:hover,&:visited":{color:Vt[0]}},"&$info":{"&,&:focus,&:hover,&:visited":{color:Jt[0]}},"&$success":{"&,&:focus,&:hover,&:visited":{color:Kt[0]}},"&$warning":{"&,&:focus,&:hover,&:visited":{color:qt[0]}},"&$rose":{"&,&:focus,&:hover,&:visited":{color:Zt[0]}},"&$danger":{"&,&:focus,&:hover,&:visited":{color:Xt[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:Qt[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:Qt[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"}}}},vr=["color","round","children","fullWidth","disabled","simple","size","block","link","justIcon","className","muiClasses"],yr=Object(_t.a)(gr),br=i.a.forwardRef((function(e,t){var r,n=yr(),a=e.color,o=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,v=Object(Yt.a)(e,vr),y=$e()((r={},Object(O.a)(r,n.button,!0),Object(O.a)(r,n[d],d),Object(O.a)(r,n[a],a),Object(O.a)(r,n.round,o),Object(O.a)(r,n.fullWidth,l),Object(O.a)(r,n.disabled,s),Object(O.a)(r,n.simple,u),Object(O.a)(r,n.block,p),Object(O.a)(r,n.link,f),Object(O.a)(r,n.justIcon,h),Object(O.a)(r,m,m),r));return i.a.createElement(kt.a,Object.assign({},v,{ref:t,classes:g,className:y}),c)})),xr=function(e){return{appBar:{backgroundColor:"transparent",boxShadow:"none",borderBottom:"0",marginBottom:"0",position:"absolute",width:"100%",paddingTop:"10px",zIndex:"1029",color:Qt[6],border:"0",borderRadius:"3px",padding:"10px 0",transition:"all 150ms ease 0s",minHeight:"50px",display:"block"},container:Object(h.a)(Object(h.a)({},Wt),{},{minHeight:"50px"}),flex:{flex:1},title:Object(h.a)(Object(h.a)({},Ut),{},{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:Vt[0],color:"#FFF"},fr),info:Object(h.a)({backgroundColor:Jt[0],color:"#FFF"},fr),success:Object(h.a)({backgroundColor:Kt[0],color:"#FFF"},fr),warning:Object(h.a)({backgroundColor:qt[0],color:"#FFF"},fr),danger:Object(h.a)({backgroundColor:Xt[0],color:"#FFF"},fr),list:Object(h.a)(Object(h.a)({},Ut),{},{fontSize:"12px",margin:0,marginRight:"-15px",paddingLeft:"0",listStyle:"none",color:"#FFF",paddingTop:"0",paddingBottom:"0"}),listItem:Object(O.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("+Gt(Qt[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("+Gt("#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"},er),{},{width:260},er),{},{position:"fixed",display:"block",top:"0",height:"100vh",right:"0",left:"auto",visibility:"visible",overflowY:"visible",borderTop:"none",textAlign:"left",paddingRight:"0px",paddingLeft:"0"},Rt),{},{"&: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"}}},_r=r(262),wr=r.n(_r),Er=Object(_t.a)(xr);function Or(e){var t=i.a.useState(!1),r=Object(Ae.a)(t,2),n=(r[0],r[1],Er()),a=e.color,o=(e.brandText,$e()(Object(O.a)({}," "+n[a],a)));Bt.a,n.list;return i.a.createElement($t.a,{position:"static",className:n.appBar+o},i.a.createElement(Mt.a,null,i.a.createElement("div",{style:{display:"flex",justifyContent:"center",width:"100%"}},i.a.createElement("div",{style:{maxWidth:"222px"}},i.a.createElement("img",{src:wr.a,alt:"logo",style:{width:"100%"}})))))}var jr={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 "+Qt[15],padding:"15px 0"},Ut),{},{zIndex:4}),container:Object(h.a)(Object(h.a)({zIndex:3},Wt),{},{position:"relative"}),containerFluid:Object(h.a)(Object(h.a)({zIndex:3},Ht),{},{position:"relative"}),a:{color:Vt[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"}}},kr=Object(_t.a)(jr);function Sr(e){var t,r,n=kr(),a=e.fluid,o=e.white,c=(e.rtlActive,$e()((t={},Object(O.a)(t,n.container,!a),Object(O.a)(t,n.containerFluid,a),Object(O.a)(t,n.whiteColor,o),t))),l=n.a+$e()(Object(O.a)({}," "+n.whiteColor,o));$e()((r={},Object(O.a)(r,n.block,!0),Object(O.a)(r,n.whiteColor,o),r));return i.a.createElement("footer",{className:n.footer},i.a.createElement("div",{className:c,style:{display:"flex",justifyContent:"center"}},i.a.createElement("div",{className:n.left},i.a.createElement(Bt.a,{className:n.list})),i.a.createElement("p",{className:n.center},"\xa9 ",1900+(new Date).getYear()," ",i.a.createElement("a",{href:"https://sonne.global",className:l,target:"_blank"},"SONNE GLOBAL")," | ".concat("$__footerDescription"!==tt("$__footerDescription",1)?tt("$__footerDescription",1):""))))}var Lr=r(640),Cr=r.n(Lr),Ir=(r(711),r(231)),Fr=r.n(Ir),Tr=r(274);r(1020);function Nr(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 Ar=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(at("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"}}},Dr=r(307),Pr=r.n(Dr);var zr,$r,Mr=Object(Fe.b)((function(e){return{store:{lightbox:e.lightBox}}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Ar)((function(e){var t=e.classes,r=Ce.getState(),n=r.db,a=r.lightBox,o=i.a.useState(!1),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.a.useState(!1),d=Object(Ae.a)(u,2),p=d[0],f=d[1],m=i.a.useState(!1),g=Object(Ae.a)(m,2),v=g[0],y=g[1],b=i.a.useState(null),x=Object(Ae.a)(b,2),_=x[0],w=x[1],E=i.a.useState(null),O=Object(Ae.a)(E,2),j=O[0],k=O[1],S=i.a.useState(null),L=Object(Ae.a)(S,2),C=(L[0],L[1]),I=i.a.useState(!0),F=Object(Ae.a)(I,2),T=F[0],N=F[1],A=i.a.useState(.5),D=Object(Ae.a)(A,2),P=D[0];D[1],i.a.useEffect((function(){l||(s(!0),window.addEventListener("keydown",(function(e){z(e)}),!1))})),i.a.useEffect((function(){if(a.open&&a.files.length>0&&a.file&&a.file!==_){f(!0),w(a.file);var e=Ce.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(encodeURIComponent(e.file)):null,o=e&&e.file?"https://machen.azureedge.net/".concat(e.file):null,i=t.length>0?t[t.length-1]:null;"pdf"===(i?n.fileExtensions.filter((function(e){return e.ext.indexOf(i.toLowerCase())>-1})).length>0?n.fileExtensions.filter((function(e){return e.ext.indexOf(i.toLowerCase())>-1}))[0].viewer:"file":null)&&(N(!0),k(r));n.fileExtensions.filter((function(e){return e.ext.indexOf(i.toLowerCase())>-1})).length>0&&(n.fileExtensions.filter((function(e){return e.ext.indexOf(i.toLowerCase())>-1})).length>0&&n.fileExtensions.filter((function(e){return e.ext.indexOf(i.toLowerCase())>-1}))[0].icon?n.fileExtensions.filter((function(e){return e.ext.indexOf(i.toLowerCase())>-1}))[0].icon:"https://machen.azureedge.net/".concat(e.file)),setTimeout((function(){f(!1),k(r),C(o)}),1e3)}}),[a]);var z=function(e){if(39!==e.keyCode&&40!==e.keyCode&&37!==e.keyCode&&38!==e.keyCode&&27!==e.keyCode||1===Ce.getState().lightBox.files.length&&27!==e.keyCode)return!1;if(Ce.getState().lightBox.open){var t;if(Ce.getState().lightBox.files.map((function(e,r){e._id===Ce.getState().lightBox.file&&(t=r)})),39===e.keyCode||40===e.keyCode)t+1===Ce.getState().lightBox.files.length?t=0:t+=1,M("R");else{if(37!==e.keyCode&&38!==e.keyCode)return 27===e.keyCode&&void $();0===t?t=Ce.getState().lightBox.files.length-1:t-=1,M("L")}f(!0),setTimeout((function(){f(!1)}),1e3)}},$=function(){setTimeout((function(){e.reduxFunction("ASYNC","LIGHTBOX_CLOSE")}),500),window.removeEventListener("keydown",(function(e){z(e)}),!1)},M=function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Ce.getState().lightBox.open&&(f(!0),Ce.getState().lightBox.files.map((function(e,r){e._id===Ce.getState().lightBox.file&&(t=r)})),"R"===v||"R"===r?t+1===Ce.getState().lightBox.files.length?t=0:t+=1:"L"!==v&&"L"!==r||(0===t?t=Ce.getState().lightBox.files.length-1:t-=1),Ce.getState().lightBox.files.length>0&&Ce.getState().lightBox.files[t]&&e.reduxFunction("ASYNC","LIGHTBOX",Object(h.a)(Object(h.a)({},Ce.getState().lightBox),{},{file:Ce.getState().lightBox.files[t]._id})),setTimeout((function(){f(!1),y(!1)}),700))};if(!Ce.getState().lightBox.open&&0===Ce.getState().lightBox.files.length)return null;var B=Ce.getState().lightBox.files.filter((function(e){return e._id===_}))[0];if(!B||!B.file)return i.a.createElement(i.a.Fragment,null);var Y=B&&B.name?B.name.split("."):null,G=Y.length>0?Y[Y.length-1]:null,R=G?n.fileExtensions.filter((function(e){return e.ext.indexOf(G.toLowerCase())>-1})).length>0?n.fileExtensions.filter((function(e){return e.ext.indexOf(G.toLowerCase())>-1}))[0].viewer:"file":null,H=j,W=B&&B.file?"https://fl.machen.ai/?arq=".concat(B.file.replace("&","||MCH-ECOM||"),"&name=").concat(B.name.replace("&","||MCH-ECOM||")):null,U=(B.file,B.name,"https://fls.machen.ai/".concat(encodeURIComponent(B.file),"/name/").concat(encodeURIComponent(B.name)));return console.log(U),n.fileExtensions.filter((function(e){return e.ext.indexOf(G.toLowerCase())>-1})).length>0&&(H=n.fileExtensions.filter((function(e){return e.ext.indexOf(G.toLowerCase())>-1})).length>0&&n.fileExtensions.filter((function(e){return e.ext.indexOf(G.toLowerCase())>-1}))[0].icon?n.fileExtensions.filter((function(e){return e.ext.indexOf(G.toLowerCase())>-1}))[0].icon:"https://machen.azureedge.net/".concat(B.file)),i.a.createElement(Cr.a,{onSwipeMove:function(e,t){e.x>100?y("L"):e.x<-100?y("R"):e.y<-100&&$()},onSwipeEnd:function(e){!1!==v&&M()}},i.a.createElement(Re.a,{className:t.backdrop,open:Ce.getState().lightBox.open,onClick:function(e){$()}},i.a.createElement("div",{id:"lightBox",className:t.header,onClick:function(e){$(),e.stopPropagation()}},i.a.createElement("div",{className:t.btClose},i.a.createElement(xt,{title:tt("$__close","*"),color:at("light"),onClick:function(){$()}},"close"))),i.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"}},i.a.createElement("div",{className:t.content,style:{zIndex:1e3},onClick:function(e){e.stopPropagation()}},p?i.a.createElement("div",{className:t.loader},i.a.createElement(wt.a,null)):"img"===R?i.a.createElement("div",{className:t.img},"string"===typeof j&&(-1===j.indexOf("https://")||j.indexOf("svg")>-1)?i.a.createElement(i.a.Fragment,null,"img"===R&&H&&H.indexOf("svg")>-1&&i.a.createElement("a",{href:W},i.a.createElement("div",{style:{color:"#FFFFFF",fontWeight:"bolder",fontSize:"22px"}},i.a.createElement("img",{src:Pr.a,style:{borderRadius:"15px",boxShadow:"0 1px 2px 2px rgba(0,0,0,0.1)",maxWidth:"100%",height:"100%",maxHeight:"100px"}}),tt("$__clickHereToDownload",1)))):i.a.createElement("img",{src:"".concat(H),onError:function(e){return e.target.src=H}})):p||"movie"!==R?p||"microsoft"!==R?!p&&"pdf"===R&&j?i.a.createElement("div",{className:t.embed},T&&i.a.createElement("div",{className:t.loader},i.a.createElement(wt.a,null)),i.a.createElement("div",{className:t.embed},i.a.createElement("div",{className:t.embed,style:{overflow:"auto"}},i.a.createElement("div",{className:t.embed,style:{zoom:"".concat(100*P,"%")}},i.a.createElement(Pt,null,i.a.createElement("embed",{className:t.embed,id:"embed-docs",onLoad:function(e){e.target.style.display="none",e.target.style.display="flex"},onError:function(e){e.target.style.display="none",e.target.style.display="flex"},src:"".concat(U),d:!0})))))):p||"audio"!==R?p||"file"!==R?p?null:i.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)}):i.a.createElement("a",{href:W},i.a.createElement("div",{style:{color:"#FFFFFF",fontWeight:"bolder",fontSize:"22px"}},tt("$__clickHereToDownload",1))):i.a.createElement(Fr.a,{src:j,autoPlay:!0,controls:!0}):i.a.createElement(i.a.Fragment,null,i.a.createElement(Pt,null,i.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(U)}))):i.a.createElement("video",{className:t.movie,src:j,controls:!0})),Ce.getState().lightBox.files.length>1&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:t.leftButtom},i.a.createElement(xt,{title:tt("$__previous","*"),color:at("light"),size:"33px",onClick:function(){M("L")}},"keyboard_arrow_left")),i.a.createElement("div",{className:t.rightButtom},i.a.createElement(xt,{title:tt("$__next","*"),color:at("light"),size:"33px",onClick:function(){M("R")}},"keyboard_arrow_right"))),i.a.createElement("div",{className:t.footer,onClick:function(e){e.stopPropagation()}},i.a.createElement("a",{href:W},i.a.createElement(xt,{title:tt("$__download","*"),color:at("light"),size:"33px"},"get_app"))))))}))),Br=Ge.default.div(zr||(zr=Object(Te.a)(["\n position: relative;\n width: 100%;\n height: 100%;\n padding-top: 20px;\n padding-bottom: 20px;\n"]))),Yr=Ge.default.div($r||($r=Object(Te.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 Gr(e){return i.a.createElement("div",{id:"preloaderComponent"},e.fullScreen?i.a.createElement(Yr,null,i.a.createElement(wt.a,{size:50|e.size})):i.a.createElement(Br,null,i.a.createElement(wt.a,null)))}var Rr=function(e){return i.a.createElement("div",{style:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},i.a.createElement("div",{style:{width:"100%",maxWidth:"250px",height:"150px",display:"flex",alignItems:"center",justifyContent:"center"}},i.a.createElement(Gr,null)))},Hr=Object(_t.a)((function(){return{customColor:{display:"flex",alignItems:"center","& .MuiBadge-badge":{backgroundColor:at("color"),color:at("light"),display:"flex",alignItems:"center",zIndex:"1500 !important"}},root:{"& .MuiBadge-badge":{display:"flex",alignItems:"center",zIndex:20}}}})),Wr=Object(We.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"}}}))(Ue.a);function Ur(e){var t=Hr(),r=i.a.useState(e.badgeVisible||!1),n=Object(Ae.a)(r,2),a=n[0],o=n[1],c=i.a.useState(e.tooltipprops&&e.tooltipprops.open?e.tooltipprops.open:(!e.tooltipprops||"false"!==String(e.tooltipprops.open))&&void 0),l=Object(Ae.a)(c,2),s=l[0],u=l[1];return i.a.useEffect((function(){e&&e.tooltipprops&&e.tooltipprops.open&&!s&&u(!0),e&&e.tooltipprops&&s&&"false"===String(e.tooltipprops.open)&&u(!1)})),i.a.createElement("div",{className:t.root},i.a.createElement(Wr,{title:e.title&&"string"===typeof e.title?i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{color:at("darkText"),display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",height:"auto"}},tt(e.title,1))):e.title?i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:t.customColor},i.a.createElement("div",{style:{position:"relative"}},e.title,e.onClose&&i.a.createElement(He.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},i.a.createElement(St.a,{overlap:"rectangular",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?i.a.createElement(He.a,{onMouseEnter:function(){return!e.badgeVisible&&o(!0)},onMouseLeave:function(){return!e.badgeVisible&&o(!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||at("medium"),opacity:!e.disabled||a?"1":"0.5",cursor:e.onClick?"pointer":""},e.style)},e.icon):i.a.createElement(e.icon,{onMouseEnter:function(){return!e.badgeVisible&&o(!0)},onMouseLeave:function(){return!e.badgeVisible&&o(!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||at("medium"),opacity:!e.disabled||a?"1":"0.5",cursor:e.onClick?"pointer":""},e.style)}))))}var Vr={button:Object(h.a)(Object(h.a)({},Ut),{},{alignItems:"center",justifyContent:"center",cursor:"pointer",userSelect:"none","&$reverse":{}}),buttonText:Object(h.a)(Object(h.a)({},Ut),{},{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"}},qr=Object(_t.a)(Vr),Xr=i.a.forwardRef((function(e,t){var r,n,a=qr(),o=(e.reverse,e.text),c=$e()((r={},Object(O.a)(r,a.button,!0),Object(O.a)(r,a.reverse,!!e.reverse),r)),l=$e()((n={},Object(O.a)(n,a.buttonText,!0),Object(O.a)(n,a.reverse,!!e.reverse),n));return i.a.createElement("div",{className:e.text?l:c,onClick:function(){return e.onClick?e.onClick():null},style:Object(h.a)({},e.style)},i.a.createElement("div",{className:a.iconButton,style:{color:e.iconColor?at(e.iconColor):at("color"),backgroundColor:e.iconBackground?at(e.iconBackground):"none"}},e.icon?i.a.createElement(Ur,{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:{})}):i.a.createElement(Ur,{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:{})})),o&&i.a.createElement("div",{className:a.text,style:{color:e.textColor?at(e.textColor):at("medium")}},o))})),Kr=r(1599),Jr=r(83),Zr=r.n(Jr);function Qr(){Qr=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 en=Object(_t.a)({users:{position:"relative",bottom:"0px",right:"2px",fontSize:"10px","& .MuiAvatarGroup-root":{justifyContent:"flex-end"},"& .MuiAvatar-root":{width:"25px",height:"25px",fontSize:"10px"}}}),tn=function(e){var t=Ce.getState(),r=t.session,n=t.functions.socket,a=i.a.useState(e.data),o=Object(Ae.a)(a,2),c=o[0],l=o[1],s=en();i.a.useEffect((function(){l(e.data)}),[e.data]);var u=function(){var t=Object(Ne.a)(Qr().mark((function t(a,o){var i,s;return Qr().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(O.a)({},a,Object(O.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:Be()().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,o=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)?i.a.createElement(i.a.Fragment,null):i.a.createElement(Xr,{icon:c._reactions&&c._reactions[n]&&c._reactions[n][r._id]?o:l||o,iconColor:c._reactions&&c._reactions[n]&&c._reactions[n][r._id]?a||at("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?i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{position:"relative",width:"100%",paddingBottom:3,borderBottom:"1px solid lightgray",marginBottom:"7px"}},tt("$__".concat(n),1)),i.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 i.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},i.a.createElement(Kr.a,{alt:c._reactions[n][e].name,src:c._reactions[n][e].image||Zr.a}),i.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(Be()(1e3*c._reactions[n][e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})))):tt("$__".concat(n),1)})};return i.a.createElement("div",{onClick:function(e){e.stopPropagation()}},i.a.createElement("div",{style:{display:"flex",minWidth:"fit-content",justifyContent:"center"}},i.a.createElement(d,{react:"like",primaryIcon:"thumb_up",secondaryIcon:"thumb_up_off_alt"}),i.a.createElement(d,{react:"nolike",primaryIcon:"thumb_down",secondaryIcon:"thumb_down_off_alt"}),i.a.createElement(d,{react:"love",primaryIcon:"favorite",secondaryIcon:"favorite_border",color:"red"}),i.a.createElement(d,{react:"approve",primaryIcon:"verified",color:"green"}),i.a.createElement(d,{react:"attention",primaryIcon:"report_problem",color:"red"}),e.children&&i.a.createElement(i.a.Fragment,null,e.children)))},rn={tags:Object(h.a)(Object(h.a)({},Ut),{},{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)({},Ut),{},{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:at("light")}})},nn=r(936),an=r(1653),on=r(1566),cn=r(945),ln=r(1564);function sn(){sn=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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(_t.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 un=function(e){var t=i.a.useState(!1),r=Object(Ae.a)(t,2),n=r[0],a=r[1],o=i.a.useState(e.color?e.color:"rgba(200,200,200,1)"),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.a.useRef(null),d=function(t){u.current&&u.current.contains(t.target)||(a(!1),e.onClose&&e.onClose())},p=function(){var t=Object(Ne.a)(sn().mark((function t(r){return sn().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,Ze.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 i.a.createElement("div",{className:"cardColorPicker",style:Object(h.a)({},e.style?e.style:{}),onClick:function(e){e.stopPropagation(),e.preventDefault()},onDrag:function(e){e.preventDefault(),e.stopPropagation()},onDragStart:function(e){e.preventDefault(),e.stopPropagation()},onDragEnter:function(e){e.preventDefault(),e.stopPropagation()},onDragCapture:function(e){e.preventDefault(),e.stopPropagation()},onDragEnterCapture:function(e){e.preventDefault(),e.stopPropagation()},onDragOver:function(e){e.preventDefault(),e.stopPropagation()}},e.children?i.a.createElement("div",{ref:u,style:{margin:3,cursor:"pointer"},onClick:function(e){a((function(e){return!e}))}},i.a.createElement("div",{onClick:function(e){}},e.children)):i.a.createElement("div",{ref:u,style:Object(h.a)(Object(h.a)({},e.label?{borderRadius:7,padding:7,color:l?gt(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:""),i.a.createElement(ln.a,{open:n,anchorEl:u.current,role:void 0,transition:!0,disablePortal:!!e.disablePortal},(function(t){var r=t.TransitionProps;t.placement;return i.a.createElement(on.a,Object.assign({},r,{style:{transformOrigin:"right center"}}),i.a.createElement(cn.a,null,i.a.createElement(an.a,{onClickAway:d},i.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()}},i.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",marginTop:"-5px",justifyContent:"end"}},i.a.createElement(Ct,{title:tt("$__cancel",1),color:"lightgrey",icon:"close",onClick:function(){s(e.color?e.color:"rgba(200,200,200,1)"),a(!n)},size:"30px"}),e.color?i.a.createElement(Ct,{title:tt("$__removeColor",1),color:"red",icon:"format_color_reset",onClick:function(){p(null)},size:"30px"}):i.a.createElement(i.a.Fragment,null),i.a.createElement(Ct,{title:tt("$__saveColor",1),color:"green",icon:"save",onClick:function(){p(l)},size:"30px"})),i.a.createElement(nn.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}),i.a.createElement("div",{style:{clear:"both"}})))))})))},dn=Object(_t.a)(rn);var pn=function(e){var t=dn(),r=i.a.useState(!!e.showOptions),n=Object(Ae.a)(r,2),a=n[0],o=n[1],c=i.a.useState(!1),l=Object(Ae.a)(c,2),s=l[0],u=l[1],d=i.a.useState([]),p=Object(Ae.a)(d,2),f=p[0],m=p[1];return i.a.useEffect((function(){return m(Ce.getState().db[e.dbNode?e.dbNode:"tag"]),function(){m([]),u(!1)}}),[e.options]),i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:a||e.expanded?t.tagsOver:t.tags,onClick:function(t){e.options&&e.options.length>0&&!a&&o(!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(Ce.getState().db.tag.filter((function(e){return e.value===t.value})).length>0){n=Ce.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:at("medium");return i.a.createElement("div",{key:r,className:"tag",style:Object(h.a)({position:"relative",float:"left",whiteSpace:"nowrap",backgroundColor:c},e.rounded?{borderRadius:"7px !important"}:{}),onClick:function(){e.colorPicker||e.showOptions||o(!1)}},!e.showOptions&&a&&e.colorPicker?i.a.createElement(un,{label:n.label,color:c,_id:n.value,onChange:function(e){var t=n;t.color=e,Ce.getState().functions.socket.emit("tag.UPD",t)}}):(a||e.expanded)&&i.a.createElement("div",{className:"tag",style:Object(h.a)({backgroundColor:c,color:n.color?gt(n.color,!0):"#FFFFFF"},e.rounded?{borderRadius:"7px !important"}:{})},n.label))}})),!e.showOptions&&a&&!e.expanded&&s&&i.a.createElement("div",{style:{position:"absolute",top:"0",right:"0"}},i.a.createElement(Ue.a,{title:tt("$__hideTags")},i.a.createElement(i.a.Fragment,null,i.a.createElement(jt.a,{onClick:function(t){e.showOptions||o(!1)}},i.a.createElement(xt,{size:"22px",color:at("medium"),icon:"visibility_off"})))))))},fn=r(1655),hn=r(1654),mn=Object(_t.a)((function(e){return{iconButtonStyleTransaparent:Object(h.a)({padding:"3px",margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},e.buttonStyle?e.buttonStyle:{}),iconButtonStyleWhite:Object(h.a)({padding:"3px",margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},e.buttonStyle?e.buttonStyle:{})}}));var gn=Object(o.memo)((function(e){var t=mn(),r=i.a.useState(!1),n=Object(Ae.a)(r,2),a=n[0],o=n[1],c=i.a.useRef(null),l=function(t){t.preventDefault(),t.stopPropagation(),c.current&&c.current.contains(t.target)||(o(!1),e.onClose&&e.onClose())};function s(t){"Tab"===t.key&&(t.preventDefault(),o(!1),e.onClose&&e.onClose())}return e.options&&0!==e.options.length?i.a.createElement("div",{style:Object(h.a)({zIndex:"100 !important"},e.style?e.style:{})},i.a.createElement(Ue.a,{title:e.title?e.title:tt("$__options",1)},e.text?i.a.createElement(kt.a,{ref:c,"aria-controls":a?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){o((function(e){return!e})),!a&&e.onOpen&&e.onOpen(),a&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},i.a.createElement(i.a.Fragment,null,i.a.createElement("span",{style:{marginRight:"15px",color:e.textColor?e.textColor:e.color?e.color:at("menu"),overflow:"hidden",textOverflow:"ellipsis",width:"90%",maxWidth:e.maxWidth?e.maxWidth:"90%",whiteSpace:"nowrap"}},e.text),i.a.createElement(xt,{count:e.count?e.count:null,usePropagation:!0,size:e.size?e.size:"20px",color:e.btColor?e.btColor:at("menu"),icon:e.icon?e.icon:e.horizontalButton?"more_horiz":"more_vert"}))):i.a.createElement(jt.a,{ref:c,"aria-controls":a?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){o((function(e){return!e})),!a&&e.onOpen&&e.onOpen(),a&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},i.a.createElement(xt,{count:e.count?e.count:null,usePropagation:!0,size:e.size?e.size:"20px",color:e.btColor?e.btColor:at("menu"),icon:e.icon?e.icon:e.horizontalButton?"more_horiz":"more_vert"}))),i.a.createElement(ln.a,{open:a,anchorEl:c.current,role:void 0,transition:!0,style:{zIndex:"100 !important"}},(function(t){var r=t.TransitionProps;t.placement;return i.a.createElement(on.a,Object.assign({},r,{style:{transformOrigin:"right center",zIndex:"100 !important"}}),i.a.createElement(cn.a,null,i.a.createElement(an.a,{onClickAway:l},i.a.createElement(hn.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 i.a.createElement(fn.a,{key:r,style:{color:t&&t.color?t.color:at("menu"),padding:"12px 7px"},onClick:function(r){e.forceStopPropagation||o(!1),e.onClose&&e.onClose(),t.onClick&&t.onClick(),r.preventDefault(),r.stopPropagation()},disabled:!!t.disabled},t.render?t.render:t.avatar?i.a.createElement(Kr.a,{alt:t.name,src:t.avatar||null,style:{width:e.size?e.size:"20px",height:e.size?e.size:"20px"}},t.name.substr(0,1)):i.a.createElement(St.a,{overlap:"rectangular",badgeContent:t.count?t.count:null,color:"secondary"},i.a.createElement(xt,{usePropagation:!0,icon:t.icon,style:{margin:"none !important"},color:t.iconColor?t.iconColor:t.color?t.color:at("menu")})),!t.render&&i.a.createElement("span",{style:{marginLeft:"7px"}},tt(t.name,1)))}))))))}))):i.a.createElement(i.a.Fragment,null)}));function vn(){vn=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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}Xe.a.defaults.headers.post["Content-Type"]="application/json; charset=UTF-9";var yn=Xe.a.create("true"===String("true")?{baseURL:"https://machen.azurewebsites.net/api"}:{baseURL:"http://localhost:7071/api"});Xe.a.defaults.withCredentials=!0,yn.interceptors.request.use(function(){var e=Object(Ne.a)(vn().mark((function e(t){var r;return vn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.headers["Content-Type"]="".concat(t.headers["Content-Type"]?"".concat(t.headers["Content-Type"]):"application/json","; charset=UTF-8;"),r=localStorage.getItem("TOKEN"),"null"!==String(r)&&""!==String(r)&&"undefined"!==String(r)&&(t.headers.Authorization="Bearer ".concat(r),t.headers.Accept="application/json;charset=UTF-8;application/x-www-form-urlencoded"),e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),yn.interceptors.response.use(function(){var e=Object(Ne.a)(vn().mark((function e(t){return vn().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 bn=yn;r(910);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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 _n=function(){var e=Object(Ne.a)(xn().mark((function e(t,r){var n,a,o,i,c,l=arguments;return xn().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(Ne.a)(xn().mark((function e(t,r){var n,o,l;return xn().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,Ze.post("upload/file/",i,{onUploadProgress:n});case 5:(o=e.sent)&&(c=o.data),e.next=13;break;case 9:return e.next=11,Ze.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 wn(){wn=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 En=function(){var e=Object(Ne.a)(wn().mark((function e(t,r){var n,a,o,i,c,l,s,u,d,p,f,m,g,v,y,b,x,_,w,E,j,k,S,L,C,I,F,T,N,A,D,P,z,$,M,B,Y;return wn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(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,v=void 0!==g&&g,y=r.templates,b=void 0!==y&&y,x=r.allStatus,_=void 0!==x&&x,w=r.search,E=void 0===w?"":w,j=r.completedDays,k=void 0===j?7:j,S=r.limit,L=void 0===S?0:S,C=r.skip,I=void 0===C?0:C,F=r.startDate,T=void 0===F?null:F,N=r.endDate,A=void 0===N?null:N,D=!!r.ignoreLoader,("search"===s||t.ignoreLoader)&&(D=!0),P=Ce.getState(),z=P.sessionLoads,$=Object(h.a)({},z.cards.load),M=Pe()("".concat(JSON.stringify(r))).toString(),!(Object.keys($).length>0&&$[M])){e.next=8;break}return e.abrupt("return",!0);case 8:return D||t.reduxFunction("ASYNC","SET_SESSION_LOADS",Object(h.a)(Object(h.a)({},Ce.getState().sessionLoads),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().sessionLoads.cards),{},{load:Object(h.a)(Object(h.a)({},Ce.getState().sessionLoads.cards.load),{},Object(O.a)({},M,D?"completed":"loading"))})})),B=(B=String(Ce.getState().session.dashboard.period).replace("$__last","")).replace("Days",""),e.next=13,new Promise(function(){var e=Object(Ne.a)(wn().mark((function e(r){var a,i,l;return wn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,bn.post("/Card_List/",Object(h.a)(Object(h.a)(Object(h.a)({idRel:n,adminView:o,load:s,completed:d,archived:v,templates:b,status:p,allStatus:_,limit:L,skip:I,startDate:T,endDate:A},d?{completedDays:k||B}:{}),E?{search:E}:{}),m?{deleted:!0}:{}));case 3:if(!(a=e.sent)||!a.data){e.next=10;break}return i=a.data,e.next=8,On(t,i);case 8:(l=e.sent)&&(t.reduxFunction("ASYNC","SET_SESSION_LOADS",Object(h.a)(Object(h.a)({},Ce.getState().sessionLoads),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().sessionLoads.cards),{},{load:Object(h.a)(Object(h.a)({},Ce.getState().sessionLoads.cards.load),{},Object(O.a)({},M,"completed"))})})),c&&c(),r({total:i.length,cards:l}));case 10:e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),console.log("loadCards::ERR::"),console.log(e.t0);case 16:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(t){return e.apply(this,arguments)}}());case 13:if(!(Y=e.sent)){e.next=17;break}return t.reduxFunction("ASYNC","preLoader",Object(h.a)(Object(h.a)({},Ce.getState().preLoader),{},{cards:!1})),e.abrupt("return",Y);case 17:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),On=function(){var e=Object(Ne.a)(wn().mark((function e(t){var r,n,a,o,i=arguments;return wn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:[],n=Ce.getState(),a=n.session,e.next=4,new Promise((function(e,t){var n={};r&&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(!Ce.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(O.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(O.a)({},i,Object(h.a)(Object(h.a)(Object(h.a)(Object(h.a)(Object(h.a)({},Ce.getState().db.cards[i]&&Ce.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(O.a)({},t.timer._id,Object(h.a)(Object(h.a)({},t.timer),{},{userId:a._id}))}:{}),t.parentPrivate?{private:!0}:{})))}o+1===r.filter((function(e){return e&&e.data&&e.data._id})).length&&e(n)})):e({})}));case 4:if(!(o=e.sent)){e.next=8;break}return t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),o)}),(function(){})),e.abrupt("return",o);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),jn=function(){var e=Object(Ne.a)(wn().mark((function e(t,r){var n,a,o,i,c,l,s,u=arguments;return wn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.length>2&&void 0!==u[2]&&u[2],a=u.length>3&&void 0!==u[3]?u[3]:null,o=u.length>4&&void 0!==u[4]?u[4]:"my",i=u.length>5&&void 0!==u[5]&&u[5],c=u.length>6?u[6]:void 0,l=u.length>7&&void 0!==u[7]&&u[7],e.next=8,En(t,{idRel:r,adminView:n,callback:a,cardLoad:o,completed:i,status:c,ignoreLoader:l});case 8:if(!(s=e.sent)){e.next=11;break}return e.abrupt("return",s);case 11:return e.abrupt("return",!1);case 12:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),kn=function(){var e=Object(Ne.a)(wn().mark((function e(t){var r,n,a=arguments;return wn().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(Ne.a)(wn().mark((function e(a,o){return wn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("/calendar"!==window.location.pathname){e.next=4;break}return e.next=3,En(t,{cardLoad:"calendar",iniDate:Be()().startOf("month").unix("x"),endDate:Be()().endOf("month").unix("x")});case 3:a(!0);case 4:if("/sp"!==window.location.pathname||36===n[0].length||"archived"!==n[1]){e.next=10;break}return e.next=7,En(t,{cardLoad:"plans",archived:!0});case 7:return e.next=9,En(t,{cardLoad:"plans",archived:!0,completed:!0,completedDays:r});case 9:a(!0);case 10:if("/sp"!==window.location.pathname||36===n[0].length||"completed"!==n[1]){e.next=14;break}return e.next=13,En(t,{cardLoad:"plans",completed:!0,completedDays:r});case 13:a(!0);case 14:if("/sp"!==window.location.pathname||36===n[0].length||"templates"!==n[1]){e.next=18;break}return e.next=17,En(t,{cardLoad:"templates",templates:!0});case 17:a(!0);case 18:if("/sp"!==window.location.pathname||36===n[0].length||"admin"!==n[1]){e.next=22;break}return e.next=21,En(t,{cardLoad:"plans",adminView:!0});case 21:a(!0);case 22:if("/sp"!==window.location.pathname||36===n[0].length||"deleted"!==n[1]){e.next=26;break}return e.next=25,En(t,{cardLoad:"plans",deleted:!0});case 25:a(!0);case 26:if("/d"!==window.location.pathname&&"/login"!==window.location.pathname&&"/"!==window.location.pathname||"dayTasks"===n[1]){e.next=34;break}return e.next=29,En(t,{cardLoad:"insights",limit:6,skip:0});case 29:return e.next=31,En(t,{cardLoad:"links",limit:6,skip:0});case 31:return e.next=33,En(t,{cardLoad:"dashboard"});case 33:a(!0);case 34:if("/d"!==window.location.pathname||"dayTasks"!==n[1]){e.next=38;break}return e.next=37,En(t,{adminView:!0,cardLoad:"myDay"});case 37:a(!0);case 38:if("/d"!==window.location.pathname||"ourTasks"!==n[1]){e.next=42;break}return e.next=41,En(t,{adminView:!0,cardLoad:"myDay"});case 41:a(!0);case 42:if("/sp"!==window.location.pathname||!n[0]||36!==n[0].length){e.next=48;break}return e.next=45,En(t,{idRel:n[0],cardLoad:"plan"});case 45:return e.next=47,En(t,{idRel:n[0],cardLoad:"plan",completed:!0,completedDays:r});case 47:a(!0);case 48:if("/sp"===window.location.pathname&&36!==n[0].length&&a(!0),"/sp"!==window.location.pathname||36===n[0].length||"archived"!==n[1]){e.next=52;break}return e.next=52,En(t,{cardLoad:"plans",archived:!0});case 52:if("/sp"!==window.location.pathname||36===n[0].length||"templates"!==n[1]){e.next=55;break}return e.next=55,En(t,{cardLoad:"templates"});case 55:if("/sp"===window.location.pathname&&36!==n[0].length&&"trash"===n[1]&&En(t,{cardLoad:"deletedPlans",deleted:!0,adminView:!!(Ce.getState().session._access&&Ce.getState().session._access.plan&&Ce.getState().session._access.planAdmin)}),"/library"!==window.location.pathname){e.next=60;break}return e.next=59,En(t,{cardLoad:"plans"});case 59:a(!0);case 60:if("/calendar"!==window.location.pathname){e.next=64;break}return e.next=63,En(t,{cardLoad:"calendar",startDate:null,endDate:null});case 63:a(!0);case 64:if("/p"!==window.location.pathname&&"/acc"!==window.location.pathname||a(!0),"/bright-and-connected"!==window.location.pathname){e.next=73;break}if("tab"!==n[0]||"radar"!==n[1]){e.next=69;break}return e.next=69,En(t,{cardLoad:"links",limit:9,skip:0});case 69:if("tab"!==n[0]||"insight-boards"!==n[1]){e.next=72;break}return e.next=72,En(t,{cardLoad:"insights",limit:9,skip:0});case 72:a(!0);case 73:if("/c"!==window.location.pathname){e.next=78;break}if("tab"!==n[0]||"users"===n[1]){e.next=77;break}return e.next=77,En(t,{cardLoad:"plans"});case 77:a(!0);case 78:if("/t"!==window.location.pathname){e.next=99;break}if(n[1]&&(!n[1]||"myTasks"!==n[1])){e.next=85;break}return e.next=82,En(t,{cardLoad:"myResponsible"});case 82:return e.next=84,En(t,{cardLoad:"myResponsible",completed:!0,completedDays:r});case 84:a(!0);case 85:if(!n[1]||"myDay"!==n[1]&&"ourDay"!==n[1]){e.next=89;break}return e.next=88,En(t,{cardLoad:"myDay",completed:!0,completedDays:r});case 88:a(!0);case 89:if(!n[1]||"myTasks"===n[1]||"myDay"===n[1]){e.next=99;break}return e.next=92,En(t,{cardLoad:"in"});case 92:return e.next=94,En(t,{cardLoad:"in",completed:!0,completedDays:r});case 94:return e.next=96,En(t,{cardLoad:"myResponsible"});case 96:return e.next=98,En(t,{cardLoad:"myResponsible",completed:!0,completedDays:r});case 98:a(!0);case 99:if("/tags"!==window.location.pathname){e.next=104;break}if(36!==n[0].length){e.next=103;break}return e.next=103,En(t,{cardLoad:"tags",idRel:n[0]});case 103:a(!0);case 104:"/calendar"===window.location.pathname&&a(!0),"/masterAdmin"!==window.location.pathname&&"/plataformAdministrator"!==window.location.pathname||a(!0),"/subscriptionUpgrade"===window.location.pathname&&a(!0),36!==n[0].length||!Ce.getState().db.cards||Ce.getState().db.cards[n[0]]&&!Ce.getState().db.cards[n[0]]||Ce.getState().db.cards&&Ce.getState().db.cards[n[0]]&&n[0]&&!Ce.getState().db.cards[n[0]]._loadedFeeds&&"bright-and-connected"===n[1]&&a(!0);case 108:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}());case 5:if(!e.sent){e.next=8;break}return e.abrupt("return",!0);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Sn=r(1687);function Ln(){Ln=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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(Ne.a)(Ln().mark((function e(t){var r,n,a,o,i,c,l,s,u=arguments;return Ln().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)({},Ce.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,An(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,Dn(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(Ce.getState().db.cards).filter((function(e){return(Ce.getState().db.cards[e]._planId===a[0]||Ce.getState().db.cards[e]._parent===a[0])&&!0===Ce.getState().db.cards[e]._selected})).length>0)){e.next=27;break}return e.next=27,Nn(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)}}(),In=function(){var e=Object(Ne.a)(Ln().mark((function e(t,r){var n;return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t&&t.store&&Ce.getState().functions&&Ce.getState().functions.socket,Ce.getState().functions.socket,e.next=3,Ze.post("timer/start",{idRel:r,startTime:Be()().unix("X")});case 3:if(!(n=e.sent)){e.next=6;break}return e.abrupt("return",n.data);case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Fn=function(){var e=Object(Ne.a)(Ln().mark((function e(t,r){var n;return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t&&t.store&&Ce.getState().functions&&Ce.getState().functions.socket,Ce.getState().functions.socket,e.next=3,Ze.put("timer/stop",{idRel:r});case 3:if(!(n=e.sent)){e.next=6;break}return e.abrupt("return",n.data);case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Tn=function(){var e=Object(Ne.a)(Ln().mark((function e(t,r,n){var a,o;return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t&&t.store&&Ce.getState().functions&&Ce.getState().functions.socket,Ce.getState().functions.socket,e.next=3,Ze.delete("timer/run/".concat(n),{idRel:r});case 3:if(a=e.sent,(o=Ce.getState().db.cards[r]._kpiTimer)[n]&&delete o[n],!a){e.next=9;break}return t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},r,Object(h.a)(Object(h.a)({},Ce.getState().db.cards[r]),{},{_kpiTimer:o})))})),e.abrupt("return",!0);case 9:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),Nn=function(){var e=Object(Ne.a)(Ln().mark((function e(t){var r,n,a;return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=window.location.hash.split("/"))[0]=r[0].replace("#",""),n=Object.keys(Ce.getState().db.cards).filter((function(e){if((Ce.getState().db.cards[e]._planId===r[0]||Ce.getState().db.cards[e]._parent===r[0])&&!0===Ce.getState().db.cards[e]._selected&&Ce.getState().db.cards[e].type&&Ce.getState().db.cards[e].type.indexOf("guideline")>-1)return!0}))[0],a=Object.keys(Ce.getState().db.cards).filter((function(e){return(Ce.getState().db.cards[e]._planId===r[0]||Ce.getState().db.cards[e]._parent===r[0])&&!0===Ce.getState().db.cards[e]._selected&&Ce.getState().db.cards[e].type&&-1===Ce.getState().db.cards[e].type.indexOf("guideline")})),Ze.put("matrix/aspects",{_id:n,_parent:r[0],aspects:a}),t&&t.reduxFunction&&t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},n,Object(h.a)(Object(h.a)({},Ce.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)}}(),An=function(){var e=Object(Ne.a)(Ln().mark((function e(t,r,n){var a,o,i,c,l,s,u,d,p=arguments;return Ln().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&&Ce.getState().functions&&Ce.getState().functions.socket,Ce.getState().functions.socket),Ce.getState().db.dataType,i=Ce.getState(),c=i.session,l=i.db,(s=window.location.hash.split("/"))[0]=s[0].replace("#",""),u=new Promise(function(){var e=Object(Ne.a)(Ln().mark((function e(i,u){return Ln().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(Ne.a)(Ln().mark((function e(o){return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r._users=Object(O.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,Nn(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)({},Ce.getState().sideModule),{},{id:o.id,data:Object(h.a)(Object(h.a)(Object(h.a)({},Ce.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)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},r._id,Object(h.a)(Object(h.a)({},r),{},{created_at:Be()().tz("America/Sao_Paulo").unix("x"),updated_at:{low:Be()().tz("America/Sao_Paulo").unix("x")}})))})),Pn(t,r._id,Object(O.a)({},o.log._id,Object(h.a)(Object(h.a)({},o.log),{},{_parent:r._id}))),n?Dn(t,Object(h.a)({},r),n,a):"tab"===s[0]&&"myDay"===s[1]&&(Wn(t,{_id:o.id,userId:c._id,option:!0},{new:!0,user:c._id,cardId:r._id,cardData:Object(h.a)({},r)}),Pn(t,r._id,Object(O.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:Be()().tz("America/Sao_Paulo").unix("x"),updated_at:{low:Be()().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)}}(),Dn=function(){var e=Object(Ne.a)(Ln().mark((function e(t,r,n){var a,o,i;return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=Object(h.a)({},r),i=(t&&t.store&&Ce.getState().functions&&Ce.getState().functions.socket,Ce.getState().functions.socket),!n){e.next=7;break}return e.next=5,_n(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)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},a._id,Object(h.a)(Object(h.a)(Object(h.a)({},Ce.getState().db.cards[a._id]),a),{},{_users:Object(h.a)({},Ce.getState().db.cards[a._id]._users)})))})),i.emit("data",{module:"cards",method:"put",action:"update220527"},a,function(){var e=Object(Ne.a)(Ln().mark((function e(r){var n,o;return Ln().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&&Pn(t,a._id,Object(O.a)({},r.log._id,Object(h.a)(Object(h.a)({},r.log),{},{_parent:[a._id]}))),n=Ce.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,Nn(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)}}(),Pn=function(e,t,r){var n=Ce.getState().timeline[t]?Ce.getState().timeline[t]:{};n=Object(h.a)(Object(h.a)({},n),r),e.reduxFunction("ASYNC","SET_TIMELINE",Object(h.a)(Object(h.a)({},Ce.getState().timeline),{},Object(O.a)({},t,n)))},zn=function(){var e=Object(Ne.a)(Ln().mark((function e(t,r){return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t&&t.store&&Ce.getState().functions&&Ce.getState().functions.socket,Ce.getState().functions.socket).emit("data",{module:"cards",method:"put",action:"restore"},{_id:r._id},function(){var e=Object(Ne.a)(Ln().mark((function e(n){return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Mn(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)}}(),$n=function(){var e=Object(Ne.a)(Ln().mark((function e(t,r,n){var a,o,i,c=arguments;return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=c.length>3&&void 0!==c[3]&&c[3],o=Ce.getState(),i=o.db,n?Mn(t,{cardId:r._id,childrens:r.childrensDelete},!0):(t&&t.store&&Ce.getState().functions&&Ce.getState().functions.socket,Ce.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(Ne.a)(Ln().mark((function e(n){return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Mn(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)}}(),Mn=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=Object(h.a)({},Ce.getState().db.cards);if(n[t.cardId]=Object(h.a)(Object(h.a)({},n[t.cardId]),{},{deleted:r},n[t.cardId]&&n[t.cardId]._selected?{_selected:!1}:{}),t.childrens){var a=na(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)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),n)}))},Bn=function(){var e=Object(Ne.a)(Ln().mark((function e(t,r){var n,a;return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise(function(){var e=Object(Ne.a)(Ln().mark((function e(n,a){var o;return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Ce.getState().db.cards[r.cardId]){e.next=7;break}return e.next=3,En(t,{idRel:r.cardId,cardLoad:"fullCatenation",ignoreLoader:!0});case 3:(o=e.sent)&&o.cards&&o.cards[r.cardId]&&n(o.cards[r.cardId]),e.next=8;break;case 7:n(Ce.getState().db.cards[r.cardId]);case 8:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}());case 2:(n=e.sent)&&(a=Ce.getState().db.tag,Ce.getState().db.cards&&n&&(r.cardData&&r.cardData._tags&&r.cardData._tags.length>0&&r.cardData._tags.map((function(e){n&&n._tags&&0===n._tags.filter((function(t){return t.value===e.value})).length&&a.filter((function(t){return t.value===e.value})).map((function(e){e.count=e.count+1}))})),n._tags&&n._tags.map((function(e){r.cardData._tags&&0===r.cardData._tags.filter((function(t){return t.value===e.value})).length&&a.filter((function(t){return t.value===e.value})).map((function(e){e.count=e.count-1}))}))),(!r.new||r.new&&r.user!==X._id)&&t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},r.cardId,Object(h.a)(Object(h.a)(Object(h.a)({},n||{}),r.cardData),{},{_notifications:Ce.getState().db.cards&&n&&n._notifications?n._notifications:{comment:0,log:0,timer:0,kpi:0},createdBy:r.user?r.user:null}))),tag:a})));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Yn=function(){var e=Object(Ne.a)(Ln().mark((function e(t,r){return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},r._id,Object(h.a)(Object(h.a)({},Ce.getState().db.cards[r._id]?Ce.getState().db.cards[r._id]:{}),r)))}));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Gn=function(){var e=Object(Ne.a)(Ln().mark((function e(t,r){var n,a,o,i,c,l;return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Ce.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(O.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)({},Ce.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)}}(),Rn=function(){var e=Object(Ne.a)(Ln().mark((function e(t,r,n){var a;return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=Be()().tz("America/Sao_Paulo").unix("x"),t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},r._id,Object(h.a)(Object(h.a)(Object(h.a)({},n&&n.data?n.data:{}),Ce.getState().db.cards[r._id]),{},{_users:Object(h.a)(Object(h.a)(Object(h.a)({},Ce.getState().db.cards[r._id]&&Ce.getState().db.cards[r._id]._users?Ce.getState().db.cards[r._id]._users:{}),n&&n.data&&n.data._users?n.data._users:{}),{},Object(O.a)({},r.userId,Object(h.a)(Object(h.a)(Object(h.a)({},Ce.getState().db.cards[r._id]&&Ce.getState().db.cards[r._id]._users&&Ce.getState().db.cards[r._id]._users[r.userId]?Ce.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)}}(),Hn=function(){var e=Object(Ne.a)(Ln().mark((function e(t,r){return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},r._id,Object(h.a)(Object(h.a)({},Ce.getState().db.cards[r._id]),{},{_users:Object(h.a)(Object(h.a)({},Ce.getState().db.cards[r._id]&&Ce.getState().db.cards[r._id]._users?Ce.getState().db.cards[r._id]._users:{}),{},Object(O.a)({},r.userId,Object(h.a)(Object(h.a)({},Ce.getState().db.cards[r._id]&&Ce.getState().db.cards[r._id]._users&&Ce.getState().db.cards[r._id]._users[r.userId]?Ce.getState().db.cards[r._id]._users[r.userId]:{}),{},{myDay:r.option?r.createDate:null})))})))}));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Wn=function(){var e=Object(Ne.a)(Ln().mark((function e(t,r,n){var a;return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=Be()().unix("x"),Rn(t,r,n),(t&&t.store&&Ce.getState().functions&&Ce.getState().functions.socket,Ce.getState().functions.socket).emit("data",{module:"cards",method:"post",action:"setMyDay"},Object(h.a)(Object(h.a)({},r),{},{createDate:a})),Ce.getState().sideModule.id&&Ce.getState().sideModule.id===r._id&&t.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},Ce.getState().sideModule),{},{data:Object(h.a)(Object(h.a)({},Ce.getState().sideModule.data?Ce.getState().sideModule.data:{}),{},{_users:Object(h.a)(Object(h.a)({},Ce.getState().db.cards[r._id]&&Ce.getState().db.cards[r._id]._users?Ce.getState().db.cards[r._id]._users:{}),{},Object(O.a)({},r.userId,Object(h.a)(Object(h.a)({},Ce.getState().db.cards[r._id]&&Ce.getState().db.cards[r._id]._users&&Ce.getState().db.cards[r._id]._users[r.userId]?Ce.getState().db.cards[r._id]._users[r.userId]:{}),{},{myDay:r.option?a:null})))})}));case 5:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),Un=function(){var e=Object(Ne.a)(Ln().mark((function e(t,r){return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Ze.put("/cards/moveTo",Object(h.a)({},r));case 3:if(!e.sent){e.next=7;break}return Vn(t,r),e.abrupt("return",!0);case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),it({message:"".concat(tt("$__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)}}(),Vn=function(){var e=Object(Ne.a)(Ln().mark((function e(t,r){var n;return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Ce.getState().db.cards,e.next=3,new Promise(function(){var e=Object(Ne.a)(Ln().mark((function e(t,a){var o;return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ia(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)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),n)})));case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),qn=function(){var e=Object(Ne.a)(Ln().mark((function e(t,r){var n,a,o,i;return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Ce.getState().db.cards[r.cardId]){e.next=7;break}return e.next=3,En(t,{idRel:r.cardId,cardLoad:"fullCatenation",ignoreLoader:!0});case 3:(n=e.sent)&&(a=Ce.getState().db.cards[r.cardId]&&Ce.getState().db.cards[r.cardId]._users?Ce.getState().db.cards[r.cardId]._users:{},r.isResponsible&&Object.keys(a).map((function(e){e!==r.userId&&(a[e].isResponsible=null)})),o=Ce.getState().db.cards[r.cardId]?Ce.getState().db.cards[r.cardId]:{},n&&n.cards&&n.cards[r.cardId]&&(o=n.cards[r.cardId]),t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},r.cardId,Object(h.a)(Object(h.a)({},o),{},{_users:Object(h.a)(Object(h.a)({},a),{},Object(O.a)({},r.userId,Object(h.a)(Object(h.a)(Object(h.a)(Object(h.a)(Object(h.a)({},r.userData?r.userData:{}),Ce.getState().db.users[r.userId]?Ce.getState().db.users[r.userId]:{}),o&&o._users&&o._users[r.userId]?o._users[r.userId]:{}),r.isResponsible?{isResponsible:!0}:{}),r.access?{access:r.access}:{})))})))}))),e.next=10;break;case 7:i=Ce.getState().db.cards[r.cardId]&&Ce.getState().db.cards[r.cardId]._users?Ce.getState().db.cards[r.cardId]._users:{},r.isResponsible&&Object.keys(i).map((function(e){e!==r.userId&&(i[e].isResponsible=null)})),t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},r.cardId,Object(h.a)(Object(h.a)({},Ce.getState().db.cards[r.cardId]?Ce.getState().db.cards[r.cardId]:{}),{},{_users:Object(h.a)(Object(h.a)({},i),{},Object(O.a)({},r.userId,Object(h.a)(Object(h.a)(Object(h.a)(Object(h.a)(Object(h.a)({},Ce.getState().db.cards[r.cardId]&&Ce.getState().db.cards[r.cardId]._users&&Ce.getState().db.cards[r.cardId]._users[r.userId]?Ce.getState().db.cards[r.cardId]._users[r.userId]:{}),i[r.userId]?i[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)}}(),Xn=function(){var e=Object(Ne.a)(Ln().mark((function e(t,r){return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ze.put("cards/unlinkChildrens",{cardId:r.cardId,planId:r._planId});case 2:e.sent&&(t&&t.store&&Ce.getState().functions&&Ce.getState().functions.socket,Ce.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)}}(),Kn=function(){var e=Object(Ne.a)(Ln().mark((function e(t,r){var n;return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Ce.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)({},Ce.getState().db),{},{cards:n}));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Jn=function e(t,r){var n=t.color||null,a=!(!t.color||!r);if(t._parent&&Ce.getState().db.cards[t._parent]){var o=e(Ce.getState().db.cards[t._parent],!0);if(o.color)return o}return{parent:a,color:n}},Zn=function(){var e=Object(Ne.a)(Ln().mark((function e(t){var r,n,a,o,i;return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Ce.getState(),n=r.db,a=r.session,o=Ce.getState().db.cards[t],!Ce.getState().db.cards[t]){e.next=18;break}if(i={},(!Ce.getState().db.cards[t].private||Ce.getState().db.cards[t].private&&Ce.getState().db.cards[t]._users&&Ce.getState().db.cards[t]._users[a._id])&&(i=Object(O.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,Zn(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)}}(),Qn=function(){var e=Object(Ne.a)(Ln().mark((function e(t,r){return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t&&t.store&&Ce.getState().functions&&Ce.getState().functions.socket,Ce.getState().functions.socket).emit("data",{module:"cards",method:"put",action:"link"},r,function(){var e=Object(Ne.a)(Ln().mark((function e(t){return Ln().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)}}(),ea=function(e){var t=Ce.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},ta=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Ce.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:{}),r&&r.onlyCard?{}:Object(h.a)({},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(O.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(O.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(O.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{}},ra=function(){var e=Object(Ne.a)(Ln().mark((function e(t,r,n){var a,o;return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=new Promise(function(){var e=Object(Ne.a)(Ln().mark((function e(t,a){return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ze.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)}}(),na=function e(t){var r=Ce.getState().db.cards,n=Object(O.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},aa=function(){var e=Object(Ne.a)(Ln().mark((function e(t,r){var n,a,o,i;return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.data&&t.data._id?Ce.getState().db.cards[t.data._id]:{},a=(t&&t.store&&Ce.getState().functions&&Ce.getState().functions.socket,Ce.getState().functions.socket),i=o=r,"completed"===o.status?i=Object(h.a)(Object(h.a)({},i),{},{completed_at:{low:Be()().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(Ne.a)(Ln().mark((function e(){return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},n._id,Object(h.a)(Object(h.a)({},Ce.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)}}(),oa=function(){var e=Object(Ne.a)(Ln().mark((function e(t,r){var n,a,o,i;return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.data&&t.data._id?Ce.getState().db.cards[t.data._id]:{},a=(t&&t.store&&Ce.getState().functions&&Ce.getState().functions.socket,Ce.getState().functions.socket),i=o=r,"completed"===o.status?i=Object(h.a)(Object(h.a)({},i),{},{completed_at:{low:Be()().unix("X")}}):o.status&&(i=Object(h.a)(Object(h.a)({},i),{},{completed_at:{low:null}})),t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},n._id,Object(h.a)(Object(h.a)({},Ce.getState().db.cards[n._id]),i)))}));try{a.emit("data",{module:"cards",method:"put",action:"update220527"},Object(h.a)({_id:n._id},o))}catch(c){console.log(c)}case 7:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),ia=function(){var e=Object(Ne.a)(Ln().mark((function e(t){var r,n,a,o,i,c=arguments;return Ln().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=Ce.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(Ne.a)(Ln().mark((function n(a,c){var l;return Ln().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,ia(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)}}(),ca=function(){var e=Object(Ne.a)(Ln().mark((function e(t,r,n){var a,o;return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ia(r,n);case 2:a=e.sent,o=Ce.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:Be()().unix("X")}:null},"completed"===n?{_parentCompleted:{cardId:r,completed_at:{low:Be()().unix("X")}}}:{_parentCompleted:null})})),o[r]=Object(h.a)(Object(h.a)({},o[r]),{},{status:n,completed_at:"completed"===n?{low:Be()().unix("X")}:null}),t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:o}));case 7:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),la=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=Ce.getState(),n=r.session,a=Ce.getState().db.cards[e]&&Ce.getState().db.cards[e]._notifications?Ce.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),Ce.getState().db.cards[e]&&Ce.getState().db.cards[e]._users&&Ce.getState().db.cards[e]._users[n._id]&&Ce.getState().timeline[e]&&parseInt(a[r])<Object.keys(Ce.getState().timeline[e]).filter((function(t){return Ce.getState().timeline[e][t]&&Ce.getState().timeline[e][t].type&&Ce.getState().timeline[e][t].type===r})).length?(a[r]=Ce.getState().timeline&&Ce.getState().timeline[e]&&Object.keys(Ce.getState().timeline[e]).length>0?Object.keys(Ce.getState().timeline[e]).filter((function(t){if(n&&n._id&&parseInt(Ce.getState().timeline[e][t].created_at)>1650666142&&Ce.getState().timeline[e][t].type===r&&Ce.getState().timeline[e][t].user&&Ce.getState().timeline[e][t].user._id!==n._id&&(!Ce.getState().timeline[e][t].readedBy||Ce.getState().timeline[e][t].readedBy&&!Ce.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})},sa=Object(_t.a)((function(e){return{iconButtonStyle:{margin:0,marginTop:"-8px",backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));var ua=Object(Fe.b)((function(e,t){return{cards:e.db.cards[t.nodeId],timeline:e.timeline[t.nodeId]}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=sa();i.a.useEffect((function(){return function(){}}),[]);var r=la(e.nodeId);return r.total<1?i.a.createElement(i.a.Fragment,null):i.a.createElement("div",{id:"notificationsBt",style:{top:0,zIndex:3}},i.a.createElement(Ct,{className:t.iconButtonStyle,badgeContent:r.total,color:at("menu"),icon:0===r.total?"notifications_none":"notifications_active",size:"17px",transparent:!0}))})),da=r(942),pa=r(911),fa=r.n(pa);function ha(){ha=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 ma=["$__last7Days","$__last15Days","$__last30Days","$__last60Days","$__last90Days","$__last180Days","$__last365Days"];var ga=Object(Fe.b)((function(e){return{store:{session:e.session}}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState().session,r=i.a.useState(null),n=Object(Ae.a)(r,2),a=n[0],o=n[1],c=Boolean(a),l=function(){var t=Object(Ne.a)(ha().mark((function t(r){var n;return ha().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o(null),"string"!==typeof r){t.next=7;break}return e.reduxFunction("ASYNC","SET_SESSION",Object(h.a)(Object(h.a)({},Ce.getState().session),{},{period:r,dashboard:Object(h.a)(Object(h.a)({},Ce.getState().session),{},{period:r})})),n=(n=String(r).replace("$__last","")).replace("Days",""),t.next=7,kn(e,n);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return i.a.createElement("div",null,i.a.createElement(jt.a,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:function(e){o(e.currentTarget)},style:Object(h.a)({},e.style?e.style:{})},i.a.createElement(fa.a,null)),i.a.createElement(da.a,{id:"long-menu",anchorEl:a,keepMounted:!0,open:c,onClose:l,PaperProps:{style:{maxHeight:216,width:"20ch"}}},ma.map((function(e){return i.a.createElement(fn.a,{key:e,selected:e===t.dashboard.period,onClick:function(t){return l(e)}},tt(e,1))}))))})),va=r(1656),ya=Object(We.a)({root:Object(h.a)(Object(h.a)({},Ut),{},{color:at("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:at("mediumText"),marginTop:"standard"===at("fieldVariant")||"filled"===at("fieldVariant")?"-10px":0},"& label.Mui-focused":{color:at("mediumText"),marginTop:"standard"===at("fieldVariant")||"filled"===at("fieldVariant")?"-10px":0},"& .MuiInput-underline:after":{borderBottomColor:at("line")},"& .MuiOutlinedInput-root":{borderRadius:at("fieldRadius"),"& fieldset":{borderColor:at("line")},"&.Mui-focused fieldset":{borderColor:at("line")}},"& .MuiFilledInput-root":{borderRadius:at("fieldRadius"),"& fieldset":{borderColor:at("line")},"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")},"&.Mui-focused":{borderBottomColor:at("line"),"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===at("fieldVariant")?0:"filled"===at("fieldVariant")?"-15px":0,borderRadius:at("fieldRadius"),"& fieldset":{borderColor:at("line")},"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")},"&.Mui-focused":{borderBottomColor:at("line"),"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")}}}})})(va.a);function ba(){ba=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 xa=Object(_t.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:at("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:at("color"),fontWeight:"500",alignItems:"center"}},iconButtonStyle:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"},padding:"3px"}}}));var _a=function(e){var t=Ce.getState(),r=t.session,n=t.functions,a=t.db,o=n.socket,c=xa(),l=i.a.useState(!1),s=Object(Ae.a)(l,2),u=(s[0],s[1],i.a.useState(e.title?e.title.trim():null)),d=Object(Ae.a)(u,2),p=d[0],m=d[1],g=i.a.useState(!1),v=Object(Ae.a)(g,2),y=v[0],b=v[1],x=i.a.useState(!1),_=Object(Ae.a)(x,2),w=_[0],E=_[1];i.a.useEffect((function(){return function(){}}),[]),i.a.useEffect((function(){"0"===String(e.unlockedPrivates)&&w&&E(!1)}),[e.unlockedPrivates]),i.a.useEffect((function(){!e.title&&e.editable&&b(!0)}),[e.title]);var O=function(){var t=Object(Ne.a)(ba().mark((function t(r){return ba().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:try{e._id&&o.emit("data",{module:"node",method:"put",action:"update",noLog:!0},Object(h.a)({_id:e._id},r)),e.onEdit&&e.onEdit(p,e._id?e._id:null)}catch(n){console.log(n)}b(!1);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return i.a.createElement("div",{className:c.header,style:Object(h.a)({minHeight:e.style&&e.style.minHeight?e.style.minHeight:"30px"},e.style)},i.a.createElement("div",{className:!e.onExpanding||y?c.content:c.contentWithExpand},i.a.createElement("div",{className:c.info},!e.private||Ce.getState().controls.lockPrivate||w?i.a.createElement(i.a.Fragment,null,e.icon&&i.a.createElement("div",{className:c.headerIcon,style:{color:e.color?e.color:at("color")}},i.a.createElement(Ur,{overlap:"rectangular",size:"calc(".concat(e.fontSize," + 4px)")||!1,icon:e.icon,color:"parent",title:e.iconTitle?e.iconTitle.substring(0,1).toUpperCase().concat(e.iconTitle.substring(1)):""})),e.searchText?i.a.createElement("div",{style:Object(h.a)({marginLeft:"7px"},e.searchTextStyle?e.searchTextStyle:{})},dt(e.title?e.title:"",e.searchText,!!e.dark)):i.a.createElement("div",{className:c.headerTitle,style:Object(h.a)({fontSize:e.fontSize?e.fontSize:"14px",color:e.color?e.color:at("color"),marginLeft:e.icon?"7px":"none"},e.textStyle?e.textStyle:{})},y?i.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()}},i.a.createElement(ya,{style:{width:"calc(100% - 60px)"},label:e.fieldName?e.fieldName:tt("$__nameOfCard",1),variant:at("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){m(e.target.value)},onKeyDown:function(t){13===t.keyCode&&p&&O({name:p}),27===t.keyCode&&(b(!1),m(e.value?e.value:e.title?e.title.trim():""))}},value:p,placeholder:tt("$__titleOfCard_placeholder",1),autoFocus:!e.noAutoFocus,multiline:!!e.multiline}),i.a.createElement(Ur,{color:at("medium"),onClick:function(){return y?b(!1):e.onCancel()},icon:"cancel",title:tt("$__close","*"),size:e.actionsSize||"25px"}),i.a.createElement(Ur,{overlap:"rectangular",color:"green",icon:"save",onClick:function(){y?O({name:p}):e.onSave()},title:tt("$__save"," * "),size:e.actionsSize||"25px"})):i.a.createElement(Ue.a,{title:e.title?e.title:""},i.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&&(m(e.value?e.value:e.title?e.title.trim():""),b(!0))}},"".concat(e.showOrder?"".concat(e.showOrder,". "):"").concat(e.title&&e.title.indexOf("$__")>-1?tt(e.title,1):e.title?function(e){var t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}(e.title):""))))):i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:c.headerIcon,style:{color:"lightgray"}},i.a.createElement(Ur,{overlap:"rectangular",size:"calc(".concat(e.fontSize," + 4px)")||!1,icon:"private_connectivity",color:"parent",title:e.iconTitle?e.iconTitle.substring(0,1).toUpperCase().concat(e.iconTitle.substring(1)):""})),i.a.createElement("div",{style:{marginLeft:"7px",fontSize:12,color:"lightgray"}},e.privateTitle?e.privateTitle:tt("$__privateActivity")))),e.periodFilter&&r&&r.period&&i.a.createElement("div",{style:{position:"absolute",right:0,textAlign:"right",color:"#FFFFFF",display:"flex",alignItems:"center",whiteSpace:"nowrap"}},tt(r.period),i.a.createElement(ga,{style:{color:"#FFFFFF",height:"20px",width:"20px"}}))),!y&&i.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&&i.a.createElement(ua,{nodeId:e._id}),e.moreButton&&i.a.createElement("div",{style:{position:"absolute",top:0,right:0,display:"flex",alignItems:"center"},onClick:function(e){e.stopPropagation()}},!e.private||Ce.getState().controls.lockPrivate||w?i.a.createElement(i.a.Fragment,null,e.colorPicker&&i.a.createElement("div",{style:{zIndex:1e3}},i.a.createElement(un,{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&&i.a.createElement(Ue.a,{title:tt(e.options.filter((function(e){if(e&&e.name&&("$__removeSelection"===e.name||"$__selectThis"===e.name))return!0}))[0].name)},i.a.createElement(jt.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},i.a.createElement(xt,{size:"22px",color:at("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&&i.a.createElement(Ue.a,{title:tt(e.isExpanded?"$__collapse":"$__expand")},i.a.createElement(jt.a,{onClick:function(t){e.onExpanding()},className:c.iconButtonStyle},i.a.createElement(xt,{size:"22px",color:at("menu"),icon:e.isExpanded?"expand_less":"expand_more",usePropagation:!0}))),e.options&&e.options.length>0&&i.a.createElement(gn,Object.assign({noButton:!0,options:[].concat(Object(f.a)(e.options),Object(f.a)(e.private&&w?[{color:"lightblue",icon:"lock",name:"$__lockThisPrivateCard",onClick:function(){E((function(e){return!e})),e.setPrivate&&e.setPrivate(!w)},show:"hover"}]:[]))},e.optionsProps?e.optionsProps:{}))):i.a.createElement(i.a.Fragment,null,i.a.createElement(Ct,{title:tt("$__showPrivateActivity","*"),color:"lightGray",icon:"lock_open",onClick:function(){E((function(e){return!e})),e.setPrivate&&e.setPrivate(!w)},size:"21px",style:{padding:"0px !important"}})))))},wa=r(261),Ea=r.n(wa),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(586);function ja(){ja=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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(587);var ka=Object(Fe.b)((function(e){return{}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Oa)((function(e){var t=e.classes,r=Ce.getState().functions.socket,n=i.a.useState(!1),a=Object(Ae.a)(n,2),o=(a[0],a[1]),c=i.a.useState(""),l=Object(Ae.a)(c,2),s=l[0],u=l[1],d=i.a.useState(0),p=Object(Ae.a)(d,2),f=p[0],m=p[1],g=e.timer||{},v=e.data||{},y=function(){var e=Object(Ne.a)(ja().mark((function e(t,r){var n;return ja().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o(!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(!v)return null;var b=function(){var t=Object(Ne.a)(ja().mark((function t(){var n,a;return ja().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.timer||s?(n=isNaN(f)?f.replace(",","."):f,a={_id:Object(Sn.a)(),cardId:v._id,idRel:v._id,value:e.PositiveValue?n:"-".concat(n),type:"kpi",kpi_type:v.kpi_type?v.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&&Tn(e,v._id,g._id),m(0),u("")):it({message:tt("$__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?i.a.createElement("div",{className:t.dataSave},i.a.createElement("fieldset",null,i.a.createElement("legend",{style:{color:at("color")}},tt("$__new",1)),!e.timer&&i.a.createElement(ya,{placeholder:tt("$__value",1),value:lt(f||0,"time"===v.kpi_type?"number":v.kpi_type,v.kpi_currency?v.kpi_currency:null),InputLabelProps:{shrink:!0},InputProps:{onKeyDown:function(e){y(e,"ini")}}}),i.a.createElement(ya,{multiline:!0,placeholder:tt("$__description",1),onChange:function(e){return u(e.target.value)},value:s,InputProps:{autoComplete:"new-password"}}),i.a.createElement("div",{style:{display:"flex",textAlign:"right"}},i.a.createElement(Ct,{title:tt("$__save",1),color:"green",icon:"save",onClick:function(){return b()},size:"25px",transparent:!0}),(!e.timer||e.manualAdd)&&i.a.createElement(Ct,{title:tt("$__cancel",1),color:"lightgrey",icon:"cancel",onClick:function(){e.callBack&&e.callBack()},size:"25px",transparent:!0})))):i.a.createElement("div",null,"NO DATA RECEIVED")}))),Sa=r(1657);function La(){La=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Ca=function(){var e=Object(Ne.a)(La().mark((function e(t){var r,n,a,o,i,c,l,s;return La().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(t&&t.store&&Ce.getState().functions&&Ce.getState().functions.socket,Ce.getState().functions.socket),n=Ce.getState(),a=n.sideModule,o=a.data,i=Ce.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(Ne.a)(La().mark((function e(n){var a;return La().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,_n(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)({},Ce.getState().sideModule),{},{id:n.id,data:Object(h.a)(Object(h.a)({},Ce.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,_n(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(Ne.a)(La().mark((function e(t){return La().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)}}(),Ia=function(){var e=Object(Ne.a)(La().mark((function e(t){var r,n,a,o;return La().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(t&&t.store&&Ce.getState().functions&&Ce.getState().functions.socket,Ce.getState().functions.socket),n=Ce.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(Ne.a)(La().mark((function e(t){return La().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.emit("user.ACCESS",Object(O.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)}}(),Fa=function(e,t){var r=Object(h.a)({},t[t._id]?t[t._id]:{});Ce.getState().db.users[t._id]&&(r=Object(h.a)(Object(h.a)({},Ce.getState().db.users[t._id]),r)),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{users:Object(h.a)(Object(h.a)({},Ce.getState().db.users),{},Object(O.a)({},t._id,Object(h.a)({},r)))}))};function Ta(e){return Na.apply(this,arguments)}function Na(){return(Na=Object(Ne.a)(La().mark((function e(t){var r;return La().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Ce.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,bn.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 Aa(e){return Da.apply(this,arguments)}function Da(){return(Da=Object(Ne.a)(La().mark((function e(t){return La().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,bn.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 Pa(e,t){return za.apply(this,arguments)}function za(){return(za=Object(Ne.a)(La().mark((function e(t,r){return La().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Ze.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 $a(e,t){return Ma.apply(this,arguments)}function Ma(){return(Ma=Object(Ne.a)(La().mark((function e(t,r){return La().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Ze.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 Ba=function(e,t,r,n){var a;a=(e&&e.store&&Ce.getState().functions&&Ce.getState().functions.socket,Ce.getState().functions.socket);var o=Ce.getState().db;return qn(e,{cardId:n,userId:t,access:r,userData:{name:Ce.getState().db.users[t].name,displayName:Ce.getState().db.users[t].displayName?Ce.getState().db.users[t].displayName:null,image:Ce.getState().db.users[t].image?Ce.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:Ce.getState().db.users[t].name,displayName:Ce.getState().db.users[t].displayName?Ce.getState().db.users[t].displayName:null,image:Ce.getState().db.users[t].image?Ce.getState().db.users[t].image:null}},function(){var e=Object(Ne.a)(La().mark((function e(t){return La().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},Ya=function(){var e=Object(Ne.a)(La().mark((function e(t,r){var n,a,o;return La().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(t&&t.store&&Ce.getState().functions&&Ce.getState().functions.socket,Ce.getState().functions.socket),a=Ce.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(Ne.a)(La().mark((function e(t){return La().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 Ga(){Ga=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Ra=Object(_t.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 Ha=Object(Fe.b)((function(e){return{store:e}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ra(),r=i.a.useState(!1),n=Object(Ae.a)(r,2),a=n[0],o=n[1],c=i.a.useRef(null),l=e.data,s=Ce.getState(),u=s.db,d=s.session,p=s.functions,f=s.sideModule,m=(p.socket,i.a.useState([])),g=Object(Ae.a)(m,2),v=g[0],y=(g[1],i.a.useState(0)),b=Object(Ae.a)(y,2),x=(b[0],b[1],i.a.useState(e.selected?e.selected:[])),_=Object(Ae.a)(x,2),w=_[0],E=_[1],j=e.admins?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=Ce.getState(),n=r.db,a={};if(Object.keys(n.users).filter((function(e){return!n.users[e]._parent&&n.users[e]._access&&n.users[e]._access.admin})).map((function(e){a=Object(h.a)(Object(h.a)({},a),{},Object(O.a)({},e,n.users[e]))})),console.log(a),(!e||e&&!e.isArray)&&a){var o={};return Object.keys(a).map((function(e){(!t||t&&t.indexOf(a[e].type)>-1)&&(o=Object(h.a)(Object(h.a)({},o),{},Object(O.a)({},e,a[e])))})),o}if(e&&e.isArray&&a){var i=[];return Object.keys(a).map((function(e){(!t||t&&t.indexOf(a[e].type)>-1)&&0===i.filter((function(t){return t._id===e})).length&&i.push(a[e])})),i}return{}}(l&&l._id?l._id:null,null,{onlyCard:!0}):ta(l&&l._id?l._id:null,null,{onlyCard:!0}),k=f&&f.id?ea(f.id):0;console.log(w);var S=function(e){c.current&&c.current.contains(e.target)||o(!1)};function L(e){"Tab"===e.key&&(e.preventDefault(),o(!1))}var C=function(){var t=Object(Ne.a)(Ga().mark((function t(r){var n;return Ga().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=w,e.multiple?0===n.filter((function(e){return e===r})).length?n.push(r):n.splice(n.indexOf(r),1):n=[r],E(n),e.onSelect&&e.onSelect(n),e.multiple||o(!1);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),I=function(){var t=Object(Ne.a)(Ga().mark((function t(r){var n;return Ga().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.multiple&&((n=w).splice(n.indexOf(r),1),E(n));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),F=function(t){var r=t.pr,n=!1;return(!e.data||j[r]&&j[r].access&&j[d._id]&&j[d._id].access&&parseInt(j[d._id].access)>=parseInt(j[r].access)||!j[r]&&(j[d._id]&&j[d._id].access&&parseInt(j[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)||k>3)&&(n=!0),j[r]?i.a.createElement(fn.a,{onClick:n?function(){C(r)}:null,disabled:!n},i.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center",cursor:"pointer"}},i.a.createElement(Kr.a,{alt:j[r].name||null,src:j[r].image||null},j[r]&&j[r].name?j[r].name.substr(0,1):""),i.a.createElement("span",{style:{marginLeft:"15px"}},j[r].name||j[r].name))):i.a.createElement(i.a.Fragment,null)};return i.a.createElement("div",{onClick:function(e){e.stopPropagation()}},i.a.createElement(kt.a,{ref:c,"aria-controls":a?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){(!l||e.permission||l&&j&&j[d._id]&&j[d._id].access&&parseInt(j[d._id].access)>2||k>3)&&(o((function(e){return!e})),t.stopPropagation())},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},0===w.length?tt("$__selectUser"):i.a.createElement("div",null,i.a.createElement(Sa.a,{max:e.noLimit?300:4,style:{flexWrap:"wrap",display:"inline-flex"}},w.map((function(t){return i.a.createElement(Ue.a,{key:t,title:j[t].displayName?j[t].displayName:j[t].name},i.a.createElement("div",{style:{display:"flex",alignItems:"center"},onClick:function(r){e.multiple&&(I(t),r.preventDefault(),r.stopPropagation())}},i.a.createElement(Kr.a,{alt:j[t].name,src:j[t].image||null,style:{width:e&&e.avatarSize?e&&e.avatarSize:"none",height:e&&e.avatarSize?e.avatarSize:"none"}},j[t].name.substr(0,1)),!e.multiple&&i.a.createElement("span",{style:{marginLeft:15}},j[t].displayName?j[t].displayName:j[t].name)))})),e.multiple&&i.a.createElement(Ue.a,{title:tt("$__selectUser")},i.a.createElement(Kr.a,{alt:"ADD",src:null},"+"))))),i.a.createElement(ln.a,{open:a,anchorEl:c.current,role:void 0,transition:!0,style:{zIndex:1300}},(function(e){var t,r=e.TransitionProps,n=e.placement;return i.a.createElement(on.a,Object.assign({},r,{style:{transformOrigin:"bottom"===n?"center top":"center bottom",maxHeight:"333px",overflowY:"auto"}}),i.a.createElement(cn.a,null,i.a.createElement("div",{style:(t={position:"relative",width:"100%",paddingBottom:v&&v.length?"66px":0},Object(O.a)(t,"width","100%"),Object(O.a)(t,"display","flex"),Object(O.a)(t,"justifyContent","space-between"),t)},i.a.createElement(an.a,{onClickAway:S},i.a.createElement(hn.a,{autoFocusItem:a,id:"menu-list-grow",onKeyDown:L},i.a.createElement(fn.a,{disabled:!0},tt("$__selectUser","*")),Object.keys(j).filter((function(e){return!j[e].deleted})).sort((function(e,t){return j[e].name<j[t].name?-1:j[e].name>j[t].name?1:0})).map((function(e){return j&&j[e]&&j[e]._id&&i.a.createElement(F,{pr:e,key:e})})))))))})))})),Wa=r(493);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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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(587);var Va=Object(Fe.b)((function(e,t){return{card:e.db.cards[t.data._id]}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Oa)((function(e){var t,r=e.classes,n=Ce.getState(),a=n.db,o=n.session,c=a.cards,l=i.a.useState(!1),s=Object(Ae.a)(l,2),u=s[0],d=s[1],p=i.a.useState(!1),f=Object(Ae.a)(p,2),m=f[0],g=f[1],v=i.a.useState({}),y=Object(Ae.a)(v,2),b=y[0],x=y[1],_=e.data,w=i.a.useState([]),E=Object(Ae.a)(w,2),O=E[0],j=E[1],k=i.a.useState(Be()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")),S=Object(Ae.a)(k,2),L=S[0],C=S[1],I=i.a.useState(Be()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")),F=Object(Ae.a)(I,2),T=F[0],N=F[1],A=parseFloat(_.kpi_ini)||0,D=parseFloat(_.kpi_fin)||0;i.a.useEffect((function(){t&&clearTimeout(t),$(),z(e.data._id)}),[m]),i.a.useEffect((function(){t&&clearTimeout(t),$(),z(e.data._id)}),[JSON.stringify(e.card)]);var P=[e.data._id],z=function(){var e=Object(Ne.a)(Ua().mark((function e(t,r){var n;return Ua().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(Ne.a)(Ua().mark((function e(t){return Ua().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,z(t,!0);case 2:P.push(t),j(Array.from(new Set(P)));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()):r||j(P),e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),$=function(){var t=Object(h.a)({},Ce.getState().db.cards[e.data._id]);if(t&&t._kpiTimer&&Object.keys(t._kpiTimer).filter((function(e){return t._kpiTimer[e].userId===o._id})).length>0){var r=t._kpiTimer[Object.keys(t._kpiTimer).filter((function(e){return t._kpiTimer[e].userId===o._id}))[0]];r.diff=Be()().tz("America/Sao_Paulo").unix("x")-r.created_at,M(r,!!r.updated_at)}else d(!1),x({}),g(!1);0===Object.keys(b).length&&e.manualAdd&&(x({created_at:Be()(L).tz("America/Sao_Paulo").unix("X"),updated_at:Be()(T).tz("America/Sao_Paulo").unix("X")}),M({created_at:Be()(L).tz("America/Sao_Paulo").unix("X"),updated_at:Be()(T).tz("America/Sao_Paulo").unix("X")},!!b.updated_at))},M=function(e,r){var n,a=Object(h.a)({},e),o=!1;if(a.diff?n=parseInt(a.diff):(n=parseInt(e.updated_at-e.created_at),e.updated_at-e.created_at<0&&(n=null)),n)if(n<60)a.diffText="".concat(a.diff," ").concat(tt("$__seconds",1));else if(n>3600){var i=Math.trunc(n/3600);n-=3600*i;var c=Math.trunc(n/60)>0?Math.trunc(n/60):0,l=(n-=60*c)>0?n:0;a.diffText="".concat(i," hora").concat(i>1?"s":""," ").concat(c," ").concat(tt("$__minutes",1)," ").concat(l," ").concat(tt("$__seconds",1))}else{var s=Math.trunc(n/60)>0?Math.trunc(n/60):0,p=(n-=60*s)>0?n:0;a.diffText="".concat(s," ").concat(tt("$__minutes",1)," ").concat(p," ").concat(tt("$__seconds",1))}else a.diffText=tt("$__theEndMustBeGreaterThanTheBeginning");x(Object(h.a)(Object(h.a)({},b),a)),e.updated_at?(a.diff=parseInt(e.updated_at)-parseInt(e.created_at),u||d(!0)):(a.diff=Be()().tz("America/Sao_Paulo").unix("x")-parseInt(e.created_at),m||(g(!0),o=!0)),r||e.updated_at||!o||(t=setTimeout((function(){$()}),1e3))};if(!_)return null;var B=function(){var t=Object(Ne.a)(Ua().mark((function t(){var r;return Ua().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,In(e,_._id);case 2:(r=t.sent)&&(M(r),g(!0));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Y=function(){var t=Object(Ne.a)(Ua().mark((function t(){var r;return Ua().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return g(!1),t.next=3,Fn(e,_._id);case 3:(r=t.sent)&&x(Object(h.a)(Object(h.a)({},b),r));case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),G=Object(h.a)({},Wa.model),R=[],H=[],W={};O.map((function(e){W=Object(h.a)(Object(h.a)({},W),a.cards[e]._timeline||{})})),W=Object.keys(W).filter((function(e){return"kpi"===W[e].type})).map((function(e){return W[e]}));var U="time"!==_.kpi_type?parseFloat(A):0,V=parseFloat(A)-parseFloat(D);V<0&&(V*=-1),W&&Object.keys(W).length>0&&Object.keys(W).sort((function(e,t){return W[e].created_at<W[t].created_at?-1:1})).map((function(e,t){U=parseFloat(U)+parseFloat(W[e].value),R.push({meta:W[e].value,total:U,value:parseFloat(A)>parseFloat(D)?100-Math.floor(100*U/V):Math.floor(100*U/V)}),H.push(t+1),t+1===Object.keys(W).length&&(G=Object(h.a)(Object(h.a)({},G),{},{data:{labels:H,series:[[].concat(R)]},options:Object(h.a)(Object(h.a)({},G.options),{},{low:0,high:100,plugins:[Ea.a.plugins.tooltip({tooltipFnc:function(e,t){return"".concat(e>0?"+":"")+lt(e,"time"===_.kpi_type?"number":_.kpi_type)+"<br>"+lt(t,"percent")}})],axisX:{showGrid:!1},axisY:{showGrid:!1},onlyInteger:!0})}))}));var q=A<D?D-A:A-D;W&&Object.keys(W).length>0&&Object.keys(W).map((function(e){q=parseFloat(q)+parseFloat(W[e].value)}));var X=Math.ceil(A<D?D-A:A-D);return(X=100*Math.ceil(q)/X-100)<0&&(X*=-1),e.data?i.a.createElement("div",{className:r.root},i.a.createElement("fieldset",null,i.a.createElement("legend",{style:{color:at("color")}},e.manualAdd?tt("$__timerLog",1):tt("$__timer",1)),e.manualAdd&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:r.timeInfo},i.a.createElement(xt,{color:"color",icon:"schedule"}),i.a.createElement(ya,{label:tt("$__initialDate",1),variant:at("fieldVariant",1),name:"startDate",InputLabelProps:{shrink:!0},type:"datetime-local",InputProps:{autoComplete:"start-date",onChange:function(e){Be()(e.target.value).isValid()&&(C(e.target.value),M(Object(h.a)(Object(h.a)({},b),{},{created_at:Be()(e.target.value).tz("America/Sao_Paulo").unix("X")}),!0))}},value:L})),i.a.createElement("div",{className:r.timeInfo},i.a.createElement(xt,{color:"color",icon:"watch_later"}),i.a.createElement(ya,{label:tt("$__finalDate",1),variant:at("fieldVariant",1),name:"endDate",InputLabelProps:{shrink:!0},type:"datetime-local",InputProps:{autoComplete:"new-password",onChange:function(e){Be()(e.target.value).isValid()&&(N(e.target.value),M(Object(h.a)(Object(h.a)({},b),{},{updated_at:Be()(e.target.value).tz("America/Sao_Paulo").unix("X")}),!0))}},value:T})),b&&b.diffText&&i.a.createElement("div",{className:r.timeInfo},i.a.createElement(xt,{color:"color",icon:"hourglass_full"}),i.a.createElement("div",{className:"text"},b.diffText)),parseInt(a.cards[_._id]._users[o._id].access)>=3?i.a.createElement(Pt,null,i.a.createElement(Ha,{includeMe:!0,data:a.cards[_._id],avatarSize:"33px",permission:e.permission,noLimit:!0,multiple:!0,onSelect:function(e){M(Object(h.a)(Object(h.a)({},b),{},{to:e}),!0)}})):i.a.createElement(i.a.Fragment,null)),u||e.manualAdd?i.a.createElement("div",null,!e.manualAdd&&b&&b.created_at&&b.updated_at&&b.diffText&&Be()(1e3*b.created_at).isValid()&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:r.timeInfo},i.a.createElement(xt,{color:"color",icon:"schedule"}),i.a.createElement("div",{className:"text"},Be()(1e3*b.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm:ss"))),i.a.createElement("div",{className:r.timeInfo},i.a.createElement(xt,{color:"color",icon:"watch_later"}),i.a.createElement("div",{className:"text"},Be()(1e3*b.updated_at).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm:ss"))),i.a.createElement("div",{className:r.timeInfo},i.a.createElement(xt,{color:"color",icon:"hourglass_full"}),i.a.createElement("div",{className:"text"},b.diffText))),b.created_at<b.updated_at?i.a.createElement(Pt,null,i.a.createElement(ka,{manualAdd:!!e.manualAdd,data:_,timer:b,callBack:function(){d(!1),e.callBack&&e.callBack()}})):i.a.createElement(i.a.Fragment,null)):i.a.createElement("div",{className:r.time},m?i.a.createElement("div",{className:r.timeInfo},i.a.createElement(xt,{color:"color",onClick:function(){it({message:tt("$__confirmStopTimer",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Y()}})}},"pause_circle_filled"),i.a.createElement("div",{className:"text"},b.diffText)):i.a.createElement(i.a.Fragment,null,D&&U?i.a.createElement("div",{className:r.timeInfo},i.a.createElement(xt,{color:60*D<U?"red":"color",icon:"schedule"}),i.a.createElement("div",{className:"text",style:{color:60*D<U?"red":"grey"}},tt("$__timeLeft",1),": ",60*D-U>-60&&60*D-U<60?"".concat(60*D-U," ").concat(tt("$__seconds",1)," "):"".concat(Math.trunc((60*D-U)/60)," ").concat(tt("$__minutes",1)," ").concat(60*D-U-60*Math.trunc((60*D-U)/60)," ").concat(tt("$__seconds",1)," "))):i.a.createElement(i.a.Fragment,null),i.a.createElement("div",{className:r.timeInfo},i.a.createElement(xt,{color:"color",onClick:function(){B()},title:"playRegisterLogWork"},"play_circle_outline"),i.a.createElement("span",{style:{marginLeft:7,color:at("color")}},tt("$__startStopWatch"))))))):i.a.createElement("div",null,"NO DATA RECEIVED")}))),qa=r(1691),Xa=Object(We.a)({root:{"&:hover":{backgroundColor:"transparent"},color:at("color")}})(qa.a);var Ka=function(e){var t=e.data;return i.a.createElement("div",null,0===Object.keys(t._users).length?tt("$__selectUsers"):i.a.createElement("div",{style:{display:"flex"}},Object.keys(t._users).sort((function(e,r){return t._users[e].isResponsible?-1:t._users[r].isResponsible?1:t._users[e].name<t._users[r].name?-1:t._users[e].name>t._users[r].name?1:0})).map((function(r,n){var a=!1,o=!!(Object.keys(t._users).length>1&&t._users[r].isResponsible);if(t._users[r].myDay&&t._users[r].myDay&&Be()(1e3*parseInt(t._users[r].myDay)).tz("America/Sao_Paulo").format("DD/MM/YYYY")===Be()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")&&(a=!0),t._users[r]&&t._users[r].name){var c=e.noLimit?7:e.limit?e.limit:7;if(n<c)return i.a.createElement("div",{key:r,style:{marginLeft:-7,position:"relative"}},i.a.createElement(Ue.a,{title:"".concat(t._users[r].name).concat(a?" (".concat(tt("$__inMyDay"),")"):""),key:r},i.a.createElement("div",{overlap:"circular",alt:t._users[r].name,src:t._users[r].image||null,style:{width:a||o?"30px":e.avatarSize?e.avatarSize:"24px",height:a||o?"30px":e.avatarSize?e.avatarSize:"24px",borderRadius:"50%",border:o?"3px deepskyblue solid":a?"2px #ff8800 solid":"none",backgroundImage:t._users[r].image?'url("'.concat(t._users[r].image,'")'):"null",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundColor:"lightgray",textAlign:"center"}},t._users[r].image?"":t._users[r].name.substr(0,1))),a&&i.a.createElement("div",{style:{position:"absolute",backgroundColor:"#ff8800",width:"14px",height:"14px",borderRadius:"14px",display:"flex",alignItems:"center",justifyContent:"center",right:"7px",bottom:0}},i.a.createElement(xt,{icon:"hourglass_top",size:"10px",color:"#FFFFFF"})));if(n===c){var l=Object.keys(t._users).length-c;return i.a.createElement(Ue.a,{title:i.a.createElement("ul",{style:{listingStyle:"none",padding:0}},Object.keys(t._users).sort((function(e,r){return t._users[e].isResponsible?-1:t._users[r].isResponsible?1:t._users[e].name<t._users[r].name?-1:t._users[e].name>t._users[r].name?1:0})).map((function(r,n){if(t._users[r].myDay&&t._users[r].myDay&&Be()(1e3*parseInt(t._users[r].myDay)).tz("America/Sao_Paulo").format("DD/MM/YYYY")===Be()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")&&!0,n>=c&&t._users[r]&&t._users[r].name)return i.a.createElement("li",{key:r,style:{display:"flex",alignItems:"center"}},i.a.createElement(Kr.a,{overlap:"circular",alt:t._users[r].name,src:t._users[r].image||null,style:{width:e.avatarSize?e.avatarSize:"22px",height:e.avatarSize?e.avatarSize:"22px",border:o?"3px deepskyblue solid":a?"2px #ff8800 solid":"none",marginRight:7}},t._users[r].name.substr(0,1)),t._users[r].name)}))),key:n},i.a.createElement(Kr.a,{style:{width:e.avatarSize?e.avatarSize:27,height:e.avatarSize?e.avatarSize:27,border:"none"},alt:"+".concat(l)},i.a.createElement("span",{style:{fontSize:10}},"+".concat(l))))}}}))))},Ja=r(1658);function Za(){Za=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Qa=Object(_t.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 eo,to,ro=Object(Fe.b)((function(e,t){return{data:e.db.cards[t._id]?e.db.cards[t._id]:{},store:{users:e.db.users}}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Qa(),r=i.a.useRef(null),n=Ce.getState(),a=n.db,o=n.session,c=(n.functions,e.data),l=i.a.useState(!!e.open),s=Object(Ae.a)(l,2),u=s[0],d=s[1],p=i.a.useState([]),f=Object(Ae.a)(p,2),m=f[0],g=f[1],v=i.a.useState([]),y=Object(Ae.a)(v,2),b=y[0],x=y[1],_=i.a.useState(""),w=Object(Ae.a)(_,2),E=w[0],j=w[1],k=i.a.useState(!1),S=Object(Ae.a)(k,2),L=S[0],C=S[1],I=i.a.useState(!1),F=Object(Ae.a)(I,2),T=F[0],N=F[1];i.a.useEffect((function(){return function(){}}),[]);var A=ta(c._id),D=ft(),P=ea(c._id),z=!1;P>3&&(z=!0),!z&&D.plan&&D.planAdmin&&(z=!0);var $=window.location.hash.split("/");$[0]=$[0].replace("#","");var M=function(e){r.current&&r.current.contains(e.target)||(d(!1),N(!1),x([]))};function B(e){"Tab"===e.key&&(e.preventDefault(),d(!1))}var Y=function(){var t=Object(Ne.a)(Za().mark((function t(r,n){var o;return Za().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=1,c&&"plan"===c.type&&(o=3),n?o=n:c._planId&&a.cards[c._planId]&&a.cards[c._planId]._users&&a.cards[c._planId]._users[r]&&a.cards[c._planId]._users[r].access&&(o=c._parent&&a.cards[c._parent]&&a.cards[c._parent]._users&&a.cards[c._parent]._users[r]&&a.cards[c._parent]._users[r].access&&parseInt(a.cards[c._parent]._users[r].access)>parseInt(a.cards[c._planId]._users[r].access)?parseInt(a.cards[c._parent]._users[r].access):parseInt(a.cards[c._planId]._users[r].access)),!!(c&&c._users&&c._users[r]),t.next=6,Ba(e,r,o,c._id);case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),G=function(){var e=Object(Ne.a)(Za().mark((function e(t){return Za().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Ze.put("cards/removeAccess/",{cardId:c._id,userIds:m}),g([]);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),R=function(){var t=Object(Ne.a)(Za().mark((function t(){return Za().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:b.map((function(t){Wn(e,{_id:c._id,userId:t,option:!0})})),N(!1);case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),H=function(t){var r=t.pr,n=!1;e.permission&&(n=!0);var a=!1;c._users&&c._users[r]&&c._users[r].myDay&&c._users[r].myDay&&Be()(1e3*parseInt(c._users[r].myDay)).tz("America/Sao_Paulo").format("DD/MM/YYYY")===Be()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")&&(a=!0);var o=!!(Object.keys(A).length>1&&A[r]&&A[r].isResponsible);return A[r]?i.a.createElement(fn.a,{onClick:n?function(){}:null,disabled:!n},i.a.createElement("div",{style:Object(h.a)({position:"relative",width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},n?{}:{cursor:"pointer"})},i.a.createElement("div",{style:{width:"33px",height:"33px",borderRadius:"50%",border:o?"3px deepskyblue solid":a?"2px #ff8800 solid":"none",backgroundImage:A[r].image?'url("'.concat(A[r].image,'")'):"null",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundColor:"lightgray",textAlign:"center"},src:A[r].image||null},!A[r].image&&A[r]&&A[r].name?A[r].name.substr(0,1):""),A[r].name||A[r].name,i.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},c._users[r]&&!c._users[r].isResponsible&&z?i.a.createElement(Ct,{title:tt("$__defineAsResponsible",1),color:"lightGray",icon:"admin_panel_settings",onClick:function(){it({message:tt("$__confirmSetAsResponsibleCard",1),variant:"warning",persist:!1,horizontal:"left",confirm:function(){Ya(e,{cardId:c._id,userId:r})}})},size:"25px"}):i.a.createElement(i.a.Fragment,null),i.a.createElement(Xa,Object.assign({},T?{checked:!!(a||b.indexOf(r)>-1)}:{checked:!!c._users[r]},{disabled:!(!T||!a),onClick:n?function(){if(T){var e=Array.from(b);-1===e.indexOf(r)?e.push(r):e.indexOf(r)>-1&&e.splice(e.indexOf(r),1),x(e)}else!function(e){var t=Array.from(m);c._users[e]&&-1===t.indexOf(e)?(t.push(e),g(t)):c._users[e]&&t.indexOf(e)>-1?(t.splice(t.indexOf(e),1),g(t)):c._users[e]||Y(e)}(r)}:null,color:"default"}))),m.indexOf(r)>-1&&i.a.createElement("div",{style:{height:"2px",width:"100%",backgroundColor:"red",position:"absolute",top:"50%"}}))):i.a.createElement(i.a.Fragment,null)};return i.a.createElement("div",{onClick:function(e){e.stopPropagation()}},i.a.createElement(kt.a,{ref:r,"aria-controls":u?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){(e.permission||c&&c._users&&c._users[o._id]&&c._users[o._id].access&&parseInt(c._users[o._id].access)>3)&&(d((function(e){return!e})),t.stopPropagation())},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},i.a.createElement(Ka,e)),i.a.createElement(ln.a,{open:u,anchorEl:r.current,role:void 0,transition:!0},(function(e){var t,r=e.TransitionProps,n=e.placement;return i.a.createElement(on.a,Object.assign({},r,{style:{transformOrigin:"bottom"===n?"center top":"center bottom",maxHeight:"333px",minHeight:"333px",overflowY:"auto"}}),i.a.createElement(cn.a,{onClick:function(e){e.preventDefault(),e.stopPropagation()}},i.a.createElement("div",{style:(t={position:"relative",width:"100%",paddingBottom:m&&m.length>0||b&&b.length>0?"50px":0},Object(O.a)(t,"width","100%"),Object(O.a)(t,"display","flex"),Object(O.a)(t,"justifyContent","space-between"),t),onClick:function(e){e.preventDefault(),e.stopPropagation()}},i.a.createElement(an.a,{onClickAway:M},i.a.createElement("div",{style:{}},L&&i.a.createElement("div",{style:{position:"relative",marginTop:15,width:"100%",padding:"4px 15px",fontSize:"16px",color:"lightGray"}},i.a.createElement(ya,{id:"quickUser_Search",label:tt("$__searchByName",1),variant:at("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:i.a.createElement(Ja.a,{position:"end",style:{cursor:"pointer"},onClick:function(){j(""),C(!1)}},i.a.createElement(xt,{icon:"close"})),onChange:function(e){j(e.target.value)},onBlur:function(e){}},value:E,placeholder:tt("$__searchByName",1),autoFocus:!0})),i.a.createElement(hn.a,{autoFocusItem:u,id:"menu-list-grow",onKeyDown:B},T?i.a.createElement("div",{style:{position:"relative",overflow:"auto"}},i.a.createElement(fn.a,{disabled:!0},tt("$__selectUsersToMyDay","*")),Object.keys(c._users).filter((function(e){if(e!==o._id)return!0})).sort((function(e,t){return A[e].name.toLowerCase()<A[t].name.toLowerCase()?-1:A[e].name.toLowerCase()>A[t].name.toLowerCase()?1:0})).map((function(e){Object.keys(c._users).length>1&&c._users[e].isResponsible;if(c._users[e].myDay&&c._users[e].myDay&&Be()(1e3*parseInt(c._users[e].myDay)).tz("America/Sao_Paulo").format("DD/MM/YYYY")===Be()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")&&!0,A&&A[e]&&A[e]._id)return i.a.createElement(H,{pr:e,key:e})}))):i.a.createElement("div",null,i.a.createElement(fn.a,{disabled:!0},tt("$__internalUsers","*")),Object.keys(A).filter((function(e){if((!E||E&&A[e].name.toLowerCase().indexOf(E.toLowerCase())>-1)&&"user"===A[e].type&&!A[e].deleted&&!A[e]._parent)return!0})).sort((function(e,t){return A[e].name<A[t].name?-1:A[e].name>A[t].name?1:0})).map((function(e){return A&&A[e]&&A[e]._id&&i.a.createElement(H,{pr:e,key:e})})),Object.keys(A).filter((function(e){if((!E||E&&A[e].name.toLowerCase().indexOf(E.toLowerCase())>-1)&&"user"===A[e].type&&!A[e].deleted&&(c._planId&&a.cards[c._planId]&&a.cards[c._planId].client&&A[e]._parent&&A[e]._parent===a.cards[c._planId].client||c.client&&A[e]._parent===c.client||c._parent&&a.cards[c._parent]&&a.cards[c._parent].client&&A[e]._parent&&A[e]._parent===a.cards[c._parent].client))return!0})).length>0&&i.a.createElement(fn.a,{disabled:!0},tt("$__UnityUsers","*")),Object.keys(A).filter((function(e){if((!E||E&&A[e].name.toLowerCase().indexOf(E.toLowerCase())>-1)&&"user"===A[e].type&&!A[e].deleted&&(c._planId&&a.cards[c._planId]&&a.cards[c._planId].client&&A[e]._parent&&A[e]._parent===a.cards[c._planId].client||c.client&&A[e]._parent===c.client||c._parent&&a.cards[c._parent]&&a.cards[c._parent].client&&A[e]._parent&&A[e]._parent===a.cards[c._parent].client))return!0})).sort((function(e,t){return A[e].name<A[t].name?-1:A[e].name>A[t].name?1:0})).map((function(e){return A&&A[e]&&A[e]._id&&i.a.createElement(H,{pr:e,key:e})})),Object.keys(A).filter((function(e){if((!E||E&&A[e].name.toLowerCase().indexOf(E.toLowerCase())>-1)&&"consultant"===A[e].type&&!A[e].deleted)return!0})).length>0&&i.a.createElement(fn.a,{disabled:!0},tt("$__consultants","*")),Object.keys(A).filter((function(e){if((!E||E&&A[e].name.toLowerCase().indexOf(E.toLowerCase())>-1)&&"external"===A[e].type&&!A[e].deleted)return!0})).sort((function(e,t){return A[e].name<A[t].name?-1:A[e].name>A[t].name?1:0})).map((function(e){return A&&A[e]&&A[e]._id&&i.a.createElement(H,{pr:e,key:e})})))),L||T?i.a.createElement(i.a.Fragment,null):i.a.createElement("div",{style:{position:"absolute",right:15,top:10}},i.a.createElement(Ct,{title:tt("$__searchUser",1),color:at("menu"),icon:"search",onClick:function(){C(!0)},size:"25px"})),L||T||!z?T?i.a.createElement("div",{style:{position:"absolute",right:15,top:10}},i.a.createElement(Ct,{title:tt("$__back",1),color:at("menu"),icon:"arrow_back",onClick:function(){N(!1)},size:"25px"})):i.a.createElement(i.a.Fragment,null):i.a.createElement("div",{style:{position:"absolute",right:45,top:10}},i.a.createElement(Ct,{title:tt("$__sendToMyDay",1),color:"orange",icon:"schedule_send",onClick:function(){N(!0)},size:"25px"}))))),m&&m.length>0&&i.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()}},tt("$__confirmSelectedUsersRemove"),i.a.createElement(Ct,{title:tt("$__remove",1),color:"#FFFFFF",icon:"delete_forever",onClick:function(){G()},size:"25px",transparent:!0})),T&&b&&b.length>0&&i.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()}},i.a.createElement(Sa.a,{style:{flexWrap:"wrap"}},b.map((function(e,t){return e&&Ce.getState().db.users[e]?i.a.createElement(Ue.a,{title:Ce.getState().db.users[e].name,key:e},i.a.createElement(Kr.a,{alt:Ce.getState().db.users[e].name,src:Ce.getState().db.users[e].image||null,style:{width:"23px",height:"23px"}},Ce.getState().db.users[e].name.substr(0,1))):i.a.createElement(i.a.Fragment,null)}))),i.a.createElement(Ct,{title:tt("$__sendToMyDay",1),color:"#FFFFFF",icon:"schedule_send",onClick:function(){R()},size:"25px",transparent:!0}))))})))})),no={containerNoShadow:Object(h.a)(Object(h.a)({},Ut),{},(eo={position:"relative",border:"0.5px solid ".concat(at("light")),borderRadius:"2px",padding:"0px",backgroundColor:"#FFFFFF"},Object(O.a)(eo,"padding","3px"),Object(O.a)(eo,"minWidth","150px"),Object(O.a)(eo,"display","flow-root"),eo)),container:Object(h.a)(Object(h.a)({},Ut),{},(to={position:"relative",border:"0.5px solid ".concat(at("light")),borderRadius:"2px",padding:"0px",backgroundColor:"#FFFFFF"},Object(O.a)(to,"padding","3px"),Object(O.a)(to,"minWidth","150px"),Object(O.a)(to,"display","flow-root"),Object(O.a)(to,"boxShadow","0px 0px 10px rgba(0,0,0,0.1)"),to)),parent:{width:"100%",padding:"0 5px","& .title":{color:at("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:at("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:at("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 ao=Object(We.a)(no)((function(e){var t=e.classes;return i.a.createElement("div",null,i.a.createElement("div",null,i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:t.infos},i.a.createElement("div",{className:t.imagePreview,style:{background:at("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},i.a.createElement("div",{style:{marginTop:"calc(-48% - 10px)",display:"flex",justifyContent:"center",alignItems:"center"}},i.a.createElement(xt,{icon:"lock",size:"39px",color:"rgba(250,250,250,0.77)"})))))))})),oo=r(912),io=r.n(oo),co=r(1659),lo={root:{position:"relative",width:"100%",background:"transparent !important","& .MuiLinearProgress-indeterminate":{background:"transparent !important"},"& .MuiLinearProgress-bar":{background:"".concat(at("linearProgress")," !important")},"& .text":{position:"absolute",width:"40px",right:"-40px",top:"-9px",textAlign:"right",textSize:"11px",fontWeight:"bold",color:at("color")}},bar:{borderRadius:7}};var so=Object(We.a)(lo)((function(e){var t=e.classes,r=Object(h.a)({},e);return r.showText&&delete r.showText,i.a.createElement("div",{className:t.root,style:e.showText?{width:"calc(100% - 40px)"}:{}},i.a.createElement(co.a,r),e.showText&&i.a.createElement("div",{className:"text"},Math.floor(e.value),"%"))})),uo=Object(_t.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 po=function(e){var t=uo(),r=i.a.useState(!1),n=Object(Ae.a)(r,2),a=n[0],o=n[1],c=i.a.useRef(null),l=function(e){c.current&&c.current.contains(e.target)||o(!1)};return i.a.createElement("div",{onClick:function(e){e.stopPropagation()},style:{zIndex:100}},i.a.createElement(Ue.a,{title:tt("$__options",1)},i.a.createElement(jt.a,{ref:c,"aria-controls":a?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){o((function(e){return!e})),e.onClick&&e.onClick(),t.stopPropagation()},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},i.a.createElement(xt,{usePropagation:!0,size:e.size?e.size:"20px",color:e.iconColor?e.iconColor:at("menu"),icon:e.icon?e.icon:"design_services"}))),i.a.createElement(ln.a,{open:a,anchorEl:c.current,role:void 0,transition:!0},(function(t){var r=t.TransitionProps,n=t.placement;return i.a.createElement(on.a,Object.assign({},r,{style:{transformOrigin:"bottom"===n?"center top":"center bottom"}}),i.a.createElement(cn.a,null,i.a.createElement(an.a,{onClickAway:l},i.a.createElement("div",{onClick:function(e){e.stopPropagation(),e.preventDefault()}},i.a.cloneElement(e.children,{callBack:function(e){o(!1)}})))))})))};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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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(162).config();var ho=function(){var e=Object(Ne.a)(fo().mark((function e(t,r){var n,a,o,i,c,l;return fo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log(r),n={},a=Ce.getState(),o=a.db,i=a.session,(Ce.getState().timeline[r.id]||Ce.getState().timeline[r.readedBy])&&(n=Ce.getState().timeline,c=r.id,l={},"cards"!==r.db?(c=n[r.readedBy]?r.readedBy:r.id,l={_id:r.readedBy,name:o.users[r.readedBy].name,image:o.users[r.readedBy].image}):o.cards[r.id]&&o.cards[r.id]._users&&o.cards[r.id]._users[r.readedBy]&&(l=o.cards[r.id]._users[r.readedBy]),n&&n[c]&&Object.keys(n[c]).filter((function(e){if(r&&r.type&&("all"!==r.type&&n[c][e].type===r.type||"all"===r.type)&&n[c][e].user._id!==r.readedBy&&(!n[c][e].readedBy||i&&i._id&&n[c][e].readedBy&&!n[c][e].readedBy[i._id]))return!0})).map((function(e,t){n[c][e]=Object(h.a)(Object(h.a)({},n[c][e]),{},{readedBy:Object(h.a)(Object(h.a)({},n[c][e]&&n[c][e].readedBy?n[c][e].readedBy:{}),{},Object(O.a)({},r.readedBy,Object(h.a)(Object(h.a)({},l),{},{readedDate:{low:Be()().unix("x")}})))})}))),t.reduxFunction("ASYNC","SET_TIMELINE",Object(h.a)({},n)),Ce.getState().db.cards[r.id]&&r.type&&Ce.getState().db.cards[r.id]._notifications&&(Ce.getState().db.cards[r.id]._notifications[r.type]||"all"===r.type)&&t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},r.id,Object(h.a)(Object(h.a)({},Ce.getState().db.cards[r.id]),"all"===r.type?{notifications:{}}:{_notifications:Object(h.a)(Object(h.a)({},Ce.getState().db.cards[r.id]&&Ce.getState().db.cards[r.id]._notifications?Ce.getState().db.cards[r.id]._notifications:{}),{},Object(O.a)({},r.type,0))})))}));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),mo=function(){var e=Object(Ne.a)(fo().mark((function e(t,r){var n,a,o,i,c,l,s,u;return fo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Ce.getState(),a=n.db,o=n.timeline,i=n.session,c={},l=r.nodeId!==i._id?l=r.nodeId:r.user,a.users[r.user]?c=a.users[r.user]:r.user&&a[r.db]&&o[l]&&o[l]._users&&o[l]._users[r.user]&&(c=o[l]._users[r.user]),l&&r.message&&o&&o[i._id]&&o[i._id][r.message]&&(l=i._id),a[r.db]&&o[l]&&o[l][r.message]&&(s=Object(h.a)(Object(h.a)({},o[l][r.message]&&o[l][r.message]._reactions?o[l][r.message]._reactions:{}),{},Object(O.a)({},r.react,Object(h.a)(Object(h.a)({},o[l][r.message]&&o[l][r.message]._reactions&&o[l][r.message]._reactions[r.react]?o[l][r.message]._reactions[r.react]:{}),{},Object(O.a)({},r.user,Object(h.a)(Object(h.a)({},c),{},{reactDate:{low:Be()().tz("America/Sao_Paulo").unix("x")}}))))),Object.keys(s).map((function(e){e!==r.react&&Object.keys(s[e]).map((function(t){s[e][t]&&t===r.user&&delete s[e][t]}))})),u=Object(h.a)(Object(h.a)({},o),{},Object(O.a)({},l,Object(h.a)(Object(h.a)({},o[l]),{},Object(O.a)({},r.message,Object(h.a)(Object(h.a)({},o[l][r.message]),{},{_reactions:s}))))),t.reduxFunction("ASYNC","SET_TIMELINE",u));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),go=function(){var e=Object(Ne.a)(fo().mark((function e(t,r){var n,a,o,i,c;return fo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise(function(){var e=Object(Ne.a)(fo().mark((function e(n,a){return fo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r||"cards"!==r.db||Ce.getState().db.cards[r.idRel]){e.next=7;break}return e.next=3,En(t,{idRel:r.idRel,cardLoad:"fullCatenation",ignoreLoader:!0});case 3:e.sent&&n(!0),e.next=8;break;case 7:n(!0);case 8:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}());case 2:e.sent&&(n=r,a=Ce.getState(),o=a.timeline,i=a.session,(c=n._parent?n._parent:n.cardId?n.cardId:n.node)===i._id&&(c=n.comment.user._id),n.to&&(n.to.map((function(e){var t=Ce.getState().db.users[e];n._toUser=Object(h.a)(Object(h.a)({},n._toUser?n._toUser:{}),{},Object(O.a)({},e,{_id:e,name:t.displayName?t.displayName:t.name,image:t.image?t.image:null}))})),delete n.to),c&&n.comment&&t.reduxFunction("IMMEDIATE","SET_TIMELINE",Object(h.a)(Object(h.a)({},o),{},Object(O.a)({},c,Object(h.a)(Object(h.a)({},o[c]),{},Object(O.a)({},n.comment._id,Object(h.a)(Object(h.a)(Object(h.a)(Object(h.a)({},o[c]&&o[c][n.comment._id]?o[c][n.comment._id]:{}),n.comment),n._toUser?{_toUser:n._toUser}:{}),{},{type:o[c]&&o[c][n.comment._id]&&o[c][n.comment._id].type?o[c][n.comment._id].type:n&&n.comment&&n.comment.type?n.comment.type:o[c]&&o[c][n.comment._id]&&o[c]&&o[c][n.comment._id].type?o[c]&&o[c][n.comment._id].type:"comment",readedBy:Object(h.a)(Object(h.a)({},o[c]&&o[c][n.comment._id]&&o[c][n.comment._id].readedBy?o[c][n.comment._id].readedBy:{}),n.comment&&n.comment.readedBy?n.comment.readedBy:{}),idRel:null})))))));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),vo=function(){var e=Object(Ne.a)(fo().mark((function e(t,r){var n,a,o,i,c,l,s,u,d,p,f,m,g,v,y,b,x,_;return fo().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,v=Ce.getState(),y=v.session,b=[],x=[],"string"===typeof n?x.push(n):x=n,x&&x.length>0&&x.map((function(e){Ce.getState().db.cards[e];-1===b.indexOf(e)&&b.push(e)})),!(b.length>0)){e.next=14;break}return e.next=9,new Promise(function(){var e=Object(Ne.a)(fo().mark((function e(n,i){var l,u,p,m,v;return fo().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,bn.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)({},Ce.getState().timeline),l.data.map((function(e){var t={},r={},n=e.nodeId!==y._id?e.nodeId:e.params.user._id;e&&e.params&&e.params.readedBy&&e.params.readedBy.filter((function(e){return e._id})).length>0&&e.params.readedBy.map((function(e){t=Object(h.a)(Object(h.a)({},t),{},Object(O.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(O.a)({},e.type,Object(h.a)(Object(h.a)({},r[e.type]),{},Object(O.a)({},e._id,e))))}));var a={};e&&e.params&&e.params.users&&e.params.users.filter((function(e){return e.name})).length>0&&e.params.users.filter((function(e){return e.name})).map((function(e){a=Object(h.a)(Object(h.a)({},a),{},Object(O.a)({},e._id,e))})),u=Object(h.a)(Object(h.a)({},u),{},Object(O.a)({},n,Object(h.a)(Object(h.a)({},u&&u[n]?u[n]:{}),{},Object(O.a)({},e.data._id,Object(h.a)(Object(h.a)(Object(h.a)({},e.data),e.params),{},{readedBy:t,_reactions:r},a!=={}?{_toUser:a}:{})))))})),!(r.ini&&Ce.getState().chat&&!Ce.getState().chat.nodeId&&u&&Object.keys(u).length)){e.next=16;break}return p=0,m=null,v=u||{},e.next=14,new Promise((function(e,t){v&&Object.keys(v).length>0&&Object.keys(v).map((function(t,r){v[t]&&Object.keys(v[t]).length>0&&Object.keys(v[t]).map((function(n,a){v[t]&&v[t][n]&&v[t][n].created_at&&parseInt(v[t][n].created_at)>p&&(Ce.getState().db.cards[t]&&"chatGroup"===Ce.getState().db.cards[t].type||Ce.getState().db.users[t]||y._id===t)&&(p=parseInt(v[t][n].created_at),m=y._id===t?v[t][n].user._id:t),a+1===Object.keys(v[t]).length&&r+1===Object.keys(v).length&&e(!0)}))}))}));case 14:e.sent&&m&&t.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},Ce.getState().chat),{},{nodeId:m}));case 16:t.noReg||t.reduxFunction("ASYNC","SET_TIMELINE",Object(h.a)(Object(h.a)({},Ce.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 9:if(!(_=e.sent)){e.next=12;break}return e.abrupt("return",_);case 12:e.next=15;break;case 14:return e.abrupt("return",{result:!0,total:0});case 15:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),yo=function(){var e=Ce.getState(),t=e.db,r=e.session,n=e.timeline,a=0,o=0;return Object.keys(n).map((function(e){Object.keys(n[e]).map((function(i){n[e]&&n[e][i]&&n[e][i].user&&n[e][i].user._id&&n[e][i].user._id!==r._id&&(!n[e][i].readedBy||n[e][i].readedBy&&!n[e][i].readedBy[r._id])&&(e&&t.cards[e]&&"chatGroup"===t.cards[e].type&&(a+=1),e&&t.users[e]&&"user"===t.users[e].type&&(o+=1),1)}))})),{total:a+o+0+0,groups:a,externalGroups:0,users:o,externalUsers:0}},bo=function(){var e=Object(Ne.a)(fo().mark((function e(t,r){var n,a;return fo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(t&&t.store&&Ce.getState().functions&&Ce.getState().functions.socket,Ce.getState().functions.socket),e.next=3,new Promise(function(){var e=Object(Ne.a)(fo().mark((function e(a,o){return fo().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=Ce.getState().session;Ce.getState().timeline[o._id]&&Ce.getState().timeline[o._id][r.id]&&(n=o._id),t.reduxFunction("ASYNC","SET_TIMELINE",Object(h.a)(Object(h.a)({},Ce.getState().timeline),{},Object(O.a)({},n,Object(h.a)(Object(h.a)({},Ce.getState().timeline[n]),{},Object(O.a)({},r.id,Object(h.a)(Object(h.a)({},Ce.getState().timeline&&Ce.getState().timeline[n]&&Ce.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 xo(){xo=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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(587);var _o,wo,Eo=Object(Fe.b)((function(e){return{store:{timeline:e.timeline,cards:e.db.cards}}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Oa)((function(e){var t=e.classes,r=e.data,n=Ce.getState(),a=n.db,o=n.timeline,c=a.cards,l=i.a.useState(!1),s=Object(Ae.a)(l,2),u=s[0],d=s[1],p=i.a.useState(!0),f=Object(Ae.a)(p,2),m=(f[0],f[1]),g=i.a.useState(!0),v=Object(Ae.a)(g,2),y=v[0],b=v[1],x=i.a.useState([]),_=Object(Ae.a)(x,2),w=_[0],E=_[1],O=parseFloat(r.kpi_ini),j=parseFloat(r.kpi_fin);i.a.useEffect((function(){u||(d(!0),L(e.data._id),k())}),[]),i.a.useEffect((function(){L(e.data._id)}),[c]);var k=function(){var t=Object(Ne.a)(xo().mark((function t(){return xo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o||o[r._id]&&(!o[r._id]||0!==Object.keys(o[r._id]).filter((function(e){return"kpi"===o[r._id][e].type})).length)){t.next=7;break}return t.next=3,vo(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(Ne.a)(xo().mark((function e(t,r){var n;return xo().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(Ne.a)(xo().mark((function e(t){return xo().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)({},Wa.model),I=[],F=[],T={};w.map((function(e){T=Object(h.a)(Object(h.a)({},T),o[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,A=parseFloat(O)-parseFloat(j),D=0;A<0&&(A*=-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),D+=parseFloat(T[e].value),I.push({meta:T[e].value,total:N,value:parseFloat(O)>parseFloat(j)?100-Math.floor(100*N/A):Math.floor(100*N/A)}),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:[Ea.a.plugins.tooltip({tooltipFnc:function(e,t,n){return"".concat(e>0?"+":"")+lt(e,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null)+"<br>"+lt(t,"percent")}})],axisX:{showGrid:!1},axisY:{showGrid:!1},onlyInteger:!0})}))}));var P=O<j?j-O:O-j,z=P;T&&Object.keys(T).length>0&&Object.keys(T).map((function(e){P=parseFloat(P)+parseFloat(T[e].value)}));var $=z-(P-z),M=z-(z-P),B=Math.ceil(O<j?j-O:O-j);return(B=100*Math.ceil(P)/B-100)<0&&(B*=-1),e.data?y?i.a.createElement("div",{style:{position:"absolute",bottom:0,left:"7px",right:"7px"}},i.a.createElement(so,null)):i.a.createElement("div",{className:t.root},i.a.createElement(i.a.Fragment,null,e.chartShow&&"time"!==r.kpi_type&&"task"!==r.kpi_type&&T.length>0&&i.a.createElement("div",{style:{backgroundColor:at("color")}},i.a.createElement(io.a,{className:"ct-chart-white-colors",data:C.data,type:"Line",options:C.options,listener:C.animation})),"task"!==r.kpi_type&&i.a.createElement("fieldset",{style:{position:"relative"}},i.a.createElement("legend",{style:{color:at("color")}},tt("$__progress",1)),i.a.createElement("div",{style:{position:"relative",textSize:"11px",color:at("color")}},"time"===r.kpi_type?tt("$__minTime",1):tt("$__maxTime",1),": ",lt(O||0,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null),"/ ","time"===r.kpi_type?tt("$__maxTime",1):tt("$__targetValue",1),": ",lt(j||0,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null)),i.a.createElement("div",{className:t.progress},i.a.createElement(so,{variant:"determinate",size:100,value:B,showText:!0,onClick:function(){}})),i.a.createElement("div",{style:{position:"relative",textSize:"11px",fontWeight:"bold",color:at("color")}},tt("".concat(O>j?"$__balance":"time"===r.kpi_type?"$__availableTime":"$__targetValue"),1),": ",lt(O<j?$:M||0,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null)),i.a.createElement("div",{style:{position:"relative",textSize:"11px",fontWeight:"bold",color:D>0?at("green"):"red"}},tt("$__accomplished",1),": ",lt(D||0,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null)),i.a.createElement("div",{style:{position:"absolute",right:"0px",top:"-33px",display:"flex"}},(B>=0&&B<100&&j>O||B>0&&B<=100&&j<O)&&i.a.createElement(po,{icon:"add_circle",iconColor:at("blue"),onClick:function(){m(!0)},transparent:!0},i.a.createElement(ka,{data:r,PositiveValue:!0,callBack:function(){}})),(B>=0&&B<100&&j<O||B>0&&B<=100&&j>O)&&i.a.createElement(po,{icon:"remove_circle",iconColor:"orange",onClick:function(){m(!1)},transparent:!0},i.a.createElement(ka,{data:r,PositiveValue:!1,callBack:function(){}})))),"task"===r.kpi_type&&i.a.createElement("div",{className:t.time},"TASK"))):i.a.createElement("div",null,"NO DATA RECEIVED")}))),Oo=r(53),jo={container:Object(h.a)(Object(h.a)({},Ut),{},(_o={position:"relative",border:"0.5px solid ".concat(at("light")),borderRadius:"2px",padding:"0px",backgroundColor:"#FFFFFF",boxShadow:"0px 0px 10px rgba(0,0,0,0.1)"},Object(O.a)(_o,"padding","3px"),Object(O.a)(_o,"minWidth","150px"),Object(O.a)(_o,"display","flow-root"),_o)),cardContainer:Object(h.a)(Object(h.a)({},Ut),{},{position:"relative",minWidth:"150px",display:"flow-root"}),parent:{width:"100%",padding:"0 5px","& .title":{color:at("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:at("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:at("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 ko(){ko=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 So,Lo=Ge.default.div(wo||(wo=Object(Te.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(at("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 "})),Co=Object(Fe.b)((function(){return{}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(jo)((function(e){var t=e.classes,r=Ce.getState().db,n=e.data&&e.data._id?Ce.getState().db.cards[e.data._id]:{},a=i.a.useState(n.name?n.name:""),o=Object(Ae.a)(a,2),c=o[0],l=o[1],s=i.a.useState(!1),u=Object(Ae.a)(s,2),d=u[0],p=u[1],f=function(){var t=Object(Ne.a)(ko().mark((function t(r){return ko().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:oa(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(Ne.a)(ko().mark((function t(){var r;return ko().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,bn.post("/Card_Count",{id:n._id});case 2:(r=t.sent)&&parseInt(r.data)>0&&"completed"!==n.status?it({message:tt("$__concludeWithChildrensNotConcludedConfirm",1),autoClose:5e4,buttons:[{shadow:!0,title:tt("$__concludeAll"),text:tt("$__concludeAll"),color:"green",icon:"close",size:"25px",onClick:function(){oa(Object(h.a)(Object(h.a)({},e),{},{data:{_id:n._id}}),{status:"completed"===n.status?"inProgress":"completed"}),r&&parseInt(r.data)>0&&ca(e,n._id,"completed"===n.status?"inProgress":"completed")},style:{marginLeft:15}},{shadow:!0,title:tt("$__cancel"),text:tt("$__cancel"),color:"red",icon:"close",size:"25px",onClick:function(){},style:{marginLeft:15}}],variant:"warning",persist:!1,horizontal:"right"}):(oa(Object(h.a)(Object(h.a)({},e),{},{data:{_id:n._id}}),{status:"completed"===n.status?"inProgress":"completed"}),r&&parseInt(r.data)>0&&ca(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(Ne.a)(ko().mark((function e(){return ko().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:it({message:tt("$__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 i.a.createElement(Lo,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}),i.a.createElement("div",e.provided&&e.provided.dragHandleProps,d?i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px",display:"flex",alignItems:"center"}},i.a.createElement("div",{style:{width:"calc(100% - 50px)",display:"flex"}},i.a.createElement(ya,{label:tt("$__taskTitle"),variant:at("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:tt("$__taskTitlePlaceholder")})),i.a.createElement("div",{style:{display:"flex"}},i.a.createElement("div",{onClick:function(){return f({name:c})}},i.a.createElement(xt,{color:"green",icon:"save",title:tt("$__save","*"),size:e.actionsSize||"25px"})),i.a.createElement("div",{onClick:function(){p(!d),l("")}},i.a.createElement(xt,{color:at("medium"),icon:"cancel",title:tt("$__cancel","*"),size:e.actionsSize||"25px"}))))):i.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}},!e.noDelete&&(!e.showCard||!e.dragStatus&&e.showCard)&&i.a.createElement(xt,{onClick:function(){return g()},color:"lightgrey"},"delete_forever"),i.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?i.a.createElement(ki,{db:"cards",data:e.data,viewTimer:!0,viewAllName:!0}):n.name?n.name:tt("$__new",1)),"completed"!==n.status||e.showCard?i.a.createElement(i.a.Fragment,null):i.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"}},i.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?i.a.createElement("div",{style:{position:"absolute",right:33,top:"calc(50% - 15px)",fontSize:10,textAlign:"right",backgroundColor:"#f1f1f1",paddingLeft:7}},vt(n.completed_at)):i.a.createElement(i.a.Fragment,null)),(!e.showCard||!e.dragStatus&&e.showCard)&&i.a.createElement(Ct,{title:"completed"!==n.status?tt("$__conclude",1):tt("$__undoConclude",1),color:"completed"!==n.status?"lightgrey":"grey",icon:"completed"!==n.status?"radio_button_unchecked":"check_circle",onClick:function(){m()},transparent:!0}))))})));function Io(){Io=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Fo=Ge.default.div(So||(So=Object(Te.a)(["\n background-color:none\n ","\n "])),(function(e){return e.isDragDisable?"":e.isDragging?"opacity:0.88":""})),To=Object(Fe.b)((function(e){return{cards:e.db.cards}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState(),r=t.db,n=t.session,a=Ce.getState().functions.socket,o=i.a.useState(e.name?e.name:""),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.a.useState(!1),d=Object(Ae.a)(u,2),p=d[0],f=d[1],m=i.a.useState(!1),g=Object(Ae.a)(m,2),v=g[0],y=g[1],b=Be()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),x=i.a.useState(!e.myDay),_=Object(Ae.a)(x,2),w=(_[0],_[1],window.location.hash.split("/"));w[0]=w[0].replace("#",""),36!==w[0].length&&(w[0]=null);var E={};Ce.getState().db[e.db]&&Ce.getState().db[e.db][e.nodeId]&&(E=Ce.getState().db[e.db][e.nodeId]);var j=Object.keys(Ce.getState().db.cards).filter((function(t){return!(e.myDay||!(!e.noChecklist&&Ce.getState().db.cards[t]&&!Ce.getState().db.cards[t].deleted&&Ce.getState().db.cards[t].checklist&&Ce.getState().db.cards[t]._parent===e.nodeId||e.noChecklist&&!Ce.getState().db.cards[t].deleted&&!Ce.getState().db.cards[t].checklist&&Ce.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&&Be()(new Date(1e3*r.cards[t]._users[n._id].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===b&&Ce.getState().db.cards[t])||Ce.getState().db.cards[t].deleted||Ce.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})),k=function(){var t=Object(Ne.a)(Io().mark((function t(){var r,a;return Io().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=Ce.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(Ne.a)(Io().mark((function t(r){var a;return Io().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(O.a)({},r.log._id,Object(h.a)(Object(h.a)({},r.log),{},{_parent:[r.id]})),_users:Object(O.a)({},n._id,{name:Ce.getState().db.users[n._id].name?Ce.getState().db.users[n._id].name:null,displayName:Ce.getState().db.users[n._id].displayName?Ce.getState().db.users[n._id].displayName:null,image:Ce.getState().db.users[n._id].image?Ce.getState().db.users[n._id].image:null,access:5,_id:n._id})}),e.myDay?Wn(e,{_id:r.id,userId:n._id,option:!0},{new:!0,user:n._id,cardId:r.id,data:a}):Rn(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)}}(),S=function(){var t=Object(Ne.a)(Io().mark((function t(n){var o,i,c,l,s,u;return Io().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(y(!1),o=n.destination,i=n.source,c=n.draggableId,l=Array.from(j.filter((function(e){return"completed"!==r.cards[e].status})).map((function(e){return e}))),console.log(c,i.index,o.index,j.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),j.filter((function(e){return"completed"===r.cards[e].status})).length>0&&j.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 a.emit("data",{module:"cards",method:"put",action:"reorder"},{cards:s}),u=Object(h.a)({},Ce.getState().db.cards),s.map((function(e,t){return u=Object(h.a)(Object(h.a)({},u),{},Object(O.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)({},Ce.getState().db),{},{cards:Object(h.a)({},u)})),t.abrupt("return");case 19:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),L=function(){var e=Object(Ne.a)(Io().mark((function e(t){return Io().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:y(!0);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),C=function(){var e=Object(Ne.a)(Io().mark((function e(t){return Io().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 i.a.createElement("div",{style:{width:"100%"},onClick:function(e){return e.stopPropagation()}},e.showProgress&&j.length>0?i.a.createElement("div",{style:{position:"relative",width:"100%"}},i.a.createElement("div",{style:{position:"absolute",right:7,bottom:0,fontSize:9,color:at("menu"),fontWeight:"bold"}},j.filter((function(e){return"completed"===r.cards[e].status})).length,"/",i.a.createElement("span",{style:{fontWeight:"normal"}},j.length)),i.a.createElement("div",{style:{position:"relative",width:"100%",height:5,backgroundColor:"lightGray"}},i.a.createElement("div",{style:{position:"absolute",top:0,left:0,bottom:0,backgroundColor:at("menu"),width:"".concat(100/j.length*j.filter((function(e){return"completed"===r.cards[e].status})).length,"%")}}))):i.a.createElement(i.a.Fragment,null),j.filter((function(e){return"completed"!==r.cards[e].status})).length>0?i.a.createElement(Oo.a,{onDragEnd:S,onDragStart:L,onDragUpdate:C},i.a.createElement(Oo.c,{droppableId:"Drop_tasks",type:"column",direction:"vertical"},(function(t,n){return i.a.createElement(Fo,Object.assign({ref:t.innerRef},t.droppableProps,{isDraggingOver:n.isDraggingOver}),j.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 i.a.createElement(Oo.b,{draggableId:t,index:n,key:"".concat(t).concat(n)},(function(n,a){return i.a.createElement(Co,{dragStatus:v,provided:n,snapshot:a,data:r.cards[t],db:"cards",selectable:!0,noDelete:!!e.noDelete&&e.noDelete,showCard:!!e.showCard})}))})),t.placeholder)}))):i.a.createElement(i.a.Fragment,null),j.filter((function(e){return"completed"===r.cards[e].status})).length>0?i.a.createElement(i.a.Fragment,null,j.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 i.a.createElement("div",{key:"".concat(t).concat(n)},i.a.createElement(Co,{data:r.cards[t],db:"cards",selectable:!0,noDelete:!!e.noDelete&&e.noDelete,showCard:!!e.showCard}))}))):i.a.createElement(i.a.Fragment,null),!p&&i.a.createElement("div",{style:{position:"relative",float:"right",width:"100%",padding:"7px",display:"flex",alignContent:"flex-end",justifyContent:"center"}},i.a.createElement("div",null,i.a.createElement(Xr,{reverse:!0,text:tt("$__add","*"),icon:"add_box",iconColor:at("medium"),onClick:function(){f(!p)}}))),p&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px",display:"flex",alignItems:"center"}},i.a.createElement("div",{style:{width:"calc(100% - 50px)",display:"flex"}},i.a.createElement(ya,{label:tt("$__taskTitle"),variant:at("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&&k(),27===e.keyCode&&(f(!p),s(""))}},autoFocus:!0,value:l,placeholder:tt("$__taskTitlePlaceholder")})),i.a.createElement("div",{style:{display:"flex"}},i.a.createElement(Ct,{title:tt("$__save",1),color:"green",icon:"save",onClick:function(e){k()},transparent:!0}),i.a.createElement(Ct,{title:tt("$__cancel",1),color:"lightgrey",icon:"cancel",onClick:function(e){f(!p),s("")},transparent:!0})))))}));function No(){No=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Ao=function(e){var t=Ce.getState(),r=t.db,n=t.session,a=i.a.useState({}),o=Object(Ae.a)(a,2),c=o[0],l=o[1];i.a.useEffect((function(){return e.id&&r.cards[e.id]&&u(),function(){}}),[]);var s=ft(),u=function(){var t=Object(Ne.a)(No().mark((function t(){return No().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=l,t.next=3,Zn(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 o=ea(t);if(c[t].icon&&c[t].type&&c[t].name)return i.a.createElement("div",{style:{marginRight:"10px",width:"100%"},key:a},i.a.createElement("div",{style:{display:"flex",cursor:"pointer"},onClick:e.open&&(s.planAdmin||s.planModerate||o>=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},i.a.createElement(Ur,{overlap:"rectangular",icon:c[t].icon,title:"".concat(tt("$__".concat(c[t].type),"*"),": ").concat(c[t].name),size:"16px",color:at("color")}),i.a.createElement("span",{style:{marginLeft:"5px"}},c[t].name)))}));return i.a.createElement("div",{style:{width:"calc(100% - 5px)"},onClick:function(e){e.stopPropagation()}},e.showLegend?i.a.createElement("fieldset",{style:{marginBottom:"14px",width:"100%"}},i.a.createElement("legend",null,tt("$__connectedIn",1)),d):d)},Do=r(1695),Po={root:Object(h.a)({},Ut),aspectsTitle:{width:"100%",fontWeight:"bold",padding:"3px",color:at("color"),display:"flex",alignItems:"center"}},zo=Object(_t.a)(Po);var $o=Object(Fe.b)((function(e){return{}}),(function(e){return Object(u.b)(n,e)}))((function(e){console.log(e.data);var t=Ce.getState().db,r=zo(),n=i.a.useState(!1),a=Object(Ae.a)(n,2),o=(a[0],a[1],i.a.useState([])),c=Object(Ae.a)(o,2),l=c[0],s=c[1];i.a.useEffect((function(){var r=[];return e.data&&e.data.length>0&&e.data.map((function(e){r.push(t.cards[e])})),s(r),function(){}}),[e.data]);var u="guidelineD"===e.type||"guidelineR"===e.type?l.filter((function(e){return e&&"strength"===e.type})):l.filter((function(e){return e&&"weakness"===e.type})),d="guidelineD"===e.type||"guidelineE"===e.type?l.filter((function(e){return e&&"threat"===e.type})):l.filter((function(e){return e&&"opportunity"===e.type})),p="guidelineD"===e.type||"guidelineR"===e.type?"strength":"weakness",f="guidelineD"===e.type||"guidelineE"===e.type?"threat":"opportunity",h="guidelineD"===e.type||"guidelineR"===e.type?"forces":"weaknesses",m="guidelineD"===e.type||"guidelineE"===e.type?"threats":"opportunities";return i.a.createElement("div",{className:r.root},i.a.createElement("div",{className:r.aspectsTitle},i.a.createElement(xt,{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:at("color"),title:tt(p,1)}),i.a.createElement("span",{style:{marginLeft:"5px"}},tt("$__internalAspects",1)," - ",tt("$__".concat(h),1))),u&&u.length>0&&u.sort((function(e,t){return e.name-t.name})).map((function(e,t){return i.a.createElement(Do.a,{size:"small",label:e.name,title:e.name,style:{margin:"3px",maxWidth:"100%",overflow:"hidden"},key:e._id})})),i.a.createElement("div",{className:r.aspectsTitle},i.a.createElement(xt,{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:at("color"),title:tt(f,1)}),i.a.createElement("span",{style:{marginLeft:"5px"}},tt("$__externalAspects",1)," - ",tt("$__".concat(m),1))),d&&d.length>0&&d.sort((function(e,t){return e.name-t.name})).map((function(e,t){return i.a.createElement(Do.a,{size:"small",label:e.name,title:e.name,style:{margin:"3px",maxWidth:"100%",overflow:"hidden"},key:e._id})})))})),Mo=r(657),Bo=r.n(Mo);function Yo(){Yo=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Go=Object(Fe.b)((function(e,t){return{card:e.db.cards[t.data._id]}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(no)((function(e){var t=e.classes,r=Ce.getState(),n=r.db,a=r.session,o=r.timeline,c=i.a.useState(null),l=Object(Ae.a)(c,2),s=l[0],u=l[1],d=i.a.useState(!0),p=Object(Ae.a)(d,2),f=p[0],m=p[1],g=i.a.useState(!1),v=Object(Ae.a)(g,2),y=(v[0],v[1],i.a.useState(!1)),b=Object(Ae.a)(y,2),x=b[0],_=b[1],w=i.a.useState(!1),E=Object(Ae.a)(w,2),O=E[0],j=E[1],k=e.data&&e.data._id?Ce.getState().db.cards[e.data._id]:{},S=(ft(),window.location.hash.split("/"));S[0]=S[0].replace("#",""),i.a.useEffect((function(){return k._parent&&(!S[0]||S[0]&&36!==S[0].length)?L():j(!1),function(){}}),[]);var L=function(){var t=Object(Ne.a)(Yo().mark((function t(){var r;return Yo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(!k._loadTimeline||k._loadTimeline&&!k._loadTimeline.kpi)&&k.kpi_type&&"task"!==k.kpiType&&"timer"!==k.kpiType&&"time"!==k.kpiType&&vo(Object(h.a)(Object(h.a)({},e),{},{fnIdentification:"Card/index/init()"}),{ids:[k._id],db:"cards",type:"kpi"}),r=function(){var t=Object(Ne.a)(Yo().mark((function t(a){return Yo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.cards[a]){t.next=8;break}return j(!0),t.next=4,En(Object(h.a)(Object(h.a)({},e),{},{ignoreLoader:!0}),{idRel:[a],cardLoad:"parents"});case 4:t.sent&&j(!1),t.next=9;break;case 8:n.cards[a]&&n.cards[a]._parent?r(n.cards[a]._parent)&&j(!1):j(!1);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),function(){var e=Object(Ne.a)(Yo().mark((function e(){return Yo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r(k._parent);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()();case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();if(O)return i.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"}},i.a.createElement("span",{style:{color:at("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},tt("$__loadingData")),i.a.createElement(so,null));if(!k||!e.data||!e.data._id)return null;var C=function(){var t=Object(Ne.a)(Yo().mark((function t(){var r,n=arguments;return Yo().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:k._id,module:"cardEdit",activeModule:r,data:k}));case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),I=!1,F=i.a.createElement(i.a.Fragment,null);if(k&&k.url&&k.url.indexOf(".youtube.com/watch?")>-1){var T=k.url.split("?")[1].split("v=")[1].split("&")[0];T&&(F=i.a.createElement("iframe",{width:"560",height:"315",style:{top:0,width:"100%",maxWidth:"500px",height:"100%",alignSelf:"center",position:"absolute",overflow:"hidden"},src:"https://www.youtube.com/embed/".concat(T),title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),I=!0)}if(k&&k.url&&k.url.indexOf("youtu.be/")>-1){var N=k.url.split("youtu.be/")[1];N&&(F=i.a.createElement("iframe",{width:"560",height:"315",style:{top:0,width:"100%",maxWidth:"500px",height:"100%",alignSelf:"center",position:"absolute",overflow:"hidden"},src:"https://www.youtube.com/embed/".concat(N),title:k.name,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),I=!0)}return i.a.createElement("div",null,i.a.createElement("div",null,i.a.createElement("div",Object.assign({},e.provided&&e.provided.dragHandleProps,{style:{display:"none"}})),i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:t.infos,onClick:function(t){e.onClick&&e.onClick()}},k.image&&(k.image||e.Avatar||k.image||e.Avatar)&&!a.cards.hide.image?i.a.createElement("div",{className:t.imagePreview,style:s?{backgroundImage:'url("'.concat(s||Zr.a,'")')}:{background:at("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},I?F:k.image&&!s?i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{marginTop:"calc(-48% - ".concat("insight"===k.type||"link"===k.type?"10px":"0px",")"),display:"flex",justifyContent:"center",alignItems:"center"}},"insight"===k.type||"link"===k.type?i.a.createElement(xt,{icon:U.a,size:"39px",color:"rgba(250,250,250,0.77)"}):i.a.createElement("img",{src:Bo.a,style:{width:"25%"}})),!f&&i.a.createElement("div",{style:{position:"absolute",marginTop:"calc(-48% + 0px)",zIndex:1}},i.a.createElement(Gr,null))):i.a.createElement(i.a.Fragment,null),!I&&(!s||e.Avatar||k.image!==s)&&i.a.createElement(i.a.Fragment,null,i.a.createElement("img",{className:t.image,src:"".concat(k.image?k.image:Zr.a),onError:function(e){k.image?u(null):m(!0)},onLoad:function(t){u("".concat(e.Avatar&&!k.image?Zr.a:k.image))},width:"100%"}))):e.Avatar&&!a.cards.hide.image&&i.a.createElement("div",{className:n.viewList?t.imagePreviewList:t.imagePreview,style:{background:at("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},i.a.createElement("div",{style:{marginTop:"calc(-48% - ".concat("insight"===k.type||"link"===k.type?"10px":"0px",")"),display:"flex",justifyContent:"center",alignItems:"center"}},"insight"===k.type||"link"===k.type?i.a.createElement(xt,{icon:U.a,size:"39px",color:"rgba(250,250,250,0.77)"}):i.a.createElement("img",{src:Bo.a,style:{width:"25%"}}))),"swot"!==n.dataType.filter((function(e){return e.name===k.type}))[0].module&&(k._parent&&k._parent!==k._id||k._planId&&k._planId!==k._id)&&i.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",paddingTop:"7px"}},"SQUASH"===k.name&&console.log(k),n.cards[k._parent]?i.a.createElement(Ao,{id:k._parent&&Ce.getState().db.cards[k._parent]?k._parent:k._planId&&Ce.getState().db.cards[k._planId]?k._planId:null,open:function(e){},loading:O,showLegend:!e.Resume}):i.a.createElement(i.a.Fragment,null)),i.a.createElement("div",{style:!n.viewList||e.ignoreList?{}:{position:"relative",float:"left",width:"100%"}},k.type.indexOf("guideline")>-1&&(k._aspects&&k._aspects.length>0||k._aspects&&k._aspects.length>0)?i.a.createElement($o,{data:k._aspects,type:k.type}):i.a.createElement(i.a.Fragment,null),!e.searchText&&k.description&&i.a.createElement(Ue.a,{title:k.description||""},e.Resume?i.a.createElement("div",{className:t.description},k.description.substr(0,150),"..."):i.a.createElement("div",{className:t.description,style:{wordBreak:"break-word"},dangerouslySetInnerHTML:{__html:rt(k.description)}})),k.kpi_type&&!a.cards.hide.kpi&&i.a.createElement(Eo,{data:k,chartShow:!a.cards.hide.kpiChart}),i.a.createElement(Sa.a,{max:100,className:t.indicators},(k._timelineCount&&k._timelineCount>0||o[k._id]&&Object.keys(o[k._id]).filter((function(e){return"comment"===o[k._id][e].type})).length>0)&&i.a.createElement(Ur,{overlap:"rectangular",className:t.indicatorsIcon,icon:"timeline",title:"$__timeline",size:"16px",onClick:function(){return!e.onlyOption&&C("timeline")},disabled:!0,count:o[k._id]&&Object.keys(o[k._id]).filter((function(e){return"comment"===o[k._id][e].type})).length>0?Object.keys(o[k._id]).filter((function(e){return"comment"===o[k._id][e].type})).length:k._timelineCount}),(k._logCount&&k._logCount>0||o[k._id]&&Object.keys(o[k._id]).filter((function(e){return"log"===o[k._id][e].type})).length>0)&&i.a.createElement(Ur,{overlap:"rectangular",className:t.indicatorsIcon,icon:"history",title:"$__log",size:"16px",onClick:function(){return!e.onlyOption&&C("log")},disabled:!0}),(k._kpiCount&&k._kpiCount>0||o[k._id]&&Object.keys(o[k._id]).filter((function(e){return"kpi"===o[k._id][e].type})).length>0)&&i.a.createElement(Ur,{overlap:"rectangular",className:t.indicatorsIcon,icon:"analytics",title:"$__kpi",size:"16px",onClick:function(){return!e.onlyOption&&C("kpi")},disabled:!0,count:o[k._id]&&Object.keys(o[k._id]).filter((function(e){return"kpi"===o[k._id][e].type})).length>0?Object.keys(o[k._id]).filter((function(e){return"kpi"===o[k._id][e].type})).length:k._kpiCount}),(k._timerCount&&k._timerCount>0||o[k._id]&&Object.keys(o[k._id]).filter((function(e){return"timer"===o[k._id][e].type})).length>0)&&i.a.createElement(Ur,{overlap:"rectangular",className:t.indicatorsIcon,icon:"timer",title:"$__timeSheet",size:"16px",onClick:function(){return!e.onlyOption&&C("timeLog")},disabled:!0,count:o[k._id]&&Object.keys(o[k._id]).filter((function(e){return"timer"===o[k._id][e].type})).length>0?Object.keys(o[k._id]).filter((function(e){return"timer"===o[k._id][e].type})).length:k._timerCount}),k&&k._id&&Ce.getState().db.cards&&Object.keys(Ce.getState().db.cards).length>0&&Object.keys(Ce.getState().db.cards).filter((function(e){return k&&k._id&&Ce.getState().db.cards[e]&&Ce.getState().db.cards[e].checklist&&Ce.getState().db.cards[e]._parent===k._id})).length>0&&i.a.createElement(Ur,{overlap:"rectangular",className:t.indicatorsIcon,icon:"checklist",title:"$__listOfTasks",size:"16px",onClick:function(){return!e.onlyOption&&_(!x)},disabled:!0,count:Ce.getState().db.cards&&Object.keys(Ce.getState().db.cards).length>0&&Object.keys(Ce.getState().db.cards).filter((function(e){return k&&k._id&&Ce.getState().db.cards[e]&&Ce.getState().db.cards[e].checklist&&Ce.getState().db.cards[e]._parent===k._id})).length})),("link"===k.type||"insight"===k.type)&&i.a.createElement("div",{className:t.dates},i.a.createElement("div",{className:t.dateInfo},i.a.createElement(Ur,{overlap:"rectangular",className:t.dateIco,icon:"event_available",title:"$__pubDate",size:"14px",disabled:!0}),Be()(1e3*k.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm")))))),(x||"link"!==k.type&&"insight"!==k.type&&"plan"!==k.type&&Object.keys(Ce.getState().db.cards).filter((function(e){return Ce.getState().db.cards[e]&&Ce.getState().db.cards[e].checklist&&Ce.getState().db.cards[e]._parent===k._id})).length>0)&&i.a.createElement("div",{style:{position:"relative",width:"calc(100%)",top:"16px",clear:"both",marginBottom:"16px"}},i.a.createElement("div",{style:{padding:"7px",backgroundColor:"rgba(0,0,0,0.05)",fontSize:"16px",borderTopLeftRadius:7,borderTopRightRadius:7}},tt("$__checklist",1)),i.a.createElement(To,{nodeId:k._id,db:"cards",noDelete:!0,showProgress:!0}),i.a.createElement("div",{style:{clear:"both"}}))))}))),Ro=r(913),Ho=r.n(Ro),Wo=r(914),Uo=r.n(Wo),Vo=r(494),qo=r(335),Xo=r(495),Ko=r.n(Xo),Jo=Object(_t.a)((function(e){return{iconButtonStyle:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));function Zo(e){var t=Jo();return i.a.createElement(Ue.a,{title:e.title?e.title:""},i.a.createElement(jt.a,{onClick:e.onClick?function(t){e.onClick()}:null,className:t.iconButtonStyle},i.a.createElement(xt,{usePropagation:!0,size:e.size?e.size:"20px",color:e.color?e.color:at("menu"),icon:e.icon?e.icon:"circle"})))}var Qo=r(1661),ei={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(O.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:at("color")}},zIndex:500,bottom:"100%",top:"none",left:"33px",height:"auto",maxHeight:"151px !important",overflow:"auto !important"}},ti=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(O.a)(t,e.breakpoints.down("sm"),{left:"30px !important"}),Object(O.a)(t,"color","#FFF"),Object(O.a)(t,"width","30px"),Object(O.a)(t,"height","30px"),Object(O.a)(t,"lineHeight","25px"),Object(O.a)(t,"fontSize","12px"),Object(O.a)(t,"textAlign","center"),Object(O.a)(t,"position","absolute"),Object(O.a)(t,"bottom","23px"),Object(O.a)(t,"left","50%"),Object(O.a)(t,"marginLeft","-24px"),Object(O.a)(t,"zIndex","1"),Object(O.a)(t,"borderTopRightRadius","50%"),Object(O.a)(t,"borderTopLeftRadius","50%"),Object(O.a)(t,"borderBottomRightRadius","50%"),Object(O.a)(t,"borderBottomLeftRadius","50%"),Object(O.a)(t,"display","flex"),Object(O.a)(t,"alignItems","center"),Object(O.a)(t,"justifyContent","center"),t),timelineSimpleBadge:{left:"30px"},custom:{backgroundColor:at("color"),boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt("#000")+", 0.4)"},info:{backgroundColor:Jt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(Jt[0])+", 0.4)"},success:{backgroundColor:Kt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(Kt[0])+", 0.4)"},danger:{backgroundColor:Xt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(Xt[0])+", 0.4)"},warning:{backgroundColor:qt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(qt[0])+", 0.4)"},primary:{backgroundColor:Vt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(Vt[0])+", 0.4)"},badgeIcon:{width:"14px",height:"14px"},timelinePanel:(r={},Object(O.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(O.a)(r,"width","45%"),Object(O.a)(r,"float","left"),Object(O.a)(r,"padding","7px"),Object(O.a)(r,"marginBottom","5px"),Object(O.a)(r,"position","relative"),Object(O.a)(r,"boxShadow","0 1px 4px 0 rgba("+Gt("#000")+", 0.14)"),Object(O.a)(r,"borderRadius","6px"),Object(O.a)(r,"color","rgba("+Gt("#000")+", 0.87)"),Object(O.a)(r,"background","#FFF"),Object(O.a)(r,"&:before",{position:"absolute",bottom:"16px",right:"-15px",display:"inline-block",borderTop:"15px solid transparent",borderLeft:"15px solid "+Qt[10],borderRight:"0 solid "+Qt[10],borderBottom:"15px solid transparent",content:'" "'}),Object(O.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(O.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:at("medium")},footerLine:{position:"relative",marginTop:"10px",marginBottom:"5px"},dropFile:{display:"none"},onDropFile:Object(O.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:at("color")},progressBar:{backgroundColor:"".concat(at("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(at("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(at("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)({},Ut),{},{"& textarea":Object(h.a)(Object(h.a)({},Ut),{},{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(O.a)(n,"outline","none"),Object(O.a)(n,"fontSize","0.9rem"),Object(O.a)(n,"color","#7288a3"),Object(O.a)(n,"borderColor"," #3a546f"),Object(O.a)(n,"overflow","hidden"),Object(O.a)(n,"&& :: placeholder",{color:"#7288a3"}),n)}}}},ri=r(1660),ni=["children","className"],ai=Object(_t.a)({grid:{margin:"0",width:"100%"}});function oi(e){var t=ai(),r=e.children,n=e.className,a=Object(Yt.a)(e,ni);return i.a.createElement(ri.a,Object.assign({container:!0},a,{className:t.grid+" "+n}),r)}var ii=["children","className"],ci=Object(_t.a)({grid:{padding:"0 15px !important"}});function li(e){var t=ci(),r=e.children,n=e.className,a=Object(Yt.a)(e,ii);return i.a.createElement(ri.a,Object.assign({item:!0},a,{className:t.grid+" "+n}),r)}function si(){si=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 ui=Object(Fe.b)((function(){return{}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(ti)((function(e){var t=Ce.getState(),r=t.db,n=t.session,a=e.classes,o=i.a.useState(0),c=Object(Ae.a)(o,2),l=(c[0],c[1],i.a.useState("")),s=Object(Ae.a)(l,2),u=s[0],d=s[1],p=i.a.useState(!1),m=Object(Ae.a)(p,2),g=m[0],v=m[1],y=i.a.useState(!1),b=Object(Ae.a)(y,2),x=b[0],_=b[1],w=i.a.useState([]),E=Object(Ae.a)(w,2),j=E[0],k=E[1],S=i.a.useState([]),L=Object(Ae.a)(S,2),C=L[0],I=L[1],F=i.a.useState({}),T=Object(Ae.a)(F,2),N=T[0],A=T[1],D=i.a.useState(null),P=Object(Ae.a)(D,2),z=P[0],$=P[1],M=i.a.useState(null),B=Object(Ae.a)(M,2),Y=B[0],G=B[1],R=i.a.useState(!1),H=Object(Ae.a)(R,2),W=H[0],U=H[1],V=i.a.useState([]),q=Object(Ae.a)(V,2),X=q[0],K=q[1],J=i.a.useState(!1),Z=Object(Ae.a)(J,2),Q=Z[0],ee=Z[1],te=i.a.createRef(),re=ft(),ne=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}))]&&(ne=r.cards[e.nodeId]._users[Object.keys(r.cards[e.nodeId]._users).find((function(e){return e.indexOf(n._id)>-1}))]);var ae=window.location.hash.split("/");ae[0]=ae[0].replace("#",""),i.a.useEffect((function(){return function(){}}),[]);var oe=function(){var e=Object(Ne.a)(si().mark((function e(){return si().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ie=function(){var e,t=[];if(e=u){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},ce=function(){var t=Object(Ne.a)(si().mark((function t(){var a,o,i,c,l;return si().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:a={_id:Object(Sn.a)(),idRel:e.nodeId,replyData:e.replyData?e.replyData:{},reply:e.replyData?e.replyData._id:null,message:u,type:"comment",mentions:ie(),notifyUsers:i,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"},Y&&(a=Object(h.a)(Object(h.a)({},a),{},{urlPreview:JSON.stringify(Y)}),G(null)),d(""),o=Ce.getState().functions.socket,ee(!1),j.length>0&&v(!0),i=[],c=ie(),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===c.indexOf(e)})).map((function(e){i.push(e)})),e.onSending&&e.onSending(Object(h.a)(Object(h.a)({},a),{},{user:Object(h.a)({},r.users[n._id])})),(l=Object(h.a)(Object(h.a)({},a),{},{created_at:"".concat(Be()().unix("x")),user:Object(h.a)({},r.users[n._id])})).mentions&&delete l.mentions,l.notifyUsers&&delete l.notifyUsers,l.db&&delete l.db,go({reduxFunction:e.reduxFunction},Object(h.a)(Object(h.a)({},a),{},{comment:l})),o.emit("data",{module:"timeline",method:"post",action:"add"},a,(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?ue({comment:n,dataMessage:a}):(e.onSending&&e.onSending(),c.map(function(){var t=Object(Ne.a)(si().mark((function t(n){return si().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,Ba(e,n,2,e.nodeId);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),I([]),k([]),K([]),G(null),U(!1),v(!1),e.onSending&&e.onSending())}}));case 16:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),le=function(){var e=Object(Ne.a)(si().mark((function e(t,r){var n;return si().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Math.round(100*t.loaded/t.total),A(Object(h.a)(Object(h.a)({},N),{},Object(O.a)({},r,n)));case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),se=function(){var e=Object(Ne.a)(si().mark((function e(t,r){return si().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:$({options:t,fi:r}),A({});case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),ue=function(){var t=Object(Ne.a)(si().mark((function t(r){var n,a,o,i,c,l,s=arguments;return si().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=s.length>1&&void 0!==s[1]?s[1]:0,a=s.length>2&&void 0!==s[2]?s[2]:[],o=Ce.getState().functions.socket,i=r.comment,c=r.dataMessage,(l=Array.from(j)).map(function(){var t=Object(Ne.a)(si().mark((function t(s,u){var d,p;return si().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u!==n){t.next=5;break}return t.next=3,_n(i._id,s,!0,{onUploadProgress:function(e){return le(e,u)},onUploadError:function(e){se(r,u)}});case 3:(d=t.sent)&&((p=Array.from(a)).push(d),I(p),l.length>n+1?ue(r,n+1,p):l.length===n+1&&(c.files=p,setTimeout((function(){o.emit("data",{module:"timeline",method:"post",action:"add"},c)}),1e3),I([]),k([]),G(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)}}(),de=function(){var e=Object(Ne.a)(si().mark((function e(t){return si().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:k([].concat(Object(f.a)(j),Object(f.a)(Object.keys(t).map((function(e){return t[e]}))))),_(!1);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),pe=function(){var e=Object(Ne.a)(si().mark((function e(t){var r,n,a,o,i;return si().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Ce.getState().functions.socket,d(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:ae[0],url:n},(function(e){e&&e.title&&e.img&&e.contentSnippet?G(e):(U(!1),U(!1))}))}catch(c){U(!1),(i=X).push(n),K(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)}}(),fe=[];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(fe).filter((function(e){return fe[e].id===a})).length&&fe.push({id:a,display:o})}})),r.cards[e.nodeId]&&!r.cards[e.nodeId].private&&(re&&(re.owner||re.planAdmin||re.planModerate)||ne&&ne.access&&parseInt(ne.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(fe).filter((function(e){if(fe[e].id===t)return!0})).length&&fe.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})}));var he=0;return document.getElementById("sendingInput_".concat(e.nodeId))&&document.getElementById("sendingInput_".concat(e.nodeId)).offsetHeight&&(he=document.getElementById("sendingInput_".concat(e.nodeId)).offsetHeight),i.a.createElement(Vo.FileDrop,{ref:te,className:e.relative?a.rootRelative:a.root,onDragOver:function(){!e.disabledSend&&_(!0)},onDrop:de,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"},i.a.createElement(i.a.Fragment,null,e.nodeId&&!e.disabledSend?i.a.createElement("div",{className:e.relative?a.editorRelative:a.editor,style:e.editorStyle?e.editorStyle:{}},i.a.createElement("div",{className:a.files,style:Object(h.a)(Object(h.a)({paddingBottom:"80px"},j.length>0?{marginBottom:he}:{}),{},{width:"calc(100% - 15px)"})},i.a.createElement(oi,{style:{maxHeight:"210px",overflowX:"auto"}},j&&j.length>0&&j.map((function(e,t){var n=e.name.split("."),o="attachment";return r.fileExtensions.filter((function(e){return e.ext.indexOf(n[n.length-1].toLowerCase())>-1})).length>0&&(o=r.fileExtensions.filter((function(e){return e.ext.indexOf(n[n.length-1].toLowerCase())>-1}))[0].icon||URL.createObjectURL(e)),i.a.createElement(li,{key:t,xl:4,lg:4,md:4,sm:12,xs:12},i.a.createElement("div",{style:{position:"relative",padding:7}},i.a.createElement("div",{style:{position:"relative",float:"left",width:"50px",height:"50px",marginRight:"7px",overflow:"hidden"}},"string"===typeof o&&-1===o.indexOf("blob:")&&-1===o.indexOf("svg")?i.a.createElement(xt,{icon:o,size:"50px"}):i.a.createElement("img",{src:o,style:{width:"100%",height:"100%"}})),i.a.createElement("div",null,e.name,C&&C.length>0&&C[t]?i.a.createElement(xt,{icon:"cloud_done",color:"green"}):g?i.a.createElement(i.a.Fragment,null):i.a.createElement(xt,{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?i.a.createElement(Ct,{title:tt("$__uploadFiles",1),text:tt("$__fileSendErrorClickToReSend"),color:"red",icon:"upload",onClick:function(){ue({comment:z.options.comment},z.fi,C),$(null)},size:"25px"}):N&&String(N[t])&&N[t]<100?i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{minWidth:177}},i.a.createElement(co.a,{variant:"buffer",className:a.progressBar,value:N[t]<90?N[t]:90,valueBuffer:N[t]})),i.a.createElement("div",{style:{color:at("color"),fontSize:10,marginLeft:15}},N[t]<90?N[t]:90,"%"))):i.a.createElement(i.a.Fragment,null)))})))),i.a.createElement("div",{className:a.textEditor},W&&!Y&&i.a.createElement("div",{className:a.urlPreview,style:{width:"100%",height:"150px"}},i.a.createElement("div",{style:{display:"flex"}},i.a.createElement("div",{style:{marginLeft:"7px",width:"200px",height:"110px",maxWidth:"50%"}},i.a.createElement(Qo.a,{variant:"rect",style:{width:"200px",height:"110px",maxWidth:"100%"}})),i.a.createElement("div",{style:{marginLeft:"7px",width:"100%",height:"25px"}},i.a.createElement(Qo.a,{variant:"text",height:25,style:{marginBottom:"7px"}}),i.a.createElement(Qo.a,{variant:"text",height:10}),i.a.createElement(Qo.a,{variant:"text",height:10}),i.a.createElement(Qo.a,{variant:"text",height:10}),i.a.createElement(Qo.a,{variant:"text",height:10}),i.a.createElement(Qo.a,{variant:"text",height:10}),i.a.createElement(Qo.a,{variant:"text",height:10})))),Y&&i.a.createElement(oi,{style:{marginBottom:15,backgroundColor:"#FFFFFF",padding:7}},i.a.createElement("div",{style:{position:"absolute",right:"20px"}},i.a.createElement(Ct,{title:tt("$__removePreview"),color:"red",icon:"delete_forever",size:"14px",onClick:function(){G(null),U(!1)}})),Y.img&&i.a.createElement(li,{xs:12,sm:6,md:4,lg:3,xl:2},i.a.createElement("img",{style:{width:"-webkit-fill-available"},src:"".concat(Y.img?Y.img:Zr.a),alt:Y.title||Y.link})),i.a.createElement(li,{xs:12,sm:6,md:8,lg:9,xl:10},i.a.createElement("div",{style:{fontSize:"14px",color:at("menu"),fontWeight:"bold"}},Y.title),Y.site&&i.a.createElement("div",{style:{fontSize:"12px"}},Y.site),Y.contentSnippet&&i.a.createElement("div",{style:{fontSize:"12px",color:"gray"}},Y.contentSnippet),i.a.createElement("a",{style:{marginTop:"15px",fontWeight:"bold",fontSize:"12px"},href:Y.link,target:"_blank"},tt("$__openLink","*")))),z?i.a.createElement("div",{style:{position:"relative",height:"60px",backgroundColor:"#ffffff",width:"100%",padding:15,textAlign:"center",display:"flex",justifyContent:"center"}},i.a.createElement(Ct,{title:tt("$__fileSendErrorClickToReSend",1),text:tt("$__fileSendErrorClickToReSend"),color:"red",icon:"upload",onClick:function(){ue({comment:z.options.comment},z.fi,C),$(null)},size:"25px"})):g?i.a.createElement("div",{style:{position:"relative",height:"60px",backgroundColor:"#ffffff",width:"100%",padding:15}},tt("$__sending",1),i.a.createElement(co.a,{className:a.progressBar})):i.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"}},i.a.createElement(qo.b,{id:"sendingInput_".concat(e.nodeId),value:u.trim().length>0?u:"",onChange:function(e){pe(e.target.value),oe()},onPaste:function(e){de(e.clipboardData.files)},placeholder:tt("$__writeMessage"),style:Object(h.a)(Object(h.a)({},ei),{},{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():u.length>0&&u.trim()&&u.trim().length>0?ce():d(""))},autoFocus:!0,placement:"top",forceSuggestionsAboveCursor:!0,autosize:{minRows:1,maxRows:6}},i.a.createElement(qo.a,{trigger:"@",data:fe,renderSuggestion:function(t,n,a){var o=r.users[t.id]?r.users[t.id]:t;if(t&&t.id)return i.a.createElement("div",{style:{display:"flex",alignItems:"center",position:"relative"}},i.a.createElement(Kr.a,{style:{position:"relative",width:"25px",height:"25px",marginRight:"7px"},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}),i.a.createElement("div",null,i.a.createElement("div",null,a),o&&o._parent&&Ce.getState().db.users[o._parent]&&Ce.getState().db.users[o._parent].name?i.a.createElement("div",{style:{fontSize:11,color:"lightgray",marginTop:-3}},Ce.getState().db.users[o._parent].name):i.a.createElement(i.a.Fragment,null)),o&&o._parent&&Ce.getState().db.users[o._parent]&&Ce.getState().db.users[o._parent].image?i.a.createElement("div",{style:{position:"absolute",bottom:4,right:-7,width:15,height:15,borderRadius:"50%",backgroundImage:"url(".concat(Ce.getState().db.users[o._parent].image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):i.a.createElement(i.a.Fragment,null))},style:{backgroundColor:at("color",.5),lineHeight:"17px",borderRadius:"7px",padding:"3px 2px",marginLeft:"-4px",fontWeight:"bold"}})),i.a.createElement("div",{style:{position:"absolute",right:"0px",bottom:"0px",cursor:"pointer",zIndex:100,display:"flex",alignItems:"center"}},i.a.createElement(Zo,{title:tt("$__emojis",1),icon:Q?"highlight_off":"sentiment_very_satisfied",color:at("medium"),onClick:function(){ee(!Q)}}),!g&&i.a.createElement("div",{className:a.actionButton},i.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 de(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"}),i.a.createElement(xt,{icon:"attachment",color:at("medium"),size:"22px"})),!g&&(u.trim().length>0||j.length>0)&&i.a.createElement(Zo,{title:tt("$__pressENTERtoSendorClickHere",1),icon:"send",color:at("menu"),onClick:function(){return ce()}}),e.closeOption&&i.a.createElement(xt,{title:tt("$__pressCRTL+ENTERtoSend",1),icon:"close",color:at("color"),onClick:function(){return e.onClose()}}),Q&&i.a.createElement("div",{style:{position:"absolute",bottom:"44px",right:"40px",zIndex:100}},i.a.createElement(Ko.a,{onEmojiClick:function(e,t){d("".concat(u," ").concat(t.emoji))},groupVisibility:{recently_used:!1}})))))):i.a.createElement("div",{className:e.relative?a.editorRelative:a.editor,style:{backgroundColor:"rgba(230,230,230,1)"}},tt("$__avaiableForViewingOnly")),i.a.createElement("div",{className:x?a.onDropFile:a.dropFile,onDragLeave:function(){!e.disabledSend&&_(!1)}},tt("$__dropTheFileToAttach","*"))))}))),di={header:Object(h.a)(Object(h.a)({},Ut),{},{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:at("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:at("color"),fontWeight:"500",alignItems:"center"}}};function pi(){pi=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 fi=Object(_t.a)(di);var hi=Object(Fe.b)((function(e,t){return{}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState(),r=t.session,n=t.functions.socket,a=fi(),o=i.a.useState(!1),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.a.useState(!1),d=Object(Ae.a)(u,2),p=d[0],f=d[1],m=i.a.useState(e.title?e.title.trim():null),g=Object(Ae.a)(m,2),v=g[0],y=g[1],b=i.a.useState(!1),x=Object(Ae.a)(b,2),_=x[0],w=x[1],E=i.a.useState(!1),O=Object(Ae.a)(E,2),j=O[0],k=O[1],S=e.customButtons&&e.customButtons.filter((function(e){return!1!==e}));i.a.useEffect((function(){l||(!e.title&&e.editable&&w(!0),s(!0))}));var L=function(){var t=Object(Ne.a)(pi().mark((function t(){return pi().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:v}),e.onEdit&&e.onEdit(v,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 i.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)}},i.a.createElement("div",{className:a.content},i.a.createElement("div",{className:a.info},e.icon&&i.a.createElement("div",{className:a.headerIcon,style:{color:e.color?e.color:at("color")}},i.a.createElement(Ur,{overlap:"rectangular",size:"calc(".concat(e.fontSize," + 4px)")||!1,icon:e.icon,color:"parent",title:e.iconTitle?e.iconTitle.substring(0,1).toUpperCase().concat(e.iconTitle.substring(1)):""})),e.searchText?i.a.createElement("div",{style:{marginLeft:"7px"}},dt(e.title?e.title:"",e.searchText)):i.a.createElement("div",{className:a.headerTitle,style:{fontSize:e.fontSize?e.fontSize:"16px",color:e.color?e.color:at("color"),paddingRight:"7px",marginLeft:e.icon?"7px":"none"},onDoubleClick:function(){e.onEdit&&e.editable&&(y(e.title?e.title.trim():""),w(!0))}},_?i.a.createElement("div",{style:{position:"relative",float:"left",width:"90%",paddingTop:"7px",display:"flex",alignItems:"center"}},i.a.createElement(ya,{label:e.placeholder?e.placeholder:tt("$__nameOfCard",1),variant:at("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){y(e.target.value)},onKeyDown:function(t){13===t.keyCode&&v&&L(),27===t.keyCode&&(w(!1),y(e.title?e.title.trim():""))}},value:v,placeholder:e.placeholder?e.placeholder:tt("$__titleOfCard_placeholder",1),autoFocus:!e.noAutoFocus,multiline:!!e.multiline}),(_||e.onSave)&&i.a.createElement(Ct,{title:tt("$__save",1),color:"green",icon:"save",onClick:function(){_?e.noCancel?v&&L():L():e.onSave()},size:e.actionsSize||"25px",transparent:!0}),(_||e.onCancel)&&i.a.createElement(Ct,{title:tt("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){_?e.noCancel?v&&w(!1):w(!1):e.onCancel()},size:e.actionsSize||"25px",transparent:!0})):i.a.createElement(Ue.a,{title:e.tooltipText?e.tooltipText:e.title?e.title:""},i.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?tt(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&&i.a.createElement("div",{style:{display:"flex",whiteSpace:"nowrap",marginRight:7}},tt(r.period),i.a.createElement(ga,{style:{color:at("menu"),height:"20px",width:"20px"}})),i.a.createElement("div",{className:a.actionButtons,style:Object(h.a)({},e.actionButtonsStyle?e.actionButtonsStyle:{})},e.actionsButtons&&e.onSave&&i.a.createElement(Ct,{title:tt("$__save",1),color:"green",icon:"save",onClick:function(){_?e.noCancel?v&&L():L():e.onSave()},size:e.actionsSize||"25px",transparent:!0}),e.actionsButtons&&e.onCancel&&i.a.createElement(Ct,{title:tt("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){_?e.noCancel?v&&w(!1):w(!1):e.onCancel()},size:e.actionsSize||"25px",transparent:!0}),!_&&e.timelineMessage&&p&&i.a.createElement("div",{className:a.button,style:{opacity:p?"1":"0"}},i.a.createElement(Ur,{overlap:"rectangular",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?i.a.createElement("div",{style:{position:"relative",minWidth:"220px"}},i.a.createElement(ui,{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)&&i.a.createElement("div",Object.assign({key:t,className:a.button},e.provided),i.a.createElement(Ct,{title:e.title?tt(e.title,1):tt(e.name,1),color:at(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)))})),mi=r(1662),gi=(r(1154),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 vi(){vi=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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=i.a.createRef(null);var bi=Object(Fe.b)((function(e){return{store:e}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(gi)((function(e){var t=i.a.useState(null),r=Object(Ae.a)(t,2),n=r[0],a=r[1],o=i.a.useState(!1),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.a.useState(null),d=Object(Ae.a)(u,2),p=d[0],f=d[1],h=i.a.useState([]),m=Object(Ae.a)(h,2),g=m[0],v=m[1],y=i.a.useRef(null),b=e.classes;i.a.useEffect((function(){x()}),[]),i.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])})),v(t))},_=function(){var t=Object(Ne.a)(vi().mark((function t(r){var n,o,i,c,l,u;return vi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=yi.current.getCroppedCanvas().toDataURL(),a(n),f(null),s(!1),o=y.current.files[0].name,i=y.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 Uo.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 i.a.createElement("div",{className:b.root},i.a.createElement("div",{className:b.viewer,style:{}},!n&&!e.img&&e.avatar&&e.avatarIcon&&i.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",marginTop:"15px"}},i.a.createElement("div",{style:{width:"133px",height:"133px",top:"-4px",left:"-13px",borderRadius:"50%",border:"solid 2px ".concat(at("color")),zIndex:"5 !important",background:at("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},i.a.createElement(xt,{size:"40px",color:"rgba(250,250,250,0.77)"},e.avatarIcon))),e.avatar||!n&&!e.img?e.avatar&&(n||e.img)?i.a.createElement("div",{style:{width:"133px",height:"133px",top:"-4px",left:"-13px",borderRadius:"50%",border:"solid 2px ".concat(at("color")),zIndex:"5 !important",background:at("AvatarBackground"),backgroundImage:'url("'.concat(n||e.img,'")'),backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"cover",display:"flex",alignItems:"center",justifyContent:"center"}}):i.a.createElement(i.a.Fragment,null):i.a.createElement("img",{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})}}()}})),i.a.createElement("div",null,e.onChange?i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{padding:"7px"},onClick:function(){y.current.click()}},i.a.createElement(Xr,{text:tt(n||e.img?"$__changeImage":"$__addImage",1),icon:n||e.img?"image":"add_a_photo",textColor:"color",iconColor:"color"})),i.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:y,id:"file-picker",name:"image",accept:".jpg,.jpeg,.png,.gif",style:{display:"none"}})):i.a.createElement(i.a.Fragment,null)),i.a.createElement(mi.a,{fullWidth:!0,onClose:function(){return s(!1)},"aria-labelledby":"simple-dialog-title",open:l},i.a.createElement("div",{style:{position:"relative",marginLeft:"10px",width:"calc(100% - 10px)",height:"45px",display:"flex"}},i.a.createElement(hi,{title:tt("$__cropImage",1),icon:"crop",onSave:function(){_()},onCancel:function(){s(!1)},actionsButtons:!0,actionButtonsStyle:{top:0,height:45,display:"flex",alignItems:"center"}})),i.a.createElement(Ho.a,{className:e.avatar?b.circleCropper:b.cropper,ref:yi,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 xi(){xi=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 _i,wi=Object(Fe.b)((function(){return{}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(no)((function(e){e.classes;var t=Ce.getState(),r=t.db,n=(t.session,t.timeline,t.functions,i.a.useState({})),a=Object(Ae.a)(n,2),o=a[0],c=a[1];i.a.useEffect((function(){c(Object(h.a)(Object(h.a)(Object(h.a)({},e.toTemplate&&r.cards[e.cardId].name?{name:"".concat(tt("$__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 l=i.a.useState({}),u=Object(Ae.a)(l,2),d=u[0],p=u[1],f=i.a.useState(0),m=Object(Ae.a)(f,2),g=m[0],v=m[1],y=Ce.getState().db.cards[e.cardId]&&Ce.getState().db.cards[e.cardId].type?r.dataType.filter((function(t){return t.name===Ce.getState().db.cards[e.cardId].type}))[0]:{},b=function(){var t=Object(Ne.a)(xi().mark((function t(){var n,a;return xi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o||o.name){t.next=4;break}p(Object(h.a)(Object(h.a)({},d),{},{name:!0})),t.next=15;break;case 4:return v(1),t.prev=5,n=Object(h.a)(Object(h.a)(Object(h.a)({},r.cards[e.cardId]),o),{},{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,Cn(e,!0,n);case 9:(a=t.sent)&&a._id&&(v(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(Ne.a)(xi().mark((function t(r){return xi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,ra(e,e.cardId,r);case 3:t.sent&&(v(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(Ne.a)(xi().mark((function t(r){var n,a;return xi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,En(e,{idRel:[r],cardLoad:"plans"});case 2:return n=t.sent,t.next=5,En(e,{idRel:[r],cardLoad:"plans",completed:!0});case 5:a=t.sent,n&&a&&(v(4),setTimeout((function(){e.onComplete&&e.onComplete(),e.toTemplate?s.push("sp#tab/templates"):s.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?i.a.createElement(cn.a,{style:{padding:"7px"}},i.a.createElement(_a,{title:"".concat(o.name?o.name:r.cards[e.cardId].name," "),icon:y&&y.icon?y.icon:"help",iconTitle:"$__".concat(r.cards[e.cardId].type),color:at("medium"),fontSize:"16px"}),1===g&&i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",clear:"both"}},i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},tt("$__installingTemplate")),i.a.createElement(so,null)),2===g&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex"}},i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},tt("$__templateInstalled")),i.a.createElement(xt,{icon:"done_all",color:"green"})),i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginTop:"15px"}},i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},tt("$__copyingData")),i.a.createElement(so,null))),3===g&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex"}},i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},tt("$__templateInstalled")),i.a.createElement(xt,{icon:"done_all",color:"green"})),i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex",marginTop:"15px"}},i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},tt("$__copiedData")),i.a.createElement(xt,{icon:"done_all",color:"green"})),i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginTop:"15px"}},i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},tt("$__preparingToRedirect")),i.a.createElement(so,null))),4===g&&i.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center"}},i.a.createElement("div",{style:{position:"relative",float:"left",padding:"15px",display:"flex",justifyContent:"center",borderRadius:"50%",border:"solid 1px green"}},i.a.createElement(xt,{icon:"done_all",color:"green",size:"50px"}))),i.a.createElement("div",{style:{clear:"both"}})):i.a.createElement(cn.a,{style:{padding:"7px"}},i.a.createElement(_a,{title:"".concat(tt("$__template",1),": ").concat(r.cards[e.cardId].name),icon:y&&y.icon?y.icon:"help",iconTitle:"$__".concat(r.cards[e.cardId].type),color:at("medium"),fontSize:"16px"}),i.a.createElement("div",null,i.a.createElement(bi,{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)({},o),{},{image:e,file:t}))},placeholder:""}),i.a.createElement(ya,{error:d&&d.name,helperText:tt("$__youMustDefineAName"),label:"".concat(tt("$__customName",1)),variant:at("fieldVariant"),name:"name",defaultValue:e.toTemplate&&r.cards[e.cardId].name?"".concat(tt("$__template")," - ").concat(r.cards[e.cardId].name):null,InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:i.a.createElement(Ja.a,{position:"start"},i.a.createElement(xt,{icon:"view_headline"})),onChange:function(e){c(Object(h.a)(Object(h.a)({},o),{},{name:e.target.value})),d&&d.name&&p(Object(h.a)(Object(h.a)({},d),{},{name:!1}))}},placeholder:tt(e.toTemplate?"$__templateName_placeholder":"$__planName_placeholder",1)}),i.a.createElement(ya,{label:"".concat(tt("$__customDescription",1)),variant:at("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:i.a.createElement(Ja.a,{position:"start"},i.a.createElement(xt,{icon:"toc"})),onChange:function(e){c(Object(h.a)(Object(h.a)({},o),{},{description:e.target.value}))}},placeholder:tt(e.toTemplate?"$__templateDescription_placeholder":"$__planDescription_placeholder",1),multiline:!0})),i.a.createElement("div",{style:{position:"relative",width:"100%",clear:"both",padding:"7px",backgroundColor:"#4caf50",marginTop:"7px",cursor:"pointer"},onClick:function(e){b(),e.stopPropagation()}},i.a.createElement(Xr,{text:tt("$__ready","*"),icon:"done_all",iconColor:"#FFFFFF",textColor:"#FFFFFF"})),i.a.createElement("div",{style:{position:"relative",width:"100%",clear:"both",padding:"7px",backgroundColor:"lightgrey",cursor:"pointer"},onClick:function(t){e.onComplete(),t.stopPropagation()}},i.a.createElement(Xr,{text:tt("$__cancel","*"),icon:"close",iconColor:"#FFFFFF",textColor:"#FFFFFF",onClick:e.onComplete?function(){e.onComplete()}:null})))})));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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Oi=Object(_t.a)(no),ji=Ge.default.div(_i||(_i=Object(Te.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(at("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(at("menu")," !important;"):""})),ki=Object(Fe.b)((function(e){return{cardsExpanded:e.db.cardsExpanded,showPrivate:e.controls.lockPrivate,cards:e.db.cards,unlockedPrivates:e.controls.unlockedPrivates,controls:e.controls}}),(function(e){return Object(u.b)(n,e)}))((function e(t){var r=Oi(),n=Ce.getState(),a=n.db,o=n.session,c=n.functions,l=t.data,u=(c.socket,i.a.useState(!1)),d=Object(Ae.a)(u,2),p=d[0],f=d[1],m=i.a.useState(!1),g=Object(Ae.a)(m,2),v=g[0],y=g[1],b=i.a.useState(!1),x=Object(Ae.a)(b,2),_=x[0],w=x[1],E=i.a.useState(!1),j=Object(Ae.a)(E,2),k=j[0],S=j[1],L=i.a.useState(t.cardColorPicker?Jn(l):{}),C=Object(Ae.a)(L,2),I=C[0],F=C[1];i.a.useEffect((function(){var e=!0;return e&&"0"===String(t.unlockedPrivates)&&k&&S(!1),function(){e=!1}}),[t.unlockedPrivates]);var T=window.location.hash.split("/");if(T[0]=T[0].replace("#",""),i.a.useEffect((function(){var e=!0;return e&&t.cardColorPicker&&T&&"overview"===T[1]&&F(Jn(l)),function(){e=!1}}),[t.cards]),l==={}||!l)return i.a.createElement(i.a.Fragment,null);var N=ft(),A=ea(l._id);if(!l||!t.data||!t.data._id)return null;var D=function(){var e=Object(Ne.a)(Ei().mark((function e(){var r,n,o;return Ei().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r={},Object.keys(a.cards).filter((function(e){return a.cards[e]&&!a.cards[e].deleted&&(a.cards[e]._planId===T[0]||a.cards[e]._parent===T[0])})).map((function(e){r=Object(h.a)(Object(h.a)({},r),{},Object(O.a)({},e,a.cards[e]))})),n=Object(h.a)({},Ce.getState().db.cards),o=!l._selected,"swot"!==a.dataType.filter((function(e){return e.name===l.type}))[0].module&&Object.keys(r).filter((function(e){return r[e]._id!==l._id&&r[e].type&&r[e].type===l.type})).map((function(e){r[e]._selected&&(r[e]._selected=!1)})),l.type.indexOf("guideline")>-1&&Object.keys(r).map((function(e){r[e]._selected&&(r[e]._selected=!1)})),l.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)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)(Object(h.a)({},n),r),{},Object(O.a)({},l._id,Object(h.a)(Object(h.a)(Object(h.a)({},Ce.getState().db.cards[l._id]),r[l._id]),{},{_selected:o})))})),"swot"===Ce.getState().db.dataType.filter((function(e){return e.name===l.type}))[0].module&&Nn(t),o&&"matrix"===Ce.getState().db.dataType.filter((function(e){return e.name===l.type}))[0].module&&Gn(t,l._id);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=function(){var e=Object(Ne.a)(Ei().mark((function e(){var r,n=arguments;return Ei().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)({},Ce.getState().sideModule),{},{db:t.db,id:l._id,module:"cardEdit",activeModule:r,data:l}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),z=function(){var e=Object(Ne.a)(Ei().mark((function e(){var r;return Ei().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,bn.post("/Card_Count",{id:l._id});case 2:r=e.sent,parseInt(r.data)>0?it({message:tt("$__concludeWithChildrensNotConcludedConfirm",1),autoClose:5e4,buttons:[{shadow:!0,title:tt("$__concludeAll"),text:tt("$__concludeAll"),color:"green",icon:"close",size:"25px",onClick:function(){aa(Object(h.a)(Object(h.a)({},t),{},{data:{_id:l._id}}),{status:"completed"===l.status?"inProgress":"completed"}),r&&parseInt(r.data)>0&&ca(t,l._id,"completed"===l.status?"inProgress":"completed")},style:{marginLeft:15}},{shadow:!0,title:tt("$__cancel"),text:tt("$__cancel"),color:"red",icon:"close",size:"25px",onClick:function(){},style:{marginLeft:15}}],variant:"warning",persist:!1,horizontal:"right"}):(aa(Object(h.a)(Object(h.a)({},t),{},{data:{_id:l._id}}),{status:"completed"===l.status?"inProgress":"completed"}),r&&parseInt(r.data)>0&&ca(t,l._id,"completed"===l.status?"inProgress":"completed"));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),$=function(){var e=Object(Ne.a)(Ei().mark((function e(t){return Ei().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:parseInt(A)>2||N.owner||N.plan&&(N.planAdmin||N.planModerate)?s.push("sp#".concat(t,"/dashboard")):P("timeline");case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),M=function(){var e=Object(Ne.a)(Ei().mark((function e(){return Ei().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:it({message:tt("$__confirmDeleteThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){$n(t,{_id:l._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(Ne.a)(Ei().mark((function e(){return Ei().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:it({message:tt("$__confirmRestoreThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){zn(t,{_id:l._id})}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Y=Object.keys(Ce.getState().db.cards).filter((function(e){return Ce.getState().db.cards[e]&&!0===Ce.getState().db.cards[e]._selected&&Ce.getState().db.cards[e].type&&Ce.getState().db.cards[e].type.indexOf("guideline")>-1})).length>0,G=p||!t.notGlobalExpanded&&!!(t.expanded||l._expanded||t.cardsExpanded),R=!!(N&&(N.owner||N.plan&&(N.planAdmin||N.planModerate))||A>2),H={button:!1,date:null};return H=l&&l._users&&Object.keys(l._users).filter((function(e){return e===o._id})).length>0&&a.dataType.filter((function(e){return e.name===l.type})).length>0&&a.dataType.filter((function(e){return e.name===l.type}))[0].modules.indexOf("myDay")>-1?l._users[Object.keys(l._users).filter((function(e){return e===o._id}))[0]].myDay?{button:!0,date:l._users[Object.keys(l._users).filter((function(e){return e===o._id}))[0]].myDay}:{button:!0,date:null}:{button:!1,date:null},l&&l.private&&(!l._users||l._users&&!l._users[o._id])?i.a.createElement(i.a.Fragment,null):v?i.a.createElement(wi,{cardId:l._id,toTemplate:!l.isTemplate,onComplete:function(){y(!1)}}):i.a.createElement(ji,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:l.isDragDisable||t.isDragDisable||!1,inLine:t.inLine,className:t.noShadow?r.containerNoShadow:r.container,selectable:t.showSelected,selected:l._selected,priority:l.priority&&a.priority.filter((function(e){return String(e.value)===String(l.priority)})).length>0?a.priority.filter((function(e){return String(e.value)===String(l.priority)}))[0].color:null,locked:t.locked||!1,snapshot:t.snapshot||null,isCombining:!(!t.snapshot||!t.snapshot.combineTargetFor),onMouseOver:function(){w(!0)},onMouseLeave:function(){setTimeout((function(){w(!1)}),100)},onClick:function(e){t.selectable||!t.onClick&&(!t.locked&&t.showSelected&&Y||t.selectable)?D():!t.onClick||t.selectable||t.locked?t.locked||t.onlyOption||"plan"!==l.type?t.locked||P():$(l._id):t.onClick()},onContextMenu:function(e){}}),("completed"===l.status||t.cardColorPicker&&I.color)&&i.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",cursor:"pointer"}},i.a.createElement("div",{style:{position:"absolute",backgroundColor:t.cardColorPicker&&I.color?I.color:"rgba(0,0,0,1)",opacity:I.color?.2:.1,top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",cursor:"pointer"}})),i.a.createElement(i.a.Fragment,null,t.snapshot&&t.snapshot.combineTargetFor&&i.a.createElement("div",{style:{backgroundColor:at("menu"),padding:"7px 3px",color:"#FFFFFF",fontWeight:"bold",textAlign:"center"}},tt("$__dropHereToLink")),("insight"===l.type||"link"===l.type)&&l._createdBy&&a.users[l._createdBy]&&i.a.createElement("div",{style:{width:"calc(100% - 0px)",alignItems:"center",padding:"7px",display:"inline-flex",borderBottom:"solid 1px rgba(0,0,0,0.03)"}},i.a.createElement("div",{style:{position:"relative",float:"left"}},i.a.createElement(Ue.a,{title:a.users[l._createdBy].name},i.a.createElement(Kr.a,{alt:a.users[l._createdBy].name,src:a.users[l._createdBy].image||null},a.users[l._createdBy].name.substr(0,1)))),i.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(100% - 70px)",flexDirection:"column",paddingLeft:"7px"}},i.a.createElement("div",{style:{color:at("menu"),fontWeight:"bold",fontSize:"16px"}},a.users[l._createdBy].displayName?a.users[l._createdBy].displayName:a.users[l._createdBy].name.split(" ")[0]),i.a.createElement("div",null,Be()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===Be()(1e3*l.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(Be()(1e3*l.created_at).tz("America/Sao_Paulo").format("H:mm")):Be()(new Date).tz("America/Sao_Paulo").format("YYYY")===Be()(1e3*l.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(Be()(1e3*l.created_at).tz("America/Sao_Paulo").format("DD/MM H:mm")):"".concat(Be()(1e3*l.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm")))),i.a.createElement("div",{style:{width:"24px",float:"right"}},i.a.createElement(xt,{icon:l.type&&a&&a.dataType&&a.dataType.filter((function(e){return e.name===l.type}))[0]&&a.dataType.filter((function(e){return e.name===l.type}))[0].icon||"$__topic"}))),i.a.createElement(_a,{private:!(!l.private&&!l.parentPrivate),unlockedPrivates:t.unlockedPrivates,setPrivate:function(e){var r=e?1:-1;e||0!==t.unlockedPrivates||(r=0),t.reduxFunction("ASYNC","SET_CONTROL",Object(h.a)(Object(h.a)({},Ce.getState().controls),{},{unlockedPrivates:Ce.getState().controls.unlockedPrivates+r})),S(e),t.setPrivate&&t.setPrivate(e)},viewAllName:t.viewAllName,title:"".concat(l.name?l.name:tt("$__new",1)," "),searchText:t.searchText?t.searchText:null,icon:l.type&&a&&a.dataType&&a.dataType.filter((function(e){return e.name===l.type}))[0]&&a.dataType.filter((function(e){return e.name===l.type}))[0].icon||"$__topic",iconTitle:"$__".concat(l.type),color:at("medium"),editable:!(l.name||t.onlyOption&&!t.editable),_id:l._id,locked:!("link"!==l.type&&!t.locked),colorPicker:R&&t.cardColorPicker&&I&&!I.parent?function(e){(!I.color&&e||I.color&&I.color!==e)&&t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},l._id,Object(h.a)(Object(h.a)({},Ce.getState().db.cards[l._id]),{},{color:e})))}))}:null,onEdit:"completed"!==l.status&&A&&parseInt(A)>1||N&&N.plan&&(N.owner||N.planAdmin||N.planEdit||N.planModerate)?function(e){t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},l._id,Object(h.a)(Object(h.a)({},Ce.getState().db.cards[l._id]),{},{name:e})))}))}:null,moreButton:_,options:l.deleted?[{name:tt("$__restoreThis",1),icon:"restore_from_trash",onClick:function(){B()},show:"hover",color:at("medium")}]:t.onlyOption||t.showSelected||t.locked?[]:[l.url&&{name:"$__openLinkinNewTab",icon:"launch",onClick:function(){window.open(l.url,"_blank")}},!l.archived&&!l.isTemplate&&"plan"===l.type&&{name:l._isFavorite?"$__removeFromFavorite":"$__addToFavorite",icon:l._isFavorite?"favorite":"favorite_border",color:at("medium"),onClick:function(){var e=Object(Ne.a)(Ei().mark((function e(){return Ei().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ht(t,l._id,!!l._isFavorite),t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},l._id,Object(h.a)(Object(h.a)({},Ce.getState().db.cards[l._id]),{},{_isFavorite:!l._isFavorite})))}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},!l.archived&&"completed"!==l.status&&H&&H.button&&{name:Be()(new Date(1e3*H.date)).format("YYYY/MM/DD")===Be()().format("YYYY/MM/DD")?"$__removeOfMyDate":"$__addOnMyDay",icon:Be()(new Date(1e3*H.date)).format("YYYY/MM/DD")===Be()().format("YYYY/MM/DD")?"auto_delete":"alarm_add",color:Be()(new Date(1e3*H.date)).format("YYYY/MM/DD")===Be()().format("YYYY/MM/DD")?"red":"lightblue",show:"hover",onClick:function(){var e=!(H&&H.date&&(!H||!H.date||Be()(new Date(1e3*H.date)).format("YYYY/MM/DD")===Be()().format("YYYY/MM/DD")));Wn(t,{_id:l._id,userId:o._id,option:e}),t.myDayClick&&t.myDayClick()}},!l.archived&&!t.onlyOption&&(A&&parseInt(A)>1||N.owner||N.planAdmin||N.planEdit||N.planModerate)&&{name:"$__edit",icon:"edit",onClick:function(){t.onAction&&t.onAction(),P()},show:"hover"},!l.archived&&!l.isTemplate&&l._users&&"completed"!==l.status&&l._users[o._id]&&(!l._kpiTimer||0===Object.keys(l._kpiTimer).length||l._kpiTimer&&Object.keys(l._kpiTimer).length>0&&0===Object.keys(l._kpiTimer).filter((function(e){return o&&o._id&&e&&l._kpiTimer[e]&&l._kpiTimer[e].userId&&l._kpiTimer[e].userId===o._id})).length)&&{name:"$__timerStart",icon:"play_circle_outline",color:"blue",show:"hover",onClick:function(){it({message:tt("$__confirmStartTimer",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){In(t,l._id),!(H&&H.date&&(!H||!H.date||Be()(new Date(1e3*H.date)).format("YYYY/MM/DD")===Be()().format("YYYY/MM/DD")))&&Wn(t,{_id:l._id,userId:o._id,option:!0}),t.myDayClick&&t.myDayClick()}})}},l._users&&"completed"!==l.status&&l._users[o._id]&&{name:"$__complete",icon:"check_circle",color:"green",show:"hover",onClick:function(){var e=Object(Ne.a)(Ei().mark((function e(){return Ei().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:z();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},!l.archived&&!t.onlyOption&&(t.selectOption||t.viewButton)&&(l.type.indexOf("guideline")>-1||l.type.indexOf("objective")>-1||l.type.indexOf("goal")>-1)&&{name:l._selected?"$__removeSelection":"$__selectThis",icon:l._selected?"visibility_off":"visibility",hide:!0,onClick:function(){D()}},!l.isTemplate&&"plan"===l.type&&{name:"$__copyToTemplates",icon:"copy_all",onClick:function(){y(!0)}},l&&!l.isTemplate&&"plan"===l.type&&!l.archived&&(l._users&&l._users[o._id]&&l._users[o._id].access&&5===parseInt(l._users[o._id].access)||N&&N.planAdmin)&&{name:tt("$__shelve"),icon:"archive",onClick:function(){Dn(t,{_id:l._id,archived:!0})}},(A&&5===parseInt(A)||N.owner||N.planAdmin||N.planEdit)&&!t.disableDelete&&{name:"$__delete",icon:"delete_forever",color:"red",onClick:function(){t.directDeletion||l.archived||0===a.dataType.filter((function(e){return e.name===l.type})).length||a.dataType.filter((function(e){return e.name===l.type})).length>0&&"swot"===a.dataType.filter((function(e){return e.name===l.type}))[0].module?M():P("delete"),t.onAction&&t.onAction()},show:"hover"},l&&!l.isTemplate&&"plan"===l.type&&l.archived&&(l._users&&l._users[o._id]&&l._users[o._id].access&&parseInt(5===l._users[o._id])||N&&N.planAdmin)&&{name:tt("$__unarchive"),icon:"archive",onClick:function(){Dn(t,{_id:l._id,archived:null})}},!l.isTemplate&&!l.archived&&(t.my||t.showCompleteOption)&&{name:"$__completed"!==l.status?"$__markasdone":"$__concluded",icon:"check_circle_outline",color:"completed"!==l.status?"lightgray":"green",onClick:function(){var e=Object(Ne.a)(Ei().mark((function e(){return Ei().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:z();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}],isExpanded:G,onExpanding:t.expanded||Ce.getState().db.cardsExpanded?null:function(){return f((function(e){return!e}))},onClick:function(e){}}),l._kpiTimer&&Object.keys(l._kpiTimer).length>0&&0!==Object.keys(l._kpiTimer).filter((function(e){return l._kpiTimer[e].userId===o._id})).length&&i.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"},onClick:function(e){e.stopPropagation()}},i.a.createElement(Va,{data:l})),G&&(!l.private||l.private&&(k||Ce.getState().controls.lockPrivate))?i.a.createElement(i.a.Fragment,null,i.a.createElement(Go,Object.assign({},t,{private:!!l.private,expanded:!0,onClick:function(e){}})),i.a.createElement("div",null,t.searchText&&l.description&&i.a.createElement("div",{className:r.description},dt(l.description,t.searchText)))):G?i.a.createElement(i.a.Fragment,null,i.a.createElement(ao,null)):i.a.createElement(i.a.Fragment,null),i.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"}},l.startDate&&Be()(l.startDate).isValid()||l.endDate&&Be()(l.endDate).isValid()?i.a.createElement("div",{style:Object(h.a)({position:"relative",display:"flex",width:"100%"},G?{height:"45px"}:{})},i.a.createElement("div",{className:l.endDate&&Be()(new Date(1e3*l.endDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")<Be()().format("YYYY-MM-DD")?r.lateDates:r.dates},l.startDate&&Be()(l.startDate).isValid()&&i.a.createElement("div",{className:r.dateInfo},i.a.createElement(Ur,{overlap:"rectangular",className:r.dateIco,icon:"insert_invitation",title:"$__startDate",size:"14px",disabled:!0}),new Date(1e3*l.startDate)instanceof Date&&!isNaN(new Date(1e3*l.startDate))?Be()(new Date(1e3*l.startDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):Be()(l.startDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")),l.endDate&&Be()(l.endDate).isValid()?i.a.createElement("div",{className:r.dateInfo},i.a.createElement(Ur,{overlap:"rectangular",className:r.dateIco,icon:"event_available",title:"$__endDate",size:"14px",disabled:!0}),new Date(1e3*l.endDate)instanceof Date&&!isNaN(new Date(1e3*l.endDate))?Be()(new Date(1e3*l.endDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):Be()(l.endDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")):i.a.createElement(i.a.Fragment,null))):i.a.createElement(i.a.Fragment,null)),l._tags&&l._tags.filter((function(e){return e.value})).length>0?i.a.createElement(pn,{options:l._tags,expanded:!!(t.showTags||G&&"plan"!==l.type&&"link"!==l.type&&"insight"!==l.type)}):i.a.createElement(i.a.Fragment,null),l._recurrenceId&&i.a.createElement("div",{style:{position:"absolute",width:"100%",bottom:"3px",left:"3px",display:"flex",fontSize:"11px",color:"lightgrey",alignItems:"center"}},i.a.createElement(Ur,{overlap:"rectangular",className:r.indicatorsIcon,icon:"history",color:"lightgrey",size:"25px",title:t.noShowRecurrenceCard?"".concat(tt("$__recurrence")).concat(l.recurrenceCreatedDate?": ".concat(Be()(l.recurrenceCreatedDate).format("DD/MM/YYYY")):""):i.a.createElement("div",{style:{maxWidth:"280px"}},tt("$__recurrentActivityFrom"),":",i.a.createElement(e,{db:"cards",data:a.cards[l._recurrenceId],Avatar:!0,ignoreList:!0,onlyOption:!0}))}),l.recurrenceCreatedDate?Be()(l.recurrenceCreatedDate).format("DD/MM/YYYY"):""),l.expanded||!l.isTemplate&&l&&l._users&&Object.keys(l._users).length>0&&(!l._users[o._id]||l._users[o._id]&&Object.keys(l._users).length>1)?i.a.createElement("div",{style:{position:"relative",width:"100%",marginTop:G?37:7}},i.a.createElement("div",{className:r.usersContent},i.a.createElement("div",{className:r.users},i.a.createElement(Ka,{_id:l._id,data:l,permission:R,transparent:!0,myDay:!0,limit:3})))):i.a.createElement(i.a.Fragment,null)),i.a.createElement("div",{style:{clear:"both"}}),l.isTemplate&&i.a.createElement("div",{style:{position:"relative",width:"100%",clear:"both",padding:"7px",backgroundColor:at("menu"),marginTop:"7px",cursor:"pointer"},onClick:function(e){e.stopPropagation(),y(!0)}},i.a.createElement(Xr,{text:tt("$__useThisTemplate","*"),icon:"auto_awesome",iconColor:"#FFFFFF",textColor:"#FFFFFF"})),!_&&"completed"===l.status&&l.completed_at&&l.completed_at.low&&i.a.createElement("div",{style:{backgroundColor:"rgba(0,0,0,0.4)",position:"absolute",height:"2px",left:0,right:0,top:"20px"}},i.a.createElement("div",{style:{position:"absolute",right:0,bottom:-12,color:"#FFF",fontSize:10,padding:3,backgroundColor:"rgba(0,0,0,0.66)"}},tt("$__completeDate"),":",vt(l.completed_at))),"plan"!==l.type&&l.deleted?i.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",cursor:"pointer"}},i.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"}},i.a.createElement(Ct,{title:tt("$__restoreThis",1),text:tt("$__restoreThis",1),color:"#FFFFFF",icon:"restore_from_trash",onClick:function(){B()},size:"17px",textSize:"17px",transparent:!0}))):i.a.createElement(i.a.Fragment,null))})),Si=Object(We.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(We.a)((function(e){return{badge:{backgroundColor:"#ffb100",color:"#ffb100",boxShadow:"0 0 0 2px ".concat(e.palette.background.paper),"&::after":{position:"absolute",top:0,left:0,width:"100%",height:"100%",borderRadius:"50%",animation:"$ripple 1.2s infinite ease-in-out",border:"1px solid currentColor",content:'""'}},"@keyframes ripple":{"0%":{transform:"scale(.8)",opacity:1},"100%":{transform:"scale(2.4)",opacity:0}}}}))(St.a),Ci=Object(_t.a)((function(e){return{root:{display:"flex","& > *":{margin:e.spacing(1)}}}}));function Ii(e){var t=Ci();return i.a.createElement("div",{className:t.root},e.status&&"online"!==e.status?i.a.createElement(Li,{overlap:"circular",anchorOrigin:e.anchorOrigin?e.anchorOrigin:{vertical:"bottom",horizontal:"left"},variant:e.variant},e.children):i.a.createElement(Si,{overlap:"circular",anchorOrigin:e.anchorOrigin?e.anchorOrigin:{vertical:"bottom",horizontal:"left"},variant:e.variant},e.children))}var Fi=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:at("color"),boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt("#000")+", 0.4)"},info:{backgroundColor:Jt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(Jt[0])+", 0.4)"},success:{backgroundColor:Kt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(Kt[0])+", 0.4)"},danger:{backgroundColor:Xt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(Xt[0])+", 0.4)"},warning:{backgroundColor:qt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(qt[0])+", 0.4)"},primary:{backgroundColor:Vt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(Vt[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("+Gt("#000")+", 0.14)",borderRadius:"6px",color:"rgba("+Gt("#000")+", 0.87)",background:at("timelineMyMessage")},timelinePanelInverted:{maxWidth:"calc(100% - 70px)",float:"left",padding:"7px",marginLeft:"40px",marginBottom:"5px",position:"relative",boxShadow:"0 1px 4px 0 rgba("+Gt("#000")+", 0.14)",borderRadius:"6px",color:"rgba("+Gt("#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:at("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(O.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:at("color")},progressBar:{backgroundColor:"".concat(at("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(at("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(at("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"}}}},Ti=r(535),Ni=r.n(Ti),Ai=r(536),Di=r.n(Ai),Pi=r(537),zi=r.n(Pi),$i=r(915),Mi=r.n($i),Bi=r(538),Yi=r.n(Bi),Gi=r(1663),Ri=function(e){return{popperClose:{pointerEvents:"none",display:"none !important"},popperNav:Object(O.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("+Gt("#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(O.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)({},Ut),{},{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:Qt[7],whiteSpace:"nowrap",minHeight:"unset"}),darkHover:{"&:hover":{boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(Qt[16])+", 0.4)",backgroundColor:Qt[16],color:"#FFF"}},primaryHover:{"&:hover":Object(h.a)({backgroundColor:Vt[0],color:"#FFF"},tr)},infoHover:{"&:hover":Object(h.a)({backgroundColor:Jt[0],color:"#FFF"},rr)},successHover:{"&:hover":Object(h.a)({backgroundColor:Kt[0],color:"#FFF"},nr)},warningHover:{"&:hover":Object(h.a)({backgroundColor:qt[0],color:"#FFF"},ar)},dangerHover:{"&:hover":Object(h.a)({backgroundColor:Xt[0],color:"#FFF"},or)},roseHover:{"&:hover":Object(h.a)({backgroundColor:Zt[0],color:"#FFF"},ir)},dropdownItemRTL:{textAlign:"right"},dropdownDividerItem:{margin:"5px 0",backgroundColor:"rgba("+Gt("#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:Qt[1],whiteSpace:"nowrap",fontWeight:"inherit",marginTop:"10px",minHeight:"unset","&:hover,&:focus":{backgroundColor:"transparent",cursor:"auto"}},noLiPadding:{padding:"0"}}},Hi=Object(_t.a)(Ri);function Wi(e){var t,r,n,a=i.a.useState(null),o=Object(Ae.a)(a,2),c=o[0],l=o[1],s=Hi(),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,v=e.dropdownHeader,y=e.caret,b=e.hoverColor,x=e.dropPlacement,_=e.rtlActive,w=e.noLiPadding,E=e.innerDropDown,j=e.navDropdown,k=$e()((t={},Object(O.a)(t,s.caret,!0),Object(O.a)(t,s.caretDropup,g&&!c),Object(O.a)(t,s.caretActive,Boolean(c)&&!g),Object(O.a)(t,s.caretRTL,_),t)),S=$e()((r={},Object(O.a)(r,s.dropdownItem,!0),Object(O.a)(r,s[b+"Hover"],!0),Object(O.a)(r,s.noLiPadding,w),Object(O.a)(r,s.dropdownItemRTL,_),r)),L=i.a.createElement(hn.a,{role:"menu",className:s.menuList},void 0!==v?i.a.createElement(fn.a,{onClick:function(){return d(v)},className:s.dropdownHeader},v):null,h.map((function(e,t){return e.divider?i.a.createElement(Gi.a,{key:t,onClick:function(){return d("divider")},className:s.dropdownDividerItem}):void 0!==e.props&&"multi"===e.props["data-ref"]?i.a.createElement(fn.a,{key:t,className:S,style:{overflow:"visible",padding:0}},e):i.a.createElement(fn.a,{key:t,onClick:function(){return d(e)},className:S},e)})));return i.a.createElement("div",{className:E?s.innerManager:s.manager},i.a.createElement("div",{className:void 0!==p?"":s.target},i.a.createElement(br,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?i.a.createElement(e.buttonIcon,{className:s.buttonIcon}):null,void 0!==p?p:null,y?i.a.createElement("b",{className:k}):null)),i.a.createElement(ln.a,{open:Boolean(c),anchorEl:c,transition:!0,disablePortal:!0,placement:x,className:$e()((n={},Object(O.a)(n,s.popperClose,!c),Object(O.a)(n,s.popperResponsive,!0),Object(O.a)(n,s.popperNav,Boolean(c)&&j),n))},(function(){return i.a.createElement(on.a,{in:Boolean(c),id:"menu-list",style:g?{transformOrigin:"0 100% 0"}:{transformOrigin:"0 0 0"}},i.a.createElement(cn.a,{className:s.dropdown},E?L:i.a.createElement(an.a,{onClickAway:u},L)))})))}Wi.defaultProps={caret:!0,dropup:!1,hoverColor:"primary"};Ni.a,Di.a,zi.a,Yi.a,Ni.a,Di.a,zi.a,Yi.a;var Ui=[{inverted:!0,badgeColor:"danger",badgeIcon:Ni.a,title:"Some Title",titleColor:"danger",body:i.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:Di.a,title:"Another One",titleColor:"success",body:i.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:zi.a,title:"Another Title",titleColor:"info",body:i.a.createElement("div",null,i.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"),i.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:i.a.createElement(Wi,{buttonIcon:Yi.a,buttonProps:{round:!0,style:{marginBottom:"0"},color:"info"},dropdownList:["Action","Another action","Something else here",{divider:!0},"Separated link"]})},{badgeColor:"warning",badgeIcon:Mi.a,title:"Another One",titleColor:"warning",body:i.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")}],Vi=new Date,qi=Vi.getFullYear(),Xi=Vi.getMonth(),Ki=Vi.getDate();new Date(qi,Xi,1),new Date(qi,Xi,1),new Date(qi,Xi,Ki-1,10,30),new Date(qi,Xi,Ki-1,11,30),new Date(qi,Xi,Ki+7,12,0),new Date(qi,Xi,Ki+7,14,0),new Date(qi,Xi,Ki-2),new Date(qi,Xi,Ki-2),new Date(qi,Xi,Ki+1,19,0),new Date(qi,Xi,Ki+1,22,30),new Date(qi,Xi,21),new Date(qi,Xi,22),new Date(qi,Xi,21),new Date(qi,Xi,22);var Ji=Object(Fe.b)((function(e){return{usersStatus:e.usersStatus}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Fi)((function(e){var t=e.classes,r=Ce.getState(),n=r.db,a=r.session,o=r.functions,c=r.timeline,l=r.usersStatus,s=o.socket,u=i.a.useState(!1),d=Object(Ae.a)(u,2),p=d[0],f=d[1],m=i.a.useState(!1),g=Object(Ae.a)(m,2),v=g[0],y=g[1],b=i.a.useState(!1),x=Object(Ae.a)(b,2),_=x[0],w=x[1],E=i.a.useState(null),O=Object(Ae.a)(E,2),j=O[0],k=O[1],S=i.a.useState(null),L=Object(Ae.a)(S,2),C=L[0],I=L[1],F=i.a.useState(!1),T=Object(Ae.a)(F,2),N=T[0],A=T[1],D=i.a.useState(!1),P=Object(Ae.a)(D,2),z=P[0],$=P[1],M=i.a.useState(null),B=Object(Ae.a)(M,2),Y=B[0],G=B[1],R=i.a.useState(!1),H=Object(Ae.a)(R,2),W=H[0],U=H[1];if(i.a.useEffect((function(){return U(!0),function(){U(!1)}}),[e.storie]),!W)return i.a.createElement(i.a.Fragment,null);var V=null,q=e.storie;if(q&&q._parent&&n.cards[q._parent]?q._parent:q&&q.idRel&&n.cards[q.idRel]&&q.idRel,q.filesCount&&q.filesCount>0&&Ui.user&&Ui.user._id&&Ui.user._id!==a._id&&(!Ui.files||Ui.files&&Ui.files.length<q.filesCount))return i.a.createElement(i.a.Fragment,null);var X=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];y(!0),e&&clearTimeout(V)},K=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;V=setTimeout((function(){y(!1)}),e)},J=function(t){var r=e.storie.idRel?e.storie.idRel:e.storie._parent?e.storie._parent:e.nodeId?e.nodeId:null,n={chatId:Ce.getState().chat.id,react:t,user:a._id,db:e.db,nodeId:r,message:e.storie._id};mo(e,n),s.emit("data",{module:"timeline",method:"post",action:"interact"},n)};if(!q)return null;var Z="";"timer"===q.type&&String(q.ini)&&String(q.fin)&&(Z=q.fin-q.ini);var Q=null;q.urlPreview&&(Q=JSON.parse(q.urlPreview));var ee,te=tt(function(e){var t,r;if(q&&q._parent&&n.cards[q._parent]?t=q._parent:q&&q.idRel&&n.cards[q.idRel]&&(t=q.idRel),r=e,e){var a=e.split("@[");a.length>0&&a.map((function(e){if(e){var a="@[".concat(e.split(")")[0],")"),o=e.split("](")[1];if(o)if((o=o.split(")")[0])&&36===o.length&&n.cards[t]&&n.cards[t]._users&&n.cards[t]._users[o]){var i=n.cards[t]._users&&n.cards[t]._users[o]&&n.cards[t]._users[o].name||n.cards[t]._users&&n.cards[t]._users[o]&&n.cards[t]._users[o].name?n.cards[t]._users[o].name:e.split("](")[0];r=r.replace(a,'<span style="color:'.concat(at("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(at("menu"),'"><b>').concat(c,"</b></span>"))}else{var l=e.split("](")[0];r=r.replace(a,'<span style="color:'.concat(at("menu"),'"><b>').concat(l,"</b></span>"))}}return!0}))}return r}(q.message));q._reactions&&Object.keys(q._reactions).length>0&&Object.keys(q._reactions).map((function(e){Object.keys(q._reactions[e]).length>0&&Object.keys(q._reactions[e]).map((function(t){t===a._id&&(ee=e)}))}));var re=!1;e.storie&&e.storie.user&&e.storie.user._id===a._id&&(re=!0);var ne=function(){it({message:tt("$__confirmCancel",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){bo(e,{id:q._id,idRel:q.idRel,deletedReason:j,deleted:!0}),q.deleted=!0,I(!1),k(null)}})};if(!q.filesCount&&""===q.message&&q.cardId&&q.cardId!==e.nodeId&&!Ce.getState().db.cards[q.cardId])return null;var ae=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=t.name.split("."),o=a[a.length-1],c="attachment";n.fileExtensions.filter((function(e){return e.ext.indexOf(o.toLowerCase())>-1})).length>0&&(c=n.fileExtensions.filter((function(e){return e.ext.indexOf(o.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(o.toLowerCase())>-1})).length>0&&n.fileExtensions.filter((function(e){return e.ext.indexOf(o.toLowerCase())>-1}))[0].viewer&&(l=n.fileExtensions.filter((function(e){return e.ext.indexOf(o.toLowerCase())>-1}))[0].viewer),i.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))&&i.a.createElement(Ue.a,{title:t.name},i.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")&&i.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){q.created_at&&"string"===typeof q.created_at&&parseInt(q.created_at)>Be()().unix("X")-60&&(e.target.src=c)}}),"movie"!==l&&"img"!==l&&"string"===typeof c&&-1===c.indexOf("blob:")&&-1===c.indexOf("svg")?i.a.createElement(xt,{icon:c,size:"50px"}):"movie"===l||"img"===l||"img"===l&&c&&c.indexOf("svg")>-1?i.a.createElement(i.a.Fragment,null):i.a.createElement("img",{src:c,style:{width:"100%",height:"100%"}}),"img"===l&&c&&c.indexOf(".svg")>-1?i.a.createElement("img",{src:Pr.a,style:{borderRadius:"15px",boxShadow:"0 1px 2px 2px rgba(0,0,0,0.1)",maxWidth:"100%",height:"100%",maxHeight:"33vh"}}):i.a.createElement(i.a.Fragment,null),"movie"===l&&i.a.createElement("video",{style:{width:"100%"},src:"https://machen.azureedge.net/".concat(t.file),controls:!0}),"audio"===l&&i.a.createElement(Fr.a,{src:"https://machen.azureedge.net/".concat(t.file),controls:!0}))};return i.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},i.a.createElement("div",{className:"message",style:Object(h.a)(Object(h.a)({position:"relative",maxWidth:"calc(100% - 15px)",float:re?"right":"left"},re?{marginRight:"15px"}:{marginLeft:"15px"}),{},{width:"auto",minWidth:"303px",marginBottom:"20px"}),onMouseLeave:function(){K(1e3)},onMouseOver:function(){e.isReply||X(!0)},onClick:function(){e.isReply||X(!0)}},e.showUserName&&!re&&i.a.createElement("div",{style:{position:"relative",width:"100%",fontWeight:"bold",fontSize:"12px",color:at("menu")}},q.user.name?q.user.name:q.user.fullName),i.a.createElement("div",{style:{position:"relative",float:re?"right":"left",padding:"7px 15px",width:"100%",background:re?"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"}},q&&q.filesCount&&q&&q.user&&q.user._id===a._id&&parseInt(q.filesCount)>0&&q.files&&0===Object.keys(q.files).length?i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{position:"relative",justifyContent:"center",alignItems:"center",color:"lightgray"}},tt("$__transferringFile".concat(parseInt(q.filesCount)>1?"s":""))),i.a.createElement("div",{className:"files",style:{position:"relative",maxWidth:"calc(100% - 15px)",width:"100%",display:"flex"}},(parseInt(q.created_at),Be()().unix("x"),i.a.createElement(i.a.Fragment,null)))):i.a.createElement(i.a.Fragment,null),q.files&&Object.keys(q.files).length>0?i.a.createElement("div",{className:"files",style:Object(h.a)(Object(h.a)({position:"relative",maxWidth:"calc(100% - 15px)",float:re?"right":"left"},re?{marginRight:"15px"}:{marginLeft:"15px"}),{},{width:"100%",display:"flex",justifyContent:re?"flex-end":"none",flexWrap:"wrap"})},Object.keys(q.files).map((function(e,t){return ae(q.files[e],Object.keys(q.files[e]).length)}))):q.files&&q.files.length>0?i.a.createElement("div",{className:"files",style:Object(h.a)(Object(h.a)({position:"relative",maxWidth:"calc(100% - 15px)",float:re?"right":"left"},re?{marginRight:"15px"}:{marginLeft:"15px"}),{},{width:"100%",display:"flex",justifyContent:re?"flex-end":"none",flexWrap:"wrap"})},q.files.map((function(e,t){return ae(e,e.length)}))):i.a.createElement(i.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])&&i.a.createElement("div",{style:{position:"relative",width:"calc(100% - 20px)",opacity:.66,display:"flex",justifyContent:"center",marginBottom:"7px"}},i.a.createElement(Ji,{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()}})),q.deleted&&"timer"!==q.type?i.a.createElement("div",{style:{color:"lightGray",height:33,padding:7}},tt("$__removed","*"),"*"):function(){if("comment"===q.type&&q.message)return i.a.createElement("div",null,q.urlPreview&&Q.img&&Q.title&&Q.contentSnippet?i.a.createElement(oi,{style:{marginBottom:15}},!p&&Q.img&&i.a.createElement(li,{xs:12,sm:6,md:4,lg:3,xl:2},i.a.createElement("img",{style:{width:"-webkit-fill-available"},src:"".concat(Q.img),onError:function(e){f(!0)},alt:Q.title||Q.link})),i.a.createElement(li,{xs:12,sm:6,md:8,lg:9,xl:10},i.a.createElement("div",{style:{fontSize:"14px",color:at("menu"),fontWeight:"bold"}},Q.title),Q.site&&i.a.createElement("div",{style:{fontSize:"12px"}},Q.site),Q.contentSnippet&&i.a.createElement("div",{style:{fontSize:"12px",color:"gray"}},Q.contentSnippet),i.a.createElement("a",{style:{marginTop:"15px",fontWeight:"bold",fontSize:"12px"},href:Q.link,target:"_blank"},tt("$__openLink","*")))):i.a.createElement(i.a.Fragment,null),i.a.createElement(li,{xs:12,sm:12,md:12,lg:12,xl:12},dt(pt(te),e.searchText)));if("comment"===q.type&&!q.message&&q.cardId!==e.nodeId&&Ce.getState().db.cards[q.cardId])return i.a.createElement(ki,{db:"cards",data:Ce.getState().db.cards[q.cardId],Avatar:!0,expanded:!0,ignoreList:!0});if("log"===q.type){var r={};return"$__updated"===q.message?(r=JSON.parse(q.newData),i.a.createElement("div",null,i.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},i.a.createElement(xt,{color:"color",icon:"history",style:{marginRight:"10px"}}),q.message.indexOf("$__")>-1?tt(q.message,1):q.message," "),q.newData&&i.a.createElement("ul",{style:{position:"relative",width:"98%"}},Object.keys(r).map((function(t,a){if("customColumns"===t){var o=JSON.parse(r[t]);return i.a.createElement("li",{key:a},tt("$__customColumns",1),":",i.a.createElement("ul",null,Object.keys(o).map((function(e,t){return i.a.createElement("li",{key:t},tt("$__".concat(e)),"=> ",i.a.createElement("span",{style:{color:at("menu"),fontWeight:"bold"}},tt("".concat(o[e].name))))}))))}if("_id"===t||"id"===t||"client"===t||"planId"===t||"_parent"===t||"owner"===t||"image"===t);else{if("status"===t)return i.a.createElement("li",{key:a},tt("$__status",1),": ",tt("$__".concat(r[t]),1));if("note"===t)return i.a.createElement("li",{key:a},tt("$__".concat(r[t]),1),": ",i.a.createElement("div",null,dt(pt(r[t]),e.searchText)));if("kpi_type"===t||"priority"===t||"risk"===t||"complexity"===t||"impact"===t)return i.a.createElement("li",{key:a},tt("$__".concat(t),1),": ",tt("$__".concat(r[t]),1));if("name"===t||"description"===t)return i.a.createElement("li",{key:a},tt("$__".concat(t),1),": ",r[t]);if("url"===t)return i.a.createElement("li",{key:a},"url",":",i.a.createElement("a",{href:r[t],target:"blank",style:{}},dt(pt(r[t]),e.searchText)));if("_tags"!==t&&"string"===typeof r[t]&&"kpi_ini"!==t&&"kpi_fin"!==t&&"startDate"!==t&&"endDate"!==t&&"updated_at"!==t&&"created_at"!==t&&"content"!==t)return i.a.createElement("li",{key:a},tt("$__".concat(t),1),": ",r[t].indexOf("$__")>-1?tt("$__".concat(r[t]),1):r[t]);if("kpi_ini"===t||"kpi_fin"===t){r.kpi_type?r.kpi_type:n.cards[q.idRel]&&n.cards[q.idRel].kpi_type&&n.cards[q.idRel].kpi_type;return i.a.createElement("li",{key:a},tt("$__".concat(t),1),": ",lt(r[t],q.kpi_type?q.kpi_type:"decimal"))}if("startDate"===t||"endDate"===t||"updated_at"===t||"created_at"===t)return i.a.createElement("li",{key:a},tt("$__".concat(t),1),": ",r[t]?Be()(new Date(1e3*r[t])).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm"):tt("$__removed"));if("boolean"===typeof r[t])return i.a.createElement("li",{key:a},tt("$__".concat(t),1),": ",r[t]?tt("$__enable",1):tt("$__disable",1));if("_tags"===t)return i.a.createElement("li",{key:a},"TAGS: ",i.a.createElement(pn,{options:r[t],showOptions:!0}))}}))),i.a.createElement("div",{style:{clear:"both"}}))):i.a.createElement("div",{style:{position:"relative",width:"100%"}},i.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},i.a.createElement(xt,{color:"color",icon:"history",style:{marginRight:"10px"}}),i.a.createElement("div",{style:{wordBreak:"break-word"}},dt(pt(te),e.searchText))),q.cardId&&Ce.getState().db.cards[q.cardId]?i.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"})},i.a.createElement(ki,{db:"cards",data:Ce.getState().db.cards[q.cardId],Avatar:!0,ignoreList:!0})):i.a.createElement(i.a.Fragment,null))}if("timer"===q.type){var a=Z,o="";if(Z<60)o="".concat(a," ").concat(tt("$__seconds",1));else if(Z>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;o="".concat(c," hora").concat(c>1?"s":""," ").concat(l," ").concat(tt("$__minutes",1)," ").concat(s," ").concat(tt("$__seconds",1))}else{var u=Math.trunc(a/60)>0?Math.trunc(a/60):0,d=(a-=60*u)>0?a:0;o="".concat(u," ").concat(tt("$__minutes",1)," ").concat(d," ").concat(tt("$__seconds",1))}return C?i.a.createElement("div",null,i.a.createElement("div",{style:{position:"relative",width:"100%",marginTop:"33px"}},i.a.createElement(ya,{label:tt("$__cancelReason",1),variant:at("standard"),name:"cancelReason",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,onChange:function(e){k(e.target.value)}},placeholder:tt("$__cancelReason_placeholder",1)})),i.a.createElement("div",{style:{position:"absolute",right:"7px",top:"7px",display:"flex"}},i.a.createElement(Ct,{transparent:!0,title:tt("$__cancel","*"),color:at("lightgrey"),icon:"cancel",onClick:function(){I(!1),k(null)},size:"25px"}),i.a.createElement(Ct,{transparent:!0,title:tt("$__save",1),color:"green",icon:"playlist_add_check",onClick:function(){ne()},size:"25px"}))):i.a.createElement("div",null,i.a.createElement("div",{style:{position:"relative"}},q&&q._toUser&&Object.keys(q._toUser).length>0&&i.a.createElement("div",{className:t.timeInfo},i.a.createElement(Sa.a,{max:300,style:{flexWrap:"wrap",display:"inline-flex",border:"none"}},Object.keys(q._toUser).map((function(e){return i.a.createElement(Ue.a,{key:e,title:q._toUser[e].displayName?q._toUser[e].displayName:q._toUser[e].name},i.a.createElement(Kr.a,{alt:q._toUser[e].name,src:q._toUser[e].image||null,style:{width:27,height:27,border:"none"}},q._toUser[e].name.substr(0,1)))})))),i.a.createElement("div",{className:t.timeInfo},i.a.createElement(xt,{color:"color",icon:"schedule"}),i.a.createElement("div",{className:"text"},Be()(1e3*q.ini).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"))),i.a.createElement("div",{className:t.timeInfo},i.a.createElement(xt,{color:"color",icon:"watch_later"}),i.a.createElement("div",{className:"text"},Be()(1e3*q.fin).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"))),i.a.createElement("div",{className:t.timeInfo},i.a.createElement(xt,{color:"color",icon:"hourglass_full"}),i.a.createElement("div",{className:"text"},o)),i.a.createElement("div",{style:{clear:"both"}}),q.deleted?i.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255,255,255,0.66)",display:"flex",justifyContent:"center",alignItems:"center",fontWeight:"bold",color:at("menu")}},tt("$__cancelled")):i.a.createElement(i.a.Fragment,null)),i.a.createElement("div",null,te),q.deleted&&q.deletedReason&&i.a.createElement("div",{style:{color:"red"}},tt("$__cancelReason",1),": ",q.deletedReason),i.a.createElement("div",{style:{clear:"both"}}),q.deleted||!v&&!Be()(q.created_at).unix("x")?i.a.createElement(i.a.Fragment,null):i.a.createElement("div",{style:{position:"absolute",right:"7px",top:"7px"}},i.a.createElement(gn,{transparent:!0,options:[{name:"$__cancelThis",icon:"cancel",onClick:function(){I(!0)},show:"hover"}]})))}if("kpi"===q.type){var m=q&&q.balance?q.balance:0;return i.a.createElement("div",null,q.cardId?i.a.createElement(ki,{db:"cards",data:Ce.getState().db.cards[q.cardId],ignoreList:!0,noOptions:!0}):i.a.createElement(i.a.Fragment,null),i.a.createElement("div",null,te),i.a.createElement("div",{className:parseFloat(q.value)>0?t.valuePositive:t.valueNegative},lt(q.value,q.kpi_type?q.kpi_type:"decimal")),!e.stories&&i.a.createElement("div",{className:t.lastValue},tt("$__balance",1),": ",lt(m,q.kpi_type?q.kpi_type:"decimal")),i.a.createElement("div",{style:{clear:"both"}}))}}()),q.user&&i.a.createElement("div",{style:Object(h.a)(Object(h.a)({position:"absolute"},re?{right:"-20px"}:{left:"-20px"}),{},{bottom:0})},i.a.createElement(Ii,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},variant:q.user&&q.user._id&&l.users&&l.users[q.user._id]&&l.users[q.user._id].status?"dot":"standard",status:l.users&&l.users[q.user._id]&&l.users[q.user._id].status?l.users[q.user._id].status:null},i.a.createElement(Kr.a,{alt:q.user.displayName?q.user.displayName:q.user.name,src:"".concat(q.user.image),style:{width:"22px",height:"22px"}}))),i.a.createElement("div",{style:Object(h.a)(Object(h.a)({position:"absolute"},re?{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"})},Be()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===Be()(1e3*q.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(Be()(1e3*q.created_at).tz("America/Sao_Paulo").format("H:mm")):Be()(new Date).tz("America/Sao_Paulo").format("YYYY")===Be()(1e3*q.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(Be()(1e3*q.created_at).tz("America/Sao_Paulo").format("DD/MM H:mm")):"".concat(Be()(1e3*q.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm")),q.readedBy&&Object.keys(q.readedBy).length>0&&i.a.createElement(Ue.a,{title:i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:t.users},Object.keys(q.readedBy).sort((function(e,t){return q&&q.readedBy[e]&&q.readedBy[e].readedDate&&q.readedBy[t]&&q.readedBy[t].readedDate&&String(q.readedBy[e].readedDate.low)&&String(q.readedBy[t].readedDate.low)&&parseInt(q.readedBy[e].readedDate.low)<parseInt(q.readedBy[t].readedDate.low)?-1:q&&q.readedBy[e]&&q.readedBy[e].readedDate&&q.readedBy[t]&&q.readedBy[t].readedDate&&String(q.readedBy[e].readedDate.low)&&String(q.readedBy[t].readedDate.low)&&parseInt(q.readedBy[e].readedDate.low)>parseInt(q.readedBy[t].readedDate.low)?1:0})).map((function(e,t){return q.user._id!==e&&q.readedBy&&q.readedBy[e]&&q.readedBy[e].name&&i.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},i.a.createElement(Kr.a,{alt:q.readedBy[e].name,src:q.readedBy[e].image||null}),i.a.createElement("span",{style:{paddingLeft:"7px"}},q.readedBy[e].displayName?q.readedBy[e].displayName:q.readedBy[e].name,q.readedBy[e].readedDate&&q.readedBy[e].readedDate.low&&" (".concat(Be()(1e3*q.readedBy[e].readedDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))}))))},i.a.createElement("div",null,i.a.createElement(xt,{color:"#FFFFFF",size:"14px",style:{marginLeft:"7px"}},"done_all"))),!q.deleted&&q._reactions&&Object.keys(q._reactions).length>0&&i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},q&&q._reactions.like&&Object.keys(q._reactions.like).length>0&&i.a.createElement(Xr,{icon:"thumb_up",iconColor:at("menu"),title:i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:t.users},Object.keys(q._reactions.like).sort((function(e,t){return q._reactions.like[e].reactDate&&String(q._reactions.like[e].reactDate.low)&&q._reactions.like[t].reactDate&&String(q._reactions.like[t].reactDate.low)&&parseInt(q._reactions.like[e].reactDate.low)<parseInt(q._reactions.like[t].reactDate.low)?-1:q._reactions.like[e].reactDate&&String(q._reactions.like[e].reactDate.low)&&q._reactions.like[t].reactDate&&String(q._reactions.like[t].reactDate.low)&&parseInt(q._reactions.like[e].reactDate.low)>parseInt(q._reactions.like[t].reactDate.low)?1:0})).map((function(e,t){return i.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},i.a.createElement(Kr.a,{alt:q._reactions.like[e].name,src:q._reactions.like[e].image||Zr.a}),i.a.createElement("span",{style:{paddingLeft:"7px"}},q._reactions.like[e].displayName?q._reactions.like[e].displayName:q._reactions.like[e].name,q._reactions.like[e].reactDate&&q._reactions.like[e].reactDate.low&&" (".concat(Be()(1e3*q._reactions.like[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})))),style:{fontSize:"12px",margin:0}}),q&&q._reactions&&q._reactions.nolike&&Object.keys(q._reactions.nolike).length>0&&i.a.createElement(Xr,{icon:"thumb_down",iconColor:at("medium"),style:{fontSize:"12px",margin:0},title:i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:t.users},Object.keys(q._reactions.nolike).sort((function(e,t){return q._reactions.nolike[e].reactDate&&String(q._reactions.nolike[e].reactDate.low)&&q._reactions.nolike[t].reactDate&&String(q._reactions.nolike[t].reactDate.low)&&parseInt(q._reactions.nolike[e].reactDate.low)<parseInt(q._reactions.nolike[t].reactDate.low)?-1:q._reactions.nolike[e].reactDate&&String(q._reactions.nolike[e].reactDate.low)&&q._reactions.nolike[t].reactDate&&String(q._reactions.nolike[t].reactDate.low)&&parseInt(q._reactions.nolike[e].reactDate.low)>parseInt(q._reactions.nolike[t].reactDate.low)?1:0})).map((function(e,t){return i.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},i.a.createElement(Kr.a,{alt:q._reactions.nolike[e].name,src:q._reactions.nolike[e].image||Zr.a}),i.a.createElement("span",{style:{paddingLeft:"7px"}},q._reactions.nolike[e].displayName?q._reactions.nolike[e].displayName:q._reactions.nolike[e].name,q._reactions.nolike[e].reactDate&&q._reactions.nolike[e].reactDate.low&&" (".concat(Be()(1e3*q._reactions.nolike[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))}))))}),q&&q._reactions&&q._reactions.love&&Object.keys(q._reactions.love).length>0&&i.a.createElement(Xr,{icon:"favorite",iconColor:at("medium"),style:{fontSize:"12px",margin:0},title:i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:t.users},Object.keys(q._reactions.love).sort((function(e,t){return q._reactions.love[e].reactDate&&String(q._reactions.love[e].reactDate.low)&&q._reactions.love[t].reactDate&&String(q._reactions.love[t].reactDate.low)&&parseInt(q._reactions.love[e].reactDate.low)<parseInt(q._reactions.love[t].reactDate.low)?-1:q._reactions.love[e].reactDate&&String(q._reactions.love[e].reactDate.low)&&q._reactions.love[t].reactDate&&String(q._reactions.love[t].reactDate.low)&&parseInt(q._reactions.love[e].reactDate.low)>parseInt(q._reactions.love[t].reactDate.low)?1:0})).map((function(e,t){return i.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},i.a.createElement(Kr.a,{alt:q._reactions.love[e].name,src:q._reactions.love[e].image||Zr.a}),i.a.createElement("span",{style:{paddingLeft:"7px"}},q._reactions.love[e].displayName?q._reactions.love[e].displayName:q._reactions.love[e].name,q._reactions.love[e].reactDate&&q._reactions.love[e].reactDate.low&&" (".concat(Be()(1e3*q._reactions.love[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))}))))}),q&&q._reactions&&q._reactions.approve&&Object.keys(q._reactions.approve).length>0&&i.a.createElement(Xr,{icon:"verified",iconColor:"green",style:{fontSize:"12px",margin:0},title:i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:t.users},Object.keys(q._reactions.approve).sort((function(e,t){return q._reactions.approve[e].reactDate&&String(q._reactions.approve[e].reactDate.low)&&q._reactions.approve[t].reactDate&&String(q._reactions.approve[t].reactDate.low)&&parseInt(q._reactions.approve[e].reactDate.low)<parseInt(q._reactions.approve[t].reactDate.low)?-1:q._reactions.approve[e].reactDate&&String(q._reactions.approve[e].reactDate.low)&&q._reactions.approve[t].reactDate&&String(q._reactions.approve[t].reactDate.low)&&parseInt(q._reactions.approve[e].reactDate.low)>parseInt(q._reactions.approve[t].reactDate.low)?1:0})).map((function(e,t){return i.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},i.a.createElement(Kr.a,{alt:q._reactions.approve[e].name,src:q._reactions.approve[e].image||Zr.a}),i.a.createElement("span",{style:{paddingLeft:"7px"}},q._reactions.approve[e].displayName?q._reactions.approve[e].displayName:q._reactions.approve[e].name,q._reactions.approve[e].reactDate&&q._reactions.approve[e].reactDate.low&&" (".concat(Be()(1e3*q._reactions.approve[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))}))))}),q&&q._reactions&&q._reactions.attention&&Object.keys(q._reactions.attention).length>0&&i.a.createElement(Xr,{icon:"report_problem",iconColor:"red",style:{fontSize:"12px",margin:0},title:i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:t.users},Object.keys(q._reactions.attention).sort((function(e,t){return q._reactions.attention[e].reactDate&&String(q._reactions.attention[e].reactDate.low)&&q._reactions.attention[t].reactDate&&String(q._reactions.attention[t].reactDate.low)&&parseInt(q._reactions.attention[e].reactDate.low)<parseInt(q._reactions.attention[t].reactDate.low)?-1:q._reactions.attention[e].reactDate&&String(q._reactions.attention[e].reactDate.low)&&q._reactions.attention[t].reactDate&&String(q._reactions.attention[t].reactDate.low)&&parseInt(q._reactions.attention[e].reactDate.low)>parseInt(q._reactions.attention[t].reactDate.low)?1:0})).map((function(e,t){return i.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},i.a.createElement(Kr.a,{alt:q._reactions.attention[e].name,src:q._reactions.attention[e].image||Zr.a}),i.a.createElement("span",{style:{paddingLeft:"7px"}},q._reactions.attention[e].displayName?q._reactions.attention[e].displayName:q._reactions.attention[e].name,q._reactions.attention[e].reactDate&&q._reactions.attention[e].reactDate.low&&" (".concat(Be()(1e3*q._reactions.attention[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))}))))})),!e.isReply&&i.a.createElement("div",{style:{position:"relative",float:"left",marginLeft:"7px",marginRight:"7px"}},v&&!e.noReactions&&!q.deleted&&i.a.createElement("div",{style:{display:"flex",minWidth:"fit-content",justifyContent:"center"},onMouseOver:function(e){X(!0)},onMouseLeave:K},i.a.createElement(xt,{icon:ee&&"like"===ee?"thumb_up":"thumb_up_off_alt",iconColor:at(ee&&"like"===ee?"menu":"medium"),title:tt("$__like",1),size:"18px",onClick:function(){J("like")},onMouseLeave:K}),i.a.createElement(xt,{icon:ee&&"nolike"===ee?"thumb_down":"thumb_down_off_alt",title:tt("$__notlike",1),iconColor:at(ee&&"nolike"===ee?"menu":"medium"),size:"18px",onClick:function(){J("nolike")},onMouseLeave:K}),i.a.createElement(xt,{icon:ee&&"love"===ee?"favorite":"favorite_border",title:tt("$__love",1),iconColor:at(ee&&"love"===ee?"menu":"medium"),size:"18px",onClick:function(){J("love")},onMouseLeave:K}),i.a.createElement(xt,{icon:"verified",title:tt("$__approve",1),iconColor:ee&&"approve"===ee?"green":at("medium"),size:"18px",onClick:function(){J("approve")},onMouseLeave:K}),i.a.createElement(xt,{icon:"report_problem",title:tt("$__attention",1),iconColor:ee&&"attention"===ee?"red":at("medium"),size:"18px",onClick:function(){J("attention")},onMouseLeave:K}),q&&q.user&&q.user._id===a._id&&i.a.createElement(xt,{icon:"forward",title:tt("$__forwardThisMessage",1),iconColor:"deepskyblue",size:"18px",onClick:function(){A(!0)},onMouseLeave:K}),i.a.createElement(xt,{icon:"reply",title:tt("$__replyThisMessage",1),iconColor:"deepskyblue",size:"18px",onClick:function(){w(!0),K(),e.onOpenReply&&setTimeout((function(){e.onOpenReply()}),100)},onMouseLeave:K}),!q.deleted&&"comment"===q.type&&q.user&&q.user._id&&q.user._id===a._id&&parseInt(q.created_at)>parseInt(Be()().unix("x"))-180?i.a.createElement(Ct,{id:"chat_message_delete",title:tt("$__delete","*"),color:"red",icon:"delete_forever",onClick:function(){ne()},size:"18px",transparent:!0}):i.a.createElement(i.a.Fragment,null))))),_&&(e.nodeId||e.storie.idRel||e.storie._parent)&&i.a.createElement("div",{style:{width:"100%",position:"relative",display:"flex",alignItems:"center",minWidth:"150px",justifyContent:re?"flex-end":"flex-start"},id:"editor_".concat(q._id,"_sending")},i.a.createElement(xt,null,"subdirectory_arrow_right"),i.a.createElement("div",{style:{minWidth:"300px",width:"100%"}},i.a.createElement(ui,{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(){w(!1)},onClose:function(){w(!1)},relative:!0}))),i.a.createElement(mi.a,{fullWidth:!0,"aria-labelledby":"simple-dialog-title",open:N},i.a.createElement("div",{className:"forwardMessage"},i.a.createElement("div",{style:{position:"relative",marginLeft:"10px",marginTop:"5px",width:"calc(100% - 10px)"}},i.a.createElement(_a,{title:tt("$__forwardMessage",1),icon:"forward",onCancel:function(){A(!1)}})),i.a.createElement("div",{style:{padding:15}},i.a.createElement(Ha,{hideSelected:!0,avatarSize:"33px",permission:e.permission,noLimit:!0,ignoreId:e.nodeId?e.nodeId:e.storie.idRel?e.storie.idRel:null,onSelect:function(e){G(e)}})),i.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},i.a.createElement(Ct,{shadow:!0,title:tt("$__cancel"),text:tt("$__cancel"),color:"lightgrey",icon:"close",size:"25px",onClick:function(){A(!1),G(null)}}),Y&&i.a.createElement("div",{style:{marginLeft:"15px"}},i.a.createElement(Ct,{shadow:!0,title:tt("$__forward"),text:tt("$__forward"),icon:"forward",size:"25px",load:!!z,onClick:function(){$(!0),function(e,t){var r;r=(e&&e.store&&Ce.getState().functions&&Ce.getState().functions.socket,Ce.getState().functions.socket);var n=Ce.getState(),a=(n.db,n.session,Object(h.a)(Object(h.a)({},t),{},{forwardedId:t._id,_id:Object(Sn.a)(),created_at:"".concat(Be()().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){go(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)({},q),{},{_forwardToId:Y})),setTimeout((function(){A(!1),G(null),e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},Ce.getState().chat),{},{db:"users",nodeId:Y[0],loading:!1})),$(!1)}),6e3)}}))))))})));var Zi=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Ar)((function(e){var t=e.classes,r=Ce.getState(),n=(r.db,r.lightBox,i.a.useState(!1)),a=Object(Ae.a)(n,2),o=a[0],c=a[1],l=i.a.useState(!1),s=Object(Ae.a)(l,2),u=s[0],d=(s[1],i.a.useState(!1)),p=Object(Ae.a)(d,2),f=(p[0],p[1],i.a.useState(null)),h=Object(Ae.a)(f,2),m=(h[0],h[1],i.a.useState(null)),g=Object(Ae.a)(m,2),v=(g[0],g[1],i.a.useState(!0)),y=Object(Ae.a)(v,2),b=(y[0],y[1],i.a.useState(.5)),x=Object(Ae.a)(b,2);return x[0],x[1],i.a.useEffect((function(){o||c(!0)})),Ce.getState().lightBox.miro||Ce.getState().lightBox.miroBoard?Ce.getState().lightBox.miro||Ce.getState().lightBox.miroBoard?i.a.createElement(Re.a,{className:t.backdrop,open:Ce.getState().lightBox.miro},i.a.createElement("div",{className:t.header},i.a.createElement("div",{className:t.btClose},i.a.createElement(xt,{title:tt("$__close","*"),color:at("light"),onClick:function(){e.reduxFunction("ASYNC","LIGHTBOX_CLOSE")}},"close"))),i.a.createElement("div",{className:t.content,style:{zIndex:1e3}},u?i.a.createElement("div",{className:t.loader},i.a.createElement(wt.a,null)):i.a.createElement("iframe",{style:{position:"absolute",width:"100%",height:"100%"},src:"https://miro.com/app/live-embed/".concat(Ce.getState().lightBox.miroBoard,"=/?embedAutoplay=true&moveToViewport=-23165,-5837,13803,7546")}))):null:i.a.createElement(i.a.Fragment,null)})));var Qi=function(e){return i.a.createElement("div",{id:"sideModule_closeButton",style:Object(h.a)({position:"fixed",display:"inline-flex",paddingLeft:"10px",top:"7px",right:0,backgroundColor:"#FFFFFF"},e.style?e.style:{})},e.saveLoader&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Ot,{size:"25px"})),!e.saveLoader&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{id:"sideModule_saveOptions",style:{display:"flex"}},e.save&&i.a.createElement(Ct,{id:"sideModule_saveButton",title:tt("$__save",1),color:at("color"),icon:"save",onClick:function(){e.save()},size:"25px"}),e.saveClose&&i.a.createElement(Ct,{id:"sideModule_saveAndCloseButton",title:tt("$__saveAndClose",1),color:"green",icon:"playlist_add_check",onClick:function(){e.saveClose()},size:"25px"})),e.close&&i.a.createElement(Ct,{title:tt("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){e.close()},size:"25px"})))},ec=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)({},Ut),{},{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)({},Ut),{},{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)({},Ut),{},{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)({},Ut),{},{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:at("color"),color:at("light")}}},tc=r(51),rc=r.n(tc),nc={};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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 oc=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(nc)((function(e){var t=i.a.useState(""),r=Object(Ae.a)(t,2),n=r[0],a=r[1],o=i.a.useState(!1),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.a.useState([]),d=Object(Ae.a)(u,2),p=d[0],f=d[1],h=Ce.getState(),m=(h.db,h.functions.socket,window.location.hash.split("/"));m[0]=m[0].replace("#",""),i.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(Ne.a)(ac().mark((function t(){var r;return ac().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,bn.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 i.a.createElement("div",{style:{width:"100%",maxHeight:"70vh"}},i.a.createElement("div",{style:{positin:"relative",width:"100%"}},l&&i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},i.a.createElement(so,null)),i.a.createElement(oi,null,Object.keys(p).length>0&&i.a.createElement(li,{xs:12,sm:12,md:12,lg:12,xl:12},Object.keys(p).map((function(t,r){return i.a.createElement("div",{key:t,style:{position:"relative",float:"left",width:"calc(100% - 20px)",marginLeft:"10px",marginRight:"10px",marginBottom:"22px",clear:"both"}},i.a.createElement(Ji,{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 ic=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(nc)((function(e){Ce.getState().db;var t,r=i.a.useState(""),n=Object(Ae.a)(r,2),a=n[0],o=n[1],c=i.a.useState(!1),l=Object(Ae.a)(c,2),s=l[0],u=l[1],d=i.a.useState(!1),p=Object(Ae.a)(d,2),f=p[0],h=p[1],m=window.location.hash.split("/");return m[0]=m[0].replace("#",""),i.a.createElement("div",{style:{position:"relative",zIndex:10,padding:10,backgroundColor:"rgba(250,250,250,0.9)",borderRadius:"25px"}},s?i.a.createElement(i.a.Fragment,null,i.a.createElement(ya,{label:tt("$__searchInChat"),variant:at("fieldVariant"),name:"searchInChat",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"close",color:"lightgray",onClick:function(){o(""),h(!1),u(!1)}})),onChange:function(e,t){o(e.target.value),h(!0)},onBlur:function(){""===a&&(o(""),h(!1),u(!1))}},placeholder:tt("$__searchInChat"),value:ut(a).toLowerCase(),autofocus:!0})):i.a.createElement(Ct,{title:tt("$__search",1),color:"grey",icon:"search",onClick:function(e){u((function(e){return!e}))},transparent:!0}),""!==a&&a.length>1&&f&&i.a.createElement("div",{style:{position:"absolute",bottom:0,left:"7px",right:"7px"}},i.a.createElement(so,null)),""!==a&&a.length>1&&i.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(O.a)(t,"maxHeight","90vh"),Object(O.a)(t,"maxWidth","666px"),Object(O.a)(t,"zIndex",2001),t)},i.a.createElement(oc,{nodeId:e.nodeId,db:e.db,text:a,onFinish:function(e){h(!1)},onAction:function(t){e.onAction&&e.onAction(t),o(""),h(!1),u(!1)}})))}))),cc=r(916),lc=r.n(cc);function sc(){sc=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 uc=Object(Fe.b)((function(e,t){return{store:{timeline:Object(O.a)({},t.nodeId,e.timeline&&e.timeline[t.nodeId]?e.timeline[t.nodeId]:{})}}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Fi)((function(e){var t=e.classes,r=Ce.getState(),n=r.session,a=r.chat,o=e.store.timeline,c=i.a.useState(!0),l=Object(Ae.a)(c,2),s=l[0],u=l[1],d=i.a.useState(0),p=Object(Ae.a)(d,2),f=p[0],m=p[1],g=i.a.useState(null),v=Object(Ae.a)(g,2),y=v[0],b=v[1],x=i.a.useState(e.type?e.type:"comment"),_=Object(Ae.a)(x,2),w=_[0],E=_[1],j=i.a.useState(null),k=Object(Ae.a)(j,2),S=k[0],L=k[1],C=i.a.useState(!1),I=Object(Ae.a)(C,2),F=I[0],T=I[1],N=i.a.useState(!1),A=Object(Ae.a)(N,2),D=A[0],P=A[1],z=i.a.useState(!1),$=Object(Ae.a)(z,2),M=$[0],B=$[1],Y=e.nodeId?Ce.getState().db["".concat(e.db?e.db:"cards")][e.nodeId]:{},G=Ce.getState().db.users[e.nodeId]?"users":"cards",R=i.a.createRef(),H=[],W=[];Ce.getState().db.cards[e.nodeId]&&o[e.nodeId]&&Object.keys(o[e.nodeId]).map((function(t){return W.push(o[e.nodeId][t])}));"kpi"===w&&function e(t){Object.keys(Ce.getState().db.cards).filter((function(e){return Ce.getState().db.cards[e]._parent===t&&Ce.getState().db.cards[e].kpi_useParent&&Ce.getState().db.cards[e].kpi_type===Ce.getState().db.cards[t].kpi_type})).map((function(t){Ce.getState().timeline[t]&&Object.keys(Ce.getState().timeline[t]).filter((function(e){return"kpi"===Ce.getState().timeline[t][e].type&&!Ce.getState().timeline[t][e].deleted})).map((function(e){return W.push(Ce.getState().timeline[t][e])})),e(t)}))}(e.nodeId);var U={};Ce.getState().db.users[e.nodeId]&&(o&&o[n._id]&&Object.keys(o[n._id]).filter((function(t){return o[n._id]&&o[n._id][t]&&o[n._id][t].user&&o[n._id][t].user._id===e.nodeId&&0===W.filter((function(e){return e._id===t})).length})).map((function(e){W.push(o[n._id][e])})),o&&o[e.nodeId]&&Object.keys(o[e.nodeId]).filter((function(t){return o[e.nodeId]})).map((function(t){W.push(o[e.nodeId][t])})),W=Object.keys(W).sort((function(e,t){return parseInt(W[e].created_at)<parseInt(W[t].created_at)?-1:parseInt(W[e].created_at)>parseInt(W[t].created_at)?1:0})).filter((function(t){return W[t].user&&W[t].user._id&&(W[t].user._id===n._id||W[t].user._id===e.nodeId)})).map((function(e){return U[W[e]._id]=i.a.createRef(),W[e]}))),Object.keys(W).map((function(e){U[W[e]._id]=i.a.createRef()})),e.kpi_type&&(W=Object.keys(W).filter((function(t){return W[t].kpi_type===e.kpi_type||W[t].reply})).map((function(e){return U[W[e]._id]=i.a.createRef(),W[e]})));var V=Y&&Y.kpi_ini?parseFloat(Y.kpi_ini):0;i.a.useEffect((function(){return s&&Ce.getState().usersStatus.users[n._id]&&Ce.getState().usersStatus.users[n._id]&&"online"===Ce.getState().usersStatus.users[n._id].status&&q(),function(){u(!0),m(0),b(null),E(e.type?e.type:"comment"),L(null),T(!1),P(!1),B(!1)}}),[]),i.a.useEffect((function(){return setTimeout((function(){L(null)}),2e3),function(){}}),[S]),i.a.useEffect((function(){!D&&document.getElementById("tms_".concat(e.nodeId))&&(document.getElementById("tms_".concat(e.nodeId)).addEventListener("resize",(function(e){return K()})),P(!0));return function(){}})),i.a.useEffect((function(){var e=setTimeout((function(){}),1e5);return M&&(e=setTimeout((function(){s&&Ce.getState().usersStatus.users[n._id]&&Ce.getState().usersStatus.users[n._id]&&"online"===Ce.getState().usersStatus.users[n._id].status&&q(),B(!1)}),300)),function(){clearTimeout(e)}}),[M]),i.a.useEffect((function(){return B(!0),function(){}}),[s]);var q=function(){var t=Object(Ne.a)(sc().mark((function t(){var r,a,o;return sc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=Ce.getState().functions.socket,a=W.filter((function(e){return e&&w&&e.type===w&&e.user&&e.user._id!==n._id&&n&&n._id&&(!e.readedBy||e.readedBy&&!e.readedBy[n._id])})).length,Ce.getState().db.cards&&Ce.getState().db.cards[e.nodeId]&&Ce.getState().db.cards[e.nodeId]._notifications&&Ce.getState().db.cards[e.nodeId]._notifications[w]&&(o=parseInt(a),Ce.getState().db.cards[Y.id]&&Ce.getState().db.cards[Y.id]._notifications&&Ce.getState().db.cards[Y.id]._notifications[Y.type]&&parseInt(Ce.getState().db.cards[Y.id]._notifications[Y.type])>o&&(o=parseInt(Ce.getState().db.cards[Y.id]._notifications[Y.type])),e.reduxFunction("ASYNC","SET_NOTIFICATIONS",Object(h.a)(Object(h.a)({},Ce.getState().notifications),{},{total:Ce.getState().notifications.total-o}))),r&&n&&n._id&&W&&e.nodeId&&G&&W.length>0&&parseInt(a)>0&&(r.emit("data",{module:"chat",method:"put",action:"read"},{readedBy:n._id,id:e.nodeId,db:G,type:w}),Ce.getState().chats.unreadeds[e.nodeId]&&e.reduxFunction("ASYNC","SET_CHATS",Object(h.a)(Object(h.a)({},Ce.getState().chats),{},{unreadeds:Object(h.a)(Object(h.a)({},Ce.getState().chats.unreadeds),{},Object(O.a)({},e.nodeId,0))})));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();i.a.useEffect((function(){return y!==e.nodeId?(m(0),u(!0),b(e.nodeId),K(!0),setTimeout((function(){K(!0)}),300),E(e.type?e.type:"comment")):w!==e.type&&E(e.type?e.type:"comment"),s&&Ce.getState().usersStatus.users&&Ce.getState().usersStatus.users[n._id]&&Ce.getState().usersStatus.users[n._id]&&"online"===Ce.getState().usersStatus.users[n._id].status&&q(),function(){}}),[e.nodeId,e.type,a,Ce.getState().usersStatus.users[n._id]]),i.a.useEffect((function(){return!e.noAutoScroll&&s&&(K(),setTimeout((function(){K()}),300)),J(),function(){}}),[o]),i.a.useEffect((function(){return T(!0),X(),function(){}}),[w,JSON.stringify(a)]);var X=function(){var t=Object(Ne.a)(sc().mark((function t(){return sc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:vo(Object(h.a)(Object(h.a)({},e),{},{fnIdentification:"Timeline/Index/init()",force:!0}),Object(h.a)({ids:e.nodeId,db:G,type:e.type?e.type:"comment"},"kpi"===e.type?{limit:!1,skip:!1,reqChildrens:!0}:{limit:!0,skip:W.filter((function(t){return t.type===e.type})).length>0?W.filter((function(t){return t.type===e.type})).length-1:0,reqChildrens:!1})),T(!1);case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),K=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),J()}},J=function(){var e=Object(Ne.a)(sc().mark((function e(t){return sc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s&&W.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&&B(!0);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Z=function(){var t=Object(Ne.a)(sc().mark((function t(){var r,n;return sc().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<W.length)){t.next=9;break}return m(W.length),n=Object.keys(W).length>0&&Object.keys(W).filter((function(e){var t=t||"comment";if(W[e].type===t||W[e].reply&&Object.keys(W).filter((function(r){return W[r]&&W[r]._id===W[e].reply&&W[r].type===t})).length>0)return!0})).sort((function(e,t){return parseInt(W[e].created_at)<parseInt(W[t].created_at)?-1:W[e].created_at>W[t].created_at?1:0})).map((function(e){return W[e]}))[0],t.next=7,vo(Object(h.a)(Object(h.a)({},e),{},{fnIdentification:"Timeline/Index/scrollFunction()"}),{ids:[e.nodeId],db:G,type:"comment",limit:!0,skip:W.length});case 7:t.sent&&n&&n._id&&Q(n._id);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Q=function(){var t=Object(Ne.a)(sc().mark((function t(r){var a,i,c,l=arguments;return sc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=l.length>1&&void 0!==l[1]&&l[1],T(!0),L(r),!o[e.nodeId]||o[e.nodeId][r]||"users"===G&&("users"!==G||!o[n._id]||o[n._id][r])){t.next=10;break}return t.next=6,vo(Object(h.a)(Object(h.a)({},e),{},{fnIdentification:"Timeline/Index/scrollFunction()"}),{ids:[e.nodeId],db:G,toId:r});case 6:t.sent&&r&&setTimeout((function(){Q(r)}),1e3),t.next=11;break;case 10:a?(document.getElementById("msg_".concat(r)).scrollIntoView({behavior:"smooth"}),u(!1),T(!1)):(i=document.getElementById("msg_".concat(r)))&&i.offsetTop?(c=i.offsetTop,document.getElementById("tms_".concat(e.nodeId)).scrollTop=c,T(!1)):T(!1);case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:t.root},i.a.createElement("div",{className:(e.nodeId,t.content)},i.a.createElement("div",{className:t.timeline},i.a.createElement("ul",{className:e.showHeader?t.timelineSimpleWithHeader:t.timelineSimple,ref:R,id:"tms_".concat(e.nodeId),onScroll:function(e){Z(e)},style:{zIndex:1}},W&&Object.keys(W).length>0&&Object.keys(W).filter((function(e){if((!W[e].deleted||W[e].deleted&&W[e].user&&W[e].user._id&&W[e].user._id===n._id)&&(W[e].type===w||W[e].reply&&Object.keys(W).filter((function(t){return W[t]&&W[t]._id===W[e].reply&&W[t].type===w})).length>0))return!0})).sort((function(e,t){return W[e].created_at<W[t].created_at?-1:W[e].created_at>W[t].created_at?1:0})).map((function(r,n){var o=W[r];return V=parseFloat(parseFloat(V)+parseFloat(o.value)),o.balance=V,o.files&&Object.keys(o.files).length>0&&Object.keys(o.files).map((function(e,t){var r=o.files[e];H.push(r)})),i.a.createElement("li",{className:t.item+""+lc.a.MessageHighlight,key:o._id,ref:U[o._id],id:"msg_".concat(o._id),style:Object(h.a)(Object(h.a)({},n-1===Object.keys(W).filter((function(e){var t=t||"comment";if(W[e].type===t||W[e].reply&&Object.keys(W).filter((function(r){return W[r]&&W[r]._id===W[e].reply&&W[r].type===t})).length>0)return!0})).length?{marginBottom:"80px !important"}:{}),S===o._id?{padding:"7px",backgroundColor:"#f4ebff",cursor:"pointer",marginBottom:"15px"}:{}),onClick:S?function(e){L(null),e.preventDefault()}:null},i.a.createElement(Ji,{openLightBox:function(t){var r;r=t,e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:H,file:r})},storie:o,reply:o&&o.reply&&W.filter((function(e){return e._id===o.reply})).length>0?W.filter((function(e){return e._id===o.reply}))[0]:null,hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId,replyClick:function(){Q(o.reply,!0)},showUserName:!!(a&&a.nodeId&&Ce.getState().db.cards&&Ce.getState().db.cards[a.nodeId]),onOpenReply:function(){Object.keys(W).length-1===n&&K(!0)}}),i.a.createElement("div",{style:{marginBottom:"15px",clear:"both"}}))})),i.a.createElement("div",{style:{clear:"both"}})),F?i.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}},i.a.createElement(Gr,null)):e.noSearch?i.a.createElement(i.a.Fragment,null):i.a.createElement("div",{style:{position:"absolute",top:0,right:0}},i.a.createElement(ic,{db:G,nodeId:e.nodeId,onAction:function(e){Q(e._id,!0)}}))),!s&&i.a.createElement("div",{style:{position:"absolute",bottom:"100px",right:"15px",width:"33px",height:"33px",zIndex:100}},i.a.createElement(Xr,{icon:"arrow_downward",iconColor:"red",size:"33px",onClick:function(){K(!0)}})))))}))),dc=Object(Fe.b)((function(){return{}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Fi)((function(e){var t=e.classes,r=Ce.getState().session;i.a.useEffect((function(){return function(){}}),[]);var n=Ce.getState().db.users[e.nodeId]?"users":"cards";return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:t.root},i.a.createElement(uc,e),e.nodeId&&!e.disabledSend&&(!Ce.getState().db.cards[e.nodeId]||Ce.getState().db.cards[e.nodeId]&&(!Ce.getState().db.cards[e.nodeId].onlyAdminsSendMessages||Ce.getState().db.cards[e.nodeId]._users&&Ce.getState().db.cards[e.nodeId]._users[r._id]&&Ce.getState().db.cards[e.nodeId]._users[r._id].access>4))?i.a.createElement(i.a.Fragment,null,"users"!==n||"users"===n&&Ce.getState().db.users&&Ce.getState().db.users[e.nodeId]&&!Ce.getState().db.users[e.nodeId].deleted?i.a.createElement(ui,{db:e.db?e.db:"cards",nodeId:e.nodeId,editorStyle:{padding:"7px"}}):i.a.createElement(i.a.Fragment,null)):Ce.getState().db.cards[e.nodeId]&&"chatGroup"===Ce.getState().db.cards[e.nodeId].type&&i.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:at("menu")}},tt("$__onlyAdminsCanSendMessages",1))))}))),pc=r(1689);function fc(){fc=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 hc=Object(Fe.b)((function(){return{}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=function(){var t=Object(Ne.a)(fc().mark((function t(r,n){var a,o,i;return fc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=n,o=Ce.getState().db[e.dbNode],!e.ws){t.next=9;break}return t.next=5,a.map(function(){var t=Object(Ne.a)(fc().mark((function t(r,n){var i,c,l,s;return fc().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,Ze.post(e.api?e.api:"node/add/".concat(e.dbNode),{name:r.trim(),secondaryParent:e.secondaryParent?e.secondaryParent:null});case 3:(i=t.sent)&&(c=i&&i.data&&i.data.id?i.data.id:i.data.value,0===o.filter((function(e){return e.value===c})).length&&(o.push({value:c,label:r}),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},Object(O.a)({},e.dbNode,o)))),0===a.filter((function(e){return e.value===c})).length&&(a.splice(n,1),a.push({value:c,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&&(l=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===l.value})).length&&(a.splice(n,1),a.push({value:l.value,label:l.label}));case 8:return s=[],a.filter((function(e){e&&e.value&&s.push(e)})),a=Array.from(s),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,i.a.createElement(pc.a,Object.assign({},r,{onChange:function(e,r){t(e,r)}}))})),mc=Object(We.a)((function(e){return{root:{border:"none",boxShadow:"0 3px 3px 3px rgba(0,0,0,0.05)","& .MuiIcon-root":{color:"rgba(250,250,250,0.33)"},"& .MuiIcon-root:hover":{color:"rgba(250,250,250,0.77)"},padding:0}}}))(Do.a);function gc(e){var t=i.a.useState(!1),r=Object(Ae.a)(t,2),n=r[0],a=r[1];return i.a.createElement(mc,{style:Object(h.a)(Object(h.a)({},e.style?e.style:{}),n?{}:{paddingLeft:10,paddingRight:10}),deleteIcon:e.deleteIcon?e.deleteIcon:null,label:e.label,onMouseOver:function(){a(!0)},onMouseLeave:function(){a(!1)},onDelete:e.onDelete&&n?function(){e.onDelete()}:null,onClick:e.onClick?function(t){e.onDelete()}:null})}var vc=Object(We.a)({root:Object(h.a)(Object(h.a)({},Ut),{},{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:at("color")},"& label.MuiFormLabel-filled":{color:at("color"),marginTop:"standard"===at("fieldVariant")||"filled"===at("fieldVariant")?"-10px":0},"& label.Mui-focused":{color:at("color"),marginTop:"standard"===at("fieldVariant")||"filled"===at("fieldVariant")?"-10px":0},"& .MuiInput-underline:after":{borderBottomColor:at("line")},"& .MuiOutlinedInput-root":{borderRadius:at("fieldRadius"),"& fieldset":{borderColor:at("line")},"&.Mui-focused fieldset":{borderColor:at("line")}},"& .MuiFilledInput-root":{borderRadius:at("fieldRadius"),"& fieldset":{borderColor:at("line")},"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")},"&.Mui-focused":{borderBottomColor:at("line"),"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===at("fieldVariant")?0:"filled"===at("fieldVariant")?"-15px":0,borderRadius:at("fieldRadius"),color:"#FFFFFF","& fieldset":{borderColor:at("line")},"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")},"&.Mui-focused":{borderBottomColor:at("line"),"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")}}}})})(va.a),yc={labelTop:Object(h.a)(Object(h.a)({},Ut),{},{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:at("color")},"& label.MuiFormLabel-filled":{color:at("color"),marginTop:"standard"===at("fieldVariant")||"filled"===at("fieldVariant")?"-10px":"0px"},"& label.Mui-focused":{color:at("color"),marginTop:"standard"===at("fieldVariant")||"filled"===at("fieldVariant")?"-10px":"0px"},"& .MuiInput-underline:after":{borderBottomColor:at("line")},"& .MuiOutlinedInput-root":{borderRadius:at("fieldRadius"),"& fieldset":{borderColor:at("line")},"&.Mui-focused fieldset":{borderColor:at("line")}},"& .MuiFilledInput-root":{borderRadius:at("fieldRadius"),"& fieldset":{borderColor:at("line")},"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")},"&.Mui-focused":{borderBottomColor:at("line"),"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===at("fieldVariant")?"0px":"filled"===at("fieldVariant")?"-15px":"0px",borderRadius:at("fieldRadius"),color:"#FFFFFF","& fieldset":{borderColor:at("line")},"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")},"&.Mui-focused":{borderBottomColor:at("line"),"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")}}}}),noLabel:Object(h.a)(Object(h.a)({},Ut),{},{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:at("color")},"& label.MuiFormLabel-filled":{display:"none"},"& label.Mui-focused":{display:"none"},"& .MuiInput-underline:after":{borderBottomColor:at("line")},"& .MuiOutlinedInput-root":{borderRadius:at("fieldRadius"),"& fieldset":{borderColor:at("line")},"&.Mui-focused fieldset":{borderColor:at("line")}},"& .MuiFilledInput-root":{borderRadius:at("fieldRadius"),"& fieldset":{borderColor:at("line")},"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")},"&.Mui-focused":{borderBottomColor:at("line"),"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")}}},"& .MuiInputLabel-outlined":{display:"none",marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{borderRadius:at("fieldRadius"),color:"#FFFFFF","& fieldset":{borderColor:at("line")},"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")},"&.Mui-focused":{borderBottomColor:at("line"),"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")}}}}),labelTopLight:Object(h.a)(Object(h.a)({},Ut),{},{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:at("color")},"& label.MuiFormLabel-filled":{color:at("color"),marginTop:"standard"===at("fieldVariant")||"filled"===at("fieldVariant")?"-10px":"0px"},"& label.Mui-focused":{color:at("color"),marginTop:"standard"===at("fieldVariant")||"filled"===at("fieldVariant")?"-10px":"0px"},"& .MuiInput-underline:after":{borderBottomColor:at("line")},"& .MuiOutlinedInput-root":{borderRadius:at("fieldRadius"),"& fieldset":{borderColor:at("line")},"&.Mui-focused fieldset":{borderColor:at("line")}},"& .MuiFilledInput-root":{borderRadius:at("fieldRadius"),"& fieldset":{borderColor:at("line")},"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")},"&.Mui-focused":{borderBottomColor:at("line"),"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===at("fieldVariant")?"0px":"filled"===at("fieldVariant")?"-15px":"0px",borderRadius:at("fieldRadius"),"& fieldset":{borderColor:at("line")},"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")},"&.Mui-focused":{borderBottomColor:at("line"),"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")}}}}),noLabelLight:Object(h.a)(Object(h.a)({},Ut),{},{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:at("color")},"& label.MuiFormLabel-filled":{display:"none"},"& label.Mui-focused":{display:"none"},"& .MuiInput-underline:after":{borderBottomColor:at("line")},"& .MuiOutlinedInput-root":{borderRadius:at("fieldRadius"),"& fieldset":{borderColor:at("line")},"&.Mui-focused fieldset":{borderColor:at("line")}},"& .MuiFilledInput-root":{borderRadius:at("fieldRadius"),"& fieldset":{borderColor:at("line")},"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")},"&.Mui-focused":{borderBottomColor:at("line"),"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")}}},"& .MuiInputLabel-outlined":{display:"none",marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{borderRadius:at("fieldRadius"),"& fieldset":{borderColor:at("line")},"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")},"&.Mui-focused":{borderBottomColor:at("line"),"&::before":{borderBottomColor:at("line")},"&::after":{borderBottomColor:at("line")}}}})},bc=Object(_t.a)(yc);var xc=function(e){var t=bc(),r=i.a.useState([]),n=Object(Ae.a)(r,2),a=n[0],o=n[1];i.a.useEffect((function(){o(e.value)}),[e.value]);var c=function(t){var r=Array.from(a);r.splice(r.findIndex((function(e){return e.value===t.value})),1),o(r),e.onChange&&e.onChange(r)};return i.a.createElement(hc,{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?tt(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?i.a.createElement(vc,Object.assign({},t,{label:tt(e.placeholder||"$__values","*"),variant:"standard",InputProps:Object(h.a)(Object(h.a)({},t.InputProps),e.InputProps)})):i.a.createElement(ya,Object.assign({},t,{label:tt(e.placeholder||"$__values","*"),variant:"standard",InputProps:Object(h.a)(Object(h.a)({},t.InputProps),e.InputProps)}))},renderOption:function(e){return i.a.createElement("div",{style:{zIndex:3e3}},e.label)},renderTags:function(t,r){return t.map((function(t,r){return i.a.createElement("div",{key:r},e.colorPicker&&t&&t.label?i.a.createElement(un,{label:t&&t.label?t.label:null,color:t.color,_id:t.value,onChange:function(r){var n=t;n.color=r,e.colorPickerCallBack&&e.colorPickerCallBack(n)}},i.a.createElement(gc,{label:t&&t.label?t.label:null,style:{backgroundColor:t.color||"#b7b7b7",boxShadow:"0 0 7px 3px rgba(0,0,0,0.05)",color:gt(t.color||"#b7b7b7",!0)},deleteIcon:i.a.createElement(He.a,{style:{color:gt(t.color||"#b7b7b7",!0),fontSize:"20px"}},"delete"),onDelete:function(){c(t)}})):t&&t.label?i.a.createElement(gc,{label:t&&t.label?t.label:null,style:{backgroundColor:t.color||"#b7b7b7",boxShadow:"0 0 7px 3px rgba(0,0,0,0.05)",color:gt(t.color||"#b7b7b7",!0)},deleteIcon:i.a.createElement(He.a,{style:{color:gt(t.color||"#b7b7b7",!0),fontSize:"20px"}},"delete"),onDelete:function(){c(t)}}):i.a.createElement(i.a.Fragment,null))}))},onChange:function(t,r){e.onChange&&e.onChange(r);var n=[];e.multiple?(r.map((function(e){e&&e.label?n.push(e):n.push({label:e})})),o(n)):o(r)},dbNode:e.dbNode?e.dbNode:"tag",add:!(!e.add||!0!==e.add),inNode:e.inNode?e.inNode:null,secondaryParent:e.secondaryParent?e.secondaryParent:null,ws:!0,api:e.api?e.api:null})},_c={instruction:{},picture:{}};function wc(){wc=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Ec=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(_c)((function(e){var t=i.a.useState([]),r=Object(Ae.a)(t,2),n=r[0],a=r[1];i.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 o=function(){var t=Object(Ne.a)(wc().mark((function t(r){return wc().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 i.a.createElement("div",null,i.a.createElement(xc,{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){o(e)},colorPickerCallBack:function(t){e.colorPickerCallBack&&e.colorPickerCallBack(t)}}))}))),Oc=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:at("color")}}},switch:{fontSize:"16px",fontWeight:"bold",color:at("medium")},accessDescription:{fontSize:"14px",color:at("medium")}}};function jc(){jc=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 kc=Object(Fe.b)((function(e,t){return{tag:e.db.tag,userGroup:e.db.userGroup,sideModule:e.sideModule}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Oc)((function(e){var t=e.classes,r=Ce.getState(),n=r.sideModule,a=r.db,o=r.session,c=a.users,l=a.dataType,s=n.data,u=i.a.useState(!ot(s&&s.email?s.email:"")),d=Object(Ae.a)(u,2),p=d[0],f=d[1],m=i.a.useState(!1),g=Object(Ae.a)(m,2),v=g[0],y=g[1],b=ft(),x=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(O.a)({},t.name,r))}))},_=function(t){v&&!t?it({message:tt("$__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(Ne.a)(jc().mark((function t(r){var a;return jc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return y(!1),t.next=3,Ta(s.email);case 3:if(a=t.sent,s.name){t.next=8;break}it({message:tt("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=20;break;case 8:if(-1!==l.filter((function(e){return e.name===s.type}))[0].disabledFields.indexOf("email")||!p){t.next=12;break}it({message:p,variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=20;break;case 12:if(-1!==l.filter((function(e){return e.name===s.type}))[0].disabledFields.indexOf("email")||!(!ot(n.data.email)||c[s._id]&&s.email!==c[s._id].email&&a)){t.next=16;break}f(tt("$__invalidEmail",1)),t.next=20;break;case 16:return t.next=18,Ca(e);case 18:t.sent&&(it({message:tt("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&_(!0));case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),E=!1;return(s._id===o._id||b&&b.user&&(b.userAdmin||b.userEdit))&&(E=!0),s.independentAccount&&(E=!1),i.a.createElement("div",null,i.a.createElement(Qi,{save:E&&v?function(){return w()}:null,saveClose:E&&v?function(){return w(!0)}:null,close:function(){return _(!0)}}),E||!E&&n.data.image,i.a.createElement("div",{id:"sideModule_user_foto"},console.log(E),i.a.createElement(bi,{maxWidthOrHeight:600,img:n.data&&n.data.image?n.data.image:null,onChange:E?function(e,t){x({name:"file",value:t})}:null,avatar:!0,avatarIcon:s.type&&"user"!==s.type?s.type&&"group"!==s.type?"business":"groups":"person"})),i.a.createElement("form",{className:t.data,autoComplete:"off",id:"sideModule_user_data"},i.a.createElement(ya,{id:"sideModule_user_fullName",label:tt("$__fullName",1),variant:at("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"person"})),onChange:function(e){x(e.target)},onBlur:function(e){if(s&&!s.name){var t=e.target.value?"".concat(e.target.value.split(" ")[0]," ").concat(e.target.value.split(" ")[1]?e.target.value.split(" ")[1]:""):"";x({name:"name",value:t.trim()})}}},value:s&&s.fullName?s.fullName:"",placeholder:tt("$__fullName",1),autoFocus:!0,disabled:!E}),i.a.createElement(ya,{id:"sideModule_user_displayName",label:tt("$__displayName",1),variant:at("fieldVariant"),name:"name",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"view_comfy_ind"})),onChange:function(e){x(e.target)},onBlur:function(e){x(e.target)}},value:s&&s.name?s.name:"",placeholder:tt("$__displayName",1),disabled:!E}),-1===l.filter((function(e){return e.name===s.type}))[0].disabledFields.indexOf("email")&&i.a.createElement(ya,{id:"sideModule_user_email",label:tt("$__email",1),variant:at("fieldVariant"),name:"email",type:"email",helperText:p,InputProps:{autoComplete:"new-password",className:!p&&s.email&&ot(s&&s.email?s.email:"")?"":"invalid",endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"alternate_email"})),onChange:function(e){f(null),x(e.target)},onBlur:function(){var e=Object(Ne.a)(jc().mark((function e(t){var r;return jc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(s._id&&"new"!==s._id&&c[s._id]&&c[s._id].email!==t.target.value||!s._id||"new"===s._id)){e.next=9;break}if(!ot(t.target.value)||c[s._id]&&t.target.value===c[s._id].email){e.next=8;break}return e.next=4,Ta(t.target.value);case 4:r=e.sent,f(r?tt("$__emailAlreadyExists",1):null),e.next=9;break;case 8:f(tt("$__invalidEmail",1));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},value:s&&s.email?s.email:"",placeholder:tt("$__email",1),disabled:!E}),E&&b&&b.user&&(b.userAdmin||b.userEdit)?i.a.createElement(i.a.Fragment,null,i.a.createElement("fieldset",{style:{marginBottom:"14px"},id:"sideModule_user_tags"},i.a.createElement(Ec,{data:{values:s.tags||[],_id:s._id},options:Ce.getState().db.tag?Ce.getState().db.tag:[],placeholder:"$__tagsPlaceholder",dbNode:"tag",callBack:function(e){x({name:"tags",value:e})},secondaryParent:s._parent,colorPickerCallBack:function(e){Ce.getState().functions.socket.emit("tag.UPD",e)}})),i.a.createElement("fieldset",{style:{marginBottom:"14px"},id:"sideModule_user_group"},i.a.createElement(Ec,{data:{values:s.groups||[],_id:s._id},options:Ce.getState().db.userGroup?Ce.getState().db.userGroup:[],placeholder:"$__userGroupPlaceholder",dbNode:"userGroup",callBack:function(e){x({name:"groups",value:e})},secondaryParent:s._parent,colorPickerCallBack:function(e){}}))):i.a.createElement(i.a.Fragment,null)))})));function Sc(e){var t=i.a.useState({cPassword:"",password:""}),r=Object(Ae.a)(t,2),n=r[0],a=r[1],o=i.a.useState(!1),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.a.useState(0),d=Object(Ae.a)(u,2),p=d[0],f=d[1],m=i.a.useState(0),g=Object(Ae.a)(m,2),v=g[0],y=g[1];i.a.useEffect((function(){e.clear&&e.clear!==v&&(y(e.clear),a({cPassword:"",password:""}),s(!1))}));return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{textAlign:"left"}},i.a.createElement("p",null,tt("$__passwordTip_1")),i.a.createElement("p",null,tt("$__passwordTip_2")),i.a.createElement("ul",null,i.a.createElement("li",null,tt("$__passwordTip_3")),i.a.createElement("li",null,tt("$__passwordTip_4")),i.a.createElement("li",null,tt("$__passwordTip_5")),i.a.createElement("li",null,tt("$__passwordTip_6")),i.a.createElement("li",null,tt("$__passwordTip_7")))),i.a.createElement(ya,{label:tt("$__password",1),variant:"standard",name:"password_primary",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:n.password,endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,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}),i.a.createElement(ya,{label:tt("$__passwordConfirm",1),variant:"standard",name:"password_secondary",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:n.cPassword,endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{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&&i.a.createElement("div",{style:{position:"relative",width:"100%",margin:"auto",marginBottom:"7px",padding:"3px 0"}},1===p?tt("$__passwordTooWeak",1):2===p?tt("weakPassword",1):3===p?tt("$__goodPassword",1):4===p?tt("$__veryGoodPassword",1):null),n.password&&i.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&&i.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(20% - 6px)",height:"5px",backgroundColor:"red",margin:"0 3px"}}),p>=1&&i.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(20% - 6px)",height:"5px",backgroundColor:"rgb(129,153,179)",margin:"0 3px"}}),p>=2&&i.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(20% - 6px)",height:"5px",backgroundColor:"rgb(95,151,254)",margin:"0 3px"}}),p>=3&&i.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(20% - 6px)",height:"5px",backgroundColor:"rgb(42,66,255)",margin:"0 3px"}}),4===p&&i.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(20% - 6px)",height:"5px",backgroundColor:"rgb(38,165,45)",margin:"0 3px"}})))}var Lc=r(1664),Cc=Object(We.a)({switchBase:{color:at("medium"),"&$checked":{color:at("color")},"&$checked + $track":{backgroundColor:at("color")}},checked:{},track:{}})(Lc.a),Ic=function(e){return{btClose:{position:"relative",zIndex:e.zIndex.drawer+1,right:"0",top:"-64px",backgroundColor:"#FFFFFF",display:"flex"},image:{width:"100%",backgroundColor:"rgb(0,88,0)",paddingTop:"45%"},data:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",overflowY:"auto",marginTop:"10px",padding:"10px"},switch:{fontSize:"16px",fontWeight:"bold",color:at("medium")}}};function Fc(){Fc=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Tc=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Ic)((function(e){var t,r=e.classes,n=Ce.getState(),a=n.sideModule,o=n.session,c=n.functions,l=n.db,u=c.socket,d=a.data,p=i.a.useState(d),f=Object(Ae.a)(p,2),m=f[0],g=(f[1],i.a.useState(!1)),v=Object(Ae.a)(g,2),y=v[0],b=v[1],x=i.a.useState(null),_=Object(Ae.a)(x,2),w=_[0],E=_[1],j=i.a.useState(0),k=Object(Ae.a)(j,2),S=k[0],L=k[1],C=ft(),I=function(t){return b(!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(O.a)({},t.name,t.value))})})),!0},F=function(t){var r={_id:d._id,isAdmin:t};try{Ce.getState().functions.socket.emit("data",{module:"user",method:"post",action:"save"},r,(function(t){t.error?console.log("companyDataError",t.error):e.reduxFunction("ASYNC","SET_SESSION",Object(h.a)(Object(h.a)({},Ce.getState().session),{},{GlobalData:Object(h.a)(Object(h.a)({},Ce.getState().session.GlobalData),r)}))}))}catch(n){console.log(n)}},T=function(t){!t&&y?it({message:tt("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},N=function(){var t=Object(Ne.a)(Fc().mark((function t(r){return Fc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return b(!1),t.next=3,Ia(e);case 3:t.sent&&(it({message:tt("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),F(!d._access.admin||null),r&&T(!0));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),A=function(){var e=Object(Ne.a)(Fc().mark((function e(){return Fc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:u.emit("data",{module:"user",method:"post",action:"accessSendInvite"},{_id:Ce.getState().sideModule.data._id,name:Ce.getState().sideModule.data.name,email:Ce.getState().sideModule.data.email},(function(){it({message:tt("$__invitedEmailSended",1),variant:"success",persist:!1,horizontal:"center"})}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),D=function(){var e=Object(Ne.a)(Fc().mark((function e(){return Fc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Ze.post("/user/new-password",{userId:d._id,password:w});case 3:e.sent&&(E(null),it({message:tt("$__passwordChanged",1),variant:null,persist:!1,horizontal:"right",confirm:null})),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),it({message:"".concat(tt("$__invalidRequest",1)," | ").concat(tt("$__contactSupport",1)),variant:"warning",persist:!1,horizontal:"right",confirm:null});case 10:L(S+1);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),P=(l.plans[0].settings.space,l.plans[0]);o&&o.GlobalData&&String(o.GlobalData.plan)&&l.plans[o.GlobalData.plan]&&l.plans[o.GlobalData.plan].settings&&(l.plans[o.GlobalData.plan].settings.space,P=l.plans[o.GlobalData.plan]);var z=1;P&&P.settings&&P.settings.admins&&(z=parseInt(P.settings.admins));var $=Object.keys(l.users).filter((function(e){return l.users[e]&&e!==d._id&&l.users[e]._access&&l.users[e]._access.admin&&(!l.users[e]._parent||l.users[e]._parent&&l.users[l.users[e]._parent]&&!l.users[l.users[e]._parent].independentAccount)})).length||0;return console.log(z,$),d._access&&d._access.owner&&o._id!==d._id||o._id===d._id?i.a.createElement("div",null,i.a.createElement(Qi,{save:y?function(){return N()}:null,saveClose:y?function(){return N(!0)}:null,close:function(){return T(!0)}}),i.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},i.a.createElement("div",{style:{position:"relative",width:"100%"}},i.a.createElement(Sc,{onConfirmed:function(e){E(e)},clear:S})),w&&i.a.createElement("div",{style:(t={display:"flex",padding:"7px 15px",margin:"auto",cursor:"pointer",backgroundColor:"green",marginTop:"15px"},Object(O.a)(t,"display","flex"),Object(O.a)(t,"alignItems","center"),Object(O.a)(t,"justifyContent","center"),Object(O.a)(t,"borderRadius","7px"),t),onClick:function(){D()}},i.a.createElement(Xr,{icon:"save",text:tt("$__save","*"),title:!tt("$__save","*"),iconColor:at("lightText"),textColor:at("lightText")})))):i.a.createElement("div",null,i.a.createElement(Qi,{save:y?function(){return N()}:null,saveClose:y?function(){return N(!0)}:null,close:function(){return T(!0)}}),i.a.createElement("div",{className:r.data},i.a.createElement("fieldset",null,i.a.createElement("div",{className:r.switch},i.a.createElement(Cc,{checked:!(!d._access||!d._access.enabled),onChange:function(e){I({name:"enabled",value:!d._access||!d._access.enabled})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__permitPlataformAccess",1)),i.a.createElement("div",{className:r.accessDescription},i.a.createElement("i",null,tt("$__userAccess_PlataformAccessDescription",1)))),d._access&&"owner"===d._access?i.a.createElement("fieldset",null,i.a.createElement("div",{className:r.accessDescription},i.a.createElement("i",null," ",tt("$__youAreAccountOwner",1)))):$<z||d._access.admin?i.a.createElement(i.a.Fragment,null,i.a.createElement("fieldset",null,i.a.createElement("div",{className:r.switch},i.a.createElement(Cc,{checked:!(!d._access||!d._access.admin),onChange:function(e){I({name:"admin",value:!d._access||!d._access.admin})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__adminAccess",1)),i.a.createElement("div",{className:r.accessDescription},i.a.createElement("i",null,tt("$__adminAccess_PlataformDescription",1))))):i.a.createElement(i.a.Fragment,null,i.a.createElement("fieldset",null,i.a.createElement("legend",null,tt("$__adminLimitReached")),i.a.createElement("div",{className:r.accessDescription},i.a.createElement("i",null,tt("$__adminLimitReachedDescription",1)),i.a.createElement("div",{style:{position:"relative",marginTop:7,color:at("menu"),fontWeight:"bolder"}},tt("$__usedStorage","*"),i.a.createElement("span",{style:{marginLeft:15,color:"red",fontSize:11,cursor:"pointer"},onClick:function(){s.push("#tab/subscriptionUpgrade")}},tt("$__upgradeSubscription")))))),d._access&&d._access.enabled&&d._access.admin&&i.a.createElement(i.a.Fragment,null,i.a.createElement(i.a.Fragment,null,d._token&&i.a.createElement("fieldset",{style:{backgroundColor:"rgba(255,0,0,0.1)"}},i.a.createElement("i",null,tt("$__unregisteredUserAlert",1)),i.a.createElement(Xr,{text:tt("$__sendInviteEmail",1),icon:"contact_mail",onClick:function(){A()}})),d._token&&d._token._id&&i.a.createElement("fieldset",{style:{backgroundColor:"rgba(255,0,0,0.1)"}},i.a.createElement("i",null,tt("$__urlToActivate",1)),i.a.createElement("input",{type:"text",value:"".concat("true"===String("true")?"https://software.machen.ai":"http://localhost:3000","/activate?token=").concat(d._token._id),onClick:function(e){e.target.select()},onChange:function(e){console.log("a")}}))),i.a.createElement("fieldset",null,i.a.createElement("legend",null,i.a.createElement(Cc,{checked:!(!d._access||!d._access.user),onChange:function(e){I({name:"user",value:!d._access||!d._access.user})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__users",1)),d._access&&(!d._access||d._access.user&&!1!==d._access.user)?i.a.createElement(i.a.Fragment,null,!d._access.userAdmin&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:r.switch},i.a.createElement(Cc,{checked:!(!d._access||!d._access.userRead),onChange:function(e){I({name:"userRead",value:!d._access||!d._access.userRead})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__read",1)),i.a.createElement("div",{className:r.switch},i.a.createElement(Cc,{checked:!(!d._access||!d._access.userInteract),onChange:function(e){I({name:"userInteract",value:!d._access||!d._access.userInteract})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__interact",1)),i.a.createElement("div",{className:r.switch},i.a.createElement(Cc,{checked:!(!d._access||!d._access.userEdit),onChange:function(e){I({name:"userEdit",value:!d._access||!d._access.userEdit})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__edit",1))),i.a.createElement("div",{className:r.switch},i.a.createElement(Cc,{checked:!(!d._access||!d._access.userAdmin),onChange:function(e){I({name:"userAdmin",value:!d._access||!d._access.userAdmin})},name:"checkeduserAdmin",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__admin",1))):i.a.createElement("div",{className:r.accessDescription},i.a.createElement("i",null,tt("$__userAccess_UserAccessDescription",1)))),i.a.createElement("fieldset",null,i.a.createElement("legend",null,i.a.createElement(Cc,{checked:!(!d._access||!d._access.plan),onChange:function(e){I({name:"plan",value:!d._access||!d._access.plan})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__plan",1)),d._access&&(!d._access||d._access.plan&&!1!==d._access.plan)?i.a.createElement(i.a.Fragment,null,!d._access.planAdmin&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:r.switch},i.a.createElement(Cc,{checked:!(!d._access||!d._access.planRead),onChange:function(e){I({name:"planRead",value:!d._access||!d._access.planRead})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__read",1)),i.a.createElement("div",{className:r.switch},i.a.createElement(Cc,{checked:!(!d._access||!d._access.planEdit),onChange:function(e){I({name:"planEdit",value:!d._access||!d._access.planEdit})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__edit",1)),i.a.createElement("div",{className:r.switch},i.a.createElement(Cc,{checked:!(!d._access||!d._access.createTemplate),onChange:function(e){I({name:"createTemplate",value:!d._access||!d._access.createTemplate})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__createTemplate",1)),i.a.createElement("div",{className:r.switch},i.a.createElement(Cc,{checked:!(!d._access||!d._access.planModerate),onChange:function(e){I({name:"planModerate",value:!d._access||!d._access.planModerate})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__moderate",1))),i.a.createElement("div",{className:r.switch},i.a.createElement(Cc,{checked:!(!d._access||!d._access.planAdmin),onChange:function(e){I({name:"planAdmin",value:!d._access||!d._access.planAdmin})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__admin",1))):i.a.createElement("div",{className:r.accessDescription},i.a.createElement("i",null,tt("$__userAccess_StrategyAndPlansAccessDescription")))),C&&C.master&&d._isAdmin?i.a.createElement("fieldset",null,i.a.createElement("legend",null,i.a.createElement(Cc,{checked:!(!d._access||!d._access.feed),onChange:function(e){I({name:"feed",value:!d._access||!d._access.feed})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__feed",1)),d._access&&(!d._access||d._access.feed&&!1!==d._access.feed)?i.a.createElement(i.a.Fragment,null,!d._access.feedAdmin&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:r.switch},i.a.createElement(Cc,{checked:!(!d._access||!d._access.feedEdit),onChange:function(e){I({name:"feedEdit",value:!d._access||!d._access.feedEdit})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__edit",1)),i.a.createElement("div",{className:r.switch},i.a.createElement(Cc,{checked:!(!d._access||!d._access.feedModerate),onChange:function(e){I({name:"feedModerate",value:!d._access||!d._access.feedModerate})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__moderate",1))),i.a.createElement("div",{className:r.switch},i.a.createElement(Cc,{checked:!(!d._access||!d._access.feedAdmin),onChange:function(e){I({name:"feedAdmin",value:!d._access||!d._access.feedAdmin})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__admin",1))):i.a.createElement("div",{className:r.accessDescription},i.a.createElement("i",null,tt("$__feedAccess_StrategyAndPlansAccessDescription")))):i.a.createElement(i.a.Fragment,null),C&&C.masterAdmin?i.a.createElement(i.a.Fragment,null,i.a.createElement("fieldset",null,i.a.createElement("legend",{style:{color:"red"}},i.a.createElement(Cc,{checked:!(!d._access||!d._access.masterAdmin),onChange:function(e){I({name:"masterAdmin",value:!d._access||!d._access.masterAdmin})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__accountAdministrator",1)),i.a.createElement("div",{className:r.accessDescription},i.a.createElement("i",null,tt("$__accountAdministratorDescription"))))):i.a.createElement(i.a.Fragment,null)),m&&m._access&&m._access.admin&&d&&d._access&&!d._access.admin?i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{color:"red",fontSize:12}},"Ao remover a permiss\xe3o de administrador do usu\xe1rio, o mesmo perder\xe1 acesso \xe0 todas as atividades que administra atualmente e passar\xe1 a ter acesso restrito \xe0s atividades da plataforma.")):i.a.createElement(i.a.Fragment,null)))})));function Nc(){Nc=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Ac=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Ic)((function(e){e.classes;var t,r,n,a=Ce.getState(),c=a.sideModule,l=(a.db,a.session,a.functions.socket,c.data,i.a.useState(!1)),s=Object(Ae.a)(l,2),u=s[0],d=(s[1],i.a.useState((t={image:null},Object(O.a)(t,"image",null),Object(O.a)(t,"status",!1),t))),p=Object(Ae.a)(d,2),f=p[0],m=p[1],g=i.a.useState(null),v=Object(Ae.a)(g,2),y=v[0],b=v[1];Object(o.useEffect)((function(){x()}),[]);var x=function(){var e=Object(Ne.a)(Nc().mark((function e(){var t,r;return Nc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,bn.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,bn.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(Ne.a)(Nc().mark((function e(){var t;return Nc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,bn.post("/M_User_TwoFactor",{action:"verify",code:y});case 2:(t=e.sent)&&t.data&&t.data.result?m(Object(h.a)(Object(h.a)({},f),{},{status:!0})):(it({message:tt("$__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(Ne.a)(Nc().mark((function e(){var t,r;return Nc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,bn.post("/M_User_TwoFactor",{action:"disable",code:y});case 2:(t=e.sent)&&t.data&&t.data.result?(m((r={image:null},Object(O.a)(r,"image",null),Object(O.a)(r,"status",!1),r)),x()):it({message:tt("$__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 i.a.createElement("div",null,i.a.createElement(Qi,{close:function(){u?it({message:tt("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")}}),f.status?i.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},i.a.createElement("div",{style:{textAlign:"left"}},i.a.createElement("p",null,tt("$__disableTokenTip_1")),i.a.createElement("p",null,tt("$__disableTokenTip_2")),i.a.createElement("ul",null,i.a.createElement("li",null,tt("$__disableTokenTip_3")),i.a.createElement("li",null,tt("$__disableTokenTip_4")),i.a.createElement("li",null,tt("$__disableTokenTip_5")),i.a.createElement("li",null,tt("$__disableTokenTip_6")),i.a.createElement("li",null,tt("$__disableTokenTip_7")))),i.a.createElement(ya,{label:tt("$__token",1),variant:"standard",name:"token",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:y,endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,null,"lock_outline")),autoComplete:"new-password",onChange:function(e){b(e.target.value)}},autoComplete:"new-password",value:y,max:6}),i.a.createElement("div",{style:(n={display:"flex",padding:"7px 15px",margin:"auto",cursor:"pointer",backgroundColor:"red",marginTop:"15px"},Object(O.a)(n,"display","flex"),Object(O.a)(n,"alignItems","center"),Object(O.a)(n,"justifyContent","center"),Object(O.a)(n,"borderRadius","7px"),n),onClick:function(){w()}},i.a.createElement(Xr,{icon:"toggle_on",text:tt("$__disableToken","*"),title:tt("$__disableToken","*"),iconColor:at("lightText"),textColor:at("lightText")}))):i.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},i.a.createElement("div",{style:{position:"relative",width:"100%"}},f.image&&i.a.createElement("img",{src:f.image})),i.a.createElement("div",{style:{textAlign:"left"}},i.a.createElement("p",null,tt("$__tokenTip_1")),i.a.createElement("p",null,tt("$__tokenTip_2")),i.a.createElement("ul",null,i.a.createElement("li",null,tt("$__tokenTip_3")),i.a.createElement("li",null,tt("$__tokenTip_4")),i.a.createElement("li",null,tt("$__tokenTip_5")),i.a.createElement("li",null,tt("$__tokenTip_6")),i.a.createElement("li",null,tt("$__tokenTip_7")))),i.a.createElement("fieldset",null,i.a.createElement("legend",null,tt("$__token",1)),i.a.createElement(ya,{label:tt("$__token",1),variant:"standard",name:"token",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:y,endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,null,"lock_outline")),autoComplete:"new-token",onChange:function(e){b(e.target.value)}},placeholder:tt("$__token","*"),autoComplete:"new-token",value:y,max:6})),!f.status&&y&&6===y.length&&i.a.createElement("div",{style:(r={display:"flex",padding:"7px 15px",margin:"auto",cursor:"pointer",backgroundColor:"green",marginTop:"15px"},Object(O.a)(r,"display","flex"),Object(O.a)(r,"alignItems","center"),Object(O.a)(r,"justifyContent","center"),Object(O.a)(r,"borderRadius","7px"),r),onClick:function(){_()}},i.a.createElement(Xr,{icon:"check",text:tt("$__activeToken","*"),title:!tt("$__activeToken","*"),iconColor:at("lightText"),textColor:at("lightText")}))))})));function Dc(){Dc=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Pc=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Ic)((function(e){var t=e.classes,r=Ce.getState(),n=r.sideModule,a=r.db,o=i.a.useState(!1),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.a.useState(n.data),d=Object(Ae.a)(u,2),p=d[0],f=d[1],m=i.a.useState(n.data&&n.data.language?n.data.language:"pt-BR"),g=Object(Ae.a)(m,2),v=g[0],y=g[1],b=function(t){var r=Object(h.a)(Object(h.a)({},p),{},Object(O.a)({},t.name,t.value));"language"===t.name&&y(t.value),e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},n),{},{data:Object(h.a)(Object(h.a)({},n.data),{},Object(O.a)({},t.name,t.value))})),s(!0),f(r)},x=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];l&&!t?it({message:tt("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},_=function(){var t=Object(Ne.a)(Dc().mark((function t(r){var n;return Dc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s(!1),t.next=3,Ca(e);case 3:n=t.sent,console.log(p),n&&(it({message:tt("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),p.language!==v&&e.reduxFunction("ASYNC","SET_SESSION",Object(h.a)(Object(h.a)({},Ce.getState().session),{},{language:v})),r&&(x(!0),p.language!==v&&setTimeout((function(){window.location.reload()}),1500)));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),w=ft(),E=!1;return w&&w.user&&(w.userAdmin||w.userEdit)&&(E=!0),i.a.createElement("div",null,i.a.createElement(Qi,{save:l?function(){return _()}:null,saveClose:l?function(){return _(!0)}:null,close:function(){return x(!0)}}),i.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},i.a.createElement("fieldset",null,i.a.createElement("legend",null,tt("$__language",1)),i.a.createElement(hc,{id:"combo-box-demo",options:a.languages,getOptionLabel:function(e){return tt(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 i.a.createElement(ya,Object.assign({},e,{label:tt("$__language",1),variant:at("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})}})),i.a.createElement("fieldset",null,i.a.createElement("legend",null,tt("$__sessionDuration",1)),i.a.createElement("div",null,tt("$__sessionDurationDescription",1)),i.a.createElement(hc,{id:"combo-box-demo",options:a.expiresIn,getOptionLabel:function(e){return tt(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 i.a.createElement(ya,Object.assign({},e,{label:tt("$__expiresIn",1),variant:at("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})}})),Ce.getState().session.isResale&&"user"!==p.type?i.a.createElement("fieldset",{style:{marginBottom:"14px"}},Ce.getState().db.users[p._id].independentAccount?i.a.createElement("div",{style:{color:"gray",fontSize:11}},tt("$__thisIsAIndependentAccountExplain",1)):i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:t.switch},i.a.createElement(Cc,{checked:!!p.independentAccount,onChange:function(e){E&&b({name:"independentAccount",value:!p.independentAccount})},name:"independentAccount",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__turnIntoIndependentAccount",1)),i.a.createElement("div",{style:{color:"gray",fontSize:11}},tt("$__turnIntoIndependentAccountExplain",1)))):i.a.createElement(i.a.Fragment,null)))})));function zc(){zc=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 $c=Object(Fe.b)((function(){return{}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Ic)((function(e){var t=e.classes,r=Ce.getState(),n=r.sideModule,a=(r.db,i.a.useState(!1)),o=Object(Ae.a)(a,2),c=o[0],l=o[1],s=i.a.useState(n.data),u=Object(Ae.a)(s,2),d=u[0],p=u[1],f=i.a.useState(n.data&&n.data.language?n.data.language:null),m=Object(Ae.a)(f,2),g=(m[0],m[1],function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];c&&!t?it({message:tt("$__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(Ne.a)(zc().mark((function t(r){return zc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l(!1),t.next=3,Ca(e);case 3:t.sent&&(it({message:tt("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&g(!0));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),y=ft(),b=!1;return y&&y.user&&(y.userAdmin||y.userEdit)&&(b=!0),i.a.createElement("div",null,i.a.createElement(Qi,{save:c?function(){return v()}:null,saveClose:c?function(){return v(!0)}:null,close:function(){return g(!0)}}),i.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},Ce.getState().session.isResale?i.a.createElement("fieldset",{style:{marginBottom:"14px"}},Ce.getState().db.users[d._id].independentAccount?i.a.createElement("div",{style:{color:"gray",fontSize:11}},tt("$__thisIsAIndependentAccountExplain",1)):i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:t.switch},i.a.createElement(Cc,{checked:!!d.independentAccount,onChange:function(t){b&&function(t){var r=Object(h.a)(Object(h.a)({},d),{},Object(O.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(O.a)({},t.name,t.value))})),l(!0),p(r)}({name:"independentAccount",value:!d.independentAccount})},name:"independentAccount",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__turnIntoIndependentAccount",1)),i.a.createElement("div",{style:{color:"gray",fontSize:11}},tt("$__turnIntoIndependentAccountExplain",1)))):i.a.createElement(i.a.Fragment,null)))}))),Mc=r(917),Bc=r.n(Mc),Yc=r(918),Gc=r.n(Yc);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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Hc=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Ic)((function(e){e.classes;var t,r=Ce.getState(),n=r.sideModule,a=(r.db,r.session,r.functions.socket,n.data,i.a.useState(!1)),c=Object(Ae.a)(a,2),l=c[0],s=(c[1],i.a.useState((t={image:null},Object(O.a)(t,"image",null),Object(O.a)(t,"status",!1),t))),u=Object(Ae.a)(s,2),d=(u[0],u[1],i.a.useState(null)),p=Object(Ae.a)(d,2);p[0],p[1],Object(o.useEffect)((function(){f()}),[]);var f=function(){var e=Object(Ne.a)(Rc().mark((function e(){return Rc().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 i.a.createElement("div",null,i.a.createElement(Qi,{close:function(){l?it({message:tt("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")}}),i.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},i.a.createElement("div",{style:{textAlign:"left"}},i.a.createElement("p",null,tt("$__mobileTokenTip_1")),i.a.createElement("ul",null,i.a.createElement("li",null,tt("$__mobileTokenTip_2")),i.a.createElement("li",null,tt("$__mobileTokenTip_3")),i.a.createElement("li",null,tt("$__mobileTokenTip_4")))),i.a.createElement("img",{src:Gc.a,style:{width:"52%"}}),i.a.createElement("img",{src:Bc.a,style:{width:"52%",marginTop:"33px"}})))}))),Wc=Object(Fe.b)((function(e){return{timeline:e.timeline&&e.sideModule.id&&e.timeline[e.sideModule.id]?e.timeline[e.sideModule.id]:{},card:e.db.cards&&e.db.cards[e.sideModule.id]?e.db.cards[e.sideModule.id]:{},sideModule:e.sideModule}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(ec)((function(e){var t=e.classes,r=e.sideModule,n={};return e.count&&(n=la(r.id)),i.a.createElement("div",{className:t.MenuButton,id:"sideModule_buttom_".concat(e.module)},i.a.createElement(jt.a,{onClick:function(){e.openModule(e.module)}},i.a.createElement(St.a,{overlap:"rectangular",badgeContent:e.count&&n&&n[e.count]?n[e.count]:null,color:"secondary"},i.a.createElement(xt,{disabled:r.activeModule!==e.module,icon:e.icon,size:e.size,color:at("light"),title:e.title})),r.activeModule===e.module&&i.a.createElement(xt,{className:t.MenuButton_arrow,color:at("color"),icon:"play_arrow"})))}))),Uc=r(539),Vc=r.n(Uc),qc=r(940);r(756);var Xc=i.a.forwardRef((function(e,t){return i.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},i.a.createElement("label",{onClick:e.onClick,ref:t,style:{marginRight:7,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},e.value||e.placeholder),i.a.createElement(xt,{size:"22px",color:at("color"),icon:"today",onClick:e.onClick}))})),Kc=function(e){return Object(Uc.registerLocale)("pt",qc.a),i.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"})},i.a.createElement("div",{style:Object(h.a)({},e.horizontal?{width:e.onClear?"calc(50% - 11px)":""}:{})},i.a.createElement(Vc.a,Object.assign({locale:"pt",placeholderText:e.placeholder?e.placeholder:tt("$__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:tt("$__time"),dateFormat:"dd/MM/yyyy HH:mm",showTimeInput:!0}:{dateFormat:"dd/MM/yyyy"},{customInput:i.a.createElement(Xc,null),showYearDropdown:!0}))),e.range?i.a.createElement("div",{style:Object(h.a)({},e.horizontal?{marginLeft:7,width:e.onClear?"calc(50% - 18px)":"calc(50% - 7px)"}:{marginTop:7})},i.a.createElement(Vc.a,Object.assign({locale:"pt",placeholderText:tt("$__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:tt("$__time"),dateFormat:"dd/MM/yyyy HH:mm",showTimeInput:!0}:{dateFormat:"dd/MM/yyyy"},{customInput:i.a.createElement(Xc,null),showYearDropdown:!0}))):i.a.createElement(i.a.Fragment,null),e.onClear&&(e.startDate||e.endDate)?i.a.createElement("div",{style:Object(h.a)({display:"flex",justifyContent:e.clearButtonPosition?e.clearButtonPosition:"center"},e.horizontal?{}:{paddingTop:3})},i.a.createElement(Ct,Object.assign({color:at("lightgray"),icon:"clear",onClick:e.onClear,size:"15px"},e.horizontal?{}:{title:tt("$__clearDate","*"),text:tt("$__clearDate","*")}))):i.a.createElement(i.a.Fragment,null))},Jc=r(1665),Zc=r(920),Qc=r.n(Zc);function el(e){var t=i.a.useState(!1),r=Object(Ae.a)(t,2),n=r[0],a=r[1],o=i.a.useRef(null),c=i.a.useState(0),l=Object(Ae.a)(c,2),s=l[0],u=l[1];i.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){o.current&&o.current.contains(e.target)||a(!1)};return i.a.createElement(i.a.Fragment,null,i.a.createElement(Jc.a,{variant:"text",ref:o,"aria-label":"split button"},i.a.createElement(kt.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),i.a.createElement(kt.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},i.a.createElement(Qc.a,null))),i.a.createElement(ln.a,{open:n,anchorEl:o.current,role:void 0,transition:!0},(function(t){var r=t.TransitionProps,n=t.placement;return i.a.createElement(on.a,Object.assign({},r,{style:{transformOrigin:"bottom"===n?"center top":"center bottom"}}),i.a.createElement(cn.a,null,i.a.createElement(an.a,{onClickAway:p},i.a.createElement(hn.a,{id:"split-button-menu"},e.options.map((function(t,r){return i.a.createElement(fn.a,{key:t.value,selected:t.value===s,onClick:function(){u(t.value),d(),e.onChange&&e.onChange(t.value)}},t.label)}))))))})))}var tl=Object(_t.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)}}})),rl={recurrence:"0",recurrenceRepeatDays:null,recurrenceEndDate:null,recurrenceLimit:null,recurrenceMyDay:null,recurrenceOnlyCompleted:null,recurrenceDuplicateCard:null};var nl=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=i.a.useState({recurrence:"0"}),r=Object(Ae.a)(t,2),n=r[0],a=r[1],o=tl();i.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})}),[]),i.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=Be()(1e3*e.data.startDate).tz("America/Sao_Paulo").add(r,"d").format("YYYY-MM-DD");return Be()(1e3*e.data.startDate).tz("America/Sao_Paulo").add(r,"d").unix("X")<Be()().tz("America/Sao_Paulo").unix("X")&&(n=Be()().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:Be()().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:Be()().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:Be()().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:Be()().tz("America/Sao_Paulo").add(1,"month").format("YYYY-MM-01")})),a(r),e.onChange&&e.onChange(r)};return i.a.createElement("div",{id:"RecurrencySettings",className:o.root},i.a.createElement("div",{className:o.options},tt("$__recurrence"),i.a.createElement(el,{options:[{value:"0",label:tt("$__nonrecurrence")},{value:"1",label:tt("$__everyDay")},{value:"7",label:tt("$__weekly")},{value:"15",label:tt("$__every15days")},{value:"30",label:tt("$__every30days")},{value:"everyFirstMonthDay",label:tt("$__everyFirstMonthDay")},{value:"everyMonday",label:tt("$__everyMonday")},{value:"everyFriday",label:tt("$__everyFriday")},{value:"custom",label:tt("$__custom")}],value:n&&n.recurrence?n.recurrence:"0",onChange:function(e){c("0"===e?Object(h.a)(Object(h.a)({},rl),{},{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)&&i.a.createElement("div",{className:o.custom},tt("$__preffers",1),n&&"custom"===n.recurrence&&i.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},tt("$__repeatEvery",1),i.a.createElement(ya,{style:{width:"100px"},variant:at("standard"),name:"recurrenceRepeatDays",type:"number",min:"1",InputLabelProps:{shrink:!0},InputProps:{min:1,autoComplete:"new-password",endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"replay_10"}),tt("$__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})),i.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},tt("$__limitDate",1),i.a.createElement(ya,{style:{width:"200px"},variant:at("standard"),name:"endDate",InputLabelProps:{shrink:!0},type:"date",InputProps:{endAdornment:n.recurrenceEndDate?i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{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?Be()(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?Be()(e.target.value).tz("America/Sao_Paulo").format("YYYY-MM-DD"):null}))}},defaultValue:e.data.recurrenceEndDate?e.data.recurrenceEndDate:null})),i.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},tt("$__recurrenceDuplicateCard",1),i.a.createElement(Cc,{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&&i.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},tt("$__copyCatenation",1),i.a.createElement(Cc,{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 al(){al=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 ol=Object(Fe.b)((function(e){return{tags:e.db.tag}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(_c)((function(e){var t=i.a.useState([]),r=Object(Ae.a)(t,2),n=r[0],a=r[1],o=ft();i.a.useEffect((function(){if(e.data.values){var t=[];e.data.values.map((function(e){Ce.getState().db.tag.filter((function(t){return t.value===e.value})).length>0&&t.push(e)})),a(t)}}),[e.data]);var c=function(){var t=Object(Ne.a)(al().mark((function t(r){return al().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 i.a.createElement("div",null,i.a.createElement(xc,{dbNode:e.dbNode?e.dbNode:"tag",secondaryParent:e.secondaryParent?e.secondaryParent:null,options:Ce.getState().db.tag?Ce.getState().db.tag:[],style:{width:"100%"},name:"tag",ws:!0,title:tt("$__tags"),api:"tag/add",add:!0,colorPicker:!(!o||!o.plan||!o.planAdmin&&!o.planModerate),multiple:!0,freeSolo:!0,disableClearable:!0,disabled:!!e.disabled,value:n,placeholder:e.placeholder||null,onChange:function(e){c(e)},colorPickerCallBack:function(e){Ce.getState().functions.socket.emit("tag.UPD",e)}}))})));function il(){il=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 cl=Object(Fe.b)((function(e){return{sideModule:e.sideModule,card:e.db.cards[e.sideModule.id]}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Oc)((function(e){var t,r=e.classes,n=Ce.getState(),a=n.db,o=n.sideModule,c=n.session,l=i.a.useState({}),u=Object(Ae.a)(l,2),d=u[0],p=u[1],m=i.a.useState({}),g=Object(Ae.a)(m,2),v=g[0],y=g[1],b=i.a.useState(!1),x=Object(Ae.a)(b,2),_=x[0],w=x[1],E=i.a.useState(!1),j=Object(Ae.a)(E,2),k=j[0],S=j[1],L=i.a.useState(!1),C=Object(Ae.a)(L,2),I=C[0],F=C[1],T=i.a.useState(!1),N=Object(Ae.a)(T,2),A=N[0],D=N[1],P=i.a.useState(null),z=Object(Ae.a)(P,2),$=z[0],M=z[1],B=i.a.useState(null),Y=Object(Ae.a)(B,2),G=Y[0],R=Y[1],H=i.a.useState(!1),W=Object(Ae.a)(H,2),U=W[0],V=W[1],q=i.a.useState(0),X=Object(Ae.a)(q,2),K=X[0],J=X[1],Z=i.a.useState(!1),Q=Object(Ae.a)(Z,2),ee=Q[0],te=Q[1],re=ft(),ne=ea(o.id);i.a.useEffect((function(){d._id!==o.data._id&&(p(o.data),w(!1)),A||(o.data.startDate&&M(o.data&&o.data.startDate?o.data.startDate:null),o.data.endDate&&R(o.data&&o.data.endDate?o.data.endDate:null),p(o.data),w(!1),"link"!==d.type||d.name||le(),D(!0),ae()),o.data.name&&""!==o.data.name.trim()&&"link"===o.data.type&&"new"===o.data._id&&(w(!0),e.reqSave&&e.reqSave(!0))}),[o.data,d]),i.a.useEffect((function(){!d.name||d.name&&""===d.name.trim?w(!1):w(!0)}),[v]);var ae=function(){var t=Object(Ne.a)(il().mark((function t(){return il().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,En(Object(h.a)(Object(h.a)({},e),{},{ignoreLoader:!0}),{idRel:[o.data._id],cardLoad:"parents"});case 2:t.sent&&te(!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),oe=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(t.value&&!o.data[t.name]&&!d[t.name]||o.data[t.name]&&o.data[t.name]!==t.value||n)&&e.reqSave&&e.reqSave(!0);var a=Object(h.a)(Object(h.a)({},d),{},Object(O.a)({},t.name,t.value));r&&r.name&&r.value&&(a=Object(h.a)(Object(h.a)(Object(h.a)({},d),a),{},Object(O.a)({},r.name,r.value))),p(a),y(Object(h.a)(Object(h.a)({},v),{},Object(O.a)({},t.name,t.value),r&&r.name&&r.value?Object(O.a)({},r.name,r.value):{}))},ie=function(t){_&&!t?it({message:tt("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},ce=function(){var t=Object(Ne.a)(il().mark((function t(){var r,n=arguments;return il().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n.length>0&&void 0!==n[0]&&n[0],k){t.next=19;break}if(w(!1),e.reqSave&&e.reqSave(!1),d.status||(d.status="notStarted"),"new"===o.id&&o.data&&p(Object(h.a)(Object(h.a)({},d),o.data)),e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},o),{},{data:d})),d.name&&(!d.name||""!==d.name.trim())){t.next=12;break}S(!1),it({message:tt("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=19;break;case 12:return t.next=14,Cn(Object(h.a)(Object(h.a)({},e),{},{store:Object(h.a)(Object(h.a)({},e.store),{},{db:Object(h.a)({},Ce.getState().db)})}),r,d);case 14:t.sent&&(v&&v.status&&(aa(Object(h.a)(Object(h.a)({},e),{},{data:{_id:d._id}}),{status:v.status}),ca(e,d._id,v.status)),S(!1),it({message:tt("$__DataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null})),w(!1),e.reqSave&&e.reqSave(!1),r&&ie(!0);case 19:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),le=function(){var t=Object(Ne.a)(il().mark((function t(){var r;return il().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ze.post("/link/content",{url:d.url});case 2:r=t.sent,p(Object(h.a)(Object(h.a)({},d),{},{content:r.data.article})),w(!0),e.reqSave&&e.reqSave(!0);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),se=o.data&&o.data.type?a.dataType.filter((function(e){return e.name===o.data.type}))[0]:{},ue=null;if(d._parent&&(ue=Ce.getState().db.cards[d._parent]),!d)return null;var de=Ce.getState().db.cards[d._id]&&Ce.getState().db.cards[d._id]._users&&Ce.getState().db.cards[d._id]._users[c._id]&&Ce.getState().db.cards[d._id]._users[c._id].myDay?Ce.getState().db.cards[d._id]._users[c._id].myDay:null,pe=!!(!de||de&&de&&Be()(new Date(1e3*de)).format("YYYY/MM/DD")!==Be()().format("YYYY/MM/DD")),fe=!!e.permission&&e.permission;!fe&&parseInt(ne)>=3&&(fe=!0);var he=!1,me=i.a.createElement(i.a.Fragment,null);if(d&&d.url&&d.url.indexOf(".youtube.com/watch?")>-1){var ge=d.url.split("?")[1].split("v=")[1].split("&")[0];ge&&(me=i.a.createElement("iframe",{width:"560",height:"315",style:{top:0,width:"100%",maxWidth:"500px",height:"100%",alignSelf:"center",position:"absolute",overflow:"hidden"},src:"https://www.youtube.com/embed/".concat(ge),title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),he=!0)}if(d&&d.url&&d.url.indexOf("//youtu.be/")>-1){var ve=d.url.split(".be/")[1];ve&&(me=i.a.createElement("iframe",{width:"560",height:"315",style:{top:0,width:"100%",maxWidth:"500px",height:"100%",alignSelf:"center",position:"absolute",overflow:"hidden"},src:"https://www.youtube.com/embed/".concat(ve),title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),he=!0)}return i.a.createElement(i.a.Fragment,null,i.a.createElement(Qi,{save:_?function(){S(!0),ce()}:null,saveClose:_?function(){S(!0),ce(!0)}:null,saveLoader:k,close:function(){e.onClose&&e.onClose()}}),i.a.createElement("div",{className:r.root},he?i.a.createElement("div",{style:{backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center",paddingTop:"48%",display:"flex",justifyContent:"center",alignItems:"center",position:"relative",float:"left",width:"100%"}},me):i.a.createElement(i.a.Fragment,null),(!se.hideFields||se.hideFields&&-1===se.hideFields.indexOf("imageUpload")&&fe)&&i.a.createElement(bi,{img:d?d.image:null,onChange:function(e,t){oe({name:"image",value:e}),oe({name:"file",value:t})},files:d._files?d._files:{},maxWidthOrHeight:600,avatar:"chatGroup"===d.type,aspectRatio:"chatGroup"===d.type?null:16/9}),(!se.hideFields||se.hideFields&&-1===se.hideFields.indexOf("image")||!fe&&d.image)&&i.a.createElement("div",{className:r.image,style:{backgroundImage:"url(".concat(d.image,")")}}),i.a.createElement("div",{className:r.data},d.url&&i.a.createElement("div",{style:{width:"100%",textAlign:"right"}},i.a.createElement("a",{href:d.url,target:"_blank",style:{color:at("menu"),fontWeight:"bold"}},tt("$__openlink","*"))),(d._parent||d._planId)&&ee?i.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"auto"}},i.a.createElement("span",{style:{color:at("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},tt("$__loadingdata")),i.a.createElement(so,null)):(d._parent&&a.cards[d._parent]||d._planId&&a.cards[d._planId])&&i.a.createElement(Ao,{id:d._parent?d._parent:d._planId?d._planId:null,open:function(t){e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},Ce.getState().sideModule),{},{db:"cards",id:t,module:"cardEdit",activeModule:"cardEdit",data:Ce.getState().db.cards[t]}))}}),i.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},d._id&&a.cards[d._id]&&a.cards[d._id]._users&&i.a.createElement(ro,{_id:d._id,noLimit:!0,avatarSize:"33px",permission:fe}),i.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end"}},"plan"===d.type&&d._id&&fe?i.a.createElement(Ct,{title:tt("$__openPlan",1),icon:"launch",color:"lightgray",onClick:function(){s.push("sp#".concat(d._id,"/dashboard")),ie(!0)},size:"25px"}):i.a.createElement(i.a.Fragment,null),e.card&&e.card._id&&"plan"===e.card.type?i.a.createElement(Ct,{title:tt(e.card&&e.card._isFavorite?"$__removeFromFavorite":"$__addToFavorite",1),icon:e.card&&e.card._isFavorite?"favorite":"favorite_border",color:e.card&&e.card._isFavorite?"red":"lightgray",onClick:function(){ht(e,d._id,!(!e.card||!e.card._isFavorite)),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},d._id,Object(h.a)(Object(h.a)({},Ce.getState().db.cards[d._id]),{},{_isFavorite:!e.card||!e.card._isFavorite})))}))},size:"25px"}):i.a.createElement(i.a.Fragment,null),fe&&d._id&&36===d._id.length&&se.hideFields&&-1===se.hideFields.indexOf("myDay")&&i.a.createElement(Ct,{title:tt(de&&Be()(new Date(1e3*de)).format("YYYY/MM/DD")===Be()().format("YYYY/MM/DD")?"$__removeOfMyDate":"$__addOnMyDay",1),color:de&&Be()(new Date(1e3*de)).format("YYYY/MM/DD")===Be()().format("YYYY/MM/DD")?"red":"lightblue",icon:de&&Be()(new Date(1e3*de)).format("YYYY/MM/DD")===Be()().format("YYYY/MM/DD")?"auto_delete":"alarm_add",onClick:function(){Wn(e,{_id:d._id,userId:c._id,option:pe}),e.myDayClick&&e.myDayClick()},size:"25px"}))),i.a.createElement("div",null,e.card&&e.card._id&&e.card._users[c._id]?i.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"},onClick:function(e){e.stopPropagation()}},i.a.createElement(Va,{data:e.card})):i.a.createElement(i.a.Fragment,null)),i.a.createElement("fieldset",{style:{marginBottom:"14px"}},i.a.createElement("legend",null,tt("$__data",1)),d.created_at?i.a.createElement("div",{style:{position:"relative",fontSize:12,color:"#bfbfbf",padding:"3px 0px",marginTop:-8,textAlign:"right"}},tt("$__createdAt"),": ",vt(d.created_at)):i.a.createElement(i.a.Fragment,null),i.a.createElement(ya,{label:tt(se&&se.fieldsTitle&&se.fieldsTitle.name?se.fieldsTitle.name:"$__titleOfCard",1),variant:at("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"view_headline"})),onChange:function(e){oe(e.target)}},value:d&&d.name?d.name:"",placeholder:tt(se&&se.fieldsPlaceholder&&se.fieldsPlaceholder.name?se.fieldsPlaceholder.name:"$__titleOfCard_placeholder",1),disabled:!(fe&&"completed"!==d.status&&!(se&&se.disabledFields&&se.disabledFields.indexOf("name")>-1))}),i.a.createElement(ya,{label:tt("$__description",1),variant:at("fieldVariant"),name:"description",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"toc"})),onChange:function(e){oe(e.target)}},value:d&&d.description?d.description:"",placeholder:tt("$__descriptionOfCard_placeholder",1),disabled:!(fe&&"completed"!==d.status&&!(se&&se.disabledFields&&se.disabledFields.indexOf("description")>-1))}),"chatGroup"!==d.type?i.a.createElement(ya,{label:tt("$__URL",1),variant:at("fieldVariant"),name:"url",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"http"})),onChange:function(e){oe(e.target)}},value:d&&d.url?d.url:"",placeholder:"https://domain.com",disabled:!(fe&&"completed"!==d.status&&!(se&&se.disabledFields&&se.disabledFields.indexOf("name")>-1))}):i.a.createElement(i.a.Fragment,null),d.url?i.a.createElement("div",{style:{width:"100%",textAlign:"right"}},i.a.createElement("a",{href:d.url,target:"_blank",style:{color:at("menu"),fontWeight:"bold"}},tt("$__openlink","*"))):i.a.createElement(i.a.Fragment,null)),fe&&(!se.hideFields||se.hideFields&&-1===se.hideFields.indexOf("client"))&&(!d.client||d.client&&a.users[d.client])&&i.a.createElement(hc,{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 tt(e.label,1)},style:{width:"100%"},name:"client",value:d&&d.client?Object.keys(a.users).filter((function(e){return d.client&&a.users[e]._id===d.client})).map((function(e){return{label:a.users[e].name,value:String(a.users[e]._id)}}))[0]:null,renderInput:function(e){return i.a.createElement(ya,Object.assign({},e,{label:tt("$__account",1),variant:at("fieldVariant"),value:d&&d.client?Object.keys(a.users).filter((function(e){return d.client&&a.users[e]._id===d.client})).map((function(e){return{label:a.users[e].name,value:String(a.users[e]._id)}}))[0]:null}))},onChange:function(e,t){oe({name:"client",value:t&&t.value?String(t.value):null})},disabled:!(fe&&"completed"!==d.status&&!(se&&se.disabledFields&&se.disabledFields.indexOf("client")>-1))}),!(!fe&&!d.startDate&&!d.endDate)&&(!se.hideFields||se.hideFields&&-1===se.hideFields.indexOf("deadline"))&&i.a.createElement("fieldset",{style:{marginBottom:"14px"}},i.a.createElement("legend",null,tt("$__deadline",1)),d.endDate||d.startDate||I?i.a.createElement(i.a.Fragment,null,i.a.createElement(Kc,{type:"datetime",clearButtonPosition:"flex-end",onChangeStartDate:function(e){var t={startDate:Be()(e).unix("X")};M(Be()(e).unix("X")),(!G||G<Be()(e).unix("X"))&&(t=Object(h.a)(Object(h.a)({},t),{},{endDate:Be()("".concat(Be()(e).format("YYYY-MM-DD")," 23:59:59")).unix("X")}),R(Be()("".concat(Be()(e).format("YYYY-MM-DD")," 23:59:59")).unix("X"))),p(Object(h.a)(Object(h.a)({},d),t)),w(!0)},onChangeEndDate:function(e){var t={endDate:Be()(e).unix("X")};R(Be()(e).unix("X")),$||(t=Object(h.a)(Object(h.a)({},t),{},{startDate:Be()("".concat(Be()(e).format("YYYY-MM-DD")," 00:00:00")).unix("X")}),M(Be()("".concat(Be()(e).format("YYYY-MM-DD")," 00:00:00")).unix("X"))),p(Object(h.a)(Object(h.a)({},d),t)),w(!0)},range:!0,startDate:$?new Date(1e3*$):null,endDate:G?new Date(1e3*G):null,onClear:function(){M(null),R(null),p(Object(h.a)(Object(h.a)({},d),{},{startDate:null,endDate:null,recurrence:null})),F(!1),w(!0)}}),i.a.createElement("div",{style:{position:"relative",width:"fit-content",float:"right",display:"flex",justifyContent:"right"}},i.a.createElement(el,{options:[{value:0,label:"Manual"},{value:7,label:"7 ".concat(tt("$__days").toLowerCase())},{value:15,label:"15 ".concat(tt("$__days").toLowerCase())},{value:30,label:"30 ".concat(tt("$__days").toLowerCase())},{value:60,label:"60 ".concat(tt("$__days").toLowerCase())},{value:90,label:"90 ".concat(tt("$__days").toLowerCase())},{value:180,label:"180 ".concat(tt("$__days").toLowerCase())},{value:365,label:"365 ".concat(tt("$__days").toLowerCase())}].concat(Object(f.a)(ue&&ue.startDate&&ue.endDate?[{value:"parent",label:"".concat(tt("$__useParentDate")," ").concat(Be()(1e3*ue.startDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")," - ").concat(Be()(1e3*ue.endDate).tz("America/Sao_Paulo").format("DD/MM/YYYY"))}]:[])),value:K||"",onChange:function(e){"parent"!==e&&0!==e?(R(Be()(new Date(1e3*$)).tz("America/Sao_Paulo").add(e,"days").unix("X")),oe({name:"endDate",value:Be()(new Date(1e3*$)).tz("America/Sao_Paulo").add(e,"days").unix("X")},null,!0)):"parent"===e&&(ue.startDate&&(M(ue.startDate),oe({name:"startDate",value:ue.startDate},ue.endDate?{name:"endDate",value:ue.endDate}:null,!0),ue.endDate&&R(ue.endDate)),!ue.startDate&&ue.endDate&&(R(ue.endDate),oe({name:"endDate",value:ue.endDate},null,!0))),J(e)}})),i.a.createElement("div",{className:r.switch,style:{position:"relative",width:"100%",float:"left",display:"flex",alignItems:"center",justifyContent:"space-between"}},tt("$__freeChildrenDate",1),i.a.createElement(Cc,{checked:!!d.freeChildrenDate,onChange:function(e){oe({name:"freeChildrenDate",value:!d.freeChildrenDate})},name:"freeChildrenDate",inputProps:{"aria-label":"secondary checkbox"},disabled:!(fe&&"completed"!==d.status&&!(se&&se.disabledFields&&se.disabledFields.indexOf("freeChildrenDate")>-1))})),d.startDate&&Be()(d.startDate).isValid()&&(!se.hideFields||se.hideFields&&-1===se.hideFields.indexOf("recurrence"))&&i.a.createElement("div",{style:{width:"311px",position:"relative",float:"left"}},d._recurrenceId?i.a.createElement("div",{style:{marginTop:"15px"}},tt("$__recurrentActivityFrom"),":",i.a.createElement(ki,(t={db:"cards",data:a.cards[d._recurrenceId]},Object(O.a)(t,"db","cards"),Object(O.a)(t,"Avatar",!0),Object(O.a)(t,"ignoreList",!0),Object(O.a)(t,"onlyOption",!0),t))):i.a.createElement("div",null,i.a.createElement(nl,{data:d,onChange:function(e){p(Object(h.a)(Object(h.a)(Object(h.a)({},d),e),{},{recurrenceNextDate:Be()("".concat(e.recurrenceNextDate," 06:00:00")).tz("America/Sao_Paulo").format("YYYY-MM-DD")})),w(!0)}}),d.recurrence&&"0"!==d.recurrence&&d.recurrenceNextDate&&i.a.createElement("fieldset",{style:{marginTop:"7px"}},i.a.createElement("legend",null,tt("$__NextRecurrenceDate")),i.a.createElement(Kc,{placeholder:tt("$__NextRecurrenceDate"),clearButtonPosition:"flex-end",onChangeStartDate:function(e){var t={recurrenceNextDate:Be()(e).tz("America/Sao_Paulo").format("YYYY-MM-DD")};p(Object(h.a)(Object(h.a)({},d),t)),w(!0)},startDate:d.recurrenceNextDate&&Be()(d.recurrenceNextDate).isValid()?new Date(1e3*Be()("".concat(d.recurrenceNextDate," 06:00:00")).tz("America/Sao_Paulo").unix("X")):null,onClear:function(){p(Object(h.a)(Object(h.a)({},d),{},{recurrenceNextDate:null})),w(!0)}}))))):fe?i.a.createElement(Xr,{text:tt("$__addDeadline",1),icon:"timer",onClick:function(){F(!0),M(Be()("".concat(Be()().format("YYYY-MM-DD")," 00:00:00")).unix("X")),oe({name:"startDate",value:Be()("".concat(Be()().format("YYYY-MM-DD")," 00:00:00")).unix("X")},"parent"!==K?{name:"endDate",value:Be()("".concat(Be()().format("YYYY-MM-DD")," 23:59:59")).add(K,"days").unix("X")}:null),"parent"!==K&&R(Be()("".concat(Be()().format("YYYY-MM-DD")," 23:59:59")).add(K,"days").unix("X"))}}):i.a.createElement(i.a.Fragment,null)),(!se.hideFields||se.hideFields&&-1===se.hideFields.indexOf("tags"))&&i.a.createElement("fieldset",{style:{marginBottom:"14px"}},i.a.createElement("legend",null,tt("$__tags",1)),i.a.createElement(ol,{data:{values:d._tags?d._tags:[]},callBack:function(e){fe&&oe({name:"_tags",value:e})},disabled:!(fe&&"completed"!==d.status&&!(se&&se.disabledFields&&se.disabledFields.indexOf("_tags")>-1)),placeholder:tt("$__selectTheOptions",1)})),(!se.hideFields||se.hideFields&&(-1===se.hideFields.indexOf("priority")||-1===se.hideFields.indexOf("status")))&&i.a.createElement("fieldset",{style:{marginBottom:"14px"}},(!se.hideFields||se.hideFields&&-1===se.hideFields.indexOf("priority"))&&i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},i.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},i.a.createElement(hc,{id:"combo-box-demo",options:a.priority,getOptionLabel:function(e){return tt(e.label,1)},style:{width:"100%"},name:"priority",disableClearable:!0,value:d&&d.priority&&a.priority?a.priority.filter((function(e){return String(e.value)===String(d.priority)}))[0]:a.priority[0],renderInput:function(e){return i.a.createElement(ya,Object.assign({},e,{label:tt("$__priority",1),variant:at("fieldVariant"),disabled:!(fe&&"completed"!==d.status&&!(se&&se.disabledFields&&se.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:d&&d.priority?a.priority.filter((function(e){return String(e.value)===String(d.priority)}))[0].color:a.priority[0].color,borderLeft:"solid 3.33px ".concat(d&&d.priority?a.priority.filter((function(e){return String(e.value)===String(d.priority)}))[0].color:a.priority[0].color)})}),value:d&&d.priority&&a.priority?a.priority.filter((function(e){return String(e.value)===String(d.priority)}))[0]:a.priority[0]}))},onChange:function(e,t){fe&&oe({name:"priority",value:t.value})},renderOption:function(e,t){t.inputValue;return i.a.createElement("span",{style:{color:e.color}},tt(e.label,1))}})),i.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},i.a.createElement(hc,{id:"combo-box-demo",options:a.priority,getOptionLabel:function(e){return tt(e.label,1)},style:{width:"100%"},name:"risk",disableClearable:!0,value:d&&d.risk&&a.priority?a.priority.filter((function(e){return String(e.value)===String(d.risk)}))[0]:a.priority[0],renderInput:function(e){return i.a.createElement(ya,Object.assign({},e,{label:tt("$__risk",1),variant:at("fieldVariant"),disabled:!(fe&&"completed"!==d.status&&!(se&&se.disabledFields&&se.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:d&&d.risk?a.priority.filter((function(e){return String(e.value)===String(d.risk)}))[0].color:a.priority[0].color,borderLeft:"solid 3.33px ".concat(d&&d.risk?a.priority.filter((function(e){return String(e.value)===String(d.risk)}))[0].color:a.priority[0].color)})}),value:d&&d.risk&&a.priority?a.priority.filter((function(e){return String(e.value)===String(d.risk)}))[0]:a.priority[0]}))},onChange:function(e,t){fe&&oe({name:"risk",value:t.value})},renderOption:function(e,t){t.inputValue;return i.a.createElement("span",{style:{color:e.color}},tt(e.label,1))}})),i.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},i.a.createElement(hc,{id:"combo-box-demo",options:a.priority,getOptionLabel:function(e){return tt(e.label,1)},style:{width:"100%"},name:"complexity",disableClearable:!0,value:d&&d.complexity&&a.priority?a.priority.filter((function(e){return String(e.value)===String(d.complexity)}))[0]:a.priority[0],renderInput:function(e){return i.a.createElement(ya,Object.assign({},e,{label:tt("$__complexity",1),variant:at("fieldVariant"),disabled:!(fe&&"completed"!==d.status&&!(se&&se.disabledFields&&se.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:d&&d.complexity?a.priority.filter((function(e){return String(e.value)===String(d.complexity)}))[0].color:a.priority[0].color,borderLeft:"solid 3.33px ".concat(d&&d.complexity?a.priority.filter((function(e){return String(e.value)===String(d.complexity)}))[0].color:a.priority[0].color)})}),value:d&&d.complexity&&a.priority?a.priority.filter((function(e){return String(e.value)===String(d.complexity)}))[0]:a.priority[0]}))},onChange:function(e,t){fe&&oe({name:"complexity",value:t.value})},renderOption:function(e,t){t.inputValue;return i.a.createElement("span",{style:{color:e.color}},tt(e.label,1))}})),i.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},i.a.createElement(hc,{id:"combo-box-demo",options:a.priority,getOptionLabel:function(e){return tt(e.label,1)},style:{width:"100%"},name:"impact",disableClearable:!0,value:d&&d.impact&&a.priority?a.priority.filter((function(e){return String(e.value)===String(d.impact)}))[0]:a.priority[0],renderInput:function(e){return i.a.createElement(ya,Object.assign({},e,{label:tt("$__impact",1),variant:at("fieldVariant"),disabled:!(fe&&"completed"!==d.status&&!(se&&se.disabledFields&&se.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:d&&d.impact?a.priority.filter((function(e){return String(e.value)===String(d.impact)}))[0].color:a.priority[0].color,borderLeft:"solid 3.33px ".concat(d&&d.impact?a.priority.filter((function(e){return String(e.value)===String(d.impact)}))[0].color:a.priority[0].color)})}),value:d&&d.impact&&a.priority?a.priority.filter((function(e){return String(e.value)===String(d.impact)}))[0]:a.priority[0]}))},onChange:function(e,t){fe&&oe({name:"impact",value:t.value})},renderOption:function(e,t){t.inputValue;return i.a.createElement("span",{style:{color:e.color}},tt(e.label,1))}}))),(!se.hideFields||se.hideFields&&-1===se.hideFields.indexOf("status"))&&i.a.createElement(hc,{id:"combo-box-demo",options:a.status,getOptionLabel:function(e){return tt(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:d&&d.status&&a.status?a.status.filter((function(e){return String(e.value)===String(d.status)}))[0]:a.status[0],renderInput:function(e){return i.a.createElement(ya,Object.assign({},e,{label:tt("$__status",1),variant:at("fieldVariant"),disabled:!(fe&&!(se&&se.disabledFields&&se.disabledFields.indexOf("status")>-1)),value:d&&d.status&&a.status?a.status.filter((function(e){return String(e.value)===String(d.status)}))[0]:a.status[0]}))},onChange:function(e,t){fe&&oe({name:"status",value:t.value})}})),(ne>4||re&&re.plan&&re.planAdmin)&&"plan"===d.type&&"completed"!==d.status&&i.a.createElement(i.a.Fragment,null,U||d.miroBoard?U?i.a.createElement("fieldset",{style:{marginBottom:"14px"}},i.a.createElement("legend",null,tt("$__MiroBoard",1)),i.a.createElement(ya,{label:tt("$__MiroBoardCode"),variant:at("fieldVariant"),name:"boardCode",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"save",color:"green",onClick:function(){return V(!1)}})),onChange:function(e,t){oe({name:"miroBoard",value:e.target.value})}},value:d&&d.miroBoard?d.miroBoard:"",placeholder:tt("$__MiroBoardCodePlaceholder",1),disabled:!(fe&&"completed"!==d.status&&!(se&&se.disabledFields&&se.disabledFields.indexOf("miroBoard")>-1))})):d.miroBoard&&i.a.createElement("fieldset",{style:{marginBottom:"14px"}},i.a.createElement("legend",null,tt("$__MiroBoard",1)),i.a.createElement(Xr,{text:tt("$__openMiroBoard",1),icon:"developer_board",onClick:function(){e.reduxFunction("ASYNC","LIGHTBOX",{miro:!0,miroBoard:d.miroBoard})}}),i.a.createElement(Xr,{text:tt("$__editBoard",1),icon:"insert_link",onClick:function(){V(!0)}})):i.a.createElement("fieldset",{style:{marginBottom:"14px"}},i.a.createElement("legend",null,tt("$__MiroBoard",1)),i.a.createElement(Xr,{text:tt("$__addBoard",1),icon:"developer_board",onClick:function(){V(!0)}}))),d&&d._users&&c&&c._id&&d._users[c._id]&&d._users[c._id].access&&parseInt(d._users[c._id].access)>=3&&(!se.hideFields||se.hideFields&&-1===se.hideFields.indexOf("private"))&&i.a.createElement("fieldset",{style:{marginBottom:"14px"}},i.a.createElement("div",{className:r.switch},i.a.createElement(Cc,{checked:!!d.private,onChange:function(e){fe&&oe({name:"private",value:!d.private})},name:"private",inputProps:{"aria-label":"secondary checkbox"},disabled:!(fe&&"completed"!==d.status&&!(se&&se.disabledFields&&se.disabledFields.indexOf("private")>-1))}),tt("$__private",1))),(!se.hideFields||se.hideFields&&-1===se.hideFields.indexOf("private"))&&d.private&&i.a.createElement("fieldset",{style:{marginBottom:"14px"}},i.a.createElement("div",{className:r.switch},i.a.createElement(Cc,{checked:!!d.privateChildrens,onChange:function(e){fe&&oe({name:"privateChildrens",value:!d.privateChildrens})},name:"privateChildrens",inputProps:{"aria-label":"secondary checkbox"},disabled:!(fe&&"completed"!==d.status&&!(se&&se.disabledFields&&se.disabledFields.indexOf("private")>-1))}),tt("$__privateChildrens",1))),fe&&"chatGroup"===d.type&&i.a.createElement("fieldset",{style:{marginBottom:"14px"}},i.a.createElement("div",{className:r.switch},i.a.createElement(Cc,{checked:!!d.onlyAdminsSendMessages,onChange:function(e){fe&&oe({name:"onlyAdminsSendMessages",value:!d.onlyAdminsSendMessages})},name:"onlyAdmins",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__onlyAdminsCanSendMessage",1))))))}))),ll=r(937),sl=r(1672),ul=r(1692),dl=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:at("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:at("medium")}}};function pl(){pl=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 fl=Object(Fe.b)((function(e){return{store:{sideModule:e.sideModule}}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(dl)((function(e){var t=e.classes,r=Ce.getState(),n=r.db,a=r.sideModule,o=r.session,c=r.timeline,l=a.data||{},s=i.a.useState(!l.kpi_type),u=Object(Ae.a)(s,2),d=(u[0],u[1],i.a.useState(l.kpi_type?"timeline":"settings")),p=Object(Ae.a)(d,2),f=p[0],m=p[1],g=i.a.useState(!(!l._id||"new"!==l._id||!l.name)),v=Object(Ae.a)(g,2),y=v[0],b=v[1],x=i.a.useState({}),_=Object(Ae.a)(x,2),w=_[0];_[1],i.a.useEffect((function(){y&&e.reqSave&&e.reqSave()}),[y]);var E=ft(),j=ea(a.id),k=!1;(parseInt(j)>=4||E.plan&&E.planAdmin)&&(k=!0),o._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(o._id)>-1}))]&&(j=n.cards[l._id]._users[Object.keys(n.cards[l._id]._users).find((function(e){return e.indexOf(o._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&&Ce.getState().db.cards[l._parent]&&Ce.getState().db.cards[l._parent].kpi_type&&"task"!==Ce.getState().db.cards[l._parent].kpi_type&&(C=Ce.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(Ce.getState().db.cards).filter((function(e){return Ce.getState().db.cards[e]._parent&&Ce.getState().db.cards[e]._parent===C._id&&Ce.getState().db.cards[e].kpi_type===C.kpi_type&&Ce.getState().db.cards[e].kpi_useParent})).map((function(e){parseInt(C.kpi_ini)>parseInt(C.kpi_fin&&parseInt(Ce.getState().db.cards[e].kpi_ini))?I-=parseInt(Ce.getState().db.cards[e].kpi_ini):parseInt(Ce.getState().db.cards[e].kpi_fin)&&(I-=parseInt(Ce.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(O.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(Ne.a)(pl().mark((function t(){var r,n=arguments;return pl().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}it({message:tt("$__invalidMaximumMinutes",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=11;break;case 6:return t.next=8,Cn(e,!0,a.data);case 8:t.sent&&it({message:tt("$__kpiDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&e.reduxFunction("ASYNC","CLEAR_MODULE");case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),N=function(){var t=Object(Ne.a)(pl().mark((function t(r){return pl().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)})),i.a.createElement("div",null,i.a.createElement(Qi,{save:y&&k?function(){T()}:null,saveClose:y&&k?function(){T(!0)}:null,close:function(){e.onClose&&e.onClose(y)}}),i.a.createElement("div",{style:{posision:"absolute",top:5,left:0,right:0}},k?i.a.createElement("div",{style:{width:"100%",position:"relative",display:"flex",flexDirection:"row-reverse"}},i.a.createElement(Ct,{title:tt("$__changeKpiType",1),color:at("settings"===f?"menu":"color"),icon:"tune",onClick:function(){return m("settings")},size:"25px",transparent:!0}),i.a.createElement(Ct,{title:tt("$__chart",1),color:at("chart"===f?"menu":"color"),icon:"analytics",onClick:function(){return m("chart")},size:"25px",transparent:!0}),i.a.createElement(Ct,{title:tt("$__statement",1),color:at("timeline"===f?"menu":"color"),icon:"receipt",onClick:function(){return m("timeline")},size:"25px",transparent:!0})):i.a.createElement("div",null),"chart"===f?i.a.createElement(Eo,{data:l,chartShow:!0}):"settings"===f?i.a.createElement("fieldset",{style:{textAlign:"center"}},i.a.createElement("legend",null,tt("$__measurementeType",1)),0===Object.keys(n.cards).filter((function(e){return n.cards[e]._parent===l._id&&n.cards[e].kpi_useParent})).length?i.a.createElement(ul.a,{value:l&&l.kpi_type?l.kpi_type:"task",exclusive:!0,onChange:function(e,t){F({name:"kpi_type",value:t})}},i.a.createElement(sl.a,{value:"decimal"},i.a.createElement(xt,{title:tt("$__decimal",1),color:"color"},"filter_9_plus")),i.a.createElement(sl.a,{value:"currency"},i.a.createElement(xt,{title:tt("$__currency",1),color:"color"},"attach_money")),i.a.createElement(sl.a,{value:"percent"},i.a.createElement(Ue.a,{title:tt("$__percentage",1)},i.a.createElement("span",{style:{color:"".concat(at("color")),fontSize:"22px"}},"%"))),i.a.createElement(sl.a,{value:"time"},i.a.createElement(xt,{title:tt("$__time",1),color:"color"},"hourglass_top")),i.a.createElement(sl.a,{value:"task"},i.a.createElement(xt,{title:tt("$__task",1),color:"color"},"task"))):"decimal"===l.kpi_type?i.a.createElement(xt,{title:tt("$__decimal",1),color:"color"},"filter_9_plus"):"currency"===l.kpi_type?i.a.createElement(xt,{title:tt("$__currency",1),color:"color"},"attach_money"):"percent"===l.kpi_type?i.a.createElement(xt,{title:tt("$__percentage",1),color:"color"},"percent"):i.a.createElement(xt,{title:tt("$__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,i.a.createElement(i.a.Fragment,null)),C&&C.kpi_type&&C.kpi_type===l.kpi_type?i.a.createElement(i.a.Fragment,null,i.a.createElement("fieldset",{style:{marginTop:7}},i.a.createElement("legend",{style:{color:"gray",fontSize:12}},tt("$__parentKpi",1)),l.kpi_useParent?i.a.createElement(i.a.Fragment,null,i.a.createElement("fieldset",{style:{marginTop:3}},i.a.createElement("legend",{style:{color:"blue",fontSize:12}},C&&parseInt(C.kpi_ini)>parseInt(C.kpi_fin)?tt("$__notAllocatedBudget",1):tt("$__notAllocatedGoal",1)),lt(I,"time"===C.kpi_type?"number":C.kpi_type,C.kpi_currency?C.kpi_currency:null))):i.a.createElement(i.a.Fragment,null),i.a.createElement("div",{className:t.switch},i.a.createElement(Cc,{checked:!!l.kpi_useParent,onChange:function(e){N({name:"kpi_useParent",value:!l.kpi_useParent})},name:"kpi_useParent",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__useParentKpi",1)),l.kpi_useParent?i.a.createElement(i.a.Fragment,null):i.a.createElement("div",{style:{color:"red"}},tt("$__independentKPIDescription")),i.a.createElement("div",null))):i.a.createElement(i.a.Fragment,null),l&&l.kpi_type&&"task"!==l.kpi_type&&i.a.createElement(i.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?i.a.createElement("fieldset",{style:{marginTop:7}},i.a.createElement("legend",{style:{color:"gray",fontSize:12}},tt("$__allocatedKpiActivities",1)),i.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)})),i.a.createElement("li",{key:"ca-".concat(e)},i.a.createElement(ki,{db:"cards",data:Ce.getState().db.cards[e],notGlobalExpanded:!0,ignoreList:!0}),i.a.createElement("div",{style:{width:"100%",height:22}},i.a.createElement(ll.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"})),i.a.createElement("div",{style:{marginTop:0,fontSize:12,color:"black",width:"100%",textAlign:"left"}},lt(r,"time"===l.kpi_type?"number":l.kpi_type,l.kpi_currency?l.kpi_currency:null)))})))):i.a.createElement(i.a.Fragment,null):i.a.createElement(hc,{id:"combo-box-demo",options:n.currency,getOptionLabel:function(e){return tt(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 i.a.createElement(ya,Object.assign({},e,{label:tt("$__currency",1),variant:at("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})}}),i.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)?i.a.createElement("div",{style:{width:"calc(50% - 7px)"}},i.a.createElement(ya,{label:l.kpi_useParent?tt("$__budget"):"time"===l.kpi_type?tt("$__minimumMinutes",1):tt("$__initialValue",1),variant:"outlined",name:"kpi_ini",error:!(!w||!w.kpi_ini),helperText:w&&w.kpi_ini?tt("$__valueExceedAllocatedValue",1):null,InputLabelProps:{shrink:!0,step:.01},InputProps:{autoComplete:"new-password",startAdornment:i.a.createElement("span",{style:{color:"lightgray",fontSize:8}},"currency"===l.kpi_type&&n.currency.filter((function(e){return l.kpi_currency&&String(e.value)===String(l.kpi_currency)||!l.kpi_currency&"BRL"===String(e.value)}))[0]?n.currency.filter((function(e){return l.kpi_currency&&String(e.value)===String(l.kpi_currency)||!l.kpi_currency&"BRL"===String(e.value)}))[0].symbol:"")},onChange:function(e){F({name:"kpi_ini",value:"time"===l.kip_type?ct(e.target.value,0):ct(e.target.value,2)})},value:l.kpi_ini})):i.a.createElement(i.a.Fragment,null),!l.kpi_useParent||l.kpi_useParent&&C&&parseInt(C.kpi_ini)<parseInt(C.kpi_fin)?i.a.createElement("div",{style:{width:"calc(50% - 7px)"}},i.a.createElement(ya,{label:l.kpi_useParent?tt("$__goal"):"time"===l.kpi_type?tt("$__maximumMinutes",1):tt("$__finalValue",1),variant:"outlined",name:"kpi_fin",type:"number",error:!(!w||!w.kpi_fin),helperText:w&&w.kpi_fin?tt("$__valueExceedAllocatedValue",1):null,InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",startAdornment:i.a.createElement("span",{style:{color:"lightgray",fontSize:8}},"currency"===l.kpi_type&&n.currency.filter((function(e){return l.kpi_currency&&String(e.value)===String(l.kpi_currency)||!l.kpi_currency&"BRL"===String(e.value)}))[0]?n.currency.filter((function(e){return l.kpi_currency&&String(e.value)===String(l.kpi_currency)||!l.kpi_currency&"BRL"===String(e.value)}))[0].symbol:"")},onChange:function(e){F({name:"kpi_fin",value:"time"===l.kip_type?ct(e.target.value,0):ct(e.target.value,2)})},value:l.kpi_fin})):i.a.createElement(i.a.Fragment,null)),i.a.createElement("div",{className:t.switch},i.a.createElement(Cc,{checked:!!l.kpi_reqMessage,onChange:function(e){F({name:"kpi_reqMessage",value:!l.kpi_reqMessage})},name:"kpi_reqMessage",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__reqDescription",1)))):i.a.createElement("div",{style:{position:"absolute",top:30,bottom:0,left:0,right:0}},i.a.createElement(Eo,{data:l,chartShow:!1}),i.a.createElement(dc,{noSearch:!0,nodeId:l._id,type:"kpi",db:"cards",disabledSend:!0,loadTimeline:!0,kpi_type:l.kpi_type}))))}))),hl=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 ml=Object(Fe.b)((function(e){return{store:e}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(hl)((function(e){var t=e.classes,r=Ce.getState().sideModule,n=r.data||{};return i.a.createElement("div",{className:t.root},r.data.image&&i.a.createElement("div",{className:t.image,style:{backgroundImage:"url(".concat(r.data.image,")")}}),n.kpi_type&&i.a.createElement(Eo,{data:n,chartShow:!0}))})));function gl(e){var t=Object(_t.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:at(e.color?e.color:"color"),borderColor:at(e.color?e.color:"color"),color:at("lightText"),"&:hover":{backgroundColor:at(e.color?e.color:"color",.8),borderColor:at(e.color?e.color:"color"),boxShadow:"0 0 0 0.2rem ".concat(at(e.color?e.color:"color",.2))},"&:active":{boxShadow:"none",backgroundColor:at(e.color?e.color:"color"),borderColor:at(e.color?e.color:"color")},"&:focus":{boxShadow:"0 0 0 0.2rem ".concat(at(e.color?e.color:"color",.2))}}})();return!e.color||e.color&&-1===["default","inherit","primary","secondary"].indexOf(e.color)?i.a.createElement(kt.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):i.a.createElement(kt.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 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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 yl,bl,xl=Object(Fe.b)((function(){return{}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Oc)((function(e){var t=e.classes,r=Ce.getState(),n=r.db,a=r.sideModule,o=(r.session,a.data||{}),c=i.a.useState(!1),l=Object(Ae.a)(c,2),s=l[0],u=l[1],d=i.a.useState(!1),p=Object(Ae.a)(d,2),f=p[0],m=p[1];i.a.useEffect((function(){f||("link"===o.type&&"new"===o._id&&u(!0),m(!0))}));var g=function(t){s&&!t?it({message:tt("$__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(Ne.a)(vl().mark((function t(){var r,n=arguments;return vl().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}it({message:tt("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=11;break;case 6:return t.next=8,Cn(e,!0,a.data);case 8:t.sent&&it({message:tt("$__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)}}(),y=function(){var t=Object(Ne.a)(vl().mark((function t(){return vl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:it({message:tt("$__unlinkCardsConfirm",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){var t=Object(Ne.a)(vl().mark((function t(){return vl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Xn(e,{cardId:o._id,_planId:o._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 i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:t.btClose},i.a.createElement("div",{style:{position:"fixed",right:"7px",display:"inline-flex",backgroundColor:"#FFFFFF",paddingLeft:"10px"}},s&&i.a.createElement(i.a.Fragment,null,i.a.createElement(xt,{color:at("color"),icon:"save",title:tt("$__save","*"),size:"25px",onClick:function(){v()}}),i.a.createElement(xt,{color:at("green"),icon:"playlist_add_check",title:tt("$__saveAndClose","*"),size:"25px",onClick:function(){v(!0)}})),i.a.createElement(xt,{color:at("medium"),icon:"cancel",title:tt("$__close","*"),size:"25px",onClick:function(){return g(!0)}}))),i.a.createElement("div",{className:t.root},Object.keys(n.cards).filter((function(e){return n.cards[e]._parent===o._id&&!n.cards[e].checklist})).length>0?i.a.createElement("fieldset",{style:{textAlign:"center"}},i.a.createElement("legend",{style:{color:at("color")}},tt("$__unLinkCards",1)),i.a.createElement("div",{style:{textAlign:"center",width:"100%"}},tt("$__unLinkCardsDescription",1)),i.a.createElement(gl,{onClick:function(){y()}},tt("$__unLinkCards",1))):i.a.createElement("fieldset",{style:{marginBottom:"14px"}},(!b.hideFields||b.hideFields&&-1===b.hideFields.indexOf("type"))&&i.a.createElement(hc,{id:"combo-box-demo",options:n.type,getOptionLabel:function(e){return tt(e.label,1)},style:{width:"100%"},name:"type",disableClearable:!0,value:o&&o.type&&n&&n.type?n.type.filter((function(e){return String(e.value)===String(o.type)}))[0]:n.type[0],renderInput:function(e){return i.a.createElement(ya,Object.assign({},e,{label:tt("$__cardType",1),variant:at("fieldVariant"),value:o&&o.type&&n&&n.type?n.type.filter((function(e){return String(e.value)===String(o.type)}))[0]:n.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(O.a)({},t.name,t.value));r&&r.name&&r.value&&(n=Object(h.a)(Object(h.a)({},n),{},Object(O.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 _l(){_l=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 wl=Ge.default.div(yl||(yl=Object(Te.a)(["\n background-color:none\n "]))),El=(Ge.default.div(bl||(bl=Object(Te.a)(["background-color:red\n padding:7px"]))),Object(Fe.b)((function(e,t){return{cards:Object.keys(e.db.cards).filter((function(r){return e.db.cards[r]._parent===t.nodeId}))}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState(),r=t.db,n=t.session,a=Ce.getState().functions.socket,o=i.a.useState(e.name?e.name:""),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.a.useState(!1),d=Object(Ae.a)(u,2),p=d[0],f=d[1],m=i.a.useState(!1),g=Object(Ae.a)(m,2),v=g[0],y=g[1],b=window.location.hash.split("/");b[0]=b[0].replace("#",""),36!==b[0].length&&(b[0]=null),i.a.useEffect((function(){return x(),function(){}}),[]);var x=function(){var t=Object(Ne.a)(_l().mark((function t(){return _l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,jn(Object(h.a)(Object(h.a)({},e),{},{ignoreLoader:!0}),[e.nodeId],!1,null,"childrens");case 2:t.sent&&y(!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),_={};Ce.getState().db[e.db]&&Ce.getState().db[e.db][e.nodeId]&&(_=Ce.getState().db[e.db][e.nodeId]);var w=Object.keys(Ce.getState().db.cards).filter((function(t){if(!Ce.getState().db.cards[t].deleted&&!Ce.getState().db.cards[t].checklist&&!Ce.getState().db.cards[t]._recurrenceId&&Ce.getState().db.cards[t]._parent===e.nodeId&&(!Ce.getState().db.cards[t].private||Ce.getState().db.cards[t].private&&Ce.getState().db.cards[t]._users[n._id]))return!0})).map((function(e){return e})),E=function(){var e=Object(Ne.a)(_l().mark((function e(){var t,r;return _l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Ce.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(Ne.a)(_l().mark((function e(r){return _l().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(O.a)({},r.log._id,Object(h.a)(Object(h.a)({},r.log),{},{_parent:[r.id]})),_users:Object(O.a)({},n._id,{name:Ce.getState().db.users[n._id].name?Ce.getState().db.users[n._id].name:null,displayName:Ce.getState().db.users[n._id].displayName?Ce.getState().db.users[n._id].displayName:null,image:Ce.getState().db.users[n._id].image?Ce.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)}}(),j=function(){var t=Object(Ne.a)(_l().mark((function t(n){var o,i,c,l,s,u;return _l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=Object.keys(Ce.getState().db.cards).filter((function(t){if(Ce.getState().db.cards[t]&&Ce.getState().db.cards[t].checklist&&Ce.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(O.a)({},e,r.cards[e])),u=Object(h.a)(Object(h.a)({},u),{},Object(O.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)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),u)})),t.abrupt("return");case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),k=function(){var e=Object(Ne.a)(_l().mark((function e(t){return _l().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(Ne.a)(_l().mark((function e(t){return _l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();if(v)return i.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"}},i.a.createElement("span",{style:{color:at("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},tt("$__loadingCatenation")),i.a.createElement(so,null));var L=w.filter((function(e){return"completed"!==r.cards[e].status})).sort((function(e,t){return r.cards[e].name.toLowerCase()<r.cards[t].name.toLowerCase()?-1:r.cards[e].name.toLowerCase()>r.cards[t].name.toLowerCase()?1:0})),C=w.filter((function(e){return"completed"===r.cards[e].status})).sort((function(e,t){return r.cards[e].name.toLowerCase()<r.cards[t].name.toLowerCase()?-1:r.cards[e].name.toLowerCase()>r.cards[t].name.toLowerCase()?1:0}));return i.a.createElement("div",{style:{width:"100%"}},i.a.createElement(Oo.a,{onDragEnd:j,onDragStart:k,onDragUpdate:S},i.a.createElement(Oo.c,{droppableId:"Drop_tasks",type:"column",direction:"vertical"},(function(e,t){return i.a.createElement(wl,Object.assign({ref:e.innerRef},e.droppableProps,{isDraggingOver:t.isDraggingOver}),L.length>0?L.map((function(e,t){return i.a.createElement(Oo.b,{draggableId:e,index:t,key:e},(function(t,n){return i.a.createElement(ki,{provided:t,snapshot:n,data:r.cards[e],db:"cards",onlyOption:!0,showCompleteOption:!0,directDeletion:!0,editable:!0})}))})):i.a.createElement(i.a.Fragment,null),C.length>0?C.map((function(e,t){return i.a.createElement(Oo.b,{draggableId:e,index:t,key:e},(function(t,n){return i.a.createElement(ki,{provided:t,snapshot:n,data:r.cards[e],db:"cards",onlyOption:!0,showCompleteOption:!0,directDeletion:!0,editable:!0})}))})):i.a.createElement(i.a.Fragment,null),e.placeholder)}))),!p&&i.a.createElement("div",{style:{position:"relative",float:"right",width:"100%",padding:"7px",display:"flex",alignContent:"flex-end",justifyContent:"center"}},i.a.createElement("div",null,i.a.createElement(Xr,{reverse:!0,text:tt("$__add","*"),icon:"add_box",iconColor:at("medium"),onClick:function(){f(!p)}}))),p&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px",display:"flex",alignItems:"center"}},i.a.createElement("div",{style:{width:"calc(100% - 50px)",display:"flex"}},i.a.createElement(ya,{label:tt("$__taskTitle"),variant:at("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:tt("$__taskTitlePlaceholder")})),i.a.createElement("div",{style:{display:"flex"}},i.a.createElement(Ct,{title:tt("$__save",1),color:"green",icon:"save",onClick:function(e){E()},transparent:!0}),i.a.createElement(Ct,{title:tt("$__cancel",1),color:"lightgrey",icon:"cancel",onClick:function(e){f(!p),s("")},transparent:!0})))))})));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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 jl=Object(Fe.b)((function(e){return{store:e}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState(),r=t.sideModule,n=t.db,a=t.functions.socket,o=i.a.useState(!1),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.a.useState(!1),d=Object(Ae.a)(u,2),p=d[0],f=d[1],m=i.a.useState(null),g=Object(Ae.a)(m,2),v=g[0],y=g[1],b=i.a.useState({}),x=Object(Ae.a)(b,2),_=x[0],w=x[1],E=i.a.useState(0),j=Object(Ae.a)(E,2),k=j[0],S=j[1],L=i.a.useState(""),C=Object(Ae.a)(L,2),I=C[0],F=C[1],T=r.data||{};console.log(T),console.log(e),i.a.useEffect((function(){"user"===T.type?D():f(!1)}),[]),i.a.useEffect((function(){var e=na(T._id);w(e)}),[T._id]);var N=function(){var t=Object(Ne.a)(Ol().mark((function t(){return Ol().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:it({message:tt("$__confirmDeleteThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){$n(e,{_id:T._id},!1),st(e,{_id:T._id},!1),e.reduxFunction("ASYNC","CLEAR_MODULE")}});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),A=function(){var t=Object(Ne.a)(Ol().mark((function t(){return Ol().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:it({message:tt("$__confirmDeleteThisAndAllLinkedsActivies",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){$n(e,{_id:T._id},!1,!0),e.reduxFunction("ASYNC","CLEAR_MODULE")}});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),D=function(){var e=Object(Ne.a)(Ol().mark((function e(){var t;return Ol().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f(!1),e.next=3,bn.post("/Card_Count",{id:T._id,all:!0,rel:"INN"});case 3:(t=e.sent)&&(f(!0),S(t.data));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=function(){var e=Object(Ne.a)(Ol().mark((function e(){return Ol().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f(!0),a.emit("data",{module:"user",method:"post",action:"migrate"},{from:T._id,fromData:T,to:v,toData:n.users[v]},Object(Ne.a)(Ol().mark((function e(){var t;return Ol().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s(!0),t=Object(h.a)({},n.cards),Object.keys(t).filter((function(e){return t[e]._users&&t[e]._users[T._id]})).map((function(e){t[e]._users[v]||(t[e]._users=Object(h.a)(Object(h.a)({},t[e]._users),{},Object(O.a)({},v,{access:t[e]._users[T._id].access,_id:v}))),delete t[e]._users[T._id]})),f(!0);case 4:case"end":return e.stop()}}),e)}))));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return i.a.createElement("div",{style:{width:"100%"}},i.a.createElement(Qi,{close:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}),T._id&&n.cards[T._id]&&i.a.createElement(i.a.Fragment,null,i.a.createElement("fieldset",{style:{textAlign:"center"}},i.a.createElement("legend",{style:{color:at("color")}},tt("$__deleteOptions",1)),i.a.createElement("fieldset",{style:{textAlign:"center"}},i.a.createElement("legend",{style:{color:at("color")}},tt("$__deleteActivity",1)),i.a.createElement("div",{style:{textAlign:"center",width:"100%"}},tt("$__deleteThisActivity",1)),i.a.createElement(gl,{onClick:function(){N()}},tt("$__delete",1))),Object.keys(_).length>0&&i.a.createElement("fieldset",{style:{textAlign:"center"}},i.a.createElement("legend",{style:{color:at("color")}},tt("$__thisActivityHasOtherLinkedsActivities",1)),i.a.createElement("div",{style:{textAlign:"center",width:"100%",color:"red"}},tt("$__deleteAllActiviesLinkedAlert",1)),i.a.createElement(gl,{onClick:function(){A()}},tt("$__deleteAll",1))))),T._id&&n.users[T._id]&&("client"===n.users[T._id].type||"group"===n.users[T._id].type||"sic"===n.users[T._id].type||"unity"===n.users[T._id].type)&&i.a.createElement("fieldset",{style:{textAlign:"center"}},i.a.createElement("legend",{style:{color:at("color")}},tt("$__deleteOptions",1)),i.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object.keys(n.users).filter((function(e){return n.users[e]._parent===T._id})).length>0?tt("$__delete".concat(n.users[T._id].type,"WithUsersDescription"),1):tt("$__delete".concat(n.users[T._id].type,"NoUsersDescription"),1)),i.a.createElement("div",{style:{textAlign:"center",width:"100%"}},tt("$__deleteThisDescription",1)),i.a.createElement(gl,{onClick:function(){N()}},tt("$__deleteThis",1))),T._id&&n.users[T._id]&&"client"!==n.users[T._id].type&&"group"!==n.users[T._id].type&&"sic"!==n.users[T._id].type&&"unity"===n.users[T._id].type&&i.a.createElement(i.a.Fragment,null,p?i.a.createElement(i.a.Fragment,null,k>0&&!l?i.a.createElement(i.a.Fragment,null,i.a.createElement("fieldset",null,i.a.createElement("legend",{style:{color:at("color")}},tt("$__thisUserHas",1)),i.a.createElement("div",{style:{position:"relative",marginTop:"22px",bottom:"7px",width:"100%",fontSize:"12px",color:at("mediumText"),display:"flex",justifyContent:"center",textAlign:"center"}},k," ",tt("$__items"),i.a.createElement("br",null),tt("$__deleteCountCardsExplain"))),v?i.a.createElement("fieldset",null,i.a.createElement("legend",null,tt("$__selectedUserToMigrationCards")),i.a.createElement("div",{style:{cursor:"pointer",marginBottom:"7px",display:"flex",alignItems:"center"},onClick:function(){y(null)}},i.a.createElement(Kr.a,{alt:n.users[v].name,src:n.users[v].image||null,style:{marginRight:"15px"}},n.users[v].name.substr(0,1)),i.a.createElement("span",null,n.users[v].name)),i.a.createElement(gl,{onClick:function(){it({message:tt("$__confirmUserTransferData",1),autoClose:5e4,buttons:[{shadow:!0,title:tt("$__confirm"),text:tt("$__confirm"),color:"green",icon:"done_all",size:"25px",style:{marginLeft:15},onClick:function(){P()}},{shadow:!0,title:tt("$__cancel"),text:tt("$__cancel"),color:"red",icon:"close",size:"25px",style:{marginLeft:15},onClick:function(){}}],variant:"warning",persist:!1,horizontal:"right"})}},tt("$__migrate",1))):i.a.createElement("fieldset",{style:{marginTop:7,marginBottom:7}},i.a.createElement("legend",null,tt("$__chooseAUserToTransferCardsBeforeDeletingUser")),i.a.createElement(ya,{label:tt("$__search","*"),variant:"standard",autoFocus:!0,value:I,InputProps:{endAdornment:i.a.createElement(Ja.a,{position:"start"},i.a.createElement(xt,{color:at("color")},"search")),onChange:function(e){F(e.target.value)}}}),Object.keys(n.users).filter((function(e){return e!==T._id&&"user"===n.users[e].type&&!n.users[e].deleted&&(!T._parent&&!n.users[e]._parent||T._parent&&n.users[e]._parent===T._parent)&&(!I||I&&n.users[e].name.toLowerCase().indexOf(I.toLowerCase().trim())>-1)})).sort((function(e,t){var r=n.users[e].name.toLowerCase(),a=n.users[t].name.toLowerCase();return r<a?-1:r>a?1:0})).map((function(e){return i.a.createElement("div",{style:{cursor:"pointer",marginBottom:"7px",display:"flex",alignItems:"center"},onClick:function(){y(e)},key:e},i.a.createElement(Kr.a,{alt:n.users[e].name,src:n.users[e].image||null,style:{marginRight:"15px"}},n.users[e].name.substr(0,1)),i.a.createElement("span",null,n.users[e].name))}))),i.a.createElement("fieldset",{style:{textAlign:"center"}},i.a.createElement("legend",{style:{color:at("color")}},tt("$__deactivateThis",1)),i.a.createElement("div",{style:{textAlign:"center",width:"100%"}},tt("$__deactivateWhithoutMigration",1)),i.a.createElement(gl,{onClick:function(){N()}},tt("$__deactivateThis",1)))):i.a.createElement("fieldset",{style:{textAlign:"center"}},i.a.createElement("legend",{style:{color:at("color")}},tt("$__deactivateThis",1)),i.a.createElement("div",{style:{textAlign:"center",width:"100%"}},tt("$__deactivateUserDescription",1)),i.a.createElement(gl,{onClick:function(){N()}},tt("$__deactivateThis",1)))):i.a.createElement(i.a.Fragment,null),p?i.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",marginTop:"33px"}},i.a.createElement(Ot,null)):i.a.createElement(i.a.Fragment,null)))})),kl=Object(_t.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 Sl(e){var t=kl(),r=Object(h.a)({},e);return r.title&&delete r.title,e.title?i.a.createElement(Ue.a,{title:e.title},i.a.createElement(Kr.a,Object.assign({},r,{className:t[e.size]}),e.children)):i.a.createElement(Kr.a,Object.assign({},r,{className:t[e.size]}),e.children)}function Ll(){Ll=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Cl=Object(Fe.b)((function(e){return{showPrivate:e.controls.lockPrivate,history:e.db.history}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState(),r=t.timeline,n=t.functions,a=t.session,o=n.socket,c=Ce.getState().db,l=i.a.useState(e.data),s=Object(Ae.a)(l,2),u=s[0],d=s[1];i.a.useEffect((function(){return function(){}}),[]);var p=u.name.split("."),f=p[p.length-1];"blob"===u.name&&(u.name="".concat(tt("$__coverImage","*"),".jpg"),f="jpg");var m="attachment";Ce.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(f.toLowerCase())>-1})).length>0&&(m=Ce.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(f.toLowerCase())>-1}))[0].icon||"https://machen.azureedge.net/".concat(u.file));var g=function(){var e=Object(Ne.a)(Ll().mark((function e(t){return Ll().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{o.emit("data",{module:"node",method:"put",action:"update"},Object(h.a)({_id:u._id},t),Object(Ne.a)(Ll().mark((function e(){return Ll().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)}}(),v="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&&(v=c.fileExtensions.filter((function(e){return e.ext.indexOf(f.toLowerCase())>-1}))[0].viewer),i.a.createElement("div",null,i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginBottom:"5px",cursor:"pointer"}},i.a.createElement("div",{style:{position:"relative",width:"100%"}},i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},u.in&&u.in.private&&!e.showPrivate?i.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"}},i.a.createElement(xt,{icon:"lock",size:"17px"})):i.a.createElement(i.a.Fragment,null,"string"===typeof m&&-1===m.indexOf("https")&&-1===m.indexOf("svg")?i.a.createElement("div",{style:{position:"relative",float:"left",width:"33px",height:"33px",alignItems:"center",display:"flex",cursor:"pointer"},onClick:function(t){e.openLightBox&&e.openLightBox()}},i.a.createElement(xt,{icon:m,size:"33px"})):i.a.createElement("div",{style:{position:"relative",float:"left",width:"33px",height:"33px",alignItems:"center",backgroundImage:'url("'.concat(m,'")'),backgroundSize:"cover",backgroundRepeat:"no-repeat",borderRadius:7,cursor:"pointer"},onClick:function(t){e.openLightBox&&e.openLightBox()}})),i.a.createElement("div",{style:{display:"flex",paddingLeft:15,alignItems:"center",maxWidth:"calc(100% - 40px)"}},u.in&&u.in.name&&i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},"User"===u.in.db&&u.in._id===a._id?i.a.createElement("div",null,i.a.createElement(Sl,{alt:u.createdBy.name,src:u.createdBy.image,style:{width:"21px",height:"21px"}},u.createdBy.name)):i.a.createElement(i.a.Fragment,null),"User"===u.in.db&&u.in._id!==a._id?i.a.createElement("div",null,i.a.createElement(Sl,{alt:u.in.name,src:u.in.image,style:{width:"21px",height:"21px"}},u.in.name)):i.a.createElement(i.a.Fragment,null),i.a.createElement(_a,{private:!(!u.in||!u.in.private),title:"".concat("User"===u.in.db?"".concat(tt("$__chatWithUser","*")," - ").concat(u.in._id!==a._id?"".concat(u.in.name):"".concat(u.createdBy.name)):"chatGroup"===u.in.type?"".concat(tt("$__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:at("medium"),style:{padding:"7px",minHeight:"21px !important",textAlign:"left"},textStyle:!0}),i.a.createElement("span",{style:{marginRight:7}},"/")),i.a.createElement(_a,{private:!(!u.in||!u.in.private),privateTitle:tt("$__privateFile"),title:u.name,value:u.name.replace(".".concat(f),""),searchText:e.searchText?e.searchText:null,color:e.dark?at("lightgray"):at("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){g({name:"".concat(e,".").concat(f)})}:null}))),"audio"===v&&i.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"}},i.a.createElement(Fr.a,{src:"https://machen.azureedge.net/".concat(u.file),controls:!0})),u.createdBy&&i.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?i.a.createElement(i.a.Fragment,null,i.a.createElement("span",{style:{color:"lightgray",fontSize:10,marginRight:7}},tt("$__sendedBy"),":"),i.a.createElement(Sl,{alt:u.createdBy.name,src:u.createdBy.image,style:{width:"15px",height:"15px"}},u.createdBy.name),i.a.createElement("span",{style:{marginLeft:3}},u.createdBy.name)):i.a.createElement(i.a.Fragment,null),i.a.createElement("span",{style:{marginLeft:3}},vt(u.created_at)))),e.showParent&&(u.timelineId||u.message)&&(c.cards[u.cardId]&&r[u.cardId]&&r[u.cardId][u.timelineId]||u.message)&&i.a.createElement("div",{style:{width:"100%",marginBottom:"33px"}},i.a.createElement(Ji,{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}),i.a.createElement("div",{style:{clear:"both"}})),e.showParent&&u.cardId&&c.cards[u.cardId]&&i.a.createElement("div",{style:{width:"100%",top:"33px"}},i.a.createElement(ki,{db:"cards",data:c.cards[u.cardId],showConnectedIn:!0})),i.a.createElement("div",{style:{width:"100%",height:"1px",backgroundColor:"rgba(0,0,0,0.1)",marginTop:"15px"}})))}));function Il(){Il=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Fl=function(){var e=Object(Ne.a)(Il().mark((function e(t){var r,n,a,o,i,c,l,s;return Il().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.ids,t.searchText,n=t.page,a=void 0===n?0:n,o=t.limit,i=void 0===o?20:o,c=t.asc,void 0!==c&&c,l=t.childrens,void 0!==l&&l,e.next=3,new Promise(function(){var e=Object(Ne.a)(Il().mark((function e(n,o){var c,l;return Il().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,bn.post("/Files_List_V2/",{ids:r,type:t.type?t.type:"cards",limit:i,skip:a*i});case 3:(c=e.sent)&&c.data&&(l=c.data,n(l)),e.next=13;break;case 7:e.prev=7,e.t0=e.catch(0),console.group("loadFiles::ERR::"),console.log(e.t0),console.groupEnd(),o(!0);case 13:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,r){return e.apply(this,arguments)}}());case 3:if(!(s=e.sent)){e.next=6;break}return e.abrupt("return",s);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Tl=function(){var e=Object(Ne.a)(Il().mark((function e(t){var r;return Il().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise(function(){var e=Object(Ne.a)(Il().mark((function e(r,n){var a;return Il().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,bn.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)}}(),Nl=function(){var e=Object(Ne.a)(Il().mark((function e(t){var r,n,a,o,i,c,l,s,u,d,p;return Il().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(Ne.a)(Il().mark((function e(a,i){var l,u;return Il().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,bn.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 Al(){Al=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Dl,Pl,zl=Object(Fe.b)((function(){return{}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState(),r=t.db,n=t.session,a=i.a.useState(!0),o=Object(Ae.a)(a,2),c=(o[0],o[1]),l=i.a.useState([]),s=Object(Ae.a)(l,2),u=s[0],d=s[1],p=i.a.useState(!1),f=Object(Ae.a)(p,2),m=f[0],g=f[1],v=i.a.useState(!1),y=Object(Ae.a)(v,2),b=y[0],x=y[1],_=i.a.useState(""),w=Object(Ae.a)(_,2),E=w[0],O=w[1],j=i.a.useState(0),k=Object(Ae.a)(j,2),S=k[0],L=k[1],C=[];i.a.useEffect((function(){return x(!0),function(){d([]),c(!0)}}),[e.nodeId]),i.a.useEffect((function(){x(!0)}),[S]),i.a.useEffect((function(){b&&I()}),[b]);var I=function(){var t=Object(Ne.a)(Al().mark((function t(){var n,a;return Al().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(m){t.next=5;break}return t.next=3,Fl({ids:[e.nodeId],type:r.cards[e.nodeId]?"cards":"users",page:S});case 3:(n=t.sent)&&(n.length<20&&g(!0),a=Array.from(u),n.map((function(e){0===a.filter((function(t){return t&&t.data&&e&&e.data&&t.data._id===e.data._id})).length&&a.push(e)})),d(a),c(!1),x(!1));case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),F=function(t){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:C,file:t})};return i.a.createElement("div",{style:{position:"relative",width:"100%",height:"100%"},id:"sideModule_files"},(!E&&u.length>10||E)&&i.a.createElement("div",{style:{position:"relative",padding:"10px"}},i.a.createElement(ya,{label:tt("$__fileNameSearch",1),variant:at("fieldVariant"),name:"name",id:"sideModule_files_search",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"find_in_page"})),onChange:function(e){O(e.target.value)}},value:ut(E).toLowerCase(),placeholder:tt("$__fileNameSearch")})),i.a.createElement("div",{style:{position:"absolute",bottom:0,top:u&&u.length>10?63:0,padding:15,left:0,right:0},id:"sideModule_files_list"},i.a.createElement("legend",{style:{display:"flex",alignItems:"center",color:e.dark?at("color"):at("menu"),fontSize:14}},i.a.createElement(xt,{color:at("color"),icon:"folder_open",title:tt("$__files","*"),size:"20px",style:{marginRight:"15px"}}),tt("$__files","*")),i.a.createElement("ul",{id:"filesList_".concat(e.nodeId),style:{listStyle:"none",padding:"0px",position:"absolute",bottom:0,top:33,overflowY:"auto",overflowX:"hidden",left:15,right:15},onScroll:e.horizontal?null:function(t){!function(t){var r=document.getElementById("filesList_".concat(e.nodeId));r.scrollTop+window.innerHeight+150>r.scrollHeight&&!b&&L(S+1)}()}},u&&u.length>0&&u.filter((function(e){return!E||""===E||E&&e.data.name.toLowerCase().indexOf(E.toLocaleLowerCase())>-1})).sort((function(e,t){return parseInt(e.data.created_at)<parseInt(t.data.created_at)})).map((function(t,a){C.push(t.data);var o=Object(h.a)(Object(h.a)({},t.data),{},{createdBy:t.createdBy}),c=!1;return(o.createdBy&&o.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),i.a.createElement("li",{key:t.data._id,onClick:c?null:function(e){F(t.data._id),e.preventDefault()},id:"sideModule_files_file_".concat(t.data._id)},i.a.createElement(Cl,{data:o,resume:!0,dark:!!e.dark,admin:c,searchText:E,openLightBox:function(){F(t.data._id)}}))})),(u.length>0||b)&&!m?i.a.createElement("li",{style:{width:"100%",textAlign:"center",position:"relative",float:"left",color:e.dark?at("color"):at("menu")}},i.a.createElement(so,null),tt("$__checkingFiles","*")):0!==u.length||b?i.a.createElement(i.a.Fragment,null):tt("$__hasNoFiles","*"))))}));function $l(){$l=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Ml=Ge.default.div(Dl||(Dl=Object(Te.a)(["\n background-color:none;\n "]))),Bl=(Ge.default.div(Pl||(Pl=Object(Te.a)(["background-color:red;\n padding:7px;"]))),Object(Fe.b)((function(e){return{store:e}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState(),r=t.db,n=(t.session,Ce.getState().functions.socket),a=i.a.useState(e.name?e.name:""),o=Object(Ae.a)(a,2),c=(o[0],o[1],i.a.useState(!1)),l=Object(Ae.a)(c,2),s=(l[0],l[1],window.location.hash.split("/"));s[0]=s[0].replace("#",""),36!==s[0].length&&(s[0]=null),Ce.getState().db[e.db]&&Ce.getState().db[e.db][e.nodeId]&&Ce.getState().db[e.db][e.nodeId];var u=Object.keys(Ce.getState().db.cards).filter((function(t){if(!Ce.getState().db.cards[t].deleted&&!Ce.getState().db.cards[t].checklist&&Ce.getState().db.cards[t]._recurrenceId&&Ce.getState().db.cards[t]._parent===e.nodeId)return!0})).map((function(e){return e})),d=function(){var t=Object(Ne.a)($l().mark((function t(a){var o,i,c,l,s,u;return $l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=Object.keys(Ce.getState().db.cards).filter((function(t){if(Ce.getState().db.cards[t]&&Ce.getState().db.cards[t].checklist&&Ce.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(O.a)({},e,r.cards[e])),u=Object(h.a)(Object(h.a)({},u),{},Object(O.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)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.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(Ne.a)($l().mark((function e(t){return $l().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(Ne.a)($l().mark((function e(t){return $l().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 i.a.createElement("div",{style:{width:"100%"}},i.a.createElement(Oo.a,{onDragEnd:d,onDragStart:p,onDragUpdate:f},i.a.createElement(Oo.c,{droppableId:"Drop_tasks",type:"column",direction:"vertical"},(function(e,t){return i.a.createElement(Ml,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 i.a.createElement(Oo.b,{draggableId:e,index:t,key:e},(function(t,n){return i.a.createElement(ki,{provided:t,snapshot:n,data:r.cards[e],db:"cards",onlyOption:!0,showCompleteOption:!0,directDeletion:!0,editable:!0,noShowRecurrenceCard:!0})}))})),e.placeholder)}))))}))),Yl=r(1683),Gl=function(e){return{root:Object(O.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:at("color"),color:at("lightText"),display:"flex",alignItems:"center",justifyContent:"center"}},speedDialInvisible:{right:e.spacing(2),bottom:"-60px",position:"absolute","& .MuiFab-root":{backgroundColor:at("color"),color:at("lightText"),display:"flex",alignItems:"center",justifyContent:"center"},"& .MuiButtonBase-root":{}}}};function Rl(){Rl=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Gl)((function(e){var t=e.classes,r=Ce.getState().functions.socket,n=i.a.useState({name:"plan"}),a=Object(Ae.a)(n,2),o=a[0],c=a[1],l=i.a.useState(""),s=Object(Ae.a)(l,2),u=s[0],d=s[1],p=i.a.useState(""),f=Object(Ae.a)(p,2),m=f[0],g=(f[1],i.a.useState(null)),v=Object(Ae.a)(g,2),y=v[0],b=v[1],x=i.a.useState(0),_=Object(Ae.a)(x,2),w=_[0],E=_[1],O=Ce.getState(),j=O.db,k=O.session,S=j.cards,L=Ce.getState().sideModule.data;i.a.useEffect((function(){Object(Ne.a)(Rl().mark((function t(){return Rl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,jn(e,null,!1,null,"plans",!1);case 2:case"end":return t.stop()}}),t)})))()}),[]);var C=i.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 A=S;A=Object.keys(A).filter((function(e){if(!A[e].archived&&!A[e].deleted&&(A[e]._users&&A[e]._id!==L._id&&A[e]._users[k._id]&&parseInt(A[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 A[e]})),u&&(A=Object.keys(A).filter((function(e){if(A[e]&&A[e].name&&A[e].name.toLowerCase().indexOf(u.toLowerCase())>-1)return!0})).map((function(e){return A[e]}))),o&&(A=Object.keys(A).filter((function(e){if(A[e]&&A[e].type&&A[e].type===o.name)return!0})).map((function(e){return A[e]}))),A=Object.keys(A).filter((function(e){return L.type&&A[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(A[e].type)>-1||j.dataType.filter((function(e){return e.name===L.type}))[0].sharedIn.attach.indexOf(A[e].type)>-1||j.dataType.filter((function(e){return e.name===L.type}))[0].sharedIn.shared.indexOf(A[e].type)>-1)})).map((function(e){return A[e]}));var D=function(){var t=Object(Ne.a)(Rl().mark((function t(){var n;return Rl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n={_id:Object(Sn.a)(),cardId:L._id,idRel:y,_parent:y,type:"comment",message:m||"",shared:!0},go(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)}}(),P=function(){var t=Object(Ne.a)(Rl().mark((function t(){return Rl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:it({message:tt("$__confirmMoveCard",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){var t={cardId:L._id,newRel:y,planId:j.cards[y]._planId?j.cards[y]._planId:"plan"===j.cards[y].type?y:null,oldRel:L._parent};Un(e,t)&&(b(null),c({name:"plan"}))}});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return i.a.createElement("div",{className:t.root},i.a.createElement("div",{style:{width:"100%",padding:"15px"},ref:C},y&&j.cards[y]&&i.a.createElement(i.a.Fragment,null,i.a.createElement(ki,{db:"cards",data:j.cards[y],onlyOption:!0}),i.a.createElement("fieldset",{style:{maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},i.a.createElement("legend",null,tt("$__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[y].type)>-1&&i.a.createElement(gl,{style:{position:"relative",float:"left",margin:"3px"},onClick:function(){return D()}},tt("$__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[y].type)>-1&&i.a.createElement("fieldset",{style:{maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},i.a.createElement("legend",null,tt("$__AttachInCard")),i.a.createElement(gl,{style:{position:"relative",float:"left",margin:"3px"},onClick:function(){return P()}},tt("$__Attach","*"))),i.a.createElement("fieldset",{style:{maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},i.a.createElement(gl,{style:{position:"relative",float:"left",margin:"3px"},color:"red",onClick:function(){b(null)}},tt("$__cancel","*"))))),i.a.createElement("div",{style:{padding:"15px"}},i.a.createElement(hc,{dbNode:"typeFilter",options:I,getOptionLabel:function(e){return tt("$__".concat(e.name),1)},style:{width:"100%"},name:"typeFilter",disableClearable:!0,value:o,renderInput:function(e){return i.a.createElement(ya,Object.assign({},e,{label:tt("$__cardType",1),variant:at("outlined")}))},onChange:function(e,t){c(t)}})),i.a.createElement("div",{style:{padding:"15px"}},i.a.createElement(ya,{label:tt("$__search",1),variant:"outlined",name:"search",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){d(e.target.value),E(0)}},value:u})),i.a.createElement("div",{style:{maxWidth:"100%"}},Object.keys(A).length>25&&i.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center"}},i.a.createElement(Yl.a,{count:Object.keys(A).length,size:"small",page:w,onChange:function(e,t){E(t)}})),Object.keys(A).filter((function(e){return!y||(!(!y||A[e]._parent!==y&&A[e]._planId!==y)||void 0)})).map((function(e,t){if(t<=25*(w+1)&&t>=25*w)return i.a.createElement(ki,{db:"cards",key:t,data:A[e],notGlobalExpanded:!0,onlyOption:!0,onClick:function(t){b(A[e]._id),E(0),C.current.scrollIntoView()}})}))))}))),Wl=r(271),Ul=r(542),Vl=r.n(Ul);var ql=function(e){var t=Vl.a.ExcelFile,r=Vl.a.ExcelFile.ExcelSheet,n=Vl.a.ExcelFile.ExcelColumn,a=e.data,o=[],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=Ce.getState().db.cards[a[e]._times[r].cardId],i=parseInt(a[e]._times[r].fin)-parseInt(a[e]._times[r].ini);l+=i;var c=i,s="",u=0,d=0,p=0;i<60?s="".concat(c," ").concat(tt("$__seconds",1)):i>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(tt("$__hour",1)).concat(u>1?"s":""," ").concat(d," ").concat(tt("$__minutes",1)," ").concat(p," ").concat(tt("$__seconds",1))):(p=(c-=60*(d=Math.trunc(c/60)>0?Math.trunc(c/60):0))>0?c:0,s="".concat(d," ").concat(tt("$__minutes",1)," ").concat(p," ").concat(tt("$__seconds",1))),o.push({name:a[e].name,email:a[e].email,type:tt("$__".concat(n.type),1),card:n.name,description:a[e]._times[r].message,iniData:Be()(1e3*a[e]._times[r].ini).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),finalData:Be()(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:tt("$__".concat(n.type),1),card:n.name,description:a[e]._times[r].message,iniData:Be()(1e3*a[e]._times[r].ini).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),finalData:Be()(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(O.a)({},e,t))}));var p=l,f="";l<60?(d=p,f="".concat(p," ").concat(tt("$__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(tt("$__hour",1)).concat(s>1?"s":""," ").concat(u," ").concat(tt("$__minutes",1)," ").concat(d," ").concat(tt("$__seconds",1))):(d=(p-=60*(u=Math.trunc(p/60)>0?Math.trunc(p/60):0))>0?p:0,f="".concat(u," ").concat(tt("$__minutes",1)," ").concat(d," ").concat(tt("$__seconds",1))),o.push({name:"",type:"",card:"",description:"",iniData:"",finalData:"",total:f,hours:"",minutes:"",seconds:""})}return i.a.createElement(t,{filename:"".concat(Be()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDTHHMM"),"_").concat(a.name),element:i.a.createElement(Ct,{title:tt("$__export"),text:tt("$__export"),icon:"file_download",size:"25px"})},i.a.createElement(r,{data:o,name:"timeSheet"},i.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(tt("$__name",1)),value:"name"}),i.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(tt("$__email",1)),value:"email"}),i.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(tt("$__type",1)),value:"type"}),i.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(tt("$__card",1)),value:"card"}),i.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(tt("$__description",1)),value:"description"}),i.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(tt("$__initialTimer",1)),value:"iniData"}),i.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(tt("$__finalTimer",1)),value:"finalData"}),i.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(tt("$__totalTime",1)),value:"total"}),i.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(tt("$__hours",1)),value:"hours"}),i.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(tt("$__minutes",1)),value:"minutes"}),i.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(tt("$__seconds",1)),value:"seconds"})),c&&Object.keys(c).length>0&&Object.keys(c).map((function(e,t){var a=c[e][0].name;return i.a.createElement(r,{data:c[e],name:a,key:e},i.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(tt("$__name",1)),value:"name"}),i.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(tt("$__email",1)),value:"email"}),i.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(tt("$__type",1)),value:"type"}),i.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(tt("$__card",1)),value:"card"}),i.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(tt("$__description",1)),value:"description"}),i.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(tt("$__initialTimer",1)),value:"iniData"}),i.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(tt("$__finalTimer",1)),value:"finalData"}),i.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(tt("$__totalTime",1)),value:"total"}),i.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(tt("$__hours",1)),value:"hours"}),i.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(tt("$__minutes",1)),value:"minutes"}),i.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(tt("$__seconds",1)),value:"seconds"}))})))},Xl={card:{border:"0",marginBottom:"30px",marginTop:"30px",borderRadius:"6px",color:"rgba("+Gt("#000")+", 0.87)",background:"#FFF",width:"100%",boxShadow:"0 1px 4px 0 rgba("+Gt("#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("+Gt("#000")+", 0.56), 0 4px 25px 0px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt("#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("+Gt("#000")+", 0.56)",borderRadius:"6px"},"& small":{color:"rgba("+Gt("#FFF")+", 0.7) !important"}},cardPricing:{textAlign:"center","&:after":{backgroundColor:"rgba("+Gt("#000")+", 0.7) !important"},"& ul":{listStyle:"none",padding:0,maxWidth:"240px",margin:"10px auto"},"& ul li":{color:Qt[0],textAlign:"center",padding:"12px 0px",borderBottom:"1px solid rgba("+Gt(Qt[0])+",0.3)"},"& ul li:last-child":{border:0},"& ul li b":{color:Qt[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("+Gt("#FFF")+",0.3)","& b, & svg,& .fab,& .fas,& .far,& .fal,& .material-icons":{color:"#FFF",fontWeight:"700"}}},cardProduct:{marginTop:"30px"},primary:{background:"linear-gradient(60deg,"+Vt[1]+","+Vt[4]+")","& h1 small":{color:"rgba("+Gt("#FFF")+", 0.8)"},color:"#FFF"},info:{background:"linear-gradient(60deg,"+Jt[1]+","+Jt[4]+")","& h1 small":{color:"rgba("+Gt("#FFF")+", 0.8)"},color:"#FFF"},success:{background:"linear-gradient(60deg,"+Kt[1]+","+Kt[4]+")","& h1 small":{color:"rgba("+Gt("#FFF")+", 0.8)"},color:"#FFF"},warning:{background:"linear-gradient(60deg,"+qt[1]+","+qt[4]+")","& h1 small":{color:"rgba("+Gt("#FFF")+", 0.8)"},color:"#FFF"},danger:{background:"linear-gradient(60deg,"+Xt[1]+","+Xt[4]+")","& h1 small":{color:"rgba("+Gt("#FFF")+", 0.8)"},color:"#FFF"},rose:{background:"linear-gradient(60deg,"+Zt[1]+","+Zt[4]+")","& h1 small":{color:"rgba("+Gt("#FFF")+", 0.8)"},color:"#FFF"},cardChart:{"& p":{marginTop:"0px",paddingTop:"0px"}},cardLogin:{transform:"translate3d("+Gt("#000")+")",transition:"all 300ms linear"}},Kl=["className","children","plain","profile","blog","raised","background","pricing","color","product","testimonial","chart","login"],Jl=Object(_t.a)(Xl);function Zl(e){var t,r=Jl(),n=e.className,a=e.children,o=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,v=Object(Yt.a)(e,Kl),y=$e()((t={},Object(O.a)(t,r.card,!0),Object(O.a)(t,r.cardPlain,o),Object(O.a)(t,r.cardProfile,c||h),Object(O.a)(t,r.cardBlog,l),Object(O.a)(t,r.cardRaised,s),Object(O.a)(t,r.cardBackground,u),Object(O.a)(t,r.cardPricingColor,d&&void 0!==p||d&&void 0!==u),Object(O.a)(t,r[p],p),Object(O.a)(t,r.cardPricing,d),Object(O.a)(t,r.cardProduct,f),Object(O.a)(t,r.cardChart,m),Object(O.a)(t,r.cardLogin,g),Object(O.a)(t,n,void 0!==n),t));return i.a.createElement("div",Object.assign({className:y},v),a)}var Ql={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("+Gt("#FFF")+", 0.8)"}}},cardBodyProfile:{marginTop:"15px"},cardBodyCalendar:{padding:"0px !important"}},es=["className","children","background","plain","formHorizontal","pricing","signup","color","profile","calendar"],ts=Object(_t.a)(Ql);function rs(e){var t,r=ts(),n=e.className,a=e.children,o=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(Yt.a)(e,es),m=$e()((t={},Object(O.a)(t,r.cardBody,!0),Object(O.a)(t,r.cardBodyBackground,o),Object(O.a)(t,r.cardBodyPlain,c),Object(O.a)(t,r.cardBodyFormHorizontal,l),Object(O.a)(t,r.cardPricing,s),Object(O.a)(t,r.cardSignup,u),Object(O.a)(t,r.cardBodyColor,d),Object(O.a)(t,r.cardBodyProfile,p),Object(O.a)(t,r.cardBodyCalendar,f),Object(O.a)(t,n,void 0!==n),t));return i.a.createElement("div",Object.assign({className:m},h),a)}var ns={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("+Gt("#000")+", 0.24), 0 8px 10px -5px rgba("+Gt("#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)({},cr)},successCardHeader:{color:"#FFF","&:not($cardHeaderText):not($cardHeaderIcon)":Object(h.a)({},lr)},dangerCardHeader:{color:"#FFF","&:not($cardHeaderText):not($cardHeaderIcon)":Object(h.a)({},sr)},infoCardHeader:{color:"#FFF","&:not($cardHeaderText):not($cardHeaderIcon)":Object(h.a)({},ur)},primaryCardHeader:{color:"#FFF","&:not($cardHeaderText):not($cardHeaderIcon)":Object(h.a)({},dr)},roseCardHeader:{color:"#FFF","&:not($cardHeaderText):not($cardHeaderIcon)":Object(h.a)({},pr)},customCardHeader:{color:"#FFF","&:not($cardHeaderText):not($cardHeaderIcon)":Object(h.a)({},{})}},as=["className","children","color","plain","image","contact","signup","stats","icon","text"],os=Object(_t.a)(ns);function is(e){var t,r=os(),n=e.className,a=e.children,o=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(Yt.a)(e,as),m=$e()((t={},Object(O.a)(t,r.cardHeader,!0),Object(O.a)(t,r[o+"CardHeader"],o),Object(O.a)(t,r.cardHeaderPlain,c),Object(O.a)(t,r.cardHeaderImage,l),Object(O.a)(t,r.cardHeaderContact,s),Object(O.a)(t,r.cardHeaderSignup,u),Object(O.a)(t,r.cardHeaderStats,d),Object(O.a)(t,r.cardHeaderIcon,p),Object(O.a)(t,r.cardHeaderText,f),Object(O.a)(t,n,void 0!==n),t));return i.a.createElement("div",Object.assign({className:m},h),a)}var cs=r(1694),ls=r(1674),ss=r(1673),us=r(1675),ds=r(1595);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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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(_t.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 fs=Object(Fe.b)((function(e){return{cards:e.db.cards,timeline:e.timeline}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState(),r=t.db,n=t.timeline,a=i.a.useState(Be()(new Date).tz("America/Sao_Paulo").subtract(720,"d").format("YYYY-MM-DD")),o=Object(Ae.a)(a,2),c=o[0],l=o[1],s=i.a.useState(Be()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DD")),u=Object(Ae.a)(s,2),d=u[0],p=u[1],m=i.a.useState(!1),g=Object(Ae.a)(m,2),v=g[0],y=g[1],b=i.a.useState({}),x=Object(Ae.a)(b,2),_=x[0],w=x[1],E=i.a.useState({}),j=Object(Ae.a)(E,2),k=j[0],S=j[1],L=i.a.useState(!0),C=Object(Ae.a)(L,2),I=C[0],F=C[1],T=(Be()().format("YYYY/MM/DD"),window.location.hash.split("/"));T[0]=T[0].replace("#",""),i.a.useEffect((function(){return A(),function(){}}),[]),i.a.useEffect((function(){N()}),[e.cards]);var N=function(){var t=na(e.nodeId);S(t)},A=function(){var t=Object(Ne.a)(ps().mark((function t(){var r;return ps().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log(e),t.prev=1,t.next=4,vo(Object(h.a)(Object(h.a)({},e),{},{fnIdentification:"StrategyAndPlans/Dashboard/Widgers/timeSheet/init()"}),{ids:[e.nodeId],db:"cards",type:"timer",reqChildrens:!0});case 4:(r=t.sent)&&(console.log(r),F(!1)),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.log(t.t0),F(!1);case 12:case"end":return t.stop()}}),t,null,[[1,8]])})));return function(){return t.apply(this,arguments)}}(),D={},P={},z=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",n="";if(e<60)r="".concat(e," ").concat(tt("$__seconds",1)),r="".concat(e,"s");else if(e>3600){var a=Math.trunc(e/3600);e-=3600*a;var o=Math.trunc(e/60)>0?Math.trunc(e/60):0,i=(e-=60*o)>0?e:0;r="".concat(a," ").concat(tt("$__hour",1)).concat(a>1?"s":""," ").concat(o," ").concat(tt("$__minutes",1)," ").concat(i>0?"".concat(i," ").concat(tt("$__seconds",1)):""),n="".concat(a,"H ").concat(o,"M ").concat(i," S")}else{var c=Math.trunc(e/60)>0?Math.trunc(e/60):0,l=(e-=60*c)>0?e:0;r="".concat(c," ").concat(tt("$__minutes",1)," ").concat(l>0?"".concat(l," ").concat(tt("$__seconds",1)):""),n="".concat(c,"M ").concat(l," S")}return t?n:r};Object.keys(k).filter((function(e){return n[e]&&Object.keys(n[e]).filter((function(t){return"timer"===n[e][t].type})).length>0})).map((function(e){Object.keys(n[e]).filter((function(t){return"timer"===n[e][t].type&&!n[e][t].deleted})).map((function(t){n[e][t]._toUser&&Object.keys(n[e][t]._toUser).length>0&&Object.keys(n[e][t]._toUser).map((function(r){P=Object(h.a)(Object(h.a)({},P),{},Object(O.a)({},r,Object(h.a)({},n[e][t]._toUser[r]?n[e][t]._toUser[r]:{})))})),P=Object(h.a)(Object(h.a)({},P),{},Object(O.a)({},n[e][t].user._id,Object(h.a)({},n[e][t].user)))})),Object.keys(n[e]).filter((function(t){return n[e]&&n[e][t]&&"timer"===n[e][t].type&&!n[e][t].deleted&&(0===Object.keys(_).length||Object.keys(_).length>0&&Object.keys(_).filter((function(r){return n[e]&&n[e][t]&&n[e][t].type&&"timer"===n[e][t].type&&_[r]&&n[e][t].user&&(n[e]&&n[e][t]&&n[e][t].user&&!n[e][t]._toUser&&!n[e][t]._toUser[r]&&n[e][t].user._id===r||n[e]&&n[e][t]&&n[e][t]._toUser&&n[e][t]._toUser[r]&&n[e][t]._toUser[r]!==n[e][t].user._id)})).length>0)})).map((function(t){Object.keys(P).map((function(r){if(r&&n[e]&&n[e][t]&&"timer"===n[e][t].type&&!n[e][t].deleted&&parseInt(n[e][t].ini)>=Be()("".concat(c," 00:00:01")).unix("X")&&parseInt(n[e][t].fin)<=Be()("".concat(d," 23:59:59")).unix("X")&&n[e][t].user&&(n[e][t].user._id===r||n[e][t]._toUser&&n[e][t]._toUser[r])){parseInt(n[e][t].fin)-parseInt(n[e][t].ini);var a=parseInt(n[e][t].fin)-parseInt(n[e][t].ini),o=a=D&&D[r]&&D[r].totalTimer?parseInt(D[r].totalTimer)+(parseInt(n[e][t].fin)-parseInt(n[e][t].ini)):parseInt(n[e][t].fin)-parseInt(n[e][t].ini),i="",l="";if(a<60)i="".concat(o," ").concat(tt("$__seconds",1)),i="".concat(o,"s");else if(a>3600){var s=Math.trunc(o/3600);o-=3600*s;var u=Math.trunc(o/60)>0?Math.trunc(o/60):0,p=(o-=60*u)>0?o:0;i="".concat(s," ").concat(tt("$__hour",1)).concat(s>1?"s":""," ").concat(u," ").concat(tt("$__minutes",1)," ").concat(p>0?"".concat(p," ").concat(tt("$__seconds",1)):""),l="".concat(s,"H ").concat(u,"M ").concat(p," S")}else{var f=Math.trunc(o/60)>0?Math.trunc(o/60):0,m=(o-=60*f)>0?o:0;i="".concat(f," ").concat(tt("$__minutes",1)," ").concat(m>0?"".concat(m," ").concat(tt("$__seconds",1)):""),l="".concat(f,"M ").concat(m," S")}D=Object(h.a)(Object(h.a)({},D),{},Object(O.a)({},r,Object(h.a)(Object(h.a)(Object(h.a)(Object(h.a)({},D[r]?D[r]:{}),P[r]?P[r]:{}),D&&D[r]&&D[r].totalTimer?{totalTimer:parseInt(D[r].totalTimer)+(parseInt(n[e][t].fin)-parseInt(n[e][t].ini))}:{totalTimer:parseInt(n[e][t].fin)-parseInt(n[e][t].ini)}),{},{timerText:i,timerTextMini:l,_times:Object(h.a)(Object(h.a)({},D[r]&&D[r]._times?D[r]._times:{}),{},Object(O.a)({},t,Object(h.a)(Object(h.a)({},n[e][t]),{},{cardId:e})))})))}1}))}))}));var $=function(e){return i.a.createElement("div",{style:{width:"100%",marginBottom:"10px",display:"flex",alignItems:"center"}},e.data&&e.data.name&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{width:"33px"}},i.a.createElement(Ue.a,{title:e.data.name},i.a.createElement(Kr.a,{alt:e.data.name,src:e.data.image||null,style:{width:"33px",height:"33px"}},e.data.name.substr(0,1)))),i.a.createElement("div",{style:{marginLeft:"10px",fontWeight:"bold",color:at("menu"),width:"33%",minWidth:"150px"}},e.data.name)),i.a.createElement("div",{style:{marginLeft:"10px",fontWeight:"bold",color:at("menu")}},e.data.timerText))},M=function(e){_[e]&&Object.keys(_).filter((function(e){return _[e]})).length<=1?w({}):w(Object(h.a)(Object(h.a)({},_),{},Object(O.a)({},e,!_[e])))};return i.a.createElement(Zl,null,i.a.createElement(hi,{title:tt("$__timeSheet",1),icon:"update",color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"},customButtons:[!v&&{title:"$__timeSheetExport",icon:"file_download",color:at("color"),onClick:function(){y(!v)}}]}),I?i.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}},i.a.createElement(Gr,null)):i.a.createElement(i.a.Fragment,null),v&&i.a.createElement("div",{style:{padding:"15px"}},i.a.createElement("fieldset",{style:{position:"relative",width:"100%",marginLeft:"7px",display:"flex",justifyContent:"space-between",marginBottom:"14px",marginTop:"7px"}},i.a.createElement("legend",null,tt("$__timeCourse",1)),i.a.createElement(ya,{label:tt("$__initialDate",1),variant:at("fieldVariant",1),name:"startDate",style:{marginRight:"15px"},InputLabelProps:{shrink:!0},type:"date",inputProps:{max:d||null},InputProps:{autoComplete:"new-password",onChange:function(e){l(e.target.value)}},value:c}),i.a.createElement(ya,{label:tt("$__endDate",1),variant:at("fieldVariant"),name:"endDate",type:"date",min:c||null,InputLabelProps:{shrink:!0},inputProps:{min:c||null},InputProps:{autoComplete:"new-password",onChange:function(e){p(e.target.value)}},value:d})),r.users&&Object.keys(r.users).length>0&&i.a.createElement(cs.a,{style:{width:"100%"}},i.a.createElement(ss.a,{style:{minWidth:"100%"},expandIcon:i.a.createElement(xt,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},i.a.createElement("div",{style:{color:at("color"),fontSize:"12px"}},tt("$__users"),i.a.createElement(Sa.a,{max:6},Object.keys(_).length>0&&Object.keys(_).map((function(e,t){return"unassigned"!==e&&_[e]?i.a.createElement(Ue.a,{title:r.users[e].name,key:t},i.a.createElement(Kr.a,{alt:r.users[e].name,src:r.users[e].image||null},r.users[e].name.substr(0,1))):"unassigned"===e&&_[e]&&i.a.createElement(Ue.a,{title:tt("$__unassigned",1),key:t},i.a.createElement(Kr.a,{alt:tt("$__unassignedSGL",1)},tt("$__unassignedSGL",1)))}))))),i.a.createElement(ls.a,{style:{minWidth:"100%"}},i.a.createElement(ds.a,null,i.a.createElement(us.a,{style:{minWidth:"100%"},control:i.a.createElement(i.a.Fragment,null,i.a.createElement(Kr.a,{alt:"NA"},tt("NA",1)),i.a.createElement(Xa,{checked:!(!_||!_.unassigned),onChange:function(){M("unassigned")},color:"default"})),label:tt("$__unassigned")}),Object.keys(P).map((function(e){return r.users&&r.users[e]&&r.users[e]._id&&i.a.createElement(i.a.Fragment,{key:e},i.a.createElement(us.a,{key:e,style:{minWidth:"100%"},control:i.a.createElement(i.a.Fragment,null,i.a.createElement(Kr.a,{alt:r.users[e].name.substr(0,1),src:r.users[e].image||null},r.users[e].name.substr(0,1)),i.a.createElement(Xa,{checked:!(!_||!_[e]),onChange:function(){M(e)},color:"default"})),label:r.users[e].name||r.users[e].name}))}))))),i.a.createElement("div",{style:{display:"flex",justifyContent:"center",marginTop:"7px"}},i.a.createElement(ql,{data:D}),i.a.createElement(Ct,{title:tt("$__closeFilter"),text:tt("$__closeFilter"),color:"lightgrey",textColor:"lightgrey",icon:"cancel",onClick:function(){y(!v)},size:"25px"}))),i.a.createElement(is,{style:{height:"333px"}},i.a.createElement(Wl.a,{data:Object(f.a)(Object.keys(D).sort((function(e,t){return parseInt(D[e].totalTimer)>parseInt(D[t].totalTimer)?-1:parseInt(D[e].totalTimer)<parseInt(D[t].totalTimer)?1:0})).map((function(e,t){return{id:D[e].name,label:D[e].name,value:D[e].totalTimer,color:"#929497",textMini:D[e].timerText}}))),valueFormat:function(e){return z(e,!0),z(e)},enableArcLabels:!1,colors:{scheme:"purpleRed_green"},activeOuterRadiusOffset:8,arcLabelsTextColor:{from:"color",modifiers:[["brighter",3]]},borderWidth:1,cornerRadius:3,enableArcLinkLabels:!0,innerRadius:.5,leavesOnly:!0,margin:{top:10,right:80,bottom:10,left:0},padAngle:1.3,sortByValue:!0})),i.a.createElement(rs,null,i.a.createElement(oi,null,Object.keys(D).sort((function(e,t){return parseInt(D[e].totalTimer)>parseInt(D[t].totalTimer)?-1:parseInt(D[e].totalTimer)<parseInt(D[t].totalTimer)?1:0})).map((function(e,t){return i.a.createElement($,{data:D[e],key:e})})))),i.a.createElement("div",{style:{color:"#CCCCCC",fontSize:"12px",padding:"15px",textAlign:"center"}},r.cards[e.nodeId]&&"plan"===r.cards[e.nodeId].type?tt("$__timeSheetShowingAllTimesRegisteredInAllActivitiesOfPlan"):tt("$__timeSheetShowingAllTimesRegisteredInActivityAndLinkedActivities")))})),hs=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:at("color")}}},timeline:{position:"absolute",width:"100%",bottom:"0px"},avatar:{width:"22px",height:"22px"},switch:{fontSize:"16px",fontWeight:"bold",color:at("medium")}}};var ms=Object(Fe.b)((function(){return{}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(hs)((function(e){var t=e.classes,r=Ce.getState(),n=r.db,a=r.sideModule,o=r.session,c=a.data||{},l=i.a.useState(!1),s=Object(Ae.a)(l,2),u=s[0],d=s[1],p=i.a.useState(Ce.getState().db.cards[c._id]._users[o._id]?"timeline":"chart"),f=Object(Ae.a)(p,2),m=f[0],g=f[1];ft(),o._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(o._id)>-1}))]&&n.cards[c._id]._users[Object.keys(n.cards[c._id]._users).find((function(e){return e.indexOf(o._id)>-1}))];var v=window.location.hash.split("/");v[0]=v[0].replace("#","");var y=n.cards[c._id]._timeline||{};return y=Object.keys(y).filter((function(e){return"kpi"===y[e].type})).map((function(e){return y[e]})),c._parent&&c._parent!==v[0]&&Ce.getState().db.cards[c._parent],i.a.createElement("div",null,!u&&i.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},"chart"!==m&&Ce.getState().db.cards[c._id]._users[o._id]&&i.a.createElement(Ct,{title:tt("$__add"),text:tt("$__add"),icon:"more_time",size:"25px",onClick:function(){d(!0)}}),"chart"!==m&&i.a.createElement(Ct,{title:tt("$__showChart"),text:tt("$__showChart"),icon:"analytics",size:"25px",onClick:function(){g("chart")}}),"timeline"!==m&&i.a.createElement(Ct,{title:tt("$__showTimeline"),text:tt("$__showTimeline"),icon:"timeline",size:"25px",onClick:function(){g("timeline")}})),"chart"===m&&i.a.createElement("div",{style:{width:"calc(100% - 30px)",marginLeft:"15px"}},i.a.createElement(fs,{nodeId:c._id})),u&&i.a.createElement("div",{className:t.timeline,style:{top:"0px",backgroundColor:"#FFFFFF"}},i.a.createElement(Va,{data:c,manualAdd:!0,callBack:function(){d(!1)}})),(u||"timeline"===m)&&i.a.createElement("div",{style:Object(h.a)(Object(h.a)({position:"absolute"},u?{top:333}:{top:35}),{},{left:0,right:0,bottom:0})},i.a.createElement(dc,{nodeId:c._id,type:"timer",db:"cards",disabledSend:!0,loadTimeline:!0,noSearch:!0})))}))),gs=r(12),vs=r(1690),ys=Object(_t.a)({root:{"&:hover":{backgroundColor:"transparent"}},icon:{borderRadius:"50%",width:16,height:16,boxShadow:"inset 0 0 0 1px ".concat(at("color",.2),", inset 0 -1px 0 ").concat(at("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(at("color",.6)),outlineOffset:2},"input:hover ~ &":{backgroundColor:"#ebf1f5"},"input:disabled ~ &":{boxShadow:"none",background:"rgba(206,217,224,.5)"}},checkedIcon:{backgroundColor:at("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:at("color",1)}}});var bs=function(e){var t=ys();return i.a.createElement(vs.a,Object.assign({className:t.root,disableRipple:!0,color:"default",checkedIcon:i.a.createElement("span",{className:Object(gs.default)(t.icon,t.checkedIcon)}),icon:i.a.createElement("span",{className:t.icon})},e))},xs=r(1676),_s=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(at("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(at("color",.2)),borderRadius:"5px",display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:"16px",paddingRight:"7px",fontWeight:"bold",fontSize:"12px",color:at("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(at("color",.2)),borderRadius:"0 0 5px 5px",display:"flex",alignItems:"center",paddingLeft:"16px",fontSize:"12px",color:at("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(at("color",.2)),borderRadius:"0 0 5px 5px",paddingTop:"15px",paddingLeft:"16px",fontSize:"12px",fontWeight:"bold",color:at("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:at("medium")},accessDescription:{fontSize:"12px",color:at("medium")}}},ws=r(338),Es=r.n(ws);function Os(){Os=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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(Fe.b)((function(e){return{store:e}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(_s)((function(e){var t=e.classes,r=Ce.getState(),n=r.db,a=r.sideModule,o=r.session,c=i.a.useState({id:null}),l=Object(Ae.a)(c,2),s=l[0],u=l[1],d=i.a.useState(!1),p=Object(Ae.a)(d,2),m=p[0],g=p[1],v=i.a.useState(!1),y=Object(Ae.a)(v,2),b=y[0],x=y[1],_=i.a.useState(""),w=Object(Ae.a)(_,2),E=w[0],O=w[1],j=i.a.useState(!1),k=Object(Ae.a)(j,2),S=k[0],L=k[1],C=n.cards[a.data._id],I=Object(h.a)({},n.users),F=Object(h.a)({},n.users),T=Object(h.a)(Object(h.a)(Object(h.a)({},C&&C._users?Object(h.a)({},C._users):{}),C._parent&&n.cards[C._parent]&&n.cards[C._parent]._users?Object(h.a)({},n.cards[C._parent]._users):{}),C._planId&&n.cards[C._planId]&&n.cards[C._planId]._users?Object(h.a)({},n.cards[C._planId]._users):{}),N={},A=ta(C._id,["external"],{isArray:!0}),D=window.location.hash.split("/");D[0]=D[0].replace("#","");var P=ft(),z=C&&C._id&&n.cards[C._id]&&n.cards[C._id]._users&&Object.keys(n.cards[C._id]._users).length>0?n.cards[C._id]._users[Object.keys(n.cards[C._id]._users).find((function(e){return e.indexOf(o._id)>-1}))]:0;if(i.a.useEffect((function(){if(!b){x(!0);C._planId&&n.cards[C._planId]&&n.cards[C._planId].client?n.cards[C._planId].client:C.client&&C.client}})),!a||!a.data)return null;var $=function(){var t=Object(Ne.a)(Os().mark((function t(r,o){var i;return Os().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=1,C&&"plan"===C.type&&(i=3),o?i=o:C._planId&&n.cards[C._planId]&&n.cards[C._planId]._users&&n.cards[C._planId]._users[r]&&n.cards[C._planId]._users[r].access&&(i=C._parent&&n.cards[C._parent]&&n.cards[C._parent]._users&&n.cards[C._parent]._users[r]&&n.cards[C._parent]._users[r].access&&parseInt(n.cards[C._parent]._users[r].access)>parseInt(n.cards[C._planId]._users[r].access)?parseInt(n.cards[C._parent]._users[r].access):parseInt(n.cards[C._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,Ba(e,r,i,a.data._id);case 6:t.sent&&(g(!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(Ne.a)(Os().mark((function t(r,o){var i,c;return Os().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=Ze.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],g(!1),u({_id:null}));case 3:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();if(!C)return null;if(I=I&&Object.keys(I).length>0&&Object.keys(I).filter((function(e){return C&&C._users&&C._users[I[e]._id]&&!C._users[I[e]._id].deleted||C._users&&Object.keys(C._users).indexOf(e)>-1})).map((function(e){return I[e]})).sort((function(e,t){return e.name<t.name?-1:0})),F=Object.keys(F).filter((function(e){return!F[e].companyName&&(!E||E&&F[e].name.toLowerCase().indexOf(E.toLowerCase())>-1)&&"unity"!==F[e].type&&"client"!==F[e].type&&"group"!==F[e].type&&"account"!==F[e].type&&"external"!==F[e].type&&!F[e].deleted&&(!C._users||C._users&&!C._users[F[e]._id])})).map((function(e){return F[e]})).sort((function(e,t){return e.name<t.name?-1:(e.name,t.name,0)})),T=Object.keys(T).filter((function(e){return!n.users[e]&&36===e.length&&!T[e].deleted&&(!E||E&&F[e].name.toLowerCase().indexOf(E.toLowerCase())>-1)})).map((function(e){return T[e]})).sort((function(e,t){return e.name<t.name?-1:(e.name,t.name,0)})),C._planId&&n.cards[C._planId]&&n.cards[C._planId].client||C.client){var B=C.client?C.client:n.cards[C._planId].client;N=Object.keys(F).filter((function(e){return F[e]._parent===B&&(!E||E&&F[e].name.toLowerCase().indexOf(E.toLowerCase())>-1)&&"unity"!==F[e].type&&"client"!==F[e].type&&"group"!==F[e].type&&"account"!==F[e].type&&"external"!==F[e].type})).map((function(e){return F[e]})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})),F=Object.keys(F).filter((function(e){return!F[e]._parent&&(!E||E&&F[e].name.toLowerCase().indexOf(E.toLowerCase())>-1)&&"unity"!==F[e].type&&"client"!==F[e].type&&"group"!==F[e].type&&"account"!==F[e].type})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})).map((function(e){return F[e]}))}return C.client||(F=Object.keys(F).filter((function(e){return!F[e]._parent&&(!E||E&&F[e].name.toLowerCase().indexOf(E.toLowerCase())>-1)&&"unity"!==F[e].type&&"client"!==F[e].type&&"group"!==F[e].type&&"account"!==F[e].type})).map((function(e){return F[e]})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0}))),i.a.createElement("div",{className:t.root},S&&i.a.createElement("div",{style:{marginTop:15,width:"100%",padding:"4px 15px",fontSize:"16px",color:"lightGray"}},i.a.createElement(ya,{id:"quickUser_Search",label:tt("$__searchByName",1),variant:at("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:i.a.createElement(Ja.a,{position:"end",style:{cursor:"pointer"},onClick:function(){O(""),L(!1)}},i.a.createElement(xt,{icon:"close"})),onChange:function(e){O(e.target.value)},onBlur:function(e){}},value:E,placeholder:tt("$__searchByName",1),autoFocus:!0})),i.a.createElement("fieldset",null,i.a.createElement("legend",{style:{color:at("color")}},tt("$__permittedUsers",1)),I&&I.map((function(r,n){var c=1;return C._users&&C._users[r._id]&&C._users[r._id].access&&(c=String(C._users[r._id].access)),(!s._id||s._id&&r._id===s._id)&&i.a.createElement("div",{className:t.user,key:n},s._id===r._id?i.a.createElement("div",{className:t.accessEditing},(s._id!==o._id||P.plan&&P.planAdmin)&&i.a.createElement("div",{style:{marginTop:"30px"}},i.a.createElement(xs.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})),g(!0)}},"plan"!==C.type&&(z&&parseInt(z.access)>=1||P&&P.plan&&(P.planAdmin||P.planModerate))&&i.a.createElement(us.a,{value:"1",control:i.a.createElement(bs,null),label:tt("$__execution",1)}),"plan"!==C.type&&"chatGroup"!==C.type&&(z&&parseInt(z.access)>=2||P&&P.plan&&(P.planAdmin||P.planModerate))&&i.a.createElement(us.a,{value:"2",control:i.a.createElement(bs,null),label:tt("$__participant",1)}),(z&&parseInt(z.access)>=3||P&&P.plan&&(P.planAdmin||P.planModerate))&&i.a.createElement(us.a,{value:"3",control:i.a.createElement(bs,null),label:tt("$__leader",1)}),"chatGroup"!==C.type&&(z&&parseInt(z.access)>=4||P&&P.plan&&(P.planAdmin||P.planModerate))&&i.a.createElement(us.a,{value:"4",control:i.a.createElement(bs,null),label:tt("$__manager",1)}),(z&&parseInt(z.access)>=5||P&&P.plan&&(P.planAdmin||P.planModerate))&&i.a.createElement(us.a,{value:"5",control:i.a.createElement(bs,null),label:tt("$__admin",1)}))),"chatGroup"!==C.type?i.a.createElement("ul",{id:"ACTIVE_USERS_LIST",style:{position:"relative",float:"left",width:"100%"}},1===parseInt(s.access)&&i.a.createElement("li",null,tt("$__readOnlyTodo",1)),parseInt(s.access)>1&&i.a.createElement("li",null,tt("$__interact",1)),parseInt(s.access)>2&&i.a.createElement(i.a.Fragment,null,"plan"===a.data.type&&i.a.createElement(i.a.Fragment,null,i.a.createElement("li",null,tt("$__access",1)," BRIGHT & CONNECTED"),i.a.createElement("li",null,tt("$__access",1)," INSIGHTS")),i.a.createElement("li",null,tt("$__update",1))),parseInt(s.access)>3&&i.a.createElement("li",null,tt("$__userEdit",1)),parseInt(s.access)>=4&&i.a.createElement(i.a.Fragment,null,"plan"===a.data.type&&i.a.createElement(i.a.Fragment,null,i.a.createElement("li",null,tt("$__access",1)," MATRIX SWOT")),i.a.createElement("li",null,tt("$__settings",1))),5===parseInt(s.access)&&i.a.createElement("li",null,tt("$__deleteActivity",1))):i.a.createElement("ul",{id:"ACTIVE_USERS_LIST",style:{position:"relative",float:"left",width:"100%"}},parseInt(s.access)>1&&i.a.createElement("li",null,tt("$__viewAndInteract",1)),parseInt(s.access)>2&&i.a.createElement(i.a.Fragment,null,i.a.createElement("li",null,tt("$__addAndRemoveUsers",1)),i.a.createElement("li",null,tt("$__update",1))),5===parseInt(s.access)&&i.a.createElement("li",null,tt("$__deleteGroup",1))),i.a.createElement("div",{className:t.btActions},m&&i.a.createElement(Ct,{transparent:!0,title:tt("$__save"),icon:"save",color:at("color"),onClick:function(){$(s._id,s.access)}}),I.length>1&&i.a.createElement(Ct,{transparent:!0,title:s._id!==o._id?tt("$__removeAccess",1):tt("$__getOut",1),icon:s._id!==o._id?"delete_forever":"logout",color:"red",onClick:function(){it({message:s._id!==o._id?tt("$__confirmRemoveUser",1):tt("$__confirmGetOut",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){M(s._id,s._id===o._id)}})}}),i.a.createElement(Ct,{transparent:!0,title:tt("$__close","*"),icon:"undo",color:at("medium"),onClick:function(){m?it({message:tt("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){u({_id:null}),g(!1)}}):(u({_id:null}),g(!1))}})),C._users[s._id]&&!C._users[s._id].isResponsible&&i.a.createElement("div",{className:t.switch,style:{position:"relative",width:"100%",float:"left",display:"flex",alignItems:"center",justifyContent:"space-between"}},i.a.createElement(Ct,{transparent:!0,title:tt("$__setAsResponsible"),text:tt("$__setAsResponsible"),icon:"admin_panel_settings",size:"25px",onClick:function(){it({message:tt("$__confirmSetAsResponsibleCard",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Ya(e,{cardId:a.data._id,userId:s._id})}})}}))):i.a.createElement("div",{className:t.access,style:{cursor:"pointer"},onClick:function(){(r&&(!r._access||r._access&&"owner"!==r._access)&&(z&&String(z.access)&&parseInt(z.access)>2&&parseInt(z.access)>=parseInt(c)||P&&P.plan&&(P.planAdmin||P.planModerate))||r._id===o._id)&&u({_id:r._id,access:c})}},"owner"===r._access?tt("$__owner",1):tt("1"===c?"$__execution":"2"===c?"$__participant":"3"===c?"$__leader":"4"===c?"$__manager":"5"===c?"$__admin":"$__execution",1)),i.a.createElement("div",{className:t.name},r.name,C._users[r._id]&&C._users[r._id].isResponsible?i.a.createElement("span",{style:{fontSize:"9px",fontWeight:"normal",color:"#CCCCCC"}},tt("$__responsible",1)):"",i.a.createElement("div",{style:{zIndex:10}},i.a.createElement(gn,{horizontalButton:!0,transparent:!0,size:"14px",btColor:at("color"),options:[{name:"$__setAsResponsible",icon:"admin_panel_settings",onClick:function(){it({message:tt("$__confirmSetAsResponsibleCard",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Ya(e,{cardId:a.data._id,userId:r._id})}})}}].concat(Object(f.a)(r&&(!r._access||r._access&&"owner"!==r._access)&&(z&&String(z.access)&&parseInt(z.access)>2&&parseInt(z.access)>=parseInt(c)||P&&P.plan&&(P.planAdmin||P.planModerate))||r._id===o._id?[{name:"$__editAccess",icon:"manage_accounts",onClick:function(){u({_id:r._id,access:c})}},{name:"$__removeAccess",icon:"delete_forever",color:"red",onClick:function(){it({message:r._id!==o._id?tt("$__confirmRemoveUser",1):tt("$__confirmGetOut",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){M(r._id,r._id===o._id)}})}}]:[]))}))),i.a.createElement("div",{className:t.avatar,style:{backgroundImage:'url("'.concat(r.image?r.image:Es.a,'")')}}))}))),!s._id&&i.a.createElement(i.a.Fragment,null,T&&T.length>0&&!s._id&&i.a.createElement("fieldset",{style:{marginTop:"7px"}},i.a.createElement("legend",{style:{color:at("color")}},tt("$__activeExternalUsers",1)),T.map((function(e,r){return i.a.createElement("div",{className:t.user,key:r},i.a.createElement("div",{className:t.name},e.name),i.a.createElement("div",{className:t.avatar,style:{backgroundImage:'url("'.concat(e.image?e.image:Es.a,'")')}}))}))),N&&N.length>0&&!s._id&&i.a.createElement("fieldset",{style:{marginTop:"7px"}},i.a.createElement("legend",{style:{color:at("color")}},tt("$__users",1)),N.map((function(e,r){return i.a.createElement("div",{className:t.user,key:r},i.a.createElement("div",{className:t.name},e.name),i.a.createElement("div",{className:t.avatar,style:{backgroundImage:'url("'.concat(e.image?e.image:Es.a,'")')}}),i.a.createElement("div",{className:t.access},i.a.createElement(Ct,{transparent:!0,title:tt("$__add"),icon:"person_add",size:"20px",onClick:function(){$(e._id)}})))}))),F&&F.length>0&&!s._id&&i.a.createElement("fieldset",{style:{marginTop:"7px"}},i.a.createElement("legend",{style:{color:at("color")}},tt("$__accountUsers",1)),F.map((function(e,r){return i.a.createElement("div",{className:t.user,key:r},i.a.createElement("div",{className:t.name},e.name),i.a.createElement("div",{className:t.avatar,style:{backgroundImage:'url("'.concat(e.image?e.image:Es.a,'")')}}),i.a.createElement("div",{className:t.access},i.a.createElement(Ct,{transparent:!0,title:tt("$__add"),icon:"person_add",size:"20px",onClick:function(){$(e._id)}})))}))),A&&A.length>0&&i.a.createElement("fieldset",{style:{marginTop:"7px"}},i.a.createElement("legend",{style:{color:at("color")}},tt("$__externalUsers",1)),A.filter((function(e){return!C._users||!C._users[e._id]})).map((function(e,r){return i.a.createElement("div",{className:t.user,key:r},i.a.createElement("div",{className:t.name},e.name),i.a.createElement("div",{className:t.avatar,style:{backgroundImage:'url("'.concat(e.image?e.image:Es.a,'")')}}),i.a.createElement("div",{className:t.access},i.a.createElement(Ct,{transparent:!0,title:tt("$__add"),icon:"person_add",size:"20px",onClick:function(){$(e._id)}})))})))),S?i.a.createElement(i.a.Fragment,null):i.a.createElement("div",{style:{position:"absolute",right:15,top:0}},i.a.createElement(Ct,{title:tt("$__search",1),color:at("menu"),icon:"search",onClick:function(){L(!0)},size:"25px"})))}))),ks=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:at("color")}}},loader:{position:"relative",width:"100%",height:"40px",textAlign:"center","& .MuiCircularProgress-root":{color:"".concat(at("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(at("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:at("medium")}}};function Ss(){Ss=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Ls=function(){var e=Object(Ne.a)(Ss().mark((function e(t){var r,n,a;return Ss().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=Ce.getState().sideModule.data).status&&delete r.status,(n=window.location.hash.split("/"))[0]=n[0].replace("#",""),e.prev=4,e.next=7,Ze.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)({},Ce.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)({},Ce.getState().db),{},{feeds:Object(h.a)(Object(h.a)({},Ce.getState().db.feeds),{},Object(O.a)({},r._id,Object(h.a)(Object(h.a)(Object(h.a)({},r),Ce.getState().db.feeds&&Ce.getState().db.feeds[r._id]?Ce.getState().db.feeds[r._id]:{}),{},{_parent:Object(h.a)(Object(h.a)({},Ce.getState().db.feeds&&Ce.getState().db.feeds[r._id]&&Ce.getState().db.feeds[r._id]._parent?Ce.getState().db.feeds[r._id]._parent:{}),{},Object(O.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)}}(),Cs=function(){var e=Object(Ne.a)(Ss().mark((function e(t){var r,n,a,o=arguments;return Ss().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(Ne.a)(Ss().mark((function e(n,a){var o,i;return Ss().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,bn.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(O.a)({},e._id,Object(h.a)({idRel:e.idRel},e.i)))})),i=Object(h.a)(Object(h.a)({},i),{},Object(O.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)({},Ce.getState().db),{},{feeds:Object(h.a)(Object(h.a)({},Ce.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 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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Fs=Object(_t.a)(ks);var Ts=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Fs(),r=Ce.getState(),n=r.sideModule,a=r.session,o=r.db,c=n.data||{},l=i.a.useState(!1),s=Object(Ae.a)(l,2),u=s[0],d=s[1],p=i.a.useState(!1),f=Object(Ae.a)(p,2),m=f[0],g=f[1],v=i.a.useState(!1),y=Object(Ae.a)(v,2),b=y[0],x=(y[1],i.a.useRef()),_=0,w=ft(),E=window.location.hash.split("/");E[0]=E[0].replace("#",""),E[0]&&36===E[0].length&&(_=ea(E[0]));var j=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(O.a)({},t.name,t.value))}))},k=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];u&&!t?it({message:tt("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},S=function(){var t=Object(Ne.a)(Is().mark((function t(r){return Is().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(d(!1),n.data.name){t.next=5;break}it({message:tt("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=9;break;case 5:return t.next=7,Ls(e,!0);case 7:t.sent?(it({message:tt("$__feedSigned",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&k(!0)):(it({message:tt("$__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)}}(),L=function(){var t=Object(Ne.a)(Is().mark((function t(r){var a,o,i,c;return Is().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r){t.next=41;break}if(-1!==r.indexOf("http")){t.next=6;break}it({message:"".concat(tt("$__invalidUrl",1),": ").concat(tt("$__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=41;break;case 6:if(!new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[&a-z\\d%_.~+=-]*)?(\\@[a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(r)){t.next=40;break}if(g(!0),"/"===(a=r)[r.length-1]&&(a=a.substring(0,r.length-1)),"/"===a.indexOf("http://")&&(a=a.replace("http://","https://")),"feed"!==n.data.type){t.next=25;break}return t.prev=13,t.next=16,Ze.post("/feed/exist",{url:r});case 16:o=t.sent,e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},n),{},{data:Object(h.a)(Object(h.a)({},n.data),{},{_id:o.data.id,url:a,_lock:!0,feed:o.data.feed,name:o.data.title,customTitle:o.data.customTitle,customDescription:o.data.customDescription})})),o&&g(!1),o.data.title&&d(!0),t.next=25;break;case 22:t.prev=22,t.t0=t.catch(13),C(r);case 25:if("link"!==n.data.type){t.next=40;break}return t.prev=26,(i=window.location.hash.split("/"))[0]=i[0].replace("#",""),t.next=31,Ze.post("/link/exist",{idRel:i[0],url:a});case 31:c=t.sent,e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},Ce.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{_id:"new",type:"link",name:c.data.title,description:c.data.contentSnippet,image:c.data.img,url:c.data.link,content:c.data.article}})),c&&g(!1),c.data.title&&d(!0),t.next=40;break;case 37:t.prev=37,t.t1=t.catch(26),it({message:"".concat(tt("$__invalidFeedUrl",1),": ").concat(tt("$__pleaseVerifyTheFeedAddress",1)),variant:"error",persist:!1,horizontal:"right",confirm:null});case 40:return t.abrupt("return");case 41:return t.abrupt("return",!1);case 42:case"end":return t.stop()}}),t,null,[[13,22],[26,37]])})));return function(e){return t.apply(this,arguments)}}(),C=function(){var t=Object(Ne.a)(Is().mark((function t(r){var a;return Is().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Ze.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),it({message:"".concat(tt("$__invalidFeedUrl",1),": ").concat(tt("$__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)}}(),I=!!e.permission&&e.permission;return!I&&parseInt(_)>=3&&(I=!0),i.a.createElement("div",null,i.a.createElement("div",{className:t.btClose},i.a.createElement("div",{style:{position:"fixed",display:"inline-flex",paddingLeft:"10px",top:"7px",right:0,backgroundColor:"#FFFFFF"}},I&&u&&i.a.createElement(Qi,{save:u?function(){S()}:null,saveClose:u?function(){S(!0)}:null,saveLoader:b,close:function(){e.onClose&&e.onClose()}}),i.a.createElement(Ct,{title:tt("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){e.onClose&&e.onClose()},size:"25px"}))),i.a.createElement("div",{className:t.data},c._lock?i.a.createElement(i.a.Fragment,null,i.a.createElement(ya,Object.assign({label:tt("$__titleOfFeed",1),variant:at("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"view_headline"})),onChange:function(e){j(e.target)}},value:c&&c.name?c.name:"",placeholder:tt("$__titleOfFeed_placeholder")},a&&"7806912b-4c7d-4f4f-b9e0-b93fc8f08776"!==a.account||c&&c.name?{disabled:!0}:{})),i.a.createElement(ya,{label:tt("$__customTitle",1),variant:at("fieldVariant"),name:"customTitle",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"title"})),onChange:function(e){j(e.target)}},value:c&&c.customTitle?c.customTitle:"",placeholder:tt("$__customTitle",1)}),a&&"7806912b-4c7d-4f4f-b9e0-b93fc8f08776"!==a.account?i.a.createElement(i.a.Fragment,null,i.a.createElement(ya,{label:tt("$__nameOfFontData",1),variant:at("fieldVariant"),name:"font",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"copyright"})),onChange:function(e){j(e.target)}},value:c&&c.font?c.font:"",placeholder:tt("$__nameOfFontData",1)}),i.a.createElement(ya,{label:tt("$__descriptionOfRss",1),variant:at("fieldVariant"),name:"description",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"subtitles"})),onChange:function(e){j(e.target)}},value:c&&c.description?c.description:"",placeholder:tt("$__descriptionOfRss",1)})):i.a.createElement(i.a.Fragment,null),i.a.createElement(ya,{label:tt("$__customDescription",1),variant:at("fieldVariant"),name:"customDescription",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"subtitles"})),onChange:function(e){j(e.target)}},value:c&&c.customDescription?c.customDescription:"",placeholder:tt("$__customDescription",1)}),i.a.createElement(ya,{label:tt("$__url","*"),variant:at("fieldVariant"),ref:x,name:"url",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"http"})),onChange:function(e){j(e.target)},onBlur:function(e){L(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)&&i.a.createElement("fieldset",{style:{marginBottom:"14px"}},i.a.createElement("legend",null,tt("$__tags",1)),i.a.createElement(ol,{data:{values:c._tags?c._tags:[]},callBack:function(e){j({name:"_tags",value:e})}})),w&&w.feed&&w.feedAdmin?i.a.createElement("fieldset",{style:{marginBottom:"14px"}},i.a.createElement(hc,{id:"combo-box-demo",options:o.plans,getOptionLabel:function(e){return tt(e.label,1)},style:{width:"100%"},name:"plans",disableClearable:!0,value:c&&c.plans&&o.plans?o.plans.filter((function(e){return String(e.value)===String(c.plans)}))[0]:o.plans[0],renderInput:function(e){return i.a.createElement(ya,Object.assign({},e,{label:tt("$__avaiablefromplan",1),variant:at("fieldVariant"),value:c&&c.plans&&o.plans?o.plans.filter((function(e){return String(e.value)===String(c.plans)}))[0]:o.plans[0]}))},onChange:function(e,t){I&&j({name:"plans",value:t.value})}})):i.a.createElement(i.a.Fragment,null),i.a.createElement("div",{className:t.switch},i.a.createElement(Cc,{checked:!!c.private,onChange:function(e){j({name:"private",value:!c.private})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__private",1))):i.a.createElement(ya,{label:tt("$__feedUrl","*"),variant:at("fieldVariant"),ref:x,name:"url",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"rss_feed"})),onChange:function(e){j(e.target)},onBlur:function(e){L(e.target.value)}},value:c&&c.url?c.url:"",placeholder:"http://www.domain.xpto/rss...",disabled:!!c._lock}),!c._lock&&!m&&i.a.createElement(Xr,{text:tt("link"===n.data.type?"$__validUrl":"$__validFeedUrl",1),icon:"check",onClick:function(){return L(x.current.value)}}),m&&i.a.createElement("div",{className:t.loader},i.a.createElement(Ot,null)),c.feed&&c.feed.length>0&&i.a.createElement("ul",{className:t.preview},i.a.createElement("div",{className:t.previewTitle},tt("$__preview",1)),c.feed.map((function(e,r){return i.a.createElement("li",{key:r},e&&e.title&&i.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.title},className:t.feedTitle}),i.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.contentSnippet},className:t.feedContent}),i.a.createElement("div",{className:t.feedFooter},i.a.createElement("div",{className:t.feedDate},Be()(e.pubDate).format("DD/MM/YYYY HH:MM")),i.a.createElement("div",{className:t.feedLink},i.a.createElement("a",{href:e.link,target:"_blank"},tt("$__openLink","*")))))})))))}));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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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(_t.a)(ks);var Ds=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=As(),r=Ce.getState().sideModule,n=r.data||{},a=i.a.useState(!1),o=Object(Ae.a)(a,2),c=o[0],l=o[1],s=i.a.useState(!1),u=Object(Ae.a)(s,2),d=u[0],p=u[1],f=i.a.useState(!1),m=Object(Ae.a)(f,2),g=m[0],v=(m[1],i.a.useRef()),y=0,b=window.location.hash.split("/");b[0]=b[0].replace("#",""),b[0]&&36===b[0].length&&(y=ea(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(O.a)({},t.name,t.value))}))},_=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];c&&!t?it({message:tt("$__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(Ne.a)(Ns().mark((function t(n){return Ns().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l(!1),r.data.name){t.next=5;break}it({message:tt("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=9;break;case 5:return t.next=7,Ls(e,!0);case 7:t.sent?(it({message:tt("$__feedSigned",1),variant:null,persist:!1,horizontal:"right",confirm:null}),n&&_(!0)):(it({message:tt("$__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(Ne.a)(Ns().mark((function t(n){var a,o,i;return Ns().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}it({message:"".concat(tt("$__invalidUrl",1),": ").concat(tt("$__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,Ze.post("/link/exist",{idRel:o[0],url:a});case 15:i=t.sent,e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},Ce.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),it({message:"".concat(tt("$__invalidFeedUrl",1),": ").concat(tt("$__pleaseVerifyTheFeedAddress",1)),variant:"error",persist:!1,horizontal:"right",confirm:null});case 24:t.next=28;break;case 26:it({message:"".concat(tt("$__invalidUrl",1),": ").concat(tt("$__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)}}(),j=!!e.permission&&e.permission;return!j&&parseInt(y)>=3&&(j=!0),i.a.createElement("div",null,i.a.createElement("div",{className:t.btClose},i.a.createElement("div",{style:{position:"fixed",display:"inline-flex",paddingLeft:"10px",top:"7px",right:0,backgroundColor:"#FFFFFF"}},g&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Ot,{size:"25px"})),j&&c&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Ct,{title:tt("$__save","*"),color:at("color"),icon:"save",onClick:function(){w()},size:"25px"}),i.a.createElement(Ct,{title:tt("$__saveAndClose",1),color:"green",icon:"playlist_add_check",onClick:function(){w(!0)},size:"25px"})),i.a.createElement(Ct,{title:tt("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){e.onClose&&e.onClose()},size:"25px"}))),i.a.createElement("div",{className:t.data},n._lock&&i.a.createElement(i.a.Fragment,null,i.a.createElement(ya,{label:tt("$__titleOfUrl",1),variant:at("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"view_headline"})),onChange:function(e){x(e.target)}},value:n&&n.name?n.name:"",placeholder:tt("$__titleOfUrl_placeholder"),disabled:!0}),i.a.createElement(ya,{label:tt("$__customTitle",1),variant:at("fieldVariant"),name:"customTitle",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"title"})),onChange:function(e){x(e.target)}},value:n&&n.customTitle?n.customTitle:"",placeholder:tt("$__customTitle",1)}),i.a.createElement(ya,{label:tt("$__nameOfFontData",1),variant:at("fieldVariant"),name:"font",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"copyright"})),onChange:function(e){x(e.target)}},value:n&&n.font?n.font:"",placeholder:tt("$__nameOfFontData",1)}),i.a.createElement(ya,{label:tt("$__descriptionOfUrl",1),variant:at("fieldVariant"),name:"description",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"subtitles"})),onChange:function(e){x(e.target)}},value:n&&n.description?n.description:"",placeholder:tt("$__descriptionOfUrl",1)}),i.a.createElement(ya,{label:tt("$__customDescription",1),variant:at("fieldVariant"),name:"customDescription",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"subtitles"})),onChange:function(e){x(e.target)}},value:n&&n.customDescription?n.customDescription:"",placeholder:tt("$__customDescription",1)}),i.a.createElement("div",{className:t.switch},i.a.createElement(Cc,{checked:!!n.private,onChange:function(e){x({name:"private",value:!n.private})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__private",1))),i.a.createElement(ya,{label:tt("$__url","*"),variant:at("fieldVariant"),ref:v,name:"url",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{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&&i.a.createElement(Xr,{text:tt("$__validUrl",1),icon:"check",onClick:function(){return E(v.current.value)}}),d&&i.a.createElement("div",{className:t.loader},i.a.createElement(Ot,null)),n.feed&&n.feed.length>0&&i.a.createElement("ul",{className:t.preview},i.a.createElement("div",{className:t.previewTitle},tt("$__preview",1)),n.feed.map((function(e,r){return i.a.createElement("li",{key:r},e&&e.title&&i.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.title},className:t.feedTitle}),i.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.contentSnippet},className:t.feedContent}),i.a.createElement("div",{className:t.feedFooter},i.a.createElement("div",{className:t.feedDate},Be()(e.pubDate).format("DD/MM/YYYY HH:MM")),i.a.createElement("div",{className:t.feedLink},i.a.createElement("a",{href:e.link,target:"_blank"},tt("$__openLink","*")))))})))))}));var Ps=Object(Fe.b)((function(e){return{sideModule:e.sideModule}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(ec)((function(e){var t=Ce.getState(),r=t.sideModule,n=t.db,a=t.session,o=i.a.useState(!1),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.a.useState(!1),d=Object(Ae.a)(u,2),p=d[0],m=d[1];if(i.a.useEffect((function(){return r.id&&(p||"timeline"!==r.activeModule||(m(!0),s(!1))),function(){}}),[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 g=e.classes,v=r.data,y=window.location.hash.split("/");y[0]=y[0].replace("#","");var b=ft(),x=ea(r.id),_=[{name:"userEdit",icon:"notes",title:"$__userEdit",reqId:!1,module:kc,closeOption:!1,permission:0},{name:"feedEdit",icon:"rss_feed",title:"$__feedEdit",reqId:!1,module:Ts,closeOption:!1,permission:3,template:!0},{name:"link",icon:"link",title:"$__link",reqId:!1,module:Ds,permission:3,closeOption:!1,hide:!0,template:!0},{name:"timeline",icon:"timeline",title:"$__timeline",reqId:!0,module:dc,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:dc,props:{type:"log",nodeId:r.id,db:"cards",loadTimeline:!0,noSearch:!0,disabledSend:!0},closeOption:!0,permission:3,count:"log"},{name:"checklist",icon:"checklist",title:"$__taskList",reqId:!0,module:To,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:El,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:Bl,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:zl,closeOption:!0,permission:3,props:{nodeId:r.id,db:r.db}},{name:"access",icon:a._id===v._id?"vpn_key":"security",title:a._id===v._id?"$__changePassword":"$__access",reqId:!0,module:Tc,closeOption:!1,permission:a._id===v._id?0:4}].concat(Object(f.a)(a._id===v._id?[{name:"twoFactor",icon:"pin",title:"$__twoFactorAuthenticator",reqId:!0,module:Ac,closeOption:!1,permission:a._id===v._id?0:6,ownerLock:!0},{name:"mobile",icon:"phone_iphone",title:"$__mobile",reqId:!0,module:Hc,closeOption:!1,permission:a._id===v._id?0:6,ownerLock:!0}]:[]),[{name:"resume",icon:"blur_on",title:"$__resume",resume:!0,reqId:!0,module:ml,closeOption:!0,permission:2,template:!0},{name:"cardEdit",icon:"subject",title:"$__edition",reqId:!1,module:cl,closeOption:!1,permission:1,buttonsCount:3,template:!0},{name:"users",icon:"supervised_user_circle",title:"$__users",reqId:!0,module:js,closeOption:!0,permission:3,template:!0}],Object(f.a)(a&&a._id!==v._id?[{name:"delete",icon:"delete_sweep",title:"$__delete",reqId:!0,module:jl,closeOption:!0,permission:5,template:!0}]:[]),Object(f.a)(x>=4||x&&x<4&&v.kpi_type&&"task"!==v.kpi_type||b&&b.plan&&b.planAdmin?[{name:"kpi",icon:"analytics",title:"$__kpi",reqId:!0,module:fl,closeOption:!1,permission:3,count:"kpi"}]:[]),[{name:"timeLog",icon:"timer",title:"$__timerLog",reqId:!0,module:ms,closeOption:!0,permission:0,count:"timer"},{name:"sendTo",icon:"share",title:"$__sendTo",reqId:!0,module:Hl,closeOption:!0,permission:3,template:!0}],Object(f.a)("client"===v.type||"group"===v.type||"unity"===v.type?[{name:"settings",icon:"admin_panel_settings",title:"$__settings",reqId:!0,module:$c,closeOption:!1,permission:1,template:!0}]:[]),Object(f.a)("user"===v.type&&a._id===v._id?[{name:"settings",icon:"admin_panel_settings",title:"$__settings",reqId:!0,module:Pc,closeOption:!1,permission:1,template:!0}]:"user"!==v.type?[{name:"settings",icon:"settings",title:"$__settings",reqId:!0,module:xl,closeOption:!1,permission:5,template:!0}]:[])),w=_.filter((function(e){return e.name===r.activeModule}))[0];if(!w||!w.module)return null;var E=function(t){l?it({message:tt("$__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)))},O=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];l||t?it({message:tt("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE"),s(!1)}}):(e.reduxFunction("ASYNC","CLEAR_MODULE"),s(!1))},j=!(!r||!("new"===r.id||("user"===v.type||"client"===v.type)&&b&&b.user&&(b.userAdmin||b.userModerate)||"user"!==v.type&&"client"!==v.type&&"chatGroup"!==v.type&&b&&(b.owner||b.plan&&(b.planAdmin||b.planModerate))||"chatGroup"===v.type&&(!v.client||v.client&&n.users[v.client])&&b&&(b.owner||b.plan&&(b.planAdmin||b.planModerate)))),k=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t===r)return!1;if(!t)return!1;var n=!1,a=Ce.getState().db.cards[t]?Ce.getState().db.cards[t]:null;return!!a&&(a&&a.isTemplate?n=!0:a&&a._planId&&a._planId!==a._id&&Ce.getState().db.cards[a._planId]?n=e(a._planId,r||t):a&&a._parent&&Ce.getState().db.cards[a._parent]&&(n=e(a._parent,r||t)),n)}(v._id),S=(r.data.type?n.dataType.filter((function(e){return e.name===r.data.type}))[0]:[]).modules;return r&&r.id?i.a.createElement("div",{className:g.lock},i.a.createElement("div",{className:g.backdrop,onClick:function(e){e.stopPropagation(),O()}}),i.a.createElement("div",{className:a.sideModuleWindow&&"popup"===a.sideModuleWindow?g.modulePopup:a.sideModuleWindow&&"expanded"===a.sideModuleWindow?g.moduleExpanded:a.sideModuleWindow&&"fullScreen"===a.sideModuleWindow?g.moduleFullScreen:g.module,id:"sideModule"},i.a.createElement("div",{className:g.menu,style:{backgroundColor:at("menu"),borderRight:"solid 3px ".concat(at("line"))},id:"sideModule_menu"},i.a.createElement("div",{className:g.menuButtons_resume}),S.map((function(e,t){var n=_.filter((function(t){return t.name.trim()===e.trim()&&!t.resume&&!t.hide}))[0];if(n&&(("user"===v.type||"client"===v.type)&&(b&&b.user&&(b.userAdmin||b.userModerate&&n.permission<=4||b.userEdit&&n.permission<=3)||v._id===a._id&&n.permission<=3)||"user"!==v.type&&"client"!==v.type&&"account"!==v.type&&b&&b.plan&&(b.planAdmin||b.planModerate&&n.permission<=4)||("user"!==v.type||"client"!==v.type||"account"!==v.type)&&x&&String(x)&&parseInt(x)>=parseInt(n.permission))){if(n.ownerLock&&b&&!b.owner&&v._access&&v._access.owner&&a._id!==v._id)return null;if((!k||r.data&&k&&n.template)&&(n&&!n.reqId||n&&(n.reqId||!n.reqId)&&36===r.id.length)){if("recurrence"===n.name&&Object.keys(Ce.getState().db.cards).filter((function(e){if(!Ce.getState().db.cards[e].deleted&&!Ce.getState().db.cards[e].checklist&&Ce.getState().db.cards[e]._recurrenceId&&Ce.getState().db.cards[e]._recurrenceId===r.data._id)return!0})).length>0)return i.a.createElement(Wc,{key:t,icon:n.icon,module:n.name,title:tt(n.title,1),count:n.count?n.count:null,openModule:function(e){E(e)}});if("recurrence"!==n.name)return i.a.createElement(Wc,{key:t,icon:n.icon,module:n.name,title:tt(n.title,1),count:n.count?n.count:null,openModule:function(e){E(e)}})}}}))),i.a.createElement("div",{id:"sideModule_header"},i.a.createElement(hi,{title:r&&r.data&&r.data.name||"".concat(tt("$__create")," ").concat(tt("$__".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:at("menu")}),w.closeOption&&i.a.createElement(Qi,{close:function(){return O()}})),i.a.createElement("div",{className:g.content},i.a.createElement(Pt,null,i.a.createElement(w.module,Object.assign({},w.props,{permission:j,onClose:function(e){O(e)},reqSave:function(e){s(e)}})))),i.a.createElement("div",{className:g.subTitle,id:"sideModule_subTitle",style:Object(h.a)(Object(h.a)({},r&&r.data&&r.data.private?{background:"gray"}:{}),{},{display:"flex",justifyContent:"space-between"})},tt(w.title.toLowerCase(),1),r&&r.data&&r.data.private?i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},tt("$__isPrivate","*"),i.a.createElement(xt,{icon:"lock",color:"#FFFFFF",size:20,style:{marginLeft:7}})):i.a.createElement(i.a.Fragment,null)))):null}))),zs=r(925),$s=r.n(zs),Ms=Object(We.a)({root:{"& .MuiPaper-root":{overflow:"visible"}}})(mi.a);function Bs(){Bs=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Ys=function(e,t){var r=Ce.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)({},Ce.getState().db),{},{tag:Object(f.a)(r)}))},Gs=function(){var e=Object(Ne.a)(Bs().mark((function e(t,r){return Bs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Ze.delete("/tag/unique/".concat(r._id),Object(h.a)({},r))&&Rs(t,r);case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Rs=function(e,t){var r=[];Ce.getState().db.tag.map((function(e){e.value!==t._id&&r.push(e)})),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{tag:r}))},Hs=function(){var e=Object(Ne.a)(Bs().mark((function e(t,r){return Bs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Ze.put("/tag/unlink/",Object(h.a)({},r))&&Ws(t,r);case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Ws=function(e,t){var r=[],n=Ce.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}))},Us=function(e){return Object(h.a)(Object(h.a)({},Ut),{},{menu:{position:"relative",borderRight:at("color")},menuExpanded:{position:"relative",borderRight:at("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:at("color")},buttonColorExpanded:{position:"relative",float:"left",width:"calc(100% + 20px)",padding:"12px 12px 12px 20px",marginLeft:"-12px",display:"flex",backgroundColor:at("color")},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(at("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"}})};r(1378);function Vs(){Vs=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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(Fe.b)((function(e){return{tag:e.db.tag}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Object(_t.a)(Us)(),r=Ce.getState(),n=r.db,a=r.session,o=e.tag,c=i.a.useState(!1),l=Object(Ae.a)(c,2),u=l[0],d=l[1],p=i.a.useState(null),m=Object(Ae.a)(p,2),g=m[0],v=m[1],y=i.a.useState(!1),b=Object(Ae.a)(y,2),x=b[0],_=b[1],w=i.a.useState(!1),E=Object(Ae.a)(w,2),O=E[0],j=E[1],k=i.a.useState(!1),S=Object(Ae.a)(k,2),L=S[0],C=S[1],I=i.a.useState({}),F=Object(Ae.a)(I,2),T=F[0],N=F[1],A=i.a.useState(!1),D=Object(Ae.a)(A,2),P=D[0],z=D[1],$=i.a.useState(null),M=Object(Ae.a)($,2),B=M[0],Y=M[1],G=i.a.useState([]),R=Object(Ae.a)(G,2),H=R[0],W=R[1];i.a.useEffect((function(){return console.log("61TAGSSSSSSSSSSSSS"),u||(d(!0),V(),e.onLoad&&e.onLoad()),function(){}}),[]),i.a.useEffect((function(){return V(),function(){}}),[B,JSON.stringify(e.tag)]);var U=ft(),V=function(){var e=[];o.filter((function(e){var t=B?ut(B.toLowerCase().trim()):"",r=ut(e.label.toLowerCase().trim());if(!B||B&&r.indexOf(t)>-1)return!0})).sort((function(e,t){return ut(e.label.toLowerCase().trim())<ut(t.label.toLowerCase().trim())?-1:ut(e.label.toLowerCase().trim())>ut(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>parseInt(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:parseInt(r._count),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>parseInt(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:parseInt(r._countOthers),(L||!L&&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))})),W(e)},q=function(){N({}),z(!1),j(!1)},X=function(e){j(!0),N(e||{})},K=function(){var t=Object(Ne.a)(Vs().mark((function t(){var r;return Vs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(z(!0),!T.value){t.next=15;break}return t.prev=2,t.next=5,Ze.put("tag/update",{_id:T.value,name:T.name?T.name:T.label,color:T.newColor?T.newColor:T.color?T.color:null});case 5:t.sent&&(Ys(e,{value:T.value,label:T.name?T.name:T.label,color:T.newColor?T.newColor:T.color},!0),z(!1),q()),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(2),console.log(t.t0),z(!1);case 13:t.next=26;break;case 15:return t.prev=15,t.next=18,Ze.post("tag/add",{name:T.name,color:T.newColor?T.newColor:T.color?T.color:null});case 18:(r=t.sent)&&r.data&&(C(!0),Ys(e,r.data,!0),z(!1),q()),t.next=26;break;case 22:t.prev=22,t.t1=t.catch(15),console.log(t.t1),z(!1);case 26:case"end":return t.stop()}}),t,null,[[2,9],[15,22]])})));return function(){return t.apply(this,arguments)}}(),J=function(){var t=Object(Ne.a)(Vs().mark((function t(r){return Vs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:it({message:tt("$__confirmDeleteTag",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Gs(e,{_id:r.value})}});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Z=function(){var t=Object(Ne.a)(Vs().mark((function t(r){return Vs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:it({message:tt("$__confirmUnlinkTag",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Hs(e,{_id:r.value})}});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return i.a.createElement("div",{onMouseLeave:function(){x||setTimeout((function(){v(null)}),1e3)}},i.a.createElement("div",{className:t.menu},i.a.createElement("div",{style:{marginTop:"5px"}},i.a.createElement(_a,{title:tt("$__tags",1),icon:"bookmarks",iconTitle:tt("$__tags",1),color:at("color"),fontSize:"16px",moreButton:!0,options:[{name:"$__addTag",icon:"add_box",color:at("color"),show:"hover",onClick:function(){X()}},U&&U.plan&&U.planAdmin&&!L&&{name:"$__showAllTags",icon:"style",color:at("color"),show:"hover",onClick:function(){C(!0)}},L&&{name:"$__onlyMyTags",icon:"loyalty",color:at("color"),show:"hover",onClick:function(){C(!1)}}],optionsProps:{transparent:!0}})),i.a.createElement("div",{className:t.separator}),i.a.createElement("div",null,i.a.createElement(ya,{label:tt("$__search",1),variant:at("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:B?i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"cancel",color:"green",onClick:function(){return Y(null)}})):null,onChange:function(e){Y(e.target.value)}},placeholder:tt("$__nameOfTagSearch_placeholder",1)}))),i.a.createElement("div",{style:{position:"absolute",top:"112px",bottom:0,overflow:"auto",padding:"3px",paddingTop:"7px",listStyle:"none",width:"100%"}},i.a.createElement($s.a,{collapse:"ALL",items:H,renderItem:function(e){return e.item.value?i.a.createElement("div",{style:{width:"100%",cursor:"pointer",display:"flex"},onMouseOver:function(){U&&U.plan&&U.planAdmin&&v(e.item.value)}},i.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,s.push("tags#".concat(t.value))}},e.item.text," ",e.item._count?"(".concat(e.item._count,")"):""),g&&e.item.value===g&&i.a.createElement("div",{style:{zIndex:1}},i.a.createElement(gn,{horizontalButton:!0,transparent:!0,size:"14px",btColor:at("color"),onOpen:function(){_(!0)},onClose:function(){_(!1)},options:[].concat(Object(f.a)(U&&U.plan&&U.planAdmin?[{name:"$__edit",icon:"edit",onClick:function(){X(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(){J(e.item)}},parseInt(e.item._count)>0&&parseInt(e.item._countOthers)>0&&{name:"$__unlinkMyActivities",icon:"label_off",onClick:function(){Z(e.item)}}])}))):i.a.createElement("div",{style:{fontWeight:"bold",color:at("color"),fontSize:"12px"}},e.item.text)},onChange:function(e){}})),i.a.createElement(Ms,{fullWidth:!0,"aria-labelledby":"simple-dialog-title",open:O,style:{overflow:"visible !important"}},i.a.createElement("div",{style:{position:"relative",marginLeft:"10px",marginTop:"5px",width:"calc(100% - 10px)"}},i.a.createElement(_a,{title:T.value?tt("$__editTag",1):tt("$__newTag",1),icon:"label",onCancel:function(){j(!1)}})),i.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."),i.a.createElement("div",{style:{padding:"15px"}},i.a.createElement(ya,{error:!(!T||T.label&&0!==T.label.length),helperText:"Campo de nome da etiqueta deve ter o compimento m\xednimo de 1 caractere",label:tt("$__name",1),variant:at("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){N(Object(h.a)(Object(h.a)({},T),{},{name:e.target.value}))}},defaultValue:T&&T.label?T.label:null,placeholder:tt("$__nameOfTag_placeholder",1)})),i.a.createElement("div",{style:{display:"flex",padding:"15px",overflow:"visible"}},i.a.createElement("span",{style:{marginRight:"7px"}},tt("$__tagColor"),":"),i.a.createElement(un,{disablePortal:!0,color:T.color,onChange:function(e){N(Object(h.a)(Object(h.a)({},T),{},{newColor:e}))}},T.color||T.newColor?i.a.createElement("div",{className:"tag",style:{backgroundColor:T.newColor?T.newColor:T.color,width:"22px",height:"22px",borderRadius:"50%",cursor:"pointer"}}):i.a.createElement("div",{className:"tag",style:{fontWeight:"bold"}},tt("$__clickHereToAddColor")))),i.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},i.a.createElement(Ct,{shadow:!0,title:tt("$__cancel"),text:tt("$__cancel"),color:"lightgrey",icon:"close",size:"25px",onClick:function(){j(!1)}}),T&&(T.name||T.newColor)&&i.a.createElement("div",{style:{marginLeft:"15px"}},i.a.createElement(Ct,{shadow:!0,title:tt("$__save"),text:tt("$__save"),icon:"save",size:"25px",load:!!P,onClick:function(){K()}})))))}));var Xs=Object(Fe.b)((function(e,t){return{timeline:e.timeline}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=yo();return document.title="".concat(t&&t.total>0?"(".concat(t.total,") "):"","MACHEN"),i.a.createElement(i.a.Fragment,null,i.a.createElement(St.a,{badgeContent:t&&t.total?t.total:0,color:"secondary",overlap:"rectangular"},e.children))})),Ks=r(1574),Js=r(1600),Zs=r(1575),Qs=r(1571),eu={disabled:{"&:before":{borderColor:"transparent !important"}},underline:{"&:hover:not($disabled):before,&:before":{borderColor:Qt[4]+"!important",borderWidth:"1px !important"},"&:after":{borderColor:Vt[0]},"& + p":{fontWeight:"300"}},underlineError:{"&:after":{borderColor:Xt[0]}},underlineSuccess:{"&:after":{borderColor:Kt[0]}},labelRoot:Object(h.a)(Object(h.a)({},Ut),{},{color:Qt[3]+" !important",fontWeight:"400",fontSize:"12px",lineHeight:"1.42857",top:"10px",letterSpacing:"unset","& + $underline":{marginTop:"0px"}}),labelRootError:{color:Xt[0]+" !important"},labelRootSuccess:{color:Kt[0]+" !important"},formControl:{margin:"0 0 16px 0",paddingTop:"27px",position:"relative",verticalAlign:"unset","& svg,& .fab,& .far,& .fal,& .fas,& .material-icons":{color:Qt[14]}},whiteUnderline:{"&:hover:not($disabled):before,&:before":{backgroundColor:"#FFF"},"&:after":{backgroundColor:"#FFF"}},input:{color:Qt[14],height:"unset","&,&::placeholder":{fontSize:"12px",fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif',fontWeight:"400",lineHeight:"1.42857",opacity:"1"},"&::placeholder":{color:Qt[3]}},whiteInput:{"&,&::placeholder":{color:"#FFF",opacity:"1"}}},tu=Object(_t.a)(eu);function ru(e){var t,r,n,a,o,c=tu(),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,v=e.helperText,y=$e()((t={},Object(O.a)(t," "+c.labelRootError,f),Object(O.a)(t," "+c.labelRootSuccess,g&&!f),t)),b=$e()((r={},Object(O.a)(r,c.underlineError,f),Object(O.a)(r,c.underlineSuccess,g&&!f),Object(O.a)(r,c.underline,!0),Object(O.a)(r,c.whiteUnderline,h),r)),x=$e()(Object(O.a)({},m,void 0!==m)),_=$e()((n={},Object(O.a)(n,c.input,!0),Object(O.a)(n,c.whiteInput,h),n));o=void 0!==l?$e()(l.className,c.formControl):c.formControl;var w=$e()((a={},Object(O.a)(a,c.labelRootError,f),Object(O.a)(a,c.labelRootSuccess,g&&!f),a));return i.a.createElement(Ks.a,Object.assign({},l,{className:o}),void 0!==s?i.a.createElement(Js.a,Object.assign({className:c.labelRoot+" "+y,htmlFor:u},d),s):null,i.a.createElement(Qs.a,Object.assign({classes:{input:_,root:x,disabled:c.disabled,underline:b},id:u},p)),void 0!==v?i.a.createElement(Zs.a,{id:u+"-text",className:w},v):null)}var nu={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"+Qt[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"+Qt[8]}},au=["className","children","plain","profile","pricing","testimonial","stats","chart","product"],ou=Object(_t.a)(nu);function iu(e){var t,r=ou(),n=e.className,a=e.children,o=e.plain,c=e.profile,l=e.pricing,s=e.testimonial,u=e.stats,d=e.chart,p=e.product,f=Object(Yt.a)(e,au),h=$e()((t={},Object(O.a)(t,r.cardFooter,!0),Object(O.a)(t,r.cardFooterPlain,o),Object(O.a)(t,r.cardFooterProfile,c||s),Object(O.a)(t,r.cardFooterPricing,l),Object(O.a)(t,r.cardFooterTestimonial,s),Object(O.a)(t,r.cardFooterStats,u),Object(O.a)(t,r.cardFooterChart,d||p),Object(O.a)(t,n,void 0!==n),t));return i.a.createElement("div",Object.assign({className:h},f),a)}var cu=function(e){return{container:Object(h.a)(Object(h.a)({},Wt),{},Object(O.a)({zIndex:"4"},e.breakpoints.down("sm"),{paddingBottom:"100px"})),cardTitle:Object(h.a)(Object(h.a)({},mr),{},{color:"#FFF"}),textCenter:{textAlign:"center"},justifyContentCenter:{justifyContent:"center !important"},customButtonClass:{"&,&:focus,&:hover":{color:"#FFF"},marginLeft:"5px",marginRight:"5px"},inputAdornment:{marginRight:"18px"},inputAdornmentIcon:{color:Qt[6]},cardHidden:{opacity:"0",transform:"translate3d(0, -60px, 0)"},cardHeader:{marginBottom:"20px"},socialLine:{padding:"0.9375rem 0"}}};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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 su=Object(_t.a)(cu);var uu=r(1693),du=r(1678),pu=r(1685),fu=Object(_t.a)((function(e){return{backdrop:{zIndex:e.zIndex.drawer+1,color:at("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 hu(e){var t=fu(),r=i.a.useState(!1),n=Object(Ae.a)(r,2),a=n[0],o=n[1],c=i.a.useState("add_photo_alternate"),l=Object(Ae.a)(c,2),s=l[0],u=l[1];return i.a.createElement(i.a.Fragment,null,a?i.a.createElement(Re.a,{className:t.backdrop,open:a,onClick:function(){return o(!1)}},i.a.createElement("div",{className:t.box},vu&&Object.keys(vu).map((function(r,n){return i.a.createElement("div",{key:n,className:t.list},i.a.createElement("div",{className:t.title},r),i.a.createElement("div",{className:t.iconList},vu[r]&&vu[r].map((function(r,n){return i.a.createElement("div",{key:n,className:t.icon},i.a.createElement(xt,{icon:r,size:"30px",color:at("color"),onClick:function(){u(r),o(!1),e.callBack&&e.callBack(r)}}))}))))})))):i.a.createElement(xt,{icon:s,size:"30px",onClick:function(){return o(!0)}}))}var mu,gu,vu={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 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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 bu=Ge.default.div(mu||(mu=Object(Te.a)(["\n background-color:none;\n\n "]))),xu=Ge.default.div(gu||(gu=Object(Te.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 "]))),_u=Object(Fe.b)((function(e){return{store:e}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=i.a.useState(null),r=Object(Ae.a)(t,2),n=r[0],a=r[1],o=i.a.useState(""),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.a.useState(""),d=Object(Ae.a)(u,2),p=d[0],f=d[1],m=i.a.useState({}),g=Object(Ae.a)(m,2),v=g[0],y=g[1],b=i.a.useState({open:!1,name:""}),x=Object(Ae.a)(b,2),_=x[0],w=x[1],E=Ce.getState().db,j=Ce.getState().functions.socket,k=function(){var e=Object(Ne.a)(yu().mark((function e(t){var r,n,a,o,i,c;return yu().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),Ze.put("column/reorder",{columns:o}),c={_parent:"boardModels",_board:i,_order:o},j.emit("column.REORDER",c),e.abrupt("return");case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),S=function(){var e=Object(Ne.a)(yu().mark((function e(t){var r,o,i,c;return yu().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,Ze.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,Ze.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},j.emit("column.UPD",c),y(!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)}}(),L=function(){var e=Object(Ne.a)(yu().mark((function e(t,r){var n,a;return yu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Ce.getState().functions.socket,e.prev=1,e.next=4,Ze.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)}}(),C=function(){var t=Object(Ne.a)(yu().mark((function t(){var r;return yu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Ze.post("boards/add",{name:_.name});case 3:r=t.sent,e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},{boardModels:Object(h.a)(Object(h.a)({},Ce.getState().db.cards.boardModels),{},{boards:Object(h.a)(Object(h.a)({},Ce.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 i.a.createElement(oi,null,E.cards&&E.cards.boardModels&&E.cards.boardModels.boards&&Object.keys(E.cards.boardModels.boards).map((function(t){return i.a.createElement(Oo.a,{onDragEnd:k,key:t},i.a.createElement(li,{md:3},i.a.createElement("fieldset",{style:{width:"100%"}},i.a.createElement("legend",null,E.cards.boardModels.boards[t].name),i.a.createElement(Oo.c,{droppableId:t,type:"column",direction:"vertical"},(function(r,n){return i.a.createElement(bu,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 i.a.createElement(Oo.b,{draggableId:e,index:r,key:"".concat(e,"-").concat(r)},(function(r){return i.a.createElement(xu,Object.assign({},r,{ref:r.innerRef},r.draggableProps,{isDragging:n.isDragging},r.dragHandleProps),E.cards.boardModels.boards[t].columns[e].name&&i.a.createElement(hi,{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(){L(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),y(Object(O.a)({},t,{open:!0}))},show:"hover"}]}))}))})),v&&v[t]&&v[t].open?i.a.createElement(i.a.Fragment,null,i.a.createElement(xu,null,i.a.createElement("div",{style:{position:"relative",float:"left",width:"40px",height:"auto",display:"flex",justifyContent:"center",alignItems:"center"}},i.a.createElement(hu,{callBack:function(e){f(e)}})),i.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(100% - 40px)"}},i.a.createElement(ya,{label:tt("$__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&&S(t)}},value:l,placeholder:tt("$__name",1),styles:{marginBotton:"0px !important"},autoFocus:!0}))),i.a.createElement("div",{style:{display:"inline-flex",alignItems:"center",width:"100%",justifyContent:"center"}},i.a.createElement(Xr,{icon:"save",text:tt("$__save","*"),onClick:function(){S(t)}}),i.a.createElement(Xr,{icon:tt("$__cancel","*"),iconColor:"red",text:tt("$__cancel","*"),onClick:function(){s(""),y({})}}))):i.a.createElement(Xr,{icon:"add_box",text:tt("$__addColumn",1),onClick:function(){y(Object(O.a)({},t,{open:!0}))}}),r.placeholder)})))))})),i.a.createElement("div",null,_.open?i.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(100% - 40px)"}},i.a.createElement(ya,{label:tt("$__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&&C()}},value:_&&_.name,placeholder:tt("$__name",1),styles:{marginBotton:"0px !important"},autoFocus:!0}),i.a.createElement("div",{style:{display:"inline-flex",alignItems:"center",width:"100%",justifyContent:"center"}},i.a.createElement(Xr,{icon:"save",text:tt("$__save","*"),onClick:function(){C()}}),i.a.createElement(Xr,{icon:"cancel",iconColor:"red",text:tt("$__cancel","*"),onClick:function(){s(""),w({open:!1,name:""})}}))):i.a.createElement(Xr,{icon:"add_box",text:tt("$__addBoard",1),onClick:function(){w(Object(h.a)(Object(h.a)({},_),{},{open:!0}))}})))})),wu=r(1688),Eu=function(e){return{root:Object(h.a)(Object(h.a)({},Ut),{},{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:at("dark"),color:at("light")},column:{padding:"7px 15px",fontWeight:"bold",borderRight:"solid 1px ".concat(at("light",.4)),width:"300px"},column2:{padding:"7px 15px",fontWeight:"bold",borderRight:"solid 1px ".concat(at("light",.4)),width:"calc(100% - 300px)"},body:{color:at("medium"),position:"relative",clear:"both",display:"flex",alignItems:"center",borderBottom:"solid 1px ".concat(at("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(at("medium",.2))}}},chip:{margin:"3px"}}};function Ou(){Ou=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 ju=Object(Fe.b)((function(e){return{languages:e.languages}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Eu)((function(e){var t=e.classes,r=Ce.getState(),n=r.languages,a=r.db,o=Ce.getState().functions.socket,c=i.a.useState(!1),l=Object(Ae.a)(c,2),s=l[0],d=l[1],p=i.a.useState(0),f=Object(Ae.a)(p,2),h=f[0],m=f[1],g=i.a.useState(25),v=Object(Ae.a)(g,2),y=v[0],b=v[1],x=i.a.useState(""),_=Object(Ae.a)(x,2),w=_[0],E=_[1],O=function(){var e=Object(Ne.a)(Ou().mark((function e(t,r,n,a){return Ou().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t?o.emit("language.UPD",{alias:r,locale:n,text:a}):o.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,i.a.createElement("div",{style:{width:"100%"}},i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},tt("$__page")," ",h+1," ",tt("$__of")," ",Math.ceil(Object.keys(n).length/y),i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},i.a.createElement(wu.a,{component:"div",count:Object.keys(n).length,page:h,onChangePage:function(e,t){m(t)},rowsPerPage:y,onChangeRowsPerPage:function(e){b(parseInt(e.target.value,10))},labelRowsPerPage:tt("$__cardsPerPage")}))),i.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center"}},i.a.createElement(ya,{label:tt("$__search",1),variant:at("fieldVariant"),value:w,onChange:function(e){E(e.target.value)}}),i.a.createElement(Xr,{text:tt("$__showOnlyEmpty","*"),icon:s?"subtitles_off":"subtitles",iconColor:at("medium"),onClick:function(){d(!s)}})),i.a.createElement(cn.a,{className:t.root},i.a.createElement("div",{className:t.header},i.a.createElement("div",{className:t.column},tt("alias",1)),i.a.createElement("div",{className:t.column},"Portugues"),i.a.createElement("div",{className:t.column},"Ingles")),i.a.createElement("div",{className:t.body},i.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))&&(s&&n[e]&&(!n[e].locales||!n[e].locales["pt-BR"]||!n[e].locales["pt-BR"].name)||!s))return!0})).sort((function(e,t){return e<u.b?-1:e>t?1:0})).map((function(e,r){if(r<=(h+1)*y&&r>=h*y)return i.a.createElement("li",{key:e.trim()},i.a.createElement("div",{className:t.column},e),i.a.createElement("div",{className:t.column},i.a.createElement("div",{style:{position:"relative"}},i.a.createElement(hi,{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:at("menu"),noAutoFocus:!0,multiline:!0}))),i.a.createElement("div",{className:t.column},i.a.createElement("div",{style:{position:"relative"}},i.a.createElement(hi,{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:at("menu"),noAutoFocus:!0,multiline:!0}))))}))))))}))),ku=function(e){Object(At.a)(r,e);var t=Object(Dt.a)(r);function r(e){var n;return Object(Tt.a)(this,r),(n=t.call(this,e)).change=function(e){n.setState({input:ct(e.target.value)})},n.state={input:""},n.start=0,n}return Object(Nt.a)(r,[{key:"render",value:function(){return i.a.createElement("div",null,i.a.createElement("input",Object.assign({type:"text",onBlur:this.blur,onChange:this.change,value:this.state.input,style:{fontSize:"22px",padding:"4px"}},this.props)),i.a.createElement("pre",{style:{color:"#999",height:"30px"}},lt(this.state.input)))}}]),r}(i.a.Component);var Su=Object(Fe.b)((function(){return{}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Eu)((function(e){e.classes;var t=Ce.getState(),r=!!(t.languages,t.db).myTasksMenuExpanded;return i.a.createElement("div",{style:r?{width:"calc(100% - 400x)",marginLeft:"388px"}:{width:"calc(100% - 138px)",marginLeft:"138px"}},i.a.createElement(ku,null))}))),Lu=["children","value","index"];function Cu(e){var t=e.children,r=e.value,n=e.index,a=Object(Yt.a)(e,Lu);return i.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&&i.a.createElement(uu.a,{p:3},t))}function Iu(e){return{id:"scrollable-strength-tab-".concat(e),"aria-controls":"scrollable-strength-tabpanel-".concat(e)}}var Fu=Object(_t.a)((function(e){return{root:{flexGrow:1,width:"100%",backgroundColor:e.palette.background.paper}}}));var Tu=Object(Fe.b)((function(e){return{history:e.db.history}}),(function(e){return Object(u.b)(n,e)}))((function(e){Fu();var t=Ce.getState().db,r=i.a.useState(0),n=Object(Ae.a)(r,2),a=n[0],o=n[1],c=i.a.useState(!1),l=Object(Ae.a)(c,2),u=l[0],d=l[1],p=i.a.useState(""),f=Object(Ae.a)(p,2),h=f[0],m=f[1];i.a.useEffect((function(){if(!u){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),String(e[0])&&o(Math.ceil(e[0])),d(!0)}}));var g=function(e){Ce.getState().functions.socket.emit("global",{fn:e})};return t.myTasksMenuExpanded,i.a.createElement("div",null,i.a.createElement($t.a,{position:"static",color:"default"},i.a.createElement(pu.a,{value:a,onChange:function(e,t){o(t),s.push("#".concat(t))},variant:"scrollable",scrollButtons:"on",indicatorColor:"primary",textColor:"primary","aria-label":""},i.a.createElement(du.a,Object.assign({label:"Data",icon:i.a.createElement(xt,{color:(at(0===a?"medium":"color"),1)},"Data")},Iu(0))),i.a.createElement(du.a,Object.assign({label:"Languages",icon:i.a.createElement(xt,{color:(at(1===a?"medium":"color"),1)},"translate")},Iu(1))),i.a.createElement(du.a,Object.assign({label:"Versions",icon:i.a.createElement(xt,{color:(at(2===a?"medium":"color"),1)},"app_registration")},Iu(2))))),i.a.createElement(Cu,{value:a,index:0},i.a.createElement("div",null,i.a.createElement(Su,null))),i.a.createElement(Cu,{value:a,index:1},i.a.createElement("div",null,i.a.createElement(ju,null))),i.a.createElement(Cu,{value:a,index:2},i.a.createElement("div",null,i.a.createElement("input",{type:"text",value:h,onChange:function(e){m(e.target.value)}}),i.a.createElement(gl,{style:{position:"relative",float:"left",margin:"3px"},color:"primary",onClick:function(){g("version")}},tt("$__send","*")),i.a.createElement(gl,{style:{position:"relative",float:"left",margin:"3px"},color:"primary",onClick:function(){g("logout")}},tt("$__logout","*")),i.a.createElement(gl,{style:{position:"relative",float:"left",margin:"3px"},color:"primary",onClick:function(){g("reload")}},tt("$__reload","*")))),i.a.createElement(Cu,{value:a,index:3},i.a.createElement("div",null,i.a.createElement(_u,null))),i.a.createElement(Cu,{value:a,index:4},tt("$__accounts",1)),i.a.createElement(Cu,{value:a,index:5},tt("$__users",1)),i.a.createElement(Cu,{value:a,index:6},tt("$__support",1)),i.a.createElement(Cu,{value:a,index:7},tt("$__finance",1)))}));var Nu=Object(Fe.b)((function(e){return{loaders:e.sessionLoads.cards.load}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(dl)((function(e){return i.a.createElement(i.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&&i.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"}},i.a.createElement("span",{style:{color:at("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},tt("$__loadingData")),i.a.createElement(so,null)))}))),Au=function(){return Object(h.a)(Object(h.a)({},yc),{},{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:at("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:at("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:at("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)({},Ut),{},{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)({},Ut),{},{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(at("light")," !important"),"&,&:hover,&:focus":{color:"inherit"}}),page:{position:"relative",color:at("line"),fontSize:"16px",textTransform:"uppercase",cursor:"pointer","& a":{color:"#FFFFFF"}},pageLink:{position:"relative",float:"left",color:at("light"),margin:"7px",fontSize:"14px",cursor:"pointer",userSelect:"none","&:hover":{fontWeight:"bold"},"& a":{color:"#FFFFFF"}},pageLinkActive:{color:at("line"),margin:"7px",fontSize:"14px",cursor:"pointer",userSelect:"none",fontWeight:"bold"},activeArrow:{position:"absolute",left:"calc(50% - 11px)",bottom:"-23px",transform:"rotate(-90deg)"}})},Du=Object(_t.a)(Au);var Pu=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Du(),r=Ce.getState(),n=r.session,a=r.search,o=r.db,c=i.a.useState(!1),l=Object(Ae.a)(c,2),s=(l[0],l[1],ft(),[]),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=o.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]&&Oh.filter((function(e){return e.path===p})).length>0&&Oh.filter((function(e){return e.path===p}))[0].tabs&&Oh.filter((function(e){return e.path===p}))[0].tabs.length>0?(Oh.filter((function(e){return e.path===p}))[0].tabs&&Oh.filter((function(e){return e.path===p}))[0].tabs).map((function(e){e.path===u[1]&&(s=e.searchFields)})):Oh.filter((function(e){return e.path===p})).length>0&&Oh.filter((function(e){return e.path===p}))[0].searchFields&&(s=Oh.filter((function(e){return e.path===p}))[0].searchFields),JSON.stringify(ie)===JSON.stringify(a)?i.a.createElement(i.a.Fragment,null):i.a.createElement("div",{style:{}},i.a.createElement(oi,null,i.a.createElement(li,{xs:12,sm:9,md:9,lg:9,xl:9},i.a.createElement("span",{style:{color:at("medium"),fontWeight:"bold",fontSize:"18px",display:"flex",alignItems:"center"}},i.a.createElement(xt,{size:"18px"},"search"),tt("$__appliedFilters"))),i.a.createElement(li,{xs:12,sm:3,md:3,lg:3,xl:3},i.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},i.a.createElement(Xr,{reverse:!0,icon:"clear_all",text:tt("$__clearFilter","*"),onClick:function(){e.reduxFunction("ASYNC","SEARCH_CLEAR")}}))),s&&s.indexOf("text")>-1&&a.text&&i.a.createElement(li,{xs:6,sm:4,md:2,lg:2,xl:2},i.a.createElement("div",{className:t.textField,style:{width:"100%"}},tt("$__text"),": ",a.text)),s&&s.indexOf("status")>-1&&JSON.stringify(a.cards.status)!==JSON.stringify(ie.cards.status)&&i.a.createElement(li,{xs:6,sm:4,md:2,lg:2,xl:2},i.a.createElement("div",{style:{color:at("color"),fontSize:"16px"}},i.a.createElement("div",{style:{position:"relative",float:"left"}},tt("$__status")),Object.keys(a.cards.status).map((function(e,t){if(a.cards.status[e]&&"all"!==e)return i.a.createElement(Ue.a,{title:tt(o.status.filter((function(t){return t.value===e}))[0].label,1),key:t},i.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:o.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(ie.cards.priority)&&i.a.createElement(li,{xs:6,sm:4,md:2,lg:2,xl:2},i.a.createElement("div",{style:{color:at("color"),fontSize:"16px"}},i.a.createElement("div",{style:{position:"relative",float:"left"}},tt("$__priority")),Object.keys(a.cards.priority).map((function(e,t){if(a.cards.priority[e]&&"all"!==e)return i.a.createElement(Ue.a,{title:tt(o.priority.filter((function(t){return String(t.value)===String(e)}))[0].label,1),key:t},i.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:o.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(ie.users)&&i.a.createElement(li,{xs:6,sm:4,md:2,lg:2,xl:2},i.a.createElement("div",{style:{color:at("color"),fontSize:"16px"}},tt("$__users"),i.a.createElement(Sa.a,{max:6},Object.keys(Ce.getState().search.users.selected).length>0&&Object.keys(Ce.getState().search.users.selected).map((function(e,t){return"unassigned"!==e&&Ce.getState().search.users.selected[e]?i.a.createElement(Ue.a,{title:o.users[e].name,key:t},i.a.createElement(Kr.a,{style:{width:"30px",height:"30px"},alt:o.users[e].name,src:o.users[e].image||null},o.users[e].name.substr(0,1))):"unassigned"===e&&Ce.getState().search.users.selected[e]&&i.a.createElement(Ue.a,{title:tt("$__unassigned",1),key:t},i.a.createElement(Kr.a,{style:{width:"30px",height:"30px"},alt:tt("$__unassigned",1),src:Zr.a},tt("$__unassigned",1)))}))))),s&&s.indexOf("units")>-1&&JSON.stringify(a.units)!==JSON.stringify(ie.units)&&Object.keys(o.users).filter((function(e){return"user"!==o.users[e].type})).length>0&&s.indexOf("units")>-1&&i.a.createElement(li,{xs:6,sm:4,md:2,lg:2,xl:2},i.a.createElement("div",{style:{color:at("color"),fontSize:"16px"}},tt("$__units"),i.a.createElement(Sa.a,{max:6},Object.keys(Ce.getState().search.units.selected).length>0&&Object.keys(Ce.getState().search.units.selected).map((function(e,t){return"unassigned"!==e&&Ce.getState().search.units.selected[e]?i.a.createElement(Ue.a,{title:o.users[e].name,key:t},i.a.createElement(Kr.a,{style:{width:"30px",height:"30px"},alt:o.users[e].name,src:o.users[e].image||null},o.users[e].name.substr(0,1))):"unassigned"===e&&Ce.getState().search.units.selected[e]&&i.a.createElement(Ue.a,{title:tt("$__unassigned",1),key:t},i.a.createElement(Kr.a,{style:{width:"30px",height:"30px"},alt:tt("$__unassigned",1),src:Zr.a},tt("$__unassigned",1)))}))))),Object.keys(o.cards).filter((function(e){return"plan"===o.cards[e].type})).length>0&&s&&s.indexOf("plans")>-1&&i.a.createElement(li,{xs:6,sm:4,md:2,lg:2,xl:2},i.a.createElement("div",{style:{color:at("color"),fontSize:"16px"}},tt("$__plans"),i.a.createElement(Sa.a,{max:6},Object.keys(Ce.getState().search.plans.selected).length>0&&Object.keys(Ce.getState().search.plans.selected).map((function(e,t){return"unassigned"!==e&&Ce.getState().search.plans.selected[e]?i.a.createElement(Ue.a,{title:o.cards[e].name,key:t},i.a.createElement(Kr.a,{style:{width:"30px",height:"30px"},alt:o.cards[e].name,src:o.cards[e].image||null},o.cards[e].name.substr(0,1))):"unassigned"===e&&Ce.getState().search.plans.selected[e]&&i.a.createElement(Ue.a,{title:tt("$__unassigned",1),key:t},i.a.createElement(Kr.a,{style:{width:"30px",height:"30px"},alt:tt("$__unassigned",1),src:Zr.a},tt("$__unassigned",1)))}))))),i.a.createElement(li,{xs:12,sm:12,md:12,lg:12,xl:12})))})),zu=function(e){return{card:{width:"calc(20% - 20px)",minWidth:"250px",maxWidth:"400px",margin:"10px",placeSelf:"flex-end"}}};function $u(){$u=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Mu=Object(Fe.b)((function(e,t){return{cards:e.db.cards,search:e.search}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(zu)((function(e){var t=Ce.getState(),r=t.db,n=t.search,a=t.session,o=i.a.useState(0),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.a.useState(21),d=Object(Ae.a)(u,2),p=d[0],f=(d[1],i.a.useState(!1)),m=Object(Ae.a)(f,2),g=m[0],v=m[1],y=i.a.useState(!1),b=Object(Ae.a)(y,2),x=b[0],_=b[1];i.a.useEffect((function(){return w(l,p),function(){}}),[]),i.a.useEffect((function(){g||x||w(l,p)}),[l,p]);var w=function(){var t=Object(Ne.a)($u().mark((function t(r,n){var a;return $u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v(!0),t.next=3,En(e,{cardLoad:"insights",limit:n,skip:r*n,ignoreLoader:!0});case 3:(a=t.sent)&&(v(!1),a.total<n&&_(!0));case 5:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),E=window.location.hash.split("/");E[0]=E[0].replace("#","");var O={};return O=(O=Object.keys(r.cards).filter((function(e){return"insight"===r.cards[e].type&&!r.cards[e].deleted&&r.cards[e]._users&&r.cards[e]._users[a._id]})).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&&(O=O.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}))),i.a.createElement("div",{id:"insightList",style:e.horizontal?{position:"relative",justifyContent:"space-between",margin:"auto",width:"100%"}:{position:"absolute",top:0,bottom:0,left:0,right:0,display:"flex",overflowY:"auto"},onScroll:e.horizontal?null:function(e){!function(e){var t=document.getElementById("insightList");t.scrollTop+window.innerHeight+150>t.scrollHeight&&s(l+1)}()}},i.a.createElement(oi,{style:Object(h.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},Object.keys(O).filter((function(t,r){return!e.max||e.max&&r<e.max})).map((function(e,t){return i.a.createElement(li,{key:O[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},i.a.createElement(ki,{db:"cards",data:O[e],expanded:!0,Avatar:!0,Resume:!0,showConnectedIn:!0,LoadParent:!0}))}))))}))),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 Yu=Object(Fe.b)((function(e){return{store:e}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Bu)((function(e){e.data;var t=e.classes;return i.a.createElement("div",{className:t.feed},i.a.createElement(Qo.a,{variant:"rect",animation:"wave",style:{borderRadius:0,paddingTop:"calc((9 / 16) * 100%)",width:"100%",borderTopRightRadius:22}}),i.a.createElement("div",{className:t.infos},i.a.createElement("div",{className:t.linkTitle},i.a.createElement(Qo.a,{variant:"rect",animation:"wave",style:{width:"100%",height:"12px",marginBottom:10}}),i.a.createElement(Qo.a,{variant:"rect",animation:"wave",style:{width:"100%",height:"12px",marginBottom:10}}),i.a.createElement(Qo.a,{variant:"rect",animation:"wave",style:{width:"100%",height:"12px",marginBottom:10}})),i.a.createElement("div",{className:t.linkContent},i.a.createElement(Qo.a,{variant:"rect",style:{marginTop:15,borderRadius:7,width:"100%",height:8,marginBottom:12}}),i.a.createElement(Qo.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8,marginBottom:12}}),i.a.createElement(Qo.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8,marginBottom:12}}),i.a.createElement(Qo.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8,marginBottom:12}})),i.a.createElement("div",{className:t.feedFooter},i.a.createElement("div",{className:t.feedDate,style:{width:"50%",height:"20px",display:"flex",alignItems:"center"}},i.a.createElement("div",{style:{width:"100%",height:"8px"}},i.a.createElement(Qo.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8}}))))))})));function Gu(){Gu=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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(Fe.b)((function(e,t){return{cards:e.cards,search:e.search}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState(),r=t.db,n=t.search,a=t.session,o=i.a.useState(0),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.a.useState(18),d=Object(Ae.a)(u,2),p=d[0],f=(d[1],i.a.useState(!1)),m=Object(Ae.a)(f,2),g=m[0],v=m[1],y=i.a.useState(!1),b=Object(Ae.a)(y,2),x=b[0],_=b[1],w=i.a.useState(0),E=Object(Ae.a)(w,2),O=(E[0],E[1]);i.a.useEffect((function(){return j(l,p),function(){}}),[]),i.a.useEffect((function(){g||x||j(l,p)}),[l,p]);var j=function(){var t=Object(Ne.a)(Gu().mark((function t(r,n){var a;return Gu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v(!0),t.next=3,En(e,{cardLoad:"links",limit:n,skip:r*n,ignoreLoader:!0});case 3:(a=t.sent)&&(v(!1),O(parseInt(a.total)),a.total<n&&_(!0));case 5:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),k=window.location.hash.split("/");k[0]=k[0].replace("#","");var S={};S=(S=Object.keys(r.cards).filter((function(e){return"link"===r.cards[e].type&&r.cards[e]._users&&r.cards[e]._users[a._id]&&!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&&(S=S.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return n.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e})));var L=function(){for(var e=[],t=0;t<p;t++)e.push(i.a.createElement(li,{xs:12,sm:6,md:4,lg:3,xl:2,key:"sk_".concat(t)},i.a.createElement(Yu,null)));return i.a.createElement(i.a.Fragment,null,e)};return i.a.createElement("div",{id:"linkList",style:e.horizontal?{position:"relative",justifyContent:"space-between",margin:"auto",width:"100%"}:{position:"absolute",top:0,bottom:0,left:0,right:0,display:"flex",overflowY:"auto"},onScroll:e.horizontal?null:function(e){!function(e){var t=document.getElementById("linkList");t.scrollTop+window.innerHeight+150>t.scrollHeight&&s(l+1)}()}},i.a.createElement(oi,{style:Object(h.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},i.a.createElement("div",null),Object.keys(S).filter((function(t,r){return!e.max||e.max&&r<e.max})).map((function(e,t){return i.a.createElement(li,{key:S[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},i.a.createElement(ki,{db:"cards",data:S[e],expanded:!0,Avatar:!0,Resume:!0,showConnectedIn:!0,LoadParent:!0}))})),g?i.a.createElement(L,null):i.a.createElement(i.a.Fragment,null)))})),Hu=r(926),Wu=r.n(Hu),Uu=r(666),Vu=r.n(Uu),qu=r(667),Xu=r.n(qu);var Ku=Object(Fe.b)((function(e){return{}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Bu)((function(e){var t=e.data,r=e.classes,n=i.a.useState(t.img),a=Object(Ae.a)(n,2),o=a[0],c=a[1],l=i.a.useState({backgroundSize:"contain"}),s=Object(Ae.a)(l,2),u=s[0],d=s[1];return i.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"})},i.a.createElement("div",{style:{display:"none"}},i.a.createElement("img",{src:o,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"}))}})),i.a.createElement("div",{className:r.image,style:Object(h.a)({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},o?Object(h.a)({backgroundImage:'url("'.concat(o,'")')},u):{background:at("AvatarBackground")}),onClick:function(){e.clickChannel||window.open(t.link,"_blank")}},!o&&i.a.createElement("div",{style:{marginTop:"calc(-48% - 10px)",display:"flex",justifyContent:"center",alignItems:"center"}},i.a.createElement(xt,{icon:U.a,size:"39px",color:"rgba(250,250,250,0.77)"})),!e.clickChannel&&i.a.createElement("div",{style:{position:"absolute",top:7,right:7}},i.a.createElement(Ct,{title:tt("$__sendToRadar","*"),color:at("menu"),icon:"settings_input_antenna",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},Ce.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"})),i.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,backgroundColor:"rgba(0,0,0,0.5)",padding:"3px 7px",color:"white",fontSize:11}},Be()(t.isoDate?t.isoDate:t.pubDate).format("DD/MM/YYYY HH:MM"))),i.a.createElement(Ve,{title:i.a.createElement(i.a.Fragment,null,!e.clickChannel&&i.a.createElement("a",{href:t.link,target:"_blank",rel:"noopener noreferrer",style:{fontSize:"14px",fontWeight:"bold"}},tt("$__clickHereToReadNews",1)))},i.a.createElement("div",{className:r.infos,onClick:function(){e.clickChannel||window.open(t.link,"_blank")}},i.a.createElement("div",{className:r.linkTitle},i.a.createElement("div",{dangerouslySetInnerHTML:{__html:t&&t.title&&Xu()(t.title)?t.title:t.title?Vu()(t.title):""}})),i.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.contentSnippet&&Xu()(t.contentSnippet)?t.contentSnippet:t.contentSnippet?Vu()(t.contentSnippet):""},className:r.linkContent}),i.a.createElement("div",{className:r.feedFooter},i.a.createElement("div",{className:r.feedLink},!e.clickChannel&&i.a.createElement("a",{href:t.link,target:"_blank",rel:"noopener noreferrer",style:{fontSize:"14px",fontWeight:"bold"}},tt("$__readMore",1)))))),i.a.createElement("div",{style:{top:-30}},i.a.createElement(pn,{options:e._tags})))})));var Ju=Object(We.a)(Bu)((function(e){var t=e.data,r=e.classes;return i.a.createElement("div",{className:r.feed,onClick:e.clickChannel?function(){return e.clickChannel()}:null},i.a.createElement("div",{className:r.image,style:{background:at("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},i.a.createElement("div",{style:{marginTop:"calc(-48% + 0px)",display:"flex",justifyContent:"center",alignItems:"center"}},i.a.createElement(xt,{icon:U.a,size:"47px",color:"rgba(250,250,250,0.77)"}))),i.a.createElement("div",{className:r.infos},i.a.createElement("div",{className:r.linkTitle},tt("$__attention")),i.a.createElement("div",{className:r.linkContent},tt("$__weHaveNotFoundYetLink")),i.a.createElement("div",{className:r.feedFooter},i.a.createElement("div",{className:r.feedDate},Be()(t.created_at&&t.created_at.low?t.created_at.low:t.created_at).format("DD/MM/YYYY HH:MM")))))}));function Zu(){Zu=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Qu=Object(Fe.b)((function(e){return{store:e}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Bu)((function(e){var t=Ce.getState(),r=t.db,n=t.session,a=e.data,o=ft(),c=window.location.hash.split("/");if(c[0]=c[0].replace("#",""),!a)return null;var l=function(){var t=Object(Ne.a)(Zu().mark((function t(o){var i,l;return Zu().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 Ce.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,Ze.put("/rel/update",{_id:i,customTitle:o});case 4:t.sent,l=Ce.getState().db.feeds,a._parent&&1===Object.keys(a._parent).length&&0===Object.keys(a._parent).filter((function(e){return Ce.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(O.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(O.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(Ne.a)(Zu().mark((function e(t){return Zu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:it({message:tt("$__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(Ne.a)(Zu().mark((function t(n){var o,i;return Zu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=n||c[0],t.next=3,Ze.delete("feed/unfollow/".concat(o,"__").concat(a._id));case 3:t.sent,(i=Object(h.a)({},Ce.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(Ne.a)(Zu().mark((function t(n){var o,i=arguments;return Zu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i.length>1&&void 0!==i[1]&&i[1],t.next=3,Ze.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(O.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)})),i.a.createElement("div",{style:{position:"relative",height:"auto",cursor:"pointer",width:"100%"}},i.a.createElement(_a,Object.assign({title:a.customTitle?a.customTitle:a.name,icon:"chrome_reader_mode",fontSize:"20px",onEdit:function(e,t){return l(e)},editable:!!(c[0]&&36===c[0].length&&o&&o.plan&&(o.planAdmin||o.planModerate)||a._parent&&1===Object.keys(a._parent).length&&0===Object.keys(a._parent).filter((function(e){return Ce.getState().db.cards[e]})).length),moreButton:!0},c[0]&&"tab"===c[0]&&o&&o.plan&&(o.planAdmin||o.planModerate)?Object(h.a)({},a._parent&&Object.keys(a._parent).length>0&&{options:[{name:a.hide?tt("$__folowRSS"):tt("$__hideRSS"),icon:a.hide?"visibility":"visibility_off",onClick:function(){p()}}].concat(Object(f.a)(o&&o.feed&&(o.feedAdmin||o.feedModerate)?[{name:tt("$__edit"),icon:"settings_suggest",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},Ce.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(f.a)(function(){if(e.data._parent){var t=[];return Object.keys(e.data._parent).map((function(a){if(Ce.getState().db.cards[a]&&Ce.getState().db.cards[a]._users&&Ce.getState().db.cards[a]._users[n._id]){var o=Ce.getState().db.cards[a];t=[].concat(Object(f.a)(t),[{name:o.name,icon:"view_comfy",render:i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{marginRight:"10px",width:"100%",display:"flex"}},i.a.createElement("div",{style:{width:"33px"}},i.a.createElement(Ur,{overlap:"rectangular",icon:o.type&&r&&r.dataType?r.dataType.filter((function(e){return e.name===o.type}))[0].icon:"topic",title:"$__".concat(o.type),size:"22px",color:at("menu")})),i.a.createElement("div",{style:{width:"calc(100% - 7px)",display:"flex",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}},o.name))),onClick:function(){s.push("sp#".concat(a,"/bright-and-connected"))}}])}else 1===Object.keys(e.data._parent).length&&(t=[].concat(Object(f.a)(t),[{name:tt("$__globalAccount"),icon:"rss_feed",render:i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{marginRight:"10px",width:"100%",display:"flex"}},i.a.createElement("div",{style:{width:"33px"}},i.a.createElement(Ur,{overlap:"rectangular",icon:"rss_feed",title:tt("$__globalAccount"),size:"22px",color:at("menu")})),i.a.createElement("div",{style:{width:"calc(100% - 7px)",display:"flex",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}},tt("$__globalAccount}")),i.a.createElement("div",{style:{width:"16px"}},i.a.createElement(Ur,{overlap:"rectangular",icon:"delete_forever",title:tt("$__delete"),size:"22px",color:"red",onClick:function(){u(a)}})))),onClick:function(){u(a)}}]))})),t}}()))}):o&&o.plan&&(o.planAdmin||o.planModerate)?{options:[{name:tt("$__deleteRSS"),icon:"delete_forever",onClick:function(){u()}}]}:{})),i.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=Wu.a.MD5(r.link);if(a&&0===t)return i.a.createElement(Ku,{key:n,data:r,_tags:a._tags,clickChannel:function(){s.push("".concat(window.location.pathname).concat(window.location.hash,"/").concat(a._id))}})})):i.a.createElement(Ju,{data:a,clickChannel:function(){s.push("".concat(window.location.pathname).concat(window.location.hash,"/").concat(a._id))}})))})));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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 td=Object(Fe.b)((function(e){return{}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=e.data,r=Ce.getState().db,n=i.a.useState(0),a=Object(Ae.a)(n,2),o=a[0],c=a[1],l=i.a.useState(0),s=Object(Ae.a)(l,2),u=s[0],d=s[1],p=i.a.useState(21),f=Object(Ae.a)(p,2),m=f[0],g=f[1],v=i.a.useState([]),y=Object(Ae.a)(v,2),b=y[0],x=y[1],_=i.a.useState([]),w=Object(Ae.a)(_,2),E=w[0],j=w[1],k=i.a.useState(0),S=Object(Ae.a)(k,2),L=(S[0],S[1]),C=i.a.useState(!0),I=Object(Ae.a)(C,2),F=I[0],T=I[1],N=i.a.useState(!1),A=Object(Ae.a)(N,2),D=A[0],P=A[1];i.a.useEffect((function(){var t=window.location.hash.split("/");return t[0]=t[0].replace("#",""),JSON.stringify(t)!==JSON.stringify(b)&&x(t),T(!0),e.max&&(L(e.max),g(e.max)),function(){}}),[]),i.a.useEffect((function(){b.length>0&&!D&&(z(o,m),b[2]&&36!==b[2].length&&T(!0),P(!0))}),[b]),i.a.useEffect((function(){u>Object.keys(E).length&&(T(!0),z(o,m))}),[o,m]),i.a.useEffect((function(){T(!1)}),[E]);var z=function(){var e=Object(Ne.a)(ed().mark((function e(t,r){var n,a;return ed().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0===u||u>Object.keys(E).length)){e.next=9;break}return T(!0),e.next=4,bn.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),j(a);case 9:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),$=function(){var n=Object(Ne.a)(ed().mark((function n(a){var o;return ed().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Ze.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(O.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(Ne.a)(ed().mark((function n(a){var o,i;return ed().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return window.history.back(),o=a.replace("#",""),n.next=4,Ze.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(O.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(i.a.createElement(li,{xs:12,sm:6,md:4,lg:3,xl:2,key:"sk_".concat(t)},i.a.createElement(Yu,null)));return i.a.createElement(i.a.Fragment,null,e)};return i.a.createElement("div",null,t&&(t.customTitle||t.name)&&i.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:33}},i.a.createElement("div",{style:{position:"relative",width:"100%",float:"left",marginBottom:"15px",display:"flex"}},i.a.createElement(Xr,{icon:"undo",text:tt("$__back","*"),onClick:function(){return window.history.back()}}),b[0]&&"bright-and-connected"===b[1]&&b[2]&&i.a.createElement(Xr,{icon:"delete_sweep",text:tt("$__removeChannel","*"),onClick:function(){it({message:tt("$__confirmRemoveChannel",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){M(b[0])}})}})),i.a.createElement(hi,{title:"".concat(t.customTitle?t.customTitle:t.name),icon:"chrome_reader_mode",fontSize:"20px",onEdit:function(e,t){return $(e)},editable:!0})),i.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");!F&&r.scrollTop+window.innerHeight+400>r.scrollHeight&&!e.horizontal&&c(o+1)}()}},i.a.createElement(oi,{style:Object(h.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},u>0&&E.filter((function(t,r){return!e.max||e.max&&r<e.max})).sort((function(e,t){return e.isoDate&&t.isoDate&&e.isoDate<t.isoDate?1:e.isoDate&&t.isoDate&&e.isoDate>t.isoDate?-1:0})).map((function(e){return i.a.createElement(li,{key:e._id,xs:12,sm:6,md:4,lg:3,xl:2},i.a.createElement(Ku,{db:"cards",data:e}))})),F?i.a.createElement(B,null):i.a.createElement(i.a.Fragment,null))))})),rd=function(e){return{}};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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 ad=Object(Fe.b)((function(e,t){return{store:{feeds:e.db.feeds}}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(rd)((function(e){var t,r=Ce.getState(),n=r.search,a=r.session,o=i.a.useState(!0),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.a.useState({}),d=Object(Ae.a)(u,2),p=d[0],f=d[1],m=i.a.useState([]),g=Object(Ae.a)(m,2),v=g[0],y=g[1];i.a.useEffect((function(){x()}),[e.store.feeds]),i.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(v)&&y(e)})),i.a.useEffect((function(){b()}),[]);var b=function(){var t=Object(Ne.a)(nd().mark((function t(){return nd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(console.log("48+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"),s(!0),"hideFeeds"!==v[1]){t.next=9;break}return t.next=5,Cs(Object(h.a)(Object(h.a)({},e),{},{fnIdentification:"Views/BrightAndConnected/Feeds -- iniFeeds()"}),{showHidden:!0});case 5:t.sent&&x(),t.next=17;break;case 9:if(0!==Object.keys(Ce.getState().db.feeds).filter((function(e){return!Ce.getState().db.feeds[e].hide})).length){t.next=16;break}return t.next=12,Cs(Object(h.a)(Object(h.a)({},e),{},{fnIdentification:"Views/BrightAndConnected/Feeds -- iniFeeds()"}));case 12:t.sent&&x(),t.next=17;break;case 16:x();case 17:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),x=function(){var e={};Object.keys(Ce.getState().db.feeds).length>0&&(e=Object(h.a)(Object(h.a)({},e),Ce.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(O.a)({},r,e[r])))})),f(t),s(!1)};return l?i.a.createElement("div",{style:{position:"absolute",top:"0px",bottom:0,left:0,right:0}},i.a.createElement(so,null)):v[2]&&36===v[2].length?i.a.createElement("div",null,i.a.createElement(td,{follow:!0})):i.a.createElement("div",{style:(t={width:"100%"},Object(O.a)(t,"width","calc(100% - 20px)"),Object(O.a)(t,"position","relative"),Object(O.a)(t,"display","flex"),t)},i.a.createElement(oi,null,p&&Object.keys(p).length>0&&Object.keys(p).filter((function(t){if(36===v[0].length&&Ce.getState().db.cards[v[0]]&&p[t]._parent&&Object.keys(p[t]._parent).length>0&&p[t]._parent[v[0]])return!0;if("tab"===v[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 v[0]&&36!==v[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 i.a.createElement(li,{xs:12,sm:6,md:4,lg:3,xl:2,key:e},i.a.createElement(Qu,{data:r,follow:!0,onChange:function(){x()}}))}))))}))),od={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(O.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:at("color")}}}},id=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(O.a)(t,e.breakpoints.down("sm"),{left:"30px !important"}),Object(O.a)(t,"color","#FFF"),Object(O.a)(t,"width","30px"),Object(O.a)(t,"height","30px"),Object(O.a)(t,"lineHeight","25px"),Object(O.a)(t,"fontSize","12px"),Object(O.a)(t,"textAlign","center"),Object(O.a)(t,"position","absolute"),Object(O.a)(t,"bottom","23px"),Object(O.a)(t,"left","50%"),Object(O.a)(t,"marginLeft","-24px"),Object(O.a)(t,"zIndex","1"),Object(O.a)(t,"borderTopRightRadius","50%"),Object(O.a)(t,"borderTopLeftRadius","50%"),Object(O.a)(t,"borderBottomRightRadius","50%"),Object(O.a)(t,"borderBottomLeftRadius","50%"),Object(O.a)(t,"display","flex"),Object(O.a)(t,"alignItems","center"),Object(O.a)(t,"justifyContent","center"),t),timelineSimpleBadge:{left:"30px"},custom:{backgroundColor:at("color"),boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt("#000")+", 0.4)"},info:{backgroundColor:Jt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(Jt[0])+", 0.4)"},success:{backgroundColor:Kt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(Kt[0])+", 0.4)"},danger:{backgroundColor:Xt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(Xt[0])+", 0.4)"},warning:{backgroundColor:qt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(qt[0])+", 0.4)"},primary:{backgroundColor:Vt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(Vt[0])+", 0.4)"},badgeIcon:{width:"14px",height:"14px"},timelinePanel:(r={},Object(O.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(O.a)(r,"width","45%"),Object(O.a)(r,"float","left"),Object(O.a)(r,"padding","7px"),Object(O.a)(r,"marginBottom","5px"),Object(O.a)(r,"position","relative"),Object(O.a)(r,"boxShadow","0 1px 4px 0 rgba("+Gt("#000")+", 0.14)"),Object(O.a)(r,"borderRadius","6px"),Object(O.a)(r,"color","rgba("+Gt("#000")+", 0.87)"),Object(O.a)(r,"background","#FFF"),Object(O.a)(r,"&:before",{position:"absolute",bottom:"16px",right:"-15px",display:"inline-block",borderTop:"15px solid transparent",borderLeft:"15px solid "+Qt[10],borderRight:"0 solid "+Qt[10],borderBottom:"15px solid transparent",content:'" "'}),Object(O.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(O.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:at("medium")},footerLine:{position:"relative",marginTop:"10px",marginBottom:"5px"},dropFile:{display:"none"},onDropFile:Object(O.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:at("color")},progressBar:{backgroundColor:"".concat(at("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(at("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(at("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)({},Ut),{},{"& textarea":Object(h.a)(Object(h.a)({},Ut),{},{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(O.a)(n,"outline","none"),Object(O.a)(n,"fontSize","0.9rem"),Object(O.a)(n,"color","#7288a3"),Object(O.a)(n,"borderColor"," #3a546f"),Object(O.a)(n,"overflow","hidden"),Object(O.a)(n,"&& :: placeholder",{color:"#7288a3"}),n)}}}};function cd(){cd=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 ld=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(id)((function(e){var t=Ce.getState(),r=t.db,n=t.session,a=(t.chat,e.classes),o=Ce.getState().functions.socket,c=i.a.useState(!1),l=Object(Ae.a)(c,2),s=l[0],u=l[1],d=i.a.useState(""),p=Object(Ae.a)(d,2),m=p[0],g=p[1],v=i.a.useState(!1),y=Object(Ae.a)(v,2),b=y[0],x=y[1],_=i.a.useState(!1),w=Object(Ae.a)(_,2),E=w[0],O=w[1],j=i.a.useState([]),k=Object(Ae.a)(j,2),S=k[0],L=k[1],C=i.a.useState([]),I=Object(Ae.a)(C,2),F=I[0],T=I[1],N=i.a.useState(null),A=Object(Ae.a)(N,2),D=A[0],P=A[1],z=i.a.useState(!1),$=Object(Ae.a)(z,2),M=$[0],B=$[1],Y=i.a.useState([]),G=Object(Ae.a)(Y,2),R=G[0],H=G[1],W=i.a.useState(!1),U=Object(Ae.a)(W,2),V=U[0],q=U[1],X=i.a.createRef(),K=i.a.createRef(),J=ft(),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("#",""),i.a.useEffect((function(){s||u(!0)}));var ee=function(){var e,t=[];if(e=m){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(Ne.a)(cd().mark((function t(){var a,i,c;return cd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:q(!1),x(!0),a=[],i=ee(),console.log(e),c={_id:Object(Sn.a)(),idRel:e.nodeId,replyData:e.replyData?e.replyData:{},reply:e.replyData?e.replyData._id:null,message:m,type:"comment",mentions:ee(),notifyUsers:a,filesCount:S.length>0?S.length:0,_parent:e.nodeId,_client:r.cards[e.nodeId]&&r.cards[e.nodeId].client?r.cards[e.nodeId].client:null},D&&(c=Object(h.a)(Object(h.a)({},c),{},{urlPreview:JSON.stringify(D)})),go(e,Object(h.a)(Object(h.a)({},c),{},{user:Object(h.a)({},r.users[n._id]),files:{}})),o.emit("data",{module:"timeline",method:"post",action:"add"},c,(function(t){if(console.log(t),t._id)if(S.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});D&&(n=Object(h.a)(Object(h.a)({},n),{},{urlPreview:JSON.stringify(D)})),i.map(function(){var t=Object(Ne.a)(cd().mark((function t(n){return cd().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,Ba(e,n,2,e.nodeId);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),T([]),L([]),H([]),g(""),P(null),x(!1),e.onSending&&e.onSending()}})),g(""),P(null);case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),re=function(){var t=Object(Ne.a)(cd().mark((function t(r){var n;return cd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Array.from(S),t.next=3,Promise.all(n.map(function(){var e=Object(Ne.a)(cd().mark((function e(t,n){var a;return cd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return T([].concat(Object(f.a)(F),[t])),e.next=3,_n(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,o.emit("timeline.COMMENT",{node:e.nodeId,comment:r,db:e.db?e.db:"cards"},(function(e){})),T([]),L([]),g(""),P(null),x(!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(Ne.a)(cd().mark((function e(t){return cd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:L([].concat(Object(f.a)(S),Object(f.a)(Object.keys(t).map((function(e){return t[e]}))))),O(!1);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ae=function(){var e=Object(Ne.a)(cd().mark((function e(t){var r,n,a,i;return cd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(g(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(!D&&r&&-1===R.indexOf(r)||r&&D&&-1===R.indexOf(r)&&D.link!==r){B(!0);try{o.emit("data",{module:"link",method:"post",action:"exist"},{idRel:Q[0],url:r},(function(e){P(e),B(!1)}))}catch(c){B(!1),(i=R).push(r),H(i),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})})),i.a.createElement(Vo.FileDrop,{ref:X,className:e.relative?a.rootRelative:a.root,onDragOver:function(){!e.disabledSend&&O(!0)},onClick:function(){K&&K.current&&K.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"},i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:e.relative?a.editorRelative:a.editor,style:e.editorStyle?e.editorStyle:{},onClick:function(){K&&K.current&&K.current.focus()}},i.a.createElement("div",{className:a.files},S&&S.length>0&&S.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)),i.a.createElement("div",{key:r,style:{position:"relative",float:"left",width:"100%",display:"flex",alignItems:"center",marginBottom:"5px"}},i.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")?i.a.createElement(xt,{icon:a,size:"50px"}):i.a.createElement("img",{src:a,style:{width:"100%",height:"100%"}})),F.length>0&&F[r]&&F[r].name===t.name?i.a.createElement(xt,{icon:"cloud_done",color:"green"}):b?i.a.createElement(i.a.Fragment,null):i.a.createElement(xt,{icon:"delete_forever",color:"red",onClick:function(){return function(e){var t=Array.from(S);t.splice(e,1),L(t)}(r)}}),t.name)}))),i.a.createElement("div",{className:a.textEditor},M&&!D&&i.a.createElement("div",{className:a.urlPreview,style:{width:"100%",height:"150px"}},i.a.createElement("div",{style:{display:"flex"}},i.a.createElement("div",{style:{marginLeft:"7px",width:"200px",height:"110px",maxWidth:"50%"}},i.a.createElement(Qo.a,{variant:"rect",style:{width:"200px",height:"110px",maxWidth:"100%"}})),i.a.createElement("div",{style:{marginLeft:"7px",width:"100%",height:"25px"}},i.a.createElement(Qo.a,{variant:"text",height:25,style:{marginBottom:"7px"}}),i.a.createElement(Qo.a,{variant:"text",height:10}),i.a.createElement(Qo.a,{variant:"text",height:10}),i.a.createElement(Qo.a,{variant:"text",height:10}),i.a.createElement(Qo.a,{variant:"text",height:10}),i.a.createElement(Qo.a,{variant:"text",height:10}),i.a.createElement(Qo.a,{variant:"text",height:10})))),D&&i.a.createElement("div",{className:a.urlPreview},i.a.createElement("img",{src:"".concat(D.img?D.img:Zr.a),onError:function(e){e.target.src=Zr.a},alt:D.title}),i.a.createElement("div",{className:"data"},i.a.createElement("div",{className:"title"},D.title),D.site&&i.a.createElement("div",{className:"siteName"},D.site),D.contentSnippet&&i.a.createElement("div",{className:"contentSnippet"},D.contentSnippet)),i.a.createElement(Zo,{title:tt("$__removeLink",1),icon:"delete_forever",color:"red",onClick:function(){return P(null)}})),b?i.a.createElement("div",{className:a.sendingMessage},tt("$__sending",1),i.a.createElement(co.a,{className:a.progressBar})):i.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}},i.a.createElement(qo.b,{ref:K,value:m,onChange:function(e){ae(e.target.value)},onPaste:function(e){ne(e.clipboardData.files)},placeholder:e.placeholder?e.placeholder:tt("$__writeMessage"),style:Object(h.a)(Object(h.a)({},od),{},{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():m.trim()&&te())},placement:"top",forceSuggestionsAboveCursor:!0,autosize:{minRows:1,maxRows:6}},i.a.createElement(qo.a,{trigger:"@",data:oe,renderSuggestion:function(e,t,n){if(e&&e.id)return i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},i.a.createElement(Kr.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)}})),i.a.createElement("div",{style:{position:"absolute",right:"0px",bottom:"0px",cursor:"pointer",display:"flex",alignItems:"center"}},i.a.createElement(Zo,{title:tt("$__emojis",1),icon:V?"highlight_off":"sentiment_very_satisfied",color:at("medium"),onClick:function(){q(!V)}}),!b&&i.a.createElement("div",{className:a.actionButton},i.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"}),i.a.createElement(xt,{icon:"attachment",color:at("medium"),size:"22px"})),!b&&(m||S.length>0)&&i.a.createElement(Zo,{title:tt("$__pressENTERtoSendorClickHere",1),icon:"send",color:at("menu"),onClick:function(){return te()}}),e.closeOption&&i.a.createElement(xt,{title:tt("$__pressCRTL+ENTERtoSend",1),icon:"close",color:at("color"),onClick:function(){return e.onClose()}}),V&&i.a.createElement("div",{style:{position:"absolute",bottom:"44px",right:"40px"}},i.a.createElement(Ko.a,{onEmojiClick:function(e,t){g("".concat(m," ").concat(t.emoji))},groupVisibility:{recently_used:!1}})))))),i.a.createElement("div",{className:E?a.onDropFile:a.dropFile,onDragLeave:function(){!e.disabledSend&&O(!1)}},tt("$__dropTheFileToAttach","*"))))}))),sd=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Fi)((function(e){var t=e.classes,r=Ce.getState(),n=r.db,a=r.session,o=r.functions,c=r.usersStatus,l=(o.socket,i.a.useState(!1)),s=Object(Ae.a)(l,2),u=s[0],d=s[1],p=i.a.useState(!1),f=Object(Ae.a)(p,2),h=(f[0],f[1]),m=i.a.useState(null),g=Object(Ae.a)(m,2),v=(g[0],g[1],i.a.useState(null)),y=Object(Ae.a)(v,2),b=(y[0],y[1],null);_&&_._parent&&n.cards[_._parent]?_._parent:_&&_.idRel&&n.cards[_.idRel]&&_.idRel;var x=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];h(!0),e&&clearTimeout(b)},_=e.storie;if(!_)return null;"timer"===_.type&&String(_.ini)&&String(_.fin)&&(_.fin,_.ini);var w=null;_.urlPreview&&(w=JSON.parse(_.urlPreview));var E=function(e){var t,r;if(_&&_._parent&&n.cards[_._parent]?t=_._parent:_&&_.idRel&&n.cards[_.idRel]&&(t=_.idRel),r=e,e){var a=e.split("@[");a.length>0&&a.map((function(e){if(e){var a="@[".concat(e.split(")")[0],")"),o=e.split("](")[1];if(o)if((o=o.split(")")[0])&&36===o.length&&n.cards[t]&&n.cards[t]._users&&n.cards[t]._users[o]){var i=n.cards[t]._users&&n.cards[t]._users[o]&&n.cards[t]._users[o].name||n.cards[t]._users&&n.cards[t]._users[o]&&n.cards[t]._users[o].name?n.cards[t]._users[o].name:e.split("](")[0];r=r.replace(a,'<span style="color:'.concat(at("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:tt("$__hideUser","*");r=r.replace(a,'<span style="color:'.concat(at("menu"),'"><b>').concat(c,"</b></span>"))}}return!0}))}return r}(_.message);_._reactions&&Object.keys(_._reactions).length>0&&Object.keys(_._reactions).map((function(e){Object.keys(_._reactions[e]).length>0&&Object.keys(_._reactions[e]).map((function(t){t===a._id&&e}))}));var O=!1;e.storie&&e.storie.user&&e.storie.user._id===a._id&&(O=!0);return""===_.message&&_.cardId&&_.cardId!==e.nodeId&&!Ce.getState().db.cards[_.cardId]?null:i.a.createElement("div",null,i.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;b=setTimeout((function(){h(!1)}),e)}(1e3)},onMouseOver:function(){e.isReply||x(!0)},onClick:function(){e.isReply||x(!0)}},i.a.createElement("div",{style:{display:"flex"}},i.a.createElement("div",{style:{position:"relative",float:"left",fontSize:"10px",fontWeight:"bold",display:"flex",alignItems:"center",whiteSpace:"nowrap",marginRight:"15px"}},i.a.createElement(Ii,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},variant:_.user&&_.user._id&&c.users&&c.users[_.user._id]&&c.users[_.user._id].status?"dot":"standard",status:c.users&&c.users[_.user._id]&&c.users[_.user._id].status?c.users[_.user._id].status:null},i.a.createElement(Kr.a,{alt:_.user.displayName?_.user.displayName:_.user.name,src:"".concat(_.user.image),style:{width:"22px",height:"22px"}})),_.user.displayName?_.user.displayName:_.user.name," ",i.a.createElement("span",{style:{fontSize:"10px"}},"(",Be()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===Be()(1e3*_.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(Be()(1e3*_.created_at).tz("America/Sao_Paulo").format("H:mm")):Be()(new Date).tz("America/Sao_Paulo").format("YYYY")===Be()(1e3*_.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(Be()(1e3*_.created_at).tz("America/Sao_Paulo").format("DD/MM H:mm")):"".concat(Be()(1e3*_.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm")),")"))),i.a.createElement("div",null,_.files&&Object.keys(_.files).length>0&&i.a.createElement("div",{className:"files",style:{position:"relative",display:"flex",justifyContent:O?"flex-end":"none",flexWrap:"wrap"}},_.files&&Object.keys(_.files).length>0&&Object.keys(_.files).map((function(t,r){var a=_.files[t],o=a.name.split("."),c=o[o.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),i.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(_.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(_.files[t]._id),r.preventDefault()},title:_.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))&&i.a.createElement(Ue.a,{title:_.files[t].name},i.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"}},_.files[t].name)),"img"===s&&"string"===typeof l&&l.indexOf("https")>-1&&-1===l.indexOf("svg")&&i.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){_.created_at&&"string"===typeof _.created_at&&parseInt(_.created_at)>Be()().unix("X")-60&&(e.target.src=l)}}),"movie"!==s&&"string"===typeof l&&-1===l.indexOf("blob:")&&-1===l.indexOf("svg")?i.a.createElement(xt,{icon:l,size:"50px"}):"movie"!==s&&!("img"===s&&l&&l.indexOf("svg")>-1)&&i.a.createElement("img",{src:l,style:{width:"100%",height:"100%"}}),"img"===s&&l&&l.indexOf("svg")>-1&&i.a.createElement("img",{src:Pr.a,style:{borderRadius:"15px",boxShadow:"0 1px 2px 2px rgba(0,0,0,0.1)",maxWidth:"100%",height:"100%",maxHeight:"33vh"}}),"movie"===s&&i.a.createElement("video",{style:{width:"100%"},src:"https://machen.azureedge.net/".concat(a.file),controls:!0}),"audio"===s&&i.a.createElement(Fr.a,{src:"https://machen.azureedge.net/".concat(a.file),controls:!0}))}))),function(){if("comment"===_.type&&_.message&&!_.urlPreview)return i.a.createElement("div",{style:{wordBreak:"break-word"}},dt(E,e.searchText));if("comment"===_.type&&_.message&&_.urlPreview){var r=E.replace(w.link,'<a href="'.concat(w.link,'" target="_blank">').concat(w.link,"</a>"));return i.a.createElement("div",null,i.a.createElement("div",{style:{position:"relative",width:"100%"}},i.a.createElement("div",{className:t.urlPreview},!u&&w.img&&i.a.createElement("img",{src:"".concat(w.img),onError:function(e){d(!0)},alt:w.title||w.link}),i.a.createElement("div",{className:"data"},i.a.createElement("div",{className:"title"},w.title),w.site&&i.a.createElement("div",{className:"siteName"},w.site),w.contentSnippet&&i.a.createElement("div",{className:"contentSnippet"},w.contentSnippet))),i.a.createElement("a",{style:{position:"relative",float:"right",fontWeight:"bold",fontSize:"12px",color:"#000000",zIndex:1},href:w.link,target:"_blank"},tt("$__openLink","*"))),i.a.createElement("div",{dangerouslySetInnerHTML:{__html:rt(r,!0,"\n","\n")}}))}}())))}))),ud=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:at("color"),boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt("#000")+", 0.4)"},info:{backgroundColor:Jt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(Jt[0])+", 0.4)"},success:{backgroundColor:Kt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(Kt[0])+", 0.4)"},danger:{backgroundColor:Xt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(Xt[0])+", 0.4)"},warning:{backgroundColor:qt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(qt[0])+", 0.4)"},primary:{backgroundColor:Vt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(Vt[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("+Gt("#000")+", 0.14)",borderRadius:"6px",color:"rgba("+Gt("#000")+", 0.87)",background:at("timelineMyMessage")},timelinePanelInverted:{maxWidth:"calc(100% - 70px)",float:"left",padding:"7px",marginLeft:"40px",marginBottom:"5px",position:"relative",boxShadow:"0 1px 4px 0 rgba("+Gt("#000")+", 0.14)",borderRadius:"6px",color:"rgba("+Gt("#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:at("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:at("color")},progressBar:{backgroundColor:"".concat(at("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(at("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(at("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 dd(){dd=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(ud)((function(e){var t=e.classes,r=Ce.getState(),n=r.db,a=r.session,o=r.functions,c=(r.chat,r.timeline),l=o.socket,s=i.a.useState(e.stories||{}),u=Object(Ae.a)(s,2),d=u[0],p=u[1],f=i.a.useState(!0),m=Object(Ae.a)(f,2),g=m[0],v=m[1],y=i.a.useState(!1),b=Object(Ae.a)(y,2),x=b[0],_=(b[1],i.a.useState(!1)),w=Object(Ae.a)(_,2),E=w[0],O=(w[1],[]);i.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]),i.a.useEffect((function(){e.data._id&&j()}),[e.data]);var j=function(){var t=Object(Ne.a)(dd().mark((function t(){var r;return dd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,vo(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(){v(!1)}),300)):r&&r.result&&setTimeout((function(){v(!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(Ne.a)(dd().mark((function t(){return dd().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&&(ho(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?i.a.createElement("div",{style:{width:"100%"}},i.a.createElement(Qo.a,{variant:"text",height:11,style:{marginBottom:"3px"}}),i.a.createElement(Qo.a,{variant:"text",height:11,style:{marginBottom:"3px"}}),i.a.createElement(Qo.a,{variant:"text",height:11,style:{marginBottom:"3px"}})):i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},i.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 o=d[r];return!e.showUnReaded&&n>Object.keys(d).length-4?(o.files&&Object.keys(o.files).length>0&&Object.keys(o.files).map((function(e,t){var r=o.files[e];O.push(r)})),i.a.createElement("li",{key:r},i.a.createElement(sd,{openLightBox:function(e){k(e)},storie:o,reply:o.reply?d[o.reply]:null,hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId}))):e.showUnReaded&&o&&o.user&&o.user._id!==a._id&&(!o.readedBy||o.readedBy&&!o.readedBy[a._id])?(o.files&&Object.keys(o.files).length>0&&Object.keys(o.files).map((function(e,t){var r=o.files[e];O.push(r)})),i.a.createElement("li",{className:t.item,key:r,style:{}},i.a.createElement(sd,{openLightBox:function(e){k(e)},storie:o,reply:o.reply?d[o.reply]:null,hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId}))):void 0})),i.a.createElement("div",{style:{marginBottom:"15px",clear:"both"}})),e.data&&e.data._id&&i.a.createElement(ld,{nodeId:e.data._id,onSending:function(){S()},placeholder:"Escreva um coment\xe1rio"}))})));var fd=Object(Fe.b)((function(e){return{store:e}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Bu)((function(e){var t=e.classes,r=i.a.useState({}),n=Object(Ae.a)(r,2),a=n[0],o=n[1];return i.a.useEffect((function(){o(e.data)}),[]),i.a.createElement("div",{className:t.feed,style:{cursor:"pointer"},onClick:e.onClick?function(){return e.onClick()}:null},a&&a.img&&i.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"}},i.a.createElement("img",{src:a.img,style:{width:"100%"},onError:function(){o(Object(h.a)(Object(h.a)({},a),{},{img:null}))}})),i.a.createElement("div",{className:t.infos},i.a.createElement("div",{className:t.linkTitle,dangerouslySetInnerHTML:{__html:a.title}}),i.a.createElement("div",{dangerouslySetInnerHTML:{__html:a.contentSnippet},className:t.linkContent}),i.a.createElement("div",{className:t.feedFooter,onClick:function(e){e.stopPropagation()}},i.a.createElement("div",{className:t.feedDate},Be()(a.isoDate?a.isoDate:a.pubDate).format("DD/MM/YYYY HH:MM")),a.title&&a.title.indexOf("Violet ganham")>-1&&console.log(a),i.a.createElement(tn,{data:a},i.a.createElement("div",{style:{marginLeft:"15px"}},i.a.createElement(Xr,{icon:"settings_input_antenna",title:tt("$__sendToRadar",1),iconColor:at("menu"),size:"18px",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},Ce.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&&i.a.createElement("div",{className:t.feedFooter,onClick:function(e){e.stopPropagation()}},i.a.createElement(pd,{data:a}))))})));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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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(Fe.b)((function(){return{}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Bu)((function(e){var t=e.data,r=i.a.useState(0),n=Object(Ae.a)(r,2),a=n[0],o=n[1],c=i.a.useState(0),l=Object(Ae.a)(c,2),s=l[0],u=l[1],d=i.a.useState(7),p=Object(Ae.a)(d,2),f=p[0],m=(p[1],i.a.useState([])),g=Object(Ae.a)(m,2),v=g[0],y=g[1],b=i.a.useState([]),x=Object(Ae.a)(b,2),_=x[0],w=x[1],E=i.a.useState(!0),j=Object(Ae.a)(E,2),k=j[0],S=j[1],L=i.a.useState(!1),C=Object(Ae.a)(L,2),I=C[0],F=C[1];i.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(v)&&y(e),S(!0)}),[]),i.a.useEffect((function(){v.length>0&&!I&&(T(a,f),v[2]&&36!==v[2].length&&S(!0),F(!0))}),[v]),i.a.useEffect((function(){s>Object.keys(_).length&&(S(!0),T(a,f))}),[a,f]),i.a.useEffect((function(){S(!1)}),[_]);var T=function(){var e=Object(Ne.a)(hd().mark((function e(t,r){var n,a,o;return hd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0===s||s>Object.keys(_).length)){e.next=16;break}return S(!0),e.prev=2,e.next=5,bn.post("/Feed_Social_V2",{ids:null,skip:t*r,limit:r});case 5:n=e.sent,a={},o=0,n&&n.data&&n.data.length>0&&n.data.map((function(e){var t={};e.reactions&&e.reactions.filter((function(e){return e&&e.user&&e.user._id})).length>0&&e.reactions.map((function(e){t=Object(h.a)(Object(h.a)({},t),{},Object(O.a)({},e.react.type,Object(h.a)(Object(h.a)({},t&&t[e.react.type]?t&&t[e.react.type]:{}),{},Object(O.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(O.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=16;break;case 13:e.prev=13,e.t0=e.catch(2),console.log(e.t0);case 16:case"end":return e.stop()}}),e,null,[[2,13]])})));return function(t,r){return e.apply(this,arguments)}}();return i.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0,top:0}},i.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");!k&&t.scrollHeight-t.scrollTop<2500&&o(a+1)}()}},i.a.createElement(oi,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 i.a.createElement(oi,{key:e,style:{display:"flex",justifyContent:"center"}},i.a.createElement(li,{xs:12,sm:10,md:8,lg:6,xl:6},i.a.createElement(fd,{db:"cards",data:_[e],onClick:function(){window.open(_[e].link,"_blank")}})))}))),k&&i.a.createElement("div",{style:{position:"relative",width:"100%"}},i.a.createElement(so,null))))})));function gd(){gd=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 vd=Object(Fe.b)((function(e){return{store:e}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Bu)((function(e){var t=e.data,r=(e.classes,Ce.getState().db,i.a.useState(0)),n=Object(Ae.a)(r,2),a=(n[0],n[1],i.a.useState(0)),o=Object(Ae.a)(a,2),c=o[0],l=(o[1],i.a.useState(5)),s=Object(Ae.a)(l,2),u=(s[0],s[1],i.a.useState([])),d=Object(Ae.a)(u,2),p=d[0],f=d[1],m=i.a.useState([]),g=Object(Ae.a)(m,2),v=g[0],y=g[1],b=i.a.useState(!0),x=Object(Ae.a)(b,2),_=x[0],w=x[1],E=i.a.useState(!1),O=Object(Ae.a)(E,2),j=O[0],k=O[1];i.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(p)&&f(e),w(!0)}),[]),i.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(Ne.a)(gd().mark((function e(t,r){var n,a;return gd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0===c||c>Object.keys(v).length)){e.next=13;break}return w(!0),e.prev=2,e.next=5,bn.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),y(Object(h.a)(Object(h.a)({},v),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 i.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0,top:0}},i.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"},i.a.createElement(oi,null,Object.keys(v).length>0?Object.keys(v).sort((function(e,t){return v[e].isoDate&&v[t].isoDate&&v[e].isoDate<v[t].isoDate?1:v[e].isoDate&&v[t].isoDate&&v[e].isoDate>v[t].isoDate?-1:0})).map((function(e){return i.a.createElement(oi,{key:e,style:{display:"flex",justifyContent:"center"}},i.a.createElement(li,{xs:12,sm:6,md:6,lg:6,xl:6},i.a.createElement(fd,{db:"cards",data:v[e],onClick:function(){window.open(v[e].link,"_blank")}})))})):i.a.createElement(oi,{style:{display:"flex",justifyContent:"center"}},i.a.createElement(li,{xs:12,sm:6,md:6,lg:6,xl:6},"A feed solicitado n\xe3o pode ser exibido"))),_&&i.a.createElement("div",{style:{position:"relative",width:"100%"}},i.a.createElement(so,null))))})));var yd=Object(Fe.b)((function(e){return{history:e.db.history}}),(function(e){return Object(u.b)(n,e)}))((function(e){i.a.useEffect((function(){return console.log("StrategyAndPlans"),function(){}}),[]),window.location.hash.split("/")[0].replace("#","")||s.push("bright-and-connected#tab/home");var t=window.location.hash.split("/");return t[0]=t[0].replace("#",""),i.a.createElement("div",null,t[1]&&("radar"===t[1]||"insight-boards"===t[1])&&i.a.createElement(Nu,null),t[1]&&"home"===t[1]&&i.a.createElement(i.a.Fragment,null,i.a.createElement(md,null)),t[1]&&"read"===t[1]&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Pu,null),i.a.createElement(vd,null)),t[1]&&"insight-boards"===t[1]&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Pu,null),i.a.createElement(Mu,null)),t[1]&&"radar"===t[1]&&i.a.createElement("div",{style:{top:33}},i.a.createElement(Ru,null)),t[1]&&("feeds"===t[1]||"bright-and-connected"===t[1])&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Pu,null),i.a.createElement(ad,null)),t[1]&&"hideFeeds"===t[1]&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Pu,null),i.a.createElement(ad,{showHidden:!0})),t[1]&&"allNews"===t[1]&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Pu,null),i.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0,top:0}},i.a.createElement(td,null))))})),bd=r(671),xd=r(927),_d=r.n(xd),wd=(r(1429),Object(We.a)((function(e){return{tooltip:{backgroundColor:"rgba(0,0,0,0.5) !important",color:"rgba(0, 0, 0, 0.87)",padding:"5px !important",fontSize:e.typography.pxToRem(12),border:"none",borderRadius:"7px",boxShadow:"3px 3px 7px 0px rgba(0,0,0,0.7)",alignItems:"center",justifyContent:"center"}}}))(Ue.a));r(1430),r(1431);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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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=_d()(bd.a),jd={allDay:tt("$__allDay"),previous:"<",next:">",today:tt("$__today"),month:tt("$__month"),week:tt("$__week"),day:tt("$__aday"),agenda:tt("$__agenda"),date:tt("$__date"),time:tt("$__hour"),event:tt("$__activity"),showMore:function(e){return"+ (".concat(e,") ").concat(tt("$__activities"))}};function kd(e){Ce.getState().session,e.localizer.messages;var t=e.label,r=function(t){e.onNavigate(t)};return i.a.createElement("div",{className:"rbc-toolbar"},i.a.createElement("span",{className:"rbc-btn-group"},i.a.createElement("button",{type:"button",onClick:function(){r("PREV")},style:{backgroundColor:at("menu"),borderRadius:0}},tt("$__prev"))),i.a.createElement("span",{className:"rbc-toolbar-label"},t),i.a.createElement("span",{className:"rbc-btn-group"},i.a.createElement("button",{type:"button",onClick:function(){r("NEXT")},style:{backgroundColor:at("menu"),borderRadius:0}},tt("$__next"))),i.a.createElement("span",{className:"rbc-btn-group"},i.a.createElement("button",{type:"button",onClick:function(){r("TODAY")},style:{backgroundColor:at("menu"),borderRadius:0}},tt("$__today"))),i.a.createElement("span",{className:"rbc-btn-group"},i.a.createElement("button",{type:"button",onClick:function(){r("day")},style:{backgroundColor:at("menu"),borderRadius:0}},tt("$__day"))),i.a.createElement("span",{className:"rbc-btn-group"},i.a.createElement("button",{type:"button",onClick:function(){r("week")},style:{backgroundColor:at("menu"),borderRadius:0}},tt("$__week"))),i.a.createElement("span",{className:"rbc-btn-group"},i.a.createElement("button",{type:"button",onClick:function(){r("month")},style:{backgroundColor:at("menu"),borderRadius:0}},tt("$__month"))))}var Sd=Object(Fe.b)((function(e){return{search:e.search,cards:e.db.cards}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=e.reduxFunction,r=e.search,n=Ce.getState(),a=n.db,o=n.session,c=i.a.useState([]),l=Object(Ae.a)(c,2),s=l[0],u=l[1],d=i.a.useState(null),p=Object(Ae.a)(d,2),m=p[0],g=(p[1],i.a.useState("week")),v=Object(Ae.a)(g,2),y=v[0],b=v[1],x=i.a.useState(rc()().toLocaleString()),_=Object(Ae.a)(x,2),w=_[0],E=_[1],O=i.a.useState(null),j=Object(Ae.a)(O,2),k=(j[0],j[1]),S=i.a.useState(!1),L=Object(Ae.a)(S,2),C=L[0],I=L[1],F=i.a.useState(!1),T=Object(Ae.a)(F,2),N=T[0],A=T[1],D=i.a.useState([]),P=Object(Ae.a)(D,2),z=P[0],$=P[1];rc.a.locale(o.language?o.language.toLowerCase():"pt-br",{week:{dow:1}});var M=Object(bd.b)(rc.a);i.a.useEffect((function(){var e=o&&o.calendarPreffers?JSON.parse(o.calendarPreffers):{};e.view&&b(e.view),e.view&&I(e.showAllEvents),e.severalDaysActivities&&A(e.severalDaysActivities),e.disabledTypes&&$(Array.from(e.disabledTypes))}),[]),i.a.useEffect((function(){Y()}),[e.cards,r]),i.a.useEffect((function(){Y(),B()}),[N,z]);var B=function(){var e=Object(Ne.a)(Ed().mark((function e(){var t;return Ed().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=o.calendarPreffers?JSON.parse(o.calendarPreffers):{},t=Object(h.a)(Object(h.a)({},t),{},{disabledTypes:Array.from(z),showAllEvents:C,severalDaysActivities:N,view:y}),Ce.getState().functions.socket.emit("data",{module:"user",method:"post",action:"preffers"},{calendarPreffers:JSON.stringify(t)},(function(e){e.error&&console.log("hideSupportAndAppBanner",e.error)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Y=function(){var e=Object(Ne.a)(Ed().mark((function e(){var t;return Ed().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=[],Object.keys(Ce.getState().db.cards).filter((function(e){return rc()(1e3*Ce.getState().db.cards[e].startDate).isValid()&&rc()(1e3*Ce.getState().db.cards[e].endDate).isValid()&&(0===z.length||z.length>0&&-1===z.indexOf(Ce.getState().db.cards[e].type))&&"plan"!==Ce.getState().db.cards[e].type&&"chatGroup"!==Ce.getState().db.cards[e].type&&"completed"!==Ce.getState().db.cards[e].status&&!Ce.getState().db.cards[e].deleted&&(N||!N&&rc()(1e3*Ce.getState().db.cards[e].startDate).format("YYYY-MM-DD")===rc()(1e3*Ce.getState().db.cards[e].endDate).format("YYYY-MM-DD"))&&(0===r.tags.length||r.tags.length>0&&Ce.getState().db.cards[e]._tags&&Ce.getState().db.cards[e]._tags.length>0&&Ce.getState().db.cards[e]._tags.filter((function(e){var t=!1;return r.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0)&&(""===r.text||""!==r.text&&(Ce.getState().db.cards[e].name.toLowerCase().indexOf(r.text.toLowerCase())>-1||Ce.getState().db.cards[e].description&&Ce.getState().db.cards[e].description.toLowerCase().indexOf(r.text.toLowerCase())>-1))&&r.cards.status[Ce.getState().db.cards[e].status]&&(r.cards.priority.all||Ce.getState().db.cards[e].priority&&r.cards.priority[Ce.getState().db.cards[e].priority])&&(r.cards.risk.all||Ce.getState().db.cards[e].risk&&r.cards.risk[Ce.getState().db.cards[e].risk])&&(r.cards.complexity.all||Ce.getState().db.cards[e].complexity&&r.cards.complexity[Ce.getState().db.cards[e].complexity])&&(r.cards.impact.all||Ce.getState().db.cards[e].impact&&r.cards.impact[Ce.getState().db.cards[e].impact])&&(0===Object.keys(r.users.selected).length||Object.keys(r.users.selected).length>0&&Object.keys(Ce.getState().db.cards[e]._users).filter((function(e){return r.users.selected[e]})).length>0)})).map((function(e){var r=!1,n=rc()(1e3*Ce.getState().db.cards[e].startDate).toDate(),a=rc()(1e3*Ce.getState().db.cards[e].endDate).toDate(),o=rc()(1e3*Ce.getState().db.cards[e].endDate).unix("x")-rc()(1e3*Ce.getState().db.cards[e].startDate).unix("x");("00:00:00"===rc()(1e3*Ce.getState().db.cards[e].startDate).format("HH:mm:ss")&&"23:59:59"===rc()(1e3*Ce.getState().db.cards[e].endDate).format("HH:mm:ss")||Math.ceil(o/60/60)>23)&&(r=!0),t.push({title:Ce.getState().db.cards[e].name,allDay:r,startDate:n,endDate:a,_id:e})})),u(t);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return i.a.createElement("div",null,m,i.a.createElement(Nu,null),i.a.createElement(oi,null,i.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",width:"100%"}},i.a.createElement(gn,{text:tt("$__legend"),icon:"style",horizontalButton:!0,transparent:!0,size:"21px",color:"lightgray",btColor:"lightgray",buttonStyle:{backgroundColor:at("menu"),borderRadius:0},options:[{name:tt("$__scheduleColor",1),icon:"label",iconColor:"gray",color:"gray",disabled:!0},{name:tt("$__late",1),icon:"label",iconColor:"red",disabled:!0}].concat(Object(f.a)(a.status.map((function(e){return{name:tt("".concat(e.label),1),icon:"label",iconColor:e.color,disabled:!0}}))),[{name:tt("$__scheduleLeftBorderColor",1),icon:"border_left",color:"gray",iconColor:"gray",disabled:!0}],Object(f.a)(a.priority.map((function(e){return{name:tt("".concat(e.label),1),icon:"border_left",color:e.color,iconColor:e.color,disabled:!0}}))))}),i.a.createElement(gn,{text:tt("$__type"),icon:"collections_bookmark",horizontalButton:!0,transparent:!0,size:"21px",color:at("lightgray"),btColor:at("lightgray"),buttonStyle:{backgroundColor:at("menu"),borderRadius:0},forceStopPropagation:!0,options:[].concat(Object(f.a)(a.type.filter((function(e){return e.calendar})).map((function(e){return{name:tt("".concat(e.label),1),icon:e.icon,iconColor:z.indexOf(e.value)>-1?"lightgray":at("menu"),color:z.indexOf(e.value)>-1?"lightgray":at("menu"),onClick:function(){var t=Array.from(z);-1===t.indexOf(e.value)?t.push(e.value):t.splice(t.indexOf(e.value),1),$(t)}}}))),[{name:z.length===a.type.filter((function(e){return e.calendar})).length?tt("$__showAll",1):tt("$__hideAll",1),icon:"clear_all",iconColor:z.length!==a.type.filter((function(e){return e.calendar})).length?"lightgray":at("menu"),color:z.length!==a.type.filter((function(e){return e.calendar})).length?"lightgray":at("menu"),onClick:function(){if(z.length===a.type.filter((function(e){return e.calendar})).length)$([]);else{var e=[];a.type.filter((function(e){return e.calendar})).map((function(t){e.push(t.value)})),$(e)}}}])}),i.a.createElement(gn,{text:tt("$__options"),icon:"settings",horizontalButton:!0,transparent:!0,size:"21px",color:"lightgray",btColor:"lightgray",buttonStyle:{backgroundColor:at("menu"),borderRadius:0},style:{marginRight:"15px"},options:[{name:tt("$__showAllEvents","*"),icon:C?"check_circle_outline":"radio_button_unchecked",onClick:function(){I((function(e){return!e}))}},{name:tt("$__activitiesTInSeveralDays","*"),icon:N?"check_circle_outline":"radio_button_unchecked",onClick:function(){A((function(e){return!e}))}}]})),i.a.createElement(li,{xs:12,sm:12,md:12},i.a.createElement(Zl,null,i.a.createElement(rs,null,i.a.createElement(Od,{selectable:!0,localizer:M,events:s,messages:jd,defaultDate:new Date,onSelectSlot:function(e){t("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},Ce.getState().sideModule),{},{db:"cards",id:"new",module:"cardEdit",activeModule:"cardEdit",data:{type:"task",startDate:rc()(e.start).unix("x"),endDate:rc()(e.end).unix("x")}}))},startAccessor:"startDate",endAccessor:"endDate",onView:function(e){b(e)},onSelectEvent:function(e){k(e._id),t("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},Ce.getState().sideModule),{},{db:"cards",id:e._id,module:"cardEdit",activeModule:"cardEdit",data:Ce.getState().db.cards[e._id]}))},eventPropGetter:function(e,t,r,n){var o=Ce.getState().db.cards[e._id],i=Ce.getState().db.status.filter((function(t){return t.value===Ce.getState().db.cards[e._id].status}))[0].color,c=rc()(new Date(t)).unix("x"),l=rc()(new Date(r)).unix("x");rc()(new Date(r)).unix("x")<rc()().unix("x")&&(i="#ff0000");var s=(l-c)/60/1440*100;return s>100&&(s=100),{className:"",style:Object(h.a)(Object(h.a)({height:"".concat(s,"%")},"week"===y||"day"===y?{minHeight:"".concat(s,"%")}:{minHeight:22}),{},{width:"100%",border:"solid 1px rgba(0,0,0,0.1)",borderRadius:3,boxShadow:"0px 1x 2px 0px rgba(0,0,0,0.3)",backgroundColor:"".concat(nt(i,n?.3:.5))},o.priority&&a.priority.filter((function(e){return String(e.value)===String(o.priority)})).length>0?{borderLeft:"solid 5px ".concat(a.priority.filter((function(e){return String(e.value)===String(o.priority)}))[0].color)}:{})}},components:{event:function(e){var t=e.event,r=rc()(t.startDate).unix("x"),n=rc()(t.endDate).unix("x"),o=Ce.getState().db.cards[t._id];Ce.getState().db.status.filter((function(e){return e.value===o.status}))[0].color;rc()(t.endDate).format("YYYY-MM")===rc()().format("YYYY-MM")&&(rc()(t.endDate).format("DD"),rc()().format("DD"));var c=n-r,l=o.type&&a&&a.dataType&&a.dataType.filter((function(e){return e.name===o.type}))[0]?a.dataType.filter((function(e){return e.name===o.type}))[0].icon:"$__topic";return i.a.createElement(wd,{title:i.a.createElement("div",null,i.a.createElement(ki,{data:o,onlyOption:!0,notGlobalExpanded:!0}))},i.a.createElement("div",{style:Object(h.a)(Object(h.a)({},t.allDay?{padding:3}:{position:"absolute",top:c/60<30||t.allDay?1:2,bottom:2,left:3,right:3}),{},{padding:c/60<30?0:"2px 0px",zIndex:10})},i.a.createElement("div",{style:{position:"absolute",left:-4,top:-2,bottom:-4,width:2,backgroundColor:"#FFFFFF"}}),i.a.createElement("div",{style:{top:0,left:0,right:0,fontWeight:"bold",fontSize:c/60<30?8:11,color:"black",padding:c/60<30?0:"2px 0px",zIndex:10,justifyContent:"space-between",display:"flex",alignItems:"center"}},c/60>30?i.a.createElement("div",{style:{marginRight:5}},i.a.createElement(Ur,{overlap:"rectangular",size:"12px",icon:l,color:"bkack",title:tt("$__".concat(o.type))})):i.a.createElement(i.a.Fragment,null),t.title)))},toolbar:kd,month:{dateHeader:function(e){e.date;var t=e.label;return i.a.createElement("div",{style:{color:at("menu"),cursor:"pointer"}},t)}},week:{dateHeader:function(e){e.date;var t=e.label;return i.a.createElement("div",{style:{color:at("menu"),cursor:"pointer"}},t)}}},onNavigate:function(e,t,r){w&&rc()(e).format("YYYY-MM")===rc()(w).format("YYYY-MM")||E(e),"NEXT"!==r&&"PREV"!==r&&"TODAY"!==r&&"DATE"!==r&&b(r)},view:y,onEventResize:function(t){oa(Object(h.a)(Object(h.a)({},e),{},{data:{_id:t.event._id}}),{startDate:rc()(t.start).unix("x"),endDate:rc()(t.end).unix("x")})},onEventDrop:function(t){oa(Object(h.a)(Object(h.a)({},e),{},{data:{_id:t.event._id}}),{startDate:rc()(t.start).unix("x"),endDate:rc()(t.end).unix("x")})},showMultiDayTimes:!0,showAllEvents:C,popup:!0,resizable:!0,defaultView:"week"}))),i.a.createElement("div",{style:{height:300,width:"100%"}}))))})),Ld=r(1684),Cd={widgetsContent:{backgroundColor:"#FFFFFF",height:"calc(100vh - 200px)",maxHeight:"calc(100vh - 350px)",position:"relative",overflowX:"auto"}},Id=r(229),Fd=r.n(Id),Td=r(928),Nd=r.n(Td),Ad=r(929),Dd=r.n(Ad);function Pd(){Pd=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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(Fe.b)((function(e){return{store:{cards:e.db.cards},hidePrivate:e.controls.hidePrivate}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Cd)((function(e){var t,r=Ce.getState(),n=r.db,a=r.session,o=n.dataType,c=n.users,l=i.a.useState(!1),u=Object(Ae.a)(l,2),d=u[0],p=u[1],f=i.a.useState("EndDate"),h=Object(Ae.a)(f,2),m=h[0],g=h[1],v=Object(Ld.a)(["banner"]),y=Object(Ae.a)(v,2),b=y[0],x=y[1],_=[],w=function(){var e=Object(Ne.a)(Pd().mark((function e(){var t;return Pd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Ce.getState().functions.socket,x("banner",!0,{path:"/"});try{t.emit("data",{module:"user",method:"post",action:"preffers"},{hideSupportAndAppBanner:!0},(function(e){e.error&&console.log("hideSupportAndAppBanner",e.error)}))}catch(r){console.log(r)}case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();_=Object.keys(Ce.getState().db.cards).filter((function(t){return Ce.getState().db.cards[t]&&!Ce.getState().db.cards[t].checklist&&o.filter((function(e){return e.name===Ce.getState().db.cards[t].type})).length>0&&(!e.hidePrivate||e.hidePrivate&&!Ce.getState().db.cards[t].private)})).map((function(e){return Ce.getState().db.cards[e]}));var E=Be()().format("YYYY-MM-DD"),j=window.location.hash.split("/");j[0]=j[0].replace("#","");var k=String(a.dashboard.period).replace("$__last","");k=k.replace("Days","");var S=_.filter((function(t){if(t._users&&!t.deleted&&!t.checklist&&t._users[a._id]&&"completed"!==t.status&&(t._users[a._id].myDay&&Be()(new Date(1e3*t._users[a._id].myDay)).tz("America/Sao_Paulo").unix("x")>Be()().subtract(15,"days").unix("x")&&Be()(new Date(1e3*t._users[a._id].myDay)).tz("America/Sao_Paulo").unix("x")<Be()(new Date(E)).unix("x")||t._users[a._id].isResponsible&&(t.endDate&&Be()(new Date(1e3*t.endDate)).tz("America/Sao_Paulo").unix("x")<Be()().unix("x")||t.startDate&&Be()(new Date(1e3*t.startDate)).tz("America/Sao_Paulo").unix("x")>Be()(new Date(E)).subtract(15,"days").unix("x"))&&(t._users[a._id]&&!t._users[a._id].myDay||t._users[a._id].myDay&&Be()(new Date(1e3*t._users[a._id].myDay)).tz("America/Sao_Paulo").format("YYYY-MM-DD")!==E&&Be()(new Date(1e3*t._users[a._id].myDay)).tz("America/Sao_Paulo").format("YYYY-MM-DD")>Be()(new Date).tz("America/Sao_Paulo").subtract(30,"d").format("YYYY-MM-DD")))&&(!e.hidePrivate||e.hidePrivate&&!t.private))return!0})).sort((function(e,t){return Ce.getState().db.orderByTitle&&"ASC"===Ce.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()<t.name.toLowerCase().trim()||Ce.getState().db.orderByTitle&&"DESC"===Ce.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()>t.name.toLowerCase().trim()?-1:Ce.getState().db.orderByTitle?0:!Ce.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 i.a.createElement("div",{style:{width:"calc(100%)",display:"flex",alignItems:"center",justifyContent:"center"},key:t._id},i.a.createElement(ki,{db:"cards",data:t,noShadow:!0}),i.a.createElement(kt.a,{onClick:function(){Wn(e,{_id:t._id,userId:a._id,option:!0})}},i.a.createElement(xt,{icon:"add",color:at("menu"),title:tt("$__addOnMyDay")})))})),L=_.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&&Be()(new Date(1e3*e._users[a._id].myDay)).tz("America/Sao_Paulo").format("YYYY-MM-DD")!==E)&&(e.endDate&&Be()(new Date(1e3*e.endDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")>=Be()().format("YYYY-MM-DD")&&Be()(new Date(1e3*e.endDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")<=Be()(new Date(E)).add(10,"days").format("YYYY-MM-DD")||e.startDate&&Be()(new Date(1e3*e.startDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")>=Be()().format("YYYY-MM-DD")&&Be()(new Date(1e3*e.startDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")<=Be()(new Date(E)).add(10,"days").format("YYYY-MM-DD"))})).sort((function(e,t){var r=e.name.toLowerCase().trim(),n=t.name.toLowerCase().trim();return"IniDate"===m&&(r=parseInt(e.startDate),n=parseInt(t.startDate)),"EndDate"===m&&(r=parseInt(e.endDate),n=parseInt(t.endDate)),r<n?-1:r>n?1:0})).map((function(e,t){return i.a.createElement(ki,{db:"cards",key:e._id,data:e,noShadow:!0})})),C=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}))]:{},I=new Date,F=I.getHours()>=0&&I.getHours()<5?"$__goodNight":I.getHours()>=5&&I.getHours()<12?"$__goodMorning":I.getHours()>=12&&I.getHours()<18?"$__goodAfternoon":"$__goodNight",T=Object.keys(n.cards).filter((function(t){return n.cards[t]&&!n.cards[t].deleted&&!n.cards[t].archived&&"plan"===n.cards[t].type&&n.cards[t]._users&&n.cards[t]._users[a._id]&&"completed"!==n.cards[t].status&&n.cards[t]._isFavorite&&(!e.hidePrivate||e.hidePrivate&&!n.cards[t].private)}));return i.a.createElement("div",{style:{width:"100%"}},i.a.createElement(oi,null,b.banner||a.hideSupportAndAppBanner?i.a.createElement(i.a.Fragment,null):i.a.createElement(i.a.Fragment,null,i.a.createElement(li,{xs:12,sm:12,md:6,lg:6,xl:6},i.a.createElement("div",{style:{display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center",marginBottom:"33px"},id:"view_dashboard_welcomeMessage"},i.a.createElement("div",{style:{fontSize:"16px",padding:"15px 0",fontWeight:"bold",width:"100%",textAlign:"left",color:at("menu"),paddingLeft:"15px"}},tt(F,1),", ",C&&C.displayName?C.displayName:C.name?C.name:"","!"),i.a.createElement(oi,{style:{width:"100%"}},i.a.createElement(li,{xs:12,sm:12,md:6,lg:6,xl:6},i.a.createElement("img",{src:Dd.a,width:800,height:610,style:{width:"100%",height:"auto",borderRadius:17,boxShadow:"0 0 7px 1px rgba(0,0,0,0.1)"}})),i.a.createElement(li,{xs:12,sm:12,md:6,lg:6,xl:6},i.a.createElement("div",{style:{position:"relative",paddingBottom:33,height:"100%"}},i.a.createElement("div",{style:{fontSize:"16px",color:at("medium"),paddingRight:15},dangerouslySetInnerHTML:{__html:rt(tt("$__supportWelcomeMessage",1))}}),i.a.createElement("div",{style:{position:"absolute",bottom:0,left:0}},i.a.createElement(Ct,{title:tt("$__clickToaccessSupportPage","*"),text:tt("$__clickToaccessSupportPage"),color:at("menu"),icon:"help_outline",onClick:function(){window.open("https://support.machen.ai/","_blank")},size:"17px"}))))))),i.a.createElement(li,{xs:12,sm:12,md:6,lg:6,xl:6},i.a.createElement("div",{style:{position:"relative"}},i.a.createElement("img",{src:Nd.a,width:800,height:640,style:{width:"100%",height:"auto"}}),i.a.createElement("div",{style:{position:"absolute",bottom:-33,right:15}},i.a.createElement(Ct,{title:tt("$__hideSupportAndAppBanner","*"),text:tt("$__hideSupportAndAppBanner"),color:at("menu"),icon:"close",onClick:function(){w()},size:"12px"})))))),T.length>0?i.a.createElement(oi,{style:{marginTop:"33px",marginBottom:"33px"}},i.a.createElement(li,{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}},i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginBottom:33}},i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",color:at("menu"),fontWeight:"bold",fontSize:"16px",marginTop:"16px",display:"flex",alignItems:"center",justifyContent:"space-between"}},tt("$__favoritePlans"),T.length>3?i.a.createElement(Ct,{title:"".concat(tt("$__viewAllFavorites","*")," (").concat(T.length,")"),text:"".concat(tt("$__viewAllFavorites","*")," (").concat(T.length,")"),color:at("menu"),icon:"favorite",transparent:!0,onClick:function(){s.push("sp#tab/home")},size:"25px"}):i.a.createElement(i.a.Fragment,null)),i.a.createElement(oi,{style:{flexDirection:"row",overflowY:"auto",flexWrap:"nowrap",display:"-webkit-inline-box"}},T.sort((function(e,t){var r=n.cards[e].updated_at&&n.cards[e].updated_at.low?n.cards[e].updated_at.low:0,a=n.cards[t].updated_at&&n.cards[t].updated_at.low?n.cards[t].updated_at.low:0;return r>a?-1:r<a?1:0})).map((function(e,t){if(t<6)return i.a.createElement(li,{xs:12,sm:6,md:4,lg:3,xl:2,key:n.cards[e]._id,style:{marginTop:"33px",cursor:"pointer"},onClick:function(){s.push("sp#".concat(n.cards[e]._id,"/dashboard"))}},i.a.createElement(ki,{data:n.cards[e],expanded:!0,Avatar:!0,ignoreList:!0}))})))),i.a.createElement("div",{style:{clear:"both"}}))):i.a.createElement(i.a.Fragment,null),i.a.createElement(oi,{style:{paddingBottom:33,marginTop:33}},i.a.createElement(li,{xs:12,sm:12,md:6,lg:6,xl:6,style:{borderRight:"2px solid ".concat(at("menu"))},id:"view_dashboard_myDay"},i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"0 16px"}},d?i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",color:at("menu"),fontWeight:"bold",fontSize:"16px",marginBottom:"16px",display:"flex",alignItems:"center"}},i.a.createElement(kt.a,{onClick:function(){p(!1)}},i.a.createElement(xt,{icon:"undo",color:at("menu"),title:tt("$__backToMyDay")})),tt("$__taskSuggestions")),i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",color:at("medium"),fontWeight:"bold",fontSize:"12px",marginBottom:"16px",display:"flex",alignItems:"center"},id:"view_dashboardSuggestionsAddButton"},"Clique no + para adicionar as tarefas ao seu dia."),i.a.createElement("div",null,S)):i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",color:at("menu"),fontWeight:"bold",fontSize:"16px",marginBottom:"16px"}},tt("$__myDay"),S.length>0&&i.a.createElement("div",{style:(t={color:at("menu"),fontSize:"16px",marginTop:"7px",cursor:"pointer",textAlign:"left",padding:"7px"},Object(O.a)(t,"color","#f50057"),Object(O.a)(t,"display","flex"),Object(O.a)(t,"alignItems","center"),t),onClick:function(){p(!0)},id:"view_dashboard_myDaySuggestionsOptions"},i.a.createElement(xt,{icon:"info",color:at("medium"),style:{marginRight:"15px"}}),tt("$__clickHereToCheckTaskSuggestions"))),i.a.createElement("div",null,i.a.createElement(To,{noChecklist:!0,noDelete:!0,showCard:!0,myDay:!0,db:"cards"}),i.a.createElement("div",{style:{clear:"both"}}))))),i.a.createElement(li,{xs:12,sm:12,md:6,lg:6,xl:6,style:{borderRight:"2px solid ".concat(at("menu"))},id:"view_dashboard_nextTasks"},i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"0 16px"}},i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex",justifyContent:"space-between"}},i.a.createElement("div",{style:{color:at("menu"),fontWeight:"bold",fontSize:"16px",marginBottom:"16px"}},tt("$__nextTasks")),i.a.createElement("div",null,i.a.createElement(Ct,{title:tt("$__orderBy".concat(m)),color:"lightgray",icon:"IniDate"===m?"today":"EndDate"===m?"event":"text_rotate_vertical",onClick:function(){"IniDate"===m&&g("EndDate"),"EndDate"===m&&g("name"),"name"===m&&g("IniDate")},size:"21px",style:{padding:"0px !important"}}))),i.a.createElement("div",null,L)))))})));var $d=Object(Fe.b)((function(){return{}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Cd)((function(e){var t=Ce.getState().session;i.a.useEffect((function(){return function(){}}),[]);var r=0;return t&&t.GlobalData&&(t.GlobalData.message&&(r+=1),t.GlobalData.history&&(r+=1),t.GlobalData.vocation&&(r+=1),t.GlobalData.legacy&&(r+=1)),i.a.createElement("div",{style:{width:"100%"}},r?i.a.createElement(oi,{style:{}},i.a.createElement(li,{md:6,xs:12},i.a.createElement(Zl,{style:{height:"calc(100% - 33px)"}},i.a.createElement(_a,{title:tt("$__strategicStatement",1),icon:"history_edu",color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"}}),i.a.createElement(rs,null,i.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.strategicStatement}})))),i.a.createElement(li,{md:6,xs:12},i.a.createElement(Zl,{style:{height:"calc(100% - 33px)"}},i.a.createElement(_a,{title:tt("$__presidentMessage",1),icon:"account_box",color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"}}),i.a.createElement(rs,null,i.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.message}})))),i.a.createElement(li,{md:6,xs:12},i.a.createElement(Zl,{style:{height:"calc(100% - 33px)"}},i.a.createElement(_a,{title:tt("$__vocation",1),icon:"spoke",color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"}}),i.a.createElement(rs,null,i.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.vocation}})))),i.a.createElement(li,{md:6,xs:12},i.a.createElement(Zl,{style:{height:"calc(100% - 33px)"}},i.a.createElement(_a,{title:tt("$__history",1),icon:"menu_book",color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"}}),i.a.createElement(rs,null,i.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.history}})))),i.a.createElement(li,{md:6,xs:12},i.a.createElement(Zl,{style:{height:"calc(100% - 33px)"}},i.a.createElement(_a,{title:tt("$__values",1),icon:"join_inner",color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"}}),i.a.createElement(rs,null,i.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.values}})))),i.a.createElement(li,{md:6,xs:12},i.a.createElement(Zl,{style:{height:"calc(100% - 33px)"}},i.a.createElement(_a,{title:tt("$__legacy",1),icon:"subtitles",color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"}}),i.a.createElement(rs,null,i.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.legacy}}))))):i.a.createElement(i.a.Fragment,null),i.a.createElement(zd,null),i.a.createElement(oi,{style:{paddingBottom:33}},i.a.createElement(li,{xs:12,sm:12,md:12,lg:12,xl:12},i.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"}},i.a.createElement("div",{style:{position:"relative",height:40,marginBottom:15}},i.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:at("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"space-between",color:at("color"),padding:"0 15px"}},i.a.createElement("div",{style:{display:"flex"}},tt("$__lastNews","*")),i.a.createElement(Ct,{title:tt("$__save","*"),text:tt("$__viewAllNews"),color:"white",icon:"feed",transparent:!0,onClick:function(){s.push("bright-and-connected#tab/allNews")},size:"25px"}))),i.a.createElement(Pt,null,i.a.createElement(td,{max:6,horizontal:!0})))),i.a.createElement(li,{xs:12,sm:12,md:12,lg:12,xl:12},i.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"}},i.a.createElement("div",{style:{position:"relative",height:40,marginBottom:15}},i.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:at("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"space-between",color:at("color"),padding:"0 15px"}},i.a.createElement("div",{style:{display:"flex"}},tt("$__lastAddRadar","*")),i.a.createElement(Ct,{title:tt("$__save","*"),text:tt("$__viewAllRadar"),color:"white",icon:"settings_input_antenna",transparent:!0,onClick:function(){s.push("bright-and-connected#tab/radar")},size:"25px"}))),i.a.createElement(Pt,null,i.a.createElement(Ru,{max:6,horizontal:!0,noPagination:!0})))),i.a.createElement(li,{xs:12,sm:12,md:12,lg:12,xl:12},i.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"}},i.a.createElement("div",{style:{position:"relative",height:40,marginBottom:15}},i.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:at("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"space-between",color:at("color"),padding:"0 15px"}},i.a.createElement("div",{style:{display:"flex"}},tt("$__lastAddInsights","*")),i.a.createElement(Ct,{title:tt("$__save","*"),text:tt("$__viewAllInsights"),color:"white",icon:Fd.a,transparent:!0,onClick:function(){s.push("bright-and-connected#tab/insight-boards")},size:"25px"}))),i.a.createElement(Pt,null,i.a.createElement(Mu,{max:6,horizontal:!0,noPagination:!0}))))))}))),Md=r(543),Bd=r.n(Md);var Yd=function(e){var t=Ce.getState(),r=t.db,n=t.session,a=(r.dataType,e.data),o=Be()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),c=i.a.useState(null),l=Object(Ae.a)(c,2),s=l[0],u=l[1],d=Object.keys(Ce.getState().db.cards).filter((function(e){return Ce.getState().db.cards[e]})).map((function(e){return Ce.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])&&Be()(new Date(1e3*parseInt(e._users[a._id].myDay))).tz("America/Sao_Paulo").format("YYYY/MM/DD")===o})).sort((function(e,t){return Ce.getState().db.orderByTitle&&"ASC"===Ce.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()<t.name.toLowerCase().trim()||Ce.getState().db.orderByTitle&&"DESC"===Ce.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()>t.name.toLowerCase().trim()?-1:Ce.getState().db.orderByTitle?0:!Ce.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 i.a.createElement(ki,{db:"cards",key:t,data:e,showStatus:!0,onlyOption:!0})}));return i.a.createElement("div",{style:{width:"100%",minHeight:"120px",backgroundColor:"#FFFFFF",boxShadow:"0 0 9px 3px rgba(0,0,0,0.2)",position:"relative"}},i.a.createElement("div",{style:{backgroundColor:at("menu"),height:"43px",paddingLeft:"45px",fontSize:"12px",color:"#FFFFFF",fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"space-between"}},i.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?i.a.createElement("img",{style:{width:"37px",height:"37px",top:"3x",left:"3px",borderRadius:"50%",border:"solid 2px ".concat(at("color")),zIndex:"5 !important",position:"absolute",backgroundColor:"".concat(at("color"))},src:"".concat(a.image?a.image:Bd.a),onError:function(e){e.target.src="".concat(Bd.a)},onLoad:function(e){u("".concat(a.image?a.image:Bd.a))},width:"100%"}):i.a.createElement("div",{style:{width:"37px",height:"37px",top:"3px",left:"3px",borderRadius:"50%",border:"solid 2px ".concat(at("color")),zIndex:"5 !important",position:"absolute",backgroundColor:"".concat(at("color")),backgroundImage:'url("'.concat(s,'")'),backgroundSize:"cover",backgroundPosition:"center center"}}),i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{width:"100%",maxHeight:"calc(50vh - 90px)",overflowX:"auto"}},d)))};function Gd(){Gd=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Rd=Object(Fe.b)((function(e){return{store:e}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Cd)((function(e){var t=Ce.getState().db,r=t.dataType,n=t.users,a=Be()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),o=i.a.useState(!1),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=ft();if(i.a.useEffect((function(){return l||(Ce.getState().session.cards.adminViewLoader||d(),s(!0)),function(){e.reduxFunction("ASYNC","SET_SESSION",Object(h.a)(Object(h.a)({},Ce.getState().session),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().session.cards),{},{adminView:!1})}))}}),[]),u&&u.plan&&!u.planAdmin&&!u.planModerate)return i.a.createElement(i.a.Fragment,null);var d=function(){var t=Object(Ne.a)(Gd().mark((function t(r){return Gd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.reduxFunction("ASYNC","SET_SESSION",Object(h.a)(Object(h.a)({},Ce.getState().session),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().session.cards),{},{adminView:!Ce.getState().session.cards.adminView})}));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),p=Object.keys(Ce.getState().db.cards).filter((function(e){return Ce.getState().db.cards[e]&&r.filter((function(t){return t.name===Ce.getState().db.cards[e].type})).length>0})).map((function(e){return Ce.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&&Be()(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 i.a.createElement("div",{style:{width:"100%"}},i.a.createElement(oi,null,i.a.createElement(li,{xs:12,sm:12,md:12,lg:12,xl:12,style:{display:"flex",justifyContent:"space-between"}},i.a.createElement("div",{style:{fontSize:"33px",padding:"15px 0",fontWeight:"bold",color:at("menu")}},tt("$__dayTasks",1))),f.map((function(e){return i.a.createElement(li,{xs:12,sm:12,md:3,lg:3,xl:3,key:e._id,style:{marginBottom:"7px"}},i.a.createElement(Yd,{data:e}))}))))})));var Hd=Object(Fe.b)((function(e){return{history:e.db.history}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Cd)((function(){i.a.useEffect((function(){return function(){}}),[]);var e=window.location.hash.split("/");return e[0]=e[0].replace("#",""),i.a.createElement("div",null,i.a.createElement(Nu,null),"tab"===e[0]&&"resume"===e[1]&&i.a.createElement(Pt,null,i.a.createElement($d,null)),"tab"===e[0]&&"dayTasks"===e[1]&&i.a.createElement(Pt,null,i.a.createElement(Rd,null)))}))),Wd=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)({},hr),{},{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"}}},Ud=Object(_t.a)(Wd);function Vd(){Vd=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 qd=Object(Fe.b)((function(e){return{showPrivate:e.controls.lockPrivate,history:e.db.history}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState(),r=t.db,n=t.session,a=i.a.useState(!1),o=Object(Ae.a)(a,2),c=o[0],l=o[1],s=i.a.useState(null),u=Object(Ae.a)(s,2),d=u[0],p=u[1],f=i.a.useState([]),m=Object(Ae.a)(f,2),g=(m[0],m[1]),v=i.a.useState(0),y=Object(Ae.a)(v,2),b=y[0],x=y[1],_=i.a.useState(10),w=Object(Ae.a)(_,2),E=w[0],j=w[1],k=i.a.useState(!1),S=Object(Ae.a)(k,2),L=S[0],C=(S[1],i.a.useState(F)),I=Object(Ae.a)(C,2),F=I[0],T=(I[1],i.a.useState([])),N=Object(Ae.a)(T,2),A=N[0],D=N[1],P=i.a.useState(0),z=Object(Ae.a)(P,2),$=z[0],M=z[1],B=i.a.useState("created_at"),Y=Object(Ae.a)(B,2),G=Y[0],R=Y[1],H=i.a.useState(!0),W=Object(Ae.a)(H,2),U=W[0],V=W[1],q=i.a.useState(""),X=Object(Ae.a)(q,2),K=X[0],J=X[1],Z=i.a.useState(!0),Q=Object(Ae.a)(Z,2),ee=Q[0],te=Q[1],re=i.a.useState({}),ne=Object(Ae.a)(re,2),ae=ne[0],oe=ne[1],ie=i.a.useState(""),ce=Object(Ae.a)(ie,2),le=ce[0],se=ce[1],ue=i.a.useState({all:{name:tt("$__all",1),icon:"inventory",open:!1,size:0,type:"all"},users:{name:tt("$__users",1),open:!1,size:0,type:"user"},plans:{name:tt("$__plans",1),open:!1,size:0,type:"plan"},myCards:{name:tt("$__unlinkedCards",1),open:!1,size:0,type:"myTask"}}),de=Object(Ae.a)(ue,2),pe=(de[0],de[1],window.location.hash.split("/"));pe[0]=pe[0].replace("#","");var fe=null;pe[0]&&36===pe[0].length&&Ce.getState().db.cards[pe[0]]&&Ce.getState().db.cards[pe[0]]._users&&Ce.getState().db.cards[pe[0]]._users[n._id]&&(fe=pe[0]),i.a.useEffect((function(){return me({id:fe}),he({id:fe}),Tl(),function(){D([]),te(!0)}}),[]),i.a.useEffect((function(){me({id:d})}),[d]),i.a.useEffect((function(){x(0),te(!0),g([]),c||l(!0);var e=setTimeout((function(){me({id:fe})}),1e3);return function(){return clearTimeout(e)}}),[K]),i.a.useEffect((function(){me({id:fe})}),[L,b,E,G,U]);var he=function(){var e=Object(Ne.a)(Vd().mark((function e(t,r){var n,a;return Vd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Tl({ids:t&&t.id?[t.id]:[],childrens:!1,type:t.type?t.type:null});case 2:(n=e.sent)&&(a=r||ae,n.map((function(e){a=Object(h.a)(Object(h.a)({},a),{},Object(O.a)({},e._id,Object(h.a)(Object(h.a)({},a[e._id]?a[e._id]:{}),e)))})),oe(a));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),me=function(){var e=Object(Ne.a)(Vd().mark((function e(t){var r;return Vd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Nl({ids:t&&t.id?[t.id]:[],type:t&&t.type||"cards",limit:E,skip:b*E,asc:!U,orderBy:G||"created_at",search:K});case 2:(r=e.sent)&&(M(r&&r[0]&&r[0].total?parseInt(r[0].total):0),D(r),te(!1));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ge=[],ve=function(e){var t=G,r=U;G===e?r=!U:t=e,R(t),V(r)},ye=function(){var e=Object(Ne.a)(Vd().mark((function e(t){var r,n,a,o,i,c,l=arguments;return Vd().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=ae,c=Object(h.a)(Object(h.a)({},c),{},Object(O.a)({},a,Object(h.a)(Object(h.a)({},c[a]),{},{open:r,loading:!0}))),0===Object.keys(ae).filter((function(e){return ae[e].parent===a})).length?he({id:a,type:i},c):oe(c);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),be=function(e,t){return i.a.createElement("div",{key:t,style:{cursor:"pointer",borderLeft:"solid 0.5px lightgray",paddingLeft:7},onClick:function(r){(!e.private||e.private&&Ce.getState().controls.lockPrivate)&&(ye({id:t},!ae[t]||!ae[t].open),p(t)),r.preventDefault(),r.stopPropagation()}},i.a.createElement(hi,{title:"".concat(e.private&&!Ce.getState().controls.lockPrivate?tt("$__private"):e.name),tooltipText:"".concat(e.private&&!Ce.getState().controls.lockPrivate?tt("$__private"):e.name),icon:(e.private&&!Ce.getState().controls.lockPrivate?"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&&!Ce.getState().controls.lockPrivate?"lightgray":at(d&&d===t?"color":"gray")}),ae[t]&&ae[t].open?xe(t):i.a.createElement(i.a.Fragment,null))},xe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return i.a.createElement("div",{style:{marginLeft:7}},Object.keys(ae).filter((function(t){return!e||e&&ae[t].parent===e})).length>0?Object.keys(ae).filter((function(t){return!e||e&&ae[t].parent===e})).sort((function(e,t){return ae[e].name.toLowerCase().trim()<ae[t].name.toLowerCase().trim()?-1:ae[e].name.toLowerCase().trim()>ae[t].name.toLowerCase().trim()?1:0})).map((function(e){return be(ae[e],e)})):i.a.createElement(i.a.Fragment,null))};return i.a.createElement("div",{style:e.expanded?{width:"calc(100% - 220px)",marginLeft:"220px"}:{width:"calc(100% - 0px)",marginLeft:"0px"}},i.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"}},i.a.createElement(ya,{label:tt("$__search","*"),variant:"standard",autoFocus:!0,value:K,InputProps:{endAdornment:i.a.createElement(Ja.a,{position:"start"},i.a.createElement(xt,{color:at("color")},"search")),onChange:function(e){J(e.target.value)},onKeyDown:function(e){}}}),i.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center"}},i.a.createElement(Ct,{id:"sideModule_saveButton",title:tt("created_at"===G&&U?"$__mostRecent":"$__olderFirst",1),color:"created_at"===G?at("color"):"gray",icon:"calendar_month",onClick:function(){ve("created_at")},size:"25px"}),"created_at"===G&&i.a.createElement("div",{style:Object(h.a)(Object(h.a)({position:"absolute"},U?{bottom:0}:{top:0}),{},{right:-5})},i.a.createElement(xt,{size:"15px",color:at("menu"),style:{marginLeft:"-3px"}},U?"south":"north"))),i.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center"}},i.a.createElement(Ct,{id:"sideModule_saveButton",title:tt("name"===G&&U?"$__nameDesc":"$__nameAsc",1),color:"name"===G?at("color"):"gray",icon:"sort_by_alpha",onClick:function(){ve("name")},size:"25px"}),"name"===G&&i.a.createElement("div",{style:Object(h.a)(Object(h.a)({position:"absolute"},U?{bottom:0}:{top:0}),{},{right:-5})},i.a.createElement(xt,{size:"15px",color:at("menu"),style:{marginLeft:"-3px"}},U?"south":"north")))),i.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)"}},i.a.createElement("div",{style:{position:"absolute",width:333,height:"100%",minHeight:1,padding:15,backgroundColor:"#f4f4f4",borderRight:"solid 0.77px lightGray",display:"flow-root"}},i.a.createElement("div",{style:{display:"flex",marginTop:-10}},i.a.createElement(hi,{title:tt("$__folders",1),icon:"folder",fontSize:"20px",color:at("menu")}),i.a.createElement(ya,{label:tt("$__search","*"),variant:"standard",autoFocus:!0,value:le,InputProps:{endAdornment:i.a.createElement(Ja.a,{position:"start"},i.a.createElement(xt,{color:at("lightgray")},"search")),onChange:function(e){se(e.target.value)},onKeyDown:function(e){}}})),i.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(ae).filter((function(e){return((!pe[0]||pe[0]&&36!==pe[0].length)&&!ae[e].parent||pe&&pe[0]&&36===pe[0].length&&ae[e]&&ae[e].parent&&ae[e].parent===pe[0])&&(""===le||le&&ae[e].name.toLowerCase().indexOf(le.toLowerCase().trim())>-1)})).sort((function(e,t){return ae[e].name.toLowerCase().trim()<ae[t].name.toLowerCase().trim()?-1:ae[e].name.toLowerCase().trim()>ae[t].name.toLowerCase().trim()?1:0})).map((function(e){return be(ae[e],e)})))),i.a.createElement("div",{style:{position:"relative",float:"left",marginLeft:333,width:"calc(100% - 333px)",overflowY:"auto"}},i.a.createElement("div",{style:{position:"relative",width:"100%",padding:"15px"}},i.a.createElement("div",{style:{position:"relative",float:"left",minWidth:177}},i.a.createElement(hi,{title:tt("$__files",1),icon:"cloud",fontSize:"20px",color:at("menu")})),i.a.createElement("div",{style:{position:"relative",float:"right",display:"flex",alignItems:"center",marginTop:-10}},tt("$__page")," ",b+1," ",tt("$__of")," ",Math.ceil($/E),i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},i.a.createElement(wu.a,{component:"div",count:$,page:b,onPageChange:function(e,t){x(t)},rowsPerPage:E,onRowsPerPageChange:function(e){j(parseInt(e.target.value,10))},labelRowsPerPage:tt("$__filesPerPage")})))),ee?i.a.createElement(so,null):A&&A.length>0?A.map((function(t,r){ge.push(t.data);var a=Object(h.a)(Object(h.a)({},t.data),{},{createdBy:t.createdBy,in:t.in});return i.a.createElement("div",{key:"file_".concat(a._id).concat(r),style:{position:"relative",width:"100%",paddingTop:"7px",paddingLeft:"15px",clear:"both"}},i.a.createElement(Cl,{data:a,openLightBox:function(){return function(t){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:ge,file:t})}(a._id)},admin:!!(a.createdBy._id===n._id||a.in._id===n._id||a.access&&parseInt(a.access)>2)}),i.a.createElement("div",{style:{clear:"both"}}))})):i.a.createElement(i.a.Fragment,null),$>10?i.a.createElement("div",{style:{position:"relative",width:"100%",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},tt("$__page")," ",b+1," ",tt("$__of")," ",Math.ceil($/E),i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},i.a.createElement(wu.a,{component:"div",count:$,page:b,onPageChange:function(e,t){x(t)},rowsPerPage:E,onRowsPerPageChange:function(e){j(parseInt(e.target.value,10))},labelRowsPerPage:tt("$__filesPerPage")}))):i.a.createElement(i.a.Fragment,null)),i.a.createElement("div",{style:{clear:"both"}})))})),Xd=r(668),Kd=r.n(Xd),Jd=(r(1432),r(649)),Zd=r.n(Jd);function Qd(){Qd=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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(162).config();var ep="true"===String("true")?"".concat(String("CHEexohmzAHNEotLM0O.WzoOsvjRwlKh/sKKI2AFWaeL7zo4hC")):"".concat(String("qfUeuPdCjDALnPLSJvOVP3tffkxXKETIr9fzoj/kU6acJvFyc")),tp=Object(_t.a)(cu);var rp=Object(Fe.b)((function(){return{}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=i.a.useState({email:null,password:null}),r=Object(Ae.a)(t,2),n=r[0],a=r[1],o=i.a.useState(null),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.a.useState(!1),d=Object(Ae.a)(u,2),p=d[0],f=d[1],m=i.a.useState(null),g=Object(Ae.a)(m,2),v=g[0],y=g[1],b=i.a.useState(!1),x=Object(Ae.a)(b,2),_=x[0],w=x[1],E=tp(),O=function(){var t=Object(Ne.a)(Qd().mark((function t(){var r,a,o,i;return Qd().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("a1b2c3d4")||-1!==window.location.origin.indexOf("192.168")||!(window.location.origin.indexOf("sonne.machen")>-1&&-1===n.email.indexOf("@sonne.global")||-1===window.location.origin.indexOf("sonne.machen")&&n.email.indexOf("@sonne.global")>-1)){t.next=4;break}e.callback({fn:"alert",variant:"warning",horizontal:"center",message:"".concat(tt("$__emailDomainNotPermitedForThisAddress",1))}),t.next=33;break;case 4:if(n.email){t.next=8;break}e.callback({fn:"alert",variant:"warning",horizontal:"center",message:"".concat(tt("$__alertLoginEmptyEmail",1))}),t.next=33;break;case 8:if(n.password){t.next=12;break}e.callback({fn:"alert",variant:"warning",horizontal:"center",message:"".concat(tt("$__alertLoginEmptyPassword",1))}),t.next=33;break;case 12:return w(!0),t.next=15,Kd.a.hash(String(n.password),10);case 15:return r=t.sent,t.next=18,Kd.a.hash(String(n.password),10);case 18:if(a=t.sent,!(o=Object(Tr.encode)("".concat(a,"//").concat(ep)))){t.next=32;break}return t.prev=21,t.next=24,bn.post("/Login",Object(Tr.encode)(Object(Tr.encode)(JSON.stringify({lp:o,login:n.email,password:Object(Tr.encode)("".concat(r,"///").concat(Object(Tr.encode)(n.password),"///").concat(a))}))));case 24:(i=t.sent)&&(i.data&&400===i.data.code?e.callback({fn:"alert",variant:"warning",horizontal:"center",message:"".concat(tt("$__".concat(i.data.error),1))}):i&&i.data&&i.data.twoFactor?(y(i.data.token),f(!0)):i.data.token&&(localStorage.setItem("TOKEN",i.data.token),e.callback&&e.callback({fn:"login",token:i.data.token}))),t.next=32;break;case 28:t.prev=28,t.t0=t.catch(21),console.log(t.t0),e.callback({fn:"alert",variant:"warning",horizontal:"center",message:"".concat(tt("$__alertServerConectionLogin",1))});case 32:setTimeout((function(){w(!1)}),1500);case 33:case"end":return t.stop()}}),t,null,[[21,28]])})));return function(){return t.apply(this,arguments)}}(),j=function(){var t=Object(Ne.a)(Qd().mark((function t(){var r;return Qd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(w(!0),l&&(!l||6===l.length)){t.next=5;break}it({message:tt("$__invalidToken",1),variant:"warning",persist:!1,horizontal:"right"}),t.next=10;break;case 5:return t.next=7,bn.post("/M_User_TwoFactor",{action:"verify",code:l,token:v});case 7:(r=t.sent)&&r.data&&r.data.result?(localStorage.setItem("TOKEN",v),e.callback&&e.callback({fn:"login",token:v})):it({message:tt("$__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(Ne.a)(Qd().mark((function t(r){var n;return Qd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r){t.next=4;break}e.callback({fn:"alert",message:tt("$__loginAlertRecoveryEmailEmpty")}),t.next=14;break;case 4:return t.prev=4,t.next=7,bn.get("/M_User_RecoveryPass/?email=".concat(r));case 7:(n=t.sent)&&n.data?e.callback({fn:"alert",message:tt("$__loginAlertRecoveryEmailSended")}):e.callback({fn:"alert",message:tt("$__loginAlertRecoveryInvalidEmail")}),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),e.callback({fn:"alert",message:tt("$__loginAlertRecoveryError")});case 14:case"end":return t.stop()}}),t,null,[[4,11]])})));return function(e){return t.apply(this,arguments)}}();return i.a.createElement("div",{className:E.container},i.a.createElement(oi,{style:{display:"flex",justifyContent:"center"}},i.a.createElement(li,{xl:4,lg:4,md:4,sm:12,xs:12},i.a.createElement(Zl,{db:"cards",login:!0},i.a.createElement(is,{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)"}},i.a.createElement("h4",{className:E.cardTitle},tt("$__login"))),i.a.createElement(rs,null,p?i.a.createElement(i.a.Fragment,null,i.a.createElement("fieldset",null,i.a.createElement("legend",null,tt("$__token",1)),i.a.createElement(ya,{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:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(He.a,{className:E.inputAdornmentIcon},"pin")),type:"number",autoComplete:!1},autoComplete:"new-password"}))):i.a.createElement(i.a.Fragment,null,i.a.createElement(ru,{labelText:tt("$__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:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(Zd.a,{className:E.inputAdornmentIcon}))}}),i.a.createElement(ru,{labelText:tt("$__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:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(He.a,{className:E.inputAdornmentIcon},"lock_outline")),type:"password",autoComplete:"off"}}),i.a.createElement(Xr,{icon:"lock",text:tt("$__recoveryPass","*"),reverse:!0,style:{float:"right"},onClick:function(){k(n.email)}}))),i.a.createElement(iu,{className:E.justifyContentCenter},p?i.a.createElement(br,{style:{backgroundColor:_?"gray":"#c0b283",color:"#FFFFFF"},simple:!0,size:"lg",block:!0,onClick:function(){return j()}},tt("$__validateTokenAndSigin"),_?i.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0}},i.a.createElement(so,null)):i.a.createElement(i.a.Fragment,null)):i.a.createElement(br,{style:{backgroundColor:_?"gray":"#c0b283",color:"#FFFFFF"},simple:!0,size:"lg",block:!0,onClick:function(){return O()}},tt("$__sigin"),_?i.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0}},i.a.createElement(so,null)):i.a.createElement(i.a.Fragment,null)))))))})),np=Object(_t.a)(Wd);var ap=Object(_t.a)(Wd);var op={container:Object(h.a)(Object(h.a)({},Ut),{},{position:"relative",border:"0.5px solid ".concat(at("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:at("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:at("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:at("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 ip,cp,lp=Object(We.a)(op)(Object(o.memo)((function(e){var t=e.data,r=Ce.getState().db,n=[],a=r.cards,o=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(at("color")),backgroundColor:at("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})),i.a.createElement(Oo.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 i.a.createElement("div",Object.assign({ref:t.innerRef},t.draggableProps,t.dragHandleProps,{style:o(t.draggableProps.style,r)}),i.a.createElement(ki,{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}))}))}))),sp={container:{borderRadius:"2px",marginRight:"7px",marginLeft:"7px",marginBottom:"15px",height:"min-content",width:"100%"},title:Object(h.a)(Object(h.a)({},Ut),{},{padding:"3px 0px",width:"100%",margin:"0px",background:at("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:at("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(at("light")),borderRadius:"2px",display:"block",backgroundColor:"#FFFFFF",boxShadow:"0px 0px 10px rgba(0,0,0,0.1)",overflow:"hidden",padding:"3px"}};function up(){up=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 dp,pp=Ge.default.div(ip||(ip=Object(Te.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 ")})),fp=Ge.default.div(cp||(cp=Object(Te.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(at("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 "})),hp=Object(Fe.b)((function(e){return{store:{search:e.search,cards:e.db.cards}}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(sp)((function(e){Be()().tz("America/Sao_Paulo").format("YYYY/MM/DD");var t=Ce.getState(),r=t.search,n=t.session,a=t.db,o=e.classes,c=i.a.useState(""),l=Object(Ae.a)(c,2),s=l[0],u=l[1],d=i.a.useState(!1),p=Object(Ae.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 v=e.cards;r&&r.cards&&(r.cards.startDate||r.cards.endDate)&&(v=v.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&&(v=v.filter((function(e){return!!(e&&e.name&&e.name.toLowerCase().indexOf(r.text.toLowerCase())>-1)})).map((function(e){return e}))),v=(v=v.filter((function(e){return!(e.status&&!(e&&e.status&&r.cards.status[e.status]))})).map((function(e){return e}))).filter((function(e){return!!(e&&e.priority&&r.cards.priority[e.priority]||r.cards.priority.null&&!e.priority)})).map((function(e){return e})),r.users.selected&&Object.keys(r.users.selected).length>0&&(v=v.filter((function(e){if(e&&e._users&&Object.keys(e._users).filter((function(e){return r.users.selected[e]})).length>0)return!0})).map((function(e){return e}))),Object.keys(r.units.selected).length>0&&(v=r.units.selected.unassigned?v.filter((function(e){if(!e._planId||e._planId&&a.cards[e._planId]&&!a.cards[e._planId].client)return!0})).map((function(e){return e})):v.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&&(v=r.groups.selected.unassigned?v.filter((function(e){if(!e._planId||e._planId&&a.cards[e._planId]&&!a.cards[e._planId].client)return!0})).map((function(e){return e})):v.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&&(v=v.filter((function(e){if(r.plans.selected[e._planId])return!0})).map((function(e){return e}))),r.tags.length>0&&(v=v.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 y=String(n.dashboard.period).replace("$__last","");y=y.replace("Days","");var b=Be()(new Date).tz("America/Sao_Paulo").subtract(parseInt(y),"d").format("YYYY-MM-DDT00:00"),x=Be()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59");e&&e.periodFilter&&(v=v.filter((function(e){if("completed"===e.status&&e.completed_at&&(e.completed_at.low&&Be()(new Date(1e3*e.completed_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=x&&Be()(new Date(1e3*e.completed_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=b||e.completed_at&&!e.completed_at.low&&Be()(new Date(1e3*e.completed_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=x&&Be()(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&&Be()(new Date(1e3*e.updated_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=x&&Be()(new Date(1e3*e.updated_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=b||e.updated_at&&!e.updated_at.low&&Be()(new Date(1e3*e.updated_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=x&&Be()(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||Ce.getState().controls.deleted||(v=v.filter((function(e){return!e.deleted})).map((function(e){return e})));var _=o.cardList+" "+$e()(Object(O.a)({},o.mainPanelWithPerfectScrollbar,navigator.platform.indexOf("Win")>-1)),w=function(){var t=Object(Ne.a)(up().mark((function t(){return up().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Ce.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 e=Object(Ne.a)(up().mark((function e(t){return up().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)}}()),u("");case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),E=tt(e.column.name,1),j={};return Ce.getState().db.cards[g[0]]&&Ce.getState().db.cards[g[0]].customColumns&&(j=JSON.parse(Ce.getState().db.cards[g[0]].customColumns)),j&&j[e.column.name.replace("$__","")]&&j[e.column.name.replace("$__","")].name&&(E=tt(j[e.column.name.replace("$__","")].name,1)),i.a.createElement(Oo.b,{draggableId:e.columnId?String(e.columnId):"NOT_ID_SENDED",index:e.index},(function(t){return i.a.createElement(pp,Object.assign({},!e.isDropDisabled&&t.draggableProps,e,{ref:t.innerRef}),i.a.createElement("div",Object.assign({},t.draggableProps,t.dragHandleProps,{style:{display:"none"}})),i.a.createElement("div",!e.isDropDisabled&&t.dragHandleProps,i.a.createElement(hi,Object.assign({title:E,icon:e.column.icon||"topic",color:at("menu"),style:{padding:"7px"}},g.length>0&&g[1]&&"overview"===g[1]&&Ce.getState().db.cards[g[0]]&&Ce.getState().db.cards[g[0]]._users&&Ce.getState().db.cards[g[0]]._users[n._id]&&Ce.getState().db.cards[g[0]]._users[n._id].access&&parseInt(Ce.getState().db.cards[g[0]]._users[n._id].access)>3?{editable:!0,onEdit:function(t){oa(Object(h.a)(Object(h.a)({},e),{},{data:{_id:g[0]}}),{customColumns:JSON.stringify(Object(h.a)(Object(h.a)({},Ce.getState().db.cards[g[0]]&&Ce.getState().db.cards[g[0]].customColumns?JSON.parse(Ce.getState().db.cards[g[0]].customColumns):{}),{},Object(O.a)({},e.column.name.replace("$__",""),{name:t})))})},placeholder:tt("$__columnName")}:{},{customButtons:[e.columnsSettings&&{name:"settings",icon:"more_horiz",color:at("color"),onClick:function(){return console.log("s")},show:"hover"}],periodFilter:!(!e||!e.periodFilter)}))),i.a.createElement(Oo.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 i.a.createElement(fp,Object.assign({className:_,ref:t.innerRef},t.droppableProps,{isDraggingOver:r.isDraggingOver,inLine:e.inLine},e),v.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 Ce.getState().db.orderByTitle&&"ASC"===Ce.getState().db.orderByTitlePosition?ut(e.name.toLowerCase().trim())<ut(t.name.toLowerCase().trim())?-1:ut(e.name.toLowerCase().trim())>ut(t.name.toLowerCase().trim())?1:0:Ce.getState().db.orderByTitle&&"DESC"===Ce.getState().db.orderByTitlePosition?ut(e.name.toLowerCase().trim())<ut(t.name.toLowerCase().trim())?1:ut(e.name.toLowerCase().trim())>ut(t.name.toLowerCase().trim())?-1:0:Ce.getState().db.orderByTitle?0:!Ce.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:!Ce.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 i.a.createElement("div",{key:t._id||t.id?t._id:null},i.a.createElement(lp,{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&&i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px"}},i.a.createElement(Xr,{text:tt("$__add","*"),icon:"add_box",iconColor:at("medium"),onClick:function(){m(!f)}})),e.inLineAdd&&f&&i.a.createElement("div",{className:o.cardAdd,style:{position:"relative",float:"left",width:"100%",padding:"7px",display:"flex",alignItems:"center"}},i.a.createElement("div",{style:{width:"calc(100% - 50px)",display:"flex"}},i.a.createElement(ya,{label:tt("$__nameOfCard"),variant:at("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:tt("$__titleOfCard_placeholder")})),i.a.createElement("div",{style:{display:"flex"}},i.a.createElement("div",{className:o.button,onClick:function(){return w()}},i.a.createElement(xt,{color:"green",icon:"save",title:tt("$__save","*"),size:e.actionsSize||"25px"})),i.a.createElement("div",{className:o.button,onClick:function(){m(!f),u("")}},i.a.createElement(xt,{color:at("medium"),icon:"cancel",title:tt("$__cancel","*"),size:e.actionsSize||"25px"})))),t.placeholder,i.a.createElement("div",{style:{clear:"both"}}))})))}))})));function mp(){mp=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 gp=Ge.default.div(dp||(dp=Object(Te.a)(["\nheight:100%;\n","\n @media(max-width: 959px) {\n display: contents !important;\n width: -webkit-fill-available;\n height:auto;\n }\n "])),(function(e){return e.inLine?"display: block;\n width: -webkit-fill-available;\n position:relative;\n ".concat(e.style):" display: flex;\n width: 100%;\n ".concat(e.style,"\n @media(min-width: 960px) {\n display: flex;\n }\n ")})),vp=Object(Fe.b)((function(e,t){return{}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState().db;i.a.useEffect((function(){}),[]);var r=function(){var r=Object(Ne.a)(mp().mark((function r(n){var a,o,i,c,l,s,u,d,p,f,m,g;return mp().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=Ce.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||Ce.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)({},Ce.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(O.a)({},"order",Object(O.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(O.a)({},"order",Object(O.a)({},"low",parseInt(r))))})),g=Object(h.a)(Object(h.a)({},t),{},{cards:Object(h.a)(Object(h.a)({},t.cards),{},Object(O.a)({},c,Object(h.a)(Object(h.a)({},t.cards[c]),{},{status:u,completed_at:"completed"===u?{low:Be()().tz("America/Sao_Paulo").unix("x")}:null,updated_at:{low:Be()().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(Ne.a)(mp().mark((function e(t){return mp().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(Ne.a)(mp().mark((function e(t){return mp().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 i.a.createElement(Oo.a,{onDragEnd:r,onDragStart:n,onDragUpdate:a},i.a.createElement(Oo.c,{droppableId:"ALL-COLUMNS-STATUS",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal"),isDropDisabled:!0},(function(t){return i.a.createElement(gp,Object.assign({},e,{ref:t.innerRef}),Ce.getState().db.status.map((function(t,r){var n={name:t.label,icon:t.icon,cards:[],emptyHide:!1};return i.a.createElement(hp,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:Object(h.a)({flex:r,width:"25%"},e.columnStyle?e.columnStyle:{}),viewButton:e.viewButton||!1,periodFilter:!(!t.props||!t.props.periodFilter)}))})),t.placeholder,i.a.createElement("div",{style:{clear:"both"}}))})))}));var yp=Object(Fe.b)((function(e){return{history:e.db.history,cards:e.db.cards,viewList:e.db.viewList}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState(),r=t.db,n=t.session,a=t.search,o=r.dataType,c=i.a.useState(!1),l=Object(Ae.a)(c,2),u=l[0],d=l[1],p=Be()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),f=(Be()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),ft(),window.location.hash.split("/"));if(f[0]=f[0].replace("#",""),i.a.useEffect((function(){u||d(!0)}),[r.cards,a,r.users]),window.location.hash.split("/")[0].replace("#","")||s.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&&o.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=Ce.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 o.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 o.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 o.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(la(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&&Be()(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&&Be()(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&&Be()(new Date(1e3*e.startDate)).tz("America/Sao_Paulo").format()>=Be()(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&&Be()(new Date(1e3*e.endDate)).tz("America/Sao_Paulo").format()<=Be()(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"),i.a.createElement("div",{style:e.expanded?{width:"calc(100% - 220px)",marginLeft:"220px"}:{width:"calc(100% - 0px)",marginLeft:"0px"}},i.a.createElement(Nu,null),i.a.createElement("div",{style:{position:"relative",width:"100%",marginTop:"7px"}},i.a.createElement(Pu,null)),i.a.createElement("div",{style:{position:"relative",width:"100%"}},i.a.createElement(hi,{title:null,icon:null,color:at("menu"),style:{background:"transparent",padding:"7px"},customButtons:[{title:r.orderByTitle?"$__orderByName":"$__orderByManualOrder",icon:r.orderByTitle?"sort":"format_list_numbered",color:at("menu"),onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.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)({},Ce.getState().db),{},{orderByTitlePosition:"ASC"===r.orderByTitlePosition?"DESC":"ASC"}))}}]})),i.a.createElement("div",{style:{position:"relative",minHeight:"calc(100vh - 150px)",marginTop:"7px",width:"100%",overflowX:"auto",overflowY:"hidden"}},i.a.createElement(vp,{cards:m,inLine:r.viewList,showConnectedIn:!0,columnStyle:Object(h.a)({},r.viewList?{width:"100%"}:{maxHeight:"calc(100vh - 190px)",width:"25%"})}),i.a.createElement("div",{style:{clear:"both"}})))}));var bp=Object(Fe.b)((function(e){return{store:{languages:e.languages}}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Eu)((function(e){var t=i.a.useState([]),r=Object(Ae.a)(t,2);return r[0],r[1],i.a.createElement("div",{style:{width:"100%"}},"Resume")})));function xp(){xp=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 _p=Object(Fe.b)((function(e){return{store:{languages:e.languages}}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Eu)((function(e){var t=i.a.useState([]),r=Object(Ae.a)(t,2),n=r[0],a=r[1],o=i.a.useState(null),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.a.useState("name"),d=Object(Ae.a)(u,2),p=d[0],f=d[1],m=i.a.useState(!0),g=Object(Ae.a)(m,2),v=g[0],y=g[1],b=Ce.getState().db.plans;i.a.useEffect((function(){x()}),[]);var x=function(){var e=Object(Ne.a)(xp().mark((function e(){var t;return xp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,bn.post("Adm_ReqAccounts");case 2:t=e.sent,a(t.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_=function(e){p===e?y((function(e){return!e})):f(e)},w=function(e){var t=e.data,r=e.index,n=t.filesSize?parseInt(t.filesSize):0;return n>0&&(n=yt(n)),i.a.createElement("div",null,i.a.createElement("div",{style:Object(h.a)({border:"solid 1px #f6f6f6",width:"100%",padding:7,overflowY:"auto",display:"flex",marginBottom:7},r%2?{background:"linear-gradient(33deg, rgba(255, 255, 255, 1), rgba(247,247,247, 1))"}:{background:"linear-gradient(77deg, rgba(247,247,247, 1), rgba(255, 255, 255, 1))"})},i.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},"#",t.id),i.a.createElement("div",{style:{position:"relative",float:"left",width:"150px",overflow:"hidden",textOverflow:"ellipsis"}},t.name),i.a.createElement("div",{style:{position:"relative",float:"left",width:"300px"}},t.email),i.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"}},t.created_at?vt(t.created_at):""),i.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"}},t.lastSession?vt(t.lastSession):"")))},E=function(e){var t=e.data,r=e.index,n=t&&t.account&&t.account.plan?t.account.plan:0,a=t.users.filter((function(e){return!e.deleted})).length,o=0;return t.users.filter((function(e){return e.filesSize})).map((function(e){o+=parseInt(e.filesSize)})),o>0&&(o=yt(o)),i.a.createElement("div",{style:Object(h.a)({position:"relative",width:"100%",padding:7,marginBottom:3},t.account.deleted?Object(h.a)({},r%2?{background:"linear-gradient(33deg, rgba(237,20,61,0.1), rgba(237,20,61,0.2))"}:{background:"linear-gradient(33deg, rgba(237,20,61,0.2), rgba(237,20,61,0.1))"}):Object(h.a)({},r%2?{background:"linear-gradient(33deg, rgba(255, 255, 255, 1), rgba(247,247,247, 1))"}:{background:"linear-gradient(77deg, rgba(247,247,247, 1), rgba(255, 255, 255, 1))"}))},i.a.createElement("div",{style:{width:"100%",padding:7,overflowY:"auto",display:"flex",marginBottom:3}},i.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},"#",t.id),i.a.createElement("div",{style:{position:"relative",float:"left",width:"300px"}},t.account.name),i.a.createElement("div",{style:{position:"relative",float:"left",width:"200px"}},vt(t.account.created_at)),i.a.createElement("div",{style:{position:"relative",float:"left",width:"200px"}},b[n]&&b[n].label?tt("".concat(b[n].label)):""),i.a.createElement("div",{style:{position:"relative",float:"left",width:"100px",cursor:"pointer",display:"flex"},onClick:function(){l===t.id?s(null):s(t.id)}},i.a.createElement(Ct,{transparent:!0,title:tt("$__showUsers","*"),color:at("lightgrey"),icon:l===t.id?"expand_less":"expand_more",onClick:function(){s(l===t.id?null:t.id)},size:"25px"}),a),i.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},o)),l===t.id?i.a.createElement("fieldset",{style:{borderRadius:5,width:"100%",overflow:"auto",position:"relative"}},i.a.createElement("legend",{style:{display:"flex"}},tt("$__users"),i.a.createElement(Ct,{transparent:!0,title:tt("$__hide","*"),color:at("lightgrey"),icon:"expand_less",onClick:function(){s(null)},size:"25px"})),i.a.createElement("div",{style:{border:"solid 1px #f6f6f6",width:"100%",padding:3,overflowY:"auto",display:"flex",fontWeight:"bold",color:at("menu"),fontSize:"11px"}},i.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"},onClick:function(){_("id")}},"#",tt("$__id")),i.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"},onClick:function(){_("name")}},tt("$__name")),i.a.createElement("div",{style:{position:"relative",float:"left",width:"300px"},onClick:function(){_("email")}},tt("$__email")),i.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"},onClick:function(){_("createdAt")}},tt("$__createdDate")),i.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"},onClick:function(){_("lastSession")}},tt("$__lastSession"))),t.users.sort((function(e,t){var r="",n="";return"id"===p&&(r=e.id,n=t.id),"name"===p&&(r=e.name.toLowerCase(),n=t.name.toLowerCase()),"email"===p&&(r=e.email.toLowerCase(),n=t.email.toLowerCase()),"createdAt"===p&&(r=e.created_at,n=t.created_at),"lastSession"===p&&(r=e.lastSession,n=t.lastSession),r<n?v?-1:1:r>n?v?1:-1:0})).map((function(e,t){return i.a.createElement(w,{data:e,index:t,key:t})}))):i.a.createElement(i.a.Fragment,null))};return i.a.createElement("div",{style:{width:"100%"}},i.a.createElement("div",{style:{border:"solid 1px #f6f6f6",width:"100%",padding:3,overflowY:"auto",display:"flex",fontWeight:"bold",color:at("menu")}},i.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},"#",tt("$__id")),i.a.createElement("div",{style:{position:"relative",float:"left",width:"300px"}},tt("$__company")),i.a.createElement("div",{style:{position:"relative",float:"left",width:"200px"}},tt("$__createdDate")),i.a.createElement("div",{style:{position:"relative",float:"left",width:"200px"}},tt("$__plan")),i.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},tt("$__users")),i.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},tt("$__diskUsed"))),i.a.createElement("div",null,n.filter((function(e){return!l||l===e.id})).sort((function(e,t){var r=e.account.name.toLowerCase(),n=t.account.name.toLowerCase();return r<n?-1:r>n?1:0})).map((function(e,t){return i.a.createElement(E,{index:t,data:e,key:e.account._id})}))))})));function wp(){wp=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Ep=Object(Fe.b)((function(e){return{store:{languages:e.languages}}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Eu)((function(e){var t=e.classes,r=i.a.useState({}),n=Object(Ae.a)(r,2),a=n[0],o=n[1],c=Ce.getState().functions.socket,l=i.a.useState(!1),s=Object(Ae.a)(l,2),u=s[0],d=s[1],p=i.a.useState(0),f=Object(Ae.a)(p,2),h=f[0],m=f[1],g=i.a.useState(25),v=Object(Ae.a)(g,2),y=v[0],b=v[1],x=i.a.useState(""),_=Object(Ae.a)(x,2),w=_[0],E=_[1];i.a.useEffect((function(){o(Ce.getState().languages)}),[JSON.stringify(Ce.getState().languages)]);var O=function(){var e=Object(Ne.a)(wp().mark((function e(t,r,n,a){return wp().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 i.a.createElement("div",{style:{width:"100%"}},i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},tt("$__page")," ",h+1," ",tt("$__of")," ",Math.ceil(Object.keys(a).length/y),i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},i.a.createElement(wu.a,{component:"div",count:Object.keys(a).length,page:h,onChangePage:function(e,t){m(t)},rowsPerPage:y,onChangeRowsPerPage:function(e){b(parseInt(e.target.value,10))},labelRowsPerPage:tt("$__aliasPerPage")}))),i.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center"}},i.a.createElement(ya,{label:tt("$__search",1),variant:at("fieldVariant"),value:w,onChange:function(e){E(e.target.value)}}),i.a.createElement(Xr,{text:tt(u?"$__all":"$__onlyEmpty","*"),icon:u?"subtitles_off":"subtitles",iconColor:at("medium"),onClick:function(){d(!u)}})),i.a.createElement(cn.a,{className:t.root},i.a.createElement("div",{className:t.header},i.a.createElement("div",{className:t.column},tt("$__alias",1)),i.a.createElement("div",{className:t.column},tt("$__translation",1))),i.a.createElement("div",{className:t.body},i.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)*y&&r>=h*y)return i.a.createElement("li",{key:e.trim()},i.a.createElement("div",{className:t.column},e),i.a.createElement("div",{className:t.column2},i.a.createElement("fieldset",{style:{marginBottom:15}},i.a.createElement("legend",null,"Portugu\xeas - Brasil"),i.a.createElement("div",{style:{position:"relative"}},i.a.createElement(hi,{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:at("menu"),noAutoFocus:!0,multiline:!0,noCancel:!0}))),i.a.createElement("fieldset",{style:{marginBottom:15}},i.a.createElement("legend",null,"Ingl\xeas - Internacional"),i.a.createElement(hi,{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:at("menu"),noAutoFocus:!0,multiline:!0,noCancel:!0})),i.a.createElement("fieldset",{style:{marginBottom:15}},i.a.createElement("legend",null,"Espanhol"),i.a.createElement(hi,{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:at("menu"),noAutoFocus:!0,multiline:!0,noCancel:!0}))))}))))))})));var Op=Object(Fe.b)((function(e){return{history:e.db.history}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Cd)((function(e){var t=Ce.getState().session,r=window.location.hash.split("/");r[0]=r[0].replace("#","");var n=i.a.useState(null),a=Object(Ae.a)(n,2),o=a[0],c=a[1],l=i.a.useState(null),s=Object(Ae.a)(l,2),u=s[0],d=s[1];return t._access.master?(window.location.hash.split("/")[0].replace("#",""),i.a.createElement("div",null,!r[0]&&i.a.createElement(bp,null),"tab"===r[0]&&"accounts"===r[1]&&i.a.createElement(_p,null),"tab"===r[0]&&"languages"===r[1]&&i.a.createElement(Ep,null),"tab"===r[0]&&"tests"===r[1]&&i.a.createElement("div",{style:{width:"300px"}},i.a.createElement(Kc,{type:"datetime",onChangeStartDate:function(e){console.log(Be()(e).format("YYYY-MM-DD 23:59:59").unix("X")),c(Be()(e).unix("X"))},onChangeEndDate:function(e){d(Be()(e).unix("X"))},range:!0,startDate:o?new Date(1e3*o):null,endDate:u?new Date(1e3*u):null,onClear:function(){c(null),d(null)}})))):i.a.createElement("div",null,"ACCESS DENIED")}))),jp={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:Vt[0]},warning:{backgroundColor:qt[0]},danger:{backgroundColor:Xt[0]},success:{backgroundColor:Kt[0]},info:{backgroundColor:Jt[0]},rose:{backgroundColor:Zt[0]},gray:{backgroundColor:Qt[0]}};Object(_t.a)(jp);var kp=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:at("color"),boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt("#000")+", 0.4)"},info:{backgroundColor:Jt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(Jt[0])+", 0.4)"},success:{backgroundColor:Kt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(Kt[0])+", 0.4)"},danger:{backgroundColor:Xt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(Xt[0])+", 0.4)"},warning:{backgroundColor:qt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(qt[0])+", 0.4)"},primary:{backgroundColor:Vt[0],boxShadow:"0 4px 20px 0px rgba("+Gt("#000")+", 0.14), 0 7px 10px -5px rgba("+Gt(Vt[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("+Gt("#000")+", 0.14)",borderRadius:"6px",color:"rgba("+Gt("#000")+", 0.87)",background:at("timelineMyMessage")},timelinePanelInverted:{maxWidth:"calc(100% - 70px)",float:"left",padding:"7px",marginLeft:"40px",marginBottom:"5px",position:"relative",boxShadow:"0 1px 4px 0 rgba("+Gt("#000")+", 0.14)",borderRadius:"6px",color:"rgba("+Gt("#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:at("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:at("color")},progressBar:{backgroundColor:"".concat(at("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(at("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(at("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 Sp(){Sp=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Lp=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(kp)((function(e){var t=e.classes,r=Ce.getState(),n=r.db,a=r.session,o=r.functions,c=(r.chat,r.timeline),l=o.socket,s=i.a.useState(e.stories||{}),u=Object(Ae.a)(s,2),d=u[0],p=u[1],f=[];i.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(O.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(O.a)({},r,c[e.nodeId][r]))})),p(t)},g=function(t){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:f,file:t})},v=function(){var t=Object(Ne.a)(Sp().mark((function t(){return Sp().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 i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginBottom:"15px"}},i.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 o=d[r];return!e.showUnReaded&&n>Object.keys(d).length-4?(o.files&&Object.keys(o.files).length>0&&Object.keys(o.files).map((function(e,t){var r=o.files[e];f.push(r)})),i.a.createElement("li",{className:t.item,key:r,style:{}},i.a.createElement(Ji,{openLightBox:function(e){g(e)},storie:o,reply:o.reply?d[o.reply]:null,hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId}))):e.showUnReaded&&o&&o.user&&o.user._id!==a._id&&(!o.readedBy||o.readedBy&&!o.readedBy[a._id])?(o.files&&Object.keys(o.files).length>0&&Object.keys(o.files).map((function(e,t){var r=o.files[e];f.push(r)})),i.a.createElement("li",{className:t.item,key:r,style:{}},i.a.createElement(Ji,{openLightBox:function(e){g(e)},storie:o,reply:o.reply?d[o.reply]:null,hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId}))):void 0})),i.a.createElement("div",{style:{marginBottom:"15px",clear:"both"}})),i.a.createElement(ui,{nodeId:e.nodeId,onSending:function(){v()}}))})));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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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=Object(_t.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 Fp=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=i.a.useState(!1),r=Object(Ae.a)(t,2),n=r[0],a=r[1],o=Ce.getState(),c=o.db,l=o.chat,s=o.timeline,u=e.data,d=Ip();i.a.useEffect((function(){n||a(!0)}));var p="cards";u.nodeId&&Ce.getState().db.users[u.nodeId]&&(p="users");var f=function(){var t=Object(Ne.a)(Cp().mark((function t(r,n){return Cp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Ce.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})):(vo(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||!Ce.getState().db||!Ce.getState().db[p]))return i.a.createElement(i.a.Fragment,null);if(!u.byUser||u.byUser&&!c.users[u.byUser]||u.inNode&&u.inNode.type&&u.inNode._id&&!Ce.getState().db[p][u.inNode._id])return i.a.createElement(i.a.Fragment,null);var m=function(){var e="";return e=Be()().tz("America/Sao_Paulo").format("DD/MM/YYYY")===Be()(1e3*u.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(tt("$__today",1)," ").concat(Be()(1e3*u.created_at).tz("America/Sao_Paulo").format("HH:MM")):Be()().tz("America/Sao_Paulo").format("YYYY")===Be()(1e3*u.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(Be()(1e3*u.created_at).tz("America/Sao_Paulo").format("DD/MM HH:MM")):"".concat(Be()(1e3*u.created_at).tz("America/Sao_Paulo").format("YYYY/DD/MM HH:MM")),i.a.createElement("div",{style:{position:"relative"}},i.a.createElement("div",{style:{position:"relative",alignItems:"center",display:"flex",textSize:"10px",width:"100%",color:at("medium"),justifyContent:"space-between"}},i.a.createElement(Sl,{alt:c.users[u.byUser].name,src:c.users[u.byUser].image||null,size:"sm"},c.users[u.byUser].name.substr(0,1)),i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},tt(u.description)," - ",e,u.readed&&i.a.createElement(xt,{icon:"done_all",color:at("medium"),title:"$__readed"}))))};return i.a.createElement("div",{className:u.readed?d.Readed:d.unReaded},i.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&&Ce.getState().db[p]&&Ce.getState().db[p][u.inNode._id]&&s[u.inNode._id]&&s[u.inNode._id][u.nodeId]&&i.a.createElement("div",{style:{display:"flex",cursor:"pointer"},onClick:function(){var t;"User"===u.inNode.type&&(u&&u.inNode&&u.inNode._id&&Ce.getState().db&&Ce.getState().db.users&&Ce.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"!==Ce.getState().db.cards[u.inNode._id].type?e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},Ce.getState().sideMudule),{},{db:"cards",id:u.inNode._id,module:"cardEdit",activeModule:"timeline",data:Ce.getState().db.cards[u.inNode._id]})):f(u.inNode._id,"cards"))}},i.a.createElement(Ji,{storie:u&&u.inNode&&u.inNode._id&&Ce.getState().db&&Ce.getState().db[p]&&Ce.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]&&i.a.createElement("div",{style:"chatGroup"===Ce.getState().db.cards[u.nodeId].type?{cursor:"pointer"}:{},onClick:function(e){"chatGroup"===Ce.getState().db.cards[u.nodeId].type&&f(u.nodeId,"cards")}},i.a.createElement(m,null),i.a.createElement(ki,{db:"cards",data:Ce.getState().db.cards[u.nodeId],expanded:!0,onlyOption:"chatGroup"===Ce.getState().db.cards[u.nodeId].type,onClick:function(e){"chatGroup"===Ce.getState().db.cards[u.nodeId].type&&f(u.nodeId,"cards")}})),e.showTimeline&&c[p]&&c[p][u.inNode._id]&&i.a.createElement(oi,null,i.a.createElement(li,{xs:12,sm:12,md:4,lg:4,xl:4},i.a.createElement("div",{style:"chatGroup"===Ce.getState().db.cards[u.inNode._id].type?{cursor:"pointer"}:{},onClick:function(e){"chatGroup"===Ce.getState().db.cards[u.inNode._id].type&&f(u.inNode._id,"cards")}},i.a.createElement(m,null),i.a.createElement(ki,{db:"cards",data:Ce.getState().db.cards[u.inNode._id],expanded:!0,onlyOption:"chatGroup"===Ce.getState().db.cards[u.inNode._id].type,onClick:function(e){"chatGroup"===Ce.getState().db.cards[u.inNode._id].type&&f(u.inNode._id,"cards")}}))),i.a.createElement(li,{xs:12,sm:12,md:8,lg:8,xl:8},i.a.createElement("div",{style:{position:"relative",width:"100%",minHeight:"250px"}},i.a.createElement(Lp,{nodeId:u.inNode._id,stories:u&&u.inNode&&u.inNode._id&&Ce.getState().db.cards[u.inNode._id]&&s[u.inNode._id]?s[u.inNode._id]:{},db:"cards"})))))})),Tp=function(e){var t,r;return{bar:{position:"fixed",top:"0px",left:"0px",width:"147px",height:"calc(100vh - 0px)",backgroundColor:at("menu")},item:{height:"47px",alignItems:"center",width:"100%",display:"flex"},itemButtom:(t={width:"100%",padding:"7px",color:at("color",.8),"&:hover":{color:at("color",1),backgroundColor:"rgba(255,255,255,0.1)",borderRadius:"0px"},display:"flex",fontSize:"12px",fontWeight:"bold",alignItems:"center"},Object(O.a)(t,"alignItems","center"),Object(O.a)(t,"cursor","pointer"),t),itemButtomActive:{width:"100%",padding:"7px",color:at("color",1),backgroundColor:"rgba(255,255,255,0.2)",borderRadius:"0px",display:"flex",alignItems:"center",fontSize:"12px",fontWeight:"bold",cursor:"pointer"},themeExample:(r={},Object(O.a)(r,e.breakpoints.up("md"),{left:"auto !important",right:"0 !important"}),Object(O.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(at("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(at("color")),padding:"7px",overflowX:"auto"},moduleTitle:{width:"100%",height:"30px",fontSize:"18px",color:at("color"),fontWeight:"bold",paddingLeft:"7px",marginTop:"15px"},sidebarWrapperWithPerfectScrollbar:{},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(at("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"},logoImg:{width:"66%",marginTop:"15px",justifyContent:"center"},user:{zIndex:"150 !important"}}};function Np(){Np=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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(162).config();var Ap=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Tp)((function(e){var t=Ce.getState(),r=t.db,n=(t.session,t.chat),a=t.notifications,o=t.timeline,c=e.classes,l=i.a.useState(!1),u=Object(Ae.a)(l,2),d=u[0],p=u[1],f=i.a.useState(null),m=Object(Ae.a)(f,2),g=m[0],v=m[1],y=window.location.hash.split("/");y[0]=y[0].replace("#",""),i.a.useEffect((function(){d||p(!0)}),[a]);var b=function(){var t=Object(Ne.a)(Np().mark((function t(r,a,o){var i,c=arguments;return Np().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=c.length>3&&void 0!==c[3]?c[3]:"users",!r||window.location.pathname===r&&a!==g||s.push(r),v(a),"chat"!==a||o?"chat"===a&&o?e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},n),{},{open:!0,db:i,nodeId:o})):e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},n),{},{open:!1})):e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},n),{},{open:!0}));case 4:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),x=[],_=[];Object.keys(a).sort((function(e,t){return parseInt(a[e].created_at)>parseInt(a[t].created_at)?-1:1})).filter((function(e){return"card"===a[e].module})).sort((function(e,t){return a[e].created_at.low-a[t].created_at.low})).map((function(e,t){-1===_.indexOf(a[e].nodeId)&&(x.push(e),_.push(a[e].nodeId))}));var w=[],E=[];return Object.keys(a).sort((function(e,t){return parseInt(a[e].created_at)>parseInt(a[t].created_at)?-1:1})).filter((function(e){return"timeline"===a[e].module})).sort((function(e,t){return a[e].created_at.low-a[t].created_at.low})).map((function(e,t){a[e].inNode&&a[e].inNode._id&&-1===E.indexOf(a[e].inNode._id)&&(w.push(e),E.push(a[e].inNode._id))})),r.myTasksMenuExpanded,i.a.createElement("div",null,i.a.createElement(oi,null,i.a.createElement(li,{xs:12,sm:12,md:12,lg:12,xl:12},i.a.createElement("div",{className:c.moduleTitle},tt("$__notifications"))),i.a.createElement(li,{xs:12,sm:6,md:4,lg:4,xl:4},i.a.createElement("div",{className:c.moduleTitle},tt("$__cardsUpdated")),x.map((function(e){if(!y[1]||y[1]&&("important"===y[1]||"favorite"===y[1]||"archive"===y[1]||"latest"===y[1]))return i.a.createElement(Fp,{data:a[e],key:e})}))),i.a.createElement(li,{xs:12,sm:6,md:8,lg:8,xl:8},i.a.createElement("div",{className:c.moduleTitle},tt("$__timelineUpdated")),w.map((function(e){if(!y[1]||y[1]&&("important"===y[1]||"favorite"===y[1]||"archive"===y[1]||"latest"===y[1]))return i.a.createElement(Fp,{data:a[e],key:e,openChat:function(e,t){return b(null,"chat",e,t)},showTimeline:!0,timeline:a[e]&&a[e].inNode&&a[e].inNode._id&&r.cards[a[e].inNode._id]&&o[a[e].inNode._id]?o[a[e].inNode._id]:{}})})))))}))),Dp={root:{position:"relative",width:"100%",backgroundColor:"".concat(at("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"#FFFFFF !important"},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(at("color")," !important")},"& .text":{position:"absolute",width:"40px",right:"-40px",top:"-9px",textAlign:"right",textSize:"11px",fontWeight:"bold",color:at("color")}},bar:{borderRadius:7}};var Pp=Object(We.a)(Dp)((function(e){var t=e.classes;return i.a.createElement("div",{className:t.root},i.a.createElement(co.a,null))})),zp=r(1598),$p={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:Vt[0]+"!important"},checkedIcon:{width:"20px",height:"20px",border:"1px solid rgba("+Gt("#000")+", .54)",borderRadius:"3px",display:"flex",justifyContent:"center",alignItems:"center"},uncheckedIcon:{width:"0px",height:"0px",padding:"9px",border:"1px solid rgba("+Gt("#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:Qt[3],fontSize:"12px",lineHeight:"1.428571429",fontWeight:"400",display:"inline-flex",transition:"0.3s ease all",letterSpacing:"unset"},labelHorizontal:{color:"rgba("+Gt("#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("+Gt("#000")+", 0.26)",cursor:"pointer",display:"inline-flex",fontSize:"12px",lineHeight:"1.428571429",fontWeight:"400",paddingTop:"22px",marginRight:"0"},labelError:{color:Xt[0]},radio:{color:Vt[0]+"!important"},radioChecked:{width:"16px",height:"16px",border:"1px solid "+Vt[0],borderRadius:"50%"},radioUnchecked:{width:"0px",height:"0px",padding:"7px",border:"1px solid rgba("+Gt("#000")+", .54)",borderRadius:"50%"},inlineChecks:{marginTop:"8px"},iconCheckbox:{height:"116px",width:"116px",color:Qt[0],padding:"0",margin:"0 auto 20px","& > span:first-child":{borderWidth:"4px",borderStyle:"solid",borderColor:Qt[9],textAlign:"center",verticalAlign:"middle",borderRadius:"50%",color:"inherit",transition:"all 0.2s"},"&:hover":{color:Zt[0],"& > span:first-child":{borderColor:Zt[0]}}},iconCheckboxChecked:{color:Zt[0],"& > span:first-child":{borderColor:Zt[0]}},iconCheckboxIcon:{fontSize:"40px",lineHeight:"111px"},switchBase:{color:Vt[0]+"!important"},switchIcon:{boxShadow:"0 1px 3px 1px rgba("+Gt("#000")+", 0.4)",color:"#FFF !important",border:"1px solid rgba("+Gt("#000")+", .54)"},switchIconChecked:{borderColor:Vt[0],transform:"translateX(0px)!important"},switchBar:{width:"30px",height:"15px",backgroundColor:"rgb("+Gt(Qt[18])+")",borderRadius:"15px",opacity:"0.7!important"},switchChecked:{"& + $switchBar":{backgroundColor:"rgba("+Gt(Vt[0])+", 1) !important"},"& $switchIcon":{borderColor:Vt[0]}}},Mp=Object(h.a)(Object(h.a)({},$p),{},{cardTitle:Object(h.a)(Object(h.a)({},mr),{},{textAlign:"center"}),container:Object(h.a)(Object(h.a)({},Wt),{},{position:"relative",zIndex:"3"}),cardSignup:{borderRadius:"6px",boxShadow:"0 16px 24px 2px rgba("+Gt("#000")+", 0.14), 0 6px 30px 5px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt("#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:Qt[6]},textFields:{margin:"15px 0"},checkboxLabelControl:{margin:"0"},checkboxLabel:{fontSize:"12px",marginLeft:"6px",color:"rgba("+Gt("#000")+", 0.26)"}});function Bp(){Bp=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Yp=Object(_t.a)(Mp);var Gp=Object(Fe.b)((function(e,t){return{db:e.db}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=e.db,r=t.dataType,n=window.location.hash.split("/");if(n[0]=n[0].replace("#",""),!t.cards)return i.a.createElement("div",null);var a=Object.keys(t.cards).filter((function(a){if(!t.cards[a].checklist&&t.cards[a]._planId===n[0]&&("actions"===e.type&&t.cards[a]&&t.cards[a].type&&"objective"!==t.cards[a].type&&"goal"!==t.cards[a].type&&"plan"!==t.cards[a].type&&"link"!==t.cards[a].type&&"insight"!==t.cards[a].type&&"chatGroup"!==t.cards[a].type&&-1===t.cards[a].type.indexOf("guideline")&&"swot"!==r.filter((function(e){return e.name===t.cards[a].type}))[0].module||"guidelines"===e.type&&t.cards[a].type.indexOf("guideline")>-1||"objectives"===e.type&&t.cards[a].type.indexOf("objective")>-1||"goals"===e.type&&t.cards[a].type.indexOf("goal")>-1))return!0})).map((function(e){return t.cards[e]}));return i.a.createElement("div",null,i.a.createElement(hi,{title:null,icon:null,color:at("menu"),style:{background:"transparent",padding:"7px"},customButtons:[{title:t.orderByTitle?"$__orderByName":"$__orderByManualOrder",icon:t.orderByTitle?"sort":"format_list_numbered",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{orderByTitle:!t.orderByTitle}))}},t.orderByTitle&&{title:"ASC"===t.orderByTitlePosition?"$__asc":"$__desc",icon:"ASC"===t.orderByTitlePosition?"text_rotation_down":"text_rotate_up",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{orderByTitlePosition:"ASC"===t.orderByTitlePosition?"DESC":"ASC"}))}}]}),i.a.createElement(vp,{cards:a}))})),Rp=r(939),Hp=r(1572);function Wp(){Wp=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Up=Object(Fe.b)((function(e){return{store:{cards:e.db.cards}}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState(),r=t.db,n=(t.session,i.a.useState(!1)),a=Object(Ae.a)(n,2),o=a[0],c=a[1],l=i.a.useState(1),s=Object(Ae.a)(l,2),u=s[0],d=s[1],p=i.a.useState(1),m=Object(Ae.a)(p,2),g=m[0],v=m[1],y=i.a.useState(1),b=Object(Ae.a)(y,2),x=b[0],_=b[1],w=i.a.useState({editor:!1,text:"",height:"auto"}),E=Object(Ae.a)(w,2),j=E[0],k=E[1],S=i.a.useState(!1),L=Object(Ae.a)(S,2),C=L[0],I=L[1],F=i.a.useState({type:"comment",disabledSend:!1}),T=Object(Ae.a)(F,2),N=T[0],A=T[1],D=Be()().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 z=ft(),$=ea(P[0]);i.a.useEffect((function(){o||(k(r.cards[P[0]].note?Object(h.a)(Object(h.a)({},j),{},{text:r.cards[P[0]].note?r.cards[P[0]].note:""}):Object(h.a)({},j)),c(!0))}));var M=function(){var t=Object(Ne.a)(Wp().mark((function t(n){return Wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!j.text&&!n){t.next=6;break}return t.next=3,Cn(e,!1,Object(h.a)(Object(h.a)({},r.cards[P[0]]),{},{note:n?null:j.text}));case 3:t.sent&&it({message:tt("$__noteSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),k({editor:!1,text:n?"":j.text,height:"auto"});case 6:I(!1);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();if(!P[0]||!P[0]||!r.cards[P[0]])return i.a.createElement(i.a.Fragment,null);var B=la(P[0]);return i.a.createElement("div",{style:{width:"calc(100% + 30px)",paddingBottom:"30px",marginLeft:"-15px"}},i.a.createElement(oi,null,i.a.createElement(li,{xs:12,sm:6,md:6,lg:6,style:{padding:0}},i.a.createElement("div",{style:{width:"100%"}},i.a.createElement(Zl,{style:{marginTop:"0"}},i.a.createElement(_a,{title:tt("$__planResume",1),icon:"blur_on",color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"},moreButton:!0,optionsProps:{transparent:!0,btColor:at("color")},options:$&&parseInt($)>3||z.owner||z.planAdmin||z.planEdit||z.planModerate?[{name:"$__edit",icon:"edit",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},Ce.getState().sideModule),{},{db:"cards",id:P[0],module:"cardEdit",activeModule:"cardEdit",data:r.cards[P[0]]}))}}]:[],actionButtonsStyle:{top:"-9px !important"}}),i.a.createElement(rs,null,i.a.createElement("div",{style:{width:"100%",color:at("menu")}},i.a.createElement("span",{style:{fontWeight:"bold"}},tt("$__name",1),":")," ",r.cards[P[0]].name),i.a.createElement("div",{style:{width:"100%",color:at("menu")}},i.a.createElement("span",{style:{fontWeight:"bold"}},tt("$__description",1),":")," ",r.cards[P[0]].description),!r.cards[P[0]].isTemplate&&r.cards[P[0]]&&r.cards[P[0]]._users&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{width:"100%",marginTop:"15px",color:at("menu"),fontWeight:"bold"}},tt("$__users","*"),":"),i.a.createElement(ro,{_id:P[0],noLimit:!0,avatarSize:"33px",permission:!0}))))),i.a.createElement("div",{style:{width:"100%"}},i.a.createElement("div",null,i.a.createElement(Zl,{style:{marginTop:"0"}},i.a.createElement(hi,{title:tt("$__notes",1),icon:"note",color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"},customButtons:[].concat(Object(f.a)(j.text&&!j.editor?[{title:"$__cleanNote",icon:"clear_all",onClick:function(){M(!0)}},{title:"$__edit",icon:"edit",onClick:function(){k(Object(h.a)(Object(h.a)({},j),{},{editor:!0}))}}]:[]),[C&&{title:"$__saveNote",icon:"save",onClick:function(){M()}},j.editor&&{title:"$__cancel",icon:"cancel",onClick:function(){k(Object(h.a)(Object(h.a)({},j),{},{text:r.cards[P[0]].note,editor:!1})),I(!1)}}])}),i.a.createElement(rs,{style:{display:"flex",justifyContent:"center"}},j.text||j.editor?j.editor?i.a.createElement(Hp.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:tt("$__planNotePlaceholder"),onChange:function(e){I(!0),k(Object(h.a)(Object(h.a)({},j),{},{text:e.target.value}))},onBlur:function(e){""!==e.target.value&&e.target.value!==r.cards[P[0]].note||(I(!1),k(Object(h.a)(Object(h.a)({},j),{},{editor:!1})))},autoFocus:!0,spellcheck:!1},j.text):i.a.createElement("div",{style:{fontSize:"16px",width:"100%"},onClick:function(){k(Object(h.a)(Object(h.a)({},j),{},{editor:!0}))},dangerouslySetInnerHTML:{__html:rt(j.text)}}):i.a.createElement("div",{style:{display:"flex",alignItems:"center",userSelect:"none",cursor:"pointer"},onClick:function(){k(Object(h.a)(Object(h.a)({},j),{},{editor:!0}))}},i.a.createElement("div",{style:{padding:"7px",border:"dotted 1px rgba(0,0,0,0.2)",borderRadius:"7px"}},i.a.createElement(xt,{size:"33px",color:"rgba(0,0,0,0.2)"},"add")),i.a.createElement("div",{style:{color:"rgba(0,0,0,0.2)",fontSize:"22px",fontWeight:"bold",marginLeft:"15px"}},tt("$__addNote")))))))),i.a.createElement(li,{xs:12,sm:6,md:6,lg:6},i.a.createElement("div",null,i.a.createElement(Zl,{style:{marginTop:"0",height:"500px"}},i.a.createElement(hi,{title:tt("$__timeline",1),icon:"blur_on",color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"},customButtons:[{name:"$__timeline",icon:"timeline",actionsSize:"22px",count:B.comment,onClick:function(){A({type:"comment",disabledSend:!1})}},{name:"$__log",icon:"history",actionsSize:"22px",count:B.log,onClick:function(){A({type:"log",disabledSend:!0})}},{name:"$__timer",icon:"timer",actionsSize:"22px",count:B.timer,onClick:function(){A({type:"timer",disabledSend:!0})}},{name:"$__kpi",icon:"analytics",actionsSize:"22px",count:B.kpi,onClick:function(){A({type:"kpi",disabledSend:!0})}}],actionButtonsStyle:{top:"-9px !important"}}),i.a.createElement(rs,null,i.a.createElement(dc,Object(h.a)({nodeId:P[0],db:"cards",loadTimeline:!0},N)))))),i.a.createElement(li,{xs:12,sm:12,md:12,lg:12},i.a.createElement(oi,null,i.a.createElement(li,{xs:12,sm:6,md:6,lg:3},i.a.createElement(Zl,null,i.a.createElement(_a,{title:tt("$__matrix",1),icon:G.a,color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"}}),i.a.createElement(is,{style:{height:"300px",display:"flex"}},i.a.createElement(Rp.a,{data:{name:"root",children:[{name:tt("$__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:tt("$__strength",1),value:Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"strength"===r.cards[e].type})).length},{name:tt("$__weakness",1),value:Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"weakness"===r.cards[e].type})).length},{name:tt("$__opportunity",1),value:Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"opportunity"===r.cards[e].type})).length},{name:tt("$__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})),i.a.createElement(rs,null,i.a.createElement("h3",null,i.a.createElement("small",null,tt("$__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)),i.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},i.a.createElement("div",{style:{display:"flex"}},i.a.createElement(xt,{icon:G.a}),i.a.createElement("span",{style:{marginLeft:"15px"}},tt("$__guidelines",1))),i.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)),i.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},i.a.createElement("div",{style:{display:"flex"}},i.a.createElement(xt,null,"arrow_upward"),i.a.createElement("span",{style:{marginLeft:"15px"}},tt("$__strength",1))),i.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)),i.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},i.a.createElement("div",{style:{display:"flex"}},i.a.createElement(xt,null,"arrow_downward"),i.a.createElement("span",{style:{marginLeft:"15px"}},tt("$__weakness",1))),i.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)),i.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},i.a.createElement("div",{style:{display:"flex"}},i.a.createElement(xt,null,"trending_up"),i.a.createElement("span",{style:{marginLeft:"15px"}},tt("$__opportunity",1))),i.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)),i.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},i.a.createElement("div",{style:{display:"flex"}},i.a.createElement(xt,null,"trending_down"),i.a.createElement("span",{style:{marginLeft:"15px"}},tt("$__threat",1))),i.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))))),i.a.createElement(li,{xs:12,sm:6,md:6,lg:3},i.a.createElement(Zl,null,i.a.createElement(_a,{title:tt("$__objectives",1),icon:"gps_fixed",color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"}}),i.a.createElement(is,{style:{height:"300px",display:"flex"}},i.a.createElement(Wl.a,{data:[].concat(Object(f.a)(r.status.map((function(e,t){return{id:tt(e.label,1),label:tt(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:tt("$__late",1),label:tt("$__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&&Be()(new Date(1e3*r.cards[e].endDate)).tz("America/Sao_Paulo").format()<=Be()(new Date(D)).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})),i.a.createElement(rs,null,i.a.createElement("h3",null,i.a.createElement("small",null,tt("$__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 i.a.createElement("div",{key:"".concat(t,"_").concat(e.value),style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},i.a.createElement("div",{style:{display:"flex"}},i.a.createElement(xt,{color:e.color},e.icon),i.a.createElement("span",{style:{marginLeft:"15px"}},tt(e.label,1))),i.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))})),i.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},i.a.createElement("div",{style:{display:"flex"}},i.a.createElement(xt,{color:"red"},"assignment_late"),i.a.createElement("span",{style:{marginLeft:"15px"}},tt("$__late",1))),i.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&&Be()(new Date(1e3*r.cards[e].endDate)).tz("America/Sao_Paulo").format()<=Be()(new Date(D)).tz("America/Sao_Paulo").format()})).length))))),i.a.createElement(li,{xs:12,sm:6,md:6,lg:3},i.a.createElement(Zl,null,i.a.createElement(_a,{title:tt("$__goals",1),icon:"flag",color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"}}),i.a.createElement(is,{style:{height:"300px",display:"flex"}},i.a.createElement(Wl.a,{data:[].concat(Object(f.a)(r.status.map((function(e,t){return{id:tt(e.label,1),label:tt(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:tt("$__late",1),label:tt("$__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&&Be()(new Date(1e3*r.cards[e].endDate)).tz("America/Sao_Paulo").format()<=Be()(new Date(D)).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})),i.a.createElement(rs,null,i.a.createElement("h3",null,i.a.createElement("small",null,tt("$__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 i.a.createElement("div",{key:"".concat(t,"_").concat(e.value),style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},i.a.createElement("div",{style:{display:"flex"}},i.a.createElement(xt,{color:e.color},e.icon),i.a.createElement("span",{style:{marginLeft:"15px"}},tt(e.label,1))),i.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))})),i.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},i.a.createElement("div",{style:{display:"flex"}},i.a.createElement(xt,{color:"red"},"assignment_late"),i.a.createElement("span",{style:{marginLeft:"15px"}},tt("$__late",1))),i.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&&Be()(new Date(1e3*r.cards[e].endDate)).tz("America/Sao_Paulo").format()<=Be()(new Date(D)).tz("America/Sao_Paulo").format()})).length))))),i.a.createElement(li,{xs:12,sm:6,md:6,lg:3},i.a.createElement(Zl,null,i.a.createElement(_a,{title:tt("$__actions",1),icon:"play_arrow",color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"}}),i.a.createElement(is,{style:{height:"300px",display:"flex"}},i.a.createElement(Wl.a,{data:[].concat(Object(f.a)(r.status.map((function(e,t){return{id:tt(e.label,1),label:tt(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:tt("$__late",1),label:tt("$__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&&Be()(new Date(1e3*r.cards[e].endDate)).tz("America/Sao_Paulo").format()<=Be()(new Date(D)).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})),i.a.createElement(rs,null,i.a.createElement("h3",null,i.a.createElement("small",null,tt("$__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 i.a.createElement("div",{key:"".concat(t,"_").concat(e.value),style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},i.a.createElement("div",{style:{display:"flex"}},i.a.createElement(xt,{color:e.color},e.icon),i.a.createElement("span",{style:{marginLeft:"15px"}},tt(e.label,1))),i.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))})),i.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},i.a.createElement("div",{style:{display:"flex"}},i.a.createElement(xt,{color:"red"},"assignment_late"),i.a.createElement("span",{style:{marginLeft:"15px"}},tt("$__late",1))),i.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&&Be()(new Date(1e3*r.cards[e].endDate)).tz("America/Sao_Paulo").format()<=Be()(new Date(D)).tz("America/Sao_Paulo").format()})).length)))))))),i.a.createElement(oi,null,Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"completed"!==r.cards[e].status&&r.cards[e].startDate&&Be()(new Date(1e3*r.cards[e].startDate)).tz("America/Sao_Paulo").format()>=Be()(new Date(D)).tz("America/Sao_Paulo").format()})).length>0&&i.a.createElement(li,{md:6,xs:12},i.a.createElement(Zl,null,i.a.createElement(_a,{title:tt("$__nextActivities",1),icon:"pending_actions",color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"}}),i.a.createElement(rs,null,i.a.createElement(oi,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&&Be()(new Date(1e3*r.cards[e].startDate)).tz("America/Sao_Paulo").format()>=Be()(new Date(D)).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*(g-1)&&t<7*g)return i.a.createElement(ki,Object(O.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&&Be()(new Date(1e3*r.cards[e].startDate)).tz("America/Sao_Paulo").format()>=Be()(new Date(D)).tz("America/Sao_Paulo").format()})).length/7)>1&&i.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center"}},i.a.createElement(Yl.a,{page:g,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&&Be()(new Date(1e3*r.cards[e].startDate)).tz("America/Sao_Paulo").format()>=Be()(new Date(D)).tz("America/Sao_Paulo").format()})).length/7),onChange:function(e,t){v(t)}})))))),Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"completed"!==r.cards[e].status&&r.cards[e].endDate&&Be()(new Date(1e3*r.cards[e].endDate)).tz("America/Sao_Paulo").format()<=Be()(new Date(D)).tz("America/Sao_Paulo").format()})).length>0&&i.a.createElement(li,{md:6,xs:12},i.a.createElement(Zl,null,i.a.createElement(_a,{title:tt("$__lateActivities",1),icon:"pending_actions",color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"}}),i.a.createElement(rs,null,i.a.createElement(oi,null,Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"completed"!==r.cards[e].status&&r.cards[e].endDate&&Be()(new Date(1e3*r.cards[e].endDate)).tz("America/Sao_Paulo").format()<=Be()(new Date(D)).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*(x-1)&&t<7*x)return i.a.createElement(ki,Object(O.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&&Be()(new Date(1e3*r.cards[e].endDate)).tz("America/Sao_Paulo").format()<=Be()(new Date(D)).tz("America/Sao_Paulo").format()})).length/7)>1&&i.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center"}},i.a.createElement(Yl.a,{page:x,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&&Be()(new Date(1e3*r.cards[e].endDate)).tz("America/Sao_Paulo").format()<=Be()(new Date(D)).tz("America/Sao_Paulo").format()})).length/7),onChange:function(e,t){_(t)}})))))),Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===P[0]&&"completed"===r.cards[e].status})).length>0&&i.a.createElement(li,{md:6,xs:12},i.a.createElement(Zl,null,i.a.createElement(_a,{title:tt("$__lastCompletedCards",1),icon:"pending_actions",color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"}}),i.a.createElement(rs,null,i.a.createElement(oi,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 i.a.createElement(ki,{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&&i.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center"}},i.a.createElement(Yl.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&&Be()(new Date(1e3*r.cards[e]._users[t].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===D})).length>0)return!0})).length>0&&i.a.createElement(li,{md:6,xs:12},i.a.createElement(Zl,null,i.a.createElement(_a,{title:tt("$__todayTasks",1),icon:"today",color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"}}),i.a.createElement(rs,null,i.a.createElement(oi,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&&Be()(new Date(1e3*r.cards[e]._users[t].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===D})).length>0)return!0})).map((function(e){return i.a.createElement(ki,{db:"cards",key:e,data:r.cards[e]})})))))),i.a.createElement(li,{md:6,xs:12},i.a.createElement(Pt,null,i.a.createElement(fs,{nodeId:P[0]})))))}));var Vp,qp=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(zu)((function(e){e.classes;var t=Ce.getState(),r=t.db,n=t.search,a=i.a.useState(0),o=Object(Ae.a)(a,2),c=o[0],l=o[1],s=i.a.useState(25),u=Object(Ae.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})),i.a.createElement("div",{style:{position:"relative",justifyContent:"space-between",margin:"auto",width:"100%"}},Object.keys(h).length>25&&i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},tt("$__page")," ",c+1," ",tt("$__of")," ",Math.ceil(Object.keys(h).length/d),i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},i.a.createElement(wu.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:tt("$__insightsPerPage")}))),i.a.createElement(oi,null,Object.keys(h).map((function(e,t){if(t<=(c+1)*d&&t>=c*d)return i.a.createElement(li,{key:h[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},i.a.createElement(ki,{db:"cards",data:h[e],expanded:!0,Avatar:!0,Resume:!0}))}))),Object.keys(h).length>25&&i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},tt("$__page")," ",c+1," ",tt("$__of")," ",Math.ceil(Object.keys(h).length/d),i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},i.a.createElement(wu.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:tt("$__insightsPerPage")}))))})));function Xp(){Xp=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Kp,Jp=Ge.default.div(Vp||(Vp=Object(Te.a)(["\n background-color:none;\n "]))),Zp=Object(Fe.b)((function(e){return{store:e}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState(),r=t.db,n=t.session,a=Ce.getState().functions.socket,o=i.a.useState(e.defaultName?e.defaultName:""),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.a.useState(!1),d=Object(Ae.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(Ne.a)(Xp().mark((function t(){var r;return Xp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(r=Ce.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(Ne.a)(Xp().mark((function e(t){return Xp().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(O.a)({},t.log._id,Object(h.a)(Object(h.a)({},t.log),{},{_parent:[t.id]})),_users:Object(O.a)({},n._id,{name:Ce.getState().db.users[n._id].name?Ce.getState().db.users[n._id].name:null,displayName:Ce.getState().db.users[n._id].displayName?Ce.getState().db.users[n._id].displayName:null,image:Ce.getState().db.users[n._id].image?Ce.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)}}(),v=function(){var t=Object(Ne.a)(Xp().mark((function t(n){var o,i,c,l,s;return Xp().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),Ze.put("cards/reorder",{cards:l}),s={},l.map((function(e,t){return(s=Object(h.a)(Object(h.a)({},s),{},Object(O.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)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.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)}}(),y=function(){var e=Object(Ne.a)(Xp().mark((function e(t){return Xp().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(Ne.a)(Xp().mark((function e(t){return Xp().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 i.a.createElement(i.a.Fragment,null,i.a.createElement(Oo.a,{onDragEnd:v,onDragStart:y,onDragUpdate:b},i.a.createElement(Oo.c,{droppableId:"Drop_".concat(e.cardType||""),type:"column",direction:"vertical"},(function(t,n){return i.a.createElement(Jp,Object.assign({ref:t.innerRef},t.droppableProps,{isDraggingOver:n.isDraggingOver}),e.cards.map((function(e,t){return i.a.createElement(Oo.b,{draggableId:e,index:t,key:e},(function(t,n){return i.a.createElement(ki,{provided:t,snapshot:n,data:r.cards[e],db:"cards",viewButton:!0,selectOption:!0})}))})),t.placeholder)}))),!p&&i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px"}},i.a.createElement(Xr,{text:tt("$__add","*"),icon:"add_box",iconColor:at("medium"),onClick:function(){f(!p)}})),p&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px",display:"flex",alignItems:"center"}},i.a.createElement("div",{style:{width:"calc(100% - 50px)",display:"flex"}},i.a.createElement(ya,{label:tt("$__nameOfCard"),variant:at("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:tt("$__titleOfCard_placeholder")})),i.a.createElement("div",{style:{display:"flex"}},i.a.createElement("div",{onClick:function(){return g()}},i.a.createElement(xt,{color:"green",icon:"save",title:tt("$__save","*"),size:e.actionsSize||"25px"})),i.a.createElement("div",{onClick:function(){f(!p),s("")}},i.a.createElement(xt,{color:at("medium"),icon:"cancel",title:tt("$__cancel","*"),size:e.actionsSize||"25px"}))))))})),Qp=r(1570),ef=r(1680),tf=r(1681),rf=r(1679),nf=r(534),af=Object(_t.a)({avatar:{backgroundColor:nf.a[100],color:nf.a[600]}});function of(e){af();var t=e.open,r=(e.selectedValue,e.onClose);return i.a.createElement(mi.a,{onClose:function(){r()},"aria-labelledby":"simple-dialog-title",open:t},e&&e.title&&i.a.createElement(rf.a,{id:"simple-dialog-title"},e.title),i.a.createElement(Bt.a,null,e.options.map((function(e,t){return i.a.createElement(Qp.a,{button:!0,onClick:function(){e.onClick&&e.onClick(),r()},key:t},i.a.createElement(ef.a,null,i.a.createElement(xt,{icon:e.icon})),i.a.createElement(tf.a,{primary:tt(e.name,1)}))}))))}function cf(e){var t=i.a.useState(!1),r=Object(Ae.a)(t,2),n=r[0],a=r[1],o=i.a.useState(null),c=Object(Ae.a)(o,2),l=c[0],s=c[1];return i.a.createElement(i.a.Fragment,null,i.a.createElement(Xr,{text:e.text?e.text:null,icon:e.icon?e.icon:"add_box",size:e.iconSize?e.iconSize:null,iconColor:e.iconColor?e.iconColor:at("medium"),onClick:function(){a(!0)}}),i.a.createElement(of,{selectedValue:l,open:n,onClose:function(){var e;a(!1),s(e)},options:e.options}))}function lf(){lf=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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=Ge.default.div(Kp||(Kp=Object(Te.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 ")})),uf=Object(Fe.b)((function(e){return{store:{cards:e.db.cards}}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState().db,r=i.a.useState(!1),n=Object(Ae.a)(r,2),a=n[0],o=n[1];i.a.useEffect((function(){a||(o(!0),Gn(e))}));var c=function(){var r=Object(Ne.a)(lf().mark((function r(n){var a,o,i,c,l,s,u,d,p,f,m,g,v;return lf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=Ce.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)({},Ce.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(O.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(O.a)({},e,Object(h.a)(Object(h.a)({},g[e]?g[e]:{}),{},{order:{low:t}})))})),v=Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},g),{},Object(O.a)({},c,Object(h.a)(Object(h.a)({},g[c]),{},{type:s,order:{low:o.index}})))}),e.reduxFunction("ASYNC","SET_DB",Object(h.a)({},v)),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 i.a.createElement(Oo.a,{onDragEnd:c},i.a.createElement(Oo.c,{droppableId:"ALL-COLUMNS-STATUS",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal")},(function(r){return i.a.createElement(sf,Object.assign({},e,{ref:r.innerRef}),t.swot.map((function(t,r){var n={name:t.label,icon:t.icon,cards:[],emptyHide:!1};return i.a.createElement(hp,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 df,pf=Object(Fe.b)((function(e,t){return{store:e,hidePrivate:e.controls.hidePrivate}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t,r=Ce.getState().db,n=r.dataType,a=i.a.useState(!1),o=Object(Ae.a)(a,2),c=o[0],l=o[1],s=r.cards,u=window.location.hash.split("/");u[0]=u[0].replace("#",""),u[0]&&36!==u[0].length&&(u[0]=null),i.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(O.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,v=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})),y=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)({},Ce.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)({},Ce.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 i.a.createElement("div",{style:{width:"inherit"}},!m&&i.a.createElement(i.a.Fragment,null,i.a.createElement(zt.a,{smDown:!0},i.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 7px)",marginRight:"14px",padding:"7px",background:at("ColumnTitleColor"),color:at("color"),fontSize:"16px",fontWeight:"bold",marginBottom:"15px",textAlign:"center"}},tt("$__internalAspects",1)),i.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 7px)",padding:"7px",background:at("ColumnTitleColor"),color:at("color"),fontSize:"16px",fontWeight:"bold",marginBottom:"15px",textAlign:"center"}},tt("$__externalAspects",1))),i.a.createElement(zt.a,{smUp:!0},i.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(100% - 7px)",padding:"7px",background:at("ColumnTitleColor"),color:at("color"),fontSize:"16px",fontWeight:"bold",marginBottom:"15px",textAlign:"center"}},tt("$__s.W.O.T","*"))),i.a.createElement(uf,(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(O.a)(t,"showSelected",Object.keys(d).filter((function(e){return!0===d[e]._selected})).length>0),Object(O.a)(t,"inLineAdd",!0),t))),i.a.createElement(oi,null,i.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(100% - 28px)",marginRight:"14px",marginLeft:"14px",padding:"7px",background:at("ColumnTitleColor"),color:at("color"),fontSize:"16px",fontWeight:"bold",marginBottom:"15px",textAlign:"center"}},f?tt("$__planning",1):"MATRIX SWOT"),f?i.a.createElement(i.a.Fragment,null,i.a.createElement(li,{md:3,sm:12,xs:12},i.a.createElement("div",null,i.a.createElement(hi,{title:"MATRIX SWOT",icon:n.filter((function(e){return"matrix"===e.name}))[0].icon,color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"}}),e.hidePrivate&&s[f]&&s[f].private?i.a.createElement(i.a.Fragment,null):i.a.createElement(ki,{data:s[f],db:"cards",selectOption:!0,expanded:!0}),i.a.createElement(Xr,{icon:"undo",text:tt("$__backToMatrix","*"),onClick:function(){_("guideline")}})),m&&i.a.createElement("div",null,i.a.createElement(hi,{title:tt("$__objective",1),icon:n.filter((function(e){return"objective"===e.name}))[0].icon,color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"}}),e.hidePrivate&&s[m]&&s[m].private?i.a.createElement(i.a.Fragment,null):i.a.createElement(ki,{data:s[m],db:"cards",selectOption:!0,expanded:!0})),g&&i.a.createElement("div",null,i.a.createElement(hi,{title:tt("$__goal",1),icon:n.filter((function(e){return"goal"===e.name}))[0].icon,color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"},customButtons:[{title:"$__new",icon:"add_box",color:at("menu"),onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},Ce.getState().sideModule),{},{id:"new",activeModule:n.filter((function(e){return"goal"===e.name}))[0].iniModule,db:"cards",data:{type:"goal",_parent:m,status:"notStarted"}}))}}]}),e.hidePrivate&&s[g]&&s[g].private?i.a.createElement(i.a.Fragment,null):i.a.createElement(ki,{data:s[g],db:"cards",selectOption:!0,expanded:!0}))),i.a.createElement(li,{md:9,sm:12,xs:12},i.a.createElement(hi,{title:tt(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:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"},actionButtonsStyle:{position:"absolute",top:0,bottom:0,display:"flex",itemAligns:"center"},customButtons:[g?{component:i.a.createElement(cf,{iconColor:at("color"),options:n.filter((function(e){return"agile"===e.module})).map((function(t){return{icon:t.icon,name:tt("$__".concat(t.name),1),onClick:function(){return e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},Ce.getState().sideModule),{},{id:"new",db:"cards",data:{type:t.name,_parent:g,status:"notStarted"}}))}}}))})}:{title:"$__new",icon:"add_box",color:at("color"),actionsSize:"22px",show:!0,onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},Ce.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"}}))}}]}),i.a.createElement(vp,{cards:p.map((function(e){return d[e]})),viewButton:!0}))):i.a.createElement(li,{md:12},i.a.createElement(oi,{style:{paddingBottom:"33px"}},i.a.createElement(li,{md:3,sm:12,xs:12},i.a.createElement(hi,{title:tt("$__guidelineR",1),icon:n.filter((function(e){return"matrix"===e.name}))[0].icon,color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"}}),i.a.createElement("div",{style:{position:"relative",width:"100%",padding:"7px",minHeight:"130px",backgroundColor:"#F9F9F9",borderRadius:"0 0 7px 7px"}},i.a.createElement("div",{style:{position:"relative",width:"100%",color:at("menu"),fontWeight:"bold",paddingBottom:"7px",borderBottom:"solid 1px #e4e4e4",textAlign:"center"}},tt("$__guidelineRtypes",1)),i.a.createElement("div",{style:{position:"relative",width:"100%",color:at("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},tt("$__guidelineRdetails",1))),i.a.createElement(Zp,{cards:v,cardType:"guidelineR"})),i.a.createElement(li,{md:3,sm:12,xs:12},i.a.createElement(hi,{title:tt("$__guidelineD",1),icon:n.filter((function(e){return"matrix"===e.name}))[0].icon,color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"}}),i.a.createElement("div",{style:{position:"relative",width:"100%",padding:"7px",minHeight:"130px",backgroundColor:"#F9F9F9",borderRadius:"0 0 7px 7px"}},i.a.createElement("div",{style:{position:"relative",width:"100%",color:at("menu"),fontWeight:"bold",paddingBottom:"7px",borderBottom:"solid 1px #e4e4e4",textAlign:"center"}},tt("$__guidelineDtypes",1)),i.a.createElement("div",{style:{position:"relative",width:"100%",color:at("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},tt("$__guidelineDdetails",1))),i.a.createElement(Zp,{cards:x,cardType:"guidelineD"})),i.a.createElement(li,{md:3,sm:12,xs:12},i.a.createElement(hi,{title:tt("$__guidelineC",1),icon:n.filter((function(e){return"matrix"===e.name}))[0].icon,color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"}}),i.a.createElement("div",{style:{position:"relative",width:"100%",padding:"7px",minHeight:"130px",backgroundColor:"#F9F9F9",borderRadius:"0 0 7px 7px"}},i.a.createElement("div",{style:{position:"relative",width:"100%",color:at("menu"),fontWeight:"bold",paddingBottom:"7px",borderBottom:"solid 1px #e4e4e4",textAlign:"center"}},tt("$__guidelineCtypes",1)),i.a.createElement("div",{style:{position:"relative",width:"100%",color:at("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},tt("$__guidelineCdetails",1))),i.a.createElement(Zp,{cards:y,cardType:"guidelineC"})),i.a.createElement(li,{md:3,sm:12,xs:12},i.a.createElement(hi,{title:tt("$__guidelineE",1),icon:n.filter((function(e){return"matrix"===e.name}))[0].icon,color:at("color"),style:{background:at("ColumnTitleColor"),padding:"7px"}}),i.a.createElement("div",{style:{position:"relative",width:"100%",padding:"7px",minHeight:"130px",backgroundColor:"#F9F9F9",borderRadius:"0 0 7px 7px"}},i.a.createElement("div",{style:{position:"relative",width:"100%",color:at("menu"),fontWeight:"bold",paddingBottom:"7px",borderBottom:"solid 1px #e4e4e4",textAlign:"center"}},tt("$__guidelineEtypes",1)),i.a.createElement("div",{style:{position:"relative",width:"100%",color:at("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},tt("$__guidelineEdetails",1))),i.a.createElement(Zp,{cards:b,cardType:"guidelineE"}))))))}));function ff(){ff=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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=Ge.default.div(df||(df=Object(Te.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 ")})),mf=Object(Fe.b)((function(e,t){return{store:{cards:e.db.cards}}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState(),r=t.db,n=t.session,a=r.dataType,o=i.a.useState(!1),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.a.useState({}),d=Object(Ae.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 a=la(t);if(r.cards[t]&&(!r.cards[t].private||r.cards[t].private&&r.cards[t]._users[n._id])&&(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&&a.total>0))return!0})).map((function(e){g=Object(h.a)(Object(h.a)({},g),{},Object(O.a)({},e,r.cards[e]))}));var v=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,y=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:v},{value:"goals",type:"goal",label:"$__goals",icon:a.filter((function(e){return"goal"===e.name}))[0].icon,viewButton:!0,selectedParent:y||v},{value:"actions",type:"iniciative",label:"$__actions",icon:"double_arrow",selectedParent:b||y||v}],_={};_.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||!v&&g[e]._planId===m[0])}))||null,_.objectives=Object.keys(g).filter((function(e){return"objective"===g[e].type&&!g[e].checklist&&(v&&g[e]._parent===v||!v&&g[e]._planId===m[0])})),_.objectives2=Object.keys(g).filter((function(e){if("objective"===g[e].type&&g[e]._parent!==v&&!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&&(!y&&_.objectives.indexOf(g[e]._parent)>-1||y&&g[e]._parent===y||!y&&v&&g[e]._parent===v||!v&&!y&&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&&y&&(g[e]._parent===y||_.goals.indexOf(g[e]._parent)>-1)||!b&&!y&&v&&(g[e]._parent===v||_.objectives.indexOf(g[e]._parent)>-1||_.goals.indexOf(g[e]._parent)>-1)||!b&&!y&&!v&&(!v&&_.guidelines.indexOf(g[e]._parent)>-1||!y&&_.objectives.indexOf(g[e]._parent)>-1||!b&&_.goals.indexOf(g[e]._parent)>-1)||!b&&!y&&!v&&!v&&!y&&!b&&g[e]._planId===m[0])}))||null,_.guidelines=_.guidelines.map((function(e){return g[e]})),_.objectives=_.objectives.map((function(e){return g[e]})),_.goals=_.goals.map((function(e){return g[e]})),_.actions=_.actions.map((function(e){return g[e]}));var w=function(){var t=Object(Ne.a)(ff().mark((function t(n){var a,o,i,c,l,u,d,p,m;return ff().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 it({message:"".concat(tt("$__confirmLink",1),": ").concat(Ce.getState().db.cards[i].name," >>> ").concat(Ce.getState().db.cards[n.combine.draggableId]?Ce.getState().db.cards[n.combine.draggableId].name:""),variant:"warning",persist:!0,horizontal:"right",confirm:function(){Qn(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||Ce.getState().db.orderByTitle){t.next=14;break}return t.abrupt("return");case 14: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(O.a)({},"order",Object(O.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(O.a)({},"order",Object(O.a)({},"low",parseInt(t))))})),p=na(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?it({message:tt("$__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):it({message:"".concat(tt("$__confirmTransformIn",1),": ").concat(tt("$__".concat(a.droppableId))),variant:"warning",persist:!0,horizontal:"right",confirm:function(){E(m)},cancel:function(){console.log("1111111"),f({})}});case 23:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),E=function(){var t=Object(Ne.a)(ff().mark((function t(r){var n;return ff().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r,p&&p._id&&(n=p),t.next=4,Dn(e,n);case 4:e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},n._id,Object(h.a)(Object(h.a)({},Ce.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)}}(),j=function(){var t=Object(Ne.a)(ff().mark((function t(r){var n;return ff().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(Ne.a)(ff().mark((function t(a,o){return ff().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,Dn(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)}}(),k=function(){var t=Object(Ne.a)(ff().mark((function t(){return ff().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Dn(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)}}(),S=function(){var e=Object(Ne.a)(ff().mark((function e(t){return ff().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)}}(),L=function(){var e=Object(Ne.a)(ff().mark((function e(t){return ff().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 i.a.createElement("div",null,i.a.createElement(Oo.a,{onDragEnd:w,onDragStart:S,onDragUpdate:L},i.a.createElement(Oo.c,{droppableId:"ALL-COLUMNS-TYPE",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal"),isDropDisabled:!0},(function(t){return i.a.createElement(hf,Object.assign({},e,{ref:t.innerRef}),x.map((function(t,r){var n={name:t.label,icon:t.icon,cards:[],emptyHide:!1};return i.a.createElement(hp,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)}))),i.a.createElement(mi.a,{fullWidth:!0,"aria-labelledby":"simple-dialog-title",open:l},i.a.createElement("div",{style:{position:"relative",marginLeft:"10px",marginTop:"5px",width:"calc(100% - 10px)"}},i.a.createElement(_a,{title:tt("$__attention",1),icon:"label",onCancel:function(){s(!1),f({})}})),i.a.createElement("div",{style:{color:"#CCCCCC",padding:"15px"}},p._childrens&&!p._skipGoals&&p._goals.length>0&&p._goals.filter((function(e){return Ce.getState().db.cards[e._id]&&Ce.getState().db.cards[e._id].type===e.type})).length>0&&i.a.createElement(i.a.Fragment,null,i.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?",i.a.createElement("p",{style:{color:"red"}},"Essa a\xe7\xe3o s\xf3 pode ser desfeita manualmente")),p._goals.filter((function(e){return Ce.getState().db.cards[e._id]&&Ce.getState().db.cards[e._id].type===e.type})).sort((function(e,t){return Ce.getState().db.orderByTitle&&"ASC"===Ce.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()<t.name.toLowerCase().trim()||Ce.getState().db.orderByTitle&&"DESC"===Ce.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()>t.name.toLowerCase().trim()?-1:Ce.getState().db.orderByTitle?0:!Ce.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 i.a.createElement("div",{style:{width:"calc(100%)",display:"flex",alignItems:"center",justifyContent:"center"},key:t._id},i.a.createElement(ki,(n={db:"cards",data:t},Object(O.a)(n,"db","cards"),Object(O.a)(n,"noShadow",!0),n)),i.a.createElement(kt.a,{onClick:function(){Dn(e,{_id:t._id,type:"task"})}},i.a.createElement(xt,{icon:"change_circle",color:at("menu"),title:tt("$__transformInTask")})))})),i.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},i.a.createElement(Ct,{shadow:!0,title:tt("$__skipAll"),text:tt("$__skipAll"),color:"lightgrey",icon:"skip_next",size:"25px",onClick:function(){f(Object(h.a)(Object(h.a)({},p),{},{_skipGoals:!0}))}}),i.a.createElement("div",{style:{marginLeft:"15px"}},i.a.createElement(Ct,{shadow:!0,title:tt("$__changeAllInTasks"),text:tt("$__changeAllInTasks"),icon:"change_circle",size:"25px",onClick:function(){j("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 Ce.getState().db.cards[e._id]&&Ce.getState().db.cards[e._id].type===e.type})).length>0&&i.a.createElement(i.a.Fragment,null,i.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?",i.a.createElement("p",{style:{color:"red"}},"Essa a\xe7\xe3o s\xf3 pode ser desfeita manualmente")),p._objectives.filter((function(e){return Ce.getState().db.cards[e._id]&&Ce.getState().db.cards[e._id].type===e.type})).sort((function(e,t){return Ce.getState().db.orderByTitle&&"ASC"===Ce.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()<t.name.toLowerCase().trim()||Ce.getState().db.orderByTitle&&"DESC"===Ce.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()>t.name.toLowerCase().trim()?-1:Ce.getState().db.orderByTitle?0:!Ce.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 i.a.createElement("div",{style:{width:"calc(100%)",display:"flex",alignItems:"center",justifyContent:"center"},key:t._id},i.a.createElement(ki,{db:"cards",data:t,noShadow:!0}),i.a.createElement(kt.a,{onClick:function(){Dn(e,{_id:t._id,type:"goal"})}},i.a.createElement(xt,{icon:"change_circle",color:at("menu"),title:tt("$__transformInGoal")})))})),i.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},i.a.createElement(Ct,{shadow:!0,title:tt("$__skipAll"),text:tt("$__skipAll"),color:"lightgrey",icon:"skip_next",size:"25px",onClick:function(){f(Object(h.a)(Object(h.a)({},p),{},{_skipObjectives:!0}))}}),i.a.createElement("div",{style:{marginLeft:"15px"}},i.a.createElement(Ct,{shadow:!0,title:tt("$__changeAllInGoal"),text:tt("$__changeAllInGoal"),icon:"change_circle",size:"25px",onClick:function(){j("objectives"),f(Object(h.a)(Object(h.a)({},p),{},{_skipObjectives:!0}))}}))),i.a.createElement("div",{style:{marginLeft:"15px"}},i.a.createElement(Ct,{shadow:!0,title:tt("$__cancel"),text:tt("$__cancel"),icon:"cancel",size:"25px",onClick:function(){s(!1),f({})}}))),(p&&p._childrens&&Object.keys(p._childrens).length>0&&0===p._goals.filter((function(e){return Ce.getState().db.cards[e._id]&&Ce.getState().db.cards[e._id].type===e.type})).length&&0===p._objectives.filter((function(e){return Ce.getState().db.cards[e._id]&&Ce.getState().db.cards[e._id].type===e.type})).length||p._skipGoals&&p._goals.length>0&&p._skipObjectives&&p._objectives.length>0)&&i.a.createElement(i.a.Fragment,null,i.a.createElement("span",{style:{color:"red"}},"#NEED_TRANSLATE:: Clique em salvar para finalizar as migra\xe7\xf5es."),i.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},i.a.createElement(Ct,{shadow:!0,title:tt("$__cancel"),text:tt("$__cancel"),color:"lightgrey",icon:"close",size:"25px",onClick:function(){s(!1),f({})}}),i.a.createElement("div",{style:{marginLeft:"15px"}},i.a.createElement(Ct,{shadow:!0,title:tt("$__save"),text:tt("$__save"),icon:"done_all",size:"25px",onClick:function(){k()}})))))))})),gf=Object(_t.a)(Au);var vf=Object(Fe.b)((function(e){return{store:{search:e.search,users:e.db.users}}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=gf(),r=Ce.getState(),n=r.usersStatus,a=r.db,o=r.search,c=r.session,l=i.a.useState(!1),s=Object(Ae.a)(l,2),u=s[0],d=s[1],p=i.a.useState(""),f=Object(Ae.a)(p,2),m=f[0],g=f[1],v=i.a.useState(""),y=Object(Ae.a)(v,2),b=y[0],x=y[1],_=i.a.useState(""),w=Object(Ae.a)(_,2),E=w[0],j=w[1],k=[],S=window.location.hash.split("/");S[0]=S[0].replace("#",""),36!==S[0].length&&(S[0]=null);var L=window.location.pathname.split("/"),C="/".concat(L[1]),I=1;if(S[0]){var F=a.cards[S[0]]||{};(I=F&&F._users&&Object.keys(F._users).length>0?F._users[Object.keys(F._users).find((function(e){return e.indexOf(c._id)>-1}))]:0)&&I.access&&(I=I.access)}var T=function(t,r){Ce.getState().search.units.selected[t]&&Object.keys(Ce.getState().search.units.selected).filter((function(e){return Ce.getState().search.units.selected[e]})).length<=1?e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},Ce.getState().search),{},{units:Object(h.a)(Object(h.a)({},Ce.getState().search.units),{},{selected:{}})},r?{groups:{selected:{}}}:{})):e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},Ce.getState().search),{},{units:Object(h.a)(Object(h.a)({},Ce.getState().search.units),{},{selected:Object(h.a)(Object(h.a)({},Ce.getState().search.units.selected&&Ce.getState().search.units.selected),{},Object(O.a)({},t,!Ce.getState().search.units.selected[t]))})},r?{groups:{selected:{}}}:{}))};return S[1]&&Oh.filter((function(e){return e.path===C})).length>0&&Oh.filter((function(e){return e.path===C}))[0].tabs&&Oh.filter((function(e){return e.path===C}))[0].tabs.length>0?(Oh.filter((function(e){return e.path===C}))[0].tabs&&Oh.filter((function(e){return e.path===C}))[0].tabs).map((function(e){e.path===S[1]&&(k=e.searchFields)})):Oh.filter((function(e){return e.path===C})).length>0&&Oh.filter((function(e){return e.path===C}))[0].searchFields&&(k=Oh.filter((function(e){return e.path===C}))[0].searchFields),i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{position:"relative",width:"100%",padding:"0px",marginBottom:"15px"}},k&&k.length>0&&k.indexOf("text")>-1&&i.a.createElement("div",{className:t.textField,style:{width:"100%"}},i.a.createElement(ya,{className:t.noLabelLight,label:tt("$__search","*"),variant:"standard",autoFocus:!0,value:o.text,InputProps:{endAdornment:i.a.createElement(Ja.a,{position:"start"},i.a.createElement(xt,{color:at("color")},"search")),onChange:function(t){e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},Ce.getState().search),{},{text:t.target.value}))},onKeyDown:function(e){"27"===String(e.which)&&d(!1)}}})),k.indexOf("period")>-1&&i.a.createElement(i.a.Fragment,null,"PERIOD"),k.indexOf("date")>-1?i.a.createElement(i.a.Fragment,null,i.a.createElement(Kc,{type:"datetime",onChangeStartDate:function(t){var r={startDate:Be()(t).unix("x")};(!Ce.getState().search.cards.endDate||Ce.getState().search.cards.endDate<Be()(t).unix("x"))&&(r=Object(h.a)(Object(h.a)({},r),{},{endDate:Be()("".concat(Be()(t).format("YYYY-MM-DD")," 23:59:59")).add(1,"week").unix("X")})),e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},Ce.getState().search),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().search.cards),r)}))},onChangeEndDate:function(t){e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},Ce.getState().search),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().search.cards),{},{endDate:Be()(t).unix("x")})}))},range:!0,startDate:Ce.getState().search.cards.startDate?new Date(1e3*Ce.getState().search.cards.startDate):null,endDate:Ce.getState().search.cards.endDate?new Date(1e3*Ce.getState().search.cards.endDate):null,onClear:function(){e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},Ce.getState().search),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().search.cards),{},{startDate:null,endDate:null})}))}})):i.a.createElement(i.a.Fragment,null),k.indexOf("tags")>-1?i.a.createElement(xc,{dbNode:"tag",options:Ce.getState().db.tag,style:{width:"100%"},name:"tag",ws:!0,multiple:!0,value:o.tags,placeholder:tt("$__tags"),onChange:function(t){e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},Ce.getState().search),{},{tags:t}))}}):i.a.createElement(i.a.Fragment,null),k.indexOf("status")>-1&&i.a.createElement(cs.a,{style:{width:"100%",padding:0}},i.a.createElement(ss.a,{style:{minWidth:"100%"},expandIcon:i.a.createElement(xt,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},i.a.createElement("div",{style:{color:at("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},i.a.createElement("div",{style:{position:"relative",float:"left"}},tt("$__status")),i.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},Object.keys(o.cards.status).map((function(e,t){if(o.cards.status[e]&&"all"!==e)return i.a.createElement(Ue.a,{title:tt(a.status.filter((function(t){return t.value===e}))[0].label,1),key:t},i.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:a.status.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))}))))),i.a.createElement(ls.a,{style:{minWidth:"100%"}},i.a.createElement(ds.a,{style:{width:"100%"}},i.a.createElement(us.a,{style:{minWidth:"100%"},control:i.a.createElement(Xa,{checked:!(!Ce.getState().search.cards.status||!Ce.getState().search.cards.status.all),onChange:function(){var t={};a.status.map((function(e){t=Object(h.a)(Object(h.a)({},t),{},Object(O.a)({},e.value,!Ce.getState().search.cards.status.all))})),e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},Ce.getState().search),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().search.cards),{},{status:Object(h.a)(Object(h.a)({},t),{},{all:!Ce.getState().search.cards.status.all})})}))},color:"default"}),label:tt("$__allStatus")}),a.status.map((function(t,r){return i.a.createElement(i.a.Fragment,{key:r},i.a.createElement(us.a,{style:{minWidth:"100%"},control:i.a.createElement(Xa,{indeterminate:!!Ce.getState().search.cards.status.all,checked:!(!Ce.getState().search.cards.status||!Ce.getState().search.cards.status[t.value]),onChange:function(){var r=Ce.getState().search.cards.status;r.all&&a.status.map((function(e){r[e.value]=!1,r.all=!1})),e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},Ce.getState().search),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().search.cards),{},{status:Object(h.a)(Object(h.a)({},r),{},Object(O.a)({},t.value,!!r.all||!Ce.getState().search.cards.status[t.value]))})}))},color:"default"}),label:tt(t.label)}))}))))),k.indexOf("priority")>-1&&i.a.createElement(cs.a,{style:{width:"100%"}},i.a.createElement(ss.a,{style:{minWidth:"100%"},expandIcon:i.a.createElement(xt,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},i.a.createElement("div",{style:{color:at("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},i.a.createElement("div",{style:{position:"relative",float:"left"}},tt("$__priority")),i.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},Object.keys(o.cards.priority).map((function(e,t){if(o.cards.priority[e]&&"all"!==e)return i.a.createElement(Ue.a,{title:tt(a.priority.filter((function(t){return String(t.value)===String(e)}))[0].label,1),key:t},i.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:a.priority.filter((function(t){return String(t.value)===String(e)}))[0].color,margin:"7px 3px"}}))}))))),i.a.createElement(ls.a,{style:{minWidth:"100%"}},i.a.createElement(ds.a,{style:{width:"100%"}},i.a.createElement(us.a,{style:{minWidth:"100%"},control:i.a.createElement(Xa,{checked:!(!Ce.getState().search.cards.priority||!Ce.getState().search.cards.priority.all),onChange:function(){var t=Ce.getState().search.cards.priority;t.all?a.priority.map((function(e){t[String(e.value)]=!1})):a.priority.map((function(e){t[String(e.value)]=!0})),e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},Ce.getState().search),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().search.cards),{},{priority:Object(h.a)(Object(h.a)({},t),{},{all:!Ce.getState().search.cards.priority.all})})}))},color:"default"}),label:tt("$__allPriorities")}),a.priority.map((function(t,r){return i.a.createElement(i.a.Fragment,{key:r},i.a.createElement(us.a,{style:{minWidth:"100%",borderLeft:"3px solid ".concat(t.color)},control:i.a.createElement(Xa,{indeterminate:!(!Ce.getState().search.cards.priority||!Ce.getState().search.cards.priority.all),checked:!(!Ce.getState().search.cards.priority||!Ce.getState().search.cards.priority[t.value]),onChange:function(){var r=Ce.getState().search.cards.priority;r.all&&a.priority.map((function(e){r[String(e.value)]=!1,r.all=!1})),e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},Ce.getState().search),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().search.cards),{},{priority:Object(h.a)(Object(h.a)({},r),{},Object(O.a)({},t.value,!!r.all||!Ce.getState().search.cards.priority[t.value]))})}))},color:"default"}),label:tt(t.label)}))}))))),k.indexOf("risk")>-1&&i.a.createElement(cs.a,{style:{width:"100%"}},i.a.createElement(ss.a,{style:{minWidth:"100%"},expandIcon:i.a.createElement(xt,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},i.a.createElement("div",{style:{color:at("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},i.a.createElement("div",{style:{position:"relative",float:"left"}},tt("$__risk")),i.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},Object.keys(o.cards.risk).map((function(e,t){if(o.cards.risk[e]&&"all"!==e)return i.a.createElement(Ue.a,{title:tt(a.priority.filter((function(t){return String(t.value)===String(e)}))[0].label,1),key:t},i.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:a.priority.filter((function(t){return String(t.value)===String(e)}))[0].color,margin:"7px 3px"}}))}))))),i.a.createElement(ls.a,{style:{minWidth:"100%"}},i.a.createElement(ds.a,{style:{width:"100%"}},i.a.createElement(us.a,{style:{minWidth:"100%"},control:i.a.createElement(Xa,{checked:!(!Ce.getState().search.cards.risk||!Ce.getState().search.cards.risk.all),onChange:function(){var t=Ce.getState().search.cards.risk;t.all?a.priority.map((function(e){t[String(e.value)]=!1})):a.priority.map((function(e){t[String(e.value)]=!0})),e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},Ce.getState().search),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().search.cards),{},{risk:Object(h.a)(Object(h.a)({},t),{},{all:!Ce.getState().search.cards.risk.all})})}))},color:"default"}),label:tt("$__allPriorities")}),a.priority.map((function(t,r){return i.a.createElement(i.a.Fragment,{key:r},i.a.createElement(us.a,{style:{minWidth:"100%",borderLeft:"3px solid ".concat(t.color)},control:i.a.createElement(Xa,{indeterminate:!(!Ce.getState().search.cards.risk||!Ce.getState().search.cards.risk.all),checked:!(!Ce.getState().search.cards.risk||!Ce.getState().search.cards.risk[t.value]),onChange:function(){var r=Ce.getState().search.cards.risk;r.all&&a.priority.map((function(e){r[String(e.value)]=!1,r.all=!1})),e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},Ce.getState().search),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().search.cards),{},{risk:Object(h.a)(Object(h.a)({},r),{},Object(O.a)({},t.value,!!r.all||!Ce.getState().search.cards.risk[t.value]))})}))},color:"default"}),label:tt(t.label)}))}))))),k.indexOf("complexity")>-1&&i.a.createElement(cs.a,{style:{width:"100%"}},i.a.createElement(ss.a,{style:{minWidth:"100%"},expandIcon:i.a.createElement(xt,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},i.a.createElement("div",{style:{color:at("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},i.a.createElement("div",{style:{position:"relative",float:"left"}},tt("$__complexity")),i.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},Object.keys(o.cards.complexity).map((function(e,t){if(o.cards.complexity[e]&&"all"!==e)return i.a.createElement(Ue.a,{title:tt(a.priority.filter((function(t){return String(t.value)===String(e)}))[0].label,1),key:t},i.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:a.priority.filter((function(t){return String(t.value)===String(e)}))[0].color,margin:"7px 3px"}}))}))))),i.a.createElement(ls.a,{style:{minWidth:"100%"}},i.a.createElement(ds.a,{style:{width:"100%"}},i.a.createElement(us.a,{style:{minWidth:"100%"},control:i.a.createElement(Xa,{checked:!(!Ce.getState().search.cards.complexity||!Ce.getState().search.cards.complexity.all),onChange:function(){var t=Ce.getState().search.cards.complexity;t.all?a.priority.map((function(e){t[String(e.value)]=!1})):a.priority.map((function(e){t[String(e.value)]=!0})),e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},Ce.getState().search),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().search.cards),{},{complexity:Object(h.a)(Object(h.a)({},t),{},{all:!Ce.getState().search.cards.complexity.all})})}))},color:"default"}),label:tt("$__allPriorities")}),a.priority.map((function(t,r){return i.a.createElement(i.a.Fragment,{key:r},i.a.createElement(us.a,{style:{minWidth:"100%",borderLeft:"3px solid ".concat(t.color)},control:i.a.createElement(Xa,{indeterminate:!(!Ce.getState().search.cards.complexity||!Ce.getState().search.cards.complexity.all),checked:!(!Ce.getState().search.cards.complexity||!Ce.getState().search.cards.complexity[t.value]),onChange:function(){var r=Ce.getState().search.cards.complexity;r.all&&a.priority.map((function(e){r[String(e.value)]=!1,r.all=!1})),e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},Ce.getState().search),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().search.cards),{},{complexity:Object(h.a)(Object(h.a)({},r),{},Object(O.a)({},t.value,!!r.all||!Ce.getState().search.cards.complexity[t.value]))})}))},color:"default"}),label:tt(t.label)}))}))))),k.indexOf("impact")>-1&&i.a.createElement(cs.a,{style:{width:"100%"}},i.a.createElement(ss.a,{style:{minWidth:"100%"},expandIcon:i.a.createElement(xt,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},i.a.createElement("div",{style:{color:at("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},i.a.createElement("div",{style:{position:"relative",float:"left"}},tt("$__impact")),i.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},Object.keys(o.cards.impact).map((function(e,t){if(o.cards.impact[e]&&"all"!==e)return i.a.createElement(Ue.a,{title:tt(a.priority.filter((function(t){return String(t.value)===String(e)}))[0].label,1),key:t},i.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:a.priority.filter((function(t){return String(t.value)===String(e)}))[0].color,margin:"7px 3px"}}))}))))),i.a.createElement(ls.a,{style:{minWidth:"100%"}},i.a.createElement(ds.a,{style:{width:"100%"}},i.a.createElement(us.a,{style:{minWidth:"100%"},control:i.a.createElement(Xa,{checked:!(!Ce.getState().search.cards.impact||!Ce.getState().search.cards.impact.all),onChange:function(){var t=Ce.getState().search.cards.impact;t.all?a.priority.map((function(e){t[String(e.value)]=!1})):a.priority.map((function(e){t[String(e.value)]=!0})),e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},Ce.getState().search),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().search.cards),{},{impact:Object(h.a)(Object(h.a)({},t),{},{all:!Ce.getState().search.cards.impact.all})})}))},color:"default"}),label:tt("$__allPriorities")}),a.priority.map((function(t,r){return i.a.createElement(i.a.Fragment,{key:r},i.a.createElement(us.a,{style:{minWidth:"100%",borderLeft:"3px solid ".concat(t.color)},control:i.a.createElement(Xa,{indeterminate:!(!Ce.getState().search.cards.impact||!Ce.getState().search.cards.impact.all),checked:!(!Ce.getState().search.cards.impact||!Ce.getState().search.cards.impact[t.value]),onChange:function(){var r=Ce.getState().search.cards.impact;r.all&&a.priority.map((function(e){r[String(e.value)]=!1,r.all=!1})),e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},Ce.getState().search),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().search.cards),{},{impact:Object(h.a)(Object(h.a)({},r),{},Object(O.a)({},t.value,!!r.all||!Ce.getState().search.cards.impact[t.value]))})}))},color:"default"}),label:tt(t.label)}))}))))),a.users&&Object.keys(a.users).length>0&&Object.keys(a.users).filter((function(e){if(a.users[e]&&a.users[e].type&&"user"!==a.users[e].type&&!a.users[e].deleted&&Object.keys(a.cards).filter((function(t){return a.cards[t]&&a.cards[t].client&&a.cards[t].client===e&&a.cards[t]._users&&a.cards[t]._users[c._id]})).length>0)return!0})).length>0&&k.indexOf("units")>-1&&o&&o.groups&&o.groups.selected&&0===Object.keys(o.groups.selected).length&&o.plans&&o.plans.selected&&0===Object.keys(o.plans.selected).length&&i.a.createElement(cs.a,{style:{width:"100%"}},i.a.createElement(ss.a,{style:{minWidth:"100%"},expandIcon:i.a.createElement(xt,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},i.a.createElement("div",{style:{color:at("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},tt("$__units"),i.a.createElement(Sa.a,{max:6},Object.keys(Ce.getState().search.units.selected).length>0&&Object.keys(Ce.getState().search.units.selected).map((function(e,t){return i.a.createElement(Ue.a,{title:a.users[e].name,key:t},i.a.createElement(Kr.a,{alt:a.users[e].name,src:a.users[e].image||null},a.users[e].name.substr(0,1)))}))))),i.a.createElement(ls.a,{style:{minWidth:"100%"}},i.a.createElement(ds.a,{style:{width:"100%"}},i.a.createElement(ya,{className:t.noLabelLight,label:tt("$__search","*"),variant:"standard",autoFocus:!0,value:b,InputProps:{endAdornment:i.a.createElement(Ja.a,{position:"start"},i.a.createElement(xt,{color:at("color")},"search")),onChange:function(e){x(e.target.value)}}}),Object.keys(a.users).filter((function(e){return"user"!==a.users[e].type&&!a.users[e].deleted&&Object.keys(a.cards).filter((function(t){return a.cards[t]&&a.cards[t].client&&a.cards[t].client===e&&a.cards[t]._users&&a.cards[t]._users[c._id]})).length>0&&(""===b||a.users[e].name.toLowerCase().indexOf(b.toLowerCase())>-1)})).map((function(e){return i.a.createElement(i.a.Fragment,{key:e},i.a.createElement(us.a,{key:e,style:{minWidth:"100%"},control:i.a.createElement(i.a.Fragment,null,i.a.createElement(Kr.a,{alt:a.users[e].name,src:a.users[e].image||null},a.users[e].name.substr(0,1)),i.a.createElement(Xa,{checked:!(!Ce.getState().search.units.selected||!Ce.getState().search.units.selected[e]),onChange:function(){!function(e){Ce.getState().search.groups.selected&&Object.keys(Ce.getState().search.groups.selected).length>0?it({message:tt("$__alertGroupsFilterClear",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){T(e,!0)}}):T(e,!1)}(e)},color:"default"})),label:a.users[e].name||a.users[e].name}))}))))),a.users&&Object.keys(a.users).length>0&&k.indexOf("users")>-1&&i.a.createElement(cs.a,{style:{width:"100%"}},i.a.createElement(ss.a,{style:{minWidth:"100%"},expandIcon:i.a.createElement(xt,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},i.a.createElement("div",{style:{color:at("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},tt("$__users"),i.a.createElement(Sa.a,{max:6},Object.keys(Ce.getState().search.users.selected).length>0&&Object.keys(Ce.getState().search.users.selected).map((function(e,t){return i.a.createElement(Ue.a,{title:a.users[e].name,key:t},i.a.createElement(Kr.a,{alt:a.users[e].name,src:a.users[e].image||null},a.users[e].name.substr(0,1)))}))))),i.a.createElement(ls.a,{style:{minWidth:"100%"}},i.a.createElement(ds.a,{style:{width:"100%"}},i.a.createElement(ya,{className:t.noLabelLight,label:tt("$__search","*"),variant:"standard",autoFocus:!0,value:m,InputProps:{endAdornment:i.a.createElement(Ja.a,{position:"start"},i.a.createElement(xt,{color:at("color")},"search")),onChange:function(e){g(e.target.value)}}}),Object.keys(a.users).filter((function(e){if("user"===a.users[e].type&&!a.users[e].deleted&&(0===Object.keys(o.units.selected).length||Object.keys(o.units.selected).length>0&&Object.keys(o.units.selected).filter((function(t){return t===e})).length>0)&&(!S[0]&&Object.keys(a.cards).filter((function(t){return a.cards[t]._users[e]&&"chatGroup"!==a.cards[t].type&&"plan"!==a.cards[t].type})).length>0||S[0]&&36===S[0].length&&Object.keys(a.cards).filter((function(t){return(a.cards[t]._planId===S[0]||a.cards[t]._id===S[0])&&a.cards[t]._users[e]&&"chatGroup"!==a.cards[t].type&&"plan"!==a.cards[t].type})).length>0)&&(""===m||""!==m&&(a.users[e]&&a.users[e].name&&a.users[e].name.toLowerCase().indexOf(m.toLowerCase())>-1||a.users[e].email.toLowerCase().indexOf(m.toLowerCase())>-1)))return!0})).sort((function(e,t){return a.users[e].name.trim().toLowerCase()<a.users[t].name.trim().toLowerCase()?-1:a.users[e].name.trim().toLowerCase()>a.users[t].name.trim().toLowerCase()?1:0})).map((function(t){return a.users&&a.users[t]&&a.users[t]._id&&i.a.createElement(i.a.Fragment,{key:t},i.a.createElement(us.a,{key:t,style:{minWidth:"100%"},control:i.a.createElement(i.a.Fragment,null,i.a.createElement(St.a,{overlap:"rectangular",color:"secondary"},i.a.createElement(Ii,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},variant:n.users&&n.users[a.users[t]._id]&&n.users[a.users[t]._id].status?"dot":"standard",status:n.users&&n.users[a.users[t]._id]&&n.users[a.users[t]._id].status?n.users[a.users[t]._id].status:null},i.a.createElement(Kr.a,{alt:a.users[t].name,src:a.users[t].image||null},a.users[t].name.substr(0,1)))),i.a.createElement(Xa,{checked:!(!Ce.getState().search.users.selected||!Ce.getState().search.users.selected[t]),onChange:function(){!function(t){Ce.getState().search.users.selected[t]&&Object.keys(Ce.getState().search.users.selected).filter((function(e){return Ce.getState().search.users.selected[e]})).length<=1?e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},Ce.getState().search),{},{users:Object(h.a)(Object(h.a)({},Ce.getState().search.users),{},{selected:{}})})):e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},Ce.getState().search),{},{users:Object(h.a)(Object(h.a)({},Ce.getState().search.users),{},{selected:Object(h.a)(Object(h.a)({},Ce.getState().search.users.selected&&Ce.getState().search.users.selected),{},Object(O.a)({},t,!Ce.getState().search.users.selected[t]))})}))}(t)},color:"default"})),label:a.users[t].name}))}))))),Object.keys(a.cards).filter((function(e){return"plan"===a.cards[e].type&&!a.cards[e].deleted&&!a.cards[e].archived&&a.cards[e]._users&&a.cards[e]._users[c._id]&&Object.keys(a.cards).filter((function(t){return!a.cards[t].deleted&&a.cards[t]._planId===e&&a.cards[t]._users&&a.cards[t]._users[c._id]})).length>0})).length>0&&k.indexOf("plans")>-1&&i.a.createElement(cs.a,{style:{width:"100%"}},i.a.createElement(ss.a,{style:{minWidth:"100%"},expandIcon:i.a.createElement(xt,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},i.a.createElement("div",{style:{color:at("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},tt("$__plans"),i.a.createElement(Sa.a,{max:6},Object.keys(Ce.getState().search.plans.selected).length>0&&Object.keys(Ce.getState().search.plans.selected).map((function(e,t){return i.a.createElement(Ue.a,{title:a.cards[e].name,key:t},i.a.createElement(Kr.a,{alt:a.cards[e].name,src:a.cards[e].image||null,style:{width:33,height:33}},a.cards[e].name.substr(0,1)))}))))),i.a.createElement(ls.a,{style:{minWidth:"100%",width:"100%"}},i.a.createElement(ds.a,{style:{width:"100%"}},i.a.createElement(ya,{className:t.noLabelLight,label:tt("$__search","*"),variant:"standard",autoFocus:!0,value:E,InputProps:{endAdornment:i.a.createElement(Ja.a,{position:"start"},i.a.createElement(xt,{color:at("color")},"search")),onChange:function(e){j(e.target.value)}}}),Object.keys(a.cards).filter((function(e){return"plan"===a.cards[e].type&&!a.cards[e].deleted&&!a.cards[e].archived&&a.cards[e]._users&&a.cards[e]._users[c._id]&&Object.keys(a.cards).filter((function(t){return!a.cards[t].deleted&&a.cards[t]._planId===e&&a.cards[t]._users&&a.cards[t]._users[c._id]})).length>0&&(0===Object.keys(o.units.selected).length&&0===Object.keys(o.groups.selected).length||Object.keys(o.units.selected).length>0&&Object.keys(o.units.selected).filter((function(t){return t===a.cards[e].client})).length>0||Object.keys(o.groups.selected).length>0&&Object.keys(o.groups.selected).filter((function(t){return t===a.cards[e].client})).length>0)&&(""===E||a.cards[e].name.toLowerCase().indexOf(E.toLowerCase())>-1)})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})).map((function(t){return i.a.createElement(i.a.Fragment,{key:t},i.a.createElement(us.a,{key:t,style:{width:"calc(100% - 15px)",paddingRight:"15px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},control:i.a.createElement(i.a.Fragment,null,i.a.createElement(Kr.a,{alt:a.cards[t].name,src:a.cards[t].image||null},a.cards[t].name.substr(0,1)),i.a.createElement(Xa,{checked:!(!Ce.getState().search.plans.selected||!Ce.getState().search.plans.selected[t]),onChange:function(){!function(t){Ce.getState().search.plans.selected[t]&&Object.keys(Ce.getState().search.plans.selected).filter((function(e){return Ce.getState().search.plans.selected[e]})).length<=1?e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},Ce.getState().search),{},{plans:Object(h.a)(Object(h.a)({},Ce.getState().search.plans),{},{selected:{}})})):e.reduxFunction("ASYNC","SEARCH",Object(h.a)(Object(h.a)({},Ce.getState().search),{},{plans:Object(h.a)(Object(h.a)({},Ce.getState().search.plans),{},{selected:Object(h.a)(Object(h.a)({},Ce.getState().search.plans.selected&&Ce.getState().search.plans.selected),{},Object(O.a)({},t,!Ce.getState().search.plans.selected[t]))})}))}(t)},color:"default"})),label:a.cards[t].name||a.cards[t].name,title:a.cards[t].name||a.cards[t].name}))}))))),i.a.createElement("div",{style:{padding:"5px",width:"100%",display:"flex",justifyContent:"flex-end"},onClick:function(){d(!u)}},i.a.createElement(Xr,{reverse:!0,icon:"clear_all",text:tt("$__removeFilter","*"),onClick:function(){e.reduxFunction("ASYNC","SEARCH_CLEAR",{})}}))))})),yf=Object(_t.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 bf=function(e){var t=yf(),r=i.a.useState(!1),n=Object(Ae.a)(r,2),a=n[0],o=n[1],c=i.a.useRef(null),l=function(t){c.current&&c.current.contains(t.target)||(o(!1),e.onClose&&e.onClose())};return i.a.createElement("div",{style:Object(h.a)({zIndex:"100 !important"},e.style?e.style:{})},i.a.createElement(Ue.a,{title:tt("$__options",1)},e.hideText?i.a.createElement(jt.a,{ref:c,"aria-controls":a?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){o((function(e){return!e})),!a&&e.onOpen&&e.onOpen(),a&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},i.a.createElement(xt,{usePropagation:!0,size:e.size?e.size:"20px",color:e.btColor?e.btColor:at("menu"),icon:e.icon?e.icon:e.horizontalButton?"more_horiz":"more_vert"})):i.a.createElement(kt.a,{ref:c,"aria-controls":a?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){o((function(e){return!e})),!a&&e.onOpen&&e.onOpen(),a&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},i.a.createElement(i.a.Fragment,null,i.a.createElement("span",{style:{marginRight:"15px",color:e.textColor?e.textColor:e.color?e.color:at("menu"),overflow:"hidden",textOverflow:"ellipsis",width:"90%",maxWidth:e.maxWidth?e.maxWidth:"90%",whiteSpace:"nowrap"}},tt("$__filter")),i.a.createElement(xt,{usePropagation:!0,size:e.size?e.size:"20px",color:e.btColor?e.btColor:at("menu"),icon:"filter_alt"})))),i.a.createElement(ln.a,{open:a,anchorEl:c.current,role:void 0,transition:!0,style:{zIndex:"100 !important"}},(function(e){var t=e.TransitionProps;e.placement;return i.a.createElement(on.a,Object.assign({},t,{style:{transformOrigin:"right center",zIndex:"100 !important"}}),i.a.createElement(cn.a,null,i.a.createElement(an.a,{onClickAway:l},i.a.createElement("div",{style:{padding:"15px"}},i.a.createElement(vf,{onChange:function(e){console.log(e)}})))))})))};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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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(Fe.b)((function(){return{}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState().db,r=i.a.useState(!1),n=Object(Ae.a)(r,2),a=n[0],o=n[1],c=i.a.useState(!0),l=Object(Ae.a)(c,2),s=l[0],u=l[1],d=i.a.useState(!1),p=Object(Ae.a)(d,2),f=p[0],m=p[1],g=i.a.useState(!1),v=Object(Ae.a)(g,2),y=v[0],b=v[1],x=i.a.useState(!1),_=Object(Ae.a)(x,2),w=_[0],E=_[1],O=window.location.hash.split("/");O[0]=O[0].replace("#",""),i.a.useEffect((function(){return function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(h.a)(Object(h.a)({},Ce.getState().controls),{},{deleted:!1}))}}),[]),i.a.useEffect((function(){y&&j()}),[y]);var j=function(){var t=Object(Ne.a)(xf().mark((function t(){var r;return xf().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,En(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=la(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=la(e);k+=t.total})),i.a.createElement("div",null,i.a.createElement(li,{md:12,sm:12,xs:12},i.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},i.a.createElement(bf,{style:{marginRight:"7px"}}),i.a.createElement(gn,{text:tt("$__options"),icon:"settings",horizontalButton:!0,size:"21px",color:"lightgray",btColor:"lightgray",options:[{name:"ASC"===t.orderByTitlePosition?tt("$__orderByAsc"):tt("$__orderByDesc"),icon:"ASC"===t.orderByTitlePosition?"text_rotation_down":"text_rotate_up",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{orderByTitlePosition:"ASC"===t.orderByTitlePosition?"DESC":"ASC"}))}},{name:tt(s?"$__hideCatenationColors":"$__showCatenationColors"),icon:"palette",color:s?"lightGray":at("menu"),onClick:function(){u((function(e){return!e}))}}]}),i.a.createElement("div",{style:{marginLeft:"7px",display:"flex",alignItems:"center"}},i.a.createElement(Ct,{title:tt(a?"$__hideCompleted":"$__showCompleted","*"),text:tt(a?"$__hideCompleted":"$__showCompleted","*"),color:a?at("menu"):"lightGray",icon:a?"toggle_on":"toggle_off",onClick:function(){o((function(e){return!e}))},size:"21px",style:{padding:"0px !important"}}),k>0?i.a.createElement(Ct,{title:tt(f?"$__hideUnreaded":"$__showUnreaded","*"),text:tt(f?"$__hideUnreaded":"$__showUnreaded","*"),color:f?at("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"}}):i.a.createElement(i.a.Fragment,null),i.a.createElement("div",{style:{marginLeft:15}},i.a.createElement(Ct,{title:Ce.getState().controls.deleted?tt("$__hideDeleted"):tt("$__showDeleted"),color:Ce.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)({},Ce.getState().controls),{},{deleted:!y}))},size:"21px",style:{padding:"0px !important"}}))))),i.a.createElement(li,{md:12,style:{marginLeft:"-30px"}},i.a.createElement(mf,{nodeId:O[0]||null,showCompleted:a,showColors:s,onlyUnReaded:f,styles:{discountHeight:126}})))}));var wf=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(zu)((function(e){e.classes;var t=Ce.getState(),r=t.db,n=t.search,a=i.a.useState(0),o=Object(Ae.a)(a,2),c=o[0],l=o[1],s=i.a.useState(25),u=Object(Ae.a)(s,2),d=u[0],p=u[1],f=i.a.useState(!1),h=Object(Ae.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})),i.a.createElement("div",{style:{position:"relative",justifyContent:"space-between",margin:"auto",width:"100%"}},Object.keys(g).length>25&&i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},tt("$__page")," ",c+1," ",tt("$__of")," ",Math.ceil(Object.keys(g).length/d),i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},i.a.createElement(wu.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:tt("$__cardsPerPage")}))),i.a.createElement(oi,null,Object.keys(g).map((function(e,t){if(t<=(c+1)*d&&t>=c*d)return i.a.createElement(li,{key:g[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},i.a.createElement(ki,{db:"cards",data:g[e],expanded:!0,Avatar:!0,Resume:!0}))}))),Object.keys(g).length>25&&i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},tt("$__page")," ",c+1," ",tt("$__of")," ",Math.ceil(Object.keys(g).length/d),i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},i.a.createElement(wu.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:tt("$__cardsPerPage")}))))}))),Ef=r(522),Of=r.n(Ef);var jf=Object(Fe.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(u.b)(n,e)}))(Object(o.memo)((function(e){var t=Ce.getState(),r=t.db,n=t.session,a=t.search,o=ft(),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&&("trash"!==c[1]&&!r.cards[e].deleted||"trash"===c[1]&&r.cards[e].deleted)})).sort((function(e,t){return r.cards[e].order&&r.cards[t].order&&parseInt(r.cards[e].order.low)<parseInt(r.cards[t].order.low)?-1:r.cards[e].order&&r.cards[t].order&&parseInt(r.cards[e].order.low)>parseInt(r.cards[t].order.low)?1:0})).map((function(e){return r.cards[e]})),l=o&&!o.owner&&!o.planAdmin&&!o.planEdit&&!o.planRead&&!o.planModerate&&r.cards&&n&&n._id||!r.adminView?Object.keys(r.cards).filter((function(e){return r.cards[e]&&"plan"===r.cards[e].type&&(!r.cards[e].private||r.cards[e].private&&r.cards[e]._users&&r.cards[e]._users[n._id])&&("templates"===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 r.cards[e]&&"plan"===r.cards[e].type&&r.cards[e]._users&&(Object.keys(r.cards[e]._users).filter((function(e){return e===n._id})).length>0||!r.cards[e].private&&Object.keys(r.cards[e]._users).filter((function(e){return e!==n._id})).length>0)})).sort((function(e,t){return r.cards[e].order&&r.cards[t].order&&parseInt(r.cards[e].order.low)<parseInt(r.cards[t].order.low)?-1:1})).map((function(e){return r.cards[e]})),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}))),i.a.createElement(oi,{style:{marginTop:"7px"}},l&&l.length>0&&l.filter((function(e){if((!e._planId||e._planId&&0===l.filter((function(t){return t._id===e._planId})).length)&&("templates"!==c[1]&&(!e.isTemplate||e.isTemplate&&"trash"===c[1])||"templates"===c[1]&&e.isTemplate)&&("archived"===c[1]&&e.archived||"archived"!==c[1]&&!e.archived)&&("trash"===c[1]&&e.deleted||"trash"!==c[1]&&!e.deleted))return!0})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})).map((function(e){var t;return i.a.createElement(li,{key:e._id,xs:12,sm:6,md:4,lg:3,xl:2},i.a.createElement(ki,(t={db:"cards",data:e},Object(O.a)(t,"db","cards"),Object(O.a)(t,"Avatar",!0),Object(O.a)(t,"expanded",!0),Object(O.a)(t,"ignoreList",!0),t)))})),r.loaded&&(!l||0===l.length)&&i.a.createElement("div",{style:{width:"100%",height:"calc(100vh - 150px)",display:"flex",alignItems:"center",justifyContent:"center"}},i.a.createElement("img",{src:Of.a})))}))),kf=r(544),Sf=r.n(kf),Lf=r(545),Cf=r.n(Lf);function If(){If=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Ff=function(e){var t=Ce.getState().db.users,r=Ce.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 i.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&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{width:"100%"}},tt("$__users",1),":"),i.a.createElement(Sa.a,{max:12},Object.keys(t).filter((function(r){return t[r]&&t[r]._parent===e.id})).map((function(e,r){return i.a.createElement(Ue.a,{title:t[e].name,key:e},i.a.createElement(Kr.a,{alt:t[e].name,src:t[e].image||null,style:{width:"23px",height:"23px"}},t[e].name.substr(0,1)))})))),n.length>0&&i.a.createElement("div",{style:{width:"100%"}},n.map((function(e,t){return i.a.createElement("div",{key:"".concat(e._id,"-").concat(t)},i.a.createElement(ki,{data:e,db:"cards",Avatar:!1,expanded:!1,ignoreList:!0,notGlobalExpanded:!0}))}))))},Tf=Object(Fe.b)((function(e){return{usersStatus:e.usersStatus,users:e.db.users}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(ec)((function(e){var t=e.data,r=(e.classes,Ce.getState()),n=r.db,a=(r.session,r.usersStatus),o=i.a.useState(!1),c=Object(Ae.a)(o,2),l=c[0],u=c[1],d=i.a.useState(null),p=Object(Ae.a)(d,2),f=p[0],m=p[1];Be()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),i.a.useEffect((function(){l||(u(!0),g())}));var g=function(){var e=Object(Ne.a)(If().mark((function e(){return If().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),v=window.location.hash.split("/");v[0]=v[0].replace("#","");var y=[],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||n.cards[e]&&n.cards[e].type&&n.dataType.filter((function(t){return t.name===n.cards[e].type})).length>0&&"swot"===n.dataType.filter((function(t){return t.name===n.cards[e].type}))[0].module){var t,r;if(n.cards[e]&&n.cards[e].status&&"completed"!==n.cards[e].status)b=Object(h.a)(Object(h.a)({},b),{},(t={},Object(O.a)(t,n.cards[e].status,b&&b[n.cards[e].status]?b[n.cards[e].status]+1:1),Object(O.a)(t,"total",b.total?b.total+1:1),Object(O.a)(t,"late",n.cards[e].endDate&&Be()(new Date(1e3*n.cards[e].endDate)).tz("America/Sao_Paulo").format()<=Be()().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(O.a)(r,"completed",b&&b.completed?b.completed+1:1),Object(O.a)(r,"total",b.total?b.total+1:1),r));y[n.cards[e].type]=y[n.cards[e].type]?y[n.cards[e].type]+1:1}else y.swot=null==y.swot?1:y.swot+1})),y=[],b={},e.expanded?i.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},i.a.createElement("div",{style:{backgroundColor:at("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&&i.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},!e.noActions&&i.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},i.a.createElement(xt,{color:at("color"),icon:"close",onClick:function(){s.push("c#tab/".concat(v[1]))}})))),!f&&t.image?i.a.createElement("img",{style:{width:"70px",height:"70px",top:"-20px",left:"-6px",borderRadius:"50%",border:"solid 2px ".concat(at("color")),zIndex:"5 !important",position:"absolute",backgroundColor:"".concat(at("color"))},src:"".concat(t.image?t.image:t.type&&"user"!==t.type?Cf.a:Sf.a),onError:function(e){m(null)},onLoad:function(e){m("".concat(t.image?t.image:t.type&&"user"!==t.type?Cf.a:Sf.a))},width:"100%"}):t.image?i.a.createElement("div",{style:{width:"50px",height:"50px",top:"-4px",left:"-13px",borderRadius:"50%",border:"solid 2px ".concat(at("color")),zIndex:"5 !important",position:"absolute",background:at("AvatarBackground"),backgroundImage:'url("'.concat(f,'")'),backgroundSize:"cover",backgroundPosition:"center center"}}):i.a.createElement("div",{style:{width:"50px",height:"50px",top:"-4px",left:"-13px",borderRadius:"50%",border:"solid 2px ".concat(at("color")),zIndex:"5 !important",position:"absolute",background:at("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},t.type&&"user"!==t.type?i.a.createElement(xt,{size:"16px",color:"rgba(250,250,250,0.77)"},"business"):i.a.createElement(xt,{size:"16px",color:"rgba(250,250,250,0.77)"},"person"))):i.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"}},i.a.createElement("div",{style:{backgroundColor:at("menu"),height:"43px",paddingLeft:"95px",fontSize:"12px",color:"#FFFFFF",fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"space-between"}},i.a.createElement("div",{style:{maxWidth:"calc(100% - 10px)",textOverflow:"ellipsis ",whiteSpace:"nowrap",overflow:"hidden"}},(t.name,t.name)),!e.resume&&i.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},!e.noActions&&!t.independentAccount&&(!t._parent||t._parent&&Ce.getState().db.users[t._parent]&&!Ce.getState().db.users[t._parent].independentAccount)&&i.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},i.a.createElement(xt,{color:at("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&&i.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},i.a.createElement(xt,{color:at("color"),icon:"contacts",onClick:function(){s.push("c#tab/units/".concat(t._id))}})),!e.noActions&&"sic"===t.type&&i.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},i.a.createElement(xt,{color:at("color"),icon:"badge",onClick:function(){s.push("c#tab/units/".concat(t._id))}})))),t.image&&(!f||t.image&&t.image!==f)?i.a.createElement("img",{style:{width:"90px",height:"90px",top:"-24px",left:"-6px",borderRadius:"50%",border:"solid 2px ".concat(at("color")),zIndex:"5 !important",position:"absolute",backgroundColor:"".concat(at("color"))},src:"".concat(t.image?t.image:t.type&&"user"!==t.type?Cf.a:Sf.a),onError:function(e){},onLoad:function(e){m("".concat(t.image?t.image:null))},width:"100%"}):t.image?i.a.createElement("div",{style:{width:"90px",height:"90px",top:"-24px",left:"-6px",borderRadius:"50%",border:"solid 2px ".concat(at("color")),zIndex:"5 !important",position:"absolute",background:at("AvatarBackground"),backgroundImage:'url("'.concat(f,'")'),backgroundSize:"cover",backgroundPosition:"center center"}}):i.a.createElement("div",{style:{width:"90px",height:"90px",top:"-24px",left:"-6px",borderRadius:"50%",border:"solid 2px ".concat(at("color")),zIndex:"5 !important",position:"absolute",background:at("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},t.type&&"user"!==t.type?i.a.createElement(xt,{size:"33px",color:"rgba(250,250,250,0.77)"},"business"):i.a.createElement(xt,{size:"33px",color:"rgba(250,250,250,0.77)"},"person")),e.children?e.children:i.a.createElement(i.a.Fragment,null,t.groups&&t.groups.length>0?i.a.createElement("div",{style:{position:"relative",width:"100%",fontSize:"12px",color:at("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?i.a.createElement("div",{style:{position:"relative",width:"100%",fontSize:"12px",color:at("mediumText"),paddingLeft:"94px",marginTop:"15px"}},tt("$__doesntBelongToAGroup")):i.a.createElement(i.a.Fragment,null),!e.noShowUsers&&"user"!==t.type&&i.a.createElement("div",{style:{marginTop:"11px",width:"100%",padding:"15px"}},i.a.createElement(Ff,Object.assign({id:t._id},e))),"user"===t.type&&Object.keys(y).length>0?i.a.createElement("div",{style:{display:"flex",width:"100%",paddingLeft:"15px",paddingRight:"15px",flexFlow:"wrap",paddingTop:15,paddingBottom:15}},Object.keys(y).map((function(e,t){return"null"!==String(e)&&"undefined"!==String(e)?i.a.createElement(Ur,{overlap:"rectangular",key:t,style:{padding:3},icon:n.dataType.filter((function(t){return t.name===e}))[0].icon,title:tt("$__".concat(e),1),size:"16px",count:y[e],disabled:!0}):null}))):i.a.createElement(i.a.Fragment,null),"user"===t.type&&b&&b.total>0?i.a.createElement("div",{style:{display:"flex",width:"100%",paddingLeft:"15px",paddingRight:"15px",flexFlow:"wrap",paddingTop:15,paddingBottom:15}},i.a.createElement("fieldset",{style:{padding:7,width:"calc(100% - 14px)"}},i.a.createElement("legend",{style:{color:"lightgray",fontSize:12}},tt("$__openActivities")),i.a.createElement("h3",null,i.a.createElement("small",null,tt("$__total",1),": ",b.total)),n.status.filter((function(e){return"completed"!==e.value})).map((function(e,t){return i.a.createElement("div",{key:"".concat(t,"_").concat(e.value),style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},i.a.createElement("div",{style:{display:"flex"}},i.a.createElement(xt,{color:e.color},e.icon),i.a.createElement("span",{style:{marginLeft:"15px"}},tt(e.label,1))),i.a.createElement("div",null,b[e.value]?b[e.value]:0))})),i.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},i.a.createElement("div",{style:{display:"flex"}},i.a.createElement(xt,{color:"red"},"assignment_late"),i.a.createElement("span",{style:{marginLeft:"15px"}},tt("$__late",1))),i.a.createElement("div",null,b.late)))):i.a.createElement(i.a.Fragment,null),!e.resume&&i.a.createElement(pn,{options:t.tags,showOptions:!1}),e.resume&&i.a.createElement("div",null,i.a.createElement(Ii,{overlap:"circular",anchorOrigin:{vertical:"top",horizontal:"left"},variant:a.users&&a.users[t._id]&&a.users[t._id].status?"dot":"standard",status:a.users&&a.users[t._id]&&a.users[t._id].status?a.users[t._id].status:null},i.a.createElement(xt,{size:"27px"},"chat")))))})));var Nf=function(e){var t=Ce.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])})),i.a.createElement(i.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 i.a.createElement(li,{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"}},i.a.createElement(Tf,{data:t,expanded:!1,noActions:!0,style:{height:"calc(100% - 34px)",margin:0},completed:!!e.completed}))})))},Af=function(e){return i.a.createElement(i.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 i.a.createElement(li,{key:"".concat(e._id,"_").concat(t),xs:12,sm:6,md:4,lg:3,xl:2},i.a.createElement(ki,{data:e,db:"cards",Avatar:!0,expanded:!0,ignoreList:!0}))})))},Df=Object(Fe.b)((function(e,t){return Object(h.a)(Object(h.a)({},t),{},{cards:e.db.cards})}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState(),r=t.db,n=t.session,a=t.search;i.a.useEffect((function(){}),[]);var o=ft(),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=o&&!o.owner&&!o.planAdmin&&!o.planEdit&&!o.planRead&&!o.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}))),i.a.createElement("div",null,l.filter((function(e){return e._isFavorite})).length>0&&i.a.createElement("div",{style:{marginBottom:"33px"}},i.a.createElement(hi,{title:tt("$__myFavoritePlans",1),icon:"favorite",color:at("menu")}),i.a.createElement(oi,null,i.a.createElement(Af,{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&&i.a.createElement("div",{style:{marginBottom:"33px"}},i.a.createElement(hi,{title:tt("$__myFavoritePrivatePlans",1),icon:"private_connectivity",color:at("menu")}),i.a.createElement(oi,null,i.a.createElement(Af,{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&&i.a.createElement("div",{style:{marginBottom:"33px"}},i.a.createElement(hi,{title:tt("$__customerPlanning",1),icon:"business",color:at("menu")}),i.a.createElement(oi,null,i.a.createElement(Nf,{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&&i.a.createElement("div",{style:{marginBottom:"33px"}},i.a.createElement(hi,{title:tt("$__accountPlanning",1),icon:"work",color:at("menu")}),i.a.createElement(oi,null,i.a.createElement(Af,{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&&i.a.createElement("div",{style:{marginBottom:"33px"}},i.a.createElement(hi,{title:tt("$__consultingPlanning",1),icon:"work",color:at("menu")}),i.a.createElement(oi,null,i.a.createElement(Af,{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&&i.a.createElement("div",{style:{marginBottom:"33px"}},i.a.createElement(hi,{title:tt("$__privatePlanning",1),icon:"private_connectivity",color:at("menu")}),i.a.createElement(oi,null,i.a.createElement(Af,{plans:l.filter((function(e){return!e.client&&e.private})).map((function(e){return e}))}))),r.loaded&&(!l||0===l.length)&&i.a.createElement("div",{style:{width:"100%",height:"calc(100vh - 150px)",display:"flex",alignItems:"center",justifyContent:"center"}},i.a.createElement("img",{src:Of.a})))}));var Pf=Object(Fe.b)((function(e){return{history:e.db.history}}),(function(e){return Object(u.b)(n,e)}))(Object(o.memo)((function(e){i.a.useEffect((function(){console.log("StrategyAndPlans")}),[]),i.a.useEffect((function(){var e=setTimeout((function(){document.getElementById("mainPannel").scrollTo(0,0)}),100);return function(){clearTimeout(e)}}),[e.history]);var t=window.location.hash.split("/");return t[0]=t[0].replace("#",""),window.location.hash.split("/")[0].replace("#","")||s.push("sp#tab/home"),t[0]&&36===t[0].length&&!Ce.getState().db.cards[t[0]]&&s.push("/deniedAccess"),i.a.createElement("div",null,i.a.createElement(Nu,null),(!t[0]||t[0]&&36!==t[0].replace("#","").length)&&"home"===t[1]?i.a.createElement(i.a.Fragment,null,i.a.createElement(Df,null)):(!t[0]||t[0]&&36!==t[0].replace("#","").length)&&"completed"===t[1]?i.a.createElement(i.a.Fragment,null,i.a.createElement(Df,{completed:!0})):(!t[0]||t[0]&&36!==t[0].replace("#","").length)&&i.a.createElement(jf,null),36===t[0].length&&Ce.getState().db.cards[t[0].replace("#","")]?i.a.createElement(i.a.Fragment,null,t[1]&&"matrix"===t[1]&&i.a.createElement(pf,null),t[1]&&("actions"===t[1]||"guidelines"===t[1]||"objectives"===t[1]||"goals"===t[1])&&i.a.createElement(Gp,{type:t[1]}),t[1]&&"dashboard"===t[1]&&i.a.createElement(Up,null),t[1]&&"overview"===t[1]&&i.a.createElement(_f,null),t[1]&&"bright-and-connected"===t[1]&&i.a.createElement(i.a.Fragment,null,i.a.createElement(yd,null)),t[1]&&"insight-boards"===t[1]&&i.a.createElement(qp,null),t[1]&&"radar"===t[1]&&i.a.createElement(wf,null),t[1]&&"library"===t[1]&&i.a.createElement(qd,null),t[1]&&"planningBoard"===t[1]&&i.a.createElement("iframe",{style:{position:"absolute",width:"calc(100% - 30px)",height:"100%",border:"none"},src:"https://miro.com/app/live-embed/".concat(Ce.getState().db.cards[t[0]].miroBoard,"=/?embedAutoplay=true&moveToViewport=-23165,-5837,13803,7546")})):i.a.createElement(i.a.Fragment,null))})));function zf(){zf=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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(Fe.b)((function(e){return{store:{db:{cards:e.db.cards,tag:e.db.tag}},hidePrivate:e.controls.hidePrivate}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(nc)((function(e){var t=i.a.useState(null),r=Object(Ae.a)(t,2),n=r[0],a=r[1],o=i.a.useState(!1),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.a.useState([]),d=Object(Ae.a)(u,2),p=d[0],f=d[1],m=i.a.useState([]),g=Object(Ae.a)(m,2),v=g[0],y=g[1],b=i.a.useState(!1),x=Object(Ae.a)(b,2),_=x[0],w=x[1],E=Ce.getState().session,j=e.store.db,k=Ce.getState().db.dataType,S=ft();i.a.useEffect((function(){return function(){}}),[]),i.a.useEffect((function(){C(),_&&L()}),[_]),i.a.useEffect((function(){v.length>0&&v[0]!==n&&(w(!1),a(v[0]));var e=setTimeout((function(){return C()}),400);return function(){return clearTimeout(e)}}),[j.cards,j.tag,v]),i.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(v)&&y(e)})),i.a.useEffect((function(){var e=setTimeout((function(){return C()}),400);return function(){return clearTimeout(e)}}),[j.cards,j.tag]);var L=function(){En(e,{cardLoad:"tags",idRel:v[0],adminView:!0})},C=function(){var t=Object(Ne.a)(zf().mark((function t(){var r,n;return zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new Promise((function(e,t){e(Object.keys(j.cards).filter((function(e){return j.cards&&j.cards[e]&&!j.cards[e].deleted&&(!_&&E&&E._id&&j.cards[e]&&j.cards[e]._users&&j.cards[e]._users[E._id]||_&&(S.owner||S&&S.plan&&S.planAdmin))&&v&&v.length>0&&v[0]&&j.tag&&j.tag.filter((function(e){return e.value===v[0]})).length>0&&j.cards&&j.cards[e]._tags&&j.cards[e]._tags.filter((function(e){return e.value===v[0]})).length>0&&(!j.cards[e].private||E&&E._id&&j.cards[e].private&&j.cards[e]._users&&j.cards[e]._users[E._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 i.a.createElement("div",{style:{width:"100%"}},l&&i.a.createElement("div",{style:{position:"absolute",bottom:0,left:"7px",right:"7px"}},i.a.createElement(so,null)),j.tag.filter((function(e){return e.value===v[0]})).length>0?i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},i.a.createElement("div",{style:Object(h.a)({position:"relative",padding:"5px 10px",borderRadius:"8px",width:"fit-content",display:"flex",alignItems:"center"},j.tag.filter((function(e){return e.value===v[0]})).length>0&&j.tag.filter((function(e){return e.value===v[0]}))[0].color?{backgroundColor:j.tag.filter((function(e){return e.value===v[0]}))[0].color,color:j.tag.filter((function(e){return e.value===v[0]}))[0].color?gt(j.tag.filter((function(e){return e.value===v[0]}))[0].color,!0):at("menu")}:{})},i.a.createElement(xt,{size:"22px",color:j.tag.filter((function(e){return e.value===v[0]}))[0].color?gt(j.tag.filter((function(e){return e.value===v[0]}))[0].color,!0):at("menu"),icon:"tag"}),i.a.createElement("span",{style:{marginLeft:"7px"}},j.tag.filter((function(e){return e.value===v[0]}))[0].label)),S&&S.plan&&S.planAdmin&&S.user&&S.userAdmin?i.a.createElement("div",null,i.a.createElement(Ct,{title:tt("$__adminMode"),text:tt("$__adminMode"),color:_?at("menu"):"lightgrey",textColor:_?at("menu"):"lightgrey",icon:"manage_accounts",onClick:function(){w((function(e){return!e}))},style:{marginLeft:15},size:"25px"})):i.a.createElement(i.a.Fragment,null)):i.a.createElement(i.a.Fragment,null),i.a.createElement("div",{style:{positin:"relative",width:"100%"}},i.a.createElement(oi,null,p.filter((function(t){return j.cards[t].type.indexOf("plan")>-1&&(!e.hidePrivate||e.hidePrivate&&!j.cards[t].private)})).length>0&&i.a.createElement(li,{xs:12,sm:12,md:12,lg:12,xl:12},i.a.createElement(hi,{title:tt("$__plans",1),icon:k.filter((function(e){return"plan"===e.name}))[0].icon,color:at("menu"),filterText:e.text,style:{padding:"7px"}}),i.a.createElement(oi,null,p.filter((function(t){return"plan"===j.cards[t].type&&(!e.hidePrivate||e.hidePrivate&&!j.cards[t].private)})).sort((function(e,t){return j.cards[e].name<j.cards[t].name?-1:j.cards[e].name>j.cards[t].name?1:0})).map((function(t,r){return i.a.createElement(li,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},i.a.createElement(ki,{db:"cards",data:j.cards[t],showConnectedIn:!0,showTags:!0,searchText:e.text,expanded:!0,onAction:e.onAction?function(){e.onAction()}:null}))})))),p.filter((function(t){return j.cards[t].type.indexOf("guideline")>-1&&(!e.hidePrivate||e.hidePrivate&&!j.cards[t].private)})).length>0&&i.a.createElement(li,{xs:12,sm:12,md:12,lg:12,xl:12},i.a.createElement(hi,{title:tt("$__guidelines",1),icon:k.filter((function(e){return"guideline"===e.name}))[0].icon,color:at("menu"),style:{padding:"7px"}}),i.a.createElement(oi,null,p.filter((function(t){return j.cards[t].type.indexOf("guideline")>-1&&(!e.hidePrivate||e.hidePrivate&&!j.cards[t].private)})).sort((function(e,t){return j.cards[e].name.toLowerCase()<j.cards[t].name.toLowerCase()?-1:j.cards[e].name.toLowerCase()<j.cards[t].name.toLowerCase()?1:0})).map((function(t,r){var n;return i.a.createElement(li,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},i.a.createElement(ki,(n={db:"cards",data:j.cards[t]},Object(O.a)(n,"db","cards"),Object(O.a)(n,"showConnectedIn",!0),Object(O.a)(n,"searchText",e.text),Object(O.a)(n,"expanded",!0),Object(O.a)(n,"onAction",e.onAction?function(){e.onAction()}:null),n)))})))),p.filter((function(t){return j.cards[t].type.indexOf("objective")>-1&&(!e.hidePrivate||e.hidePrivate&&!j.cards[t].private)})).length>0&&i.a.createElement(li,{xs:12,sm:12,md:12,lg:12,xl:12},i.a.createElement(hi,{title:tt("$__objectives",1),icon:k.filter((function(e){return"objective"===e.name}))[0].icon,color:at("menu"),style:{padding:"7px"}}),i.a.createElement(oi,null,p.filter((function(t){return j.cards[t].type.indexOf("objective")>-1&&(!e.hidePrivate||e.hidePrivate&&!j.cards[t].private)})).sort((function(e,t){return j.cards[e].name.toLowerCase()<j.cards[t].name.toLowerCase()?-1:j.cards[e].name.toLowerCase()<j.cards[t].name.toLowerCase()?1:0})).map((function(t,r){var n;return i.a.createElement(li,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},i.a.createElement(ki,(n={db:"cards",data:j.cards[t]},Object(O.a)(n,"db","cards"),Object(O.a)(n,"showConnectedIn",!0),Object(O.a)(n,"searchText",e.text),Object(O.a)(n,"expanded",!0),Object(O.a)(n,"onAction",e.onAction?function(){e.onAction()}:null),n)))})))),p.filter((function(t){return j.cards[t].type.indexOf("goal")>-1&&(!e.hidePrivate||e.hidePrivate&&!j.cards[t].private)})).length>0&&i.a.createElement(li,{xs:12,sm:12,md:12,lg:12,xl:12},i.a.createElement(hi,{title:tt("$__goals",1),icon:k.filter((function(e){return"goal"===e.name}))[0].icon,color:at("menu"),style:{padding:"7px"}}),i.a.createElement(oi,null,p.filter((function(t){return j.cards[t].type.indexOf("goal")>-1&&(!e.hidePrivate||e.hidePrivate&&!j.cards[t].private)})).sort((function(e,t){return j.cards[e].name.toLowerCase()<j.cards[t].name.toLowerCase()?-1:j.cards[e].name.toLowerCase()<j.cards[t].name.toLowerCase()?1:0})).map((function(t,r){var n;return i.a.createElement(li,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},i.a.createElement(ki,(n={db:"cards",data:j.cards[t]},Object(O.a)(n,"db","cards"),Object(O.a)(n,"showConnectedIn",!0),Object(O.a)(n,"searchText",e.text),Object(O.a)(n,"expanded",!0),Object(O.a)(n,"onAction",e.onAction?function(){e.onAction()}:null),n)))})))),p.filter((function(t){return k.filter((function(e){return e.name===j.cards[t].type})).length>0&&k.filter((function(e){return e.name===j.cards[t].type}))[0]&&"objective"!==j.cards[t].type&&"goal"!==j.cards[t].type&&"plan"!==j.cards[t].type&&"chatGroup"!==j.cards[t].type&&"link"!==j.cards[t].type&&"insight"!==j.cards[t].type&&-1===j.cards[t].type.indexOf("guideline")&&(!e.hidePrivate||e.hidePrivate&&!j.cards[t].private)})).length>0&&i.a.createElement(li,{xs:12,sm:12,md:12,lg:12,xl:12},i.a.createElement(hi,{title:tt("$__actions",1),icon:"double_arrow",color:at("menu"),style:{padding:"7px"}}),i.a.createElement(oi,null,p.filter((function(t){return k.filter((function(e){return e.name===j.cards[t].type})).length>0&&k.filter((function(e){return e.name===j.cards[t].type}))[0]&&"objective"!==j.cards[t].type&&"goal"!==j.cards[t].type&&"plan"!==j.cards[t].type&&"chatGroup"!==j.cards[t].type&&"link"!==j.cards[t].type&&"insight"!==j.cards[t].type&&-1===j.cards[t].type.indexOf("guideline")&&(!e.hidePrivate||e.hidePrivate&&!j.cards[t].private)})).sort((function(e,t){return j.cards[e].name.toLowerCase()<j.cards[t].name.toLowerCase()?-1:j.cards[e].name.toLowerCase()<j.cards[t].name.toLowerCase()?1:0})).map((function(t,r){return i.a.createElement(li,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},i.a.createElement(ki,{db:"cards",data:j.cards[t],showConnectedIn:!0,searchText:e.text,expanded:!0,onAction:e.onAction?function(){e.onAction()}:null}))})))),p.filter((function(e){return"insight"===j.cards[e].type||"link"===j.cards[e].type})).length>0&&i.a.createElement(li,{xs:12,sm:12,md:12,lg:12,xl:12},i.a.createElement(hi,{title:"BRIGHT & CONNECTED",icon:U.a,color:at("menu"),style:{padding:"7px"}}),i.a.createElement(oi,null,p.filter((function(e){return"insight"===j.cards[e].type||"link"===j.cards[e].type})).sort((function(e,t){return j.cards[e].name.toLowerCase()<j.cards[t].name.toLowerCase()?-1:j.cards[e].name.toLowerCase()<j.cards[t].name.toLowerCase()?1:0})).map((function(t,r){return i.a.createElement(li,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},i.a.createElement(ki,{db:"cards",data:j.cards[t],showConnectedIn:!0,expanded:!0,Avatar:!0,Resume:!0,onAction:e.onAction?function(){e.onAction()}:null}))})))))))})));var Mf=Object(Fe.b)((function(e){return{store:e}}),(function(e){return Object(u.b)(n,e)}))((function(e){return i.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"calc(100vh - 115px)"}},e.provisorio||"N\xe3o Autorizado")})),Bf={root:{}};function Yf(){var e=Ce.getState().db.users;return{maxUsers:Ce.getState().session.maxUsers&&Ce.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 Gf=Object(Fe.b)((function(e){return{users:e.db.users,page:e.db.history}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Bf)((function(e){var t=i.a.useState([]),r=Object(Ae.a)(t,2),n=r[0],a=r[1],o=Ce.getState(),c=o.db,l=(o.session,o.search),u=c.users,d=ft();Yf(),i.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(n)&&a(e)}));var p=Object.keys(u).filter((function(e){return!u[e].deleted})).map((function(e){return u[e]}));l.text&&(p=p.filter((function(e){return!!(e.name&&e.name.toLowerCase().indexOf(l.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(l.text.toLowerCase())>-1||e.email&&e.email.toLowerCase().indexOf(l.text.toLowerCase())>-1)})).map((function(e){return e}))),"tab"===n[0]&&"users"===n[1]&&(p=p.filter((function(e){return"user"===e.type&&!e._parent})).map((function(e){return e}))),"tab"===n[0]&&"units"===n[1]&&(p=p.filter((function(e){return"user"!==e.type})).map((function(e){return e}))),l.users&&l.users.userGroup.length>0&&(p=p.filter((function(e){return e.groups.filter((function(e){return e.value===l.users.userGroup[0].value})).length>0})).map((function(e){return e}))),l.tags.length>0&&(p=p.filter((function(e){return e.tags&&e.tags.length>0&&e.tags.filter((function(e){var t=!1;return l.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),l.userGroups.length>0&&(p=p.filter((function(e){return e.groups&&e.groups.length>0&&e.groups.filter((function(e){var t=!1;return l.userGroups.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e})));var f=Object.keys(u).map((function(e){return u[e]}));return l.text&&(f=f.filter((function(e){return!!(e.name&&e.name.toLowerCase().indexOf(l.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(l.text.toLowerCase())>-1||e.email&&e.email.toLowerCase().indexOf(l.text.toLowerCase())>-1)})).map((function(e){return e}))),"tab"===n[0]&&"units"===n[1]&&n[2]&&36===n[2].length&&(f=f.filter((function(e){return"user"===e.type&&e._parent===n[2]})).map((function(e){return e})),console.log("XXXXXXXXXXXXXXXXXXXXXXXXXXXX",f)),l.users&&l.users.userGroup.length>0&&(f=f.filter((function(e){return e.groups.filter((function(e){return e.value===l.users.userGroup[0].value})).length>0})).map((function(e){return e}))),l.tags.length>0&&(f=f.filter((function(e){return e.tags&&e.tags.length>0&&e.tags.filter((function(e){var t=!1;return l.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),l.userGroups.length>0&&(f=f.filter((function(e){return e.groups&&e.groups.length>0&&e.groups.filter((function(e){var t=!1;return l.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("#","")||s.push("c#tab/units"),i.a.createElement("div",null,i.a.createElement(Nu,null),i.a.createElement("div",{style:{marginLeft:"-30px",width:"calc(100% + 30px)"}},i.a.createElement(Pu,null),i.a.createElement(oi,null,p.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]?i.a.createElement(li,{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"}},i.a.createElement(Tf,{data:e,expanded:!!(n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&c.users[n[2]])})):!n[2]&&i.a.createElement(li,{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},i.a.createElement(Tf,{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&&f.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 i.a.createElement(li,{key:"".concat(e._id,"-").concat(t),xs:12,sm:6,md:4,lg:3,xl:2},i.a.createElement(Tf,{data:e}))})))))):i.a.createElement(Mf,null)}))),Rf=Object(_t.a)({clearfix:{"&:after,&:before":{display:"table",content:'" "'},"&:after":{clear:"both"}}});function Hf(){var e=Rf();return i.a.createElement("div",{className:e.clearfix})}var Wf={cardIcon:{"&$warningCardHeader,&$successCardHeader,&$dangerCardHeader,&$infoCardHeader,&$primaryCardHeader,&$roseCardHeader,&$customCardHeader":{borderRadius:"3px",backgroundColor:Qt[0],padding:"7px",marginTop:"-20px",marginRight:"15px",float:"left"}},warningCardHeader:cr,successCardHeader:lr,dangerCardHeader:sr,infoCardHeader:ur,primaryCardHeader:dr,roseCardHeader:pr,customCardHeader:{}};Object(_t.a)(Wf);var Uf={cardAvatar:{"&$cardAvatarProfile img,&$cardAvatarTestimonial img":{width:"100%",height:"auto"}},cardAvatarProfile:{maxWidth:"130px",maxHeight:"130px",margin:"-50px auto 0",borderRadius:"50%",overflow:"hidden",padding:"0",boxShadow:"0 16px 38px -12px rgba("+Gt("#000")+", 0.56), 0 4px 25px 0px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt("#000")+", 0.2)","&$cardAvatarPlain":{marginTop:"0"}},cardAvatarPlain:{},cardAvatarTestimonial:{margin:"-50px auto 0",maxWidth:"100px",maxHeight:"100px",borderRadius:"50%",overflow:"hidden",padding:"0",boxShadow:"0 16px 38px -12px rgba("+Gt("#000")+", 0.56), 0 4px 25px 0px rgba("+Gt("#000")+", 0.12), 0 8px 10px -5px rgba("+Gt("#000")+", 0.2)","&$cardAvatarPlain":{marginTop:"0"}},cardAvatarTestimonialFooter:{marginBottom:"-50px",marginTop:"10px"}},Vf=["children","className","plain","profile","testimonial","testimonialFooter"],qf=Object(_t.a)(Uf);function Xf(e){var t,r=qf(),n=e.children,a=e.className,o=e.plain,c=e.profile,l=e.testimonial,s=e.testimonialFooter,u=Object(Yt.a)(e,Vf),d=$e()((t={},Object(O.a)(t,r.cardAvatar,!0),Object(O.a)(t,r.cardAvatarProfile,c),Object(O.a)(t,r.cardAvatarPlain,o),Object(O.a)(t,r.cardAvatarTestimonial,l),Object(O.a)(t,r.cardAvatarTestimonialFooter,s),Object(O.a)(t,a,void 0!==a),t));return i.a.createElement("div",Object.assign({className:d},u),n)}var Kf={cardTitle:mr,cardIconTitle:Object(h.a)(Object(h.a)({},mr),{},{marginTop:"15px",marginBottom:0,"& small":{fontSize:"80%",fontWeight:"400"}}),cardCategory:{marginTop:"10px",color:Qt[0]+" !important",textAlign:"center"},description:{color:Qt[0]},updateProfileButton:{float:"right"}},Jf=Object(_t.a)(Kf);Object(Fe.b)((function(e){return{}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Jf();return i.a.createElement("div",{style:{position:"relative",width:"calc(100% - 7px)"}},i.a.createElement(oi,null,i.a.createElement("div",{style:{position:"relative",width:"100%",boxShadow:"0px -2px 5px 2px rgba(0,0,0,0.1)",height:150,backgroundColor:"black",borderTopRightRadius:11,borderTopLeftRadius:11,backgroundPosition:"center center",backgroundSize:"cover",marginBottom:"-15px"}}),i.a.createElement(li,{xs:12,sm:12,md:8},i.a.createElement(Zl,null,i.a.createElement(rs,null,i.a.createElement(oi,null,i.a.createElement(li,{xs:12,sm:12,md:5},i.a.createElement(ru,{labelText:"Company (disabled)",id:"company-disabled",formControlProps:{fullWidth:!0},inputProps:{disabled:!0}})),i.a.createElement(li,{xs:12,sm:12,md:3},i.a.createElement(ru,{labelText:"Username",id:"username",formControlProps:{fullWidth:!0}})),i.a.createElement(li,{xs:12,sm:12,md:4},i.a.createElement(ru,{labelText:"Email address",id:"email-address",formControlProps:{fullWidth:!0}}))),i.a.createElement(oi,null,i.a.createElement(li,{xs:12,sm:12,md:6},i.a.createElement(ru,{labelText:"First Name",id:"first-name",formControlProps:{fullWidth:!0}})),i.a.createElement(li,{xs:12,sm:12,md:6},i.a.createElement(ru,{labelText:"Last Name",id:"last-name",formControlProps:{fullWidth:!0}}))),i.a.createElement(oi,null,i.a.createElement(li,{xs:12,sm:12,md:4},i.a.createElement(ru,{labelText:"City",id:"city",formControlProps:{fullWidth:!0}})),i.a.createElement(li,{xs:12,sm:12,md:4},i.a.createElement(ru,{labelText:"Country",id:"country",formControlProps:{fullWidth:!0}})),i.a.createElement(li,{xs:12,sm:12,md:4},i.a.createElement(ru,{labelText:"Postal Code",id:"postal-code",formControlProps:{fullWidth:!0}}))),i.a.createElement(oi,null,i.a.createElement(li,{xs:12,sm:12,md:12},i.a.createElement(Js.a,{style:{color:"#AAAAAA"}},"About me"),i.a.createElement(ru,{labelText:"Lamborghini Mercy, Your chick she so thirsty, I'm in that two seat Lambo.",id:"about-me",formControlProps:{fullWidth:!0},inputProps:{multiline:!0,rows:5}}))),i.a.createElement(br,{color:"rose",className:t.updateProfileButton},"Update Profile"),i.a.createElement(Hf,null)))),i.a.createElement(li,{xs:12,sm:12,md:4},i.a.createElement(Zl,{db:"cards",profile:!0},i.a.createElement(Xf,{profile:!0},i.a.createElement("a",{href:"#pablo",onClick:function(e){return e.preventDefault()}})),i.a.createElement(rs,{profile:!0},i.a.createElement("h6",{className:t.cardCategory},"CEO / CO-FOUNDER"),i.a.createElement("h4",{className:t.cardTitle},"Alec Thompson"),i.a.createElement("p",{className:t.description},"Don","'","t be scared of the truth because we need to restart the human foundation in truth And I love you like Kanye loves Kanye I love Rick Owens\u2019 bed design but the back is..."),i.a.createElement(br,{color:"rose",round:!0},"Follow"))))))}));var Zf=r(930);r(857);var Qf=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Ic)((function(e){Ce.getState().functions.socket;var t=i.a.useState({cvc:"",expiry:"",focus:"",name:"",number:""}),r=Object(Ae.a)(t,2),n=r[0],a=r[1];return ft(),i.a.createElement("div",null,i.a.createElement(Zf.a,{cvc:n.cvc,expiry:n.expiry,focused:n.focus,name:n.name,number:n.number}),i.a.createElement("fieldset",{style:{wordBreak:"break-word"}},i.a.createElement("legend",null,tt("$__paymentPreffer")),i.a.createElement("div",{style:{borderRadius:15,background:at("ColumnTitleColor"),color:"#FFFFFF",boxShadow:"0 0 3px 7px rgba(0,0,0,0.03)",padding:15}}),i.a.createElement(ya,{id:"sideModule_user_displayName",label:tt("$__displayName",1),variant:at("fieldVariant"),name:"number",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"view_comfy_ind"})),onChange:function(e){a(Object(h.a)(Object(h.a)({},n),{},Object(O.a)({},"number",e.target.value)))}},value:n&&n.number?n.number:"",placeholder:tt("$__cardNumber",1)})),i.a.createElement("fieldset",{style:{wordBreak:"break-word"}},i.a.createElement("legend",null,tt("$__forceChangePassword")),i.a.createElement(Cc,{checked:!!(n&&n._access&&n._access.user),onChange:function(e){},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__forceChangePasswordDescription")))})));function eh(){eh=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 th=Object(Fe.b)((function(e){return{history:e.db.history}}),(function(e){return Object(u.b)(n,e)}))(Object(o.memo)((function(e){var t=function(){var e=Object(Ne.a)(eh().mark((function e(){return eh().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Ce.getState().functions.socket.emit("data",{module:"galaxPay",method:"post",action:"integration"},{action:"reqData",accountData:Ce.getState().session.GlobalData},(function(e){console.log(e),e.error&&(console.log("companyDataError",e.error),console.log(e))}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return i.a.createElement("div",null,i.a.createElement(Qf,null),i.a.createElement("div",{style:{padding:15,backgroundColor:"black"},onClick:function(){t()}},"TEST"))})));var rh=Object(Fe.b)((function(e){return{history:e.db.history}}),(function(e){return Object(u.b)(n,e)}))(Object(o.memo)((function(e){i.a.useEffect((function(){console.log("StrategyAndPlans")}),[]),i.a.useEffect((function(){var e=setTimeout((function(){document.getElementById("mainPannel").scrollTo(0,0)}),100);return function(){clearTimeout(e)}}),[e.history]);var t=window.location.hash.split("/");return t[0]=t[0].replace("#",""),window.location.hash.split("/")[0].replace("#","")||s.push("sp#tab/home"),t[0]&&36===t[0].length&&!Ce.getState().db.cards[t[0]]&&s.push("/deniedAccess"),i.a.createElement("div",null,"integration")}))),nh=r(276),ah=r(75),oh=r(277),ih=r.n(oh),ch=r(278),lh=r.n(ch);r(1529);function sh(){sh=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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(162).config();var uh=Object(Fe.b)((function(e){return{history:e.db.history}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState(),r=t.session,n=(t.db,i.a.useState({})),a=Object(Ae.a)(n,2),o=a[0],c=a[1],l=i.a.useState(r.GlobalData?r.GlobalData:{}),s=Object(Ae.a)(l,2),u=s[0],d=s[1],p=i.a.useState({historyEditor:null}),f=Object(Ae.a)(p,2),m=f[0],g=f[1];i.a.useEffect((function(){c(r.GlobalData?r.GlobalData:{}),d(r.GlobalData?r.GlobalData:{});var e=ah.EditorState.createEmpty(),t=ah.EditorState.createEmpty(),n=ah.EditorState.createEmpty(),a=ah.EditorState.createEmpty(),o=ah.EditorState.createEmpty(),i=ah.EditorState.createEmpty();r.GlobalData.history&&(e=lh()(r.GlobalData.history),e=ah.ContentState.createFromBlockArray(e.contentBlocks),e=ah.EditorState.createWithContent(e)),r.GlobalData.strategicStatement&&(o=lh()(r.GlobalData.strategicStatement),o=ah.ContentState.createFromBlockArray(o.contentBlocks),o=ah.EditorState.createWithContent(o)),r.GlobalData.values&&(i=lh()(r.GlobalData.values),i=ah.ContentState.createFromBlockArray(i.contentBlocks),i=ah.EditorState.createWithContent(i)),r.GlobalData.vocation&&(t=lh()(r.GlobalData.vocation),t=ah.ContentState.createFromBlockArray(t.contentBlocks),t=ah.EditorState.createWithContent(t)),r.GlobalData.legacy&&(n=lh()(r.GlobalData.legacy),n=ah.ContentState.createFromBlockArray(n.contentBlocks),n=ah.EditorState.createWithContent(n)),r.GlobalData.message&&(a=lh()(r.GlobalData.message),a=ah.ContentState.createFromBlockArray(a.contentBlocks),a=ah.EditorState.createWithContent(a)),g({history:e,vocation:t,legacy:n,message:a,values:i,strategicStatement:o})}),[]);var v=function(){var t=Object(Ne.a)(sh().mark((function t(){var r;return sh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r={},Object.keys(o).map((function(e){!o[e]||u[e]&&JSON.stringify({a:o[e]})===JSON.stringify({a:u[e]})||(r=Object(h.a)(Object(h.a)({},r),{},Object(O.a)({},e,o[e]&&"string"===typeof o[e]?o[e].trim():o[e])))}));try{Ce.getState().functions.socket.emit("data",{module:"account",method:"post",action:"save"},r,(function(t){t.error?console.log("companyDataError",t.error):e.reduxFunction("ASYNC","SET_SESSION",Object(h.a)(Object(h.a)({},Ce.getState().session),{},{GlobalData:Object(h.a)(Object(h.a)({},Ce.getState().session.GlobalData),r)}))})),c(Object(h.a)(Object(h.a)({},Ce.getState().session.GlobalData),r)),d(Object(h.a)(Object(h.a)({},Ce.getState().session.GlobalData),r))}catch(n){console.log(n)}case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return i.a.createElement("div",null,i.a.createElement(oi,{style:{marginTop:15}},i.a.createElement(li,{xs:12,sm:12,md:6,lg:6,xl:6,style:{marginBottom:33}},i.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},i.a.createElement("div",null,tt("$__adminMessage")),i.a.createElement(Pt,null,i.a.createElement(nh.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:m.message,onEditorStateChange:function(e){c(Object(h.a)(Object(h.a)({},o),{},{message:ih()(Object(ah.convertToRaw)(e.getCurrentContent()))})),g(Object(h.a)(Object(h.a)({},m),{},{message:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),i.a.createElement(li,{xs:12,sm:12,md:6,lg:6,xl:6,style:{marginBottom:33}},i.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},i.a.createElement("div",null,tt("$__strategicStatement")),i.a.createElement(Pt,null,i.a.createElement(nh.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:m.strategicStatement,onEditorStateChange:function(e){c(Object(h.a)(Object(h.a)({},o),{},{strategicStatement:ih()(Object(ah.convertToRaw)(e.getCurrentContent()))})),g(Object(h.a)(Object(h.a)({},m),{},{strategicStatement:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),i.a.createElement(li,{xs:12,sm:12,md:6,lg:6,xl:6,style:{marginBottom:33}},i.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},i.a.createElement("div",null,tt("$__vocation")),i.a.createElement(Pt,null,i.a.createElement(nh.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:m.vocation,onEditorStateChange:function(e){c(Object(h.a)(Object(h.a)({},o),{},{vocation:ih()(Object(ah.convertToRaw)(e.getCurrentContent()))})),g(Object(h.a)(Object(h.a)({},m),{},{vocation:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),i.a.createElement(li,{xs:12,sm:12,md:6,lg:6,xl:6,style:{marginBottom:33}},i.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},i.a.createElement("div",null,tt("$__history")),i.a.createElement(Pt,null,i.a.createElement(nh.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:m.history,onEditorStateChange:function(e){c(Object(h.a)(Object(h.a)({},o),{},{history:ih()(Object(ah.convertToRaw)(e.getCurrentContent()))})),g(Object(h.a)(Object(h.a)({},m),{},{history:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),i.a.createElement(li,{xs:12,sm:12,md:6,lg:6,xl:6,style:{marginBottom:33}},i.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},i.a.createElement("div",null,tt("$__values")),i.a.createElement(Pt,null,i.a.createElement(nh.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:m.values,onEditorStateChange:function(e){c(Object(h.a)(Object(h.a)({},o),{},{values:ih()(Object(ah.convertToRaw)(e.getCurrentContent()))})),g(Object(h.a)(Object(h.a)({},m),{},{values:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),i.a.createElement(li,{xs:12,sm:12,md:6,lg:6,xl:6,style:{marginBottom:33}},i.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},i.a.createElement("div",null,tt("$__legacy")),i.a.createElement(Pt,null,i.a.createElement(nh.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:m.legacy,onEditorStateChange:function(e){c(Object(h.a)(Object(h.a)({},o),{},{legacy:ih()(Object(ah.convertToRaw)(e.getCurrentContent()))})),g(Object(h.a)(Object(h.a)({},m),{},{legacy:e}))},style:{minHeight:150},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}}))))),JSON.stringify(o)!==JSON.stringify(u)?i.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},i.a.createElement(Ct,{title:tt("$__save"),text:tt("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){v()}})):i.a.createElement(i.a.Fragment,null))}));function dh(e){return i.a.createElement("div",{style:{position:"relative",height:5,backgroundColor:"lightgray",width:"100%",overflow:"hidden",borderRadius:3,boxShadow:"0 0 0 2px rgba(0,0,0,0.05)"}},i.a.createElement("div",{style:{position:"absolute",top:1,left:1,bottom:1,width:"calc(".concat(e.value?e.value:0,"% - 2px)"),overflow:"hidden",background:"".concat(e.background?e.background:at("ColumnTitleColor")),borderRadius:3,boxShadow:"0 0 0 2px rgba(0,0,0,0.05)"}}))}var ph=r(669);function fh(){fh=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 hh=Object(Fe.b)((function(e){return{session:e.session}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Oc)((function(e){e.classes;var t=Ce.getState(),r=t.db,n=t.session,a=(r.users,r.dataType,i.a.useState(n.GlobalData?n.GlobalData:{})),o=Object(Ae.a)(a,2),c=o[0],l=o[1],s=i.a.useState(n.GlobalData?n.GlobalData:{}),u=Object(Ae.a)(s,2),d=u[0],p=u[1],f=i.a.useState(!ot(c&&c.email?c.email:"")),m=Object(Ae.a)(f,2),g=(m[0],m[1],i.a.useState(!1)),v=Object(Ae.a)(g,2),y=(v[0],v[1],ft()),b=function(){var t=Object(Ne.a)(fh().mark((function t(){var r,a,o,i;return fh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r={},Object.keys(c).map((function(e){if("file"===e)a=c[e];else if("document"===e){var t=!1;11===c[e].length&&ph.b.isValid(c[e])&&(t=!0),14===c[e].length&&ph.a.isValid(c[e])&&(t=!0),t?r=Object(h.a)(Object(h.a)({},r),{},Object(O.a)({},e,c[e]&&"string"===typeof c[e]?c[e].trim():c[e])):it({message:"".concat(tt("$__".concat(e)),": ").concat(tt("$__invalidDocument")),variant:"warning",persist:!1,horizontal:"right",confirm:null})}else!c[e]||d[e]&&JSON.stringify({a:c[e]})===JSON.stringify({a:d[e]})?c[e]||"_id"===e||it({message:"".concat(tt("$__".concat(e)),": ").concat(tt("$__cantBeEmpty")),variant:"warning",persist:!1,horizontal:"right",confirm:null}):r=Object(h.a)(Object(h.a)({},r),{},Object(O.a)({},e,c[e]&&"string"===typeof c[e]?c[e].trim():c[e]))})),t.prev=2,o=Ce.getState().functions.socket,!a){t.next=10;break}return t.next=7,_n(n.account,a);case 7:t.t0=t.sent,t.next=11;break;case 10:t.t0=!0;case 11:(i=t.t0)&&("true"!==String(i)&&(r=Object(h.a)(Object(h.a)({},r),{},{image:i})),o.emit("data",{module:"account",method:"post",action:"save"},r,(function(t){t.error?console.log("companyDataError",t.error):(e.reduxFunction("ASYNC","SET_SESSION",Object(h.a)(Object(h.a)({},Ce.getState().session),{},{GlobalData:Object(h.a)(Object(h.a)({},Ce.getState().session.GlobalData),r)})),p(Object(h.a)(Object(h.a)({},Ce.getState().session.GlobalData),r)))}))),t.next=18;break;case 15:t.prev=15,t.t1=t.catch(2),console.log(t.t1);case 18:case"end":return t.stop()}}),t,null,[[2,15]])})));return function(){return t.apply(this,arguments)}}();return(c._id===n._id||y&&y.user&&(y.userAdmin||y.userEdit))&&!0,c.independentAccount&&!1,i.a.createElement("div",null,i.a.createElement("div",{id:"sideModule_user_foto"},i.a.createElement(bi,{maxWidthOrHeight:600,img:c&&c.image?c.image:null,onChange:function(e,t){l(Object(h.a)(Object(h.a)({},c),{},{file:t}))},avatar:!0,avatarIcon:"business"})),i.a.createElement(ya,{id:"sideModule_user_fullName",label:tt("$__fullCompanyName",1),variant:at("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"business"})),onChange:function(e){l(Object(h.a)(Object(h.a)({},c),{},{fullName:e.target.value}))},onBlur:function(e){if(c&&!c.fullName){var t=e.target.value?"".concat(e.target.value.split(" ")[0]," ").concat(e.target.value.split(" ")[1]?e.target.value.split(" ")[1]:""):"";l(Object(h.a)(Object(h.a)({},c),{},{fullName:t}))}}},value:c&&c.fullName?c.fullName:"",placeholder:tt("$__fullName",1),autoFocus:!0,disabled:!0}),i.a.createElement(ya,{id:"sideModule_user_displayName",label:tt("$__displayName",1),variant:at("fieldVariant"),name:"name",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"view_comfy_ind"})),onChange:function(e){l(Object(h.a)(Object(h.a)({},c),{},{name:e.target.value}))}},value:c&&c.name?c.name:"",placeholder:tt("$__displayName",1),disabled:!0}),i.a.createElement(ya,{id:"__documentCPForCNPJ",label:tt("$__documentCPForCNPJ",1),variant:at("fieldVariant"),name:"document",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"view_comfy_ind"})),onChange:function(e){l(Object(h.a)(Object(h.a)({},c),{},{document:e.target.value}))}},value:c&&c.document?c.document:"",placeholder:tt("$__displayName",1),disabled:!!d.document}),i.a.createElement("fieldset",null,i.a.createElement("legend",null,tt("$__accountResponsible")),i.a.createElement(Pt,null,i.a.createElement(Ha,{includeMe:!0,admins:!0,avatarSize:"33px",permission:!0,noLimit:!0,selected:c.accountResponsible?[c.accountResponsible]:null,onSelect:function(e){l(Object(h.a)(Object(h.a)({},c),{},{accountResponsible:e[0]}))}}))),i.a.createElement("fieldset",null,i.a.createElement("legend",null,tt("$__invoiceResponsible")),i.a.createElement(Pt,null,i.a.createElement(Ha,{includeMe:!0,admins:!0,avatarSize:"33px",permission:!0,noLimit:!0,selected:c.invoiceResponsible?[c.invoiceResponsible]:null,onSelect:function(e){l(Object(h.a)(Object(h.a)({},c),{},{invoiceResponsible:e[0]}))}}))),i.a.createElement("ul",{style:{color:at("color")}},i.a.createElement("li",null,tt("$__createdAt"),": ",vt(c.created_at)),c.expire_at?i.a.createElement("li",{style:{color:at("menu")}},tt("$__expireDate"),": ",vt(c.expire_at)):i.a.createElement(i.a.Fragment,null)),JSON.stringify(c)!==JSON.stringify(d)?i.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},i.a.createElement(Ct,{title:tt("$__save"),text:tt("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){b()}})):i.a.createElement(i.a.Fragment,null))})));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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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=Object(Fe.b)((function(e,t){return{session:e.session}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Ic)((function(e){e.classes;var t=Ce.getState(),r=t.session,n=(t.functions,t.db),a=i.a.useState(r.GlobalData?r.GlobalData:{}),o=Object(Ae.a)(a,2),c=o[0],l=o[1],s=i.a.useState(r.GlobalData?r.GlobalData:{}),u=Object(Ae.a)(s,2),d=u[0],p=(u[1],function(){var t=Object(Ne.a)(mh().mark((function t(){var r;return mh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r={},Object.keys(c).map((function(e){!c[e]||d[e]&&JSON.stringify({a:c[e]})===JSON.stringify({a:d[e]})||(r=Object(h.a)(Object(h.a)({},r),{},Object(O.a)({},e,c[e]&&"string"===typeof c[e]?c[e].trim():c[e])))})),!r.requireExpirePassword&&r.expiresIn&&(r.expiresIn=null);try{Ce.getState().functions.socket.emit("data",{module:"account",method:"post",action:"save"},r,(function(t){t.error?console.log("companyDataError",t.error):e.reduxFunction("ASYNC","SET_SESSION",Object(h.a)(Object(h.a)({},Ce.getState().session),{},{GlobalData:Object(h.a)(Object(h.a)({},Ce.getState().session.GlobalData),r)}))}))}catch(n){console.log(n)}case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}());return i.a.createElement("div",null,i.a.createElement("fieldset",{style:{wordBreak:"break-word"}},i.a.createElement("legend",null,tt("$__2FactorTokenRequired")),i.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}},i.a.createElement(Cc,{checked:!(!c||!c.requireToken),onChange:function(e){var t=Object(h.a)(Object(h.a)({},c),{},{requireToken:!c.requireToken});c.requireToken&&delete t.requireToken,l(t)},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__required")),i.a.createElement("i",null,tt("$__2FactorTokenRequiredDescription"))),i.a.createElement("fieldset",{style:{wordBreak:"break-word"}},i.a.createElement("legend",null,tt("$__forceChangePassword")),i.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}},i.a.createElement(Cc,{checked:!(!c||!c.requireExpirePassword),onChange:function(e){var t=Object(h.a)(Object(h.a)({},c),{},{requireExpirePassword:!c.requireExpirePassword});c.requireExpirePassword&&(delete t.requireExpirePassword,c.passwordExpire&&delete t.passwordExpire),l(t)},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),tt("$__required")),i.a.createElement("i",null,tt("$__forceChangePasswordDescription")),c.requireExpirePassword?i.a.createElement("fieldset",null,i.a.createElement("legend",null,tt("$__sessionDuration",1)),i.a.createElement(hc,{id:"combo-box-demo",options:n.passwordExpire,getOptionLabel:function(e){return tt(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:c&&c.passwordExpire&&n.passwordExpire?n.passwordExpire.filter((function(e){return String(e.value)===String(c.passwordExpire)}))[0]:n.passwordExpire[0],renderInput:function(e){return i.a.createElement(ya,Object.assign({},e,{label:tt("$__expiresIn",1),variant:at("fieldVariant"),value:c&&c.passwordExpire&&n.passwordExpire?n.passwordExpire.filter((function(e){return String(e.value)===String(c.passwordExpire)}))[0]:n.passwordExpire.filter((function(e){return!e.value}))[0]}))},onChange:function(e,t){l(Object(h.a)(Object(h.a)({},c),{},{passwordExpire:t.value}))}})):i.a.createElement(i.a.Fragment,null)),i.a.createElement("fieldset",null,i.a.createElement("legend",null,tt("$__language",1)),i.a.createElement(hc,{id:"combo-box-demo",options:n.languages,getOptionLabel:function(e){return tt(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:c&&c.language&&n.languages&&n.languages.filter((function(e){return String(e.value)===String(c.language)})).length>0?n.languages.filter((function(e){return String(e.value)===String(c.language)}))[0]:n.languages[0],renderInput:function(e){return i.a.createElement(ya,Object.assign({},e,{label:tt("$__language",1),variant:at("fieldVariant"),value:c&&c.language&&n.languages&&n.languages.filter((function(e){return String(e.value)===String(c.language)})).length>0?n.languages.filter((function(e){return String(e.value)===String(c.language)}))[0]:n.languages[0]}))},onChange:function(e,t){l(Object(h.a)(Object(h.a)({},c),{},{language:t.value}))}})),i.a.createElement("fieldset",null,i.a.createElement("legend",null,tt("$__sessionExpire",1)),i.a.createElement(hc,{id:"combo-box-demo",options:n.expiresIn,getOptionLabel:function(e){return tt(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:c&&c.expiresIn&&n.expiresIn?n.expiresIn.filter((function(e){return String(e.value)===String(c.expiresIn)}))[0]:n.expiresIn.filter((function(e){return!e.value}))[0],renderInput:function(e){return i.a.createElement(ya,Object.assign({},e,{label:tt("$__expiresIn",1),variant:at("fieldVariant"),value:c&&c.expiresIn&&n.expiresIn?n.expiresIn.filter((function(e){return String(e.value)===String(c.expiresIn)}))[0]:n.expiresIn.filter((function(e){return!e.value}))[0]}))},onChange:function(e,t){l(Object(h.a)(Object(h.a)({},c),{},{expiresIn:t.value}))}})),JSON.stringify(c)!==JSON.stringify(d)?i.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},i.a.createElement(Ct,{title:tt("$__save"),text:tt("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){p()}})):i.a.createElement(i.a.Fragment,null))}))),vh=Object(_t.a)({list:{position:"relative",listStyleType:"disclosure-closed","& li":{marginBottom:3}},item:{display:"flex",alignItems:"center"}});var yh=Object(Fe.b)((function(e,t){return{}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState(),r=t.functions,n=(t.session,r.socket,e.planDetails),a=e.data,o=vh(),c=(ft(),i.a.createElement("span",{style:{marginLeft:15,color:"red",fontSize:11,cursor:"pointer"},onClick:function(){s.push("#tab/subscriptionUpgrade")}},tt("$__upgradeSubscription")));return i.a.createElement("div",null,i.a.createElement("fieldset",{style:{wordBreak:"break-word",padding:0,position:"relative"}},i.a.createElement("legend",null,tt("$__subscription"),": ",i.a.createElement("span",{style:{fontWeight:"bold"}},tt(n.label))),i.a.createElement("ul",{className:o.list},i.a.createElement("li",null,tt("$__adminLimit",1),": ",a&&a.customAdminsLimit?a.customAdminsLimit:n.settings.admins),i.a.createElement("li",null,tt("$__storageSpace",1),": ",a&&a.customStorageSpace?bt(a.customStorageSpace):bt(n.settings.space)),i.a.createElement("li",null,tt("$__BrightAndConnected",1),":",i.a.createElement("ul",{style:{position:"relative",paddingLeft:10,listStyleType:"disc"}},i.a.createElement("li",{className:o.item},tt("$__feed",1),": ",n.settings.brightAndConnected.feed?i.a.createElement(xt,{icon:"check",color:at("color"),size:18}):c),n.settings.brightAndConnected.feed?i.a.createElement("li",{className:o.item},tt("$__feedDays",1),":",n.settings.brightAndConnected.feedDays?"".concat(n.settings.brightAndConnected.feedDays," ").concat(tt("$__days")):tt("$__unlimited")):i.a.createElement(i.a.Fragment,null),i.a.createElement("li",{className:o.item},tt("$__radarLimit",1),": ",n.settings.brightAndConnected.radarLimit?n.settings.brightAndConnected.radarLimit:tt("$__unlimited")),i.a.createElement("li",{className:o.item},tt("$__insights",1),": ",n.settings.brightAndConnected.insight?i.a.createElement(xt,{icon:"check",color:at("color"),size:18}):c))),i.a.createElement("li",null,tt("$__plannings",1),":",i.a.createElement("ul",{style:{position:"relative",paddingLeft:10,listStyleType:"disc"}},i.a.createElement("li",{className:o.item},tt("$__limit",1),": ",n.settings.plan.limit?n.settings.brightAndConnected.radarLimit:tt("$__unlimited")),i.a.createElement("li",{className:o.item},tt("$__clientPlannings",1),": ",n.settings.plan.planClient?i.a.createElement(xt,{icon:"check",color:at("color"),size:18}):c),n.settings.plan.planClient?i.a.createElement("li",{className:o.item},tt("$__clientUserAdmins",1),": ",n.settings.plan.clientAdmin?n.settings.plan.clientAdmin:c):i.a.createElement(i.a.Fragment,null),i.a.createElement("li",{className:o.item},tt("$__externalPlanning",1),": ",n.settings.plan.machenPlan?i.a.createElement(xt,{icon:"check",color:at("color"),size:18}):c),i.a.createElement("li",{className:o.item},tt("$__professionalTemplates",1),": ",n.settings.plan.templates?i.a.createElement(xt,{icon:"check",color:at("color"),size:18}):c),i.a.createElement("li",{className:o.item},tt("$__guidelineLimit",1),": ",n.settings.plan.guidelineLimit?n.settings.plan.guidelineLimit:tt("$__unlimited")),i.a.createElement("li",{className:o.item},tt("$__feedLimit",1),": ",n.settings.plan.feedLimit?n.settings.plan.feedLimit:tt("$__unlimited")),i.a.createElement("li",{className:o.item},tt("$__radarLimit",1),": ",n.settings.plan.radarLimit?n.settings.plan.radarLimit:tt("$__unlimited")),i.a.createElement("li",{className:o.item},tt("$__insightLimit",1),": ",n.settings.plan.insightLimit?n.settings.plan.insightLimit:tt("$__unlimited")))),i.a.createElement("a",{href:"https://machen.ai/#planos",target:"_blank",style:{fontWeight:"bold",color:at("menu"),marginTop:33}},tt("$__viewMoreDetails")))))}));function bh(){bh=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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(162).config();var xh=Object(Fe.b)((function(e){return{history:e.db.history}}),(function(e){return Object(u.b)(n,e)}))(Object(o.memo)((function(e){var t=Ce.getState(),r=t.session,n=t.db,a=i.a.useState(0),o=Object(Ae.a)(a,2),c=o[0],l=o[1];i.a.useEffect((function(){}),[]),i.a.useEffect((function(){var e=setTimeout((function(){document.getElementById("mainPannel").scrollTo(0,0)}),100);return d(),function(){clearTimeout(e)}}),[e.history]);var u=window.location.hash.split("/");u[0]=u[0].replace("#",""),window.location.hash.split("/")[0].replace("#","")||s.push("sp#tab/home"),u[0]&&36===u[0].length&&!Ce.getState().db.cards[u[0]]&&s.push("/deniedAccess");var d=function(){var e=Object(Ne.a)(bh().mark((function e(){var t;return bh().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,bn.post("/Account_Space");case 3:(t=e.sent)&&l(parseInt(t.data)),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),p=n.plans[0].settings.space,f=n.plans[0];r&&r.GlobalData&&String(r.GlobalData.plan)&&n.plans[r.GlobalData.plan]&&n.plans[r.GlobalData.plan].settings&&(p=n.plans[r.GlobalData.plan].settings.space,f=n.plans[r.GlobalData.plan]);var h=c*(100/parseInt(p));return i.a.createElement("div",null,i.a.createElement(oi,{style:{marginBottom:15,backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},i.a.createElement(li,{xs:12,sm:6,md:6,lg:6,xl:6,style:{display:"flex",alignItems:"center"}},i.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},i.a.createElement("div",{style:{padding:10,background:at("AvatarBackground")}},i.a.createElement(xt,{icon:"card_membership",size:30,color:"#FFFFFF"})),i.a.createElement("div",{style:{marginLeft:7,width:"calc(100% - 40px)"}},i.a.createElement("div",{style:{position:"relative",width:"100%",color:at("menu"),fontWeight:"bolder",marginTop:7}},tt("$__subscriptionPlan","*"),": ",tt(f.label,"*")),i.a.createElement("div",{style:{width:"100%",color:"mediumgray",fontSize:12,fontWeight:"bold"}},tt("$__adminLimit",1),": ",f.settings.admins),i.a.createElement("a",{href:"#",style:{position:"relative",top:"-7px",color:at("color"),fontSize:10,fontWeight:"bold"}},tt("$__viewContract"))))),i.a.createElement(li,{xs:12,sm:6,md:6,lg:6,xl:6,style:{display:"flex",alignItems:"center"}},i.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},i.a.createElement("div",{style:{padding:10,background:at("AvatarBackground")}},i.a.createElement(xt,{icon:"storage",size:30,color:"#FFFFFF"})),i.a.createElement("div",{style:{marginLeft:7,width:"calc(100% - 40px)"}},i.a.createElement("div",{style:{position:"relative",marginTop:7,color:at("menu"),fontWeight:"bolder"}},tt("$__usedStorage","*"),i.a.createElement("span",{style:{marginLeft:15,color:"red",fontSize:11,cursor:"pointer"},onClick:function(){s.push("#tab/subscriptionUpgrade")}},tt("$__upgradeSubscription"))),i.a.createElement(dh,{value:Math.ceil(h),background:h>100?"red":null}),i.a.createElement("div",null,i.a.createElement("span",{style:{color:h>100?"red":"mediumgray",fontSize:12,fontWeight:"bold"}},tt("$__used",1),": ",bt(c))," ",i.a.createElement("span",{style:{color:"lightgray",fontSize:11}},tt("$__of")," ",tt("$__accountSpace",1),": ",bt(p))))))),i.a.createElement(oi,{style:{}},i.a.createElement(li,{xs:12,sm:12,md:4,lg:4,xl:4},i.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},i.a.createElement("div",null,"Dados da conta"),i.a.createElement(Pt,null,i.a.createElement(hh,{data:r&&r.GlobalData?r.GlobalData:{}})))),i.a.createElement(li,{xs:12,sm:12,md:4,lg:4,xl:4},i.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},"Prefer\xeancias",i.a.createElement(Pt,null,i.a.createElement(gh,{data:r&&r.GlobalData?r.GlobalData:{}})))),i.a.createElement(li,{xs:12,sm:12,md:4,lg:4,xl:4},i.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},tt("$__subscriptionDetails"),i.a.createElement(Pt,null,i.a.createElement(yh,{data:r&&r.GlobalData?r.GlobalData:{},planDetails:f}))))))})));var _h=Object(Fe.b)((function(e){return{history:e.db.history}}),(function(e){return Object(u.b)(n,e)}))(Object(o.memo)((function(e){i.a.useEffect((function(){console.log("accAdmin")}),[]),i.a.useEffect((function(){var e=setTimeout((function(){document.getElementById("mainPannel").scrollTo(0,0)}),100);return function(){clearTimeout(e)}}),[e.history]);var t=window.location.hash.split("/");return t[0]=t[0].replace("#",""),window.location.hash.split("/")[0].replace("#","")||s.push("acc#tab/resume"),i.a.createElement("div",null,t[1]&&"resume"===t[1]?i.a.createElement(Pt,null,i.a.createElement(xh,null)):i.a.createElement(i.a.Fragment,null),t[1]&&"profile"===t[1]?i.a.createElement(Pt,null,i.a.createElement(uh,null)):i.a.createElement(i.a.Fragment,null),t[1]&&"integrations"===t[1]?i.a.createElement(Pt,null,i.a.createElement(rh,null)):i.a.createElement(i.a.Fragment,null),t[1]&&"invoicing"===t[1]?i.a.createElement(Pt,null,i.a.createElement(th,null)):i.a.createElement(i.a.Fragment,null))}))),wh=Object(_t.a)(Wd);var Eh=Object(_t.a)(Wd);var Oh=[{path:"/d",name:"DASHBOARD",alias:"Dashboard",icon:"dashboard",component:Hd,show:!0,auth:!0,search:!1,tabs:[{path:"resume",name:"RESUME",alias:"home",icon:"space_dashboard",show:!0,auth:!0},{path:"dayTasks",name:"DAYTASKS",alias:"dayTasks",icon:"hail",show:!0,auth:!0,AppAccess:["planAdmin","planModerate"]}]},{path:"/bright-and-connected",name:"BRIGHTANDCONNECTED",alias:"brightandconnected",icon:U.a,component:yd,show:!0,auth:!0,subMenu:!0,searchFields:["tags","text"],tabs:[{path:"home",name:"home",alias:"home",icon:"home",show:!0,auth:!0},{path:"feeds",name:"FEEDS",alias:"feeds",icon:"menu_book",show:!0,auth:!0,search:!0,searchFields:["tags","text"]},{path:"radar",name:"radar",alias:"radar",icon:"settings_input_antenna",show:!0,auth:!0,search:!0,searchFields:["tags","text","users","priority"]},{path:"insight-boards",name:"INSIGHTS",alias:"insights",icon:Fd.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:Gf,show:!0,auth:!0,search:!0,subMenu:!0,searchFields:["text","tags","users","userGroup"],tabs:[{path:"users",name:"USERS",alias:"users",icon:"supervised_user_circle",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","userGroup"]},{path:"units",name:"units",alias:"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:Pf,show:!0,auth:!0,search:!0,subMenu:!0,searchFields:["text","tags","users","priority","units","status"],tabs:[{path:"home",name:"home",alias:"home",icon:"home",show:!0,auth:!0,search:!0,searchFields:["text","tags","users","priority","units","status"],hashId:!1},{path:"StrategyAndPlans",name:"StrategyAndPlans",alias:"StrategyAndPlans",icon:"view_comfy",show:!0,auth:!0,search:!0,searchFields:["text","tags","users","priority","units","status"],hashId:!1},{path:"archived",name:"archivedPlans",alias:"archivedPlans",icon:"archive",show:!0,auth:!0,search:!0,searchFields:["text","tags","users","priority","units","status"],hashId:!1},{path:"admin",name:"admin",alias:"admin",icon:"admin_panel_settings",show:!0,auth:!0,AppAccess:["planAdmin"],search:!0,searchFields:["text","tags","users","priority","units","status"],hashId:!1},{path:"templates",name:"templates",alias:"templates",icon:"smart_button",show:!0,auth:!0,search:!0,searchFields:["text","tags","users","priority","units","status"],hashId:!1},{path:"completed",name:"completed",alias:"completed",icon:"assignment_turned_in",show:!0,auth:!0,search:!0,searchFields:["text","tags","users","priority","units","status"],hashId:!1},{path:"trash",name:"trash",alias:"trash",icon:"recycling",show:!0,auth:!0,search:!0,searchFields:["text","tags","users","priority","units","status"],hashId:!1},{path:"dashboard",name:"dashboard",alias:"home",icon:"dashboard",show:!0,auth:!0,permission:4,search:!1,searchFields:[],hashId:!0,templates:!0},{path:"overview",name:"OVERVIEW",alias:"overview",icon:"select_all",show:!0,auth:!0,permission:4,search:!0,searchFields:["text","tags","users","priority","status","date"],hashId:!0,templates:!0},{path:"matrix",name:"MATRIX SWOT",alias:"matrix",icon:G.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:Fd.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:yp,icon:"recent_actors",show:!0,auth:!0,permission:1,hashId:!1,search:!0,subMenu:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"],tabs:[{path:"myDay",name:"myDay",alias:"myDay",icon:"today",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"ourDay",name:"ourDay",alias:"ourDay",icon:"reduce_capacity",show:!0,auth:!0,permission:3,AppAccess:["planAdmin","planModerate"],search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"allTasks",name:"allTasks",alias:"allTasks",icon:"how_to_reg",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"myTasks",name:"myTasks",alias:"myTasks",icon:"admin_panel_settings",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"unreaded",name:"unreaded",alias:"unreaded",icon:"notifications_active",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"private",name:"private",alias:"private",icon:"private_connectivity",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"unlinkedCards",name:"unlinkedCards",alias:"unlinkedCards",icon:"link_off",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"planningCards",name:"planningCards",alias:"planningCards",icon:"apps",show:!0,auth:!0,AppAccess:["planAdmin","planModerate"],permission:5,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"guidelines",name:"guidelines",alias:"plansGuidelines",icon:G.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:$f,icon:"turned_in",show:!0,auth:!0,search:!0,subMenu:!0,permission:1},{path:"/plataformAdministrator",name:"BackOffice",alias:"BackOffice",icon:"business",component:Tu,access:["_isDeveloper"],show:!1,auth:!0,search:!1,tabs:[{path:"versions",name:"versions",alias:"versions",icon:"app_registration",show:!0},{path:"accounts",name:"accounts",alias:"accounts",icon:"account_box",show:!0},{path:"languages",name:"languages",alias:"languages",icon:"translate",show:!0},{path:"feeds",name:"feeds",alias:"feeds",icon:"rss_feed",show:!0}]},{path:"/masterAdmin",name:"masterAdmin",alias:"masterAdmin",icon:"admin_panel_settings",component:Op,show:!1,access:["_isAdmin"],auth:!0,search:!1,tabs:[{path:"accounts",name:"accounts",alias:"accounts",icon:"account_box",show:!0},{path:"languages",name:"languages",alias:"languages",icon:"translate",show:!0},{path:"feeds",name:"feeds",alias:"feeds",icon:"rss_feed",show:!0}]},{path:"/notifications",name:"Notifications",alias:"Notifications",icon:"notifications",component:Ap,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=i.a.useState({cPassword:null,password:null}),n=Object(Ae.a)(r,2),a=n[0],o=n[1],c=su();t.get("token")&&36===t.get("token").length||s.push("/");var l=function(){var r=Object(Ne.a)(lu().mark((function r(){var n;return lu().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,Ze.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(){s.push("/login")}),3e3)),r.next=10;break;case 7:r.prev=7,r.t0=r.catch(0),e.callback({fn:"alert",message:"".concat(tt("$__invalidRequest",1)," | ").concat(tt("$__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 i.a.createElement("div",{className:c.container},i.a.createElement(oi,null,i.a.createElement(li,{xl:4,lg:4,md:4,sm:12,xs:12},i.a.createElement("form",null,i.a.createElement(Zl,{db:"cards",login:!0},i.a.createElement(is,{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)"}},i.a.createElement("h4",{className:c.cardTitle},tt("$__createPassword",1))),i.a.createElement(rs,null,i.a.createElement(Sc,{onConfirmed:function(e){o(Object(h.a)(Object(h.a)({},a),{},{password:e}))}})),i.a.createElement(iu,{className:c.justifyContentCenter},a&&a.password&&i.a.createElement(br,{style:{color:"rgba(15,18,35,1)"},simple:!0,size:"lg",block:!0,onClick:function(){return l()}},tt("$__save","*"))))))))},show:!0,auth:!1},{path:"/login",name:"Login Page",mini:"L",component:rp,show:!0,auth:!1},{path:"/register",name:"Register Page",mini:"R",component:function(e){var t=i.a.useState([]),r=Object(Ae.a)(t,2),n=r[0],a=r[1],o=i.a.useState(!1),c=Object(Ae.a)(o,2),l=c[0],u=c[1],d=i.a.useState(""),p=Object(Ae.a)(d,2),h=p[0],m=p[1],g=i.a.useState(""),v=Object(Ae.a)(g,2),y=v[0],b=v[1],x=i.a.useState(!1),_=Object(Ae.a)(x,2),w=_[0],E=_[1],O=i.a.useState(""),j=Object(Ae.a)(O,2),k=j[0],S=j[1],L=i.a.useState(""),C=Object(Ae.a)(L,2),I=C[0],F=C[1],T=i.a.useState(!1),N=Object(Ae.a)(T,2),A=N[0],D=N[1],P=i.a.useState(!1),z=Object(Ae.a)(P,2),$=z[0],M=z[1],B=i.a.useState(!1),Y=Object(Ae.a)(B,2),G=Y[0],R=Y[1],H=i.a.useState(null),W=Object(Ae.a)(H,2),U=W[0],V=W[1],q=Yp(),X=function(){var e=Object(Ne.a)(Bp().mark((function e(t){return Bp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u(!0),!ot(t)){e.next=8;break}return e.next=4,Aa(t);case 4:e.sent?(S(tt("$__emailAlreadyExists",1)),b(""),E(!1)):(S(null),E(!0),$a(h,t)),e.next=10;break;case 8:S(tt("$__invalidEmail",1)),b("");case 10:u(!1);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),K=function(){var e=Object(Ne.a)(Bp().mark((function e(){return Bp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(I.length>=6)){e.next=9;break}return u(!0),e.next=4,Pa(I,y);case 4:e.sent?(M(!0),D(!1)):D(!0),u(!1),e.next=10;break;case 9:D(!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),J=function(){var t=Object(Ne.a)(Bp().mark((function t(){var r;return Bp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u(!0),t.prev=1,t.next=4,Ze.post("user/register-final-step/",{name:h,email:y,token:I,password:U,login:!0});case 4:(r=t.sent)&&(localStorage.setItem("TOKEN",r.data.token),e.callback&&setTimeout((function(){s.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 i.a.createElement("div",{className:q.container},i.a.createElement(oi,null,i.a.createElement(li,{xs:12,sm:10,md:6},i.a.createElement(Zl,{db:"cards",className:q.cardSignup},i.a.createElement("h2",{className:q.cardTitle},tt("$__register",1)),i.a.createElement(rs,null,i.a.createElement(oi,null,i.a.createElement(li,{xs:12},i.a.createElement("div",null,i.a.createElement(ya,{className:q.textFields,label:tt("$__fullName",1),variant:"standard",name:tt("$__fullName",1),InputLabelProps:{shrink:!0},InputProps:{endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{className:q.inputAdornmentIcon},"account_box")),autoComplete:"new-password",onChange:function(e){m(e.target.value)}},value:h}),i.a.createElement(ya,{label:tt("$__email",1),variant:at("fieldVariant"),name:"email",type:"email",helperText:k,InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",className:!k&&y&&ot(y)?"":"invalid",endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"alternate_email"})),onChange:function(e){E(!1),S(null),b(e.target.value)},onBlur:function(){var e=Object(Ne.a)(Bp().mark((function e(t){return Bp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:X(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:w}),!w&&i.a.createElement(Xr,{icon:"navigate_next",text:tt("$__continue","*"),reverse:!0,style:{float:"right"},onClick:function(){X(y)}}),w&&y&&i.a.createElement(i.a.Fragment,null,i.a.createElement(ya,{label:tt("$__emailToken",1),variant:at("fieldVariant"),helperText:tt(A?"registerEmailTokenError":"registerEmailTokenDescription"),type:"password",name:"emailToken",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",className:A?"invalid":"",endAdornment:i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"keyboard"})),onChange:function(e){S(null),F(e.target.value)}},value:I,placeholder:"****"}),i.a.createElement(Xr,{icon:"reply_all",text:tt("$__resendCode","*"),reverse:!0,style:{float:"right"},onClick:function(){$a(h,y)}}),!$&&i.a.createElement(Xr,{icon:"navigate_next",text:tt("$__continue","*"),reverse:!0,style:{float:"right"},onClick:function(){K()}})),w&&$&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Sc,{onConfirmed:function(e){V(e)}}),i.a.createElement(zp.a,{open:G,onClose:function(){return R(!1)},"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description"},i.a.createElement("div",{style:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",justifyContent:"center",alignItems:"center"}},i.a.createElement("div",{style:{position:"relative",width:"80vw",maxHeight:"80vh",overflowY:"auto",backgroundColor:"#FFFFFF",padding:"15px",margin:"auto"}},i.a.createElement("div",{style:{position:"absolute",right:"3px",top:"3px"}},i.a.createElement(xt,{size:"33px",color:"black",onClick:function(){R(!1)}},"close")),i.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."),i.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."),i.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."),i.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."),i.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.")))),i.a.createElement(us.a,{classes:{root:q.checkboxLabelControl,label:q.checkboxLabel},control:i.a.createElement(qa.a,{tabIndex:-1,onClick:function(){return function(e){var t=n.indexOf(e),r=Object(f.a)(n);-1===t?r.push(e):r.splice(t,1),a(r)}(1)},checkedIcon:i.a.createElement("div",{className:q.checkedIcon},i.a.createElement(xt,{size:"16px"},"check")),icon:i.a.createElement("div",{className:q.uncheckedIcon},i.a.createElement(xt,{size:"16px",color:"red"},"remove")),classes:{checked:q.checked,root:q.checkRoot}}),label:i.a.createElement("span",null,tt("$__iAgreeToThe",1)," ",i.a.createElement("span",{onClick:function(){return R(!0)},style:{color:"blue"}},"terms and conditions"),".")}),i.a.createElement("div",{className:q.center},n.indexOf(1)>-1&&U&&i.a.createElement(br,{round:!0,color:"custom_color",onClick:function(){return J()}},"Get started"))))))),l&&i.a.createElement("div",{style:{position:"absolute",bottom:"0px",width:"100%"}},i.a.createElement(Pp,null))))))},show:!0,auth:!1},{path:"/error-page",name:"Error Page",mini:"E",component:function(){var e=Ud();return i.a.createElement("div",{className:e.contentCenter},i.a.createElement(oi,null,i.a.createElement(li,{md:12},i.a.createElement("h1",{className:e.title},"404"),i.a.createElement("h2",{className:e.subTitle},"Page not found :("),i.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=np();return i.a.createElement("div",{className:e.contentCenter},i.a.createElement(oi,null,i.a.createElement(li,{md:12},i.a.createElement("h1",{className:e.title},"\\o/"),i.a.createElement("h2",{className:e.subTitle},"Plataforma em atualiza\xe7\xe3o :)"),i.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=ap();return i.a.createElement("div",{className:e.contentCenter},i.a.createElement(oi,null,i.a.createElement(li,{md:12},i.a.createElement("h1",{className:e.title},'"/'),i.a.createElement("h2",{className:e.subTitle},"Parece que voc\xea est\xe1 OFF-LINE"),i.a.createElement("h4",{className:e.description,style:{color:"#FFFFFF"}},"Verifique a conex\xe3o de sua internet e tente novamente."),i.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."),i.a.createElement("h4",{className:e.description,style:{color:"#FFFFFF"}},i.a.createElement("a",{href:"/login",target:"_self"},"Clique aqui para tentar novamente")))))},show:!1,auth:!1}]},{path:"/calendar",name:"Calendar",icon:"date_range",component:Sd,show:!0,auth:!0,search:!0,subMenu:!0,permission:1,searchFields:["text","tags","users","priority","risk","complexity","impact","groups","status"]},{path:"/acc",name:"Account",icon:"business",alias:"account",component:_h,show:!0,auth:!0,subMenu:!0,permission:1,AppAccess:["planAdmin"],tabs:[{path:"resume",name:"resume",alias:"resume",icon:"home",show:!0,auth:!0,AppAccess:["planAdmin"]},{path:"profile",name:"profile",alias:"profile",icon:"badge",show:!0,auth:!0,AppAccess:["masterAdmin"]}]},{path:"/library",name:"library",alias:"library",component:qd,icon:"folder",show:!0,auth:!0,permission:1,hashId:!1,search:!0,subMenu:!0,searchFields:["text"]},{path:"/subscriptionUpgrade",name:"subscriptionUpgrade",alias:"subscriptionUpgrade",component:function(){var e=wh();return i.a.createElement("div",{className:e.contentCenter},i.a.createElement(oi,null,i.a.createElement(li,{md:12},i.a.createElement("h1",{className:e.title,style:{color:at("color")}},"\\o/"),i.a.createElement("h2",{className:e.subTitle,style:{color:at("menu")}},"Voc\xea j\xe1 utilizou o n\xfamero de usu\xe1rios contratados"),i.a.createElement("h4",{className:e.description,style:{color:at("menu")}},"Entre em contato com nossos consultores para solicitar um upgrade do seu plano."))))},icon:"upgrade",show:!0,auth:!0,permission:1,hashId:!1},{path:"/deniedAccess",name:"deniedAccess",alias:"deniedAccess",component:function(){var e=Eh();return i.a.createElement("div",{className:e.contentCenter},i.a.createElement(oi,null,i.a.createElement(li,{md:12},i.a.createElement("h1",{className:e.title,style:{color:at("color")}},"\\o/"),i.a.createElement("h2",{className:e.subTitle,style:{color:at("menu")}},tt("$__accessDenied","*")),i.a.createElement("h4",{className:e.description,style:{color:at("menu")}},tt("$__accessDeniedDescription","*")))))},icon:"upgrade",show:!0,auth:!0,permission:1,hashId:!1}],jh=function(e){return Object(h.a)(Object(h.a)({},Ut),{},{menu:{position:"relative",borderRight:at("color"),display:"flex",flexDirection:"column",alignItems:"center"},menuExpanded:{position:"relative",borderRight:at("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:at("color")},buttonColorExpanded:{position:"relative",float:"left",width:"calc(100% + 20px)",padding:"12px 12px 12px 20px",marginLeft:"-12px",display:"flex",backgroundColor:at("color")},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(at("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"}})};function kh(){kh=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Sh=function(e){var t=Ce.getState().db,r=window.location.hash.split("/");r[0]=r[0].replace("#","");var n=ft(),a=r[0]&&36===r[0].length&&t.cards[r[0]]&&"plan"===t.cards[r[0]].type?ea(r[0]):null,o=r&&r.length>0&&36===r[0].length&&t.cards[r[0]]&&t.cards[r[0]].image?t.cards[r[0]].image:Zr.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(){s.push("sp#".concat(t.cards[e]._id,"/dashboard"))}}))})),i.a.createElement(Ve,{title:i.a.createElement(i.a.Fragment,null,t.cards[r[0]].name)},i.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)({},Ce.getState().sideModule),{},{db:"cards",id:r[0],module:"cardEdit",activeModule:"cardEdit",data:t.cards[r[0]]}))}},i.a.createElement("div",{style:{width:"30px",height:"30px",backgroundColor:"black",marginLeft:"7px",marginRight:"3px",borderRadius:"11px",backgroundImage:'url("'.concat(o,'")'),backgroundSize:"cover",backgroundPosition:"center center"}}),e.expanded&&i.a.createElement("div",{style:{width:"100%",zIndex:1}},t.cards[r[0]].client&&t.users[t.cards[r[0]].client]&&i.a.createElement("div",{style:{fontSize:"12px",fontWeight:"bold",marginLeft:"15px"}},t.users[t.cards[r[0]].client].name),i.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:i.a.createElement(gn,{text:t.cards[r[0]].name,icon:"change_circle",transparent:!0,maxWidth:"200px",options:c})))))},Lh=Object(Fe.b)((function(e,t){return Object(h.a)(Object(h.a)({},t),{},{store:{search:e.search,chat:e.chat}})}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState(),r=t.db,n=t.search,a=i.a.useState(!1),o=Object(Ae.a)(a,2),c=o[0],l=o[1],u=i.a.useState(!1),d=Object(Ae.a)(u,2),p=d[0],f=d[1],m=Object(_t.a)(jh)(),g=window.location.pathname.split("/"),v="/".concat(g[1]),y=e.expanded;i.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)({},Ce.getState().session),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().session.cards),{},{adminViewLoader:!1,adminView:!1})}))}),[n.users.selected]);var b=window.location.hash.split("/");b[0]=b[0].replace("#","");var x="".concat(v,"#").concat(b[0]?b[0]:"tab"),_=ft(),w=(b[0]&&36===b[0].length&&r.cards[b[0]]&&"plan"===r.cards[b[0]].type&&ea(b[0]),function(t){l(t);var r=Ce.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)({},Ce.getState().db),{},{cardsExpanded:t,cards:r}))}),E=function(){var t=Object(Ne.a)(kh().mark((function t(r){var n;return kh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(f(!0),Ce.getState().session.cards.adminViewLoader){t.next=8;break}return t.next=4,jn(e,null,!0);case 4:n=t.sent,(Ce.getState().session.cards.adminViewLoader||n)&&(f(!1),e.reduxFunction("ASYNC","SET_SESSION",Object(h.a)(Object(h.a)({},Ce.getState().session),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().session.cards),{},{adminViewLoader:!0,adminView:!Ce.getState().session.cards.adminView})}))),t.next=10;break;case 8:f(!1),e.reduxFunction("ASYNC","SET_SESSION",Object(h.a)(Object(h.a)({},Ce.getState().session),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().session.cards),{},{adminViewLoader:!0,adminView:!Ce.getState().session.cards.adminView})}));case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),O=function(e){s.push(e)};return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:y?m.menuExpanded:m.menu},i.a.createElement("div",{className:y?m.buttonExpanded:m.button},i.a.createElement(Xr,{icon:y?"menu_open":"read_more",text:y?tt("$__collapsingMenu",1):null,title:y?null:tt("$__expandingMenu",1),iconColor:at("medium"),textColor:at("medium"),onClick:function(){e.subMenuExpanded(!y)},size:"21px"})),Oh.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===v&&"true"===String(e.search)||void 0)})).length>0&&!e.chat&&i.a.createElement("div",{className:y?m.buttonExpanded:m.button,id:"sideBar_subMenu_filters"},i.a.createElement(Xr,{icon:"filter_alt",text:y?tt("$__filters",1):null,title:y?null:tt("$__filters",1),iconColor:at("medium"),textColor:at("medium"),onClick:function(){e.subMenuExpanded(!y)},size:"21px"})),y&&i.a.createElement(i.a.Fragment,null,Oh.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===v&&"true"===String(e.search)||void 0)})).length>0&&!e.chat&&i.a.createElement("div",{style:{position:"relative",width:"100%",clear:"both"},id:"sideBar_subMenu_filters_options"},i.a.createElement(vf,null))),("/files"===window.location.pathname||"/t"===window.location.pathname||"/d"===window.location.pathname||"/sp"===window.location.pathname&&b[0]&&36===b[0].length)&&i.a.createElement(i.a.Fragment,null,c?i.a.createElement("div",{className:y?m.buttonExpanded:m.button,id:"sideBar_subMenu_options_collapseCards"},i.a.createElement(Xr,{text:y?tt("$__collapseCards",1):null,textColor:at("medium"),title:y?null:tt("$__collapseCards",1),icon:"close_fullscreen",iconColor:at("medium"),onClick:function(){w(!1)},size:"21px"})):i.a.createElement("div",{className:y?m.buttonExpanded:m.button,id:"sideBar_subMenu_options_expandingCards"},i.a.createElement(Xr,{text:y?tt("$__expandingCards",1):null,textColor:at("medium"),title:y?null:tt("$__expandingCards",1),icon:"open_in_full",iconColor:at("medium"),onClick:function(){w(!0)},size:"21px"}))),("/d"===v&&"dayTasks"===b[1]||"/t"===v&&n&&n.users&&n.users.selected&&Object.keys(n.users.selected).filter((function(e){return!0===n.users.selected[e]})).length>0||"/sp"===v&&!b[0])&&_&&(_.owner||_.plan&&(_.planAdmin||_.planModerate))&&i.a.createElement("div",{className:y?m.buttonExpanded:m.button,style:{display:"flex"}},p?i.a.createElement(wt.a,{size:25,style:{margin:"auto",display:"flex"}}):i.a.createElement(Xr,{text:y?tt("$__adminViewDescription",1):null,title:y?null:tt("$__adminViewDescription",1),textColor:Ce.getState().session.cards.adminView?at("color"):at("medium"),iconColor:Ce.getState().session.cards.adminView?at("color"):at("medium"),icon:"groups",id:"sideBar_subMenu_options_setAdminView",onClick:function(){E()},size:"21px"})),"/t"===window.location.pathname&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:y?m.buttonExpanded:m.button,id:"sideBar_subMenu_options_setAdminView"},i.a.createElement(Xr,{text:y?tt("$__viewInColumns",1):null,textColor:r.viewList?at("medium"):at("color"),iconColor:r.viewList?at("medium"):at("color"),title:y?null:tt("$__viewInColumns",1),icon:"view_column",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{viewList:!1}))},size:"21px"})),i.a.createElement("div",{className:y?m.buttonExpanded:m.button,id:"sideBar_subMenu_options_viewInList"},i.a.createElement(Xr,{text:y?tt("$__viewInList",1):null,title:y?null:tt("$__viewInList",1),icon:"list",iconColor:r.viewList?at("color"):at("medium"),textColor:r.viewList?at("color"):at("medium"),onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{viewList:!0}))},size:"21px"}))),i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:m.separator}),b[0]&&36===b[0].length&&r.cards[b[0]]&&i.a.createElement("div",{style:{zIndex:1},id:"sideBar_subMenu_plan_infos"},i.a.createElement(Sh,Object.assign({expanded:y},e))),Oh.filter((function(e){return e.path===v})).length>0&&Oh.filter((function(e){return e.path===v}))[0].tabs&&Oh.filter((function(e){return e.path===v}))[0].tabs.length>0&&(Oh.filter((function(e){return e.path===v}))[0].hashId&&b[0]&&36===b[0].length||!Oh.filter((function(e){return e.path===v}))[0].hashId)&&i.a.createElement(i.a.Fragment,null,Oh.filter((function(e){return e.path===v}))[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.AppAccess&&e.AppAccess.length>0?e.AppAccess.map((function(e){_[e]&&(n=!0)})):e&&!e.AppAccess&&(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 i.a.createElement("div",{className:y?m.buttonExpanded:m.button,key:t,id:"sideBar_subMenu_plan_".concat(e.alias)},i.a.createElement(Xr,{text:y?"matrix"===e.alias?"MATRIX SWOT":tt("$__".concat(e.alias),1):null,title:y?null:"matrix"===e.alias?"MATRIX SWOT":tt("$__".concat(e.alias),1),icon:e.icon,iconColor:b[1]===e.path?at("color"):at("medium"),textColor:b[1]===e.path?at("color"):at("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&&i.a.createElement("div",{className:y?m.buttonExpanded:m.button,id:"sideBar_subMenu_plan_miroBoard"},i.a.createElement(Xr,{text:y?tt("$__planningBoard",1):null,title:y?null:tt("$__planningBoard",1),icon:"developer_board",iconColor:"planningBoard"===b[1]?at("color"):at("medium"),textColor:"planningBoard"===b[1]?at("color"):at("medium"),onClick:function(){O("".concat(x,"/","planningBoard"))},size:"21px"})),"/t"===window.location.pathname&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:m.separator}),i.a.createElement("div",{className:y?m.buttonExpanded:m.button,id:"sideBar_subMenu_lastTasks"},i.a.createElement(Xr,{text:y?tt("$__lateTasks",1):null,title:y?null:tt("$__lateTasks",1),icon:"event_busy",iconColor:"late"===b[1]?at("color"):at("medium"),textColor:"late"===b[1]?at("color"):at("medium"),onClick:function(){s.push("t#tab/lateTasks")},size:"21px"})),i.a.createElement("div",{className:y?m.buttonExpanded:m.button,id:"sideBar_subMenu_nextTasks"},i.a.createElement(Xr,{text:y?tt("$__nextTasks",1):null,title:y?null:tt("$__nextTasks",1),icon:"date_range",iconColor:"nextTasks"===b[1]?at("color"):at("medium"),textColor:"nextTasks"===b[1]?at("color"):at("medium"),onClick:function(){s.push("t#tab/nextTasks")},size:"21px"}))))))}));function Ch(){Ch=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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(162).config();var Ih=Object(Fe.b)((function(e){return{store:{chat:e.chat}}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Tp)((function(e){Ce.getState().chat;var t=e.classes,r=i.a.useState(!1),n=Object(Ae.a)(r,2),a=n[0],o=n[1],c=i.a.useState(null),l=Object(Ae.a)(c,2),u=l[0],d=l[1];i.a.useEffect((function(){}),[]);var p=window.location.hash.split("/");p[0]=p[0].replace("#",""),ft(),yo();var f=function(){var t=Object(Ne.a)(Ch().mark((function t(r,n){return Ch().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:console.log(n),"tags"===n?(console.log(58),o(e.subMenuExpanded),e.setSubMenuExpanded(!1)):e.setSubMenuExpanded(a),!r||window.location.pathname===r&&n!==u||s.push(r),"chat"===n?e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},Ce.getState().chat),{},{open:!0})):(d(n),e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},Ce.getState().chat),{},{open:!1})));case 4:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();return i.a.createElement("div",{className:t.root},i.a.createElement("div",{className:t.bar,id:"sideBar"},i.a.createElement("div",{className:t.logoMini,id:"sideBar_logoMini",style:{width:"100%",justifyContent:"space-between",display:"flex",cursor:"pointer"}},i.a.createElement("img",{src:wr.a,alt:"logo",style:{width:"calc(100% - 70px)",marginLeft:"15px"},onClick:function(){f("/d#tab/resume","dashboard")}}),i.a.createElement("div",{style:{padding:"7px",marginRight:"7px",cursor:"pointer"},onClick:function(){e.menuExpand()},id:"sideBar_button_hideMenu"},i.a.createElement(xt,{icon:"menu",title:"$__hideMenu",size:"22px",color:at("color")}))),i.a.createElement("div",{style:{position:"absolute",top:"100px",bottom:"0px",overflowX:"auto",width:"100%"}},i.a.createElement("div",{className:t.item,id:"sideBar_button_dashboard"},i.a.createElement("div",{className:"/d"===window.location.pathname?t.itemButtomActive:t.itemButtom,onClick:function(){f("/d#tab/resume","dashboard")}},i.a.createElement(xt,{icon:"dashboard",badgeColor:"primary",color:"parent",badgeVisible:!0,title:"$__dashboard",size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),tt("$__dashboard","*"))),i.a.createElement("div",{className:t.item,id:"sideBar_button_brightAndConnected"},i.a.createElement("div",{className:"/bright-and-connected"===window.location.pathname?t.itemButtomActive:t.itemButtom,onClick:function(){f("/bright-and-connected#tab/home","bright-and-connected")}},i.a.createElement(xt,{icon:U.a,badgeColor:"primary",color:"parent",badgeVisible:!0,title:"BRIGHT & CONNECTED",size:"21px",style:{marginRight:"7px"}}),"BRIGHT & CONNECTED")),i.a.createElement("div",{className:t.item,id:"sideBar_button_StrategyAndPlans"},i.a.createElement("div",{className:"/sp"===window.location.pathname?t.itemButtomActive:t.itemButtom,onClick:function(){f("/sp#tab/home","StrategyAndPlans")}},i.a.createElement(xt,{icon:"view_comfy",badgeColor:"primary",color:"parent",badgeVisible:!0,title:tt("$__StrategyAndPlans"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),tt("$__StrategyAndPlans","*"))),i.a.createElement("div",{className:t.item,id:"sideBar_button_myTasks"},i.a.createElement("div",{className:"/t"===window.location.pathname?t.itemButtomActive:t.itemButtom,onClick:function(){f("/t#tab/myTasks","myTasks")}},i.a.createElement(xt,{icon:"task",badgeColor:"primary",color:"parent",badgeVisible:!0,title:tt("$__activities"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),tt("$__activities","*"))),i.a.createElement("div",{className:t.item,id:"sideBar_button_library"},i.a.createElement("div",{className:"/library"===window.location.pathname?t.itemButtomActive:t.itemButtom,onClick:function(){f("/library","library")}},i.a.createElement(xt,{icon:"folder",badgeColor:"primary",color:"parent",badgeVisible:!0,title:tt("$__library"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),tt("$__library","*"))),i.a.createElement("div",{className:t.item,id:"sideBar_button_tags"},i.a.createElement("div",{className:"/tags"===window.location.pathname?t.itemButtomActive:t.itemButtom,onClick:function(){f("/tags","tags")}},i.a.createElement(xt,{icon:"turned_in",badgeColor:"primary",color:"parent",badgeVisible:!0,title:tt("$__tags"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),tt("$__tags","*"))),i.a.createElement("div",{className:t.item,id:"sideBar_button_calendar"},i.a.createElement("div",{className:"/calendar"===window.location.pathname?t.itemButtomActive:t.itemButtom,onClick:function(){f("/calendar","calendar")},style:{position:"relative"}},i.a.createElement(xt,{icon:"event",badgeColor:"primary",color:"parent",badgeVisible:!0,title:tt("$__calendar"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),tt("$__calendar","*"))),i.a.createElement("div",{className:t.separator}),i.a.createElement("div",{className:t.item,id:"sideBar_button_chat"},i.a.createElement("div",{className:Ce.getState().chat.open?t.itemButtomActive:t.itemButtom,onClick:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},Ce.getState().chat),{},{open:!Ce.getState().chat.open}))}},i.a.createElement(Xs,null,i.a.createElement(xt,{icon:"chat",color:"parent",title:"$__chat",size:"21px",style:{marginBottom:"0px",marginRight:"7px"}})),tt("$__chat","*"))),i.a.createElement("div",{className:t.item,id:"sideBar_button_calendar"},i.a.createElement("div",{className:t.itemButtom,onClick:function(){window.open("https://support.machen.ai","_blank")}},i.a.createElement(xt,{icon:"help_outline",badgeColor:"primary",color:"parent",badgeVisible:!0,title:tt("$__support"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),tt("$__support","*")))),"myDay"!==u&&"timer"!==u&&"chat"!==u&&("/t"===window.location.pathname||"/sp"===window.location.pathname||"/c"===window.location.pathname||"/d"===window.location.pathname||"/p"===window.location.pathname||"/acc"===window.location.pathname||"/bright-and-connected"===window.location.pathname||"/library"===window.location.pathname||"/notifications"===window.location.pathname||"/calendar"===window.location.pathname||"/masterAdmin"===window.location.pathname)&&i.a.createElement("div",{className:e.subMenuExpanded?t.moduleExpanded:t.module,id:"sideBar_subMenu"},i.a.createElement(Lh,{hashs:p,subMenuExpanded:function(t){e.setSubMenuExpanded(t)},expanded:e.subMenuExpanded})),"myDay"!==u&&"timer"!==u&&"chat"!==u&&"/tags"===window.location.pathname&&i.a.createElement("div",{className:t.moduleExpanded,id:"sideBar_session_tags"},i.a.createElement(qs,{onLoad:function(){e.setSubMenuExpanded(!0)},onExit:function(){return e.setSubMenuExpanded(!1)}})),i.a.createElement("div",{style:{position:"absolute",bottom:0,left:15,color:"#c0b283",fontSize:"10px"}},"V:",V.version)))})));var Fh=Object(Fe.b)((function(e,t){return Object(h.a)(Object(h.a)({},t),{},{unreadeds:e.chats.unreadeds,chats:e.chats.timelines,chat:e.chat})}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState().chat;return e.unreadeds,i.a.createElement("div",{id:"chatNotificationsBt",style:{zIndex:"100 !important"}},i.a.createElement(kt.a,{"aria-haspopup":"true",onClick:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},t),{},{open:!t.open}))}},i.a.createElement(Xs,null,i.a.createElement(xt,{icon:"chat_bubble_outline",color:"parent",title:"$__chat"}))))}));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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Nh=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState(),r=t.db,n=t.timeline,a=t.session,o=i.a.useState(!1),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.a.useState({}),d=Object(Ae.a)(u,2),p=d[0],f=d[1],h=i.a.useState("users"),m=Object(Ae.a)(h,2),g=m[0],v=m[1],y=i.a.useRef(null),b=Be()().tz("America/Sao_Paulo").format("YYYY/MM/DD");ft(),i.a.useEffect((function(){x()}),[n]);var x=function(){var e=Object(Ne.a)(Th().mark((function e(){var t;return Th().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=yo(),f(t),p.total>0&&0===p.users&&v("groups"),"groups"===g&&p.total>0&&0===p.groups&&v("users");case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_=function(e){y.current&&y.current.contains(e.target)||s(!1)},w=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&&Be()(new Date(1e3*r.cards[e]._users[a._id].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===b})).map((function(e){return r.cards[e]}));return 0===w.length?i.a.createElement(i.a.Fragment,null):i.a.createElement("div",{id:"notificationsBt",style:{zIndex:"100 !important"}},i.a.createElement(kt.a,{ref:y,"aria-controls":l?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){s((function(e){return!e}))}},i.a.createElement(St.a,{overlap:"rectangular",badgeContent:w.filter((function(e){return"completed"!==e.status})).length,color:"secondary"},i.a.createElement(xt,{icon:"hourglass_empty",color:"parent",title:"$__myDay"}))),w.length>0&&i.a.createElement(ln.a,{open:l,anchorEl:y.current,role:void 0,transition:!0,disablePortal:!0,style:{width:"400px"}},(function(e){var t=e.TransitionProps,r=e.placement;return i.a.createElement(on.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),i.a.createElement(cn.a,null,i.a.createElement(an.a,{onClickAway:_},i.a.createElement("div",{style:{height:"auto",maxHeight:"calc(90vh - 80px)",width:"100%",overflowY:"auto"}},i.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"7px"}},tt("$__myDay")),i.a.createElement(To,{noChecklist:!0,noDelete:!0,showCard:!0,myDay:!0,db:"cards"})))))})))})),Ah=Object(_t.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 Dh=Object(Fe.b)((function(e){return{store:e}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState(),r=t.chat,n=t.notifications,a=t.timeline,o=t.functions,c=t.session,l=o.socket,s=e.data,u=i.a.useState(!1),d=Object(Ae.a)(u,2),p=(d[0],d[1],i.a.useState(!1)),f=Object(Ae.a)(p,2),m=f[0],g=f[1],v=Ah();i.a.useEffect((function(){return function(){}}),[]);var y="cards";s&&s.cardId&&Ce.getState().db.users[s.cardId]&&(y="users");var b=function(t){if(Ce.getState().db.cards[t]&&"chatGroup"===Ce.getState().db.cards[t].type){var a=[s.cardId];Object.keys(n).length>0&&Object.keys(n).filter((function(e){return n[e].nodeId===t||n[e].inNode&&n[e].inNode._id===t})).map((function(e){-1===a.indexOf(e)&&a.push(e)})),ho(e,{readedBy:c._id,id:e.nodeId,db:"cards",type:"log"}),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}))}e.onClick&&e.onClick()},x=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 i.a.createElement("div",{className:s.readed?v.Readed:v.unReaded,onClick:function(){},style:{width:369,overflow:"auto"}},s.cardId&&Ce.getState().db.cards[s.cardId]&&i.a.createElement("div",{style:Ce.getState().db.cards[s.cardId]&&"chatGroup"===Ce.getState().db.cards[s.cardId].type?{cursor:"pointer"}:{},onClick:Ce.getState().db.cards[s.cardId]&&"chatGroup"===Ce.getState().db.cards[s.cardId].type?function(e){b(s.cardId)}:null},i.a.createElement(ki,{setPrivate:function(e){g(e)},db:"cards",data:Ce.getState().db.cards[s.cardId],onlyOption:!(!Ce.getState().db.cards[s.cardId]||"chatGroup"!==Ce.getState().db.cards[s.cardId].type),onClick:Ce.getState().db.cards[s.cardId]&&"chatGroup"===Ce.getState().db.cards[s.cardId].type?function(e){b(s.cardId)}:null})),x.length>0&&(!Ce.getState().db.cards[s.cardId].private||Ce.getState().db.cards[s.cardId].private&&(Ce.getState().controls.lockPrivate||m))?i.a.createElement(i.a.Fragment,null,x.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 i.a.createElement("div",{key:"".concat(t),style:{position:"relative",marginBottom:"33px",paddingBottom:15,display:"-webkit-box"}},i.a.createElement(Ji,{storie:Object(h.a)(Object(h.a)({},Ce.getState().timeline&&Ce.getState().timeline[s.cardId]&&Ce.getState().timeline[s.cardId][t]?Ce.getState().timeline[s.cardId][t]:{}),{},{idRel:t}),boxStyle:{width:"calc(100% - 10px) !important",maxWidth:"285px"},db:y,noReactions:!0,noReply:!0,openLightBox:function(r){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:Ce.getState().timeline[s.cardId][t].files?Ce.getState().timeline[s.cardId][t].files:[],file:r})}}),r+1===x.length?i.a.createElement("div",{style:{position:"absolute",height:"93px",left:0,bottom:"-33px",right:8,background:"linear-gradient(0deg, rgba(255,255,255,1) 34%, rgba(255,255,255,0) 100%)"}},i.a.createElement("div",{style:{position:"absolute",bottom:"0px",display:"flex",justifyContent:"space-between",width:"100%"}},i.a.createElement(Ct,{title:tt("$__open",1),text:tt("$__open",1),color:at("color"),icon:"launch",onClick:"chatGroup"===Ce.getState().db.cards[s.cardId].type?function(e){b(s.cardId)}:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},Ce.getState().sideModule),{},{db:"cards",id:s.cardId,module:"cardEdit",activeModule:"cardEdit",data:Ce.getState().db.cards[s.cardId]}))},size:"13px",textSize:"13px",style:{padding:"0px !important"}}),i.a.createElement(Ct,{title:tt("$__markAsRead",1),text:tt("$__markAsRead",1),color:at("color"),icon:"mark_chat_read",onClick:function(){!function(){var t=la(s.cardId);e.reduxFunction("ASYNC","SET_NOTIFICATIONS",Object(h.a)(Object(h.a)({},Ce.getState().notifications),{},{total:Ce.getState().notifications.total-t.total})),Ce.getState().db&&Ce.getState().db.cards&&Ce.getState().db.cards[s.cardId]&&e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},s.cardId,Object(h.a)(Object(h.a)({},Ce.getState().db.cards[s.cardId]),{},{_notifications:{comment:0,kpi:0,timer:0,log:0}})))})),l.emit("data",{module:"chat",method:"put",action:"read"},{readedBy:c._id,id:s.cardId,db:"cards",type:"all"},(function(){})),e.onRead&&setTimeout((function(){e.onRead()}),500)}()},size:"13px",textSize:"13px",style:{padding:"0px !important"}}))):i.a.createElement(i.a.Fragment,null))}))):i.a.createElement(i.a.Fragment,null))}));function Ph(){Ph=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 zh=Object(Fe.b)((function(e){return{store:{notifications:e.notifications,timeline:e.timeline,session:e.session,cards:e.db.cards}}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState(),r=t.notifications,n=t.session,a=t.timeline,o=t.functions.socket,c=i.a.useState(!1),l=Object(Ae.a)(c,2),s=l[0],u=l[1],d=i.a.useState(!1),p=Object(Ae.a)(d,2),f=(p[0],p[1]),m=i.a.useState(!1),g=Object(Ae.a)(m,2),v=g[0],y=g[1],b=i.a.useState(7),x=Object(Ae.a)(b,2),_=x[0],w=x[1],E=i.a.useState(!1),j=Object(Ae.a)(E,2),k=j[0],S=j[1],L=i.a.useRef();i.a.useEffect((function(){return s||(u(!0),C()),function(){u(!1)}}),[]),i.a.useEffect((function(){return C(0,0,!0),function(){}}),[e.store.timeline,e.store.notifications,e.store.cards]);var C=function(){var t=Object(Ne.a)(Ph().mark((function t(){var r,n,a,o,i,c,l,s,u,d,p=arguments;return Ph().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=p.length>0&&void 0!==p[0]?p[0]:0,n=p.length>1&&void 0!==p[1]?p[1]:0,a=p.length>2&&void 0!==p[2]&&p[2],T<(o=r)&&(o=0),y(!0),!a){t.next=10;break}t.t0={data:[]},t.next=13;break;case 10:return t.next=12,bn.post("/M_UnReadedList",{skip:o,limit:n});case 12:t.t0=t.sent;case 13:if(i=t.t0,c=0,l=0,s=0,!(a||i&&i.data&&i.data.length>0)){t.next=29;break}return u=Object(h.a)({},Ce.getState().timeline),d=[],t.next=22,new Promise((function(e,t){i.data.map((function(t,r){c=t.total,d.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(O.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(O.a)({},e.type,Object(h.a)(Object(h.a)({},r[e.type]),{},Object(O.a)({},e._id,e))))})),parseInt(l)<parseInt(e.data.created_at)&&(l=parseInt(e.data.created_at)),(0===s||s>parseInt(e.data.created_at))&&(s=parseInt(e.data.created_at)),u=Object(h.a)(Object(h.a)({},u),{},Object(O.a)({},e.nodeId,Object(h.a)(Object(h.a)({},u&&u[e.nodeId]?u[e.nodeId]:{}),{},Object(O.a)({},e.data._id,Object(h.a)(Object(h.a)(Object(h.a)({},e.data),e.params),{},{readedBy:t,_reactions:r})))))})),r+1===i.data.length&&e(!0)}))}));case 22:t.sent&&e.reduxFunction("ASYNC","SET_NOTIFICATIONS",{total:c>0?c:0,lastNotification:l,firstNotification:s}),e.reduxFunction("ASYNC","SET_TIMELINE",Object(h.a)(Object(h.a)({},Ce.getState().timeline),u)),On(e,d),y(!1),t.next=30;break;case 29:y(!1);case 30:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),I=function(){var t=Object(Ne.a)(Ph().mark((function t(){return Ph().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:it({message:tt("$__confirmClearAllNotifications",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){S(!1);var t=Object(h.a)({},Ce.getState().timeline);Object.keys(t).map((function(e){t&&t[e]&&Object.keys(t[e]).filter((function(r){return Ce.getState().db.cards[e]&&"chatGroup"!==Ce.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{o.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)}}(),F=function(e){L.current&&L.current.contains(e.target)||S(!1)},T=0,N=0;return Object.keys(Ce.getState().db.cards).filter((function(e){var t=Ce.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<=_&&(N+=1),T+=1}))})),r.total>T&&(T=r.total),0===T&&k&&S(!1),0===T?i.a.createElement(i.a.Fragment,null):i.a.createElement("div",{id:"notificationsBt",style:{zIndex:"100 !important"}},i.a.createElement(kt.a,{ref:L,"aria-controls":k?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){f(!(T>0)),S((function(e){return!e}))}},i.a.createElement(St.a,{overlap:"rectangular",badgeContent:T,color:"secondary"},i.a.createElement(xt,{icon:0===T?"notifications_none":"notifications_active",color:"parent",title:"$__notifications"}))),i.a.createElement(ln.a,{open:k,anchorEl:L.current,role:void 0,transition:!0,disablePortal:!0},(function(e){var t=e.TransitionProps,r=e.placement;return i.a.createElement(on.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),i.a.createElement(cn.a,null,i.a.createElement(an.a,{onClickAway:F},i.a.createElement("div",{style:{height:"auto",maxHeight:"calc(90vh - 80px)",width:"369px",overflowY:"auto"}},i.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"7px",width:"-webkit-fill-available"}},i.a.createElement("div",null,tt("$__notifications")),T>0?i.a.createElement(Ct,{title:tt("$__clearNotifications",1),text:tt("$__clearNotifications",1),color:at("color"),icon:"clear_all",onClick:function(){I()},size:"21px",style:{padding:"0px !important"}}):i.a.createElement(i.a.Fragment,null)),Object.keys(Ce.getState().db.cards).filter((function(e){var t=Ce.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<=_?i.a.createElement("div",{key:"".concat(e)},i.a.createElement(Dh,{data:{cardId:e},onRead:function(){setTimeout((function(){C(0,8)}),2e3)},onClick:function(){S(!1)}})):i.a.createElement(i.a.Fragment,{key:"".concat(t).concat(e)})})),parseInt(Ce.getState().notifications.total)>N?i.a.createElement("div",{style:{width:"calc(100% - 14px)",display:"flex",justifyContent:"center",padding:7}},v?i.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},i.a.createElement("span",{style:{color:at("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},tt("$__loadingNotifications")),i.a.createElement(so,null)):i.a.createElement(Ct,{title:tt("$__seeMoreNotifications",1),text:tt("$__seeMoreNotifications",1),color:at("menu"),icon:"notifications_active",onClick:function(){C(_),w(_+7)},size:"21px",style:{padding:"0px !important"}})):i.a.createElement(i.a.Fragment,null)))))})))}));var $h=Object(Fe.b)((function(e){return{users:e.users}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=i.a.useState(!1),r=Object(Ae.a)(t,2),n=r[0],a=r[1],o=i.a.useRef(null),c=Ce.getState().db,l=(c.users,ft(),window.location.hash.split("/"));l[0]=l[0].replace("#","");var s=null;36===l[0].length||l[2]&&36===l[2].length?36===l[0].length?s=l[0]:36===l[2].length&&(s=l[2]):s=null;var u=window.location.pathname.replace("/","").toLowerCase(),d=c.dataType.filter((function(e){if(("sp"===u||!e.hash&&!s||e.hash&&s)&&e.view&&Object.keys(e.view).filter((function(e){return e===u})).length>0&&(!e.view[u].pages||l[1]&&e.view[u].pages.indexOf(l[1])>-1||!l[1]&&e.view[u].pages.indexOf("none")>-1))return e})),p=function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Yf();console.log(n),e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},Ce.getState().sideModule),{},{id:"new",activeModule:t.iniModule,db:t.db,data:Object(h.a)({type:t.name,_parent:l[0]&&c.cards[l[0]]?l[0]:null},"user"===t.data.type?{}:Object(h.a)({status:"notStarted"},r?{isTemplate:!0}:{}))}))},f=function(e){o.current&&o.current.contains(e.target)||a(!1)};function m(e){"Tab"===e.key&&(e.preventDefault(),a(!1))}return 0===d.length?i.a.createElement(i.a.Fragment,null):i.a.createElement("div",{id:"QuickAddBt"},i.a.createElement(kt.a,{ref:o,"aria-controls":n?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){1===d.length?p(d[0],!(!l[1]||"template"!==l[1])):d.length>1&&a((function(e){return!e}))}},i.a.createElement(xt,{usePropagation:!0,size:"27px",color:at("menu")},"add_box")),i.a.createElement(ln.a,{open:n,anchorEl:o.current,role:void 0,transition:!0,disablePortal:!0},(function(e){var t=e.TransitionProps,r=e.placement;return i.a.createElement(on.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),i.a.createElement(cn.a,null,i.a.createElement(an.a,{onClickAway:f},i.a.createElement(hn.a,{autoFocusItem:n,id:"menu-list-grow",onKeyDown:m},d.sort((function(e,t){return e.name>t.name?-1:0})).map((function(e,t){return i.a.createElement(fn.a,{key:t,style:{color:at("menu")},onClick:function(){a(!1),p(e)}},i.a.createElement(xt,{icon:e.icon,style:{margin:"none !important"},color:at("menu")}),i.a.createElement("span",{style:{marginLeft:"7px"}},tt("$__".concat(e.name),1)))}))))))})))}));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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Bh=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState(),r=t.db,n=t.timeline,a=t.session,o=(t.chat,i.a.useState(!1)),c=Object(Ae.a)(o,2),l=(c[0],c[1]),s=i.a.useState(!1),u=Object(Ae.a)(s,2),d=u[0],p=u[1],f=i.a.useState({}),h=Object(Ae.a)(f,2),m=h[0],g=h[1],v=i.a.useState("users"),y=Object(Ae.a)(v,2),b=y[0],x=y[1],_=i.a.useRef(null);Be()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),ft(),i.a.useEffect((function(){l(!0),w()}),[n]);var w=function(){var e=Object(Ne.a)(Mh().mark((function e(){var t;return Mh().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=yo(),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?i.a.createElement(i.a.Fragment,null):i.a.createElement("div",{id:"notificationsBt",style:{zIndex:"100 !important"}},i.a.createElement(kt.a,{ref:_,"aria-controls":d?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){p((function(e){return!e}))}},i.a.createElement(St.a,{badgeContent:O.length,color:"secondary",overlap:"rectangular"},i.a.createElement(xt,{icon:"timer",color:"parent",title:"$__timersInProgress"}))),O.length>0&&i.a.createElement(ln.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 i.a.createElement(on.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),i.a.createElement(cn.a,null,i.a.createElement(an.a,{onClickAway:E},i.a.createElement("div",{style:{height:"auto",maxHeight:"calc(90vh - 80px)",width:"100%",overflowY:"auto"}},i.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"7px"}},tt("$__timersInProgress")),O.map((function(e,t){return i.a.createElement(ki,{db:"cards",key:t,data:e,notGlobalExpanded:!0,viewTimer:!0})}))))))})))}));function Yh(){Yh=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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=Object(Fe.b)((function(e,t){return{cards:e.db.cards}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(nc)((function(e){var t=i.a.useState(""),r=Object(Ae.a)(t,2),n=r[0],a=r[1],o=i.a.useState(!1),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.a.useState([]),d=Object(Ae.a)(u,2),p=d[0],f=d[1],m=i.a.useState(!1),g=Object(Ae.a)(m,2),v=g[0],y=g[1],b=i.a.useState(!1),x=Object(Ae.a)(b,2),_=x[0],w=x[1],E=i.a.useState("all"),O=Object(Ae.a)(E,2),j=O[0],k=O[1],S=Ce.getState(),L=S.db,C=S.session,I=ft(),F=window.location.hash.split("/");F[0]=F[0].replace("#",""),i.a.useEffect((function(){return function(){}}),[]),i.a.useEffect((function(){var t=setTimeout((function(){}),15e3);return e.text.length>1&&e.text!==n&&(a(e.text),clearTimeout(t),t=setTimeout((function(){return T()}),500),s(!0)),function(){return clearTimeout(t)}}),[e.text]),i.a.useEffect((function(){var t=setTimeout((function(){}),15e3);return e.completed!==v&&e.text&&e.text.length>1&&(s(!0),y(!v),w(!0),t=setTimeout((function(){return T()}),500)),function(){return clearTimeout(t)}}),[e.completed]),i.a.useEffect((function(){var t=setTimeout((function(){}),15e3);return e.deleted!==_&&e.text&&e.text.length>1&&(s(!0),w(!_),y(!0),t=setTimeout((function(){return T()}),500)),function(){return clearTimeout(t)}}),[e.deleted]);var T=function(){var t=Object(Ne.a)(Yh().mark((function t(){var r;return Yh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,En(e,{search:e.text,ignoreLoader:!0,deleted:e.deleted,completed:e.completed,cardLoad:"search"});case 2:(r=t.sent)&&setTimeout((function(){N(r)}),1e3);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),N=function(){var t=Object(Ne.a)(Yh().mark((function t(r){var n,a,o;return Yh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object(h.a)(Object(h.a)({},Ce.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.deleted&&n[t].deleted||!e.deleted&&!n[t].deleted&&(!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&&e.text&&n[t]&&n[t].name&&n[t].name.toLowerCase().indexOf(e.text.toLowerCase())>-1||n[t]&&e.text&&n[t].description&&n[t].description.toLowerCase().indexOf(e.text.toLowerCase())>-1)&&(!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 i.a.createElement("div",{style:{width:"100%"}},i.a.createElement("div",{style:{positin:"relative",width:"100%",minHeight:"100px"}},l&&i.a.createElement(oi,null,i.a.createElement(li,{xs:12,sm:12,md:12,lg:12,xl:12},i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},i.a.createElement(so,null)))),i.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},i.a.createElement("div",{style:{width:"177px",padding:7,display:"flex",flexDirection:"column",marginRight:"solid 1px lightgray"}},p.length>1?i.a.createElement("div",{style:{backgroundColor:"all"===j?"rgba(0,0,0,0.08)":"",padding:"0 3px"}},i.a.createElement(Ct,{title:tt("$__allResults","*"),text:tt("$__allResults","*"),color:"all"===j?at("menu"):"lightGray",icon:"manage_search",onClick:function(){k("all")},size:"17px",style:{padding:"0px 3px !important"},transparent:!0})):i.a.createElement(i.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 i.a.createElement("div",{key:"".concat(t,"-").concat(e),style:{backgroundColor:"asset"===j?"rgba(0,0,0,0.08)":"",padding:"0 3px",display:"flex",justifyContent:"space-between",alignItems:"center"}},i.a.createElement(Ct,{title:tt("".concat(e.label),"*"),text:tt("".concat(e.label),"*"),color:j===e.value?at("menu"):"lightGray",icon:e.icon,onClick:function(){k(e.value)},size:"17px",style:{padding:"0px 3px !important"},transparent:!0}),i.a.createElement("div",{style:{backgroundColor:j===e.value?at("menu",1):at("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))}))),i.a.createElement("div",{style:{width:"calc(100% - 177px)",padding:7,display:"flex",flexDirection:"column"}},i.a.createElement(oi,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 i.a.createElement("div",{key:"".concat(t,"-").concat(r)},i.a.createElement(li,{xs:12,sm:12,md:12,lg:12,xl:12},i.a.createElement(hi,{title:tt(t.label,1),icon:t.icon,color:at("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 i.a.createElement(li,{key:t,md:12,style:{minWidth:"300px"}},i.a.createElement(ki,{data:L.cards[t],db:"cards",showConnectedIn:!0,searchText:e.text,expanded:!1,onAction:function(){e.onAction()}}))}))))})))))))})));Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(nc)((function(e){return i.a.createElement(i.a.Fragment,null)})));function Rh(){Rh=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Hh=Object(Fe.b)((function(){return{}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t,r=Ce.getState(),n=r.timeline,a=r.functions.socket,o=Ce.getState().db,c=i.a.useState(!1),l=Object(Ae.a)(c,2),s=l[0],u=l[1],d=i.a.useState(e.data),p=Object(Ae.a)(d,2),f=p[0],m=p[1],g=f.name.split("."),v=g[g.length-1],y=i.a.useState(!1),b=Object(Ae.a)(y,2),x=b[0],_=b[1],w=i.a.useState(g[0]),E=Object(Ae.a)(w,2),j=E[0],k=E[1],S=i.a.useState(g[0]),L=Object(Ae.a)(S,2),C=L[0],I=L[1];i.a.useEffect((function(){C||I(!0)}),[e.data]),"blob"===f.name&&(f.name="".concat(tt("$__coverImage","*"),".jpg"),v="jpg");var F="attachment";Ce.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(v.toLowerCase())>-1})).length>0&&(F=Ce.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(v.toLowerCase())>-1}))[0].icon||"https://machen.azureedge.net/".concat(f.file));var T=function(){var e=Object(Ne.a)(Rh().mark((function e(t){return Rh().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(Ne.a)(Rh().mark((function e(){return Rh().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)}}(),N=Object(h.a)({},o.cards[f.cardId]&&n[f.cardId]&&n[f.cardId][f.timelineId]?n[f.cardId][f.timelineId]:f.message);return N&&!N.message&&(N=Object(h.a)(Object(h.a)({},N),{},{message:tt("$__onlyAttachment")})),i.a.createElement("div",{style:{width:"100%"}},i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginBottom:"5px",cursor:"pointer"}},e.resume?i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"},onClick:function(t){e.openLightBox&&e.openLightBox()}},i.a.createElement("div",{style:{position:"relative",float:"left",width:"33px",height:"33px",alignItems:"center",display:"flex",overflow:"hidden"}},"string"===typeof F&&-1===F.indexOf("https")&&-1===F.indexOf("svg")?i.a.createElement(xt,{icon:F,size:"33px"}):i.a.createElement("img",{src:F,width:"100%",style:{width:"auto",height:"auto",maxHeight:"77%"},onError:function(e){return e.target.src=F}})),i.a.createElement("div",{style:{marginLeft:"7px",width:"calc(100% - 80px)",maxWidth:"calc(100% - 80px)",minWidth:"150px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}},dt(f.name,e.searchText)),o.users[f.createdBy]&&i.a.createElement("div",{style:{position:"absolute",right:"10px",top:"7px",zIndex:"10"}},i.a.createElement(Sa.a,{max:7},i.a.createElement(Ue.a,{title:o.users[f.createdBy].displayName?o.users[f.createdBy].displayName:o.users[f.createdBy].name},i.a.createElement(Sl,{alt:o.users[f.createdBy].displayName?o.users[f.createdBy].displayName:o.users[f.createdBy].name,src:"".concat(o.users[f.createdBy].image),style:{width:"15px",height:"15px"}},o.users[f.createdBy].name.substr(0,1)))))),e.showParent&&(f.timelineId||f.message)&&(o.cards[f.cardId]&&n[f.cardId]&&n[f.cardId][f.timelineId]||f.message)&&i.a.createElement("div",{style:{width:"100%",marginBottom:"33px"}},i.a.createElement(Ji,{openLightBox:function(t){e.openLightBox&&e.openLightBox(t)},storie:N,db:"cards",nodeId:f.cardId}),i.a.createElement("div",{style:{clear:"both"}})),e.showParent&&f.cardId&&o.cards[f.cardId]&&i.a.createElement("div",{style:{width:"100%",top:"33px"}},i.a.createElement(ki,{db:"cards",data:o.cards[f.cardId],showConnectedIn:!0})),i.a.createElement("div",{style:{width:"100%",height:"1px",backgroundColor:"rgba(0,0,0,0.1)",marginTop:"15px"}})):i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginTop:"7px",padding:"15px",display:"flex",alignItems:"center",height:"70px"}},i.a.createElement("div",{style:{position:"absolute",top:"0px",width:"calc(100% - 30px)",borderBottom:"solid 1.5px ".concat(at("color")),alignItems:"center",display:"flex",color:at("color")}},i.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?i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px",display:"flex",alignItems:"center"}},i.a.createElement("div",{style:{width:"calc(100% - 50px)",display:"flex"}},i.a.createElement(ya,{label:tt("$__taskTitle"),variant:at("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){k(e.target.value)},onBlur:function(e){""===e.target.value&&_(!x)},onKeyDown:function(e){13===e.keyCode&&j&&T({name:"".concat(j,".").concat(v)}),27===e.keyCode&&(_(!x),k())}},autoFocus:!0,value:j,placeholder:tt("$__taskTitlePlaceholder")})),i.a.createElement("div",{style:{display:"flex"}},i.a.createElement("div",{onClick:function(){return T({name:"".concat(j,".").concat(v)})}},i.a.createElement(xt,{color:"green",icon:"save",title:tt("$__save","*"),size:e.actionsSize||"25px"})),i.a.createElement("div",{onClick:function(){_(!x),k("")}},i.a.createElement(xt,{color:at("medium"),icon:"cancel",title:tt("$__cancel","*"),size:e.actionsSize||"25px"}))))):i.a.createElement("div",{style:{width:"100%"}},f.in&&f.in.name&&i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},"User"===f.in.db?i.a.createElement(Ue.a,{title:f.in.name},i.a.createElement(Sl,{alt:f.in.name,src:f.in.image,style:{width:"15px",height:"15px"}},f.in.name)):i.a.createElement(i.a.Fragment,null),i.a.createElement(_a,{title:f.in.name,icon:"User"===f.in.db?null:f.in.type&&o&&o.dataType&&o.dataType.filter((function(e){return e.name===f.in.type}))[0]&&o.dataType.filter((function(e){return e.name===f.in.type}))[0].icon||"$__topic",color:at("medium"),style:{padding:"7px",width:"calc(100% - 30px)",textAlign:"left"},textStyle:!0})),i.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",padding:"0 15px"}},i.a.createElement("div",{style:(t={position:"relative",float:"left",width:"33px",height:"33px",marginRight:"7px",alignItems:"center"},Object(O.a)(t,"height","50px"),Object(O.a)(t,"display","flex"),Object(O.a)(t,"justifyContent","center"),t)},"string"===typeof F&&-1===F.indexOf("https")&&-1===F.indexOf("svg")?i.a.createElement(xt,{icon:F,size:"33px"}):i.a.createElement("div",{style:{position:"absolute",width:"33px",height:"33px",margin:"7px",borderRadius:"50%",overflow:"hidden",backgroundImage:'url("'.concat(F,'")'),backgroundPosition:"center center",backgroundSize:"cover"}})),f.name),f.createdBy&&i.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center",color:e.dark?"lightgray":"gray",fontSize:10,marginLeft:"42px",clear:"both"}},i.a.createElement(Sl,{alt:f.createdBy.name,src:f.createdBy.image,style:{width:"15px",height:"15px"}},f.createdBy.name),i.a.createElement("span",{style:{marginLeft:3}},f.createdBy.name," - (",vt(f.created_at),")")))),i.a.createElement("div",{style:{width:"130px",textAlign:"center",borderRight:"solid 1.5px ".concat(at("color")),alignItems:"center",justifyContent:"center",display:"flex",fontSize:"12px"}},Be()(new Date(1e3*f.created_at)).format("DD/MM/YYYY HH:mm")),i.a.createElement("div",{style:{width:"130px",borderRight:"solid 1.5px ".concat(at("color")),alignItems:"center",justifyContent:"center",display:"flex",overflow:"visible"}},o.users[f.createdBy]&&i.a.createElement(Ue.a,{title:o.users[f.createdBy].name},i.a.createElement(i.a.Fragment,null,i.a.createElement(Sl,{size:"sm",src:"".concat(o.users[f.createdBy].image)},o.users[f.createdBy].name.substr(0,1))))),i.a.createElement("div",{style:{width:"300px",textAlign:"left",borderRight:"solid 1.5px ".concat(at("color")),paddingLeft:"15px",alignItems:"center",justifyContent:"center",display:"flex"}}),i.a.createElement("div",{style:{width:"130px",textAlign:"left",paddingLeft:"15px",alignItems:"center",justifyContent:"center",display:"flex"}},i.a.createElement(Ue.a,{title:tt("$__showFile")},i.a.createElement(xt,{onClick:e.openLightBox?function(){e.openLightBox()}:null},"pageview")),(f.timelineId||f.message)&&i.a.createElement(Ue.a,{title:tt("$__viewMessage")},i.a.createElement(xt,{size:"20px",onClick:function(){u(!s)}},"feedback")))))),(f.timelineId||f.message)&&s&&(o.cards[f.cardId]&&n[f.cardId]&&n[f.cardId][f.timelineId]||f.message)&&i.a.createElement("div",{style:{width:"100%"}},i.a.createElement(Ji,{openLightBox:function(t){e.openLightBox&&e.openLightBox(t)},storie:N,db:"cards",nodeId:f.cardId})))}));function Wh(){Wh=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Uh=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(nc)((function(e){var t=i.a.useState(""),r=Object(Ae.a)(t,2),n=r[0],a=r[1],o=i.a.useState(!1),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.a.useState([]),d=Object(Ae.a)(u,2),p=d[0],f=d[1],h=Ce.getState(),m=h.db,g=h.functions,v=m.dataType,y=(g.socket,setTimeout((function(){}),1e3),[]),b=window.location.hash.split("/");b[0]=b[0].replace("#",""),i.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(Ne.a)(Wh().mark((function t(){var r;return Wh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,bn.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 i.a.createElement("div",{style:{width:"100%"}},i.a.createElement("div",{style:{positin:"relative",width:"100%"}},l&&i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},i.a.createElement(so,null)),i.a.createElement(oi,null,Object.keys(p).length>0&&i.a.createElement(li,{xs:12,sm:12,md:12,lg:12,xl:12},i.a.createElement(hi,{title:tt("$__files",1),icon:v.filter((function(e){return"plan"===e.name}))[0].icon,color:at("menu"),filterText:e.text,style:{padding:"7px"}}),Object.keys(p).map((function(t,r){return y.push(p[t]),i.a.createElement(li,{key:t,md:12},i.a.createElement(Hh,{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:y,file:r}),e.onAction&&e.onAction()}}))}))))))}))),Vh=r(931),qh=r.n(Vh),Xh=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 Kh(){Kh=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 Jh=Object(Fe.b)((function(e){return{users:e.db.users}}),(function(e){return Object(u.b)(n,e)}))(qh()(Xh)((function(e){var t=Ce.getState(),r=t.db,n=t.session,a=Ce.getState().functions.socket,o=i.a.useState(!1),c=Object(Ae.a)(o,2),l=c[0],s=c[1],u=i.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=i.a.useRef(l);i.a.useEffect((function(){!0===f.current&&!1===l&&u.current.focus(),f.current=l}),[l]);var m=function(){var e=Object(Ne.a)(Kh().mark((function e(){return Kh().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,v=r.users,y=v&&Object.keys(v).length>0?v[Object.keys(v).find((function(e){return n&&n._id&&v[e]&&v[e]._id&&v[e]._id.indexOf(n._id)>-1}))]:{};return y&&y.name?i.a.createElement("div",{className:g.component},i.a.createElement("div",{className:g.selectedName,onClick:function(e){s((function(e){return!e}))}},i.a.createElement("div",{ref:u,className:g.selectedNameText,style:{color:at("light")||"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center"}},i.a.createElement(Ve,{title:i.a.createElement(i.a.Fragment,null,(y.name,y.name))},i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"33px",height:"33px",borderRadius:"50%",border:"solid 1px ".concat(at("menu"))}},i.a.createElement("div",{style:{display:"flex",width:"90%",height:"90%",backgroundImage:'url("'.concat(y.image,'")'),backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",borderRadius:"50%"}})))))),i.a.createElement("div",{style:{zIndex:10}},i.a.createElement(ln.a,{open:l,anchorEl:u.current,role:void 0,transition:!0,disablePortal:!0},(function(t){var a=t.TransitionProps,o=t.placement;return i.a.createElement(on.a,Object.assign({},a,{style:{transformOrigin:"bottom"===o?"center top":"center bottom"}}),i.a.createElement(cn.a,null,i.a.createElement(an.a,{onClickAway:d},i.a.createElement(hn.a,{autoFocusItem:l,id:"menu-list-grow",onKeyDown:p},i.a.createElement(fn.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])}))}},tt("$__myProfile",1)),i.a.createElement(fn.a,{onClick:function(){return m()}},tt("$__logout",1))))))})))):null})));var Zh=Object(Fe.b)((function(e){return{controls:e.controls}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(nc)((function(e){var t=Ce.getState(),r=t.db,n=t.session,a=t.chat,o=i.a.useState(""),c=Object(Ae.a)(o,2),l=c[0],u=c[1],d=i.a.useState(0),p=Object(Ae.a)(d,2),m=p[0],g=p[1],v=i.a.useState(0),y=Object(Ae.a)(v,2),b=(y[0],y[1]),x=i.a.useState(0),_=Object(Ae.a)(x,2),w=_[0],E=_[1],O=i.a.useState(!1),j=Object(Ae.a)(O,2),k=j[0],S=j[1],L=i.a.useState(!1),C=Object(Ae.a)(L,2),I=C[0],F=C[1],T=i.a.useState("asset"),N=Object(Ae.a)(T,2),A=N[0],D=N[1],P=i.a.useState(!1),z=Object(Ae.a)(P,2),$=z[0],M=(z[1],ft()),B=i.a.useState({title:null,icon:null,sTitle:null,sIcon:null}),Y=Object(Ae.a)(B,2),G=Y[0],R=Y[1],H=i.a.useRef(null),W=window.location.hash.split("/");W[0]=W[0].replace("#",""),i.a.useEffect((function(){return U(),function(){}}),[e]);var U=function(){var e={};Oh.filter((function(e){return e.path===window.location.pathname})).length>0&&(e=Oh.filter((function(e){return e.path===window.location.pathname}))[0]);var t=tt("$__".concat(e.alias),1),n=e.icon,a="";"plan"===e.alias&&W[0]&&r.cards[W[0]]&&(t="".concat(tt("$__".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=tt("$__".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),R({title:t,icon:n,sTitle:a,sIcon:null})};return i.a.createElement("div",{style:{position:"absolute",top:"-4px",right:0,left:0,display:"flex",alignItems:"center",zIndex:"10 !important"},id:"top_"},i.a.createElement(oi,null,i.a.createElement(li,{xs:10,sm:4,md:4,lg:4,xl:4,style:{display:"flex",alignItems:"center"},id:"top_menuHideShow"},!e.expanded&&i.a.createElement(kt.a,{style:{width:"50px"},onClick:function(){e.menuExpand()}},i.a.createElement(xt,{icon:"menu",title:"$__showMenu",size:"27px",color:at("menu")})),i.a.createElement("div",{id:"top_pageTitle",style:{color:at("menu"),marginLeft:"22px",fontSize:"12px",fontWeight:"bold"}},G.sTitle?"".concat(G.title," - ").concat("matrix"===G.sTitle.toLowerCase()?"MATRIX SWOT":G.sTitle):G.title)),i.a.createElement(Pt,null,i.a.createElement(li,{xs:12,sm:4,md:4,lg:4,xl:4,style:{display:"flex",justifyContent:"flex-start",alignItems:"center",zIndex:"10 !important"},id:"top_search"},i.a.createElement("div",{style:{position:"relative",width:"calc(100% - 15px)",zIndex:"10 !important"}},i.a.createElement(ya,{ref:H,label:tt("$__search",1),variant:at("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:""!==l?i.a.createElement(Ja.a,{position:"end"},i.a.createElement(xt,{icon:"close",onClick:function(){u(""),S(!1),F(!1)}})):null,onChange:function(e){u(e.target.value),S(!0),F(!0)}},value:l,placeholder:tt("$__searchInMachen")}),""!==l&&l.length>1&&i.a.createElement(an.a,{onClickAway:function(){u(""),S(!1),F(!1)}},i.a.createElement(ln.a,{open:!!l,anchorEl:H.current,role:void 0,transition:!0,disablePortal:!0,style:{position:"absolute",zIndex:10,bottom:0,left:"5px",right:"5px",minWidth:"500px"}},(function(e){var t=e.TransitionProps;e.placement;return i.a.createElement(on.a,Object.assign({},t,{style:{transformOrigin:"center bottom",zIndex:"3",maxHeight:"calc(100vh - 177px)",overflowY:"auto"}}),i.a.createElement(cn.a,{style:{zIndex:"3",boxShadow:"0 7px 15px rgba(0,0,0,0.33) !important"}},i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{display:"flex",borderBottom:"solid 2px rgba(0,0,0,0.22)",backgroundColor:"#f1f1f1",justifyContent:"space-between"}},i.a.createElement("div",{style:{backgroundColor:"asset"===A?"rgba(0,0,0,0.08)":"",padding:"0 3px"}},i.a.createElement(Ct,{title:tt("$__asset","*"),text:tt("$__asset","*"),color:"asset"===A?at("menu"):"lightGray",icon:"play_circle_outline",onClick:function(){D("asset"),S(!0),F(!0),g(0),b(0),E(0)},size:"17px",style:{padding:"0px 3px !important"},transparent:!0})),i.a.createElement("div",{style:{backgroundColor:"completed"===A?"rgba(0,0,0,0.08)":"",padding:"0 3px"}},i.a.createElement(Ct,{title:tt("$__completed","*"),text:tt("$__completed","*"),color:"completed"===A?at("menu"):"lightGray",icon:"verified",onClick:function(){D("completed"),S(!0),F(!0),g(0),b(0),E(0)},size:"17px",style:{padding:"0px 3px !important"},transparent:!0})),i.a.createElement("div",{style:{backgroundColor:"deleted"===A?"rgba(0,0,0,0.08)":"",padding:"0 3px"}},i.a.createElement(Ct,{title:tt("$__deleted","*"),text:tt("$__deleted","*"),color:"deleted"===A?at("menu"):"lightGray",icon:"delete_forever",onClick:function(){D("deleted"),S(!0),F(!0),g(0),b(0),E(0)},size:"17px",style:{padding:"0px 3px !important"},transparent:!0}))),"0"!==String(m)||"0"!==String(w)||k||I?i.a.createElement(i.a.Fragment,null):i.a.createElement("div",{style:{textAlign:"center",fontSize:"16px",color:"red",marginTop:33,marginBottom:33}},tt("$__noResultsFound")),l?i.a.createElement(i.a.Fragment,null,i.a.createElement(Pt,null,i.a.createElement(Gh,{text:l||"",onFinish:function(e){g(e),S(!1)},onAction:function(){u(""),S(!1),g(0),b(0),E(0)},completed:"completed"===A,deleted:"deleted"===A,adminView:$})),i.a.createElement(Pt,null,i.a.createElement(Uh,{text:l||"",onFinish:function(e){E(e),F(!1)},onAction:function(){u(""),g(0),b(0),E(0)}}))):i.a.createElement(i.a.Fragment,null))))})))))),i.a.createElement(li,{xs:5,sm:4,md:4,lg:4,xl:4,style:{display:"flex",justifyContent:"flex-end",alignItems:"center",zIndex:2001}},i.a.createElement("div",{id:"top_quickAdd"},i.a.createElement(Pt,null,i.a.createElement($h,{hashs:W}))),i.a.createElement(Pt,null,i.a.createElement(Fh,null)),i.a.createElement("div",{id:"top_notifications"},i.a.createElement(Pt,null,i.a.createElement(zh,{loader:!(!e.loaders||!e.loaders.notifications)}))),i.a.createElement("div",{id:"top_timers"},i.a.createElement(Pt,null,i.a.createElement(Bh,null))),i.a.createElement("div",{id:"top_myDay"},i.a.createElement(Pt,null,i.a.createElement(Nh,null))),i.a.createElement("div",{id:"top_moreOptions"},i.a.createElement(St.a,{overlap:"rectangular",badgeContent:Ce.getState().controls.unlockedPrivates,color:"secondary"},i.a.createElement(gn,{transparent:!0,count:50,size:"27px",icon:"settings",title:tt("$__settings"),btColor:"lightgray",options:[].concat(Object(f.a)(M&&M.user&&(M.userAdmin||M.userModerate)?[{name:"$__users",icon:"account_box",onClick:function(){s.push("c#tab/users"),e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},a),{},{open:!1}))}},{name:"$__units",icon:"business",onClick:function(){s.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(){s.push("plataformAdministrator"),e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},a),{},{open:!1}))},show:"hover"}],Object(f.a)(Ce.getState().controls.hidePrivate?[]:[{name:tt(Ce.getState().controls.lockPrivate?"$__lockMyPrivateActivities":"$__unlockMyPrivateActivities",1),icon:Ce.getState().controls.lockPrivate?"private_connectivity":"lock_open",color:Ce.getState().controls.lockPrivate?"lightgray":null,onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(h.a)(Object(h.a)({},Ce.getState().controls),{},{lockPrivate:!Ce.getState().controls.lockPrivate},Ce.getState().controls.lockPrivate?{}:{unlockedPrivates:0}))},show:"hover"}]),Object(f.a)(Ce.getState().controls.unlockedPrivates>0?[{name:tt("$__lockMyPrivateActivities",1),icon:"private_connectivity",color:"red",count:Ce.getState().controls.unlockedPrivates,onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(h.a)(Object(h.a)({},Ce.getState().controls),{},{unlockedPrivates:0,lockPrivate:!1}))},show:"hover"}]:[]),Object(f.a)(Ce.getState().session&&Ce.getState().session._access&&Ce.getState().session._access.masterAdmin>0?[{name:tt("$__accountSettings",1),icon:"settings_applications",color:"lightgray",onClick:function(){s.push("acc#tab/resume")},show:"hover"}]:[]))}))),i.a.createElement("div",{style:{marginLeft:"15px"},id:"top_user"},i.a.createElement(Jh,null)))))}))),Qh=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:at("color",.33)},userActiveExtended:Object(O.a)({display:"inherit",height:"37px",alignItems:"center",justifyContent:"center",backgroundColor:at("color",.33)},"justifyContent","left"),name:{position:"absolute",top:"5px",left:"36px",right:"0px",height:"30px",border:"1px solid ".concat(at("color",.2)),backgroundColor:"#FFFFFF",borderRadius:"5px",display:"flex",alignItems:"center",paddingLeft:"22px",fontWeight:"bold",fontSize:"14px",color:at("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(at("color",.2)),backgroundColor:"#FFFFFF",borderRadius:"5px",display:"flex",alignItems:"center",paddingLeft:"22px",paddingTop:"3px",fontSize:"12px",color:at("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(at("color",.2)),backgroundColor:"#FFFFFF",borderRadius:"5px",display:"flex",fontWeight:"bold",alignItems:"center",paddingLeft:"22px",paddingTop:"3px",fontSize:"12px",color:at("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(at("color",.2)),borderRadius:"0 0 5px 5px",display:"flex",alignItems:"center",paddingLeft:"16px",fontSize:"14px",color:at("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(at("color",.2)),borderRadius:"0 0 5px 5px",display:"flex",alignItems:"center",paddingLeft:"16px",fontSize:"14px",fontWeight:"bold",color:at("color"),backgroundColor:"#FFFFFF",boxShadow:"0px 3px 7px 1px rgba(0,0,0,0.05)","& ul":{fontSize:"12px"}}}};var em=Object(Fe.b)((function(e,t){return{store:{chat:e.chat,timeline:e.timeline,cards:e.db.cards,users:e.db.users,adminView:e.db.adminView,session:e.session,usersStatus:e.usersStatus}}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(Qh)((function(e){var t=e.classes,r=e.store,n=r.chat,a=r.session,o=r.timeline,c=(r.db,r.usersStatus),l=!!e.expanded,s=ft(),u=Object(h.a)({},Ce.getState().db.users),d={};u=(u=Object.keys(u).filter((function(e){return e!==a._id&&"user"===u[e].type})).map((function(t){return e.store.users[t]})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0}))).map((function(t){t.unReadedCount=0;var r={};r=Object.keys(r).filter((function(e){return r[e]&&r[e].user&&r[e].user._id===t._id&&"comment"===r[e].type})).map((function(e){return r[e]}));var n=Object(h.a)({},e.store.users[t._id]&&o[t._id]?e.store.users[t._id]&&o[t._id]:{});n=Object.keys(n).filter((function(e){return n[e]&&"comment"===n[e].type})).map((function(e){return n[e]}));var i=[].concat(Object(f.a)(r),Object(f.a)(n));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 t?(d=Object(h.a)(Object(h.a)({},d),{},Object(O.a)({},t._id,Object(h.a)(Object(h.a)({},e.store.users[t._id]),{},{type:"user",_lastMessage:i[i.length-1]?i[i.length-1]:null,unReadedCount:r.filter((function(e){return"comment"===e.type&&(!e.readedBy||e.readedBy&&!e.readedBy[a._id])})).length}))),t._lastMessage=i[i.length-1]?i[i.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 p=Object.keys(Ce.getState().db.cards).filter((function(t){return"chatGroup"===Ce.getState().db.cards[t].type&&!Ce.getState().db.cards[t].deleted&&(Ce.getState().db.cards[t]._users&&Ce.getState().db.cards[t]._users[a._id]||!Ce.getState().db.cards[t].private&&e.store.adminView&&s&&(s.owner||s.admin))})).map((function(e){return Ce.getState().db.cards[e]}));return p&&p.length>0&&p.filter((function(e){if(e._users&&e._users[a._id])return!0})).map((function(e){var t;o[e._id]&&Object.keys(o[e._id]).length>0&&(t=Object.keys(o[e._id]).filter((function(t){return o[e._id]&&o[e._id][t]&&"comment"===o[e._id][t].type})).sort((function(t,r){return o[e._id][t]&&o[e._id][r]&&String(o[e._id][t].created_at)&&String(o[e._id][r].created_at)&&parseInt(o[e._id][t].created_at)>parseInt(o[e._id][r].created_at)?-1:o[e._id][t]&&o[e._id][r]&&String(o[e._id][t].created_at)&&String(o[e._id][r].created_at)&&parseInt(o[e._id][t].created_at)<parseInt(o[e._id][r].created_at)?1:0}))),d=e&&e._id&&t&&t.length>0&&o[e._id]&&o[e._id][t[0]]&&o[e._id][t[0]].created_at?Object(h.a)(Object(h.a)({},d),{},Object(O.a)({},e._id,Object(h.a)(Object(h.a)({},Ce.getState().db.cards[e._id]),{},{type:"group",_lastMessage:o[e._id][t[0]]}))):Object(h.a)(Object(h.a)({},d),{},Object(O.a)({},e._id,Object(h.a)(Object(h.a)({},Ce.getState().db.cards[e._id]),{},{type:"group"})))})),i.a.createElement("div",{className:t.root},Object.keys(d).filter((function(t){return(!Ce.getState().db.cards[t]||Ce.getState().db.cards[t]&&!Ce.getState().db.cards[t].deleted)&&(!e.find||""===e.find||e.find&&(d[t].name.toLowerCase().indexOf(e.find.toLowerCase())>-1||d[t]._parent&&Ce.getState().db.users[d[t]._parent]&&Ce.getState().db.users[d[t]._parent].name&&Ce.getState().db.users[d[t]._parent].name.toLowerCase().indexOf(e.find.toLowerCase())>-1))&&(l||!l&&d[t]&&d[t]._lastMessage)&&(!e.onLine||e.onLine&&c.users&&c.users[t])})).sort((function(e,t){var r=d[e]._lastMessage&&String(d[e]._lastMessage.created_at)?Math.ceil(d[e]._lastMessage.created_at):0,n=d[t]._lastMessage&&String(d[t]._lastMessage.created_at)?Math.ceil(d[t]._lastMessage.created_at):0;return l?d[e].name.toLowerCase()<d[t].name.toLowerCase()?-1:d[e].name.toLowerCase()>d[t].name.toLowerCase()?1:0:r>n?-1:r<n?1:0})).map((function(r,s){var u=d[r],p=0;return o[u._id]&&(p+=Object.keys(o[u._id]).filter((function(e){return o[u._id]&&o[u._id][e]&&o[u._id][e].user&&o[u._id][e].user._id&&a&&a._id&&o[u._id][e].user._id!==a._id&&"comment"===o[u._id][e].type&&(!o[u._id][e].readedBy||!o[u._id][e].readedBy[a._id])})).length),o[a._id]&&(p+=Object.keys(o[a._id]).filter((function(e){return o[a._id]&&o[a._id][e]&&!o[a._id][e].deleted&&o[a._id][e].user&&o[a._id][e].user._id===u._id&&"comment"===o[a._id][e].type&&(!o[a._id][e].readedBy||!o[a._id][e].readedBy[a._id])})).length),i.a.createElement("div",{key:u._id,className:n&&n.nodeId===u._id?l?t.userActiveExtended:t.userActive:l?t.userExtended:t.user,style:{width:"100%",marginBottom:5,padding:3},onClick:function(){e.openChat(u._id)}},i.a.createElement(Ve,{title:i.a.createElement(i.a.Fragment,null,u.name?u.name:u.name&&u.name.split(" ").lenth>0?u.name.split(" ")[0]:"",!u.name&&u.name&&u.name.split(" ").lenth>0?u.name.split(" ")[0]:"")},i.a.createElement("div",{style:{position:"relative",width:"100%"}},l?i.a.createElement("div",{style:{display:"flex",width:"100%",justifyContent:"left",alignItems:"center"}},i.a.createElement(St.a,{overlap:"rectangular",badgeContent:p,color:"secondary",style:{width:"37px",height:"29px",display:"flex",alignItems:"center",marginLeft:"-12px"}},i.a.createElement(Ii,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},variant:c.users&&c.users[u._id]&&c.users[u._id].status?"dot":"standard",status:c.users&&c.users[u._id]&&c.users[u._id].status?c.users[u._id].status:null},i.a.createElement(i.a.Fragment,null,i.a.createElement(Kr.a,{alt:u.displayName?u.displayName:u.name,src:"".concat(u.image),style:{width:"29px",height:"29px"}}),u._parent&&e.store.users[u._parent]&&e.store.users[u._parent].image?i.a.createElement("div",{style:{position:"absolute",bottom:4,right:-7,width:15,height:15,borderRadius:"50%",backgroundImage:"url(".concat(e.store.users[u._parent].image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):i.a.createElement(i.a.Fragment,null)))),i.a.createElement("div",{style:{fontSize:"14px",maxWidth:"calc(100% - 30px)",paddingLeft:"7px",color:"gray",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}},u.name?u.name:u.name&&u.name.split(" ").lenth>0?u.name.split(" ")[0]:"",!u.name&&u.name&&u.name.split(" ").lenth>0?u.name.split(" ")[0]:"",u._parent&&e.store.users[u._parent]?i.a.createElement("div",{style:{fontSize:10,color:"lightgray",marginTop:"-7px"}},e.store.users[u._parent].name):i.a.createElement(i.a.Fragment,null))):i.a.createElement(St.a,{overlap:"rectangular",badgeContent:p,color:"secondary",style:{width:"29px",height:"29px",display:"flex",alignItems:"center"}},i.a.createElement(Ii,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},variant:c.users&&c.users[u._id]&&c.users[u._id].status?"dot":"standard",status:c.users&&c.users[u._id]&&c.users[u._id].status?c.users[u._id].status:null},i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:Object(h.a)(Object(h.a)({width:33,height:33},u.deleted?{border:"solid 2px red"}:{}),{},{borderRadius:"50%",backgroundColor:u.image?"none":"lightgray",backgroundImage:'url("'.concat(u.image,'")'),backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",display:"flex",justifyContent:"center",alignItems:"center"})},i.a.createElement("span",{style:{color:at("menu"),fontWeight:"bold",letterSpacing:"-2px !important"}},u.image?"":"".concat(u.name.substr(0,1).toUpperCase()).concat(u.name.split(" ").length>1?" ".concat(u.name.split(" ")[1].substr(0,1).toUpperCase()):""))),u._parent&&e.store.users[u._parent]&&e.store.users[u._parent].image?i.a.createElement("div",{style:{position:"absolute",bottom:4,right:-7,width:15,height:15,borderRadius:"50%",backgroundImage:"url(".concat(e.store.users[u._parent].image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):i.a.createElement(i.a.Fragment,null)))))))})))}))),tm=function(e){return Object(h.a)(Object(h.a)({},Ut),{},{menu:{position:"absolute",borderRight:at("color"),background:at("ColumnTitleColor"),top:0,left:0,right:0,bottom:0,overflowY:"auto",overflowX:"hidden",display:"flex",flexDirection:"column",alignItems:"center"},menuExpanded:{position:"absolute",borderRight:at("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:at("color"),alignItems:"center",width:"-webkit-fill-available"},buttonColorExpanded:{position:"relative",float:"left",padding:"12px",display:"flex",backgroundColor:at("color"),alignItems:"center",width:"100%"},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(at("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"}})};function rm(){rm=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 nm=Object(Fe.b)((function(){return{}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState().chat,r=i.a.useState("chats"),n=Object(Ae.a)(r,2),a=n[0],o=n[1],c=i.a.useState(""),l=Object(Ae.a)(c,2),s=l[0],u=l[1],d=Object(_t.a)(tm)(),p=!!e.expanded,f=window.location.hash.split("/");f[0]=f[0].replace("#",""),i.a.useEffect((function(){o("chats")}),[e.expanded]),ft();var m=function(){var r=Object(Ne.a)(rm().mark((function r(n,a){var i;return rm().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:i=Ce.getState().db.cards[n]?"cards":"users",u(""),Ce.getState().db[i]&&Ce.getState().db[i][n]&&!Ce.getState().db[i][n]._loadTimeline?e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},t),{},{db:a,nodeId:n,loading:"users"!==a})):e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},t),{},{db:a,nodeId:n,loading:!1})),e.subMenuExpanded(!1),o("chats");case 5:case"end":return r.stop()}}),r)})));return function(e,t){return r.apply(this,arguments)}}();return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:p?d.menuExpanded:d.menu,style:{paddingTop:5}},p&&("internalGroups"===a||"externalGroups"===a)&&i.a.createElement("div",{className:p?d.buttonColorExpanded:d.buttonColor,style:{marginTop:"-15px"}},i.a.createElement(Xr,{text:p?tt("$__newGroup","*"):null,title:p?null:tt("$__newGroup","*"),icon:"add_box",iconColor:"#FFFFFF",textColor:"#FFFFFF",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},Ce.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{type:"chatGroup",status:"inProgress"}}))}})),i.a.createElement("div",{className:d.button,style:{display:"flex",height:"46px",marginBottom:"7px",width:"100%"}},p?i.a.createElement("div",{className:d.textField,style:{width:"100%"}},i.a.createElement(ya,{className:d.noLabelLight,label:tt("$__search","*"),variant:"standard",autoFocus:!0,value:s,InputProps:{endAdornment:i.a.createElement(Ja.a,{position:"start"},i.a.createElement(xt,{color:at("color")},"search")),onChange:function(e){u(e.target.value)}}})):i.a.createElement(Xr,{title:p?null:tt("$__search","*"),icon:"search",iconColor:at(""!==s?"color":"medium"),textColor:at(""!==s?"color":"medium"),onClick:function(){e.subMenuExpanded(!0)}})),i.a.createElement("div",{style:{position:"absolute",top:p?50:40,bottom:7,overflowY:"auto",overflowX:"hidden",left:p?7:0,paddingLeft:p?5:0,right:0,paddingTop:7}},i.a.createElement(em,{expanded:p,openChat:function(e){return m(e,"cards")},find:s,onLine:e.onLine}))))}));var am=Object(Fe.b)((function(e){return{typing:e.chat.typing}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t=Ce.getState().session,r=i.a.useState({}),n=Object(Ae.a)(r,2),a=n[0],o=n[1];return i.a.useEffect((function(){o(e.typing)}),[e.typing]),a&&e.nodeId&&e.nodeId!==t._id&&a.me&&a.me[e.nodeId]?i.a.createElement("div",{style:{marginLeft:15,fontSite:12,color:"lightgray",fontWeight:"normal"}},tt("$__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?i.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(Ce.getState().db.cards[e.nodeId]._users[t].name)n=Ce.getState().db.cards[e.nodeId]._users[t].name;else if(Ce.getState().db.cards[e.nodeId]._users[t].name){var a=Ce.getState().db.cards[e.nodeId]._users[t].name.split(" ");n="".concat(a[0]).concat(a.length>1?" ".concat(a[a.length-1]):"")}return i.a.createElement(Ue.a,{title:n,key:t},i.a.createElement(Kr.a,{style:{width:22,height:22,border:"none"},alt:n,src:Ce.getState().db.cards[e.nodeId]._users[t].image||null},n.substr(0,1)))})),i.a.createElement("span",{style:{marginLeft:7}},tt("$__typing"),"...")):i.a.createElement(i.a.Fragment,null)})),om=function(e){return Object(h.a)(Object(h.a)({},Ut),{},{menu:{position:"relative",borderRight:at("color")},menuExpanded:{position:"relative",borderRight:at("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:at("color")},buttonColorExpanded:{position:"relative",float:"left",width:"calc(100% + 20px)",padding:"20px",marginLeft:"-12px",display:"flex",backgroundColor:at("color")},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(at("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"}})};var im=Object(Fe.b)((function(e){return{store:{chat:e.chat,lightBox:e.lightBox,usersStatus:e.usersStatus,cards:e.db.cards}}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(om)((function(e){var t=e.classes,r=e.store,n=r.chat,a=r.usersStatus,o=Ce.getState(),c=o.db,l=o.session,s=i.a.useState(!1),u=Object(Ae.a)(s,2),d=u[0],p=u[1],f=i.a.useState(!1),m=Object(Ae.a)(f,2),g=m[0],v=m[1],y=i.a.useState(!1),b=Object(Ae.a)(y,2),x=b[0],_=b[1],w=ft(),E=yo();i.a.useEffect((function(){return function(){}}),[]);var O=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t||!Ce.getState()||!(Ce.getState().lightBox&&Ce.getState().lightBox.open||Ce.getState().sideModule&&Ce.getState().sideModule.id)){var r=document.getElementsByClassName("Toastify__toast").length,a=document.getElementsByClassName("forwardMessage").length;0===r&&0===a&&e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},n),{},{open:!1}))}};if(!n.open)return i.a.createElement(i.a.Fragment,null);var j=Ce.getState().db.cards&&Ce.getState().db.cards[n.nodeId]?"cards":"users";return i.a.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:3e3,backgroundColor:"rgba(250,250,250,0.7)",backdropFilter:"blur(7px) sepia(90%)"}},i.a.createElement(an.a,{onClickAway:function(){O()}},i.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"})},i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:at("ColumnTitleColor"),display:"flex",alignItems:"center"}},i.a.createElement("div",{style:{position:"absolute",left:13}},i.a.createElement(Ct,{id:"chat_menu",title:tt("$__menu","*"),color:at("color"),icon:"menu",onClick:function(){p((function(e){return!e})),d&&v(!1)},size:"25px",transparent:!0})),d?i.a.createElement("div",{style:{position:"absolute",left:45}},i.a.createElement(Ct,{id:"addGroup",title:tt("$__createChatGroup","*"),color:at("color"),icon:"add_circle_outline",onClick:function(){O(!0),e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},Ce.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{type:"chatGroup",status:"inProgress"}}))},size:"25px",transparent:!0})):i.a.createElement(i.a.Fragment,null),d?i.a.createElement("div",{style:{position:"absolute",left:80}},i.a.createElement(Ct,{id:"chat_menu",title:"".concat(tt("$__showOnlyOnline","*")," ").concat(Object.keys(a.users).filter((function(e){return a.users[e]&&e!==l._id})).length>0?" (".concat(Object.keys(a.users).filter((function(e){return a.users[e]&&e!==l._id})).length,")"):""),text:"".concat(tt("$__showOnlyOnline","*")," ").concat(Object.keys(a.users).filter((function(e){return a.users[e]&&e!==l._id})).length>0?" (".concat(Object.keys(a.users).filter((function(e){return a.users[e]&&e!==l._id})).length,")"):""),color:at("color"),icon:g?"toggle_on":"toggle_off",onClick:function(){v((function(e){return!e}))},size:"25px",textSize:"11px",transparent:!0})):i.a.createElement(i.a.Fragment,null),i.a.createElement("div",{style:{position:"absolute",left:d?320:53,right:80,color:at("light"),fontSize:"12px",fontWeight:"bold"}},c[j]&&c[j][n.nodeId]?i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},i.a.createElement(Ii,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},variant:"users"===j&&c[j][n.nodeId]._id&&a&&a.users&&a.users[n.nodeId]&&a.users[n.nodeId].status?"dot":"standard",status:a&&a.users&&a.users[n.nodeId]&&a&&a.users[n.nodeId].status?a.users[n.nodeId].status:null},i.a.createElement(Kr.a,{alt:"users"===j&&c[j][n.nodeId].displayName?c[j][n.nodeId].displayName:c[j][n.nodeId].name,src:"".concat(c[j][n.nodeId].image),style:{width:"30px",height:"30px"}})),i.a.createElement("div",{style:{fontSize:"14px"}},c[j][n.nodeId].name," ",i.a.createElement("span",{style:{fontSize:10,fontWeight:"normal"}},Ce.getState().usersStatus.users[n.nodeId]&&"away"===Ce.getState().usersStatus.users[n.nodeId].status&&Ce.getState().usersStatus.users[n.nodeId].updatedAt?"(".concat(tt("$__lastSeeTime"),": ").concat(vt(Ce.getState().usersStatus.users[n.nodeId].updatedAt),")"):"")),n&&n.nodeId&&Ce.getState().db.cards[n.nodeId]&&"chatGroup"===Ce.getState().db.cards[n.nodeId].type&&Ce.getState().db.cards[n.nodeId]._users&&Object.keys(Ce.getState().db.cards[n.nodeId]._users).length>0&&i.a.createElement("div",{classes:t.avatarGroup,style:{marginLeft:15}},i.a.createElement(Sa.a,{max:150},Object.keys(Ce.getState().db.cards[n.nodeId]._users).length>0&&Object.keys(Ce.getState().db.cards[n.nodeId]._users).map((function(e,t){var r="";if(Ce.getState().db.cards[n.nodeId]._users[e].name)r=Ce.getState().db.cards[n.nodeId]._users[e].name;else if(Ce.getState().db.cards[n.nodeId]._users[e].name){var a=Ce.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 i.a.createElement(Ue.a,{title:r,key:t},i.a.createElement(Kr.a,{style:{width:22,height:22,border:"none"},alt:r,src:Ce.getState().db.cards[n.nodeId]._users[e].image||null},r.substr(0,1)));if(17===t){var o=Object.keys(Ce.getState().db.cards[n.nodeId]._users).length-17;return i.a.createElement(Ue.a,{title:i.a.createElement("ul",{style:{listingStyle:"none",padding:0}},Object.keys(Ce.getState().db.cards[n.nodeId]._users).map((function(e,t){if(t>16&&Ce.getState().db.cards[n.nodeId]._users[e]&&Ce.getState().db.cards[n.nodeId]._users[e].name)return i.a.createElement("li",null,Ce.getState().db.cards[n.nodeId]._users[e].name)}))),key:t},i.a.createElement(Kr.a,{style:{width:22,height:22,border:"none"},alt:"+".concat(o)},i.a.createElement("span",{style:{fontSize:10}},"+".concat(o))))}})))),i.a.createElement(am,{nodeId:n.nodeId})):i.a.createElement("div",null,tt("$__chats",1))),i.a.createElement("div",{style:{position:"absolute",right:5,display:"flex"}},n&&n.nodeId?i.a.createElement(Ct,{id:"chat_files",title:tt("$__files","*"),color:at("lightgray"),icon:"folder_special",onClick:function(){_((function(e){return!e}))},size:"25px",transparent:!0}):i.a.createElement(i.a.Fragment,null),n&&n.nodeId&&Ce.getState().db.cards[n.nodeId]&&"chatGroup"===Ce.getState().db.cards[n.nodeId].type&&Ce.getState().db.cards[n.nodeId]._users&&Ce.getState().db.cards[n.nodeId]._users[l._id]&&(parseInt(Ce.getState().db.cards[n.nodeId]._users[l._id].access)>4||w&&w.user&&w.plan&&w.userAdmin&&w.planAdmin)&&i.a.createElement(Ct,{id:"chat_settings",title:tt("$__preffers","*"),color:at("lightgray"),icon:"settings",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(h.a)(Object(h.a)({},Ce.getState().sideModule),{},{id:n.nodeId,activeModule:"cardEdit",db:"cards",data:Object(h.a)({},Ce.getState().db.cards[n.nodeId]?Ce.getState().db.cards[n.nodeId]:{})})),O(!0)},size:"25px",transparent:!0}),i.a.createElement(Ct,{id:"chat_closeButton",title:tt("$__close","*"),color:at("light"),icon:"close",onClick:function(){O(!0),v(!1)},size:"25px",transparent:!0}))),i.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(at("color")),padding:"7px"},d?{width:"311px"}:{width:"60px"})},i.a.createElement(nm,{closeButton:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},n),{},{open:!1})),v(!1)},chat:!0,unReadCountGroup:E&&E.groups?E.groups:0,unReadCountUser:E&&E.users?E.users:0,count:E,subMenuExpanded:function(e){p(e),v(!1)},expanded:d,onLine:g})),i.a.createElement("div",{style:{position:"absolute",left:d?312:55,top:40,right:x&&n.nodeId?333:0,bottom:0,backgroundColor:"white"}},n.nodeId?i.a.createElement(dc,{types:["comment"],nodeId:n.nodeId,db:Ce.getState().db.cards[n.nodeId]?"cards":"users",confirmRead:!0,loading:!!n.loading,hideCards:!0,chat:!0}):i.a.createElement(i.a.Fragment,null)),x&&n.nodeId?i.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)"}},i.a.createElement(zl,{nodeId:n.nodeId,dark:!1})):i.a.createElement(i.a.Fragment,null)))))}))),cm=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:at("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:at("color",.8),"&:hover":{color:at("color",1),backgroundColor:"rgba(255,255,255,0.1)",borderRadius:"7px"},display:"flex",alignItems:"center"},Object(O.a)(t,"alignItems","center"),Object(O.a)(t,"cursor","pointer"),t),itemButtomActive:{width:"100%",padding:"7px",color:at("color",1),backgroundColor:"rgba(255,255,255,0.2)",borderRadius:"7px",display:"flex",alignItems:"center",cursor:"pointer"},themeExample:(r={},Object(O.a)(r,e.breakpoints.up("md"),{left:"auto !important",right:"0 !important"}),Object(O.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(at("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(at("color")),padding:"7px",overflowX:"auto"},moduleTitle:{width:"100%",height:"30px",fontSize:"18px",color:at("color"),fontWeight:"bold",paddingLeft:"7px",marginTop:"15px"},sidebarWrapperWithPerfectScrollbar:{},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(at("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 lm(){lm=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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(162).config();var sm=Object(Fe.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(u.b)(n,e)}))(Object(We.a)(cm)((function(e){var t=Ce.getState(),r=t.chat,n=t.notifications,a=e.classes,o=i.a.useState(!1),c=Object(Ae.a)(o,2),l=c[0],u=c[1],d=i.a.useState(null),p=Object(Ae.a)(d,2),f=p[0],m=p[1],g=window.location.hash.split("/");g[0]=g[0].replace("#",""),i.a.useEffect((function(){l||u(!0)}),[n]);var v=function(){var t=Object(Ne.a)(lm().mark((function t(n,a,o){var i,c=arguments;return lm().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||s.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)}}(),y=yo();return e.expanded?i.a.createElement("div",{className:a.root},i.a.createElement("div",{className:a.bar},i.a.createElement("div",{className:a.topLogo,id:"sideBar_logoMini"},i.a.createElement("img",{src:wr.a,alt:"logo",className:a.logoImg,style:{width:"111px",marginLeft:"15px"}}),i.a.createElement(Ct,{title:tt("$__hideMenu",1),color:at("color"),icon:"menu",onClick:e.menuExpand?function(){e.menuExpand()}:null,transparent:!0})),i.a.createElement("div",{style:{position:"absolute",top:"120px",bottom:"0px",overflowX:"auto",width:"100%"}},i.a.createElement("div",{className:a.item,id:"sideBar_button_dashboard"},i.a.createElement("div",{className:"/d"===window.location.pathname?a.itemButtomActive:a.itemButtom,onClick:function(){v("/d","dashboard")}},i.a.createElement(xt,{icon:"dashboard",badgeColor:"primary",color:"parent",badgeVisible:!0,title:"$__dashboard",size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),tt("$__dashboard","*"))),i.a.createElement("div",{className:a.item,id:"sideBar_button_chat"},i.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}))}},i.a.createElement(St.a,{overlap:"rectangular",badgeContent:y&&y.total?y.total:0,color:"secondary"},i.a.createElement(xt,{icon:"chat",color:"parent",title:"$__chat",size:"27px",style:{marginBottom:"7px",marginRight:"15px"}})),tt("$__chat","*"))),i.a.createElement("div",{className:a.separator}),i.a.createElement("div",{className:a.item,id:"sideBar_button_StrategyAndPlans"},i.a.createElement("div",{className:"/sp"===window.location.pathname?a.itemButtomActive:a.itemButtom,onClick:function(){v("/sp","StrategyAndPlans")}},i.a.createElement(xt,{icon:"view_comfy",badgeColor:"primary",color:"parent",badgeVisible:!0,title:tt("$__StrategyAndPlans"),size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),tt("$__StrategyAndPlans","*"))),i.a.createElement("div",{className:a.item,id:"sideBar_button_myTasks"},i.a.createElement("div",{className:"/t"===window.location.pathname?a.itemButtomActive:a.itemButtom,onClick:function(){v("/t","myTasks")}},i.a.createElement(xt,{icon:"task",badgeColor:"primary",color:"parent",badgeVisible:!0,title:tt("$__mytasks"),size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),tt("$__mytasks","*"))),i.a.createElement("div",{className:a.item,id:"sideBar_button_library"},i.a.createElement("div",{className:"/library"===window.location.pathname?a.itemButtomActive:a.itemButtom,onClick:function(){v("/library","library")}},i.a.createElement(xt,{icon:"folder",badgeColor:"primary",color:"parent",badgeVisible:!0,title:tt("$__library"),size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),tt("$__library","*"))),i.a.createElement("div",{className:a.item,id:"sideBar_button_brightandconnected"},i.a.createElement("div",{className:"/bright-and-connected"===window.location.pathname?a.itemButtomActive:a.itemButtom,onClick:function(){v("/bright-and-connected","bright-and-connected")}},i.a.createElement(xt,{icon:U.a,badgeColor:"primary",color:"parent",badgeVisible:!0,title:"BRIGHT & CONNECTED",size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),"BRIGHT & CONNECTED"))))):i.a.createElement("div",{className:a.rootHide},i.a.createElement("div",{className:a.mainButton,id:"sideBar_logoMini"},i.a.createElement("img",{src:wr.a,alt:"logo",className:a.logoImg,style:{width:"111px",marginLeft:"15px"},onClick:function(){e.menuExpand()}}),i.a.createElement(Ct,{title:tt("$__showMenu",1),color:at("menu"),icon:"menu",onClick:e.menuExpand?function(){e.menuExpand()}:null,transparent:!0})))})));var um=Object(Fe.b)((function(e){return{card:e.card}}),(function(e){return Object(u.b)(n,e)}))((function(e){return console.log("AQUI PRECISA SER CRIADO O PAINEL DE MODELOS DE FLUXOS"),i.a.createElement(mi.a,{fullWidth:!0,"aria-labelledby":"simple-dialog-title",open:!!e.card.action},i.a.createElement("div",{style:{position:"relative",marginLeft:"10px",marginTop:"5px",width:"calc(100% - 10px)"}},i.a.createElement(_a,{title:tt("$__".concat(e.card.action),1),icon:"label",onCancel:function(){e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{history:"".concat(window.location.pathname).concat(window.location.hash)}))}})))})),dm=r(932),pm=r.n(dm);function fm(){fm=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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(162).config();var hm,mm=function(){var e=Object(Ne.a)(fm().mark((function e(t,r){var n,a,o;return fm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Ce.getState(),a=n.db,o="cards",a.cards[r._id]?o="cards":a.users[r._id]&&(o="users"),Ce.getState().db&&Ce.getState().db[o]&&Ce.getState().db[o][r._id]&&t.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},Object(O.a)({},o,Object(h.a)(Object(h.a)({},Ce.getState().db[o]),{},Object(O.a)({},r._id,Object(h.a)(Object(h.a)({},Ce.getState().db[o][r._id]),r))))));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),gm=r(938),vm=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)({},Ht),map:{marginTop:"0px"},mainPanelSidebarMini:Object(O.a)({},e.breakpoints.up("md"),{width:"calc(100% - 0px)"})}},ym=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("+Gt("#000")+", 0.22)"},"&:before,&:after":{display:"block",content:'""',position:"absolute",width:"100%",height:"100%",top:"0",left:"0",zIndex:"2"}}}},bm=(r(1550),r(934));function xm(){xm=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 v=f.prototype=d.prototype=Object.create(h);function y(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(v,"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(v),e},e.awrap=function(e){return{__await:e}},y(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()}))},y(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"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 _m=new Audio(r.n(bm).a);r(162).config();var wm="true"===String("true")?"https://ws.machen.ai":"http://localhost:3001";var Em=Object(Ge.default)(Ye.a)(hm||(hm=Object(Te.a)(["\n &&&.Toastify__toast-container {\n min-width:407px !important;\n z-index:33333;\n }\n .Toastify__toast {\n z-index:33333;\n }\n .Toastify__toast-body {\n z-index:33333;\n }\n .Toastify__progress-bar {}\n"]))),Om=Object(Fe.b)((function(){return{}}),(function(e){return Object(u.b)(n,e)}))((function(e){var t,r=Object.assign({},e),n=Ce.getState(),a=n.session,o=n.chat,c=i.a.useState(null),l=Object(Ae.a)(c,2),u=l[0],d=l[1],p=i.a.useState(!1),m=Object(Ae.a)(p,2),g=m[0],v=m[1],y=i.a.useState(!0),b=Object(Ae.a)(y,2),x=b[0],_=b[1],w=i.a.useState(!1),E=Object(Ae.a)(w,2),j=E[0],k=(E[1],i.a.useState(!1)),S=Object(Ae.a)(k,2),L=S[0],C=S[1],I=i.a.useState(!0),F=Object(Ae.a)(I,2),T=F[0],N=F[1],A=i.a.useState(!1),D=Object(Ae.a)(A,2),P=D[0],z=D[1],$=i.a.useState(null),M=Object(Ae.a)($,2),B=M[0],Y=M[1],G=Object(_t.a)(u?vm:ym)(),R=i.a.createRef(),H=G.mainPanel+" "+$e()((t={},Object(O.a)(t,G.mainPanelSidebarMini,!0),Object(O.a)(t,G.mainPanelWithPerfectScrollbar,navigator.platform.indexOf("Win")>-1),t)),W=i.a.createRef();i.a.useEffect((function(){q(),Y(ne(Oh))}),[]),i.a.useEffect((function(){var t=window.location.hash.split("/");t[0]=t[0].replace("#",""),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{history:"".concat(window.location.pathname).concat(window.location.hash)})),Z(t)})),i.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),u&&(Z(e),J(),U(!0),Y(ne(Oh)))}),[u]);var U=function(){var e=Object(Ne.a)(xm().mark((function e(t){var r,n,a;return xm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:window.addEventListener("dragover",(function(e){e.preventDefault()}),!1),window.addEventListener("drop",(function(e){e.preventDefault()}),!1),0,r=setInterval((function(){1}),1e3),n=setTimeout((function(){}),5e4),a=setInterval((function(){q(!0)}),36e4),window.addEventListener("blur",(function(){clearInterval(r),clearInterval(a),r=0,Be()().tz("America/Sao_Paulo").unix("X"),n=setTimeout((function(){V("away")}),6e4)})),window.addEventListener("focus",function(){var e=Object(Ne.a)(xm().mark((function e(t){return xm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:q(!0),clearInterval(a),a=setInterval((function(){q(!0)}),36e4),clearTimeout(n),r||(r=setInterval((function(){1}),1e3)),V("online");case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),V=function(){var e=Object(Ne.a)(xm().mark((function e(t){return xm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:("online"===t&&Ce.getState().usersStatus.users&&Ce.getState().usersStatus.users[a._id]&&"online"!==Ce.getState().usersStatus.users[a._id].status||"away"===t&&Ce.getState().usersStatus.users&&Ce.getState().usersStatus.users[a._id]&&"away"!==Ce.getState().usersStatus.users[a._id].status)&&Ce.getState().functions.socket.emit("socketStatus",{socketStatus:t});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),q=function(){var t=Object(Ne.a)(xm().mark((function t(r){var n,a,o,i,c,l,p=arguments;return xm().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=p.length>1&&void 0!==p[1]?p[1]:0,r){t.next=44;break}return t.prev=2,t.next=5,bn.post("/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,bn.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)({},Ce.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)),(!u||u&&JSON.stringify(u)!==JSON.stringify(a.data.user))&&d(Object(h.a)({},a.data.user)),"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!==Oh.filter((function(e){return e.auth&&e.path===window.location.pathname})).length||s.push("/d#tab/resume"),te(),X(),t.abrupt("return",!0);case 31:e.reduxFunction("ASYNC","SET_LANGUAGE",Object(h.a)({},i.data)),d(null);case 33:t.next=37;break;case 35:e.reduxFunction("ASYNC","SET_LANGUAGE",Object(h.a)({},i.data)),x&&_(!1);case 37:t.next=42;break;case 39:t.prev=39,t.t0=t.catch(2),5===n?(C(!0),u&&d(null),x&&_(!1),setTimeout((function(){window.open("/login","_self")}),6e4)):q(r,n+1);case 42:t.next=67;break;case 44:return t.prev=44,t.next=47,bn.post("/VerifySession",{ignoreUsers:!0});case 47:if(c=t.sent,l=Ce.getState().session,!(c&&c.data&&c.data.token)){t.next=59;break}if(localStorage.setItem("TOKEN",c.data.token),e.reduxFunction("ASYNC","SET_SESSION",Object(h.a)({},c.data.user)),Ce.getState().functions.socket.emit("socketStatus",{socketStatus:"online"}),!(c.data&&l&&l._id&&c.data.user&&l._id!==c.data.user._id)){t.next=57;break}return window.location.reload(),t.abrupt("return");case 57:t.next=62;break;case 59:localStorage.setItem("TOKEN",null),e.reduxFunction("ASYNC","CLEAR_SESSION"),"/login"!==window.location.pathname&&setTimeout((function(){window.open("/login","_self")}),300);case 62:t.next=67;break;case 64:t.prev=64,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(){q(r,n+1)}),3e3);case 67:case"end":return t.stop()}}),t,null,[[2,39],[44,64]])})));return function(e){return t.apply(this,arguments)}}(),X=function(){var t=Object(Ne.a)(xm().mark((function t(){var r,n;return xm().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return K(),t.prev=1,t.next=4,bn.get("/Tags_List");case 4:(r=t.sent)&&r.data&&(r.data.map((function(e){e._count=parseInt(e._count),e._countOthers=parseInt(e._countOthers)})),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.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,bn.get("/M_User_Group_List");case 16:(n=t.sent)&&n.data&&e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.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)}}(),K=function(){var t=Object(Ne.a)(xm().mark((function t(r){var n,a;return xm().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,bn.post("/M_User_List_V3",{id:r});case 3:if(!(n=t.sent)||!n.data){t.next=9;break}return a={},n.data.map(function(){var e=Object(Ne.a)(xm().mark((function e(t,r){return xm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=Object(h.a)(Object(h.a)({},a),{},Object(O.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)({},Ce.getState().db.users&&Ce.getState().db.users[t.data._id]?Ce.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!==Ce.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)({},Ce.getState().db),{},{users:Object(h.a)(Object(h.a)({},Ce.getState().db.users),a)})),t.abrupt("return",!0);case 9:t.next=16;break;case 11:t.prev=11,t.t0=t.catch(0),console.group("Layout-ReqUsers::ERR::"),console.log(t.t0),console.groupEnd();case 16:case"end":return t.stop()}}),t,null,[[0,11]])})));return function(e){return t.apply(this,arguments)}}(),J=function(){var t=Object(Ne.a)(xm().mark((function t(){return xm().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,En(e,{cardLoad:"chat"});case 2:return t.next=4,vo(Object(h.a)(Object(h.a)({},e),{},{fnIdentification:"Layouts/Index/loadData()-Users"}),{ids:[Ce.getState().session._id],db:"users",type:"comment",ini:!0});case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Z=function(){var t=Object(Ne.a)(xm().mark((function t(r){var n=arguments;return xm().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.length>1&&void 0!==n[1]&&n[1],!(u&&"/"!==window.location.pathname&&"/login"!==window.location.pathname&&e&&e.reduxFunction)){t.next=16;break}return t.next=4,En(e,{cardLoad:"myDay"});case 4:return t.next=6,En(Object(h.a)({},e),{cardLoad:"plans"});case 6:return t.next=8,En(Object(h.a)({},e),{cardLoad:"chat",ignoreLoader:!0});case 8:return t.next=10,kn(e);case 10:if(!t.sent){t.next=14;break}return _(!1),t.abrupt("return",!0);case 14:t.next=17;break;case 16:return t.abrupt("return",!0);case 17:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Q=function(){},ee=function(){var t=Object(Ne.a)(xm().mark((function t(r,n){return xm().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},o),{},{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)}}(),te=function(){var t=Object(Ne.a)(xm().mark((function t(){var r;return xm().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(gm.a)(wm,{transports:["websocket","polling"],query:{token:localStorage.getItem("TOKEN")}});case 2:return(r=t.sent)&&(oe(r),e.reduxFunction("ASYNC","SET_FUNCTIONS",{socket:r})),t.abrupt("return",!0);case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),re=function(){var e=Object(Ne.a)(xm().mark((function e(t){return xm().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&&it(Object(h.a)({},t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ne=function t(r){var n=u;return r.map((function(r,a){if(r.auth&&(!r.AppAccess||r&&r.AppAccess&&n&&n._access)){var o;o=r.component;var c=!r.access&&!r.AppAccess;if(r.access&&r.access.map((function(e){n&&n[e]&&(c=!0)})),r.AppAccess&&r.AppAccess.map((function(e){n&&n._access&&n._access[e]&&(c=!0)})),c)return r.views&&r.views.length>0&&t(r.views),i.a.createElement(Ie.b,{path:r.path,component:function(){return i.a.createElement(o,null)},key:a,expanded:T,subMenu:!!e.subMenu})}}))},ae=function(){var t=Object(Ne.a)(xm().mark((function t(r){return xm().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)}}(),oe=function(t){t.on("global",(function(e){"version"===e.fn&&it({message:tt("$__appNewVersionAvaiable",1),hideiconvariant:!0,variant:"info",persist:!0,horizontal:"right",confirm:function(){window.location.reload()}}),"logout"===e.fn&&ae(),"reload"===e.fn&&window.location.reload()})),t.on("SWOT.UPD",(function(t){console.log("SWOT.UPD::612",t),function(e,t){Ce.getState().db.cards[t._id]&&!Ce.getState().db.cards[t._id]._selected&&t&&t._selected&&delete t._selected,e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},t._id,Object(h.a)(Object(h.a)({},Ce.getState().db.cards[t._id]),{},{_aspects:t.aspects})))})),e.reduxFunction("ASYNC","preLoader",Object(h.a)(Object(h.a)({},Ce.getState().preLoader),{},{autoSave:!0}))}(Object(h.a)(Object(h.a)({},e),{},{store:Ce.getState(),_sessionId:a._id}),t)})),t.on("card.ADD",(function(t){console.log("card.ADD::622",t),t._id&&En(Object(h.a)(Object(h.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"card",idRel:t._id})})),t.on("card.UPD",(function(t){console.log("card.UPD::627",t),Bn(e,t)})),t.on("card.MYDAY",(function(t){Hn(e,t)})),t.on("card.TIMER",(function(t){console.log(t),function(e,t){var r=Ce.getState().db.cards[t.cardId]||null;r&&e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},t.cardId,Object(h.a)(Object(h.a)({},r),{},{_kpiTimer:t._kpiTimer})))}))}(e,t)})),t.on("card.UPDATE",(function(t){console.log("card.UPDATE::632",t),Yn(e,t)})),t.on("card.ACCESS_UPD",function(){var t=Object(Ne.a)(xm().mark((function t(r){return xm().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:qn(e,r);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.on("card.ACCESS_DELETE",(function(t){console.log("card.ACCESS_DELETE::642",t),function(e,t){if(!Ce.getState().db.cards[t.cardId])return!0;var r=Object(h.a)({},Ce.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)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},t.cardId,Object(h.a)({},r)))}))}(e,t)})),t.on("card.REORDER",(function(t){console.log("card.REORDER::646",t),function(e,t){var r=Ce.getState().db.cards,n=t.cards;n&&n.length>0&&(n.map((function(e,t){r=Object(h.a)(Object(h.a)({},r),{},Object(O.a)({},e,Object(h.a)(Object(h.a)({},r[e]),{},{order:{low:t}})))})),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),r)})))}(e,t)})),t.on("card.DELETE",(function(t){console.log("card.DELETE::650",t),$n(e,t,!0)})),t.on("card.unlinkChildrens",(function(t){console.log("card.unlinkChildrens::654",t),Kn(e,t)})),t.on("card.changePlanId",(function(t){console.log("card.changePlanId::659",t);var r=window.location.hash.split("/");r[0]=r[0].replace("#","");var n=Ce.getState().sessionLoads.cards.load,a=Pe()("".concat(JSON.stringify({idRel:r[0],cardLoad:"plan"}))).toString();r[0]===t.planId||Object.keys(n).length>0&&n[a]?En(Object(h.a)(Object(h.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"plan",idRel:t.cardId,force:!0}):Vn(e,t)})),t.on("node.UPDATE",(function(t){console.log("node.UPDATE::684",t),mm(e,t)})),t.on("column.UPD",(function(t){console.log("node.UPD::690",t),function(e,t){if(Ce.getState().db.cards[t._cardColumn]){var r=Object(h.a)(Object(h.a)({},Ce.getState().db.cards[t._cardColumn].boards[t._board].columns[t._columnId]),t._columnData),n=Object(f.a)(Ce.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)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},t._cardColumn,Object(h.a)(Object(h.a)({},Ce.getState().db.cards[t._cardColumn]),{},{boards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards[t._cardColumn].boards),{},Object(O.a)({},t._board,Object(h.a)(Object(h.a)({},Ce.getState().db.cards[t._cardColumn].boards[t._board]),{},{columnOrder:n,columns:Object(h.a)(Object(h.a)({},Ce.getState().db.cards[t._cardColumn].boards[t._board].columns),{},Object(O.a)({},t._columnId,r))})))})))}))}Gn(e)}(e,t)})),t.on("column.DELETE",(function(t){console.log("column.DELETE::694",t),function(e,t){if(Ce.getState().db.cards[t._parent]){var r=Object(f.a)(Ce.getState().db.cards[t._parent].boards[t._board].columnOrder),n=Object(h.a)({},Ce.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)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},t._parent,Object(h.a)(Object(h.a)({},Ce.getState().db.cards[t._parent]),{},{boards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards[t._parent].boards),{},Object(O.a)({},t._board,Object(h.a)(Object(h.a)({},Ce.getState().db.cards[t._parent].boards[t._board]),{},{columnOrder:r,columns:n})))})))}))}}(e,t)})),t.on("column.REORDER",(function(t){console.log("column.REORDER::698",t),function(e,t){if(Ce.getState().db.cards[t._parent]){var r=t._order;e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{cards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards),{},Object(O.a)({},t._parent,Object(h.a)(Object(h.a)({},Ce.getState().db.cards[t._parent]),{},{boards:Object(h.a)(Object(h.a)({},Ce.getState().db.cards[t._parent].boards),{},Object(O.a)({},t._board,Object(h.a)(Object(h.a)({},Ce.getState().db.cards[t._parent].boards[t._board]),{},{columnOrder:r})))})))}))}}(e,t)})),t.on("column.CARDS",(function(t){console.log("column.CARDS::702",t),function(e,t){var r=Ce.getState().db,n=Object(O.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(O.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 r={};t.on("timeline.TYPING",(function(t){console.log("timeline.TYPING::710",t),r[t.typingUser]&&clearTimeout(r[t.typingUser]),Ce.getState().chat&&Ce.getState().chat.typing&&(!Ce.getState().chat.typing[t.group?t.group:"me"]||Ce.getState().chat.typing[t.group?t.group:"me"]&&!Ce.getState().chat.typing[t.group?t.group:"me"][t.typingUser])&&e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},Ce.getState().chat),{},{typing:Object(h.a)(Object(h.a)({},Ce.getState().chat.typing),{},Object(O.a)({},t.group?t.group:"me",Object(h.a)(Object(h.a)({},Ce.getState().chat.typing[t.group?t.group:"me"]),{},Object(O.a)({},t.typingUser,!0))))})),r=Object(h.a)(Object(h.a)({},r),{},Object(O.a)({},t.typingUser,setTimeout((function(){e.reduxFunction("ASYNC","SET_CHAT",Object(h.a)(Object(h.a)({},Ce.getState().chat),{},{typing:Object(h.a)(Object(h.a)({},Ce.getState().chat.typing),{},Object(O.a)({},t.group?t.group:"me",Object(h.a)(Object(h.a)({},Ce.getState().chat.typing[t.group?t.group:"me"]),{},Object(O.a)({},t.typingUser,!1))))}))}),3e3)))})),t.on("timeline.COMMENT",function(){var t=Object(Ne.a)(xm().mark((function t(r){var n,a;return xm().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.idRel===Ce.getState().session._id&&r.comment&&r.comment.user&&r.comment.user._id&&!Ce.getState().db.users[r.comment.user._id]&&K(r.comment.user._id),go(e,r),r.idRel===Ce.getState().session._id&&Ce.getState().db.users[r.comment.user._id]&&(!Ce.getState().chat.open||Ce.getState().chat.open&&r.comment&&r.comment.user&&r.comment.user._id!==Ce.getState().chat.nodeId)&&(r._parent===Ce.getState().session._id&&_m.play(),r.comment.nodeId=r.nodeId,n=Object(h.a)(Object(h.a)({},r.comment),{},{nodeId:r.comment._parent,idRel:r.nodeId}),r._parent===Ce.getState().session._id&&((a=new Notification("".concat(r.comment.user.name," ").concat(tt("$__sendedANewMessage",1)),{body:r.comment.message?r.comment.message:tt("$__".concat(r.comment.type),1)})).onclick=function(e){e.preventDefault(),window.focus(),a.close()},it({message:tt("$__newMessage",1),content:i.a.createElement("div",{style:{display:"flex",cursor:"pointer",backgroundColor:"#none"},onClick:function(e){ee(n.user._id,"users"),e.stopPropagation()}},i.a.createElement(Ji,{storie:n,noReactions:!0,inverted:!0})),hideiconvariant:!0,variant:"info",persist:!1,horizontal:"right",confirm:null})));case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.on("timeline.DEL",(function(t){console.log("timeline.DEL::822",t);var r=Ce.getState(),n=(r.timeline,r.session),a=Ce.getState().timeline[t.idRel]&&Ce.getState().timeline[t.idRel][t.id]?t.idRel:n._id;Ce.getState().timeline&&Ce.getState().timeline[a]&&Ce.getState().timeline[a][t.id]&&e.reduxFunction("ASYNC","SET_TIMELINE",Object(h.a)(Object(h.a)({},Ce.getState().timeline),{},Object(O.a)({},a,Object(h.a)(Object(h.a)({},Ce.getState().timeline[a]),{},Object(O.a)({},t.id,Object(h.a)(Object(h.a)({},Ce.getState().timeline[a][t.id]),{},{deleted:!0},t.deletedReason?{deletedReason:t.deletedReason}:{}))))))})),t.on("user.UPD",(function(t){Fa(e,t)})),t.on("user.CONNECT",(function(t){e.reduxFunction("ASYNC","SET_USERS_STATUS",{users:Object(h.a)(Object(h.a)({},Ce.getState().usersStatus.users),{},Object(O.a)({},t.user,{status:t.status,updatedAt:t.updatedAt}))})})),t.on("user.DISCONNECT",(function(t){e.reduxFunction("ASYNC","SET_USERS_STATUS",{users:Object(h.a)(Object(h.a)({},Ce.getState().usersStatus.users),{},Object(O.a)({},t.user,null))})})),t.on("users.STATUS",(function(t){e.reduxFunction("ASYNC","SET_USERS_STATUS",Object(h.a)(Object(h.a)({},Ce.getState().usersStatus),{},{users:Object(h.a)({},t.users)}))})),t.on("user.ACCESS",(function(t){console.log("user.ACCESS::892",t),Fa(e,t)})),t.on("userGroup.UPD",(function(t){console.log("userGroup.UPD::896",t),Ys(e,t,!0)})),t.on("feed.ADD",(function(t){console.log("feed.ADD::902",t),function(e,t){var r=Object(O.a)({},t._id,Object(h.a)(Object(h.a)(Object(h.a)({},Ce.getState().db.feeds&&Ce.getState().db.feeds[t._id]&&Ce.getState().db.feeds[t._id].feed?{feed:Ce.getState().db.feeds[t._id].feed}:{}),t.data),{},{_parent:Object(h.a)(Object(h.a)({},Ce.getState().db.feeds&&Ce.getState().db.feeds[t._id]&&Ce.getState().db.feeds[t._id]._parent?Ce.getState().db.feeds[t._id]._parent:{}),{},Object(O.a)({},t._parent,Object(h.a)({},t.rel)))}));e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{feeds:Object(h.a)(Object(h.a)({},Ce.getState().db.feeds),r)}))}(e,t)})),t.on("language.UPD",(function(t){console.log("LANGUAGE.UPD::908",t),function(e,t){var r=Ce.getState().languages[t.alias]&&Ce.getState().languages[t.alias].locales?Array.from(Ce.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)({},Ce.getState().languages),{},Object(O.a)({},t.alias,Object(h.a)(Object(h.a)({},Ce.getState().languages[t.alias]&&Ce.getState().languages[t.alias]),{},{locales:r}))))}(e,t)})),t.on("tag.UPD",(function(t){console.log("tag.UPD::914",t),Ys(e,t,!0)})),t.on("tag.DEL",(function(t){console.log("tag.DEL::918",t),Rs(e,t,!0)})),t.on("tag.UNLINK",(function(t){console.log("tag.UNLINK::923",t),Ws(e,t,!0)})),t.on("logout",(function(e){console.log("logout::930",e),e.user===Ce.getState().session._id&&ae()})),t.on("notifications.ADD",function(){var t=Object(Ne.a)(xm().mark((function t(r){return xm().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:console.log("notifications.ADD::940",r),Ce.getState().session._id===r.userId&&r.notify&&e.reduxFunction("ASYNC","SET_NOTIFICATIONS",Object(h.a)(Object(h.a)({},Ce.getState().notifications),{},Object(O.a)({},r.notify._id,r.notify)));case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.on("chat.STATUS",(function(t){console.log("chat.STATUS::953",t),e.reduxFunction("ASYNC","SET_DB",Object(h.a)(Object(h.a)({},Ce.getState().db),{},{users:Object(h.a)(Object(h.a)({},Ce.getState().db.users),{},Object(O.a)({},t.user,Object(h.a)(Object(h.a)({},Ce.getState().db.users[t.user]),{},{chatStatus:t.status})))}))})),t.on("chat.READED",(function(t){(Ce.getState().db.cards[t.id]||Ce.getState().db.users[t.id]||Ce.getState().db.users[t.readedBy])&&ho(e,t)})),t.on("chat.INTERACT",(function(t){console.log("chat.INTERACT",t),mo(e,t),Ce.getState().db.cards[t.id]||Ce.getState().db.users[t.id]||Ce.getState().db.users[t.readedBy]}));var n=setTimeout((function(){}),5e3);t.on("disconnect",(function(){n=setTimeout((function(){v(!0)}),5e3)})),t.on("connect",(function(){console.log("**********1007"),setTimeout((function(){t.emit("data",{module:"user",method:"post",action:"logout"},{notThis:!0})}),2e3),console.log("1018"),q(!0),clearTimeout(n),v(!1)}))};return x||!B?i.a.createElement("div",{style:{position:"fixed",top:"0px",bottom:"0px",left:"0px",right:"0px"}},i.a.createElement(Rr,null)):(L&&"/offline-detect"!==window.location.pathname&&s.push("offline-detect"),j&&"/maintenance-mode"!==window.location.pathname&&s.push("maintenance-mode"),j||L||"/maintenance-mode"!==window.location.pathname&&"/offline-detect"!==window.location.pathname||s.push("login"),i.a.createElement("div",{style:{position:"fixed",top:"0px",bottom:"0px",left:u&&T?"calc(198px + ".concat(P?"264px":"0px",")"):"0px",right:"0px"},onContextMenu:function(){}},u?i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:G.wrapper},i.a.createElement(zt.a,{xsDown:!0},T&&i.a.createElement(Ih,Object.assign({routes:Oh,handleDrawerToggle:Q,menuExpand:function(){N((function(e){return!e}))},setSubMenuExpanded:function(e){z(e)},subMenuExpanded:P},r))),i.a.createElement(zt.a,{smUp:!0},i.a.createElement(sm,Object.assign({routes:Oh,handleDrawerToggle:Q,menuExpand:function(){N((function(e){return!e}))},setSubMenuExpanded:function(e){z(e)},subMenuExpanded:P,expanded:T},r))),i.a.createElement("div",{className:H,ref:W,id:"mainPannel"},i.a.createElement("div",{className:G.content},i.a.createElement("div",{className:G.container},i.a.createElement(Ie.d,null,B,i.a.createElement(Ie.a,{from:"/",to:"/d#tab/resume"}))))),i.a.createElement(Ps,null)),i.a.createElement(zt.a,{smDown:!0},i.a.createElement(Zh,{menuExpand:function(){N((function(e){return!e}))},expanded:T})),i.a.createElement(Pt,null,i.a.createElement(Mr,null)),i.a.createElement(Zi,null),i.a.createElement(Pt,null,i.a.createElement(Re.a,{open:g,className:G.backdrop,style:{backdropFilter:"blur(7px) sepia(90%)"}},i.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"}},i.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center"}},i.a.createElement(xt,{color:"ColumnTitleColor",size:"77px"},"cloud_off")),i.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",marginTop:"15px"}},tt("$__noInternetConnection","*"))))),i.a.createElement("div",null),i.a.createElement(Pt,null,i.a.createElement(im,{expanded:T,subMenuExpanded:P})),i.a.createElement(Pt,null,i.a.createElement(um,null)),i.a.createElement(Pt,null,i.a.createElement(Ft,null))):i.a.createElement("div",null,!j&&i.a.createElement(Or,r),i.a.createElement("div",{className:G.wrapper,ref:R},i.a.createElement("div",{className:G.fullPage,style:{backgroundImage:"url("+pm.a+")"}},i.a.createElement(Ie.d,null,function e(t){return t.map((function(t,r){return t.views?e(t.views):(n=t.component,!t.auth&&n?i.a.createElement(Ie.b,{path:t.path,component:function(){return i.a.createElement(n,{callback:function(e){re(e)}})},key:r}):void 0);var n}))}(Oh),i.a.createElement(Ie.a,{from:"*",to:L?"/offline-detect":j?"/maintenance-mode":"/login"})),i.a.createElement(Sr,{white:!0})))),i.a.createElement(Pt,null,i.a.createElement(Em,{pauseOnFocusLoss:!0}))))})),jm=(r(1554),function(e){var t=e.store,r=e.history;return i.a.createElement(Fe.a,{store:t},i.a.createElement(Ie.c,{history:r},i.a.createElement(Ie.b,{exact:!0,patch:"/:params",component:Om})))});r(162).config(),-1===window.location.hostname.indexOf("192.168")&&-1===window.location.hostname.indexOf("localhost")&&-1===window.location.hostname.indexOf("hom2022.machen")&&-1===window.location.hostname.indexOf("sonne.machen")&&(console.log=function(){}),console.log("ACTIVE LICENCE",window.location.hostname),Object(c.render)(i.a.createElement(jm,{store:Ce,history:s}),document.getElementById("root"))},173:function(e,t,r){var n=r(48);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(100)).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},229:function(e,t,r){var n=r(48);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(100)).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},262:function(e,t,r){e.exports=r.p+"static/media/logoMachen.c1ab9af8.svg"},307: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="},338: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="},477:function(e){e.exports=JSON.parse('{"name":"MACHEN","version":"3.1.34","private":true,"dependencies":{"@date-io/date-fns":"1.3.13","@emotion/react":"^11.9.0","@emotion/styled":"^11.8.1","@fortawesome/react-fontawesome":"^0.1.14","@material-ui/core":"^4.11.0","@material-ui/icons":"^4.5.1","@material-ui/lab":"^4.0.0-alpha.56","@material-ui/pickers":"^3.2.10","@mui/material":"^5.8.1","@nivo/bar":"^0.70.1","@nivo/bullet":"^0.79.1","@nivo/circle-packing":"^0.70.1","@nivo/core":"^0.70.1","@nivo/pie":"^0.70.1","@nivo/sankey":"^0.70.1","@reactour/mask":"^1.0.4","@reactour/popover":"^1.0.5","@reactour/tour":"^2.13.0","@reactour/utils":"^0.4.7","axios":"^0.21.1","base-64":"^1.0.0","bcryptjs":"^2.4.3","browser-image-compression":"^1.0.14","chartist":"^0.10.1","chartist-plugin-tooltip":"0.0.11","chartist-plugin-tooltips":"0.0.17","chartist-plugin-tooltips-updated":"^0.1.3","compress":"^0.99.0","cpf-cnpj-validator":"^1.0.3","crypto-js":"^4.0.0","date-fns":"^2.16.1","dotenv":"^6.2.0","draft-js":"^0.11.7","draftjs-to-html":"^0.9.1","emoji-picker-react":"^3.4.7","fg-loadcss":"^3.1.0","file-saver":"^1.3.3","history":"4.9.0","html-to-draftjs":"^1.5.0","import":"0.0.6","install":"^0.13.0","jquery":"^3.5.1","jwt-decode":"^3.1.2","material-table":"^1.69.0","moment":"2.24.0","moment-timezone":"^0.5.31","node-sass":"^4.13.1","nouislider":"14.0.2","npm":"^7.6.0","pdf-lib":"^1.16.0","perfect-scrollbar":"1.4.0","react":"^18.2.0","react-aspect-ratio":"^1.1.2","react-audio-player":"^0.17.0","react-beautiful-dnd":"^13.0.0","react-big-calendar":"^1.5.0","react-bootstrap-sweetalert":"4.4.1","react-chartist":"0.13.3","react-color":"^2.19.3","react-contextmenu":"^2.14.0","react-cookie":"^4.1.1","react-credit-cards":"^0.8.3","react-cropper":"^1.3.0","react-custom-scroll":"^4.2.1","react-data-export":"^0.6.0","react-datepicker":"^4.8.0","react-datetime":"2.16.3","react-doc-viewer":"^0.1.5","react-dom":"^16.9.0","react-draft-wysiwyg":"^1.15.0","react-easy-swipe":"0.0.18","react-export-excel":"^0.5.3","react-fetch-preloader":"0.0.3","react-file-drop":"^3.0.7","react-file-viewer":"^1.2.1","react-google-login":"^5.2.2","react-image-file-resizer":"^0.4.7","react-jvectormap":"0.0.12","react-keyed-file-browser":"^1.10.0","react-loading-skeleton":"^3.0.1","react-mentions":"^4.1.1","react-nestable":"^2.0.0","react-number-format":"^4.4.1","react-popper":"^2.2.4","react-render-html":"^0.6.0","react-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":[]}}')},493:function(e,t,r){var n=r(261),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"}}}},522:function(e,t,r){e.exports=r.p+"static/media/strategy-pt.625a0c5b.png"},543:function(e,t,r){e.exports=r.p+"static/media/userCover.49044f68.jpg"},586:function(e,t,r){},653:function(e,t,r){var n=r(48);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(100)).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},654:function(e,t,r){var n=r(48);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(100)).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},655:function(e,t,r){var n=r(48);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(100)).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},656:function(e,t,r){var n=r(48);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(100)).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},657:function(e,t,r){e.exports=r.p+"static/media/machen.b9c661d3.svg"},756:function(e,t,r){},83:function(e,t,r){e.exports=r.p+"static/media/fundo-sonne.6de93583.png"},897:function(e,t,r){e.exports=r.p+"static/media/microsoftWord.113ac212.svg"},898:function(e,t,r){e.exports=r.p+"static/media/microsoftExcel.c59164de.svg"},899:function(e,t,r){e.exports=r.p+"static/media/microsoftPowerpoint.0e97c564.svg"},900:function(e,t,r){var n=r(48);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(100)).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},901:function(e,t,r){e.exports=r.p+"static/media/pdf.3d17c449.svg"},916:function(e,t,r){},917:function(e,t,r){e.exports=r.p+"static/media/googlePlay-ptBR.6583181e.png"},918:function(e,t,r){e.exports=r.p+"static/media/appleStore-ptBR.2049e321.png"},928:function(e,t,r){e.exports=r.p+"static/media/Mockup_App_WEB.0ed158a4.png"},929:function(e,t,r){e.exports=r.p+"static/media/supportMockup.ec51b4aa.png"},932:function(e,t,r){e.exports=r.p+"static/media/fundoLogin.a16e608c.jpg"},934:function(e,t,r){e.exports=r.p+"static/media/notification.d7241ff2.mp3"},97:function(e,t,r){var n=r(48);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(100)).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},985:function(e,t,r){e.exports=r(1555)},995:function(e,t){}},[[985,1,2]]]);
//# sourceMappingURL=main.2de2a420.chunk.js.map