(this["webpackJsonplamassu-admin"]=this["webpackJsonplamassu-admin"]||[]).push([[0],{629:function(e,t){},632:function(e,t){},633:function(e,t){},655:function(e,t){},657:function(e,t){},665:function(e,t){},667:function(e,t){},787:function(e,t,n){"use strict";n.r(t);var a=n(1),r=n.n(a),i=n(44),o=n.n(i),l=n(2),c=n(9),s=n(6),d=n(46),u=n(8),m=n(928),h=n(850),p=n(321),b=n(467),f=n(336),j=n(827),g=n(914),O=n(10),x=n.n(O),v=n(69),y=n(417),w=n(149),C=n(51),k=r.a.createContext(),E=n(833),N=n(831),S=n(7),I=n.n(S),F=n(849),L=n(426),P=n(446),D=n(438),R=n(88),T=n(429),B=n(828),A=n(178),M=n(277),W=n(829),z=n(5),q=n(21),$="#5f668a",H="#44e188",V="#ecfbef",U="#3fd07e",G="#ebefff",X="#dbdfed",_="#16d6d3",K="#5a67ff",Z="#ffffff",Q="#ff584a",Y="#ffeceb",J="#1b2559",ee="#48f694",te=H,ne=U,ae="#fafbff",re=G,ie=X,oe="#dddddd",le="#f2f2f2",ce=J,se=$,de="#72799d",ue="#525772",me=$,he=Q,pe=Y,be=1200,fe=ee,je="Mont",ge="MuseoSans",Oe=24,xe=20,ve=16,ye=14,we=13;var Ce=we,ke=ye,Ee=ve,Ne=Oe,Se=500,Ie=ge,Fe=32,Le=48;var Pe=2*Fe,De=J,Re=Y,Te=V,Be={lineHeight:"120%",color:ce},Ae={h1:{extend:Be,fontSize:Oe,fontFamily:je,fontWeight:900},h2:{extend:Be,fontSize:xe,fontFamily:je,fontWeight:900},h3:{extend:Be,fontSize:ye,fontFamily:je,fontWeight:900},h4:{extend:Be,fontSize:ye,fontFamily:je,fontWeight:700},h5:{extend:Be,fontSize:ve,fontFamily:je,fontWeight:700},p:{extend:Be,fontSize:ye,fontFamily:ge,fontWeight:500},tl1:{extend:Be,fontSize:xe,fontFamily:ge,fontWeight:700},tl2:{extend:Be,fontSize:ye,fontFamily:ge,fontWeight:700},info1:{extend:Be,fontSize:Oe,fontFamily:ge,fontWeight:700},info2:{extend:Be,fontSize:ve,fontFamily:ge,fontWeight:700},info3:{extend:Be,fontSize:ve,fontFamily:ge,fontWeight:500},mono:{extend:Be,fontSize:ye,fontFamily:"BPmono",fontWeight:500},monoBold:{fontWeight:700},monoSmall:{fontSize:we},inputFont:{fontSize:xe,fontFamily:ge,fontWeight:500,lineHeight:"110%",color:ce},regularLabel:{fontSize:ye,fontFamily:ge,fontWeight:500,lineHeight:"110%"},label1:{fontSize:we,fontFamily:ge,fontWeight:500,color:ce},label2:{fontSize:we,fontFamily:ge,fontWeight:700,color:ce},label3:{fontSize:ye,fontFamily:ge,fontWeight:500,color:ce},confirmationCode:{extend:Be,fontSize:35,fontFamily:ge,fontWeight:900},inline:{display:"inline"},noMargin:{margin:0}},Me=function(e,t,n){return{backgroundColor:e,"&:hover":{backgroundColor:t},"&:active":{backgroundColor:n}}},We={actionButton:{extend:Ae.p,cursor:"pointer",border:"none",height:28,outline:0,borderRadius:6,padding:"0 8px",display:"flex",alignItems:"center"},primary:{extend:Me(re,ie,se),"&:active":{color:Z,"& $actionButtonIcon":{display:"none"},"& $actionButtonIconActive":{display:"flex"}},"& $actionButtonIconActive":{display:"none"}},secondary:{extend:Me(se,de,ue),color:Z,"&:active":{"& $actionButtonIcon":{display:"flex"},"& $actionButtonIconActive":{display:"none"}},"& $actionButtonIcon":{display:"none"},"& $actionButtonIconActive":{display:"flex"}},spring:{extend:Me(te,ee,ne),color:Z,"&:active":{"& $actionButtonIcon":{display:"flex"},"& $actionButtonIconActive":{display:"none"}},"& $actionButtonIcon":{display:"none"},"& $actionButtonIconActive":{display:"flex"}},tomato:{extend:Me("#E45043",he,"#CE463A"),color:Z,"&:active":{"& $actionButtonIcon":{display:"flex"},"& $actionButtonIconActive":{display:"none"}},"& $actionButtonIcon":{display:"none"},"& $actionButtonIconActive":{display:"flex"}},actionButtonIcon:{display:"flex",paddingRight:7,"@global":{svg:{width:14,height:14}}},actionButtonIconActive:{}},ze=n(0),qe=Object(f.a)(We),$e=Object(a.memo)((function(e){var t,n=e.className,a=e.Icon,r=e.InverseIcon,i=e.color,o=e.children,l=Object(q.a)(e,["className","Icon","InverseIcon","color","children"]),c=qe(),d=(t={},Object(z.a)(t,c.actionButton,!0),Object(z.a)(t,c.primary,"primary"===i),Object(z.a)(t,c.secondary,"secondary"===i),Object(z.a)(t,c.spring,"spring"===i),Object(z.a)(t,c.tomato,"tomato"===i),t);return Object(ze.jsxs)("button",Object(s.a)(Object(s.a)({className:I()(d,n)},l),{},{children:[a&&Object(ze.jsx)("div",{className:c.actionButtonIcon,children:Object(ze.jsx)(a,{})}),r&&Object(ze.jsx)("div",{className:I()(c.actionButtonIcon,c.actionButtonIconActive),children:Object(ze.jsx)(r,{})}),o&&Object(ze.jsx)("div",{children:o})]}))})),He=Object(f.a)(Ae);function Ve(e){var t,n=e.children,a=e.noMargin,r=e.className,i=Object(q.a)(e,["children","noMargin","className"]),o=He(),l=(t={},Object(z.a)(t,o.h1,!0),Object(z.a)(t,o.noMargin,a),Object(z.a)(t,r,!!r),t);return Object(ze.jsx)("h1",Object(s.a)(Object(s.a)({className:I()(l)},i),{},{children:n}))}function Ue(e){var t,n=e.children,a=e.noMargin,r=e.className,i=Object(q.a)(e,["children","noMargin","className"]),o=He(),l=(t={},Object(z.a)(t,o.h2,!0),Object(z.a)(t,o.noMargin,a),Object(z.a)(t,r,!!r),t);return Object(ze.jsx)("h2",Object(s.a)(Object(s.a)({className:I()(l)},i),{},{children:n}))}function Ge(e){var t,n=e.children,a=e.noMargin,r=e.className,i=Object(q.a)(e,["children","noMargin","className"]),o=He(),l=(t={},Object(z.a)(t,o.h3,!0),Object(z.a)(t,o.noMargin,a),Object(z.a)(t,r,!!r),t);return Object(ze.jsx)("h3",Object(s.a)(Object(s.a)({className:I()(l)},i),{},{children:n}))}function Xe(e){var t,n=e.children,a=e.noMargin,r=e.className,i=Object(q.a)(e,["children","noMargin","className"]),o=He(),l=(t={},Object(z.a)(t,o.h4,!0),Object(z.a)(t,o.noMargin,a),Object(z.a)(t,r,!!r),t);return Object(ze.jsx)("h4",Object(s.a)(Object(s.a)({className:I()(l)},i),{},{children:n}))}function _e(e){var t,n=e.children,a=e.noMargin,r=e.className,i=Object(q.a)(e,["children","noMargin","className"]),o=He(),l=(t={},Object(z.a)(t,o.h5,!0),Object(z.a)(t,o.noMargin,a),Object(z.a)(t,r,!!r),t);return Object(ze.jsx)("h5",Object(s.a)(Object(s.a)({className:I()(l)},i),{},{children:n}))}var Ke=it("p"),Ze=it("info1"),Qe=it("info2"),Ye=it("info3"),Je=it("mono"),et=it("tl1"),tt=it("tl2"),nt=it("label1"),at=it("label2"),rt=it("label3");function it(e){return function(t){var n,a=t.inline,r=t.noMargin,i=t.className,o=t.children,l=Object(q.a)(t,["inline","noMargin","className","children"]),c=He(),d=(n={},Object(z.a)(n,i,!!i),Object(z.a)(n,c[e],e),Object(z.a)(n,c.inline,a),Object(z.a)(n,c.noMargin,r),n);return Object(ze.jsx)("p",Object(s.a)(Object(s.a)({className:I()(d)},l),{},{children:o}))}}function ot(){return(ot=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var ct=a.createElement("desc",null,"Created with Sketch."),st=a.createElement("g",{id:"Symbols",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"nav-/-primary-/-1440",transform:"translate(-1295.000000, -19.000000)",stroke:"#1B2559",strokeWidth:2},a.createElement("g",{id:"icon/menu/notification",transform:"translate(1296.000000, 20.000000)"},a.createElement("path",{d:"M10.1052632,14.3157895 C10.1052632,15.2454737 9.35073684,16 8.42105263,16 C7.49136842,16 6.73684211,15.2454737 6.73684211,14.3157895",id:"Stroke-1"}),a.createElement("path",{d:"M1.6,14.3157895 C0.7168,14.3157895 0,13.6031813 0,12.7251462 C0,11.8471111 0.7168,11.1345029 1.6,11.1345029 L1.6,6.3625731 C1.6,2.84884211 4.4656,0 8,0 C11.5344,0 14.4,2.84884211 14.4,6.3625731 L14.4,11.1345029 C15.2832,11.1345029 16,11.8471111 16,12.7251462 C16,13.6031813 15.2832,14.3157895 14.4,14.3157895 L1.6,14.3157895 Z",id:"Stroke-3",strokeLinejoin:"round"}))));function dt(e,t){var n=e.title,r=e.titleId,i=lt(e,["title","titleId"]);return a.createElement("svg",ot({width:"18px",height:"18px",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,ct,st)}var ut=a.forwardRef(dt);n.p;function mt(){return(mt=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var pt=a.createElement("desc",null,"Created with Sketch."),bt=a.createElement("g",{id:"icon/stage/spring/empty",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("circle",{id:"Oval-Copy-6",stroke:"#DDDDDD",strokeWidth:2,transform:"translate(9.000000, 9.000000) rotate(-270.000000) translate(-9.000000, -9.000000) ",cx:9,cy:9,r:8}));function ft(e,t){var n=e.title,r=e.titleId,i=ht(e,["title","titleId"]);return a.createElement("svg",mt({width:"18px",height:"18px",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,pt,bt)}var jt=a.forwardRef(ft);n.p;function gt(){return(gt=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var xt=a.createElement("desc",null,"Created with Sketch."),vt=a.createElement("g",{id:"icon/stage/zodiac/empty",stroke:"none",strokeWidth:2,fill:"none",fillRule:"evenodd"},a.createElement("circle",{id:"Oval-Copy-6",stroke:"#5F668A",transform:"translate(9.000000, 9.000000) rotate(-270.000000) translate(-9.000000, -9.000000) ",cx:9,cy:9,r:8}));function yt(e,t){var n=e.title,r=e.titleId,i=Ot(e,["title","titleId"]);return a.createElement("svg",gt({width:"18px",height:"18px",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,xt,vt)}var wt=a.forwardRef(yt);n.p;function Ct(){return(Ct=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Et=a.createElement("desc",null,"Created with Sketch."),Nt=a.createElement("g",{id:"icon/stage/zodiac/full",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("circle",{id:"Oval-2-Copy",fill:"#1B2559",cx:9,cy:9,r:8}),a.createElement("circle",{id:"Oval-Copy-5",stroke:"#1B2559",strokeWidth:2,transform:"translate(9.000000, 9.000000) rotate(-270.000000) translate(-9.000000, -9.000000) ",cx:9,cy:9,r:8}));function St(e,t){var n=e.title,r=e.titleId,i=kt(e,["title","titleId"]);return a.createElement("svg",Ct({width:"18px",height:"18px",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,Et,Nt)}var It=a.forwardRef(St),Ft=(n.p,{container:{"@media only screen and (max-width: 1920px)":{width:"30vw"},width:"40vw",height:"110vh",right:0,backgroundColor:Z,boxShadow:"0 0 14px 0 rgba(0, 0, 0, 0.24)"},header:{display:"flex",justifyContent:"space-between"},headerText:{marginTop:20,marginLeft:24},actionButtons:{display:"flex",marginLeft:16,height:0},notificationIcon:function(e){var t=e.buttonCoords,n=e.xOffset;return{position:"absolute",top:t?t.y:0,left:t?t.x-n:0,cursor:"pointer",background:"transparent",boxShadow:"0px 0px 0px transparent",border:"0px solid transparent",textShadow:"0px 0px 0px transparent",outline:"none"}},clearAllButton:{marginTop:-16,marginLeft:8,backgroundColor:G},notificationsList:{height:"90vh",maxHeight:"100vh",marginTop:24,marginLeft:0,overflowY:"auto",overflowX:"hidden",backgroundColor:Z,zIndex:10},notificationRow:{display:"flex",flexDirection:"row",justifyContent:"flex-start",position:"relative",marginBottom:4,paddingTop:12,"& > *:first-child":{marginRight:24},"& > *":{marginRight:10},"& > *:last-child":{marginRight:0}},notificationContent:{display:"flex",flexDirection:"column",justifyContent:"center",width:300},unread:{backgroundColor:V},notificationRowIcon:{alignSelf:"center","& > *":{marginLeft:24}},readIconWrapper:{flexGrow:1},unreadIcon:{marginTop:2,width:"12px",height:"12px",backgroundColor:ee,borderRadius:"50%",cursor:"pointer",zIndex:1},readIcon:{marginLeft:8,marginTop:5,width:"12px",height:"12px",border:[[1,"solid",$]],borderRadius:"50%",cursor:"pointer",zIndex:1},notificationTitle:{margin:0,color:$},notificationBody:{margin:0},notificationSubtitle:{margin:0,marginBottom:8,color:$},stripes:{position:"absolute",height:"100%",top:"0px",opacity:"60%"},hasUnread:{position:"absolute",top:0,left:16,width:"9px",height:"9px",backgroundColor:ee,borderRadius:"50%"}}),Lt=n(421),Pt=n.n(Lt);function Dt(){return(Dt=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Tt=a.createElement("g",{id:"\\u21B3-notification-center",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{id:"notification-center_v01a#2-(open)",transform:"translate(-1023.000000, -459.000000)",stroke:"#1B2559"},a.createElement("g",{id:"Group-5",transform:"translate(1000.000000, 0.000000)"},a.createElement("g",{id:"icon/sf-small/wrench",transform:"translate(24.000000, 460.000000)"},a.createElement("path",{d:"M15.7602493,3.10720971 L13.1962412,5.67121772 L10.3290323,5.67121772 L10.3290323,2.80400876 L12.8930403,0.24000075 C12.4378389,0.0872002725 11.9506373,0 11.4434358,0 C8.9282279,0 6.88822153,2.04000637 6.88822153,4.55681424 C6.88822153,5.08081588 6.98102182,5.58321745 7.14422233,6.05201891 L0.580201813,12.6168394 C-0.193400604,13.3904418 -0.193400604,14.6456458 0.580201813,15.4200482 C1.35460423,16.1936506 2.60980816,16.1936506 3.38341057,15.4200482 L9.94823109,8.85602767 C10.4170326,9.01922818 10.9186341,9.11202847 11.4434358,9.11202847 C13.9602436,9.11202847 16.00025,7.0720221 16.00025,4.55681424 C16.00025,4.04961265 15.9130497,3.56241113 15.7602493,3.10720971 Z",id:"Stroke-1"})))));function Bt(e,t){var n=e.title,r=e.titleId,i=Rt(e,["title","titleId"]);return a.createElement("svg",Dt({width:"32px",height:"32px",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,Tt)}var At=a.forwardRef(Bt);n.p;function Mt(){return(Mt=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var zt=a.createElement("g",{id:"\\u21B3-notification-center",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{id:"notification-center_v01a#1-(marked-one-as-read)",transform:"translate(-1023.000000, -123.000000)",stroke:"#1B2559"},a.createElement("g",{id:"Group-5",transform:"translate(1000.000000, 0.000000)"},a.createElement("g",{id:"Group-4",transform:"translate(24.000000, 124.000000)"},a.createElement("g",{id:"Group-3"},a.createElement("line",{x1:0,y1:4,x2:16,y2:4,id:"Path-2"}),a.createElement("polyline",{id:"Path-3",points:"12 0 16 4 12 8"})),a.createElement("g",{id:"Group-2",transform:"translate(8.000000, 12.000000) scale(-1, 1) translate(-8.000000, -12.000000) translate(0.000000, 8.000000)"},a.createElement("line",{x1:0,y1:4,x2:16,y2:4,id:"Path-2-Copy"}),a.createElement("polyline",{id:"Path-3-Copy",points:"12 0 16 4 12 8"}))))));function qt(e,t){var n=e.title,r=e.titleId,i=Wt(e,["title","titleId"]);return a.createElement("svg",Mt({width:"24px",height:"24px",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,zt)}var $t=a.forwardRef(qt);n.p;function Ht(){return(Ht=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Ut=a.createElement("desc",null,"Created with Sketch."),Gt=a.createElement("g",{id:"Symbols",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"icon/warning-icon/tomato"},a.createElement("rect",{id:"Rectangle",stroke:"#FF584A",strokeWidth:2,x:1,y:1,width:22,height:22,rx:11}),a.createElement("path",{d:"M11.2971429,14.4857143 L11.1085714,5.82857143 L13.3714286,5.82857143 L13.2,14.4857143 L11.2971429,14.4857143 Z M11.1942857,18 L11.1942857,15.9771429 L13.3028571,15.9771429 L13.3028571,18 L11.1942857,18 Z",id:"!",fill:"#FF584A",fillRule:"nonzero"})));function Xt(e,t){var n=e.title,r=e.titleId,i=Vt(e,["title","titleId"]);return a.createElement("svg",Ht({width:"24px",height:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,Ut,Gt)}var _t,Kt,Zt,Qt=a.forwardRef(Xt),Yt=(n.p,Object(f.a)(Ft)),Jt={transaction:{display:"Transactions",icon:Object(ze.jsx)($t,{height:16,width:16})},highValueTransaction:{display:"Transactions",icon:Object(ze.jsx)($t,{height:16,width:16})},fiatBalance:{display:"Maintenance",icon:Object(ze.jsx)(At,{height:16,width:16})},cryptoBalance:{display:"Maintenance",icon:Object(ze.jsx)(At,{height:16,width:16})},compliance:{display:"Compliance",icon:Object(ze.jsx)(Qt,{height:16,width:16})},error:{display:"Error",icon:Object(ze.jsx)(Qt,{height:16,width:16})}},en=function(e){var t,n,a,r=e.id,i=e.type,o=(e.detail,e.message),l=e.deviceName,c=e.created,s=e.read,d=e.valid,u=e.toggleClear,m=Yt(),h=null!==(t=A.a([i,"display"])(Jt))&&void 0!==t?t:null,p=null!==(n=A.a([i,"icon"])(Jt))&&void 0!==n?n:Object(ze.jsx)(At,{height:16,width:16}),b=Pt()((new Date).getTime()-new Date(c).getTime(),{compact:!0,verbose:!0}),f=h&&l?"".concat(h," - ").concat(l):"".concat(!h&&l?l:h),j=(a={},Object(z.a)(a,m.readIcon,s),Object(z.a)(a,m.unreadIcon,!s),a);return Object(ze.jsxs)("div",{className:I()(m.notificationRow,!s&&d?m.unread:""),children:[Object(ze.jsx)("div",{className:m.notificationRowIcon,children:Object(ze.jsx)("div",{children:p})}),Object(ze.jsxs)("div",{className:m.notificationContent,children:[Object(ze.jsx)(at,{className:m.notificationTitle,children:f}),Object(ze.jsx)(tt,{className:m.notificationBody,children:o}),Object(ze.jsx)(nt,{className:m.notificationSubtitle,children:b})]}),Object(ze.jsx)("div",{className:m.readIconWrapper,children:Object(ze.jsx)("div",{onClick:function(){return u(r)},className:I()(j)})})]})},tn=Object(f.a)(Ft),nn=x()(_t||(_t=Object(c.a)(["\n query getNotifications {\n notifications {\n id\n type\n detail\n message\n created\n read\n valid\n }\n hasUnreadNotifications\n machines {\n deviceId\n name\n }\n }\n"]))),an=x()(Kt||(Kt=Object(c.a)(["\n mutation toggleClearNotification($id: ID!, $read: Boolean!) {\n toggleClearNotification(id: $id, read: $read) {\n id\n read\n }\n }\n"]))),rn=x()(Zt||(Zt=Object(c.a)(["\n mutation clearAllNotifications {\n clearAllNotifications {\n id\n }\n }\n"]))),on=function(e){var t,n,r=e.close,i=e.hasUnreadProp,o=e.buttonCoords,c=e.popperRef,s=e.refetchHasUnreadHeader,d=Object(u.c)(nn,{pollInterval:6e4}),m=d.data,h=d.loading,p=Object(a.useState)(300),b=Object(l.a)(p,2),f=b[0],j=b[1],g=Object(a.useState)(!1),O=Object(l.a)(g,2),x=O[0],v=O[1],y=tn({buttonCoords:o,xOffset:f}),w=L.a(R.a(T.a("name")),B.a(T.a("deviceId")))(null!==(t=A.a(["machines"])(m))&&void 0!==t?t:[]),C=null!==(n=A.a(["notifications"])(m))&&void 0!==n?n:[],k=Object(a.useState)(i),E=Object(l.a)(k,2),N=E[0],S=E[1],I=Object(u.b)(an,{onError:function(){return console.error("Error while clearing notification")},refetchQueries:function(){return["getNotifications"]}}),F=Object(l.a)(I,1)[0],P=Object(u.b)(rn,{onError:function(){return console.error("Error while clearing all notifications")},refetchQueries:function(){return["getNotifications"]}}),D=Object(l.a)(P,1)[0];Object(a.useEffect)((function(){j(c.current.getBoundingClientRect().x),m&&m.hasUnreadNotifications!==N&&(s(),S(!N))}),[c,m,N,s]);return Object(ze.jsx)(ze.Fragment,{children:Object(ze.jsxs)("div",{className:y.container,children:[Object(ze.jsxs)("div",{className:y.header,children:[Object(ze.jsx)(_e,{className:y.headerText,children:"Notifications"}),Object(ze.jsxs)("button",{onClick:r,className:y.notificationIcon,children:[Object(ze.jsx)(ut,{}),N&&Object(ze.jsx)("div",{className:y.hasUnread})]})]}),Object(ze.jsxs)("div",{className:y.actionButtons,children:[N&&Object(ze.jsx)($e,{color:"primary",Icon:It,InverseIcon:jt,className:y.clearAllButton,onClick:function(){return v(!x)},children:x?"Show all":"Show unread"}),N&&Object(ze.jsx)($e,{color:"primary",Icon:wt,InverseIcon:jt,className:y.clearAllButton,onClick:D,children:"Mark all as read"})]}),Object(ze.jsx)("div",{className:y.notificationsList,children:!h&&(x&&N?M.a(W.a("read",!1))(C):C).map((function(e){return Object(ze.jsx)(en,{id:e.id,type:e.type,detail:e.detail,message:e.message,deviceName:w[e.detail.deviceId],created:e.created,read:e.read,valid:e.valid,toggleClear:function(){return F({variables:{id:e.id,read:!e.read}})}},e.id)}))})]})})},ln=n(847),cn=n(848),sn=n(320),dn=n(248),un=n(11),mn=n(140),hn=n.n(mn),pn=n(447),bn=n(846),fn=n(3),jn=Object(f.a)({title:{marginTop:24,marginBottom:24}}),gn=Object(a.memo)((function(e){var t=e.children,n=jn();return Object(ze.jsx)(Ve,{className:n.title,children:t})}));function On(){return(On=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var vn=a.createElement("desc",null,"Created with Sketch."),yn=a.createElement("g",{id:"icon/button/add/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("path",{d:"M11.5384615,6 C11.5384615,9.05815385 9.05815385,11.5384615 6,11.5384615 C2.94184615,11.5384615 0.461538462,9.05815385 0.461538462,6 C0.461538462,2.94184615 2.94184615,0.461538462 6,0.461538462 C9.05815385,0.461538462 11.5384615,2.94184615 11.5384615,6 Z",id:"Stroke-1",stroke:"#1B2559"}),a.createElement("line",{x1:6,y1:3.69230769,x2:6,y2:8.30769231,id:"Stroke-3",stroke:"#1B2559"}),a.createElement("line",{x1:3.69230769,y1:6,x2:8.30769231,y2:6,id:"Stroke-5",stroke:"#1B2559"}));function wn(e,t){var n=e.title,r=e.titleId,i=xn(e,["title","titleId"]);return a.createElement("svg",On({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,vn,yn)}var Cn=a.forwardRef(wn),kn=(n.p,{button:{extend:Ae.p,border:"none",backgroundColor:G,cursor:"pointer",outline:0,display:"flex",justifyContent:"center",alignItems:"center",width:167,height:48,color:ce,"&:hover":{backgroundColor:X},"&:active":{backgroundColor:$,color:Z,"& svg g *":{stroke:Z}},"& svg":{marginRight:8}}}),En=Object(f.a)(kn),Nn=Object(a.memo)((function(e){var t=e.className,n=e.children,a=Object(q.a)(e,["className","children"]),r=En();return Object(ze.jsxs)("button",Object(s.a)(Object(s.a)({className:I()(r.button,t)},a),{},{children:[Object(ze.jsx)(Cn,{}),n]}))})),Sn=Ae.h1,In=Ae.h3,Fn=function(e){switch(e){case"xl":return 61;case"sm":return 32;case"lg":default:return 40}},Ln={wrapper:function(e){var t=e.size,n=Fn(t);return{height:n+n/12/2}},button:function(e){var t=e.size,n=e.backgroundColor,a=Fn(t),r="xl"===t?3:a/12,i="grey"===n;return{extend:"xl"===t?Sn:In,border:"none",color:Z,cursor:"pointer",fontWeight:900,outline:0,backgroundColor:i?de:ee,"&:disabled":{backgroundColor:oe,boxShadow:"none","&:hover":{backgroundColor:oe,boxShadow:"none"},"&:active":{marginTop:0}},shadowSize:r,height:a,padding:"0 ".concat("xl"===t?20:a/2,"px"),borderRadius:a/4,boxShadow:"0 ".concat(r,"px ").concat(i?se:te),"&:hover":{backgroundColor:i?se:te,boxShadow:"0 ".concat(r,"px ").concat(i?ue:ne)},"&:active":{marginTop:r/2,backgroundColor:i?de:te,boxShadow:"0 ".concat(r/2,"px ").concat(i?ue:ne)}}}},Pn=Object(f.a)(Ln),Dn=Object(a.memo)((function(e){var t=e.size,n=void 0===t?"lg":t,a=e.children,r=e.className,i=e.buttonClassName,o=e.backgroundColor,l=Object(q.a)(e,["size","children","className","buttonClassName","backgroundColor"]),c=Pn({size:n,backgroundColor:o});return Object(ze.jsx)("div",{className:I()(r,c.wrapper),children:Object(ze.jsx)("button",Object(s.a)(Object(s.a)({className:I()(i,c.button)},l),{},{children:a}))})})),Rn=function(e,t,n){return{backgroundColor:e,"&:hover":{backgroundColor:t},"&:active":{backgroundColor:n}}},Tn={baseButton:{extend:Rn(re,ie,se),cursor:"pointer",border:"none",outline:0,height:32,color:ce,"&:active":{color:Z}},primary:{extend:Rn(re,ie,se),"&:active":{color:Z,"& $buttonIcon":{display:"none"},"& $buttonIconActive":{display:"block"}},"& $buttonIconActive":{display:"none"}},secondary:{extend:Rn(se,de,Z),color:Z,"&:active":{color:ce,"& $buttonIcon":{display:"flex"},"& $buttonIconActive":{display:"none"}},"& $buttonIcon":{display:"none"},"& $buttonIconActive":{display:"flex"}}},Bn=Tn.baseButton,An=Tn.primary,Mn={featureButton:{extend:Bn,width:Bn.height,borderRadius:Bn.height/2,display:"flex",padding:0},primary:An,buttonIcon:{margin:"auto","& svg":{width:16,height:16,overflow:"visible","& g":{strokeWidth:1.8}}},buttonIconActive:{}},Wn=Object(f.a)(Mn),zn=Object(a.memo)((function(e){var t,n=e.className,a=e.Icon,r=e.InverseIcon,i=e.children,o=Object(q.a)(e,["className","Icon","InverseIcon","children"]),l=Wn(),c=(t={},Object(z.a)(t,l.featureButton,!0),Object(z.a)(t,l.primary,!0),t);return Object(ze.jsxs)("button",Object(s.a)(Object(s.a)({className:I()(c,n)},o),{},{children:[a&&Object(ze.jsx)("div",{className:l.buttonIcon,children:Object(ze.jsx)(a,{})}),r&&Object(ze.jsx)("div",{className:I()(l.buttonIcon,l.buttonIconActive),children:Object(ze.jsx)(r,{})}),i]}))})),qn=n(328),$n=n(830),Hn=function(e){var t,n=e.children,r=e.bgColor,i=void 0===r?Z:r,o=e.arrowSize,c=void 0===o?6:o,d=e.className,u=Object(q.a)(e,["children","bgColor","arrowSize","className"]),m=Object(a.useState)(null),h=Object(l.a)(m,2),p=h[0],b=h[1],j={popover:{zIndex:3e3,backgroundColor:i,borderRadius:4},arrow:{position:"absolute",fontSize:c,width:"3em",height:"3em"},arrowBottom:{top:0,width:0,height:0,borderLeft:[["2em","solid","transparent"]],borderRight:[["2em","solid","transparent"]],borderBottom:[["2em","solid",i]],marginTop:"-1.9em","&:after":{zIndex:-10,content:'""',position:"absolute",width:3*c,height:3*c,marginLeft:0,bottom:0,top:"calc(50% - 0px)",left:0,border:"5px solid #fff",borderColor:"transparent transparent #fff #fff",transformOrigin:"0 0",transform:"rotate(45deg)",boxShadow:"0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12)"}},arrowTop:{bottom:0,width:0,height:0,borderLeft:[["2em","solid","transparent"]],borderRight:[["2em","solid","transparent"]],borderTop:[["2em","solid",i]],marginBottom:"-1.9em","&:after":{zIndex:-10,content:'""',position:"absolute",width:3*c,height:3*c,marginLeft:0,bottom:0,top:-(4*c+2),left:0,border:"5px solid #fff",borderColor:"transparent transparent #fff #fff",transformOrigin:"0 0",transform:"rotate(45deg)",boxShadow:"0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12)"}},arrowRight:{left:0,width:0,height:0,borderTop:[["2em","solid","transparent"]],borderBottom:[["2em","solid","transparent"]],borderRight:[["2em","solid",i]],marginLeft:"-1.9em"},arrowLeft:{right:0,width:0,height:0,borderTop:[["2em","solid","transparent"]],borderBottom:[["2em","solid","transparent"]],borderLeft:[["2em","solid",i]],marginRight:"-1.9em"},root:{backgroundColor:i}},g=Object(f.a)(j)(),O=(t={},Object(z.a)(t,g.arrow,!0),Object(z.a)(t,g.arrowBottom,"bottom"===u.placement),Object(z.a)(t,g.arrowTop,"top"===u.placement),Object(z.a)(t,g.arrowRight,"right"===u.placement),Object(z.a)(t,g.arrowLeft,"left"===u.placement),t),x=$n.a(u.modifiers,{flip:{enabled:!1},preventOverflow:{enabled:!0,boundariesElement:"scrollParent"},offset:{enabled:!0,offset:"0, 10"},arrow:{enabled:!0,element:p},computeStyle:{gpuAcceleration:!1}});return Object(ze.jsx)(ze.Fragment,{children:Object(ze.jsx)(N.a,Object(s.a)(Object(s.a)({disablePortal:!1,modifiers:x,className:g.popover},u),{},{children:Object(ze.jsxs)(qn.a,{className:I()(g.root,d),children:[Object(ze.jsx)("span",{className:I()(O),ref:b}),n]})}))})},Vn=Ae.info2,Un=function(e,t,n){return{backgroundColor:e,"&:hover":{backgroundColor:t},"&:active":{backgroundColor:n}}},Gn={idButton:{width:34,height:28,display:"flex",borderRadius:4,padding:0,border:"none",cursor:"pointer"},buttonIcon:{margin:"auto",lineHeight:1,"& svg":{overflow:"visible"}},closed:{extend:Un(re,ie,se)},open:{extend:Un(se,se,se)},popoverContent:{extend:Vn,padding:8,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:4,"& img":{maxHeight:145}}},Xn=Object(f.a)(Gn),_n=Object(a.memo)((function(e){var t,n=e.name,r=e.className,i=e.Icon,o=e.InverseIcon,c=(e.popoverWidth,e.children),d=e.popoverClassname,u=Object(q.a)(e,["name","className","Icon","InverseIcon","popoverWidth","children","popoverClassname"]),m=Object(a.useState)(null),h=Object(l.a)(m,2),p=h[0],b=h[1],f=Xn(),j=Boolean(p),g=j?"simple-popper-".concat(n):void 0,O=(t={},Object(z.a)(t,f.idButton,!0),Object(z.a)(t,f.primary,!0),Object(z.a)(t,f.open,j),Object(z.a)(t,f.closed,!j),t),x=Object(z.a)({},f.buttonIcon,!0),v=function(){b(null)};return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(E.a,{onClickAway:v,children:Object(ze.jsxs)("button",Object(s.a)(Object(s.a)({"aria-describedby":g,onClick:function(e){b(p?null:e.currentTarget)},className:I()(O,r)},u),{},{children:[i&&!j&&Object(ze.jsx)("div",{className:I()(x),children:Object(ze.jsx)(i,{})}),o&&j&&Object(ze.jsx)("div",{className:I()(x),children:Object(ze.jsx)(o,{})})]}))}),Object(ze.jsx)(Hn,{className:d,id:g,open:j,anchorEl:p,onClose:v,arrowSize:3,placement:"top",children:Object(ze.jsx)("div",{className:f.popoverContent,children:Object(ze.jsx)("div",{children:c})})})]})})),Kn={label:function(e){var t=e.size;return{width:t,height:t}},root:{"& svg":{flex:1},"&:hover":{backgroundColor:"inherit"},"&:hover rect":{stroke:$},"&:hover polygon":{stroke:$},"&:hover path":{stroke:$}}},Zn=Object(f.a)(Kn),Qn=function(e){var t=e.size,n=e.children,a=e.onClick,r=Object(q.a)(e,["size","children","onClick"]),i=Zn({size:t});return Object(ze.jsx)(sn.a,Object(s.a)(Object(s.a)({},r),{},{size:"small",classes:{root:i.root,label:i.label},disableRipple:!0,onClick:a,children:n}))},Yn=n(213),Jn=function(e){return{boxShadow:"inset 0 -4px 0 0 ".concat(Object(Yn.fade)(e,.8)),"&:hover":{boxShadow:"none",backgroundColor:Object(Yn.fade)(e,.8)}}},ea={link:{extend:Ae.h4,textDecoration:"none",border:"none",backgroundColor:"transparent",cursor:"pointer",padding:"0",height:"100%"},primary:{extend:Jn(fe)},secondary:{extend:Jn("#ff584a"),"&:hover":{color:Z}},noColor:{extend:Jn(Z)},action:{extend:Jn(fe),color:G}},ta=Object(f.a)(ea),na=Object(a.memo)((function(e){var t,n=e.submit,a=e.className,r=e.children,i=e.color,o=void 0===i?"primary":i,l=Object(q.a)(e,["submit","className","children","color"]),c=ta(),d=(t={},Object(z.a)(t,c.link,!0),Object(z.a)(t,c.primary,"primary"===o),Object(z.a)(t,c.secondary,"secondary"===o),Object(z.a)(t,c.noColor,"noColor"===o),Object(z.a)(t,c.action,"action"===o),t);return Object(ze.jsx)("button",Object(s.a)(Object(s.a)({type:n?"submit":"button",className:I()(d,a)},l),{},{children:r}))})),aa=Tn.baseButton,ra=Tn.primary,ia={button:{extend:aa,borderRadius:aa.height/2,outline:0,padding:"0 20px"},primary:ra,buttonIcon:{marginTop:4,marginRight:4,"& svg":{width:20,height:20,overflow:"visible"}},buttonIconActive:{}};Object(f.a)(ia);function oa(){return(oa=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var ca=a.createElement("desc",null,"Created with Sketch."),sa=a.createElement("g",{id:"icon/button/cancel/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{id:"Group-5",transform:"translate(1.000000, 1.000000)",stroke:"#FFFFFF"},a.createElement("line",{x1:10,y1:0,x2:0,y2:10,id:"Stroke-1"}),a.createElement("line",{x1:0,y1:0,x2:10,y2:10,id:"Stroke-3"})));function da(e,t){var n=e.title,r=e.titleId,i=la(e,["title","titleId"]);return a.createElement("svg",oa({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,ca,sa)}var ua=a.forwardRef(da),ma=(n.p,Tn.baseButton),ha={button:{extend:ma,padding:0,color:Z,borderRadius:ma.height/2},normalButton:{width:ma.height},activeButton:{display:"flex",flexDirection:"row",alignItems:"center",backgroundColor:se,fontWeight:"bold",padding:"0 5px","&:hover":{backgroundColor:se}},buttonIcon:{width:16,height:16,overflow:"visible","& g":{strokeWidth:1.8}},buttonIconActiveLeft:{marginRight:12,marginLeft:4},buttonIconActiveRight:{marginRight:5,marginLeft:20},white:{color:Z}},pa=Object(f.a)(ha),ba=Object(a.memo)((function(e){var t,n=e.className,r=e.Icon,i=e.InverseIcon,o=e.toggle,c=e.forceDisable,s=void 0!==c&&c,d=e.children,u=Object(a.useState)(!1),m=Object(l.a)(u,2),h=m[0],p=m[1],b=!s&&h,f=pa(),j=(t={},Object(z.a)(t,f.button,!0),Object(z.a)(t,f.normalButton,!b),Object(z.a)(t,f.activeButton,b),t),g=Object(ze.jsx)(r,{className:f.buttonIcon}),O=Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(i,{className:I()(f.buttonIcon,f.buttonIconActiveLeft)}),Object(ze.jsx)(Xe,{className:f.white,children:d}),Object(ze.jsx)(ua,{className:I()(f.buttonIcon,f.buttonIconActiveRight)})]});return Object(ze.jsx)("button",{className:I()(j,n),onClick:function(){s=!1;var e=!b;o(e),p(e)},children:b?O:g})}));function fa(){return(fa=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var ga=a.createElement("desc",null,"Created with Sketch."),Oa=a.createElement("g",{id:"icon/action/external-link/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("polyline",{id:"Stroke-1",stroke:"#FFFFFF",strokeWidth:2,points:"20 12.1113 20 21.0003 0 21.0003 0 1.0003 8.889 1.0003"}),a.createElement("polyline",{id:"Stroke-3",stroke:"#FFFFFF",strokeWidth:2,points:"14.4443 1 20.0003 1 20.0003 6.556"}),a.createElement("line",{x1:10,y1:11,x2:20,y2:1,id:"Stroke-5",stroke:"#FFFFFF",strokeWidth:2}));function xa(e,t){var n=e.title,r=e.titleId,i=ja(e,["title","titleId"]);return a.createElement("svg",fa({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,ga,Oa)}var va=a.forwardRef(xa);n.p;function ya(){return(ya=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Ca=a.createElement("desc",null,"Created with Sketch."),ka=a.createElement("g",{id:"icon/action/external-link/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{id:"Group-7",transform:"translate(0.000000, 1.000000)",stroke:"#1B2559",strokeWidth:2},a.createElement("polyline",{id:"Stroke-1",points:"20 11.1113 20 20.0003 0 20.0003 0 0.0003 8.889 0.0003"}),a.createElement("polyline",{id:"Stroke-3",points:"14.4443 0 20.0003 0 20.0003 5.556"}),a.createElement("line",{x1:10,y1:10,x2:20,y2:0,id:"Stroke-5"})));function Ea(e,t){var n=e.title,r=e.titleId,i=wa(e,["title","titleId"]);return a.createElement("svg",ya({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,Ca,ka)}var Na=a.forwardRef(Ea),Sa=(n.p,Object(f.a)({actionButton:{marginBottom:32},actionButtonLink:{textDecoration:"none",color:J}})),Ia=function(e){var t=e.link,n=e.label,a=Sa();return Object(ze.jsx)("a",{className:a.actionButtonLink,target:"_blank",rel:"noopener noreferrer",href:t,children:Object(ze.jsx)($e,{className:a.actionButton,color:"primary",Icon:Na,InverseIcon:va,children:n})})},Fa=n(212),La=n(936),Pa=n(436),Da=n(945),Ra=n(838),Ta=n(944),Ba=n(440),Aa=n(839),Ma=n(955),Wa=function(e){switch(e){case"sm":return{fontSize:ke};case"lg":return{fontSize:Ne,fontWeight:700};default:return{fontSize:Ee}}},za={fontWeight:700},qa={size:function(e){var t=e.size;return Object(s.a)({marginTop:"lg"===t?0:2},Wa(t))},bold:za,root:function(e){return{width:e.width,"& input":{textAlign:e.textAlign}}},underline:{"&:before":{borderBottomColor:ee},"&:hover:not(.Mui-disabled)::before":{borderBottomColor:ee}}},$a=Object(f.a)(qa),Ha=Object(a.memo)((function(e){var t=e.name,n=e.isPasswordFilled,a=e.onChange,r=e.onBlur,i=e.value,o=e.error,l=(e.suffix,e.textAlign),c=e.width,d=e.size,u=e.bold,m=e.className,h=e.InputProps,p=Object(q.a)(e,["name","isPasswordFilled","onChange","onBlur","value","error","suffix","textAlign","width","size","bold","className","InputProps"]),b=$a({textAlign:l,width:c,size:d}),f=!o&&!D.a(i)&&!Ta.a(i),j=n||f,g=Object(z.a)({},b.bold,u);return Object(ze.jsx)(Ma.a,Object(s.a)({id:t,onChange:a,onBlur:r,error:o,value:i,classes:{root:b.root},className:m,InputProps:Object(s.a)({className:I()(g),classes:{root:b.size,underline:j?b.underline:null}},h)},p))})),Va=function(e){e.optionsLimit;var t=e.limit,n=e.options,a=e.label,r=e.valueProp,i=e.multiple,o=e.onChange,l=e.labelProp,c=(e.shouldStayOpen,e.value),d=e.error,u=e.fullWidth,m=e.textAlign,h=e.size,p=e.autoFocus,b=Object(q.a)(e,["optionsLimit","limit","options","label","valueProp","multiple","onChange","labelProp","shouldStayOpen","value","error","fullWidth","textAlign","size","autoFocus"]),f=function(e){return function(t){return Da.a(W.a(r,t))(e)}},j=T.a(r),g=r?(i?R.a(f(n)):f(n))(c):c,O=function(){return D.a(g)?[]:i?g:[g]};return Object(ze.jsx)(La.a,Object(s.a)(Object(s.a)({options:n,multiple:i,value:g,onChange:function(e,t){if(!r)return o(e,t);var n=i?R.a(j)(t):j(t);o(e,n)},getOptionLabel:A.a([l]),forcePopupIcon:!1,filterOptions:function(e,n){var a=n.inputValue;return Ra.a(Ta.a(a)?O():[],function(e,t){return t?Object(Pa.a)(e,t,{keys:[r,l]}):e}(e,a)).slice(0,Ba.a(void 0)(t)&&Math.max(t,Ta.a(a)?O().length:0))},openOnFocus:!0,autoHighlight:!0,disableClearable:!0,ChipProps:{onDelete:null},clearOnEscape:!0,getOptionSelected:Aa.a(r)},b),{},{renderInput:function(e){return Object(ze.jsx)(Ha,Object(s.a)(Object(s.a)({},e),{},{autoFocus:p,label:a,value:c,error:d,size:h,fullWidth:u,textAlign:m}))}}))},Ua=n(937),Ga=n(443),Xa=n.n(Ga),_a=n(442),Ka=n.n(_a);function Za(){return(Za=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Ya=a.createElement("desc",null,"Created with Sketch."),Ja=a.createElement("g",{id:"Symbols",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"icon/warning-icon/comet"},a.createElement("rect",{id:"Rectangle",stroke:"#5F668A",strokeWidth:2,x:1,y:1,width:22,height:22,rx:11}),a.createElement("path",{d:"M11.2971429,14.4857143 L11.1085714,5.82857143 L13.3714286,5.82857143 L13.2,14.4857143 L11.2971429,14.4857143 Z M11.1942857,18 L11.1942857,15.9771429 L13.3028571,15.9771429 L13.3028571,18 L11.1942857,18 Z",id:"!",fill:"#5F668A",fillRule:"nonzero"})));function er(e,t){var n=e.title,r=e.titleId,i=Qa(e,["title","titleId"]);return a.createElement("svg",Za({width:"24px",height:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,Ya,Ja)}var tr=a.forwardRef(er),nr=(n.p,Object(f.a)({root:{color:ee,"&$checked":{color:ee}},checked:{},checkBoxLabel:{display:"flex"},wrapper:{display:"flex",alignItems:"center","& > svg":{marginRight:10}},message:{display:"flex",alignItems:"center",color:se,margin:0,whiteSpace:"break-spaces"}})),ar=function(e){var t=e.name,n=e.onChange,a=e.value,r=e.settings,i=Object(q.a)(e,["name","onChange","value","settings"]),o=r.enabled,l=r.label,c=r.disabledMessage,d=r.rightSideLabel,u=nr();return Object(ze.jsx)(ze.Fragment,{children:o?Object(ze.jsxs)("div",{className:u.checkBoxLabel,children:[!d&&Object(ze.jsx)(at,{children:l}),Object(ze.jsx)(Ua.a,Object(s.a)({id:t,classes:{root:u.root,checked:u.checked},onChange:n,value:a,checked:a,icon:Object(ze.jsx)(Ka.a,{style:{marginLeft:2,fontSize:ve}}),checkedIcon:Object(ze.jsx)(Xa.a,{style:{fontSize:xe}}),disableRipple:!0},i)),d&&Object(ze.jsx)(at,{children:l})]}):Object(ze.jsxs)("div",{className:u.wrapper,children:[Object(ze.jsx)(tr,{}),Object(ze.jsx)(Ye,{className:u.message,children:c})]})})},rr=n(444),ir=n.n(rr),or={input:{width:"3.5rem !important",height:"5rem",border:"2px solid",borderColor:G,borderRadius:"4px"},focus:{border:"2px solid",borderColor:J,borderRadius:"4px","&:focus":{outline:"none"}},error:{borderColor:he},container:{justifyContent:"space-evenly"}},lr=Object(f.a)(or),cr=Object(f.a)(Ae),sr=function(e){var t=e.name,n=e.value,a=e.onChange,r=e.numInputs,i=e.error,o=e.inputStyle,l=e.containerStyle,c=Object(q.a)(e,["name","value","onChange","numInputs","error","inputStyle","containerStyle"]),d=lr(),u=cr();return Object(ze.jsx)(ir.a,Object(s.a)({id:t,value:n,onChange:a,numInputs:r,separator:Object(ze.jsx)("span",{children:" "}),containerStyle:I()(l,d.container),inputStyle:I()(o,d.input,u.confirmationCode),focusStyle:d.focus,errorStyle:d.error,hasErrored:i,isInputNum:!0},c))},dr=n(836),ur=n(957),mr=n(840),hr=n(931),pr=function(e){var t=e.label,n=e.name,a=e.options,r=e.onChange,i=e.value,o=e.className;return Object(ze.jsxs)(dr.a,{className:I()(o),children:[Object(ze.jsx)(ur.a,{children:t}),Object(ze.jsx)(hr.a,{autoWidth:!0,labelId:t,id:n,value:i,onChange:r,children:a.map((function(e,t){return Object(ze.jsx)(mr.a,{value:e.value,children:e.display},t)}))})]})},br=n(445),fr=Object(a.memo)((function(e){var t=e.name,n=e.onChange,a=e.onBlur,r=e.value,i=e.error,o=e.suffix,l=e.textAlign,c=e.width,d=e.size,u=e.bold,m=e.className,h=e.decimalPlaces,p=(e.InputProps,Object(q.a)(e,["name","onChange","onBlur","value","error","suffix","textAlign","width","size","bold","className","decimalPlaces","InputProps"]));return Object(ze.jsx)(br.a,Object(s.a)({name:t,onChange:n,onBlur:a,value:r,error:i,suffix:o,textAlign:l,width:c,size:d,bold:u,className:m,customInput:Ha,decimalScale:h,onValueChange:function(e){n({target:{id:t,value:e.floatValue}})}},p))})),jr=n(959),gr=n(841),Or=n(935),xr={label:{height:16,lineHeight:"16px",margin:[[0,0,4,0]],paddingLeft:3},subtitle:{marginTop:-8,marginLeft:32,color:se}},vr=Object(f.a)(xr),yr=function(e){var t=e.name,n=e.label,a=e.value,i=e.options,o=e.onChange,l=e.className,c=e.labelClassName,s=e.radioClassName,d=vr();return Object(ze.jsxs)(ze.Fragment,{children:[n&&Object(ze.jsx)(nt,{className:d.label,children:n}),Object(ze.jsx)(jr.a,{name:t,value:a,onChange:o,className:I()(l),children:i.map((function(e,t){return Object(ze.jsx)(r.a.Fragment,{children:Object(ze.jsxs)("div",{children:[Object(ze.jsx)(gr.a,{disabled:e.disabled,value:e.code,control:Object(ze.jsx)(Or.a,{className:s}),label:e.display,className:I()(c)}),e.subtitle&&Object(ze.jsx)(nt,{className:d.subtitle,children:e.subtitle})]})},t)}))})]})},wr=Object(a.memo)((function(e){var t=e.value,n=e.onFocus,r=e.isPasswordFilled,i=e.onBlur,o=Object(q.a)(e,["value","onFocus","isPasswordFilled","onBlur"]),c=Object(a.useState)(!1),d=Object(l.a)(c,2),u=d[0],m=d[1];return Object(ze.jsx)(Ha,Object(s.a)(Object(s.a)({},o),{},{type:"password",onFocus:function(e){m(!0),n&&n(e)},onBlur:function(e){m(!1),i&&i(e)},isPasswordFilled:r,value:t,InputProps:{value:t},InputLabelProps:{shrink:r||t||u},placeholder:r?"\u26ac \u26ac \u26ac This field is set \u26ac \u26ac \u26ac":""}))})),Cr=n(842),kr=Object(f.a)((function(e){return{root:{width:32,height:20,padding:0,margin:e.spacing(1)},switchBase:{padding:2,"&$disabled":{color:le,"& + $track":{backgroundColor:oe,opacity:1}},"&$checked":{transform:"translateX(58%)",color:e.palette.common.white,"&$disabled":{color:le},"& + $track":{backgroundColor:ee,opacity:1,border:"none"}},"&$focusVisible $thumb":{border:"6px solid #fff",boxShadow:"0 0 4px 0 rgba(0,0,0,0.24)"}},thumb:{width:16,height:16},track:{borderRadius:17,border:"none",backgroundColor:se,opacity:1,transition:e.transitions.create(["background-color","border"])},disabled:{},checked:{},focusVisible:{}}})),Er=Object(a.memo)((function(e){var t=Object.assign({},e),n=kr();return Object(ze.jsx)(Cr.a,Object(s.a)({focusVisibleClassName:n.focusVisible,disableRipple:!0,classes:{root:n.root,switchBase:n.switchBase,thumb:n.thumb,track:n.track,checked:n.checked,disabled:n.disabled}},t))})),Nr=n(973),Sr=n(843),Ir={noTextTransform:{textTransform:"none"},flex:{display:"flex",alignItems:"center",justifyContent:"start",width:"90%",overflow:"hidden",maxHeight:80},buttonTextContent:{marginLeft:32,textTransform:"none",textAlign:"left"},button:{backgroundColor:ae,marginBottom:16},paragraph:{color:$,marginTop:-10}},Fr=Object(f.a)(Ir),Lr=function(e){var t=e.name,n=e.orientation,a=void 0===n?"vertical":n,r=e.value,i=e.exclusive,o=void 0===i||i,l=e.onChange,c=e.size,s=void 0===c?"small":c,d=Object(q.a)(e,["name","orientation","value","exclusive","onChange","size"]),u=Fr();return Object(ze.jsx)(Nr.a,{size:s,name:t,orientation:a,value:r,exclusive:o,onChange:l,children:d.options.map((function(e){return Object(ze.jsx)(Sr.a,{className:u.button,value:e.value,"aria-label":e.value,children:Object(ze.jsxs)("div",{className:u.flex,children:[Object(ze.jsx)(e.icon,{}),Object(ze.jsxs)("div",{className:u.buttonTextContent,children:[Object(ze.jsx)(Xe,{children:e.title}),Object(ze.jsxs)(Ke,{className:u.paragraph,children:[" ",e.description]})]})]})},e.value)}))})},Pr=function(e){var t=e.options,n=e.onChange,r=Object(q.a)(e,["options","onChange"]),i=Object(a.useState)(!1),o=Object(l.a)(i,2),c=o[0],d=o[1],u=r.field,m=u.name,h=u.onBlur,p=u.value,b=r.form,f=b.touched,j=b.errors,g=b.setFieldValue,O=b.setFieldTouched,x=!(!f[m]||!j[m]),v=Object(un.f)(),y=v.initialValues,w=v.values,C="Function"===Fa.a(t)?t(y,w):t,k=function(e){return g(m,e)},E=!!r.shouldStayOpen;return Object(ze.jsx)(Va,Object(s.a)({name:m,onChange:function(e,t){if(n)return n(p,t,k);g(m,t)},onBlur:function(e){m&&O(m,!0),h&&h(e)},value:p,error:x,open:c,options:C,onOpen:function(){if(!r.multiple)return d(!0);d((null===p||void 0===p?void 0:p.length)!==r.limit)},onClose:function(e,t){d(!(!E||"blur"===t))}},r))},Dr=n(958),Rr=n(24),Tr=Object(a.memo)((function(e){var t=e.classes,n=Object(q.a)(e,["classes"]);return Object(ze.jsx)(Dr.a,Object(s.a)({size:"small",classes:t},n))})),Br=Object(Rr.a)((function(e){return{root:{backgroundColor:re,borderRadius:4,margin:e.spacing(.5,.25),height:18},label:{fontSize:Ce,color:ce,fontWeight:Se,fontFamily:Ie,paddingRight:4,paddingLeft:4}}}))(Tr),Ar=n(946),Mr=n(844),Wr=n(845),zr=n(103),qr=Ar.a(Mr.a(Number),Wr.a(zr.a(NaN))),$r=function(e){return qr(e)?e:null},Hr=function(e){return e.toLocaleString("en-US",{maximumFractionDigits:2})},Vr={cashOut:{empty:Q,full:J},cashIn:{empty:J,full:Q}},Ur=function(e){var t=e.cashOut,n=e.applyColorVariant,a=e.isLow;return Vr[t?"cashOut":"cashIn"][n||!a?"full":"empty"]},Gr={cashbox:{borderColor:Ur,backgroundColor:Ur,height:118,width:function(e){var t=e.width;return null!==t&&void 0!==t?t:80},border:"2px solid",textAlign:"end",display:"inline-block"},fiatBalanceAlertCashbox:{borderColor:Ur,backgroundColor:Ur,height:118,width:80,border:"4px solid"},emptyPart:{backgroundColor:"white",height:function(e){var t=e.percent;return"".concat(100-t,"%")},position:"relative","& > p":{color:Ur,display:"inline-block",position:"absolute",margin:0,bottom:0,right:0}},fullPart:{backgroundColor:Ur,"& > p":{color:"white",display:"inline"}}},Xr={row:{display:"flex"},innerRow:{display:"flex",justifyContent:"flex-start"},col2:{marginLeft:14},noMarginText:{marginTop:0,marginBottom:0},link:{marginTop:8},chip:{margin:[[0,0,0,7]]}},_r=Object(f.a)(Gr),Kr=Object(f.a)(Xr),Zr=function(e){var t,n=e.percent,a=void 0===n?0:n,r=e.cashOut,i=void 0!==r&&r,o=e.width,l=e.className,c=e.emptyPartClassName,s=e.labelClassName,d=e.applyColorVariant,u=e.applyFiatBalanceAlertsStyling,m=e.omitInnerPercentage,h=e.isLow,p=_r({percent:a,cashOut:i,width:o,applyColorVariant:d,isLow:h}),b=a<=51,f=(t={},Object(z.a)(t,p.fiatBalanceAlertCashbox,u),Object(z.a)(t,p.cashbox,!u),t);return Object(ze.jsxs)("div",{className:I()(l,f),children:[Object(ze.jsx)("div",{className:I()(c,p.emptyPart),children:!m&&b&&Object(ze.jsxs)(at,{className:s,children:[a.toFixed(0),"%"]})}),Object(ze.jsx)("div",{className:p.fullPart,children:!m&&!b&&Object(ze.jsxs)(at,{className:s,children:[a.toFixed(0),"%"]})})]})},Qr=function(e){var t=e.currency,n=e.notes,a=e.total,r=Kr();return Object(ze.jsx)(ze.Fragment,{children:Object(ze.jsx)("div",{className:r.row,children:Object(ze.jsxs)("div",{children:[Object(ze.jsx)("div",{className:r.innerRow,children:Object(ze.jsxs)(Qe,{className:r.noMarginText,children:[n," notes"]})}),Object(ze.jsx)("div",{className:r.innerRow,children:Object(ze.jsxs)(nt,{className:r.noMarginText,children:[a," ",t.code]})})]})})})},Yr=function(e){var t=e.capacity,n=void 0===t?500:t,a=e.denomination,r=void 0===a?0:a,i=e.currency,o=e.notes,l=e.className,c=e.editingMode,s=void 0!==c&&c,d=e.threshold,u=e.width,m=100*o/n,h=m=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var si=a.createElement("desc",null,"Created with Sketch."),di=a.createElement("g",{id:"icon/stage/zodiac/complete",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("circle",{id:"Oval",stroke:"#1B2559",transform:"translate(9.000000, 9.000000) rotate(-270.000000) translate(-9.000000, -9.000000) ",cx:9,cy:9,r:8}),a.createElement("path",{d:"M7.80983711,12 C7.54819546,12 7.28655382,11.9032616 7.08725647,11.710772 L5.29971255,9.98428824 C4.90009582,9.59832189 4.90009582,8.97445811 5.29971255,8.58849175 C5.69932929,8.2025254 6.34525711,8.2025254 6.74487384,8.58849175 L7.80983711,9.61707728 L11.2551262,6.28947477 C11.6547429,5.90350841 12.3016927,5.90350841 12.7002874,6.28947477 C13.0999042,6.674454 13.0999042,7.2993049 12.7002874,7.68527125 L8.53241776,11.710772 C8.33312041,11.9032616 8.07147876,12 7.80983711,12",id:"Path",fill:"#1B2559"}));function ui(e,t){var n=e.title,r=e.titleId,i=ci(e,["title","titleId"]);return a.createElement("svg",li({width:"18px",height:"18px",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,si,di)}var mi=a.forwardRef(ui);n.p;function hi(){return(hi=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var bi=a.createElement("desc",null,"Created with Sketch."),fi=a.createElement("g",{id:"icon/stage/zodiac/current",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("circle",{id:"Oval-2-Copy",fill:"#1B2559",cx:9,cy:9,r:4}),a.createElement("circle",{id:"Oval-Copy-5",stroke:"#1B2559",strokeWidth:2,transform:"translate(9.000000, 9.000000) rotate(-270.000000) translate(-9.000000, -9.000000) ",cx:9,cy:9,r:8}));function ji(e,t){var n=e.title,r=e.titleId,i=pi(e,["title","titleId"]);return a.createElement("svg",hi({width:"18px",height:"18px",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,bi,fi)}var gi,Oi=a.forwardRef(ji),xi=(n.p,Ae.tl2),vi=Ae.p,yi=G,wi={sidebar:Object(z.a)({display:"flex",backgroundColor:yi,width:520,marginLeft:-300,boxShadow:"-500px 0px 0px 0px ".concat(yi),borderRadius:"0 20px 0 0",alignItems:"flex-end",padding:24,flexDirection:"column"},(gi=1440,"@media only screen and (max-width: ".concat(gi,")")),{width:"auto",marginLeft:0,minWidth:250,boxShadow:"-200px 0px 0px 0px ".concat(yi)}),linkWrapper:{cursor:"pointer"},link:{extend:vi,position:"relative",color:me,margin:"12px 24px 12px 0",cursor:"pointer","&:hover::after":{height:"140%"},"&:after":{content:'""',display:"block",background:J,width:4,height:0,left:"100%",marginLeft:20,bottom:-2,position:"absolute",borderRadius:1e3,transition:"all 0.2s cubic-bezier(0.95, 0.1, 0.45, 0.94)"}},activeLink:{extend:xi,color:J,"&::after":{height:"140%"}},customRenderLink:{"&:hover::after":{height:"100%"},"&:after":{bottom:0}},customRenderActiveLink:{"&::after":{height:"100%"}},item:{position:"relative",margin:"12px 0 12px 0",display:"flex"},itemText:{extend:vi,color:me,marginRight:24},itemTextActive:{extend:xi,color:J},itemTextPast:{color:J},stepperPath:{position:"absolute",height:25,width:1,border:[[1,"solid",me]],right:8,top:18},stepperPast:{border:[[1,"solid",J]]}},Ci=Object(f.a)(wi),ki=function(e){var t=e.data,n=e.displayName,a=e.isSelected,r=e.onClick,i=e.children,o=e.itemRender,l=e.loading,c=void 0!==l&&l,s=Ci();return Object(ze.jsxs)("div",{className:s.sidebar,children:[c&&Object(ze.jsx)(Ke,{children:"Loading..."}),!c&&(null===t||void 0===t?void 0:t.map((function(e,t){var i;return Object(ze.jsx)("div",{className:s.linkWrapper,onClick:function(){return r(e)},children:Object(ze.jsx)("div",{className:I()((i={},Object(z.a)(i,s.activeLink,a(e)),Object(z.a)(i,s.customRenderActiveLink,o&&a(e)),Object(z.a)(i,s.customRenderLink,o),Object(z.a)(i,s.link,!0),i)),children:o?o(e,a(e)):n(e)},t)})}))),!c&&i]})},Ei=function(e){var t,n,a=e.step,r=e.it,i=e.idx,o=e.steps,l=Ci(),c=a===i,s=ia;return Object(ze.jsxs)("div",{className:l.item,children:[Object(ze.jsx)("span",{className:I()((t={},Object(z.a)(t,l.itemText,!0),Object(z.a)(t,l.itemTextActive,c),Object(z.a)(t,l.itemTextPast,s),t)),children:r.label}),c&&Object(ze.jsx)(Oi,{}),s&&Object(ze.jsx)(mi,{}),d&&Object(ze.jsx)(wt,{}),i=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Ii=a.createElement("g",{id:"icon/ID/photo/new/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("path",{d:"M12,14 C9.7912,14 8,12.2088 8,10 C8,7.7912 9.7912,6 12,6 C14.2088,6 16,7.7912 16,10 C16,12.2088 14.2088,14 12,14 Z M16.7142857,3.4 L14.3571429,1 L9.64285714,1 L7.28571429,3.4 L1,3.4 L1,17 L23,17 L23,3.4 L16.7142857,3.4 Z",id:"Stroke-1",stroke:"#1B2559",strokeWidth:1.6}));function Fi(e,t){var n=e.title,r=e.titleId,i=Si(e,["title","titleId"]);return a.createElement("svg",Ni({width:"24px",height:"18px",viewBox:"0 0 24 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"icon/ID/photo/new/zodiac"):n?a.createElement("title",{id:r},n):null,Ii)}var Li=a.forwardRef(Fi);n.p;function Pi(){return(Pi=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Ri=a.createElement("style",{type:"text/css"},"\n\t.st0{fill-rule:evenodd;clip-rule:evenodd;fill:#1B2559;}\n"),Ti=a.createElement("desc",null,"Created with Sketch."),Bi=a.createElement("g",{id:"color_x2F_primary_x2F_zodiac",transform:"translate(-0.000000, 0.000000)"},a.createElement("g",{id:"Mask"},a.createElement("path",{id:"path-1_1_",className:"st0",d:"M11.1,9l6.5,6.5c0.6,0.6,0.6,1.5,0,2.1c-0.3,0.3-0.7,0.4-1.1,0.4c-0.4,0-0.8-0.2-1.1-0.4 L9,11.1l-6.5,6.5C2.3,17.8,1.9,18,1.5,18c-0.4,0-0.8-0.2-1.1-0.4c-0.6-0.6-0.6-1.5,0-2.1L6.9,9L0.4,2.5C-0.1,2-0.1,1,0.4,0.4 C1-0.1,2-0.1,2.5,0.4L9,6.9l6.5-6.5c0.6-0.6,1.5-0.6,2.1,0c0.6,0.6,0.6,1.5,0,2.1L11.1,9z"})));function Ai(e,t){var n=e.title,r=e.titleId,i=Di(e,["title","titleId"]);return a.createElement("svg",Pi({id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 18 18",style:{enableBackground:"new 0 0 18 18"},xmlSpace:"preserve",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,Ri,Ti,Bi)}var Mi=a.forwardRef(Ai);n.p;function Wi(){return(Wi=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var qi=a.createElement("desc",null,"Created with Sketch."),$i=a.createElement("g",{id:"icon/stage/spring/complete",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("circle",{id:"Oval",stroke:"#48F694",strokeWidth:2,transform:"translate(9.000000, 9.000000) rotate(-270.000000) translate(-9.000000, -9.000000) ",cx:9,cy:9,r:8}),a.createElement("path",{d:"M7.80983711,12 C7.54819546,12 7.28655382,11.9032616 7.08725647,11.710772 L5.29971255,9.98428824 C4.90009582,9.59832189 4.90009582,8.97445811 5.29971255,8.58849175 C5.69932929,8.2025254 6.34525711,8.2025254 6.74487384,8.58849175 L7.80983711,9.61707728 L11.2551262,6.28947477 C11.6547429,5.90350841 12.3016927,5.90350841 12.7002874,6.28947477 C13.0999042,6.674454 13.0999042,7.2993049 12.7002874,7.68527125 L8.53241776,11.710772 C8.33312041,11.9032616 8.07147876,12 7.80983711,12",id:"Path",fill:"#48F694"}));function Hi(e,t){var n=e.title,r=e.titleId,i=zi(e,["title","titleId"]);return a.createElement("svg",Wi({width:"18px",height:"18px",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,qi,$i)}var Vi,Ui,Gi=a.forwardRef(Hi),Xi=(n.p,"100%"),_i="column",Ki={dialog:{backgroundColor:ae,width:Xi,minHeight:Xi,display:"flex",flexDirection:_i,padding:0},wrapper:{width:be,height:Xi,margin:"0 auto",flex:1,display:"flex",flexDirection:_i},contentDiv:{display:"flex",flex:1,flexDirection:"row"},headerDiv:{display:"flex",justifyContent:"space-between",alignItems:"center"},contentWrapper:{marginLeft:48},button:{marginTop:64},nameTitle:{marginTop:16,marginBottom:25},qrTitle:{marginTop:12,marginBottom:40},qrCodeWrapper:{display:"flex"},qrTextInfoWrapper:{display:"flex",flexDirection:"row"},qrTextWrapper:{width:381,marginLeft:80,display:"flex",flexDirection:"column"},textWrapper:{display:"flex",flexDirection:"column"},qrTextIcon:{marginRight:16},qrText:{marginTop:0},item:{position:"relative",margin:"12px 0 12px 0",display:"flex"},itemText:{extend:Ae.p,color:me,marginRight:24},itemTextActive:{extend:Ae.tl2,color:J},itemTextPast:{color:J},stepperPath:{position:"absolute",height:25,width:1,border:[[1,"solid",me]],right:8,top:18},stepperPast:{border:[[1,"solid",J]]},successMessageWrapper:{backgroundColor:V,display:"flex",flexDirection:"row",padding:"0px 10px",borderRadius:"8px"},successMessage:{color:H,margin:"8px 0px"},successMessageIcon:{marginRight:16,marginBottom:2,display:"flex",flexDirection:"col",alignItems:"center"},errorMessage:{color:he},qrCodeImageWrapper:{display:"flex",flexDirection:"column",backgroundColor:"white",border:"5px solid ".concat(J),padding:5,borderRadius:15},qrCodeScanMessage:{display:"flex",flexDirection:"row",alignItems:"center",margin:[[0,0,20,20]],"& > p":{marginLeft:10}}},Zi=x()(Vi||(Vi=Object(c.a)(["\n mutation createPairingTotem($name: String!) {\n createPairingTotem(name: $name)\n }\n"]))),Qi=x()(Ui||(Ui=Object(c.a)(["\n {\n machines {\n name\n deviceId\n }\n }\n"]))),Yi=Object(f.a)(Ki),Ji=L.a(pn.a,bn.a([],["machines"])),eo={name:""},to=fn.f().shape({name:fn.h().required("Machine name is required.").max(50).test("unique-name","Machine name is already in use.",(function(e,t){return!t.options.context.machineNames.includes(e)}))}),no=[{label:"Machine name",component:function(e){var t=e.nextStep,n=e.classes,a=e.setQrCode,r=e.setName,i=Object(u.b)(Zi,{onCompleted:function(e){var n=e.createPairingTotem;a(n),t()},onError:function(e){return console.log(e)}}),o=Object(l.a)(i,1)[0],c=Object(u.c)(Qi).data,s=R.a(T.a("name"),(null===c||void 0===c?void 0:c.machines)||{});return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Qe,{className:n.nameTitle,children:"Machine Name (ex: Coffee shop 01)"}),Object(ze.jsx)(un.e,{validateOnBlur:!1,validateOnChange:!1,initialValues:eo,validate:function(e){try{to.validateSync(e,{context:{machineNames:s}})}catch(t){return t}},onSubmit:function(e){var t=e.name;r(t),o({variables:{name:t}})},children:function(e){var t=e.errors;return Object(ze.jsxs)(un.d,{className:n.form,children:[Object(ze.jsx)("div",{children:Object(ze.jsx)(un.a,{name:"name",label:"Enter machine name",component:oi})}),t&&Object(ze.jsx)(Ke,{className:n.errorMessage,children:t.message}),Object(ze.jsx)("div",{className:n.button,children:Object(ze.jsx)(Dn,{type:"submit",children:"Submit"})})]})}})]})}},{label:"Scan QR code",component:function(e){var t,n=e.classes,r=e.qrCode,i=e.name,o=e.count,l=e.onPaired,c=Object(a.useRef)(null),s=Object(u.c)(Qi,{pollInterval:1e4}).data;Object(a.useEffect)((function(){return function(){c.current&&clearTimeout(c.current)}}),[]);var d=null===s||void 0===s||null===(t=s.machines)||void 0===t?void 0:t.find((function(e){return e.name===i})),m=Ji(s)>o&&d;return m&&(c.current=setTimeout((function(){return l(d)}),2e3)),Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Qe,{className:n.qrTitle,children:"Scan QR code with your new cryptomat"}),Object(ze.jsxs)("div",{className:n.qrCodeWrapper,children:[Object(ze.jsxs)("div",{className:n.qrCodeImageWrapper,children:[Object(ze.jsx)(hn.a,{size:280,fgColor:J,includeMargin:!0,value:r,className:n.qrCodeBorder}),Object(ze.jsxs)("div",{className:n.qrCodeScanMessage,children:[Object(ze.jsx)(Li,{}),Object(ze.jsx)(Ke,{noMargin:!0,children:"Snap a picture and scan"})]})]}),Object(ze.jsxs)("div",{className:n.qrTextWrapper,children:[Object(ze.jsxs)("div",{className:n.qrTextInfoWrapper,children:[Object(ze.jsx)("div",{className:n.qrTextIcon,children:Object(ze.jsx)(tr,{})}),Object(ze.jsx)("div",{className:n.textWrapper,children:Object(ze.jsx)(Ke,{className:n.qrText,children:"To pair the machine you need scan the QR code with your machine. To do this either snap a picture of this QR code or download it through the button above and scan it with the scanning bay on your machine."})})]}),m&&Object(ze.jsxs)("div",{className:n.successMessageWrapper,children:[Object(ze.jsx)("div",{className:n.successMessageIcon,children:Object(ze.jsx)(Gi,{})}),Object(ze.jsx)(Qe,{className:n.successMessage,children:"Machine has been successfully paired!"})]})]})]})]})}}],ao=Object(a.memo)((function(e){var t=e.close,n=e.onPaired,r=Yi(),i=Object(u.c)(Qi).data,o=Object(a.useState)(""),c=Object(l.a)(o,2),s=c[0],d=c[1],m=Object(a.useState)(""),h=Object(l.a)(m,2),p=h[0],b=h[1],f=Object(a.useState)(0),j=Object(l.a)(f,2),g=j[0],O=j[1],x=Ji(i),v=no[g].component;return Object(ze.jsx)("div",{children:Object(ze.jsx)(ln.a,{fullScreen:!0,className:r.dialog,open:!0,"aria-labelledby":"form-dialog-title",children:Object(ze.jsx)(cn.a,{className:r.dialog,children:Object(ze.jsxs)("div",{className:r.wrapper,children:[Object(ze.jsxs)("div",{className:r.headerDiv,children:[Object(ze.jsx)(gn,{children:"Add Machine"}),Object(ze.jsx)(sn.a,{disableRipple:!0,onClick:t,children:Object(ze.jsx)(dn.a,{color:"error",children:Object(ze.jsx)(Mi,{})})})]}),Object(ze.jsxs)("div",{className:r.contentDiv,children:[Object(ze.jsx)(ki,{children:no.map((function(e,t){return function(e,t,n,a){var r,i,o=e===n,l=ne;return Object(ze.jsxs)("div",{className:a.item,children:[Object(ze.jsx)("span",{className:I()((r={},Object(z.a)(r,a.itemText,!0),Object(z.a)(r,a.itemTextActive,o),Object(z.a)(r,a.itemTextPast,l),r)),children:t.label}),o&&Object(ze.jsx)(Oi,{}),l&&Object(ze.jsx)(mi,{}),c&&Object(ze.jsx)(wt,{}),n=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var oo=a.createElement("desc",null,"Created with Sketch."),lo=a.createElement("g",{id:"icon/button/add/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("path",{d:"M11.5384615,6 C11.5384615,9.05815385 9.05815385,11.5384615 6,11.5384615 C2.94184615,11.5384615 0.461538462,9.05815385 0.461538462,6 C0.461538462,2.94184615 2.94184615,0.461538462 6,0.461538462 C9.05815385,0.461538462 11.5384615,2.94184615 11.5384615,6 Z",id:"Stroke-1",stroke:"#FFFFFF"}),a.createElement("line",{x1:6,y1:3.69230769,x2:6,y2:8.30769231,id:"Stroke-3",stroke:"#FFFFFF"}),a.createElement("line",{x1:3.69230769,y1:6,x2:8.30769231,y2:6,id:"Stroke-5",stroke:"#FFFFFF"}));function co(e,t){var n=e.title,r=e.titleId,i=io(e,["title","titleId"]);return a.createElement("svg",ro({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,oo,lo)}var so=a.forwardRef(co);n.p;function uo(){return(uo=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var ho=a.createElement("desc",null,"Created with Sketch."),po=a.createElement("defs",null,a.createElement("path",{d:"M17.8413132,12.8764646 C17.8413132,12.8764646 16.6555879,12.5091919 15.661533,12.2855556 C15.661533,12.2855556 15.3477198,10.3246465 14.8939121,8.23646465 C14.8939121,8.23646465 15.1560495,8.21373737 15.3383242,8.8710101 L16.0223242,12.0219192 C16.0223242,12.0219192 17.2343571,12.2991919 18.1795549,12.6537374 L17.8413132,12.8764646 Z M15.2603407,6.10282828 L15.5328132,5.80555556 C16.0627253,5.87828283 16.3483516,6.02828283 16.3483516,6.02828283 L16.291978,6.11191919 L16.3972088,6.9310101 C16.2440604,6.93646465 16.0091703,7.05919192 16.0091703,7.05919192 L15.8315934,6.95010101 L15.8315934,6.38282828 C15.3026209,6.29919192 15.2556429,6.21828283 15.2556429,6.21828283 L15.2603407,6.10282828 Z M12.4557527,18.2873737 C11.2831813,18.4964646 9.84565385,18.2237374 9.84565385,18.2237374 L9.89732967,17.9991919 C9.89732967,17.9991919 11.6496099,18.1955556 12.6248736,17.8973737 C12.5553462,18.0628283 12.5356154,18.1137374 12.4557527,18.2873737 L12.4557527,18.2873737 Z M9.18984066,14.5464646 C8.379,15.1364646 7.56064286,15.6791919 7.00442308,16.1091919 C6.9705989,16.6955556 6.91516484,17.6464646 6.91516484,17.6464646 L5.46448352,18.5182828 L5.22207692,18.3737374 C5.27845055,17.9219192 5.34891758,17.5882828 5.34891758,17.5882828 L5.55186264,17.4410101 C5.50676374,17.7282828 5.48515385,18.1346465 5.48515385,18.1346465 L6.5928956,17.440101 C6.63705495,16.7019192 6.72443407,15.960101 6.72443407,15.960101 C6.9705989,15.7373737 8.73697253,14.5237374 10.0100803,13.6864646 C10.0100803,13.6864646 10.018533,13.9437374 9.18984066,14.5464646 L9.18984066,14.5464646 Z M14.977533,0.195555556 C15.2612802,0.167373737 15.5065055,0.184646465 15.7103901,0.228282828 L15.7103901,0.228282828 L15.8813901,0.697373737 L16.1003077,0.361919192 C16.2694286,0.447373737 16.3746593,0.547373737 16.4056648,0.624646465 C16.4056648,0.624646465 16.3615055,0.909191919 16.4319725,1.36464646 C16.5005604,1.80373737 16.6988077,2.78191919 16.6988077,2.78191919 C16.9740989,3.00646465 17.2850934,3.51282828 17.2850934,3.51282828 C17.4758242,4.41737374 17.4645495,5.04919192 17.4636099,5.1210101 C16.6734396,4.68646465 15.6173736,4.58555556 15.6173736,4.58555556 L15.6173736,4.58555556 L15.2481264,4.90828283 C15.9753462,5.00828283 16.8792033,5.26555556 17.1122143,5.44555556 C17.2484505,5.74737374 17.3386484,6.22828283 17.3386484,6.22828283 L17.3386484,6.22828283 L17.0445659,6.58919192 L17.3198571,6.8810101 C17.3386484,7.22464646 17.2183846,7.56919192 17.2183846,7.56919192 C17.7905769,7.93010101 17.9512418,8.79373737 18.3101538,10.250101 C18.6700055,11.7064646 18.9903956,12.9055556 18.9903956,12.9055556 L18.9903956,12.9055556 L18.4567253,13.2019192 C19.1623352,15.7282828 18.444511,17.7391919 17.5378352,19.0664646 C16.6320989,20.3946465 16.0862143,21.7137374 16.1031264,22.8910101 L16.1031264,22.8910101 L16.5475385,23.2346465 L16.7749121,23.9491919 L14.3048077,23.9491919 L14.293533,23.2728283 C14.2925934,21.5619192 14.9230385,20.1328283 14.9230385,20.1328283 C15.2857088,20.0473737 15.6596538,19.7628283 15.6596538,19.7628283 C15.0733681,19.8828283 14.3414505,19.7964646 14.3414505,19.7964646 C14.8676044,18.8537374 15.0292088,18.1773737 15.0292088,18.1773737 L15.0292088,18.1773737 L14.7811648,18.1228283 C14.6956648,18.310101 14.6073462,18.4937374 14.5133901,18.6710101 C13.8754286,19.8864646 13.1735769,20.6628283 12.7554725,22.4055556 L12.7554725,22.4055556 L13.1933077,22.7455556 L13.6987912,23.9491919 L10.8509835,23.9491919 C10.8340714,21.8246465 11.495522,20.2273737 11.7341703,19.7628283 C10.2233571,19.9264646 8.42128022,19.1782828 6.99314835,19.4664646 C6.60041209,21.9473737 4.59257143,22.4355556 3.65019231,22.300101 L3.65019231,22.300101 L2.97652747,23.4146465 L3.58724176,23.9491919 L1.33135714,23.9491919 C1.32008242,23.8546465 1.2918956,23.7537374 1.22988462,23.6591919 C1.22988462,23.6591919 1.97401648,22.5882828 2.48231868,21.150101 C2.89008791,21.3255556 3.75166484,20.9928283 3.78736813,20.1055556 C3.82401099,19.2191919 3.67086264,17.8419192 4.46854945,16.7891919 C5.2652967,15.7355556 6.12687363,15.1655556 7.25152747,14.3328283 C7.98250549,13.7910101 9.22084615,12.8755556 9.99974176,12.3010101 L9.99974176,12.3010101 L9.61546154,12.3864646 L6.81087363,14.6491919 L5.82997253,14.6491919 L8.66368681,12.1164646 L8.29725824,12.1091919 L5.33576374,14.6491919 L4.34170879,14.6491919 L7.27313736,11.720101 L6.9208022,11.7173737 L3.88038462,14.6491919 L2.86565934,14.6491919 L5.8093022,11.3037374 L5.46918132,11.3055556 L2.43534066,14.6491919 L1.36706044,14.6491919 L4.22614286,10.8528283 L3.89635714,10.8573737 L0.963989011,14.6491919 L0,14.6491919 C0,14.6491919 4.11809341,8.22464646 4.92893407,7.00737374 C5.73883516,5.79010101 6.6192033,4.62282828 8.06894505,4.38464646 C9.53465934,4.14282828 10.5343516,4.46646465 11.2502967,5.63373737 C11.636456,6.2610101 12.1034176,6.97828283 12.4698462,7.55919192 C12.0968407,8.1510101 11.6298791,8.6110101 11.5857198,9.32282828 C11.534044,10.1419192 12.0921429,10.6373737 12.6558791,10.6773737 C12.2321374,10.5282828 11.8976538,10.0337374 12.0489231,9.37646465 C12.2058297,8.69737374 12.7554725,8.35191919 13.1726374,7.80282828 C13.5315495,7.32828283 13.5371868,6.63282828 13.5108791,6.4010101 C13.4836319,6.16919192 13.2167967,5.98828283 13.2167967,5.98828283 C13.2167967,5.98828283 13.2252527,5.52373737 13.2167967,5.01646465 C13.2083407,4.51010101 13.4300769,4.21828283 13.4300769,4.21828283 C13.4300769,4.21828283 13.4216209,3.4610101 13.3943736,2.57646465 C13.3671264,1.72555556 13.2863242,1.46828283 13.205522,1.35464646 C13.205522,1.35464646 13.2694121,1.10919192 13.5099396,0.844646465 L13.5099396,0.844646465 L13.7542253,1.06282828 L13.8284505,0.571919192 C13.9825385,0.469191919 14.1723297,0.375555556 14.4072198,0.307373737 C14.4325879,0.30010101 14.4570165,0.294646465 14.4823846,0.288282828 L14.4823846,0.288282828 L14.7896209,0.644646465 Z M7.71628243,19.8937938 C8.32897736,19.8402566 9.02386307,19.9393405 9.75797621,20.0432188 L9.75797621,20.0432188 L9.86538462,20.058401 C9.7449004,20.8103202 9.02106112,21.7691969 7.79193531,22.0896215 L7.79193531,22.0896215 L9.01358923,23.5151515 L7.36136769,23.5151515 C7.15589073,23.2226941 6.50396838,22.32135 6.16586538,21.9681638 C6.72065317,21.6525335 7.42954868,21.0388524 7.71628243,19.8937938 Z",id:"path-1"})),bo=a.createElement("g",{id:"Symbols",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"nav-/-primary-/-1440",transform:"translate(-128.000000, -14.000000)"},a.createElement("g",{id:"icon/lamassu-logo",transform:"translate(128.000000, 14.000000)"},a.createElement("g",{id:"color/amaz/default"},a.createElement("mask",{id:"mask-2",fill:"white"},a.createElement("use",{xlinkHref:"#path-1"})),a.createElement("use",{id:"Mask",fill:"#16D6D3",xlinkHref:"#path-1"})))));function fo(e,t){var n=e.title,r=e.titleId,i=mo(e,["title","titleId"]);return a.createElement("svg",uo({width:"19px",height:"24px",viewBox:"0 0 19 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,ho,po,bo)}var jo=a.forwardRef(fo);n.p;function go(){return(go=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var xo=a.createElement("desc",null,"Created with Sketch."),vo=a.createElement("g",{id:"Symbols",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"nav-/-primary-/-1440",transform:"translate(-1295.000000, -19.000000)",stroke:"#FFFFFF",strokeWidth:2},a.createElement("g",{id:"icon/menu/notification",transform:"translate(1296.000000, 20.000000)"},a.createElement("path",{d:"M10.1052632,14.3157895 C10.1052632,15.2454737 9.35073684,16 8.42105263,16 C7.49136842,16 6.73684211,15.2454737 6.73684211,14.3157895",id:"Stroke-1"}),a.createElement("path",{d:"M1.6,14.3157895 C0.7168,14.3157895 0,13.6031813 0,12.7251462 C0,11.8471111 0.7168,11.1345029 1.6,11.1345029 L1.6,6.3625731 C1.6,2.84884211 4.4656,0 8,0 C11.5344,0 14.4,2.84884211 14.4,6.3625731 L14.4,11.1345029 C15.2832,11.1345029 16,11.8471111 16,12.7251462 C16,13.6031813 15.2832,14.3157895 14.4,14.3157895 L1.6,14.3157895 Z",id:"Stroke-3",strokeLinejoin:"round"}))));function yo(e,t){var n=e.title,r=e.titleId,i=Oo(e,["title","titleId"]);return a.createElement("svg",go({width:"18px",height:"18px",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,xo,vo)}var wo=a.forwardRef(yo),Co=(n.p,Ae.p),ko=56,Eo=40;var No,So,Io,Fo,Lo,Po,Do,Ro,To,Bo,Ao,Mo,Wo,zo,qo,$o,Ho,Vo,Uo,Go={headerContainer:{position:"relative"},header:{backgroundColor:J,color:Z,height:ko,display:"flex"},content:{maxWidth:be,flex:1,display:"flex",alignItems:"center",margin:"0 auto"},nav:{flex:1,display:"flex",alignItems:"center",justifyContent:"space-between"},ul:{display:"flex",paddingLeft:36,height:56,margin:0},li:{listStyle:"none",color:Z,margin:[[20,20,0,20]],"&:hover":{color:Z},"&:hover::after":{width:"50%",marginLeft:"-25%"},position:"relative","&:after":{content:'""',display:"block",background:Z,width:0,height:4,left:"50%",marginLeft:0,bottom:-8,position:"absolute",borderRadius:1e3,transition:[["all","0.2s","cubic-bezier(0.95, 0.1, 0.45, 0.94)"]]}},link:{extend:Co,textDecoration:"none",border:"none",color:Z,backgroundColor:"transparent"},forceSize:{display:"inline-block",textAlign:"center","&:after":{display:"block",content:"attr(forcesize)",fontWeight:700,height:0,overflow:"hidden",visibility:"hidden"}},activeLink:{color:Z,"& li::after":{width:"50%",marginLeft:"-25%"}},addMachine:{marginLeft:"auto"},subheader:{backgroundColor:re,color:Z,height:Eo,display:"flex"},subheaderUl:{display:"flex",paddingLeft:0,margin:0},subheaderLi:{listStyle:"none",padding:[[0,20]],"&:first-child":{paddingLeft:0}},subheaderLink:{extend:Co,textDecoration:"none",border:"none",color:me},activeSubheaderLink:{textShadow:"0.2px 0 0 currentColor",color:ce},white:{color:Z},logo:{display:"flex",alignItems:"center","& > svg":{marginRight:16}},logoLink:{cursor:"pointer"},actionButtonsContainer:{zIndex:1,position:"relative",display:"flex",justifyContent:"space-between",minWidth:200,transform:"translateZ(0)"},notificationIcon:{marginTop:4,cursor:"pointer",background:"transparent",boxShadow:"0px 0px 0px transparent",border:"0px solid transparent",textShadow:"0px 0px 0px transparent",outline:"none"},hasUnread:{position:"absolute",top:4,left:186,width:"9px",height:"9px",backgroundColor:ee,borderRadius:"50%"},popper:{zIndex:1}},Xo=Object(f.a)(Go),_o=x()(No||(No=Object(c.a)(["\n query getUnread {\n hasUnreadNotifications\n }\n"]))),Ko=function(e){var t=e.item,n=e.classes,r=e.user,i=Object(a.useState)(null),o=Object(l.a)(i,2),c=o[0],s=o[1];return Object(ze.jsx)("div",{className:n.subheader,children:Object(ze.jsx)("div",{className:n.content,children:Object(ze.jsx)("nav",{children:Object(ze.jsx)("ul",{className:n.subheaderUl,children:t.children.map((function(e,t){return F.a(r.role,e.allowedRoles)?Object(ze.jsx)("li",{className:n.subheaderLi,children:Object(ze.jsx)(C.c,{to:{pathname:e.route,state:{prev:c}},className:n.subheaderLink,activeClassName:n.activeSubheaderLink,isActive:function(t){return!!t&&(s(e.route),!0)},children:e.label})},t):Object(ze.jsx)(ze.Fragment,{})}))})})})})},Zo=L.a(P.a,D.a),Qo=Object(a.memo)((function(e){var t=e.tree,n=e.user,r=Object(a.useState)(!1),i=Object(l.a)(r,2),o=i[0],c=i[1],s=Object(a.useState)(null),d=Object(l.a)(s,2),m=d[0],h=d[1],p=Object(a.useState)({x:0,y:0}),b=Object(l.a)(p,2),f=b[0],j=b[1],g=Object(a.useState)(),O=Object(l.a)(g,2),x=O[0],v=O[1],y=Object(a.useState)(!1),k=Object(l.a)(y,2),S=k[0],L=k[1],P=Object(u.c)(_o),D=P.data,R=P.refetch,T=P.startPolling,B=P.stopPolling,A=Object(a.useRef)(),M=Object(a.useRef)(),W=Object(w.h)(),z=Xo();Object(a.useEffect)((function(){return(null===D||void 0===D?void 0:D.hasUnreadNotifications)?L(!0):Zo(null===D||void 0===D?void 0:D.hasUnreadNotifications)?L(!1):void 0}),[D]),Object(a.useEffect)((function(){return T(6e4),B}));var q=function(){h(null),document.querySelector("#root").classList.remove("root-notifcenter-open"),document.querySelector("body").classList.remove("body-notifcenter-open")},$=Boolean(m),H=$?"notifications-popper":void 0;return Object(ze.jsxs)("header",{className:z.headerContainer,children:[Object(ze.jsx)("div",{className:z.header,children:Object(ze.jsxs)("div",{className:z.content,children:[Object(ze.jsxs)("div",{onClick:function(){v(!1),W.push("/dashboard")},className:I()(z.logo,z.logoLink),children:[Object(ze.jsx)(jo,{}),Object(ze.jsx)(Xe,{className:z.white,children:"Lamassu Admin"})]}),Object(ze.jsx)("nav",{className:z.nav,children:Object(ze.jsx)("ul",{className:z.ul,children:t.map((function(e,t){return F.a(n.role,e.allowedRoles)?Object(ze.jsx)(C.c,{to:e.route||e.children[0].route,isActive:function(t){return!!t&&(v(e),!0)},className:I()(z.link,z.whiteLink),activeClassName:z.activeLink,children:Object(ze.jsx)("li",{className:z.li,children:Object(ze.jsx)("span",{className:z.forceSize,forcesize:e.label,children:e.label})})},t):Object(ze.jsx)(ze.Fragment,{})}))})}),Object(ze.jsxs)("div",{className:z.actionButtonsContainer,children:[Object(ze.jsx)($e,{color:"secondary",Icon:Cn,InverseIcon:so,onClick:function(){return c(!0)},children:"Add machine"}),Object(ze.jsx)(E.a,{onClickAway:q,children:Object(ze.jsxs)("div",{ref:A,children:[Object(ze.jsxs)("button",{onClick:function(e){var t=A.current.getBoundingClientRect();j({x:t.x,y:t.y+5}),h(m?null:e.currentTarget),document.querySelector("#root").classList.add("root-notifcenter-open"),document.querySelector("body").classList.add("body-notifcenter-open")},className:z.notificationIcon,children:[Object(ze.jsx)(wo,{}),S&&Object(ze.jsx)("div",{className:z.hasUnread})]}),Object(ze.jsx)(N.a,{ref:M,id:H,open:$,anchorEl:m,className:z.popper,disablePortal:!1,placement:"bottom-end",modifiers:{offset:{enabled:!0,offset:"100vw"},preventOverflow:{enabled:!0,boundariesElement:"viewport",padding:0}},children:Object(ze.jsx)(on,{popperRef:M,buttonCoords:f,close:q,hasUnreadProp:S,refetchHasUnreadHeader:R})})]})})]})]})}),x&&x.children&&Object(ze.jsx)(Ko,{item:x,classes:z,user:n}),o&&Object(ze.jsx)(ao,{close:function(){return c(!1)},onPaired:function(e){c(!1),W.push("/maintenance/machine-status",{id:e.deviceId})}})]})})),Yo=n(930),Jo={wrapper:{display:"flex",alignItems:"center","& > svg":{marginRight:10}},message:{display:"flex",alignItems:"center",color:he,margin:0,whiteSpace:"break-spaces"}},el=Object(f.a)(Jo),tl=function(e){var t=e.className,n=e.children,a=(Object(q.a)(e,["className","children"]),el());return Object(ze.jsxs)("div",{className:I()(a.wrapper,t),children:[Object(ze.jsx)(Qt,{}),Object(ze.jsx)(Ye,{className:a.message,children:n})]})},nl={titleWrapper:{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row"},titleAndButtonsContainer:{display:"flex",alignItems:"center"},error:{marginLeft:12},subpageButton:{marginLeft:12},buttonText:{color:ae,fontFamily:"Mont",fontSize:15},icon:{marginRight:6},label:{marginRight:24}},al=Object(f.a)(nl),rl=function(e){var t=e.className,n=e.title,a=e.error,r=e.labels,i=e.buttons,o=void 0===i?[]:i,l=e.children,c=e.appendix,s=e.appendixRight,d=al();return Object(ze.jsxs)("div",{className:I()(d.titleWrapper,t),children:[Object(ze.jsxs)("div",{className:d.titleAndButtonsContainer,children:[Object(ze.jsx)(gn,{children:n}),!!c&&c,a&&Object(ze.jsx)(tl,{className:d.error,children:"Failed to save"}),o.length>0&&Object(ze.jsx)(ze.Fragment,{children:o.map((function(e,t){return Object(ze.jsx)(ba,{className:d.subpageButton,Icon:e.icon,InverseIcon:e.inverseIcon,toggle:e.toggle,forceDisable:e.forceDisable,children:Object(ze.jsx)(Ze,{className:d.buttonText,children:e.text})},t)}))})]}),Object(ze.jsxs)(Yo.a,{display:"flex",flexDirection:"row",alignItems:"center",children:[(null!==r&&void 0!==r?r:[]).map((function(e,t){var n=e.icon,a=e.label;return Object(ze.jsxs)(Yo.a,{display:"flex",alignItems:"center",children:[Object(ze.jsx)("div",{className:d.icon,children:n}),Object(ze.jsx)(nt,{className:d.label,children:a})]},t)})),s]}),l]})},il=n(256),ol=n(927),ll=n(948),cl=n(891),sl=n(896),dl=n(950),ul=n(939),ml=n(940),hl=n(894),pl=n(947),bl=n(124),fl=n.n(bl),jl={title:{paddingTop:8},input:{marginBottom:25,marginTop:-15},wrapper:{padding:"2.5em 4em",width:575,display:"flex",flexDirection:"column"},titleWrapper:{display:"flex",flexDirection:"row",alignItems:"center",marginBottom:30},rememberMeWrapper:{marginTop:35,display:"flex",flexDirection:"row"},icon:{transform:"scale(1.5)",marginRight:25},checkbox:{transform:"scale(1.5)",marginRight:5,marginLeft:-5},footer:{marginTop:"10vh"},twofaFooter:{marginTop:"6vh"},fidoLoginButtonWrapper:{marginBottom:12},loginButton:{display:"block",width:"100%"},welcomeBackground:{background:"url(/wizard-background.svg) no-repeat center center fixed",backgroundColor:ae,backgroundSize:"cover",height:"100vh",width:"100vw",position:"relative",left:"50%",right:"50%",marginLeft:"-50vw",marginRight:"-50vw",minHeight:"100vh"},info:{marginBottom:"5vh"},info2:{textAlign:"justify"},infoWrapper:{marginBottom:"3vh"},errorMessage:{color:he},qrCodeWrapper:{display:"flex",justifyContent:"center",marginBottom:"3vh"},secretWrapper:{display:"flex",justifyContent:"center",alignItems:"center"},secretLabel:{marginRight:15},secret:{marginRight:35},hiddenSecret:{marginRight:35,filter:"blur(8px)"},confirm2FAInput:{marginTop:25},confirmPassword:{marginTop:25},error:{color:he},enterButton:{display:"none"}},gl="LOGIN",Ol="SETUP2FA",xl="INPUT2FA",vl="FIDO",yl=Object(f.a)(jl),wl=x()(So||(So=Object(c.a)(["\n mutation input2FA(\n $username: String!\n $password: String!\n $code: String!\n $rememberMe: Boolean!\n ) {\n input2FA(\n username: $username\n password: $password\n code: $code\n rememberMe: $rememberMe\n )\n }\n"]))),Cl=x()(Io||(Io=Object(c.a)(["\n {\n userData {\n id\n username\n role\n }\n }\n"]))),kl=function(e){var t=e.state,n=e.dispatch,r=yl(),i=Object(w.h)(),o=Object(a.useContext)(k).setUserData,c=Object(a.useState)(!1),s=Object(l.a)(c,2),d=s[0],m=s[1],h=Object(u.a)(Cl,{onCompleted:function(e){var t=e.userData;o(t),i.push("/")}}),p=Object(l.a)(h,2),b=p[0],f=p[1].error,j=Object(u.b)(wl,{onCompleted:function(e){if(e.input2FA){var n={context:{headers:{"Pazuz-Operator-Identifier":fl.a.encode(t.clientField)}}};return b(n)}return m(!0)}}),g=Object(l.a)(j,2),O=g[0],x=g[1].error,v=function(){if(6===t.twoFAField.length){var e={variables:{username:t.clientField,password:t.passwordField,code:t.twoFAField,rememberMe:t.rememberMeField},context:{headers:{"Pazuz-Operator-Identifier":fl.a.encode(t.clientField)}}};O(e)}else m(!0)},y=f?"Internal server error":6!==t.twoFAField.length&&d?"The code should have 6 characters!":x||d?"Code is invalid. Please try again.":null;return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(et,{className:r.info,children:"Enter your two-factor authentication code"}),Object(ze.jsx)(un.e,{onSubmit:function(){},initialValues:{},children:Object(ze.jsxs)(un.d,{children:[Object(ze.jsx)(sr,{name:"2fa",value:t.twoFAField,onChange:function(e){n({type:xl,payload:{twoFAField:e}}),m(!1)},numInputs:6,error:d,shouldAutoFocus:!0}),Object(ze.jsx)("button",{onClick:v,className:r.enterButton})]})}),Object(ze.jsxs)("div",{className:r.twofaFooter,children:[y&&Object(ze.jsx)(Ke,{className:r.errorMessage,children:y}),Object(ze.jsx)(Dn,{onClick:v,buttonClassName:r.loginButton,children:"Login"})]})]})},El=n(187),Nl=Object(f.a)(jl),Sl=x()(Fo||(Fo=Object(c.a)(["\n {\n userData {\n id\n username\n role\n }\n }\n"]))),Il=fn.f().shape({localClient:fn.h().required("Client field is required!").email("Username field should be in an email format!"),localRememberMe:fn.b()}),Fl={localClient:"",localRememberMe:!1},Ll=function(e){var t=e.state,n=e.strategy,r=x()(Lo||(Lo=Object(c.a)(["\n query generateAssertionOptions($username: String!",", $domain: String!) {\n generateAssertionOptions(username: $username",", domain: $domain)\n }\n "])),"FIDO2FA"===n?", $password: String!":"","FIDO2FA"===n?", password: $password":""),i=x()(Po||(Po=Object(c.a)(["\n mutation validateAssertion(\n $username: String!\n ","\n $rememberMe: Boolean!\n $assertionResponse: JSONObject!\n $domain: String!\n ) {\n validateAssertion(\n username: $username\n ","\n rememberMe: $rememberMe\n assertionResponse: $assertionResponse\n domain: $domain\n )\n }\n "])),"FIDO2FA"===n?", $password: String!":"","FIDO2FA"===n?"password: $password":""),o=Nl(),s=Object(w.h)(),d=Object(a.useContext)(k).setUserData,m=Object(a.useState)(""),h=Object(l.a)(m,2),p=h[0],b=h[1],f=Object(a.useState)(!1),j=Object(l.a)(f,2),g=j[0],O=j[1],v=Object(a.useState)(!1),y=Object(l.a)(v,2),C=y[0],E=y[1],N=Object(a.useState)(!1),S=Object(l.a)(N,2),I=S[0],F=S[1],L=Object(u.b)(i,{onCompleted:function(e){e.validateAssertion?q():F(!0)}}),P=Object(l.a)(L,2),D=P[0],R=P[1].error,T=Object(u.a)(r,{variables:"FIDO2FA"===n?{username:t.clientField,password:t.passwordField,domain:window.location.hostname}:{username:p,domain:window.location.hostname},onCompleted:function(e){var a=e.generateAssertionOptions;Object(El.a)(a).then((function(e){var a="FIDO2FA"===n?{username:t.clientField,password:t.passwordField,rememberMe:t.rememberMeField,assertionResponse:e,domain:window.location.hostname}:{username:p,rememberMe:g,assertionResponse:e,domain:window.location.hostname};D({variables:a})})).catch((function(e){console.error(e),F(!0)}))}}),B=Object(l.a)(T,2),A=B[0],M=B[1].error,W=Object(u.a)(Sl,{onCompleted:function(e){var t=e.userData;d(t),s.push("/")}}),z=Object(l.a)(W,2),q=z[0],$=z[1].error,H=function(e,t){return e&&t?M||$||R?"Internal server error":e.client&&t.client?e.client:C?"Invalid login.":I?"Code is invalid. Please try again.":null:null};return Object(ze.jsxs)(ze.Fragment,{children:["FIDOPasswordless"===n&&Object(ze.jsx)(un.e,{validationSchema:Il,initialValues:Fl,onSubmit:function(e){E(!1),b(e.localClient),O(e.localRememberMe),A()},children:function(e){var t=e.errors,n=e.touched;return Object(ze.jsxs)(un.d,{id:"fido-form",children:[Object(ze.jsx)(un.b,{name:"localClient",label:"Client",size:"lg",component:oi,fullWidth:!0,autoFocus:!0,className:o.input,error:H(t,n),onKeyUp:function(){C&&E(!1)}}),Object(ze.jsxs)("div",{className:o.rememberMeWrapper,children:[Object(ze.jsx)(un.b,{name:"localRememberMe",className:o.checkbox,component:ti}),Object(ze.jsx)(at,{className:o.inputLabel,children:"Keep me logged in"})]}),Object(ze.jsxs)("div",{className:o.twofaFooter,children:[H(t,n)&&Object(ze.jsx)(Ke,{className:o.errorMessage,children:H(t,n)}),Object(ze.jsx)(Dn,{type:"submit",form:"fido-form",buttonClassName:o.loginButton,children:"Use FIDO"})]})]})}}),"FIDO2FA"===n&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Ue,{className:o.info,children:"Insert your hardware key and follow the instructions"}),Object(ze.jsx)(Dn,{type:"button",form:"fido-form",onClick:function(){return A()},buttonClassName:o.loginButton,children:"Use FIDO"})]})]})},Pl=n(33),Dl=n.n(Pl),Rl=n(62),Tl=Object(f.a)(jl),Bl=x()(Do||(Do=Object(c.a)(["\n mutation login($username: String!, $password: String!) {\n login(username: $username, password: $password)\n }\n"]))),Al=x()(Ro||(Ro=Object(c.a)(["\n query generateAssertionOptions($domain: String!) {\n generateAssertionOptions(domain: $domain)\n }\n"]))),Ml=x()(To||(To=Object(c.a)(["\n mutation validateAssertion(\n $assertionResponse: JSONObject!\n $domain: String!\n ) {\n validateAssertion(assertionResponse: $assertionResponse, domain: $domain)\n }\n"]))),Wl=x()(Bo||(Bo=Object(c.a)(["\n {\n userData {\n id\n username\n role\n }\n }\n"]))),zl=fn.f().shape({email:fn.h().label("Email").required().email(),password:fn.h().required("Password field is required"),rememberMe:fn.b()}),ql={email:"",password:"",rememberMe:!1},$l=function(e,t,n){return e&&t?n?"Invalid email/password combination":e.email&&t.email?e.email:e.password&&t.password?e.password:null:null},Hl=function(e){e.state;var t=e.dispatch,n=e.strategy,r=Tl(),i=Object(w.h)(),o=Object(a.useContext)(k).setUserData,c=Object(u.b)(Bl),s=Object(l.a)(c,2),d=s[0],m=s[1].error,h=function(){var e=Object(Rl.a)(Dl.a.mark((function e(n,a,r){var i,o,l;return Dl.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={variables:{username:n,password:a},context:{headers:{"Pazuz-Operator-Identifier":fl.a.encode(n)}}},e.next=3,d(i);case 3:if(o=e.sent,(l=o.data).login){e.next=7;break}return e.abrupt("return");case 7:return e.abrupt("return",t({type:l.login,payload:{clientField:n,passwordField:a,rememberMeField:r}}));case 8:case"end":return e.stop()}}),e)})));return function(t,n,a){return e.apply(this,arguments)}}(),p=Object(u.b)(Ml,{onCompleted:function(e){return e.validateAssertion&&E()}}),b=Object(l.a)(p,2),f=b[0],j=b[1].error,g=Object(u.a)(Al,{onCompleted:function(e){var t=e.generateAssertionOptions;Object(El.a)(t).then((function(e){f({variables:{assertionResponse:e,domain:window.location.hostname}})})).catch((function(e){console.error(e)}))}}),O=Object(l.a)(g,2),x=O[0],v=O[1].error,y=Object(u.a)(Wl,{onCompleted:function(e){var t=e.userData;o(t),i.push("/")}}),C=Object(l.a)(y,2),E=C[0],N=C[1].error;return Object(ze.jsx)(un.e,{validationSchema:zl,initialValues:ql,onSubmit:function(e){return h(e.email,e.password,e.rememberMe)},children:function(e){var a=e.errors,i=e.touched;return Object(ze.jsxs)(un.d,{id:"login-form",children:[Object(ze.jsx)(un.b,{name:"email",label:"Email",size:"lg",component:oi,fullWidth:!0,autoFocus:!0,className:r.input,error:$l(a,i,m||j||v||N)}),Object(ze.jsx)(un.b,{name:"password",size:"lg",component:ii,label:"Password",fullWidth:!0,error:$l(a,i,m||j||v||N)}),Object(ze.jsxs)("div",{className:r.rememberMeWrapper,children:[Object(ze.jsx)(un.b,{name:"rememberMe",className:r.checkbox,component:ti}),Object(ze.jsx)(rt,{children:"Keep me logged in"})]}),Object(ze.jsxs)("div",{className:r.footer,children:[$l(a,i,m||j||v||N)&&Object(ze.jsx)(Ke,{className:r.errorMessage,children:$l(a,i,m||j||v||N)}),"FIDO2FA"!==n&&Object(ze.jsx)(Dn,{type:"button",onClick:function(){return"FIDOUsernameless"===n?x({variables:{domain:window.location.hostname}}):t({type:"FIDO",payload:{}})},buttonClassName:r.loginButton,className:r.fidoLoginButtonWrapper,children:"I have a hardware key"}),Object(ze.jsx)(Dn,{type:"submit",form:"login-form",buttonClassName:r.loginButton,children:"Login"})]})]})}})},Vl=x()(Ao||(Ao=Object(c.a)(["\n mutation setup2FA(\n $username: String!\n $password: String!\n $rememberMe: Boolean!\n $codeConfirmation: String!\n ) {\n setup2FA(\n username: $username\n password: $password\n rememberMe: $rememberMe\n codeConfirmation: $codeConfirmation\n )\n }\n"]))),Ul=x()(Mo||(Mo=Object(c.a)(["\n query get2FASecret($username: String!, $password: String!) {\n get2FASecret(username: $username, password: $password) {\n secret\n otpauth\n }\n }\n"]))),Gl=x()(Wo||(Wo=Object(c.a)(["\n {\n userData {\n id\n username\n role\n }\n }\n"]))),Xl=Object(f.a)(jl),_l=function(e){var t=e.state,n=(e.dispatch,Xl()),r=Object(w.h)(),i=Object(a.useContext)(k).setUserData,o=Object(a.useState)(null),c=Object(l.a)(o,2),s=c[0],d=c[1],m=Object(a.useState)(null),h=Object(l.a)(m,2),p=h[0],b=h[1],f=Object(a.useState)(!1),j=Object(l.a)(f,2),g=j[0],O=j[1],x=Object(a.useState)(!1),v=Object(l.a)(x,2),y=v[0],C=v[1],E=Object(a.useState)(""),N=Object(l.a)(E,2),S=N[0],I=N[1],F={variables:{username:t.clientField,password:t.passwordField},context:{headers:{"Pazuz-Operator-Identifier":fl.a.encode(t.clientField)}},onCompleted:function(e){var t=e.get2FASecret;d(t.secret),b(t.otpauth)}},L={variables:{username:t.clientField,password:t.passwordField,rememberMe:t.rememberMeField,codeConfirmation:S},context:{headers:{"Pazuz-Operator-Identifier":fl.a.encode(t.clientField)}}},P=Object(u.c)(Ul,F).error,D=Object(u.a)(Gl,{onCompleted:function(e){var t=e.userData;i(t),r.push("/")}}),R=Object(l.a)(D,1)[0],T=Object(u.b)(Vl,{onCompleted:function(e){var n=e.setup2FA,a={context:{headers:{"Pazuz-Operator-Identifier":fl.a.encode(t.clientField)}}};n?R(a):C(!0)}}),B=Object(l.a)(T,2),A=B[0],M=B[1].error,W=function(){return M||P?"Internal server error.":6!==S.length&&y?"The code should have 6 characters!":y?"Code is invalid. Please try again.":null},z=function(){6===S.length?A(L):C(!0)};return s&&p&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsxs)("div",{className:n.infoWrapper,children:[Object(ze.jsx)(rt,{className:n.info2,children:"This account does not yet have two-factor authentication enabled. To secure the admin, two-factor authentication is required."}),Object(ze.jsx)(rt,{className:n.info2,children:"To complete the registration process, scan the following QR code or insert the secret below on a 2FA app, such as Google Authenticator or AndOTP."})]}),Object(ze.jsx)("div",{className:n.qrCodeWrapper,children:Object(ze.jsx)(hn.a,{size:240,fgColor:J,value:p})}),Object(ze.jsxs)("div",{className:n.secretWrapper,children:[Object(ze.jsx)(rt,{className:n.secretLabel,children:"Your secret:"}),Object(ze.jsx)(rt,{className:g?n.secret:n.hiddenSecret,children:s}),Object(ze.jsx)($e,{disabled:!s&&!p,color:"primary",onClick:function(){O(!g)},children:g?"Hide":"Show"})]}),Object(ze.jsx)("div",{className:n.confirm2FAInput,children:Object(ze.jsx)(un.e,{onSubmit:function(){},initialValues:{},children:Object(ze.jsxs)(un.d,{children:[Object(ze.jsx)(sr,{name:"2fa",value:S,onChange:function(e){I(e),C(!1)},numInputs:6,error:y,shouldAutoFocus:!0}),Object(ze.jsx)("button",{onClick:z,className:n.enterButton})]})})}),Object(ze.jsxs)("div",{className:n.twofaFooter,children:[W()&&Object(ze.jsx)(Ke,{className:n.errorMessage,children:W()}),Object(ze.jsx)(Dn,{onClick:z,buttonClassName:n.loginButton,children:"Done"})]})]})},Kl="FIDO2FA",Zl=Object(f.a)(jl),Ql={twoFAField:"",clientField:"",passwordField:"",rememberMeField:!1,loginState:gl},Yl=function(e,t){var n=t.type,a=t.payload;return Object(s.a)(Object(s.a)(Object(s.a)({},e),a),{},{loginState:n})},Jl=function(){var e=Zl(),t=Object(a.useReducer)(Yl,Ql),n=Object(l.a)(t,2),r=n[0],i=n[1];return Object(ze.jsx)(qn.a,{elevation:1,children:Object(ze.jsxs)("div",{className:e.wrapper,children:[Object(ze.jsxs)("div",{className:e.titleWrapper,children:[Object(ze.jsx)(jo,{className:e.icon}),Object(ze.jsx)(_e,{className:e.title,children:"Lamassu Admin"})]}),function(){switch(r.loginState){case gl:return Object(ze.jsx)(Hl,{state:r,dispatch:i,strategy:Kl});case xl:return Object(ze.jsx)(kl,{state:r,dispatch:i});case Ol:return Object(ze.jsx)(_l,{state:r,dispatch:i});case vl:return Object(ze.jsx)(Ll,{state:r,strategy:Kl})}}()]})})},ec=Object(f.a)(jl),tc=function(){var e=ec();return Object(ze.jsx)(h.a,{container:!0,spacing:0,direction:"column",alignItems:"center",justify:"center",className:e.welcomeBackground,children:Object(ze.jsx)(h.a,{children:Object(ze.jsx)(Jl,{})})})},nc=function(){return new URLSearchParams(Object(w.i)().search)},ac=Object(f.a)(jl),rc=x()(zo||(zo=Object(c.a)(["\n query validateRegisterLink($token: String!) {\n validateRegisterLink(token: $token) {\n username\n role\n }\n }\n"]))),ic=x()(qo||(qo=Object(c.a)(["\n mutation register(\n $token: String!\n $username: String!\n $password: String!\n $role: String!\n ) {\n register(\n token: $token\n username: $username\n password: $password\n role: $role\n )\n }\n"]))),oc=fn.f({password:fn.h().required("A password is required").min(8,"Your password must contain at least ".concat(8," characters")),confirmPassword:fn.h().required("Please confirm the password").oneOf([fn.g("password")],"Passwords must match")}),lc={password:"",confirmPassword:""},cc={username:null,role:null,result:""},sc=function(e,t){var n=t.type,a=t.payload;return Object(s.a)(Object(s.a)(Object(s.a)({},e),a),{},{result:n})},dc=function(e,t,n,a){return e&&t?n||a?"Internal server error":e.password&&t.password?e.password:e.confirmPassword&&t.confirmPassword?e.confirmPassword:null:null},uc=function(){var e,t=ac(),n=Object(w.h)(),r=nc().get("t"),i=null!==(e=nc().get("id"))&&void 0!==e?e:null,o=Object(a.useReducer)(sc,cc),c=Object(l.a)(o,2),s=c[0],d=c[1],m={context:{headers:{"Pazuz-Operator-Identifier":i}},variables:{token:r},onCompleted:function(e){var t=e.validateRegisterLink;if(!t)return d({type:"failure"});d({type:"success",payload:{username:t.username,role:t.role}})},onError:function(){return d({type:"failure"})}},p=Object(u.c)(rc,m),b=p.error,f=p.loading,j=Object(u.b)(ic,{onCompleted:function(e){e.register&&n.push("/wizard",{fromAuthRegister:!0})}}),g=Object(l.a)(j,2),O=g[0],x=g[1].error;return Object(ze.jsx)(h.a,{container:!0,spacing:0,direction:"column",alignItems:"center",justify:"center",className:t.welcomeBackground,children:Object(ze.jsx)(h.a,{children:Object(ze.jsx)("div",{children:Object(ze.jsx)(qn.a,{elevation:1,children:Object(ze.jsxs)("div",{className:t.wrapper,children:[Object(ze.jsxs)("div",{className:t.titleWrapper,children:[Object(ze.jsx)(jo,{className:t.icon}),Object(ze.jsx)(Ue,{className:t.title,children:"Lamassu Admin"})]}),!f&&"success"===s.result&&Object(ze.jsx)(un.e,{validationSchema:oc,initialValues:lc,onSubmit:function(e){O({variables:{token:r,username:s.username,password:e.password,role:s.role}})},children:function(e){var n=e.errors,a=e.touched;return Object(ze.jsxs)(un.d,{id:"register-form",children:[Object(ze.jsx)(un.b,{name:"password",label:"Insert a password",autoFocus:!0,component:ii,size:"lg",fullWidth:!0,className:t.input}),Object(ze.jsx)(un.b,{name:"confirmPassword",label:"Confirm your password",component:ii,size:"lg",fullWidth:!0}),Object(ze.jsxs)("div",{className:t.footer,children:[dc(n,a,b,x)&&Object(ze.jsx)(Ke,{className:t.errorMessage,children:dc(n,a,b,x)}),Object(ze.jsx)(Dn,{type:"submit",form:"register-form",buttonClassName:t.loginButton,children:"Done"})]})]})}}),!f&&"failure"===s.result&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(rt,{children:"Link has expired"}),Object(ze.jsxs)(rt,{children:["To obtain a new link, run the command"," ",Object(ze.jsx)("strong",{children:"lamassu-register"})," in your server\u2019s terminal."]})]})]})})})})})},mc=Object(f.a)(jl),hc=x()($o||($o=Object(c.a)(["\n query validateReset2FALink($token: String!) {\n validateReset2FALink(token: $token) {\n user_id\n secret\n otpauth\n }\n }\n"]))),pc=x()(Ho||(Ho=Object(c.a)(["\n mutation reset2FA($token: String!, $userID: ID!, $code: String!) {\n reset2FA(token: $token, userID: $userID, code: $code)\n }\n"]))),bc={userID:null,secret:null,otpauth:null,result:null},fc=function(e,t){var n=t.type,a=t.payload;return Object(s.a)(Object(s.a)(Object(s.a)({},e),a),{},{result:n})},jc=function(){var e=mc(),t=Object(w.h)(),n=new URLSearchParams(Object(w.i)().search).get("t"),r=Object(a.useState)(!1),i=Object(l.a)(r,2),o=i[0],c=i[1],s=Object(a.useState)(!1),d=Object(l.a)(s,2),m=d[0],p=d[1],b=Object(a.useState)(""),f=Object(l.a)(b,2),j=f[0],g=f[1],O=Object(a.useReducer)(fc,bc),x=Object(l.a)(O,2),v=x[0],y=x[1],C=Object(u.c)(hc,{variables:{token:n},onCompleted:function(e){var t=e.validateReset2FALink;y(t?{type:"success",payload:{userID:t.user_id,secret:t.secret,otpauth:t.otpauth}}:{type:"failure"})},onError:function(){y({type:"failure"})}}),k=C.error,E=C.loading,N=Object(u.b)(pc,{onCompleted:function(e){e.reset2FA?t.push("/"):p(!0)}}),S=Object(l.a)(N,2),I=S[0],F=S[1].error,L=function(){return k?"Internal server error":6!==j.length&&m?"The code should have 6 characters!":F||m?"Code is invalid. Please try again.":null},P=function(){6===j.length?I({variables:{token:n,userID:v.userID,code:j}}):p(!0)};return Object(ze.jsx)(h.a,{container:!0,spacing:0,direction:"column",alignItems:"center",justify:"center",className:e.welcomeBackground,children:Object(ze.jsx)(h.a,{children:Object(ze.jsx)("div",{children:Object(ze.jsx)(qn.a,{elevation:1,children:Object(ze.jsxs)("div",{className:e.wrapper,children:[Object(ze.jsxs)("div",{className:e.titleWrapper,children:[Object(ze.jsx)(jo,{className:e.icon}),Object(ze.jsx)(Ue,{className:e.title,children:"Lamassu Admin"})]}),!E&&"success"===v.result&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)("div",{className:e.infoWrapper,children:Object(ze.jsx)(at,{className:e.info2,children:"To finish this process, please scan the following QR code or insert the secret further below on an authentication app of your choice, such Google Authenticator or Authy."})}),Object(ze.jsx)("div",{className:e.qrCodeWrapper,children:Object(ze.jsx)(hn.a,{size:240,fgColor:J,value:v.otpauth})}),Object(ze.jsxs)("div",{className:e.secretWrapper,children:[Object(ze.jsx)(at,{className:e.secretLabel,children:"Your secret:"}),Object(ze.jsx)(at,{className:o?e.secret:e.hiddenSecret,children:v.secret}),Object(ze.jsx)($e,{color:"primary",onClick:function(){c(!o)},children:o?"Hide":"Show"})]}),Object(ze.jsx)("div",{className:e.confirm2FAInput,children:Object(ze.jsx)(un.e,{onSubmit:function(){},initialValues:{},children:Object(ze.jsxs)(un.d,{children:[Object(ze.jsx)(sr,{name:"2fa",value:j,onChange:function(e){g(e),p(!1)},numInputs:6,error:m,shouldAutoFocus:!0}),Object(ze.jsx)("button",{onClick:P,className:e.enterButton})]})})}),Object(ze.jsxs)("div",{className:e.twofaFooter,children:[L()&&Object(ze.jsx)(Ke,{className:e.errorMessage,children:L()}),Object(ze.jsx)(Dn,{onClick:P,buttonClassName:e.loginButton,children:"Done"})]})]}),!E&&"failure"===v.result&&Object(ze.jsx)(ze.Fragment,{children:Object(ze.jsx)(rt,{children:"Link has expired"})})]})})})})})},gc=Object(f.a)(jl),Oc=x()(Vo||(Vo=Object(c.a)(["\n query validateResetPasswordLink($token: String!) {\n validateResetPasswordLink(token: $token) {\n id\n }\n }\n"]))),xc=x()(Uo||(Uo=Object(c.a)(["\n mutation resetPassword($token: String!, $userID: ID!, $newPassword: String!) {\n resetPassword(token: $token, userID: $userID, newPassword: $newPassword)\n }\n"]))),vc=fn.f().shape({password:fn.h().required("A new password is required").test("len","New password must contain more than 8 characters",(function(e){return e.length>=8})),confirmPassword:fn.h().oneOf([fn.g("password"),null],"Passwords must match")}),yc={password:"",confirmPassword:""},wc=function(e,t,n){return e&&t?n?"Internal server error":e.password&&t.password?e.password:e.confirmPassword&&t.confirmPassword?e.confirmPassword:null:null},Cc=function(){var e=gc(),t=Object(w.h)(),n=new URLSearchParams(Object(w.i)().search).get("t"),r=Object(a.useState)(null),i=Object(l.a)(r,2),o=i[0],c=i[1],s=Object(a.useState)(!0),d=Object(l.a)(s,2),m=d[0],p=d[1],b=Object(a.useState)(!1),f=Object(l.a)(b,2),j=f[0],g=f[1];Object(u.c)(Oc,{variables:{token:n},onCompleted:function(e){var t=e.validateResetPasswordLink;p(!1),t?(g(!0),c(t.id)):g(!1)},onError:function(){p(!1),g(!1)}});var O=Object(u.b)(xc,{onCompleted:function(e){e.resetPassword&&t.push("/")}}),x=Object(l.a)(O,2),v=x[0],y=x[1].error;return Object(ze.jsx)(h.a,{container:!0,spacing:0,direction:"column",alignItems:"center",justify:"center",className:e.welcomeBackground,children:Object(ze.jsx)(h.a,{children:Object(ze.jsx)("div",{children:Object(ze.jsx)(qn.a,{elevation:1,children:Object(ze.jsxs)("div",{className:e.wrapper,children:[Object(ze.jsxs)("div",{className:e.titleWrapper,children:[Object(ze.jsx)(jo,{className:e.icon}),Object(ze.jsx)(Ue,{className:e.title,children:"Lamassu Admin"})]}),!m&&j&&Object(ze.jsx)(un.e,{validationSchema:vc,initialValues:yc,onSubmit:function(e){v({variables:{token:n,userID:o,newPassword:e.confirmPassword}})},children:function(t){var n=t.errors,a=t.touched;return Object(ze.jsxs)(un.d,{id:"reset-password",children:[Object(ze.jsx)(un.b,{name:"password",autoFocus:!0,size:"lg",component:ii,label:"New password",fullWidth:!0,className:e.input}),Object(ze.jsx)(un.b,{name:"confirmPassword",size:"lg",component:ii,label:"Confirm your password",fullWidth:!0}),Object(ze.jsxs)("div",{className:e.footer,children:[wc(n,a,y)&&Object(ze.jsx)(Ke,{className:e.errorMessage,children:wc(n,a,y)}),Object(ze.jsx)(Dn,{type:"submit",form:"reset-password",buttonClassName:e.loginButton,children:"Done"})]})]})}}),!m&&!j&&Object(ze.jsx)(ze.Fragment,{children:Object(ze.jsx)(rt,{children:"Link has expired"})})]})})})})})};function kc(){return(kc=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Nc=a.createElement("desc",null,"Created with Sketch."),Sc=a.createElement("g",{id:"Styleguide",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"icon/direction/cash-in",transform:"translate(-1.000000, 0.000000)",fill:"#16D6D3"},a.createElement("path",{d:"M3.99134364,0.321790399 L10.1430099,4.40569595 C11.0271728,4.99266501 11.2660914,6.1822461 10.6766494,7.06269968 C10.5357408,7.27317585 10.3543728,7.45378298 10.1430099,7.59410043 L3.99134364,11.678006 C3.10718075,12.264975 1.91258801,12.0270588 1.32314609,11.1466052 C1.11243854,10.8318699 1,10.4620686 1,10.0838037 L1,1.91599264 C1,0.857819122 1.86143307,0 2.92406462,0 C3.30392305,0 3.67528233,0.11196683 3.99134364,0.321790399 Z",id:"Path-3"})));function Ic(e,t){var n=e.title,r=e.titleId,i=Ec(e,["title","titleId"]);return a.createElement("svg",kc({width:"10px",height:"12px",viewBox:"0 0 10 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,Nc,Sc)}var Fc=a.forwardRef(Ic);n.p;function Lc(){return(Lc=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Dc=a.createElement("desc",null,"Created with Sketch."),Rc=a.createElement("g",{id:"Styleguide",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"icon/direction/cash-out",transform:"translate(-1.000000, 0.000000)",fill:"#5A67FF"},a.createElement("path",{d:"M3.99134364,0.321790399 L10.1430099,4.40569595 C11.0271728,4.99266501 11.2660914,6.1822461 10.6766494,7.06269968 C10.5357408,7.27317585 10.3543728,7.45378298 10.1430099,7.59410043 L3.99134364,11.678006 C3.10718075,12.264975 1.91258801,12.0270588 1.32314609,11.1466052 C1.11243854,10.8318699 1,10.4620686 1,10.0838037 L1,1.91599264 C1,0.857819122 1.86143307,0 2.92406462,0 C3.30392305,0 3.67528233,0.11196683 3.99134364,0.321790399 Z",id:"Path-3",transform:"translate(6.000000, 6.000000) scale(-1, 1) translate(-6.000000, -6.000000) "})));function Tc(e,t){var n=e.title,r=e.titleId,i=Pc(e,["title","titleId"]);return a.createElement("svg",Lc({width:"10px",height:"12px",viewBox:"0 0 10 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,Dc,Rc)}var Bc,Ac=a.forwardRef(Tc),Mc=(n.p,{headerLabels:{display:"flex",flexDirection:"row","& > div:first-child":{display:"flex",alignItems:"center",marginLeft:0},"& > div":{display:"flex",alignItems:"center",marginLeft:25},"& > div:last-child":{display:"flex",alignItems:"center",marginLeft:64},"& > div > span":{extend:Ae.label1,marginLeft:7}},root:{flexGrow:1,display:"flex",marginBottom:120},emptyMachinesRoot:{height:300,backgroundColor:G,border:"solid 2px ".concat(X)},card:{wordWrap:"break-word",boxShadow:"0 0 4px 0 rgba(0, 0, 0, 0.08)",borderRadius:12,padding:24,backgroundColor:Z,flex:1,marginRight:24},container:{display:"flex",justifyContent:"space-between"},button:{color:J,minHeight:0,minWidth:0,padding:0,textTransform:"none","&:hover":{backgroundColor:"transparent"}},upperButtonLabel:{textAlign:"center",marginBottom:0,marginTop:0,marginLeft:8},alertsCard:{marginBottom:8},h4:{marginTop:0},centerLabel:{marginTop:40,marginBottom:0},systemStatusCard:{flex:1,marginTop:8},expandedCard:{flex:.9},shrunkCard:{flex:.1},displayFlex:{display:"flex",flexDirection:"column"},inline:{display:"inline"},emptyMachinesContent:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",alignItems:"center","& > :first-child":{marginTop:0},"& > *":{marginTop:25}},offColor:{color:de}}),Wc=n(36),zc=n.n(Wc),qc=n(89),$c=n(851),Hc=n(852),Vc=n(449),Uc=n(853),Gc=n(854),Xc="cashOut",_c="wallets",Kc="operatorInfo",Zc="notifications",Qc="locale",Yc="commissions",Jc="receipt",es="coinAtmRadar",ts="termsConditions",ns="triggersConfig",as=$c.a((function(e,t){return Hc.a(R.a(Vc.a(0,e),Uc.a(t)))})),rs=$c.a((function(e,t){return Hc.a(M.a((function(t){return e(t[0])}),Uc.a(t)))})),is=$c.a((function(e,t){return Gc.a(e,t)?t.slice(e.length):t})),os=$c.a((function(e,t){return L.a(function(e){return as(is("".concat(e,"_")))}(e),function(e){return rs(Gc.a("".concat(e,"_")))}(e))(t)})),ls=$c.a((function(e,t){return as((function(t){return"".concat(e,"_").concat(t)}))(t)})),cs={label:{color:se},headerLabels:{whiteSpace:"pre",display:"flex",flexDirection:"row",marginTop:-20},headerLabel:{display:"flex",alignItems:"center"},txOutMargin:{marginLeft:24},tickerLabel:{color:se,marginTop:-5},footer1:{left:0,bottom:0,position:"fixed",width:"100vw",backgroundColor:Z,textAlign:"left",zIndex:1,boxShadow:"0px -1px 10px 0px rgba(50, 50, 50, 0.1)",minHeight:96,transition:"min-height 0.5s ease-out","&:hover":{transition:"min-height 0.5s ease-in",minHeight:200}},content1:{width:1200,maxHeight:100,backgroundColor:Z,zIndex:2,bottom:-8,margin:"0 auto"}},ss=x()(Bc||(Bc=Object(c.a)(["\n query getData {\n cryptoRates\n cryptoCurrencies {\n code\n display\n }\n config\n accountsConfig {\n code\n display\n }\n }\n"])));zc.a.config({ROUNDING_MODE:zc.a.ROUND_HALF_UP});var ds=Object(f.a)(cs),us=function(){var e,t,n,a,r,i=Object(u.c)(ss).data,o=null!==(e=A.a(["cryptoRates","withCommissions"])(i))&&void 0!==e?e:{},l=ds(),c=null!==(t=A.a(["config"])(i))&&void 0!==t?t:{},s=(qc.a(o).length,os("wallets")(c)),d=null!==(n=A.a(["cryptoCurrencies"])(i))&&void 0!==n?n:[],m=null!==(a=A.a(["accountsConfig"])(i))&&void 0!==a?a:[],p=null!==(r=A.a(["locale_fiatCurrency"])(c))&&void 0!==r?r:"";return Object(ze.jsx)("div",{className:l.footer1,children:Object(ze.jsx)("div",{className:l.content1,children:Object(ze.jsx)(h.a,{container:!0,children:Object(ze.jsx)(h.a,{container:!0,className:l.footerContainer1,children:qc.a(o).map((function(e){return function(e){var t=pl.a(W.a("code",e))(d),n=s["".concat(e,"_ticker")],a=pl.a(W.a("code",n))(m),r=a>-1?m[a].display:"",o=parseFloat(A.a(["cryptoRates","withoutCommissions",e,"cashIn"])(i)),c=parseFloat(A.a(["cryptoRates","withoutCommissions",e,"cashOut"])(i)),u=new zc.a((o+c)/2).toFormat(2),b=new zc.a(parseFloat(A.a(["cryptoRates","withCommissions",e,"cashIn"])(i))).toFormat(2),f=new zc.a(parseFloat(A.a(["cryptoRates","withCommissions",e,"cashOut"])(i))).toFormat(2);return Object(ze.jsxs)(h.a,{item:!0,xs:3,children:[Object(ze.jsx)(at,{className:l.label,children:d[t].display}),Object(ze.jsxs)("div",{className:l.headerLabels,children:[Object(ze.jsxs)("div",{className:l.headerLabel,children:[Object(ze.jsx)(Fc,{}),Object(ze.jsx)(at,{children:" ".concat(b," ").concat(p)})]}),Object(ze.jsxs)("div",{className:I()(l.headerLabel,l.txOutMargin),children:[Object(ze.jsx)(Ac,{}),Object(ze.jsx)(at,{children:" ".concat(f," ").concat(p)})]})]}),Object(ze.jsx)(at,{className:l.tickerLabel,children:"".concat(r,": ").concat(u," ").concat(p)})]},e)}(e)}))})})})})},ms=n(859),hs=n(964),ps=n(860),bs=n(179),fs=n(933);function js(){return(js=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Os=a.createElement("defs",null,a.createElement("circle",{id:"path-100",cx:80,cy:80,r:80}),a.createElement("rect",{id:"path-300",x:28,y:44,width:104,height:116,rx:4}),a.createElement("filter",{x:"-23.1%",y:"-20.7%",width:"146.2%",height:"141.4%",filterUnits:"objectBoundingBox",id:"filter-4"},a.createElement("feOffset",{dx:0,dy:0,in:"SourceAlpha",result:"shadowOffsetOuter1"}),a.createElement("feGaussianBlur",{stdDeviation:8,in:"shadowOffsetOuter1",result:"shadowBlurOuter1"}),a.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0",type:"matrix",in:"shadowBlurOuter1"})),a.createElement("rect",{id:"path-5",x:37,y:66,width:84,height:8,rx:2}),a.createElement("mask",{id:"mask-6",maskContentUnits:"userSpaceOnUse",maskUnits:"objectBoundingBox",x:0,y:0,width:84,height:8,fill:"white"},a.createElement("use",{xlinkHref:"#path-5"})),a.createElement("rect",{id:"path-7",x:37,y:78,width:84,height:8,rx:2}),a.createElement("mask",{id:"mask-8",maskContentUnits:"userSpaceOnUse",maskUnits:"objectBoundingBox",x:0,y:0,width:84,height:8,fill:"white"},a.createElement("use",{xlinkHref:"#path-7"})),a.createElement("rect",{id:"path-9",x:37,y:90,width:84,height:8,rx:2}),a.createElement("mask",{id:"mask-10",maskContentUnits:"userSpaceOnUse",maskUnits:"objectBoundingBox",x:0,y:0,width:84,height:8,fill:"white"},a.createElement("use",{xlinkHref:"#path-9"})),a.createElement("rect",{id:"path-11",x:37,y:102,width:84,height:8,rx:2}),a.createElement("mask",{id:"mask-12",maskContentUnits:"userSpaceOnUse",maskUnits:"objectBoundingBox",x:0,y:0,width:84,height:8,fill:"white"},a.createElement("use",{xlinkHref:"#path-11"}))),xs=a.createElement("g",{id:"\\u21B3-v13a",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"transactions_v13a#1-(empty-table)",transform:"translate(-640.000000, -220.000000)"},a.createElement("g",{id:"Group-2",transform:"translate(640.000000, 220.000000)"},a.createElement("g",{id:"Rectangle"},a.createElement("mask",{id:"mask-200",fill:"white"},a.createElement("use",{xlinkHref:"#path-100"})),a.createElement("use",{id:"Mask",fill:"#EBEFFF",xlinkHref:"#path-100"}),a.createElement("g",{mask:"url(#mask-200)"},a.createElement("use",{fill:"black",fillOpacity:1,filter:"url(#filter-4)",xlinkHref:"#path-300"}),a.createElement("use",{fill:"#FFFFFF",fillRule:"evenodd",xlinkHref:"#path-300"}))),a.createElement("use",{id:"Rectangle",stroke:"#5F668A",mask:"url(#mask-6)",strokeDasharray:1,xlinkHref:"#path-5"}),a.createElement("use",{id:"Rectangle-Copy",stroke:"#5F668A",mask:"url(#mask-8)",strokeDasharray:1,xlinkHref:"#path-7"}),a.createElement("use",{id:"Rectangle-Copy-2",stroke:"#5F668A",mask:"url(#mask-10)",strokeDasharray:1,xlinkHref:"#path-9"}),a.createElement("use",{id:"Rectangle-Copy-3",stroke:"#5F668A",mask:"url(#mask-12)",strokeDasharray:1,xlinkHref:"#path-11"}),a.createElement("rect",{id:"Rectangle",fill:"#EBEFFF",x:37,y:56,width:84,height:6,rx:2}))));function vs(e,t){var n=e.title,r=e.titleId,i=gs(e,["title","titleId"]);return a.createElement("svg",js({width:"160px",height:"160px",viewBox:"0 0 160 160",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,Os,xs)}var ys=a.forwardRef(vs),ws=(n.p,Object(f.a)({emptyTable:{width:"100%",display:"flex",flexDirection:"column",alignItems:"center",marginTop:52}})),Cs=Object(a.memo)((function(e){var t=e.message,n=e.className,a=ws();return Object(ze.jsxs)("div",{className:I()(n,a.emptyTable),children:[Object(ze.jsx)(ys,{}),Object(ze.jsx)(Xe,{children:t})]})})),ks=Object(f.a)({table:{tableLayout:"fixed",borderCollapse:"separate",borderSpacing:"0 0"}}),Es=Object(a.memo)((function(e){var t=e.className,n=e.children,a=Object(q.a)(e,["className","children"]),r=ks();return Object(ze.jsx)("table",Object(s.a)(Object(s.a)({},a),{},{className:I()(r.table,t),children:n}))})),Ns=Object(a.memo)((function(e){var t=e.children,n=Object(q.a)(e,["children"]);return Object(ze.jsx)("tbody",Object(s.a)(Object(s.a)({},n),{},{children:t}))})),Ss=Object(f.a)({td:{padding:[[0,24]]},alignRight:{textAlign:"right"}}),Is=Object(a.memo)((function(e){var t,n=e.colspan,a=e.rightAlign,r=e.className,i=e.children,o=Object(q.a)(e,["colspan","rightAlign","className","children"]),l=Ss(),c=(t={},Object(z.a)(t,l.td,!0),Object(z.a)(t,l.alignRight,a),t);return Object(ze.jsx)("td",Object(s.a)(Object(s.a)({colSpan:n,className:I()(c,r)},o),{},{children:i}))})),Fs=Object(a.memo)((function(e){var t=e.children,n=Object(q.a)(e,["children"]);return Object(ze.jsx)("thead",Object(s.a)(Object(s.a)({},n),{},{children:t}))})),Ls=Ae.tl2,Ps=Object(f.a)({th:{extend:Ls,backgroundColor:De,height:Fe,textAlign:"left",color:Z,padding:"0 ".concat(24,"px")},alignRight:{textAlign:"right"}}),Ds=Object(a.memo)((function(e){var t,n=e.rightAlign,a=e.children,r=e.className,i=Object(q.a)(e,["rightAlign","children","className"]),o=Ps(),l=(t={},Object(z.a)(t,o.th,!0),Object(z.a)(t,o.alignRight,n),t);return Object(ze.jsx)("th",Object(s.a)(Object(s.a)({},i),{},{className:I()(l,r),children:a}))})),Rs=Ae.info2,Ts=Ae.p,Bs=Object(f.a)({tr:{extend:Ts,padding:4,height:Le,backgroundColor:"#ffffff"},lg:{extend:Rs,height:76},sm:{height:30},error:{backgroundColor:Re},success:{backgroundColor:Te}}),As=Object(a.memo)((function(e){var t,n=e.className,a=e.children,r=e.header,i=e.error,o=e.success,l=e.size,c=void 0===l?"sm":l,d=Object(q.a)(e,["className","children","header","error","success","size"]),u=Bs(),m=(t={},Object(z.a)(t,u.tr,!r),Object(z.a)(t,u.sm,!r&&"sm"===c),Object(z.a)(t,u.lg,!r&&"lg"===c),Object(z.a)(t,u.error,i),Object(z.a)(t,u.success,o),t);return Object(ze.jsx)("tr",Object(s.a)(Object(s.a)({className:I()(m,n)},d),{},{children:a}))}));function Ms(){return(Ms=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var zs=a.createElement("g",{id:"icon/label/icon/down",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"Group-6"},a.createElement("circle",{id:"Oval",fill:"#FFECEB",cx:6,cy:6,r:6}),a.createElement("g",{id:"Group-5",transform:"translate(6.096194, 6.096194) rotate(-315.000000) translate(-6.096194, -6.096194) translate(2.596194, 3.096194)",stroke:"#FF584A"},a.createElement("polyline",{id:"Path-2",points:"3.15780333 -4.54747351e-13 6.15780333 2.82998193 3.15780333 5.65996386"}),a.createElement("line",{x1:5.42178888,y1:2.82998193,x2:-545696821e-21,y2:2.82998193,id:"Path-3"}))));function qs(e,t){var n=e.title,r=e.titleId,i=Ws(e,["title","titleId"]);return a.createElement("svg",Ms({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,zs)}var $s=a.forwardRef(qs);n.p;function Hs(){return(Hs=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Us=a.createElement("g",{id:"icon/label/icon/equal",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"Group-6",fill:"#EBEFFF"},a.createElement("circle",{id:"Oval",cx:6,cy:6,r:6})),a.createElement("g",{id:"Group",transform:"translate(4.000000, 4.000000)",stroke:"#5F668A",strokeLinecap:"square"},a.createElement("line",{x1:0,y1:1,x2:4,y2:1,id:"Line-12"}),a.createElement("line",{x1:0,y1:3,x2:4,y2:3,id:"Line-12"})));function Gs(e,t){var n=e.title,r=e.titleId,i=Vs(e,["title","titleId"]);return a.createElement("svg",Hs({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,Us)}var Xs=a.forwardRef(Gs);n.p;function _s(){return(_s=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Zs=a.createElement("g",{id:"icon/label/icon/up",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"Group-6"},a.createElement("circle",{id:"Oval",fill:"#ECFBEF",cx:6,cy:6,r:6}),a.createElement("g",{id:"Group-5",transform:"translate(6.096194, 6.096194) rotate(-45.000000) translate(-6.096194, -6.096194) translate(2.596194, 3.096194)",stroke:"#00CD5A"},a.createElement("polyline",{id:"Path-2",points:"3.15780333 -4.54747351e-13 6.15780333 2.82998193 3.15780333 5.65996386"}),a.createElement("line",{x1:5.42178888,y1:2.82998193,x2:-545696821e-21,y2:2.82998193,id:"Path-3"}))));function Qs(e,t){var n=e.title,r=e.titleId,i=Ks(e,["title","titleId"]);return a.createElement("svg",_s({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,Zs)}var Ys,Js=a.forwardRef(Qs),ed=(n.p,n(462)),td=n(855),nd={"Pacific/Midway":{short:"SST",long:"Midway Island, Samoa"},"Pacific/Honolulu":{short:"HAST",long:"Hawaii"},"America/Juneau":{short:"AKST",long:"Alaska"},"America/Boise":{short:"MST",long:"Mountain Time"},"America/Dawson":{short:"MST",long:"Dawson, Yukon"},"America/Chihuahua":{short:null,long:"Chihuahua, La Paz, Mazatlan"},"America/Phoenix":{short:"MST",long:"Arizona"},"America/Chicago":{short:"CST",long:"Central Time"},"America/Regina":{short:"CST",long:"Saskatchewan"},"America/Mexico_City":{short:"CST",long:"Guadalajara, Mexico City, Monterrey"},"America/Belize":{short:"CST",long:"Central America"},"America/Detroit":{short:"EST",long:"Eastern Time"},"America/Bogota":{short:"COT",long:"Bogota, Lima, Quito"},"America/Caracas":{short:"VET",long:"Caracas, La Paz"},"America/Santiago":{short:"CLST",long:"Santiago"},"America/St_Johns":{short:"HNTN",long:"Newfoundland and Labrador"},"America/Sao_Paulo":{short:"BRT",long:"Brasilia"},"America/Tijuana":{short:"PST",long:"Tijuana"},"America/Montevideo":{short:"UYT",long:"Montevideo"},"America/Argentina/Buenos_Aires":{short:null,long:"Buenos Aires, Georgetown"},"America/Godthab":{short:null,long:"Greenland"},"America/Los_Angeles":{short:"PST",long:"Pacific Time"},"Atlantic/Azores":{short:"AZOT",long:"Azores"},"Atlantic/Cape_Verde":{short:"CVT",long:"Cape Verde Islands"},GMT:{short:"GMT",long:"UTC"},"Europe/London":{short:"GMT",long:"Edinburgh, London"},"Europe/Dublin":{short:"GMT",long:"Dublin"},"Europe/Lisbon":{short:"WET",long:"Lisbon"},"Africa/Casablanca":{short:"WET",long:"Casablanca, Monrovia"},"Atlantic/Canary":{short:"WET",long:"Canary Islands"},"Europe/Belgrade":{short:"CET",long:"Belgrade, Bratislava, Budapest, Ljubljana, Prague"},"Europe/Sarajevo":{short:"CET",long:"Sarajevo, Skopje, Warsaw, Zagreb"},"Europe/Brussels":{short:"CET",long:"Brussels, Copenhagen, Madrid, Paris"},"Europe/Amsterdam":{short:"CET",long:"Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna"},"Africa/Algiers":{short:"CET",long:"West Central Africa"},"Europe/Bucharest":{short:"EET",long:"Bucharest"},"Africa/Cairo":{short:"EET",long:"Cairo"},"Europe/Helsinki":{short:"EET",long:"Helsinki, Kiev, Riga, Sofia, Tallinn, Vilnius"},"Europe/Athens":{short:"EET",long:"Athens, Istanbul, Minsk"},"Asia/Jerusalem":{short:"IST",long:"Jerusalem"},"Africa/Harare":{short:"CAT",long:"Harare, Pretoria"},"Europe/Moscow":{short:"MSK",long:"Moscow, St. Petersburg, Volgograd"},"Asia/Kuwait":{short:"AST",long:"Kuwait, Riyadh"},"Africa/Nairobi":{short:"EAT",long:"Nairobi"},"Asia/Baghdad":{short:"AST",long:"Baghdad"},"Asia/Tehran":{short:"IRST",long:"Tehran"},"Asia/Dubai":{short:"GST",long:"Abu Dhabi, Muscat"},"Asia/Baku":{short:"AZT",long:"Baku, Tbilisi, Yerevan"},"Asia/Kabul":{short:"AFT",long:"Kabul"},"Asia/Yekaterinburg":{short:"YEKT",long:"Ekaterinburg"},"Asia/Karachi":{short:"PKT",long:"Islamabad, Karachi, Tashkent"},"Asia/Kolkata":{short:"IST",long:"Chennai, Kolkata, Mumbai, New Delhi"},"Asia/Kathmandu":{short:null,long:"Kathmandu"},"Asia/Dhaka":{short:"BST",long:"Astana, Dhaka"},"Asia/Colombo":{short:"IST",long:"Sri Jayawardenepura"},"Asia/Almaty":{short:"ALMT",long:"Almaty, Novosibirsk"},"Asia/Rangoon":{short:null,long:"Yangon Rangoon"},"Asia/Bangkok":{short:"ICT",long:"Bangkok, Hanoi, Jakarta"},"Asia/Krasnoyarsk":{short:"KRAT",long:"Krasnoyarsk"},"Asia/Shanghai":{short:"CST",long:"Beijing, Chongqing, Hong Kong SAR, Urumqi"},"Asia/Kuala_Lumpur":{short:"MYT",long:"Kuala Lumpur, Singapore"},"Asia/Taipei":{short:"CST",long:"Taipei"},"Australia/Perth":{short:"AWST",long:"Perth"},"Asia/Irkutsk":{short:"IRKT",long:"Irkutsk, Ulaanbaatar"},"Asia/Seoul":{short:"KST",long:"Seoul"},"Asia/Tokyo":{short:"JST",long:"Osaka, Sapporo, Tokyo"},"Asia/Yakutsk":{short:"YAKT",long:"Yakutsk"},"Australia/Darwin":{short:"ACST",long:"Darwin"},"Australia/Adelaide":{short:"ACDT",long:"Adelaide"},"Australia/Sydney":{short:"AEDT",long:"Canberra, Melbourne, Sydney"},"Australia/Brisbane":{short:"AEST",long:"Brisbane"},"Australia/Hobart":{short:"AEDT",long:"Hobart"},"Asia/Vladivostok":{short:"VLAT",long:"Vladivostok"},"Pacific/Guam":{short:"ChST",long:"Guam, Port Moresby"},"Asia/Magadan":{short:"MAGT",long:"Magadan, Solomon Islands, New Caledonia"},"Asia/Kamchatka":{short:"PETT",long:"Kamchatka, Marshall Islands"},"Pacific/Fiji":{short:"FJT",long:"Fiji Islands"},"Pacific/Auckland":{short:"NZDT",long:"Auckland, Wellington"},"Pacific/Tongatapu":{short:null,long:"Nuku'alofa"}},ad=function(e){var t=Uc.a(e);return bs.a((function(e,t){var n=Object(td.a)(t[0])<0,a=Object(ed.a)({start:0,end:Math.abs(Object(td.a)(t[0]))}),r=a.hours.toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1}),i=a.minutes.toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1}),o="(GMT".concat(n?"-":"+").concat(r,":").concat(i,")");return e.push({label:"".concat(o," - ").concat(t[1].long),code:t[0]}),e}),[],t)}(nd),rd=n(971),id=n(972),od=n(856),ld=function(e){var t=Intl.DateTimeFormat().resolvedOptions().timeZone;return Object(rd.a)(t,e)},cd=function(e,t){var n=Intl.DateTimeFormat().resolvedOptions().timeZone;return Object(id.a)(t,Object(rd.a)(n,e))},sd=function(e,t,n){var a=Intl.DateTimeFormat().resolvedOptions().timeZone,r=Object(id.a)(t,Object(rd.a)(a,e));return Object(od.a)(n,r)},dd=function(e,t){return Object(od.a)(t,e)},ud={wrapper:{display:"flex",height:142},percentageBox:{height:142,borderRadius:4,display:"flex",alignItems:"center",justifyContent:"center",whiteSpace:"pre"},label:{color:Z},inColor:{backgroundColor:_},outColor:{backgroundColor:K},other:{minWidth:"6px",borderRadius:2},inWidth:{width:function(e){return"".concat(e,"%")},marginRight:function(e){return 100===e?0:4}},outWidth:{width:function(e){return"".concat(100-e,"%")}}},md=Object(f.a)(ud),hd=function(e){var t,n=e.cashIn,a=e.cashOut,r=n||0!==a?n:50,i=md(r),o=function(e){if(!(e<=15))return Object(ze.jsxs)(nt,{className:i.label,children:[e,"%"]})},l=(t={},Object(z.a)(t,i.percentageBox,!0),Object(z.a)(t,i.other,r<5&&r>0),t);return Object(ze.jsxs)("div",{className:i.wrapper,children:[Object(ze.jsx)("div",{className:I()(l,i.inColor,i.inWidth),children:o(r)}),Object(ze.jsx)("div",{className:I()(l,i.outColor,i.outWidth),children:o(100-r)})]})},pd=n(28),bd=n(857),fd=n(276),jd=n(858),gd=function(e){var t=e.cashInFee?Number.parseFloat(e.cashInFee):0;return Number.parseFloat(e.commissionPercentage)*Number.parseFloat(e.fiat)+t},Od=function(e,t,n){return{created:new Date(new Date(e.created).getTime()+t).toISOString(),profit:n}},xd=function(e){var t=e.created;return new Date(t).toISOString().substring(0,10)},vd=function(e){var t=e.created;return new Date(t).toISOString().substring(0,13)},yd=function(e,t){var n=e.profit||0;return Object(s.a)(Object(s.a)({},t),{},{profit:n+gd(t)})},wd={Day:864e5,Week:6048e5,Month:2592e6},Cd=function(e){var t=e.data,n=e.previousTimeData,r=e.previousProfit,i=e.timeFrame,o=Object(a.useRef)(),c=Object(a.useCallback)((function(){var e=pd.select(o.current),a=0,c=0,s=0,d=336-s-c,u=140-a-0,m=function(){var e="Day"===i?vd:xd,a=bd.a(fd.a(yd,[],e,t));if(!a.length&&!n.length){var o={created:(new Date).toISOString(),profit:0};return[[o,Od(o,-36e5,0)],!0]}if(!a.length&&n.length){var l={created:(new Date).toISOString(),profit:0};return[[l,Od(l,-wd[i],1)],!1]}if(a.length&&!n.length){var c={created:(new Date).toISOString(),profit:1};return[[c,Od(c,-wd[i],0)],!1]}return 1===a.length?[jd.a({created:new Date(Date.now()-wd[i]).toISOString(),profit:r},a),!1]:[a,!1]}(),h=Object(l.a)(m,2),p=h[0],b=h[1];e.attr("width",d),e.append("rect").attr("x",0).attr("y",-a).attr("width",d+s+c).attr("height",u+a).attr("fill",ae).attr("transform","translate(".concat(0,",",a,")")),e.append("linearGradient").attr("id","area-gradient").attr("gradientUnits","userSpaceOnUse").attr("x1",0).attr("y1",0).attr("x2",0).attr("y2","100%").selectAll("stop").data([{offset:"0%",color:G},{offset:"25%",color:G},{offset:"100%",color:ae}]).enter().append("stop").attr("offset",(function(e){return e.offset})).attr("stop-color",(function(e){return e.color}));var f=e.append("g").attr("transform","translate(".concat(s,",").concat(a,")")),j=pd.extent(p,(function(e){return e.created})),g=b?[0,.1]:[0,pd.max(p,(function(e){return e.profit}))],O=pd.scaleLinear().range([u,40]).domain([0,g[1]]),x=pd.scaleTime().domain([new Date(j[0]),new Date(j[1])]).range([0,d]),v=pd.line().x((function(e){return x(new Date(e.created))})).y((function(e){return O(e.profit)})),y=pd.area().x((function(e){return x(new Date(e.created))})).y0(u).y1((function(e){return O(e.profit)}));f.append("path").datum(p).attr("d",y).attr("fill","url(#area-gradient)"),f.append("path").datum(p).attr("d",v).attr("fill","none").attr("stroke-width","2").attr("stroke-linejoin","round").attr("stroke",J)}),[t,i,n,r]);return Object(a.useEffect)((function(){pd.select(o.current).selectAll("*").remove(),c()}),[c,t]),Object(ze.jsx)(ze.Fragment,{children:Object(ze.jsx)("svg",{ref:o})})},kd=n(961),Ed=n(962),Nd=n(963),Sd=6e4,Id=864e5,Fd=6048e5,Ld=2592e6,Pd=function(e){var t,n=e.data,r=e.timeFrame,i=e.timezone,o=Object(a.useRef)(null),l=250,c=555,s=Object(a.useMemo)((function(){return{top:20,right:.5,bottom:27,left:43.5}}),[]),d=Object(td.a)(i),u=Date.now()+d,m={Day:[u-Id,u],Week:[u-Fd,u],Month:[u-Ld,u]},h=Object(a.useMemo)((function(){return{Day:{freq:24,step:36e5,tick:pd.utcHour.every(4),labelFormat:"%H:%M"},Week:{freq:7,step:864e5,tick:pd.utcDay.every(1),labelFormat:"%a %d"},Month:{freq:30,step:864e5,tick:pd.utcDay.every(2),labelFormat:"%d"}}}),[]),p=Object(a.useCallback)((function(e){return"day"===r?0===e.getUTCHours():1===e.getUTCDate()}),[r]),b=Object(a.useCallback)((function(e){var t=new Date(e),n=t.getUTCDate(),a=t.getUTCDay(),r=t.getUTCMonth(),i=new Date(t.getTime());i.setUTCDate(n-1);var o=i.getUTCDate(),l=i.getUTCDay(),c=i.getUTCMonth(),s=Array.from(Array(7)).map((function(e,t){return Object(od.a)("EEE",Object(kd.a)({days:t},Object(Ed.a)(new Date)))})),d=Array.from(Array(12)).map((function(e,t){return Object(od.a)("LLL",Object(kd.a)({months:t},Object(Nd.a)(new Date)))}));return{previous:r!==c?d[c]:"".concat(s[l]," ").concat(o),current:r!==c?d[r]:"".concat(s[a]," ").concat(n)}}),[]),f=Object(a.useCallback)((function(e){for(var t=[],n=function(e){var t=h[r].step;return new Date(Math.ceil(e.valueOf()/t)*t)},a=0;a<=h[r].freq;a++){var i=new Date(u-a*h[r].step);n(i)>e[1]||(i div":{display:"flex",flexDirection:"row",alignItems:"center",marginLeft:15,"&:first-child":{marginLeft:0},"& > p":{marginLeft:8}}},txGraphContainer:{height:300,marginTop:30},commissionsGraphContainer:{height:250,marginTop:30},verticalLine:{height:15,width:1,backgroundColor:de,marginLeft:31,marginRight:16}},Td=Object(f.a)(Rd),Bd=["Month","Week","Day"],Ad=function(e){var t=e.handleSetRange,n=e.showPicker,r=Td(),i=Object(a.useState)("Day"),o=Object(l.a)(i,2),c=o[0],s=o[1],d=zr.a(c);return Object(ze.jsxs)("div",{className:I()(r.titleWrapper),children:[Object(ze.jsx)("div",{className:r.titleAndButtonsContainer,children:Object(ze.jsx)(Xe,{className:r.h4,children:"System performance"})}),n&&Object(ze.jsx)("div",{className:r.navContainer,children:Bd.map((function(e,n){return Object(ze.jsx)("div",{onClick:function(e){return n=e.target.innerText,s(n),void t(n);var n},className:d(e)?I()(r.newHighlightedLabel,r.navButton):I()(r.label,r.navButton),children:e},n)}))})]})};zc.a.config({ROUNDING_MODE:zc.a.ROUND_HALF_UP});var Md=R.a(T.a("fiat")),Wd=Object(f.a)(Rd),zd=R.a(T.a("cashInFee")),qd=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=t?new Date(t):new Date;return Object(ms.a)({seconds:e},n)},$d={Day:{left:qd(172800,new Date),right:qd(86400,new Date)},Week:{left:qd(1209600,new Date),right:qd(604800,new Date)},Month:{left:qd(5184e3,new Date),right:qd(2592e3,new Date)}},Hd=x()(Ys||(Ys=Object(c.a)(["\n query getData($excludeTestingCustomers: Boolean) {\n transactions(excludeTestingCustomers: $excludeTestingCustomers) {\n fiatCode\n fiat\n cashInFee\n commissionPercentage\n created\n txClass\n error\n }\n fiatRates {\n code\n name\n rate\n }\n config\n }\n"]))),Vd=function(e,t){return e+Number.parseFloat(t.commissionPercentage)*Number.parseFloat(t.fiat)},Ud=function(){var e,t,n,r,i=Wd(),o=Object(a.useState)("Day"),c=Object(l.a)(o,2),d=c[0],m=c[1],p=Object(u.c)(Hd,{variables:{excludeTestingCustomers:!0}}),b=p.data,f=p.loading,j=os("locale")(null===b||void 0===b?void 0:b.config).fiatCurrency,g=os("locale")(null===b||void 0===b?void 0:b.config).timezone,O=function(e){return function(t){return null===t.error&&(e?null===t.error&&Object(hs.a)($d[d].left,cd(t.created,g))&&Object(hs.a)(cd(t.created,g),$d[d].right):null===t.error&&Object(hs.a)($d[d].right,cd(t.created,g))&&Object(hs.a)(cd(t.created,g),new Date))}},x=function(e){if(e.fiatCode===j)return e;var t=Da.a(W.a("code",e.fiatCode))(b.fiatRates),n=Da.a(W.a("code",j))(b.fiatRates).rate/t.rate;return Object(s.a)(Object(s.a)({},e),{},{fiat:parseFloat(e.fiat)*n})},v=R.a(x)(M.a(O(!1),null!==(e=null===b||void 0===b?void 0:b.transactions)&&void 0!==e?e:[])),y=R.a(x)(M.a(O(!0),null!==(t=null===b||void 0===b?void 0:b.transactions)&&void 0!==t?t:[])),w=function(e){var t=ps.a(zd(e)),n=bs.a(Vd,0,e);return new zc.a(n+t)},C=function(){var e=fs.a(W.a("txClass","cashIn"))(v),t=Object(l.a)(e,2),n=t[0],a=t[1],r=n.length+a.length;return 0===r?{cashIn:0,cashOut:0}:{cashIn:Math.round(n.length/r*100),cashOut:Math.round(a.length/r*100)}},k=function(){var e=w(v),t=w(y);return e.eq(t)?0:t.eq(0)?100:e.minus(t).times(100).div(t).toNumber()}(),E=(n={},Object(z.a)(n,i.percentDown,k<0),Object(z.a)(n,i.percentUp,k>0),Object(z.a)(n,i.percentNeutral,0===k),n);return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Ad,{showPicker:!f&&!Ta.a(b.transactions),handleSetRange:m}),!f&&Ta.a(b.transactions)&&Object(ze.jsx)(Cs,{className:i.emptyTransactions,message:"No transactions so far"}),!f&&!Ta.a(b.transactions)&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsxs)(h.a,{container:!0,spacing:2,children:[Object(ze.jsx)(h.a,{item:!0,xs:3,children:Object(ze.jsx)(Dd,{info:pn.a(v),label:"transactions"})}),Object(ze.jsx)(h.a,{item:!0,xs:3,children:Object(ze.jsx)(Dd,{info:new zc.a(ps.a(Md(v))).toFormat(2),label:"".concat(null===b||void 0===b?void 0:b.config.locale_fiatCurrency," volume")})})]}),Object(ze.jsx)(h.a,{container:!0,className:i.txGraphContainer,children:Object(ze.jsxs)(h.a,{item:!0,xs:12,children:[Object(ze.jsxs)("div",{className:i.graphHeader,children:[Object(ze.jsx)(at,{noMargin:!0,children:"Transactions"}),Object(ze.jsxs)("div",{className:i.labelWrapper,children:[Object(ze.jsxs)(Ke,{noMargin:!0,children:[null!==(r=nd[g].short)&&void 0!==r?r:nd[g].long," ","timezone"]}),Object(ze.jsx)("span",{className:i.verticalLine}),Object(ze.jsxs)("div",{children:[Object(ze.jsx)("svg",{width:8,height:8,children:Object(ze.jsx)("rect",{width:8,height:8,rx:4,fill:_})}),Object(ze.jsx)(nt,{noMargin:!0,children:"In"})]}),Object(ze.jsxs)("div",{children:[Object(ze.jsx)("svg",{width:8,height:8,children:Object(ze.jsx)("rect",{width:8,height:8,rx:4,fill:K})}),Object(ze.jsx)(nt,{noMargin:!0,children:"Out"})]})]})]}),Object(ze.jsx)(Pd,{timeFrame:d,data:v,timezone:g})]})}),Object(ze.jsxs)(h.a,{container:!0,className:i.commissionGraphContainer,children:[Object(ze.jsxs)(h.a,{item:!0,xs:8,children:[Object(ze.jsx)(at,{noMargin:!0,className:i.commissionProfitTitle,children:"Profit from commissions"}),Object(ze.jsxs)("div",{className:i.profitContainer,children:[Object(ze.jsx)("div",{className:i.profitLabel,children:"".concat(w(v).toFormat(2)," ").concat(null===b||void 0===b?void 0:b.config.locale_fiatCurrency)}),Object(ze.jsxs)("div",{className:I()(E),children:[0===k?Object(ze.jsx)(Xs,{className:i.directionIcon}):k>0?Object(ze.jsx)(Js,{className:i.directionIcon}):Object(ze.jsx)($s,{className:i.directionIcon}),"".concat(new zc.a(k).toFormat(2),"%")]})]}),Object(ze.jsx)(Cd,{timeFrame:d,data:v,previousTimeData:y,previousProfit:w(y)})]}),Object(ze.jsxs)(h.a,{item:!0,xs:4,children:[Object(ze.jsxs)(h.a,{container:!0,className:i.graphHeader,children:[Object(ze.jsx)(at,{noMargin:!0,children:"Direction"}),Object(ze.jsxs)("div",{className:i.labelWrapper,children:[Object(ze.jsxs)("div",{children:[Object(ze.jsx)("svg",{width:8,height:8,children:Object(ze.jsx)("rect",{width:8,height:8,rx:2,fill:_})}),Object(ze.jsx)(nt,{noMargin:!0,children:"In"})]}),Object(ze.jsxs)("div",{children:[Object(ze.jsx)("svg",{width:8,height:8,children:Object(ze.jsx)("rect",{width:8,height:8,rx:2,fill:K})}),Object(ze.jsx)(nt,{noMargin:!0,children:"Out"})]})]})]}),Object(ze.jsx)(h.a,{item:!0,xs:!0,children:Object(ze.jsx)(hd,{cashIn:C().cashIn,cashOut:C().cashOut})})]})]})]})]})},Gd=Object(f.a)(Mc),Xd=function(){var e=Gd();return Object(ze.jsx)(h.a,{item:!0,xs:12,className:e.displayFlex,children:Object(ze.jsx)("div",{className:e.card,children:Object(ze.jsx)(Ud,{})})})},_d=n(861),Kd=Object.freeze({DEFAULT:"default",SHRUNK:"shrunk",EXPANDED:"expanded"}),Zd={card:{wordWrap:"break-word",boxShadow:"0 0 4px 0 rgba(0, 0, 0, 0.08)",borderRadius:12,padding:24,backgroundColor:Z}},Qd=Object(f.a)(Zd),Yd=function(e){var t=e.className,n=e.state,a=e.shrunkComponent,r=e.children,i=Qd();return Object(ze.jsx)(h.a,{item:!0,className:I()(t,i.card),children:n===Kd.SHRUNK?a:r})},Jd={container:{display:"flex",justifyContent:"space-between"},h4:{margin:0,marginBottom:10},centerLabel:{marginBottom:0,padding:0,textAlign:"center"},upperButtonLabel:{marginTop:-3,marginBottom:24},button:{color:J,marginTop:0,minHeight:0,minWidth:0,padding:0,textTransform:"none","&:hover":{backgroundColor:"transparent"}},alertsTableContainer:{margin:0},expandedAlertsTableContainer:{margin:0,maxHeight:460},noAlertsLabel:{color:$,marginLeft:-5,height:100},table:{maxHeight:465,overflowX:"hidden",overflowY:"auto"},listItemText:{margin:"8px 0 8px 0"},linkIcon:{marginLeft:"auto",cursor:"pointer"}},eu=n(837),tu=n(792),nu=n(109);function au(){return(au=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var iu=a.createElement("g",{id:"DASHBOARD",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"dashboard_v9#1-(week)",transform:"translate(-772.000000, -212.000000)"},a.createElement("g",{id:"dashboard/row/alert/positive",transform:"translate(756.000000, 204.000000)"},a.createElement("g",{id:"Group-2",transform:"translate(16.000000, 8.000000)"},a.createElement("polygon",{id:"Rectangle-2-Copy-45",fill:"#FF584A",fillRule:"nonzero",points:"0 11 16 11 16 16 0 16"}),a.createElement("rect",{id:"Rectangle-Copy-10",stroke:"#FF584A",strokeWidth:2,x:1,y:1,width:14,height:14})))));function ou(e,t){var n=e.title,r=e.titleId,i=ru(e,["title","titleId"]);return a.createElement("svg",au({width:"16px",height:"16px",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"07E3DD15-D5E4-46A8-BF7B-064F598230CE"):n?a.createElement("title",{id:r},n):null,iu)}var lu=a.forwardRef(ou);n.p;function cu(){return(cu=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var du=a.createElement("defs",null,a.createElement("circle",{id:"path-1-right",cx:10,cy:10,r:10})),uu=a.createElement("g",{id:"Symbols",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"pop-up/action/download-logs/date-range-copy-2",transform:"translate(-232.000000, -187.000000)"},a.createElement("g",{id:"icon/sf-contain-b-copy-4",transform:"translate(242.000000, 197.000000) scale(-1, 1) rotate(-270.000000) translate(-242.000000, -197.000000) translate(232.000000, 187.000000)"},a.createElement("mask",{id:"mask-2",fill:"white"},a.createElement("use",{xlinkHref:"#path-1-right"})),a.createElement("use",{id:"Mask",fill:"#EBEFFF",fillRule:"nonzero",xlinkHref:"#path-1-right"}),a.createElement("g",{id:"icon/sf-small/wizzard",mask:"url(#mask-2)",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{transform:"translate(6.666667, 6.000000)",id:"Group"},a.createElement("g",null,a.createElement("polyline",{id:"Path-3",stroke:"#1B2559",strokeWidth:2,points:"0 4.83333333 3.33333333 8.16666667 6.66666667 4.83333333"}),a.createElement("line",{x1:3.33333333,y1:.25,x2:3.33333333,y2:6.5,id:"Path-4",stroke:"#1B2559",strokeWidth:2})))))));function mu(e,t){var n=e.title,r=e.titleId,i=su(e,["title","titleId"]);return a.createElement("svg",cu({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,du,uu)}var hu,pu,bu,fu,ju=a.forwardRef(mu),gu=(n.p,Object(f.a)(Jd)),Ou={error:Object(ze.jsx)(Qt,{style:{height:20,width:20,marginRight:12}}),fiatBalance:Object(ze.jsx)(lu,{style:{height:18,width:18,marginRight:14}})},xu={error:"/maintenance/machine-status",fiatBalance:"/maintenance/cash-cassettes",cryptoBalance:"/maintenance/funding"},vu=function(e){var t=e.numToRender,n=e.alerts,a=e.machines,r=Object(w.h)(),i=gu(),o=nu.a(0,t,n),l=function(e){var t=e.detail.deviceId;if(!t)return"".concat(e.message);var n=Ba.a("Unpaired device",a[t]);return"".concat(e.message," - ").concat(n)};return Object(ze.jsx)(eu.a,{dense:!0,className:i.table,children:o.map((function(e,t){return Object(ze.jsxs)(tu.a,{children:[Ou[e.type]||Object(ze.jsx)(At,{style:{height:23,width:23,marginRight:8}}),Object(ze.jsx)(Ke,{className:i.listItemText,children:l(e)}),Object(ze.jsx)(ju,{className:i.linkIcon,onClick:function(){return r.push(xu[e.type]||"/dashboard")}})]},t)}))})},yu=x()(hu||(hu=Object(c.a)(["\n query getAlerts {\n alerts {\n id\n type\n detail\n message\n created\n read\n valid\n }\n machines {\n deviceId\n name\n }\n }\n"]))),wu=Object(f.a)(Jd),Cu=function(e){var t,n,a,r=e.onReset,i=e.onExpand,o=e.size,l=wu(),c=o===Kd.EXPANDED,s=Object(u.c)(yu).data,d=null!==(t=A.a(["alerts"])(s))&&void 0!==t?t:[],m=L.a(R.a(T.a("name")),B.a(T.a("deviceId")))(null!==(n=null===s||void 0===s?void 0:s.machines)&&void 0!==n?n:[]),p=d.length,b=(a={},Object(z.a)(a,l.alertsTableContainer,!c),Object(z.a)(a,l.expandedAlertsTableContainer,c),a);return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsxs)("div",{className:l.container,children:[Object(ze.jsx)(Xe,{className:l.h4,children:"Alerts (".concat(p,")")}),c&&Object(ze.jsx)(nt,{className:l.upperButtonLabel,children:Object(ze.jsx)(_d.a,{onClick:r,size:"small",disableRipple:!0,disableFocusRipple:!0,className:l.button,children:"Show less"})})]}),Object(ze.jsx)(h.a,{className:I()(b),container:!0,spacing:1,children:Object(ze.jsxs)(h.a,{item:!0,xs:12,children:[!d.length&&Object(ze.jsx)(nt,{className:l.noAlertsLabel,children:"No new alerts. Your system is running smoothly."}),Object(ze.jsx)(vu,{numToRender:c?d.length:3,alerts:d,machines:m})]})}),!c&&p>3&&Object(ze.jsx)(h.a,{item:!0,xs:12,children:Object(ze.jsx)(nt,{className:l.centerLabel,children:Object(ze.jsx)(_d.a,{onClick:function(){return i("alerts")},size:"small",disableRipple:!0,disableFocusRipple:!0,className:l.button,children:"Show all (".concat(d.length,")")})})})]})},ku=n(864),Eu=n(868),Nu=n(862),Su=n(863),Iu=n(865),Fu=n(866),Lu=n(464),Pu=n(867),Du=n(439),Ru=n(869),Tu={error:Q,warning:"#ff7311",success:ne,neutral:J},Bu={error:Y,warning:"#fbf3ec",success:V,neutral:G},Au=Object(f.a)({root:{borderRadius:4,marginTop:4,marginRight:2,marginBottom:4,marginLeft:2,height:24,backgroundColor:function(e){var t=e.type;return Bu[t]}},label:{fontSize:Ce,fontWeight:Se,fontFamily:Ie,paddingRight:4,paddingLeft:4,color:function(e){var t=e.type;return Tu[t]}}}),Mu=function(e){var t=e.status,n=Au({type:t.type});return Object(ze.jsx)(Dr.a,{type:t.type,label:t.label,classes:n})},Wu=function(e){var t=e.statuses,n=t.find((function(e){return"error"===e.type}))||t.find((function(e){return"warning"===e.type}))||t[0],a={label:"+".concat(t.length-1),type:n.type};return Object(ze.jsxs)("div",{children:[Object(ze.jsx)(Mu,{status:n}),t.length>1&&Object(ze.jsx)(Mu,{status:a})]})},zu={container:{display:"flex",justifyContent:"space-between"},label:{margin:0,color:se},row:{backgroundColor:ae,borderBottom:"none"},clickableRow:{cursor:"pointer"},header:{display:"flex",alignItems:"center",whiteSpace:"pre"},error:{color:he},button:{color:J,minHeight:0,minWidth:0,padding:0,textTransform:"none","&:hover":{backgroundColor:"transparent"},marginBottom:-40},buttonLabel:{position:"absolute",bottom:160,marginBottom:0},upperButtonLabel:{textAlign:"center",marginBottom:0,marginTop:0},statusHeader:{marginLeft:2},table:{maxHeight:440,"&::-webkit-scrollbar":{width:7},"&::-webkit-scrollbar-thumb":{backgroundColor:se,borderRadius:5}},tableBody:{overflow:"auto"},h4:{marginTop:0},tl2:{display:"inline"},label1:{display:"inline"},machinesTableContainer:{marginTop:10,height:220},expandedMachinesTableContainer:{marginTop:10,height:414},centerLabel:{marginBottom:0,padding:0,textAlign:"center"},machineNameWrapper:{display:"flex",flexDirection:"row",alignItems:"center"},machineRedirectIcon:{marginLeft:10}},qu=x()(pu||(pu=Object(c.a)(["\n query getConfig {\n config\n }\n"]))),$u=Object(f.a)(zu),Hu=Object(Rr.a)({root:{borderBottom:"4px solid white",padding:0,paddingLeft:15}})(Nu.a),Vu=Object(Rr.a)({root:{borderBottom:"4px solid white",padding:0,paddingLeft:15,backgroundColor:"white"}})(Nu.a),Uu=function(e){var t,n=e.machines,a=void 0===n?[]:n,r=e.numToRender,i=$u(),o=Object(w.h)(),l=Object(u.c)(qu).data,c=os("notifications",null!==(t=A.a(["config"],l))&&void 0!==t?t:{}),s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return Math.round(e/t*100)},m=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:500,a=s(t,n),r=Lu.a(A.a(["fillingPercentageCassette".concat(e)]),Ba.a(20))(c);return a=t?Object(ze.jsx)(Hu,{align:"left",children:m(t,e["cassette".concat(t)])}):Object(ze.jsx)(Hu,{align:"left",children:Object(ze.jsx)(tt,{children:"\u2014 %"})})}),Ru.a(1,p+1))]},e.deviceId+t):null}))})]})})},Gu=Object(f.a)(zu),Xu=x()(bu||(bu=Object(c.a)(["\n query getData {\n machines {\n name\n deviceId\n cashbox\n cassette1\n cassette2\n cassette3\n cassette4\n numberOfCassettes\n statuses {\n label\n type\n }\n }\n serverVersion\n uptime {\n name\n state\n uptime\n }\n }\n"]))),_u=function(e){var t,n,a=e.onReset,r=e.onExpand,i=e.size,o=Gu(),l=Object(u.c)(Xu),c=l.data,s=l.loading,d=null!==(t=A.a(["machines"])(c))&&void 0!==t?t:[],m=i===Kd.EXPANDED,p=(n={},Object(z.a)(n,o.machinesTableContainer,!m),Object(z.a)(n,o.expandedMachinesTableContainer,m),n);return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsxs)("div",{className:o.container,children:[Object(ze.jsx)(Xe,{className:o.h4,children:"System status"})," ",m&&Object(ze.jsx)(nt,{className:o.upperButtonLabel,children:Object(ze.jsx)(_d.a,{onClick:a,size:"small",disableRipple:!0,disableFocusRipple:!0,className:o.button,children:"Show less"})})]}),!s&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsxs)(h.a,{container:!0,spacing:1,children:[Object(ze.jsxs)(h.a,{item:!0,xs:4,children:[Object(ze.jsx)(tt,{className:o.tl2,children:null===c||void 0===c?void 0:c.serverVersion}),Object(ze.jsx)(nt,{className:o.label1,children:" server version"})]}),Object(ze.jsx)(h.a,{item:!0,xs:4})]}),Object(ze.jsx)(h.a,{container:!0,spacing:1,className:I()(p),children:Object(ze.jsx)(h.a,{item:!0,xs:12,children:Object(ze.jsx)(Uu,{numToRender:m?1/0:4,machines:d})})}),!m&&d.length>4&&Object(ze.jsx)(h.a,{item:!0,xs:12,children:Object(ze.jsx)(nt,{className:o.centerLabel,children:Object(ze.jsx)(_d.a,{onClick:function(){return r()},size:"small",disableRipple:!0,disableFocusRipple:!0,className:o.button,children:"Show all (".concat(d.length,")")})})})]})]})},Ku=Object(f.a)(Mc),Zu=function(e){var t=e.title,n=e.buttonName,a=e.onUnshrink,r=Ku();return Object(ze.jsxs)("div",{className:r.container,children:[Object(ze.jsx)(Xe,{className:r.h4,children:t}),Object(ze.jsx)(nt,{className:r.upperButtonLabel,children:Object(ze.jsx)(_d.a,{onClick:a,size:"small",disableRipple:!0,disableFocusRipple:!0,className:r.button,children:n})})]})},Qu=function(){var e,t,n=Ku(),r=Object(a.useState)(Kd.DEFAULT),i=Object(l.a)(r,2),o=i[0],c=i[1],s=Object(a.useState)(Kd.DEFAULT),d=Object(l.a)(s,2),u=d[0],m=d[1],p=function(){m(Kd.DEFAULT),c(Kd.DEFAULT)};return Object(ze.jsx)(h.a,{item:!0,xs:12,className:n.displayFlex,children:Object(ze.jsx)("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Yd,{className:I()((e={},Object(z.a)(e,n.alertsCard,u!==Kd.SHRUNK),Object(z.a)(e,n.shrunkCard,u===Kd.SHRUNK),Object(z.a)(e,n.expandedCard,u===Kd.EXPANDED),e)),state:u,shrunkComponent:Object(ze.jsx)(Zu,{title:"Alerts",buttonName:"Show alerts",onUnshrink:p}),children:Object(ze.jsx)(Cu,{onExpand:function(){m(Kd.EXPANDED),c(Kd.SHRUNK)},onReset:p,size:u})}),Object(ze.jsx)(Yd,{className:I()((t={},Object(z.a)(t,n.shrunkCard,o===Kd.SHRUNK),Object(z.a)(t,n.systemStatusCard,o!==Kd.SHRUNK),Object(z.a)(t,n.expandedCard,u===Kd.EXPANDED),t)),state:o,shrunkComponent:Object(ze.jsx)(Zu,{title:"System status",buttonName:"Show machines",onUnshrink:p}),children:Object(ze.jsx)(_u,{onExpand:function(){c(Kd.EXPANDED),m(Kd.SHRUNK)},onReset:p,size:o})})]})})})},Yu=Object(f.a)(Mc),Ju=x()(fu||(fu=Object(c.a)(["\n query getData {\n machines {\n name\n }\n serverVersion\n }\n"]))),em=function(){var e=Object(w.h)(),t=Yu(),n=Object(a.useState)(!1),r=Object(l.a)(n,2),i=r[0],o=r[1],c=Object(u.c)(Ju),s=c.data;return c.loading?Object(ze.jsx)(ze.Fragment,{}):Ta.a(s.machines)?Object(ze.jsxs)(ze.Fragment,{children:[i&&Object(ze.jsx)(ao,{close:function(){return o(!1)},onPaired:function(t){o(!1),e.push("/maintenance/machine-status",{id:t.deviceId})}}),Object(ze.jsx)(rl,{title:"Dashboard",children:Object(ze.jsx)("div",{className:t.headerLabels,children:Object(ze.jsxs)("span",{children:[Object(ze.jsx)(tt,{className:t.inline,children:null===s||void 0===s?void 0:s.serverVersion})," ",Object(ze.jsx)(nt,{className:t.inline,children:" server version"})]})})}),Object(ze.jsx)("div",{className:t.emptyMachinesRoot,children:Object(ze.jsxs)("div",{className:t.emptyMachinesContent,children:[Object(ze.jsx)(Ve,{className:t.offColor,children:"No machines on your system yet"}),Object(ze.jsx)(Qe,{className:t.offColor,children:"To fully take advantage of Lamassu Admin, add a new machine to your system"}),Object(ze.jsx)(Dn,{onClick:function(){return o(!0)},children:"+ Add new machine"})]})}),Object(ze.jsx)(us,{})]}):Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(rl,{title:"Dashboard",children:Object(ze.jsxs)("div",{className:t.headerLabels,children:[Object(ze.jsxs)("div",{children:[Object(ze.jsx)(Fc,{}),Object(ze.jsx)("span",{children:"Cash-in"})]}),Object(ze.jsxs)("div",{children:[Object(ze.jsx)(Ac,{}),Object(ze.jsx)("span",{children:"Cash-out"})]}),Object(ze.jsxs)("div",{children:[Object(ze.jsx)("svg",{width:12,height:12,children:Object(ze.jsx)("rect",{width:12,height:12,rx:3,fill:he})}),Object(ze.jsx)("span",{children:"Action Required"})]})]})}),Object(ze.jsx)("div",{className:t.root,children:Object(ze.jsxs)(h.a,{container:!0,children:[Object(ze.jsx)(h.a,{container:!0,direction:"column",item:!0,xs:6,children:Object(ze.jsx)(Xd,{})}),Object(ze.jsx)(h.a,{container:!0,direction:"column",item:!0,xs:6,children:Object(ze.jsx)(Qu,{})})]})}),Object(ze.jsx)(us,{})]})},tm=n(941),nm=n(208),am=n.n(nm),rm=n(881),im=n(882),om=n(883),lm=n(450),cm=n(879),sm=n(949),dm=n(877),um=n(193),mm=n(878),hm=n(943),pm="You have unsaved changes on this page. Are you sure you want to leave?",bm=function(e){var t=e.message,n=void 0===t?pm:t,r=Object(un.f)(),i=r.dirty&&0===r.submitCount;Object(a.useEffect)((function(){window.onbeforeunload=i?o:void 0}),[i]);var o=function(){return pm};return Object(ze.jsx)(w.a,{when:i,message:n})},fm=n(870),jm=n(871),gm=Ae.tl2,Om=Ae.label1,xm={size:function(e){var t=e.size;return Wa(t)},bold:za,header:{extend:gm,backgroundColor:De,height:Fe,textAlign:"left",color:Z,display:"flex",alignItems:"center"},doubleHeader:{extend:gm,backgroundColor:De,height:Pe,color:Z,display:"table-row"},thDoubleLevel:function(e){return{width:e.width,display:"table-cell","& > :first-child":{margin:[[0,10]],extend:Om,fontWeight:700,display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:se,color:Z,borderRadius:[[0,0,8,8]],height:28},"& > :last-child":{padding:[[0,11]],display:"table-cell",verticalAlign:"middle",height:Pe-28}}},cellDoubleLevel:{display:"flex",padding:[[0,16]]},td:function(e){var t=e.textAlign;return{width:e.width,padding:[[1,24,0,24]],textAlign:t}},tdHeader:{verticalAlign:"middle",display:"table-cell",padding:[[0,24]]},trError:{backgroundColor:Re},trAdding:{backgroundColor:Te},mainContent:function(e){return{display:"flex",alignItems:"center",minHeight:{sm:34,lg:68}[e.size]||48}},cardContentRoot:{margin:0,padding:0,"&:last-child":{padding:0}},card:{extend:Ae.p,"&:before":{height:0},margin:[[4,0,0,0]],width:"100%",boxShadow:[[0,0,4,0,"rgba(0, 0, 0, 0.08)"]]},actionCol:{marginLeft:"auto"},errorContent:{padding:[[12,0,12,24]],color:he}},vm=Object(f.a)(xm),ym=function(e){var t=e.children,n=e.className,a=Object(q.a)(e,["children","className"]);return Object(ze.jsx)("div",Object(s.a)(Object(s.a)({className:I()(n)},a),{},{children:t}))},wm=function(e){var t=e.children,n=e.className,a=vm();return Object(ze.jsx)("div",{className:I()(n,a.header),children:t})},Cm=function(e){var t=e.children,n=e.className,a=vm();return Object(ze.jsx)("div",{className:I()(n,a.doubleHeader),children:t})},km=function(e){var t=e.children,n=e.className;return Object(ze.jsx)("div",{className:I()(n),children:t})},Em=function(e){var t,n=e.children,a=e.header,r=e.className,i=e.width,o=void 0===i?100:i,l=e.size,c=e.bold,s=e.textAlign,d=e.action,u=vm({textAlign:s,width:o,size:l}),m=(t={},Object(z.a)(t,u.td,!0),Object(z.a)(t,u.tdHeader,a),Object(z.a)(t,u.actionCol,d),Object(z.a)(t,u.size,!a),Object(z.a)(t,u.bold,!a&&c),t);return Object(ze.jsx)("div",{className:I()(r,m),children:n})},Nm=function(e){var t=e.children,n=Object(q.a)(e,["children"]);return Object(ze.jsx)(Em,Object(s.a)(Object(s.a)({header:!0},n),{},{children:t}))},Sm=function(e){var t=e.title,n=e.children,a=e.className,r=e.width,i=vm({width:r});return Object(ze.jsxs)("div",{className:I()(a,i.thDoubleLevel),children:[Object(ze.jsx)("div",{children:t}),Object(ze.jsx)("div",{children:n})]})},Im=function(e){var t,n=e.onClick,a=e.error,r=e.errorMessage,i=e.shouldShowError,o=e.children,l=e.className,c=e.size,s=e.newRow,d=vm({size:c}),u={root:d.cardContentRoot},m=(t={},Object(z.a)(t,d.tr,!0),Object(z.a)(t,d.trError,a),Object(z.a)(t,d.card,!0),Object(z.a)(t,d.trAdding,s),Object(z.a)(t,"className",l),t);return Object(ze.jsx)(ze.Fragment,{children:Object(ze.jsx)(fm.a,{className:I()(m,l),onClick:n,children:Object(ze.jsxs)(jm.a,{classes:u,children:[Object(ze.jsx)("div",{className:d.mainContent,children:o}),a&&i&&Object(ze.jsx)("div",{className:d.errorContent,children:r})]})})})},Fm=r.a.createContext(),Lm=n(873),Pm=n(874),Dm=n(938),Rm=n(872),Tm=n(267),Bm=Tm.create({checkTypes:!1,env:Tm.env}),Am=Bm.compose(Bm.joinWith(""))(Vc.a(0,Bm.toLower)),Mm=Bm.compose(Bm.joinWith(""))(Vc.a(0,Bm.toUpper)),Wm=Bm.compose(Mm)(Bm.toLower),zm=L.a(Bm.splitOn(" "),Rm.a(/([A-Z])/g," $1"),Am),qm=L.a(Bm.joinWith(" "),Bm.map(Wm),zm),$m=function(e,t,n){return 1===parseInt(e)?t:n},Hm=Object(f.a)({orderedBySpan:{whiteSpace:"nowrap"}}),Vm=function(){var e=Hm(),t=Object(a.useContext)(Fm),n=t.elements,r=t.enableEdit,i=t.enableEditText,o=t.editWidth,c=t.enableDelete,s=t.deleteWidth,d=t.enableToggle,u=t.toggleWidth,m=t.orderedBy,h=t.DEFAULT_COL_SIZE,p=function(t,n){var a,r=t.name,i=t.width,o=void 0===i?h:i,l=t.header,c=t.textAlign,s=I()(Object(z.a)({},e.orderedBySpan,D.a(l)&&!D.a(m)&&zr.a(r,m.code)));return Object(ze.jsx)(Em,{header:!0,width:o,textAlign:c,children:D.a(l)?Object(ze.jsxs)("span",{className:s,children:[qm(r)," ",!D.a(m)&&zr.a(r,m.code)&&"-"]}):Object(ze.jsx)(ze.Fragment,{children:null!==(a=function(e){if(!D.a(m)&&zr.a(r,m.code))try{var t=Dm.a(e),n=A.a(["props","children"],t),a=Da.a((function(e){return zr.a(e.type,"span")}),n);return a.props.children=jd.a(" -",a.props.children),t}catch(i){return e}return e}(l))&&void 0!==a?a:l})},n)},b=function(e){var t=fs.a(ll.a("doubleHeader"))(e),n=Object(l.a)(t,2),a=n[0],r=n[1];if(!a.length)return[e,wm];var i=Lm.a(a[0],e),o=L.a(ps.a,R.a(A.a(["width"])))(a);return[Pm.a(i,{width:o,elements:a,name:a[0].doubleHeader},r),Cm]}(n),f=Object(l.a)(b,2),j=f[0],g=f[1];return Object(ze.jsxs)(g,{children:[j.map((function(e,t){var n=e.width,a=e.elements,r=e.name;return a&&a.length?Object(ze.jsx)(Sm,{width:n,title:r,children:a.map(p)},t):p(e,t)})),r&&Object(ze.jsx)(Em,{header:!0,width:o,textAlign:"center",children:null!==i&&void 0!==i?i:"Edit"}),c&&Object(ze.jsx)(Em,{header:!0,width:s,textAlign:"center",children:"Delete"}),d&&Object(ze.jsx)(Em,{header:!0,width:u,textAlign:"center",children:"Enable"})]})},Um=n(876),Gm=n(875),Xm=Object(f.a)({content:{width:434,padding:16,paddingRight:28},titleSection:{padding:16,paddingRight:12,display:"flex",justifyContent:"space-between",margin:0},actions:{padding:32,paddingTop:16},title:{margin:0},closeButton:{padding:0,marginTop:-4}}),_m=function(e){var t=e.children,n=e.close,a=Xm();return Object(ze.jsxs)("div",{className:a.titleSection,children:[t,n&&Object(ze.jsx)(Qn,{size:16,"aria-label":"close",onClick:n,className:a.closeButton,children:Object(ze.jsx)(Mi,{})})]})},Km=function(e){var t=e.title,n=void 0===t?"Confirm Delete":t,a=e.open,r=void 0!==a&&a,i=e.onConfirmed,o=e.onDismissed,l=e.item,c=void 0===l?"item":l,s=e.confirmationMessage,d=void 0===s?"Are you sure you want to delete this ".concat(c,"?"):s,u=e.errorMessage,m=void 0===u?"":u,h=Xm();return Object(ze.jsxs)(ln.a,{open:r,"aria-labelledby":"form-dialog-title",children:[Object(ze.jsx)(_m,{close:function(){return o()},children:Object(ze.jsx)(Xe,{className:h.title,children:n})}),m&&Object(ze.jsx)(_m,{children:Object(ze.jsx)(tl,{children:m.split(":").map((function(e){return Object(ze.jsxs)(ze.Fragment,{children:[e,Object(ze.jsx)("br",{})]})}))})}),Object(ze.jsx)(cn.a,{className:h.content,children:d&&Object(ze.jsx)(Ke,{children:d})}),Object(ze.jsx)(Gm.a,{className:h.actions,children:Object(ze.jsx)(Dn,{onClick:i,children:"Confirm"})})]})},Zm=n(463);function Qm(){return(Qm=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Jm=a.createElement("desc",null,"Created with Sketch."),eh=a.createElement("defs",null,a.createElement("path",{id:"arrow-path",d:"M5.3501239,7.53208616 L0.473798314,2.73082122 C-0.158421727,2.1051411 -0.158421727,1.0952488 0.476737158,0.466675069 C1.11220338,-0.155816755 2.1378971,-0.155816755 2.77494316,0.468226909 L6.49990857,4.13723769 L10.2264532,0.466675069 C10.8619195,-0.155816755 11.8876132,-0.155816755 12.5260183,0.469568675 C13.1582383,1.0952488 13.1582383,2.1051411 12.5245507,2.73226987 L7.64673876,7.53497972 C7.33802629,7.83583835 6.92590837,8 6.49990828,8 C6.0739082,8 5.66179027,7.83583835 5.3501239,7.53208616 Z"})),th=a.createElement("g",{id:"Styleguide",stroke:"none",strokeWidth:1,fillRule:"evenodd"},a.createElement("g",{id:"icon/action/arrow/regular"},a.createElement("mask",{id:"mask-2",fill:"white"},a.createElement("use",{xlinkHref:"#path-1"})),a.createElement("use",{id:"Mask",fillRule:"nonzero",xlinkHref:"#arrow-path"})));function nh(e,t){var n=e.title,r=e.titleId,i=Ym(e,["title","titleId"]);return a.createElement("svg",Qm({width:"13px",height:"8px",viewBox:"0 0 13 8",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,Jm,eh,th)}var ah=a.forwardRef(nh),rh=(n.p,Ae.p),ih=152,oh={selectedItem:{width:111,display:"block",whiteSpace:"nowrap",overflow:"hidden"},select:{width:ih,zIndex:2,"& label":{extend:Ae.label1,color:se,paddingLeft:10},"& button":{extend:rh,position:"relative",border:0,backgroundColor:re,width:ih,padding:[[6,0,6,12]],borderRadius:20,lineHeight:"1.14",textAlign:"left",color:se,cursor:"pointer",outline:"0 none"},"& ul":{maxHeight:"200px",width:ih,overflowY:"auto",position:"absolute",margin:0,borderTop:0,padding:0,borderRadius:[[0,0,8,8]],backgroundColor:re,outline:"0 none","& li":{extend:rh,listStyleType:"none",padding:[[6,12]],cursor:"pointer","& span":{width:"100%",display:"block",overflow:"hidden",whiteSpace:"nowrap"}},"& li:hover":{backgroundColor:se,color:Z}},"& svg":{position:"absolute",top:12,right:14,fill:se}},selectFiltered:{"& button":{backgroundColor:se,color:Z},"& ul":{"& li":{backgroundColor:se,color:Z},"& li:hover":{backgroundColor:re,color:se}},"& svg":{fill:[[Z],"!important"]}},open:{"& button":{borderRadius:[[8,8,0,0]]}}},lh=Object(f.a)(oh);var ch=function(e){var t,n=e.className,a=e.label,r=e.items,i=Object(q.a)(e,["className","label","items"]),o=lh(),l=Object(Zm.a)({items:r,selectedItem:i.selectedItem,onSelectedItemChange:function(e){i.onSelectedItemChange(e.selectedItem)}}),c=l.isOpen,d=l.selectedItem,u=l.getToggleButtonProps,m=l.getLabelProps,h=l.getMenuProps,p=l.getItemProps,b=(t={},Object(z.a)(t,o.select,!0),Object(z.a)(t,o.selectFiltered,!!i.defaultAsFilter||!zr.a(d,i.default)),Object(z.a)(t,o.open,c),t);return Object(ze.jsxs)("div",{className:I()(b,n),children:[Object(ze.jsx)("label",Object(s.a)(Object(s.a)({},m()),{},{children:a})),Object(ze.jsxs)("button",Object(s.a)(Object(s.a)({},u()),{},{children:[Object(ze.jsx)("span",{className:o.selectedItem,children:d.display}),Object(ze.jsx)(ah,{})]})),Object(ze.jsx)("ul",Object(s.a)(Object(s.a)({},h()),{},{children:c&&r.map((function(e,t){var n=e.code,a=e.display;return Object(ze.jsx)("li",Object(s.a)(Object(s.a)({},p({code:n,index:t})),{},{children:Object(ze.jsx)("span",{children:a})}),"".concat(n).concat(t))}))}))]})};function sh(){return(sh=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var uh=a.createElement("defs",null,a.createElement("path",{id:"a",d:"M0 0h22v22H0z"})),mh=a.createElement("g",{fill:"none",fillRule:"evenodd"},a.createElement("mask",{id:"b",fill:"#fff"},a.createElement("use",{xlinkHref:"#a"})),a.createElement("path",{stroke:"#9B9B9B",strokeWidth:2,strokeLinecap:"round",mask:"url(#b)",d:"M9 9v9M13 9v9"}),a.createElement("g",{mask:"url(#b)",stroke:"#9B9B9B",strokeLinecap:"round",strokeWidth:2},a.createElement("path",{strokeLinejoin:"round",d:"M3 6l2 15h12l2-15"}),a.createElement("path",{d:"M1 5h20M14 4a3 3 0 10-6 0"})));function hh(e,t){var n=e.title,r=e.titleId,i=dh(e,["title","titleId"]);return a.createElement("svg",sh({width:22,height:22,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,uh,mh)}var ph=a.forwardRef(hh);n.p;function bh(){return(bh=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var jh=a.createElement("desc",null,"Created with Sketch."),gh=a.createElement("g",{id:"icon/action/delete/enabled",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round"},a.createElement("line",{x1:9,y1:9,x2:9,y2:18,id:"Stroke-1",stroke:"#1B2559",strokeWidth:2}),a.createElement("line",{x1:13,y1:9,x2:13,y2:18,id:"Stroke-2",stroke:"#1B2559",strokeWidth:2}),a.createElement("polyline",{id:"Stroke-3",stroke:"#1B2559",strokeWidth:2,strokeLinejoin:"round",points:"3 6 5 21 17 21 19 6"}),a.createElement("line",{x1:1,y1:5,x2:21,y2:5,id:"Stroke-5",stroke:"#1B2559",strokeWidth:2}),a.createElement("path",{d:"M14,4 C14,2.343 12.657,1 11,1 C9.343,1 8,2.343 8,4",id:"Stroke-7",stroke:"#1B2559",strokeWidth:2}));function Oh(e,t){var n=e.title,r=e.titleId,i=fh(e,["title","titleId"]);return a.createElement("svg",bh({width:"22px",height:"22px",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,jh,gh)}var xh=a.forwardRef(Oh);n.p;function vh(){return(vh=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var wh=a.createElement("desc",null,"Created with Sketch."),Ch=a.createElement("g",{id:"icon/action/edit/disabled",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("path",{d:"M1,18 L1,18 C1,19.657 2.343,21 4,21 L18,21 C19.657,21 21,19.657 21,18",id:"Stroke-1",stroke:"#9B9B9B",strokeWidth:2}),a.createElement("polygon",{id:"Stroke-3",stroke:"#9B9B9B",strokeWidth:2,points:"6 12 17 1 21 5 10 16 6 16"}));function kh(e,t){var n=e.title,r=e.titleId,i=yh(e,["title","titleId"]);return a.createElement("svg",vh({width:"22px",height:"22px",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,wh,Ch)}var Eh=a.forwardRef(kh);n.p;function Nh(){return(Nh=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Ih=a.createElement("desc",null,"Created with Sketch."),Fh=a.createElement("g",{id:"icon/action/edit/enabled",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("path",{d:"M1,18 L1,18 C1,19.657 2.343,21 4,21 L18,21 C19.657,21 21,19.657 21,18",id:"Stroke-1",stroke:"#1B2559",strokeWidth:2}),a.createElement("polygon",{id:"Stroke-3",stroke:"#1B2559",strokeWidth:2,points:"6 12 17 1 21 5 10 16 6 16"}));function Lh(e,t){var n=e.title,r=e.titleId,i=Sh(e,["title","titleId"]);return a.createElement("svg",Nh({width:"22px",height:"22px",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,Ih,Fh)}var Ph=a.forwardRef(Lh);n.p;function Dh(){return(Dh=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Th=a.createElement("defs",null,a.createElement("pattern",{id:"pattern_68JiZ",patternUnits:"userSpaceOnUse",width:5.5,height:5.5,patternTransform:"rotate(45)"},a.createElement("line",{x1:0,y:0,x2:0,y2:5.5,stroke:"#DBDFED",strokeWidth:3}))),Bh=a.createElement("rect",{width:"100%",height:"100%",fill:"url(#pattern_68JiZ)",opacity:1});function Ah(e,t){var n=e.title,r=e.titleId,i=Rh(e,["title","titleId"]);return a.createElement("svg",Dh({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"36px",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,Th,"{' '}\n ",Bh)}var Mh=a.forwardRef(Ah),Wh=(n.p,{saveButton:{marginRight:20},lastOfGroup:{marginBottom:24},extraPadding:{paddingLeft:35,paddingRight:30},extraPaddingRight:{paddingRight:39},withSuffix:function(e){var t=e.textAlign;return{display:"flex",alignItems:"center",justifyContent:"right"===t?"flex-end":t}},suffix:{margin:[[0,0,0,7]]},size:function(e){var t=e.size;return Wa(t)},bold:za}),zh=Object(f.a)(Wh),qh=function(e){var t=e.disabled,n=e.editing,r=zh(),i=Object(un.f)(),o=i.values,c=i.submitForm,s=i.resetForm,d=Object(a.useContext)(Fm),u=d.editWidth,m=d.onEdit,h=d.enableEdit,p=d.enableDelete,b=d.disableRowEdit,f=d.onDelete,j=d.deleteWidth,g=d.enableToggle,O=d.onToggle,x=d.toggleWidth,v=d.forceAdd,y=d.clearError,w=d.actionColSize,C=d.error,k=t||b&&b(o),E=Object(a.useState)(!1),N=Object(l.a)(E,2),S=N[0],I=N[1];return Object(ze.jsxs)(ze.Fragment,{children:[n&&Object(ze.jsxs)(Em,{textAlign:"center",width:w,children:[Object(ze.jsx)(na,{className:r.saveButton,type:"submit",color:"primary",onClick:c,children:"Save"}),!v&&Object(ze.jsx)(na,{color:"secondary",onClick:function(){y(),s()},children:"Cancel"})]}),!n&&h&&Object(ze.jsx)(Em,{textAlign:"center",width:u,children:Object(ze.jsx)(Qn,{disabled:k,className:r.editButton,onClick:function(){return m&&m(o.id)},children:k?Object(ze.jsx)(Eh,{}):Object(ze.jsx)(Ph,{})})}),!n&&p&&Object(ze.jsxs)(Em,{textAlign:"center",width:j,children:[Object(ze.jsx)(Qn,{disabled:t,onClick:function(){I(!0)},children:t?Object(ze.jsx)(ph,{}):Object(ze.jsx)(xh,{})}),Object(ze.jsx)(Km,{open:S,setDeleteDialog:I,onConfirmed:function(){f(o.id).then((function(e){D.a(e)||I(!1)}))},onDismissed:function(){I(!1),y()},errorMessage:C})]}),!n&&g&&Object(ze.jsx)(Em,{textAlign:"center",width:x,children:Object(ze.jsx)(Er,{checked:!!o.active,value:!!o.active,disabled:t,onChange:function(){return O(o.id)}})})]})},$h=function(e){var t,n=e.editing,a=e.focus,r=e.config,i=e.extraPaddingRight,o=e.extraPadding,l=r.name,c=r.bypassField,d=r.input,u=r.editable,m=void 0===u||u,h=r.size,p=r.bold,b=r.width,f=r.textAlign,j=r.editingAlign,g=void 0===j?f:j,O=r.suffix,x=r.SuffixComponent,v=void 0===x?at:x,y=r.textStyle,w=void 0===y?function(e){}:y,C=r.isHidden,k=void 0===C?function(e){return!1}:C,E=r.view,N=void 0===E?function(e){return null===e||void 0===e?void 0:e.toString()}:E,S=r.inputProps,I=void 0===S?{}:S,F=Object(un.f)().values,L=n&&function(e){return"function"===typeof e?e(F):e}(m),P=!c,D=zh({textAlign:L?g:f,size:h}),R=Object(s.a)({fullWidth:!0,autoFocus:a,size:h,bold:p,textAlign:L?g:f},I);return Object(ze.jsxs)(Em,{className:(t={},Object(z.a)(t,D.extraPaddingRight,i),Object(z.a)(t,D.extraPadding,o),Object(z.a)(t,D.withSuffix,O),t),width:b,size:h,bold:p,textAlign:f,children:[L&&P&&!k(F)&&Object(ze.jsx)(un.b,Object(s.a)({name:l,component:d},R)),L&&!P&&!k(F)&&Object(ze.jsx)(r.input,{name:l}),!L&&F&&!k(F)&&Object(ze.jsx)("div",{style:w(F,L),children:N(F[l],F)}),O&&!k(F)&&Object(ze.jsx)(v,{className:D.suffix,style:L?{}:w(F,L),children:O}),k(F)&&Object(ze.jsx)(Mh,{})]})},Hh=function(e){var t=e.editing,n=e.disabled,r=e.lastOfGroup,i=e.newRow,o=Object(un.f)(),c=o.touched,s=o.errors,d=o.values,u=Object(a.useContext)(Fm),m=u.elements,h=u.enableEdit,p=u.enableDelete,b=u.error,f=u.enableToggle,j=u.rowSize,g=u.stripeWhen,O=zh(),x=!t&&g&&g(d)?function(e){var t=fs.a(W.a("stripe",!0))(e),n=Object(l.a)(t,2),a=n[0],r=n[1];if(!a.length)return e;var i=Lm.a(a[0],e),o=L.a(ps.a,R.a(A.a(["width"])))(a);return Pm.a(i,{width:o,editable:!1,view:function(){return Object(ze.jsx)(Mh,{})}},r)}(m):m,v=fs.a(ll.a("doubleHeader"))(m),y=Object(l.a)(v,1)[0],w=(null===y||void 0===y?void 0:y.length)?Lm.a(y[0],m):-1,C=(null===y||void 0===y?void 0:y.length)?Lm.a(y[y.length-1],m):-1,k=x.findIndex((function(e){return void 0===e.editable||e.editable})),E=Object(z.a)({},O.lastOfGroup,r),N=Um.a(qc.a(c),s),S=N&&qc.a(N).length>0||!!b,F=b||N&&bd.a(N).join(", ");return Object(ze.jsxs)(Im,{className:I()(E),size:j,error:t&&S,newRow:i&&!S,errorMessage:F,children:[x.map((function(e,n){return Object(ze.jsx)($h,{config:e,editing:t,focus:n===k&&t,extraPaddingRight:C===n,extraPadding:w===n},n)})),(h||p||f)&&Object(ze.jsx)(qh,{disabled:n,editing:t})]})},Vh={wrapper:function(e){return{width:e.width}},addLink:{marginLeft:"auto"},title:{margin:0,color:se},outerHeader:{minHeight:16,marginBottom:24,display:"flex",justifyContent:"space-between",alignItems:"center"}},Uh=Object(f.a)(Vh),Gh=L.a(bs.a(lm.a)(0),R.a((function(e){var t;return null!==(t=e.width)&&void 0!==t?t:100}))),Xh=function(e){var t,n,r,i=e.name,o=e.title,c=e.titleLg,d=e.elements,u=void 0===d?[]:d,m=e.data,h=void 0===m?[]:m,p=e.save,b=e.error,f=e.rowSize,j=void 0===f?"md":f,g=e.validationSchema,O=e.enableCreate,x=e.enableEdit,v=e.enableEditText,y=e.editWidth,w=e.enableDelete,C=e.deleteWidth,k=void 0===C?87:C,E=e.enableToggle,N=e.toggleWidth,S=void 0===N?87:N,I=e.onToggle,F=e.forceDisable,L=e.disableAdd,P=e.initialValues,D=e.setEditing,R=e.shouldOverrideEdit,B=e.editOverride,A=e.stripeWhen,M=e.disableRowEdit,q=e.groupBy,$=e.sortBy,H=e.createText,V=void 0===H?"Add override":H,U=e.forceAdd,G=void 0!==U&&U,X=e.tbodyWrapperClass,_=e.orderedBy,K=void 0===_?null:_,Z=Object(a.useState)(null),Q=Object(l.a)(Z,2),Y=Q[0],J=Q[1],ee=Object(a.useState)(!1),te=Object(l.a)(ee,2),ne=te[0],ae=te[1],re=Object(a.useState)(!1),ie=Object(l.a)(re,2),oe=ie[0],le=ie[1],ce=Object(a.useState)(null),se=Object(l.a)(ce,2),de=se[0],ue=se[1];Object(a.useEffect)((function(){return ue(b)}),[b]),Object(a.useEffect)((function(){ue(null),ae(G)}),[G]);var me=function(){var e=Object(Rl.a)(Dl.a.mark((function e(t){var n,a,r;return Dl.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!oe){e.next=2;break}return e.abrupt("return");case 2:if(le(!0),n=g.cast(t),a=pl.a(W.a("id",n.id))(h),r=-1!==a?sm.a(a,n,h):dm.a(n,h),zr.a(h[a],n)){e.next=16;break}return e.prev=7,e.next=10,p(Object(z.a)({},i,r),n);case 10:e.next=16;break;case 12:return e.prev=12,e.t0=e.catch(7),le(!1),e.abrupt("return");case 16:ae(!1),D&&D(!1),le(!1);case 19:case"end":return e.stop()}}),e,null,[[7,12]])})));return function(t){return e.apply(this,arguments)}}(),he=function(){ae(!1),J(null),D&&D(!1)},pe=function(){ae(!0),ue(null),D&&D(!0,!0)},be=w||E?87:174,fe=Ba.a(be)(y),je=(null!==(t=w&&k)&&void 0!==t?t:0)+(null!==(n=x&&fe)&&void 0!==n?n:0)+(null!==(r=E&&S)&&void 0!==r?r:0),ge=Gh(u)+je,Oe=Uh({width:ge}),xe=!h.length&&O&&!ne,ve=!F&&!Y&&!L&&!ne,ye=ne||0!==h.length,we=$?mm.a($)(h):h,Ce={elements:u,enableEdit:x,enableEditText:v,onEdit:function(e){if(R&&R(e))return B(e);J(e),ue(null),D&&D(e,!0)},clearError:function(){return ue(null)},error:de,disableRowEdit:M,editWidth:fe,enableDelete:w,onDelete:function(e){var t=um.a((function(t){return t.id===e}),h);return p(Object(z.a)({},i,t))},deleteWidth:k,enableToggle:E,rowSize:j,onToggle:I,toggleWidth:S,actionColSize:je,stripeWhen:A,forceAdd:G,orderedBy:K,DEFAULT_COL_SIZE:100};return Object(ze.jsx)(Fm.Provider,{value:Ce,children:Object(ze.jsxs)("div",{className:Oe.wrapper,children:[xe&&ve&&Object(ze.jsx)(Nn,{onClick:pe,children:V}),ye&&Object(ze.jsxs)(ze.Fragment,{children:[(o||O)&&Object(ze.jsxs)("div",{className:Oe.outerHeader,children:[o&&c&&Object(ze.jsx)(et,{className:Oe.title,children:o}),o&&!c&&Object(ze.jsx)(Qe,{className:Oe.title,children:o}),O&&ve&&Object(ze.jsx)(na,{className:Oe.addLink,onClick:pe,children:V})]}),Object(ze.jsxs)(ym,{children:[Object(ze.jsx)(Vm,{}),Object(ze.jsx)("div",{className:X,children:Object(ze.jsxs)(km,{children:[ne&&Object(ze.jsx)(un.e,{validateOnBlur:!1,validateOnChange:!1,initialValues:Object(s.a)({id:Object(hm.a)()},P),onReset:he,validationSchema:g,onSubmit:me,children:Object(ze.jsxs)(un.d,{children:[Object(ze.jsx)(bm,{}),Object(ze.jsx)(Hh,{editing:!0,disabled:F,newRow:!0})]})}),we.map((function(e,t){var n,a=we[t+1],r=!!q&&a,i="Function"===Fa.a(q)?q:T.a(q),o=r&&i(e)!==i(a);return Object(ze.jsx)(un.e,{validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,initialValues:e,onReset:he,validationSchema:g,onSubmit:me,children:Object(ze.jsxs)(un.d,{children:[Object(ze.jsx)(bm,{}),Object(ze.jsx)(Hh,{lastOfGroup:o,editing:Y===e.id,disabled:F||Y&&Y!==e.id||ne})]})},null!==(n=e.id)&&void 0!==n?n:t)}))]})})]})]})]})})},_h=function(e){var t=e.name,n=e.save,a=e.data,r=void 0===a?{}:a,i=e.namespaces,o=void 0===i?[]:i,l=Object(q.a)(e,["name","save","data","namespaces"]),c=R.a((function(e){return Object(s.a)({id:e},os(e)(r))}))(o);return Object(ze.jsx)(Xh,Object(s.a)({name:t,data:c,save:function(){for(var e=arguments.length,t=new Array(e),a=0;a=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var cp=a.createElement("desc",null,"Created with Sketch."),sp=a.createElement("g",{id:"icon/stage/spring/current",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("circle",{id:"Oval-2-Copy",fill:"#48F694",cx:9,cy:9,r:4}),a.createElement("circle",{id:"Oval-Copy-5",stroke:"#48F694",strokeWidth:2,transform:"translate(9.000000, 9.000000) rotate(-270.000000) translate(-9.000000, -9.000000) ",cx:9,cy:9,r:8}));function dp(e,t){var n=e.title,r=e.titleId,i=lp(e,["title","titleId"]);return a.createElement("svg",op({width:"18px",height:"18px",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,cp,sp)}var up=a.forwardRef(dp),mp=(n.p,{stages:{display:"flex",alignItems:"center"},wrapper:{display:"flex",alignItems:"center",margin:0},stage:{display:"flex",height:28,width:28,zIndex:2,"& > svg":{height:"100%",width:"100%",overflow:"visible"}},separator:{width:28,height:2,border:[[2,"solid"]],zIndex:1},separatorSpring:{borderColor:ee},separatorZodiac:{borderColor:J},separatorSpringEmpty:{borderColor:oe},separatorZodiacEmpty:{borderColor:se}}),hp=Object(f.a)(mp),pp=Object(a.memo)((function(e){var t,n,a=e.steps,r=e.currentStep,i=e.color,o=void 0===i?"spring":i,l=e.className;if(r<1||r>a)throw Error("Value of currentStage is invalid");if(a<1)throw Error("Value of stages is invalid");var c=hp(),s=(t={},Object(z.a)(t,c.separator,!0),Object(z.a)(t,c.separatorSpring,"spring"===o),Object(z.a)(t,c.separatorZodiac,"zodiac"===o),t),d=(n={},Object(z.a)(n,c.separator,!0),Object(z.a)(n,c.separatorSpringEmpty,"spring"===o),Object(z.a)(n,c.separatorZodiacEmpty,"zodiac"===o),n);return Object(ze.jsxs)("div",{className:I()(l,c.stages),children:[Ru.a(1,r).map((function(e){return Object(ze.jsxs)("div",{className:c.wrapper,children:[e>1&&Object(ze.jsx)("div",{className:I()(s)}),Object(ze.jsxs)("div",{className:c.stage,children:["spring"===o&&Object(ze.jsx)(Gi,{}),"zodiac"===o&&Object(ze.jsx)(mi,{})]})]},e)})),Object(ze.jsxs)("div",{className:c.wrapper,children:[r>1&&Object(ze.jsx)("div",{className:I()(s)}),Object(ze.jsxs)("div",{className:c.stage,children:["spring"===o&&Object(ze.jsx)(up,{}),"zodiac"===o&&Object(ze.jsx)(Oi,{})]})]}),Ru.a(r+1,a+1).map((function(e){return Object(ze.jsxs)("div",{className:c.wrapper,children:[Object(ze.jsx)("div",{className:I()(d)}),Object(ze.jsxs)("div",{className:c.stage,children:["spring"===o&&Object(ze.jsx)(jt,{}),"zodiac"===o&&Object(ze.jsx)(wt,{})]})]},e)}))]})}));function bp(){return(bp=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var jp=a.createElement("desc",null,"Created with Sketch."),gp=a.createElement("g",{id:"icon/action/help/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("path",{d:"M20.0004,11 C20.0004,6.03028475 15.9701153,2 11.0004,2 C6.03004556,2 2.0004,6.02992391 2.0004,11 C2.0004,15.9700761 6.03004556,20 11.0004,20 C15.9701153,20 20.0004,15.9697153 20.0004,11 Z M22.0004,11 C22.0004,17.0742847 17.0746847,22 11.0004,22 C4.92544514,22 0.000400000001,17.0746147 0.000400000001,11 C0.000400000001,4.92538534 4.92544514,0 11.0004,0 C17.0746847,0 22.0004,4.92571525 22.0004,11 Z",id:"Stroke-1",fill:"#1B2559",fillRule:"nonzero"}),a.createElement("path",{d:"M9.9164,8.9063 C9.9164,9.45858475 9.46868475,9.9063 8.9164,9.9063 C8.36411525,9.9063 7.9164,9.45858475 7.9164,8.9063 C7.9164,6.89094438 9.72972438,5.35290249 11.7463843,5.7072003 C13.0663562,5.93764844 14.1348314,7.00654285 14.3652323,8.32479116 C14.6130182,9.7312185 13.941375,11.0876584 12.732214,11.7545735 C12.370484,11.9534687 12.1664,12.2664153 12.1664,12.5913 L12.1664,12.6563 C12.1664,13.2085847 11.7186847,13.6563 11.1664,13.6563 C10.6141153,13.6563 10.1664,13.2085847 10.1664,12.6563 L10.1664,12.5913 C10.1664,11.5009567 10.7946963,10.5375141 11.7674377,10.0026589 C12.2360927,9.74417086 12.493064,9.22519581 12.3953326,8.67046887 C12.3098185,8.1811985 11.8915858,7.76280177 11.4013649,7.67721566 C10.6126181,7.53864454 9.9164,8.1291691 9.9164,8.9063 Z",id:"Stroke-3",fill:"#1B2559",fillRule:"nonzero"}),a.createElement("path",{d:"M10.1039,15.2188 C10.1039,14.6318 10.5799,14.1568 11.1659,14.1568 C11.7529,14.1568 12.2289,14.6318 12.2289,15.2188 C12.2289,15.8058 11.7529,16.2808 11.1659,16.2808 C10.5799,16.2808 10.1039,15.8058 10.1039,15.2188",id:"Fill-5",fill:"#1B2559"}));function Op(e,t){var n=e.title,r=e.titleId,i=fp(e,["title","titleId"]);return a.createElement("svg",bp({width:"22px",height:"22px",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,jp,gp)}var xp,vp,yp,wp=a.forwardRef(Op),Cp=(n.p,Object(f.a)({transparentButton:{border:"none",backgroundColor:"transparent",outline:"none",cursor:"pointer",marginTop:4},popoverContent:function(e){return{width:e.width,padding:[[10,15]]}}})),kp=function(e){var t=Cp({width:e}),n=Object(a.useState)(null),r=Object(l.a)(n,2),i=r[0],o=r[1],c=Boolean(i);return{classes:t,helpPopperAnchorEl:i,helpPopperOpen:c,handleOpenHelpPopper:function(e){o(i?null:e.currentTarget)},handleCloseHelpPopper:function(){o(null)}}},Ep=Object(a.memo)((function(e){var t=e.parentElements,n=e.children,a=e.width,r=kp(a);return Object(ze.jsxs)("div",{children:[!D.a(t)&&Object(ze.jsx)("div",{onMouseEnter:r.handleOpenHelpPopper,onMouseLeave:r.handleCloseHelpPopper,children:t}),D.a(t)&&Object(ze.jsx)("button",{type:"button",onMouseEnter:r.handleOpenHelpPopper,onMouseLeave:r.handleCloseHelpPopper,className:r.classes.transparentButton,children:Object(ze.jsx)(wp,{})}),Object(ze.jsx)(Hn,{open:r.helpPopperOpen,anchorEl:r.helpPopperAnchorEl,placement:"bottom",children:Object(ze.jsx)("div",{className:r.classes.popoverContent,children:n})})]})})),Np=n.p+"static/media/acceptor-left.f37bcb1a.svg",Sp=n.p+"static/media/dispenser-1.e4200f4e.svg",Ip=n.p+"static/media/dispenser-2.9f7807a5.svg",Fp=n.p+"static/media/3-cassettes-open-1-left.d6d9aa73.svg",Lp=n.p+"static/media/3-cassettes-open-2-left.a9ee8d4c.svg",Pp=n.p+"static/media/3-cassettes-open-3-left.08fed660.svg",Dp=n.p+"static/media/4-cassettes-open-1-left.7b00c51f.svg",Rp=n.p+"static/media/4-cassettes-open-2-left.b3d9541c.svg",Tp=n.p+"static/media/4-cassettes-open-3-left.e8f1667c.svg",Bp=n.p+"static/media/4-cassettes-open-4-left.bc1a9829.svg",Ap={content:{display:"flex",flexDirection:"column",justifyContent:"space-between",flex:1,paddingBottom:32},titleDiv:{marginBottom:32},title:{margin:[[0,0,12,0]],color:$},stepImage:{width:148,height:196},form:{paddingBottom:95},verticalAlign:{display:"flex",flexDirection:"column"},horizontalAlign:{display:"flex",flexDirection:"row"},centerAlignment:{alignItems:"center"},lineAlignment:{alignItems:"baseline"},fullWidth:{margin:[[0,"auto"]],flexBasis:"auto"},formWrapper:{flexBasis:"100%",display:"flex",justifyContent:"center"},submit:{float:"right"},cashboxBills:{marginRight:5},cassetteCashbox:{width:40,height:35},cassetteFormTitle:{marginTop:18},cassetteFormTitleContent:{marginLeft:10,marginRight:25},smBottomMargin:{marginBottom:25},fiatTotal:{color:$},errorMessage:{color:he}},Mp=Object(f.a)(Ap),Wp=function(e,t){return[[Sp,Ip],[Fp,Lp,Pp],[Dp,Rp,Tp,Bp]][e-2][t-2]},zp=function(e){var t=e.step,n=e.name,a=e.machine,r=e.cashoutSettings,i=e.cassetteCapacity,o=(e.error,e.lastStep),l=e.steps,c=e.fiatCurrency,s=e.onContinue,d=e.initialValues,u=Mp(),m=o?"Finish":"Confirm",h=[{display:"Yes",code:"YES"},{display:"No",code:"NO"}],p="cassette".concat(t-1),b=a.numberOfCassettes,f=null===a||void 0===a?void 0:a[p],j=null===r||void 0===r?void 0:r[p],g=function(e){return e[p]||f},O=function(e){return g(e)*j},x=Lu.a(g,(function(e){return e/i*100}),ip.a(0,100));return Object(ze.jsxs)("div",{className:u.content,children:[Object(ze.jsxs)("div",{className:u.titleDiv,children:[Object(ze.jsx)(Qe,{className:u.title,children:n}),Object(ze.jsx)(pp,{steps:l.length,currentStep:t})]}),1===t&&Object(ze.jsx)(un.e,{validateOnBlur:!1,validateOnChange:!1,onSubmit:s,initialValues:{wasCashboxEmptied:""},enableReinitialize:!0,validationSchema:l[0].schema,children:function(e){e.values;var t=e.errors;return Object(ze.jsxs)(un.d,{children:[Object(ze.jsxs)("div",{className:I()(u.horizontalAlign,u.form),children:[Object(ze.jsx)("img",{className:u.stepImage,alt:"cassette",src:Np}),Object(ze.jsx)("div",{className:u.formWrapper,children:Object(ze.jsxs)("div",{className:I()(u.verticalAlign,u.fullWidth),children:[Object(ze.jsx)(Xe,{noMargin:!0,children:"Did you empty the cash box?"}),Object(ze.jsx)(un.b,{component:ri,name:"wasCashboxEmptied",options:h,className:u.horizontalAlign}),t.wasCashboxEmptied&&Object(ze.jsx)("div",{className:u.errorMessage,children:t.wasCashboxEmptied}),Object(ze.jsxs)("div",{className:I()(u.horizontalAlign,u.centerAlignment),children:[Object(ze.jsx)(Ke,{children:"Since previous update"}),Object(ze.jsx)(Ep,{width:215,children:Object(ze.jsx)(Ke,{children:"Number of bills inside the cash box, since the last cash box changes."})})]}),Object(ze.jsxs)("div",{className:I()(u.horizontalAlign,u.lineAlignment),children:[Object(ze.jsx)(Ze,{noMargin:!0,className:u.cashboxBills,children:null===a||void 0===a?void 0:a.cashbox}),Object(ze.jsx)(Ke,{noMargin:!0,children:"accepted bills"})]})]})})]}),Object(ze.jsx)(Dn,{className:u.submit,type:"submit",children:m})]})}}),t>1&&Object(ze.jsx)(un.e,{validateOnBlur:!1,validateOnChange:!1,onSubmit:s,initialValues:d,enableReinitialize:!0,validationSchema:l[t-1].schema,children:function(e){var n=e.values;e.errors;return Object(ze.jsxs)(un.d,{children:[Object(ze.jsxs)("div",{className:I()(u.horizontalAlign,u.form),children:[Object(ze.jsx)("img",{className:u.stepImage,alt:"cassette",src:Wp(b,t)}),Object(ze.jsx)("div",{className:u.formWrapper,children:Object(ze.jsxs)("div",{className:I()(u.verticalAlign,u.fullWidth),children:[Object(ze.jsxs)("div",{className:I()(u.horizontalAlign,u.smBottomMargin),children:[Object(ze.jsxs)("div",{className:I()(u.horizontalAlign,u.cassetteFormTitle),children:[Object(ze.jsx)(Ac,{}),Object(ze.jsxs)(Xe,{className:u.cassetteFormTitleContent,noMargin:!0,children:["Cash cassette ",t-1," (dispenser)"]})]}),Object(ze.jsx)(Zr,{className:u.cassetteCashbox,percent:x(n),cashOut:!0})]}),Object(ze.jsx)(Xe,{noMargin:!0,children:"Refill bill count"}),Object(ze.jsxs)("div",{className:I()(u.horizontalAlign,u.lineAlignment),children:[Object(ze.jsx)(un.b,{component:ai,decimalPlaces:0,width:50,placeholder:f.toString(),name:p,className:u.cashboxBills,autoFocus:!0}),Object(ze.jsxs)(Ke,{children:[j," ",c," bills loaded"]})]}),Object(ze.jsxs)(Ke,{noMargin:!0,className:u.fiatTotal,children:["= ",Hr(O(n))," ",c]})]})})]}),Object(ze.jsx)(Dn,{className:u.submit,type:"submit",children:m})]})}})]})},qp=R.a((function(e){return"cassette".concat(e)}),Ru.a(1,5)),$p=function(e){var t=e.machine,n=e.cashoutSettings,r=e.locale,i=e.onClose,o=e.save,c=e.error,s=Object(a.useState)({step:0,config:{active:!0}}),d=Object(l.a)(s,2),u=d[0],m=u.step,h=u.config,p=d[1],b=Ta.a(n)||!(null===n||void 0===n?void 0:n.active)?0:t.numberOfCassettes,f=m===b+1,j=function(e){return bs.a((function(t,n){return t[n]=function(e){return qr(parseInt(e))?parseInt(e):0}(e[n]),t}),{},qp)},g=function(e){var n=$n.a(h,e);if(f){var a=[null===h||void 0===h?void 0:h.wasCashboxEmptied,null===e||void 0===e?void 0:e.wasCashboxEmptied].includes("YES")?0:null===t||void 0===t?void 0:t.cashbox,r=j(e);return o(t.id,a,r),i()}p({step:m+1,config:n})},O=Lu.a(lm.a(1),Ru.a(1),R.a((function(e){return{type:"cassette ".concat(e),schema:fn.f().shape(Object(z.a)({},"cassette".concat(e),fn.e().label("Bill count").positive().integer().required().min(0).max(500)))}}))),x=dm.a({type:"cashbox",schema:fn.f().shape({wasCashboxEmptied:fn.h().required("Select one option.")}),cashoutRequired:!1},O(b));return Object(ze.jsxs)(Qh,{title:0===m?null:"Update counts",handleClose:i,width:554,height:520,open:!0,children:[0===m&&Object(ze.jsx)(rp,{name:null===t||void 0===t?void 0:t.name,onContinue:function(){return g()}}),0!==m&&Object(ze.jsx)(zp,{step:m,name:null===t||void 0===t?void 0:t.name,machine:t,cashoutSettings:n,cassetteCapacity:500,error:c,lastStep:f,steps:x,fiatCurrency:r.fiatCurrency,onContinue:g,initialValues:Ta.a(n)?{}:bs.a((function(e,t){return e["cassette".concat(t)]="",e}),{},Ru.a(1,b+1))})]})},Hp={cashbox:{height:36}},Vp=Object(f.a)(Hp),Up={2:{cashbox:116,cassette:280,cassetteGraph:80,editWidth:174},3:{cashbox:106,cassette:200,cassetteGraph:60,editWidth:145},4:{cashbox:106,cassette:164,cassetteGraph:40,editWidth:90}},Gp=fn.f().shape({name:fn.h().required("Required"),cashbox:fn.e().label("Cash box").required().integer().min(0).max(1e3),cassette1:fn.e().required("Required").integer().min(0).max(500),cassette2:fn.e().required("Required").integer().min(0).max(500),cassette3:fn.e().required("Required").integer().min(0).max(500),cassette4:fn.e().required("Required").integer().min(0).max(500)}),Xp=x()(xp||(xp=Object(c.a)(["\n mutation MachineAction(\n $deviceId: ID!\n $action: MachineAction!\n $cashbox: Int!\n $cassette1: Int!\n $cassette2: Int!\n $cassette3: Int!\n $cassette4: Int!\n ) {\n machineAction(\n deviceId: $deviceId\n action: $action\n cashbox: $cashbox\n cassette1: $cassette1\n cassette2: $cassette2\n cassette3: $cassette3\n cassette4: $cassette4\n ) {\n deviceId\n cashbox\n cassette1\n cassette2\n cassette3\n cassette4\n }\n }\n"]))),_p=function(e){var t=e.machine,n=e.config,r=e.refetchData,i=e.bills,o=Vp(),c=Object(a.useState)(!1),d=Object(l.a)(c,2),m=d[0],h=d[1],p=n&&os("cashOut")(n),b=n&&os("locale")(n),f=n&&os("notifications",n),j=null===b||void 0===b?void 0:b.fiatCurrency,g=t.numberOfCassettes,O=function(e){return os(e)(p)},x=function(e){var t=e.deviceId;return!O(t).active},v=[{name:"cashbox",header:"Cash box",width:Up[g].cashbox,stripe:!1,view:function(e){return Object(ze.jsx)(Qr,{currency:{code:j},notes:e,total:ps.a(R.a((function(e){return e.fiat}))(i))})},input:ai,inputProps:{decimalPlaces:0}}];rm.a(im.a(om.a,g),(function(e){return v.push({name:"cassette".concat(e),header:"Cash cassette ".concat(e),width:Up[g].cassette,stripe:!0,doubleHeader:"Cash-out",view:function(n){var a;return Object(ze.jsx)(Yr,{className:o.cashbox,denomination:null===(a=O(t.deviceId))||void 0===a?void 0:a["cassette".concat(e)],currency:{code:j},notes:n,width:Up[g].cassetteGraph,threshold:f["fillingPercentageCassette".concat(e)]})},isHidden:function(t){var n=t.numberOfCassettes;return e>n},input:ei,inputProps:{decimalPlaces:0,width:Up[g].cassetteGraph,inputClassName:o.cashbox}}),lm.a(1,e)}),1),v.push({name:"edit",header:"Edit",width:87,view:function(){return Object(ze.jsx)(Qn,{onClick:function(){h(!0)},children:Object(ze.jsx)(Ph,{})})}});var y=Object(u.b)(Xp,{refetchQueries:function(){return r()}}),w=Object(l.a)(y,2),C=w[0],k=w[1].error,E=function(e,n,a){return C({variables:Object(s.a)({action:"setCassetteBills",deviceId:t.deviceId,cashbox:n},a)})};return t.name?Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Xh,{error:null===k||void 0===k?void 0:k.message,editWidth:Up[g].editWidth,stripeWhen:x,disableRowEdit:x,name:"cashboxes",elements:v,data:[t],save:E,validationSchema:Gp}),m&&Object(ze.jsx)($p,{machine:t,cashoutSettings:O(t.deviceId),onClose:function(){h(!1)},error:null===k||void 0===k?void 0:k.message,save:E,locale:b})]}):null},Kp=n(884),Zp={marginLeft:6},Qp=Object(ze.jsxs)("div",{children:[Object(ze.jsx)(Fc,{}),Object(ze.jsx)("span",{style:Zp,children:"Cash-in"})]}),Yp=Object(ze.jsxs)("div",{children:[Object(ze.jsx)(Ac,{}),Object(ze.jsx)("span",{style:Zp,children:"Cash-out"})]}),Jp=function(e){return function(e){return[{name:"name",width:280,size:"sm",view:function(e){return"".concat(e)}},{header:Qp,name:"cashIn",display:"Cash-in",width:130,textAlign:"right",suffix:"%"},{header:Yp,name:"cashOut",display:"Cash-out",width:130,textAlign:"right",suffix:"%",inputProps:{decimalPlaces:3}},{name:"fixedFee",display:"Fixed fee",width:144,doubleHeader:"Cash-in only",textAlign:"right",suffix:e},{name:"minimumTx",display:"Minimun Tx",width:144,doubleHeader:"Cash-in only",textAlign:"right",suffix:e}]}(e)},eb=x()(vp||(vp=Object(c.a)(["\n query getData {\n config\n cryptoCurrencies {\n code\n display\n }\n machines {\n name\n deviceId\n }\n }\n"]))),tb=x()(yp||(yp=Object(c.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"]))),nb=function(e){var t=e.name,n=e.id,a=Object(u.c)(eb),r=a.data,i=a.loading,o=Object(u.b)(tb,{refetchQueries:function(){return["getData"]}}),c=Object(l.a)(o,1)[0],s=(null===r||void 0===r?void 0:r.config)&&os(t)(r.config),d=A.a(["fiatCurrency"])(os(Qc)(null===r||void 0===r?void 0:r.config)),m=function(){if(i||!n||!s)return[];var e={};Kp.a((function(t){return e[T.a("code")(t)]={code:t.code,name:t.display,cashIn:s.cashIn,cashOut:s.cashOut,fixedFee:s.fixedFee,minimumTx:s.minimumTx}}))(r.cryptoCurrencies);var t=function(e){return W.a("machine",e)},a=s.overrides?M.a(t("ALL_MACHINES"))(s.overrides):[],o=function(t){e[t.cryptoCurrencies[0]].cashIn=t.cashIn,e[t.cryptoCurrencies[0]].cashOut=t.cashOut,e[t.cryptoCurrencies[0]].fixedFee=t.fixedFee,e[t.cryptoCurrencies[0]].minimumTx=t.minimumTx};Kp.a(o)(a);var l=s.overrides?M.a(t(n))(s.overrides):[];return Kp.a(o)(l),bd.a(e)}();return Object(ze.jsx)(Xh,{name:"overrides",save:function(e){var n=ls(t)(e);return c({variables:{config:n}})},data:m,elements:Jp(d)})},ab={grid:{flex:1,height:"100%"},content:{display:"flex",flexDirection:"column",flex:1,marginLeft:48,maxWidth:900},subtitle:{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",color:$},label3:{color:$,marginTop:0},row:{display:"flex",flexDirection:"row",justifyContent:"space-around"},rowItem:{flex:1,marginBottom:16},detailItem:{marginBottom:32},actionButtonsContainer:{display:"flex",flexDirection:"row"},breadcrumbsContainer:{marginTop:32},breadcrumbLink:{textDecoration:"none"},detailsMargin:{marginTop:24},sidebarContainer:{height:400,overflowY:"auto"}},rb=Object(f.a)(ab),ib=function(e){var t=e.data,n=e.timezone,a=rb();return Object(ze.jsxs)("div",{className:a.row,children:[Object(ze.jsxs)("div",{className:a.rowItem,children:[Object(ze.jsx)(rt,{className:a.label3,children:"Paired at"}),Object(ze.jsx)(Ke,{children:t.pairedAt?sd(t.pairedAt,n,"yyyy-MM-dd HH:mm:ss"):""})]}),Object(ze.jsxs)("div",{className:a.rowItem,children:[Object(ze.jsx)(rt,{className:a.label3,children:"Machine model"}),Object(ze.jsx)(Ke,{children:t.model})]}),Object(ze.jsxs)("div",{className:a.rowItem,children:[Object(ze.jsx)(rt,{className:a.label3,children:"Software version"}),Object(ze.jsx)(Ke,{children:t.version})]})]})},ob=n(885),lb=Object(f.a)({dialogContent:{width:434,padding:16,paddingRight:28},dialogTitle:{padding:16,paddingRight:12,display:"flex","justify-content":"space-between","& > h4":{margin:0},"& > button":{padding:0,marginTop:-4}},dialogActions:{padding:32,paddingTop:16}}),cb=function(e){var t=e.children,n=e.onClose,a=lb();return Object(ze.jsxs)("div",{className:a.dialogTitle,children:[t,n&&Object(ze.jsx)(Qn,{size:16,"aria-label":"close",onClick:n,children:Object(ze.jsx)(Mi,{})})]})},sb=Object(a.memo)((function(e){var t=e.title,n=void 0===t?"Confirm action":t,r=e.errorMessage,i=void 0===r?"This action requires confirmation":r,o=e.open,c=e.toBeConfirmed,d=e.saveButtonAlwaysEnabled,u=void 0!==d&&d,m=e.message,h=e.confirmationMessage,p=void 0===h?"Write '".concat(c,"' to confirm this action"):h,b=e.onConfirmed,f=e.onDismissed,j=e.initialValue,g=void 0===j?"":j,O=e.disabled,x=void 0!==O&&O,v=Object(q.a)(e,["title","errorMessage","open","toBeConfirmed","saveButtonAlwaysEnabled","message","confirmationMessage","onConfirmed","onDismissed","initialValue","disabled"]),y=lb(),w=Object(a.useState)(g),C=Object(l.a)(w,2),k=C[0],E=C[1],N=Object(a.useState)(!1),S=Object(l.a)(N,2),I=S[0],F=S[1],L=!u&&c!==k||""===k;return Object(ze.jsxs)(ln.a,Object(s.a)(Object(s.a)({open:o,"aria-labelledby":"form-dialog-title"},v),{},{children:[Object(ze.jsx)(cb,{id:"customized-dialog-title",onClose:function(){E(""),F(!1),f()},children:Object(ze.jsx)(Xe,{children:n})}),i&&Object(ze.jsx)(cb,{children:Object(ze.jsx)(tl,{children:i.split(":").map((function(e){return Object(ze.jsxs)(ze.Fragment,{children:[e,Object(ze.jsx)("br",{})]})}))})}),Object(ze.jsxs)(cn.a,{className:y.dialogContent,children:[m&&Object(ze.jsx)(Ke,{children:m}),Object(ze.jsx)(ur.a,{htmlFor:"confirm-input",children:p}),Object(ze.jsx)(Ha,{disabled:x,name:"confirm-input",autoFocus:!0,id:"confirm-input",type:"text",size:"sm",fullWidth:!0,value:k,touched:{},error:I,InputLabelProps:{shrink:!0},onChange:function(e){return E(e.target.value)}})]}),Object(ze.jsx)(Gm.a,{className:y.dialogActions,children:Object(ze.jsx)(Dn,{color:"green",disabled:L,onClick:function(){return b(k)},children:"Confirm"})})]}))}));function db(){return(db=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var mb=a.createElement("desc",null,"Created with Sketch."),hb=a.createElement("g",{id:"icon/button/edit/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("path",{d:"M0,10 L0,10 C0,10.9942 0.8058,11.8 1.8,11.8 L10.2,11.8 C11.1942,11.8 12,10.9942 12,10",id:"Stroke-1",stroke:"#FFFFFF"}),a.createElement("polygon",{id:"Stroke-3",stroke:"#FFFFFF",points:"3 6.86666667 8.86666667 1 11 3.13333333 5.13333333 9 3 9"}));function pb(e,t){var n=e.title,r=e.titleId,i=ub(e,["title","titleId"]);return a.createElement("svg",db({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,mb,hb)}var bb=a.forwardRef(pb);n.p;function fb(){return(fb=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var gb=a.createElement("desc",null,"Created with Sketch."),Ob=a.createElement("g",{id:"icon/button/edit/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("path",{d:"M0,10 L0,10 C0,10.9942 0.8058,11.8 1.8,11.8 L10.2,11.8 C11.1942,11.8 12,10.9942 12,10",id:"Stroke-1",stroke:"#1B2559"}),a.createElement("polygon",{id:"Stroke-3",stroke:"#1B2559",points:"3 6.86666667 8.86666667 1 11 3.13333333 5.13333333 9 3 9"}));function xb(e,t){var n=e.title,r=e.titleId,i=jb(e,["title","titleId"]);return a.createElement("svg",fb({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,gb,Ob)}var vb=a.forwardRef(xb);n.p;function yb(){return(yb=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Cb=a.createElement("desc",null,"Created with Sketch."),kb=a.createElement("g",{id:"icon/button/reboot/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{id:"Group-3",stroke:"#FFFFFF"},a.createElement("g",{id:"Group-2"},a.createElement("path",{d:"M3.57419317,11.1560104 C2.91506589,10.8661403 2.29620875,10.4522182 1.75493083,9.91362078 C-0.568892549,7.60089351 -0.587250991,3.86936104 1.71406849,1.57845195 C2.03057585,1.26367293 2.37407977,0.992496226 2.73740775,0.764921841",id:"Stroke-1"}),a.createElement("polyline",{id:"Stroke-3",points:"3.37563213 1.84831169 3.36911784 0.595324675 2.18174122 4.15223411e-14"})),a.createElement("line",{x1:5.92223784,y1:7.57277922,x2:5.92223784,y2:3.98212987,id:"Stroke-9"}),a.createElement("g",{id:"Group-2",transform:"translate(9.818105, 6.000000) scale(-1, -1) translate(-9.818105, -6.000000) translate(7.636287, 0.000000)"},a.createElement("path",{d:"M3.57419317,11.1560104 C2.91506589,10.8661403 2.29620875,10.4522182 1.75493083,9.91362078 C-0.568892549,7.60089351 -0.587250991,3.86936104 1.71406849,1.57845195 C2.03057585,1.26367293 2.37407977,0.992496226 2.73740775,0.764921841",id:"Stroke-1"}),a.createElement("polyline",{id:"Stroke-3",points:"3.37563213 1.84831169 3.36911784 0.595324675 2.18174122 4.15223411e-14"}))));function Eb(e,t){var n=e.title,r=e.titleId,i=wb(e,["title","titleId"]);return a.createElement("svg",yb({width:"12px",height:"12px",viewBox:"-0.493 -0.5 12.993 13",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,Cb,kb)}var Nb=a.forwardRef(Eb);n.p;function Sb(){return(Sb=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Fb=a.createElement("desc",null,"Created with Sketch."),Lb=a.createElement("g",{id:"icon/button/reboot/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{id:"Group-3",stroke:"#1B2559"},a.createElement("g",{id:"Group-2"},a.createElement("path",{d:"M3.57419317,11.1560104 C2.91506589,10.8661403 2.29620875,10.4522182 1.75493083,9.91362078 C-0.568892549,7.60089351 -0.587250991,3.86936104 1.71406849,1.57845195 C2.03057585,1.26367293 2.37407977,0.992496226 2.73740775,0.764921841",id:"Stroke-1"}),a.createElement("polyline",{id:"Stroke-3",points:"3.37563213 1.84831169 3.36911784 0.595324675 2.18174122 4.15223411e-14"})),a.createElement("line",{x1:5.92223784,y1:7.57277922,x2:5.92223784,y2:3.98212987,id:"Stroke-9"}),a.createElement("g",{id:"Group-2",transform:"translate(9.818105, 6.000000) scale(-1, -1) translate(-9.818105, -6.000000) translate(7.636287, 0.000000)"},a.createElement("path",{d:"M3.57419317,11.1560104 C2.91506589,10.8661403 2.29620875,10.4522182 1.75493083,9.91362078 C-0.568892549,7.60089351 -0.587250991,3.86936104 1.71406849,1.57845195 C2.03057585,1.26367293 2.37407977,0.992496226 2.73740775,0.764921841",id:"Stroke-1"}),a.createElement("polyline",{id:"Stroke-3",points:"3.37563213 1.84831169 3.36911784 0.595324675 2.18174122 4.15223411e-14"}))));function Pb(e,t){var n=e.title,r=e.titleId,i=Ib(e,["title","titleId"]);return a.createElement("svg",Sb({width:"12px",height:"12px",viewBox:"-0.493 -0.5 12.993 13",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,Fb,Lb)}var Db=a.forwardRef(Pb);n.p;function Rb(){return(Rb=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Bb=a.createElement("desc",null,"Created with Sketch."),Ab=a.createElement("g",{id:"icon/button/shut-down/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{id:"Group-5",transform:"translate(1.000000, 0.000000)",stroke:"#FFFFFF"},a.createElement("path",{d:"M7.7735,2 C9.116,2.89710351 10,4.4271328 10,6.16330077 C10,8.92665975 7.7615,11.1666667 5,11.1666667 C2.2385,11.1666667 0,8.92665975 0,6.16330077 C0,4.43663919 0.8745,2.91361461 2.204,2.01450976",id:"Stroke-1"}),a.createElement("line",{x1:5,y1:.75,x2:5,y2:3.25,id:"Stroke-3"})));function Mb(e,t){var n=e.title,r=e.titleId,i=Tb(e,["title","titleId"]);return a.createElement("svg",Rb({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,Bb,Ab)}var Wb=a.forwardRef(Mb);n.p;function zb(){return(zb=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var $b=a.createElement("desc",null,"Created with Sketch."),Hb=a.createElement("g",{id:"icon/button/shut-down/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{id:"Group-5",transform:"translate(1.000000, 0.000000)",stroke:"#1B2559"},a.createElement("path",{d:"M7.7735,2 C9.116,2.89710351 10,4.4271328 10,6.16330077 C10,8.92665975 7.7615,11.1666667 5,11.1666667 C2.2385,11.1666667 0,8.92665975 0,6.16330077 C0,4.43663919 0.8745,2.91361461 2.204,2.01450976",id:"Stroke-1"}),a.createElement("line",{x1:5,y1:.75,x2:5,y2:3.25,id:"Stroke-3"})));function Vb(e,t){var n=e.title,r=e.titleId,i=qb(e,["title","titleId"]);return a.createElement("svg",zb({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,$b,Hb)}var Ub=a.forwardRef(Vb);n.p;function Gb(){return(Gb=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var _b=a.createElement("desc",null,"Created with Sketch."),Kb=a.createElement("g",{id:"icon/button/unpair/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{id:"Group-12",stroke:"#FFFFFF"},a.createElement("g",{id:"Group-5"},a.createElement("polyline",{id:"Stroke-1",points:"3.75 6 2.25 6 0 3.75 3.75 0 6.75 3"}),a.createElement("polyline",{id:"Stroke-3",points:"8.25 6 9.75 6 12 8.25 8.25 12 5.25 9"})),a.createElement("line",{x1:8.25,y1:3,x2:8.25,y2:1.5,id:"Stroke-6"}),a.createElement("line",{x1:9.75,y1:3,x2:10.5,y2:2.25,id:"Stroke-7"}),a.createElement("line",{x1:9.75,y1:4.5,x2:11.25,y2:4.5,id:"Stroke-8"}),a.createElement("line",{x1:2.25,y1:7.5,x2:.75,y2:7.5,id:"Stroke-9"}),a.createElement("line",{x1:2.25,y1:9,x2:1.5,y2:9.75,id:"Stroke-10"}),a.createElement("line",{x1:3.75,y1:9,x2:3.75,y2:10.5,id:"Stroke-11"})));function Zb(e,t){var n=e.title,r=e.titleId,i=Xb(e,["title","titleId"]);return a.createElement("svg",Gb({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,_b,Kb)}var Qb=a.forwardRef(Zb);n.p;function Yb(){return(Yb=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var ef=a.createElement("desc",null,"Created with Sketch."),tf=a.createElement("g",{id:"icon/button/unpair/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{id:"Group-12",stroke:"#1B2559"},a.createElement("g",{id:"Group-5"},a.createElement("polyline",{id:"Stroke-1",points:"3.75 6 2.25 6 0 3.75 3.75 0 6.75 3"}),a.createElement("polyline",{id:"Stroke-3",points:"8.25 6 9.75 6 12 8.25 8.25 12 5.25 9"})),a.createElement("line",{x1:8.25,y1:3,x2:8.25,y2:1.5,id:"Stroke-6"}),a.createElement("line",{x1:9.75,y1:3,x2:10.5,y2:2.25,id:"Stroke-7"}),a.createElement("line",{x1:9.75,y1:4.5,x2:11.25,y2:4.5,id:"Stroke-8"}),a.createElement("line",{x1:2.25,y1:7.5,x2:.75,y2:7.5,id:"Stroke-9"}),a.createElement("line",{x1:2.25,y1:9,x2:1.5,y2:9.75,id:"Stroke-10"}),a.createElement("line",{x1:3.75,y1:9,x2:3.75,y2:10.5,id:"Stroke-11"})));function nf(e,t){var n=e.title,r=e.titleId,i=Jb(e,["title","titleId"]);return a.createElement("svg",Yb({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,ef,tf)}var af,rf,of=a.forwardRef(nf),lf=(n.p,{label:{extend:Ae.label1,color:se,marginBottom:4},inlineChip:{marginInlineEnd:"0.25em"},stack:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"start"},mr:{marginRight:8,marginBottom:8},warning:{color:he}}),cf=Object(f.a)(lf),sf=x()(af||(af=Object(c.a)(["\n mutation MachineAction(\n $deviceId: ID!\n $action: MachineAction!\n $newName: String\n ) {\n machineAction(deviceId: $deviceId, action: $action, newName: $newName) {\n deviceId\n }\n }\n"]))),df=x()(rf||(rf=Object(c.a)(["\n query getMachine($deviceId: ID!) {\n machine(deviceId: $deviceId) {\n latestEvent {\n note\n }\n }\n }\n"]))),uf=function(e){var t=e.children,n=cf();return Object(ze.jsx)("div",{className:n.label,children:t})},mf=Object(a.memo)((function(e){var t=e.machine,n=e.onActionSuccess,r=Object(a.useState)({command:null}),i=Object(l.a)(r,2),o=i[0],c=i[1],d=Object(a.useState)({}),m=Object(l.a)(d,2),h=m[0],p=m[1],b=Object(a.useState)(null),f=Object(l.a)(b,2),j=f[0],g=f[1],O=cf(),x=Object(ze.jsx)("span",{className:O.warning,children:"A user may be in the middle of a transaction and they could lose their funds if you continue."}),v=Object(u.a)(df,h),y=Object(l.a)(v,2),w=y[0],C=y[1].loading,k=Object(u.b)(sf,{onError:function(e){var t=e.message;g(null!==t&&void 0!==t?t:"An error ocurred")},onCompleted:function(){n&&n(),c({display:o.display,command:null})}}),E=Object(l.a)(k,2),N=E[0],S=E[1].loading,I=Boolean(o.command),F=!("restartServices"!==(null===o||void 0===o?void 0:o.command)||!C),L=function(e){p({variables:{deviceId:t.deviceId},onCompleted:function(t){var n,a=(n=function(e){var t,n;return JSON.parse(null!==(t=null===(n=e.machine.latestEvent)||void 0===n?void 0:n.note)&&void 0!==t?t:'{"state": null}').state}(t))&&!["chooseCoin","idle","pendingIdle","dualIdle","networkDown","unpaired","maintenance","virgin","wifiList"].includes(n)?x:null;c(Object(s.a)(Object(s.a)({},e),{},{message:a}))}}),w()};return Object(ze.jsxs)("div",{children:[Object(ze.jsx)(uf,{children:"Actions"}),Object(ze.jsxs)("div",{className:O.stack,children:[Object(ze.jsx)($e,{color:"primary",className:O.mr,Icon:vb,InverseIcon:bb,disabled:S,onClick:function(){return c({command:"rename",display:"Rename",confirmationMessage:"Write the new name for this machine"})},children:"Rename"}),Object(ze.jsx)($e,{color:"primary",className:O.mr,Icon:of,InverseIcon:Qb,disabled:S,onClick:function(){return c({command:"unpair",display:"Unpair"})},children:"Unpair"}),Object(ze.jsx)($e,{color:"primary",className:O.mr,Icon:Db,InverseIcon:Nb,disabled:S,onClick:function(){return c({command:"reboot",display:"Reboot"})},children:"Reboot"}),Object(ze.jsx)($e,{color:"primary",className:O.mr,Icon:Ub,InverseIcon:Wb,disabled:S,onClick:function(){return c({command:"shutdown",display:"Shutdown",message:"In order to bring it back online, the machine will need to be visited and its power reset."})},children:"Shutdown"}),Object(ze.jsx)($e,{color:"primary",className:O.inlineChip,Icon:Db,InverseIcon:Nb,disabled:S,onClick:function(){L({command:"restartServices",display:"Restart services for"})},children:"Restart Services"})]}),Object(ze.jsx)(sb,{disabled:F,open:I,title:"".concat(o.display," this machine?"),errorMessage:j,toBeConfirmed:t.name,message:null===o||void 0===o?void 0:o.message,confirmationMessage:null===o||void 0===o?void 0:o.confirmationMessage,saveButtonAlwaysEnabled:"rename"===(null===o||void 0===o?void 0:o.command),onConfirmed:function(e){g(null),N({variables:Object(s.a)({deviceId:t.deviceId,action:"".concat(null===o||void 0===o?void 0:o.command)},"rename"===(null===o||void 0===o?void 0:o.command)&&{newName:e})})},onDismissed:function(){c({display:o.display,command:null}),g(null)}})]})})),hf=n(451);function pf(){return(pf=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var ff=a.createElement("desc",null,"Created with Sketch."),jf=a.createElement("g",{id:"Styleguide",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinejoin:"round"},a.createElement("g",{id:"icon/action/copy",transform:"translate(1.000000, 1.000000)",stroke:"#1B2559"},a.createElement("g",{id:"Group-5-Copy-2"},a.createElement("polyline",{id:"Stroke-1",strokeWidth:2,points:"6 1.2 6 -0.00024 16 -0.00024 16 13.06376 12 13.06376"}),a.createElement("polygon",{id:"Stroke-3",strokeWidth:2,strokeLinecap:"round",points:"0 15.9368 10 15.9368 10 2.9368 0 2.9368"}))));function gf(e,t){var n=e.title,r=e.titleId,i=bf(e,["title","titleId"]);return a.createElement("svg",pf({width:"18px",height:"18px",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,ff,jf)}var Of=a.forwardRef(gf),xf=(n.p,{titleWrapper:{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row"},wrapper:{flex:1,display:"flex",flexDirection:"row",height:"100%"},tableWrapper:{flex:1,marginLeft:40,display:"block",overflowX:"auto",width:"100%",maxWidth:"78%",maxHeight:"70vh"},table:{whiteSpace:"nowrap",display:"block","& th":{position:"sticky",top:0}},dateColumn:{minWidth:160},levelColumn:{minWidth:100},fillColumn:{width:"100%"},shareButton:{margin:8,display:"flex",alignItems:"center",fontSize:we,padding:[[0,12]]},shareIcon:{marginRight:6},button:{margin:8},titleAndButtonsContainer:{display:"flex"},buttonsWrapper:{display:"flex",marginLeft:16,"& > *":{margin:"auto 6px"}}}),vf=Ae.label1,yf={wrapper:{extend:Ae.mono,display:"flex",alignItems:"center"},address:{lineBreak:"anywhere"},buttonWrapper:{"& button":{border:"none",backgroundColor:"transparent",cursor:"pointer"}},popoverContent:{extend:vf,display:"flex",justifyContent:"center",alignItems:"center",color:Z,borderRadius:4,padding:[[5,9]]}},wf={idCardDataCard:{extend:Ae.p,display:"flex",padding:[[11,8]],"& > div":{display:"flex",flexDirection:"column","& > div":{width:144,height:37,marginBottom:15,"&:last-child":{marginBottom:0}}}}},Cf={label:{extend:vf,color:se,marginBottom:4}},kf={titleWrapper:xf.titleWrapper,titleAndButtonsContainer:xf.titleAndButtonsContainer,buttonsWrapper:xf.buttonsWrapper,headerLabels:{display:"flex",flexDirection:"row","& div":{display:"flex",alignItems:"center"},"& > div":{marginLeft:24},"& > div:first-child":{marginLeft:0},"& span":{extend:vf,marginLeft:6}},overflowTd:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},flexWrapper:{display:"flex",alignItems:"center",justifyContent:"space-between",marginRight:16},customerLinkIcon:{marginLeft:2},flexRow:{display:"flex",flexDirection:"row",alignItems:"center"},machineRedirectContainer:{marginLeft:10,paddingLeft:5,paddingRight:5}},Ef=Object(f.a)(yf),Nf=function(e){var t=e.className,n=e.buttonClassname,r=e.children,i=e.wrapperClassname,o=(Object(q.a)(e,["className","buttonClassname","children","wrapperClassname"]),Object(a.useState)(null)),c=Object(l.a)(o,2),s=c[0],d=c[1];Object(a.useEffect)((function(){s&&setTimeout((function(){return d(null)}),3e3)}),[s]);var u=Ef(),m=Boolean(s),h=m?"simple-popper":void 0;return Object(ze.jsx)("div",{className:I()(u.wrapper,i),children:r&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)("div",{className:I()(u.address,t),children:r}),Object(ze.jsx)("div",{className:I()(u.buttonWrapper,n),children:Object(ze.jsx)(hf.CopyToClipboard,{text:Rm.a(/\s/g,"")(r),children:Object(ze.jsx)("button",{"aria-describedby":h,onClick:function(e){return function(e){d(s?null:e.currentTarget)}(e)},children:Object(ze.jsx)(Of,{})})})}),Object(ze.jsx)(Hn,{id:h,open:m,anchorEl:s,onClose:function(){d(null)},arrowSize:3,bgColor:$,placement:"top",children:Object(ze.jsx)("div",{className:u.popoverContent,children:Object(ze.jsx)("div",{children:"Copied to clipboard!"})})})]})})},Sf=Object(f.a)(ab),If=function(e){if(!e)return null;var t=Object(ob.a)(e,new Date);if(t<60)return"".concat(t," ").concat(1===t?"second":"seconds"," ago");if(t<3600){var n=Math.round(t/60);return"".concat(n," ").concat(1===n?"minute":"minutes"," ago")}if(t<86400){var a=Math.round(t/3600);return"".concat(a," ").concat(1===a?"hour":"hours"," ago")}var r=Math.round(t/3600/24);return"".concat(r," ").concat(1===r?"day":"days"," ago")},Ff=function(e){var t=e.data,n=e.onActionSuccess,a=Sf();return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)("div",{className:a.row,children:Object(ze.jsx)("div",{className:a.rowItem,children:Object(ze.jsx)(Ge,{children:t.name})})}),Object(ze.jsx)("div",{className:a.row,children:Object(ze.jsxs)("div",{className:a.rowItem,children:[Object(ze.jsx)(rt,{className:a.label3,children:"Status"}),t&&t.statuses?Object(ze.jsx)(Mu,{status:t.statuses[0]}):null]})}),Object(ze.jsx)("div",{className:a.row,children:Object(ze.jsxs)("div",{className:a.rowItem,children:[Object(ze.jsx)(rt,{className:a.label3,children:"Last ping"}),Object(ze.jsx)(Ke,{children:If(t.lastPing)})]})}),Object(ze.jsx)("div",{className:a.row,children:Object(ze.jsxs)("div",{className:a.rowItem,children:[Object(ze.jsx)(rt,{className:a.label3,children:"Network speed"}),Object(ze.jsx)(Ke,{children:t.downloadSpeed?new zc.a(t.downloadSpeed).toFixed(4).toString()+" MB/s":"unavailable"})]})}),Object(ze.jsx)("div",{className:a.row,children:Object(ze.jsx)(mf,{machine:t,onActionSuccess:n})}),Object(ze.jsx)("div",{className:a.row,children:Object(ze.jsxs)("div",{className:a.rowItem,children:[Object(ze.jsx)(rt,{className:a.label3,children:"Device ID"}),Object(ze.jsx)(Ke,{children:Object(ze.jsx)(Nf,{buttonClassname:a.copyToClipboard,children:t.deviceId})})]})})]})},Lf=n(66),Pf=n(887),Df=n(888),Rf=n(889),Tf=n(932),Bf=n(886),Af=n(268),Mf=n.n(Af),Wf=n(452),zf=n.n(Wf);function qf(){return(qf=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Hf=a.createElement("g",{id:"icon/ID/card/new/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("polygon",{id:"Stroke-1",stroke:"#FFFFFF",strokeWidth:1.6,points:"1 17 23 17 23 1 1 1"}),a.createElement("line",{x1:12.7857143,y1:5,x2:19.8571429,y2:5,id:"Stroke-3",stroke:"#FFFFFF",strokeWidth:1.6}),a.createElement("line",{x1:12.7857143,y1:8.2,x2:19.8571429,y2:8.2,id:"Stroke-4",stroke:"#FFFFFF",strokeWidth:1.6}),a.createElement("polygon",{id:"Stroke-5",stroke:"#FFFFFF",strokeWidth:1.6,points:"4.14285714 12.2 9.64285714 12.2 9.64285714 5 4.14285714 5"}));function Vf(e,t){var n=e.title,r=e.titleId,i=$f(e,["title","titleId"]);return a.createElement("svg",qf({width:"24px",height:"18px",viewBox:"0 0 24 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"icon/ID/card/new/white"):n?a.createElement("title",{id:r},n):null,Hf)}var Uf=a.forwardRef(Vf);n.p;function Gf(){return(Gf=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var _f=a.createElement("g",{id:"icon/ID/card/new/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{id:"Group-2",transform:"translate(1.000000, 1.000000)",stroke:"#1B2559",strokeWidth:1.6},a.createElement("g",{id:"id-copy"},a.createElement("polygon",{id:"Stroke-1",points:"0 16 22 16 22 0 0 0"}),a.createElement("line",{x1:11.7857143,y1:4,x2:18.8571429,y2:4,id:"Stroke-3"}),a.createElement("line",{x1:11.7857143,y1:7.2,x2:18.8571429,y2:7.2,id:"Stroke-4"}),a.createElement("polygon",{id:"Stroke-5",points:"3.14285714 11.2 8.64285714 11.2 8.64285714 4 3.14285714 4"}))));function Kf(e,t){var n=e.title,r=e.titleId,i=Xf(e,["title","titleId"]);return a.createElement("svg",Gf({width:"24px",height:"18px",viewBox:"0 0 24 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"icon/ID/card/new/zodiac"):n?a.createElement("title",{id:r},n):null,_f)}var Zf=a.forwardRef(Kf);n.p;function Qf(){return(Qf=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Jf=a.createElement("g",{id:"icon/ID/phone/new/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("path",{d:"M7.47150618,13.52898 C10.939556,16.9970298 14.7804112,17.1146315 16.4756355,16.9586292 C17.0220434,16.9090285 17.5308507,16.6578249 17.9188563,16.2698193 L20.0004862,14.1881894 L18.0220577,12.210561 L16.0436293,11.5505516 L14.7244104,12.8697705 C14.7244104,12.8697705 13.4059914,14.1881894 10.1091441,10.8905421 C6.81229671,7.59449473 8.13071565,6.27527578 8.13071565,6.27527578 L9.4499346,4.95605683 L8.78992512,2.97842842 L6.81229671,1 L4.73066681,3.0816299 C4.34186123,3.46963548 4.09145763,3.97844279 4.04105691,4.52485063 C3.88585468,6.22007499 4.00345637,10.0601301 7.47150618,13.52898 Z",id:"Stroke-1-Copy",stroke:"#FFFFFF",strokeWidth:1.6}));function ej(e,t){var n=e.title,r=e.titleId,i=Yf(e,["title","titleId"]);return a.createElement("svg",Qf({width:"24px",height:"18px",viewBox:"0 0 24 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"icon/ID/phone/new/white"):n?a.createElement("title",{id:r},n):null,Jf)}var tj=a.forwardRef(ej);n.p;function nj(){return(nj=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var rj=a.createElement("g",{id:"icon/ID/phone/new/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("path",{d:"M7.47150618,13.52898 C10.939556,16.9970298 14.7804112,17.1146315 16.4756355,16.9586292 C17.0220434,16.9090285 17.5308507,16.6578249 17.9188563,16.2698193 L20.0004862,14.1881894 L18.0220577,12.210561 L16.0436293,11.5505516 L14.7244104,12.8697705 C14.7244104,12.8697705 13.4059914,14.1881894 10.1091441,10.8905421 C6.81229671,7.59449473 8.13071565,6.27527578 8.13071565,6.27527578 L9.4499346,4.95605683 L8.78992512,2.97842842 L6.81229671,1 L4.73066681,3.0816299 C4.34186123,3.46963548 4.09145763,3.97844279 4.04105691,4.52485063 C3.88585468,6.22007499 4.00345637,10.0601301 7.47150618,13.52898 Z",id:"Stroke-1-Copy",stroke:"#1B2559",strokeWidth:1.6}));function ij(e,t){var n=e.title,r=e.titleId,i=aj(e,["title","titleId"]);return a.createElement("svg",nj({width:"24px",height:"18px",viewBox:"0 0 24 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"icon/ID/phone/new/zodiac"):n?a.createElement("title",{id:r},n):null,rj)}var oj=a.forwardRef(ij);n.p;function lj(){return(lj=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var sj=a.createElement("g",{id:"icon/ID/photo/new/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("path",{d:"M12,14 C9.7912,14 8,12.2088 8,10 C8,7.7912 9.7912,6 12,6 C14.2088,6 16,7.7912 16,10 C16,12.2088 14.2088,14 12,14 Z M16.7142857,3.4 L14.3571429,1 L9.64285714,1 L7.28571429,3.4 L1,3.4 L1,17 L23,17 L23,3.4 L16.7142857,3.4 Z",id:"Stroke-1",stroke:"#FFFFFF",strokeWidth:1.6}));function dj(e,t){var n=e.title,r=e.titleId,i=cj(e,["title","titleId"]);return a.createElement("svg",lj({width:"24px",height:"18px",viewBox:"0 0 24 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"icon/ID/photo/new/white"):n?a.createElement("title",{id:r},n):null,sj)}var uj=a.forwardRef(dj);n.p;function mj(){return(mj=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var pj=a.createElement("desc",null,"Created with Sketch."),bj=a.createElement("g",{id:"icon/button/cancel/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{id:"Group-5",stroke:"#1B2559",strokeWidth:1.2},a.createElement("line",{x1:12,y1:0,x2:0,y2:12,id:"Stroke-1"}),a.createElement("line",{x1:0,y1:0,x2:12,y2:12,id:"Stroke-3"})));function fj(e,t){var n=e.title,r=e.titleId,i=hj(e,["title","titleId"]);return a.createElement("svg",mj({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,pj,bj)}var jj=a.forwardRef(fj);n.p;function gj(){return(gj=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var xj=a.createElement("desc",null,"Created with Sketch."),vj=a.createElement("g",{id:"icon/button/download/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{id:"icon/sf-small/wizzard",stroke:"#FFFFFF"},a.createElement("polyline",{id:"Path-3",points:"3.6 5.4 6 7.8 8.4 5.4"}),a.createElement("line",{x1:6,y1:.5,x2:6,y2:7.4,id:"Path-4"}),a.createElement("path",{d:"M0,10 L0,10 C0,10.9942 0.8058,11.8 1.8,11.8 L10.2,11.8 C11.1942,11.8 12,10.9942 12,10",id:"Stroke-1"})));function yj(e,t){var n=e.title,r=e.titleId,i=Oj(e,["title","titleId"]);return a.createElement("svg",gj({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,xj,vj)}var wj=a.forwardRef(yj);n.p;function Cj(){return(Cj=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Ej=a.createElement("desc",null,"Created with Sketch."),Nj=a.createElement("g",{id:"icon/button/download/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{id:"icon/sf-small/wizzard",stroke:"#1B2559"},a.createElement("polyline",{id:"Path-3",points:"3.6 5.4 6 7.8 8.4 5.4"}),a.createElement("line",{x1:6,y1:.5,x2:6,y2:7.4,id:"Path-4"}),a.createElement("path",{d:"M0,10 L0,10 C0,10.9942 0.8058,11.8 1.8,11.8 L10.2,11.8 C11.1942,11.8 12,10.9942 12,10",id:"Stroke-1"})));function Sj(e,t){var n=e.title,r=e.titleId,i=kj(e,["title","titleId"]);return a.createElement("svg",Cj({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,Ej,Nj)}var Ij,Fj,Lj,Pj=a.forwardRef(Sj),Dj=(n.p,n(85)),Rj=n(461),Tj=n(151),Bj=n(98),Aj=n(453),Mj=n(325),Wj="",zj=Object(Mj.createUploadLink)({credentials:"include",uri:"".concat(Wj,"/graphql")}),qj=Object(Mj.createUploadLink)({credentials:"include",uri:"".concat("","/graphql")}),$j=function(e){var t=e.children,n=Object(w.h)(),r=Object(w.i)(),i=Object(a.useContext)(k),o=(i.userData,function(e,t,n,a,r){return new Tj.a({link:Bj.ApolloLink.from([Object(Aj.a)((function(n){var r=n.graphQLErrors,i=n.networkError;r&&r.forEach((function(n){var r=n.message,i=n.locations,o=n.path,l=n.extensions;"UNAUTHENTICATED"===(null===l||void 0===l?void 0:l.code)&&(a(null),"/login"!==t.pathname&&e.push("/login")),console.log("[GraphQL error]: Message: ".concat(r,", Location: ").concat(i,", Path: ").concat(o))})),i&&console.log("[Network error]: ".concat(i))})),new Bj.ApolloLink((function(e,t){return t(e).map((function(t){var n=e.getContext().response.headers;if(n){var a=n.get("lamassu_role");r(a)}return t}))})),Bj.ApolloLink.split((function(e){return"pazuz"===e.getContext().clientName}),qj,zj)]),cache:new Rj.a,defaultOptions:{watchQuery:{fetchPolicy:"no-cache",errorPolicy:"ignore"},query:{fetchPolicy:"no-cache",errorPolicy:"all"},mutate:{errorPolicy:"all"}}})}(n,r,0,i.setUserData,i.setRole));return Object(ze.jsx)(Dj.a,{client:o,children:t})},Hj={wrapper:{display:"flex",flexDirection:"column",marginTop:24},row:{display:"flex",flexDirection:"row",marginBottom:36},secondRow:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:36},lastRow:{display:"flex",flexDirection:"row",marginBottom:32},label:{color:se,margin:[[0,0,6,0]]},txIcon:{marginRight:10},clipboardPopover:{height:164,width:215},idButton:{marginRight:4},idCardDataCard:{extend:Ae.p,display:"flex",padding:[[11,8]],"& > div":{display:"flex",flexDirection:"column","& > div":{width:144,height:37,marginBottom:15,"&:last-child":{marginBottom:0}}}},bold:{fontWeight:700},direction:{width:233},availableIds:{width:232},exchangeRate:{width:250},commission:{width:217},address:{width:280},downloadRawLogs:{width:180},cancelTransaction:{width:160},status:{width:230,"& > button":{marginTop:20}},transactionId:{width:280},sessionId:{width:215},container:{display:"flex"},chip:{display:"flex",alignItems:"center",padding:"4px 8px 4px 8px",backgroundColor:$,color:Z,height:24,marginBottom:-24,marginTop:-3,marginLeft:7,borderRadius:4},chipLabel:{color:Z},otherActionsGroup:{display:"flex",flexDirection:"row"},addressHeader:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},walletScore:{display:"flex",flexDirection:"row",alignItems:"center","& > p":{marginLeft:5}},error:{color:Q}},Vj=function(e){return"cashOut"===e.txClass?function(e){return"Operator cancel"===e.hasError?"Cancelled":e.hasError?"Error":e.dispense?"Success":e.expired?"Expired":"Pending"}(e):function(e){return e.operatorCompleted?"Cancelled":e.hasError||e.batchError?"Error":e.sendConfirmed?"Sent":e.expired?"Expired":e.batched?"Batched":"Pending"}(e)},Uj=function(e){return D.a(e.hasError)?D.a(e.batchError)?null:"Batch error: ".concat(e.batchError):e.hasError},Gj=Object(f.a)(Hj),Xj=x()(Ij||(Ij=Object(c.a)(["\n query txSummaryAndLogs(\n $txId: ID!\n $deviceId: ID!\n $limit: Int\n $from: Date\n $until: Date\n $txClass: String\n $timezone: String\n ) {\n serverLogsCsv(\n limit: $limit\n from: $from\n until: $until\n timezone: $timezone\n )\n machineLogsCsv(\n deviceId: $deviceId\n limit: $limit\n from: $from\n until: $until\n timezone: $timezone\n )\n transactionCsv(id: $txId, txClass: $txClass, timezone: $timezone)\n txAssociatedDataCsv(id: $txId, txClass: $txClass, timezone: $timezone)\n }\n"]))),_j=x()(Fj||(Fj=Object(c.a)(["\n mutation cancelCashOutTransaction($id: ID!) {\n cancelCashOutTransaction(id: $id) {\n id\n }\n }\n"]))),Kj=x()(Lj||(Lj=Object(c.a)(["\n mutation cancelCashInTransaction($id: ID!) {\n cancelCashInTransaction(id: $id) {\n id\n }\n }\n"]))),Zj=function(e){return Lf.utils.toUnit(new zc.a(e.cryptoAtoms),e.cryptoCode).toNumber()},Qj=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Lf.utils.formatCryptoAddress(e,t).replace(/(.{5})/g,"$1 ")},Yj=function(e){var t=e.children,n=Gj();return Object(ze.jsx)(nt,{className:n.label,children:t})},Jj=function(e){var t,n,r,i,o=e.it,c=e.timezone,s=Gj(),d=Object(a.useState)({command:null}),m=Object(l.a)(d,2),h=m[0],p=m[1],b=Object(a.useState)(""),f=Object(l.a)(b,2),j=f[0],g=f[1],O="cashIn"===o.txClass,x=new zf.a,v=Object(u.a)(Xj,{onCompleted:function(e){return $(e)}}),y=Object(l.a)(v,1)[0],w=Object(u.b)(O?Kj:_j,{onError:function(e){var t=e.message;return g(null!==t&&void 0!==t?t:"An error occurred.")},refetchQueries:function(){return["transactions"]}}),C=Object(l.a)(w,1)[0],k=function(e){var t=Number.parseFloat(e.fiat),n=Zj(e),a=Number.parseFloat(e.rawTickerPrice),r="cashIn"===e.txClass,i=r?Number.parseFloat(e.cashInFee):0;return r?function(e,t,n,a){return e-t*n+a}(t,n,a,i):function(e,t,n){return t*n-e}(t,n,a)}(o).toFixed(2),E=100*Number.parseFloat(o.commissionPercentage,2),N=O?Number.parseFloat(o.cashInFee):0,S=Number.parseFloat(o.fiat),L=Zj(o),P=(S/L).toFixed(2),T="1 ".concat(o.cryptoCode," = ").concat(P," ").concat(o.fiatCode),B=o.discount?"-".concat(o.discount,"%"):null,A=Object(Tf.a)(new Date,"yyyyMMdd"),M=o.customerIdCardData&&{name:"".concat(Wm(o.customerIdCardData.firstName)," ").concat(Wm(o.customerIdCardData.lastName)),age:null!==(t=o.customerIdCardData.dateOfBirth&&Object(Bf.a)(A(o.customerIdCardData.dateOfBirth),new Date))&&void 0!==t?t:"",country:o.customerIdCardData.country,idCardNumber:o.customerIdCardData.documentNumber,idCardExpirationDate:null!==(n=o.customerIdCardData.expirationDate&&Object(od.a)("yyyy-MM-dd")(A(o.customerIdCardData.expirationDate)))&&void 0!==n?n:""},W=Object(ms.a)({minutes:3},new Date(o.created)),q=Object(kd.a)({minutes:3},new Date(o.created)),$=function(){var e=Object(Rl.a)(Dl.a.mark((function e(t){var n,a,r;return Dl.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="tx_".concat(o.id,"_summary.zip"),a=qc.a(t),R.a((function(e){return x.file(e+".csv",t[e])}),a),e.next=5,x.generateAsync({type:"blob"});case 5:r=e.sent,Mf.a.saveAs(r,n);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),H=Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Yj,{children:"Transaction status"}),Object(ze.jsx)("span",{className:s.bold,children:Vj(o)})]}),V=Object(ze.jsxs)("div",{className:s.walletScore,children:[Object(ze.jsx)("svg",{width:103,height:10,children:R.a((function(e){var t,n;return Object(ze.jsx)("circle",{cx:10*e+6,cy:4,r:3.5,fill:e0?T:"-"})]}),Object(ze.jsxs)("div",{className:s.commission,children:[Object(ze.jsx)(Yj,{children:"Commission"}),Object(ze.jsxs)("div",{className:s.container,children:["".concat(k," ").concat(o.fiatCode," (").concat(E," %)"),B&&Object(ze.jsx)("div",{className:s.chip,children:Object(ze.jsx)(nt,{className:s.chipLabel,children:B})})]})]}),Object(ze.jsxs)("div",{children:[Object(ze.jsx)(Yj,{children:"Fixed fee"}),Object(ze.jsx)("div",{children:O?"".concat(N," ").concat(o.fiatCode):"N/A"})]})]}),Object(ze.jsxs)("div",{className:s.secondRow,children:[Object(ze.jsxs)("div",{className:s.address,children:[Object(ze.jsxs)("div",{className:s.addressHeader,children:[Object(ze.jsx)(Yj,{children:"Address"}),!D.a(o.walletScore)&&Object(ze.jsx)(Ep,{parentElements:V,children:"CipherTrace score: ".concat(o.walletScore,"/10")})]}),Object(ze.jsx)("div",{children:Object(ze.jsx)(Nf,{children:Qj(o.cryptoCode,o.toAddress)})})]}),Object(ze.jsxs)("div",{className:s.transactionId,children:[Object(ze.jsx)(Yj,{children:"Transaction ID"}),Object(ze.jsx)("div",{children:"cashOut"===o.txClass?"N/A":Object(ze.jsx)(Nf,{children:o.txHash})})]}),Object(ze.jsxs)("div",{className:s.sessionId,children:[Object(ze.jsx)(Yj,{children:"Session ID"}),Object(ze.jsx)(Nf,{children:o.id})]})]}),Object(ze.jsxs)("div",{className:s.lastRow,children:[Object(ze.jsxs)("div",{className:s.status,children:[Uj(o)?Object(ze.jsx)(Ep,{parentElements:H,width:200,children:Object(ze.jsx)(Ke,{children:Uj(o)})}):H,"cashOut"===o.txClass&&"Pending"===Vj(o)&&Object(ze.jsx)($e,{color:"primary",Icon:jj,InverseIcon:ua,className:s.cancelTransaction,onClick:function(){return p({command:"cancelTx"})},children:"Cancel transaction"})]}),Object(ze.jsxs)("div",{children:[Object(ze.jsx)(Yj,{children:"Other actions"}),Object(ze.jsx)("div",{className:s.otherActionsGroup,children:Object(ze.jsx)($e,{color:"primary",Icon:Pj,InverseIcon:wj,className:s.downloadRawLogs,onClick:function(){return function(e,t){var n=e.id,a=e.deviceId,r=e.txClass;y({variables:{txId:n,from:W,until:q,deviceId:a,txClass:r,timezone:t}})}(o,c)},children:"Download raw logs"})})]})]}),Object(ze.jsx)(sb,{open:"cancelTx"===h.command,title:"Cancel this transaction?",errorMessage:j,toBeConfirmed:o.machineName,message:O?"The user will not be able to redeem the inserted bills, even if they subsequently confirm the transaction. If they've already deposited bills, you'll need to reconcile this transaction with them manually.":"The user will not be able to redeem the cash, even if they subsequently send the required coins. If they've already sent you coins, you'll need to reconcile this transaction with them manually.",onConfirmed:function(){g(null),p({command:null}),C({variables:{id:o.id}})},onDismissed:function(){p({command:null}),g(null)}})]})},eg=Object(a.memo)(Jj,(function(e,t){return e.it.id===t.it.id&&e.it.hasError===t.it.hasError&&e.it.batchError===t.it.batchError&&Vj(e.it)===Vj(t.it)})),tg=n(127),ng={expandButton:{outline:"none",border:"none",backgroundColor:"transparent",cursor:"pointer",padding:4},rowWrapper:{padding:1},row:{border:[[2,"solid","transparent"]],borderRadius:0},expanded:{border:[[2,"solid",G]],boxShadow:"0 0 8px 0 rgba(0,0,0,0.08)"},before:{paddingTop:12},after:{paddingBottom:12},pointer:{cursor:"pointer"},body:{flex:[[1,1,"auto"]]},table:function(e){return{marginBottom:30,minHeight:200,width:e.width,flex:1,display:"flex",flexDirection:"column"}},emptyTable:{width:"100%",display:"flex",flexDirection:"column",alignItems:"center",marginTop:52}};function ag(){return(ag=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var ig=a.createElement("desc",null,"Created with Sketch."),og=a.createElement("g",{id:"Styleguide",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"icon/action/expand/closed",transform:"translate(1.000000, 1.000000)",stroke:"#1B2559",strokeWidth:1.5},a.createElement("circle",{id:"Oval-4",cx:14,cy:2,r:2}),a.createElement("circle",{id:"Oval-4-Copy",cx:8,cy:2,r:2}),a.createElement("circle",{id:"Oval-4-Copy-2",cx:2,cy:2,r:2})));function lg(e,t){var n=e.title,r=e.titleId,i=rg(e,["title","titleId"]);return a.createElement("svg",ag({width:"18px",height:"6px",viewBox:"0 0 18 6",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,ig,og)}var cg=a.forwardRef(lg);n.p;function sg(){return(sg=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var ug=a.createElement("desc",null,"Created with Sketch."),mg=a.createElement("g",{id:"Styleguide",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"icon/action/expand/open",transform:"translate(1.000000, 1.000000)",fill:"#1B2559",stroke:"#1B2559",strokeWidth:1.5},a.createElement("circle",{id:"Oval-4",cx:14,cy:2,r:2}),a.createElement("circle",{id:"Oval-4-Copy",cx:8,cy:2,r:2}),a.createElement("circle",{id:"Oval-4-Copy-2",cx:2,cy:2,r:2})));function hg(e,t){var n=e.title,r=e.titleId,i=dg(e,["title","titleId"]);return a.createElement("svg",sg({width:"18px",height:"6px",viewBox:"0 0 18 6",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,ug,mg)}var pg,bg,fg,jg,gg,Og=a.forwardRef(hg),xg=(n.p,Object(f.a)(ng)),vg=function(e){var t,n=e.id,a=e.elements,r=e.data,i=e.width,o=e.Details,l=e.expanded,c=e.expandRow,d=e.expWidth,u=e.expandable,m=e.onClick,h=xg(),p=m||u,b=(t={},Object(z.a)(t,h.pointer,p),Object(z.a)(t,h.row,!0),Object(z.a)(t,h.expanded,l),t);return Object(ze.jsxs)("div",{className:h.rowWrapper,children:[Object(ze.jsx)("div",{className:I()(Object(z.a)({},h.before,l&&0!==n)),children:Object(ze.jsxs)(Im,{className:I()(b),onClick:function(){u&&c(n),m&&m(r)},error:r.error,errorMessage:r.errorMessage,children:[a.map((function(e,t){var n=e.view,a=void 0===n?function(e){return null===e||void 0===e?void 0:e.toString()}:n,i=Object(q.a)(e,["view"]);return Object(ze.jsx)(Em,Object(s.a)(Object(s.a)({},i),{},{children:a(r)}),t)})),u&&Object(ze.jsx)(Em,{width:d,textAlign:"center",children:Object(ze.jsxs)("button",{onClick:function(){return c(n)},className:h.expandButton,children:[l&&Object(ze.jsx)(Og,{}),!l&&Object(ze.jsx)(cg,{})]})})]})}),u&&l&&Object(ze.jsx)("div",{className:h.after,children:Object(ze.jsx)(Im,{className:I()(Object(z.a)({},h.expanded,l)),children:Object(ze.jsx)(Em,{width:i,children:Object(ze.jsx)(o,{it:r})})})})]})},yg=function(e){var t=e.elements,n=void 0===t?[]:t,r=e.data,i=void 0===r?[]:r,o=e.Details,c=(e.className,e.expandable),d=e.initialExpanded,u=e.onClick,m=e.loading,h=e.emptyText,p=e.extraHeight,b=Object(q.a)(e,["elements","data","Details","className","expandable","initialExpanded","onClick","loading","emptyText","extraHeight"]),f=Object(a.useState)(d),j=Object(l.a)(f,2),g=j[0],O=j[1];Object(a.useEffect)((function(){return O(d)}),[d]);var x=L.a(ps.a,R.a(T.a("width")))(n),v=850-x,y=x+(c?v:0),w=xg({width:y}),C=function(e){O(e===g?null:e)},k=new tg.c({defaultHeight:62,fixedWidth:!0});function E(e){var t=e.index,a=e.key,r=e.parent,l=e.style;return Object(ze.jsx)(tg.b,{cache:k,columnIndex:0,parent:r,rowIndex:t,children:Object(ze.jsx)("div",{style:l,children:Object(ze.jsx)(vg,{width:y,id:t,expWidth:v,elements:n,data:i[t],Details:o,expanded:t===g,expandRow:C,expandable:c,onClick:u})})},a)}return Object(ze.jsx)(Yo.a,{display:"flex",flex:"1",flexDirection:"column",children:Object(ze.jsxs)(ym,{className:w.table,children:[Object(ze.jsxs)(wm,{children:[n.map((function(e,t){var n=e.width,a=e.className,r=e.textAlign,i=e.header;return Object(ze.jsx)(Nm,{width:n,className:a,textAlign:r,children:i},t)})),c&&Object(ze.jsx)(Nm,{width:v})]}),Object(ze.jsxs)(km,{className:w.body,children:[m&&Object(ze.jsx)(Xe,{children:"Loading..."}),!m&&Ta.a(i)&&Object(ze.jsx)(Xe,{children:h}),Object(ze.jsx)(tg.a,{disableWidth:!0,disableHeight:!0,children:function(){return Object(ze.jsx)(tg.d,Object(s.a)(Object(s.a)({style:{overflowX:"inherit",outline:"none"}},b),{},{height:62*i.length+p,width:y,rowCount:i.length,rowHeight:k.rowHeight,rowRenderer:E,overscanRowCount:50,deferredMeasurementCache:k}))}})]})]})})},wg=Object(f.a)(kf),Cg=x()(pg||(pg=Object(c.a)(["\n query transactions($limit: Int, $from: Date, $until: Date, $deviceId: ID) {\n transactions(\n limit: $limit\n from: $from\n until: $until\n deviceId: $deviceId\n ) {\n id\n txClass\n txHash\n toAddress\n commissionPercentage\n expired\n machineName\n operatorCompleted\n sendConfirmed\n dispense\n hasError: error\n deviceId\n fiat\n cashInFee\n fiatCode\n cryptoAtoms\n cryptoCode\n toAddress\n created\n customerName\n customerIdCardData\n customerIdCardPhotoPath\n customerFrontCameraPath\n customerPhone\n discount\n customerId\n isAnonymous\n }\n }\n"]))),kg=x()(bg||(bg=Object(c.a)(["\n query getData {\n config\n }\n"]))),Eg=function(e){var t=e.id,n=wg(),r=Object(a.useState)(0),i=Object(l.a)(r,2),o=i[0],c=i[1],s=Object(a.useState)(""),d=Object(l.a)(s,2),m=d[0],h=d[1],p=Object(u.a)(Cg,{variables:{limit:5,deviceId:t}}),b=Object(l.a)(p,2),f=b[0],j=b[1],g=j.data,O=j.loading,x=Object(u.c)(kg),v=x.data,y=x.loading,w=A.a(["config","locale_timezone"],v),C=O||y;!C&&g&&(g.transactions=g.transactions.splice(0,5)),Object(a.useEffect)((function(){null!==t&&f()}),[f,t]);var k=[{header:"",width:0,size:"sm",view:function(e){return"cashOut"===e.txClass?Object(ze.jsx)(Ac,{}):Object(ze.jsx)(Fc,{})}},{header:"Customer",width:122,size:"sm",view:function(e){return e.customerName?e.customerName:e.customerIdCardData?function(e){var t=e.firstName,n=e.lastName;return"".concat(Pf.a(Df.a,Rf.a)(t),". ").concat(n)}(e.customerIdCardData):e.customerPhone}},{header:"Cash",width:144,textAlign:"right",size:"sm",view:function(e){return"".concat(Number.parseFloat(e.fiat)," ").concat(e.fiatCode)}},{header:"Crypto",width:164,textAlign:"right",size:"sm",view:function(e){return"".concat(Lf.utils.toUnit(new zc.a(e.cryptoAtoms),e.cryptoCode).toFormat(5)," ").concat(e.cryptoCode)}},{header:"Address",view:function(e){return Lf.utils.formatCryptoAddress(e.cryptoCode,e.toAddress)},className:n.overflowTd,size:"sm",textAlign:"left",width:140},{header:"Date",view:function(e){return sd(e.created,w,"yyyy\u2011MM\u2011dd")},textAlign:"left",size:"sm",width:140},{header:"Status",view:function(e){return Vj(e)},size:"sm",width:20}];return Object(ze.jsx)(yg,{extraHeight:o,onClick:function(e){m===e.id?(h(""),c(0)):(h(e.id),c(310))},loading:C||null===t,emptyText:"No transactions so far",elements:k,data:A.a(["transactions"])(g),Details:eg,expandable:!0})},Ng=Object(f.a)(ab),Sg=x()(fg||(fg=Object(c.a)(["\n query getMachine($deviceId: ID!, $billFilters: JSONObject) {\n machine(deviceId: $deviceId) {\n name\n deviceId\n paired\n lastPing\n pairedAt\n version\n model\n cashbox\n cassette1\n cassette2\n cassette3\n cassette4\n numberOfCassettes\n statuses {\n label\n type\n }\n downloadSpeed\n responseTime\n packetLoss\n latestEvent {\n note\n }\n }\n bills(filters: $billFilters) {\n id\n fiat\n deviceId\n created\n }\n config\n }\n"]))),Ig=function(e){var t,n,a,r,i,o,l=e.data,c=e.refetch,s=e.reload,d=Ng(),u=null!==(t=A.a(["config","locale_timezone"],l))&&void 0!==t?t:{},m=null!==(n=A.a(["machine"])(l))&&void 0!==n?n:{},p=null!==(a=A.a(["config"])(l))&&void 0!==a?a:{},b=null!==(r=A.a(["bills"])(l))&&void 0!==r?r:[],f=null!==(i=A.a(["name"])(m))&&void 0!==i?i:null,j=null!==(o=A.a(["deviceId"])(m))&&void 0!==o?o:null;return Object(ze.jsxs)(h.a,{container:!0,className:d.grid,children:[Object(ze.jsx)(h.a,{item:!0,xs:3,children:Object(ze.jsx)(h.a,{item:!0,xs:12,children:Object(ze.jsxs)("div",{className:d.breadcrumbsContainer,children:[Object(ze.jsxs)(tm.a,{separator:Object(ze.jsx)(am.a,{fontSize:"small"}),children:[Object(ze.jsx)(C.b,{to:"/dashboard",className:d.breadcrumbLink,children:Object(ze.jsx)(rt,{noMargin:!0,className:d.subtitle,children:"Dashboard"})}),Object(ze.jsx)(tt,{noMargin:!0,className:d.subtitle,children:f})]}),Object(ze.jsx)(Ff,{data:m,onActionSuccess:s})]})})}),Object(ze.jsx)(h.a,{item:!0,xs:9,children:Object(ze.jsxs)("div",{className:d.content,children:[Object(ze.jsxs)("div",{className:I()(d.detailItem,d.detailsMargin),children:[Object(ze.jsx)(et,{className:d.subtitle,children:"Details"}),Object(ze.jsx)(ib,{data:m,timezone:u})]}),Object(ze.jsxs)("div",{className:d.detailItem,children:[Object(ze.jsx)(et,{className:d.subtitle,children:"Cash box & cassettes"}),Object(ze.jsx)(_p,{refetchData:c,machine:m,config:null!==p&&void 0!==p&&p,bills:b})]}),Object(ze.jsxs)("div",{className:d.transactionsItem,children:[Object(ze.jsx)(et,{className:d.subtitle,children:"Latest transactions"}),Object(ze.jsx)(Eg,{id:j})]}),Object(ze.jsxs)("div",{className:d.detailItem,children:[Object(ze.jsx)(et,{className:d.subtitle,children:"Commissions"}),Object(ze.jsx)(nb,{name:"commissions",id:j})]})]})})]})},Fg=function(){var e=Object(w.i)(),t=Object(w.h)(),n=function(e){return e.slice(e.lastIndexOf("/")+1)}(e.pathname),r=Object(a.useState)(!0),i=Object(l.a)(r,2),o=i[0],c=i[1],s=Object(u.c)(Sg,{onCompleted:function(e){if(null===e.machine)return t.push("/maintenance/machine-status");c(!1)},variables:{deviceId:n},billFilters:{deviceId:n,batch:"none"}}),d=s.data,m=s.refetch;return!o&&Object(ze.jsx)(Ig,{data:d,refetch:m,reload:function(){return t.push(e.pathname)}})},Lg=n(91),Pg=n(890),Dg=n(278),Rg=n(892),Tg=n(893),Bg={AUD:{5:130,10:137,20:144,50:151,100:158},BBD:{2:150,5:150,10:150,20:150,50:150,100:150},CAD:{5:152,10:152,20:152,50:152,100:152},CHF:{10:126,20:137,50:148,100:159,200:170,1e3:181},DKK:{50:125,100:135,200:145,500:155,1e3:165},EUR:{5:120,10:127,20:133,50:140,100:147,200:153,500:160},GBP:{5:135,10:142,20:149,50:156},HKD:{10:134,20:143,50:148,100:153,500:158,1e3:163},HUF:{200:154,500:154,1e3:154,2e3:154,5e3:154,1e4:154,2e4:154},ILS:{20:129,50:136,100:143,200:150},JMD:{50:145,100:145,500:145,1e3:145,5e3:145},JPY:{1e3:150,2e3:154,5e3:156,1e4:160},KZT:{200:126,500:130,1e3:134,2e3:139,5e3:144,1e4:155,2e4:155},MXN:{20:120,50:127,100:134,200:141,500:148,1e3:155},MYR:{1:120,5:135,10:140,20:145,50:145,100:150},NZD:{5:135,10:140,20:145,50:150,100:155},PHP:{20:160,50:160,100:160,200:160,500:160,1e3:160},PLN:{10:120,20:126,50:132,100:138,200:144,500:150},SGD:{2:126,5:133,10:141,50:156,100:162,1e3:170},TWD:{100:145,200:150,500:155,1e3:160,2e3:165},UAH:{1:118,2:118,5:118,10:124,20:130,50:136,100:142,200:148,500:154},USD:{1:156,5:156,10:156,20:156,50:156,100:156},VND:{1e4:132,2e4:136,5e4:140,1e5:144,2e5:148,5e5:152},ZAR:{10:128,20:134,50:140,100:146,200:152}},Ag=$c.a((function(e,t){var n=T.a("fiatCurrency")(e);return L.a(R.a((function(e){return{code:parseInt(e),display:e}})),qc.a,A.a([n]))(t)})),Mg={name:"All Machines",deviceId:"ALL_MACHINES"},Wg={display:"All Coins",code:"ALL_COINS"},zg={marginLeft:6,whiteSpace:"nowrap"},qg=Object(ze.jsxs)("div",{children:[Object(ze.jsx)(Fc,{}),Object(ze.jsx)("span",{style:zg,children:"Cash-in"})]}),$g=Object(ze.jsxs)("div",{children:[Object(ze.jsx)(Ac,{}),Object(ze.jsx)("span",{style:zg,children:"Cash-out"})]}),Hg=function(e,t,n){return function(a){if(!e)return"";var r=Da.a(W.a(null!==n&&void 0!==n?n:"code",a))(e);return r?T.a(t,r):"Unpaired machine"}},Vg=function(e){return function(t){return t?L.a(Pg.a(", "),R.a(Hg(e,"display")))(t):t}},Ug=function(e,t,n){var a=F.a(Wg.code)(t),r=F.a(Wg.code)(e);return a&&r&&pn.a(t)>1?n(um.a(zr.a(Wg.code))(t)):a&&!r?n([Wg.code]):void n(t)},Gg=function(e){return[{header:qg,name:"cashIn",display:"Cash-in",width:169,size:"lg",editingAlign:"right",input:ai,suffix:"%",bold:za,inputProps:{decimalPlaces:3}},{header:$g,name:"cashOut",display:"Cash-out",width:169,size:"lg",editingAlign:"right",input:ai,suffix:"%",bold:za,inputProps:{decimalPlaces:3}},{name:"fixedFee",display:"Fixed fee",width:169,size:"lg",doubleHeader:"Cash-in only",textAlign:"center",editingAlign:"right",input:ai,suffix:e,bold:za,inputProps:{decimalPlaces:2}},{name:"minimumTx",display:"Minimun Tx",width:169,size:"lg",doubleHeader:"Cash-in only",textAlign:"center",editingAlign:"right",input:ai,suffix:e,bold:za,inputProps:{decimalPlaces:2}}]},Xg=function(e,t,n){return function(e,t,n){var a=[Mg].concat(e(["machines"])),r=e(["cryptoCurrencies"]),i=[Wg].concat(R.a((function(e){return{display:e.code,code:e.code}}))(null!==r&&void 0!==r?r:[]));return[{name:"machine",width:196,size:"sm",view:Hg(a,"name","deviceId"),input:Pr,inputProps:{options:a,valueProp:"deviceId",labelProp:"name"}},{name:"cryptoCurrencies",width:280,size:"sm",view:Vg(i),input:Pr,inputProps:{options:i,valueProp:"code",labelProp:"display",multiple:!0,onChange:Ug,shouldStayOpen:!0}},{header:qg,name:"cashIn",display:"Cash-in",width:130,input:ai,textAlign:"right",suffix:"%",bold:za,inputProps:{decimalPlaces:3}},{header:$g,name:"cashOut",display:"Cash-out",width:130,input:ai,textAlign:"right",suffix:"%",bold:za,inputProps:{decimalPlaces:3}},{name:"fixedFee",display:"Fixed fee",width:144,input:ai,doubleHeader:"Cash-in only",textAlign:"right",suffix:t,bold:za,inputProps:{decimalPlaces:2}},{name:"minimumTx",display:"Minimun Tx",width:169,doubleHeader:"Cash-in only",textAlign:"center",editingAlign:"right",input:ai,suffix:t,bold:za,inputProps:{decimalPlaces:2}}]}(A.a(om.a,e),t)},_g=100,Kg=function(e){var t=Ag(e,Bg).map((function(e){return parseInt(e.code)})),n=Ta.a(t)?Yh:Math.max.apply(Math,Object(d.a)(t));return fn.f().shape({cashIn:fn.e().label("Cash-in").min(0).max(_g).required(),cashOut:fn.e().label("Cash-out").min(0).max(_g).required(),fixedFee:fn.e().label("Fixed Fee").min(0).max(n).required(),minimumTx:fn.e().label("Minimum Tx").min(0).max(n).required()})},Zg=function(e,t,n){var a=A.a(om.a,t),r=[Mg].concat(a(["machines"])),i=a(["cryptoCurrencies"]),o=[Wg].concat(R.a((function(e){return{display:e.code,code:e.code}}))(null!==i&&void 0!==i?i:[])),l=Ag(n,Bg).map((function(e){return parseInt(e.code)})),c=Ta.a(l)?Yh:Math.max.apply(Math,Object(d.a)(l));return fn.f().shape({machine:fn.h().nullable().label("Machine").required(),cryptoCurrencies:fn.a().test({test:function(){var t=this.parent,n=t.id,a=t.machine,i=t.cryptoCurrencies,l=function(e,t,n){var a=T.a("cryptoCurrencies"),r=T.a("machine"),i=M.a(W.a("machine",t))(n),o=Da.a(W.a("id",e))(n),l=a(o),c=r(o),s=L.a(Dg.a,cl.a,R.a(a))(i);return t!==c?null!==s&&void 0!==s?s:[]:Rg.a(s,l)}(n,a,e),c=a===Mg.deviceId,s=F.a(Wg.code,i);if(c&&s)return this.createError({message:"All machines and all coins should be configured in the default setup table"});var d=Tg.a(l,i);if(!Ta.a(d)){var u=Vg(o)(d),m=Hg(r,"name","deviceId")(a),h="".concat(u," already overriden for machine: ").concat(m);return this.createError({message:h})}return!0}}).label("Crypto Currencies").required().min(1),cashIn:fn.e().label("Cash-in").min(0).max(_g).required(),cashOut:fn.e().label("Cash-out").min(0).max(_g).required(),fixedFee:fn.e().label("Fixed Fee").min(0).max(c).required(),minimumTx:fn.e().label("Minimum Tx").min(0).max(c).required()})},Qg={cashIn:"",cashOut:"",fixedFee:"",minimumTx:""},Yg={machine:null,cryptoCurrencies:[],cashIn:"",cashOut:"",fixedFee:"",minimumTx:""},Jg=function(e){var t=e.machine,n=e.cryptoCurrencies,a=t===Mg.deviceId,r=hl.a(Wg.code,n);return a&&r?0:a?1:r?2:3},eO=function(e,t,n,a){return{minimumTx:a.minimumTx,fixedFee:a.fixedFee,cashOut:a.cashOut,cashIn:a.cashIn,machine:t,cryptoCurrencies:[e],default:n,id:Object(hm.a)()}},tO=function(e){var t=Ag(e,Bg).map((function(e){return parseInt(e.code)})),n=Ta.a(t)?Yh:Math.max.apply(Math,Object(d.a)(t));return fn.f().shape({machine:fn.h().label("Machine").required(),cryptoCurrencies:fn.a().label("Crypto Currency").required().min(1),cashIn:fn.e().label("Cash-in").min(0).max(_g).required(),cashOut:fn.e().label("Cash-out").min(0).max(_g).required(),fixedFee:fn.e().label("Fixed Fee").min(0).max(n).required(),minimumTx:fn.e().label("Minimum Tx").min(0).max(n).required()})},nO=function(e,t){return{color:e.default?J:te}},aO=function(e,t,n){var a=A.a(om.a,e);return rO(a,t,Qg)},rO=function(e,t,n){var a=[Mg].concat(e(["machines"]));return[{name:"machine",width:196,size:"sm",view:Hg(a,"name","deviceId"),editable:!1},{name:"cryptoCurrencies",display:"Crypto Currency",width:255,view:T.a(0),size:"sm",editable:!1},{header:qg,name:"cashIn",display:"Cash-in",width:130,input:ai,textAlign:"right",suffix:"%",textStyle:function(e){return nO(e)},inputProps:{decimalPlaces:3}},{header:$g,name:"cashOut",display:"Cash-out",width:140,input:ai,textAlign:"right",greenText:!0,suffix:"%",textStyle:function(e){return nO(e)},inputProps:{decimalPlaces:3}},{name:"fixedFee",display:"Fixed fee",width:144,input:ai,doubleHeader:"Cash-in only",textAlign:"right",suffix:t,textStyle:function(e){return nO(e)},inputProps:{decimalPlaces:2}},{name:"minimumTx",display:"Minimun Tx",width:144,input:ai,doubleHeader:"Cash-in only",textAlign:"right",suffix:t,textStyle:function(e){return nO(e)},inputProps:{decimalPlaces:2}}]},iO=n(895),oO=function(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return M.a((function(e){return F.a(e.name,t)}),lO(e,n,a))},lO=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=function(e,t,n){return function(a){return e?L.a(T.a(t),Da.a(W.a(null!==n&&void 0!==n?n:"code",a)))(e):""}},r=function(e){return function(t){return t?L.a(Pg.a(", "),R.a(a(e,"code")))(t):t}},i=R.a((function(e){return e.machine}),n),o=function(e){return iO.a((function(e,t){return e.deviceId===t}),e,i)},l=e(["machines"]),c=e(["countries"]),s=e(["currencies"]),d=e(["languages"]),u=e(["cryptoCurrencies"]),m=ad,h=function(e){var t=Da.a(W.a("deviceId",e.machine))(l);return t?[t]:[]};return[{name:"machine",width:200,size:"sm",view:a(l,"name","deviceId"),input:Pr,inputProps:{options:function(e){return sl.a(h(e))(o(l))},valueProp:"deviceId",labelProp:"name"}},{name:"country",width:200,size:"sm",view:a(c,"display"),input:Pr,inputProps:{options:c,valueProp:"code",labelProp:"display"}},{name:"fiatCurrency",width:150,size:"sm",view:a(s,"code"),input:Pr,inputProps:{options:s,valueProp:"code",labelProp:"code"}},{name:"languages",width:200,size:"sm",view:r(d),input:Pr,inputProps:{options:d,valueProp:"code",labelProp:"display",multiple:!0}},{name:"cryptoCurrencies",width:170,size:"sm",view:r(u),input:Pr,inputProps:{options:u,valueProp:"code",labelProp:"code",multiple:!0,optionsLimit:null,onChange:t}},{name:"timezone",width:320,size:"sm",view:a(m,"label"),input:Pr,inputProps:{options:m,valueProp:"code",labelProp:"label"}}]},cO=function(e,t){var n=A.a(om.a,e);return oO(n,["country","fiatCurrency","languages","cryptoCurrencies","timezone"],t,void 0)},sO=function(e,t,n){var a=A.a(om.a,e);return oO(a,["machine","country","languages","cryptoCurrencies"],n,t)},dO=fn.f().shape({country:fn.h().label("Country").required(),fiatCurrency:fn.h().label("Fiat Currency").required(),languages:fn.a().label("Languages").required().min(1).max(4),cryptoCurrencies:fn.a().label("Crypto Currencies").required().min(1),timezone:fn.h().label("Timezone").required()}),uO=fn.f().shape({machine:fn.h().label("Machine").required(),country:fn.h().label("Country").required(),languages:fn.a().label("Languages").required().min(1).max(4),cryptoCurrencies:fn.a().label("Crypto Currencies").required().min(1)}),mO={country:"",fiatCurrency:"",languages:[],cryptoCurrencies:[],timezone:""},hO={machine:"",country:"",languages:[],cryptoCurrencies:[]},pO={editDisabled:{color:oe}},bO=function(e){return M.a((function(t){return t.class===e}))},fO=function(e){var t=e.id;return M.a((function(e){return hl.a(t)(e.cryptos)}))},jO=fn.f().shape({ticker:fn.h().required(),wallet:fn.h().required(),exchange:fn.h().required(),zeroConf:fn.h().required(),zeroConfLimit:fn.e().integer().required("Zero Conf Limit is a required field").min(0).max(Yh).transform($r)}),gO=fn.f().shape({cryptoUnits:fn.h().required(),allowTransactionBatching:fn.b()}),OO=function(e,t,n){var a=$c.a((function(e,t){var n=qc.a(e.getCryptoCurrency(t.id).units);return R.a((function(e){return{code:e,display:e}}))(n)}));return[{name:"id",header:"Cryptocurrency",width:180,view:function(t){return L.a(T.a(["display"]),Da.a(W.a("code",t)))(e)},size:"sm",editable:!1},{name:"cryptoUnits",size:"sm",stripe:!0,width:190,input:Pr,inputProps:{options:a(t),valueProp:"code",labelProp:"display"}},{name:"allowTransactionBatching",size:"sm",stripe:!0,width:250,view:function(e,t){return"BTC"!==t.id?Object(ze.jsx)("span",{style:pO.editDisabled,children:"No"}):n["".concat(t.id,"_allowTransactionBatching")]?"Yes":"No"},input:ti,editable:function(e){return"BTC"===e.id}}]},xO=function(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=a?11:0,i=function(t){return L.a(T.a(["display"]),Da.a(W.a("code",t)))(e)},o=function(e){return bO(e)(t||[])},l=function(e){return function(t){return L.a(T.a("display"),Da.a(W.a("code",t)))(o(e))}},c=$c.a((function(e,t){return fO(t)(o(e))}));return[{name:"id",header:"Cryptocurrency",width:150-r,view:i,size:"sm",editable:!1},{name:"ticker",size:"sm",stripe:!0,view:l("ticker"),width:175-r,input:Pr,inputProps:{options:c("ticker"),valueProp:"code",labelProp:"display",optionsLimit:null}},{name:"wallet",size:"sm",stripe:!0,view:l("wallet"),width:175-r,input:Pr,inputProps:{options:c("wallet"),valueProp:"code",labelProp:"display",optionsLimit:null,onChange:n}},{name:"exchange",size:"sm",stripe:!0,view:l("exchange"),width:175-r,input:Pr,inputProps:{options:c("exchange"),valueProp:"code",labelProp:"display",optionsLimit:null,onChange:n}},{name:"zeroConf",header:"Confidence Checking",size:"sm",stripe:!0,view:l("zeroConf"),input:Pr,width:210-r,inputProps:{options:c("zeroConf"),valueProp:"code",labelProp:"display",optionsLimit:null,onChange:n}},{name:"zeroConfLimit",header:"0-conf Limit",size:"sm",stripe:!0,view:function(e,t){return"ETH"===t.id?Object(ze.jsx)("span",{style:pO.editDisabled,children:e}):e},input:ai,width:145-r,inputProps:{decimalPlaces:0},editable:function(e){return"ETH"!==e.id}}]},vO=Object(f.a)({subtitle:{color:se,marginTop:16,marginBottom:16},extraMarginTop:{marginTop:72}}),yO=Object(a.memo)((function(e){var t,n=e.children,a=e.className,r=e.extraMarginTop,i=vO(),o=(t={},Object(z.a)(t,i.subtitle,!0),Object(z.a)(t,i.extraMarginTop,r),t);return Object(ze.jsx)(et,{className:I()(o,a),children:n})})),wO=Object(f.a)({section:{marginBottom:72},sectionHeader:{display:"flex",alignItems:"center"},sectionTitle:{margin:[[16,20,23,0]]}}),CO=function(e){var t=e.error,n=e.children,a=e.title,r=wO();return Object(ze.jsxs)("div",{className:r.section,children:[(a||t)&&Object(ze.jsxs)("div",{className:r.sectionHeader,children:[Object(ze.jsx)(yO,{className:r.sectionTitle,children:a}),t&&Object(ze.jsx)(tl,{children:"Failed to save changes"})]}),n]})},kO=Object(f.a)(Ki),EO=Object(f.a)({autoComplete:{width:"100%"}}),NO=x()(jg||(jg=Object(c.a)(["\n query getData {\n config\n }\n"]))),SO=x()(gg||(gg=Object(c.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"])));var IO,FO,LO=function(e){var t=e.isActive,n=e.doContinue,a=kO(),r=(EO(),Object(u.c)(NO).data),i=Object(u.b)(SO,{onCompleted:n}),o=Object(l.a)(i,1)[0],c=A.a(["fiatCurrency"])(os(Qc)(null===r||void 0===r?void 0:r.config)),s=os(Qc)(null===r||void 0===r?void 0:r.config);return Object(ze.jsxs)("div",{className:a.wrapper,children:[Object(ze.jsx)(rl,{title:"Commissions"}),Object(ze.jsx)(CO,{children:Object(ze.jsx)(Xh,{title:"Default setup",rowSize:"lg",titleLg:!0,name:"commissions",initialValues:Qg,enableEdit:!0,forceAdd:t,save:function(e){var t=ls("commissions")(e.commissions[0]);return o({variables:{config:t}})},validationSchema:Kg(s),data:[],elements:Gg(c)})})]})},PO=Object(f.a)(Ki),DO=x()(IO||(IO=Object(c.a)(["\n query getData {\n config\n accounts\n currencies {\n code\n display\n }\n countries {\n code\n display\n }\n cryptoCurrencies {\n code\n display\n }\n languages {\n code\n display\n }\n machines {\n name\n deviceId\n }\n }\n"]))),RO=x()(FO||(FO=Object(c.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"])));var TO,BO,AO=function(e){var t=e.isActive,n=e.doContinue,a=PO(),r=Object(u.c)(DO).data,i=Object(u.b)(RO,{onCompleted:n}),o=Object(l.a)(i,1)[0],c=av((null===r||void 0===r?void 0:r.config)||{},(null===r||void 0===r?void 0:r.cryptoCurrencies)||[]);return Object(ze.jsxs)("div",{className:a.wrapper,children:[Object(ze.jsx)(rl,{title:"Locales"}),Object(ze.jsx)(CO,{children:Object(ze.jsx)(Xh,{title:"Default settings",rowSize:"lg",titleLg:!0,name:"locale",initialValues:mO,forceAdd:t,enableEdit:!0,save:function(e){var t=ls("locale")(e.locale[0]);return o({variables:{config:t}})},validationSchema:dO,data:[],elements:cO($n.a(r,{cryptoCurrencies:c}),(function(e,t,n){return n(t)}))})})]})},MO=Object(f.a)({message:function(e){return{width:e.width,marginTop:4,marginLeft:16}}}),WO=function(e){var t=e.children,n=e.width,a=void 0===n?330:n,r=e.className,i=MO({width:a});return Object(ze.jsxs)(Yo.a,{display:"flex",className:r,children:[Object(ze.jsx)(tr,{}),Object(ze.jsx)(nt,{className:i.message,children:t})]})},zO=n(897),qO=Object(f.a)({button:{margin:[["auto",0,32,"auto"]]},form:{flex:1,display:"flex",flexDirection:"column"},grid:{marginBottom:24,marginTop:12}}),$O=function(e){var t=e.validationSchema,n=e.elements,a=e.value,r=e.save,i=e.buttonLabel,o=void 0===i?"Save changes":i,l=e.buttonClass,c=e.xs,d=void 0===c?12:c,u=qO(),m=L.a(zO.a,R.a((function(e){var t,n=e.code;return Object(z.a)({},n,null!==(t=a&&a[n])&&void 0!==t?t:"")})))(n),p=$n.a(m,a);return Object(ze.jsx)(un.e,{validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,initialValues:p,validationSchema:t,onSubmit:function(e){var t=L.a(R.a(T.a("code")),M.a((function(t){return T.a("component",t)===ii&&Ta.a(e[T.a("code",t)])})))(n);return r(cm.a(t,e))},children:Object(ze.jsxs)(un.d,{className:u.form,children:[Object(ze.jsx)(h.a,{container:!0,spacing:3,className:u.grid,children:n.map((function(e){var t=e.component,n=e.code,a=e.display,r=e.settings,i=e.inputProps;return Object(ze.jsx)(h.a,{item:!0,xs:d,children:Object(ze.jsx)(un.a,Object(s.a)(Object(s.a)({component:t},i),{},{name:n,label:a,settings:r,fullWidth:!0}))},n)}))}),Object(ze.jsx)(Dn,{className:I()(u.button,l),type:"submit",children:o})]})})},HO=function(e){return{test:function(t){return!D.a(e)||!D.a(t)||this.createError()}}},VO={code:"twilio",name:"Twilio",title:"Twilio (SMS)",elements:[{code:"accountSid",display:"Account SID",component:oi},{code:"authToken",display:"Auth Token",component:ii},{code:"fromNumber",display:"Twilio Number (international format)",component:oi,face:!0},{code:"toNumber",display:"Notifications Number (international format)",component:oi,face:!0}],getValidationSchema:function(e){return fn.f().shape({accountSid:fn.h().max(100,"Too long").required(),authToken:fn.h().max(100,"Too long").test(HO(null===e||void 0===e?void 0:e.authToken)),fromNumber:fn.h().max(100,"Too long").required(),toNumber:fn.h().max(100,"Too long").required()})}},UO={radioGroup:{flexDirection:"row",width:600},radioLabel:{width:150,height:48},mdForm:{width:385},infoMessage:{display:"flex",marginBottom:20,"& > p":{width:330,marginTop:4,marginLeft:16}},actionButton:{marginBottom:32},actionButtonLink:{textDecoration:"none",color:J},error:{color:he},button:{marginTop:40},formButton:{margin:[[24,0,0]]}},GO=x()(TO||(TO=Object(c.a)(["\n {\n config\n accounts\n }\n"]))),XO=x()(BO||(BO=Object(c.a)(["\n mutation Save($accounts: JSONObject) {\n saveAccounts(accounts: $accounts)\n }\n"]))),_O=Object(f.a)(Object(s.a)(Object(s.a)({},UO),{},{content:{width:820},radioLabel:Object(s.a)(Object(s.a)({},UO.radioLabel),{},{width:280}),wrapper:{width:1200,height:100,margin:[[0,"auto"]]},title:{marginLeft:8,marginBottom:5},info:{marginTop:20,marginBottom:20}})),KO=[{code:"enable",display:"Yes, I will"},{code:"disable",display:"No, not for now"}];var ZO,QO,YO,JO,ex,tx,nx,ax,rx,ix,ox,lx=function(e){var t,n,r=e.doContinue,i=_O(),o=Object(a.useState)(null),c=Object(l.a)(o,2),s=c[0],d=c[1],m=Object(a.useState)(!1),h=Object(l.a)(m,2),p=h[0],b=h[1],f=Object(u.c)(GO),j=f.data,g=f.refetch,O=Object(u.b)(XO,{onCompleted:r}),x=Object(l.a)(O,1)[0],v=null!==(t=null===j||void 0===j?void 0:j.accounts)&&void 0!==t?t:[],y=(n={},Object(z.a)(n,i.title,!0),Object(z.a)(n,i.error,p),n);return Object(ze.jsx)("div",{className:i.wrapper,children:Object(ze.jsxs)("div",{className:i.content,children:[Object(ze.jsx)(Ve,{children:"Twilio (SMS service)"}),Object(ze.jsxs)(Yo.a,{display:"flex",alignItems:"end",children:[Object(ze.jsx)(Xe,{noMargin:!0,className:I()(y),children:"Will you setup a two way machine or compliance?"}),Object(ze.jsxs)(Ep,{width:304,children:[Object(ze.jsx)(Ke,{children:"Two-way machines allow your customers not only to buy (cash-in) but also sell cryptocurrencies (cash-out)."}),Object(ze.jsx)(Ke,{children:"You\u2019ll need an SMS service for cash-out transactions and for any compliance triggers"})]})]}),Object(ze.jsx)(yr,{labelClassName:i.radioLabel,className:i.radioGroup,options:KO,value:s,onChange:function(e){d(e.target.value),b(!1)}}),Object(ze.jsx)(WO,{className:i.info,children:"To set up Twilio please read the instructions from our support portal."}),Object(ze.jsx)(Ia,{link:"https://support.lamassu.is/hc/en-us/articles/115001203951-Twilio-for-SMS",label:"Twilio for SMS"}),"enable"===s&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Xe,{noMargin:!0,children:"Enter credentials"}),Object(ze.jsx)($O,{xs:6,save:function(e){return x({variables:{accounts:{twilio:e}}}).then((function(){return g()}))},value:v.twilio,elements:VO.elements,validationSchema:VO.validationSchema,buttonLabel:"Continue",buttonClass:i.formButton})]}),"enable"!==s&&Object(ze.jsx)(Dn,{size:"lg",onClick:function(){if(!s)return b(!0);r()},className:i.button,children:"Continue"})]})})},cx=n(898),sx=Object(f.a)(UO),dx=x()(ZO||(ZO=Object(c.a)(["\n query getData {\n config\n accounts\n accountsConfig {\n code\n display\n class\n cryptos\n }\n cryptoCurrencies {\n code\n display\n }\n }\n"]))),ux=x()(QO||(QO=Object(c.a)(["\n mutation Save($config: JSONObject, $accounts: JSONObject) {\n saveConfig(config: $config)\n saveAccounts(accounts: $accounts)\n }\n"]))),mx=function(e){var t,n=e.data,r=e.doContinue,i=sx(),o=Object(u.c)(dx).data,c=Object(u.b)(ux,{onCompleted:r}),d=Object(l.a)(c,1)[0],m=Object(a.useState)(!1),h=Object(l.a)(m,2),p=h[0],b=h[1],f=null===n||void 0===n?void 0:n.coin,j=null===o||void 0===o?void 0:o.accountsConfig,g=null!==(t=null===o||void 0===o?void 0:o.cryptoCurrencies)&&void 0!==t?t:[];return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Xe,{className:p&&i.error,children:"All set"}),Object(ze.jsx)(Ke,{children:"These are your wallet settings. You can later edit these and add additional coins."}),Object(ze.jsx)(_h,{rowSize:"lg",titleLg:!0,name:"All set",namespaces:[f],data:ls(f,cm.a("coin",n)),elements:xO(g,j,!0)}),Object(ze.jsx)(Dn,{size:"lg",onClick:function(){var e=Rf.a(qc.a(Lf.utils.getCryptoCurrency(f).units)),t=Object(s.a)(Object(s.a)({zeroConfLimit:0},n),{},{cryptoUnits:e});if(!jO.isValidSync(t))return b(!0);var a=ls(f,cm.a("coin",t)),r=ls(_c)(a);return b(!1),d({variables:{config:r}})},className:i.button,children:"Continue"})]})},hx={code:"binanceus",name:"Binance.us",title:"Binance.us (Exchange)",elements:[{code:"apiKey",display:"API Key",component:oi,face:!0,long:!0},{code:"privateKey",display:"Private Key",component:ii}],getValidationSchema:function(e){return fn.f().shape({apiKey:fn.h().max(100,"Too long").required(),privateKey:fn.h().max(100,"Too long").test(HO(null===e||void 0===e?void 0:e.privateKey))})}},px=function(e){return e&&e.length},bx=function(e,t){return fn.h().max(100,"Too long").when(e,{is:px,then:fn.h().test(HO(t))})},fx={code:"bitgo",name:"BitGo",title:"BitGo (Wallet)",elements:[{code:"token",display:"API Token",component:oi,face:!0,long:!0},{code:"environment",display:"Environment",component:Pr,inputProps:{options:[{code:"prod",display:"prod"},{code:"test",display:"test"}],labelProp:"display",valueProp:"code"},face:!0},{code:"BTCWalletId",display:"BTC Wallet ID",component:oi},{code:"BTCWalletPassphrase",display:"BTC Wallet Passphrase",component:ii},{code:"LTCWalletId",display:"LTC Wallet ID",component:oi},{code:"LTCWalletPassphrase",display:"LTC Wallet Passphrase",component:ii},{code:"ZECWalletId",display:"ZEC Wallet ID",component:oi},{code:"ZECWalletPassphrase",display:"ZEC Wallet Passphrase",component:ii},{code:"BCHWalletId",display:"BCH Wallet ID",component:oi},{code:"BCHWalletPassphrase",display:"BCH Wallet Passphrase",component:ii},{code:"DASHWalletId",display:"DASH Wallet ID",component:oi},{code:"DASHWalletPassphrase",display:"DASH Wallet Passphrase",component:ii}],getValidationSchema:function(e){return fn.f().shape({token:fn.h().max(100,"Too long").required(),BTCWalletId:fn.h().max(100,"Too long"),BTCWalletPassphrase:bx("BTCWalletId",null===e||void 0===e?void 0:e.BTCWalletPassphrase),LTCWalletId:fn.h().max(100,"Too long"),LTCWalletPassphrase:bx("LTCWalletId",null===e||void 0===e?void 0:e.LTCWalletPassphrase),ZECWalletId:fn.h().max(100,"Too long"),ZECWalletPassphrase:bx("ZECWalletId",null===e||void 0===e?void 0:e.ZECWalletPassphrase),BCHWalletId:fn.h().max(100,"Too long"),BCHWalletPassphrase:bx("BCHWalletId",null===e||void 0===e?void 0:e.BCHWalletPassphrase),DASHWalletId:fn.h().max(100,"Too long"),DASHWalletPassphrase:bx("DASHWalletId",null===e||void 0===e?void 0:e.DASHWalletPassphrase),environment:fn.h().matches(/(prod|test)/).required()})}},jx={code:"bitstamp",name:"Bitstamp",title:"Bitstamp (Exchange)",elements:[{code:"clientId",display:"Client ID",component:oi,face:!0,long:!0},{code:"key",display:"API Key",component:oi,face:!0,long:!0},{code:"secret",display:"API Secret",component:ii}],getValidationSchema:function(e){return fn.f().shape({clientId:fn.h().max(100,"Too long").required(),key:fn.h().max(100,"Too long").required(),secret:fn.h().max(100,"Too long").test(HO(null===e||void 0===e?void 0:e.secret))})}},gx={code:"blockcypher",name:"Blockcypher",title:"Blockcypher (Payments)",elements:[{code:"token",display:"API Token",component:oi,face:!0,long:!0},{code:"confidenceFactor",display:"Confidence Factor",component:oi,face:!0},{code:"rbf",component:ti,settings:{field:"wallets_BTC_wallet",enabled:!0,disabledMessage:"Lower the confidence of RBF transactions (Available when using bitcoind.)",label:"Lower the confidence of RBF transactions",requirement:"bitcoind",rightSideLabel:!0},face:!0}],getValidationSchema:function(){return fn.f().shape({token:fn.h().max(100,"Too long").required(),confidenceFactor:fn.e().integer("Please input a positive integer").positive("Please input a positive integer").required()})}},Ox={code:"cex",name:"Cex",title:"Cex (Exchange)",elements:[{code:"apiKey",display:"API Key",component:oi,face:!0,long:!0},{code:"privateKey",display:"Private Key",component:ii}],getValidationSchema:function(e){return fn.f().shape({apiKey:fn.h().max(100,"Too long").required(),privateKey:fn.h().max(100,"Too long").test(HO(null===e||void 0===e?void 0:e.privateKey))})}},xx={code:"ciphertrace",name:"CipherTrace",title:"CipherTrace (Scoring)",elements:[{code:"authorizationValue",display:"Authorization value",component:ii},{code:"scoreThreshold",display:"Score threshold",component:ai,face:!0,long:!0},{code:"enabled",component:ti,settings:{enabled:!0,disabledMessage:"This plugin is disabled",label:"Enabled",requirement:null},face:!0}],getValidationSchema:function(e){return fn.f().shape({authorizationValue:fn.h().max(100,"Too long").test(HO(null===e||void 0===e?void 0:e.authorizationValue)),scoreThreshold:fn.e().min(1,"The number should be between 1 and 10").max(10,"The number should be between 1 and 10").test(HO(null===e||void 0===e?void 0:e.scoreThreshold))})}},vx={code:"ftx",name:"Ftx",title:"Ftx (Exchange)",elements:[{code:"apiKey",display:"API Key",component:oi,face:!0,long:!0},{code:"privateKey",display:"Private Key",component:ii}],getValidationSchema:function(e){return fn.f().shape({apiKey:fn.h().max(100,"Too long").required(),privateKey:fn.h().max(100,"Too long").test(HO(null===e||void 0===e?void 0:e.privateKey))})}},yx={code:"infura",name:"Infura",title:"Infura (Wallet)",elements:[{code:"apiKey",display:"Project ID",component:oi,face:!0,long:!0},{code:"apiSecret",display:"Project Secret",component:ii},{code:"endpoint",display:"Endpoint",component:oi,face:!0}],getValidationSchema:function(e){return fn.f().shape({apiKey:fn.h().max(100,"Too long").required(),apiSecret:fn.h().max(100,"Too long").test(HO(null===e||void 0===e?void 0:e.apiSecret)),endpoint:fn.h().max(100,"Too long").required()})}},wx={code:"itbit",name:"itBit",title:"itBit (Exchange)",elements:[{code:"userId",display:"User ID",component:oi,face:!0,long:!0},{code:"walletId",display:"Wallet ID",component:oi,face:!0,long:!0},{code:"clientKey",display:"Client Key",component:oi},{code:"clientSecret",display:"Client Secret",component:ii}],getValidationSchema:function(e){return fn.f().shape({userId:fn.h().max(100,"Too long").required(),walletId:fn.h().max(100,"Too long").required(),clientKey:fn.h().max(100,"Too long").required(),clientSecret:fn.h().max(100,"Too long").test(HO(null===e||void 0===e?void 0:e.clientSecret))})}},Cx={code:"kraken",name:"Kraken",title:"Kraken (Exchange)",elements:[{code:"apiKey",display:"API Key",component:oi,face:!0,long:!0},{code:"privateKey",display:"Private Key",component:ii}],getValidationSchema:function(e){return fn.f().shape({apiKey:fn.h().max(100,"Too long").required(),privateKey:fn.h().max(100,"Too long").test(HO(null===e||void 0===e?void 0:e.privateKey))})}},kx={code:"mailgun",name:"Mailgun",title:"Mailgun (Email)",elements:[{code:"apiKey",display:"API Key",component:oi},{code:"domain",display:"Domain",component:oi},{code:"fromEmail",display:"From Email",component:oi,face:!0},{code:"toEmail",display:"To Email",component:oi,face:!0}],getValidationSchema:function(){return fn.f().shape({apiKey:fn.h().max(100,"Too long").required(),domain:fn.h().max(100,"Too long").required(),fromEmail:fn.h().max(100,"Too long").email("Please input a valid email address").required(),toEmail:fn.h().max(100,"Too long").email("Please input a valid email address").required()})}},Ex=(YO={},Object(z.a)(YO,fx.code,fx),Object(z.a)(YO,jx.code,jx),Object(z.a)(YO,gx.code,gx),Object(z.a)(YO,yx.code,yx),Object(z.a)(YO,wx.code,wx),Object(z.a)(YO,Cx.code,Cx),Object(z.a)(YO,kx.code,kx),Object(z.a)(YO,VO.code,VO),Object(z.a)(YO,hx.code,hx),Object(z.a)(YO,Ox.code,Ox),Object(z.a)(YO,vx.code,vx),Object(z.a)(YO,xx.code,xx),YO),Nx=Object(f.a)(Object(s.a)(Object(s.a)({},UO),{},{radioGroup:UO.radioGroup,radioLabel:Object(s.a)(Object(s.a)({},UO.radioLabel),{},{width:200})})),Sx=x()(JO||(JO=Object(c.a)(["\n {\n accounts\n }\n"]))),Ix=x()(ex||(ex=Object(c.a)(["\n mutation SaveAccountsBC($accounts: JSONObject) {\n saveAccounts(accounts: $accounts)\n }\n"]))),Fx=[{code:"enable",display:"I will enable cash-out"},{code:"disable",display:"I won't enable cash-out"}],Lx=function(e){var t,n=e.addData,r=Nx(),i=Object(u.c)(Sx).data,o=Object(u.b)(Ix,{onCompleted:function(){return n({zeroConf:"blockcypher"})}}),c=Object(l.a)(o,1)[0],s=Object(a.useState)(null),d=Object(l.a)(s,2),m=d[0],h=d[1],p=Object(a.useState)(!1),b=Object(l.a)(p,2),f=b[0],j=b[1],g=null!==(t=null===i||void 0===i?void 0:i.accounts)&&void 0!==t?t:[];return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Xe,{className:f&&r.error,children:"Blockcypher"}),Object(ze.jsx)(Ke,{children:"If you are enabling cash-out services, create a Blockcypher account."}),Object(ze.jsx)(Ia,{link:"https://support.lamassu.is/hc/en-us/articles/115001209472-Blockcypher",label:"Configuring Blockcypher"}),Object(ze.jsx)(yr,{labelClassName:r.radioLabel,className:r.radioGroup,options:Fx,value:m,onChange:function(e){h(e.target.value),j(!1)}}),Object(ze.jsxs)("div",{className:r.mdForm,children:["disable"===m&&Object(ze.jsx)(Dn,{size:"lg",onClick:function(){return n({zeroConf:"none",zeroConfLimit:0})},className:r.button,children:"Continue"}),"enable"===m&&Object(ze.jsx)($O,{value:g.blockcypher,save:function(e){return c({variables:{accounts:{blockcypher:e}}})},elements:Ex.blockcypher.elements,validationSchema:Ex.blockcypher.validationSchema,buttonLabel:"Continue",buttonClass:r.formButton})]})]})},Px=Object(f.a)(UO),Dx=x()(tx||(tx=Object(c.a)(["\n {\n cryptoCurrencies {\n code\n display\n }\n }\n"]))),Rx=fn.f().shape({coin:fn.h().required()}),Tx=function(e){var t,n=e.addData,r=Px(),i=Object(a.useState)(!1),o=Object(l.a)(i,2),c=o[0],s=o[1],d=Object(u.c)(Dx).data,m=null!==(t=null===d||void 0===d?void 0:d.cryptoCurrencies)&&void 0!==t?t:[];return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Xe,{className:c&&r.error,children:"Choose your first cryptocurrency"}),Object(ze.jsx)(un.e,{validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,initialValues:{coin:""},onSubmit:function(e){return Rx.isValidSync(e)?"BTC"!==e.coin?n({coin:e.coin,zeroConf:"none",zeroConfLimit:0}):void n(e):s(!0)},children:Object(ze.jsxs)(un.d,{onChange:function(){return s(!1)},children:[Object(ze.jsx)(bm,{}),Object(ze.jsx)(un.b,{component:ri,name:"coin",labelClassName:r.radioLabel,className:r.radioGroup,options:m}),Object(ze.jsx)(Dn,{size:"lg",type:"submit",className:r.button,children:"Continue"})]})})]})},Bx=function(e,t){return M.a((function(n){return function(e){return W.a("class",e)}(t)(n)&&function(e){return L.a(hl.a(e),T.a("cryptos"))}(e)(n)}))},Ax=function(e,t,n,a){var r=Bx(a,n)(e),i=fs.a((function(e){var n=e.code,a=function(e){return t&&t[e]}(n);return!Ex[n]||(0,Ex[n].getValidationSchema)(a).isValidSync(a)}))(r),o=Object(l.a)(i,2);return{filled:o[0],unfilled:o[1]}},Mx=Object(f.a)(UO),Wx=x()(nx||(nx=Object(c.a)(["\n {\n accounts\n accountsConfig {\n code\n display\n class\n cryptos\n }\n cryptoCurrencies {\n code\n display\n }\n }\n"]))),zx=x()(ax||(ax=Object(c.a)(["\n mutation Save($accounts: JSONObject) {\n saveAccounts(accounts: $accounts)\n }\n"]))),qx=function(e){return!D.a(e)&&!hl.a(e)(["mock-exchange","no-exchange"])},$x=function(e){var t,n,r,i=e.data,o=e.addData,c=Mx(),s=Object(u.c)(Wx).data,d=Object(u.b)(zx,{onCompleted:function(){return k()}}),m=Object(l.a)(d,1)[0],h=Object(a.useState)(null),p=Object(l.a)(h,2),b=p[0],f=p[1],j=Object(a.useState)(!1),g=Object(l.a)(j,2),O=g[0],x=g[1],v=null!==(t=null===s||void 0===s?void 0:s.accounts)&&void 0!==t?t:[],y=null!==(n=null===s||void 0===s?void 0:s.accountsConfig)&&void 0!==n?n:[],w=i.coin,C=Ax(y,v,"exchange",w),k=function(){if(!b)return x(!0);o({exchange:b})};return Object(ze.jsxs)("div",{className:c.mdForm,children:[Object(ze.jsx)(Xe,{className:O&&c.error,children:"Choose your exchange"}),Object(ze.jsx)(yr,{labelClassName:c.radioLabel,className:c.radioGroup,options:Ra.a(C.filled,C.unfilled),value:b,onChange:function(e){f(e.target.value),x(!1)}}),!qx(b)&&Object(ze.jsx)(Dn,{size:"lg",onClick:k,className:c.button,children:"Continue"}),qx(b)&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsxs)("div",{className:c.infoMessage,children:[Object(ze.jsx)(tr,{}),Object(ze.jsxs)(Ye,{children:["Make sure you set up ",Ex[b].name," to enter the necessary information below. Please follow the instructions on our support page if you haven\u2019t."]})]}),Object(ze.jsx)(Ia,{link:{kraken:"https://support.lamassu.is/hc/en-us/articles/115001206891-Kraken-trading",itbit:"https://support.lamassu.is/hc/en-us/articles/360026195032-itBit-trading",bitstamp:"https://support.lamassu.is/hc/en-us/articles/115001206911-Bitstamp-trading"}[b],label:"".concat(Ex[b].name," trading")}),Object(ze.jsx)(Xe,{noMargin:!0,children:"Enter exchange information"}),Object(ze.jsx)($O,{value:v[b],save:(r=b,function(e){var t=Object(z.a)({},r,e);return m({variables:{accounts:t}})}),elements:Ex[b].elements,validationSchema:Ex[b].validationSchema,buttonLabel:"Continue",buttonClass:c.formButton})]})]})},Hx=Object(f.a)(UO),Vx=x()(rx||(rx=Object(c.a)(["\n {\n accountsConfig {\n code\n display\n class\n cryptos\n }\n }\n"]))),Ux=function(e){var t,n,r=e.data,i=e.addData,o=Hx(),c=Object(u.c)(Vx).data,s=Object(a.useState)(null),d=Object(l.a)(s,2),m=d[0],h=d[1],p=Object(a.useState)(!1),b=Object(l.a)(p,2),f=b[0],j=b[1],g=null!==(t=null===c||void 0===c?void 0:c.accounts)&&void 0!==t?t:[],O=null!==(n=null===c||void 0===c?void 0:c.accountsConfig)&&void 0!==n?n:[],x=r.coin,v=Ax(O,g,"ticker",x);return Object(ze.jsxs)("div",{className:o.mdForm,children:[Object(ze.jsx)(Xe,{className:f&&o.error,children:"Choose your ticker"}),Object(ze.jsx)(yr,{labelClassName:o.radioLabel,className:o.radioGroup,options:Ra.a(v.filled,v.unfilled),value:m,onChange:function(e){h(e.target.value),j(!1)}}),Object(ze.jsx)(Dn,{size:"lg",onClick:function(){if(!m)return j(!0);i({ticker:m})},className:o.button,children:"Continue"})]})},Gx=function(e){var t;return{code:"bitgo",name:"BitGo",title:"BitGo (Wallet)",elements:[{code:"token",display:"API Token",component:oi,face:!0,long:!0},{code:"environment",display:"Environment",component:Pr,inputProps:{options:[{code:"prod",display:"prod"},{code:"test",display:"test"}],labelProp:"display",valueProp:"code"},face:!0},{code:"".concat(e,"WalletId"),display:"".concat(e," Wallet ID"),component:oi},{code:"".concat(e,"WalletPassphrase"),display:"".concat(e," Wallet Passphrase"),component:ii}],validationSchema:fn.f().shape((t={token:fn.h().max(100,"Too long").required(),environment:fn.h().matches(/(prod|test)/).required()},Object(z.a)(t,"".concat(e,"WalletId"),fn.h().max(100,"Too long").required()),Object(z.a)(t,"".concat(e,"WalletPassphrase"),fn.h().max(100,"Too long").required()),t))}},Xx=Object(f.a)(UO),_x=x()(ix||(ix=Object(c.a)(["\n {\n accounts\n accountsConfig {\n code\n display\n class\n cryptos\n }\n cryptoCurrencies {\n code\n display\n }\n }\n"]))),Kx=x()(ox||(ox=Object(c.a)(["\n mutation Save($accounts: JSONObject) {\n saveAccounts(accounts: $accounts)\n }\n"]))),Zx=function(e){return hl.a(e)(["infura","bitgo"])},Qx=function(e){var t,n,r,i=e.data,o=e.addData,c=Xx(),s=Object(u.c)(_x).data,d=Object(u.b)(Kx,{onCompleted:function(){return E()}}),m=Object(l.a)(d,1)[0],h=Object(a.useState)(null),p=Object(l.a)(h,2),b=p[0],f=p[1],j=Object(a.useState)(!1),g=Object(l.a)(j,2),O=g[0],x=g[1],v=null!==(t=null===s||void 0===s?void 0:s.accounts)&&void 0!==t?t:[],y=null!==(n=null===s||void 0===s?void 0:s.accountsConfig)&&void 0!==n?n:[],w=i.coin,C=Ax(y,v,"wallet",w),k=function(e){return function(t){var n=Object(z.a)({},e,t);return m({variables:{accounts:n}})}},E=function(){if(!b)return x(!0);o({wallet:b})};return Object(ze.jsxs)("div",{className:c.mdForm,children:[Object(ze.jsx)(Xe,{className:O&&c.error,children:"Choose your wallet"}),Object(ze.jsx)(yr,{labelClassName:c.radioLabel,className:c.radioGroup,options:Ra.a(C.filled,C.unfilled),value:b,onChange:function(e){f(e.target.value),x(!1)}}),(r=b,hl.a(r)(["bitcoind","geth","litecoind","dashd","zcashd","bitcoincashd"])&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsxs)("div",{className:c.infoMessage,children:[Object(ze.jsx)(tr,{}),Object(ze.jsxs)(Ye,{children:["To set up ",b," please read the node wallet instructions from our support portal."]})]}),Object(ze.jsx)(Ia,{link:"https://support.lamassu.is/hc/en-us/articles/115001209552-Setting-up-your-node-wallets",label:"Support article"})]})),!Zx(b)&&Object(ze.jsx)(Dn,{size:"lg",onClick:E,className:c.button,children:"Continue"}),"bitgo"===b&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsxs)("div",{className:c.infoMessage,children:[Object(ze.jsx)(tr,{}),Object(ze.jsx)(Ye,{children:"Make sure you set up a BitGo wallet to enter the necessary information below. Please follow the instructions on our support page if you haven\u2019t."})]}),Object(ze.jsx)(Ia,{link:"https://support.lamassu.is/hc/en-us/articles/360024455592-Setting-up-BitGo",label:"Support article"}),Object(ze.jsx)(Xe,{noMargin:!0,children:"Enter wallet information"}),Object(ze.jsx)($O,{value:v.bitgo,save:k(b),elements:Gx(w).elements,validationSchema:Gx(w).validationSchema,buttonLabel:"Continue",buttonClass:c.formButton})]}),"infura"===b&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Xe,{noMargin:!0,children:"Enter wallet information"}),Object(ze.jsx)($O,{value:v.infura,save:k(b),elements:Ex.infura.elements,validationSchema:Ex.infura.getValidationSchema(v.infura),buttonLabel:"Continue",buttonClass:c.formButton})]})]})},Yx=Object(f.a)(Ki),Jx=[{label:"Choose cryptocurrency",component:Tx},{label:"Choose wallet",component:Qx},{label:"Choose ticker",component:Ux},{label:"Exchange",component:$x},{label:"Blockcypher",component:Lx},{label:"All set",component:mx}],ev=function(e){var t=e.doContinue,n=Object(a.useState)(0),r=Object(l.a)(n,2),i=r[0],o=r[1],c=Object(a.useState)({}),s=Object(l.a)(c,2),d=s[0],u=s[1],m=Yx(),h="BTC"===(null===d||void 0===d?void 0:d.coin)?Jx:cx.a(4,1,Jx),p=h[i].component;return Object(ze.jsxs)("div",{className:m.wrapper,children:[Object(ze.jsx)("div",{className:m.headerDiv,children:Object(ze.jsx)(rl,{title:"Wallet settings"})}),Object(ze.jsxs)("div",{className:m.contentDiv,children:[Object(ze.jsx)(ki,{children:h.map((function(e,t){return Object(ze.jsx)(Ei,{step:i,it:e,idx:t,steps:h},t)}))}),Object(ze.jsx)("div",{className:m.contentWrapper,children:Object(ze.jsx)(p,{data:d,addData:function(e){u($n.a(d,e)),o(i+1)},doContinue:t})})]})]})},tv={welcome:{textAlign:"center",paddingTop:256},title:{lineHeight:1,fontSize:48},getStarted:{fontSize:24,fontWeight:500,marginBottom:54,color:$}},nv=Object(f.a)(tv);var av=function(e,t){var n=os(_c,e);return M.a((function(e){return jO.isValidSync(os(e.code,n))}))(t)},rv=function(e,t){return e?function(e,t){var n=os(_c,e),a=R.a((function(e){return os(e.code,n)}))(t);return L.a(dl.a(Du.a),R.a((function(e){return jO.isValidSync(e)})))(a)}(e,t)?function(e){var t=os(Qc,e);return dO.isValidSync(t)}(e)?function(e){var t=os(Yc,e),n=os(Qc,e);return Kg(n).isValidSync(t)}(e)?0:3:2:1:0},iv=[{id:"welcome",Component:function(e){var t=e.doContinue,n=nv();return Object(ze.jsxs)("div",{className:n.welcome,children:[Object(ze.jsx)(Ve,{className:n.title,children:"Welcome to the Lamassu Admin"}),Object(ze.jsxs)(Ke,{className:n.getStarted,children:["To get you started, we\u2019ve put together a wizard that will",Object(ze.jsx)("br",{}),"help set up what you need before pairing your machines."]}),Object(ze.jsx)(Dn,{size:"xl",onClick:t,children:"Get started"})]})}},{id:"wallet",Component:ev,exImage:"/assets/wizard/fullexample.wallet.png",subtitle:"Wallet settings",text:"Your wallet settings are the first step for this wizard. \n We'll start by setting up one of cryptocurrencies to get you up and running,\n but you can later set up as many as you want."},{id:"locale",Component:AO,exImage:"/assets/wizard/fullexample.locale.png",subtitle:"Locales",text:"From the Locales panel, you can define default settings\n that will be applied to all machines you add to your network later on.\n These settings may be overridden for specific machines in the Overrides section."},{id:"twilio",Component:lx,exImage:"/assets/wizard/fullexample.twilio.png",subtitle:"Twilio (SMS service)",text:Object(ze.jsxs)(ze.Fragment,{children:["Twilio is used for SMS operator notifications, phone number collection for compliance, and 1-confirmation redemptions on cash-out transactions.",Object(ze.jsx)("br",{}),"You'll need to configure Twilio if you're offering cash-out or any compliance options"]})},{id:"commissions",Component:LO,exImage:"/assets/wizard/fullexample.commissions.png",subtitle:"Commissions",text:"From the Commissions page, you can define all the commissions of your\n machines. The values set here will be default values of all machines\n you'll later add to your network. Default settings keep you from\n having to enter the same values everytime you add a new machine. Once\n a machine is added, you may override these values per machine and per\n cryptocurrency in the overrides section."}],ov=n(899),lv=Object(f.a)((function(){return{drawer:{borderTop:"none",boxShadow:"0 0 4px 0 rgba(0, 0, 0, 0.08)"},wrapper:{padding:"32px 0",flexGrow:1,height:264},smallWrapper:{height:84},title:{margin:[[0,32,0,0]]},subtitle:{marginTop:8,marginBottom:6,lineHeight:1.25,display:"inline"},modal:{background:"none",boxShadow:"none"}}}));var cv,sv,dv,uv,mv,hv,pv,bv,fv,jv,gv=function(e){var t,n=e.currentStep,r=e.steps,i=e.subtitle,o=e.text,c=e.exImage,s=e.open,d=e.start,u=lv(),m=Object(a.useState)(!1),p=Object(l.a)(m,2),b=p[0],f=p[1],j=(t={},Object(z.a)(t,u.wrapper,!0),Object(z.a)(t,u.smallWrapper,!s),t);return Object(ze.jsxs)(ov.a,{anchor:"bottom",open:!0,variant:"persistent",classes:{paperAnchorDockedBottom:u.drawer},children:[Object(ze.jsxs)("div",{className:I()(j),children:[Object(ze.jsxs)(h.a,{container:!0,direction:"row",justify:"center",alignItems:"baseline",children:[Object(ze.jsxs)(h.a,{item:!0,xs:5,container:!0,direction:s?"column":"row",justify:"flex-start",alignItems:"baseline",children:[Object(ze.jsx)(Ue,{className:u.title,children:"Setup Lamassu Admin"}),Object(ze.jsx)(Qe,{className:u.subtitle,children:i}),s&&Object(ze.jsx)(Ke,{children:o})]}),Object(ze.jsx)(h.a,{item:!0,xs:4,container:!0,direction:"column",justify:"flex-start",alignItems:"flex-end",spacing:5,children:Object(ze.jsx)(h.a,{item:!0,xs:12,children:r&&n&&Object(ze.jsx)(pp,{currentStep:n,steps:r})})})]}),s&&Object(ze.jsxs)(h.a,{container:!0,direction:"row",justify:"center",alignItems:"baseline",children:[Object(ze.jsx)(h.a,{item:!0,xs:5,container:!0,direction:"column",justify:"flex-start",alignItems:"flex-start",children:Object(ze.jsx)(na,{onClick:function(){f(!0)},children:"See full example"})}),Object(ze.jsx)(h.a,{item:!0,xs:4,container:!0,direction:"column",justify:"flex-start",alignItems:"flex-end",spacing:5,children:Object(ze.jsx)(h.a,{item:!0,children:Object(ze.jsx)(Dn,{size:"lg",onClick:d,children:"Get Started"})})})]})]}),Object(ze.jsx)(Qh,{closeOnEscape:!0,closeOnBackdropClick:!0,className:u.modal,xl:!0,width:1328,handleClose:function(){f(!1)},open:b,children:Object(ze.jsx)("img",{width:1152,src:c,alt:""})})]})},Ov=Object(f.a)({wrapper:{display:"flex",padding:[[16,0]],flexDirection:"column",justifyContent:"space-between",backgroundColor:ae},welcomeBackground:{background:"url(/wizard-background.svg) no-repeat center center fixed",backgroundColor:ae,backgroundSize:"cover"},blurred:{filter:"blur(4px)",pointerEvents:"none"}}),xv=x()(cv||(cv=Object(c.a)(["\n query getData {\n config\n accounts\n cryptoCurrencies {\n code\n display\n }\n }\n"]))),vv=function(e){e.fromAuthRegister;var t,n,r=Ov(),i=Object(u.c)(xv),o=i.data,c=i.loading,s=Object(w.h)(),d=Object(a.useContext)(k).setWizardTested,m=Object(a.useState)(0),h=Object(l.a)(m,2),p=h[0],b=h[1],f=Object(a.useState)(!0),j=Object(l.a)(f,2),g=j[0],O=j[1],x=Object(a.useState)(!1),v=Object(l.a)(x,2),y=v[0],C=v[1];if(c)return Object(ze.jsx)(ze.Fragment,{});var E=rv(null===o||void 0===o?void 0:o.config,null===o||void 0===o?void 0:o.cryptoCurrencies),N=s.length&&!(null===(t=s.location.state)||void 0===t?void 0:t.fromAuthRegister);0===E&&(d(!0),N?s.goBack():s.push("/"));var S=0===p,F=(n={},Object(z.a)(n,r.blurred,y),Object(z.a)(n,r.wrapper,!0),Object(z.a)(n,r.welcomeBackground,S),n),L=iv[p];return Object(ze.jsxs)(ln.a,{fullScreen:!0,open:g,children:[Object(ze.jsx)(cn.a,{className:I()(F),children:Object(ze.jsx)(L.Component,{doContinue:function(){p>=iv.length-1&&(O(!1),s.push("/"));var e=0===p&&E?E:p+1;C(!0),b(e)},isActive:!y})}),!S&&Object(ze.jsx)(gv,{currentStep:p,steps:iv.length-1,exImage:L.exImage,subtitle:L.subtitle,text:L.text,open:y,start:function(){C(!1)}})]})},yv=function(e){return!D.a(null===e||void 0===e?void 0:e.id)&&!D.a(null===e||void 0===e?void 0:e.username)&&!D.a(null===e||void 0===e?void 0:e.role)},wv="user",Cv="superuser",kv=function(e){var t=Object.assign({},e),n=Object(a.useContext)(k).userData;return yv(n)?Object(ze.jsx)(w.c,Object(s.a)({},t)):Object(ze.jsx)(w.b,{to:"/login"})},Ev=function(e){var t=e.component,n=e.restricted,r=Object(q.a)(e,["component","restricted"]),i=Object(a.useContext)(k).userData;return Object(ze.jsx)(w.c,Object(s.a)(Object(s.a)({},r),{},{render:function(e){return yv(i)&&n?Object(ze.jsx)(w.b,{to:"/"}):Object(ze.jsx)(t,Object(s.a)({},e))}}))},Nv=n(906),Sv=n(905),Iv=n(904),Fv={overviewLegend:{display:"flex",justifyContent:"flex-end","& span":{marginRight:24},"& > :last-child":{marginRight:0}},legendEntry:{display:"flex",flexDirection:"row",alignItems:"center","& > :first-child":{marginRight:8}},dropdownsOverviewWrapper:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:16},verticalLine:{height:64,width:1,border:"solid",borderWidth:.5,borderColor:de},dropdowns:{display:"flex",flexDirection:"row","& div":{marginRight:24},"& > :last-child":{marginRight:0}},overview:{display:"flex",flexDirection:"row",alignItems:"center","& div":{marginRight:40},"& > :last-child":{marginRight:0}},overviewFieldWrapper:{marginTop:6,marginBottom:6,"& span":{fontSize:24}},overviewGrowth:{display:"flex",flexDirection:"row",alignItems:"center","& p":{marginLeft:4}},growthPercentage:{fontWeight:"bold"},growth:{color:"#00CD5A"},decline:{color:Q},graphHeaderWrapper:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:40},graphHeaderLeft:{display:"flex",flexDirection:"column"},graphHeaderRight:{marginTop:15,display:"flex",flexDirection:"row","& > *":{marginRight:30,"&:last-child":{marginRight:0}}},graphLegend:{display:"flex",flexDirection:"row",alignItems:"center","& span":{marginRight:24},"& > :last-child":{marginRight:0}},machineSelector:{width:248},cashInIcon:{width:12,height:12,borderRadius:12,backgroundColor:_},cashOutIcon:{width:12,height:12,borderRadius:12,backgroundColor:K},txIcon:{width:12,height:12,borderRadius:12,backgroundColor:"#000"},topMachinesRadio:{display:"flex",flexDirection:"row"}},Lv=Object(f.a)(Fv),Pv=function(e){var t=e.IconElement,n=e.IconComponent,a=e.label,r=Lv();return Object(ze.jsxs)("span",{className:r.legendEntry,children:[!!n&&Object(ze.jsx)(n,{height:12}),!!t&&t,Object(ze.jsx)(Ke,{children:a})]})},Dv=n(903),Rv={dotOtWrapper:{position:"absolute",top:function(e){var t;return null!==(t=null===e||void 0===e?void 0:e.y)&&void 0!==t?t:0},left:function(e){var t;return null!==(t=null===e||void 0===e?void 0:e.x)&&void 0!==t?t:0},width:150,padding:12,borderRadius:8},dotOtTransactionAmount:{margin:[[8,0,8,0]]},dotOtTransactionVolume:{color:$},dotOtTransactionClasses:{marginTop:15,"& p > span":{marginLeft:5},"& p:last-child":{marginTop:5}}},Tv=Object(f.a)(Rv),Bv=function(e){var t=e.coords,n=e.data,a=e.dateInterval,r=e.period,i=e.currency,o=e.representing,l=Tv(t),c=F.a("hourOfDay",o.code)?[dd(a[1],"HH:mm"),dd(a[0],"HH:mm")]:[sd(a[1],null,"day"===r.code?"MMM d, HH:mm":"MMM d"),sd(a[0],null,"day"===r.code?"HH:mm":"MMM d")],s=bs.a((function(e,t){return e.volume+=parseInt(t.fiat),"cashIn"===t.txClass&&e.cashIn++,"cashOut"===t.txClass&&e.cashOut++,e}),{volume:0,cashIn:0,cashOut:0},n);return Object(ze.jsxs)(qn.a,{className:l.dotOtWrapper,children:[Object(ze.jsx)(Qe,{noMargin:!0,children:"day"===r.code||F.a("hourOfDay",o.code)?"".concat(c[0]," - ").concat(c[1]):"".concat(c[0])}),Object(ze.jsxs)(Ke,{noMargin:!0,className:l.dotOtTransactionAmount,children:[pn.a(n)," ",$m(pn.a(n),"transaction","transactions")]}),Object(ze.jsxs)(Ke,{noMargin:!0,className:l.dotOtTransactionVolume,children:[Hr(s.volume)," ",i," in volume"]}),Object(ze.jsxs)("div",{className:l.dotOtTransactionClasses,children:[Object(ze.jsxs)(rt,{noMargin:!0,children:[Object(ze.jsx)(Fc,{}),Object(ze.jsxs)("span",{children:[s.cashIn," cash-in"]})]}),Object(ze.jsxs)(rt,{noMargin:!0,children:[Object(ze.jsx)(Ac,{}),Object(ze.jsxs)("span",{children:[s.cashOut," cash-out"]})]})]})]})},Av=Object(a.memo)(Bv,(function(e,t){return e.coords===t.coords})),Mv=n(900),Wv=n(901),zv=function(e){var t=e.data,n=e.timezone,r=e.setSelectionCoords,i=e.setSelectionData,o=e.setSelectionDateInterval,l=Object(a.useRef)(null),c=10,s=401,d=1163,u=Object(a.useMemo)((function(){return{top:25,right:.5,bottom:27,left:36.5}}),[]),m=Object(td.a)(n),h=function(e,t){for(var n=[],a=new Date(e[0]),r=new Date(e[1]),i=Dm.a(a);i<=r;)n.push(Dm.a(i)),i.setUTCHours(i.getUTCHours()+t);return n},p=Object(a.useCallback)((function(e,n){return M.a((function(t){var a=new Date(t.created).setTime(new Date(t.created).getTime()+new Date(t.created).getTimezoneOffset()*Sd+m),r=new Date(a);return e.getUTCHours()=new Date(e).getUTCHours()&&r.getUTCHours()n.getUTCHours()&&r.getUTCHours()<=new Date(e).getUTCHours()&&r.getUTCHours()e[1]||(inew Date(e[1])||(it[0]&&e=e[1]}),e))&&void 0!==n?n:[0,0]}(w(x(v.domain()).map((function(e){return Math.round(100*v(e))/100})),v.range()),t);return Math.round(100*(n[0]-n[1]))/100})).attr("height",u-h.bottom-h.top).attr("stroke","transparent").attr("fill","transparent").on("mouseover",(function(e){var t=Math.round(100*e.target.x.baseVal.value)/100,a=function(e,t,n){for(var a=Dg.a(cl.a(t)),r=t.length-1;r>=0;r--)if(nnew Date(a[1])&&n<=new Date(a[0])})),i=Dm.a(e.target.getBoundingClientRect().x),s=Dm.a(e.target.getBoundingClientRect().x+e.target.getBoundingClientRect().width),d=e.target.x.baseVal.value<872.25?s+25:i-150-25,u=Dm.a(e.target.getBoundingClientRect().y);c(a),l(r),o({x:Math.round(d),y:Math.round(u)}),pd.select(e.target).attr("fill",re)})).on("mouseleave",(function(e){pd.select(e.target).attr("fill","transparent"),c(null),l(null),o(null)}))})).call((function(e){return e.append("g").selectAll("line").data(O(v.domain()).filter((function(e){return"day"===r.code?0===e.getUTCHours():1===e.getUTCDate()}))).join("line").attr("class","dateSeparator").attr("x1",(function(e){return.5+v(e)})).attr("x2",(function(e){return.5+v(e)})).attr("y1",h.top-50).attr("y2",u-h.bottom).attr("stroke-width",5).join("text")})).call((function(e){var t,n,a=null===pd||void 0===pd||null===(t=pd.select(".dateSeparator"))||void 0===t||null===(n=t.node())||void 0===n?void 0:n.getBBox();if(a){var i=O(v.domain()).filter((function(e){return"day"===r.code?0===e.getUTCHours():1===e.getUTCDate()})),o=g(i);return e.append("text").attr("x",a.x-10).attr("y",a.y+33).attr("text-anchor","end").attr("dy",".25em").text(o.previous)}})).call((function(e){var t,n,a=null===pd||void 0===pd||null===(t=pd.select(".dateSeparator"))||void 0===t||null===(n=t.node())||void 0===n?void 0:n.getBBox();if(a){var i=O(v.domain()).filter((function(e){return"day"===r.code?0===e.getUTCHours():1===e.getUTCDate()})),o=g(i);return e.append("text").attr("x",a.x+10).attr("y",a.y+33).attr("text-anchor","start").attr("dy",".25em").text(o.current)}}))}),[h,O,g,v,y,r,x,n,p,o,l,c]),N=Object(a.useCallback)((function(){return pd.selectAll(".tick text").style("stroke",ce).style("fill",ce).style("stroke-width",.5).style("font-family",ge)}),[]),S=Object(a.useCallback)((function(){return pd.selectAll("text").style("stroke",se).style("fill",se).style("stroke-width",.5).style("font-family",ge)}),[]),I=Object(a.useCallback)((function(){pd.selectAll(".tick line").style("stroke",J).style("fill",J)}),[]),F=Object(a.useCallback)((function(e){e.attr("stroke",J).attr("stroke-width",3).attr("stroke-dasharray","10, 5").call((function(e){var t,a;return e.append("line").attr("y1",.5+y(null!==(t=pd.mean(n,(function(e){return new zc.a(e.fiat).toNumber()})))&&void 0!==t?t:0)).attr("y2",.5+y(null!==(a=pd.mean(n,(function(e){return new zc.a(e.fiat).toNumber()})))&&void 0!==a?a:0)).attr("x1",h.left).attr("x2",m-h.right)}))}),[h,y,n]),L=Object(a.useCallback)((function(e){e.selectAll("circle").data(n).join("circle").attr("cx",(function(e){var t=new Date(e.created);return v(t.setTime(t.getTime()+p))})).attr("cy",(function(e){return y(new zc.a(e.fiat).toNumber())})).attr("fill",(function(e){return"cashIn"===e.txClass?_:K})).attr("r",3.5)}),[n,p,v,y]),P=Object(a.useCallback)((function(){var e=pd.select(s.current).attr("viewBox",[0,0,m,u]);return e.append("g").call(E),e.append("g").call(F),e.append("g").call(C),e.append("g").call(k),e.append("g").call(N),e.append("g").call(S),e.append("g").call(I),e.append("g").call(L),e.node()}),[F,E,C,k,L,S,I,N]);return Object(a.useEffect)((function(){pd.select(s.current).selectAll("*").remove(),P()}),[P]),Object(ze.jsx)("svg",{ref:s})},Hv=Object(a.memo)($v,(function(e,t){return zr.a(e.period,t.period)&&zr.a(e.selectedMachine,t.selectedMachine)})),Vv=n(902),Uv=n(279),Gv=n(427),Xv=function(e){var t=e.data,n=e.machines,r=e.currency,i=Object(a.useRef)(null),o=.15,l=401,c=Object(a.useMemo)((function(){return{top:25,right:.5,bottom:27,left:36.5}}),[]),s=Dm.a(n),d=pn.a(n)>=5?s:R.a((function(e){return D.a(s[e])?{code:"ghostMachine".concat(e),display:""}:s[e]}),Pu.a(Du.a,5)),u=bs.a((function(e,n){return e[n.code]=M.a((function(e){return e.deviceId===n.code}),t),e}),{},d),m=Vv.a((function(e,t){return t[1]-e[1]}),R.a((function(e){return[e.code,(t=e.code,bs.a((function(e,t){return e+zc()(t.fiat).toNumber()}),0,u[t]))];var t}),d)),h=Uv.a(5,m),p=Hc.a(R.a((function(e){return[e[0],(t=e[0],bs.a((function(e,t){return"cashIn"===t.txClass&&(e.cashIn+=zc()(t.fiat).toNumber()),"cashOut"===t.txClass&&(e.cashOut+=zc()(t.fiat).toNumber()),e}),{cashIn:0,cashOut:0},u[t]))];var t}),h)),b=pd.scaleBand().domain(h).range([c.left,1163-c.right]).paddingInner(o),f=pd.scaleLinear().domain([0,0!==pd.max(h,(function(e){return e[1]}))?pd.max(h,(function(e){return e[1]})):50]).range([l-c.bottom,c.top]),j=Object(a.useCallback)((function(e){return e.attr("class","x-axis-1").attr("transform","translate(0, ".concat(l-c.bottom,")")).call(pd.axisBottom(b).tickFormat((function(e){var t;return"".concat(null!==(t=Da.a((function(t){return t.code===e[0]}),d).display)&&void 0!==t?t:"")})).tickSize(0).tickPadding(10))}),[c,b,d]),g=Object(a.useCallback)((function(e){e.attr("class","x-axis-2").attr("transform","translate(0, ".concat(l-c.bottom,")")).call(pd.axisBottom(b).tickFormat((function(e){return F.a("ghostMachine",e[0])?"":"".concat(e[1].toFixed(2)," ").concat(r)})).tickSize(0).tickPadding(10))}),[c,b,r]),O=Object(a.useCallback)((function(){pd.selectAll(".x-axis-1 .tick text").attr("transform",(function(e){var t=(b.range()[1]-b.range()[0])/5;return"translate(".concat(-t/2.25+this.getBBox().width/2,", 0)")}))}),[b]),x=Object(a.useCallback)((function(){pd.selectAll(".x-axis-2 .tick text").attr("transform",(function(e){var t=(b.range()[1]-b.range()[0])/5;return"translate(".concat(t/2.25-this.getBBox().width/2,", 0)")}))}),[b]),v=Object(a.useCallback)((function(e){return e.attr("transform","translate(".concat(c.left,", 0)")).call(pd.axisLeft(f).ticks(4.01).tickSize(0).tickFormat("")).call((function(e){return e.select(".domain").remove()}))}),[c,f]),y=Object(a.useCallback)((function(){return pd.selectAll(".tick text").style("stroke",ce).style("fill",ce).style("stroke-width",.5).style("font-family",ge)}),[]),w=Object(a.useCallback)((function(e){e.attr("stroke",ie).attr("fill",ie).call((function(e){return e.append("g").selectAll("line").data(Gv.a(b.domain())).join("line").attr("x1",(function(e){var t=pl.a((function(t){return zr.a(t,e)}),b.domain()),n=.075*(b(b.domain()[t])-b(b.domain()[t-1]));return.5+b(e)-n})).attr("x2",(function(e){var t=pl.a((function(t){return zr.a(t,e)}),b.domain()),n=.075*(b(b.domain()[t])-b(b.domain()[t-1]));return.5+b(e)-n})).attr("y1",c.top).attr("y2",l-c.bottom)}))}),[c,b]),C=Object(a.useCallback)((function(e){e.selectAll("rect").data(Uc.a(p)).join("rect").attr("fill",_).attr("x",(function(e){return b([e[0],e[1].cashIn+e[1].cashOut])})).attr("y",(function(e){return f(e[1].cashIn)-c.top+c.bottom})).attr("height",(function(e){return ip.a(0,l,l-f(e[1].cashIn)-c.bottom-10)})).attr("width",b.bandwidth()).attr("rx",2.5)}),[p,b,f,c]),k=Object(a.useCallback)((function(e){e.selectAll("rect").data(Uc.a(p)).join("rect").attr("fill",K).attr("x",(function(e){return b([e[0],e[1].cashIn+e[1].cashOut])})).attr("y",(function(e){return f(e[1].cashIn+e[1].cashOut)-c.top+c.bottom})).attr("height",(function(e){return ip.a(0,l,l-f(e[1].cashOut)-c.bottom-5)})).attr("width",b.bandwidth()).attr("rx",2.5)}),[p,b,f,c]),E=Object(a.useCallback)((function(){var e=pd.select(i.current).attr("viewBox",[0,0,1163,l]);return e.append("g").call(j),e.append("g").call(g),e.append("g").call(v),e.append("g").call(y),e.append("g").call(w),e.append("g").call(C),e.append("g").call(k),e.append("g").call(O),e.append("g").call(x),e.node()}),[j,g,O,x,v,y,w,C,k]);return Object(a.useEffect)((function(){pd.select(i.current).selectAll("*").remove(),E()}),[E]),Object(ze.jsx)("svg",{ref:i})},_v=Object(a.memo)(Xv,(function(e,t){return zr.a(e.period,t.period)})),Kv=function(e){var t=e.data,n=e.representing,r=e.period,i=e.timezone,o=e.currency,c=e.selectedMachine,s=e.machines,d=e.selectedDay,u=Object(a.useState)(null),m=Object(l.a)(u,2),h=m[0],p=m[1],b=Object(a.useState)(null),f=Object(l.a)(b,2),j=f[0],g=f[1],O=Object(a.useState)(null),x=Object(l.a)(O,2),v=x[0],y=x[1];return Object(ze.jsxs)("div",{children:[!D.a(h)&&Object(ze.jsx)(Av,{coords:h,dateInterval:j,data:v,period:r,currency:o,timezone:i,representing:n}),function(e){switch(e.code){case"overTime":return Object(ze.jsx)(Hv,{data:t,period:r,timezone:i,setSelectionCoords:p,setSelectionDateInterval:g,setSelectionData:y,selectedMachine:c});case"topMachinesVolume":case"topMachinesTransactions":return Object(ze.jsx)(_v,{data:t,period:r,timezone:i,setSelectionCoords:p,setSelectionDateInterval:g,setSelectionData:y,selectedMachine:c,machines:M.a((function(e){return"all"!==e.code}),s),currency:o});case"hourOfDayVolume":case"hourOfDayTransactions":return Object(ze.jsx)(qv,{data:t,period:r,timezone:i,setSelectionCoords:p,setSelectionDateInterval:g,setSelectionData:y,selectedMachine:c,machines:M.a((function(e){return"all"!==e.code}),s),currency:o,selectedDay:d});default:throw new Error("There's no graph to represent ".concat(e))}}(n)]})},Zv=Object(a.memo)(Kv),Qv=Object(f.a)(Fv),Yv=[{code:"hourOfDayTransactions",display:"Transactions"},{code:"hourOfDayVolume",display:"Volume"}],Jv=R.a((function(e){return{code:Dv.a(e),display:e}}),Array.from(Array(7)).map((function(e,t){return Object(od.a)("EEEE",Object(kd.a)({days:t},Object(Ed.a)(new Date)))}))),ey=function(e){var t=e.title,n=e.period,r=e.data,i=e.machines,o=e.selectedMachine,c=e.handleMachineChange,s=e.timezone,d=e.currency,u=Qv(),m=Object(a.useState)(Yv[0].code),h=Object(l.a)(m,2),p=h[0],b=h[1],f=Object(a.useState)(Jv[0]),j=Object(l.a)(f,2),g=j[0],O=j[1],x={cashIn:Object(ze.jsx)("div",{className:u.cashInIcon}),cashOut:Object(ze.jsx)("div",{className:u.cashOutIcon})},v=Object(td.a)(s),y=bs.a((function(e,t){var n=new Date(t.created);switch(n.setTime(n.getTime()+n.getTimezoneOffset()*Sd+v),n.getDay()){case 0:e.sunday.push(t);break;case 1:e.monday.push(t);break;case 2:e.tuesday.push(t);break;case 3:e.wednesday.push(t);break;case 4:e.thursday.push(t);break;case 5:e.friday.push(t);break;case 6:e.saturday.push(t);break;default:throw new Error("Day of week not recognized")}return e}),Hc.a(R.a((function(e){return[e.code,[]]}),Jv)),r);return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsxs)("div",{className:u.graphHeaderWrapper,children:[Object(ze.jsxs)("div",{className:u.graphHeaderLeft,children:[Object(ze.jsx)(Ue,{noMargin:!0,children:t}),Object(ze.jsxs)(Yo.a,{className:u.graphLegend,children:[Object(ze.jsx)(Pv,{IconElement:x.cashIn,label:"Cash-in"}),Object(ze.jsx)(Pv,{IconElement:x.cashOut,label:"Cash-out"})]})]}),Object(ze.jsxs)("div",{className:u.graphHeaderRight,children:[Object(ze.jsx)(yr,{options:Yv,className:u.topMachinesRadio,value:p,onChange:function(e){return b(e.target.value)}}),Object(ze.jsx)(ch,{label:"Day of the week",items:Jv,default:Jv[0],selectedItem:g,onSelectedItemChange:O}),Object(ze.jsx)(ch,{label:"Machines",onSelectedItemChange:c,items:i,default:i[0],selectedItem:o})]})]}),Object(ze.jsx)(Zv,{representing:Da.a((function(e){return e.code===p}))(Yv),period:n,data:y[g.code],timezone:s,currency:d,selectedMachine:o,machines:i,selectedDay:g})]})},ty=Object(f.a)(Fv),ny=function(e){var t=e.title,n=e.representing,a=e.period,r=e.data,i=e.machines,o=e.selectedMachine,l=e.handleMachineChange,c=e.timezone,s=e.currency,d=ty(),u={cashIn:Object(ze.jsx)("div",{className:d.cashInIcon}),cashOut:Object(ze.jsx)("div",{className:d.cashOutIcon}),transaction:Object(ze.jsx)("div",{className:d.txIcon}),average:Object(ze.jsx)("svg",{height:"12",width:"18",children:Object(ze.jsx)("path",{stroke:J,strokeWidth:"3",strokeDasharray:"5, 2",d:"M 5 6 l 20 0"})})};return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsxs)("div",{className:d.graphHeaderWrapper,children:[Object(ze.jsxs)("div",{className:d.graphHeaderLeft,children:[Object(ze.jsx)(Ue,{noMargin:!0,children:t}),Object(ze.jsxs)(Yo.a,{className:d.graphLegend,children:[Object(ze.jsx)(Pv,{IconElement:u.cashIn,label:"Cash-in"}),Object(ze.jsx)(Pv,{IconElement:u.cashOut,label:"Cash-out"}),Object(ze.jsx)(Pv,{IconElement:u.transaction,label:"One transaction"}),Object(ze.jsx)(Pv,{IconElement:u.average,label:"Average"})]})]}),Object(ze.jsx)("div",{className:d.graphHeaderRight,children:Object(ze.jsx)(ch,{label:"Machines",onSelectedItemChange:l,items:i,default:i[0],selectedItem:o})})]}),Object(ze.jsx)(Zv,{representing:n,period:a,data:r,timezone:c,currency:s,selectedMachine:o,machines:i})]})},ay=Object(f.a)(Fv),ry=[{code:"topMachinesTransactions",display:"Transactions"},{code:"topMachinesVolume",display:"Volume"}],iy=function(e){var t=e.title,n=e.period,r=e.data,i=e.machines,o=e.selectedMachine,c=e.timezone,s=e.currency,d=ay(),u=Object(a.useState)(ry[0].code),m=Object(l.a)(u,2),h=m[0],p=m[1],b={cashIn:Object(ze.jsx)("div",{className:d.cashInIcon}),cashOut:Object(ze.jsx)("div",{className:d.cashOutIcon})};return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsxs)("div",{className:d.graphHeaderWrapper,children:[Object(ze.jsxs)("div",{className:d.graphHeaderLeft,children:[Object(ze.jsx)(Ue,{noMargin:!0,children:t}),Object(ze.jsxs)(Yo.a,{className:d.graphLegend,children:[Object(ze.jsx)(Pv,{IconElement:b.cashIn,label:"Cash-in"}),Object(ze.jsx)(Pv,{IconElement:b.cashOut,label:"Cash-out"})]})]}),Object(ze.jsx)("div",{className:d.graphHeaderRight,children:Object(ze.jsx)(yr,{options:ry,className:d.topMachinesRadio,value:h,onChange:function(e){return p(e.target.value)}})})]}),Object(ze.jsx)(Zv,{representing:Da.a(W.a("code",h),ry),period:n,data:r,timezone:c,currency:s,selectedMachine:o,machines:i})]})},oy=Object(f.a)(Fv),ly=[{code:"all",display:"All machines"}],cy=[{code:"overTime",display:"Over time"},{code:"topMachines",display:"Top Machines"},{code:"hourOfTheDay",display:"Hour of the day"}],sy=[{code:"day",display:"Last 24 hours"},{code:"week",display:"Last 7 days"},{code:"month",display:"Last 30 days"}],dy={day:Id,week:Fd,month:Ld},uy=x()(sv||(sv=Object(c.a)(["\n query transactions(\n $from: Date\n $until: Date\n $excludeTestingCustomers: Boolean\n ) {\n transactions(\n from: $from\n until: $until\n excludeTestingCustomers: $excludeTestingCustomers\n ) {\n id\n txClass\n txHash\n toAddress\n commissionPercentage\n expired\n machineName\n operatorCompleted\n sendConfirmed\n dispense\n hasError: error\n deviceId\n fiat\n cashInFee\n fiatCode\n cryptoAtoms\n cryptoCode\n toAddress\n created\n }\n }\n"]))),my=x()(dv||(dv=Object(c.a)(["\n query getData {\n config\n machines {\n name\n deviceId\n }\n fiatRates {\n code\n name\n rate\n }\n }\n"]))),hy=function(e){var t,n=e.label,a=e.value,r=e.oldValue,i=e.currency,o=oy(),l=100*(a-r)/(!r||zr.a(r,0)?1:r),c=(t={},Object(z.a)(t,o.growthPercentage,!0),Object(z.a)(t,o.growth,im.a(a,r)),Object(z.a)(t,o.decline,im.a(r,a)),t);return Object(ze.jsxs)("div",{className:o.overviewEntry,children:[Object(ze.jsx)(Ke,{noMargin:!0,children:n}),Object(ze.jsxs)(Qe,{noMargin:!0,className:o.overviewFieldWrapper,children:[Object(ze.jsx)("span",{children:Hr(a)}),!!i&&" ".concat(i)]}),Object(ze.jsxs)("span",{className:o.overviewGrowth,children:[im.a(l,0)&&Object(ze.jsx)(Js,{height:10}),Iv.a(l,0)&&Object(ze.jsx)($s,{height:10}),zr.a(l,0)&&Object(ze.jsx)(Xs,{height:10}),Object(ze.jsxs)(Ke,{noMargin:!0,className:I()(c),children:[Hr(l),"%"]})]})]})},py=function(){var e,t,n,r,i,o=oy(),c=Object(u.c)(uy,{variables:{from:Object(Sv.a)(65,Object(Nv.a)()),until:Object(Nv.a)(),excludeTestingCustomers:!0}}),d=c.data,m=c.loading,h=Object(u.c)(my),p=h.data,b=h.loading,f=Object(a.useState)(cy[0]),j=Object(l.a)(f,2),g=j[0],O=j[1],x=Object(a.useState)(sy[0]),v=Object(l.a)(x,2),y=v[0],w=v[1],C=Object(a.useState)(ly[0]),k=Object(l.a)(C,2),E=k[0],N=k[1],S=m||b,I=null!==(e=A.a(["transactions"])(d))&&void 0!==e?e:[],F=null!==(t=A.a(["machines"])(p))&&void 0!==t?t:[],L=null!==(n=A.a(["config"])(p))&&void 0!==n?n:[],P=null!==(r=A.a(["fiatRates"])(p))&&void 0!==r?r:[],D=os("locale")(L).fiatCurrency,T=null===L||void 0===L?void 0:L.locale_timezone,B=function(e){if(e.fiatCode===D)return e;var t=Da.a(W.a("code",e.fiatCode))(P),n=Da.a(W.a("code",D))(P),a=(null===n||void 0===n?void 0:n.rate)/(null===t||void 0===t?void 0:t.rate);return Object(s.a)(Object(s.a)({},e),{},{fiat:parseFloat(e.fiat)*a})},z=null!==(i=R.a(B)(null===I||void 0===I?void 0:I.filter((function(e){return(!e.dispensed||!e.expired)&&(e.sendConfirmed||e.dispense)}))))&&void 0!==i?i:[],q=Dm.a(ly);Kp.a((function(e){return q.push({code:e.deviceId,display:e.name})}),F);var $=M.a((function(e){return"all"===E.code||e.deviceId===E.code}),z),H=function(e){var t,n;return{current:null!==(t=$.filter((function(t){return new Date(t.created)>=Date.now()-dy[e]})))&&void 0!==t?t:[],previous:null!==(n=$.filter((function(t){return new Date(t.created)=Date.now()-2*dy[e]})))&&void 0!==n?n:[]}},V={current:H(y.code).current.length,previous:H(y.code).previous.length},U={current:ps.a(R.a((function(e){return e.fiat}),H(y.code).current))/(0===V.current?1:V.current),previous:ps.a(R.a((function(e){return e.fiat}),H(y.code).previous))/(0===V.previous?1:V.previous)},G={current:ps.a(R.a((function(e){return e.fiat}),H(y.code).current)),previous:ps.a(R.a((function(e){return e.fiat}),H(y.code).previous))},X={current:ps.a(R.a((function(e){return e.fiat*e.commissionPercentage}),H(y.code).current)),previous:ps.a(R.a((function(e){return e.fiat*e.commissionPercentage}),H(y.code).previous))};return!S&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(rl,{title:"Analytics",children:Object(ze.jsxs)(Yo.a,{className:o.overviewLegend,children:[Object(ze.jsx)(Pv,{IconComponent:Js,label:"Up since last period"}),Object(ze.jsx)(Pv,{IconComponent:$s,label:"Down since last period"}),Object(ze.jsx)(Pv,{IconComponent:Xs,label:"Same since last period"})]})}),Object(ze.jsxs)("div",{className:o.dropdownsOverviewWrapper,children:[Object(ze.jsxs)("div",{className:o.dropdowns,children:[Object(ze.jsx)(ch,{label:"Representing",onSelectedItemChange:O,items:cy,default:cy[0],selectedItem:g,defaultAsFilter:!0}),Object(ze.jsx)(ch,{label:"Time period",onSelectedItemChange:w,items:sy,default:sy[0],selectedItem:y,defaultAsFilter:!0})]}),Object(ze.jsxs)("div",{className:o.overview,children:[Object(ze.jsx)(hy,{label:"Transactions",value:V.current,oldValue:V.previous}),Object(ze.jsx)("div",{className:o.verticalLine}),Object(ze.jsx)(hy,{label:"Avg. txn amount",value:U.current,oldValue:U.previous,currency:D}),Object(ze.jsx)("div",{className:o.verticalLine}),Object(ze.jsx)(hy,{label:"Volume",value:G.current,oldValue:G.previous,currency:D}),Object(ze.jsx)("div",{className:o.verticalLine}),Object(ze.jsx)(hy,{label:"Commissions",value:X.current,oldValue:X.previous,currency:D})]})]}),function(e){switch(e.code){case"overTime":return Object(ze.jsx)(ny,{title:"Transactions over time",representing:e,period:y,data:R.a(B)(H(y.code).current),machines:q,selectedMachine:E,handleMachineChange:N,timezone:T,currency:D});case"topMachines":return Object(ze.jsx)(iy,{title:"Transactions over time",representing:e,period:y,data:R.a(B)(H(y.code).current),machines:q,selectedMachine:E,handleMachineChange:N,timezone:T,currency:D});case"hourOfTheDay":return Object(ze.jsx)(ey,{title:"Avg. transactions per hour of the day",representing:e,period:y,data:R.a(B)(H(y.code).current),machines:q,selectedMachine:E,handleMachineChange:N,timezone:T,currency:D});default:throw new Error("There's no graph info to represent ".concat(e))}}(g)]})},by=n(907),fy={grid:{flex:1,height:"100%"},content:{display:"flex",flexDirection:"column",flex:1,marginLeft:48},footer:{margin:[["auto",0,24,"auto"]]},modalTitle:{margin:[["auto",0,8.5,"auto"]]},subtitle:{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row"},white:{color:Z},deleteButton:{paddingLeft:13},addressRow:{marginLeft:8},error:{marginTop:20}},jy=Object(f.a)(fy),gy=function(e){var t=e.onClose,n=e.selectedCoin,a=e.addToBlacklist,r=e.errorMsg,i=jy();return Object(ze.jsxs)(Qh,{closeOnBackdropClick:!0,width:676,height:200,handleClose:t,open:!0,children:[Object(ze.jsx)(un.e,{validateOnBlur:!1,validateOnChange:!1,initialValues:{address:""},validationSchema:fn.f({address:fn.h().trim().required("An address is required")}),onSubmit:function(e){!function(e){"BCH"!==n.code||e.startsWith("bitcoincash:")||(e="bitcoincash:"+e),a(n.code,e)}(e.address.trim())},children:Object(ze.jsxs)(un.d,{id:"address-form",children:[Object(ze.jsx)(Ge,{className:i.modalTitle,children:n.display?"Blacklist ".concat(Dv.a(n.display)," address"):""}),Object(ze.jsx)(un.b,{name:"address",fullWidth:!0,autoComplete:"off",label:"Paste new address to blacklist here",placeholder:"ex: ".concat({BTC:"1ADwinnimZKGgQ3dpyfoUZvJh4p1UWSSpD",ETH:"0x71C7656EC7ab88b098defB751B7401B5f6d8976F",LTC:"LPKvbjwV1Kaksktzkr7TMK3FQtQEEe6Wqa",DASH:"XqQ7gU8eM76rEfey726cJpT2RGKyJyBrcn",ZEC:"t1KGyyv24eL354C9gjveBGEe8Xz9UoPKvHR",BCH:"qrd6za97wm03lfyg82w0c9vqgc727rhemg5yd9k3dm",USDT:"0x5754284f345afc66a98fbb0a0afe71e0f007b949",XMR:"888tNkZrPN6JsEgekjMnABU4TBzc2Dt29EPAvkRxbANsAnjyPbb3iQ1YBRk1UXcdRsiKc9dhwMVgN5S9cQUiyoogDavup3H"}[n.code]),component:oi}),!D.a(r)&&Object(ze.jsx)(tl,{className:i.error,children:r})]})}),Object(ze.jsx)("div",{className:i.footer,children:Object(ze.jsx)(Yo.a,{display:"flex",justifyContent:"flex-end",children:Object(ze.jsx)(na,{type:"submit",form:"address-form",children:"Blacklist address"})})})]})},Oy=Object(f.a)(ng),xy=function(e){var t,n=e.id,a=e.index,r=e.elements,i=e.data,o=e.width,l=e.Details,c=e.expanded,d=e.expandRow,u=e.expWidth,m=e.expandable,h=e.onClick,p=e.size,b=Object(q.a)(e,["id","index","elements","data","width","Details","expanded","expandRow","expWidth","expandable","onClick","size"]),f=Oy(),j=h||m,g=(t={},Object(z.a)(t,f.pointer,j),Object(z.a)(t,f.row,!0),Object(z.a)(t,f.expanded,c),t);return Object(ze.jsxs)("div",{className:f.rowWrapper,children:[Object(ze.jsx)("div",{className:I()(Object(z.a)({},f.before,c&&0!==a)),children:Object(ze.jsxs)(Im,{size:p,className:I()(g),onClick:function(){m&&d(n,i),h&&h(i)},error:i.error||i.hasError||i.batchError,shouldShowError:!1,errorMessage:i.errorMessage||i.hasError||i.batchError,children:[r.map((function(e,t){var n=e.view,a=void 0===n?function(e){return null===e||void 0===e?void 0:e.toString()}:n,r=Object(q.a)(e,["view"]);return Object(ze.jsx)(Em,Object(s.a)(Object(s.a)({},r),{},{children:a(i)}),t)})),m&&Object(ze.jsx)(Em,{width:u,textAlign:"center",children:Object(ze.jsxs)("button",{onClick:function(){return d(n,i)},className:f.expandButton,children:[c&&Object(ze.jsx)(Og,{}),!c&&Object(ze.jsx)(cg,{})]})})]})}),m&&c&&Object(ze.jsx)("div",{className:f.after,children:Object(ze.jsx)(Im,{className:I()(Object(z.a)({},f.expanded,c)),children:Object(ze.jsx)(Em,{width:o,children:Object(ze.jsx)(l,{it:i,timezone:b.timezone})})})})]})},vy=function(e){var t=e.elements,n=void 0===t?[]:t,r=e.data,i=void 0===r?[]:r,o=e.Details,c=(e.className,e.expandable),d=e.initialExpanded,u=e.onClick,m=e.loading,h=e.emptyText,p=e.rowSize,b=Object(q.a)(e,["elements","data","Details","className","expandable","initialExpanded","onClick","loading","emptyText","rowSize"]),f=Object(a.useState)(d),j=Object(l.a)(f,2),g=j[0],O=j[1];Object(a.useEffect)((function(){return O(d)}),[d]);var x=L.a(ps.a,R.a(T.a("width")))(n),v=1200-x,y=x+(c?v:0),w=Oy({width:y}),C=function(e,t){t.id?(k.clear(t.id),O(t.id===g?null:t.id)):(k.clear(e),O(e===g?null:e))},k=new tg.c({defaultHeight:58,fixedWidth:!0});function E(e){var t=e.index,a=e.key,r=e.parent,l=e.style;return Object(ze.jsx)(tg.b,{cache:k,columnIndex:0,parent:r,rowIndex:t,children:function(e){var a=e.registerChild;return Object(ze.jsx)("div",{ref:a,style:l,children:Object(ze.jsx)(xy,{width:y,size:p,id:i[t].id?i[t].id:t,index:t,expWidth:v,elements:n,data:i[t],Details:o,expanded:i[t].id?i[t].id===g:t===g,expandRow:C,expandable:c,onClick:u,timezone:b.timezone})})}},a)}return Object(ze.jsx)(Yo.a,{display:"flex",flex:"1",flexDirection:"column",children:Object(ze.jsxs)(ym,{className:w.table,children:[Object(ze.jsxs)(wm,{children:[n.map((function(e,t){var n=e.width,a=e.className,r=e.textAlign,i=e.header;return Object(ze.jsx)(Nm,{width:n,className:a,textAlign:r,children:i},t)})),c&&Object(ze.jsx)(Nm,{width:v})]}),Object(ze.jsxs)(km,{className:w.body,children:[m&&Object(ze.jsx)(Xe,{children:"Loading..."}),!m&&Ta.a(i)&&Object(ze.jsx)(Cs,{message:h}),!m&&!Ta.a(i)&&Object(ze.jsx)(tg.a,{disableWidth:!0,children:function(e){var t=e.height;return Object(ze.jsx)(tg.d,Object(s.a)(Object(s.a)({style:{outline:"none"}},b),{},{height:m?0:t,width:y,rowCount:i.length,rowHeight:k.rowHeight,rowRenderer:E,overscanRowCount:5,deferredMeasurementCache:k}))}})]})]})})},yy=Object(f.a)(fy),wy=function(e){var t=e.data,n=e.selectedCoin,r=e.handleDeleteEntry,i=e.errorMessage,o=e.setErrorMessage,c=e.deleteDialog,s=e.setDeleteDialog,d=yy(),u=Object(a.useState)(),m=Object(l.a)(u,2),h=m[0],p=m[1],b=[{name:"address",header:Object(ze.jsx)(nt,{className:d.white,children:"Addresses"}),width:800,textAlign:"left",size:"sm",view:function(e){return Object(ze.jsx)("div",{className:d.addressRow,children:Object(ze.jsx)(Nf,{children:A.a(["address"],e)})})}},{name:"deleteButton",header:Object(ze.jsx)(nt,{className:d.white,children:"Delete"}),width:130,textAlign:"center",size:"sm",view:function(e){return Object(ze.jsx)(Qn,{className:d.deleteButton,onClick:function(){s(!0),p(e)},children:Object(ze.jsx)(xh,{})})}}],f=n?t[n.code]:t[qc.a(t)[0]];return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(vy,{data:f,elements:b,emptyText:"No blacklisted addresses so far",name:"blacklistTable"}),Object(ze.jsx)(Km,{open:c,onDismissed:function(){s(!1),o(null)},onConfirmed:function(){o(null),r(A.a(["cryptoCode"],h),A.a(["address"],h))},errorMessage:i})]})},Cy=Object(f.a)(fy),ky=by.a((function(e){return e.cryptoCode})),Ey=x()(uv||(uv=Object(c.a)(["\n mutation DeleteBlacklistRow($cryptoCode: String!, $address: String!) {\n deleteBlacklistRow(cryptoCode: $cryptoCode, address: $address) {\n cryptoCode\n address\n }\n }\n"]))),Ny=x()(mv||(mv=Object(c.a)(["\n query getBlacklistData {\n blacklist {\n cryptoCode\n address\n }\n cryptoCurrencies {\n display\n code\n }\n }\n"]))),Sy=x()(hv||(hv=Object(c.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"]))),Iy=x()(pv||(pv=Object(c.a)(["\n query getData {\n config\n }\n"]))),Fy=x()(bv||(bv=Object(c.a)(["\n mutation InsertBlacklistRow($cryptoCode: String!, $address: String!) {\n insertBlacklistRow(cryptoCode: $cryptoCode, address: $address) {\n cryptoCode\n address\n }\n }\n"]))),Ly=function(){var e,t,n,r=Object(u.c)(Ny).data,i=Object(u.c)(Iy).data,o=Object(a.useState)(!1),c=Object(l.a)(o,2),s=c[0],d=c[1],m=Object(a.useState)({code:"BTC",display:"Bitcoin"}),p=Object(l.a)(m,2),b=p[0],f=p[1],j=Object(a.useState)(null),g=Object(l.a)(j,2),O=g[0],x=g[1],v=Object(a.useState)(!1),y=Object(l.a)(v,2),w=y[0],C=y[1],k=Object(u.b)(Ey,{onError:function(e){var t=e.message;x(null!==t&&void 0!==t?t:"Error while deleting row")},onCompleted:function(){return C(!1)},refetchQueries:function(){return["getBlacklistData"]}}),E=Object(l.a)(k,1)[0],N=Object(u.b)(Fy,{onError:function(){return console.log("Error while adding row")},refetchQueries:function(){return["getBlacklistData"]}}),S=Object(l.a)(N,1)[0],I=Object(u.b)(Sy,{refetchQueries:function(){return["getData"]}}),F=Object(l.a)(I,1)[0],L=Cy(),P=null!==(e=A.a(["blacklist"])(r))&&void 0!==e?e:[],R=null!==(t=A.a(["cryptoCurrencies"],r))&&void 0!==t?t:[],T=ky(P),B=(null===i||void 0===i?void 0:i.config)&&os("compliance")(i.config),M=null!==(n=null===B||void 0===B?void 0:B.rejectAddressReuse)&&void 0!==n&&n,z=function(e,t){try{return!D.a(Lf.utils.parseUrl(e,"main",t))}catch(n){return!1}},q=function(){var e=Object(Rl.a)(Dl.a.mark((function e(t,n){var a,r;return Dl.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(x(null),z(t,n)){e.next=4;break}return x("Invalid address"),e.abrupt("return");case 4:return e.next=6,S({variables:{cryptoCode:t,address:n}});case 6:if((a=e.sent).errors){e.next=9;break}return e.abrupt("return",d(!1));case 9:r=a.errors.some((function(e){return e.message.includes("duplicate")})),x(r?"This address is already being blocked":"Server error");case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(rl,{title:"Blacklisted addresses",children:Object(ze.jsx)(Yo.a,{display:"flex",justifyContent:"flex-end",children:Object(ze.jsx)(na,{color:"primary",onClick:function(){return d(!0)},children:"Blacklist new addresses"})})}),Object(ze.jsxs)(h.a,{container:!0,className:L.grid,children:[Object(ze.jsx)(ki,{data:R,isSelected:W.a("code",b.code),displayName:function(e){return e.display},onClick:function(e){f({code:e.code,display:e.display})}}),Object(ze.jsxs)("div",{className:L.content,children:[Object(ze.jsxs)(Yo.a,{display:"flex",justifyContent:"space-between",mb:3,children:[Object(ze.jsxs)(Xe,{noMargin:!0,className:L.subtitle,children:[b.display?"".concat(b.display," blacklisted addresses"):""," "]}),Object(ze.jsxs)(Yo.a,{display:"flex",alignItems:"center",justifyContent:"flex-end",mr:"-5px",children:[Object(ze.jsx)(Ke,{children:"Reject reused addresses"}),Object(ze.jsx)(Er,{checked:M,onChange:function(e){!function(e){var t=ls("compliance")(e);F({variables:{config:t}})}({rejectAddressReuse:e.target.checked})},value:M}),Object(ze.jsx)(at,{children:M?"On":"Off"}),Object(ze.jsx)(Ep,{width:304,children:Object(ze.jsx)(Ke,{children:'The "Reject reused addresses" option means that all addresses that are used once will be automatically rejected if there\'s an attempt to use them again on a new transaction.'})})]})]}),Object(ze.jsx)(wy,{data:T,selectedCoin:b,handleDeleteEntry:function(e,t){E({variables:{cryptoCode:e,address:t}})},errorMessage:O,setErrorMessage:x,deleteDialog:w,setDeleteDialog:C})]})]}),s&&Object(ze.jsx)(gy,{onClose:function(){x(null),d(!1)},errorMsg:O,selectedCoin:b,addToBlacklist:q})]})},Py={logo:{maxHeight:80,maxWidth:200},subtitle:{margin:0,marginBottom:42,textAlign:"center"},text:{margin:0},button:{margin:[[0,"auto"]]},modalContent:{display:"flex",flexDirection:"column",justifyContent:"space-between",flex:1,padding:[[0,34,107,34]]},innerContent:{paddingBottom:72},title:{color:K,marginBottom:12,marginTop:30,textAlign:"center"},titleDecorator:{verticalAlign:"bottom",marginRight:12,width:24,height:26}},Dy=Object(f.a)(Py),Ry=function(e){var t=e.name,n=e.onContinue,a=Dy();return Object(ze.jsxs)("div",{className:a.modalContent,children:[Object(ze.jsxs)("div",{className:a.innerContent,children:[Object(ze.jsxs)(Ve,{className:a.title,children:[Object(ze.jsx)(Ac,{className:a.titleDecorator}),Object(ze.jsx)("span",{children:"Enable cash-out"})]}),Object(ze.jsx)(Qe,{className:a.subtitle,children:t}),Object(ze.jsxs)(Ke,{children:["You are about to activate cash-out functionality on your ",t," ","machine which will allow your customers to sell crypto to you."]}),Object(ze.jsx)(Ke,{children:"In order to activate cash-out for this machine, please enter the denominations for the machine."})]}),Object(ze.jsx)(Dn,{className:a.button,onClick:n,children:"Start configuration"})]})},Ty=n.p+"static/media/cashout-cassette-1.fac6c691.svg",By=n.p+"static/media/cashout-cassette-2.34a98cfa.svg",Ay={title:{margin:[[0,0,12,0]]},titleDiv:{paddingBottom:32},subtitle:{margin:[[32,0,21,0]]},edit:{margin:[[0,0,0,0]]},error:{color:he},bill:{width:131,display:"flex",alignItems:"center",justifyContent:"end"},billInput:{width:"100%"},suffix:{paddingLeft:16},button:{marginLeft:"auto"},submit:{float:"right"},picker:{width:150},header:{display:"flex",marginBottom:95},thirdStepHeader:{display:"flex",paddingBottom:188},step:{flex:1},stepImage:{position:"relative",top:-20,right:14},content:{display:"flex",flexDirection:"column",justifyContent:"space-between",flex:1,paddingBottom:32},disclaimer:{display:"flex",flex:1,flexDirection:"column",justifyContent:"space-between"},disclaimerIcon:{float:"left",margin:[[-4,16,48,0]]}},My=Object(f.a)(Ay),Wy=function(e){var t=e.name,n=e.step,a=e.schema,r=e.error,i=e.lastStep,o=e.onContinue,l=e.steps,c=e.fiatCurrency,s=e.options,d=e.numberOfCassettes,u=My(),m=i?"Finish":"Next";return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsxs)("div",{className:u.titleDiv,children:[Object(ze.jsx)(Qe,{className:u.title,children:t}),Object(ze.jsx)(pp,{steps:l.length+1,currentStep:n})]}),n<=d&&Object(ze.jsx)(un.e,{validateOnBlur:!1,validateOnChange:!1,onSubmit:o,initialValues:{cassette1:"",cassette2:"",cassette3:"",cassette4:""},enableReinitialize:!0,validationSchema:a,children:Object(ze.jsxs)(un.d,{children:[Object(ze.jsxs)("div",{className:u.header,children:[l.map((function(e,t){var a=e.type,r=e.display,i=e.component;return 1+t===n&&Object(ze.jsxs)("div",{className:u.step,children:[Object(ze.jsxs)(Xe,{className:u.edit,children:["Edit ",r]}),Object(ze.jsx)(nt,{children:"Choose bill denomination"}),Object(ze.jsxs)("div",{className:u.bill,children:[Object(ze.jsx)(un.b,{className:u.billInput,type:"text",size:"lg",autoFocus:1+t===n,component:(null===s||void 0===s?void 0:s.length)>0?i:ai,fullWidth:!0,decimalPlaces:0,name:a,options:s,valueProp:"code",labelProp:"display"}),Object(ze.jsx)(Ze,{noMargin:!0,className:u.suffix,children:c})]})]},t)})),Object(ze.jsx)("img",{className:u.stepImage,alt:"cassette",width:"148",height:"205",src:{2:{1:Ty,2:By},3:{1:Fp,2:Lp,3:Pp},4:{1:Dp,2:Rp,3:Tp,4:Bp}}[d][n]})]}),Object(ze.jsx)(Dn,{className:u.submit,type:"submit",children:m})]})}),n===d+1&&Object(ze.jsx)(un.e,{validateOnBlur:!1,validateOnChange:!1,onSubmit:o,initialValues:{zeroConfLimit:""},enableReinitialize:!0,validationSchema:l[n-1].schema,children:Object(ze.jsxs)(un.d,{children:[Object(ze.jsx)("div",{className:u.thirdStepHeader,children:Object(ze.jsxs)("div",{className:u.step,children:[Object(ze.jsx)(Xe,{className:u.edit,children:"Edit 0-conf Limit"}),Object(ze.jsx)(nt,{children:"Choose a limit"}),Object(ze.jsxs)("div",{className:u.bill,children:[Object(ze.jsx)(un.b,{className:u.billInput,type:"text",size:"lg",autoFocus:!0,component:ai,fullWidth:!0,decimalPlaces:0,name:l[n-1].type}),Object(ze.jsx)(Ze,{noMargin:!0,className:u.suffix,children:c})]})]})}),Object(ze.jsx)(Dn,{className:u.submit,type:"submit",children:m})]})}),i&&Object(ze.jsxs)("div",{className:u.disclaimer,children:[Object(ze.jsx)(Qe,{className:u.title,children:"Cash Cassette Bill Count"}),Object(ze.jsxs)(Ke,{children:[Object(ze.jsx)(tr,{className:u.disclaimerIcon}),"When enabling cash-out, your bill count will be automatically set to zero. Make sure you physically put cash inside the cash cassettes to allow the machine to dispense it to your users. If you already did, make sure you set the correct cash cassette bill count for this machine on your Cash Boxes & Cassettes tab under Maintenance."]}),Object(ze.jsx)(Qe,{className:u.title,children:"Default Commissions"}),Object(ze.jsxs)(Ke,{children:[Object(ze.jsx)(tr,{className:u.disclaimerIcon}),"When enabling cash-out, default commissions will be set. To change commissions for this machine, please go to the Commissions tab under Settings where you can set exceptions for each of the available cryptocurrencies."]}),Object(ze.jsxs)("div",{children:[r&&Object(ze.jsx)(tl,{children:"Failed to save"}),Object(ze.jsx)(Dn,{className:u.submit,onClick:function(){return o()},children:m})]})]})]})},zy={2:{machine:300,cassette:225,zeroConf:200},3:{machine:210,cassette:180,zeroConf:200},4:{machine:200,cassette:150,zeroConf:150}},qy=fn.f().shape({cassette1:fn.e().label("Cassette 1").required().min(1).max(Yh),cassette2:fn.e().label("Cassette 2").required().min(1).max(Yh),cassette3:fn.e().label("Cassette 3").min(1).max(Yh).nullable().transform($r),cassette4:fn.e().label("Cassette 4").min(1).max(Yh).nullable().transform($r)}),$y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,a=T.a("fiatCurrency")(t),r=Math.max.apply(Math,Object(d.a)(R.a((function(e){return e.numberOfCassettes}),e)).concat([0])),i=Ag(t,Bg),o=(null===i||void 0===i?void 0:i.length)>0?{options:i,labelProp:"display",valueProp:"code",className:n.autoComplete}:{decimalPlaces:0},l=[{name:"id",header:"Machine",width:zy[r].machine,view:function(t){return e.find((function(e){return e.deviceId===t})).name},size:"sm",editable:!1}];return rm.a(im.a(om.a,r),(function(t){return l.push({name:"cassette".concat(t),header:"Cassette ".concat(t),size:"sm",stripe:!0,textAlign:"right",width:zy[r].cassette,suffix:a,bold:za,view:function(e){return e},input:(null===i||void 0===i?void 0:i.length)>0?Pr:ai,inputProps:o,doubleHeader:"Denominations",isHidden:function(n){return t>e.find((function(e){return e.deviceId===n.id})).numberOfCassettes}}),lm.a(1,t)}),1),l},Hy=function(e){var t=e.machine,n=e.locale,r=e.onClose,i=e.save,o=e.error,c=t.numberOfCassettes+2,s=Object(a.useState)({step:0,config:{active:!0}}),d=Object(l.a)(s,2),u=d[0],m=u.step,h=u.config,p=d[1],b=Ag(n,Bg),f=m===c,j=function(){var e=Object(Rl.a)(Dl.a.mark((function e(n){var a;return Dl.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!f){e.next=2;break}return e.abrupt("return",i(ls(t.deviceId,qy.cast(h,{assert:!1}))));case 2:a=$n.a(h,n),p({step:m+1,config:a});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),g=[];rm.a(im.a(om.a,t.numberOfCassettes),(function(e){return g.push({type:"cassette".concat(e),display:"Cassette ".concat(e),component:Pr,inputProps:{options:R.a((function(e){return{code:e,display:e}}))(b),labelProp:"display",valueProp:"code"}}),lm.a(1,e)}),1),g.push({type:"zeroConfLimit",display:"0-conf Limit",schema:fn.f().shape({zeroConfLimit:fn.e().required()})});return Object(ze.jsxs)(Qh,{title:0===m?null:"Enable cash-out",handleClose:r,width:554,height:520,open:!0,children:[0===m&&Object(ze.jsx)(Ry,{name:t.name,onContinue:function(){return j()}}),0!==m&&Object(ze.jsx)(Wy,{step:m,name:t.name,numberOfCassettes:t.numberOfCassettes,error:o,lastStep:f,steps:g,fiatCurrency:n.fiatCurrency,options:b,schema:fn.f().shape({cassette1:fn.e().required(),cassette2:t.numberOfCassettes>1&&m>=2?fn.e().required():fn.e().transform($r).nullable(),cassette3:t.numberOfCassettes>2&&m>=3?fn.e().required():fn.e().transform($r).nullable(),cassette4:t.numberOfCassettes>3&&m>=4?fn.e().required():fn.e().transform($r).nullable()}),onContinue:j})]})},Vy=Object(f.a)({fudgeFactor:{display:"flex",alignItems:"center"},switchLabel:{margin:6,width:24},autoComplete:{width:"100%"}}),Uy=x()(fv||(fv=Object(c.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"]))),Gy=x()(jv||(jv=Object(c.a)(["\n query getData {\n machines {\n name\n deviceId\n cashbox\n cassette1\n cassette2\n cassette3\n cassette4\n numberOfCassettes\n }\n config\n }\n"]))),Xy=function(e){var t,n,r=e.name,i=Vy(),o=Object(a.useState)(!1),c=Object(l.a)(o,2),s=c[0],d=c[1],m=Object(u.c)(Gy),h=m.data,p=m.loading,b=Object(u.b)(Uy,{onCompleted:function(){return d(!1)},refetchQueries:function(){return["getData"]}}),f=Object(l.a)(b,2),j=f[0],g=f[1].error,O=function(e,t){var n=ls(r)(e);return j({variables:{config:n,accounts:t}})},x=(null===h||void 0===h?void 0:h.config)&&os(r)(h.config),v=null!==(t=null===x||void 0===x?void 0:x.fudgeFactorActive)&&void 0!==t&&t,y=(null===h||void 0===h?void 0:h.config)&&os("locale")(h.config),w=null!==(n=null===h||void 0===h?void 0:h.machines)&&void 0!==n?n:[];return!p&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(rl,{title:"Cash-out",children:Object(ze.jsxs)("div",{className:i.fudgeFactor,children:[Object(ze.jsx)(Ke,{children:"Transaction fudge factor"}),Object(ze.jsx)(Er,{checked:v,onChange:function(e){O({fudgeFactorActive:e.target.checked})},value:v}),Object(ze.jsx)(at,{className:i.switchLabel,children:v?"On":"Off"}),Object(ze.jsxs)(Ep,{width:304,children:[Object(ze.jsx)(Ke,{children:"Automatically accept customer deposits as complete if their received amount is 100 crypto atoms or less."}),Object(ze.jsx)(Ke,{children:"(Crypto atoms are the smallest unit in each cryptocurrency. E.g., satoshis in Bitcoin, or wei in Ethereum.)"})]})]})}),Object(ze.jsx)(_h,{namespaces:R.a(A.a(["deviceId"]))(w),data:x,stripeWhen:function(e){return 1===L.a(pn.a,qc.a)(e)},enableEdit:!0,editWidth:134,enableToggle:!0,toggleWidth:109,onToggle:function(e){var t=os(e)(x);if(!qy.isValidSync(t))return d(e);O(ls(e,{active:!(null===t||void 0===t?void 0:t.active)}))},save:O,error:null===g||void 0===g?void 0:g.message,validationSchema:qy,disableRowEdit:L.a(P.a,A.a(["active"])),elements:$y(w,y,i)}),Ta.a(w)&&Object(ze.jsx)(Cs,{message:"No machines so far"}),s&&Object(ze.jsx)(Hy,{machine:Da.a(W.a("deviceId",s))(w),onClose:function(){return d(!1)},save:O,error:null===g||void 0===g?void 0:g.message,locale:y})]})},_y=n(911),Ky=n(912);function Zy(){return(Zy=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Yy=a.createElement("desc",null,"Created with Sketch."),Jy=a.createElement("g",{id:"icon/sf-small/listing/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("line",{x1:0,y1:1,x2:20,y2:1,id:"Path-4",stroke:"#FFFFFF",strokeWidth:2}),a.createElement("line",{x1:0,y1:7,x2:9,y2:7,id:"Path-4-Copy",stroke:"#FFFFFF",strokeWidth:2}),a.createElement("line",{x1:0,y1:13,x2:20,y2:13,id:"Path-4-Copy-2",stroke:"#FFFFFF",strokeWidth:2}),a.createElement("line",{x1:0,y1:19,x2:12,y2:19,id:"Path-4-Copy-3",stroke:"#FFFFFF",strokeWidth:2}));function ew(e,t){var n=e.title,r=e.titleId,i=Qy(e,["title","titleId"]);return a.createElement("svg",Zy({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,Yy,Jy)}var tw=a.forwardRef(ew);n.p;function nw(){return(nw=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var rw=a.createElement("desc",null,"Created with Sketch."),iw=a.createElement("g",{id:"icon/sf-small/listing/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("line",{x1:0,y1:1,x2:20,y2:1,id:"Path-4",stroke:"#1B2559",strokeWidth:2}),a.createElement("line",{x1:0,y1:7,x2:9,y2:7,id:"Path-4-Copy",stroke:"#1B2559",strokeWidth:2}),a.createElement("line",{x1:0,y1:13,x2:20,y2:13,id:"Path-4-Copy-2",stroke:"#1B2559",strokeWidth:2}),a.createElement("line",{x1:0,y1:19,x2:12,y2:19,id:"Path-4-Copy-3",stroke:"#1B2559",strokeWidth:2}));function ow(e,t){var n=e.title,r=e.titleId,i=aw(e,["title","titleId"]);return a.createElement("svg",nw({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,rw,iw)}var lw=a.forwardRef(ow);n.p;function cw(){return(cw=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var dw=a.createElement("rect",{width:12,height:12,rx:3,ry:3,fill:"#44e188"});function uw(e,t){var n=e.title,r=e.titleId,i=sw(e,["title","titleId"]);return a.createElement("svg",cw({width:12,height:12,viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,dw)}var mw,hw,pw=a.forwardRef(uw),bw=(n.p,n(908)),fw=n(951),jw=Object(a.memo)((function(e){var t,n=e.config,r=e.locale,i=e.currency,o=e.data,c=e.error,s=e.save,d=e.saveOverrides,u=Object(a.useState)(!1),m=Object(l.a)(u,2),h=m[0],p=m[1],b=Object(a.useState)(!1),f=Object(l.a)(b,2),j=f[0],g=f[1],O=n&&!Ta.a(n)?n:Qg,x=null!==(t=null===O||void 0===O?void 0:O.overrides)&&void 0!==t?t:[],v=mm.a([bw.a(Jg),bw.a(T.a("machine"))])(x);return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(CO,{children:Object(ze.jsx)(Xh,{error:null===c||void 0===c?void 0:c.message,title:"Default setup",rowSize:"lg",titleLg:!0,name:"commissions",enableEdit:!0,initialValues:O,save:s,validationSchema:Kg(r),data:fw.a(O),elements:Gg(i),setEditing:function(e,t){return p(t)},forceDisable:j})}),Object(ze.jsx)(CO,{children:Object(ze.jsx)(Xh,{error:null===c||void 0===c?void 0:c.message,title:"Overrides",titleLg:!0,name:"overrides",enableDelete:!0,enableEdit:!0,enableCreate:!0,groupBy:Jg,initialValues:Yg,save:d,validationSchema:Zg(v,o,r),data:v,elements:Xg(o,i),setEditing:function(e,t){return g(t)},forceDisable:h})})]})})),gw=n(909),Ow=n(910),xw=n(934),vw={code:"SHOW_ALL",display:"Show all"},yw=[{code:"machine",display:"Machine Name"},{code:"cryptoCurrencies",display:"Cryptocurrency"},{code:"cashIn",display:"Cash-in"},{code:"cashOut",display:"Cash-out"},{code:"fixedFee",display:"Fixed Fee"},{code:"minimumTx",display:"Minimum Tx"}],ww=Object(f.a)({headerLine:{display:"flex",justifyContent:"",marginBottom:24},select:{marginRight:24},tableWrapper:{flex:1,display:"block",overflowY:"auto",width:"100%",maxHeight:"70vh"}}),Cw=function(e,t){return{code:e,display:t||e}},kw=Object(a.memo)((function(e){var t,n=e.config,r=e.localeConfig,i=e.currency,o=e.data,c=e.error,s=e.saveOverrides,d=ww(),u=Object(a.useState)(vw),m=Object(l.a)(u,2),h=m[0],p=m[1],b=Object(a.useState)(vw),f=Object(l.a)(b,2),j=f[0],g=f[1],O=Object(a.useState)(yw[0]),x=Object(l.a)(O,2),v=x[0],y=x[1],w=null!==(t=T.a("cryptoCurrencies",r))&&void 0!==t?t:[],C=R.a(Cw)(w),k=gw.a(T.a("display"),R.a((function(e){return Cw(T.a("deviceId",e),T.a("name",e))}))(T.a("machines",o))),E=xw.a(R.a((function(e){var t,n=null===(t=T.a("overrides",r))||void 0===t?void 0:t.find(W.a("machine",e)),a=n?T.a("cryptoCurrencies",n):w;return Ow.a([e],a)}))(k.map(T.a("code")))),N=R.a((function(e){var t=Object(l.a)(e,2),a=t[0];return function(e,t,n){var a,r=null!==(a=T.a("overrides",n))&&void 0!==a?a:[];if(!r&&Ta.a(r))return eO(e,t,!0,n);var i=Da.a((function(n){return n.machine===t&&Lg.includes(e)(n.cryptoCurrencies)}))(r);if(void 0!==i)return eO(e,t,!1,i);var o=Da.a((function(e){return e.machine===t&&Lg.includes("ALL_COINS")(e.cryptoCurrencies)}))(r);if(void 0!==o)return eO(e,t,!1,o);var l=Da.a((function(t){return"ALL_MACHINES"===t.machine&&Lg.includes(e)(t.cryptoCurrencies)}))(r);return void 0!==l?eO(e,t,!1,l):eO(e,t,!0,n)}(t[1],a,n)}))(E),S=L.a(function(e){switch(e){case yw[0]:return gw.a(Da.a(W.a("code",T.a("machine"))));case yw[1]:return gw.a(A.a(["cryptoCurrencies",0]));default:return gw.a(T.a(e.code))}}(v),function(e,t){return L.a(M.a((function(e){return t===vw|t.code===e.machine})),M.a((function(t){return e===vw|e.code===t.cryptoCurrencies[0]})))}(j,h))(N);return Object(ze.jsxs)("div",{children:[Object(ze.jsxs)("div",{className:d.headerLine,children:[Object(ze.jsx)(ch,{className:d.select,onSelectedItemChange:p,label:"Machines",default:vw,items:[vw].concat(k),selectedItem:h}),Object(ze.jsx)(ch,{className:d.select,onSelectedItemChange:g,label:"Cryptocurrency",default:vw,items:[vw].concat(C),selectedItem:j}),Object(ze.jsx)(ch,{onSelectedItemChange:y,label:"Sort by",default:yw[0],items:yw,selectedItem:v,defaultAsFilter:!0})]}),Object(ze.jsx)("div",{className:d.tableWrapper,children:Object(ze.jsx)(Xh,{error:null===c||void 0===c?void 0:c.message,name:"comissionsList",enableEdit:!0,save:s,initialValues:Yg,validationSchema:tO(r),data:S,elements:aO(o,i),orderedBy:v})})]})})),Ew=Object(f.a)({listViewButton:{marginLeft:4}}),Nw=x()(mw||(mw=Object(c.a)(["\n query getData {\n config\n cryptoCurrencies {\n code\n display\n }\n machines {\n name\n deviceId\n }\n }\n"]))),Sw=x()(hw||(hw=Object(c.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"]))),Iw=function(e){var t,n=e.name,r=Ew(),i=Object(a.useState)(!1),o=Object(l.a)(i,2),c=o[0],s=o[1],d=Object(a.useState)(null),m=Object(l.a)(d,2),h=m[0],p=m[1],b=Object(u.c)(Nw),f=b.data,j=b.loading,g=Object(u.b)(Sw,{refetchQueries:function(){return["getData"]},onError:function(e){return p(e)}}),O=Object(l.a)(g,1)[0],x=(null===f||void 0===f?void 0:f.config)&&os(n)(f.config),v=(null===f||void 0===f?void 0:f.config)&&os(Qc)(f.config),y=T.a("fiatCurrency")(v),w=T.a("overrides")(x),C=c?[{label:"Override value",icon:Object(ze.jsx)(pw,{})}]:[];return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(rl,{title:"Commissions",labels:C,buttons:[{text:"List view",icon:lw,inverseIcon:tw,toggle:s}],iconClassName:r.listViewButton}),!c&&!j&&Object(ze.jsx)(jw,{config:x,locale:v,currency:y,data:f,error:h,save:function(e){var t=ls(n)(e.commissions[0]);return O({variables:{config:t}})},saveOverrides:function(e){var t=ls(n)(e);return p(null),O({variables:{config:t}})},classes:r}),c&&!j&&Object(ze.jsx)(kw,{config:x,localeConfig:v,currency:y,data:f,error:h,saveOverrides:(t=w,function(e,n){var a,r=A.a(["cryptoCurrencies",0],n),i=Aa.a("machine",n),o=M.a(Ar.a(i,(function(e){return!Aa.a("cryptoCurrencies",n,e)}))),l=(a=r,function(e){return _y.a(e,{cryptoCurrencies:Ky.a([a],e.cryptoCurrencies)})}),c=R.a(l)(o(t)).concat(M.a((function(e){return!i(e)}),t)),s={commissions_overrides:dm.a(n,c)};return O({variables:{config:s}})})})]})},Fw=n(919);function Lw(){return(Lw=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Dw=a.createElement("desc",null,"Created with Sketch."),Rw=a.createElement("g",{id:"icon/button/authorize/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("circle",{id:"Oval",stroke:"#FFFFFF",cx:6,cy:6,r:5}),a.createElement("polyline",{id:"Stroke-13",stroke:"#FFFFFF",strokeLinecap:"round",strokeLinejoin:"round",points:"4 6.66666667 5 8 8 4"}));function Tw(e,t){var n=e.title,r=e.titleId,i=Pw(e,["title","titleId"]);return a.createElement("svg",Lw({viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,Dw,Rw)}var Bw=a.forwardRef(Tw);n.p;function Aw(){return(Aw=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Ww=a.createElement("desc",null,"Created with Sketch."),zw=a.createElement("g",{id:"icon/button/authorize/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"Group-9",stroke:"#1B2559"},a.createElement("circle",{id:"Oval",cx:6,cy:6,r:5})),a.createElement("polyline",{id:"Stroke-13",stroke:"#1B2559",strokeLinecap:"round",strokeLinejoin:"round",points:"4 6.66666667 5 8 8 4"}));function qw(e,t){var n=e.title,r=e.titleId,i=Mw(e,["title","titleId"]);return a.createElement("svg",Aw({viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,Ww,zw)}var $w=a.forwardRef(qw),Hw=(n.p,{label1:{display:"flex",marginBottom:2,marginTop:"auto",width:85},label1Pending:{color:$},label1Rejected:{color:Q},label1Accepted:{color:U},cardActionButton:{display:"flex",height:28,marginRight:"auto",marginLeft:12},propertyCardTopRow:{display:"flex",margin:[[0,10,5,0]]},propertyCardBottomRow:{display:"flex",flexDirection:"row",height:45},propertyCard:{display:"flex",flexDirection:"column",borderRadius:8,width:"100%",height:100,padding:[[20]],boxSizing:"border-box",boxShadow:"0 0 8px 0 rgba(0, 0, 0, 0.04)",border:"solid 0",backgroundColor:Z,margin:[[20,0,0,0]]},rowSpaceBetween:{display:"flex",flexFlow:"row nowrap",alignItems:"center",justifyContent:"space-between"},columnSpaceBetween:{display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"space-between",width:90},buttonsWrapper:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginLeft:"auto",marginTop:"auto"}}),Vw=(Object(f.a)(Hw),"automatic"),Uw="verified",Gw="blocked";function Xw(){return(Xw=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Kw=a.createElement("desc",null,"Created with Sketch."),Zw=a.createElement("g",{id:"icon/button/block/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{id:"Group-5",stroke:"#FFFFFF"},a.createElement("circle",{id:"Oval",cx:6,cy:6,r:5}),a.createElement("line",{x1:9,y1:3,x2:3,y2:9,id:"Stroke-3"})));function Qw(e,t){var n=e.title,r=e.titleId,i=_w(e,["title","titleId"]);return a.createElement("svg",Xw({viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,Kw,Zw)}var Yw=a.forwardRef(Qw);n.p;function Jw(){return(Jw=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var tC=a.createElement("desc",null,"Created with Sketch."),nC=a.createElement("g",{id:"icon/button/block/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{id:"Group-5",stroke:"#1B2559"},a.createElement("circle",{id:"Oval",cx:6,cy:6,r:5}),a.createElement("line",{x1:9,y1:3,x2:3,y2:9,id:"Stroke-3"})));function aC(e,t){var n=e.title,r=e.titleId,i=eC(e,["title","titleId"]);return a.createElement("svg",Jw({viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,tC,nC)}var rC=a.forwardRef(aC);n.p;function iC(){return(iC=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var lC=a.createElement("g",{id:"icon/button/data/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"Data-icon---small",transform:"translate(0.500000, 0.500000)",stroke:"#FFFFFF"},a.createElement("path",{d:"M11,2.44444444 L11,5.5 C11,6.85002939 8.53756612,7.94444444 5.5,7.94444444 C2.521994,7.94444444 0.0939612041,6.81341452 1.11160464e-12,5.5 L0.00282594991,2.44444444",id:"oval-3"}),a.createElement("path",{d:"M11,5.5 L11,8.55555556 C11,9.90558494 8.53756612,11 5.5,11 C2.521994,11 0.0939612041,9.86897007 1.11160464e-12,8.55555556 L0.00282594991,5.5",id:"oval-2"}),a.createElement("ellipse",{id:"oval-1",cx:5.5,cy:2.44444444,rx:5.5,ry:2.44444444})),a.createElement("g",{id:"Group-9",transform:"translate(0.000000, 4.000000)"},a.createElement("circle",{id:"Oval",stroke:"#FFFFFF",fill:"#5F668A",cx:4,cy:4,r:3.5}),a.createElement("polygon",{id:"Path",fill:"#FFFFFF",fillRule:"nonzero",points:"4.33333333 3.66666667 6 3.66666667 6 4.33333333 4.33333333 4.33333333 4.33333333 6 3.66666667 6 3.66666667 4.33333333 2 4.33333333 2 3.66666667 3.66666667 3.66666667 3.66666667 2 4.33333333 2"})));function cC(e,t){var n=e.title,r=e.titleId,i=oC(e,["title","titleId"]);return a.createElement("svg",iC({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,lC)}var sC=a.forwardRef(cC);n.p;function dC(){return(dC=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var mC=a.createElement("g",{id:"icon/button/data/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"Data-icon---small",transform:"translate(1.500000, 0.500000)",stroke:"#1B2559"},a.createElement("path",{d:"M10,2 L10,4.77777778 C10,6.00507722 7.76142375,7 5,7 C2.29272181,7 0.0854192765,5.97179097 0,4.77777778 L0.00256904537,2",id:"oval-3"}),a.createElement("path",{d:"M10,5 L10,7.77777778 C10,9.00507722 7.76142375,10 5,10 C2.29272181,10 0.0854192765,8.97179097 0,7.77777778 L0.00256904537,5",id:"oval-2"}),a.createElement("ellipse",{id:"oval-1",cx:5,cy:2,rx:5,ry:2})),a.createElement("g",{id:"Group-9",transform:"translate(0.000000, 4.000000)"},a.createElement("circle",{id:"Oval",stroke:"#1B2559",fill:"#EBEFFF",cx:4,cy:4,r:3.5}),a.createElement("polygon",{id:"Path",fill:"#1B2559",fillRule:"nonzero",points:"4.33333333 3.66666667 6 3.66666667 6 4.33333333 4.33333333 4.33333333 4.33333333 6 3.66666667 6 3.66666667 4.33333333 2 4.33333333 2 3.66666667 3.66666667 3.66666667 3.66666667 2 4.33333333 2"})));function hC(e,t){var n=e.title,r=e.titleId,i=uC(e,["title","titleId"]);return a.createElement("svg",dC({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,mC)}var pC=a.forwardRef(hC),bC=(n.p,n(915));function fC(){return(fC=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var gC=a.createElement("desc",null,"Created with Sketch."),OC=a.createElement("g",{id:"icon/sf-small/search/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("path",{d:"M15.8635238,8.17028571 C15.8635238,12.4198095 12.4187619,15.8645714 8.1692381,15.8645714 C3.92066667,15.8645714 0.475904762,12.4198095 0.475904762,8.17028571 C0.475904762,3.9207619 3.92066667,0.476 8.1692381,0.476 C12.4187619,0.476 15.8635238,3.9207619 15.8635238,8.17028571 Z",id:"Stroke-1",stroke:"#FFFFFF",strokeWidth:2}),a.createElement("line",{x1:13.7035238,y1:13.7046667,x2:19.4844762,y2:19.485619,id:"Stroke-3",stroke:"#FFFFFF",strokeWidth:2,strokeLinecap:"round"}));function xC(e,t){var n=e.title,r=e.titleId,i=jC(e,["title","titleId"]);return a.createElement("svg",fC({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,gC,OC)}var vC=a.forwardRef(xC);n.p;function yC(){return(yC=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var CC=a.createElement("g",{id:"icon/search/dark02",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"Group",transform:"translate(1.000000, 1.000000)",stroke:"#1B2559",strokeWidth:2},a.createElement("path",{d:"M14.2771714,7.35325714 C14.2771714,11.1778286 11.1768857,14.2781143 7.35231429,14.2781143 C3.5286,14.2781143 0.428314286,11.1778286 0.428314286,7.35325714 C0.428314286,3.52868571 3.5286,0.4284 7.35231429,0.4284 C11.1768857,0.4284 14.2771714,3.52868571 14.2771714,7.35325714 Z",id:"Stroke-1"}),a.createElement("line",{x1:12.3331714,y1:12.3342,x2:17.5360286,y2:17.5370571,id:"Stroke-3",strokeLinecap:"round"})));function kC(e,t){var n=e.title,r=e.titleId,i=wC(e,["title","titleId"]);return a.createElement("svg",yC({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"icon/search/dark02"):n?a.createElement("title",{id:r},n):null,CC)}var EC=a.forwardRef(kC),NC=(n.p,Object(f.a)({row:{display:"flex",flexDirection:"row"},image:function(e){return{objectFit:"cover",borderRadius:"8px 0px 0px 8px",width:e.width,height:e.height}},popupImage:function(e){return{objectFit:"cover",width:e.popupWidth,height:e.popupHeight}},button:function(e){return{borderRadius:"0px 8px 8px 0px",height:e.height}},popoverContent:{display:"block",padding:[[10,15]]}})),SC=Object(a.memo)((function(e){var t=e.className,n=e.width,r=e.height,i=e.popupWidth,o=e.popupHeight,c=e.src,s=NC({width:n,height:r,popupWidth:i,popupHeight:o}),d=Object(a.useState)(null),u=Object(l.a)(d,2),m=u[0],h=u[1],p=Boolean(m),b=function(e){var t=e.className;return Object(ze.jsx)("img",{className:I()(t),src:c,alt:""})};return Object(ze.jsx)(E.a,{onClickAway:function(){h(null)},children:Object(ze.jsxs)("div",{className:I()(s.row,t),children:[Object(ze.jsx)(b,{className:s.image}),Object(ze.jsx)(zn,{Icon:EC,InverseIcon:vC,className:s.button,onClick:function(e){h(m?null:e.currentTarget)}}),Object(ze.jsx)(Hn,{open:p,anchorEl:m,placement:"top",children:Object(ze.jsx)("div",{className:s.popoverContent,children:Object(ze.jsx)(b,{className:s.popupImage})})})]})})}));function IC(){return(IC=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var LC=a.createElement("g",{id:"icon/ID/card/new/comet",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("polygon",{id:"Stroke-1",stroke:"#5F668A",strokeWidth:1.6,points:"1 17 23 17 23 1 1 1"}),a.createElement("line",{x1:12.7857143,y1:5,x2:19.8571429,y2:5,id:"Stroke-3",stroke:"#5F668A",strokeWidth:1.6}),a.createElement("line",{x1:12.7857143,y1:8.2,x2:19.8571429,y2:8.2,id:"Stroke-4",stroke:"#5F668A",strokeWidth:1.6}),a.createElement("polygon",{id:"Stroke-5",stroke:"#5F668A",strokeWidth:1.6,points:"4.14285714 12.2 9.64285714 12.2 9.64285714 5 4.14285714 5"}));function PC(e,t){var n=e.title,r=e.titleId,i=FC(e,["title","titleId"]);return a.createElement("svg",IC({width:"24px",height:"18px",viewBox:"0 0 24 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"icon/ID/card/new/comet"):n?a.createElement("title",{id:r},n):null,LC)}var DC=a.forwardRef(PC);n.p;function RC(){return(RC=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var BC=a.createElement("g",{id:"icon/ID/phone/new/comet",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("path",{d:"M7.47150618,13.52898 C10.939556,16.9970298 14.7804112,17.1146315 16.4756355,16.9586292 C17.0220434,16.9090285 17.5308507,16.6578249 17.9188563,16.2698193 L20.0004862,14.1881894 L18.0220577,12.210561 L16.0436293,11.5505516 L14.7244104,12.8697705 C14.7244104,12.8697705 13.4059914,14.1881894 10.1091441,10.8905421 C6.81229671,7.59449473 8.13071565,6.27527578 8.13071565,6.27527578 L9.4499346,4.95605683 L8.78992512,2.97842842 L6.81229671,1 L4.73066681,3.0816299 C4.34186123,3.46963548 4.09145763,3.97844279 4.04105691,4.52485063 C3.88585468,6.22007499 4.00345637,10.0601301 7.47150618,13.52898 Z",id:"Stroke-1-Copy",stroke:"#5F668A",strokeWidth:1.6}));function AC(e,t){var n=e.title,r=e.titleId,i=TC(e,["title","titleId"]);return a.createElement("svg",RC({width:"24px",height:"18px",viewBox:"0 0 24 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"icon/ID/phone/new/comet"):n?a.createElement("title",{id:r},n):null,BC)}var MC=a.forwardRef(AC);n.p;function WC(){return(WC=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var qC=a.createElement("desc",null,"Created with Sketch."),$C=a.createElement("g",{id:"icon/crossed-camera",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"crossed-camera"},a.createElement("g",{id:"Group-2"},a.createElement("g",{id:"icon/ID/cam/zodiac",transform:"translate(0.000000, 3.657143)",fill:"#1B2559",fillRule:"nonzero"},a.createElement("path",{d:"M16,19.1876029 C12.4482116,19.1876029 9.56809571,16.389776 9.56809571,12.9394673 C9.56809571,9.48915858 12.4482116,6.69133172 16,6.69133172 C19.5517884,6.69133172 22.4319043,9.48915858 22.4319043,12.9394673 C22.4319043,16.389776 19.5517884,19.1876029 16,19.1876029 Z M16,17.104891 C18.3677075,17.104891 20.2879362,15.239526 20.2879362,12.9394673 C20.2879362,10.6394086 18.3677075,8.77404358 16,8.77404358 C13.6322925,8.77404358 11.7120638,10.6394086 11.7120638,12.9394673 C11.7120638,15.239526 13.6322925,17.104891 16,17.104891 Z M22.7667469,3.30692494 L30.7397807,3.30692494 C31.3318211,3.30692494 31.8117647,3.77315587 31.8117647,4.34828087 L31.8117647,22.0513317 C31.8117647,22.6264567 31.3318211,23.0926877 30.7397807,23.0926877 L1.26021934,23.0926877 C0.6681789,23.0926877 0.188235294,22.6264567 0.188235294,22.0513317 L0.188235294,4.34828087 C0.188235294,3.77315587 0.6681789,3.30692494 1.26021934,3.30692494 L9.23325311,3.30692494 L12.0766705,0.494526627 C12.2782333,0.295162767 12.5538198,0.182857143 12.8414756,0.182857143 L19.1585244,0.182857143 C19.4461802,0.182857143 19.7217667,0.295162767 19.9233295,0.494526627 L22.7667469,3.30692494 Z M29.6677966,5.3896368 L22.3170489,5.3896368 C22.0293931,5.3896368 21.7538065,5.27733118 21.5522438,5.07796732 L18.7088264,2.26556901 L13.2911736,2.26556901 L10.4477562,5.07796732 C10.2461935,5.27733118 9.97060695,5.3896368 9.68295115,5.3896368 L2.33220339,5.3896368 L2.33220339,21.0099758 L29.6677966,21.0099758 L29.6677966,5.3896368 Z",id:"Stroke-1"})),a.createElement("line",{x1:32,y1:0,x2:0,y2:32,id:"Line",stroke:"#FF584A",strokeWidth:2,strokeLinecap:"square"}))));function HC(e,t){var n=e.title,r=e.titleId,i=zC(e,["title","titleId"]);return a.createElement("svg",WC({width:"32px",height:"32px",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,qC,$C)}var VC=a.forwardRef(HC);n.p;function UC(){return(UC=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var XC=a.createElement("desc",null,"Created with Sketch."),_C=a.createElement("g",{id:"icon/action/edit/disabled",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("path",{d:"M1,18 L1,18 C1,19.657 2.343,21 4,21 L18,21 C19.657,21 21,19.657 21,18",id:"Stroke-1",stroke:"#5f668a",strokeWidth:2}),a.createElement("polygon",{id:"Stroke-3",stroke:"#5f668a",strokeWidth:2,points:"6 12 17 1 21 5 10 16 6 16"}));function KC(e,t){var n=e.title,r=e.titleId,i=GC(e,["title","titleId"]);return a.createElement("svg",UC({width:"22px",height:"22px",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,XC,_C)}var ZC=a.forwardRef(KC);n.p;n.p;n.p;n.p;n.p;var QC={header:{display:"flex",flexDirection:"row",marginBottom:15},title:{marginTop:7,marginRight:24},editIcon:{marginTop:5},cardIcon:{marginTop:7},viewIcons:{marginRight:12},wrapper:{display:"block",overflow:"hidden",whiteSpace:"nowrap"},separator:{color:se,margin:[[8,0,8,150]],position:"relative",display:"inline-block","&:before, &:after":{content:'""',position:"absolute",background:se,top:"50%",width:1e3,height:1},"&:before":{right:"100%",marginRight:15},"&:after":{left:"100%",marginLeft:15}},closeButton:{display:"flex",padding:[[16,16,0,16]],paddingRight:12,justifyContent:"end"},dialogTitle:{margin:[[0,16,8,40]]},dialogContent:{width:615,marginLeft:16},dialogActions:{padding:32,paddingTop:16},cancelButton:{marginRight:8,padding:0}},YC=n(913),JC=n(929),ek=Object(f.a)({radio:{padding:4,margin:4},radioGroup:{flexDirection:"row"},error:{color:he},specialLabel:{height:40,padding:0,width:250},label:{height:40,padding:0},specialGrid:{display:"grid",gridTemplateColumns:[[182,162,141]]},picker:{width:150},field:{"& > *:last-child":{marginBottom:24}}}),tk="custom",nk="requirement",ak=function(e,t){var n=["frontCamera","idCardPhoto"],a=R.a((function(a){return!D.a(F.a(a,n)?e["".concat(a,"Path")]:e["".concat(a)])&&(!!function(e){var n,a=zr.a(e,"frontCamera")?"facephoto":e,r=M.a((function(e){return zr.a(Dv.a(e.automation),Jh)}),null!==(n=null===t||void 0===t?void 0:t.overrides)&&void 0!==n?n:[]);return!!Da.a((function(e){return zr.a(e.requirement,a)}),r)||zr.a(Dv.a(t.automation),Jh)}(a)&&zr.a(e["".concat(a,"Override")],"automatic"))}),["frontCamera","idCardData","idCardPhoto","usSsn","sanctions"]);return"blocked"===e.authorizedOverride?{label:"Blocked",type:"error"}:e.isSuspended?e.daysSuspended>0?{label:"".concat(e.daysSuspended," day suspension"),type:"warning"}:{label:"< 1 day suspension",type:"warning"}:dl.a((function(e){return!0===e}),a)?{label:"Pending",type:"warning"}:{label:"Authorized",type:"success"}},rk=function(e,t){var n=e&&t?Object(JC.a)(e,t):null;return n?n.formatInternational():e},ik=function(e){var t,n,a=A.a(["idCardData"])(e);return"".concat(null!==(t=A.a(["firstName"])(a))&&void 0!==t?t:""," ").concat(null!==(n=A.a(["lastName"])(a))&&void 0!==n?n:"").trim()},ok=[{display:"Custom entry",code:"custom"},{display:"Populate existing requirement",code:"requirement"}],lk=[{display:"Text",code:"text"}],ck=[{display:"ID card image",code:"idCardPhoto"},{display:"ID data",code:"idCardData"},{display:"US SSN",code:"usSsn"},{display:"Customer camera",code:"frontCamera"}],sk=[{label:"Data entry title",name:"title"}],dk=fn.c((function(e){return"custom"===e.entryType?fn.f().shape({entryType:fn.h().required(),dataType:fn.h().required()}):"requirement"===e.entryType?fn.f().shape({entryType:fn.h().required(),requirement:fn.h().required()}):void 0})),uk=fn.f().shape({title:fn.h().required(),file:fn.d().required()}),mk=fn.f().shape({title:fn.h().required(),image:fn.d().required()}),hk=fn.f().shape({title:fn.h().required(),data:fn.h().required()}),pk=function(e){var t,n=e.selectedValues,a=e.customInfoRequirementOptions,r=ek(),i=null===n||void 0===n?void 0:n.entryType,o=null===n||void 0===n?void 0:n.dataType,l=null===n||void 0===n?void 0:n.requirement,c="requirement"===i,s=l===tk,u=Ta.a(a)?ck:(t=ck,[{display:"Custom information requirement",code:"custom"}].concat(Object(d.a)(t))),m=c?Da.a(W.a("code",l))(u).display:"",h=c?"Requirement ".concat(m):"Custom ".concat(o," entry"),p=c?Ok[l]:bk[o],b=c?"idCardPhoto"===l||"frontCamera"===l:"file"===o||"image"===o;return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Yo.a,{display:"flex",alignItems:"center",children:Object(ze.jsx)(Xe,{children:h})}),s&&Object(ze.jsx)(Pr,{fullWidth:!0,label:"Available requests",className:r.picker,getOptionSelected:Aa.a("code"),labelProp:"display",options:a,onChange:function(e,t){}}),Object(ze.jsx)("div",{className:r.field,children:!b&&!s&&p.options.map((function(e){var t=e.label,n=e.name;return Object(ze.jsx)(un.b,{name:n,label:t,component:oi,width:390})}))}),b&&Object(ze.jsx)(IN,{type:c?l:o})]})},bk={text:{schema:hk,options:[{label:"Data entry title",name:"title"},{label:"Data entry",name:"data"}],Component:pk,initialValues:{data:"",title:""},saveType:"customEntry"},file:{schema:uk,options:sk,Component:pk,initialValues:{file:null,title:""},saveType:"customEntryUpload"},image:{schema:mk,options:sk,Component:pk,initialValues:{image:null,title:""},saveType:"customEntryUpload"}},fk={schema:dk,options:ok,Component:function(e){e.customInfoRequirementOptions;var t=ek(),n=Object(un.f)().values,a=n.entryType===tk,r=n.entryType===nk;return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Yo.a,{display:"flex",alignItems:"center",children:Object(ze.jsx)(Xe,{children:"Type of entry"})}),Object(ze.jsx)(un.b,{component:ri,name:"entryType",options:ok,labelClassName:t.specialLabel,radioClassName:t.radio,className:I()(t.radioGroup,t.specialGrid)}),a&&Object(ze.jsxs)("div",{children:[Object(ze.jsx)(Yo.a,{display:"flex",alignItems:"center",children:Object(ze.jsx)(Xe,{children:"Type of data"})}),Object(ze.jsx)(un.b,{component:ri,name:"dataType",options:lk,labelClassName:t.label,radioClassName:t.radio,className:I()(t.radioGroup,t.specialGrid)})]}),r&&Object(ze.jsxs)("div",{children:[Object(ze.jsx)(Yo.a,{display:"flex",alignItems:"center",children:Object(ze.jsx)(Xe,{children:"Requirements"})}),Object(ze.jsx)(un.b,{component:ri,name:"requirement",options:ck,labelClassName:t.label,radioClassName:t.radio,className:I()(t.radioGroup,t.specialGrid)})]})]})},initialValues:{entryType:""}},jk={idCardData:[{name:"firstName",label:"First name",component:oi,editable:!0},{name:"documentNumber",label:"ID number",component:oi,editable:!0},{name:"dateOfBirth",label:"Birthdate",component:oi,editable:!0},{name:"gender",label:"Gender",component:oi,editable:!0},{name:"lastName",label:"Last name",component:oi,editable:!0},{name:"expirationDate",label:"Expiration Date",component:oi,editable:!0},{name:"country",label:"Country",component:oi,editable:!0}],usSsn:[{name:"usSsn",label:"US SSN",component:oi,size:190,editable:!0}],idCardPhoto:[{name:"idCardPhoto"}],frontCamera:[{name:"frontCamera"}]},gk={idCardData:fn.f().shape({firstName:fn.h().required(),lastName:fn.h().required(),documentNumber:fn.h().required(),dateOfBirth:fn.h().test({test:function(e){return Object(YC.a)(Object(Tf.a)(new Date,"yyyy-MM-dd",e))}}).required(),gender:fn.h().required(),country:fn.h().required(),expirationDate:fn.h().test({test:function(e){return Object(YC.a)(Object(Tf.a)(new Date,"yyyy-MM-dd",e))}}).required()}),usSsn:fn.f().shape({usSsn:fn.h().required()}),idCardPhoto:fn.f().shape({idCardPhoto:fn.d().required()}),frontCamera:fn.f().shape({frontCamera:fn.d().required()})},Ok={idCardData:{schema:gk.idCardData,options:jk.idCardData,Component:pk,initialValues:{firstName:"",lastName:"",documentNumber:"",dateOfBirth:"",gender:"",country:"",expirationDate:""},saveType:"customerData"},usSsn:{schema:gk.usSsn,options:jk.usSsn,Component:pk,initialValues:{usSsn:""},saveType:"customerData"},idCardPhoto:{schema:gk.idCardPhoto,options:jk.idCardPhoto,Component:pk,initialValues:{idCardPhoto:null},saveType:"customerDataUpload"},frontCamera:{schema:gk.frontCamera,options:jk.frontCamera,Component:pk,initialValues:{frontCamera:null},saveType:"customerDataUpload"},custom:{Component:pk,initialValues:{customInfoRequirement:null},saveType:"customInfoRequirement"}},xk=function(e){return R.a((function(t){return e[t]=Object(od.a)("yyyyMMdd")(Object(Tf.a)(new Date,"yyyy-MM-dd",e[t]))}))(["dateOfBirth","expirationDate"]),e},vk=R.a((function(e){return ll.a("id")(e)?Object(s.a)(Object(s.a)({},e),{},{photoDir:"operator-data/customersphotos"}):Object(s.a)(Object(s.a)({},e),{},{photoDir:"front-camera-photo"})})),yk=R.a(L.a(Hc.a,R.a((function(e){var t=Object(l.a)(e,2),n=t[0],a=t[1];return"txCustomerPhotoPath"===n||"frontCameraPath"===n?["path",a]:"txCustomerPhotoAt"===n||"frontCameraAt"===n?["date",a]:e})),Uc.a)),wk=M.a((function(e){return!D.a(e.date)&&!D.a(e.path)})),Ck=L.a(wk,vk,yk),kk={stepper:{margin:[[16,0,14,0]]},submit:{display:"flex",flexDirection:"row",margin:[["auto",0,24]]},button:{marginLeft:"auto"},form:{height:"100%",display:"flex",flexDirection:"column"},infoTitle:{margin:[[18,0,20,0]]},infoCurrentText:{color:$},blankSpace:{padding:[[0,30]],margin:[[0,4,0,2]],borderBottom:"1px solid ".concat($),display:"inline-block"},dropdownField:{marginTop:16,minWidth:155}},Ek=Object(f.a)(kk),Nk=function(e){var t=e.onClose,n=e.save,r=e.error,i=e.customInfoRequirementOptions,o=e.addCustomerData,c=e.addPhoto,d=Ek(),u=Object(a.useState)(null),m=Object(l.a)(u,2),h=m[0],p=m[1],b=Object(a.useState)({step:1}),f=Object(l.a)(b,2),j=f[0],g=j.step,O=j.config,x=f[1],v=function(e,t){return"idCardData"===(null===(n=t)||void 0===n?void 0:n.requirement)?Object(z.a)({},t.requirement,xk(e)):e;var n},y=2===g,w=function(e,t){var n=(null===t||void 0===t?void 0:t.entryType)!==nk||D.a(null===t||void 0===t?void 0:t.requirement)?bk[null===t||void 0===t?void 0:t.dataType]:Ok[null===t||void 0===t?void 0:t.requirement];switch(e){case 1:return fk;case 2:return n;default:return a.Fragment}}(g,h),C=function(){var e=Object(Rl.a)(Dl.a.mark((function e(t){var a;return Dl.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=$n.a(O,w.schema.cast(t)),p(a),!y){e.next=11;break}e.t0=w.saveType,e.next="customerData"===e.t0?6:"customerDataUpload"===e.t0?7:"customEntry"===e.t0?8:"customInfoRequirement"===e.t0?9:10;break;case 6:return e.abrupt("return",o(v(t,a)));case 7:return e.abrupt("return",c({newPhoto:Rf.a(bd.a(t)),photoType:Rf.a(qc.a(t))}));case 8:return e.abrupt("return",n(a));case 9:return e.abrupt("return");case 10:return e.abrupt("break",11);case 11:x({step:g+1,config:a});case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(ze.jsx)(ze.Fragment,{children:Object(ze.jsxs)(Qh,{title:"Manual data entry",handleClose:t,width:520,height:520,open:!0,children:[Object(ze.jsx)(pp,{className:d.stepper,steps:2,currentStep:g}),Object(ze.jsx)(un.e,{validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,onSubmit:C,initialValues:w.initialValues,validationSchema:w.schema,children:Object(ze.jsxs)(un.d,{className:d.form,children:[Object(ze.jsx)(w.Component,Object(s.a)({selectedValues:h,customInfoRequirementOptions:i},w.props)),Object(ze.jsxs)("div",{className:d.submit,children:[r&&Object(ze.jsx)(tl,{children:"Failed to save"}),Object(ze.jsx)(Dn,{className:d.button,type:"submit",children:y?"Add Data":"Next"})]})]})})]})})},Sk={titleWrapper:xf.titleWrapper,titleAndButtonsContainer:xf.titleAndButtonsContainer,row:{display:"flex",flexFlow:"row nowrap"},rowSpaceBetween:{display:"flex",flexFlow:"row nowrap",alignItems:"center",justifyContent:"space-between"},column:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-between"},textInput:{width:144},p:{fontFamily:"MuseoSans",fontSize:ye,fontWeight:500,fontStretch:"normal",fontStyle:"normal",lineHeight:1.14,letterSpacing:"normal",color:J},txId:{fontFamily:"MuseoSans",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},txClassIconLeft:{marginRight:11},txClassIconRight:{marginLeft:11},headerLabels:{display:"flex",flexDirection:"row","& div":{display:"flex",alignItems:"center"},"& > div:first-child":{marginRight:24},"& span":{extend:Ae.label1,marginLeft:6}},photo:{width:92,height:92,borderRadius:8,backgroundColor:G,margin:[[0,28,0,0]],alignItems:"center",justifyContent:"center",display:"flex"},img:{width:80},customerName:{marginBottom:32},icon:{marginRight:11},name:{display:"flex",flexDirection:"row",alignItems:"center"},value:{height:16},label:{marginBottom:4,color:$},txSummaryValue:{height:16,marginRight:25},txSummaryLabel:{marginBottom:4,color:$,marginRight:25},idIcon:{marginRight:10},subpageButton:{marginLeft:16},txTableSpacing:{marginTop:40}},Ik=n(285),Fk=Object(f.a)({closeButton:{display:"flex",padding:[[16,16,0,16]],paddingRight:12,justifyContent:"end"},title:{margin:[[0,16,8,20]]}}),Lk=Object(a.memo)((function(e){var t=e.title,n=void 0===t?"":t,a=e.open,r=e.onDissmised,i=(e.disabled,e.data),o=Object(q.a)(e,["title","open","onDissmised","disabled","data"]),l=Fk();return Object(ze.jsxs)(ln.a,Object(s.a)(Object(s.a)({PaperProps:{style:{borderRadius:8}},fullWidth:!0,open:a,"aria-labelledby":"form-dialog-title"},o),{},{children:[Object(ze.jsx)("div",{className:l.closeButton,children:Object(ze.jsx)(Qn,{size:16,"aria-label":"close",onClick:function(){r()},children:Object(ze.jsx)(Mi,{})})}),Object(ze.jsx)(Ve,{className:l.title,children:n}),Object(ze.jsx)(cn.a,{className:l.dialogContent,children:i})]}))})),Pk={photo:{width:135,height:135,borderRadius:8,backgroundColor:G,margin:[[0,28,0,0]],alignItems:"center",justifyContent:"center",display:"flex"},img:{objectFit:"cover",objectPosition:"center",width:135,height:135},container:{position:"relative","& > img":{display:"block"},"& > circle":{position:"absolute",top:"0",right:"0",marginRight:5,marginTop:5}},circle:{background:ae,borderRadius:"50%",width:25,height:25,alignItems:"center",justifyContent:"center",display:"flex"}},Dk=n(456),Rk=n.n(Dk);function Tk(){return(Tk=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Ak=a.createElement("g",{id:"Symbols",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("polygon",{id:"Simple-Arrow-White",fill:"#1b2559",fillRule:"nonzero",points:"12.1912718 1.56064837 10.8306233 0.395663059 0.196798664 16.2200463 10.8250965 32.3956631 12.1967987 31.2473125 2.33241023 16.233075"}));function Mk(e,t){var n=e.title,r=e.titleId,i=Bk(e,["title","titleId"]);return a.createElement("svg",Tk({width:"13px",height:"33px",viewBox:"0 0 13 33",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,Ak)}var Wk=a.forwardRef(Mk);n.p;function zk(){return(zk=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var $k=a.createElement("g",{id:"Symbols",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"Group-2-Copy",transform:"translate(1.000000, 1.000000)",stroke:"#1b2559",strokeWidth:2},a.createElement("polyline",{id:"Path-4-Copy",points:"0 0 12 15.8202247 0 32"})));function Hk(e,t){var n=e.title,r=e.titleId,i=qk(e,["title","titleId"]);return a.createElement("svg",zk({width:"15px",height:"34px",viewBox:"0 0 15 34",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,$k)}var Vk=a.forwardRef(Hk),Uk=(n.p,Object(f.a)({imgWrapper:{alignItems:"center",justifyContent:"center",display:"flex"},imgInner:{objectFit:"cover",objectPosition:"center",width:500,marginBottom:40}})),Gk=Object(a.memo)((function(e){var t=e.photosData,n=e.slidePhoto,a=Uk();return Object(ze.jsx)(ze.Fragment,{children:Object(ze.jsx)(Rk.a,{PrevIcon:Object(ze.jsx)(Wk,{}),NextIcon:Object(ze.jsx)(Vk,{}),navButtonsProps:{style:{backgroundColor:"transparent",borderRadius:0,color:"transparent",opacity:1}},navButtonsWrapperProps:{style:{marginLeft:-22,marginRight:-22}},autoPlay:!1,indicators:!1,navButtonsAlwaysVisible:!0,next:function(e){return n(e)},prev:function(e){return n(e)},children:t.map((function(e,t){return Object(ze.jsx)("div",{children:Object(ze.jsx)("div",{className:a.imgWrapper,children:Object(ze.jsx)("img",{className:a.imgInner,src:"".concat(Wj,"/").concat(null===e||void 0===e?void 0:e.photoDir,"/").concat(null===e||void 0===e?void 0:e.path),alt:""})})})}))})})})),Xk={label:{color:se,margin:[[0,0,6,0]]},firstRow:{padding:[[8]],display:"flex",flexDirection:"column"},secondRow:{extend:Ae.p,display:"flex",padding:[[8]],"& > div":{display:"flex",flexDirection:"column","& > div":{height:37,marginBottom:15,marginRight:55}}}},_k=Object(f.a)(Xk),Kk=Object(a.memo)((function(e){var t,n,r=e.photosData,i=_k(),o=Object(a.useState)(0),c=Object(l.a)(o,2),s=c[0],d=c[1],u=function(e){var t=e.children,n=_k();return Object(ze.jsx)(nt,{className:n.label,children:t})},m=!ll.a("id")(r[s]);return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Gk,{photosData:r,slidePhoto:function(e){return d(e)}}),!m&&Object(ze.jsxs)("div",{className:i.firstRow,children:[Object(ze.jsx)(u,{children:"Session ID"}),Object(ze.jsx)(Nf,{children:r&&(null===(t=r[s])||void 0===t?void 0:t.id)})]}),Object(ze.jsxs)("div",{className:i.secondRow,children:[Object(ze.jsx)("div",{children:Object(ze.jsxs)("div",{children:[Object(ze.jsx)(u,{children:"Date"}),Object(ze.jsx)("div",{children:r&&(null===(n=r[s])||void 0===n?void 0:n.date)})]})}),Object(ze.jsxs)("div",{children:[Object(ze.jsx)(u,{children:"Taken by"}),Object(ze.jsx)("div",{children:m?"Compliance scan":"Acceptance of T&C"})]})]})]})})),Zk=Object(f.a)(Pk),Qk=Object(a.memo)((function(e){var t=e.photosData,n=Zk(),r=Object(a.useState)(!1),i=Object(l.a)(r,2),o=i[0],c=i[1],s=Rf.a(t);return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(fm.a,{className:n.photo,elevation:0,children:Object(ze.jsx)(Ik.a,{disabled:!s,className:n.button,onClick:function(){c(!0)},children:s?Object(ze.jsxs)("div",{className:n.container,children:[Object(ze.jsx)("img",{className:n.img,src:"".concat(Wj,"/").concat(s.photoDir,"/").concat(s.path),alt:""}),Object(ze.jsx)("circle",{className:n.circle,children:Object(ze.jsx)("div",{children:Object(ze.jsx)(Qe,{children:t.length})})})]}):Object(ze.jsx)(VC,{})})}),Object(ze.jsx)(Lk,{open:o,title:"Photo roll",data:Object(ze.jsx)(Kk,{photosData:t}),onDissmised:function(){c(!1)}})]})})),Yk=Object(f.a)(Sk),Jk=Object(a.memo)((function(e){var t=e.customer,n=e.photosData,a=e.locale,r=Yk(),i=A.a(["idCardData","documentNumber"])(t),o=A.a(["usSsn"])(t),l=[{header:"Phone number",size:172,value:rk(t.phone,a.country)}];i&&l.push({header:"ID number",size:172,value:i}),o&&l.push({header:"US SSN",size:127,value:o});var c=ik(t);return Object(ze.jsxs)(Yo.a,{display:"flex",children:[Object(ze.jsx)(Qk,{photosData:n}),Object(ze.jsxs)(Yo.a,{display:"flex",flexDirection:"column",children:[Object(ze.jsxs)("div",{className:r.name,children:[Object(ze.jsx)(Zf,{className:r.idIcon}),Object(ze.jsx)(Ue,{noMargin:!0,children:c.length?c:rk(A.a(["phone"])(t),a.country)})]}),Object(ze.jsx)(Yo.a,{display:"flex",mt:"auto",children:l.map((function(e,t){var n=e.size,a=e.header;return Object(ze.jsx)(nt,{noMargin:!0,className:r.label,style:{width:n},children:a},t)}))}),Object(ze.jsx)(Yo.a,{display:"flex",children:l.map((function(e,t){var n=e.size,a=e.value;return Object(ze.jsx)(Ke,{noMargin:!0,className:r.value,style:{width:n},children:a},t)}))})]})]})}));function eE(){return(eE=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var nE=a.createElement("g",{id:"icon/customer-nav/data/comet",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("path",{d:"M19,5 L19,10 C19,12.209139 14.9705627,14 10,14 C5.12689927,14 1.1537547,12.1492238 1,10 L1.00462428,5",id:"Path-Copy-3",stroke:"#5F668A",strokeWidth:2}),a.createElement("path",{d:"M19,10 L19,15 C19,17.209139 14.9705627,19 10,19 C5.12689927,19 1.1537547,17.1492238 1,15 L1.00462428,10",id:"Path-Copy-3",stroke:"#5F668A",strokeWidth:2}),a.createElement("ellipse",{id:"Oval-Copy-3",stroke:"#5F668A",strokeWidth:2,cx:10,cy:5,rx:9,ry:4}));function aE(e,t){var n=e.title,r=e.titleId,i=tE(e,["title","titleId"]);return a.createElement("svg",eE({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,nE)}var rE=a.forwardRef(aE);n.p;function iE(){return(iE=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var lE=a.createElement("g",{id:"icon/customer-nav/data/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("path",{d:"M19,5 L19,10 C19,12.209139 14.9705627,14 10,14 C5.12689927,14 1.1537547,12.1492238 1,10 L1.00462428,5",id:"Path-Copy-3",stroke:"#FFFFFF",strokeWidth:2}),a.createElement("path",{d:"M19,10 L19,15 C19,17.209139 14.9705627,19 10,19 C5.12689927,19 1.1537547,17.1492238 1,15 L1.00462428,10",id:"Path-Copy-3",stroke:"#FFFFFF",strokeWidth:2}),a.createElement("ellipse",{id:"Oval-Copy-3",stroke:"#FFFFFF",strokeWidth:2,cx:10,cy:5,rx:9,ry:4}));function cE(e,t){var n=e.title,r=e.titleId,i=oE(e,["title","titleId"]);return a.createElement("svg",iE({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,lE)}var sE=a.forwardRef(cE);n.p;function dE(){return(dE=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var mE=a.createElement("g",{id:"icon/customer-nav/note/comet",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("path",{d:"M18,1 C18.2761424,1 18.5261424,1.11192881 18.7071068,1.29289322 C18.8880712,1.47385763 19,1.72385763 19,2 L19,2 L19,18 C19,18.2761424 18.8880712,18.5261424 18.7071068,18.7071068 C18.5261424,18.8880712 18.2761424,19 18,19 L18,19 L2,19 C1.72385763,19 1.47385763,18.8880712 1.29289322,18.7071068 C1.11192881,18.5261424 1,18.2761424 1,18 L1,18 L1,2 C1,1.72385763 1.11192881,1.47385763 1.29289322,1.29289322 C1.47385763,1.11192881 1.72385763,1 2,1 L2,1 Z",id:"Rectangle",stroke:"#5F668A",strokeWidth:2}),a.createElement("line",{x1:5,y1:5,x2:15,y2:5,id:"Line-4",stroke:"#5F668A",strokeWidth:2,strokeLinecap:"round"}),a.createElement("line",{x1:5,y1:13,x2:10,y2:13,id:"Line-4-Copy",stroke:"#5F668A",strokeWidth:2,strokeLinecap:"round"}),a.createElement("line",{x1:5,y1:9,x2:15,y2:9,id:"Line-4",stroke:"#5F668A",strokeWidth:2,strokeLinecap:"round"}));function hE(e,t){var n=e.title,r=e.titleId,i=uE(e,["title","titleId"]);return a.createElement("svg",dE({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,mE)}var pE=a.forwardRef(hE);n.p;function bE(){return(bE=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var jE=a.createElement("g",{id:"icon/customer-nav/note/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("path",{d:"M18,1 C18.2761424,1 18.5261424,1.11192881 18.7071068,1.29289322 C18.8880712,1.47385763 19,1.72385763 19,2 L19,2 L19,18 C19,18.2761424 18.8880712,18.5261424 18.7071068,18.7071068 C18.5261424,18.8880712 18.2761424,19 18,19 L18,19 L2,19 C1.72385763,19 1.47385763,18.8880712 1.29289322,18.7071068 C1.11192881,18.5261424 1,18.2761424 1,18 L1,18 L1,2 C1,1.72385763 1.11192881,1.47385763 1.29289322,1.29289322 C1.47385763,1.11192881 1.72385763,1 2,1 L2,1 Z",id:"Rectangle",stroke:"#FFFFFF",strokeWidth:2}),a.createElement("line",{x1:5,y1:5,x2:15,y2:5,id:"Line-4",stroke:"#FFFFFF",strokeWidth:2,strokeLinecap:"round"}),a.createElement("line",{x1:5,y1:13,x2:10,y2:13,id:"Line-4-Copy",stroke:"#FFFFFF",strokeWidth:2,strokeLinecap:"round"}),a.createElement("line",{x1:5,y1:9,x2:15,y2:9,id:"Line-4",stroke:"#FFFFFF",strokeWidth:2,strokeLinecap:"round"}));function gE(e,t){var n=e.title,r=e.titleId,i=fE(e,["title","titleId"]);return a.createElement("svg",bE({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,jE)}var OE=a.forwardRef(gE);n.p;function xE(){return(xE=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var yE=a.createElement("g",{id:"icon/customer-nav/overview/comet",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("rect",{id:"Rectangle",stroke:"#5F668A",strokeWidth:2,x:1,y:1,width:7,height:7,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-2",stroke:"#5F668A",strokeWidth:2,x:1,y:12,width:7,height:7,rx:2}),a.createElement("rect",{id:"Rectangle-Copy",stroke:"#5F668A",strokeWidth:2,x:12,y:1,width:7,height:7,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-3",stroke:"#5F668A",strokeWidth:2,x:12,y:12,width:7,height:7,rx:2}));function wE(e,t){var n=e.title,r=e.titleId,i=vE(e,["title","titleId"]);return a.createElement("svg",xE({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,yE)}var CE=a.forwardRef(wE);n.p;function kE(){return(kE=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var NE=a.createElement("g",{id:"icon/customer-nav/overview/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("rect",{id:"Rectangle",stroke:"#FFFFFF",strokeWidth:2,x:1,y:1,width:7,height:7,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-2",stroke:"#FFFFFF",strokeWidth:2,x:1,y:12,width:7,height:7,rx:2}),a.createElement("rect",{id:"Rectangle-Copy",stroke:"#FFFFFF",strokeWidth:2,x:12,y:1,width:7,height:7,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-3",stroke:"#FFFFFF",strokeWidth:2,x:12,y:12,width:7,height:7,rx:2}));function SE(e,t){var n=e.title,r=e.titleId,i=EE(e,["title","titleId"]);return a.createElement("svg",kE({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,NE)}var IE=a.forwardRef(SE);n.p;function FE(){return(FE=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var PE=a.createElement("g",{id:"icon/customer-nav/photos/comet",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("rect",{id:"Rectangle",stroke:"#5F668A",strokeWidth:2,x:1,y:1,width:18,height:18,rx:1}),a.createElement("circle",{id:"Oval",stroke:"#5F668A",strokeWidth:2,cx:15,cy:5,r:1}),a.createElement("polyline",{id:"Path",stroke:"#5F668A",strokeWidth:2,strokeLinejoin:"round",points:"1 19 7 13 13 19"}),a.createElement("path",{d:"M13.3333333,14 L18,19 L13.3333333,19 L11,16.5 L13.3333333,14 Z",id:"Combined-Shape",stroke:"#5F668A",strokeWidth:2,strokeLinejoin:"round"}));function DE(e,t){var n=e.title,r=e.titleId,i=LE(e,["title","titleId"]);return a.createElement("svg",FE({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"icon/customer-nav/photos/comet"):n?a.createElement("title",{id:r},n):null,PE)}var RE=a.forwardRef(DE);n.p;function TE(){return(TE=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var AE=a.createElement("g",{id:"icon/customer-nav/photos/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("rect",{id:"Rectangle",stroke:"#FFFFFF",strokeWidth:2,x:1,y:1,width:18,height:18,rx:1}),a.createElement("circle",{id:"Oval",stroke:"#FFFFFF",strokeWidth:2,cx:15,cy:5,r:1}),a.createElement("polyline",{id:"Path",stroke:"#FFFFFF",strokeWidth:2,strokeLinejoin:"round",points:"1 19 7 13 13 19"}),a.createElement("path",{d:"M13.3333333,14 L18,19 L13.3333333,19 L11,16.5 L13.3333333,14 Z",id:"Combined-Shape",stroke:"#FFFFFF",strokeWidth:2,strokeLinejoin:"round"}));function ME(e,t){var n=e.title,r=e.titleId,i=BE(e,["title","titleId"]);return a.createElement("svg",TE({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"icon/customer-nav/photos/white"):n?a.createElement("title",{id:r},n):null,AE)}var WE=a.forwardRef(ME),zE=(n.p,{sidebar:{display:"flex",backgroundColor:"#ebefff",width:219,flexDirection:"column",borderRadius:5},link:{alignItems:"center",display:"flex",extend:Ae.p,position:"relative",color:de,padding:15,cursor:"pointer"},activeLink:{display:"flex",alignItems:"center",extend:Ae.tl2,color:Z,backgroundColor:de,"&:first-child":{borderRadius:[[5,5,0,0]]},"&:last-child":{borderRadius:[[0,0,5,5]]}},icon:{marginRight:15}}),qE=Object(f.a)(zE),$E=function(e){var t=e.isSelected,n=e.onClick,a=qE(),r=[{code:"overview",display:"Overview",Icon:IE,InverseIcon:CE},{code:"customerData",display:"Customer Data",Icon:sE,InverseIcon:rE},{code:"notes",display:"Notes",Icon:OE,InverseIcon:pE},{code:"photos",display:"Photos & files",Icon:WE,InverseIcon:RE}];return Object(ze.jsx)("div",{className:a.sidebar,children:null===r||void 0===r?void 0:r.map((function(e){var r,i=e.Icon,o=e.InverseIcon,l=e.display,c=e.code;return Object(ze.jsxs)("div",{className:I()((r={},Object(z.a)(r,a.activeLink,t(c)),Object(z.a)(r,a.link,!0),r)),onClick:function(){return n(c)},children:[Object(ze.jsx)("div",{className:a.icon,children:t(c)?Object(ze.jsx)(i,{}):Object(ze.jsx)(o,{})}),l]})}))})};n.p;function HE(){return(HE=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var UE=a.createElement("desc",null,"Created with Sketch."),GE=a.createElement("g",{id:"icon/action/edit/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("path",{d:"M1,18 L1,18 C1,19.657 2.343,21 4,21 L18,21 C19.657,21 21,19.657 21,18",id:"Stroke-1",stroke:"#FFFFFF",strokeWidth:2}),a.createElement("polygon",{id:"Stroke-3",stroke:"#FFFFFF",strokeWidth:2,points:"6 12 17 1 21 5 10 16 6 16"}));function XE(e,t){var n=e.title,r=e.titleId,i=VE(e,["title","titleId"]);return a.createElement("svg",HE({width:"22px",height:"22px",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,UE,GE)}var _E=a.forwardRef(XE);n.p;function KE(){return(KE=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var QE=a.createElement("g",{id:"icon/button/replace/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{id:"Group-3",transform:"translate(0.500000, 0.500000)",stroke:"#FFFFFF"},a.createElement("g",{id:"Group-2"},a.createElement("path",{d:"M3.27636475,10.2264084 C2.67216087,9.96069246 2.10487152,9.58126145 1.60869691,9.087544 C-0.521488181,6.9675304 -0.538316861,3.54693703 1.57123953,1.44692357 C1.86137314,1.15837428 2.17625375,0.909794042 2.50930653,0.701182852",id:"Stroke-1"}),a.createElement("polyline",{id:"Stroke-3",points:"3.0943493 1.69429658 3.08837783 0.545717786 1.99994228 0"})),a.createElement("g",{id:"Group-2",transform:"translate(8.999987, 5.500035) scale(-1, -1) translate(-8.999987, -5.500035) translate(6.999974, 0.000000)"},a.createElement("path",{d:"M3.27636475,10.2264084 C2.67216087,9.96069246 2.10487152,9.58126145 1.60869691,9.087544 C-0.521488181,6.9675304 -0.538316861,3.54693703 1.57123953,1.44692357 C1.86137314,1.15837428 2.17625375,0.909794042 2.50930653,0.701182852",id:"Stroke-1"}),a.createElement("polyline",{id:"Stroke-3",points:"3.0943493 1.69429658 3.08837783 0.545717786 1.99994228 3.80623901e-14"}))));function YE(e,t){var n=e.title,r=e.titleId,i=ZE(e,["title","titleId"]);return a.createElement("svg",KE({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,QE)}var JE=a.forwardRef(YE);n.p;function eN(){return(eN=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var nN=a.createElement("desc",null,"Created with Sketch."),aN=a.createElement("defs",null,a.createElement("polygon",{id:"path-1",points:"0 21 21 21 21 0 0 0"})),rN=a.createElement("g",{id:"icon/sf-small/save/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"Group"},a.createElement("polygon",{id:"Stroke-1",stroke:"#FFFFFF",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",points:"20.5 20.5 0.5 20.5 0.5 0.5 16.75 0.5 20.5 4.25"}),a.createElement("mask",{id:"mask-2",fill:"white"},a.createElement("use",{xlinkHref:"#path-1"})),a.createElement("g",{id:"Clip-4"}),a.createElement("polygon",{id:"Stroke-5",stroke:"#FFFFFF",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",mask:"url(#mask-2)",points:"4.25 7.5 16.75 7.5 16.75 0.5 4.25 0.5"}),a.createElement("circle",{id:"Oval",stroke:"#FFFFFF",strokeWidth:2,mask:"url(#mask-2)",cx:11,cy:14,r:3})));function iN(e,t){var n=e.title,r=e.titleId,i=tN(e,["title","titleId"]);return a.createElement("svg",eN({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,nN,aN,rN)}var oN=a.forwardRef(iN),lN=(n.p,{label1:{display:"flex",width:85,justifyContent:"right"},label1Pending:{color:$},label1Rejected:{color:Q},label1Accepted:{color:U},editButton:{marginTop:20,display:"flex",justifyContent:"right"},deleteButton:{marginRight:8},headerWrapper:{display:"flex",flexDirection:"row",justifyContent:"space-between",height:40},editingWrapper:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:20},replace:{marginRight:5},input:{display:"none"},button:{marginRight:5},editingButtons:{display:"flex",justifyContent:"right"},card:{borderRadius:10,marginRight:15,marginBottom:15},cardHeader:{display:"flex",flexDirection:"row",marginBottom:15},editIcon:{marginTop:5},cardIcon:{marginTop:7},cardTitle:{margin:[[8,15,15,15]]}}),cN=Object(f.a)(lN),sN={field:{position:"relative",width:280,height:48,padding:[[0,4,4,0]],marginTop:2},label:{color:$,margin:[[0,0,0,0]]},notEditing:{display:"flex",flexDirection:"column","& > p:first-child":{height:16,lineHeight:"16px",transformOrigin:"left",paddingLeft:0,margin:[[3,0,3,0]]},"& > p:last-child":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",margin:0}},editing:{"& > div":{"& > input":{padding:0,fontSize:14}}},readOnlyLabel:{color:$,margin:[[3,0,3,0]]},readOnlyValue:{margin:0}},dN=Object(f.a)(sN),uN=function(e){var t,n=e.editing,a=e.field,r=e.value,i=e.size,o=Object(q.a)(e,["editing","field","value","size"]),l=dN(),c=(t={},Object(z.a)(t,l.field,!0),Object(z.a)(t,l.notEditing,!n),t);return Object(ze.jsxs)("div",{className:I()(c),children:[!n&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(nt,{className:l.label,children:a.label}),Object(ze.jsx)(Ke,{children:r})]}),n&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(nt,{className:l.label,children:a.label}),Object(ze.jsx)(un.b,Object(s.a)({className:l.editing,id:a.name,name:a.name,component:a.component,type:a.type,width:i},o))]})]})},mN=function(e){var t,n=e.field,a=e.value,r=(Object(q.a)(e,["field","value"]),dN()),i=(t={},Object(z.a)(t,r.field,!0),Object(z.a)(t,r.notEditing,!0),t);return Object(ze.jsx)(ze.Fragment,{children:Object(ze.jsxs)("div",{className:I()(i),children:[Object(ze.jsx)(nt,{className:r.readOnlyLabel,children:n.label}),Object(ze.jsx)(Ke,{className:r.readOnlyValue,children:a})]})})},hN=function(e){var t,n=e.fields,r=e.save,i=e.authorize,o=e.hasImage,c=e.reject,s=e.state,d=e.title,u=e.titleIcon,m=e.children,p=e.validationSchema,b=e.initialValues,f=(e.deleteEditedData,e.retrieveAdditionalData),j=e.hasAdditionalData,g=void 0===j||j,O=cN(),x=Object(a.useState)(!1),v=Object(l.a)(x,2),y=v[0],w=v[1],C=Object(a.useState)(null),k=Object(l.a)(C,2),E=k[0],N=k[1],S=Object(a.useState)(null),F=Object(l.a)(S,2),L=F[0],P=F[1],D=(t={},Object(z.a)(t,O.label1,!0),Object(z.a)(t,O.label1Pending,s===Vw),Object(z.a)(t,O.label1Rejected,s===Gw),Object(z.a)(t,O.label1Accepted,s===Uw),t),R=s===Vw?{label:"Pending",type:"neutral"}:s===Gw?{label:"Rejected",type:"error"}:{label:"Accepted",type:"success"};return Object(ze.jsx)("div",{children:Object(ze.jsx)(fm.a,{className:O.card,children:Object(ze.jsxs)(jm.a,{children:[Object(ze.jsxs)("div",{className:O.headerWrapper,children:[Object(ze.jsxs)("div",{className:O.cardHeader,children:[u,Object(ze.jsx)(Ge,{className:O.cardTitle,children:d})]}),s&&i&&Object(ze.jsx)("div",{className:I()(D),children:Object(ze.jsx)(Wu,{statuses:[R]})})]}),m,Object(ze.jsx)(un.e,{validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,validationSchema:p,initialValues:b,onSubmit:function(e){r(e),w(!1)},onReset:function(){w(!1),P(!1)},children:function(e){var t=e.setFieldValue;return Object(ze.jsxs)(un.d,{children:[Object(ze.jsx)(bm,{}),Object(ze.jsx)("div",{className:O.row,children:Object(ze.jsxs)(h.a,{container:!0,children:[Object(ze.jsx)(h.a,{container:!0,direction:"column",item:!0,xs:6,children:!o&&(null===n||void 0===n?void 0:n.map((function(e,t){return t>=0&&t<4?e.editable?Object(ze.jsx)(uN,{field:e,value:b[e.name],editing:y,size:180}):Object(ze.jsx)(mN,{field:e,value:b[e.name]}):null})))}),Object(ze.jsx)(h.a,{container:!0,direction:"column",item:!0,xs:6,children:!o&&(null===n||void 0===n?void 0:n.map((function(e,t){return t>=4?e.editable?Object(ze.jsx)(uN,{field:e,value:b[e.name],editing:y,size:180}):Object(ze.jsx)(mN,{field:e,value:b[e.name]}):null})))})]})}),Object(ze.jsxs)("div",{className:O.edit,children:[!y&&Object(ze.jsxs)("div",{className:O.editButton,children:[Object(ze.jsxs)("div",{className:O.deleteButton,children:[!1,!g&&Object(ze.jsx)($e,{color:"primary",type:"button",Icon:pC,InverseIcon:sC,onClick:function(){return f()},children:"Retrieve API data"})]}),Object(ze.jsx)($e,{color:"primary",Icon:Ph,InverseIcon:_E,onClick:function(){return w(!0)},children:"Edit"})]}),y&&Object(ze.jsxs)("div",{className:O.editingWrapper,children:[Object(ze.jsx)("div",{className:O.replace,children:o&&Object(ze.jsx)($e,{color:"secondary",type:"button",Icon:JE,InverseIcon:JE,onClick:function(){return E.click()},children:Object(ze.jsxs)("div",{children:[Object(ze.jsx)("input",{type:"file",alt:"",accept:"image/*",className:O.input,ref:function(e){return N(e)},onChange:function(e){var a=Rf.a(e.target.files);a&&t(Rf.a(n).name,a)}}),"Replace"]})})}),Object(ze.jsxs)("div",{className:O.editingButtons,children:[n&&Object(ze.jsx)("div",{className:O.button,children:Object(ze.jsx)($e,{color:"secondary",Icon:oN,InverseIcon:oN,type:"submit",children:"Save"})}),Object(ze.jsx)("div",{className:O.button,children:Object(ze.jsx)($e,{color:"secondary",Icon:ua,InverseIcon:ua,type:"reset",children:"Cancel"})}),i&&"Accepted"!==R.label&&Object(ze.jsx)("div",{className:O.button,children:Object(ze.jsx)($e,{color:"spring",type:"button",Icon:Bw,InverseIcon:Bw,onClick:function(){return i()},children:"Authorize"})}),i&&"Rejected"!==R.label&&Object(ze.jsx)($e,{color:"tomato",type:"button",Icon:Yw,InverseIcon:Yw,onClick:function(){return c()},children:"Reject"}),L&&Object(ze.jsx)(tl,{children:"Failed to save changes"})]})]})]})]})}})]})})})},pN=(Object(f.a)({field:{height:46},label:{color:$,margin:[[0,3]]},value:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",margin:0,paddingLeft:4}}),function(e,t){return D.a(e)?"":t}),bN=Object(f.a)(Sk),fN=function(e){var t,n,a=e.customer,r=e.data,i=e.loading,o=e.locale,l=bN(),c="cashOut"===a.lastTxClass?Ac:Fc,s=!(Ta.a(r)||D.a(r)),d=o.timezone,u=(t={},Object(z.a)(t,l.titleAndButtonsContainer,i||!i&&!s),Object(z.a)(t,l.txTableSpacing,!i&&s),t),m=[{header:"Transactions",size:127,value:pN(a.totalTxs,"".concat(Number.parseInt(a.totalTxs)))},{header:"Transaction volume",size:167,value:pN(a.totalSpent,"".concat(Number.parseFloat(a.totalSpent)," ").concat(a.lastTxFiatCode))},{header:"Last active",size:142,value:!D.a(d)&&(null!==(n=a.lastActive&&sd(a.lastActive,d,"yyyy-MM-dd"))&&void 0!==n?n:"")},{header:"Last transaction",size:198,value:pN(a.lastTxFiat,Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(c,{className:l.icon}),"".concat(Number.parseFloat(a.lastTxFiat)," \n ").concat(a.lastTxFiatCode)]}))}],h=[{width:40,view:function(e){return Object(ze.jsx)(ze.Fragment,{children:"cashOut"===e.txClass?Object(ze.jsx)(Ac,{className:l.txClassIconLeft}):Object(ze.jsx)(Fc,{className:l.txClassIconLeft})})}},{header:"Machine",width:160,view:A.a(["machineName"])},{header:"Transaction ID",width:145,view:function(e){return Object(ze.jsx)(Nf,{className:l.txId,children:e.id})}},{header:"Cash",width:155,textAlign:"right",view:function(e){return Object(ze.jsxs)(ze.Fragment,{children:["".concat(Number.parseFloat(e.fiat)," "),Object(ze.jsx)(at,{inline:!0,children:e.fiatCode})]})}},{header:"Crypto",width:145,textAlign:"right",view:function(e){return Object(ze.jsxs)(ze.Fragment,{children:["".concat(Lf.utils.toUnit(new zc.a(e.cryptoAtoms),e.cryptoCode).toFormat(5)," "),Object(ze.jsx)(at,{inline:!0,children:e.cryptoCode})]})}},{header:"Date",width:100,view:function(e){return sd(e.created,d,"yyyy-MM-dd")}},{header:"Time (h:m:s)",width:130,view:function(e){return sd(e.created,d,"HH:mm:ss")}}];return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Ge,{children:"Transactions"}),Object(ze.jsxs)(Yo.a,{display:"flex",flexDirection:"column",children:[Object(ze.jsx)(Yo.a,{display:"flex",mt:"auto",children:m.map((function(e,t){var n=e.size,a=e.header;return Object(ze.jsx)(nt,{noMargin:!0,className:l.txSummaryLabel,style:{width:n},children:a},t)}))}),Object(ze.jsx)(Yo.a,{display:"flex",children:m.map((function(e,t){var n=e.size,a=e.value;return Object(ze.jsx)(Ke,{noMargin:!0,className:l.txSummaryValue,style:{width:n},children:a},t)}))})]}),Object(ze.jsx)("div",{className:l.titleWrapper,children:Object(ze.jsx)("div",{className:I()(u),children:i?Object(ze.jsx)(Xe,{children:"Loading"}):s?"":Object(ze.jsx)(Xe,{children:"No transactions so far"})})}),s&&Object(ze.jsx)(vy,{elements:h,data:r})]})},jN=n(460);function gN(){return(gN=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var xN=a.createElement("g",{id:"icon/button/photo/zodiac-resized",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"Group-2"},a.createElement("g",{id:"Group",transform:"translate(11.666667, 8.333333) scale(-1, 1) translate(-11.666667, -8.333333) translate(3.333333, 0.000000)",stroke:"#1B2559"},a.createElement("rect",{id:"Rectangle-Copy",x:.5,y:.5,width:15.6666667,height:15.6666667,rx:1}),a.createElement("circle",{id:"Oval-Copy",fill:"#1B2559",cx:12.5,cy:4.16666667,r:1}),a.createElement("g",{id:"Group-14",transform:"translate(0.775621, 9.722222)",strokeLinejoin:"round"},a.createElement("polyline",{id:"Path-Copy-2",points:"0 4.58204149 5.10673153 0 11.6154223 6.31150113"}),a.createElement("polyline",{id:"Path",points:"9.02830015 3.23981481 11.3158819 0.925925926 15.0663146 4.81868037"}))),a.createElement("g",{id:"Group-9",transform:"translate(0.000000, 6.666667)"},a.createElement("circle",{id:"Oval",stroke:"#1B2559",fill:"#EBEFFF",cx:6.66666667,cy:6.66666667,r:6.16666667}),a.createElement("polygon",{id:"Path",fill:"#1B2559",fillRule:"nonzero",points:"7.22222222 6.11111111 10 6.11111111 10 7.22222222 7.22222222 7.22222222 7.22222222 10 6.11111111 10 6.11111111 7.22222222 3.33333333 7.22222222 3.33333333 6.11111111 6.11111111 6.11111111 6.11111111 3.33333333 7.22222222 3.33333333"}))));function vN(e,t){var n=e.title,r=e.titleId,i=ON(e,["title","titleId"]);return a.createElement("svg",gN({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,xN)}var yN=a.forwardRef(vN);n.p;function wN(){return(wN=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var kN=a.createElement("g",{id:"icon/button/upload-file/zodiac-resized",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"Add-File-Icon",transform:"translate(0.000000, 0.500000)"},a.createElement("g",{id:"file-icon",transform:"translate(5.934783, 0.000000)",stroke:"#1B2559"},a.createElement("g",{id:"lines",transform:"translate(3.130435, 7.826087)",strokeLinecap:"round"},a.createElement("line",{x1:0,y1:7.04347826,x2:7.82608696,y2:7.04347826,id:"line-3"}),a.createElement("line",{x1:0,y1:3.91304348,x2:7.82608696,y2:3.91304348,id:"line-2"}),a.createElement("line",{x1:0,y1:.782608696,x2:5.47826087,y2:.782608696,id:"line-1"})),a.createElement("polygon",{id:"paper",strokeLinecap:"round",strokeLinejoin:"round",points:"13.5652174 18.6521739 0 18.6521739 -1.18243096e-12 0 8.47826087 2.91569667e-12 13.5652174 5.08695652"}),a.createElement("polygon",{id:"fold",strokeLinejoin:"round",points:"8.47826087 0 8.47826087 5.08695652 13.5652174 5.08695652"})),a.createElement("g",{id:"plus-sign",transform:"translate(0.000000, 5.934783)"},a.createElement("circle",{id:"Oval",stroke:"#1B2559",fill:"#EBEFFF",cx:6.7826087,cy:6.7826087,r:6.2826087}),a.createElement("polygon",{id:"Path",fill:"#1B2559",fillRule:"nonzero",points:"7.34782609 6.2173913 10.173913 6.2173913 10.173913 7.34782609 7.34782609 7.34782609 7.34782609 10.173913 6.2173913 10.173913 6.2173913 7.34782609 3.39130435 7.34782609 3.39130435 6.2173913 6.2173913 6.2173913 6.2173913 3.39130435 7.34782609 3.39130435"}))));function EN(e,t){var n=e.title,r=e.titleId,i=CN(e,["title","titleId"]);return a.createElement("svg",wN({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,kN)}var NN=a.forwardRef(EN),SN=(n.p,Object(f.a)({box:{boxSizing:"border-box",width:450,height:120,borderStyle:"dashed",borderColor:se,borderRadius:4,borderWidth:1,backgroundColor:re,display:"flex",justifyContent:"center"},inputContent:{marginTop:35,display:"flex"},uploadContent:{marginTop:50,display:"flex"},board:{marginTop:40,width:450,height:120},icon:{margin:[[14,20,0,0]]}})),IN=function(e){var t=e.type,n=SN(),r=Object(a.useState)({}),i=Object(l.a)(r,2),o=i[0],c=i[1],d=Object(un.f)().setFieldValue,u="image"===t||"frontCamera"===t||"idCardPhoto"===t,m=Object(a.useCallback)((function(e){d(t,Rf.a(e)),c({preview:u?URL.createObjectURL(Rf.a(e)):Rf.a(e).name})}),[u,t,d]),h=Object(jN.a)({onDrop:m}),p=h.getRootProps,b=h.getInputProps;return Object(ze.jsx)(ze.Fragment,{children:Object(ze.jsxs)("div",Object(s.a)(Object(s.a)({},p()),{},{className:n.board,children:[Ta.a(o)&&Object(ze.jsxs)("div",{className:n.box,children:[Object(ze.jsx)("input",Object(s.a)({},b())),Object(ze.jsxs)("div",{className:n.inputContent,children:[u?Object(ze.jsx)(yN,{className:n.icon}):Object(ze.jsx)(NN,{className:n.icon}),Object(ze.jsx)(rt,{children:"Drag and drop ".concat(u?"an image":"a file"," or click to open the explorer")})]})]}),!Ta.a(o)&&u&&Object(ze.jsx)("div",{children:Object(ze.jsx)("img",{src:o.preview,className:n.box,alt:""})},o.name),!Ta.a(o)&&!u&&Object(ze.jsx)("div",{className:n.box,children:Object(ze.jsx)(Ge,{className:n.uploadContent,children:o.preview})})]}))})},FN=Object(f.a)(QC),LN=function(e){var t=e.show,n=e.src,a=FN({width:165});return Object(ze.jsx)(ze.Fragment,{children:t?Object(ze.jsx)(SC,{src:n,width:165,height:32,popupWidth:360,popupHeight:240}):Object(ze.jsx)("div",{className:a.photoWrapper,children:Object(ze.jsx)(VC,{})})})},PN=function(e){var t=e.setRetrieve,n=e.retrieveAdditionalData,a=e.open,r=e.props,i=FN();return Object(ze.jsxs)(ln.a,Object(s.a)(Object(s.a)({open:a,"aria-labelledby":"form-dialog-title",PaperProps:{style:{borderRadius:8,minWidth:656,bottom:125,right:7}}},r),{},{children:[Object(ze.jsx)("div",{className:i.closeButton,children:Object(ze.jsx)(Qn,{size:16,"aria-label":"close",onClick:function(){return t(!1)},children:Object(ze.jsx)(Mi,{})})}),Object(ze.jsx)(Ue,{className:i.dialogTitle,children:"Retrieve API data from Twilio"}),Object(ze.jsxs)(cn.a,{className:i.dialogContent,children:[Object(ze.jsx)(Ye,{children:"With this action you'll be using Twilio's API to retrieve additional\n data from this user. This includes name and address, if available.\n"}),Object(ze.jsx)(Ye,{children:" There is a small cost from Twilio for each retrieval. Would you like\n to proceed?"})]}),Object(ze.jsxs)(Gm.a,{className:i.dialogActions,children:[Object(ze.jsx)(Dn,{backgroundColor:"grey",className:i.cancelButton,onClick:function(){return t(!1)},children:"Cancel"}),Object(ze.jsx)(Dn,{onClick:function(){n(),t(!1)},children:"Confirm"})]})]}))},DN=function(e){var t,n,r,i,o,c,s,d,u,m,p,b=e.locale,f=e.customer,j=e.updateCustomer,g=e.replacePhoto,O=e.editCustomer,x=e.deleteEditedData,v=e.updateCustomRequest,y=e.authorizeCustomRequest,w=e.updateCustomEntry,C=e.retrieveAdditionalData,k=FN(),E=Object(a.useState)(!1),N=Object(l.a)(E,2),S=N[0],I=(N[1],Object(a.useState)(!1)),F=Object(l.a)(I,2),P=F[0],R=F[1],T=A.a(["idCardData"])(f),B=A.a(["expirationDate"])(T),W=A.a(["dateOfBirth"])(T),q=A.a(["sanctions"])(f),$=A.a(["sanctionsAt"])(f)?q?"Passed":"Failed":"Not checked yet",H=gw.a(L.a(Dv.a,A.a(["customInfoRequest","customRequest","name"]))),V=[],U=[],G=H(null!==(t=A.a(["customInfoRequests"])(f))&&void 0!==t?t:[]),X=A.a(["phone"])(f),_=A.a(["subscriberInfo","result"])(f),K=function(e){return e%2===0},Z=M.a((function(e){return e.isAvailable})),Q={idCardData:{firstName:null!==(n=A.a(["firstName"])(T))&&void 0!==n?n:"",lastName:null!==(r=A.a(["lastName"])(T))&&void 0!==r?r:"",documentNumber:null!==(i=A.a(["documentNumber"])(T))&&void 0!==i?i:"",dateOfBirth:null!==(o=W&&Object(od.a)("yyyy-MM-dd")(Object(Tf.a)(new Date,"yyyyMMdd",W)))&&void 0!==o?o:"",gender:null!==(c=A.a(["gender"])(T))&&void 0!==c?c:"",country:null!==(s=A.a(["country"])(T))&&void 0!==s?s:"",expirationDate:null!==(d=B&&Object(od.a)("yyyy-MM-dd")(Object(Tf.a)(new Date,"yyyyMMdd",B)))&&void 0!==d?d:""},usSsn:{usSsn:null!==(u=f.usSsn)&&void 0!==u?u:""},frontCamera:{frontCamera:null},idCardPhoto:{idCardPhoto:null},smsData:{phoneNumber:rk(X,b.country)}},Y=[{name:"phoneNumber",label:"Phone number",component:oi,editable:!1}],J={smsData:fn.c((function(e){var t,n=cm.a(["phoneNumber"])(e),a=qc.a(n);if(2===pn.a(a))return fn.f().shape((t={},Object(z.a)(t,Rf.a(a),fn.h().required()),Object(z.a)(t,bC.a(a),fn.h().required()),t))}))},ee=[{fields:jk.idCardData,title:"ID Scan",titleIcon:Object(ze.jsx)(DC,{className:k.cardIcon}),state:A.a(["idCardDataOverride"])(f),authorize:function(){return j({idCardDataOverride:Uw})},reject:function(){return j({idCardDataOverride:Gw})},deleteEditedData:function(){return x({idCardData:null})},save:function(e){return O({idCardData:$n.a(T,xk(e))})},validationSchema:gk.idCardData,initialValues:Q.idCardData,isAvailable:!D.a(T)},{fields:Y,title:"SMS data",titleIcon:Object(ze.jsx)(MC,{className:k.cardIcon}),state:A.a(["phoneOverride"])(f),authorize:function(){return j({phoneOverride:Uw})},reject:function(){return j({phoneOverride:Gw})},save:function(e){O({subscriberInfo:{result:$n.a(_,cm.a(["phoneNumber"])(e))}})},validationSchema:J.smsData,retrieveAdditionalData:function(){return R(!0)},initialValues:Q.smsData,isAvailable:!D.a(X),hasAdditionalData:!D.a(_)&&!Ta.a(_)},{title:"Name",titleIcon:Object(ze.jsx)(ZC,{className:k.editIcon}),authorize:function(){},reject:function(){},save:function(){},isAvailable:!1},{title:"Sanctions check",titleIcon:Object(ze.jsx)(ZC,{className:k.editIcon}),state:A.a(["sanctionsOverride"])(f),authorize:function(){return j({sanctionsOverride:Uw})},reject:function(){return j({sanctionsOverride:Gw})},children:Object(ze.jsx)(Ye,{children:$}),isAvailable:!D.a(q)},{fields:jk.frontCamera,title:"Front facing camera",titleIcon:Object(ze.jsx)(ZC,{className:k.editIcon}),state:A.a(["frontCameraOverride"])(f),authorize:function(){return j({frontCameraOverride:Uw})},reject:function(){return j({frontCameraOverride:Gw})},save:function(e){return g({newPhoto:e.frontCamera,photoType:"frontCamera"})},deleteEditedData:function(){return x({frontCamera:null})},children:f.frontCameraPath?Object(ze.jsx)(LN,{show:f.frontCameraPath,src:"".concat(Wj,"/front-camera-photo/").concat(A.a(["frontCameraPath"])(f))}):null,hasImage:!0,validationSchema:gk.frontCamera,initialValues:Q.frontCamera,isAvailable:!D.a(f.frontCameraPath)},{fields:jk.idCardPhoto,title:"ID card image",titleIcon:Object(ze.jsx)(ZC,{className:k.editIcon}),state:A.a(["idCardPhotoOverride"])(f),authorize:function(){return j({idCardPhotoOverride:Uw})},reject:function(){return j({idCardPhotoOverride:Gw})},save:function(e){return g({newPhoto:e.idCardPhoto,photoType:"idCardPhoto"})},deleteEditedData:function(){return x({idCardPhoto:null})},children:f.idCardPhotoPath?Object(ze.jsx)(LN,{show:f.idCardPhotoPath,src:"".concat(Wj,"/id-card-photo/").concat(A.a(["idCardPhotoPath"])(f))}):null,hasImage:!0,validationSchema:gk.idCardPhoto,initialValues:Q.idCardPhoto,isAvailable:!D.a(f.idCardPhotoPath)},{fields:jk.usSsn,title:"US SSN",titleIcon:Object(ze.jsx)(DC,{className:k.cardIcon}),state:A.a(["usSsnOverride"])(f),authorize:function(){return j({usSsnOverride:Uw})},reject:function(){return j({usSsnOverride:Gw})},save:function(e){return O(e)},deleteEditedData:function(){return x({usSsn:null})},validationSchema:gk.usSsn,initialValues:Q.usSsn,isAvailable:!D.a(f.usSsn)}];Kp.a((function(e){var t,n;U.push({fields:[{name:e.customInfoRequest.id,label:e.customInfoRequest.customRequest.name,value:null!==(t=e.customerData.data)&&void 0!==t?t:"",component:oi,editable:!0}],title:e.customInfoRequest.customRequest.name,titleIcon:Object(ze.jsx)(DC,{className:k.cardIcon}),state:A.a(["override"])(e),authorize:function(){return y({variables:{customerId:e.customerId,infoRequestId:e.customInfoRequest.id,override:Uw}})},reject:function(){return y({variables:{customerId:e.customerId,infoRequestId:e.customInfoRequest.id,override:Gw}})},save:function(t){v({variables:{customerId:e.customerId,infoRequestId:e.customInfoRequest.id,data:{info_request_id:e.customInfoRequest.id,data:t[e.customInfoRequest.id]}}})},deleteEditedData:function(){},validationSchema:fn.f().shape(Object(z.a)({},e.customInfoRequest.id,fn.h())),initialValues:Object(z.a)({},e.customInfoRequest.id,null!==(n=e.customerData.data)&&void 0!==n?n:"")})}),G),Kp.a((function(e){var t,n;V.push({fields:[{name:e.label,label:e.label,value:null!==(t=e.value)&&void 0!==t?t:"",component:oi,editable:!0}],title:e.label,titleIcon:Object(ze.jsx)(ZC,{className:k.editIcon}),save:function(t){w({fieldId:e.id,value:t[e.label]})},deleteEditedData:function(){},validationSchema:fn.f().shape(Object(z.a)({},e.label,fn.h())),initialValues:Object(z.a)({},e.label,null!==(n=e.value)&&void 0!==n?n:"")})}),null!==(m=A.a(["customFields"])(f))&&void 0!==m?m:[]),Kp.a((function(e){Q.smsData[e]=_[e],Y.push({name:e,label:Wm(e),component:oi,editable:!0})}),null!==(p=qc.a(_))&&void 0!==p?p:[]);var te=function(e,t){var n=e.title,a=e.authorize,r=e.reject,i=e.state,o=e.titleIcon,l=e.fields,c=e.save,s=e.deleteEditedData,d=e.retrieveAdditionalData,u=e.children,m=e.validationSchema,h=e.initialValues,p=e.hasImage,b=e.hasAdditionalData;return Object(ze.jsx)(hN,{title:n,authorize:a,reject:r,state:i,titleIcon:o,hasImage:p,hasAdditionalData:b,fields:l,children:u,validationSchema:m,initialValues:h,save:c,deleteEditedData:s,retrieveAdditionalData:d},t)},ne=Z(ee);return Object(ze.jsxs)("div",{children:[Object(ze.jsxs)("div",{className:k.header,children:[Object(ze.jsx)(Ge,{className:k.title,children:"Customer data"}),!1]}),Object(ze.jsxs)("div",{children:[!S&&f&&Object(ze.jsxs)(h.a,{container:!0,children:[Object(ze.jsx)(h.a,{container:!0,direction:"column",item:!0,xs:6,children:ne.map((function(e,t){return K(t)?te(e,t):null}))}),Object(ze.jsx)(h.a,{container:!0,direction:"column",item:!0,xs:6,children:ne.map((function(e,t){return K(t)?null:te(e,t)}))})]}),!Ta.a(V)&&Object(ze.jsxs)("div",{className:k.wrapper,children:[Object(ze.jsx)("span",{className:k.separator,children:"Custom data entry"}),Object(ze.jsxs)(h.a,{container:!0,children:[Object(ze.jsx)(h.a,{container:!0,direction:"column",item:!0,xs:6,children:V.map((function(e,t){return K(t)?te(e,t):null}))}),Object(ze.jsx)(h.a,{container:!0,direction:"column",item:!0,xs:6,children:V.map((function(e,t){return K(t)?null:te(e,t)}))})]})]}),!Ta.a(U)&&Object(ze.jsxs)("div",{className:k.wrapper,children:[Object(ze.jsx)("span",{className:k.separator,children:"Custom requirements"}),Object(ze.jsxs)(h.a,{container:!0,children:[Object(ze.jsx)(h.a,{container:!0,direction:"column",item:!0,xs:6,children:U.map((function(e,t){return K(t)?te(e,t):null}))}),Object(ze.jsx)(h.a,{container:!0,direction:"column",item:!0,xs:6,children:U.map((function(e,t){return K(t)?null:te(e,t)}))})]})]})]}),Object(ze.jsx)(PN,{setRetrieve:R,retrieveAdditionalData:C,open:P})]})},RN={header:{display:"flex",flexDirection:"row"},title:{marginTop:7,marginRight:24},notesChipList:{display:"flex",flexDirection:"row",flexWrap:"wrap"}},TN={noteCardWrapper:{flexGrow:0,flexShrink:0,flexBasis:"25%",minWidth:0,maxWidth:500,"&:nth-child(4n+1)":{"& > div":{margin:[[0,10,0,0]]}},"&:nth-child(4n)":{"& > div":{margin:[[0,0,0,10]]}},margin:[[10,0]]},noteCardChip:{height:200,margin:[[0,10]],padding:[[10,10]],cursor:"pointer"},newNoteCard:{backgroundColor:G,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},noteCardHeader:{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%"},noteCardTitle:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",marginRight:10},noteCardContent:{display:"box",lineClamp:7,boxOrient:"vertical",margin:[[15,0]],overflow:"hidden",textOverflow:"ellipsis",wordWrap:"break-word"},editCardChip:{height:325,padding:15},editCardHeader:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:15},editCardActions:{display:"flex",flexDirection:"row",alignItems:"center","& > *":{marginRight:10},"& > *:last-child":{marginRight:0}},editNotesContent:{"& > div":{"&:after":{borderBottom:"none"},"&:before":{borderBottom:"none"},"&:hover:not(.Mui-disabled)::before":{borderBottom:"none"}}}},BN=Object(f.a)(TN),AN=function(e){var t=e.setOpenModal,n=BN();return Object(ze.jsx)("div",{className:n.noteCardWrapper,onClick:function(){return t(!0)},children:Object(ze.jsxs)(qn.a,{className:I()(n.noteCardChip,n.newNoteCard),children:[Object(ze.jsx)(Cn,{width:20,height:20}),Object(ze.jsx)(Ke,{children:"Add new"})]})})},MN={form:{display:"flex",flexDirection:"column",height:"100%","& > *":{marginTop:20},"& > *:last-child":{marginTop:"auto"}},submit:{margin:[["auto",0,0,"auto"]]},footer:{display:"flex",flexDirection:"row",margin:[["auto",0,24,0]]}},WN=Object(f.a)(MN),zN={title:"",content:""},qN=fn.f().shape({title:fn.h().required().trim().max(25),content:fn.h().required()}),$N=function(e){var t=e.showModal,n=e.onClose,a=e.onSubmit,r=e.errorMsg,i=WN();return Object(ze.jsx)(ze.Fragment,{children:Object(ze.jsx)(Qh,{title:"New note",closeOnBackdropClick:!0,width:416,height:472,handleClose:n,open:t,children:Object(ze.jsx)(un.e,{validateOnBlur:!1,validateOnChange:!1,initialValues:zN,validationSchema:qN,onSubmit:function(e){var t=e.title,n=e.content;a({title:t,content:n})},children:Object(ze.jsxs)(un.d,{id:"note-form",className:i.form,children:[Object(ze.jsx)(un.b,{name:"title",autofocus:!0,size:"md",autoComplete:"off",width:350,component:oi,label:"Note title"}),Object(ze.jsx)(un.b,{name:"content",size:"sm",autoComplete:"off",width:350,component:oi,multiline:!0,rows:11,label:"Note content"}),Object(ze.jsxs)("div",{className:i.footer,children:[r&&Object(ze.jsx)(tl,{children:r}),Object(ze.jsx)(Dn,{type:"submit",form:"note-form",className:i.submit,children:"Add note"})]})]})})})})},HN=n(916),VN=Object(f.a)(TN),UN=function(e){var t=HN.a(/\n/)(e);return R.a((function(e,n){return n===t.length?Object(ze.jsx)(ze.Fragment,{children:e}):Object(ze.jsxs)(ze.Fragment,{children:[e,Object(ze.jsx)("br",{})]})}),t)},GN=function(e){var t=e.note,n=e.deleteNote,a=e.handleClick,r=e.timezone,i=VN();return Object(ze.jsx)("div",{className:i.noteCardWrapper,children:Object(ze.jsxs)(qn.a,{className:i.noteCardChip,onClick:function(){return a(t)},children:[Object(ze.jsxs)("div",{className:i.noteCardHeader,children:[Object(ze.jsxs)("div",{className:i.noteCardTitle,children:[Object(ze.jsx)(Ge,{noMargin:!0,children:null===t||void 0===t?void 0:t.title}),Object(ze.jsx)(Ke,{noMargin:!0,children:sd(null===t||void 0===t?void 0:t.created,r,"yyyy-MM-dd")})]}),Object(ze.jsx)("div",{children:Object(ze.jsx)(xh,{className:i.deleteIcon,onClick:function(e){e.stopPropagation(),n({noteId:t.id})}})})]}),Object(ze.jsx)(Ke,{noMargin:!0,className:i.noteCardContent,children:UN(null===t||void 0===t?void 0:t.content)})]})})},XN=n(965),_N=n(917);function KN(){return(KN=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var QN=a.createElement("desc",null,"Created with Sketch."),YN=a.createElement("defs",null,a.createElement("polygon",{id:"path-1",points:"0 21 21 21 21 0 0 0"})),JN=a.createElement("g",{id:"icon/sf-small/save/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"Group"},a.createElement("g",{id:"Group-10"},a.createElement("g",{id:"Group-6"},a.createElement("polygon",{id:"Stroke-1",stroke:"#1B2559",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",points:"20.5 20.5 0.5 20.5 0.5 0.5 16.75 0.5 20.5 4.25"}),a.createElement("mask",{id:"mask-2",fill:"white"},a.createElement("use",{xlinkHref:"#path-1"})),a.createElement("g",{id:"Clip-4"}),a.createElement("polygon",{id:"Stroke-5",stroke:"#1B2559",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",mask:"url(#mask-2)",points:"4.25 7.5 16.75 7.5 16.75 0.5 4.25 0.5"}))),a.createElement("circle",{id:"Oval",stroke:"#1B2559",strokeWidth:2,cx:11,cy:14,r:3})));function eS(e,t){var n=e.title,r=e.titleId,i=ZN(e,["title","titleId"]);return a.createElement("svg",KN({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,QN,YN,JN)}var tS=a.forwardRef(eS),nS=(n.p,Object(f.a)(TN)),aS=function(e){var t=e.note,n=e.cancel,r=e.edit,i=e.timezone,o=Object(a.useRef)(),l=nS(),c=fn.f().shape({content:fn.h()}),s={content:t.content};return Object(ze.jsxs)(qn.a,{className:l.editCardChip,children:[Object(ze.jsxs)("div",{className:l.editCardHeader,children:[Object(ze.jsxs)(Ke,{noMargin:!0,children:["Last edited ",Object(XN.a)({delimited:", "},Object(_N.a)({start:cd(new Date(t.lastEditedAt),i),end:cd(new Date,i)}))," ago"]}),Object(ze.jsxs)("div",{className:l.editCardActions,children:[Object(ze.jsx)($e,{color:"primary",type:"button",Icon:jj,InverseIcon:ua,onClick:n,children:"Cancel"}),Object(ze.jsx)($e,{color:"primary",type:"submit",form:"edit-note",Icon:tS,InverseIcon:oN,children:"Save changes"}),Object(ze.jsx)($e,{color:"primary",type:"button",Icon:jj,InverseIcon:ua,onClick:function(){return o.current.setFieldValue("content","")},children:"Clear content"})]})]}),Object(ze.jsx)(un.e,{validateOnChange:!1,validateOnBlur:!1,validationSchema:c,initialValues:s,onSubmit:function(e){var n=e.content;return r({noteId:t.id,newContent:n,oldContent:t.content})},innerRef:o,children:Object(ze.jsx)(un.d,{id:"edit-note",children:Object(ze.jsx)(un.b,{name:"content",component:oi,className:l.editNotesContent,size:"sm",autoComplete:"off",fullWidth:!0,multiline:!0,rows:15})})})]})},rS=Object(f.a)(RN),iS=function(e){var t,n=e.customer,r=e.createNote,i=e.deleteNote,o=e.editNote,c=e.timezone,s=rS(),d=Object(a.useState)(!1),u=Object(l.a)(d,2),m=u[0],h=u[1],p=Object(a.useState)(null),b=Object(l.a)(p,2),f=b[0],j=b[1],g=Vv.a((function(e,t){return new Date(null===t||void 0===t?void 0:t.created).getTime()-new Date(null===e||void 0===e?void 0:e.created).getTime()}),null!==(t=n.notes)&&void 0!==t?t:[]),O=function(){h(!1)};return Object(ze.jsxs)("div",{children:[Object(ze.jsx)("div",{className:s.header,children:Object(ze.jsx)(Ge,{className:s.title,children:"Notes"})}),D.a(f)&&Object(ze.jsxs)("div",{className:s.notesChipList,children:[Object(ze.jsx)(AN,{setOpenModal:h}),R.a((function(e){return Object(ze.jsx)(GN,{note:e,deleteNote:i,handleClick:j,timezone:c})}),g)]}),!D.a(f)&&Object(ze.jsx)(aS,{note:f,cancel:function(){j(null)},edit:function(e){zr.a(e.newContent,e.oldContent)||o({noteId:e.noteId,newContent:e.newContent}),j(null)},timezone:c}),m&&Object(ze.jsx)($N,{showModal:m,onClose:O,onSubmit:function(e){return r(e),O()}})]})},oS=n(428),lS=n(918);function cS(){return(cS=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var dS=a.createElement("g",{id:"icon/ID/photo/new/comet",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("path",{d:"M12,14 C9.7912,14 8,12.2088 8,10 C8,7.7912 9.7912,6 12,6 C14.2088,6 16,7.7912 16,10 C16,12.2088 14.2088,14 12,14 Z M16.7142857,3.4 L14.3571429,1 L9.64285714,1 L7.28571429,3.4 L1,3.4 L1,17 L23,17 L23,3.4 L16.7142857,3.4 Z",id:"Stroke-1",stroke:"#5F668A",strokeWidth:1.6}));function uS(e,t){var n=e.title,r=e.titleId,i=sS(e,["title","titleId"]);return a.createElement("svg",cS({width:"24px",height:"18px",viewBox:"0 0 24 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"icon/ID/photo/new/comet"):n?a.createElement("title",{id:r},n):null,dS)}var mS,hS,pS,bS,fS,jS,gS,OS,xS,vS,yS,wS,CS,kS,ES,NS,SS=a.forwardRef(uS),IS=(n.p,{header:{display:"flex",flexDirection:"row"},title:{marginTop:7,marginRight:24,marginBottom:32},photosChipList:{display:"flex",flexDirection:"row",flexWrap:"wrap"},image:{objectFit:"cover",objectPosition:"center",width:224,height:200,borderTopLeftRadius:4,borderTopRightRadius:4},photoCardChip:{margin:[[0,16,0,0]]},footer:{display:"flex",flexDirection:"row",margin:[[8,0,0,8]]},date:{margin:[[0,0,8,12]]}}),FS=Object(f.a)(IS),LS=function(e){var t=e.idx,n=e.date,a=e.src,r=e.setPhotosDialog,i=e.setPhotoClickIndex,o=FS();return Object(ze.jsxs)(qn.a,{className:o.photoCardChip,onClick:function(){i(t),r(!0)},children:[Object(ze.jsx)("img",{className:o.image,src:a,alt:""}),Object(ze.jsxs)("div",{className:o.footer,children:[Object(ze.jsx)(SS,{}),Object(ze.jsx)(at,{className:o.date,children:Object(od.a)("yyyy-MM-dd",new Date(n))})]})]})},PS=function(e){var t=e.photosData,n=FS(),r=Object(a.useState)(!1),i=Object(l.a)(r,2),o=i[0],c=i[1],s=Object(a.useState)(null),d=Object(l.a)(s,2),u=d[0],m=d[1],h=D.a(u)?t:L.a(cl.a,oS.a,lS.a(u))(t);return Object(ze.jsxs)("div",{children:[Object(ze.jsx)("div",{className:n.header,children:Object(ze.jsx)(Ge,{className:n.title,children:"Photos & files"})}),Object(ze.jsx)("div",{className:n.photosChipList,children:t.map((function(e,t){return Object(ze.jsx)(LS,{idx:t,date:e.date,src:"".concat(Wj,"/").concat(e.photoDir,"/").concat(e.path),setPhotosDialog:c,setPhotoClickIndex:m})}))}),Object(ze.jsx)(Lk,{open:o,title:"Photo roll",data:Object(ze.jsx)(Kk,{photosData:h}),onDissmised:function(){c(!1),m(null)}})]})},DS={labelLink:{cursor:"pointer",color:$},breadcrumbs:{margin:[[20,0]]},actionLabel:{color:$,margin:[[4,0]]},customerDetails:{marginBottom:18},actionButton:{margin:[[0,0,4,0]],display:"flex",flexDirection:"row",justifyContent:"center"},actionBar:{display:"flex",flexDirection:"column",width:219},panels:{display:"flex"},rightSidePanel:{display:"block",width:1100},leftSidePanel:{width:300,"& > *":{marginBottom:25},"& > *:last-child":{marginBottom:0},"& > *:first-child":{marginBottom:50}},userStatusAction:{display:"flex",flexDirection:"row",alignItems:"center",backgroundColor:re,borderRadius:8,padding:[[0,5]]}},RS=Object(f.a)(DS),TS=x()(mS||(mS=Object(c.a)(["\n query customer($customerId: ID!) {\n config\n customer(customerId: $customerId) {\n id\n authorizedOverride\n frontCameraPath\n frontCameraAt\n frontCameraOverride\n phone\n isAnonymous\n smsOverride\n idCardData\n idCardDataOverride\n idCardDataExpiration\n idCardPhotoPath\n idCardPhotoOverride\n usSsn\n usSsnOverride\n sanctions\n sanctionsAt\n sanctionsOverride\n totalTxs\n totalSpent\n lastActive\n lastTxFiat\n lastTxFiatCode\n lastTxClass\n daysSuspended\n isSuspended\n isTestCustomer\n subscriberInfo\n phoneOverride\n customFields {\n id\n label\n value\n }\n notes {\n id\n customerId\n title\n content\n created\n lastEditedAt\n }\n transactions {\n txClass\n id\n fiat\n fiatCode\n cryptoAtoms\n cryptoCode\n created\n machineName\n errorMessage: error\n error: errorCode\n txCustomerPhotoAt\n txCustomerPhotoPath\n }\n customInfoRequests {\n customerId\n override\n overrideBy\n overrideAt\n customerData\n customInfoRequest {\n id\n enabled\n customRequest\n }\n }\n }\n }\n"]))),BS=x()(hS||(hS=Object(c.a)(["\n mutation setCustomer($customerId: ID!, $customerInput: CustomerInput) {\n setCustomer(customerId: $customerId, customerInput: $customerInput) {\n id\n authorizedOverride\n frontCameraPath\n frontCameraOverride\n phone\n smsOverride\n idCardData\n idCardDataOverride\n idCardDataExpiration\n idCardPhotoPath\n idCardPhotoOverride\n usSsn\n usSsnOverride\n sanctions\n sanctionsAt\n sanctionsOverride\n totalTxs\n totalSpent\n lastActive\n lastTxFiat\n lastTxFiatCode\n lastTxClass\n subscriberInfo\n phoneOverride\n }\n }\n"]))),AS=x()(pS||(pS=Object(c.a)(["\n mutation editCustomer($customerId: ID!, $customerEdit: CustomerEdit) {\n editCustomer(customerId: $customerId, customerEdit: $customerEdit) {\n id\n idCardData\n usSsn\n }\n }\n"]))),MS=x()(bS||(bS=Object(c.a)(["\n mutation replacePhoto(\n $customerId: ID!\n $photoType: String\n $newPhoto: Upload\n ) {\n replacePhoto(\n customerId: $customerId\n photoType: $photoType\n newPhoto: $newPhoto\n ) {\n id\n newPhoto\n photoType\n }\n }\n"]))),WS=x()(fS||(fS=Object(c.a)(["\n mutation deleteEditedData($customerId: ID!, $customerEdit: CustomerEdit) {\n deleteEditedData(customerId: $customerId, customerEdit: $customerEdit) {\n id\n frontCameraPath\n idCardData\n idCardPhotoPath\n usSsn\n }\n }\n"]))),zS=x()(jS||(jS=Object(c.a)(["\n mutation setAuthorizedCustomRequest(\n $customerId: ID!\n $infoRequestId: ID!\n $override: String!\n ) {\n setAuthorizedCustomRequest(\n customerId: $customerId\n infoRequestId: $infoRequestId\n override: $override\n )\n }\n"]))),qS=x()(gS||(gS=Object(c.a)(["\n mutation setCustomerCustomInfoRequest(\n $customerId: ID!\n $infoRequestId: ID!\n $data: JSON!\n ) {\n setCustomerCustomInfoRequest(\n customerId: $customerId\n infoRequestId: $infoRequestId\n data: $data\n )\n }\n"]))),$S=x()(OS||(OS=Object(c.a)(["\n mutation createCustomerNote(\n $customerId: ID!\n $title: String!\n $content: String!\n ) {\n createCustomerNote(\n customerId: $customerId\n title: $title\n content: $content\n )\n }\n"]))),HS=x()(xS||(xS=Object(c.a)(["\n mutation deleteCustomerNote($noteId: ID!) {\n deleteCustomerNote(noteId: $noteId)\n }\n"]))),VS=x()(vS||(vS=Object(c.a)(["\n mutation editCustomerNote($noteId: ID!, $newContent: String!) {\n editCustomerNote(noteId: $noteId, newContent: $newContent)\n }\n"]))),US=x()(yS||(yS=Object(c.a)(["\n mutation enableTestCustomer($customerId: ID!) {\n enableTestCustomer(customerId: $customerId)\n }\n"]))),GS=x()(wS||(wS=Object(c.a)(["\n mutation disableTestCustomer($customerId: ID!) {\n disableTestCustomer(customerId: $customerId)\n }\n"]))),XS=x()(CS||(CS=Object(c.a)(["\n query getData {\n config\n }\n"]))),_S=x()(kS||(kS=Object(c.a)(["\n mutation addCustomField($customerId: ID!, $label: String!, $value: String!) {\n addCustomField(customerId: $customerId, label: $label, value: $value)\n }\n"]))),KS=x()(ES||(ES=Object(c.a)(["\n mutation saveCustomField($customerId: ID!, $fieldId: ID!, $value: String!) {\n saveCustomField(customerId: $customerId, fieldId: $fieldId, value: $value)\n }\n"]))),ZS=x()(NS||(NS=Object(c.a)(["\n query customInfoRequests($onlyEnabled: Boolean) {\n customInfoRequests(onlyEnabled: $onlyEnabled) {\n id\n customRequest\n }\n }\n"]))),QS=Object(a.memo)((function(){var e,t,n,r,i,o=Object(w.h)(),c=Object(a.useState)(!1),s=Object(l.a)(c,2),d=s[0],m=s[1],h=Object(a.useState)(!1),p=Object(l.a)(h,2),b=p[0],f=p[1],j=Object(a.useState)(null),g=Object(l.a)(j,1)[0],O=Object(a.useState)("overview"),x=Object(l.a)(O,2),v=x[0],y=x[1],C=Object(w.j)().id,k=Object(u.c)(TS,{variables:{customerId:C}}),E=k.data,N=k.refetch,S=k.loading,I=Object(u.c)(XS),F=I.data,L=I.loading,P=Object(u.c)(ZS,{variables:{onlyEnabled:!0}}).data,D=Object(u.b)(_S,{onCompleted:function(){return N()}}),B=Object(l.a)(D,1)[0],M=Object(u.b)(KS,{onCompleted:function(){return N()}}),W=Object(l.a)(M,1)[0],z=Object(u.b)(MS,{onCompleted:function(){return N()}}),q=Object(l.a)(z,1)[0],$=Object(u.b)(AS,{onCompleted:function(){return N()}}),H=Object(l.a)($,1)[0],V=Object(u.b)(WS,{onCompleted:function(){return N()}}),U=Object(l.a)(V,1)[0],G=Object(u.b)(BS,{onCompleted:function(){return N()}}),X=Object(l.a)(G,1)[0],_=Object(u.b)(zS,{onCompleted:function(){return N()}}),K=Object(l.a)(_,1)[0],Z=Object(u.b)(qS,{onCompleted:function(){return N()}}),Q=Object(l.a)(Z,1)[0],Y=Object(u.b)($S,{onCompleted:function(){return N()}}),J=Object(l.a)(Y,1)[0],ee=Object(u.b)(HS,{onCompleted:function(){return N()}}),te=Object(l.a)(ee,1)[0],ne=Object(u.b)(VS,{onCompleted:function(){return N()}}),ae=Object(l.a)(ne,1)[0],re=Object(u.b)(US,{variables:{customerId:C},onCompleted:function(){return N()}}),ie=Object(l.a)(re,1)[0],oe=Object(u.b)(GS,{variables:{customerId:C},onCompleted:function(){return N()}}),le=Object(l.a)(oe,1)[0],ce=function(e){return X({variables:{customerId:C,customerInput:e}})},se=function(e){q({variables:{customerId:C,newPhoto:e.newPhoto,photoType:e.photoType}}),f(null)},de=function(e){H({variables:{customerId:C,customerEdit:e}}),f(null)},ue=null!==(e=A.a(["config"])(E))&&void 0!==e?e:[],me=ue&&os(Qc,ue),he=null!==(t=A.a(["customer"])(E))&&void 0!==t?t:[],pe=null!==(n=A.a(["transactions"])(he))&&void 0!==n?n:[],be=Vv.a(Fw.a(T.a("cryptoAtoms")))(pe),fe=ik(he),je=A.a(["authorizedOverride"])(he)===Gw,ge=he.isSuspended,Oe="customerData"===v,xe="overview"===v,ve="notes"===v,ye="photos"===v,we=Um.a(["frontCameraPath","frontCameraAt"])(he),Ce=be&&R.a(Um.a(["id","txCustomerPhotoPath","txCustomerPhotoAt"]))(be),ke=Ck(jd.a(we,Ce)),Ee=S||L,Ne=A.a(["config","locale_timezone"],F),Se=null!==(r=null===P||void 0===P||null===(i=P.customInfoRequests)||void 0===i?void 0:i.map((function(e){return{value:e.id,display:e.customRequest.name}})))&&void 0!==r?r:[],Ie=RS();return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsxs)(tm.a,{classes:{root:Ie.breadcrumbs},separator:Object(ze.jsx)(am.a,{fontSize:"small"}),"aria-label":"breadcrumb",children:[Object(ze.jsx)(nt,{noMargin:!0,className:Ie.labelLink,onClick:function(){return o.push("/compliance/customers")},children:"Customers"}),Object(ze.jsx)(at,{noMargin:!0,className:Ie.labelLink,children:fe.length?fe:rk(A.a(["phone"])(he),me.country)})]}),Object(ze.jsxs)("div",{className:Ie.panels,children:[Object(ze.jsx)("div",{className:Ie.leftSidePanel,children:!Ee&&!he.isAnonymous&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)($E,{isSelected:function(e){return e===v},onClick:function(e){return y(e)}}),Object(ze.jsxs)("div",{children:[Object(ze.jsx)(nt,{className:Ie.actionLabel,children:"Actions"}),Object(ze.jsxs)("div",{className:Ie.actionBar,children:[Object(ze.jsx)($e,{className:Ie.actionButton,color:"primary",Icon:pC,InverseIcon:sC,onClick:function(){return f(!0)},children:"Manual data entry"}),ge&&Object(ze.jsx)($e,{className:Ie.actionButton,color:"primary",Icon:$w,InverseIcon:Bw,onClick:function(){return ce({suspendedUntil:null})},children:"Unsuspend customer"}),Object(ze.jsx)($e,{color:"primary",className:Ie.actionButton,Icon:je?$w:rC,InverseIcon:je?Bw:Yw,onClick:function(){return ce({authorizedOverride:je?Uw:Gw})},children:"".concat(je?"Authorize":"Block"," customer")})]})]}),Object(ze.jsxs)("div",{children:[Object(ze.jsx)(nt,{className:Ie.actionLabel,children:"Special user status"}),Object(ze.jsx)("div",{className:Ie.actionBar,children:Object(ze.jsxs)("div",{className:Ie.userStatusAction,children:[Object(ze.jsx)(Er,{checked:!!A.a(["isTestCustomer"])(he),value:!!A.a(["isTestCustomer"])(he),onChange:function(){return A.a(["isTestCustomer"])(he)?le():ie()}}),"Test user"]})})]})]})}),Object(ze.jsxs)("div",{className:Ie.rightSidePanel,children:[xe&&Object(ze.jsxs)("div",{children:[Object(ze.jsx)(Yo.a,{className:Ie.customerDetails,display:"flex",justifyContent:"space-between",children:Object(ze.jsx)(Jk,{customer:he,photosData:ke,locale:me,setShowCompliance:function(){return m(!d)}})}),Object(ze.jsx)("div",{children:Object(ze.jsx)(fN,{customer:he,data:be,locale:me,loading:Ee})})]}),Oe&&Object(ze.jsx)("div",{children:Object(ze.jsx)(DN,{locale:me,customer:he,updateCustomer:ce,replacePhoto:se,editCustomer:de,deleteEditedData:function(e){return U({variables:{customerId:C,customerEdit:e}})},updateCustomRequest:Q,authorizeCustomRequest:K,updateCustomEntry:function(e){W({variables:{customerId:C,fieldId:e.fieldId,value:e.value}})},retrieveAdditionalData:function(){return X({variables:{customerId:C,customerInput:{subscriberInfo:!0}}})}})}),ve&&Object(ze.jsx)("div",{children:Object(ze.jsx)(iS,{customer:he,createNote:function(e){return J({variables:{customerId:C,title:e.title,content:e.content}})},deleteNote:function(e){return te({variables:{noteId:e.noteId}})},editNote:function(e){return ae({variables:{noteId:e.noteId,newContent:e.newContent}})},timezone:Ne})}),ye&&Object(ze.jsx)("div",{children:Object(ze.jsx)(PS,{photosData:ke})})]}),b&&Object(ze.jsx)(Nk,{error:null===g||void 0===g?void 0:g.message,save:function(e){B({variables:{customerId:C,label:e.title,value:e.data}}),f(null)},addPhoto:se,addCustomerData:de,onClose:function(){return f(null)},customInfoRequirementOptions:Se})]})]})})),YS=n(952),JS=n(469),eI=Tn.baseButton,tI=eI.height/2,nI=eI.height/4,aI="rgba(0, 0, 0, 0.08)",rI="0 4px 4px 0 ".concat(aI),iI={size:function(e){var t=e.size;return Object(s.a)({marginTop:"lg"===t?0:2},Wa(t))},bold:za,autocomplete:{'&[data-focus="true"]':{backgroundColor:aI}},popup:{display:"flex",flexDirection:"column",borderRadius:[[0,0,nI,nI]],backgroundColor:G,boxShadow:rI},separator:{width:"88%",height:1,margin:"0 auto",border:"solid 0.5px",borderColor:$},item:{display:"flex",flexDirection:"row",width:"100%",height:36,alignItems:"center"},itemLabel:{margin:[0],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},itemType:{marginLeft:"auto",fontSize:12,color:$,margin:[0]},input:{display:"flex",flex:1,width:273,padding:[[8,12]],alignItems:"center",height:32,borderRadius:tI,backgroundColor:G,color:J},inputWithPopup:{borderRadius:[[nI,nI,0,0]],boxShadow:rI},iconButton:{marginRight:12}},oI=Object(f.a)(iI),lI=Object(a.memo)((function(e){var t,n=e.loading,r=void 0!==n&&n,i=e.filters,o=void 0===i?[]:i,c=e.options,d=void 0===c?[]:c,u=e.inputPlaceholder,m=void 0===u?"":u,h=e.size,p=e.onChange,b=Object(q.a)(e,["loading","filters","options","inputPlaceholder","size","onChange"]),f=oI({size:h}),j=Object(a.useState)(!1),g=Object(l.a)(j,2),O=g[0],x=g[1],v=(t={},Object(z.a)(t,f.input,!0),Object(z.a)(t,f.inputWithPopup,O),t),y=function(e){return p(e)};return Object(ze.jsx)(La.a,Object(s.a)({loading:r,classes:{option:f.autocomplete},value:o,options:d,getOptionLabel:function(e){return e.value},renderOption:function(e){return Object(ze.jsxs)("div",{className:f.item,children:[Object(ze.jsx)(Ke,{className:f.itemLabel,children:e.value}),Object(ze.jsx)(Ke,{className:f.itemType,children:e.type})]})},autoHighlight:!0,disableClearable:!0,clearOnEscape:!0,multiple:!0,filterSelectedOptions:!0,getOptionSelected:function(e,t){return e.type===t.type},PaperComponent:function(e){var t=e.children;return Object(ze.jsxs)(qn.a,{elevation:0,className:f.popup,children:[Object(ze.jsx)("div",{className:f.separator}),t]})},renderInput:function(e){return Object(ze.jsx)(JS.a,Object(s.a)(Object(s.a)({ref:e.InputProps.ref},e),{},{className:I()(v),startAdornment:Object(ze.jsx)(EC,{className:f.iconButton}),placeholder:m,inputProps:Object(s.a)({className:f.bold,classes:{root:f.size}},e.inputProps)}))},onOpen:function(){return x(!0)},onClose:function(){return x(!1)},onChange:function(e,t){return y(t)}},b))}));function cI(){return(cI=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var dI=a.createElement("g",{id:"icon/button/filter/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("path",{d:"M0.6,-3.33066907e-16 L0.509218076,0.00652107669 C0.068925647,0.0708166555 -0.160361948,0.596737342 0.124968515,0.966531156 L4.166,6.204 L4.16660432,9.6 C4.16660432,9.79162756 4.25813682,9.97172829 4.41293455,10.0846831 L6.8797259,11.8846831 L6.96095139,11.9350192 C7.34801849,12.1353088 7.83339568,11.8580867 7.83339568,11.4 L7.833,6.204 L11.8750315,0.966531156 C12.179384,0.572084421 11.8982155,-3.33066907e-16 11.4,-3.33066907e-16 L0.6,-3.33066907e-16 Z M10.179,1.199 L6.75836419,5.63346884 L6.70465653,5.71638775 C6.65811535,5.80315577 6.63339568,5.90052663 6.63339568,6 L6.633,10.219 L5.366,9.294 L5.36660432,6 L5.35847177,5.90154229 C5.34231401,5.80441508 5.30240262,5.71222382 5.24163581,5.63346884 L1.82,1.199 L10.179,1.199 Z",id:"Path",fill:"#FFFFFF",fillRule:"nonzero"}));function uI(e,t){var n=e.title,r=e.titleId,i=sI(e,["title","titleId"]);return a.createElement("svg",cI({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"icon/button/filter/white"):n?a.createElement("title",{id:r},n):null,dI)}var mI=a.forwardRef(uI);n.p;function hI(){return(hI=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var bI=a.createElement("g",{id:"icon/button/filter/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("path",{d:"M0.6,-4.56301663e-14 L0.509218076,0.00652107669 C0.068925647,0.0708166555 -0.160361948,0.596737342 0.124968515,0.966531156 L4.166,6.204 L4.16660432,9.6 C4.16660432,9.79162756 4.25813682,9.97172829 4.41293455,10.0846831 L6.8797259,11.8846831 L6.96095139,11.9350192 C7.34801849,12.1353088 7.83339568,11.8580867 7.83339568,11.4 L7.833,6.204 L11.8750315,0.966531156 C12.179384,0.572084421 11.8982155,-4.56301663e-14 11.4,-4.56301663e-14 L0.6,-4.56301663e-14 Z M10.179,1.199 L6.75836419,5.63346884 L6.70465653,5.71638775 C6.65811535,5.80315577 6.63339568,5.90052663 6.63339568,6 L6.633,10.219 L5.366,9.294 L5.36660432,6 L5.35847177,5.90154229 C5.34231401,5.80441508 5.30240262,5.71222382 5.24163581,5.63346884 L1.82,1.199 L10.179,1.199 Z",id:"Path",fill:"#1B2559",fillRule:"nonzero"}));function fI(e,t){var n=e.title,r=e.titleId,i=pI(e,["title","titleId"]);return a.createElement("svg",hI({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"icon/button/filter/zodiac"):n?a.createElement("title",{id:r},n):null,bI)}var jI,gI,OI,xI,vI=a.forwardRef(fI),yI=(n.p,{root:{marginLeft:0,height:20,backgroundColor:G,"&:hover, &:focus, &:active":{backgroundColor:G},marginBottom:"auto"},label:{fontSize:Ce,fontWeight:Se,fontFamily:Ie,paddingRight:0,paddingLeft:8,color:J}}),wI={button:{width:8,height:8,marginLeft:8,marginRight:8},text:{marginTop:0,marginBottom:0},filters:{display:"flex",marginBottom:16},deleteWrapper:{display:"flex",marginLeft:"auto",justifyContent:"flex-end",flexDirection:"row"},entries:{color:se,margin:"auto",marginRight:12},chips:{marginTop:"auto"}},CI=Object(f.a)(yI),kI=Object(f.a)(wI),EI=function(e){var t=e.filters,n=e.onFilterDelete,a=e.deleteAllFilters,r=e.entries,i=CI(),o=kI();return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Ke,{className:o.text,children:"Filters:"}),Object(ze.jsxs)("div",{className:o.filters,children:[Object(ze.jsx)("div",{className:o.chips,children:t.map((function(e,t){return Object(ze.jsx)(Br,{classes:i,label:"".concat(Wm(e.type),": ").concat(e.value),onDelete:function(){return n(e)},deleteIcon:Object(ze.jsx)(Mi,{className:o.button})},t)}))}),Object(ze.jsxs)("div",{className:o.deleteWrapper,children:[Object(ze.jsx)(rt,{className:o.entries,children:"".concat(null!==r&&void 0!==r?r:0," entries")}),Object(ze.jsx)($e,{color:"secondary",Icon:vI,InverseIcon:mI,className:o.deleteButton,onClick:a,children:"Delete filters"})]})]})]})},NI=Object(f.a)(Sk),SI=function(e){var t=e.data,n=e.locale,a=e.onClick,r=e.loading,i=e.triggers,o=NI(),l=[{header:"Phone",width:199,view:function(e){return rk(e.phone,n.country)}},{header:"Name",width:241,view:ik},{header:"Total TXs",width:126,textAlign:"right",view:function(e){return"".concat(Number.parseInt(e.totalTxs))}},{header:"Total spent",width:152,textAlign:"right",view:function(e){var t;return"".concat(Number.parseFloat(e.totalSpent)," ").concat(null!==(t=e.lastTxFiatCode)&&void 0!==t?t:"")}},{header:"Last active",width:133,view:function(e){var t;return null!==(t=e.lastActive&&Object(od.a)("yyyy-MM-dd",new Date(e.lastActive)))&&void 0!==t?t:""}},{header:"Last transaction",width:161,textAlign:"right",view:function(e){var t,n=!D.a(e.lastTxFiatCode),a="cashOut"===e.lastTxClass?Ac:Fc,r=Object(ze.jsx)(a,{className:o.txClassIconRight});return Object(ze.jsxs)(ze.Fragment,{children:[n&&"".concat(parseFloat(e.lastTxFiat)," ").concat(null!==(t=e.lastTxFiatCode)&&void 0!==t?t:""),n&&r]})}},{header:"Status",width:191,view:function(e){return Object(ze.jsx)(Wu,{statuses:[ak(e,i)]})}}];return Object(ze.jsx)(ze.Fragment,{children:Object(ze.jsx)(vy,{loading:r,emptyText:"No customers so far",elements:l,data:t,onClick:a})})},II=n(326),FI={modalTitle:{marginTop:-5,color:J,fontFamily:je},footer:{display:"flex",flexDirection:"row",margin:[["auto",0,24,0]]},form:{display:"flex",flexDirection:"column",height:"100%"},submit:{margin:[["auto",0,0,"auto"]]}},LI=II.PhoneNumberUtil.getInstance(),PI=function(e,t){var n=Da.a((function(e){var n=LI.parseAndKeepRawInput(t,e);return LI.isValidNumber(n)}),e),a=LI.parseAndKeepRawInput(t,n);return LI.format(a,II.PhoneNumberFormat.E164)},DI={phoneNumber:""},RI=Object(f.a)(FI),TI=function(e,t){return e&&t&&e.phoneNumber&&t.phoneNumber?e.phoneNumber:null},BI=function(e){var t,n,a=e.showModal,r=e.handleClose,i=e.onSubmit,o=e.locale,l=RI(),c=jd.a(null===o||void 0===o?void 0:o.country,R.a((function(e){return e.country}),null!==(t=null===o||void 0===o?void 0:o.overrides)&&void 0!==t?t:[]));return Object(ze.jsx)(Qh,{closeOnBackdropClick:!0,width:600,height:300,handleClose:r,open:a,children:Object(ze.jsx)(un.e,{validationSchema:(n=c,fn.f().shape({phoneNumber:fn.h().required("A phone number is required").test("is-valid-number","That is not a valid phone number",(function(e){try{var t=R.a((function(t){var n=LI.parseAndKeepRawInput(e,t);return LI.isValidNumber(n)}),n);return dl.a((function(e){return!0===e}),t)}catch(a){}})).trim()})),initialValues:DI,validateOnChange:!1,onSubmit:function(e){i({variables:{phoneNumber:PI(c,e.phoneNumber)}})},children:function(e){var t=e.errors,n=e.touched;return Object(ze.jsxs)(un.d,{id:"customer-registration-form",className:l.form,children:[Object(ze.jsx)(Ve,{className:l.modalTitle,children:"Create new customer"}),Object(ze.jsx)(un.b,{component:oi,name:"phoneNumber",width:338,autoFocus:!0,label:"Phone number"}),Object(ze.jsxs)("div",{className:l.footer,children:[TI(t,n)&&Object(ze.jsx)(tl,{children:TI(t,n)}),Object(ze.jsx)(Dn,{type:"submit",form:"customer-registration-form",className:l.submit,children:"Finish"})]})]})}})})},AI=x()(jI||(jI=Object(c.a)(["\n query filters {\n customerFilters {\n type\n value\n }\n }\n"]))),MI=x()(gI||(gI=Object(c.a)(["\n query configAndCustomers(\n $phone: String\n $name: String\n $address: String\n $id: String\n ) {\n config\n customers(phone: $phone, name: $name, address: $address, id: $id) {\n id\n idCardData\n phone\n totalTxs\n totalSpent\n lastActive\n lastTxFiat\n lastTxFiatCode\n lastTxClass\n authorizedOverride\n frontCameraPath\n frontCameraOverride\n idCardPhotoPath\n idCardPhotoOverride\n idCardData\n idCardDataOverride\n usSsn\n usSsnOverride\n sanctions\n sanctionsOverride\n daysSuspended\n isSuspended\n }\n }\n"]))),WI=x()(OI||(OI=Object(c.a)(["\n mutation createCustomer($phoneNumber: String) {\n createCustomer(phoneNumber: $phoneNumber) {\n phone\n }\n }\n"]))),zI=Object(f.a)(xf),qI=function(e){return bs.a((function(e,t){return Object(s.a)(Object(s.a)({},e),{},Object(z.a)({},t.type,t.value))}),{},e)},$I=function(){var e,t=zI(),n=Object(w.h)(),r=Object(a.useState)([]),i=Object(l.a)(r,2),o=i[0],c=i[1],s=Object(a.useState)({}),d=Object(l.a)(s,2),m=d[0],h=d[1],p=Object(a.useState)([]),b=Object(l.a)(p,2),f=b[0],j=b[1],g=Object(a.useState)(!1),O=Object(l.a)(g,2),x=O[0],v=O[1],y=Object(u.c)(MI,{variables:m,onCompleted:function(e){return c(A.a(["customers"])(e))}}),C=y.data,k=y.loading,E=y.refetch,N=Object(u.c)(AI),S=N.data,I=N.loading,F=Object(u.b)(WI,{onCompleted:function(){return v(!1)},refetchQueries:function(){return[{query:MI,variables:m}]}}),L=Object(l.a)(F,1)[0],P=null!==(e=A.a(["config"])(C))&&void 0!==e?e:[],D=P&&os(Qc,P),R=P&&os(ns,P),B=mm.a([Fw.a((function(e){var t;return new Date(null!==(t=T.a("lastActive",e))&&void 0!==t?t:"0")}))])(null!==o&&void 0!==o?o:[]),W=A.a(["customerFilters"])(S);return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(rl,{title:"Customers",appendix:Object(ze.jsx)("div",{className:t.buttonsWrapper,children:Object(ze.jsx)(lI,{loading:I,filters:f,options:W,inputPlaceholder:"Search customers",onChange:function(e){var t=qI(e);j(e),h({phone:t.phone,name:t.name,address:t.address,id:t.id}),E&&E()}})}),appendixRight:Object(ze.jsx)(Yo.a,{display:"flex",children:Object(ze.jsx)(na,{color:"primary",onClick:function(){return v(!0)},children:"Add new user"})}),labels:[{label:"Cash-in",icon:Object(ze.jsx)(Fc,{})},{label:"Cash-out",icon:Object(ze.jsx)(Ac,{})}]}),f.length>0&&Object(ze.jsx)(EI,{entries:B.length,filters:f,onFilterDelete:function(e){var t=M.a((function(t){return!YS.a(Um.a(["type","value"],t),e)}))(f);j(t);var n=qI(t);h({phone:n.phone,name:n.name,address:n.address,id:n.id}),E&&E()},deleteAllFilters:function(){j([]);var e=qI([]);h({phone:e.phone,name:e.name,address:e.address,id:e.id}),E&&E()}}),Object(ze.jsx)(SI,{data:B,locale:D,onClick:function(e){return n.push("/compliance/customer/".concat(e.id))},loading:k,triggers:R}),Object(ze.jsx)(BI,{showModal:x,handleClose:function(){return v(!1)},locale:D,onSubmit:L})]})},HI=n(794),VI=Object(HI.a)({wrapper:{display:"flex",alignItems:"center"},colorIndicator:{borderRadius:3,height:12,width:12,marginRight:8}}),UI=function(e){var t=e.className,n=e.label,a=e.color,r=Object(q.a)(e,["className","label","color"]),i=VI();return Object(ze.jsxs)("div",Object(s.a)(Object(s.a)({className:I()(i.wrapper,t)},r),{},{children:[a&&Object(ze.jsx)("div",{className:i.colorIndicator,style:{backgroundColor:a}}),Object(ze.jsx)(nt,Object(s.a)(Object(s.a)({},r),{},{children:n}))]}))},GI=Ae.label1,XI=Ae.mono,_I={wrapper:{display:"flex",flex:1,flexDirection:"row",height:"100%"},main:{display:"flex",flex:1},firstSide:{margin:"0 ".concat(64,"px 0 ").concat(48,"px")},secondSide:{marginTop:-29},error:{color:he},coinTotal:{margin:"".concat(12,"px 0")},leftSpacer:{marginLeft:8},topSpacer:{marginTop:40},addressWrapper:{display:"flex",flexDirection:"column",flex:1,backgroundColor:re},address:{width:375,margin:"".concat(12,"px ").concat(24,"px")},itemWrapper:{textAlign:"end"},item:{extend:GI,margin:2},inactiveItem:{color:$},firstItem:{fontWeight:700,margin:2},total:{marginTop:"auto",textAlign:"right",marginRight:24},totalPending:{marginTop:2},totalTitle:{color:me,marginBottom:2},table:{marginTop:8,marginLeft:48},tableLabel:{justifyContent:"end",marginTop:-38},pending:{backgroundColor:le},copyToClipboard:{marginLeft:"auto",paddingTop:6,paddingLeft:15,marginRight:-11},mono:{extend:XI,width:375,margin:"".concat(12,"px ").concat(24,"px")}},KI=Object(f.a)(_I),ZI=165,QI=140,YI=130,JI=x()(xI||(xI=Object(c.a)(["\n {\n funding {\n cryptoCode\n errorMsg\n fundingAddress\n fundingAddressUrl\n confirmedBalance\n pending\n fiatConfirmedBalance\n fiatPending\n fiatCode\n display\n unitScale\n }\n }\n"]))),eF=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Lf.utils.formatCryptoAddress(e,t).replace(/(.{4})/g,"$1 ")},tF=function(e,t){return e.plus(t)},nF=function(e){return new zc.a(e).toFormat(2)},aF=function(e){return nF(e.filter((function(e){return!e.errorMsg})).map((function(e){return new zc.a(e.fiatConfirmedBalance)})).reduce(tF,new zc.a(0)))},rF=function(){var e,t=Object(a.useState)(null),n=Object(l.a)(t,2),r=n[0],i=n[1],o=Object(a.useState)(!1),c=Object(l.a)(o,1)[0],s=KI(),d=[{cryptoAmount:2,balance:10.23,fiatValue:1e3,date:new Date,performedBy:null,pending:!0},{cryptoAmount:10,balance:12.23,fiatValue:12e3,date:new Date,performedBy:null},{cryptoAmount:5,balance:5,fiatValue:5e4,date:new Date,performedBy:null}],m=Object(u.c)(JI),h=m.data,p=m.loading,b=null!==(e=A.a(["funding"])(h))&&void 0!==e?e:[];b.length&&!r&&i(b[0]);var f=nF(b.filter((function(e){return!e.errorMsg})).map((function(e){return new zc.a(e.fiatPending)})).reduce(tF,new zc.a(0))),j=function(e){return e>=0?"+":""};return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)("div",{children:Object(ze.jsx)(gn,{children:"Funding"})}),Object(ze.jsxs)("div",{className:s.wrapper,children:[Object(ze.jsx)(ki,{data:b,isSelected:function(e){return r&&r.cryptoCode===e.cryptoCode},onClick:i,displayName:function(e){return e.display},itemRender:function(e,t){var n,a,r=(n={},Object(z.a)(n,s.item,!0),Object(z.a)(n,s.inactiveItem,!t),n),i=(a={},Object(z.a)(a,s.itemWrapper,!0),Object(z.a)(a,s.error,e.errorMsg),a);return Object(ze.jsxs)("div",{className:I()(i),children:[Object(ze.jsx)("div",{className:s.firstItem,children:e.display}),!e.errorMsg&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsxs)("div",{className:I()(r),children:[nF(e.fiatConfirmedBalance)," ",e.fiatCode]}),Object(ze.jsxs)("div",{className:I()(r),children:[e.confirmedBalance," ",e.cryptoCode]})]})]})},loading:p,children:b.length&&Object(ze.jsxs)("div",{className:s.total,children:[Object(ze.jsx)(nt,{className:s.totalTitle,children:"Total Crypto Balance"}),Object(ze.jsxs)(Ze,{noMargin:!0,children:[aF(b),b[0].fiatCode]}),Object(ze.jsxs)(nt,{className:s.totalPending,children:["(",j(f)," ",f," pending)"]})]})}),r&&!c&&r.errorMsg&&Object(ze.jsx)("div",{className:s.main,children:Object(ze.jsx)("div",{className:s.firstSide,children:Object(ze.jsx)(Ye,{className:s.error,children:r.errorMsg})})}),r&&!c&&!r.errorMsg&&Object(ze.jsxs)("div",{className:s.main,children:[Object(ze.jsxs)("div",{className:s.firstSide,children:[Object(ze.jsxs)(Ge,{children:["Balance (",r.display,")"]}),Object(ze.jsxs)("div",{className:s.coinTotal,children:[Object(ze.jsx)(Ze,{inline:!0,noMargin:!0,children:"".concat(r.confirmedBalance," ").concat(r.cryptoCode)}),Object(ze.jsx)(Qe,{inline:!0,noMargin:!0,className:s.leftSpacer,children:"(".concat(j(r.pending)," ").concat(r.pending," pending)")})]}),Object(ze.jsxs)("div",{className:s.coinTotal,children:[Object(ze.jsx)(Ye,{inline:!0,noMargin:!0,children:"= ".concat(nF(r.fiatConfirmedBalance)," ").concat(r.fiatCode)}),Object(ze.jsx)(rt,{inline:!0,noMargin:!0,className:s.leftSpacer,children:"(".concat(j(r.fiatPending)," ").concat(nF(r.fiatPending)," pending)")})]}),Object(ze.jsx)(Ge,{className:s.topSpacer,children:"Address"}),Object(ze.jsx)("div",{className:s.addressWrapper,children:Object(ze.jsx)("div",{className:s.mono,children:Object(ze.jsx)("strong",{children:Object(ze.jsx)(Nf,{buttonClassname:s.copyToClipboard,children:eF(r.cryptoCode,r.fundingAddress)},r.cryptoCode)})})})]}),Object(ze.jsxs)("div",{className:s.secondSide,children:[Object(ze.jsxs)(nt,{children:["Scan to send ",r.display]}),Object(ze.jsx)(hn.a,{size:240,fgColor:J,value:r.fundingAddressUrl})]})]}),r&&c&&Object(ze.jsxs)("div",{children:[Object(ze.jsx)(UI,{className:s.tableLabel,label:"Pending",color:"#cacaca"}),Object(ze.jsxs)(ym,{className:s.table,children:[Object(ze.jsxs)(wm,{children:[Object(ze.jsx)(Em,{header:!0,width:ZI,children:"Amount Entered"}),Object(ze.jsx)(Em,{header:!0,width:ZI,children:"Balance After"}),Object(ze.jsx)(Em,{header:!0,width:ZI,children:"Cash Value"}),Object(ze.jsx)(Em,{header:!0,width:YI,children:"Date"}),Object(ze.jsx)(Em,{header:!0,width:QI,children:"Time (h:m:s)"}),Object(ze.jsx)(Em,{header:!0,width:ZI,children:"Performed By"})]}),Object(ze.jsx)(km,{children:d.map((function(e,t){return Object(ze.jsxs)(Im,{className:I()(Object(z.a)({},s.pending,e.pending)),children:[Object(ze.jsxs)(Em,{width:ZI,children:[e.cryptoAmount," ",r.cryptoCode]}),Object(ze.jsxs)(Em,{width:ZI,children:[e.balance," ",r.cryptoCode]}),Object(ze.jsxs)(Em,{width:ZI,children:[e.fiatValue," ",r.fiatCode]}),Object(ze.jsx)(Em,{width:YI,children:Object(od.a)("yyyy-MM-dd",e.date)}),Object(ze.jsx)(Em,{width:QI,children:Object(od.a)("hh:mm:ss",e.date)}),Object(ze.jsx)(Em,{width:ZI,children:"add"})]},t)}))})]})]})]})]})};function iF(){return(iF=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var lF=a.createElement("circle",{cx:52,cy:32,r:32,fill:"#F7931A"}),cF=a.createElement("path",{d:"m66.1 27.4c0.6-4.3-2.6-6.5-7-8.1l1.4-5.8-3.5-0.9-1.4 5.6c-0.9-0.2-1.9-0.4-2.8-0.7l1.4-5.7-3.5-0.9-1.4 5.8c-0.8-0.2-1.5-0.3-2.2-0.5l0 0-4.8-1.2-0.9 3.8s2.6 0.6 2.6 0.6c1.4 0.4 1.7 1.3 1.6 2l-1.6 6.6c0.1 0 0.2 0.1 0.4 0.1-0.1 0-0.2-0.1-0.4-0.1l-2.3 9.2c-0.2 0.4-0.6 1.1-1.6 0.8 0 0.1-2.6-0.6-2.6-0.6l-1.7 4 4.6 1.1c0.9 0.2 1.7 0.4 2.5 0.6l-1.5 5.8 3.5 0.9 1.4-5.8c1 0.3 1.9 0.5 2.8 0.7l-1.4 5.7 3.5 0.9 1.5-5.8c6 1.1 10.5 0.7 12.4-4.7 1.5-4.4-0.1-6.9-3.2-8.5 2.3-0.5 4-2 4.5-5.2zm-8 11.2c-1.1 4.4-8.4 2-10.8 1.4l1.9-7.7c2.4 0.6 10 1.8 8.9 6.3zm1.1-11.3c-1 4-7.1 2-9.1 1.5l1.7-7c2 0.5 8.4 1.4 7.3 5.6z",fill:"#FFF"});function sF(e,t){var n=e.title,r=e.titleId,i=oF(e,["title","titleId"]);return a.createElement("svg",iF({xmlns:"http://www.w3.org/2000/svg",width:104,height:64,ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,lF,cF)}var dF=a.forwardRef(sF);n.p;function uF(){return(uF=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var hF=a.createElement("path",{fill:"#0AC18E",d:"m0,0l29.7,0a39,39,0,0,0,0,64l-29.7,0zm52,0a32,32,0,0,0,0,64a32,32,0,0,0,0,-64m52,0l-29.7,0a39,39,0,0,1,0,64l29.7,0z"}),pF=a.createElement("path",{fill:"#FFF",transform:"rotate(-28 52 32)",d:"m66.103,27.444c0.637-4.258-2.605-6.547-7.038-8.074l1.438-5.768-3.511-0.875-1.4,5.616c-0.923-0.23-1.871-0.447-2.813-0.662l1.41-5.653-3.509-0.875-1.439,5.766c-0.764-0.174-1.514-0.346-2.242-0.527l0.004-0.018-4.842-1.209-0.934,3.75s2.605,0.597,2.55,0.634c1.422,0.355,1.679,1.296,1.636,2.042l-1.638,6.571c0.098,0.025,0.225,0.061,0.365,0.117-0.117-0.029-0.242-0.061-0.371-0.092l-2.296,9.205c-0.174,0.432-0.615,1.08-1.609,0.834,0.035,0.051-2.552-0.637-2.552-0.637l-1.743,4.019,4.569,1.139c0.85,0.213,1.683,0.436,2.503,0.646l-1.453,5.834,3.507,0.875,1.439-5.772c0.958,0.26,1.888,0.5,2.798,0.726l-1.434,5.745,3.511,0.875,1.453-5.823c5.987,1.133,10.489,0.676,12.384-4.739,1.527-4.36-0.076-6.875-3.226-8.515,2.294-0.529,4.022-2.038,4.483-5.155zm-8.022,11.249c-1.085,4.36-8.426,2.003-10.806,1.412l1.928-7.729c2.38,0.594,10.012,1.77,8.878,6.317zm1.086-11.312c-0.99,3.966-7.1,1.951-9.082,1.457l1.748-7.01c1.982,0.494,8.365,1.416,7.334,5.553z"});function bF(e,t){var n=e.title,r=e.titleId,i=mF(e,["title","titleId"]);return a.createElement("svg",uF({xmlns:"http://www.w3.org/2000/svg",width:104,height:64,ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,hF,pF)}var fF=a.forwardRef(bF);n.p;function jF(){return(jF=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var OF=a.createElement("circle",{cx:1e3,cy:1e3,r:1e3,fill:"#2573c2"}),xF=a.createElement("g",{fill:"#fff"},a.createElement("path",{d:"M1652.6 736.8a143.65 143.65 0 0 0-19.2-63.6c-10-20-27.8-35.6-48.6-43.6a143.51 143.51 0 0 0-68.4-15H628.8l-63.6 190.6h804.2l-127 389.6h-804l-63.6 190.6h891.8a246.33 246.33 0 0 0 77.8-15c25-14.2 53.6-28.6 77.8-48.6a382.69 382.69 0 0 0 63.6-63.6 432.2 432.2 0 0 0 39.2-73.4l117.8-370.4a137.38 137.38 0 0 0 9.8-77.6z"}),a.createElement("path",{d:"M882.2 911.6H409l-63.6 176.2h478z"}));function vF(e,t){var n=e.title,r=e.titleId,i=gF(e,["title","titleId"]);return a.createElement("svg",jF({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2000 2000",width:2500,height:2500,ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,OF,xF)}var yF=a.forwardRef(vF);n.p;function wF(){return(wF=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var kF=a.createElement("g",null,a.createElement("polygon",{fill:"#343434",points:"127.9611 0 125.1661 9.5 125.1661 285.168 127.9611 287.958 255.9231 212.32"}),a.createElement("polygon",{fill:"#8C8C8C",points:"127.962 0 0 212.32 127.962 287.959 127.962 154.158"}),a.createElement("polygon",{fill:"#3C3C3B",points:"127.9611 312.1866 126.3861 314.1066 126.3861 412.3056 127.9611 416.9066 255.9991 236.5866"}),a.createElement("polygon",{fill:"#8C8C8C",points:"127.962 416.9052 127.962 312.1852 0 236.5852"}),a.createElement("polygon",{fill:"#141414",points:"127.9611 287.9577 255.9211 212.3207 127.9611 154.1587"}),a.createElement("polygon",{fill:"#393939",points:"0.0009 212.3208 127.9609 287.9578 127.9609 154.1588"}));function EF(e,t){var n=e.title,r=e.titleId,i=CF(e,["title","titleId"]);return a.createElement("svg",wF({width:"256px",height:"417px",viewBox:"0 0 256 417",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",preserveAspectRatio:"xMidYMid",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,kF)}var NF=a.forwardRef(EF);n.p;function SF(){return(SF=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var FF=a.createElement("circle",{fill:"#989898",cx:52,cy:32,r:32}),LF=a.createElement("path",{fill:"#FFF",d:"m46.92598,12.31703l-4.97801,18.8088l-3.42705,1.32711l-1.64691,6.17189l3.42705,-1.29514l-2.8461,10.76083l30.60893,0l2.09993,-7.98401l-18.42505,0l2.09993,-7.82412l3.3631,-1.26316l1.6469,-6.17188l-3.36309,1.29513l3.6509,-13.83611l-12.21053,0z"});function PF(e,t){var n=e.title,r=e.titleId,i=IF(e,["title","titleId"]);return a.createElement("svg",SF({xmlns:"http://www.w3.org/2000/svg",width:104,height:64,ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,FF,LF)}var DF=a.forwardRef(PF);n.p;function RF(){return(RF=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var BF=a.createElement("path",{d:"M127.998 0C57.318 0 0 57.317 0 127.999c0 14.127 2.29 27.716 6.518 40.43H44.8V60.733l83.2 83.2 83.198-83.2v107.695h38.282c4.231-12.714 6.521-26.303 6.521-40.43C256 57.314 198.681 0 127.998 0",fill:"#F60"}),AF=a.createElement("path",{d:"M108.867 163.062l-36.31-36.311v67.765H18.623c22.47 36.863 63.051 61.48 109.373 61.48s86.907-24.617 109.374-61.48h-53.933V126.75l-36.31 36.31-19.13 19.129-19.128-19.128h-.002z",fill:"#4C4C4C"});function MF(e,t){var n=e.title,r=e.titleId,i=TF(e,["title","titleId"]);return a.createElement("svg",RF({width:2500,height:2500,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,BF,AF)}var WF=a.forwardRef(MF);n.p;function zF(){return(zF=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var $F=a.createElement("path",{d:"M1000 0c552.26 0 1000 447.74 1000 1000s-447.76 1000-1000 1000S0 1552.38 0 1000 447.68 0 1000 0",fill:"#53ae94"}),HF=a.createElement("path",{d:"M1123.42 866.76V718h340.18V491.34H537.28V718H877.5v148.64C601 879.34 393.1 934.1 393.1 999.7s208 120.36 484.4 133.14v476.5h246V1132.8c276-12.74 483.48-67.46 483.48-133s-207.48-120.26-483.48-133m0 225.64v-.12c-6.94.44-42.6 2.58-122 2.58-63.48 0-108.14-1.8-123.88-2.62v.2C633.34 1081.66 451 1039.12 451 988.22S633.36 894.84 877.62 884v166.1c16 1.1 61.76 3.8 124.92 3.8 75.86 0 114-3.16 121-3.8V884c243.8 10.86 425.72 53.44 425.72 104.16s-182 93.32-425.72 104.18",fill:"#fff"});function VF(e,t){var n=e.title,r=e.titleId,i=qF(e,["title","titleId"]);return a.createElement("svg",zF({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2000 2000",width:2500,height:2500,ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,$F,HF)}var UF=a.forwardRef(VF);n.p;function GF(){return(GF=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var _F=a.createElement("style",{type:"text/css"},"\n\t.st0{fill:#231F20;}\n\t.st1{fill:#F4B728;}\n"),KF=a.createElement("path",{className:"st0",d:"M245.4,20C121.1,20,20,121.1,20,245.4s101.1,225.4,225.4,225.4s225.4-101.1,225.4-225.4S369.7,20,245.4,20z M245.4,433.6c-103.8,0-188.2-84.4-188.2-188.2S141.6,57.2,245.4,57.2s188.2,84.4,188.2,188.2S349.2,433.6,245.4,433.6z"}),ZF=a.createElement("circle",{className:"st1",cx:245.4,cy:245.4,r:177.6}),QF=a.createElement("polygon",{className:"st0",points:"165,315.5 165,349.9 226.5,349.9 226.5,387.6 264.3,387.6 264.3,349.9 325.8,349.9 325.8,304.4 230.4,304.4 325.8,175 325.8,140.6 264.3,140.6 264.3,103 226.5,103 226.5,140.6 165,140.6 165,186.2 260.4,186.2 "});function YF(e,t){var n=e.title,r=e.titleId,i=XF(e,["title","titleId"]);return a.createElement("svg",GF({id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 493.3 490.2",style:{enableBackground:"new 0 0 493.3 490.2"},xmlSpace:"preserve",ref:t,"aria-labelledby":r},i),_F,void 0===n?a.createElement("title",{id:r},"headerArtboard 7"):n?a.createElement("title",{id:r},n):null,KF,ZF,QF)}var JF,eL,tL,nL,aL,rL,iL,oL,lL,cL=a.forwardRef(YF),sL=(n.p,Object(f.a)({logo:{maxHeight:80,maxWidth:200},title:{margin:[[24,0,32,0]]},text:{margin:0},button:{marginTop:"auto",marginBottom:58},modalContent:{display:"flex",flexDirection:"column",alignItems:"center",padding:[[0,42]],flex:1}})),dL=function(e){var t=e.code,n=e.name,a=e.onContinue,r=sL(),i=function(e){switch(e){case"BTC":return dF;case"BCH":return fF;case"DASH":return yF;case"ETH":return NF;case"LTC":return DF;case"ZEC":return cL;case"USDT":return UF;case"XMR":return WF;default:return null}}(t);return Object(ze.jsxs)("div",{className:r.modalContent,children:[Object(ze.jsx)(i,{className:r.logo}),Object(ze.jsxs)(Ve,{className:r.title,children:["Enable ",n]}),Object(ze.jsxs)(Ke,{className:r.text,children:["You are about to enable ",n," on your system. This will allow you to use this cryptocurrency on your machines. To be able to do that, you\u2019ll have to set up all the necessary 3rd party services."]}),Object(ze.jsx)(Dn,{className:r.button,onClick:a,children:"Start configuration"})]})},uL={title:{margin:[[0,0,12,0]]},subtitle:{margin:[[32,0,21,0]]},error:{color:he},button:{marginLeft:"auto"},submit:{display:"flex",flexDirection:"row",margin:[["auto",0,24]]},radioGroup:{flexDirection:"row"},radioLabel:{width:150,height:48},radio:{padding:4,margin:4},setupNew:{display:"flex",alignItems:"center",height:48},picker:{width:150},horizontalAlign:{display:"flex",flexDirection:"row"},centerAlignment:{alignItems:"center"},zeroConfLimit:{marginRight:5,"& > div":{fontSize:Oe,fontFamily:je,fontWeight:300,"& > input":{padding:[[6,0,2]]}}}},mL=Object(f.a)(uL),hL={form:null,selected:null,isNew:!1,iError:!1},pL=function(e,t){switch(t.type){case"select":return{form:null,selected:t.selected,isNew:null,iError:!1};case"new":return{form:e.form,selected:null,isNew:!0,iError:!1};case"form":return{form:t.form,selected:t.form.code,isNew:!0,iError:!1};case"error":return $n.a(e,{innerError:!0});case"reset":return hL;default:throw new Error}},bL=function(e){var t,n=e.type,r=e.schema,i=e.coin,o=e.name,c=e.step,s=e.error,d=e.lastStep,u=e.onContinue,m=e.fiatCurrency,h=e.filled,p=e.unfilled,b=e.getValue,f=mL(),j=Object(a.useReducer)(pL,hL),g=Object(l.a)(j,2),O=g[0],x=O.innerError,v=O.selected,y=O.form,w=O.isNew,C=g[1];Object(a.useEffect)((function(){C({type:"reset"})}),[c]);var k=function(e,t){if(!e||!e[n])return C({type:"error"});u(e,t)},E=d?"Finish":"Next",N=null!==o&&void 0!==o?o:n,S=(t={},Object(z.a)(t,f.subtitle,!0),Object(z.a)(t,f.error,x),t);return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Qe,{className:f.title,children:qm(N)}),Object(ze.jsx)(pp,{steps:5,currentStep:c}),Object(ze.jsx)(Xe,{className:I()(S),children:c<4?"Select a ".concat(N," or set up a new one"):"Select ".concat(N," for ").concat(i)}),5!==c&&Object(ze.jsx)(yr,{options:h,value:v,className:f.radioGroup,onChange:function(e,t){C({type:"select",selected:t})},labelClassName:f.radioLabel,radioClassName:f.radio}),5===c&&Object(ze.jsx)(un.e,{validateOnBlur:!1,validateOnChange:!0,initialValues:{zeroConfLimit:""},enableReinitialize:!0,validationSchema:r,children:function(e){e.values;var t=e.setFieldValue;return Object(ze.jsx)(un.d,{children:Object(ze.jsxs)("div",{className:I()(f.horizontalAlign,f.lineAlignment),children:[Object(ze.jsx)(un.b,{component:ai,decimalPlaces:0,width:50,placeholder:"0",name:"zeroConfLimit",onChange:function(e){C({type:"select",selected:e.target.value}),t(e.target.id,e.target.value)},className:f.zeroConfLimit}),Object(ze.jsx)(Qe,{children:m})]})})}}),Object(ze.jsxs)("div",{className:f.setupNew,children:[!Ta.a(p)&&!D.a(p)&&Object(ze.jsx)(yr,{value:w,onChange:function(e,t){C({type:"new"})},labelClassName:f.radioLabel,radioClassName:f.radio,options:[{display:"Set up new",code:!0}]}),w&&Object(ze.jsx)(Va,{fullWidth:!0,label:"Select ".concat(N),className:f.picker,getOptionSelected:Aa.a("code"),labelProp:"display",options:p,onChange:function(e,t){C({type:"form",form:t})}})]}),y&&Object(ze.jsx)($O,{save:function(e){return k(Object(z.a)({},n,y.code),Object(z.a)({},y.code,e))},elements:Ex[y.code].elements,validationSchema:Ex[y.code].validationSchema,value:b(y.code),buttonLabel:E}),!y&&Object(ze.jsxs)("div",{className:f.submit,children:[s&&Object(ze.jsx)(tl,{children:"Failed to save"}),Object(ze.jsx)(Dn,{className:f.button,onClick:function(){return k(Object(z.a)({},n,v))},children:E})]})]})},fL=function(e,t){return M.a((function(n){return function(e){return W.a("class",e)}(t)(n)&&function(e){return L.a(hl.a(e),T.a("cryptos"))}(e)(n)}))},jL=M.a((function(e){return!e.deprecated})),gL=function(e,t,n,a){var r=jL(fL(a,n)(e)),i=fs.a((function(e){var n=e.code,a=function(e){return t&&t[e]}(n);return!Ex[n]||(0,Ex[n].getValidationSchema)(a).isValidSync(a)}))(r),o=Object(l.a)(i,2);return{filled:o[0],unfilled:o[1]}},OL=function(e){var t=e.coin,n=e.onClose,r=e.accountsConfig,i=e.accounts,o=e.fiatCurrency,c=e.save,d=e.error,u=Object(a.useState)({step:0,config:{active:!0},accountsToSave:{}}),m=Object(l.a)(u,2),h=m[0],p=h.step,b=h.config,f=h.accountsToSave,j=m[1],g="Enable ".concat(t.display),O=5===p,x={filled:fL(t.code,"ticker")(r)},v=gL(r,i,"wallet",t.code),y=gL(r,i,"exchange",t.code),w=gL(r,i,"zeroConf",t.code),C=function(){var e=Object(Rl.a)(Dl.a.mark((function e(n,a){var r,i,o,l;return Dl.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=$n.a(b,n),i=a?$n.a(f,a):f,!O){e.next=6;break}return o=Rf.a(qc.a(Lf.utils.getCryptoCurrency(t.code).units)),l=Object(s.a)(Object(s.a)({},r),{},{cryptoUnits:o}),e.abrupt("return",c(ls(t.code,l),i));case 6:j({step:p+1,config:r,accountsToSave:i});case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return Object(ze.jsxs)(Qh,{title:0===p?null:g,handleClose:n,width:554,open:!0,children:[0===p&&Object(ze.jsx)(dL,{code:t.code,name:t.display,onContinue:function(){return C()}}),0!==p&&Object(ze.jsx)(bL,Object(s.a)(Object(s.a)({step:p,coin:t.display,fiatCurrency:o,error:d,lastStep:O},function(){switch(p){case 1:return Object(s.a)({type:"ticker"},x);case 2:return Object(s.a)({type:"wallet"},v);case 3:return Object(s.a)({type:"exchange"},y);case 4:return Object(s.a)({type:"zeroConf",name:"confidence checking",schema:fn.f().shape({zeroConfLimit:fn.e().required()})},w);case 5:return Object(s.a)({type:"zeroConfLimit",name:"0-conf limit"},w);default:return null}}()),{},{onContinue:C,getValue:function(e){return Da.a(W.a("code",e))(i)}}))]})},xL=Object(f.a)({rightAligned:{marginTop:"20px",marginLeft:"auto",marginBottom:"20px"},rightLink:{marginLeft:"20px"}}),vL=x()(JF||(JF=Object(c.a)(["\n query getData {\n config\n accounts\n accountsConfig {\n code\n display\n class\n cryptos\n }\n currencies {\n code\n display\n }\n countries {\n code\n display\n }\n cryptoCurrencies {\n code\n display\n }\n languages {\n code\n display\n }\n machines {\n name\n deviceId\n }\n }\n"]))),yL=x()(eL||(eL=Object(c.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"]))),wL=function(e){var t=e.open,n=e.close,a=e.save,r=xL();return Object(ze.jsxs)(Qh,{title:"Change fiat currency?",handleClose:n,width:450,height:310,open:t,children:[Object(ze.jsx)(Ke,{children:"Please note that all values you set that were based on your prior fiat currency are still the same. If you need to adjust these to reflect the new fiat currency (such as minimum transaction amounts, fixed fees, and compliance triggers, for example), please do so now."}),Object(ze.jsx)(Ke,{children:"Also, if you have cash-out enabled, you must define new dispenser bill counts for the new currency for cash-out on the new currency to work."}),Object(ze.jsxs)("div",{className:r.rightAligned,children:[Object(ze.jsx)(na,{onClick:n,color:"secondary",children:"Cancel"}),Object(ze.jsx)(na,{className:r.rightLink,onClick:a,color:"primary",children:"Save"})]})]})},CL=function(e){var t,n,r,i,o,c,s=e.name,d=Object(a.useState)(!1),m=Object(l.a)(d,2),h=m[0],p=m[1],b=Object(a.useState)(null),f=Object(l.a)(b,2),j=f[0],g=f[1],O=Object(a.useState)(null),x=Object(l.a)(O,2),v=x[0],y=x[1],w=Object(a.useState)(!1),C=Object(l.a)(w,2),k=C[0],E=C[1],N=Object(a.useState)(!1),S=Object(l.a)(N,2),I=S[0],F=S[1],P=Object(u.c)(vL).data,D=Object(u.b)(yL,{onCompleted:function(){return p(!1)},refetchQueries:function(){return["getData"]},onError:function(e){return y(e)}}),R=Object(l.a)(D,1)[0],T=Object(a.useState)(null),B=Object(l.a)(T,2),A=B[0],M=B[1],z=(null===P||void 0===P?void 0:P.config)&&os(s)(P.config),q=(null===P||void 0===P?void 0:P.config)&&os(_c)(P.config),$=null===P||void 0===P?void 0:P.accountsConfig,H=null!==(t=null===P||void 0===P?void 0:P.accounts)&&void 0!==t?t:[],V=null!==(n=null===P||void 0===P?void 0:P.cryptoCurrencies)&&void 0!==n?n:[],U=z&&!Ta.a(z)?z:mO,G=null!==(r=U.overrides)&&void 0!==r?r:[],X=function(e){return M(null),R({variables:{config:e}})},_=function(e,t,n){var a=Rg.a(t,e)[0];if(!a)return n(t);var r=os(a)(q);if(!jO.isValidSync(r))return g((function(){return function(){return n(t)}})),void p(a);n(t)};return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(wL,{open:A,close:function(){return M(null)},save:function(){return A&&X(A)}}),Object(ze.jsx)(rl,{title:"Locales"}),Object(ze.jsx)(CO,{children:Object(ze.jsx)(Xh,{title:"Default settings",error:null===v||void 0===v?void 0:v.message,titleLg:!0,name:"locale",enableEdit:!0,initialValues:U,save:function(e){var t=ls(s)(e.locale[0]);return z.fiatCurrency&&t.locale_fiatCurrency!==z.fiatCurrency?M(t):X(t)},validationSchema:dO,data:fw.a(U),elements:cO(P,_),setEditing:function(e,t){return E(t)},forceDisable:I})}),Object(ze.jsx)(CO,{children:Object(ze.jsx)(Xh,{error:null===v||void 0===v?void 0:v.message,title:"Overrides",titleLg:!0,name:"overrides",enableDelete:!0,enableEdit:!0,enableCreate:!0,initialValues:hO,save:function(e){var t=ls(s)(e);return y(null),R({variables:{config:t}})},validationSchema:uO,data:null!==G&&void 0!==G?G:[],elements:sO(P,G,_),disableAdd:L.a(Ta.a,Rg.a)(null!==(i=null===P||void 0===P?void 0:P.machines.map((function(e){return e.deviceId})))&&void 0!==i?i:[],null!==(o=null===G||void 0===G?void 0:G.map((function(e){return e.machine})))&&void 0!==o?o:[]),setEditing:function(e,t){return F(t)},forceDisable:k})}),h&&Object(ze.jsx)(OL,{coin:Da.a(W.a("code",h))(V),onClose:function(){return p(!1)},save:function(e){return X(ls(_c)(e)).then((function(e){return j(),g(null),e}))},error:null===v||void 0===v?void 0:v.message,cryptoCurrencies:V,userAccounts:null===P||void 0===P||null===(c=P.config)||void 0===c?void 0:c.accounts,accounts:H,accountsConfig:$})]})},kL={identification:{display:"flex",flexDirection:"row",alignItems:"center","& > *:first-child":{marginLeft:0},"& > *":{marginLeft:6},"& > *:nth-child(3)":{marginLeft:15}},form:{display:"flex",flexDirection:"column",height:"100%","& > *:first-child":{marginTop:10},"& > *":{marginBottom:20}},customerAutocomplete:{width:350},discountRateWrapper:{display:"flex",flexDirection:"row",alignItems:"center"},discountInput:{display:"flex",flexDirection:"row",alignItems:"center"},footer:{display:"flex",flexDirection:"row",margin:[["auto",0,24,0]]},submit:{margin:[["auto",0,0,"auto"]]},error:{color:he}},EL=Object(f.a)(kL),NL={customer:"",discount:""},SL=fn.f().shape({customer:fn.h().required("A customer is required!"),discount:fn.e().required("A discount rate is required!").min(0,"Discount rate should be a positive number!").max(100,"Discount rate should have a maximum value of 100%!")}),IL=function(e,t,n){return e&&t?n?"Internal server error":e.customer&&t.customer?e.customer:e.discount&&t.discount?e.discount:null:null},FL=function(e){var t=e.showModal,n=e.setShowModal,a=e.onClose,r=e.creationError,i=e.addDiscount,o=e.customers,l=EL();return Object(ze.jsx)(ze.Fragment,{children:t&&Object(ze.jsx)(Qh,{title:"Add individual customer discount",closeOnBackdropClick:!0,width:600,height:500,handleClose:a,open:!0,children:Object(ze.jsx)(un.e,{validateOnBlur:!1,validateOnChange:!1,initialValues:NL,validationSchema:SL,onSubmit:function(e){!function(e,t){i({variables:{customerId:e,discount:parseInt(t)}}),n(!1)}(e.customer,e.discount)},children:function(e){var t=e.errors,n=e.touched;return Object(ze.jsxs)(un.d,{id:"individual-discount-form",className:l.form,children:[Object(ze.jsx)("div",{className:l.customerAutocomplete,children:Object(ze.jsx)(un.b,{name:"customer",label:"Select a customer",component:Pr,fullWidth:!0,options:R.a((function(e){var t,n,a,r,i,o;return{code:e.id,display:"".concat(null!==(t=null===e||void 0===e||null===(n=e.idCardData)||void 0===n?void 0:n.firstName)&&void 0!==t?t:"").concat((null===e||void 0===e||null===(a=e.idCardData)||void 0===a?void 0:a.firstName)&&(null===e||void 0===e||null===(r=e.idCardData)||void 0===r?void 0:r.lastName)?" ":"").concat(null!==(i=null===e||void 0===e||null===(o=e.idCardData)||void 0===o?void 0:o.lastName)&&void 0!==i?i:""," (").concat(e.phone,")")}}))(o),labelProp:"display",valueProp:"code"})}),Object(ze.jsxs)("div",{children:[Object(ze.jsxs)("div",{className:l.discountRateWrapper,children:[Object(ze.jsx)(Ge,{children:"Define discount rate"}),Object(ze.jsxs)(Ep,{width:304,children:[Object(ze.jsx)(Ke,{children:"This is a percentage discount off of your existing commission rates for a customer entering this code at the machine."}),Object(ze.jsx)(Ke,{children:"For instance, if you charge 8% commissions, and this code is set for 50%, then you'll instead be charging 4% on transactions using the code."})]})]}),Object(ze.jsxs)("div",{className:l.discountInput,children:[Object(ze.jsx)(un.b,{name:"discount",size:"lg",autoComplete:"off",width:50,decimalScale:0,className:l.discountInputField,component:ai}),Object(ze.jsx)(et,{inline:!0,className:l.inputLabel,children:"%"})]})]}),Object(ze.jsxs)("div",{className:l.footer,children:[IL(t,n,r)&&Object(ze.jsx)(tl,{children:IL(t,n,r)}),Object(ze.jsx)(Dn,{type:"submit",form:"individual-discount-form",className:l.submit,children:"Add discount"})]})]})}})})})},LL=Object(f.a)(kL),PL=x()(tL||(tL=Object(c.a)(["\n query individualDiscounts {\n individualDiscounts {\n id\n customerId\n discount\n }\n }\n"]))),DL=x()(nL||(nL=Object(c.a)(["\n mutation deleteIndividualDiscount($discountId: ID!) {\n deleteIndividualDiscount(discountId: $discountId) {\n id\n }\n }\n"]))),RL=x()(aL||(aL=Object(c.a)(["\n mutation createIndividualDiscount($customerId: ID!, $discount: Int!) {\n createIndividualDiscount(customerId: $customerId, discount: $discount) {\n id\n }\n }\n"]))),TL=x()(rL||(rL=Object(c.a)(["\n {\n customers {\n id\n phone\n idCardData\n }\n }\n"]))),BL=function(){var e=LL(),t=Object(a.useState)(!1),n=Object(l.a)(t,2),r=n[0],i=n[1],o=Object(a.useState)(),c=Object(l.a)(o,2),s=c[0],d=c[1],m=Object(a.useState)(""),h=Object(l.a)(m,2),p=h[0],b=h[1],f=Object(a.useState)(!1),j=Object(l.a)(f,2),g=j[0],O=j[1],x=function(){return O(!g)},v=Object(u.c)(PL),y=v.data,w=v.loading,C=Object(u.c)(TL),k=C.data,E=C.loading,N=Object(u.b)(RL,{refetchQueries:function(){return["individualDiscounts"]}}),S=Object(l.a)(N,2),I=S[0],F=S[1].error,L=function(e){var t=A.a(["customers"])(k);return Da.a(W.a("id",e))(t)},P=Object(u.b)(DL,{onError:function(e){var t=e.message;b(null!==t&&void 0!==t?t:"Error while deleting row")},onCompleted:function(){return i(!1)},refetchQueries:function(){return["individualDiscounts"]}}),R=Object(l.a)(P,1)[0],T=[{header:"Identification",width:312,textAlign:"left",size:"sm",view:function(t){var n=L(t.customerId);return Object(ze.jsxs)("div",{className:e.identification,children:[Object(ze.jsx)(oj,{}),Object(ze.jsx)("span",{children:n.phone})]})}},{header:"Name",width:300,textAlign:"left",size:"sm",view:function(e){var t,n,a=L(e.customerId);return D.a(a.idCardData)?Object(ze.jsx)(ze.Fragment,{children:"-"}):Object(ze.jsx)(ze.Fragment,{children:"".concat(null!==(t=a.idCardData.firstName)&&void 0!==t?t:"").concat(a.idCardData.firstName&&a.idCardData.lastName?" ":"").concat(null!==(n=a.idCardData.lastName)&&void 0!==n?n:"")})}},{header:"Discount rate",width:220,textAlign:"left",size:"sm",view:function(e){return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(et,{inline:!0,children:e.discount})," %"]})}},{header:"Revoke",width:100,textAlign:"center",size:"sm",view:function(e){return Object(ze.jsx)(Qn,{onClick:function(){i(!0),d({variables:{discountId:e.id}})},children:Object(ze.jsx)(xh,{})})}}],B=w||E;return Object(ze.jsxs)(ze.Fragment,{children:[!B&&!Ta.a(y.individualDiscounts)&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Yo.a,{marginBottom:4,marginTop:-7,className:e.tableWidth,display:"flex",justifyContent:"flex-end",children:Object(ze.jsx)(na,{color:"primary",onClick:x,children:"Add new code"})}),Object(ze.jsx)(vy,{elements:T,data:A.a(["individualDiscounts"])(y)}),Object(ze.jsx)(Km,{open:r,onDismissed:function(){i(!1),b(null)},onConfirmed:function(){b(null),R(s)},errorMessage:p})]}),!B&&Ta.a(y.individualDiscounts)&&Object(ze.jsxs)(Yo.a,{display:"flex",alignItems:"left",flexDirection:"column",children:[Object(ze.jsx)(rt,{children:"It seems there are no active individual customer discounts on your network."}),Object(ze.jsx)(Dn,{onClick:x,children:"Add individual discount"})]}),Object(ze.jsx)(FL,{showModal:g,setShowModal:O,onClose:function(){O(!1)},creationError:F,addDiscount:I,customers:A.a(["customers"])(k)})]})},AL={footer:{display:"flex",flexDirection:"row",margin:[["auto",0,24,0]]},modalLabel1:{marginTop:20},modalLabel2Wrapper:{marginTop:40,display:"flex",flexDirection:"row",justifyContent:"flex-start"},discountInput:{display:"flex",flexDirection:"row",alignItems:"flex-start"},inputLabel:{color:J,fontFamily:je,fontSize:24,marginLeft:8,marginTop:15},tableWidth:{width:620},error:{color:he},form:{display:"flex",flexDirection:"column",height:"100%"},submit:{margin:[["auto",0,0,"auto"]]}},ML=Object(f.a)(AL),WL={code:"",discount:""},zL=fn.f().shape({code:fn.h().required().trim().max(25),discount:fn.e().required().min(0).max(100)}),qL=function(e){var t=e.showModal,n=e.onClose,a=e.errorMsg,r=e.addCode,i=ML();return Object(ze.jsx)(ze.Fragment,{children:t&&Object(ze.jsx)(Qh,{title:"Add promo code discount",closeOnBackdropClick:!0,width:600,height:500,handleClose:n,open:!0,children:Object(ze.jsx)(un.e,{validateOnBlur:!1,validateOnChange:!1,initialValues:WL,validationSchema:zL,onSubmit:function(e){!function(e,t){r(Df.a(e),parseInt(t))}(e.code,e.discount)},children:Object(ze.jsxs)(un.d,{id:"promo-form",className:i.form,children:[Object(ze.jsx)(Ge,{className:i.modalLabel1,children:"Promo code name"}),Object(ze.jsx)(un.b,{name:"code",autoFocus:!0,size:"lg",autoComplete:"off",width:338,inputProps:{style:{textTransform:"uppercase"}},component:oi}),Object(ze.jsxs)("div",{className:i.modalLabel2Wrapper,children:[Object(ze.jsx)(Ge,{className:i.modalLabel2,children:"Define discount rate"}),Object(ze.jsxs)(Ep,{width:304,children:[Object(ze.jsx)(Ke,{children:"This is a percentage discount off of your existing commission rates for a customer entering this code at the machine."}),Object(ze.jsx)(Ke,{children:"For instance, if you charge 8% commissions, and this code is set for 50%, then you'll instead be charging 4% on transactions using the code."})]})]}),Object(ze.jsxs)("div",{className:i.discountInput,children:[Object(ze.jsx)(un.b,{name:"discount",size:"lg",autoComplete:"off",width:50,decimalScale:0,className:i.discountInputField,component:ai}),Object(ze.jsx)(et,{inline:!0,className:i.inputLabel,children:"%"})]}),Object(ze.jsxs)("div",{className:i.footer,children:[a&&Object(ze.jsx)(tl,{children:a}),Object(ze.jsx)(Dn,{type:"submit",form:"promo-form",className:i.submit,children:"Add code"})]})]})})})})},$L=Object(f.a)(AL),HL="Failed to save",VL=x()(iL||(iL=Object(c.a)(["\n query promoCodes {\n promoCodes {\n id\n code\n discount\n }\n }\n"]))),UL=x()(oL||(oL=Object(c.a)(["\n mutation deletePromoCode($codeId: ID!) {\n deletePromoCode(codeId: $codeId) {\n id\n }\n }\n"]))),GL=x()(lL||(lL=Object(c.a)(["\n mutation createPromoCode($code: String!, $discount: Int!) {\n createPromoCode(code: $code, discount: $discount) {\n id\n code\n discount\n }\n }\n"]))),XL=function(){var e=$L(),t=Object(a.useState)(!1),n=Object(l.a)(t,2),r=n[0],i=n[1],o=Object(a.useState)(),c=Object(l.a)(o,2),s=c[0],d=c[1],m=Object(a.useState)(!1),h=Object(l.a)(m,2),p=h[0],b=h[1],f=Object(a.useState)(null),j=Object(l.a)(f,2),g=j[0],O=j[1],x=function(){return b(!p)},v=Object(u.c)(VL),y=v.data,w=v.loading,C=Object(u.b)(UL,{onError:function(e){var t=e.message;O(null!==t&&void 0!==t?t:"Error while deleting row")},onCompleted:function(){return i(!1)},refetchQueries:function(){return["promoCodes"]}}),k=Object(l.a)(C,1)[0],E=Object(u.b)(GL,{refetchQueries:function(){return["promoCodes"]}}),N=Object(l.a)(E,1)[0],S=[{header:"Code",width:300,textAlign:"left",size:"sm",view:function(e){return e.code}},{header:"Discount",width:220,textAlign:"left",size:"sm",view:function(e){return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(et,{inline:!0,children:e.discount})," % in commissions"]})}},{header:"Delete",width:100,textAlign:"center",size:"sm",view:function(e){return Object(ze.jsx)(Qn,{onClick:function(){i(!0),d({variables:{codeId:e.id}})},children:Object(ze.jsx)(xh,{})})}}];return Object(ze.jsxs)(ze.Fragment,{children:[!w&&!Ta.a(y.promoCodes)&&Object(ze.jsx)(Yo.a,{marginBottom:4,marginTop:-7,className:e.tableWidth,display:"flex",justifyContent:"flex-end",children:Object(ze.jsx)(na,{color:"primary",onClick:x,children:"Add new code"})}),!w&&!Ta.a(y.promoCodes)&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(vy,{elements:S,data:A.a(["promoCodes"])(y)}),Object(ze.jsx)(Km,{open:r,onDismissed:function(){i(!1),O(null)},onConfirmed:function(){O(null),k(s)},errorMessage:g})]}),!w&&Ta.a(y.promoCodes)&&Object(ze.jsxs)(Yo.a,{display:"flex",alignItems:"left",flexDirection:"column",children:[Object(ze.jsx)(rt,{children:"Currently, there are no active promo codes on your network."}),Object(ze.jsx)(Dn,{onClick:x,children:"Add Code"})]}),Object(ze.jsx)(qL,{showModal:p,onClose:function(){O(null),b(!1)},errorMsg:g,addCode:function(e,t){O(null),N({variables:{code:e,discount:t}}).then((function(e){if(!e.errors)return b(!1);var t=dl.a((function(e){return F.a("duplicate",null===e||void 0===e?void 0:e.message)}))(e.errors);O(t?"There is already a promotion with that code!":HL)})).catch((function(e){O(HL),console.log(e)}))}})]})};function _L(){return(_L=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var ZL=a.createElement("desc",null,"Created with Sketch."),QL=a.createElement("g",{id:"Symbols",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{id:"pop-up/action/download-logs/date-range-copy-3",transform:"translate(-117.000000, -116.000000)",stroke:"#1B2559",strokeWidth:2},a.createElement("g",{id:"arrow-download-logs",transform:"translate(128.500000, 124.500000) rotate(-90.000000) translate(-128.500000, -124.500000) translate(121.000000, 114.000000)"},a.createElement("polyline",{id:"Path-3",points:"0 13.3571429 7.14285714 20.5 14.2857143 13.3571429"}),a.createElement("line",{x1:7.14285714,y1:.142857143,x2:7.14285714,y2:20.1428571,id:"Path-4"}))));function YL(e,t){var n=e.title,r=e.titleId,i=KL(e,["title","titleId"]);return a.createElement("svg",_L({width:"23px",height:"17px",viewBox:"0 0 23 17",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"arrow download logs"):n?a.createElement("title",{id:r},n):null,ZL,QL)}var JL=a.forwardRef(YL),eP=(n.p,n(922)),tP=n(969),nP=n(921),aP=n(942),rP=n(920),iP=n(966),oP=n(967),lP=n(968),cP=n(970);function sP(){return(sP=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var uP=a.createElement("desc",null,"Created with Sketch."),mP=a.createElement("g",{id:"Symbols",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"pop-up/action/download-logs/date-range-copy-2",transform:"translate(-20.000000, -187.000000)"},a.createElement("g",{id:"icon/sf-contain-b-copy-5",transform:"translate(30.000000, 197.000000) rotate(-270.000000) translate(-30.000000, -197.000000) translate(20.000000, 187.000000)"},a.createElement("g",{id:"icon/sf-small/wizzard",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{transform:"translate(6.666667, 6.000000)",id:"Group"},a.createElement("g",null,a.createElement("polyline",{id:"Path-3",stroke:"#1B2559",strokeWidth:2,points:"0 4.83333333 3.33333333 8.16666667 6.66666667 4.83333333"}),a.createElement("line",{x1:3.33333333,y1:.25,x2:3.33333333,y2:6.5,id:"Path-4",stroke:"#1B2559",strokeWidth:2})))))));function hP(e,t){var n=e.title,r=e.titleId,i=dP(e,["title","titleId"]);return a.createElement("svg",sP({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,uP,mP)}var pP=a.forwardRef(hP);n.p;function bP(){return(bP=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var jP=a.createElement("desc",null,"Created with Sketch."),gP=a.createElement("g",{id:"Symbols",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"pop-up/action/download-logs/date-range-copy-2",transform:"translate(-20.000000, -187.000000)"},a.createElement("g",{id:"icon/sf-contain-b-copy-5",transform:"translate(30.000000, 197.000000) rotate(270.000000) translate(-30.000000, -197.000000) translate(20.000000, 187.000000)"},a.createElement("g",{id:"icon/sf-small/wizzard",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{transform:"translate(6.666667, 6.000000)",id:"Group"},a.createElement("g",null,a.createElement("polyline",{id:"Path-3",stroke:"#1B2559",strokeWidth:2,points:"0 4.83333333 3.33333333 8.16666667 6.66666667 4.83333333"}),a.createElement("line",{x1:3.33333333,y1:.25,x2:3.33333333,y2:6.5,id:"Path-4",stroke:"#1B2559",strokeWidth:2})))))));function OP(e,t){var n=e.title,r=e.titleId,i=fP(e,["title","titleId"]);return a.createElement("svg",bP({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,jP,gP)}var xP,vP,yP,wP,CP=a.forwardRef(OP),kP=(n.p,{wrapper:{height:26,display:"flex",alignItems:"center",justifyContent:"center",position:"relative",overflow:"hidden"},button:{outline:"none",extend:Ae.label1,border:"none",cursor:"pointer",backgroundColor:"transparent",color:J,zIndex:2},lowerBound:{left:"50%"},upperBound:{right:"50%"},selected:{width:26,height:26,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:H,borderRadius:"50%",position:"absolute",zIndex:1},between:{position:"absolute",width:"100%",height:"100%",zIndex:0,backgroundColor:V},disabled:{color:oe,cursor:"default"}}),EP=Object(f.a)(kP),NP=function(e){var t,n,a,r=e.isLowerBound,i=e.isUpperBound,o=e.isBetween,l=e.isDisabled,c=e.children,s=(Object(q.a)(e,["isLowerBound","isUpperBound","isBetween","isDisabled","children"]),EP()),d=r||i,u=(t={},Object(z.a)(t,s.between,o&&!(r&&i)),Object(z.a)(t,s.lowerBound,r&&!i),Object(z.a)(t,s.upperBound,i&&!r),t),m=(n={},Object(z.a)(n,s.wrapper,!0),Object(z.a)(n,s.selected,d),n),h=(a={},Object(z.a)(a,s.button,!0),Object(z.a)(a,s.disabled,l),a);return Object(ze.jsxs)("div",{className:s.wrapper,children:[Object(ze.jsx)("div",{className:I()(u)}),Object(ze.jsx)("div",{className:I()(m),children:Object(ze.jsx)("button",{className:I()(h),children:c})})]})},SP={wrapper:{display:"flex",flexDirection:"column",alignItems:"center"},button:{outline:"none"},navbar:{extend:Ae.p,display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",padding:[[15,15]],color:J,"& button":{display:"flex",alignItems:"center",padding:0,border:"none",backgroundColor:G,cursor:"pointer",borderRadius:"50%",width:20,height:20,position:"relative",overflow:"hidden","& svg":{position:"absolute",left:0}}},table:{borderCollapse:"collapse",width:"100%",color:J,"& tr":{"&:first-child":{paddingLeft:5},"&:last-child":{paddingRight:5}},"& th, & td":{margin:0,padding:[[3,0,3,0]]},"& th":{extend:Ae.label2}}},IP=Object(f.a)(SP),FP=function(e){var t=e.minDate,n=e.maxDate,r=e.handleSelect,i=Object(q.a)(e,["minDate","maxDate","handleSelect"]),o=Object(a.useState)(new Date),c=Object(l.a)(o,2),s=c[0],d=c[1],u=IP(),m=Array.from(Array(7)).map((function(e,t){return Object(od.a)("EEEEE",Object(kd.a)({days:t},Object(Ed.a)(new Date)))})),h=function(e){var t=Object(ms.a)({months:1},e),n=Ru.a(0,Object(iP.a)(Object(oP.a)(e))).reverse(),a=R.a((function(e){return Object(ms.a)({days:e},Object(lP.a)(t))}))(n),r=Ru.a(0,function(e){return Object(rP.a)(e)}(e)),i=R.a((function(t){return Object(kd.a)({days:t},Object(oP.a)(e))}))(r),o=Object(kd.a)({months:1},e),l=Ru.a(0,42-a.length-i.length),c=R.a((function(e){return Object(kd.a)({days:e},Object(oP.a)(o))}))(l);return sl.a(sl.a(a,i),c)},p=function(e,t){return h(e).slice(7*t-7,7*t)};return Object(ze.jsxs)("div",{className:u.wrapper,children:[Object(ze.jsxs)("div",{className:u.navbar,children:[Object(ze.jsx)("button",{className:u.button,onClick:function(){return function(e){var n=Object(ms.a)({months:1},e);d(t?Object(tP.a)(t,n)||Object(nP.a)(t,n)>0?n:s:n)}(s)},children:Object(ze.jsx)(pP,{})}),Object(ze.jsx)("span",{children:"".concat(Object(od.a)("MMMM",s)," ").concat(Object(od.a)("yyyy",s))}),Object(ze.jsx)("button",{className:u.button,onClick:function(){return function(e){var t=Object(kd.a)({months:1},e);d(n?Object(tP.a)(n,t)||Object(nP.a)(t,n)>0?t:s:t)}(s)},children:Object(ze.jsx)(CP,{})})]}),Object(ze.jsxs)("table",{className:u.table,children:[Object(ze.jsx)("thead",{children:Object(ze.jsx)("tr",{children:m.map((function(e,t){return Object(ze.jsx)("th",{children:e},t)}))})}),Object(ze.jsx)("tbody",{children:Ru.a(1,8).map((function(e,a){return Object(ze.jsx)("tr",{children:p(s,e).map((function(e,a){return Object(ze.jsx)("td",{onClick:function(){return r(e,t,n)},children:Object(ze.jsx)(NP,{isDisabled:n&&Object(hs.a)(n,e)||t&&Object(hs.a)(e,t),isLowerBound:Object(cP.a)(i.from,e),isUpperBound:Object(cP.a)(i.to,e),isBetween:Object(hs.a)(i.from,e)&&Object(hs.a)(e,i.to),children:Object(od.a)("d",e)})},a)}))},a)}))})]})]})},LP=Object(f.a)({wrapper:{backgroundColor:"white",borderRadius:10}}),PP=function(e){var t=e.minDate,n=e.maxDate,r=e.className,i=e.onRangeChange,o=Object(a.useState)(null),c=Object(l.a)(o,2),s=c[0],d=c[1],u=Object(a.useState)(null),m=Object(l.a)(u,2),h=m[0],p=m[1];Object(a.useEffect)((function(){i(s,h)}),[s,i,h]);var b=LP();return Object(ze.jsx)(ze.Fragment,{children:Object(ze.jsx)("div",{className:I()(b.wrapper,r),children:Object(ze.jsx)(FP,{from:s,to:h,minDate:t,maxDate:n,handleSelect:function(e,t,n){if(!(n&&Object(eP.a)(n,e)>0||t&&Object(eP.a)(e,t)>0))return s&&!h&&Object(eP.a)(e,s)>0?(p(s),void d(e)):void(s&&!h&&(Object(tP.a)(s,e)||Object(nP.a)(s,e)>0)?p(Object(aP.a)({hours:23,minutes:59,seconds:59,milliseconds:999},e)):(d(e),p(null)))}})})})},DP=Ae.label1,RP=Ae.h4,TP={wrapper:{height:46,width:99},container:{display:"flex"},monthWeekDayContainer:{display:"flex",flexDirection:"column"},label:{extend:DP,lineHeight:1.33,color:J},bigNumber:{extend:Ae.info1,lineHeight:1,marginRight:7},monthYear:{extend:Ae.label2,lineHeight:1.17,color:J},weekDay:{extend:DP,lineHeight:1.33,color:se}},BP=Object(f.a)(TP),AP=function(e){var t=e.date,n=e.children,a=(Object(q.a)(e,["date","children"]),BP());return Object(ze.jsxs)("div",{className:a.wrapper,children:[Object(ze.jsx)("div",{className:a.label,children:n}),t&&Object(ze.jsx)(ze.Fragment,{children:Object(ze.jsxs)("div",{className:a.container,children:[Object(ze.jsx)("div",{className:a.bigNumber,children:Object(od.a)("d",t)}),Object(ze.jsxs)("div",{className:a.monthWeekDayContainer,children:[Object(ze.jsx)("span",{className:a.monthYear,children:"".concat(Object(od.a)("MMM",t)," ").concat(Object(od.a)("yyyy",t))}),Object(ze.jsx)("span",{className:a.weekDay,children:Object(od.a)("EEEE",t)})]})]})})]})},MP={popoverContent:{width:280},popoverHeader:{extend:RP,padding:[[15,15,0,15]]},radioButtonsContainer:{padding:[[5,15,5,15]]},radioButtons:{display:"flex",justifyContent:"space-between",flexDirection:"row",color:J},dateRangePickerShowing:{display:"block",height:"100%"},dateRangePickerHidden:{display:"none",height:0},download:{padding:[[10,15]]},dateContainerWrapper:{display:"flex",justifyContent:"space-between",alignItems:"center",position:"relative",backgroundColor:G,padding:[[0,15]],minHeight:70},arrowContainer:{position:"absolute",left:125,top:26},arrow:{margin:"auto"}},WP=Object(f.a)(MP),zP="all",qP="range",$P="advanced",HP="simplified",VP=function(e){var t,n=e.name,r=e.query,i=e.args,o=e.title,c=e.getLogs,d=e.timezone,m=e.simplified,h=Object(a.useState)(zP),p=Object(l.a)(h,2),b=p[0],f=p[1],j=Object(a.useState)($P),g=Object(l.a)(j,2),O=g[0],x=g[1],v=Object(a.useState)({from:null,until:null}),y=Object(l.a)(v,2),w=y[0],C=y[1],k=Object(a.useState)(null),N=Object(l.a)(k,2),S=N[0],F=N[1],L=Object(u.a)(r,{onCompleted:function(e){return B(c(e),w)}}),P=Object(l.a)(L,1)[0],D=WP(),R=(t={},Object(z.a)(t,D.dateRangePickerShowing,b===qP),Object(z.a)(t,D.dateRangePickerHidden,b===zP),t),T=Object(a.useCallback)((function(e,t){C({from:e,until:t})}),[C]),B=function(e,t){var a=function(e){return sd(e,d,"yyyy-MM-dd_HH-mm")},r=new window.Blob([e],{type:"text/plain;charset=utf-8"});Mf.a.saveAs(r,b===zP?"".concat(a(new Date),"_").concat(n,".csv"):"".concat(a(t.from),"_").concat(a(t.until),"_").concat(n,".csv"))},M=[{display:"All logs",code:zP},{display:"Date range",code:qP}],W=[{display:"Advanced logs",code:$P},{display:"Simplified logs",code:HP}],q=Boolean(S),$=q?"date-range-popover":void 0;return Object(ze.jsx)(E.a,{onClickAway:function(){F(null)},children:Object(ze.jsxs)("div",{children:[Object(ze.jsx)(zn,{Icon:Pj,InverseIcon:wj,onClick:function(e){F(S?null:e.currentTarget)},variant:"contained"}),Object(ze.jsx)(Hn,{id:$,open:q,anchorEl:S,placement:"bottom",children:Object(ze.jsxs)("div",{className:D.popoverContent,children:[Object(ze.jsx)("div",{className:D.popoverHeader,children:o}),Object(ze.jsx)("div",{className:D.radioButtonsContainer,children:Object(ze.jsx)(yr,{name:"logs-select",value:b,options:M,ariaLabel:"logs-select",onChange:function(e){var t=A.a(["target","value"])(e);f(t),t===zP&&C({from:null,until:null})},className:D.radioButtons})}),b===qP&&Object(ze.jsxs)("div",{className:I()(R),children:[Object(ze.jsx)("div",{className:D.dateContainerWrapper,children:w&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(AP,{date:w.from,children:"From"}),Object(ze.jsx)("div",{className:D.arrowContainer,children:Object(ze.jsx)(JL,{className:D.arrow})}),Object(ze.jsx)(AP,{date:w.until,children:"To"})]})}),Object(ze.jsx)(PP,{maxDate:new Date,onRangeChange:T})]}),m&&Object(ze.jsx)("div",{className:D.radioButtonsContainer,children:Object(ze.jsx)(yr,{name:"simplified-tx-logs",value:O,options:W,ariaLabel:"simplified-tx-logs",onChange:function(e){var t=A.a(["target","value"])(e);x(t)},className:D.radioButtons})}),Object(ze.jsx)("div",{className:D.download,children:Object(ze.jsx)(na,{color:"primary",onClick:function(){return function(e,t){b===zP&&P({variables:Object(s.a)(Object(s.a)({},t),{},{simplified:O===HP,excludeTestingCustomers:!0})}),e&&e.from&&(e.from&&!e.until&&(e.until=new Date),b===qP&&P({variables:Object(s.a)(Object(s.a)({},t),{},{from:e.from,until:e.until,simplified:O===HP,excludeTestingCustomers:!0})}))}(w,i)},children:"Download"})})]})})]})})},UP=Object(f.a)(xf),GP=x()(xP||(xP=Object(c.a)(["\n {\n machines {\n name\n deviceId\n }\n }\n"]))),XP=x()(vP||(vP=Object(c.a)(["\n query MachineLogs(\n $deviceId: ID!\n $limit: Int\n $from: Date\n $until: Date\n $timezone: String\n ) {\n machineLogsCsv(\n deviceId: $deviceId\n limit: $limit\n from: $from\n until: $until\n timezone: $timezone\n )\n }\n"]))),_P=x()(yP||(yP=Object(c.a)(["\n query MachineLogs($deviceId: ID!, $limit: Int, $from: Date, $until: Date) {\n machineLogs(\n deviceId: $deviceId\n limit: $limit\n from: $from\n until: $until\n ) {\n logLevel\n id\n timestamp\n message\n }\n }\n"]))),KP=x()(wP||(wP=Object(c.a)(["\n query getData {\n config\n }\n"]))),ZP=function(){var e,t,n=UP(),r=Object(a.useState)(null),i=Object(l.a)(r,2),o=i[0],c=i[1],s=Object(a.useState)(null),d=Object(l.a)(s,2),m=d[0],h=d[1],p=null===o||void 0===o?void 0:o.deviceId,b=Object(u.c)(GP),f=b.data,j=b.loading,g=Object(u.c)(KP),O=g.data,x=g.loading,v=A.a(["config","locale_timezone"],O),y=Object(u.c)(_P,{variables:{deviceId:p,limit:500},skip:!o,onCompleted:function(){return h("")}}),w=y.data,C=y.loading;(null===f||void 0===f||null===(e=f.machines)||void 0===e?void 0:e.length)&&!o&&c(null===f||void 0===f?void 0:f.machines[0]);var k=j||x||C;return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)("div",{className:n.titleWrapper,children:Object(ze.jsxs)("div",{className:n.titleAndButtonsContainer,children:[Object(ze.jsx)(gn,{children:"Machine Logs"}),w&&Object(ze.jsxs)("div",{className:n.buttonsWrapper,children:[Object(ze.jsx)(VP,{title:"Download logs",name:o.name,query:XP,args:{deviceId:p,timezone:v},getLogs:function(e){return A.a(["machineLogsCsv"])(e)},timezone:v}),Object(ze.jsx)(Ye,{children:m})]})]})}),Object(ze.jsxs)("div",{className:n.wrapper,children:[Object(ze.jsx)(ki,{displayName:function(e){return e.name},data:(null===f||void 0===f?void 0:f.machines)||[],isSelected:function(e){return A.a(["deviceId"])(o)===e.deviceId},onClick:c}),Object(ze.jsxs)("div",{className:n.tableWrapper,children:[Object(ze.jsxs)(Es,{className:n.table,children:[Object(ze.jsx)(Fs,{children:Object(ze.jsxs)(As,{header:!0,children:[Object(ze.jsx)(Ds,{className:n.dateColumn,children:"Date"}),Object(ze.jsx)(Ds,{className:n.levelColumn,children:"Level"}),Object(ze.jsx)(Ds,{className:n.fillColumn})]})}),Object(ze.jsx)(Ns,{children:w&&w.machineLogs.map((function(e,t){return Object(ze.jsxs)(As,{size:"sm",children:[Object(ze.jsx)(Is,{children:v&&sd(e.timestamp,v,"yyyy-MM-dd HH:mm")}),Object(ze.jsx)(Is,{children:e.logLevel}),Object(ze.jsx)(Is,{children:e.message})]},t)}))})]}),k&&Object(ze.jsx)(Xe,{children:"Loading..."}),!k&&!(null===w||void 0===w||null===(t=w.machineLogs)||void 0===t?void 0:t.length)&&Object(ze.jsx)(Xe,{children:"No activity so far"})]})]})]})};function QP(){return(QP=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var JP=a.createElement("desc",null,"Created with Sketch."),eD=a.createElement("g",{id:"icon/sf-small/clock/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{id:"Group-7",stroke:"#FFFFFF",strokeWidth:2},a.createElement("path",{d:"M0,10 C0,15.522 4.478,20 10,20 C15.522,20 20,15.522 20,10 C20,4.478 15.522,0 10,0 C7.749,0 5.671,0.744 4,1.999",id:"Stroke-1"}),a.createElement("polyline",{id:"Stroke-3",points:"13 11 10 11.063 10 7"}),a.createElement("polyline",{id:"Stroke-5",points:"3 0 3 3 5 4"})));function tD(e,t){var n=e.title,r=e.titleId,i=YP(e,["title","titleId"]);return a.createElement("svg",QP({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,JP,eD)}var nD=a.forwardRef(tD);n.p;function aD(){return(aD=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var iD=a.createElement("desc",null,"Created with Sketch."),oD=a.createElement("g",{id:"icon/sf-small/clock/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{id:"Group-7",stroke:"#1B2559",strokeWidth:2},a.createElement("path",{d:"M0,10 C0,15.522 4.478,20 10,20 C15.522,20 20,15.522 20,10 C20,4.478 15.522,0 10,0 C7.749,0 5.671,0.744 4,1.999",id:"Stroke-1"}),a.createElement("polyline",{id:"Stroke-3",points:"13 11 10 11.063 10 7"}),a.createElement("polyline",{id:"Stroke-5",points:"3 0 3 3 5 4"})));function lD(e,t){var n=e.title,r=e.titleId,i=rD(e,["title","titleId"]);return a.createElement("svg",aD({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,iD,oD)}var cD,sD,dD,uD,mD,hD=a.forwardRef(lD),pD=(n.p,{cashbox:{height:36},tBody:{maxHeight:"65vh",overflow:"auto"},tableWidth:{display:"flex",alignItems:"center",marginRight:1},descriptions:{color:se,marginTop:0},cashboxReset:{color:se,margin:[[13,0,-5,20]]},selection:{marginRight:12}}),bD={footerLabel:{color:$,alignSelf:"center"},footerContent:{width:1200,maxHeight:64,display:"flex",justifyContent:"space-around",position:"fixed"},footerContainer:{position:"fixed",height:64,left:0,bottom:0,width:"100vw",backgroundColor:"white",display:"flex",justifyContent:"space-around",boxShadow:[[0,-1,10,0,"rgba(50, 50, 50, 0.1)"]]},flex:{display:"flex"},icon:{alignSelf:"center",height:20,width:20,marginRight:8},iconLabel:{alignSelf:"center",marginRight:8},valueDisplay:{alignSelf:"center"}},fD=Object(f.a)(bD),jD=function(e){var t=e.machines,n=e.config,a=e.currencyCode,r=e.bills,i=(e.deviceIds,fD()),o=n&&os("cashOut")(n),l=function(e){return os(e)(o)},c=ps.a(bs.a((function(e,t){var n,a,r,i,o=t.cassette1,c=t.cassette2,s=t.cassette3,d=t.cassette4,u=t.id,m=null!==(n=l(u).cassette1)&&void 0!==n?n:0,h=null!==(a=l(u).cassette2)&&void 0!==a?a:0,p=null!==(r=l(u).cassette3)&&void 0!==r?r:0,b=null!==(i=l(u).cassette4)&&void 0!==i?i:0;return[e[0]+=o*m,e[1]+=c*h,e[2]+=s*p,e[3]+=d*b]}),[0,0,0,0],t)),s=ps.a(R.a((function(e){return e.fiat}))(r)),d=new zc.a(c+s).toFormat(0);return Object(ze.jsx)("div",{className:i.footerContainer,children:Object(ze.jsxs)("div",{className:i.footerContent,children:[Object(ze.jsx)(Ye,{className:i.footerLabel,children:"Cash value in System"}),Object(ze.jsxs)("div",{className:i.flex,children:[Object(ze.jsx)(Fc,{className:i.icon}),Object(ze.jsx)(Qe,{className:i.iconLabel,children:"Cash-in:"}),Object(ze.jsxs)(Ze,{className:i.valueDisplay,children:[Hr(s)," ",a]})]}),Object(ze.jsxs)("div",{className:i.flex,children:[Object(ze.jsx)(Ac,{className:i.icon}),Object(ze.jsx)(Qe,{className:i.iconLabel,children:"Cash-out:"}),Object(ze.jsxs)(Ze,{className:i.valueDisplay,children:[Hr(c)," ",a]})]}),Object(ze.jsxs)("div",{className:i.flex,children:[Object(ze.jsx)(Qe,{className:i.iconLabel,children:"Total:"}),Object(ze.jsxs)(Ze,{className:i.valueDisplay,children:[Hr(d)," ",a]})]})]})})},gD=n(458),OD=x()(cD||(cD=Object(c.a)(["\n query cashboxBatches {\n cashboxBatches {\n id\n deviceId\n created\n operationType\n customBillCount\n performedBy\n bills {\n fiat\n deviceId\n created\n }\n }\n }\n"]))),xD=x()(sD||(sD=Object(c.a)(["\n query getData {\n config\n }\n"]))),vD=Object(f.a)({operationType:{marginLeft:8},operationTypeWrapper:{display:"flex",flexDirection:"row",alignItems:"center"},saveAndCancel:{display:"flex",flexDirection:"row",justifyContent:"space-between"}}),yD=function(e){var t=e.machines,n=e.currency,a=vD(),r=Object(u.c)(OD),i=r.data,o=r.loading,l=Object(u.c)(xD),c=l.data,s=l.loading,d=A.a(["config","locale_timezone"],c),m=o||s,h=A.a(["cashboxBatches"])(i),p=bs.a((function(e,t){return Lu.a(gD.a("cash-cassette-".concat(t,"-refill"),Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Ac,{}),Object(ze.jsxs)("span",{className:a.operationType,children:["Cash cassette ",t," refill"]})]})),gD.a("cash-cassette-".concat(t,"-empty"),Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Ac,{}),Object(ze.jsxs)("span",{className:a.operationType,children:["Cash cassette ",t," emptied"]})]})))(e)}),{"cash-box-empty":Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Fc,{}),Object(ze.jsx)("span",{className:a.operationType,children:"Cash box emptied"})]})},Ru.a(1,5)),b=[{name:"operation",header:"Operation",width:200,textAlign:"left",view:function(e){return Object(ze.jsx)("div",{className:a.operationTypeWrapper,children:p[e.operationType]})}},{name:"machine",header:"Machine",width:200,textAlign:"left",view:function(e){return Da.a(W.a("id",e.deviceId))(t).name}},{name:"billCount",header:"Bill Count",width:115,textAlign:"left",input:ai,inputProps:{decimalPlaces:0},view:function(e){return D.a(e.customBillCount)?e.bills.length:e.customBillCount}},{name:"total",header:"Total",width:180,textAlign:"right",view:function(e){return Object(ze.jsxs)("span",{children:[ps.a(R.a((function(e){return T.a("fiat",e)}),e.bills))," ",n]})}},{name:"date",header:"Date",width:135,textAlign:"right",view:function(e){return sd(e.created,d,"yyyy-MM-dd")}},{name:"time",header:"Time (h:m)",width:125,textAlign:"right",view:function(e){return sd(e.created,d,"HH:mm")}}];return Object(ze.jsx)(vy,{loading:m,name:"cashboxHistory",elements:b,data:h,emptyText:"No cashbox batches so far"})},wD=Object(f.a)(pD),CD={2:{machine:250,cashbox:260,cassette:300,cassetteGraph:80,editWidth:90},3:{machine:220,cashbox:215,cassette:225,cassetteGraph:60,editWidth:90},4:{machine:190,cashbox:180,cassette:185,cassetteGraph:50,editWidth:90}},kD=fn.f().shape({name:fn.h().required(),cashbox:fn.e().label("Cash box").required().integer().min(0).max(1e3),cassette1:fn.e().label("Cassette 1").required().integer().min(0).max(500),cassette2:fn.e().label("Cassette 2").required().integer().min(0).max(500),cassette3:fn.e().label("Cassette 3").required().integer().min(0).max(500),cassette4:fn.e().label("Cassette 4").required().integer().min(0).max(500)}),ED=x()(dD||(dD=Object(c.a)(["\n query getData($billFilters: JSONObject) {\n machines {\n name\n id: deviceId\n cashbox\n cassette1\n cassette2\n cassette3\n cassette4\n numberOfCassettes\n }\n config\n bills(filters: $billFilters) {\n id\n fiat\n created\n deviceId\n }\n }\n"]))),ND=x()(uD||(uD=Object(c.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"]))),SD=x()(mD||(mD=Object(c.a)(["\n mutation MachineAction(\n $deviceId: ID!\n $action: MachineAction!\n $cashbox: Int!\n $cassette1: Int!\n $cassette2: Int!\n $cassette3: Int!\n $cassette4: Int!\n ) {\n machineAction(\n deviceId: $deviceId\n action: $action\n cashbox: $cashbox\n cassette1: $cassette1\n cassette2: $cassette2\n cassette3: $cassette3\n cassette4: $cassette4\n ) {\n deviceId\n cashbox\n cassette1\n cassette2\n cassette3\n cassette4\n }\n }\n"]))),ID=function(){var e,t,n,r,i,o,c,m=wD(),h=Object(a.useState)(!1),p=Object(l.a)(h,2),b=p[0],f=p[1],j=Object(a.useState)(null),g=Object(l.a)(j,2),O=g[0],x=g[1],v=Object(a.useState)(null),y=Object(l.a)(v,2),w=y[0],C=y[1],k=Object(u.c)(ED,{variables:{billFilters:{batch:"none"}}}),E=k.data,N=k.loading,S=Object(a.useState)(!1),I=Object(l.a)(S,2),F=I[0],L=I[1],P=Object(a.useState)(""),D=Object(l.a)(P,2),B=D[0],M=D[1],z=null!==(e=A.a(["machines"])(E))&&void 0!==e?e:[],q=null!==(t=A.a(["config"])(E))&&void 0!==t?t:{},$=os("notifications",q),H=Object(u.b)(SD,{refetchQueries:function(){return["getData"]}}),V=Object(l.a)(H,2),U=V[0],G=V[1].error,X=Object(u.b)(ND,{onCompleted:function(){return x(!1)},refetchQueries:function(){return["getData"]}}),_=Object(l.a)(X,1)[0],K=by.a((function(e){return e.deviceId}))(null!==(n=A.a(["bills"])(E))&&void 0!==n?n:[]),Z=Dg.a(R.a(T.a("deviceId"))(null!==(r=A.a(["bills"])(E))&&void 0!==r?r:[])),Q=(null===E||void 0===E?void 0:E.config)&&os("cashOut")(E.config),Y=(null===E||void 0===E?void 0:E.config)&&os("locale")(E.config),J=null===Y||void 0===Y?void 0:Y.fiatCurrency,ee=Math.max.apply(Math,Object(d.a)(R.a((function(e){return e.numberOfCassettes}),z)).concat([0])),te=function(e){return os(e)(Q)},ne=(null===E||void 0===E?void 0:E.config)&&os("cashIn")(E.config).cashboxReset,ae=function(e){e&&(!function(e){var t=ls("cashIn")(e);_({variables:{config:t}})}({cashboxReset:e}),x(!1))},re=[{display:"Automatic",code:"automatic"},{display:"Manual",code:Jh}],ie=function(e){var t=A.a(["target","value"])(e);C(t)},oe=[{name:"name",header:"Machine",width:null===(i=CD[ee])||void 0===i?void 0:i.machine,view:function(e){return Object(ze.jsx)(ze.Fragment,{children:e})},input:function(e){var t=e.field.value;return Object(ze.jsx)(ze.Fragment,{children:t})}},{name:"cashbox",header:"Cash box",width:null===(o=CD[ee])||void 0===o?void 0:o.cashbox,view:function(e,t){var n,a=t.id;return Object(ze.jsx)(Qr,{currency:{code:J},notes:e,total:ps.a(R.a((function(e){return e.fiat}),null!==(n=K[a])&&void 0!==n?n:[]))})},input:ai,inputProps:{decimalPlaces:0}}];return rm.a(im.a(om.a,ee),(function(e){var t,n;return oe.push({name:"cassette".concat(e),header:"Cassette ".concat(e),width:null===(t=CD[ee])||void 0===t?void 0:t.cassette,stripe:!0,doubleHeader:"Cash-out",view:function(t,n){var a,r,i=n.id;return Object(ze.jsx)(Yr,{className:m.cashbox,denomination:null===(a=te(i))||void 0===a?void 0:a["cassette".concat(e)],currency:{code:J},notes:t,width:null===(r=CD[ee])||void 0===r?void 0:r.cassetteGraph,threshold:$["fillingPercentageCassette".concat(e)]})},isHidden:function(t){var n=t.numberOfCassettes;return e>n},input:ei,inputProps:{decimalPlaces:0,width:null===(n=CD[ee])||void 0===n?void 0:n.cassetteGraph,inputClassName:m.cashbox}}),lm.a(1,e)}),1),oe.push({name:"edit",header:"Edit",width:null===(c=CD[ee])||void 0===c?void 0:c.editWidth,textAlign:"center",view:function(e,t){var n=t.id;return Object(ze.jsx)(Qn,{onClick:function(){M(n),L(!0)},children:Object(ze.jsx)(Ph,{})})}}),!N&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(rl,{title:"Cash Boxes & Cassettes",buttons:[{text:"Cash box history",icon:hD,inverseIcon:nD,toggle:f}],iconClassName:m.listViewButton,className:m.tableWidth,children:!b&&Object(ze.jsxs)(Yo.a,{alignItems:"center",justifyContent:"flex-end",children:[Object(ze.jsx)(nt,{className:m.cashboxReset,children:"Cash box resets"}),Object(ze.jsxs)(Yo.a,{display:"flex",alignItems:"center",justifyContent:"end",mr:"-4px",children:[ne&&Object(ze.jsx)(Ke,{className:m.selection,children:Wm(ne)}),Object(ze.jsx)(Qn,{onClick:function(){return x(!0)},className:m.button,children:Object(ze.jsx)(Ph,{})})]})]})}),!b&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Xh,{error:null===G||void 0===G?void 0:G.message,name:"cashboxes",stripeWhen:function(e){var t=e.id;return!te(t).active},elements:oe,data:z,validationSchema:kD,tbodyWrapperClass:m.tBody}),E&&Ta.a(z)&&Object(ze.jsx)(Cs,{message:"No machines so far"})]}),b&&Object(ze.jsx)(yD,{machines:z,currency:J}),Object(ze.jsx)(jD,{currencyCode:J,machines:z,config:q,bills:A.a(["bills"])(E),deviceIds:Z}),F&&Object(ze.jsx)($p,{machine:Da.a(W.a("id",B),z),cashoutSettings:te(B),onClose:function(){L(!1)},error:null===G||void 0===G?void 0:G.message,save:function(e,t,n){return U({variables:Object(s.a)({action:"setCassetteBills",deviceId:e,cashbox:t},n)})},locale:Y}),O&&Object(ze.jsxs)(Qh,{title:"Cash box resets",width:478,handleClose:function(){return x(null)},open:!0,children:[Object(ze.jsx)(Ke,{className:m.descriptions,children:"We can automatically assume you emptied a bill validator's cash box when the machine detects that it has been removed."}),Object(ze.jsx)(yr,{name:"set-automatic-reset",value:null!==w&&void 0!==w?w:ne,options:[re[0]],onChange:ie,className:m.radioButtons}),Object(ze.jsx)(Ke,{className:m.descriptions,children:"Assume the cash box is emptied whenever it's removed, creating a new batch on the history screen and setting its current balance to zero."}),Object(ze.jsx)(yr,{name:"set-manual-reset",value:null!==w&&void 0!==w?w:ne,options:[re[1]],onChange:ie,className:m.radioButtons}),Object(ze.jsx)(Ke,{className:m.descriptions,children:"Cash boxes won't be assumed emptied when removed, nor their counts modified. Instead, to update the count and create a new batch, you'll click the 'Edit' button on this panel."}),Object(ze.jsx)(Gm.a,{className:m.actions,children:Object(ze.jsx)(Dn,{onClick:function(){return ae(w)},children:"Confirm"})})]})]})},FD=n(923);function LD(){return(LD=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var DD=a.createElement("rect",{width:12,height:12,rx:3,ry:3,fill:"#ff7311"});function RD(e,t){var n=e.title,r=e.titleId,i=PD(e,["title","titleId"]);return a.createElement("svg",LD({width:12,height:12,viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,DD)}var TD=a.forwardRef(RD);n.p;function BD(){return(BD=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var MD=a.createElement("rect",{width:12,height:12,rx:3,ry:3,fill:"#ff584a"});function WD(e,t){var n=e.title,r=e.titleId,i=AD(e,["title","titleId"]);return a.createElement("svg",BD({width:12,height:12,viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,MD)}var zD,qD,$D,HD,VD=a.forwardRef(WD),UD=(n.p,{douro1:"Douro",sintra:"Sintra",gaia:"Gaia"}),GD=Object(s.a)(Object(s.a)({},wf),{},{wrapper:{display:"flex",marginTop:12,marginBottom:16,fontSize:ye},row:{display:"flex",flexDirection:"row"},list:{padding:0,margin:0,listStyle:"none"},item:{height:24,marginBottom:12},link:{color:J,textDecoration:"none"},separator:{width:1,height:170,zIndex:1,marginRight:60,marginLeft:"auto",background:Object(Yn.fade)($,.5)}}),XD=Object(f.a)(Cf),_D=function(e){var t=e.children,n=XD();return Object(ze.jsx)("div",{className:n.label,children:t})},KD=Object(f.a)(GD),ZD=function(e){var t=e.children,n=Object(q.a)(e,["children"]);return Object(ze.jsx)(h.a,Object(s.a)(Object(s.a)({container:!0,spacing:4},n),{},{children:t}))},QD=function(e){var t=e.children,n=Object(q.a)(e,["children"]);return Object(ze.jsx)(h.a,Object(s.a)(Object(s.a)({item:!0,xs:!0},n),{},{children:t}))},YD=function(e){var t=e.it,n=e.onActionSuccess,a=e.timezone,r=KD();return Object(ze.jsx)(ZD,{className:r.wrapper,children:Object(ze.jsx)(QD,{xs:!0,children:Object(ze.jsxs)(ZD,{className:r.row,children:[Object(ze.jsxs)(QD,{xs:2,children:[Object(ze.jsx)(_D,{children:"Machine Model"}),Object(ze.jsx)("span",{children:UD[t.model]})]}),Object(ze.jsxs)(QD,{xs:4,children:[Object(ze.jsx)(_D,{children:"Paired at"}),Object(ze.jsx)("span",{children:a&&sd(t.pairedAt,a,"yyyy-MM-dd HH:mm:ss")})]}),Object(ze.jsx)(QD,{xs:6,children:Object(ze.jsx)(mf,{machine:t,onActionSuccess:n})}),Object(ze.jsxs)(QD,{xs:2,children:[Object(ze.jsx)(_D,{children:"Network speed"}),Object(ze.jsx)("span",{children:t.downloadSpeed?new zc.a(t.downloadSpeed).toFixed(4).toString()+" MB/s":"unavailable"})]}),Object(ze.jsxs)(QD,{xs:2,children:[Object(ze.jsx)(_D,{children:"Latency"}),Object(ze.jsx)("span",{children:t.responseTime?new zc.a(t.responseTime).toFixed(3).toString()+" ms":"unavailable"})]}),Object(ze.jsxs)(QD,{xs:2,children:[Object(ze.jsx)(_D,{children:"Packet Loss"}),Object(ze.jsx)("span",{children:t.packetLoss?new zc.a(t.packetLoss).toFixed(3).toString()+" %":"unavailable"})]})]})})})},JD=x()(zD||(zD=Object(c.a)(["\n {\n machines {\n name\n deviceId\n lastPing\n pairedAt\n version\n paired\n cashbox\n cassette1\n cassette2\n version\n model\n statuses {\n label\n type\n }\n downloadSpeed\n responseTime\n packetLoss\n }\n }\n"]))),eR=x()(qD||(qD=Object(c.a)(["\n query getData {\n config\n }\n"]))),tR=Object(f.a)(kf),nR=function(){var e,t=tR(),n=Object(w.h)(),a=Object(w.i)().state,r=null===a||void 0===a?void 0:a.id,i=Object(u.c)(JD),o=i.data,l=i.refetch,c=i.loading,s=Object(u.c)(eR),d=s.data,m=s.configLoading,h=A.a(["config","locale_timezone"],d),p=[{header:"Machine Name",width:250,size:"sm",textAlign:"left",view:function(e){return Object(ze.jsxs)("div",{className:t.flexRow,children:[e.name,Object(ze.jsx)("div",{className:t.machineRedirectContainer,onClick:function(){n.push("/machines/".concat(e.deviceId))},children:Object(ze.jsx)(ju,{})})]})}},{header:"Status",width:350,size:"sm",textAlign:"left",view:function(e){return Object(ze.jsx)(Wu,{statuses:e.statuses})}},{header:"Last ping",width:200,size:"sm",textAlign:"left",view:function(e){return e.lastPing?Object(FD.a)(new Date(e.lastPing),new Date,{addSuffix:!0}):"unknown"}},{header:"Software Version",width:200,size:"sm",textAlign:"left",view:function(e){return e.version||"unknown"}}],b=null!==(e=A.a(["machines"])(o))&&void 0!==e?e:[],f=pl.a(W.a("deviceId",r))(b),j=c||m;return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsxs)("div",{className:t.titleWrapper,children:[Object(ze.jsx)("div",{className:t.titleAndButtonsContainer,children:Object(ze.jsx)(gn,{children:"Machine Status"})}),Object(ze.jsxs)("div",{className:t.headerLabels,children:[Object(ze.jsxs)("div",{children:[Object(ze.jsx)(TD,{}),Object(ze.jsx)("span",{children:"Warning"})]}),Object(ze.jsxs)("div",{children:[Object(ze.jsx)(VD,{}),Object(ze.jsx)("span",{children:"Error"})]})]})]}),Object(ze.jsx)(vy,{loading:j,elements:p,data:b,Details:function(e){var t=e.it;return Object(ze.jsx)(YD,{it:t,onActionSuccess:l,timezone:h})},initialExpanded:f,emptyText:"No machines so far",expandable:!0})]})},aR=r.a.createContext(),rR=Object(f.a)({header:{display:"flex",alignItems:"center",marginBottom:16,height:26,margin:0},title:{flexShrink:2,margin:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},button:{border:"none",backgroundColor:"transparent",cursor:"pointer",marginLeft:8},editingButtons:{display:"flex",flexShrink:0,marginLeft:16,justifyContent:"space-between",width:110}}),iR=function(e){var t=e.title,n=e.editing,a=e.disabled,r=e.setEditing,i=rR();return Object(ze.jsxs)("div",{className:i.header,children:[Object(ze.jsx)(Xe,{className:i.title,children:t}),!n&&Object(ze.jsx)(Qn,{onClick:function(){return r(!0)},className:i.button,disabled:a,children:a?Object(ze.jsx)(Eh,{}):Object(ze.jsx)(Ph,{})}),n&&Object(ze.jsxs)("div",{className:i.editingButtons,children:[Object(ze.jsx)(na,{color:"primary",type:"submit",children:"Save"}),Object(ze.jsx)(na,{color:"secondary",type:"reset",children:"Cancel"})]})]})},oR=Object(f.a)({text:{margin:[[7,0,7,1]]},fieldWrapper:{height:53},valueWrapper:{display:"flex",alignItems:"baseline"},label:{margin:0},decoration:{margin:[[0,0,0,7]]}}),lR=function(e){var t,n=e.label,a=e.name,r=e.editing,i=e.displayValue,o=e.decoration,l=e.className,c=e.decimalPlaces,s=void 0===c?0:c,d=e.width,u=void 0===d?80:d,m=oR({width:u,editing:r}),h=Object(un.f)().values,p=(t={},Object(z.a)(t,m.fieldWrapper,!0),Object(z.a)(t,"className",l),t);return Object(ze.jsxs)("div",{className:I()(p),children:[n&&Object(ze.jsx)(nt,{className:m.label,children:n}),Object(ze.jsxs)("div",{className:m.valueWrapper,children:[!r&&Object(ze.jsx)(Ze,{className:m.text,children:i(h[a])}),r&&Object(ze.jsx)(un.b,{id:a,size:"lg",fullWidth:!0,name:a,component:ai,textAlign:"right",width:u,decimalPlaces:s}),Object(ze.jsx)(tt,{className:m.decoration,children:o})]})]})},cR=function(e){var t,n=e.title,r=e.label,i=e.width,o=void 0===i?80:i,c=e.min,s=void 0===c?0:c,d=e.max,u=void 0===d?9999999:d,m=e.name,h=e.section,p=e.className,b=Object(a.useState)(!1),f=Object(l.a)(b,2),j=f[0],g=f[1],O=function(){var e=Object(Rl.a)(Dl.a.mark((function e(t,n){return Dl.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!j){e.next=2;break}return e.abrupt("return");case 2:return g(!0),e.next=5,v(t,n);case 5:g(!1);case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),x=Object(a.useContext)(aR),v=x.save,y=x.data,w=x.currency,C=x.isEditing,k=x.isDisabled,E=x.setEditing,N=fn.f().shape(Object(z.a)({},m,fn.e().transform($r).integer().min(s).max(u).nullable()));return Object(ze.jsx)(un.e,{validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,initialValues:Object(z.a)({},m,null!==(t=y&&y[m])&&void 0!==t?t:""),validationSchema:N,onSubmit:function(e){return O(h,N.cast(e))},onReset:function(){E(m,!1)},children:Object(ze.jsxs)(un.d,{className:p,children:[Object(ze.jsx)(bm,{}),Object(ze.jsx)(iR,{title:n,editing:C(m),disabled:k(m),setEditing:function(e){return E(m,e)}}),Object(ze.jsx)(lR,{label:r,name:m,editing:C(m),width:o,displayValue:function(e){return""===e?"-":e},decoration:w})]})})},sR="cryptoLowBalance",dR="cryptoHighBalance",uR=Object(f.a)({cryptoBalanceAlerts:{display:"flex",marginBottom:36,height:135,alignItems:"center"},cryptoBalanceAlertsForm:{width:222,marginRight:32},cryptoBalanceAlertsSecondForm:{marginLeft:50},vertSeparator:{width:1,height:"100%",borderRight:[[1,"solid","black"]]}}),mR=function(e){var t=e.section,n=e.fieldWidth,r=uR(),i=Object(a.useContext)(aR),o=i.data,l=i.save,c=i.currency,s=i.setEditing,d=i.isEditing,u=i.isDisabled;return Object(ze.jsxs)("div",{className:r.cryptoBalanceAlerts,children:[Object(ze.jsx)(cR,{name:sR,data:o,save:l,section:t,decoration:c,className:r.cryptoBalanceAlertsForm,title:"Default (Low Balance)",label:"Alert me under",editing:d(sR),disabled:u(sR),setEditing:function(e){return s(sR,e)},width:n}),Object(ze.jsx)("div",{className:r.vertSeparator}),Object(ze.jsx)(cR,{name:dR,data:o,section:t,save:l,decoration:c,className:r.cryptoBalanceAlertsSecondForm,title:"Default (High Balance)",label:"Alert me over",editing:d(dR),disabled:u(dR),setEditing:function(e){return s(dR,e)},width:n})]})},hR="highBalance",pR="lowBalance",bR="cryptoCurrency",fR="cryptoBalanceOverrides",jR=function(e){var t,n,r,i=e.section,o=Object(a.useContext)(aR),l=o.cryptoCurrencies,c=void 0===l?[]:l,s=o.data,d=o.save,u=o.error,m=o.currency,h=o.isDisabled,p=o.setEditing,b=null!==(t=null===s||void 0===s?void 0:s.cryptoBalanceOverrides)&&void 0!==t?t:[],f=R.a(T.a(bR))(b),j=M.a((function(e){return!hl.a(e.code,f)}))(c),g=(n={},Object(z.a)(n,bR,null),Object(z.a)(n,pR,""),Object(z.a)(n,hR,""),n),O=fn.f().shape((r={},Object(z.a)(r,bR,fn.h().label("Cryptocurrency").nullable().required()),Object(z.a)(r,pR,fn.e().label("Low Balance").when(hR,{is:function(e){return!e},then:fn.e().required()}).transform($r).integer().min(0).max(Yh).nullable()),Object(z.a)(r,hR,fn.e().label("High Balance").when(pR,{is:function(e){return!e},then:fn.e().required()}).transform($r).integer().min(0).max(Yh).nullable()),r),[pR,hR]),x=[{name:bR,header:"Cryptocurrency",width:166,size:"sm",view:function(e){return L.a(A.a(["display"]),Da.a(W.a("code",e)))(c)},input:Pr,inputProps:{options:function(e){return sl.a(j,function(e){var t=L.a(Da.a(W.a("code",null===e||void 0===e?void 0:e.cryptoCurrency)))(c);return t?[t]:[]}(e))},optionsLimit:null,valueProp:"code",labelProp:"display"}},{name:pR,width:155,textAlign:"right",bold:!0,input:ai,suffix:m,inputProps:{decimalPlaces:2}},{name:hR,width:155,textAlign:"right",bold:!0,input:ai,suffix:m,inputProps:{decimalPlaces:2}}];return Object(ze.jsx)(Xh,{name:fR,title:"Overrides",error:null===u||void 0===u?void 0:u.message,enableDelete:!0,enableEdit:!0,enableCreate:!0,save:function(e){return d(i,e)},initialValues:g,validationSchema:O,forceDisable:h(fR)||!c,data:b,elements:x,disableAdd:!(null===j||void 0===j?void 0:j.length),onDelete:function(e){var t={cryptoBalanceOverrides:um.a((function(t){return t.id===e}),b)};return d(t)},setEditing:function(e){return p(fR,e)}})},gR={wrapper:{display:"flex"},form:{marginBottom:36},title:{marginTop:0},row:{width:236,display:"grid",gridTemplateColumns:"repeat(2,1fr)",gridTemplateRows:"1fr",gridColumnGap:18,gridRowGap:0},col2:{width:136},cashboxLabel:{marginRight:4,fontSize:20},cashboxEmptyPart:{backgroundColor:"".concat(ae)}},OR=Object(f.a)(gR),xR="fiatBalanceAlerts",vR=function(e){var t,n,r,i,o=e.section,l=e.min,c=void 0===l?0:l,s=e.max,u=void 0===s?100:s,m=e.fieldWidth,h=void 0===m?80:m,p=Object(a.useContext)(aR),b=p.isEditing,f=p.isDisabled,j=p.setEditing,g=p.data,O=p.save,x=p.machines,v=void 0===x?[]:x,y=OR(),w=Math.max.apply(Math,Object(d.a)(R.a((function(e){return e.numberOfCassettes}),v)).concat([2])),C=b(xR),k=fn.f().shape({fillingPercentageCassette1:fn.e().transform($r).integer().min(c).max(u).nullable(),fillingPercentageCassette2:fn.e().transform($r).integer().min(c).max(u).nullable(),fiatBalanceCassette3:fn.e().transform($r).integer().min(c).max(u).nullable(),fiatBalanceCassette4:fn.e().transform($r).integer().min(c).max(u).nullable()});return Object(ze.jsx)(un.e,{validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,initialValues:{fillingPercentageCassette1:null!==(t=null===g||void 0===g?void 0:g.fillingPercentageCassette1)&&void 0!==t?t:"",fillingPercentageCassette2:null!==(n=null===g||void 0===g?void 0:g.fillingPercentageCassette2)&&void 0!==n?n:"",fillingPercentageCassette3:null!==(r=null===g||void 0===g?void 0:g.fillingPercentageCassette3)&&void 0!==r?r:"",fillingPercentageCassette4:null!==(i=null===g||void 0===g?void 0:g.fillingPercentageCassette4)&&void 0!==i?i:""},validationSchema:k,onSubmit:function(e){return O(o,k.cast(e))},onReset:function(){j(xR,!1)},children:function(e){var t=e.values;return Object(ze.jsxs)(un.d,{className:y.form,children:[Object(ze.jsx)(bm,{}),Object(ze.jsx)(iR,{title:"Cash out (Empty)",editing:C,disabled:f(xR),setEditing:function(e){return j(xR,e)}}),Object(ze.jsx)("div",{className:y.wrapper,children:R.a((function(e){var n;return Object(ze.jsx)(ze.Fragment,{children:Object(ze.jsxs)("div",{className:y.row,children:[Object(ze.jsx)(Zr,{labelClassName:y.cashboxLabel,emptyPartClassName:y.cashboxEmptyPart,percent:null!==(n=t["fillingPercentageCassette".concat(e+1)])&&void 0!==n?n:g["cassette".concat(e+1)],applyColorVariant:!0,applyFiatBalanceAlertsStyling:!0,omitInnerPercentage:!0,cashOut:!0}),Object(ze.jsxs)("div",{className:y.col2,children:[Object(ze.jsxs)(tt,{className:y.title,children:["Cassette ",e+1]}),Object(ze.jsx)(lR,{label:"Alert me under",name:"fillingPercentageCassette".concat(e+1),editing:C,displayValue:function(e){return""===e?"-":e},decoration:"%",width:h})]})]})})}),Pu.a(Du.a,w))})]})}})},yR="fillingPercentageCassette1",wR="fillingPercentageCassette2",CR="fillingPercentageCassette3",kR="fillingPercentageCassette4",ER="machine",NR="fiatBalanceOverrides",SR=[yR,wR,CR,kR],IR={2:{machine:230,cassette:250},3:{machine:216,cassette:270},4:{machine:210,cassette:204}},FR=function(e){var t,n,r,i=e.config,o=e.section,l=Object(a.useContext)(aR),c=l.machines,s=void 0===c?[]:c,u=l.data,m=l.save,h=l.isDisabled,p=l.setEditing,b=l.error,f=null!==(t=null===u||void 0===u?void 0:u.fiatBalanceOverrides)&&void 0!==t?t:[],j=R.a((function(e){return e.machine}),f),g=M.a((function(e){return!F.a(e.deviceId,j)&&function(e){return os(e)(i)}(e.deviceId).active}))(s),O=(n={},Object(z.a)(n,ER,null),Object(z.a)(n,yR,""),Object(z.a)(n,wR,""),Object(z.a)(n,CR,""),Object(z.a)(n,kR,""),n),x=Math.max.apply(Math,Object(d.a)(R.a((function(e){return e.numberOfCassettes}),s)).concat([0])),v=100,y=fn.f().shape((r={},Object(z.a)(r,ER,fn.h().label("Machine").nullable().required()),Object(z.a)(r,yR,fn.e().label("Cassette 1").transform($r).integer().min(0).max(v).nullable()),Object(z.a)(r,wR,fn.e().label("Cassette 2").transform($r).integer().min(0).max(v).nullable()),Object(z.a)(r,CR,fn.e().label("Cassette 3").transform($r).integer().min(0).max(v).nullable()),Object(z.a)(r,kR,fn.e().label("Cassette 4").transform($r).integer().min(0).max(v).nullable()),r)).test((function(e,t){var n=Um.a(SR,e);if(!SR.some((function(e){return!D.a(n[e])})))return t.createError({path:yR,message:"At least one of the cassettes must have a value"})})),w=[{name:ER,width:IR[x].machine,size:"sm",view:function(e){return L.a(A.a(["name"]),Da.a(W.a("deviceId",e)))(s)},input:Pr,inputProps:{options:function(e){return sl.a(g,function(e){var t=L.a(Da.a(W.a("deviceId",null===e||void 0===e?void 0:e.machine)))(s);return t?[t]:[]}(e))},valueProp:"deviceId",labelProp:"name"}}];return rm.a(im.a(om.a,x),(function(e){return w.push({name:"fillingPercentageCassette".concat(e),display:"Cash cassette ".concat(e),width:IR[x].cassette,textAlign:"right",doubleHeader:"Cash Cassette Empty",bold:!0,input:ai,suffix:"%",inputProps:{decimalPlaces:0},view:function(e){var t;return null!==(t=null===e||void 0===e?void 0:e.toString())&&void 0!==t?t:"\u2014"},isHidden:function(t){var n;return e>(null===(n=s.find((function(e){return e.deviceId===t.machine})))||void 0===n?void 0:n.numberOfCassettes)}}),lm.a(1,e)}),1),Object(ze.jsx)(Xh,{name:NR,title:"Overrides",error:null===b||void 0===b?void 0:b.message,enableDelete:!0,enableEdit:!0,enableCreate:!0,save:function(e){return m(o,y.cast(e))},initialValues:O,validationSchema:y,forceDisable:h(NR)||!s,data:f,elements:w,disableAdd:!(null===g||void 0===g?void 0:g.length),setEditing:function(e){return p(NR,e)}})},LR={balance:152,transactions:184,compliance:178,errors:142,security:152,active:263},PR=function(e){var t=e.namespace,n=e.forceDisable,r=e.shouldUpperCase,i=Object(a.useContext)(aR),o=i.data,l=i.save,c=L.a(l(null),ls(t)),s=os(t)(o),d=n||!s||!s.active,u=function(e){var t=e.name,n=e.disabled,a=!(!s||!s[t]);return Object(ze.jsx)(Em,{width:LR[t],textAlign:"center",children:Object(ze.jsx)(Er,{disabled:n,checked:a,onChange:function(e){c(Object(z.a)({},t,e.target.checked))},value:a})})};return Object(ze.jsxs)(Im,{children:[Object(ze.jsx)(Em,{width:229,children:r?Df.a(t):qm(t)}),Object(ze.jsx)(u,{name:"balance",disabled:d}),Object(ze.jsx)(u,{name:"transactions",disabled:d}),Object(ze.jsx)(u,{name:"compliance",disabled:d}),Object(ze.jsx)(u,{name:"errors",disabled:d}),Object(ze.jsx)(u,{name:"security",disabled:d}),Object(ze.jsx)(u,{name:"active",disabled:n})]})},DR=Object(f.a)({wizardTable:{width:930}}),RR=function(e){var t=e.wizard,n=e.forceDisable,a=t?20:0,r=DR();return Object(ze.jsxs)(ym,{className:t?r.wizardTable:null,children:[Object(ze.jsxs)(wm,{children:[Object(ze.jsx)(Nm,{width:229-a,children:"Channel"}),Object.keys(LR).map((function(e){return Object(ze.jsx)(Nm,{width:LR[e]-a,textAlign:"center",children:qm(e)},e)}))]}),Object(ze.jsxs)(km,{children:[Object(ze.jsx)(PR,{namespace:"email",forceDisable:n}),Object(ze.jsx)(PR,{namespace:"sms",shouldUpperCase:!0,forceDisable:n}),Object(ze.jsx)(PR,{namespace:"notificationCenter",forceDisable:n})]})]})},TR=function(e){var t=e.section,n=e.fieldWidth;return Object(ze.jsx)(cR,{section:t,title:"High value transaction",label:"Alert me over",name:"highValueTransaction",width:n})},BR=x()($D||($D=Object(c.a)(["\n query getData {\n config\n machines {\n name\n deviceId\n numberOfCassettes\n }\n cryptoCurrencies {\n code\n display\n }\n }\n"]))),AR=x()(HD||(HD=Object(c.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"]))),MR=function(e){var t=e.name,n=e.displaySetup,r=void 0===n||n,i=e.displayTransactionAlerts,o=void 0===i||i,c=e.displayFiatAlerts,s=void 0===c||c,d=e.displayCryptoAlerts,m=void 0===d||d,h=e.displayOverrides,p=void 0===h||h,b=e.displayTitle,f=void 0===b||b,j=e.wizard,g=void 0!==j&&j,O=Object(a.useState)(null),x=Object(l.a)(O,2),v=x[0],y=x[1],w=Object(a.useState)(null),C=Object(l.a)(w,2),k=C[0],E=C[1],N=Object(a.useState)(null),S=Object(l.a)(N,2),I=S[0],F=S[1],L=Object(u.c)(BR),P=L.data,D=L.loading,R=Object(u.b)(AR,{refetchQueries:["getData"],onCompleted:function(){return F(null)},onError:function(e){return E(e)}}),T=Object(l.a)(R,1)[0],B=os(t)(null===P||void 0===P?void 0:P.config),M=null===P||void 0===P?void 0:P.machines,W=null===P||void 0===P?void 0:P.cryptoCurrencies,z=A.a(["fiatCurrency"])(os(Qc)(null===P||void 0===P?void 0:P.config)),q={save:$c.a((function(e,n){var a=ls(t)(n);return y(e),E(null),T({variables:{config:a}})})),error:k,editingKey:I,data:B,currency:z,isEditing:function(e){return I===e},isDisabled:function(e){return I&&I!==e},setEditing:function(e,t){t||E(null),F(t?e:null)},setSection:y,machines:M,cryptoCurrencies:W};return!D&&Object(ze.jsxs)(aR.Provider,{value:q,children:[f&&Object(ze.jsx)(rl,{title:"Notifications"}),r&&Object(ze.jsx)(CO,{title:"Setup",error:k&&!v,children:Object(ze.jsx)(RR,{forceDisable:!!I,wizard:g})}),o&&Object(ze.jsx)(CO,{title:"Transaction alerts",error:k&&"tx"===v,children:Object(ze.jsx)(TR,{section:"tx",fieldWidth:130})}),s&&Object(ze.jsxs)(CO,{title:"Fiat balance alerts",error:k&&"fiat"===v,children:[Object(ze.jsx)(vR,{section:"fiat",max:100,fieldWidth:50}),p&&Object(ze.jsx)(FR,{config:os(Xc)(null===P||void 0===P?void 0:P.config),section:"fiat"})]}),m&&Object(ze.jsxs)(CO,{title:"Crypto balance alerts",error:k&&"crypto"===v,children:[Object(ze.jsx)(mR,{section:"crypto",fieldWidth:130}),p&&Object(ze.jsx)(jR,{section:"crypto",fieldWidth:130})]})]})};function WR(){return(WR=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var qR=a.createElement("g",{id:"\\u21B3\\u21B3-Coin-ATM-Radar",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"operator-info_v4-CAR#1",transform:"translate(-832.000000, -608.000000)",fill:"#FF584A",fillRule:"nonzero"},a.createElement("g",{id:"Group",transform:"translate(832.000000, 608.000000)"},a.createElement("polygon",{id:"Line-7",points:"13.0484874 0 16 2.95151255 2.95151255 16 0 13.0484874"}),a.createElement("polygon",{id:"Line-7",transform:"translate(8.000000, 8.000000) scale(-1, 1) translate(-8.000000, -8.000000) ",points:"13.0484874 0 16 2.95151255 2.95151255 16 0 13.0484874"}))));function $R(e,t){var n=e.title,r=e.titleId,i=zR(e,["title","titleId"]);return a.createElement("svg",WR({width:"16px",height:"16px",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"Group"):n?a.createElement("title",{id:r},n):null,qR)}var HR=a.forwardRef($R);n.p;function VR(){return(VR=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var GR=a.createElement("desc",null,"Created with Sketch."),XR=a.createElement("g",{id:"icon/table/true",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("path",{d:"M4.17451294,13.3251347 L0.599425104,9.29667256 C-0.199808368,8.3960844 -0.199808368,6.94040225 0.599425104,6.03981409 C1.39865858,5.13922593 2.69051421,5.13922593 3.48974768,6.03981409 L5.61967423,8.439847 L12.5102523,0.675441122 C13.3094858,-0.225147041 14.6033855,-0.225147041 15.4005749,0.675441122 C16.1998084,1.57372599 16.1998084,3.03171143 15.4005749,3.93229959 L7.06483552,13.3251347 C6.66624082,13.7742771 6.14295752,14 5.61967423,14 C5.09639093,14 4.57310763,13.7742771 4.17451294,13.3251347 Z",id:"Fill-1",fill:"#48F694"}));function _R(e,t){var n=e.title,r=e.titleId,i=UR(e,["title","titleId"]);return a.createElement("svg",VR({width:"16px",height:"14px",viewBox:"0 0 16 14",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"icon/table/true"):n?a.createElement("title",{id:r},n):null,GR,XR)}var KR,ZR,QR,YR,JR,eT,tT,nT,aT,rT,iT,oT,lT,cT,sT,dT,uT,mT,hT,pT,bT=a.forwardRef(_R),fT=(n.p,{booleanPropertiesTableWrapper:{display:"flex",flexDirection:"column",width:396},tableRow:{display:"flex",alignItems:"center",justifyContent:"space-between","&:nth-child(even)":{backgroundColor:ae},"&:nth-child(odd)":{backgroundColor:G},minHeight:32,height:"auto",padding:[[8,16,8,24]],boxShadow:"0 0 0 0 rgba(0, 0, 0, 0)"},leftTableCell:{display:"flex",alignItems:"center",justifyContent:"left",width:200,padding:[0]},rightTableCell:{display:"flex",alignItems:"center",justifyContent:"right",padding:[0]},transparentButton:{"& > *":{margin:"auto 12px"},"& button":{border:"none",backgroundColor:"transparent",cursor:"pointer"}},rowWrapper:{display:"flex",alignItems:"center",position:"relative",flex:"wrap"},rightAligned:{marginLeft:"auto"},radioButtons:{display:"flex",flexDirection:"row",margin:[-15]},rightLink:{marginLeft:"20px"},fillColumn:xf.fillColumn,popoverContent:{width:272,padding:[[10,15]]}}),jT=Object(f.a)(fT),gT=function(e){var t=e.name;return"true"===Object(un.f)().values[t]?Object(ze.jsx)(bT,{}):Object(ze.jsx)(HR,{})},OT=Object(a.memo)((function(e){var t=e.title,n=e.disabled,r=e.data,i=e.elements,o=e.save,c=e.forcedEditing,s=void 0!==c&&c,d=Hc.a(i.map((function(e){var t;return[e.name,null!==(t=r[e.name])&&void 0!==t?t:null]}))),u=Hc.a(i.map((function(e){return[e.name,fn.b().required()]}))),m=Object(a.useState)(s),h=Object(l.a)(m,2),p=h[0],b=h[1],f=jT(),j=function(){var e=Object(Rl.a)(Dl.a.mark((function e(t){return Dl.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o(M.a(Wr.a(D.a),t)),b(!1);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),g=[{display:"Yes",code:"true"},{display:"No",code:"false"}];return Object(ze.jsx)("div",{className:f.booleanPropertiesTableWrapper,children:Object(ze.jsx)(un.e,{validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,onSubmit:j,initialValues:d,schemaValidation:u,children:function(e){var a=e.resetForm;return Object(ze.jsxs)(un.d,{children:[Object(ze.jsxs)("div",{className:f.rowWrapper,children:[Object(ze.jsx)(Xe,{children:t}),p?Object(ze.jsxs)("div",{className:f.rightAligned,children:[Object(ze.jsx)(na,{type:"submit",color:"primary",children:"Save"}),Object(ze.jsx)(na,{type:"reset",className:f.rightLink,onClick:function(){a(),b(!1)},color:"secondary",children:"Cancel"})]}):Object(ze.jsx)(Qn,{className:f.transparentButton,onClick:function(){return b(!0)},children:n?Object(ze.jsx)(Eh,{}):Object(ze.jsx)(Ph,{})})]}),Object(ze.jsx)(bm,{}),Object(ze.jsx)(Es,{className:f.fillColumn,children:Object(ze.jsx)(Ns,{className:f.fillColumn,children:i.map((function(e,t){return Object(ze.jsxs)(As,{size:"sm",className:f.tableRow,children:[Object(ze.jsx)(Is,{className:f.leftTableCell,children:e.display}),Object(ze.jsxs)(Is,{className:f.rightTableCell,children:[p&&Object(ze.jsx)(un.b,{component:ri,name:e.name,options:g,className:I()(f.radioButtons,f.rightTableCell)}),!p&&Object(ze.jsx)(gT,{name:e.name})]})]},t)}))})})]})}})})})),xT={content:{display:"flex"},header:{display:"flex",alignItems:"center",position:"relative",flex:"wrap"},section:{marginBottom:52},row:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:28,width:600,"&:last-child":{marginBottom:0}},switchRow:{display:"flex",alignItems:"center",position:"relative",flex:"wrap",justifyContent:"space-between",width:396},switch:{display:"flex",alignItems:"center"},submit:{justifyContent:"flex-start",alignItems:"center",padding:[[0,4,4,4]],"& > button":{marginRight:40}},transparentButton:{"& > *":{margin:"auto 12px"},"& button":{border:"none",backgroundColor:"transparent",cursor:"pointer"}},infoMessage:{display:"flex",marginBottom:52,"& > p":{width:330,color:se,marginTop:4,marginLeft:16}},formErrorMsg:{margin:[[0,0,20,0]]}},vT=Object(f.a)(xT),yT=x()(KR||(KR=Object(c.a)(["\n query getData {\n config\n }\n"]))),wT=x()(ZR||(ZR=Object(c.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"]))),CT=Object(a.memo)((function(e){var t=e.title,n=e.disabled,a=void 0!==n&&n,r=e.checked,i=e.save,o=e.label,l=vT();return Object(ze.jsxs)("div",{className:l.switchRow,children:[Object(ze.jsx)(Ke,{children:t}),Object(ze.jsxs)("div",{className:l.switch,children:[Object(ze.jsx)(Er,{disabled:a,checked:r,onChange:function(e){return i&&i(e.target.checked)}}),o&&Object(ze.jsx)(at,{children:o})]})]})})),kT=Object(a.memo)((function(e){var t=e.wizard,n=vT(),a=Object(u.c)(yT).data,r=Object(u.b)(wT,{refetchQueries:["getData"]}),i=Object(l.a)(r,1)[0],o=function(e){return i({variables:{config:ls(es,e)}})},c=(null===a||void 0===a?void 0:a.config)&&os(es,a.config);return c?Object(ze.jsx)("div",{className:n.content,children:Object(ze.jsxs)("div",{children:[Object(ze.jsxs)("div",{className:n.header,children:[Object(ze.jsx)(Xe,{children:"Coin ATM Radar share settings"}),Object(ze.jsx)(Ep,{width:304,children:Object(ze.jsxs)(Ke,{children:["For details on configuring this panel, please read the relevant knowledgebase article"," ",Object(ze.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://support.lamassu.is/hc/en-us/articles/360023720472-Coin-ATM-Radar",children:"here"}),"."]})})]}),Object(ze.jsx)(CT,{title:"Share information?",checked:c.active,save:function(e){return o({active:e})},label:c.active?"Yes":"No"}),Object(ze.jsx)(OT,{editing:t,title:"Machine info",data:c,elements:[{name:"commissions",display:"Commissions"},{name:"limitsAndVerification",display:"Limits and verification"}],save:o})]})}):null})),ET={field:{position:"relative",width:280,height:48,padding:[[0,4,4,0]]},notEditing:{display:"flex",flexDirection:"column","& > p:first-child":{height:16,lineHeight:"16px",fontSize:we,transformOrigin:"left",paddingLeft:0,margin:[[3,0,3,0]]},"& > p:last-child":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",margin:0}}},NT=Object(f.a)(ET),ST=function(e){var t,n=e.editing,a=e.field,r=e.displayValue,i=Object(q.a)(e,["editing","field","displayValue"]),o=NT(),l=(t={},Object(z.a)(t,o.field,!0),Object(z.a)(t,o.notEditing,!n),t);return Object(ze.jsxs)("div",{className:I()(l),children:[!n&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(rt,{children:a.label}),Object(ze.jsx)(Ye,{children:r(a.value)})]}),n&&Object(ze.jsx)(un.b,Object(s.a)({id:a.name,name:a.name,component:a.component,placeholder:a.placeholder,type:a.type,label:a.label,width:280},i))]})},IT=x()(QR||(QR=Object(c.a)(["\n query getData {\n config\n }\n"]))),FT=x()(YR||(YR=Object(c.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"]))),LT=Object(f.a)(xT),PT=function(e){var t,n,r,i,o=e.wizard,c=LT(),s=Object(a.useState)(o||!1),d=Object(l.a)(s,2),m=d[0],h=d[1],p=Object(a.useState)(null),b=Object(l.a)(p,2),f=b[0],j=b[1],g=Object(u.b)(FT,{onCompleted:function(){return h(!1)},refetchQueries:function(){return["getData"]},onError:function(e){return j(e)}}),O=Object(l.a)(g,1)[0],x=Object(u.c)(IT).data,v=function(e){return O({variables:{config:ls(Kc,e)}})},y=(null===x||void 0===x?void 0:x.config)&&os(Kc,x.config);if(!y)return null;var w=fn.f().shape({active:fn.b(),name:fn.h(),phone:fn.h(),email:fn.h().email("Please enter a valid email address").required("An email is required"),website:fn.h(),companyNumber:fn.h()}),C=[{name:"name",label:"Full name",value:null!==(t=y.name)&&void 0!==t?t:"",component:oi},{name:"phone",label:"Phone number",value:y.phone,component:oi},{name:"email",label:"Email",value:null!==(n=y.email)&&void 0!==n?n:"",component:oi},{name:"website",label:"Website",value:null!==(r=y.website)&&void 0!==r?r:"",component:oi},{name:"companyNumber",label:"Company number",value:null!==(i=y.companyNumber)&&void 0!==i?i:"",component:oi}],k=function(e){return Da.a(W.a("name",e))(C)},E=function(e){return k(e).value},N=function(e){return e},S={initialValues:{active:y.active,name:E("name"),phone:E("phone"),email:E("email"),website:E("website"),companyNumber:E("companyNumber")}},F=function(e){return D.a(e.email)?null:e.email};return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)("div",{className:c.header,children:Object(ze.jsx)(Xe,{children:"Contact information"})}),Object(ze.jsxs)("div",{className:c.switchRow,children:[Object(ze.jsx)(Ke,{children:"Info card enabled?"}),Object(ze.jsxs)("div",{className:c.switch,children:[Object(ze.jsx)(Er,{checked:y.active,onChange:function(e){return v({active:e.target.checked})}}),Object(ze.jsx)(at,{children:y.active?"Yes":"No"})]})]}),Object(ze.jsxs)("div",{className:c.section,children:[Object(ze.jsxs)("div",{className:c.header,children:[Object(ze.jsx)(Xe,{children:"Info card"}),!m&&Object(ze.jsx)(Qn,{className:c.transparentButton,onClick:function(){return h(!0)},children:Object(ze.jsx)(Ph,{})})]}),Object(ze.jsx)(un.e,{validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,initialValues:S.initialValues,validationSchema:w,onSubmit:function(e){return v(w.cast(e))},onReset:function(){h(!1),j(null)},children:function(e){var t=e.errors;return Object(ze.jsxs)(un.d,{children:[Object(ze.jsx)(bm,{}),Object(ze.jsxs)("div",{className:c.row,children:[Object(ze.jsx)(ST,{field:k("name"),editing:m,displayValue:N,onFocus:function(){return j(null)}}),Object(ze.jsx)(ST,{field:k("phone"),editing:m,displayValue:N,onFocus:function(){return j(null)}})]}),Object(ze.jsxs)("div",{className:c.row,children:[Object(ze.jsx)(ST,{field:k("email"),editing:m,displayValue:N,onFocus:function(){return j(null)}}),Object(ze.jsx)(ST,{field:k("website"),editing:m,displayValue:N,onFocus:function(){return j(null)}})]}),Object(ze.jsx)("div",{className:c.row,children:Object(ze.jsx)(ST,{field:k("companyNumber"),editing:m,displayValue:N,onFocus:function(){return j(null)}})}),m&&!!F(t)&&Object(ze.jsx)(tl,{className:c.formErrorMsg,children:F(t)}),Object(ze.jsx)("div",{className:I()(c.row,c.submit),children:m&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(na,{color:"primary",type:"submit",children:"Save"}),Object(ze.jsx)(na,{color:"secondary",type:"reset",children:"Cancel"}),f&&Object(ze.jsx)(tl,{children:"Failed to save changes"})]})})]})}})]}),!o&&Object(ze.jsxs)("div",{className:I()(c.section,c.infoMessage),children:[Object(ze.jsx)(tr,{}),Object(ze.jsx)(nt,{children:"Sharing your information with your customers through your machines allows them to contact you in case there's a problem with a machine in your network or a transaction."})]})]})},DT={header:{display:"flex",position:"relative",alignItems:"center",justifyContent:"space-between",width:800},form:{"& > *":{marginTop:20},display:"flex",flexDirection:"column",height:"100%"},footer:{display:"flex",flexDirection:"row",margin:[["auto",0,24,0]]},submit:{margin:[["auto",0,0,"auto"]]}},RT=Object(f.a)(DT),TT=function(e,t,n){return e&&t?n?"Internal server error":e.event&&t.event?e.event:e.message&&t.message?e.message:null:null},BT={smsCode:{validator:fn.h().required("The message content is required!").trim().test({name:"has-code-tag",message:"A #code tag is missing from the message!",exclusive:!1,test:function(e){var t;return(null===e||void 0===e||null===(t=e.match(/#code/g))||void 0===t?void 0:t.length)>0}}).test({name:"has-single-code-tag",message:"There should be a single #code tag!",exclusive:!1,test:function(e){var t;return 1===(null===e||void 0===e||null===(t=e.match(/#code/g))||void 0===t?void 0:t.length)}})},cashOutDispenseReady:{validator:fn.h().required("The message content is required!").trim().test({name:"has-timestamp-tag",message:"A #timestamp tag is missing from the message!",exclusive:!1,test:function(e){var t;return(null===e||void 0===e||null===(t=e.match(/#timestamp/g))||void 0===t?void 0:t.length)>0}}).test({name:"has-single-timestamp-tag",message:"There should be a single #timestamp tag!",exclusive:!1,test:function(e){var t;return 1===(null===e||void 0===e||null===(t=e.match(/#timestamp/g))||void 0===t?void 0:t.length)}})}},AT=function(e){var t,n,r=e.showModal,i=e.onClose,o=e.sms,c=e.eventOptions,s=e.creationError,d=e.submit,u=RT(),m=Object(a.useState)(null===o||void 0===o?void 0:o.event),h=Object(l.a)(m,2),p=h[0],b=h[1],f={event:D.a(o)?"":o.event,message:D.a(o)?"":o.message},j=fn.f().shape({event:fn.h().required("An event is required!"),message:null!==(t=null===(n=BT[p])||void 0===n?void 0:n.validator)&&void 0!==t?t:fn.h().required("The message content is required!").trim()});return Object(ze.jsx)(ze.Fragment,{children:r&&Object(ze.jsx)(Qh,{title:D.a(o)?"Add custom SMS":"Edit custom SMS",closeOnBackdropClick:!0,width:600,height:500,open:!0,handleClose:i,children:Object(ze.jsx)(un.e,{validateOnBlur:!1,validateOnChange:!1,initialValues:f,validationSchema:j,onSubmit:function(e,t,n){return function(e){d(o?{variables:{id:o.id,event:e.event,message:e.message}}:{variables:{event:e.event,message:e.message}}),i()}(e)},children:function(e){var t=e.values,n=e.errors,a=e.touched;return Object(ze.jsxs)(un.d,{id:"custom-sms",className:u.form,children:[Object(ze.jsx)(un.b,{name:"event",label:"Event",fullWidth:!0,onChange:b(t.event),options:c,labelProp:"display",valueProp:"code",component:Pr}),Object(ze.jsx)(un.b,{name:"message",label:"Message content",fullWidth:!0,multiline:!0,rows:6,component:oi}),Object(ze.jsxs)("div",{className:u.footer,children:[TT(n,a,s)&&Object(ze.jsx)(tl,{children:TT(n,a,s)}),Object(ze.jsx)(Dn,{type:"submit",form:"custom-sms",className:u.submit,children:D.a(o)?"Create SMS":"Confirm"})]})]})}})})})},MT=Object(f.a)(DT),WT=x()(JR||(JR=Object(c.a)(["\n query customMessages {\n customMessages {\n id\n event\n message\n }\n }\n"]))),zT=x()(eT||(eT=Object(c.a)(["\n mutation createCustomMessage($event: CustomMessageEvent!, $message: String!) {\n createCustomMessage(event: $event, message: $message) {\n id\n }\n }\n"]))),qT=x()(tT||(tT=Object(c.a)(["\n mutation editCustomMessage(\n $id: ID!\n $event: CustomMessageEvent!\n $message: String!\n ) {\n editCustomMessage(id: $id, event: $event, message: $message) {\n id\n }\n }\n"]))),$T=x()(nT||(nT=Object(c.a)(["\n mutation deleteCustomMessage($id: ID!) {\n deleteCustomMessage(id: $id) {\n id\n }\n }\n"]))),HT=[{code:"smsCode",display:"On SMS confirmation code"},{code:"cashOutDispenseReady",display:"Cash out dispense ready"}],VT=function(){var e=MT(),t=Object(a.useState)(!1),n=Object(l.a)(t,2),r=n[0],i=n[1],o=Object(a.useState)(!1),c=Object(l.a)(o,2),s=c[0],d=c[1],m=Object(a.useState)(null),h=Object(l.a)(m,2),p=h[0],b=h[1],f=Object(a.useState)(""),j=Object(l.a)(f,2),g=j[0],O=j[1],x=Object(u.c)(WT),v=x.data,y=x.loading,w=Object(u.b)(zT,{onError:function(e){var t=e.msg;return O(t)},refetchQueries:function(){return["customMessages"]}}),C=Object(l.a)(w,1)[0],k=Object(u.b)(qT,{onError:function(e){var t=e.msg;return O(t)},refetchQueries:function(){return["customMessages"]}}),E=Object(l.a)(k,1)[0],N=Object(u.b)($T,{onError:function(e){var t=e.msg;return O(t)},refetchQueries:function(){return["customMessages"]}}),S=Object(l.a)(N,1)[0],I=y,F=function(){b(null),d(!1),i(!1)},L=[{header:"Event",width:600,size:"sm",textAlign:"left",view:function(e){return Da.a((function(t){return W.a("event",t.code,e)}),HT).display}},{header:"Edit",width:100,size:"sm",textAlign:"center",view:function(e){return Object(ze.jsx)(Qn,{onClick:function(){b(e),d(!0)},children:Object(ze.jsx)(Ph,{})})}},{header:"Delete",width:100,size:"sm",textAlign:"center",view:function(e){return Object(ze.jsx)(Qn,{onClick:function(){b(e),i(!0)},children:Object(ze.jsx)(xh,{})})}}];return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsxs)("div",{className:e.header,children:[Object(ze.jsx)(Xe,{children:"Custom SMS message"}),Object(ze.jsx)(Yo.a,{display:"flex",justifyContent:"flex-end",children:Object(ze.jsx)(na,{color:"primary",onClick:function(){return O(""),void d(!0)},children:"Add custom SMS"})})]}),s&&Object(ze.jsx)(AT,{showModal:s,onClose:F,eventOptions:HT,sms:p,creationError:g,submit:p?E:C}),Object(ze.jsx)(Km,{open:r,onDismissed:function(){F()},onConfirmed:function(){F(),S({variables:{id:p.id}})},errorMessage:g}),Object(ze.jsx)(vy,{emptyText:"No custom SMS so far",elements:L,loading:I,data:A.a(["customMessages"])(v)})]})},UT=Object(f.a)(xT),GT=x()(aT||(aT=Object(c.a)(["\n query getData {\n config\n }\n"]))),XT=x()(rT||(rT=Object(c.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"]))),_T=Object(a.memo)((function(e){var t=e.wizard,n=UT(),a=Object(u.c)(GT).data,r=Object(u.b)(XT,{refetchQueries:function(){return["getData"]}}),i=Object(l.a)(r,1)[0],o=(null===a||void 0===a?void 0:a.config)&&os(Jc,a.config);return o?Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)("div",{className:n.header,children:Object(ze.jsx)(Xe,{children:"Receipt options"})}),Object(ze.jsxs)("div",{className:n.switchRow,children:[Object(ze.jsx)(Ke,{children:"Enable receipt printing"}),Object(ze.jsxs)("div",{className:n.switch,children:[Object(ze.jsx)(Er,{checked:o.active,onChange:function(e){return i({variables:{config:ls(Jc,$n.a(o,{active:e.target.checked}))}})}}),Object(ze.jsx)(at,{children:o.active?"Yes":"No"})]})]}),Object(ze.jsxs)("div",{className:n.switchRow,children:[Object(ze.jsx)(Ke,{children:"Offer SMS receipt"}),Object(ze.jsxs)("div",{className:n.switch,children:[Object(ze.jsx)(Er,{checked:o.sms,onChange:function(e){return i({variables:{config:ls(Jc,$n.a(o,{sms:e.target.checked}))}})}}),Object(ze.jsx)(at,{children:o.sms?"Yes":"No"})]})]}),Object(ze.jsx)(OT,{editing:t,title:"Visible on the receipt (options)",data:o,elements:[{name:"operatorWebsite",display:"Operator website"},{name:"operatorEmail",display:"Operator email"},{name:"operatorPhone",display:"Operator phone"},{name:"companyNumber",display:"Company number"},{name:"machineLocation",display:"Machine location"},{name:"customerNameOrPhoneNumber",display:"Customer name or phone number (if known)"},{name:"exchangeRate",display:"Exchange rate"},{name:"addressQRCode",display:"Address QR code"}],save:function(e){return i({variables:{config:ls(Jc,e)}})}})]}):null})),KT=Object(f.a)({field:{position:"relative",width:280,padding:[[0,4,4,0]]},notEditing:{display:"flex",flexDirection:"column"},notEditingSingleLine:{"& > p:first-child":{height:16,lineHeight:"16px",transform:"scale(0.75)",transformOrigin:"left",paddingLeft:0,margin:[[1,0,6,0]]},"& > p:last-child":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",height:25,margin:0}},notEditingMultiline:{"& > p:first-child":{height:16,lineHeight:"16px",transform:"scale(0.75)",transformOrigin:"left",paddingLeft:0,margin:[[1,0,5,0]]},"& > p:last-child":{width:502,height:121,overflowY:"auto",lineHeight:"19px",wordWrap:"anywhere",margin:0}}}),ZT=function(e){var t,n=e.editing,a=e.name,r=e.width,i=e.placeholder,o=e.label,l=e.value,c=e.multiline,d=void 0!==c&&c,u=e.rows,m=e.onFocus,h=Object(q.a)(e,["editing","name","width","placeholder","label","value","multiline","rows","onFocus"]),p=KT(),b=(t={},Object(z.a)(t,p.field,!0),Object(z.a)(t,p.notEditing,!n),Object(z.a)(t,p.notEditingSingleLine,!n&&!d),Object(z.a)(t,p.notEditingMultiline,!n&&d),t);return Object(ze.jsxs)("div",{className:I()(b),children:[!n&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(rt,{children:o}),Object(ze.jsx)(Ye,{children:l})]}),n&&Object(ze.jsx)(un.b,Object(s.a)({id:a,name:a,component:oi,width:r,placeholder:i,type:"text",label:o,multiline:d,rows:u,rowsMax:"6",onFocus:m},h))]})},QT=x()(iT||(iT=Object(c.a)(["\n query getData {\n config\n }\n"]))),YT=x()(oT||(oT=Object(c.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"]))),JT=Object(f.a)(xT),eB=function(){var e,t,n,r,i,o,c=Object(a.useState)(null),s=Object(l.a)(c,2),d=s[0],m=s[1],h=Object(a.useState)(!1),p=Object(l.a)(h,2),b=p[0],f=p[1],j=Object(u.b)(YT,{onCompleted:function(){m(null),f(!1)},refetchQueries:function(){return["getData"]},onError:function(e){return m(e)}}),g=Object(l.a)(j,1)[0],O=JT(),x=Object(u.c)(QT).data,v=(null===x||void 0===x?void 0:x.config)&&os(ts,x.config),y=null!==v&&void 0!==v?v:{},w=null!==(e=null===v||void 0===v?void 0:v.active)&&void 0!==e&&e,C=null!==(t=null===v||void 0===v?void 0:v.delay)&&void 0!==t&&t,k=function(e){return g({variables:{config:ls(ts,e)}})},E=[{name:"title",label:"Screen title",value:null!==(n=y.title)&&void 0!==n?n:"",width:282},{name:"text",label:"Text content",value:null!==(r=y.text)&&void 0!==r?r:"",width:502,multiline:!0,rows:6},{name:"acceptButtonText",label:"Accept button text",value:null!==(i=y.acceptButtonText)&&void 0!==i?i:"",placeholder:"I accept",width:282},{name:"cancelButtonText",label:"Cancel button text",value:null!==(o=y.cancelButtonText)&&void 0!==o?o:"",placeholder:"Cancel",width:282}],N=function(e){return function(e){return Da.a(W.a("name",e))(E)}(e).value},S={title:N("title"),text:N("text"),acceptButtonText:N("acceptButtonText"),cancelButtonText:N("cancelButtonText")},F=fn.f().shape({title:fn.h().required().max(50,"Too long"),text:fn.h().required(),acceptButtonText:fn.h().required().max(50,"Too long"),cancelButtonText:fn.h().required().max(50,"Too long")});return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)("div",{className:O.header,children:Object(ze.jsx)(Xe,{children:"Terms & Conditions"})}),Object(ze.jsxs)("div",{className:O.switchRow,children:[Object(ze.jsx)(Ke,{children:"Show on screen"}),Object(ze.jsxs)("div",{className:O.switch,children:[Object(ze.jsx)(Er,{checked:w,onChange:function(e){return k({active:e.target.checked})}}),Object(ze.jsx)(at,{children:w?"Yes":"No"})]})]}),Object(ze.jsxs)("div",{className:O.switchRow,children:[Object(ze.jsx)(Ke,{children:"Add 7 seconds delay on screen"}),Object(ze.jsxs)("div",{className:O.switch,children:[Object(ze.jsx)(Er,{checked:C,onChange:function(e){return k({delay:e.target.checked})}}),Object(ze.jsx)(at,{children:C?"Yes":"No"})]})]}),Object(ze.jsxs)("div",{className:O.header,children:[Object(ze.jsx)(Qe,{children:"Info card"}),!b&&Object(ze.jsx)(Qn,{className:O.transparentButton,onClick:function(){return f(!0)},children:Object(ze.jsx)(Ph,{})})]}),Object(ze.jsx)(un.e,{validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,initialValues:S,validationSchema:F,onSubmit:function(e){return k(e)},onReset:function(){f(!1),m(null)},children:Object(ze.jsxs)(un.d,{children:[Object(ze.jsx)(bm,{}),E.map((function(e,t){return Object(ze.jsx)("div",{className:O.row,children:Object(ze.jsx)(ZT,{editing:b,name:e.name,width:e.width,placeholder:e.placeholder,label:e.label,value:e.value,multiline:e.multiline,rows:e.rows,onFocus:function(){return m(null)}})},t)})),Object(ze.jsx)("div",{className:I()(O.row,O.submit),children:b&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(na,{color:"primary",type:"submit",children:"Save"}),Object(ze.jsx)(na,{color:"secondary",type:"reset",children:"Cancel"}),d&&Object(ze.jsx)(tl,{children:"Failed to save changes"})]})})]})})]})},tB={running:ne,notRunning:pe},nB={running:"#ecfbef",notRunning:he},aB={uptimeContainer:{display:"inline-block",minWidth:104,margin:[[0,20]]},name:{extend:Ae.label1,paddingLeft:4,color:se}},rB=Object(f.a)(aB),iB=Object(f.a)({root:{borderRadius:4,marginTop:4,marginRight:2,marginBottom:4,marginLeft:2,height:24,backgroundColor:function(e){var t=e.type;return nB[t]}},label:{fontSize:Ce,fontWeight:Se,fontFamily:Ie,padding:[[4,8]],color:function(e){var t=e.type;return tB[t]}}}),oB=function(e){var t,n=e.process,a=(Object(q.a)(e,["process"]),rB());return Object(ze.jsxs)("div",{className:a.uptimeContainer,children:[Object(ze.jsx)("div",{className:a.name,children:Dv.a(n.name)}),Object(ze.jsx)(Dr.a,{label:"RUNNING"===n.state?"Running for ".concat((t=n.uptime,t<60?"".concat(t,"s"):t<3600?"".concat(Math.floor(t/60),"m"):t<86400?"".concat(Math.floor(t/60/60),"h"):"".concat(Math.floor(t/60/60/24),"d"))):Wm(n.state),classes:iB({type:"RUNNING"===n.state?"running":"notRunning"})})]})},lB={serverTableWrapper:{extend:xf.tableWrapper,maxWidth:"100%",marginLeft:0},serverVersion:{extend:Ae.p,color:se,margin:"auto 0 auto 0"},headerLine2:{display:"flex",justifyContent:"space-between",marginBottom:24},uptimeContainer:{margin:"auto 0 auto 0"}},cB=$n.a(xf,lB),sB=Object(f.a)(cB),dB={code:"SHOW_ALL",display:"Show all"},uB=x()(lT||(lT=Object(c.a)(["\n query ServerData($limit: Int, $from: Date, $until: Date, $timezone: String) {\n serverLogsCsv(\n limit: $limit\n from: $from\n until: $until\n timezone: $timezone\n )\n }\n"]))),mB=x()(cT||(cT=Object(c.a)(["\n query ServerData($limit: Int, $from: Date, $until: Date) {\n serverVersion\n uptime {\n name\n state\n uptime\n }\n serverLogs(limit: $limit, from: $from, until: $until) {\n logLevel\n id\n timestamp\n message\n }\n }\n"]))),hB=x()(sT||(sT=Object(c.a)(["\n query getData {\n config\n }\n"]))),pB=function(){var e,t,n=sB(),r=Object(a.useRef)(),i=Object(a.useState)(null),o=Object(l.a)(i,2),c=o[0],s=o[1],d=Object(a.useState)(dB),m=Object(l.a)(d,2),h=m[0],p=m[1],b=Object(u.c)(mB,{onCompleted:function(){return s("")},variables:{limit:500}}),f=b.data,j=b.loading,g=Object(u.c)(hB),O=g.data,x=g.loading,v=A.a(["config","locale_timezone"],O),y=null===f||void 0===f?void 0:f.serverVersion,w=null!==(e=null===f||void 0===f?void 0:f.uptime)&&void 0!==e?e:[],C=L.a(dm.a(dB),Dg.a,sl.a([{code:"error",display:"Error"},{code:"info",display:"Info"},{code:"debug",display:"Debug"}]),R.a((function(e){return{code:A.a(["logLevel"])(e),display:qm(A.a(["logLevel"])(e))}})),A.a(["serverLogs"])),k=j||x;return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsxs)("div",{className:n.titleWrapper,children:[Object(ze.jsxs)("div",{className:n.titleAndButtonsContainer,children:[Object(ze.jsx)(gn,{children:"Server"}),f&&Object(ze.jsxs)("div",{className:n.buttonsWrapper,children:[Object(ze.jsx)(VP,{title:"Download logs",name:"server-logs",query:uB,args:{timezone:v},logs:f.serverLogs,getLogs:function(e){return A.a(["serverLogsCsv"])(e)},timezone:v}),Object(ze.jsx)(Ye,{children:c})]})]}),Object(ze.jsx)("div",{className:n.serverVersion,children:y&&Object(ze.jsxs)("span",{children:["Server version: v",y]})})]}),Object(ze.jsxs)("div",{className:n.headerLine2,children:[f&&Object(ze.jsx)(ch,{onSelectedItemChange:function(e){r.current&&r.current.scrollTo(0,0),p(e)},label:"Level",items:C(f),default:dB,selectedItem:h}),Object(ze.jsx)("div",{className:n.uptimeContainer,children:w&&w.map((function(e,t){return Object(ze.jsx)(oB,{process:e},t)}))})]}),Object(ze.jsx)("div",{className:n.wrapper,children:Object(ze.jsxs)("div",{ref:r,className:n.serverTableWrapper,children:[Object(ze.jsxs)(Es,{className:n.table,children:[Object(ze.jsx)(Fs,{children:Object(ze.jsxs)(As,{header:!0,children:[Object(ze.jsx)(Ds,{className:n.dateColumn,children:"Date"}),Object(ze.jsx)(Ds,{className:n.levelColumn,children:"Level"}),Object(ze.jsx)(Ds,{className:n.fillColumn})]})}),Object(ze.jsx)(Ns,{children:f&&f.serverLogs.filter((function(e){return h===dB||e.logLevel===h.code})).map((function(e,t){return Object(ze.jsxs)(As,{size:"sm",children:[Object(ze.jsx)(Is,{children:v&&sd(e.timestamp,v,"yyyy-MM-dd HH:mm")}),Object(ze.jsx)(Is,{children:e.logLevel}),Object(ze.jsx)(Is,{children:e.message})]},t)}))})]}),k&&Object(ze.jsx)(Xe,{children:"Loading..."}),!k&&!(null===f||void 0===f||null===(t=f.serverLogs)||void 0===t?void 0:t.length)&&Object(ze.jsx)(Xe,{children:"No activity so far"})]})})]})},bB=n(953),fB=n(924),jB=n(925),gB={tr:function(e){return{margin:0,height:e.height}},table:function(e){return{width:e.width}},head:{display:"flex",flex:1,justifyContent:"space-between",alignItems:"center",paddingRight:12},button:{marginBottom:1},itemWrapper:{display:"flex",flexDirection:"column",marginTop:16,minHeight:35},label:{extend:Ae.label1,color:se,marginBottom:4},item:{extend:Ae.p,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},OB=Object(f.a)(gB),xB=function(e){var t=e.width,n=void 0===t?378:t,a=e.height,r=void 0===a?128:a,i=e.title,o=e.items,l=e.onEdit,c=e.className,s=OB({width:n,height:r});return Object(ze.jsx)(ze.Fragment,{children:Object(ze.jsxs)(ym,{className:I()(c,s.table),children:[Object(ze.jsx)(wm,{children:Object(ze.jsxs)(Nm,{className:s.head,children:[i,Object(ze.jsx)(Qn,{onClick:l,className:s.button,children:Object(ze.jsx)(_E,{})})]})}),Object(ze.jsx)(km,{children:Object(ze.jsx)(Im,{className:s.tr,children:Object(ze.jsx)(Em,{width:n,children:o&&Object(ze.jsxs)(ze.Fragment,{children:[o[0]&&Object(ze.jsxs)("div",{className:s.itemWrapper,children:[Object(ze.jsx)("div",{className:s.label,children:o[0].label}),Object(ze.jsx)("div",{className:s.item,children:o[0].value})]}),o[1]&&Object(ze.jsxs)("div",{className:s.itemWrapper,children:[Object(ze.jsx)("div",{className:s.label,children:o[1].label}),Object(ze.jsx)("div",{className:s.item,children:o[1].value})]})]})})})})]})})},vB=x()(dT||(dT=Object(c.a)(["\n query getData {\n accounts\n config\n }\n"]))),yB=x()(uT||(uT=Object(c.a)(["\n mutation Save($accounts: JSONObject) {\n saveAccounts(accounts: $accounts)\n }\n"]))),wB=Object(f.a)({wrapper:{marginLeft:1}}),CB=function(){var e,t=Object(a.useState)(null),n=Object(l.a)(t,2),r=n[0],i=n[1],o=Object(u.c)(vB).data,c=Object(u.b)(yB,{onCompleted:function(){return i(null)},refetchQueries:["getData"]}),d=Object(l.a)(c,1)[0],m=wB(),p=null!==(e=null===o||void 0===o?void 0:o.accounts)&&void 0!==e?e:{},b=function(e,t){var n=M.a(T.a("face"))(t),a=p[e]||{};return R.a((function(e){var t,n=e.display,r=e.code;return{label:n,value:e.long?(t=a[r],!t||t.length<=20?t:"".concat(t.slice(0,8),"(...)").concat(t.slice(t.length-8,t.length))):a[r]}}))(n)};return Object(ze.jsxs)("div",{className:m.wrapper,children:[Object(ze.jsx)(rl,{title:"3rd Party Services"}),Object(ze.jsx)(h.a,{container:!0,spacing:4,children:bd.a(Ex).map((function(e){return Object(ze.jsx)(h.a,{item:!0,children:Object(ze.jsx)(xB,{editMessage:"Configure "+e.title,title:e.title,onEdit:function(){return i(e)},items:b(e.code,e.elements)})},e.code)}))}),r&&Object(ze.jsx)(Qh,{title:"Edit ".concat(r.name),width:478,handleClose:function(){return i(null)},open:!0,children:Object(ze.jsx)($O,{save:function(e){return d({variables:{accounts:Object(z.a)({},r.code,e)}})},elements:function(e){var t=e.code,n=e.elements;return R.a((function(e){return e.component===ti?function(e){var t=e.settings,n=bB.a(["config",t.field]),a=!!D.a(t.requirement)||zr.a(fB.a(n,o),t.requirement);return t.enabled=a,e}(e):e.component!==ii?e:Object(s.a)(Object(s.a)({},e),{},{inputProps:{isPasswordFilled:!D.a(p[t])&&!D.a(A.a([e.code],p[t]))}})}),n)}(r),validationSchema:function(e){var t=e.code,n=e.getValidationSchema;return n(p[t])}(r),value:function(e){var t=e.elements,n=e.code,a=p[n],r=M.a(W.a("component",ii)),i=R.a(T.a(["code"])),o=L.a(i,r)(t);return jB.a((function(e,t){return F.a(t,o)?"":e}),a)}(r)})})]})},kB=n(459),EB=n.n(kB),NB=x()(mT||(mT=Object(c.a)(["\n query sessions {\n sessions {\n sid\n sess\n expire\n }\n }\n"]))),SB=x()(hT||(hT=Object(c.a)(["\n mutation deleteSession($sid: String!) {\n deleteSession(sid: $sid) {\n sid\n }\n }\n"]))),IB=x()(pT||(pT=Object(c.a)(["\n query getData {\n config\n }\n"]))),FB=function(){var e=Object(u.c)(NB),t=e.data,n=e.loading,a=Object(u.b)(SB,{refetchQueries:function(){return["sessions"]}}),r=Object(l.a)(a,1)[0],i=Object(u.c)(IB),o=i.data,c=i.loading,s=A.a(["config","locale_timezone"],o),d=n||c,m=[{header:"Login",width:207,textAlign:"left",size:"sm",view:function(e){return e.sess.user.username}},{header:"Last known use",width:305,textAlign:"left",size:"sm",view:function(e){if(D.a(e.sess.ua))return"No Record";var t=EB()(e.sess.ua);return"".concat(t.browser.name," ").concat(t.browser.version," on ").concat(t.os.name," ").concat(t.os.version)}},{header:"Last known location",width:250,textAlign:"left",size:"sm",view:function(e){return"localhost"===(t=e.sess.ipAddress)||"::1"===t||"127.0.0.1"===t?"This device":e.sess.ipAddress;var t}},{header:"Expiration date",width:290,textAlign:"right",size:"sm",view:function(e){return"".concat(sd(e.expire,s,"yyyy-MM-dd")," ").concat(sd(e.expire,s,"HH:mm:ss"))}},{header:"",width:80,textAlign:"center",size:"sm",view:function(e){return Object(ze.jsx)(Qn,{onClick:function(){r({variables:{sid:e.sid}})},children:Object(ze.jsx)(xh,{})})}}];return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(rl,{title:"Session Management"}),Object(ze.jsx)(vy,{loading:d,elements:m,data:A.a(["sessions"])(t)})]})};function LB(){return(LB=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var DB=a.createElement("defs",null,a.createElement("circle",{id:"path-1-right",cx:10,cy:10,r:10})),RB=a.createElement("g",{id:"Symbols",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"pop-up/action/download-logs/date-range-copy-2",transform:"translate(-232.000000, -187.000000)"},a.createElement("g",{id:"icon/sf-contain-b-copy-4",transform:"translate(242.000000, 197.000000) scale(-1, 1) rotate(-270.000000) translate(-242.000000, -197.000000) translate(232.000000, 187.000000)"},a.createElement("mask",{id:"mask-2",fill:"white"},a.createElement("use",{xlinkHref:"#path-1-right"})),a.createElement("use",{id:"Mask",fill:"#FFFFFF",fillRule:"nonzero",xlinkHref:"#path-1-right"}),a.createElement("g",{id:"icon/sf-small/wizzard",mask:"url(#mask-2)",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("g",{transform:"translate(6.666667, 6.000000)",id:"Group"},a.createElement("g",null,a.createElement("polyline",{id:"Path-3",stroke:"#1B2559",strokeWidth:2,points:"0 4.83333333 3.33333333 8.16666667 6.66666667 4.83333333"}),a.createElement("line",{x1:3.33333333,y1:.25,x2:3.33333333,y2:6.5,id:"Path-4",stroke:"#1B2559",strokeWidth:2})))))));function TB(e,t){var n=e.title,r=e.titleId,i=PB(e,["title","titleId"]);return a.createElement("svg",LB({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,DB,RB)}var BB,AB,MB,WB,zB=a.forwardRef(TB),qB=(n.p,Object(f.a)(kf)),$B=1e3,HB=x()(BB||(BB=Object(c.a)(["\n query getData {\n config\n }\n"]))),VB=x()(AB||(AB=Object(c.a)(["\n query transactions(\n $simplified: Boolean\n $limit: Int\n $from: Date\n $until: Date\n $timezone: String\n $excludeTestingCustomers: Boolean\n ) {\n transactionsCsv(\n simplified: $simplified\n limit: $limit\n from: $from\n until: $until\n timezone: $timezone\n excludeTestingCustomers: $excludeTestingCustomers\n )\n }\n"]))),UB=x()(MB||(MB=Object(c.a)(["\n query filters {\n transactionFilters {\n type\n value\n }\n }\n"]))),GB=x()(WB||(WB=Object(c.a)(["\n query transactions(\n $limit: Int\n $from: Date\n $until: Date\n $txClass: String\n $machineName: String\n $customerName: String\n $fiatCode: String\n $cryptoCode: String\n $toAddress: String\n $status: String\n ) {\n transactions(\n limit: $limit\n from: $from\n until: $until\n txClass: $txClass\n machineName: $machineName\n customerName: $customerName\n fiatCode: $fiatCode\n cryptoCode: $cryptoCode\n toAddress: $toAddress\n status: $status\n ) {\n id\n txClass\n txHash\n toAddress\n commissionPercentage\n expired\n machineName\n operatorCompleted\n sendConfirmed\n dispense\n hasError: error\n deviceId\n fiat\n cashInFee\n fiatCode\n cryptoAtoms\n cryptoCode\n toAddress\n created\n customerName\n customerIdCardData\n customerIdCardPhotoPath\n customerFrontCameraPath\n customerPhone\n discount\n customerId\n isAnonymous\n batched\n batchTime\n rawTickerPrice\n batchError\n walletScore\n }\n }\n"]))),XB=function(e){return bs.a((function(e,t){return Object(s.a)(Object(s.a)({},e),{},Object(z.a)({},t.type,t.value))}),{},e)},_B=function(){var e,t=qB(),n=Object(w.h)(),r=Object(a.useState)([]),i=Object(l.a)(r,2),o=i[0],c=i[1],s=Object(u.c)(UB),d=s.data,m=s.loading,h=Object(a.useState)({limit:$B}),p=Object(l.a)(h,2),b=p[0],f=p[1],j=Object(u.c)(GB,{variables:b}),g=j.data,O=j.loading,x=j.refetch,v=j.startPolling,y=j.stopPolling;Object(a.useEffect)((function(){return v(1e4),y}));var C=null!==(e=null===g||void 0===g?void 0:g.transactions)&&void 0!==e?e:[],k=Object(u.c)(HB),E=k.data,N=k.configLoading,S=A.a(["config","locale_timezone"],E),I=function(e){return e.isAnonymous?"Anonymous":e.customerName?e.customerName:e.customerIdCardData?function(e){var t=e.firstName,n=e.lastName;return"".concat(Pf.a(Df.a,Rf.a)(t),". ").concat(n)}(e.customerIdCardData):e.customerPhone},F=[{header:"",width:32,size:"sm",view:function(e){return"cashOut"===e.txClass?Object(ze.jsx)(Ac,{}):Object(ze.jsx)(Fc,{})}},{header:"Machine",name:"machineName",width:160,size:"sm",view:A.a(["machineName"])},{header:"Customer",width:202,size:"sm",view:function(e){return Object(ze.jsxs)("div",{className:t.flexWrapper,children:[Object(ze.jsx)("div",{className:t.overflowTd,children:I(e)}),!e.isAnonymous&&Object(ze.jsx)("div",{onClick:function(){return t=e.customerId,n.push("/compliance/customer/".concat(t));var t},children:e.hasError||e.batchError?Object(ze.jsx)(zB,{className:t.customerLinkIcon}):Object(ze.jsx)(ju,{className:t.customerLinkIcon})})]})}},{header:"Cash",width:144,textAlign:"right",size:"sm",view:function(e){return"".concat(Number.parseFloat(e.fiat)," ").concat(e.fiatCode)}},{header:"Crypto",width:150,textAlign:"right",size:"sm",view:function(e){return"".concat(Lf.utils.toUnit(new zc.a(e.cryptoAtoms),e.cryptoCode)," ").concat(e.cryptoCode)}},{header:"Address",view:function(e){return Lf.utils.formatCryptoAddress(e.cryptoCode,e.toAddress)},className:t.overflowTd,size:"sm",width:140},{header:"Date",view:function(e){return S&&sd(e.created,S,"yyyy-MM-dd HH:mm")},textAlign:"right",size:"sm",width:195},{header:"Status",view:function(e){return Vj(e)},textAlign:"left",size:"sm",width:80}],L=A.a(["transactionFilters"])(d),P=O||m||N,D=Object(ze.jsx)("svg",{width:12,height:12,children:Object(ze.jsx)("rect",{width:12,height:12,rx:3,fill:he})});return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsxs)("div",{className:t.titleWrapper,children:[Object(ze.jsxs)("div",{className:t.titleAndButtonsContainer,children:[Object(ze.jsx)(gn,{children:"Transactions"}),Object(ze.jsx)("div",{className:t.buttonsWrapper,children:Object(ze.jsx)(lI,{loading:m,filters:o,options:L,inputPlaceholder:"Search Transactions",onChange:function(e){var t=XB(e);c(e),f({limit:$B,txClass:t.type,machineName:t.machine,customerName:t.customer,fiatCode:t.fiat,cryptoCode:t.crypto,toAddress:t.address,status:t.status}),x&&x()}})}),C&&Object(ze.jsx)("div",{className:t.buttonsWrapper,children:Object(ze.jsx)(VP,{title:"Download logs",name:"transactions",query:VB,getLogs:function(e){return A.a(["transactionsCsv"])(e)},simplified:!0,timezone:S,args:{timezone:S}})})]}),Object(ze.jsxs)("div",{className:t.headerLabels,children:[Object(ze.jsxs)("div",{children:[Object(ze.jsx)(Fc,{}),Object(ze.jsx)("span",{children:"Cash-in"})]}),Object(ze.jsxs)("div",{children:[Object(ze.jsx)(Ac,{}),Object(ze.jsx)("span",{children:"Cash-out"})]}),Object(ze.jsxs)("div",{children:[D,Object(ze.jsx)("span",{children:"Transaction error"})]})]})]}),o.length>0&&Object(ze.jsx)(EI,{entries:C.length,filters:o,onFilterDelete:function(e){var t=M.a((function(t){return!YS.a(Um.a(["type","value"],t),e)}))(o);c(t);var n=XB(t);f({limit:$B,txClass:n.type,machineName:n.machine,customerName:n.customer,fiatCode:n.fiat,cryptoCode:n.crypto,toAddress:n.address,status:n.status}),x&&x()},deleteAllFilters:function(){c([]);var e=XB([]);f({limit:$B,txClass:e.type,machineName:e.machine,customerName:e.customer,fiatCode:e.fiat,cryptoCode:e.crypto,toAddress:e.address,status:e.status}),x&&x()}}),Object(ze.jsx)(vy,{loading:P,emptyText:"No transactions so far",elements:F,data:C,Details:eg,expandable:!0,rowSize:"sm",timezone:S})]})};function KB(){return(KB=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var QB=a.createElement("desc",null,"Created with Sketch."),YB=a.createElement("g",{id:"icon/sf-small/filter/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("path",{d:"M19,2.5 C19,1.11909091 17.8809091,0 16.5,0 C15.1190909,0 14,1.11909091 14,2.5 C14,3.88090909 15.1190909,5 16.5,5 C17.8809091,5 19,3.88090909 19,2.5 Z",id:"Stroke-1",stroke:"#FFFFFF",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M5,9.5 C5,8.11909091 3.88090909,7 2.5,7 C1.11909091,7 0,8.11909091 0,9.5 C0,10.8818182 1.11909091,12 2.5,12 C3.88090909,12 5,10.8818182 5,9.5 Z",id:"Stroke-7",stroke:"#FFFFFF",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M19,17.5 C19,16.1190909 17.8809091,15 16.5,15 C15.1190909,15 14,16.1190909 14,17.5 C14,18.8809091 15.1190909,20 16.5,20 C17.8809091,20 19,18.8809091 19,17.5 Z",id:"Stroke-9",stroke:"#FFFFFF",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("line",{x1:14,y1:2.5,x2:.498999482,y2:2.5,id:"Line-3",stroke:"#FFFFFF",strokeWidth:2,strokeLinecap:"square"}),a.createElement("line",{x1:20,y1:9.5,x2:6.49899948,y2:9.5,id:"Line-3-Copy",stroke:"#FFFFFF",strokeWidth:2,strokeLinecap:"square"}),a.createElement("line",{x1:14,y1:17.5,x2:.498999482,y2:17.5,id:"Line-3-Copy-2",stroke:"#FFFFFF",strokeWidth:2,strokeLinecap:"square"}));function JB(e,t){var n=e.title,r=e.titleId,i=ZB(e,["title","titleId"]);return a.createElement("svg",KB({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,QB,YB)}var eA=a.forwardRef(JB);n.p;function tA(){return(tA=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var aA=a.createElement("desc",null,"Created with Sketch."),rA=a.createElement("g",{id:"icon/sf-small/filter/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("path",{d:"M19,2.5 C19,1.11909091 17.8809091,0 16.5,0 C15.1190909,0 14,1.11909091 14,2.5 C14,3.88090909 15.1190909,5 16.5,5 C17.8809091,5 19,3.88090909 19,2.5 Z",id:"Stroke-1",stroke:"#1B2559",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M5,9.5 C5,8.11909091 3.88090909,7 2.5,7 C1.11909091,7 0,8.11909091 0,9.5 C0,10.8818182 1.11909091,12 2.5,12 C3.88090909,12 5,10.8818182 5,9.5 Z",id:"Stroke-7",stroke:"#1B2559",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M19,17.5 C19,16.1190909 17.8809091,15 16.5,15 C15.1190909,15 14,16.1190909 14,17.5 C14,18.8809091 15.1190909,20 16.5,20 C17.8809091,20 19,18.8809091 19,17.5 Z",id:"Stroke-9",stroke:"#1B2559",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("line",{x1:14,y1:2.5,x2:.498999482,y2:2.5,id:"Line-3",stroke:"#1B2559",strokeWidth:2,strokeLinecap:"square"}),a.createElement("line",{x1:20,y1:9.5,x2:6.49899948,y2:9.5,id:"Line-3-Copy",stroke:"#1B2559",strokeWidth:2,strokeLinecap:"square"}),a.createElement("line",{x1:14,y1:17.5,x2:.498999482,y2:17.5,id:"Line-3-Copy-2",stroke:"#1B2559",strokeWidth:2,strokeLinecap:"square"}));function iA(e,t){var n=e.title,r=e.titleId,i=nA(e,["title","titleId"]);return a.createElement("svg",tA({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,aA,rA)}var oA=a.forwardRef(iA);n.p;function lA(){return(lA=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var sA=a.createElement("desc",null,"Created with Sketch."),dA=a.createElement("g",{id:"icon/sf-small/settings/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinejoin:"round"},a.createElement("path",{d:"M10,13 C8.34325,13 7,11.65675 7,10 C7,8.34325 8.34325,7 10,7 C11.65675,7 13,8.34325 13,10 C13,11.65675 11.65675,13 10,13 Z M19.843,11.816 C19.945,11.391 20,10.45 20,10 C20,9.55 19.945,8.609 19.843,8.184 L17.649,7.656 C17.499,7.166 17.302,6.695 17.065,6.25 L18.244,4.324 C18.016,3.951 17.39,3.247 17.071,2.929 C16.753,2.61 16.049,1.984 15.676,1.756 L13.75,2.935 C13.305,2.698 12.834,2.501 12.344,2.351 L11.816,0.157 C11.391,0.055 10.45,0 10,0 C9.55,0 8.609,0.055 8.184,0.157 L7.656,2.351 C7.166,2.501 6.695,2.698 6.25,2.935 L4.324,1.756 C3.951,1.984 3.247,2.61 2.929,2.929 C2.61,3.247 1.984,3.951 1.756,4.324 L2.935,6.25 C2.698,6.695 2.501,7.166 2.351,7.656 L0.157,8.184 C0.055,8.609 0,9.55 0,10 C0,10.45 0.055,11.391 0.157,11.816 L2.351,12.344 C2.501,12.834 2.698,13.304 2.935,13.75 L1.756,15.676 C1.984,16.049 2.61,16.753 2.929,17.071 C3.247,17.39 3.951,18.016 4.324,18.244 L6.25,17.065 C6.696,17.302 7.166,17.499 7.656,17.649 L8.184,19.843 C8.609,19.945 9.55,20 10,20 C10.45,20 11.391,19.945 11.816,19.843 L12.344,17.649 C12.834,17.499 13.304,17.302 13.75,17.065 L15.676,18.244 C16.049,18.016 16.753,17.39 17.071,17.071 C17.39,16.753 18.016,16.049 18.244,15.676 L17.065,13.75 C17.302,13.304 17.499,12.834 17.649,12.344 L19.843,11.816 Z",id:"Stroke-1",stroke:"#FFFFFF",strokeWidth:2}));function uA(e,t){var n=e.title,r=e.titleId,i=cA(e,["title","titleId"]);return a.createElement("svg",lA({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,sA,dA)}var mA=a.forwardRef(uA);n.p;function hA(){return(hA=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var bA=a.createElement("desc",null,"Created with Sketch."),fA=a.createElement("g",{id:"icon/sf-small/settings/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinejoin:"round"},a.createElement("path",{d:"M10,13 C8.34325,13 7,11.65675 7,10 C7,8.34325 8.34325,7 10,7 C11.65675,7 13,8.34325 13,10 C13,11.65675 11.65675,13 10,13 Z M19.843,11.816 C19.945,11.391 20,10.45 20,10 C20,9.55 19.945,8.609 19.843,8.184 L17.649,7.656 C17.499,7.166 17.302,6.695 17.065,6.25 L18.244,4.324 C18.016,3.951 17.39,3.247 17.071,2.929 C16.753,2.61 16.049,1.984 15.676,1.756 L13.75,2.935 C13.305,2.698 12.834,2.501 12.344,2.351 L11.816,0.157 C11.391,0.055 10.45,0 10,0 C9.55,0 8.609,0.055 8.184,0.157 L7.656,2.351 C7.166,2.501 6.695,2.698 6.25,2.935 L4.324,1.756 C3.951,1.984 3.247,2.61 2.929,2.929 C2.61,3.247 1.984,3.951 1.756,4.324 L2.935,6.25 C2.698,6.695 2.501,7.166 2.351,7.656 L0.157,8.184 C0.055,8.609 0,9.55 0,10 C0,10.45 0.055,11.391 0.157,11.816 L2.351,12.344 C2.501,12.834 2.698,13.304 2.935,13.75 L1.756,15.676 C1.984,16.049 2.61,16.753 2.929,17.071 C3.247,17.39 3.951,18.016 4.324,18.244 L6.25,17.065 C6.696,17.302 7.166,17.499 7.656,17.649 L8.184,19.843 C8.609,19.945 9.55,20 10,20 C10.45,20 11.391,19.945 11.816,19.843 L12.344,17.649 C12.834,17.499 13.304,17.302 13.75,17.065 L15.676,18.244 C16.049,18.016 16.753,17.39 17.071,17.071 C17.39,16.753 18.016,16.049 18.244,15.676 L17.065,13.75 C17.302,13.304 17.499,12.834 17.649,12.344 L19.843,11.816 Z",id:"Stroke-1",stroke:"#1B2559",strokeWidth:2}));function jA(e,t){var n=e.title,r=e.titleId,i=pA(e,["title","titleId"]);return a.createElement("svg",hA({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,bA,fA)}var gA=a.forwardRef(jA),OA=(n.p,Object(f.a)({flex:{display:"flex"},column:{flexDirection:"column"},halfWidth:{width:"50%",marginBottom:15,marginRight:50},marginTop:{marginTop:20},marginBottom:{marginBottom:20}})),xA=function(e){var t=e.it.customRequest,n=OA();return Object(ze.jsxs)("div",{children:[Object(ze.jsxs)("div",{className:I()(n.flex,n.row,n.marginTop),children:[Object(ze.jsxs)("div",{className:n.halfWidth,children:[Object(ze.jsx)(Qe,{children:"Screen 1 title"}),Object(ze.jsx)(nt,{children:t.screen1.title})]}),Object(ze.jsx)("div",{className:I()(n.halfWidth,n.flex),children:function(){var e="spaceSeparation"===t.input.constraintType?"First word label":"Text entry label";switch(t.input.type){case"text":return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsxs)("div",{className:n.halfWidth,children:[Object(ze.jsx)(Qe,{children:e}),Object(ze.jsx)(nt,{children:t.input.label1})]}),"spaceSeparation"===t.input.constraintType&&Object(ze.jsxs)("div",{className:n.halfWidth,children:[Object(ze.jsx)(Qe,{children:"Second word label"}),Object(ze.jsx)(nt,{children:t.input.label2})]})]});default:return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsxs)("div",{className:n.halfWidth,children:[Object(ze.jsx)(Qe,{children:"Screen 2 input title"}),Object(ze.jsx)(nt,{children:t.screen2.title})]}),Object(ze.jsxs)("div",{className:n.halfWidth,children:[Object(ze.jsx)(Qe,{children:"Screen 2 input description"}),Object(ze.jsx)(nt,{children:t.screen2.text})]})]})}}()})]}),Object(ze.jsxs)("div",{className:I()(n.flex,n.row,n.marginBottom),children:[Object(ze.jsxs)("div",{className:n.halfWidth,children:[Object(ze.jsx)(Qe,{children:"Screen 1 text"}),Object(ze.jsx)(nt,{children:t.screen1.text})]}),Object(ze.jsx)("div",{className:n.halfWidth,children:Object(ze.jsxs)(ze.Fragment,{children:[t.input.choiceList&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Qe,{children:"Choices"}),t.input.choiceList.map((function(e,t){return Object(ze.jsx)(nt,{children:e},t)}))]}),t.input.numDigits&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Qe,{children:"Number of digits"}),Object(ze.jsx)(nt,{children:t.input.numDigits})]})]})})]})]})},vA=n(465),yA=n(954),wA=Object(a.memo)((function(e){var t=e.enforceValueSet,n=void 0===t||t,a=Object(q.a)(e,["enforceValueSet"]),r=a.field,i=r.name,o=r.value,l=a.form.setFieldValue;return Object(ze.jsx)(Lr,Object(s.a)({name:i,value:o,options:a.options,ariaLabel:i,onChange:function(e,t){if(n&&!t)return null;l(i,t),a.resetError&&a.resetError()},className:a.className},a))}));function CA(){return(CA=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var EA=a.createElement("g",{id:"entry-icon/keyboard",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"Group-2-Copy-2",transform:"translate(0.000000, 6.000000)",fill:"#1B2559"},a.createElement("rect",{id:"Rectangle",x:0,y:0,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-5",x:0,y:12,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-8",x:0,y:24,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-3",x:12,y:113686838e-21,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-6",x:12,y:12,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-9",x:12,y:24,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-11",x:64,y:24,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-32",x:52,y:24,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-4",x:24,y:113686838e-21,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-26",x:36,y:113686838e-21,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-27",x:48,y:113686838e-21,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-28",x:60,y:113686838e-21,width:12,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-7",x:24,y:12,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-29",x:36,y:12,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-30",x:48,y:12,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-31",x:60,y:12,width:12,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-10",x:24,y:24,width:24,height:8,rx:2})));function NA(e,t){var n=e.title,r=e.titleId,i=kA(e,["title","titleId"]);return a.createElement("svg",CA({width:"72px",height:"44px",viewBox:"0 0 72 44",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"entry-icon/keyboard"):n?a.createElement("title",{id:r},n):null,EA)}var SA=a.forwardRef(NA);n.p;function IA(){return(IA=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var LA=a.createElement("g",{id:"entry-icon/keypad",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"Group",transform:"translate(20.000000, 0.000000)",fill:"#1B2559"},a.createElement("rect",{id:"Rectangle",x:0,y:0,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-5",x:0,y:12,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-8",x:0,y:24,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-3",x:12,y:0,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-6",x:12,y:12,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-9",x:12,y:24,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-11",x:12,y:36,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-4",x:24,y:0,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-7",x:24,y:12,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-10",x:24,y:24,width:8,height:8,rx:2})));function PA(e,t){var n=e.title,r=e.titleId,i=FA(e,["title","titleId"]);return a.createElement("svg",IA({width:"72px",height:"44px",viewBox:"0 0 72 44",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"entry-icon/keypad"):n?a.createElement("title",{id:r},n):null,LA)}var DA=a.forwardRef(PA);n.p;function RA(){return(RA=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var BA=a.createElement("g",{id:"entry-icon/list",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"Group-4",transform:"translate(8.000000, 0.000000)",fill:"#1B2559"},a.createElement("rect",{id:"Rectangle-Copy-33",x:0,y:0,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-35",x:0,y:12,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-37",x:0,y:24,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-39",x:0,y:36,width:8,height:8,rx:2}),a.createElement("rect",{id:"Rectangle-Copy-34",x:12,y:2,width:44,height:4,rx:1}),a.createElement("rect",{id:"Rectangle-Copy-36",x:12,y:14,width:44,height:4,rx:1}),a.createElement("rect",{id:"Rectangle-Copy-38",x:12,y:26,width:44,height:4,rx:1}),a.createElement("rect",{id:"Rectangle-Copy-40",x:12,y:38,width:44,height:4,rx:1})));function AA(e,t){var n=e.title,r=e.titleId,i=TA(e,["title","titleId"]);return a.createElement("svg",RA({width:"72px",height:"44px",viewBox:"0 0 72 44",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"entry-icon/list"):n?a.createElement("title",{id:r},n):null,BA)}var MA=a.forwardRef(AA),WA=(n.p,function(e){return Object(ze.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:G,borderRadius:4,maxWidth:104,maxHeight:64,minWidth:104,minHeight:64},children:Object(ze.jsx)(e,{style:{maxWidth:80}})})}),zA=fn.f().shape({inputType:fn.h().required()}),qA={inputType:""},$A=function(){var e=[{value:"numerical",title:"Numerical entry",description:"User will enter information with a keypad. Good for dates, ID numbers, etc.",icon:function(){return WA(DA)}},{value:"text",title:"Text entry",description:"User will entry information with a keyboard. Good for names, email, address, etc.",icon:function(){return WA(SA)}},{value:"choiceList",title:"Choice list",description:"Gives user multiple options to choose from.",icon:function(){return WA(MA)}}];return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Xe,{children:"Choose the type of data entry"}),Object(ze.jsx)(un.b,{name:"inputType",component:wA,orientation:"vertical",exclusive:!0,options:e})]})},HA=fn.f().shape({requirementName:fn.h().required()}),VA={requirementName:""},UA=function(){return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Xe,{children:"Name of the requirement"})," ",Object(ze.jsx)(Ke,{children:"The name of the requirement will only be visible to you on the dashboard on the requirement list, as well as on the custom information request list. The user won't see this name. Make sure to make it distinguishable and short."}),Object(ze.jsx)(un.b,{component:oi,label:"Requirement name",name:"requirementName",fullWidth:!0})]})},GA=fn.f().shape({screen1Title:fn.h().required(),screen1Text:fn.h().required()}),XA={screen1Title:"",screen1Text:""},_A=function(){return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Xe,{children:"Screen 1 Information"})," ",Object(ze.jsx)(Ke,{children:"On screen 1 you will request the user if he agrees on providing this information, or if he wishes to terminate the transaction instead."}),Object(ze.jsx)(un.b,{component:oi,label:"Screen title",name:"screen1Title",fullWidth:!0}),Object(ze.jsx)(un.b,{component:oi,label:"Screen text",name:"screen1Text",multiline:!0,fullWidth:!0,rows:5})]})},KA=fn.f().shape({screen2Title:fn.h().required(),screen2Text:fn.h().required()}),ZA={screen2Title:"",screen2Text:""},QA=function(){return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Xe,{children:"Screen 2 Information"})," ",Object(ze.jsx)(Ke,{children:"If the user agrees, on screen 2 is where the user will enter the custom information."}),Object(ze.jsx)(un.b,{component:oi,label:"Screen 2 input title",name:"screen2Title",fullWidth:!0}),Object(ze.jsx)(un.b,{component:oi,label:"Screen 2 input description",name:"screen2Text",fullWidth:!0})]})},YA={flex:{display:"flex"},column:{flexDirection:"column"},choiceList:{display:"flex",flexDirection:"column",maxHeight:240,overflowY:"auto"},button:{width:120,height:28,marginTop:28},textInput:{width:420},row:{flexDirection:"row"},subtitle:{marginBottom:0},radioSubtitle:{marginBottom:0},error:{color:he},tl1:{marginLeft:8,marginTop:25},numberField:{marginTop:109,maxWidth:115},label:{width:200,marginRight:8}},JA=Object(f.a)(YA),eM=function(e){return e.text&&e.text.length},tM=[{display:"Select just one",code:"selectOne"},{display:"Select multiple",code:"selectMultiple"}],nM=function(){var e,t,n,r=JA(),i=Object(un.f)(),o=Object(a.useRef)(null),l=null!==(e=A.a(["values","listChoices"])(i))&&void 0!==e?e:[],c=null!==(t=A.a(["errors","listChoices"])(i))&&void 0!==t&&t,s=(n={},Object(z.a)(n,r.radioSubtitle,!0),Object(z.a)(n,r.error,!A.a(["values","constraintType"])(i)&&A.a(["errors","constraintType"])(i)),n),d=function(e){return c&&M.a(eM)(l).length<2&&0===e.text.length};Object(a.useEffect)((function(){u()}),[l.length]);var u=function(){var e;null===(e=o.current)||void 0===e||e.scrollIntoView()};return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Xe,{className:I()(s),children:"Choice list constraints"}),Object(ze.jsx)(un.b,{component:ri,options:tM,className:r.row,name:"constraintType"}),Object(ze.jsx)(un.c,{name:"listChoices",children:function(e){var t=e.push;return Object(ze.jsxs)("div",{className:I()(r.flex,r.column),children:[Object(ze.jsx)(Xe,{className:r.subtitle,children:"Choices"}),Object(ze.jsx)("div",{className:r.choiceList,children:l.map((function(e,t){return Object(ze.jsx)("div",{ref:o,children:Object(ze.jsx)(un.b,{className:r.textInput,error:d(e),component:oi,name:"listChoices[".concat(t,"].text"),label:"Choice ".concat(t+1)})},t)}))}),Object(ze.jsx)($e,{Icon:Cn,color:"primary",InverseIcon:so,className:r.button,onClick:function(e){return e.preventDefault(),t({text:""})},children:"Add choice"})]})}})]})},aM=Object(f.a)(YA),rM=[{display:"None",code:"none"},{display:"Date",code:"date"},{display:"Length",code:"length"}],iM=function(){var e,t,n=aM(),a=Object(un.f)(),r="length"===(null!==(e=A.a(["values","constraintType"])(Object(un.f)()))&&void 0!==e?e:null),i=(t={},Object(z.a)(t,n.radioSubtitle,!0),Object(z.a)(t,n.error,!A.a(["values","constraintType"])(a)&&A.a(["errors","constraintType"])(a)),t);return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Xe,{className:I()(i),children:"Numerical entry constraints"}),Object(ze.jsx)(un.b,{className:n.row,component:ri,options:rM,name:"constraintType"}),r&&Object(ze.jsxs)("div",{className:I()(n.flex,n.numberField),children:[Object(ze.jsx)(un.b,{component:ai,name:"inputLength",label:"Length",decimalPlaces:0,allowNegative:!1}),Object(ze.jsx)(et,{className:n.tl1,children:"digits"})]})]})},oM=Object(f.a)(YA),lM=[{display:"None",code:"none"},{display:"Email",code:"email"},{display:"Space separation",subtitle:"(e.g. first and last name)",code:"spaceSeparation"}],cM=function(){var e,t=oM(),n=Object(un.f)(),a=(e={},Object(z.a)(e,t.radioSubtitle,!0),Object(z.a)(e,t.error,!A.a(["values","constraintType"])(n)&&A.a(["errors","constraintType"])(n)),e);return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Xe,{className:I()(a),children:"Text entry constraints"}),Object(ze.jsx)(un.b,{className:t.row,component:ri,options:lM,name:"constraintType"}),function(){switch(n.values.constraintType){case"spaceSeparation":return Object(ze.jsxs)("div",{className:t.flex,children:[Object(ze.jsx)(un.b,{className:t.label,component:oi,name:"inputLabel1",label:"First word label"}),Object(ze.jsx)(un.b,{className:t.label,component:oi,name:"inputLabel2",label:"Second word label"})]});default:return Object(ze.jsx)(un.b,{className:t.label,component:oi,name:"inputLabel1",label:"Text entry label"})}}()]})},sM=function(e){return e.text&&e.text.length},dM={constraintType:"",inputLength:"",inputLabel1:"",inputLabel2:"",listChoices:[{text:""},{text:""}]},uM=fn.c((function(e){switch(e.inputType){case"numerical":return fn.f({constraintType:fn.h().required(),inputLength:fn.e().when("constraintType",{is:"length",then:fn.e().min(0).required(),else:fn.d().notRequired()})});case"text":return fn.f({constraintType:fn.h().required(),inputLabel1:fn.h().required(),inputLabel2:fn.h().when("constraintType",{is:"spaceSeparation",then:fn.h().required(),else:fn.d().notRequired()})});case"choiceList":return fn.f({constraintType:fn.h().required(),listChoices:fn.a().test("has-2-or-more","Choice list needs to have two or more non empty fields",(function(e,t){return M.a(sM)(e).length>1}))});default:return fn.d().notRequired()}})),mM=function(){var e,t=null!==(e=A.a(["values","inputType"])(Object(un.f)()))&&void 0!==e?e:null,n=function(e){switch(e){case"numerical":return iM;case"text":return cM;case"choiceList":return nM;default:return iM}}(t);return t&&Object(ze.jsx)(n,{})};function hM(){return(hM=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var bM=a.createElement("defs",null,a.createElement("style",null,".cls-1,.cls-9{fill:#dee5fc;}.cls-2,.cls-9{opacity:0.8;}.cls-3{isolation:isolate;}.cls-4{clip-path:url(#clip-path);}.cls-5{clip-path:url(#clip-path-2);}.cls-6{fill:#ccd8ff;opacity:0.74;}.cls-7{clip-path:url(#clip-path-3);}.cls-8{fill:#ebefff;}.cls-10{clip-path:url(#clip-path-4);}.cls-11{clip-path:url(#clip-path-5);}.cls-12{clip-path:url(#clip-path-6);}.cls-13{clip-path:url(#clip-path-7);}.cls-14{clip-path:url(#clip-path-8);}.cls-15{clip-path:url(#clip-path-9);}.cls-16{clip-path:url(#clip-path-10);}.cls-17{clip-path:url(#clip-path-11);}.cls-18{clip-path:url(#clip-path-12);}.cls-19{clip-path:url(#clip-path-13);}.cls-20{clip-path:url(#clip-path-14);}.cls-21{clip-path:url(#clip-path-15);}.cls-22{clip-path:url(#clip-path-16);}.cls-23{clip-path:url(#clip-path-17);}.cls-24{clip-path:url(#clip-path-18);}.cls-25{clip-path:url(#clip-path-19);}.cls-26{clip-path:url(#clip-path-20);}.cls-27{clip-path:url(#clip-path-21);}.cls-28{clip-path:url(#clip-path-22);}.cls-29{clip-path:url(#clip-path-23);}.cls-30{clip-path:url(#clip-path-24);}.cls-31{clip-path:url(#clip-path-25);}.cls-32{clip-path:url(#clip-path-26);}.cls-33{clip-path:url(#clip-path-27);}.cls-34{clip-path:url(#clip-path-28);}.cls-35{clip-path:url(#clip-path-29);}.cls-36{clip-path:url(#clip-path-30);}.cls-37{clip-path:url(#clip-path-31);}.cls-38{clip-path:url(#clip-path-32);}.cls-39{clip-path:url(#clip-path-33);}.cls-40{clip-path:url(#clip-path-34);}.cls-41{clip-path:url(#clip-path-35);}.cls-42{clip-path:url(#clip-path-36);}.cls-43{clip-path:url(#clip-path-37);}.cls-44{clip-path:url(#clip-path-38);}.cls-45{clip-path:url(#clip-path-39);}.cls-46{clip-path:url(#clip-path-40);}.cls-47{clip-path:url(#clip-path-41);}.cls-48{clip-path:url(#clip-path-42);}.cls-49{clip-path:url(#clip-path-43);}.cls-50{clip-path:url(#clip-path-44);}.cls-51{clip-path:url(#clip-path-45);}.cls-52{clip-path:url(#clip-path-46);}.cls-53{clip-path:url(#clip-path-47);}.cls-54{clip-path:url(#clip-path-48);}.cls-55{clip-path:url(#clip-path-49);}.cls-56{clip-path:url(#clip-path-50);}.cls-57{clip-path:url(#clip-path-51);}.cls-58{clip-path:url(#clip-path-52);}.cls-59{clip-path:url(#clip-path-53);}.cls-60{clip-path:url(#clip-path-54);}.cls-61{clip-path:url(#clip-path-55);}.cls-62{clip-path:url(#clip-path-56);}.cls-63{clip-path:url(#clip-path-57);}.cls-64{clip-path:url(#clip-path-58);}.cls-65{clip-path:url(#clip-path-59);}.cls-66{clip-path:url(#clip-path-60);}.cls-67{clip-path:url(#clip-path-61);}.cls-68{clip-path:url(#clip-path-62);}.cls-69{clip-path:url(#clip-path-63);}.cls-70{clip-path:url(#clip-path-64);}.cls-71{clip-path:url(#clip-path-65);}.cls-72{clip-path:url(#clip-path-66);}.cls-73{clip-path:url(#clip-path-69);}.cls-74{clip-path:url(#clip-path-70);}.cls-75{clip-path:url(#clip-path-71);}.cls-76{clip-path:url(#clip-path-72);}.cls-77{clip-path:url(#clip-path-73);}.cls-78{clip-path:url(#clip-path-74);}.cls-79{clip-path:url(#clip-path-75);}.cls-80{clip-path:url(#clip-path-76);}.cls-81{clip-path:url(#clip-path-77);}.cls-82{clip-path:url(#clip-path-78);}.cls-83{clip-path:url(#clip-path-79);}.cls-84{clip-path:url(#clip-path-80);}.cls-85{clip-path:url(#clip-path-81);}.cls-86{clip-path:url(#clip-path-82);}.cls-87{fill:#4b5fef;}.cls-88{clip-path:url(#clip-path-83);}.cls-89{fill:#5a67ff;}.cls-90{fill:#7687ff;}"),a.createElement("clipPath",{id:"clip-path"},a.createElement("polygon",{className:"cls-1",points:"58.25 54.32 77.66 65.53 77.66 87.95 58.25 76.74 58.25 54.32"})),a.createElement("clipPath",{id:"clip-path-2"},a.createElement("polygon",{className:"cls-1",points:"77.66 65.53 77.66 87.95 58.25 99.16 58.25 76.74 77.66 65.53"})),a.createElement("clipPath",{id:"clip-path-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 76.74 58.25 99.16 38.83 87.95 38.83 65.53 58.25 76.74"})),a.createElement("clipPath",{id:"clip-path-4"},a.createElement("polygon",{className:"cls-1",points:"77.66 65.53 97.08 76.74 97.08 99.16 77.66 87.95 77.66 65.53"})),a.createElement("clipPath",{id:"clip-path-5"},a.createElement("polygon",{className:"cls-1",points:"97.08 76.74 97.08 99.16 77.66 110.37 77.66 87.95 97.08 76.74"})),a.createElement("clipPath",{id:"clip-path-6"},a.createElement("polygon",{className:"cls-1",points:"77.66 87.95 77.66 110.37 58.25 99.16 58.25 76.74 77.66 87.95"})),a.createElement("clipPath",{id:"clip-path-7"},a.createElement("polygon",{className:"cls-1",points:"58.25 76.74 77.66 87.95 77.66 110.37 58.25 99.16 58.25 76.74"})),a.createElement("clipPath",{id:"clip-path-8"},a.createElement("polygon",{className:"cls-1",points:"77.66 87.95 77.66 110.37 58.25 121.58 58.25 99.16 77.66 87.95"})),a.createElement("clipPath",{id:"clip-path-9"},a.createElement("polygon",{className:"cls-1",points:"58.25 99.16 58.25 121.58 38.83 110.37 38.83 87.95 58.25 99.16"})),a.createElement("clipPath",{id:"clip-path-10"},a.createElement("polygon",{className:"cls-1",points:"38.83 65.53 58.25 76.74 58.25 99.16 38.83 87.95 38.83 65.53"})),a.createElement("clipPath",{id:"clip-path-11"},a.createElement("polygon",{className:"cls-1",points:"58.25 76.74 58.25 99.16 38.83 110.37 38.83 87.95 58.25 76.74"})),a.createElement("clipPath",{id:"clip-path-12"},a.createElement("polygon",{className:"cls-1",points:"38.83 87.95 38.83 110.37 19.42 99.16 19.42 76.74 38.83 87.95"})),a.createElement("clipPath",{id:"clip-path-13"},a.createElement("polygon",{className:"cls-1",points:"19.42 76.74 38.83 87.95 38.83 110.37 19.42 99.16 19.42 76.74"})),a.createElement("clipPath",{id:"clip-path-14"},a.createElement("polygon",{className:"cls-1",points:"38.83 87.95 38.83 110.37 19.42 121.58 19.42 99.16 38.83 87.95"})),a.createElement("clipPath",{id:"clip-path-15"},a.createElement("polygon",{className:"cls-1",points:"19.42 99.16 19.42 121.58 0 110.37 0 87.95 19.42 99.16"})),a.createElement("clipPath",{id:"clip-path-16"},a.createElement("polygon",{className:"cls-1",points:"38.83 87.95 58.25 99.16 58.25 121.58 38.83 110.37 38.83 87.95"})),a.createElement("clipPath",{id:"clip-path-17"},a.createElement("polygon",{className:"cls-1",points:"58.25 99.16 58.25 121.58 38.83 132.79 38.83 110.37 58.25 99.16"})),a.createElement("clipPath",{id:"clip-path-18"},a.createElement("polygon",{className:"cls-1",points:"38.83 110.37 38.83 132.79 19.42 121.58 19.42 99.16 38.83 110.37"})),a.createElement("clipPath",{id:"clip-path-19"},a.createElement("polygon",{className:"cls-1",points:"97.08 76.74 116.5 87.95 116.5 110.37 97.08 99.16 97.08 76.74"})),a.createElement("clipPath",{id:"clip-path-20"},a.createElement("polygon",{className:"cls-1",points:"116.5 87.95 116.5 110.37 97.08 121.58 97.08 99.16 116.5 87.95"})),a.createElement("clipPath",{id:"clip-path-21"},a.createElement("polygon",{className:"cls-1",points:"97.08 99.16 97.08 121.58 77.66 110.37 77.66 87.95 97.08 99.16"})),a.createElement("clipPath",{id:"clip-path-22"},a.createElement("polygon",{className:"cls-1",points:"77.66 87.95 97.08 99.16 97.08 121.58 77.66 110.37 77.66 87.95"})),a.createElement("clipPath",{id:"clip-path-23"},a.createElement("polygon",{className:"cls-1",points:"97.08 99.16 97.08 121.58 77.66 132.79 77.66 110.37 97.08 99.16"})),a.createElement("clipPath",{id:"clip-path-24"},a.createElement("polygon",{className:"cls-1",points:"77.66 110.37 77.66 132.79 58.25 121.58 58.25 99.16 77.66 110.37"})),a.createElement("clipPath",{id:"clip-path-25"},a.createElement("polygon",{className:"cls-1",points:"58.25 99.16 77.66 110.37 77.66 132.79 58.25 121.58 58.25 99.16"})),a.createElement("clipPath",{id:"clip-path-26"},a.createElement("polygon",{className:"cls-1",points:"77.66 110.37 77.66 132.79 58.25 144 58.25 121.58 77.66 110.37"})),a.createElement("clipPath",{id:"clip-path-27"},a.createElement("polygon",{className:"cls-1",points:"58.25 121.58 58.25 144 38.83 132.79 38.83 110.37 58.25 121.58"})),a.createElement("clipPath",{id:"clip-path-28"},a.createElement("polygon",{className:"cls-1",points:"58.25 31.9 77.66 43.11 77.66 65.53 58.25 54.32 58.25 31.9"})),a.createElement("clipPath",{id:"clip-path-29"},a.createElement("polygon",{className:"cls-1",points:"77.66 43.11 77.66 65.53 58.25 76.74 58.25 54.32 77.66 43.11"})),a.createElement("clipPath",{id:"clip-path-30"},a.createElement("polygon",{className:"cls-1",points:"58.25 54.32 58.25 76.74 38.83 65.53 38.83 43.11 58.25 54.32"})),a.createElement("clipPath",{id:"clip-path-31"},a.createElement("polygon",{className:"cls-1",points:"77.66 43.11 97.08 54.32 97.08 76.74 77.66 65.53 77.66 43.11"})),a.createElement("clipPath",{id:"clip-path-32"},a.createElement("polygon",{className:"cls-1",points:"97.08 54.32 97.08 76.74 77.66 87.95 77.66 65.53 97.08 54.32"})),a.createElement("clipPath",{id:"clip-path-33"},a.createElement("polygon",{className:"cls-1",points:"77.66 65.53 77.66 87.95 58.25 76.74 58.25 54.32 77.66 65.53"})),a.createElement("clipPath",{id:"clip-path-34"},a.createElement("polygon",{className:"cls-1",points:"97.08 54.32 116.5 65.53 116.5 87.95 97.08 76.74 97.08 54.32"})),a.createElement("clipPath",{id:"clip-path-35"},a.createElement("polygon",{className:"cls-1",points:"116.5 65.53 116.5 87.95 97.08 99.16 97.08 76.74 116.5 65.53"})),a.createElement("clipPath",{id:"clip-path-36"},a.createElement("polygon",{className:"cls-1",points:"97.08 76.74 97.08 99.16 77.66 87.95 77.66 65.53 97.08 76.74"})),a.createElement("clipPath",{id:"clip-path-37"},a.createElement("polygon",{className:"cls-1",points:"58.25 54.32 77.66 65.53 77.66 87.95 58.25 76.74 58.25 54.32"})),a.createElement("clipPath",{id:"clip-path-38"},a.createElement("polygon",{className:"cls-1",points:"77.66 65.53 77.66 87.95 58.25 99.16 58.25 76.74 77.66 65.53"})),a.createElement("clipPath",{id:"clip-path-39"},a.createElement("polygon",{className:"cls-1",points:"58.25 76.74 58.25 99.16 38.83 87.95 38.83 65.53 58.25 76.74"})),a.createElement("clipPath",{id:"clip-path-40"},a.createElement("polygon",{className:"cls-1",points:"38.83 43.11 58.25 54.32 58.25 76.74 38.83 65.53 38.83 43.11"})),a.createElement("clipPath",{id:"clip-path-41"},a.createElement("polygon",{className:"cls-1",points:"58.25 54.32 58.25 76.74 38.83 87.95 38.83 65.53 58.25 54.32"})),a.createElement("clipPath",{id:"clip-path-42"},a.createElement("polygon",{className:"cls-1",points:"38.83 65.53 38.83 87.95 19.42 76.74 19.42 54.32 38.83 65.53"})),a.createElement("clipPath",{id:"clip-path-43"},a.createElement("polygon",{className:"cls-1",points:"77.66 65.53 97.08 76.74 97.08 99.16 77.66 87.95 77.66 65.53"})),a.createElement("clipPath",{id:"clip-path-44"},a.createElement("polygon",{className:"cls-1",points:"97.08 76.74 97.08 99.16 77.66 110.37 77.66 87.95 97.08 76.74"})),a.createElement("clipPath",{id:"clip-path-45"},a.createElement("polygon",{className:"cls-1",points:"77.66 87.95 77.66 110.37 58.25 99.16 58.25 76.74 77.66 87.95"})),a.createElement("clipPath",{id:"clip-path-46"},a.createElement("polygon",{className:"cls-1",points:"19.42 54.32 38.83 65.53 38.83 87.95 19.42 76.74 19.42 54.32"})),a.createElement("clipPath",{id:"clip-path-47"},a.createElement("polygon",{className:"cls-1",points:"38.83 65.53 38.83 87.95 19.42 99.16 19.42 76.74 38.83 65.53"})),a.createElement("clipPath",{id:"clip-path-48"},a.createElement("polygon",{className:"cls-1",points:"19.42 76.74 19.42 99.16 0 87.95 0 65.53 19.42 76.74"})),a.createElement("clipPath",{id:"clip-path-49"},a.createElement("polygon",{className:"cls-1",points:"38.83 65.53 58.25 76.74 58.25 99.16 38.83 87.95 38.83 65.53"})),a.createElement("clipPath",{id:"clip-path-50"},a.createElement("polygon",{className:"cls-1",points:"58.25 76.74 58.25 99.16 38.83 110.37 38.83 87.95 58.25 76.74"})),a.createElement("clipPath",{id:"clip-path-51"},a.createElement("polygon",{className:"cls-1",points:"38.83 87.95 38.83 110.37 19.42 99.16 19.42 76.74 38.83 87.95"})),a.createElement("clipPath",{id:"clip-path-52"},a.createElement("polygon",{className:"cls-1",points:"58.25 76.74 77.66 87.95 77.66 110.37 58.25 99.16 58.25 76.74"})),a.createElement("clipPath",{id:"clip-path-53"},a.createElement("polygon",{className:"cls-1",points:"77.66 87.95 77.66 110.37 58.25 121.58 58.25 99.16 77.66 87.95"})),a.createElement("clipPath",{id:"clip-path-54"},a.createElement("polygon",{className:"cls-1",points:"58.25 99.16 58.25 121.58 38.83 110.37 38.83 87.95 58.25 99.16"})),a.createElement("clipPath",{id:"clip-path-55"},a.createElement("polygon",{className:"cls-1",points:"58.25 9.48 77.66 20.69 77.66 43.11 58.25 31.9 58.25 9.48"})),a.createElement("clipPath",{id:"clip-path-56"},a.createElement("polygon",{className:"cls-1",points:"77.66 20.69 77.66 43.11 58.25 54.32 58.25 31.9 77.66 20.69"})),a.createElement("clipPath",{id:"clip-path-57"},a.createElement("polygon",{className:"cls-1",points:"58.25 31.9 58.25 54.32 38.83 43.11 38.83 20.69 58.25 31.9"})),a.createElement("clipPath",{id:"clip-path-58"},a.createElement("polygon",{className:"cls-1",points:"58.25 31.9 77.66 43.11 77.66 65.53 58.25 54.32 58.25 31.9"})),a.createElement("clipPath",{id:"clip-path-59"},a.createElement("polygon",{className:"cls-1",points:"77.66 43.11 77.66 65.53 58.25 76.74 58.25 54.32 77.66 43.11"})),a.createElement("clipPath",{id:"clip-path-60"},a.createElement("polygon",{className:"cls-1",points:"58.25 54.32 58.25 76.74 38.83 65.53 38.83 43.11 58.25 54.32"})),a.createElement("clipPath",{id:"clip-path-61"},a.createElement("polygon",{className:"cls-1",points:"77.66 20.69 97.08 31.9 97.08 54.32 77.66 43.11 77.66 20.69"})),a.createElement("clipPath",{id:"clip-path-62"},a.createElement("polygon",{className:"cls-1",points:"97.08 31.9 97.08 54.32 77.66 65.53 77.66 43.11 97.08 31.9"})),a.createElement("clipPath",{id:"clip-path-63"},a.createElement("polygon",{className:"cls-1",points:"77.66 43.11 77.66 65.53 58.25 54.32 58.25 31.9 77.66 43.11"})),a.createElement("clipPath",{id:"clip-path-64"},a.createElement("polygon",{className:"cls-1",points:"38.83 20.69 58.25 31.9 58.25 54.32 38.83 43.11 38.83 20.69"})),a.createElement("clipPath",{id:"clip-path-65"},a.createElement("polygon",{className:"cls-1",points:"58.25 31.9 58.25 54.32 38.83 65.53 38.83 43.11 58.25 31.9"})),a.createElement("clipPath",{id:"clip-path-66"},a.createElement("polygon",{className:"cls-1",points:"38.83 43.11 38.83 65.53 19.42 54.32 19.42 31.9 38.83 43.11"})),a.createElement("clipPath",{id:"clip-path-69"},a.createElement("polygon",{className:"cls-1",points:"19.42 31.9 38.83 43.11 38.83 65.53 19.42 54.32 19.42 31.9"})),a.createElement("clipPath",{id:"clip-path-70"},a.createElement("polygon",{className:"cls-1",points:"38.83 43.11 38.83 65.53 19.42 76.74 19.42 54.32 38.83 43.11"})),a.createElement("clipPath",{id:"clip-path-71"},a.createElement("polygon",{className:"cls-1",points:"19.42 54.32 19.42 76.74 0 65.53 0 43.11 19.42 54.32"})),a.createElement("clipPath",{id:"clip-path-72"},a.createElement("polygon",{className:"cls-1",points:"38.83 43.11 58.25 54.32 58.25 76.74 38.83 65.53 38.83 43.11"})),a.createElement("clipPath",{id:"clip-path-73"},a.createElement("polygon",{className:"cls-1",points:"58.25 54.32 58.25 76.74 38.83 87.95 38.83 65.53 58.25 54.32"})),a.createElement("clipPath",{id:"clip-path-74"},a.createElement("polygon",{className:"cls-1",points:"38.83 65.53 38.83 87.95 19.42 76.74 19.42 54.32 38.83 65.53"})),a.createElement("clipPath",{id:"clip-path-75"},a.createElement("polygon",{className:"cls-1",points:"97.08 31.9 116.5 43.11 116.5 65.53 97.08 54.32 97.08 31.9"})),a.createElement("clipPath",{id:"clip-path-76"},a.createElement("polygon",{className:"cls-1",points:"116.5 43.11 116.5 65.53 97.08 76.74 97.08 54.32 116.5 43.11"})),a.createElement("clipPath",{id:"clip-path-77"},a.createElement("polygon",{className:"cls-1",points:"97.08 54.32 97.08 76.74 77.66 65.53 77.66 43.11 97.08 54.32"})),a.createElement("clipPath",{id:"clip-path-78"},a.createElement("polygon",{className:"cls-1",points:"77.66 43.11 97.08 54.32 97.08 76.74 77.66 65.53 77.66 43.11"})),a.createElement("clipPath",{id:"clip-path-79"},a.createElement("polygon",{className:"cls-1",points:"97.08 54.32 97.08 76.74 77.66 87.95 77.66 65.53 97.08 54.32"})),a.createElement("clipPath",{id:"clip-path-80"},a.createElement("polygon",{className:"cls-1",points:"77.66 65.53 77.66 87.95 58.25 76.74 58.25 54.32 77.66 65.53"})),a.createElement("clipPath",{id:"clip-path-81"},a.createElement("polygon",{className:"cls-1",points:"58.25 0 77.66 11.21 77.66 33.63 58.25 22.42 58.25 0"})),a.createElement("clipPath",{id:"clip-path-82"},a.createElement("polygon",{className:"cls-1",points:"77.66 11.21 77.66 33.63 58.25 44.84 58.25 22.42 77.66 11.21"})),a.createElement("clipPath",{id:"clip-path-83"},a.createElement("polygon",{className:"cls-1",points:"58.25 22.42 58.25 44.84 38.83 33.63 38.83 11.21 58.25 22.42"}))),fM=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 54.32 77.66 65.53 77.66 87.95 58.25 76.74 58.25 54.32"}),a.createElement("g",{className:"cls-4"},a.createElement("polygon",{className:"cls-1",points:"58.25 54.32 77.66 65.53 77.66 87.95 58.25 76.74 58.25 54.32"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"77.66 65.53 77.66 87.95 58.25 99.16 58.25 76.74 77.66 65.53"}),a.createElement("g",{className:"cls-5"},a.createElement("polygon",{className:"cls-6",points:"77.66 65.53 77.66 87.95 58.25 99.16 58.25 76.74 77.66 65.53"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 76.74 58.25 99.16 38.83 87.95 38.83 65.53 58.25 76.74"}),a.createElement("g",{className:"cls-7"},a.createElement("polygon",{className:"cls-8",points:"58.25 76.74 58.25 99.16 38.83 87.95 38.83 65.53 58.25 76.74"}))))),jM=a.createElement("polygon",{className:"cls-9",points:"38.83 65.53 58.25 54.32 77.66 65.53 58.25 76.74 38.83 65.53"}),gM=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"77.66 65.53 97.08 76.74 97.08 99.16 77.66 87.95 77.66 65.53"}),a.createElement("g",{className:"cls-10"},a.createElement("polygon",{className:"cls-1",points:"77.66 65.53 97.08 76.74 97.08 99.16 77.66 87.95 77.66 65.53"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"97.08 76.74 97.08 99.16 77.66 110.37 77.66 87.95 97.08 76.74"}),a.createElement("g",{className:"cls-11"},a.createElement("polygon",{className:"cls-6",points:"97.08 76.74 97.08 99.16 77.66 110.37 77.66 87.95 97.08 76.74"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"77.66 87.95 77.66 110.37 58.25 99.16 58.25 76.74 77.66 87.95"}),a.createElement("g",{className:"cls-12"},a.createElement("polygon",{className:"cls-8",points:"77.66 87.95 77.66 110.37 58.25 99.16 58.25 76.74 77.66 87.95"}))))),OM=a.createElement("polygon",{className:"cls-9",points:"58.25 76.74 77.66 65.53 97.08 76.74 77.66 87.95 58.25 76.74"}),xM=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 76.74 77.66 87.95 77.66 110.37 58.25 99.16 58.25 76.74"}),a.createElement("g",{className:"cls-13"},a.createElement("polygon",{className:"cls-1",points:"58.25 76.74 77.66 87.95 77.66 110.37 58.25 99.16 58.25 76.74"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"77.66 87.95 77.66 110.37 58.25 121.58 58.25 99.16 77.66 87.95"}),a.createElement("g",{className:"cls-14"},a.createElement("polygon",{className:"cls-6",points:"77.66 87.95 77.66 110.37 58.25 121.58 58.25 99.16 77.66 87.95"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 99.16 58.25 121.58 38.83 110.37 38.83 87.95 58.25 99.16"}),a.createElement("g",{className:"cls-15"},a.createElement("polygon",{className:"cls-8",points:"58.25 99.16 58.25 121.58 38.83 110.37 38.83 87.95 58.25 99.16"}))))),vM=a.createElement("polygon",{className:"cls-9",points:"38.83 87.95 58.25 76.74 77.66 87.95 58.25 99.16 38.83 87.95"}),yM=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"38.83 65.53 58.25 76.74 58.25 99.16 38.83 87.95 38.83 65.53"}),a.createElement("g",{className:"cls-16"},a.createElement("polygon",{className:"cls-1",points:"38.83 65.53 58.25 76.74 58.25 99.16 38.83 87.95 38.83 65.53"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 76.74 58.25 99.16 38.83 110.37 38.83 87.95 58.25 76.74"}),a.createElement("g",{className:"cls-17"},a.createElement("polygon",{className:"cls-6",points:"58.25 76.74 58.25 99.16 38.83 110.37 38.83 87.95 58.25 76.74"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"38.83 87.95 38.83 110.37 19.42 99.16 19.42 76.74 38.83 87.95"}),a.createElement("g",{className:"cls-18"},a.createElement("polygon",{className:"cls-8",points:"38.83 87.95 38.83 110.37 19.42 99.16 19.42 76.74 38.83 87.95"}))))),wM=a.createElement("polygon",{className:"cls-9",points:"19.42 76.74 38.83 65.53 58.25 76.74 38.83 87.95 19.42 76.74"}),CM=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"19.42 76.74 38.83 87.95 38.83 110.37 19.42 99.16 19.42 76.74"}),a.createElement("g",{className:"cls-19"},a.createElement("polygon",{className:"cls-1",points:"19.42 76.74 38.83 87.95 38.83 110.37 19.42 99.16 19.42 76.74"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"38.83 87.95 38.83 110.37 19.42 121.58 19.42 99.16 38.83 87.95"}),a.createElement("g",{className:"cls-20"},a.createElement("polygon",{className:"cls-6",points:"38.83 87.95 38.83 110.37 19.42 121.58 19.42 99.16 38.83 87.95"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"19.42 99.16 19.42 121.58 0 110.37 0 87.95 19.42 99.16"}),a.createElement("g",{className:"cls-21"},a.createElement("polygon",{className:"cls-8",points:"19.42 99.16 19.42 121.58 0 110.37 0 87.95 19.42 99.16"}))))),kM=a.createElement("polygon",{className:"cls-9",points:"0 87.95 19.42 76.74 38.83 87.95 19.42 99.16 0 87.95"}),EM=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"38.83 87.95 58.25 99.16 58.25 121.58 38.83 110.37 38.83 87.95"}),a.createElement("g",{className:"cls-22"},a.createElement("polygon",{className:"cls-1",points:"38.83 87.95 58.25 99.16 58.25 121.58 38.83 110.37 38.83 87.95"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 99.16 58.25 121.58 38.83 132.79 38.83 110.37 58.25 99.16"}),a.createElement("g",{className:"cls-23"},a.createElement("polygon",{className:"cls-6",points:"58.25 99.16 58.25 121.58 38.83 132.79 38.83 110.37 58.25 99.16"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"38.83 110.37 38.83 132.79 19.42 121.58 19.42 99.16 38.83 110.37"}),a.createElement("g",{className:"cls-24"},a.createElement("polygon",{className:"cls-8",points:"38.83 110.37 38.83 132.79 19.42 121.58 19.42 99.16 38.83 110.37"}))))),NM=a.createElement("polygon",{className:"cls-9",points:"19.42 99.16 38.83 87.95 58.25 99.16 38.83 110.37 19.42 99.16"}),SM=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"97.08 76.74 116.5 87.95 116.5 110.37 97.08 99.16 97.08 76.74"}),a.createElement("g",{className:"cls-25"},a.createElement("polygon",{className:"cls-1",points:"97.08 76.74 116.5 87.95 116.5 110.37 97.08 99.16 97.08 76.74"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"116.5 87.95 116.5 110.37 97.08 121.58 97.08 99.16 116.5 87.95"}),a.createElement("g",{className:"cls-26"},a.createElement("polygon",{className:"cls-6",points:"116.5 87.95 116.5 110.37 97.08 121.58 97.08 99.16 116.5 87.95"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"97.08 99.16 97.08 121.58 77.66 110.37 77.66 87.95 97.08 99.16"}),a.createElement("g",{className:"cls-27"},a.createElement("polygon",{className:"cls-8",points:"97.08 99.16 97.08 121.58 77.66 110.37 77.66 87.95 97.08 99.16"}))))),IM=a.createElement("polygon",{className:"cls-9",points:"77.66 87.95 97.08 76.74 116.5 87.95 97.08 99.16 77.66 87.95"}),FM=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"77.66 87.95 97.08 99.16 97.08 121.58 77.66 110.37 77.66 87.95"}),a.createElement("g",{className:"cls-28"},a.createElement("polygon",{className:"cls-1",points:"77.66 87.95 97.08 99.16 97.08 121.58 77.66 110.37 77.66 87.95"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"97.08 99.16 97.08 121.58 77.66 132.79 77.66 110.37 97.08 99.16"}),a.createElement("g",{className:"cls-29"},a.createElement("polygon",{className:"cls-6",points:"97.08 99.16 97.08 121.58 77.66 132.79 77.66 110.37 97.08 99.16"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"77.66 110.37 77.66 132.79 58.25 121.58 58.25 99.16 77.66 110.37"}),a.createElement("g",{className:"cls-30"},a.createElement("polygon",{className:"cls-8",points:"77.66 110.37 77.66 132.79 58.25 121.58 58.25 99.16 77.66 110.37"}))))),LM=a.createElement("polygon",{className:"cls-9",points:"58.25 99.16 77.66 87.95 97.08 99.16 77.66 110.37 58.25 99.16"}),PM=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 99.16 77.66 110.37 77.66 132.79 58.25 121.58 58.25 99.16"}),a.createElement("g",{className:"cls-31"},a.createElement("polygon",{className:"cls-1",points:"58.25 99.16 77.66 110.37 77.66 132.79 58.25 121.58 58.25 99.16"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"77.66 110.37 77.66 132.79 58.25 144 58.25 121.58 77.66 110.37"}),a.createElement("g",{className:"cls-32"},a.createElement("polygon",{className:"cls-6",points:"77.66 110.37 77.66 132.79 58.25 144 58.25 121.58 77.66 110.37"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 121.58 58.25 144 38.83 132.79 38.83 110.37 58.25 121.58"}),a.createElement("g",{className:"cls-33"},a.createElement("polygon",{className:"cls-8",points:"58.25 121.58 58.25 144 38.83 132.79 38.83 110.37 58.25 121.58"}))))),DM=a.createElement("polygon",{className:"cls-9",points:"38.83 110.37 58.25 99.16 77.66 110.37 58.25 121.58 38.83 110.37"}),RM=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 31.9 77.66 43.11 77.66 65.53 58.25 54.32 58.25 31.9"}),a.createElement("g",{className:"cls-34"},a.createElement("polygon",{className:"cls-1",points:"58.25 31.9 77.66 43.11 77.66 65.53 58.25 54.32 58.25 31.9"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"77.66 43.11 77.66 65.53 58.25 76.74 58.25 54.32 77.66 43.11"}),a.createElement("g",{className:"cls-35"},a.createElement("polygon",{className:"cls-6",points:"77.66 43.11 77.66 65.53 58.25 76.74 58.25 54.32 77.66 43.11"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 54.32 58.25 76.74 38.83 65.53 38.83 43.11 58.25 54.32"}),a.createElement("g",{className:"cls-36"},a.createElement("polygon",{className:"cls-8",points:"58.25 54.32 58.25 76.74 38.83 65.53 38.83 43.11 58.25 54.32"}))))),TM=a.createElement("polygon",{className:"cls-9",points:"38.83 43.11 58.25 31.9 77.66 43.11 58.25 54.32 38.83 43.11"}),BM=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"77.66 43.11 97.08 54.32 97.08 76.74 77.66 65.53 77.66 43.11"}),a.createElement("g",{className:"cls-37"},a.createElement("polygon",{className:"cls-1",points:"77.66 43.11 97.08 54.32 97.08 76.74 77.66 65.53 77.66 43.11"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"97.08 54.32 97.08 76.74 77.66 87.95 77.66 65.53 97.08 54.32"}),a.createElement("g",{className:"cls-38"},a.createElement("polygon",{className:"cls-6",points:"97.08 54.32 97.08 76.74 77.66 87.95 77.66 65.53 97.08 54.32"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"77.66 65.53 77.66 87.95 58.25 76.74 58.25 54.32 77.66 65.53"}),a.createElement("g",{className:"cls-39"},a.createElement("polygon",{className:"cls-8",points:"77.66 65.53 77.66 87.95 58.25 76.74 58.25 54.32 77.66 65.53"}))))),AM=a.createElement("polygon",{className:"cls-9",points:"58.25 54.32 77.66 43.11 97.08 54.32 77.66 65.53 58.25 54.32"}),MM=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"97.08 54.32 116.5 65.53 116.5 87.95 97.08 76.74 97.08 54.32"}),a.createElement("g",{className:"cls-40"},a.createElement("polygon",{className:"cls-1",points:"97.08 54.32 116.5 65.53 116.5 87.95 97.08 76.74 97.08 54.32"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"116.5 65.53 116.5 87.95 97.08 99.16 97.08 76.74 116.5 65.53"}),a.createElement("g",{className:"cls-41"},a.createElement("polygon",{className:"cls-6",points:"116.5 65.53 116.5 87.95 97.08 99.16 97.08 76.74 116.5 65.53"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"97.08 76.74 97.08 99.16 77.66 87.95 77.66 65.53 97.08 76.74"}),a.createElement("g",{className:"cls-42"},a.createElement("polygon",{className:"cls-8",points:"97.08 76.74 97.08 99.16 77.66 87.95 77.66 65.53 97.08 76.74"}))))),WM=a.createElement("polygon",{className:"cls-9",points:"77.66 65.53 97.08 54.32 116.5 65.53 97.08 76.74 77.66 65.53"}),zM=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 54.32 77.66 65.53 77.66 87.95 58.25 76.74 58.25 54.32"}),a.createElement("g",{className:"cls-43"},a.createElement("polygon",{className:"cls-1",points:"58.25 54.32 77.66 65.53 77.66 87.95 58.25 76.74 58.25 54.32"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"77.66 65.53 77.66 87.95 58.25 99.16 58.25 76.74 77.66 65.53"}),a.createElement("g",{className:"cls-44"},a.createElement("polygon",{className:"cls-6",points:"77.66 65.53 77.66 87.95 58.25 99.16 58.25 76.74 77.66 65.53"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 76.74 58.25 99.16 38.83 87.95 38.83 65.53 58.25 76.74"}),a.createElement("g",{className:"cls-45"},a.createElement("polygon",{className:"cls-8",points:"58.25 76.74 58.25 99.16 38.83 87.95 38.83 65.53 58.25 76.74"}))))),qM=a.createElement("polygon",{className:"cls-9",points:"38.83 65.53 58.25 54.32 77.66 65.53 58.25 76.74 38.83 65.53"}),$M=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"38.83 43.11 58.25 54.32 58.25 76.74 38.83 65.53 38.83 43.11"}),a.createElement("g",{className:"cls-46"},a.createElement("polygon",{className:"cls-1",points:"38.83 43.11 58.25 54.32 58.25 76.74 38.83 65.53 38.83 43.11"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 54.32 58.25 76.74 38.83 87.95 38.83 65.53 58.25 54.32"}),a.createElement("g",{className:"cls-47"},a.createElement("polygon",{className:"cls-6",points:"58.25 54.32 58.25 76.74 38.83 87.95 38.83 65.53 58.25 54.32"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"38.83 65.53 38.83 87.95 19.42 76.74 19.42 54.32 38.83 65.53"}),a.createElement("g",{className:"cls-48"},a.createElement("polygon",{className:"cls-8",points:"38.83 65.53 38.83 87.95 19.42 76.74 19.42 54.32 38.83 65.53"}))))),HM=a.createElement("polygon",{className:"cls-9",points:"19.42 54.32 38.83 43.11 58.25 54.32 38.83 65.53 19.42 54.32"}),VM=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"77.66 65.53 97.08 76.74 97.08 99.16 77.66 87.95 77.66 65.53"}),a.createElement("g",{className:"cls-49"},a.createElement("polygon",{className:"cls-1",points:"77.66 65.53 97.08 76.74 97.08 99.16 77.66 87.95 77.66 65.53"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"97.08 76.74 97.08 99.16 77.66 110.37 77.66 87.95 97.08 76.74"}),a.createElement("g",{className:"cls-50"},a.createElement("polygon",{className:"cls-6",points:"97.08 76.74 97.08 99.16 77.66 110.37 77.66 87.95 97.08 76.74"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"77.66 87.95 77.66 110.37 58.25 99.16 58.25 76.74 77.66 87.95"}),a.createElement("g",{className:"cls-51"},a.createElement("polygon",{className:"cls-8",points:"77.66 87.95 77.66 110.37 58.25 99.16 58.25 76.74 77.66 87.95"}))))),UM=a.createElement("polygon",{className:"cls-9",points:"58.25 76.74 77.66 65.53 97.08 76.74 77.66 87.95 58.25 76.74"}),GM=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"19.42 54.32 38.83 65.53 38.83 87.95 19.42 76.74 19.42 54.32"}),a.createElement("g",{className:"cls-52"},a.createElement("polygon",{className:"cls-1",points:"19.42 54.32 38.83 65.53 38.83 87.95 19.42 76.74 19.42 54.32"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"38.83 65.53 38.83 87.95 19.42 99.16 19.42 76.74 38.83 65.53"}),a.createElement("g",{className:"cls-53"},a.createElement("polygon",{className:"cls-6",points:"38.83 65.53 38.83 87.95 19.42 99.16 19.42 76.74 38.83 65.53"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"19.42 76.74 19.42 99.16 0 87.95 0 65.53 19.42 76.74"}),a.createElement("g",{className:"cls-54"},a.createElement("polygon",{className:"cls-8",points:"19.42 76.74 19.42 99.16 0 87.95 0 65.53 19.42 76.74"}))))),XM=a.createElement("polygon",{className:"cls-9",points:"0 65.53 19.42 54.32 38.83 65.53 19.42 76.74 0 65.53"}),_M=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"38.83 65.53 58.25 76.74 58.25 99.16 38.83 87.95 38.83 65.53"}),a.createElement("g",{className:"cls-55"},a.createElement("polygon",{className:"cls-1",points:"38.83 65.53 58.25 76.74 58.25 99.16 38.83 87.95 38.83 65.53"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 76.74 58.25 99.16 38.83 110.37 38.83 87.95 58.25 76.74"}),a.createElement("g",{className:"cls-56"},a.createElement("polygon",{className:"cls-6",points:"58.25 76.74 58.25 99.16 38.83 110.37 38.83 87.95 58.25 76.74"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"38.83 87.95 38.83 110.37 19.42 99.16 19.42 76.74 38.83 87.95"}),a.createElement("g",{className:"cls-57"},a.createElement("polygon",{className:"cls-8",points:"38.83 87.95 38.83 110.37 19.42 99.16 19.42 76.74 38.83 87.95"}))))),KM=a.createElement("polygon",{className:"cls-9",points:"19.42 76.74 38.83 65.53 58.25 76.74 38.83 87.95 19.42 76.74"}),ZM=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 76.74 77.66 87.95 77.66 110.37 58.25 99.16 58.25 76.74"}),a.createElement("g",{className:"cls-58"},a.createElement("polygon",{className:"cls-1",points:"58.25 76.74 77.66 87.95 77.66 110.37 58.25 99.16 58.25 76.74"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"77.66 87.95 77.66 110.37 58.25 121.58 58.25 99.16 77.66 87.95"}),a.createElement("g",{className:"cls-59"},a.createElement("polygon",{className:"cls-6",points:"77.66 87.95 77.66 110.37 58.25 121.58 58.25 99.16 77.66 87.95"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 99.16 58.25 121.58 38.83 110.37 38.83 87.95 58.25 99.16"}),a.createElement("g",{className:"cls-60"},a.createElement("polygon",{className:"cls-8",points:"58.25 99.16 58.25 121.58 38.83 110.37 38.83 87.95 58.25 99.16"}))))),QM=a.createElement("polygon",{className:"cls-9",points:"38.83 87.95 58.25 76.74 77.66 87.95 58.25 99.16 38.83 87.95"}),YM=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 9.48 77.66 20.69 77.66 43.11 58.25 31.9 58.25 9.48"}),a.createElement("g",{className:"cls-61"},a.createElement("polygon",{className:"cls-1",points:"58.25 9.48 77.66 20.69 77.66 43.11 58.25 31.9 58.25 9.48"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"77.66 20.69 77.66 43.11 58.25 54.32 58.25 31.9 77.66 20.69"}),a.createElement("g",{className:"cls-62"},a.createElement("polygon",{className:"cls-6",points:"77.66 20.69 77.66 43.11 58.25 54.32 58.25 31.9 77.66 20.69"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 31.9 58.25 54.32 38.83 43.11 38.83 20.69 58.25 31.9"}),a.createElement("g",{className:"cls-63"},a.createElement("polygon",{className:"cls-8",points:"58.25 31.9 58.25 54.32 38.83 43.11 38.83 20.69 58.25 31.9"}))))),JM=a.createElement("polygon",{className:"cls-9",points:"38.83 20.69 58.25 9.48 77.66 20.69 58.25 31.9 38.83 20.69"}),eW=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 31.9 77.66 43.11 77.66 65.53 58.25 54.32 58.25 31.9"}),a.createElement("g",{className:"cls-64"},a.createElement("polygon",{className:"cls-1",points:"58.25 31.9 77.66 43.11 77.66 65.53 58.25 54.32 58.25 31.9"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"77.66 43.11 77.66 65.53 58.25 76.74 58.25 54.32 77.66 43.11"}),a.createElement("g",{className:"cls-65"},a.createElement("polygon",{className:"cls-6",points:"77.66 43.11 77.66 65.53 58.25 76.74 58.25 54.32 77.66 43.11"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 54.32 58.25 76.74 38.83 65.53 38.83 43.11 58.25 54.32"}),a.createElement("g",{className:"cls-66"},a.createElement("polygon",{className:"cls-8",points:"58.25 54.32 58.25 76.74 38.83 65.53 38.83 43.11 58.25 54.32"}))))),tW=a.createElement("polygon",{className:"cls-9",points:"38.83 43.11 58.25 31.9 77.66 43.11 58.25 54.32 38.83 43.11"}),nW=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"77.66 20.69 97.08 31.9 97.08 54.32 77.66 43.11 77.66 20.69"}),a.createElement("g",{className:"cls-67"},a.createElement("polygon",{className:"cls-1",points:"77.66 20.69 97.08 31.9 97.08 54.32 77.66 43.11 77.66 20.69"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"97.08 31.9 97.08 54.32 77.66 65.53 77.66 43.11 97.08 31.9"}),a.createElement("g",{className:"cls-68"},a.createElement("polygon",{className:"cls-6",points:"97.08 31.9 97.08 54.32 77.66 65.53 77.66 43.11 97.08 31.9"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"77.66 43.11 77.66 65.53 58.25 54.32 58.25 31.9 77.66 43.11"}),a.createElement("g",{className:"cls-69"},a.createElement("polygon",{className:"cls-8",points:"77.66 43.11 77.66 65.53 58.25 54.32 58.25 31.9 77.66 43.11"}))))),aW=a.createElement("polygon",{className:"cls-9",points:"58.25 31.9 77.66 20.69 97.08 31.9 77.66 43.11 58.25 31.9"}),rW=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"38.83 20.69 58.25 31.9 58.25 54.32 38.83 43.11 38.83 20.69"}),a.createElement("g",{className:"cls-70"},a.createElement("polygon",{className:"cls-1",points:"38.83 20.69 58.25 31.9 58.25 54.32 38.83 43.11 38.83 20.69"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 31.9 58.25 54.32 38.83 65.53 38.83 43.11 58.25 31.9"}),a.createElement("g",{className:"cls-71"},a.createElement("polygon",{className:"cls-6",points:"58.25 31.9 58.25 54.32 38.83 65.53 38.83 43.11 58.25 31.9"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"38.83 43.11 38.83 65.53 19.42 54.32 19.42 31.9 38.83 43.11"}),a.createElement("g",{className:"cls-72"},a.createElement("polygon",{className:"cls-8",points:"38.83 43.11 38.83 65.53 19.42 54.32 19.42 31.9 38.83 43.11"}))))),iW=a.createElement("polygon",{className:"cls-9",points:"19.42 31.9 38.83 20.69 58.25 31.9 38.83 43.11 19.42 31.9"}),oW=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"77.66 43.11 77.66 65.53 58.25 76.74 58.25 54.32 77.66 43.11"}),a.createElement("g",{className:"cls-35"},a.createElement("polygon",{className:"cls-6",points:"77.66 43.11 77.66 65.53 58.25 76.74 58.25 54.32 77.66 43.11"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 54.32 58.25 76.74 38.83 65.53 38.83 43.11 58.25 54.32"}),a.createElement("g",{className:"cls-36"},a.createElement("polygon",{className:"cls-8",points:"58.25 54.32 58.25 76.74 38.83 65.53 38.83 43.11 58.25 54.32"}))),a.createElement("polygon",{className:"cls-1",points:"38.83 43.11 58.25 31.9 77.66 43.11 58.25 54.32 38.83 43.11"}))),lW=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"19.42 31.9 38.83 43.11 38.83 65.53 19.42 54.32 19.42 31.9"}),a.createElement("g",{className:"cls-73"},a.createElement("polygon",{className:"cls-1",points:"19.42 31.9 38.83 43.11 38.83 65.53 19.42 54.32 19.42 31.9"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"38.83 43.11 38.83 65.53 19.42 76.74 19.42 54.32 38.83 43.11"}),a.createElement("g",{className:"cls-74"},a.createElement("polygon",{className:"cls-6",points:"38.83 43.11 38.83 65.53 19.42 76.74 19.42 54.32 38.83 43.11"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"19.42 54.32 19.42 76.74 0 65.53 0 43.11 19.42 54.32"}),a.createElement("g",{className:"cls-75"},a.createElement("polygon",{className:"cls-8",points:"19.42 54.32 19.42 76.74 0 65.53 0 43.11 19.42 54.32"}))))),cW=a.createElement("polygon",{className:"cls-9",points:"0 43.11 19.42 31.9 38.83 43.11 19.42 54.32 0 43.11"}),sW=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"38.83 43.11 58.25 54.32 58.25 76.74 38.83 65.53 38.83 43.11"}),a.createElement("g",{className:"cls-76"},a.createElement("polygon",{className:"cls-1",points:"38.83 43.11 58.25 54.32 58.25 76.74 38.83 65.53 38.83 43.11"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 54.32 58.25 76.74 38.83 87.95 38.83 65.53 58.25 54.32"}),a.createElement("g",{className:"cls-77"},a.createElement("polygon",{className:"cls-6",points:"58.25 54.32 58.25 76.74 38.83 87.95 38.83 65.53 58.25 54.32"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"38.83 65.53 38.83 87.95 19.42 76.74 19.42 54.32 38.83 65.53"}),a.createElement("g",{className:"cls-78"},a.createElement("polygon",{className:"cls-8",points:"38.83 65.53 38.83 87.95 19.42 76.74 19.42 54.32 38.83 65.53"}))))),dW=a.createElement("polygon",{className:"cls-9",points:"19.42 54.32 38.83 43.11 58.25 54.32 38.83 65.53 19.42 54.32"}),uW=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"97.08 31.9 116.5 43.11 116.5 65.53 97.08 54.32 97.08 31.9"}),a.createElement("g",{className:"cls-79"},a.createElement("polygon",{className:"cls-1",points:"97.08 31.9 116.5 43.11 116.5 65.53 97.08 54.32 97.08 31.9"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"116.5 43.11 116.5 65.53 97.08 76.74 97.08 54.32 116.5 43.11"}),a.createElement("g",{className:"cls-80"},a.createElement("polygon",{className:"cls-6",points:"116.5 43.11 116.5 65.53 97.08 76.74 97.08 54.32 116.5 43.11"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"97.08 54.32 97.08 76.74 77.66 65.53 77.66 43.11 97.08 54.32"}),a.createElement("g",{className:"cls-81"},a.createElement("polygon",{className:"cls-8",points:"97.08 54.32 97.08 76.74 77.66 65.53 77.66 43.11 97.08 54.32"}))))),mW=a.createElement("polygon",{className:"cls-9",points:"77.66 43.11 97.08 31.9 116.5 43.11 97.08 54.32 77.66 43.11"}),hW=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"77.66 43.11 97.08 54.32 97.08 76.74 77.66 65.53 77.66 43.11"}),a.createElement("g",{className:"cls-82"},a.createElement("polygon",{className:"cls-1",points:"77.66 43.11 97.08 54.32 97.08 76.74 77.66 65.53 77.66 43.11"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"97.08 54.32 97.08 76.74 77.66 87.95 77.66 65.53 97.08 54.32"}),a.createElement("g",{className:"cls-83"},a.createElement("polygon",{className:"cls-6",points:"97.08 54.32 97.08 76.74 77.66 87.95 77.66 65.53 97.08 54.32"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"77.66 65.53 77.66 87.95 58.25 76.74 58.25 54.32 77.66 65.53"}),a.createElement("g",{className:"cls-84"},a.createElement("polygon",{className:"cls-8",points:"77.66 65.53 77.66 87.95 58.25 76.74 58.25 54.32 77.66 65.53"}))))),pW=a.createElement("polygon",{className:"cls-9",points:"58.25 54.32 77.66 43.11 97.08 54.32 77.66 65.53 58.25 54.32"}),bW=a.createElement("g",{className:"cls-2"},a.createElement("g",{className:"cls-3"},a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 0 77.66 11.21 77.66 33.63 58.25 22.42 58.25 0"}),a.createElement("g",{className:"cls-85"},a.createElement("polygon",{className:"cls-1",points:"58.25 0 77.66 11.21 77.66 33.63 58.25 22.42 58.25 0"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"77.66 11.21 77.66 33.63 58.25 44.84 58.25 22.42 77.66 11.21"}),a.createElement("g",{className:"cls-86"},a.createElement("polygon",{className:"cls-87",points:"77.66 11.21 77.66 33.63 58.25 44.84 58.25 22.42 77.66 11.21"}))),a.createElement("g",{className:"cls-3"},a.createElement("polygon",{className:"cls-1",points:"58.25 22.42 58.25 44.84 38.83 33.63 38.83 11.21 58.25 22.42"}),a.createElement("g",{className:"cls-88"},a.createElement("polygon",{className:"cls-89",points:"58.25 22.42 58.25 44.84 38.83 33.63 38.83 11.21 58.25 22.42"}))))),fW=a.createElement("polygon",{className:"cls-90",points:"38.83 11.21 58.25 0 77.66 11.21 58.25 22.42 38.83 11.21"});function jW(e,t){var n=e.title,r=e.titleId,i=pM(e,["title","titleId"]);return a.createElement("svg",hM({id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 116.5 144",ref:t,"aria-labelledby":r},i),n?a.createElement("title",{id:r},n):null,bM,fM,jM,gM,OM,xM,vM,yM,wM,CM,kM,EM,NM,SM,IM,FM,LM,PM,DM,RM,TM,BM,AM,MM,WM,zM,qM,$M,HM,VM,UM,GM,XM,_M,KM,ZM,QM,YM,JM,eW,tW,nW,aW,rW,iW,oW,lW,cW,sW,dW,uW,mW,hW,pW,bW,fW)}var gW,OW,xW,vW,yW,wW,CW,kW,EW,NW,SW=a.forwardRef(jW),IW=(n.p,Object(f.a)({logo:{maxHeight:150,maxWidth:200},title:{margin:[[24,0,32,0]]},text:{margin:0},button:{marginTop:"auto",marginBottom:58},modalContent:{display:"flex",flexDirection:"column",alignItems:"center",padding:[[0,42]],flex:1}})),FW=function(e){var t=e.onContinue,n=IW();return Object(ze.jsxs)("div",{className:n.modalContent,children:[Object(ze.jsx)(SW,{className:n.logo}),Object(ze.jsx)(Ve,{className:n.title,children:"Custom information request"}),Object(ze.jsx)(Ke,{className:n.text,children:"A custom information request allows you to have an extra option to ask specific information about your customers when adding a trigger that isn't an option on the default requirements list."}),Object(ze.jsx)(Ke,{children:"Note that adding a custom information request isn't the same as adding triggers. You will still need to add a trigger with the new requirement to get this information from your customers."}),Object(ze.jsx)(Dn,{className:n.button,onClick:t,children:"Get started"})]})},LW=Object(f.a)({stepper:{margin:[[16,0,14,0]]},submit:{display:"flex",flexDirection:"row",margin:[["auto",0,24]]},button:{marginLeft:"auto"},form:{height:"100%",display:"flex",flexDirection:"column"}}),PW=function(e){return e.text&&e.text.length},DW=function(e,t){var n,a="choiceList"===e.inputType,r=a?t?A.a(["listChoices"])(e):R.a((function(e){return e.text}))(null!==(n=M.a(PW)(e.listChoices))&&void 0!==n?n:[]):[],i="length"===e.constraintType,o=i?e.inputLength:"",l={name:e.requirementName,screen1:{text:e.screen1Text,title:e.screen1Title},screen2:{title:e.screen2Title,text:e.screen2Text},input:{type:e.inputType,constraintType:e.constraintType}};return a&&(l=vA.a(["input","choiceList"],r,l)),i&&(l=vA.a(["input","numDigits"],o,l)),e.inputLabel1&&(l=vA.a(["input","label1"],e.inputLabel1,l)),e.inputLabel2&&(l=vA.a(["input","label2"],e.inputLabel2,l)),t&&(l=vA.a(["id"],e.id,l)),l},RW=function(e,t){return D.a(t)?e:t},TW=function(e){var t=e.onClose,n=(e.error,e.toBeEdited),r=e.onSave,i=e.hasError,o=LW(),c=!D.a(n),d=Object(a.useState)(c?1:0),u=Object(l.a)(d,2),m=u[0],h=u[1],p=function(e){switch(e){case 1:return{schema:HA,Component:UA};case 2:return{schema:GA,Component:_A};case 3:return{schema:zA,Component:$A};case 4:return{schema:KA,Component:QA};case 5:return{schema:uM,Component:mM};default:return{schema:{},Component:function(){return Object(ze.jsx)("h1",{children:"Default component step"})}}}}(m),b=5===m,f=function(e,t){var n="numerical"===e.inputType||"choiceList"===e.inputType;return c&&2===m?n?h(4):r(DW(e,c),c):c&&4===m?r(DW(e,c),c):3===m?h(n?m+1:m+2):b?r(DW(e,c),c):h(m+1)},j=c?function(e){var t=e.customRequest;return{id:e.id,requirementName:t.name,screen1Title:t.screen1.title,screen1Text:t.screen1.text,screen2Title:t.screen2.title,screen2Text:t.screen2.text,inputType:t.input.type,inputLabel1:t.input.label1,inputLabel2:t.input.label2,listChoices:t.input.choiceList,constraintType:t.input.constraintType,inputLength:t.input.numDigits}}(n):{},g=c?"Editing custom requirement":"New custom requirement";return Object(ze.jsxs)(Qh,{title:m>0?g:"",handleClose:t,width:520,height:620,open:!0,children:[m>0&&Object(ze.jsx)(pp,{className:o.stepper,steps:5,currentStep:m}),0===m&&!c&&Object(ze.jsx)(FW,{onContinue:f}),m>0&&Object(ze.jsx)(un.e,{validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,onSubmit:f,initialValues:yA.a(RW,Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)({},VA),XA),ZA),qA),dM),j),validationSchema:p.schema,children:Object(ze.jsxs)(un.d,{className:o.form,id:"custom-requirement-form",children:[Object(ze.jsx)(p.Component,{}),Object(ze.jsxs)("div",{className:o.submit,children:[i&&Object(ze.jsx)(tl,{children:"Failed to save"}),Object(ze.jsx)(Dn,{className:o.button,type:"submit",children:b?"Save":"Next"})]})]})})]})},BW=Object(f.a)({m0:{margin:0},mb10:{marginBottom:10},centerItems:{display:"flex",flexDirection:"column",alignItems:"center",height:"50%",justifyContent:"center"},alignWithTitleSection:{marginTop:-47,display:"flex"}}),AW={numerical:"Numerical",text:"Text",choiceList:"Choice list"},MW={date:"Date",none:"None",email:"Email",length:"Length",selectOne:"Select one",selectMultiple:"Select multiple",spaceSeparation:"Space separation"},WW=x()(gW||(gW=Object(c.a)(["\n mutation insertCustomInfoRequest($customRequest: CustomRequestInput!) {\n insertCustomInfoRequest(customRequest: $customRequest) {\n id\n }\n }\n"]))),zW=x()(OW||(OW=Object(c.a)(["\n mutation editCustomInfoRequest(\n $id: ID!\n $customRequest: CustomRequestInput!\n ) {\n editCustomInfoRequest(id: $id, customRequest: $customRequest) {\n id\n }\n }\n"]))),qW=x()(xW||(xW=Object(c.a)(["\n mutation removeCustomInfoRequest($id: ID!) {\n removeCustomInfoRequest(id: $id) {\n id\n }\n }\n"]))),$W=function(e){var t=e.showWizard,n=e.toggleWizard,r=e.data,i=BW(),o=Object(a.useState)(),c=Object(l.a)(o,2),d=c[0],m=c[1],h=Object(a.useState)(),p=Object(l.a)(h,2),b=p[0],f=p[1],j=Object(a.useState)(!1),g=Object(l.a)(j,2),O=g[0],x=g[1],v=Object(a.useState)(!1),y=Object(l.a)(v,2),w=y[0],C=y[1],k=Object(u.b)(WW,{onError:function(){console.log("Error while adding custom info request"),C(!0)},onCompleted:function(){C(!1),n()},refetchQueries:function(){return["customInfoRequests"]}}),E=Object(l.a)(k,1)[0],N=Object(u.b)(zW,{onError:function(){console.log("Error while editing custom info request"),C(!0)},onCompleted:function(){C(!1),f(null),n()},refetchQueries:function(){return["getData","customInfoRequests"]}}),S=Object(l.a)(N,1)[0],F=Object(u.b)(qW,{onError:function(){console.log("Error while removing custom info request"),C(!0)},onCompleted:function(){x(!1),C(!1)},refetchQueries:function(){return["getData","customInfoRequests"]}}),L=Object(l.a)(F,1)[0],P=function(e,t){return t?S({variables:{id:e.id,customRequest:cm.a(["id"])(e)}}):E({variables:{customRequest:Object(s.a)({},e)}})};return Object(ze.jsxs)(ze.Fragment,{children:[r.length>0&&Object(ze.jsx)(vy,{emptyText:"No custom info requests so far",elements:[{header:"Requirement name",width:300,textAlign:"left",size:"sm",view:function(e){return e.customRequest.name}},{header:"Data entry type",width:300,textAlign:"left",size:"sm",view:function(e){return AW[e.customRequest.input.type]}},{header:"Constraints",width:300,textAlign:"left",size:"sm",view:function(e){return MW[e.customRequest.input.constraintType]}},{header:"Edit",width:100,textAlign:"center",size:"sm",view:function(e){return Object(ze.jsx)(Qn,{onClick:function(){return f(e),n()},children:Object(ze.jsx)(Ph,{})})}},{header:"Delete",width:100,textAlign:"center",size:"sm",view:function(e){return Object(ze.jsx)(Qn,{onClick:function(){return m(e.id),x(!0)},children:Object(ze.jsx)(xh,{})})}}],data:r,Details:xA,expandable:!0,rowSize:"sm"}),!r.length&&Object(ze.jsxs)("div",{className:i.centerItems,children:[Object(ze.jsx)(Ze,{className:I()(i.m0,i.mb10),children:"It seems you haven't added any custom information requests yet."}),Object(ze.jsxs)(Ye,{className:I()(i.m0,i.mb10),children:["Please read our"," ",Object(ze.jsx)("a",{href:"https://support.lamassu.is/hc/en-us/sections/115000817232-Compliance",children:Object(ze.jsx)(na,{children:"Support Article"})})," ","on Compliance before adding new information requests."]}),Object(ze.jsx)(Dn,{onClick:function(){return n()},children:"Add custom information request"})]}),t&&Object(ze.jsx)(TW,{hasError:w,onClose:function(){f(null),C(!1),n()},toBeEdited:b,onSave:function(){return P.apply(void 0,arguments)}}),Object(ze.jsx)(Km,{errorMessage:w?"Failed to delete":"",open:O,onDismissed:function(){x(!1),C(!1)},onConfirmed:function(){L({variables:{id:d}})}})]})},HW={switchLabel:{margin:6,width:24},tableRadioGroup:{flexDirection:"row",justifyContent:"space-between"},tableRadioLabel:{marginRight:0},tableWidth:{width:918}},VW=n(926),UW=Object(f.a)({radioLabel:{height:40,padding:[[0,10]]},radio:{padding:4,margin:4},radioGroup:{flexDirection:"row"},error:{color:he},specialLabel:{height:40,padding:0},specialGrid:{display:"grid",gridTemplateColumns:[[182,162,181]]},directionIcon:{marginRight:2},directionName:{marginLeft:6},thresholdWrapper:{display:"flex",flexDirection:"column"},thresholdTitle:{marginTop:50},thresholdContentWrapper:{display:"flex",flexDirection:"row"},thresholdField:{marginRight:6,width:75},description:{marginTop:7},space:{marginLeft:6,marginRight:6},lastSpace:{marginLeft:6},suspensionDays:{width:34},input:{marginTop:-2},limitedInput:{width:50},daysInput:{width:60},dropdownField:{marginTop:16,minWidth:155}}),GW=fn.h().required(),XW=fn.f().shape({threshold:fn.e().nullable().transform($r).label("Invalid threshold"),thresholdDays:fn.e().transform($r).nullable().label("Invalid threshold days")}),_W=fn.f().shape({requirement:fn.h().required(),suspensionDays:fn.e().transform($r).nullable()}),KW=fn.f().shape({triggerType:GW,requirement:_W,threshold:XW}).test((function(e,t){var n=e.threshold,a=e.triggerType;if(!a||!{txAmount:function(e){return e.threshold>=0},txVolume:function(e){return e.threshold>=0&&e.thresholdDays>0},txVelocity:function(e){return e.threshold>0&&e.thresholdDays>0},consecutiveDays:function(e){return e.thresholdDays>0}}[a](n))return t.createError({path:"threshold",message:{txAmount:function(e){return"Amount must be greater than or equal to 0"},txVolume:function(e){var t=[];return e.threshold<0&&t.push("Volume must be greater than or equal to 0"),e.thresholdDays<=0&&t.push("Days must be greater than 0"),t.join(", ")},txVelocity:function(e){var t=[];return e.threshold<=0&&t.push("Transactions must be greater than 0"),e.thresholdDays<=0&&t.push("Days must be greater than 0"),t.join(", ")},consecutiveDays:function(e){return"Days must be greater than 0"}}[a](n)})})).test((function(e,t){var n=e.requirement;if(!n||!function(e){return"suspend"!==e.requirement||e.suspensionDays>0}(n))return t.createError({path:"requirement",message:"Suspension days must be greater than 0"})})),ZW=fn.f().shape({triggerType:fn.h().required(),threshold:fn.f({threshold:fn.e().transform($r).nullable(),thresholdDays:fn.e().transform($r).nullable()})}).test((function(e,t){var n=e.threshold,a=e.triggerType;if(!a||!{txAmount:function(e){return e.threshold>=0},txVolume:function(e){return e.threshold>=0&&e.thresholdDays>0},txVelocity:function(e){return e.threshold>0&&e.thresholdDays>0},consecutiveDays:function(e){return e.thresholdDays>0}}[a](n))return t.createError({path:"threshold",message:{txAmount:function(e){return"Amount must be greater than or equal to 0"},txVolume:function(e){var t=[];return(!e.threshold||e.threshold<0)&&t.push("Volume must be greater than or equal to 0"),(!e.thresholdDays||e.thresholdDays<=0)&&t.push("Days must be greater than 0"),t.join(", ")},txVelocity:function(e){var t=[];return(!e.threshold||e.threshold<=0)&&t.push("Transactions must be greater than 0"),(!e.thresholdDays||e.thresholdDays<=0)&&t.push("Days must be greater than 0"),t.join(", ")},consecutiveDays:function(e){return"Days must be greater than 0"}}[a](n)})})),QW=[{display:"Transaction amount",code:"txAmount"},{display:"Transaction volume",code:"txVolume"},{display:"Transaction velocity",code:"txVelocity"},{display:"Consecutive days",code:"consecutiveDays"}],YW=function(e){var t,n,a,r,i,o,l=Object.assign({},e),c=UW(),s=Object(un.f)(),d=s.errors,u=s.touched,m=s.values,h=s.setTouched,p=s.handleChange,b=Object(z.a)({},c.error,d.triggerType&&u.triggerType),f=hl.a(null===m||void 0===m?void 0:m.triggerType),j=f(["txAmount","txVolume"]),g=f(["txVelocity"]),O=f(["txVolume","txVelocity"]),x=f(["consecutiveDays"]),v=!!d.threshold&&!!(null===(t=u.threshold)||void 0===t?void 0:t.threshold)&&!x&&(!(null===(n=m.threshold)||void 0===n?void 0:n.threshold)||(null===(a=m.threshold)||void 0===a?void 0:a.threshold)<0),y=!!d.threshold&&!!(null===(r=u.threshold)||void 0===r?void 0:r.thresholdDays)&&!f(["txAmount"])&&(!(null===(i=m.threshold)||void 0===i?void 0:i.thresholdDays)||(null===(o=m.threshold)||void 0===o?void 0:o.thresholdDays)<0),w=!(!y&&!v),C=Object(z.a)({},c.error,w);return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Yo.a,{display:"flex",alignItems:"center",children:Object(ze.jsx)(Xe,{className:I()(b),children:"Choose trigger type"})}),Object(ze.jsx)(un.b,{component:ri,name:"triggerType",options:QW,labelClassName:c.radioLabel,radioClassName:c.radio,className:c.radioGroup,onChange:function(e){p(e),h({threshold:!1,thresholdDays:!1})}}),Object(ze.jsxs)("div",{className:c.thresholdWrapper,children:[(j||g||O||x)&&Object(ze.jsx)(Xe,{className:I()(C,c.thresholdTitle),children:"Threshold"}),Object(ze.jsxs)("div",{className:c.thresholdContentWrapper,children:[j&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(un.b,{className:c.thresholdField,component:ai,size:"lg",name:"threshold.threshold",error:v}),Object(ze.jsx)(Ze,{className:I()(c.description),children:l.currency})]}),g&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(un.b,{className:c.thresholdField,component:ai,size:"lg",name:"threshold.threshold",error:v}),Object(ze.jsx)(Ze,{className:I()(c.description),children:"transactions"})]}),O&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Ze,{className:I()(b,c.space,c.description),children:"in"}),Object(ze.jsx)(un.b,{className:c.thresholdField,component:ai,size:"lg",name:"threshold.thresholdDays",error:y}),Object(ze.jsx)(Ze,{className:I()(c.description),children:"days"})]}),x&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(un.b,{className:c.thresholdField,component:ai,size:"lg",name:"threshold.thresholdDays",error:y}),Object(ze.jsx)(Ze,{className:I()(c.description),children:"consecutive days"})]})]})]})]})},JW=fn.f().shape({requirement:fn.f({requirement:fn.h().required(),suspensionDays:fn.e().when("requirement",{is:function(e){return"suspend"===e},then:fn.e().nullable().transform($r),otherwise:fn.e().nullable().transform((function(){return null}))}),customInfoRequestId:fn.h().when("requirement",{is:function(e){return"custom"===e},then:fn.h(),otherwise:fn.h().nullable().transform((function(){return""}))})}).required()}).test((function(e,t){var n=e.requirement,a=function(e,t){switch(t){case"suspend":return e.requirement!==t||e.suspensionDays>0;case"custom":return e.requirement!==t||!D.a(e.customInfoRequestId);default:return!0}};return n&&!a(n,"suspend")?t.createError({path:"requirement",message:"Suspension days must be greater than 0"}):n&&!a(n,"custom")?t.createError({path:"requirement",message:"You must select an item"}):void 0})),ez=[{display:"SMS verification",code:"sms"},{display:"ID card image",code:"idCardPhoto"},{display:"ID data",code:"idCardData"},{display:"Customer camera",code:"facephoto"},{display:"Sanctions",code:"sanctions"},{display:"US SSN",code:"usSsn"},{display:"Suspend",code:"suspend"},{display:"Block",code:"block"}],tz=function(e,t,n){var a,r,i;return!!e.requirement&&!!(null===(a=t.requirement)||void 0===a?void 0:a.suspensionDays)&&(!(null===(r=n.requirement)||void 0===r?void 0:r.suspensionDays)||(null===(i=n.requirement)||void 0===i?void 0:i.suspensionDays)<0)},nz=function(e,t,n){var a,r,i;return!!e.requirement&&!!(null===(a=t.requirement)||void 0===a?void 0:a.customInfoRequestId)&&(!(null===(r=n.requirement)||void 0===r?void 0:r.customInfoRequestId)||!D.a(null===(i=n.requirement)||void 0===i?void 0:i.customInfoRequestId))},az=function(e){var t,n,a=e.customInfoRequests,r=UW(),i=Object(un.f)(),o=i.touched,l=i.errors,c=i.values,s=i.handleChange,d=i.setTouched,u="suspend"===(null===c||void 0===c||null===(t=c.requirement)||void 0===t?void 0:t.requirement),m="custom"===(null===c||void 0===c||null===(n=c.requirement)||void 0===n?void 0:n.requirement),h=(null===a||void 0===a?void 0:a.length)>0?[].concat(ez,[{display:"Custom information requirement",code:"custom"}]):[].concat(ez),p=Object(z.a)({},r.error,!!l.requirement&&!u&&!m||u&&tz(l,o,c)||m&&nz(l,o,c));return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(Yo.a,{display:"flex",alignItems:"center",children:Object(ze.jsx)(Xe,{className:I()(p),children:"Choose a requirement"})}),Object(ze.jsx)(un.b,{component:ri,name:"requirement.requirement",options:h,labelClassName:r.specialLabel,radioClassName:r.radio,className:I()(r.radioGroup,r.specialGrid),onChange:function(e){s(e),d({suspensionDays:!1})}}),u&&Object(ze.jsx)(un.b,{className:r.thresholdField,component:ai,label:"Days",size:"lg",name:"requirement.suspensionDays",error:tz(l,o,c)}),m&&Object(ze.jsx)("div",{children:Object(ze.jsx)(un.b,{className:r.dropdownField,component:ni,label:"Available requests",name:"requirement.customInfoRequestId",options:a.map((function(e){return{value:e.id,display:e.customRequest.name}}))})})]})},rz=function(e){return{schema:JW,options:ez,Component:az,props:{customInfoRequests:e},hasRequirementError:tz,hasCustomRequirementError:nz,initialValues:{requirement:{requirement:"",suspensionDays:"",customInfoRequestId:""}}}},iz=function(e,t,n){return function(a){return e?L.a(T.a(t),Da.a(W.a(null!==n&&void 0!==n?n:"code",a)))(e):""}},oz=function(e){return function(t){return t.id===e}},lz=function(e){var t,n,a,r=e.customInfoRequests,i=Object(un.f)().values,o=UW(),l=null===i||void 0===i||null===(t=i.requirement)||void 0===t?void 0:t.requirement,c=null!==(n=A.a(["requirement","customInfoRequestId"])(i))&&void 0!==n?n:"",s="suspend"===l,d=c?null!==(a=A.a(["customRequest","name"])(Da.a(oz(c))(r)))&&void 0!==a?a:"":iz(ez,"display")(l);return Object(ze.jsxs)(Yo.a,{display:"flex",alignItems:"baseline",children:["".concat(d," ").concat(s?"for":""),s&&Object(ze.jsx)(un.b,{bold:!0,className:o.suspensionDays,name:"requirement.suspensionDays",component:ai,textAlign:"center"}),s&&"days"]})},cz=function(e){var t,n=e.requirement,a=e.suspensionDays,r=e.customInfoRequestId,i=e.customInfoRequests,o=UW(),l="custom"===n?null!==(t=A.a(["customRequest","name"])(Da.a(oz(r))(i)))&&void 0!==t?t:"":iz(ez,"display")(n),c="suspend"===n;return Object(ze.jsxs)(Yo.a,{display:"flex",alignItems:"baseline",children:["".concat(l," ").concat(c?"for":""),c&&Object(ze.jsx)(Qe,{className:o.space,noMargin:!0,children:a}),c&&"days"]})},sz=function(e){var t,n,a,r=e.config,i=e.currency,o=e.isEdit,l=UW(),c=(t={},Object(z.a)(t,l.input,!0),Object(z.a)(t,l.limitedInput,"txVelocity"===(null===r||void 0===r?void 0:r.triggerType)),Object(z.a)(t,l.daysInput,"consecutiveDays"===(null===r||void 0===r?void 0:r.triggerType)),t),s=null===r||void 0===r||null===(n=r.threshold)||void 0===n?void 0:n.threshold,d=null===r||void 0===r||null===(a=r.threshold)||void 0===a?void 0:a.thresholdDays,u=o?Object(ze.jsx)(un.b,{bold:!0,className:I()(c),name:"threshold.threshold",component:ai,textAlign:"right"}):Object(ze.jsx)(Qe,{noMargin:!0,children:s}),m=o?Object(ze.jsx)(un.b,{bold:!0,className:I()(c),name:"threshold.thresholdDays",component:ai,textAlign:"right"}):Object(ze.jsx)(Qe,{noMargin:!0,children:d});switch(null===r||void 0===r?void 0:r.triggerType){case"txAmount":return Object(ze.jsxs)(Yo.a,{display:"flex",alignItems:"baseline",justifyContent:"right",children:[u,Object(ze.jsx)(at,{noMargin:!0,className:l.lastSpace,children:i})]});case"txVolume":return Object(ze.jsxs)(Yo.a,{display:"flex",alignItems:"baseline",justifyContent:"right",children:[u,Object(ze.jsx)(at,{noMargin:!0,className:l.lastSpace,children:i}),Object(ze.jsx)(nt,{noMargin:!0,className:l.space,children:"in"}),m,Object(ze.jsx)(nt,{noMargin:!0,className:l.lastSpace,children:"days"})]});case"txVelocity":return Object(ze.jsxs)(Yo.a,{display:"flex",alignItems:"baseline",justifyContent:"right",children:[u,Object(ze.jsx)(nt,{className:l.space,noMargin:!0,children:"transactions in"}),m,Object(ze.jsx)(nt,{className:l.lastSpace,noMargin:!0,children:"days"})]});case"consecutiveDays":return Object(ze.jsxs)(Yo.a,{display:"flex",alignItems:"baseline",justifyContent:"right",children:[m,Object(ze.jsx)(nt,{className:l.lastSpace,noMargin:!0,children:"days"})]});default:return""}},dz=Object(a.memo)((function(e){var t=e.currency,n=Object(un.f)().values;return Object(ze.jsx)(sz,{isEdit:!0,config:n,currency:t})})),uz=function(e){var t=e.config,n=e.currency;return Object(ze.jsx)(sz,{config:t,currency:n})},mz=function(e,t,n){return[{name:"triggerType",size:"sm",width:230,input:function(e){var t=e.field.value;return Object(ze.jsx)(ze.Fragment,{children:iz(QW,"display")(t)})},view:iz(QW,"display"),inputProps:{options:QW,valueProp:"code",labelProp:"display",optionsLimit:null}},{name:"requirement",size:"sm",width:230,bypassField:!0,input:function(){return Object(ze.jsx)(lz,{customInfoRequests:n})},view:function(e){return Object(ze.jsx)(cz,Object(s.a)(Object(s.a)({},e),{},{customInfoRequests:n}))}},{name:"threshold",size:"sm",width:284,textAlign:"right",input:function(){return Object(ze.jsx)(dz,{currency:e})},view:function(t,n){return Object(ze.jsx)(uz,{config:n,currency:e})}}]},hz=R.a(T.a("code"))(QW),pz=[VW.a((function(e,t){return hz.indexOf(e.triggerType)=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Xz=a.createElement("g",{id:"icon/button/key/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"Group",transform:"translate(0.500000, 0.500000)",stroke:"#FFFFFF"},a.createElement("circle",{id:"Oval",cx:2.75,cy:8.25,r:2.75}),a.createElement("line",{x1:5.04166667,y1:5.95833333,x2:11,y2:0,id:"Path-13",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("line",{x1:8.25,y1:3.66666667,x2:10.5416667,y2:1.375,id:"Path-13-Copy",strokeWidth:2,strokeLinejoin:"round"})));function _z(e,t){var n=e.title,r=e.titleId,i=Gz(e,["title","titleId"]);return a.createElement("svg",Uz({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"icon/button/key/white"):n?a.createElement("title",{id:r},n):null,Xz)}var Kz=a.forwardRef(_z);n.p;function Zz(){return(Zz=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Yz=a.createElement("g",{id:"icon/button/key/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"Group",transform:"translate(0.500000, 0.500000)",stroke:"#1B2559"},a.createElement("circle",{id:"Oval",cx:2.75,cy:8.25,r:2.75}),a.createElement("line",{x1:5.04166667,y1:5.95833333,x2:11,y2:0,id:"Path-13",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("line",{x1:8.25,y1:3.66666667,x2:10.5416667,y2:1.375,id:"Path-13-Copy",strokeWidth:2,strokeLinejoin:"round"})));function Jz(e,t){var n=e.title,r=e.titleId,i=Qz(e,["title","titleId"]);return a.createElement("svg",Zz({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"icon/button/key/zodiac"):n?a.createElement("title",{id:r},n):null,Yz)}var eq=a.forwardRef(Jz);n.p;function tq(){return(tq=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var aq=a.createElement("g",{id:"icon/button/lock/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"Lock-Icon-White",transform:"translate(0.500000, 0.500000)"},a.createElement("path",{d:"M7.98058644,2.48058644 C7.98058644,1.11059638 6.86999006,0 5.5,0 C4.13000994,0 3.01941356,1.11059638 3.01941356,2.48058644 C3.01941356,3.39391315 3.01941356,4.09482878 3.01941356,4.58333333 L7.98058644,4.58333333 C7.98058644,4.09482878 7.98058644,3.39391315 7.98058644,2.48058644 Z",id:"Lock",stroke:"#FFFFFF",strokeLinejoin:"round"}),a.createElement("rect",{id:"Body",stroke:"#FFFFFF",strokeLinejoin:"round",x:0,y:4.58333333,width:11,height:6.41666667}),a.createElement("circle",{id:"Key-Hole",fill:"#FFFFFF",cx:5.5,cy:7.33333333,r:1})));function rq(e,t){var n=e.title,r=e.titleId,i=nq(e,["title","titleId"]);return a.createElement("svg",tq({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"icon/button/lock/white"):n?a.createElement("title",{id:r},n):null,aq)}var iq=a.forwardRef(rq);n.p;function oq(){return(oq=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var cq=a.createElement("g",{id:"icon/button/lock/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("g",{id:"Lock-Icon-Zodiac",transform:"translate(0.500000, 0.500000)"},a.createElement("path",{d:"M7.98058644,2.48058644 C7.98058644,1.11059638 6.86999006,0 5.5,0 C4.13000994,0 3.01941356,1.11059638 3.01941356,2.48058644 C3.01941356,3.39391315 3.01941356,4.09482878 3.01941356,4.58333333 L7.98058644,4.58333333 C7.98058644,4.09482878 7.98058644,3.39391315 7.98058644,2.48058644 Z",id:"Lock",stroke:"#1B2559",strokeLinejoin:"round"}),a.createElement("rect",{id:"Body",stroke:"#1B2559",strokeLinejoin:"round",x:0,y:4.58333333,width:11,height:6.41666667}),a.createElement("circle",{id:"Key-Hole",fill:"#1B2559",cx:5.5,cy:7.33333333,r:1})));function sq(e,t){var n=e.title,r=e.titleId,i=lq(e,["title","titleId"]);return a.createElement("svg",oq({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"icon/button/lock/zodiac"):n?a.createElement("title",{id:r},n):null,cq)}var dq=a.forwardRef(sq);n.p;function uq(){return(uq=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var hq=a.createElement("g",{id:"icon/button/user-role/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinejoin:"round"},a.createElement("g",{id:"User-Role-Icon-White",transform:"translate(2.500000, 0.500000)",stroke:"#FFFFFF"},a.createElement("path",{d:"M5.50008791,6.84274776 L5.5,11 L3.66666667,9.35927189 L1.83333333,11 L1.83223109,6.84216075 C2.37179795,7.15453375 2.99835187,7.33333333 3.66666667,7.33333333 C4.33456272,7.33333333 4.96075021,7.15475774 5.50008791,6.84274776 Z",id:"Bottom"}),a.createElement("circle",{id:"Top",cx:3.66666667,cy:3.66666667,r:3.66666667})));function pq(e,t){var n=e.title,r=e.titleId,i=mq(e,["title","titleId"]);return a.createElement("svg",uq({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"icon/button/user-role/white"):n?a.createElement("title",{id:r},n):null,hq)}var bq=a.forwardRef(pq);n.p;function fq(){return(fq=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var gq=a.createElement("g",{id:"icon/button/user-role/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinejoin:"round"},a.createElement("g",{id:"User-Role-Icon-Zodiac",transform:"translate(2.500000, 0.500000)",stroke:"#1B2559"},a.createElement("path",{d:"M5.50008791,6.84274776 L5.5,11 L3.66666667,9.35927189 L1.83333333,11 L1.83223109,6.84216075 C2.37179795,7.15453375 2.99835187,7.33333333 3.66666667,7.33333333 C4.33456272,7.33333333 4.96075021,7.15475774 5.50008791,6.84274776 Z",id:"Bottom"}),a.createElement("circle",{id:"Top",cx:3.66666667,cy:3.66666667,r:3.66666667})));function Oq(e,t){var n=e.title,r=e.titleId,i=jq(e,["title","titleId"]);return a.createElement("svg",fq({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},i),void 0===n?a.createElement("title",{id:r},"icon/button/user-role/zodiac"):n?a.createElement("title",{id:r},n):null,gq)}var xq,vq,yq,wq,Cq,kq,Eq,Nq,Sq,Iq,Fq,Lq,Pq,Dq,Rq,Tq,Bq,Aq,Mq,Wq,zq,qq=a.forwardRef(Oq),$q=(n.p,{footer:{display:"flex",flexDirection:"row",margin:[["auto",0,24,0]]},modalTitle:{marginTop:-5,color:J,fontFamily:je},modalLabel1:{marginTop:20},modalLabel2:{marginTop:40},inputLabel:{color:J,fontFamily:je,fontSize:24,marginLeft:8,marginTop:15},tableWidth:{width:1132},radioGroup:{flexDirection:"row",width:500},radioLabel:{width:150,height:48},copyToClipboard:{marginLeft:"auto",paddingTop:7,marginRight:-5},chip:{backgroundColor:re,fontFamily:je,marginLeft:10},info:{fontFamily:ge,textAlign:"justify"},addressWrapper:{backgroundColor:re,marginTop:8,height:35},address:{margin:"0px ".concat(16,"px 0px ").concat(16,"px"),paddingRight:-15},errorMessage:{fontFamily:ge,color:he},codeContainer:{marginTop:15,marginBottom:15},form:{display:"flex",flexDirection:"column",height:"100%"},submit:{margin:[["auto",0,0,"auto"]]},error:{color:he},link:{position:"absolute",top:10,left:0,bottom:"-20px",right:"-20px",whiteSpace:"nowrap",overflowX:"auto",width:"92.5%"},linkWrapper:{width:"100%",height:"100%",overflow:"hidden",position:"relative"},loginWrapper:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},username:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"100%"},roleSwitch:{marginLeft:15},actionButtonWrapper:{display:"flex",gap:12},enterButton:{display:"none"}}),Hq=Object(f.a)($q),Vq=x()(xq||(xq=Object(c.a)(["\n query confirm2FA($code: String!) {\n confirm2FA(code: $code)\n }\n"]))),Uq=function(e){var t=e.showModal,n=e.handleClose,r=e.setConfirmation,i=Hq(),o=Object(a.useState)(""),c=Object(l.a)(o,2),s=c[0],d=c[1],m=Object(a.useState)(!1),h=Object(l.a)(m,2),p=h[0],b=h[1],f=Object(u.a)(Vq,{onCompleted:function(e){return e.confirm2FA?(r(s),d(""),void b(!1)):b(!0)}}),j=Object(l.a)(f,2),g=j[0],O=j[1].error,x=function(){return O?"Internal server error":6!==s.length&&p?"The code should have 6 characters!":p?"Code is invalid. Please try again.":null},v=function(){6===s.length?g({variables:{code:s}}):b(!0)};return t&&Object(ze.jsxs)(Qh,{closeOnBackdropClick:!0,width:500,height:350,handleClose:n,open:!0,children:[Object(ze.jsx)(Qe,{className:i.modalTitle,children:"Confirm action"}),Object(ze.jsx)(Ke,{className:i.info,children:"To make changes on this user, please confirm this action by entering your two-factor authentication code below."}),Object(ze.jsx)(un.e,{onSubmit:function(){},initialValues:{},children:Object(ze.jsxs)(un.d,{children:[Object(ze.jsx)(sr,{name:"2fa",value:s,onChange:function(e){d(e),b(!1)},numInputs:6,error:p,containerStyle:i.codeContainer,shouldAutoFocus:!0}),Object(ze.jsx)("button",{onClick:v,className:i.enterButton})]})}),x()&&Object(ze.jsx)(Ke,{className:i.errorMessage,children:x()}),Object(ze.jsx)("div",{className:i.footer,children:Object(ze.jsx)(Dn,{className:i.submit,onClick:v,children:"Confirm"})})]})},Gq=x()(vq||(vq=Object(c.a)(["\n mutation changeUserRole(\n $confirmationCode: String\n $id: ID!\n $newRole: String!\n ) {\n changeUserRole(\n confirmationCode: $confirmationCode\n id: $id\n newRole: $newRole\n ) {\n id\n }\n }\n"]))),Xq=Object(f.a)($q),_q=function(e){var t=e.state,n=e.dispatch,r=e.user,i=e.requiresConfirmation,o=Xq(),c=Object(u.b)(Gq,{onCompleted:function(){return j()},refetchQueries:function(){return["users"]}}),s=Object(l.a)(c,2),d=s[0],m=s[1].error,h=Object(a.useState)(null),p=Object(l.a)(h,2),b=p[0],f=p[1],j=function(){f(null),n({type:"close",payload:"showRoleModal"})};return t.showRoleModal&&i&&!b&&Object(ze.jsx)(Uq,{showModal:t.showRoleModal,handleClose:j,setConfirmation:f})||t.showRoleModal&&Object(ze.jsxs)(Qh,{closeOnBackdropClick:!0,width:450,height:250,handleClose:j,open:!0,children:[Object(ze.jsxs)(Qe,{className:o.modalTitle,children:["Change ",r.username,"'s role?"]}),Object(ze.jsxs)(Ke,{className:o.info,children:["You are about to alter ",r.username,"'s role. This will change this user's permission to access certain resources."]}),Object(ze.jsx)(Ke,{className:o.info,children:"Do you wish to proceed?"}),Object(ze.jsxs)("div",{className:o.footer,children:[m&&Object(ze.jsx)(tl,{children:m}),Object(ze.jsx)(Dn,{className:o.submit,onClick:function(){d({variables:{confirmationCode:b,id:r.id,newRole:"superuser"===r.role?"user":"superuser"}})},children:"Confirm"})]})]})},Kq="https://".concat(window.location.hostname),Zq=function(e){return"".concat(Kq).concat(e)},Qq=Object(f.a)($q),Yq=x()(yq||(yq=Object(c.a)(["\n mutation createRegisterToken($username: String!, $role: String!) {\n createRegisterToken(username: $username, role: $role) {\n token\n expire\n }\n }\n"]))),Jq=fn.f().shape({username:fn.h().email("Username field should be in an email format!").required("Username field is required!"),role:fn.h().required("Role field is required!")}),e$={username:"",role:""},t$=[{code:"user",display:"Regular user"},{code:"superuser",display:"Superuser"}],n$=function(e,t,n){return e&&t?n?"Internal server error":e.username&&t.username?e.username:null:null},a$=function(e){var t=e.state,n=e.dispatch,r=Qq(),i=Object(a.useState)(""),o=Object(l.a)(i,2),c=o[0],s=o[1],d=Object(a.useState)(null),m=Object(l.a)(d,2),h=m[0],p=m[1],b=function(){p(null),n({type:"close",payload:"showCreateUserModal"})},f=Object(u.b)(Yq,{onCompleted:function(e){var t=e.createRegisterToken,n="t=".concat(t.token);p(Zq("/register?".concat(n)))}}),j=Object(l.a)(f,2),g=j[0],O=j[1].error;return Object(ze.jsxs)(ze.Fragment,{children:[t.showCreateUserModal&&!h&&Object(ze.jsx)(Qh,{closeOnBackdropClick:!0,width:600,height:400,handleClose:b,open:!0,children:Object(ze.jsx)(un.e,{validationSchema:Jq,initialValues:e$,onSubmit:function(e){s(e.username),g({variables:{username:e.username,role:e.role}})},children:function(e){var t,n,a=e.errors,i=e.touched;return Object(ze.jsxs)(un.d,{id:"register-user-form",className:r.form,children:[Object(ze.jsx)(Ve,{className:r.modalTitle,children:"Create new user"}),Object(ze.jsx)(un.b,{component:oi,name:"username",width:338,autoFocus:!0,label:"User login"}),Object(ze.jsx)(Ge,{className:I()((t=a,n=i,Object(z.a)({},r.error,t.role&&n.role)),r.modalLabel2),children:"Role"}),Object(ze.jsx)(un.b,{component:ri,name:"role",labelClassName:r.radioLabel,className:r.radioGroup,options:t$}),Object(ze.jsxs)("div",{className:r.footer,children:[n$(a,i,O)&&Object(ze.jsx)(tl,{children:n$(a,i,O)}),Object(ze.jsx)(Dn,{type:"submit",form:"register-user-form",className:r.submit,children:"Finish"})]})]})}})}),t.showCreateUserModal&&h&&Object(ze.jsxs)(Qh,{closeOnBackdropClick:!0,width:500,height:200,handleClose:b,open:!0,children:[Object(ze.jsxs)(Qe,{className:r.modalTitle,children:["Creating ",c,"..."]}),Object(ze.jsxs)(Ke,{className:r.info,children:["Safely share this link with ",c," to finish the registration process."]}),Object(ze.jsx)("div",{className:r.addressWrapper,children:Object(ze.jsx)(Je,{className:r.address,children:Object(ze.jsx)("strong",{children:Object(ze.jsx)(Nf,{className:r.link,buttonClassname:r.copyToClipboard,wrapperClassname:r.linkWrapper,children:h})})})})]})]})},r$=x()(wq||(wq=Object(c.a)(["\n mutation enableUser($confirmationCode: String, $id: ID!) {\n enableUser(confirmationCode: $confirmationCode, id: $id) {\n id\n }\n }\n"]))),i$=x()(Cq||(Cq=Object(c.a)(["\n mutation disableUser($confirmationCode: String, $id: ID!) {\n disableUser(confirmationCode: $confirmationCode, id: $id) {\n id\n }\n }\n"]))),o$=Object(f.a)($q),l$=function(e){var t=e.state,n=e.dispatch,r=e.user,i=e.requiresConfirmation,o=o$(),c=Object(u.b)(r$,{onCompleted:function(){return y()},refetchQueries:function(){return["users"]}}),s=Object(l.a)(c,2),d=s[0],m=s[1].error,h=Object(u.b)(i$,{onCompleted:function(){return y()},refetchQueries:function(){return["users"]}}),p=Object(l.a)(h,2),b=p[0],f=p[1].error,j=Object(a.useState)(null),g=Object(l.a)(j,2),O=g[0],x=g[1],v=function(){(null===r||void 0===r?void 0:r.enabled)?b({variables:{confirmationCode:O,id:r.id}}):d({variables:{confirmationCode:O,id:r.id}})},y=function(){x(null),n({type:"close",payload:"showEnableUserModal"})};return t.showEnableUserModal&&i&&!O&&Object(ze.jsx)(Uq,{showModal:t.showEnableUserModal,handleClose:y,setConfirmation:x})||t.showEnableUserModal&&Object(ze.jsxs)(Qh,{closeOnBackdropClick:!0,width:450,height:275,handleClose:y,open:!0,children:[!r.enabled&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsxs)(Qe,{className:o.modalTitle,children:["Enable ",r.username,"?"]}),Object(ze.jsxs)(Ke,{className:o.info,children:["You are about to enable ",r.username," into the system, activating previous eligible sessions and grant permissions to access the system."]}),Object(ze.jsx)(Ke,{className:o.info,children:"Do you wish to proceed?"})]}),r.enabled&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsxs)(Qe,{className:o.modalTitle,children:["Disable ",r.username,"?"]}),Object(ze.jsxs)(Ke,{className:o.info,children:["You are about to disable ",r.username," from the system, deactivating previous eligible sessions and removing permissions to access the system."]}),Object(ze.jsx)(Ke,{className:o.info,children:"Do you wish to proceed?"})]}),Object(ze.jsxs)("div",{className:o.footer,children:[f&&Object(ze.jsx)(tl,{children:f}),m&&Object(ze.jsx)(tl,{children:m}),Object(ze.jsx)(Dn,{className:o.submit,onClick:function(){return v()},children:"Confirm"})]})]})},c$=Object(f.a)($q),s$=function(e){var t=e.state,n=e.dispatch,a=c$(),r=function(){n({type:"close",payload:"showFIDOModal"})};return Object(ze.jsxs)(Qh,{closeOnBackdropClick:!0,width:450,height:275,handleClose:r,open:t.showFIDOModal,children:[Object(ze.jsx)(Qe,{className:a.modalTitle,children:"About FIDO authentication"}),Object(ze.jsx)(Ke,{className:a.info,children:"This feature is only available for websites with configured domains, and we detected that a domain is not configured at the moment."}),Object(ze.jsx)(Ke,{children:"Make sure that a domain is configured for this website and try again later."}),Object(ze.jsx)("div",{className:a.footer,children:Object(ze.jsx)(Dn,{className:a.submit,onClick:function(){return r()},children:"Confirm"})})]})},d$=x()(kq||(kq=Object(c.a)(["\n mutation createReset2FAToken($confirmationCode: String, $userID: ID!) {\n createReset2FAToken(confirmationCode: $confirmationCode, userID: $userID) {\n token\n user_id\n expire\n }\n }\n"]))),u$=Object(f.a)($q),m$=function(e){var t=e.state,n=e.dispatch,r=e.user,i=e.requiresConfirmation,o=u$(),c=Object(a.useState)(""),s=Object(l.a)(c,2),d=s[0],m=s[1],h=Object(u.b)(d$,{onCompleted:function(e){var t=e.createReset2FAToken;m(Zq("/reset2fa?t=".concat(t.token)))}}),p=Object(l.a)(h,2),b=p[0],f=p[1],j=f.loading,g=f.error,O=Object(a.useState)(null),x=Object(l.a)(O,2),v=x[0],y=x[1];Object(a.useEffect)((function(){t.showReset2FAModal&&(v||!i)&&b({variables:{confirmationCode:v,userID:null===r||void 0===r?void 0:r.id}})}),[v,b,i,t.showReset2FAModal,null===r||void 0===r?void 0:r.id]);var w=function(){y(null),n({type:"close",payload:"showReset2FAModal"})};return t.showReset2FAModal&&i&&!v&&Object(ze.jsx)(Uq,{showModal:t.showReset2FAModal,handleClose:w,setConfirmation:y})||t.showReset2FAModal&&(v||!i)&&!j&&Object(ze.jsxs)(Qh,{closeOnBackdropClick:!0,width:500,height:200,handleClose:w,open:!0,children:[Object(ze.jsxs)(Qe,{className:o.modalTitle,children:["Reset 2FA for ",r.username]}),Object(ze.jsxs)(Ke,{className:o.info,children:["Safely share this link with ",r.username," for a two-factor authentication reset."]}),!g&&Object(ze.jsx)("div",{className:o.addressWrapper,children:Object(ze.jsx)(Je,{className:o.address,children:Object(ze.jsx)("strong",{children:Object(ze.jsx)(Nf,{className:o.link,buttonClassname:o.copyToClipboard,wrapperClassname:o.linkWrapper,children:d})})})}),g&&Object(ze.jsx)(tl,{children:g})]})},h$=x()(Eq||(Eq=Object(c.a)(["\n mutation createResetPasswordToken($confirmationCode: String, $userID: ID!) {\n createResetPasswordToken(\n confirmationCode: $confirmationCode\n userID: $userID\n ) {\n token\n user_id\n expire\n }\n }\n"]))),p$=Object(f.a)($q),b$=function(e){var t=e.state,n=e.dispatch,r=e.user,i=e.requiresConfirmation,o=p$(),c=Object(a.useState)(""),s=Object(l.a)(c,2),d=s[0],m=s[1],h=Object(u.b)(h$,{onCompleted:function(e){var t=e.createResetPasswordToken;m(Zq("/resetpassword?t=".concat(t.token)))}}),p=Object(l.a)(h,2),b=p[0],f=p[1],j=f.loading,g=f.error,O=Object(a.useState)(null),x=Object(l.a)(O,2),v=x[0],y=x[1];Object(a.useEffect)((function(){t.showResetPasswordModal&&(v||!i)&&b({variables:{confirmationCode:v,userID:null===r||void 0===r?void 0:r.id}})}),[v,b,i,t.showResetPasswordModal,null===r||void 0===r?void 0:r.id]);var w=function(){y(null),n({type:"close",payload:"showResetPasswordModal"})};return t.showResetPasswordModal&&i&&!v&&Object(ze.jsx)(Uq,{showModal:t.showResetPasswordModal,handleClose:w,setConfirmation:y})||t.showResetPasswordModal&&(v||!i)&&!j&&Object(ze.jsxs)(Qh,{closeOnBackdropClick:!0,width:500,height:180,handleClose:w,open:!0,children:[Object(ze.jsxs)(Qe,{className:o.modalTitle,children:["Reset password for ",r.username]}),Object(ze.jsxs)(Ke,{className:o.info,children:["Safely share this link with ",r.username," for a password reset."]}),!g&&Object(ze.jsx)("div",{className:o.addressWrapper,children:Object(ze.jsx)(Je,{className:o.address,children:Object(ze.jsx)("strong",{children:Object(ze.jsx)(Nf,{className:o.link,buttonClassname:o.copyToClipboard,wrapperClassname:o.linkWrapper,children:d})})})}),g&&Object(ze.jsx)(tl,{children:g})]})},f$=Object(f.a)($q),j$=x()(Nq||(Nq=Object(c.a)(["\n query users {\n users {\n id\n username\n role\n enabled\n last_accessed\n last_accessed_from\n last_accessed_address\n }\n }\n"]))),g$=x()(Sq||(Sq=Object(c.a)(["\n query generateAttestationOptions($userID: ID!, $domain: String!) {\n generateAttestationOptions(userID: $userID, domain: $domain)\n }\n"]))),O$=x()(Iq||(Iq=Object(c.a)(["\n mutation validateAttestation(\n $userID: ID!\n $attestationResponse: JSONObject!\n $domain: String!\n ) {\n validateAttestation(\n userID: $userID\n attestationResponse: $attestationResponse\n domain: $domain\n )\n }\n"]))),x$={showCreateUserModal:!1,showResetPasswordModal:!1,showReset2FAModal:!1,showRoleModal:!1,showEnableUserModal:!1},v$=function(e,t){var n=t.type,a=t.payload;switch(n){case"close":return x$;case"open":return Object(s.a)(Object(s.a)({},x$),{},Object(z.a)({},a,!0));default:return x$}},y$={user:"Regular",superuser:"Superuser"},w$=function(){var e=f$(),t=Object(a.useContext)(k).userData,n=Object(u.c)(j$).data,r=Object(a.useReducer)(v$,x$),i=Object(l.a)(r,2),o=i[0],c=i[1],s=Object(a.useState)(null),d=Object(l.a)(s,2),m=d[0],h=d[1],p=Object(u.b)(O$,{onCompleted:function(e){}}),b=Object(l.a)(p,1)[0],f=Object(u.a)(g$,{onCompleted:function(e){var t=e.generateAttestationOptions;return Object(El.b)(t).then((function(e){b({variables:{userID:m.id,attestationResponse:e,domain:window.location.hostname}})}))}}),j=Object(l.a)(f,1)[0],g=[{header:"Login",width:307,textAlign:"left",size:"sm",view:function(n){return t.id===n.id?Object(ze.jsxs)("div",{className:e.loginWrapper,children:[Object(ze.jsx)("span",{className:e.username,children:n.username}),Object(ze.jsx)(Dr.a,{size:"small",label:"You",className:e.chip})]}):Object(ze.jsx)("span",{className:e.username,children:n.username})}},{header:"Role",width:160,textAlign:"left",size:"sm",view:function(n){return Object(ze.jsxs)("div",{className:e.loginWrapper,children:[Object(ze.jsx)("span",{children:y$[n.role]}),Object(ze.jsx)(Er,{className:e.roleSwitch,disabled:t.id===n.id,checked:"superuser"===n.role,onClick:function(){h(n),c({type:"open",payload:"showRoleModal"})},value:"superuser"===n.role})]})}},{header:"Actions",width:565,textAlign:"left",size:"sm",view:function(t){return Object(ze.jsxs)("div",{className:e.actionButtonWrapper,children:[Object(ze.jsx)($e,{Icon:eq,InverseIcon:Kz,color:"primary",onClick:function(){h(t),c({type:"open",payload:"showResetPasswordModal"})},children:"Reset password"}),Object(ze.jsx)($e,{Icon:dq,InverseIcon:iq,color:"primary",onClick:function(){h(t),c({type:"open",payload:"showReset2FAModal"})},children:"Reset 2FA"}),Object(ze.jsx)($e,{Icon:qq,InverseIcon:bq,color:"primary",onClick:function(){ep.test(window.location.hostname)?c({type:"open",payload:"showFIDOModal"}):(h(t),j({variables:{userID:t.id,domain:window.location.hostname}}))},children:"Add FIDO"})]})}},{header:"Enabled",width:100,textAlign:"center",size:"sm",view:function(e){return Object(ze.jsx)(Er,{disabled:t.id===e.id,checked:e.enabled,onClick:function(){h(e),c({type:"open",payload:"showEnableUserModal"})},value:e.enabled})}}];return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(rl,{title:"User Management"}),Object(ze.jsx)(Yo.a,{marginBottom:3,marginTop:-5,className:e.tableWidth,display:"flex",justifyContent:"flex-end",children:Object(ze.jsx)(na,{color:"primary",onClick:function(){c({type:"open",payload:"showCreateUserModal"})},children:"Add new user"})}),Object(ze.jsx)(vy,{elements:g,data:A.a(["users"])(n)}),Object(ze.jsx)(a$,{state:o,dispatch:c}),Object(ze.jsx)(b$,{state:o,dispatch:c,user:m,requiresConfirmation:"superuser"===(null===m||void 0===m?void 0:m.role)}),Object(ze.jsx)(m$,{state:o,dispatch:c,user:m,requiresConfirmation:"superuser"===(null===m||void 0===m?void 0:m.role)}),Object(ze.jsx)(_q,{state:o,dispatch:c,user:m,requiresConfirmation:"superuser"===(null===m||void 0===m?void 0:m.role)}),Object(ze.jsx)(l$,{state:o,dispatch:c,user:m,requiresConfirmation:"superuser"===(null===m||void 0===m?void 0:m.role)}),Object(ze.jsx)(s$,{state:o,dispatch:c})]})},C$=x()(Fq||(Fq=Object(c.a)(["\n mutation Save($config: JSONObject, $accounts: JSONObject) {\n saveConfig(config: $config)\n saveAccounts(accounts: $accounts)\n }\n"]))),k$=x()(Lq||(Lq=Object(c.a)(["\n query getData {\n config\n accounts\n cryptoCurrencies {\n code\n display\n }\n }\n"]))),E$=function(){var e,t=_c,n=Object(u.c)(k$).data,a=Object(u.b)(C$,{refetchQueries:function(){return["getData"]}}),r=Object(l.a)(a,2),i=r[0],o=r[1].error,c=(null===n||void 0===n?void 0:n.config)&&os(t)(n.config),s=null!==(e=null===n||void 0===n?void 0:n.cryptoCurrencies)&&void 0!==e?e:[];return Object(ze.jsx)(_h,{name:"advancedWallet",namespaces:R.a(A.a(["code"]))(s),data:c,error:null===o||void 0===o?void 0:o.message,enableEdit:!0,editWidth:174,save:function(e,n){var a=ls(t)(e);return i({variables:{config:a,accounts:n}})},stripeWhen:function(e){return!jO.isValidSync(e)},validationSchema:gO,elements:OO(s,Lf.utils,c)})},N$={header:{display:"flex",alignItems:"center",justifyContent:"space-between"},feeDiscountLabel:{color:se,margin:[[13,0,-5,20]]},selection:{marginRight:12}},S$=x()(Pq||(Pq=Object(c.a)(["\n mutation Save($config: JSONObject, $accounts: JSONObject) {\n saveConfig(config: $config)\n saveAccounts(accounts: $accounts)\n }\n"]))),I$=x()(Dq||(Dq=Object(c.a)(["\n mutation Save($accounts: JSONObject) {\n saveAccounts(accounts: $accounts)\n }\n"]))),F$=x()(Rq||(Rq=Object(c.a)(["\n query getData {\n config\n accounts\n accountsConfig {\n code\n display\n class\n cryptos\n deprecated\n }\n cryptoCurrencies {\n code\n display\n }\n }\n"]))),L$=Object(f.a)(N$),P$=function(e){var t,n,r,i=e.name,o=L$(),c=Object(a.useState)(null),s=Object(l.a)(c,2),d=s[0],m=s[1],h=Object(a.useState)(null),p=Object(l.a)(h,2),b=p[0],f=p[1],j=Object(a.useState)(null),g=Object(l.a)(j,2),O=g[0],x=g[1],v=Object(a.useState)(null),y=Object(l.a)(v,2),w=y[0],C=y[1],k=Object(a.useState)(!1),E=Object(l.a)(k,2),N=E[0],S=E[1],I=Object(a.useState)(!1),F=Object(l.a)(I,2),L=F[0],P=F[1],D=Object(u.c)(F$).data,T=Object(u.b)(S$,{onCompleted:function(){return S(!1)},refetchQueries:function(){return["getData"]}}),B=Object(l.a)(T,2),M=B[0],q=B[1].error,$=Object(u.b)(I$,{onCompleted:function(){return x(null)},refetchQueries:function(){return["getData"]}}),H=Object(l.a)($,1)[0],V=function(e,t){var n=ls(i)(e);return M({variables:{config:n,accounts:t}})},U=(null===D||void 0===D?void 0:D.config)&&os("locale")(D.config).fiatCurrency,G=(null===D||void 0===D?void 0:D.config)&&os(i)(D.config),X=null===D||void 0===D?void 0:D.accountsConfig,_=null!==(t=null===D||void 0===D?void 0:D.cryptoCurrencies)&&void 0!==t?t:[],K=null!==(n=null===D||void 0===D?void 0:D.accounts)&&void 0!==n?n:[];return Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsxs)("div",{className:o.header,children:[Object(ze.jsx)(rl,{title:"Wallet Settings",buttons:[{text:"Advanced settings",icon:gA,inverseIcon:mA,toggle:P}]}),Object(ze.jsxs)(Yo.a,{alignItems:"center",justifyContent:"end",children:[Object(ze.jsx)(nt,{className:o.feeDiscountLabel,children:"Fee discount"}),Object(ze.jsxs)(Yo.a,{display:"flex",alignItems:"center",justifyContent:"end",mr:"-4px",children:[Object(ze.jsx)(Ke,{className:o.selection,children:b}),Object(ze.jsx)(Qn,{onClick:function(){return m(!0)},children:Object(ze.jsx)(Ph,{})})]})]})]}),!L&&Object(ze.jsxs)(ze.Fragment,{children:[Object(ze.jsx)(_h,{name:"test",namespaces:R.a(A.a(["code"]))(_),data:G,error:null===q||void 0===q?void 0:q.message,stripeWhen:function(e){return!jO.isValidSync(e)},enableEdit:!0,shouldOverrideEdit:function(e){var t=os(e)(G);return!jO.isValidSync(t)},editOverride:S,editWidth:174,save:V,validationSchema:jO,elements:xO(_,X,(function(e,t,n){return t?!K[t]&&Ex[t]?(x(Ex[t]),void C((function(){return function(){return n(t)}}))):void n(t):n(t)}))}),N&&Object(ze.jsx)(OL,{coin:Da.a(W.a("code",N))(_),onClose:function(){return S(!1)},save:V,error:null===q||void 0===q?void 0:q.message,cryptoCurrencies:_,fiatCurrency:U,userAccounts:null===D||void 0===D||null===(r=D.config)||void 0===r?void 0:r.accounts,accounts:K,accountsConfig:X}),O&&Object(ze.jsx)(Qh,{title:"Edit ".concat(O.name),width:478,handleClose:function(){return x(null)},open:!0,children:Object(ze.jsx)($O,{save:function(e){return H({variables:{accounts:Object(z.a)({},O.code,e)}}).then((function(e){return w(),C(null),e}))},elements:O.elements,validationSchema:O.validationSchema,value:K[O.code]})})]}),L&&Object(ze.jsx)(E$,{}),d&&Object(ze.jsxs)(Qh,{title:"Fee discount for BTC",width:478,handleClose:function(){return m(null)},open:!0,children:[Object(ze.jsx)(Ke,{children:"Set a priority level for your outgoing BTC transactions, selecting a percentage off of the fee estimate your wallet uses."}),Object(ze.jsx)(yr,{name:"set-automatic-reset",value:b,options:[{display:"+20%",code:"1.2"},{display:"Default",code:"1"},{display:"-20%",code:"0.8"},{display:"-40%",code:"0.6"},{display:"-60%",code:"0.4"}],onChange:function(e){var t=A.a(["target","value"])(e);f(t)}}),Object(ze.jsx)(Gm.a,{children:Object(ze.jsx)(Dn,{onClick:function(){return function(e){var t=ls(i)(e);return m(!1),M({variables:{config:t}})}({BTC_feeMultiplier:b})},children:"Confirm"})})]})]})},D$=function(){return[{key:"transactions",label:"Transactions",route:"/transactions",allowedRoles:[wv,Cv],component:_B},{key:"maintenance",label:"Maintenance",route:"/maintenance",allowedRoles:[wv,Cv],get component(){var e=this;return function(){return Object(ze.jsx)(w.b,{to:e.children[0].route})}},children:[{key:"cash_cassettes",label:"Cash Cassettes",route:"/maintenance/cash-cassettes",allowedRoles:[wv,Cv],component:ID},{key:"funding",label:"Funding",route:"/maintenance/funding",allowedRoles:[wv,Cv],component:rF},{key:"logs",label:"Machine Logs",route:"/maintenance/logs",allowedRoles:[wv,Cv],component:ZP},{key:"machine-status",label:"Machine Status",route:"/maintenance/machine-status",allowedRoles:[wv,Cv],component:nR},{key:"server-logs",label:"Server",route:"/maintenance/server-logs",allowedRoles:[wv,Cv],component:pB}]},{key:"analytics",label:"Analytics",route:"/analytics",allowedRoles:[wv,Cv],component:py},{key:"settings",label:"Settings",route:"/settings",allowedRoles:[wv,Cv],get component(){var e=this;return function(){return Object(ze.jsx)(w.b,{to:e.children[0].route})}},children:[{key:Yc,label:"Commissions",route:"/settings/commissions",allowedRoles:[wv,Cv],component:Iw},{key:Qc,label:"Locales",route:"/settings/locale",allowedRoles:[wv,Cv],component:CL},{key:Xc,label:"Cash-out",route:"/settings/cash-out",allowedRoles:[wv,Cv],component:Xy},{key:Zc,label:"Notifications",route:"/settings/notifications",allowedRoles:[wv,Cv],component:MR},{key:"services",label:"3rd Party Services",route:"/settings/3rd-party-services",allowedRoles:[wv,Cv],component:CB},{key:_c,label:"Wallet",route:"/settings/wallet-settings",allowedRoles:[wv,Cv],component:P$},{key:Kc,label:"Operator Info",route:"/settings/operator-info",title:"Operator Information",allowedRoles:[wv,Cv],get component(){var e=this;return function(){var t;return Object(ze.jsx)(w.b,{to:{pathname:e.children[0].route,state:{prev:null===(t=e.state)||void 0===t?void 0:t.prev}}})}},children:[{key:"contact-info",label:"Contact information",route:"/settings/operator-info/contact-info",allowedRoles:[wv,Cv],component:PT},{key:"receipt-printing",label:"Receipt",route:"/settings/operator-info/receipt-printing",allowedRoles:[wv,Cv],component:_T},{key:"custom-sms",label:"Custom SMS",route:"/settings/operator-info/custom-sms",allowedRoles:[wv,Cv],component:VT},{key:"coin-atm-radar",label:"Coin ATM Radar",route:"/settings/operator-info/coin-atm-radar",allowedRoles:[wv,Cv],component:kT},{key:"terms-conditions",label:"Terms & Conditions",route:"/settings/operator-info/terms-conditions",allowedRoles:[wv,Cv],component:eB}]}]},{key:"compliance",label:"Compliance",route:"/compliance",allowedRoles:[wv,Cv],get component(){var e=this;return function(){return Object(ze.jsx)(w.b,{to:e.children[0].route})}},children:[{key:"triggers",label:"Triggers",route:"/compliance/triggers",allowedRoles:[wv,Cv],component:Vz},{key:"customers",label:"Customers",route:"/compliance/customers",allowedRoles:[wv,Cv],component:$I},{key:"blacklist",label:"Blacklist",route:"/compliance/blacklist",allowedRoles:[wv,Cv],component:Ly},{key:"loyalty",label:"Loyalty",route:"/compliance/loyalty",title:"Loyalty Panel",allowedRoles:[wv,Cv],get component(){var e=this;return function(){var t;return Object(ze.jsx)(w.b,{to:{pathname:e.children[0].route,state:{prev:null===(t=e.state)||void 0===t?void 0:t.prev}}})}},children:[{key:"individual-discounts",label:"Individual Discounts",route:"/compliance/loyalty/individual-discounts",allowedRoles:[wv,Cv],component:BL},{key:"promo-codes",label:"Promo Codes",route:"/compliance/loyalty/codes",allowedRoles:[wv,Cv],component:XL}]},{key:"customer",route:"/compliance/customer/:id",allowedRoles:[wv,Cv],component:QS}]},{key:"system",label:"System",route:"/system",allowedRoles:[Cv],get component(){var e=this;return function(){return Object(ze.jsx)(w.b,{to:e.children[0].route})}},children:[{key:"user-management",label:"User Management",route:"/system/user-management",allowedRoles:[Cv],component:w$},{key:"session-management",label:"Session Management",route:"/system/session-management",allowedRoles:[Cv],component:FB}]}]},R$=function(e){e.numberOfChips;return{totalAssetWrapper:{display:"flex",flexDirection:"row"},totalAssetFieldWrapper:{display:"flex",flexDirection:"column"},fieldHeader:{color:se,marginBottom:5},fieldValue:{fontSize:36},fieldCurrency:{fontSize:20,alignSelf:"flex-end",margin:[[0,0,5,5]]},separator:{fontSize:32,alignSelf:"center",margin:[[25,20,0,20]]},walletChipList:{display:"flex",flexDirection:"row",flexWrap:"wrap"},walletChipWrapper:{flexGrow:0,flexShrink:0,flexBasis:"16.66667%","&:nth-child(6n+1)":{"& > div":{margin:[[0,10,0,0]]}},"&:nth-child(6n)":{"& > div":{margin:[[0,0,0,10]]}},margin:[[10,0]]},walletChip:{height:200,margin:[[0,10]]},walletHeader:{display:"flex",flexDirection:"row",justifyContent:"space-between",height:50},logo:{transform:"scale(0.4, 0.4)",height:80,maxWidth:110,margin:[[-14,0,0,-26]]},zecLogo:{margin:[[-15,0,0,-10]]},bchLogo:{margin:[[-12,0,0,-18]]},hedgedText:{color:se,margin:[[13,12,0,0]]},walletValueWrapper:{display:"flex",flexDirection:"column",margin:[[0,0,0,15]]},walletValue:{fontSize:18,margin:[[0,0,10,0]]},walletChipTitle:{marginTop:50}}},T$=(Object(f.a)(R$),x()(Tq||(Tq=Object(c.a)(["\n query operatorByUsername($username: String) {\n operatorByUsername(username: $username) {\n id\n entityId\n name\n fiatBalances\n cryptoBalances\n machines\n joined\n assetValue\n preferredFiatCurrency\n contactInfo {\n name\n email\n }\n fundings {\n id\n origin\n destination\n fiatAmount\n fiatBalanceAfter\n fiatCurrency\n created\n status\n description\n }\n }\n }\n"]))),function(){return{totalAssetWrapper:{display:"flex",flexDirection:"row"},totalAssetFieldWrapper:{display:"flex",flexDirection:"column"},fieldHeader:{color:se,marginBottom:5},fieldValue:{fontSize:36},fieldCurrency:{fontSize:20,alignSelf:"flex-end",margin:[[0,0,5,5]]},separator:{fontSize:32,alignSelf:"center",margin:[[25,20,0,20]]},tableTitle:{marginTop:35},operation:{display:"flex",flexDirection:"row",alignItems:"center"}}}),B$=(Object(f.a)(T$),x()(Bq||(Bq=Object(c.a)(["\n query operatorByUsername($username: String) {\n operatorByUsername(username: $username) {\n id\n entityId\n name\n fiatBalances\n cryptoBalances\n machines\n joined\n assetValue\n preferredFiatCurrency\n contactInfo {\n name\n email\n }\n fundings {\n id\n origin\n destination\n fiatAmount\n fiatBalanceAfter\n fiatCurrency\n created\n status\n description\n }\n }\n }\n"]))),x()(Aq||(Aq=Object(c.a)(["\n query getData {\n config\n }\n"]))),function(){return{card:{wordWrap:"break-word",boxShadow:"0 0 4px 0 rgba(0, 0, 0, 0.08)",borderRadius:12,padding:24,backgroundColor:Z},h4:{marginTop:0},label:{margin:0,color:se},asset:{float:"left"},amount:{float:"right"},row:{backgroundColor:ae,borderBottom:"none"},totalRow:{backgroundColor:re,borderBottom:"none"},leftSide:{margin:[[0,10,20,0]]},rightSide:{margin:[[0,0,0,10]]}}}),A$=(Object(f.a)(B$),x()(Mq||(Mq=Object(c.a)(["\n query operatorByUsername($username: String) {\n operatorByUsername(username: $username) {\n id\n entityId\n name\n fiatBalances\n cryptoBalances\n machines\n joined\n assetValue\n preferredFiatCurrency\n contactInfo {\n name\n email\n }\n fundings {\n id\n origin\n destination\n fiatAmount\n fiatBalanceAfter\n fiatCurrency\n created\n status\n description\n }\n }\n }\n"]))),{borderBottom:"4px solid white",padding:0,paddingLeft:20,paddingRight:20}),M$=(Object(Rr.a)({root:A$})(Nu.a),Object(Rr.a)({root:Object(s.a)(Object(s.a)({},A$),{},{backgroundColor:"white"})})(Nu.a),Object(f.a)({wrapper:{flex:1,display:"flex",flexDirection:"column",height:"100%"}})),W$=D$(),z$=R.a(ol.a(ll.a("children"),T.a("children"))),q$=L.a(cl.a,z$)(W$),$$=M.a(ll.a("children"))(q$).concat(M.a(ll.a("children"))(W$)),H$=L.a(cl.a,z$)(q$),V$=sl.a(H$,$$),U$=function(){var e=M$(),t=Object(w.h)(),n=Object(w.i)(),r=Object(a.useContext)(k),i=r.wizardTested,o=r.userData;if(!i&&!hl.a(n.pathname)(["/404","/register","/wizard","/login","/register","/resetpassword","/reset2fa"]))return t.push("/wizard"),null;var l=n.state?p.a:il.a,c=l===p.a?{direction:pl.a(W.a("route",n.state.prev))(H$)>pl.a(W.a("route",n.pathname))(H$)?"right":"left"}:{timeout:400};return Object(ze.jsxs)(w.e,{children:[Object(ze.jsx)(kv,{exact:!0,path:"/",children:Object(ze.jsx)(w.b,{to:{pathname:"/dashboard"}})}),Object(ze.jsx)(kv,{path:"/dashboard",children:Object(ze.jsx)(l,Object(s.a)(Object(s.a)({className:e.wrapper},c),{},{in:!0,mountOnEnter:!0,unmountOnExit:!0,children:Object(ze.jsx)("div",{className:e.wrapper,children:Object(ze.jsx)(em,{})})}))}),Object(ze.jsx)(kv,{path:"/machines",component:Fg}),Object(ze.jsx)(kv,{path:"/wizard",component:vv}),Object(ze.jsx)(Ev,{path:"/register",component:uc}),Object(ze.jsx)(Ev,{path:"/login",restricted:!0,component:tc}),Object(ze.jsx)(Ev,{path:"/resetpassword",component:Cc}),Object(ze.jsx)(Ev,{path:"/reset2fa",component:jc}),(o?V$.filter((function(e){var t=e.allowedRoles;return F.a(o.role,t)})):[]).map((function(t){var a=t.route,r=t.component,i=t.key;return Object(ze.jsx)(kv,{path:a,children:Object(ze.jsx)(l,Object(s.a)(Object(s.a)({className:e.wrapper},c),{},{in:!!Object(w.g)(n.pathname,{path:a}),mountOnEnter:!0,unmountOnExit:!0,children:Object(ze.jsx)("div",{className:e.wrapper,children:Object(ze.jsx)(kv,{path:a,children:Object(ze.jsx)(r,{name:i})},i)})}))},i)})),Object(ze.jsx)(Ev,{path:"/404"}),Object(ze.jsx)(Ev,{path:"*",children:Object(ze.jsx)(w.b,{to:{pathname:"/404"}})})]})},G$="100%",X$={"@global":Object(s.a)(Object(s.a)({},{"@font-face":[{fontFamily:"Mont",src:['url("/fonts/MontHeavy/mont-heavy-webfont.woff2") format("woff2")','url("/fonts/MontHeavy/mont-heavy-webfont.woff") format("woff")'],fontWeight:900,fontStyle:"normal"},{fontFamily:"Mont",src:['url("/fonts/MontHeavy/mont-bold-webfont.woff2") format("woff2")','url("/fonts/MontHeavy/mont-bold-webfont.woff") format("woff")'],fontWeight:700,fontStyle:"normal"},{fontFamily:"MuseoSans",src:['url("/fonts/MuseoSans/MuseoSans_500-webfont.woff2") format("woff2")','url("/fonts/MuseoSans/MuseoSans_500-webfont.woff") format("woff")'],fontWeight:500,fontStyle:"normal"},{fontFamily:"MuseoSans",src:['url("/fonts/MuseoSans/MuseoSans_700-webfont.woff2") format("woff2")','url("/fonts/MuseoSans/MuseoSans_700-webfont.woff") format("woff")'],fontWeight:700,fontStyle:"normal"},{fontFamily:"BPmono",src:'url("/fonts/BPmono/BPmono.ttf") format("truetype")',fontWeight:500,fontStyle:"normal"}]}),{},(Wq={"#root":{width:G$,minHeight:G$},".root-notifcenter-open":{overflowY:"auto",position:"absolute",top:0,bottom:0,left:0},".body-notifcenter-open":{overflow:"hidden"},".root-blur":{filter:"blur(1px)",pointerEvents:"none"},html:{height:G$,"@media screen and (max-height: 900px)":{scrollbarGutter:"stable"}},body:{width:be,display:"flex",minHeight:G$,"@media screen and (min-width: 1200px)":{width:"auto"}}},Object(z.a)(Wq,'a::-moz-focus-inner,\n \'input[type="submit"]::-moz-focus-inner,\n input[type="button"]::-moz-focus-inner',{border:0}),Object(z.a)(Wq,'a::-moz-focus-inner,\n input[type="submit"]::-moz-focus-inner,\n input[type="button"]::-moz-focus-inner',{border:0}),Object(z.a)(Wq,"a,\n a:visited,\n a:focus,\n a:active,\n a:hover",{outline:"0 none"}),Object(z.a)(Wq,"button::-moz-focus-inner",{border:0}),Object(z.a)(Wq,".ReactVirtualized__Grid__innerScrollContainer",{overflow:"inherit !important"}),Wq))},_$=n(176),K$=Ae.p,Z$=Object(_$.a)({typography:{fontFamily:Ie,body1:Object(s.a)({},K$)},MuiButtonBase:{disableRipple:!0},palette:{primary:{light:ee,dark:ee,main:ee},secondary:{light:ee,dark:ee,main:ee},background:{default:ae}},overrides:{MuiRadio:{colorSecondary:{color:ee}},MuiAutocomplete:{root:{color:ce},noOptions:{padding:[[6,16]]},option:{'&[data-focus="true"]':{backgroundColor:re}},paper:{color:ce,margin:0},listbox:{padding:0},tag:{'&[data-tag-index="0"]':{marginLeft:0},margin:2,backgroundColor:re,borderRadius:4,height:18}},MuiChip:{label:{paddingLeft:4,paddingRight:4,color:ce,fontSize:we}},MuiInput:{root:{color:ce},underline:{"&:before":{borderBottom:[[2,"solid",ce]]}}},MuiInputLabel:{root:{font:"inherit",fontSize:ve,color:se},shrink:{color:ce,transform:"translate(0, 1.7px) scale(0.83)"}},MuiFormLabel:{root:{"&$focused":{color:ce}}},MuiListItem:{root:{"&:nth-of-type(odd)":{backgroundColor:ae}}},MuiToggleButton:{root:{"&$selected":{backgroundColor:G,borderColor:J,borderTopColor:[J,"!important"],"&:hover":{backgroundColor:X}},"&:hover":{backgroundColor:X}}},MuiToggleButtonGroup:{groupedVertical:{borderRadius:8,border:"1px solid",borderColor:G,"&:not(:first-child)":{borderTop:"1px solid",borderTopColor:G,borderTopRightRadius:8,borderTopLeftRadius:8,borderBottomRightRadius:8,borderBottomLeftRadius:8},"&:not(:last-child)":{borderTop:"1px solid",borderTopColor:G,borderTopRightRadius:8,borderTopLeftRadius:8,borderBottomRightRadius:8,borderBottomLeftRadius:8}}}}}),Q$=Object(v.c)({plugins:[Object(y.a)()].concat(Object(d.a)(Object(b.a)().plugins))}),Y$="100%",J$="column",eH=Object(f.a)(Object(s.a)(Object(s.a)({},X$),{},{root:{backgroundColor:ae,width:Y$,minHeight:Y$,display:"flex",flexDirection:J$},wrapper:{width:be,height:Y$,margin:"0 auto",flex:1,display:"flex",flexDirection:J$},grid:{flex:1,height:"100%"},contentWithSidebar:{flex:1,marginLeft:48,paddingTop:15},contentWithoutSidebar:{width:be}})),tH=x()(zq||(zq=Object(c.a)(["\n query userData {\n userData {\n id\n username\n role\n enabled\n last_accessed\n last_accessed_from\n last_accessed_address\n }\n }\n"]))),nH=function(){var e=eH(),t=Object(w.i)(),n=Object(w.h)(),r=Object(a.useContext)(k),i=r.wizardTested,o=r.userData,l=r.setUserData,c=Object(u.c)(tH,{onCompleted:function(e){!o&&(null===e||void 0===e?void 0:e.userData)&&l(e.userData)}}).loading,s=t.pathname,d=function(e){return dl.a((function(t){return t.route===e}))(L.a(cl.a,R.a(T.a("children")),M.a(ll.a("children")))(q$))}(s),m=d?function(e){return Da.a(W.a("route",ul.a(1,ml.a((function(e){return"/"!==e}),e))))(V$)}(s):{},b="/404"===t.pathname,f=d?e.contentWithSidebar:e.contentWithoutSidebar;return Object(ze.jsxs)("div",{className:e.root,children:[!b&&i&&o&&Object(ze.jsx)(Qo,{tree:W$,user:o}),Object(ze.jsxs)("main",{className:e.wrapper,children:[d&&!b&&i&&Object(ze.jsx)(p.a,{direction:"left",in:!0,mountOnEnter:!0,unmountOnExit:!0,children:Object(ze.jsx)("div",{children:Object(ze.jsx)(rl,{title:m.title})})}),Object(ze.jsxs)(h.a,{container:!0,className:e.grid,children:[d&&!b&&i&&Object(ze.jsx)(ki,{data:m.children,isSelected:function(e){return t.pathname===e.route},displayName:function(e){return e.label},onClick:function(e){return n.push(e.route)}}),Object(ze.jsx)("div",{className:f,children:!c&&Object(ze.jsx)(U$,{})})]})]})]})},aH=function(){var e=Object(a.useState)(!1),t=Object(l.a)(e,2),n=t[0],r=t[1],i=Object(a.useState)(null),o=Object(l.a)(i,2),c=o[0],d=o[1];return Object(ze.jsx)(k.Provider,{value:{wizardTested:n,setWizardTested:r,userData:c,setUserData:d,setRole:function(e){c&&e&&c.role!==e&&d(Object(s.a)(Object(s.a)({},c),{},{role:e}))}},children:Object(ze.jsx)(C.a,{children:Object(ze.jsx)($j,{children:Object(ze.jsx)(j.b,{jss:Q$,children:Object(ze.jsxs)(g.a,{theme:Z$,children:[Object(ze.jsx)(m.a,{}),Object(ze.jsx)(nH,{})]})})})})})};Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));Promise.resolve().then((function(){return o.a.render(Object(ze.jsx)(r.a.StrictMode,{children:Object(ze.jsx)(aH,{})}),document.getElementById("root"))})),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()}))}},[[787,1,2]]]); //# sourceMappingURL=main.e40c9194.chunk.js.map