UNPKG

@vista.io/react-vista-js

Version:

NodeJS implementation of the Vista API.

91 lines (90 loc) 91.8 kB
import*as e from"react";import t,{useContext as n,useMemo as r,useRef as o,useDebugValue as a,createElement as i}from"react";import s from"@vista.io/vista-api-client";export{default as VistaClient}from"@vista.io/vista-api-client";import{withStyles as l}from"@mui/styles";import c from"@mui/material/Button";import d from"@mui/material/FormControl";import u from"@mui/material/InputLabel";import p from"@mui/material/Checkbox";import g from"@mui/material/Box";import h from"@mui/material/List";import m from"@mui/material/ListItem";import f from"@mui/material/ListItemText";import b from"@mui/material/MenuItem";import w from"@mui/material/Select";import y from"@mui/material/Chip";import v from"@mui/material/Autocomplete";import x from"@mui/material/TextField";import C from"@mui/material/ListItemButton";import S,{isValidElementType as R,typeOf as E,isElement as k}from"react-is";const O=t.createContext({secret:"",defaultClient:new s("","","")});class P extends t.Component{render(){const{secret:e,branch:n,hostname:r}=this.props,o=new s(e,n,r);return t.createElement(O.Provider,{value:{secret:this.props.secret,defaultClient:o}},this.props.children)}}class A extends t.Component{constructor(){super(...arguments),this.state={hasChecked:!1,granted:!1},this.componentDidMount=async()=>{if(!this.state.hasChecked){const e=this.context.defaultClient,t=(await e.users.check(this.props.userId,this.props.action,this.props.resourceId,this.props.resourceType,this.props.branch).catch((e=>{this.props.handleError?this.props.handleError(e):console.log(e)}))).length>0;t&&this.setState({hasChecked:!0,granted:t})}}}renderedComponent(){return this.state.hasChecked&&this.state.granted?this.props.children:this.props.denyComponent?this.props.denyComponent:null}render(){return t.createElement(t.Fragment,null,this.renderedComponent())}}A.contextType=O;function I(e){const{label:n,userRoles:r,grantSelectLabel:o,grantSelectLabelStyles:a,allRoles:i,selectClassName:s,chipsClassName:l,selectStyles:c,chipsStyles:h,grantRole:m,revokeRole:v}=e;return t.createElement(d,{sx:{minWidth:"200px"}},t.createElement(u,{className:o,style:a,shrink:r.length>0},n||""),t.createElement(w,{multiple:!0,value:[...r],renderValue:e=>t.createElement(g,{sx:{display:"flex",flexWrap:"wrap",gap:.5}},e.sort().map((e=>t.createElement(y,{key:e,label:e,className:l,style:h||{}})))),onChange:e=>{const t=e.target.value;if(t.length<r.length){const e=new Set(t),n=r.find((t=>!e.has(t)));n&&v(n)}else{const e=new Set(r),n=t.find((t=>!e.has(t)));n&&m(n)}},label:n||"",className:s,style:c||{}},i.map((e=>e.id)).sort().map((e=>t.createElement(b,{key:e,value:e},t.createElement(p,{checked:r.includes(e)}),t.createElement(f,{primary:e}))))))}class _ extends t.Component{constructor(e,t){super(e),this.onGrantChange=async(e,t,n)=>{const{resourceId:r,resourceType:o,orgId:a,branch:i}=this.props,s=await n(e,t,r,o,a,i);return s&&await this.refresh(),s},this.state={client:t.defaultClient,userIdInput:"",selectedUserId:"",selectedRoleIds:[],roles:[],usersetIdToGrants:{},userIds:[],orgId:e.orgId,branch:e.branch}}async componentDidMount(){const{orgId:e,branch:t}=this.props;e&&e.length&&t&&t.length&&await this.refresh()}async componentDidUpdate(){const{orgId:e,branch:t}=this.props;this.state.orgId===e&&this.state.branch===t||""!==e&&""!==t&&(await this.refresh(),this.setState({orgId:e,branch:t}))}async refresh(){const{resourceId:e,resourceType:t,orgId:n,branch:r}=this.props,o=this.state.client.withBranch(r),a=(await o.users.list(n)).map((e=>e.id)),i=await o.roles.list(n),s=await o.grants.listUnflattened(null,null,null,e,t,null,n),l={};s.forEach((e=>{l[e.userset_id]||(l[e.userset_id]=[]),"ROLE"===e.relation_type&&l[e.userset_id].push(e)})),this.setState({userIds:a,roles:i,usersetIdToGrants:l})}render(){const{classes:e,styles:n,userIdMap:r,title:o,onGrant:a,onRevoke:i}=this.props,{selectedUserId:s,selectedRoleIds:l,roles:d,usersetIdToGrants:u,userIds:p,userIdInput:g}=this.state;return t.createElement("div",{className:e.container,style:n.container},t.createElement("h1",{className:e.title,style:n.title},o),t.createElement("div",{className:e.newGrantRow,style:n.newGrantRow},t.createElement("div",{className:e.userSelectContainer,style:n.userSelectContainer},t.createElement(v,{value:s.length?s:null,onChange:(e,t)=>{this.setState({selectedUserId:t||"",selectedRoleIds:[]})},inputValue:g,onInputChange:(e,t)=>{this.setState({userIdInput:t})},className:e.userSelect,style:n.userSelect,sx:{width:"100%"},options:r?["*",...Object.keys(r)]:["*",...p],renderInput:r=>t.createElement(x,Object.assign({},r,{InputLabelProps:{className:e.grantSelectLabel,style:n.grantSelectLabel},label:"Select User"}))})),t.createElement("div",{className:e.roleSelect,style:n.roleSelect},t.createElement(I,{label:"Select Role",userRoles:l,grantRole:e=>{l.push(e),this.setState({selectedRoleIds:l})},revokeRole:e=>{this.setState({selectedRoleIds:l.filter((t=>t!==e))})},selectClassName:e.grantRoleSelect,chipsClassName:e.grantRoleSelectChip,selectStyles:n.grantRoleSelect,chipsStyles:n.grantRoleSelectChip,grantSelectLabel:e.grantSelectLabel,grantSelectLabelStyles:n.grantSelectLabel,allRoles:s.length&&u[s]?d.filter((e=>!u[s].map((e=>e.relation)).includes(e.id))):d})),t.createElement(c,{className:e.grantButton,style:n.grantButton,variant:"contained",disabled:!(s.length&&l.length),onClick:async()=>{for(const e of l)await this.onGrantChange(s,e,a);this.setState({selectedUserId:"",selectedRoleIds:[]})}},"Grant")),t.createElement("div",{className:e.grantList,style:n.grantList},t.createElement(h,null,Object.keys(u).sort().map((r=>{const o=u[r],s=o.map((e=>e.relation));return t.createElement(m,{key:r,className:e.grantRow,style:n.grantRow,secondaryAction:t.createElement(I,{userRoles:s,grantRole:e=>{o.push({userId:r,relation:e,userset_id:r,relation_type:"ROLE"}),u[r]=o,this.onGrantChange(r,e,a),this.setState({usersetIdToGrants:u})},revokeRole:e=>{const t=o.filter((t=>t.relation!==e));u[r]=t,this.onGrantChange(r,e,i),this.setState({usersetIdToGrants:u})},selectClassName:e.grantRoleSelect,chipsClassName:e.grantRoleSelectChip,selectStyles:n.grantRoleSelect,chipsStyles:n.grantRoleSelectChip,grantSelectLabel:e.grantSelectLabel,grantSelectLabelStyles:n.grantSelectLabel,allRoles:d})},t.createElement(f,{primary:r}))})))))}}_.contextType=O,_.defaultProps={styles:{},title:"Add Teammates"};const D=l({container:{height:"500px",width:"600px",display:"flex",flexDirection:"column",border:"solid",borderColor:"lightgray",borderWidth:"1px",padding:"50px",marginBottom:"50px"},title:{marginTop:"0px"},newGrantRow:{display:"flex",marginBottom:"20px"},userSelectContainer:{flexGrow:"1",height:"64px !important",marginRight:"10px"},userSelect:{height:"64px !important","& \t.MuiAutocomplete-inputRoot":{height:"64px"}},grantSelectLabel:{top:"4px"},roleSelect:{marginRight:"10px"},grantButton:{},grantRow:{height:"75px"},grantList:{flexGrow:"1",width:"100%",padding:"0",border:"solid",borderColor:"lightgray",borderWidth:"1px",overflow:"scroll",margin:"0"},grantRoleSelect:{height:"64px"},grantRoleSelectChip:{backgroundColor:"black !important",color:"white !important"}})(_);function T(e){function t(e,r,l,c,p){for(var g,h,m,f,v,C=0,S=0,R=0,E=0,k=0,D=0,N=m=g=0,$=0,L=0,H=0,F=0,M=l.length,z=M-1,B="",W="",G="",V="";$<M;){if(h=l.charCodeAt($),$===z&&0!==S+E+R+C&&(0!==S&&(h=47===S?10:47),E=R=C=0,M++,z++),0===S+E+R+C){if($===z&&(0<L&&(B=B.replace(u,"")),0<B.trim().length)){switch(h){case 32:case 9:case 59:case 13:case 10:break;default:B+=l.charAt($)}h=59}switch(h){case 123:for(g=(B=B.trim()).charCodeAt(0),m=1,F=++$;$<M;){switch(h=l.charCodeAt($)){case 123:m++;break;case 125:m--;break;case 47:switch(h=l.charCodeAt($+1)){case 42:case 47:e:{for(N=$+1;N<z;++N)switch(l.charCodeAt(N)){case 47:if(42===h&&42===l.charCodeAt(N-1)&&$+2!==N){$=N+1;break e}break;case 10:if(47===h){$=N+1;break e}}$=N}}break;case 91:h++;case 40:h++;case 34:case 39:for(;$++<z&&l.charCodeAt($)!==h;);}if(0===m)break;$++}if(m=l.substring(F,$),0===g&&(g=(B=B.replace(d,"").trim()).charCodeAt(0)),64===g){switch(0<L&&(B=B.replace(u,"")),h=B.charCodeAt(1)){case 100:case 109:case 115:case 45:L=r;break;default:L=_}if(F=(m=t(r,L,m,h,p+1)).length,0<T&&(v=s(3,m,L=n(_,B,H),r,P,O,F,h,p,c),B=L.join(""),void 0!==v&&0===(F=(m=v.trim()).length)&&(h=0,m="")),0<F)switch(h){case 115:B=B.replace(x,i);case 100:case 109:case 45:m=B+"{"+m+"}";break;case 107:m=(B=B.replace(b,"$1 $2"))+"{"+m+"}",m=1===I||2===I&&a("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=B+m,112===c&&(W+=m,m="")}else m=""}else m=t(r,n(r,B,H),m,c,p+1);G+=m,m=H=L=N=g=0,B="",h=l.charCodeAt(++$);break;case 125:case 59:if(1<(F=(B=(0<L?B.replace(u,""):B).trim()).length))switch(0===N&&(g=B.charCodeAt(0),45===g||96<g&&123>g)&&(F=(B=B.replace(" ",":")).length),0<T&&void 0!==(v=s(1,B,r,e,P,O,W.length,c,p,c))&&0===(F=(B=v.trim()).length)&&(B="\0\0"),g=B.charCodeAt(0),h=B.charCodeAt(1),g){case 0:break;case 64:if(105===h||99===h){V+=B+l.charAt($);break}default:58!==B.charCodeAt(F-1)&&(W+=o(B,g,h,B.charCodeAt(2)))}H=L=N=g=0,B="",h=l.charCodeAt(++$)}}switch(h){case 13:case 10:47===S?S=0:0===1+g&&107!==c&&0<B.length&&(L=1,B+="\0"),0<T*j&&s(0,B,r,e,P,O,W.length,c,p,c),O=1,P++;break;case 59:case 125:if(0===S+E+R+C){O++;break}default:switch(O++,f=l.charAt($),h){case 9:case 32:if(0===E+C+S)switch(k){case 44:case 58:case 9:case 32:f="";break;default:32!==h&&(f=" ")}break;case 0:f="\\0";break;case 12:f="\\f";break;case 11:f="\\v";break;case 38:0===E+S+C&&(L=H=1,f="\f"+f);break;case 108:if(0===E+S+C+A&&0<N)switch($-N){case 2:112===k&&58===l.charCodeAt($-3)&&(A=k);case 8:111===D&&(A=D)}break;case 58:0===E+S+C&&(N=$);break;case 44:0===S+R+E+C&&(L=1,f+="\r");break;case 34:case 39:0===S&&(E=E===h?0:0===E?h:E);break;case 91:0===E+S+R&&C++;break;case 93:0===E+S+R&&C--;break;case 41:0===E+S+C&&R--;break;case 40:if(0===E+S+C){if(0===g)if(2*k+3*D==533);else g=1;R++}break;case 64:0===S+R+E+C+N+m&&(m=1);break;case 42:case 47:if(!(0<E+C+R))switch(S){case 0:switch(2*h+3*l.charCodeAt($+1)){case 235:S=47;break;case 220:F=$,S=42}break;case 42:47===h&&42===k&&F+2!==$&&(33===l.charCodeAt(F+2)&&(W+=l.substring(F,$+1)),f="",S=0)}}0===S&&(B+=f)}D=k,k=h,$++}if(0<(F=W.length)){if(L=r,0<T&&(void 0!==(v=s(2,W,L,e,P,O,F,c,p,c))&&0===(W=v).length))return V+W+G;if(W=L.join(",")+"{"+W+"}",0!=I*A){switch(2!==I||a(W,2)||(A=0),A){case 111:W=W.replace(y,":-moz-$1")+W;break;case 112:W=W.replace(w,"::-webkit-input-$1")+W.replace(w,"::-moz-$1")+W.replace(w,":-ms-input-$1")+W}A=0}}return V+W+G}function n(e,t,n){var o=t.trim().split(m);t=o;var a=o.length,i=e.length;switch(i){case 0:case 1:var s=0;for(e=0===i?"":e[0]+" ";s<a;++s)t[s]=r(e,t[s],n).trim();break;default:var l=s=0;for(t=[];s<a;++s)for(var c=0;c<i;++c)t[l++]=r(e[c]+" ",o[s],n).trim()}return t}function r(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(f,"$1"+e.trim());case 58:return e.trim()+t.replace(f,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(f,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function o(e,t,n,r){var i=e+";",s=2*t+3*n+4*r;if(944===s){e=i.indexOf(":",9)+1;var l=i.substring(e,i.length-1).trim();return l=i.substring(0,e).trim()+l+";",1===I||2===I&&a(l,1)?"-webkit-"+l+l:l}if(0===I||2===I&&!a(i,1))return i;switch(s){case 1015:return 97===i.charCodeAt(10)?"-webkit-"+i+i:i;case 951:return 116===i.charCodeAt(3)?"-webkit-"+i+i:i;case 963:return 110===i.charCodeAt(5)?"-webkit-"+i+i:i;case 1009:if(100!==i.charCodeAt(4))break;case 969:case 942:return"-webkit-"+i+i;case 978:return"-webkit-"+i+"-moz-"+i+i;case 1019:case 983:return"-webkit-"+i+"-moz-"+i+"-ms-"+i+i;case 883:if(45===i.charCodeAt(8))return"-webkit-"+i+i;if(0<i.indexOf("image-set(",11))return i.replace(k,"$1-webkit-$2")+i;break;case 932:if(45===i.charCodeAt(4))switch(i.charCodeAt(5)){case 103:return"-webkit-box-"+i.replace("-grow","")+"-webkit-"+i+"-ms-"+i.replace("grow","positive")+i;case 115:return"-webkit-"+i+"-ms-"+i.replace("shrink","negative")+i;case 98:return"-webkit-"+i+"-ms-"+i.replace("basis","preferred-size")+i}return"-webkit-"+i+"-ms-"+i+i;case 964:return"-webkit-"+i+"-ms-flex-"+i+i;case 1023:if(99!==i.charCodeAt(8))break;return"-webkit-box-pack"+(l=i.substring(i.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+i+"-ms-flex-pack"+l+i;case 1005:return g.test(i)?i.replace(p,":-webkit-")+i.replace(p,":-moz-")+i:i;case 1e3:switch(t=(l=i.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=i.replace(v,"tb");break;case 232:l=i.replace(v,"tb-rl");break;case 220:l=i.replace(v,"lr");break;default:return i}return"-webkit-"+i+"-ms-"+l+i;case 1017:if(-1===i.indexOf("sticky",9))break;case 975:switch(t=(i=e).length-10,s=(l=(33===i.charCodeAt(t)?i.substring(0,t):i).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:i=i.replace(l,"-webkit-"+l)+";"+i;break;case 207:case 102:i=i.replace(l,"-webkit-"+(102<s?"inline-":"")+"box")+";"+i.replace(l,"-webkit-"+l)+";"+i.replace(l,"-ms-"+l+"box")+";"+i}return i+";";case 938:if(45===i.charCodeAt(5))switch(i.charCodeAt(6)){case 105:return l=i.replace("-items",""),"-webkit-"+i+"-webkit-box-"+l+"-ms-flex-"+l+i;case 115:return"-webkit-"+i+"-ms-flex-item-"+i.replace(S,"")+i;default:return"-webkit-"+i+"-ms-flex-line-pack"+i.replace("align-content","").replace(S,"")+i}break;case 973:case 989:if(45!==i.charCodeAt(3)||122===i.charCodeAt(4))break;case 931:case 953:if(!0===E.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?o(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):i.replace(l,"-webkit-"+l)+i.replace(l,"-moz-"+l.replace("fill-",""))+i;break;case 962:if(i="-webkit-"+i+(102===i.charCodeAt(5)?"-ms-"+i:"")+i,211===n+r&&105===i.charCodeAt(13)&&0<i.indexOf("transform",10))return i.substring(0,i.indexOf(";",27)+1).replace(h,"$1-webkit-$2")+i}return i}function a(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),N(2!==t?r:r.replace(R,"$1"),n,t)}function i(e,t){var n=o(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(C," or ($1)").substring(4):"("+t+")"}function s(e,t,n,r,o,a,i,s,l,d){for(var u,p=0,g=t;p<T;++p)switch(u=D[p].call(c,e,g,n,r,o,a,i,s,l,d)){case void 0:case!1:case!0:case null:break;default:g=u}if(g!==t)return g}function l(e){return void 0!==(e=e.prefix)&&(N=null,e?"function"!=typeof e?I=1:(I=2,N=e):I=0),l}function c(e,n){var r=e;if(33>r.charCodeAt(0)&&(r=r.trim()),r=[r],0<T){var o=s(-1,n,r,r,P,O,0,0,0,0);void 0!==o&&"string"==typeof o&&(n=o)}var a=t(_,r,n,0,0);return 0<T&&(void 0!==(o=s(-2,a,r,r,P,O,a.length,0,0,0))&&(a=o)),"",A=0,O=P=1,a}var d=/^\0+/g,u=/[\0\r\f]/g,p=/: */g,g=/zoo|gra/,h=/([,: ])(transform)/g,m=/,\r+?/g,f=/([\t\r\n ])*\f?&/g,b=/@(k\w+)\s*(\S*)\s*/,w=/::(place)/g,y=/:(read-only)/g,v=/[svh]\w+-[tblr]{2}/,x=/\(\s*(.*)\s*\)/g,C=/([\s\S]*?);/g,S=/-self|flex-/g,R=/[^]*?(:[rp][el]a[\w-]+)[^]*/,E=/stretch|:\s*\w+\-(?:conte|avail)/,k=/([^-])(image-set\()/,O=1,P=1,A=0,I=1,_=[],D=[],T=0,N=null,j=0;return c.use=function e(t){switch(t){case void 0:case null:T=D.length=0;break;default:if("function"==typeof t)D[T++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else j=0|!!t}return e},c.set=l,void 0!==e&&l(e),c}var N={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function j(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var $=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,L=j((function(e){return $.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),H=S,F={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},M={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},z={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},B={};function W(e){return H.isMemo(e)?z:B[e.$$typeof]||F}B[H.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},B[H.Memo]=z;var G=Object.defineProperty,V=Object.getOwnPropertyNames,U=Object.getOwnPropertySymbols,Y=Object.getOwnPropertyDescriptor,q=Object.getPrototypeOf,X=Object.prototype;var K=function e(t,n,r){if("string"!=typeof n){if(X){var o=q(n);o&&o!==X&&e(t,o,r)}var a=V(n);U&&(a=a.concat(U(n)));for(var i=W(t),s=W(n),l=0;l<a.length;++l){var c=a[l];if(!(M[c]||r&&r[c]||s&&s[c]||i&&i[c])){var d=Y(n,c);try{G(t,c,d)}catch(e){}}}}return t};function Z(){return(Z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var J=function(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n},Q=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!E(e)},ee=Object.freeze([]),te=Object.freeze({});function ne(e){return"function"==typeof e}function re(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function oe(e){return e&&"string"==typeof e.styledComponentId}var ae="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",ie="undefined"!=typeof window&&"HTMLElement"in window,se=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),le="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n"}:{};function ce(){for(var e=arguments.length<=0?void 0:arguments[0],t=[],n=1,r=arguments.length;n<r;n+=1)t.push(n<0||arguments.length<=n?void 0:arguments[n]);return t.forEach((function(t){e=e.replace(/%[a-z]/,t)})),e}function de(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw"production"===process.env.NODE_ENV?new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):"")):new Error(ce.apply(void 0,[le[e]].concat(n)).trim())}var ue=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&de(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var a=r;a<o;a++)this.groupSizes[a]=0}for(var i=this.indexOfGroup(e+1),s=0,l=t.length;s<l;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,a=r;a<o;a++)t+=this.tag.getRule(a)+"/*!sc*/\n";return t},e}(),pe=new Map,ge=new Map,he=1,me=function(e){if(pe.has(e))return pe.get(e);for(;ge.has(he);)he++;var t=he++;return"production"!==process.env.NODE_ENV&&((0|t)<0||t>1<<30)&&de(16,""+t),pe.set(e,t),ge.set(t,e),t},fe=function(e){return ge.get(e)},be=function(e,t){t>=he&&(he=t+1),pe.set(e,t),ge.set(t,e)},we="style["+ae+'][data-styled-version="5.3.5"]',ye=new RegExp("^"+ae+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),ve=function(e,t,n){for(var r,o=n.split(","),a=0,i=o.length;a<i;a++)(r=o[a])&&e.registerName(t,r)},xe=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],o=0,a=n.length;o<a;o++){var i=n[o].trim();if(i){var s=i.match(ye);if(s){var l=0|parseInt(s[1],10),c=s[2];0!==l&&(be(c,l),ve(e,c,s[3]),e.getTag().insertRules(l,r)),r.length=0}else r.push(i)}}},Ce=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(ae))return r}}(n),a=void 0!==o?o.nextSibling:null;r.setAttribute(ae,"active"),r.setAttribute("data-styled-version","5.3.5");var i="undefined"!=typeof window&&void 0!==window.__webpack_nonce__?window.__webpack_nonce__:null;return i&&r.setAttribute("nonce",i),n.insertBefore(r,a),r},Se=function(){function e(e){var t=this.element=Ce(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}de(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),Re=function(){function e(e){var t=this.element=Ce(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),Ee=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),ke=ie,Oe={isServer:!ie,useCSSOMInjection:!se},Pe=function(){function e(e,t,n){void 0===e&&(e=te),void 0===t&&(t={}),this.options=Z({},Oe,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&ie&&ke&&(ke=!1,function(e){for(var t=document.querySelectorAll(we),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(ae)&&(xe(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}e.registerId=function(e){return me(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(Z({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,o=t.target,e=n?new Ee(o):r?new Se(o):new Re(o),new ue(e)));var e,t,n,r,o},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(me(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(me(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(me(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=0;o<n;o++){var a=fe(o);if(void 0!==a){var i=e.names.get(a),s=t.getGroup(o);if(i&&s&&i.size){var l=ae+".g"+o+'[id="'+a+'"]',c="";void 0!==i&&i.forEach((function(e){e.length>0&&(c+=e+",")})),r+=""+s+l+'{content:"'+c+'"}/*!sc*/\n'}}}return r}(this)},e}(),Ae=/(a)(d)/gi,Ie=function(e){return String.fromCharCode(e+(e>25?39:97))};function _e(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Ie(t%52)+n;return(Ie(t%52)+n).replace(Ae,"$1-$2")}var De=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Te=function(e){return De(5381,e)};var Ne=Te("5.3.5"),je=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&function(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(ne(n)&&!oe(n))return!1}return!0}(e),this.componentId=t,this.baseHash=De(Ne,t),this.baseStyle=n,Pe.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else{var a=Xe(this.rules,e,t,n).join(""),i=_e(De(this.baseHash,a)>>>0);if(!t.hasNameForId(r,i)){var s=n(a,"."+i,void 0,r);t.insertRules(r,i,s)}o.push(i),this.staticRulesId=i}else{for(var l=this.rules.length,c=De(this.baseHash,n.hash),d="",u=0;u<l;u++){var p=this.rules[u];if("string"==typeof p)d+=p,"production"!==process.env.NODE_ENV&&(c=De(c,p+u));else if(p){var g=Xe(p,e,t,n),h=Array.isArray(g)?g.join(""):g;c=De(c,h+u),d+=h}}if(d){var m=_e(c>>>0);if(!t.hasNameForId(r,m)){var f=n(d,"."+m,void 0,r);t.insertRules(r,m,f)}o.push(m)}}return o.join(" ")},e}(),$e=/^\s*\/\/.*$/gm,Le=[":","[",".","#"];var He=t.createContext();He.Consumer;var Fe=t.createContext(),Me=(Fe.Consumer,new Pe),ze=function(e){var t,n,r,o,a=void 0===e?te:e,i=a.options,s=void 0===i?te:i,l=a.plugins,c=void 0===l?ee:l,d=new T(s),u=[],p=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,a,i,s,l,c,d,u){switch(n){case 1:if(0===d&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(o[0]+r),"";default:return r+(0===u?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){u.push(e)})),g=function(e,r,a){return 0===r&&-1!==Le.indexOf(a[n.length])||a.match(o)?e:"."+t};function h(e,a,i,s){void 0===s&&(s="&");var l=e.replace($e,""),c=a&&i?i+" "+a+" { "+l+" }":l;return t=s,n=a,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),d(i||!a?"":a,c)}return d.use([].concat(c,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,g))},p,function(e){if(-2===e){var t=u;return u=[],t}}])),h.hash=c.length?c.reduce((function(e,t){return t.name||de(15),De(e,t.name)}),5381).toString():"",h}();var Be=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=ze);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return de(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=ze),this.name+e.hash},e}(),We=/([A-Z])/,Ge=/([A-Z])/g,Ve=/^ms-/,Ue=function(e){return"-"+e.toLowerCase()};function Ye(e){return We.test(e)?e.replace(Ge,Ue).replace(Ve,"-ms-"):e}var qe=function(e){return null==e||!1===e||""===e};function Xe(e,t,n,r){if(Array.isArray(e)){for(var o,a=[],i=0,s=e.length;i<s;i+=1)""!==(o=Xe(e[i],t,n,r))&&(Array.isArray(o)?a.push.apply(a,o):a.push(o));return a}if(qe(e))return"";if(oe(e))return"."+e.styledComponentId;if(ne(e)){if("function"!=typeof(c=e)||c.prototype&&c.prototype.isReactComponent||!t)return e;var l=e(t);return"production"!==process.env.NODE_ENV&&k(l)&&console.warn(re(e)+" is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details."),Xe(l,t,n,r)}var c;return e instanceof Be?n?(e.inject(n,r),e.getName(r)):e:Q(e)?function e(t,n){var r,o,a=[];for(var i in t)t.hasOwnProperty(i)&&!qe(t[i])&&(Array.isArray(t[i])&&t[i].isCss||ne(t[i])?a.push(Ye(i)+":",t[i],";"):Q(t[i])?a.push.apply(a,e(t[i],i)):a.push(Ye(i)+": "+(r=i,(null==(o=t[i])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||r in N?String(o).trim():o+"px")+";")));return n?[n+" {"].concat(a,["}"]):a}(e):e.toString()}var Ke=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function Ze(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return ne(e)||Q(e)?Ke(Xe(J(ee,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:Ke(Xe(J(e,n)))}var Je=/invalid hook call/i,Qe=new Set,et=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,tt=/(^-|-$)/g;function nt(e){return e.replace(et,"-").replace(tt,"")}function rt(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var ot=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},at=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function it(e,t,n){var r=e[n];ot(t)&&ot(r)?st(r,t):e[n]=t}function st(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o=0,a=n;o<a.length;o++){var i=a[o];if(ot(i))for(var s in i)at(s)&&it(e,i[s],s)}return e}var lt=t.createContext();function ct(e){var o=n(lt),a=r((function(){return function(e,t){if(!e)return de(14);if(ne(e)){var n=e(t);return"production"===process.env.NODE_ENV||null!==n&&!Array.isArray(n)&&"object"==typeof n?n:de(7)}return Array.isArray(e)||"object"!=typeof e?de(8):t?Z({},t,{},e):e}(e.theme,o)}),[e.theme,o]);return e.children?t.createElement(lt.Provider,{value:a},e.children):null}lt.Consumer;var dt={};function ut(e,r,s){var l=oe(e),c=!rt(e),d=r.attrs,u=void 0===d?ee:d,p=r.componentId,g=void 0===p?function(e,t){var n="string"!=typeof e?"sc":nt(e);dt[n]=(dt[n]||0)+1;var r=n+"-"+function(e){return _e(Te(e)>>>0)}("5.3.5"+n+dt[n]);return t?t+"-"+r:r}(r.displayName,r.parentComponentId):p,h=r.displayName,m=void 0===h?function(e){return rt(e)?"styled."+e:"Styled("+re(e)+")"}(e):h,f=r.displayName&&r.componentId?nt(r.displayName)+"-"+r.componentId:r.componentId||g,b=l&&e.attrs?Array.prototype.concat(e.attrs,u).filter(Boolean):u,w=r.shouldForwardProp;l&&e.shouldForwardProp&&(w=r.shouldForwardProp?function(t,n,o){return e.shouldForwardProp(t,n,o)&&r.shouldForwardProp(t,n,o)}:e.shouldForwardProp);var y,v=new je(s,f,l?e.componentStyle:void 0),x=v.isStatic&&0===u.length,C=function(e,t){return function(e,t,r,o){var s=e.attrs,l=e.componentStyle,c=e.defaultProps,d=e.foldedComponentIds,u=e.shouldForwardProp,p=e.styledComponentId,g=e.target;"production"!==process.env.NODE_ENV&&a(p);var h=function(e,t,n){void 0===e&&(e=te);var r=Z({},t,{theme:e}),o={};return n.forEach((function(e){var t,n,a,i=e;for(t in ne(i)&&(i=i(r)),i)r[t]=o[t]="className"===t?(n=o[t],a=i[t],n&&a?n+" "+a:n||a):i[t]})),[r,o]}(function(e,t,n){return void 0===n&&(n=te),e.theme!==n.theme&&e.theme||t||n.theme}(t,n(lt),c)||te,t,s),m=h[0],f=h[1],b=function(e,t,r,o){var i=n(He)||Me,s=n(Fe)||ze,l=t?e.generateAndInjectStyles(te,i,s):e.generateAndInjectStyles(r,i,s);return"production"!==process.env.NODE_ENV&&a(l),"production"!==process.env.NODE_ENV&&!t&&o&&o(l),l}(l,o,m,"production"!==process.env.NODE_ENV?e.warnTooManyClasses:void 0),w=r,y=f.$as||t.$as||f.as||t.as||g,v=rt(y),x=f!==t?Z({},t,{},f):t,C={};for(var S in x)"$"!==S[0]&&"as"!==S&&("forwardedAs"===S?C.as=x[S]:(u?u(S,L,y):!v||L(S))&&(C[S]=x[S]));return t.style&&f.style!==t.style&&(C.style=Z({},t.style,{},f.style)),C.className=Array.prototype.concat(d,p,b!==p?b:null,t.className,f.className).filter(Boolean).join(" "),C.ref=w,i(y,C)}(y,e,t,x)};return C.displayName=m,(y=t.forwardRef(C)).attrs=b,y.componentStyle=v,y.displayName=m,y.shouldForwardProp=w,y.foldedComponentIds=l?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):ee,y.styledComponentId=f,y.target=l?e.target:e,y.withComponent=function(e){var t=r.componentId,n=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(r,["componentId"]),o=t&&t+"-"+(rt(e)?e:nt(re(e)));return ut(e,Z({},n,{attrs:b,componentId:o}),s)},Object.defineProperty(y,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=l?st({},e.defaultProps,t):t}}),"production"!==process.env.NODE_ENV&&(function(e,t){if("production"!==process.env.NODE_ENV){var n="The component "+e+(t?' with the id of "'+t+'"':"")+" has been created dynamically.\nYou may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",r=console.error;try{var a=!0;console.error=function(e){if(Je.test(e))a=!1,Qe.delete(n);else{for(var t=arguments.length,o=new Array(t>1?t-1:0),i=1;i<t;i++)o[i-1]=arguments[i];r.apply(void 0,[e].concat(o))}},o(),a&&!Qe.has(n)&&(console.warn(n),Qe.add(n))}catch(e){Je.test(e.message)&&Qe.delete(n)}finally{console.error=r}}}(m,f),y.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var a=t?' with the id of "'+t+'"':"";console.warn("Over 200 classes were generated for component "+e+a+".\nConsider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),r=!0,n={}}}}(m,f)),y.toString=function(){return"."+y.styledComponentId},c&&K(y,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),y}var pt,gt=function(e){return function e(t,n,r){if(void 0===r&&(r=te),!R(n))return de(1,String(n));var o=function(){return t(n,r,Ze.apply(void 0,arguments))};return o.withConfig=function(o){return e(t,n,Z({},r,{},o))},o.attrs=function(o){return e(t,n,Z({},r,{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o}(ut,e)};function ht(e,t){return e[t]}function mt(e,t){return t.split(".").reduce(((e,t)=>{const n=t.match(/[^\]\\[.]+/g);if(n&&n.length>1)for(let t=0;t<n.length;t++)return e[n[t]][n[t+1]];return e[t]}),e)}function ft(e=[],t,n=0){return[...e.slice(0,n),t,...e.slice(n)]}function bt(e=[],t,n="id"){const r=e.slice(),o=ht(t,n);return o?r.splice(r.findIndex((e=>ht(e,n)===o)),1):r.splice(r.findIndex((e=>e===t)),1),r}function wt(e){return e.map(((e,t)=>{const n=Object.assign(Object.assign({},e),{sortable:e.sortable||!!e.sortFunction||void 0});return e.id||(n.id=t+1),n}))}function yt(e,t){return Math.ceil(e/t)}function vt(e,t){return Math.min(e,t)}["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){gt[e]=gt(e)})),"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native"),"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window["__styled-components-init__"]=window["__styled-components-init__"]||0,1===window["__styled-components-init__"]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."),window["__styled-components-init__"]+=1),function(e){e.ASC="asc",e.DESC="desc"}(pt||(pt={}));const xt=()=>null;function Ct(e,t=[],n=[]){let r={},o=[...n];return t.length&&t.forEach((t=>{if(!t.when||"function"!=typeof t.when)throw new Error('"when" must be defined in the conditional style object and must be function');t.when(e)&&(r=t.style||{},t.classNames&&(o=[...o,...t.classNames]),"function"==typeof t.style&&(r=t.style(e)||{}))})),{style:r,classNames:o.join(" ")}}function St(e,t=[],n="id"){const r=ht(e,n);return r?t.some((e=>ht(e,n)===r)):t.some((t=>t===e))}function Rt(e,t){return t?e.findIndex((e=>Et(e.id,t))):-1}function Et(e,t){return e==t}function kt(e,t){const n=!e.toggleOnSelectedRowsChange;switch(t.type){case"SELECT_ALL_ROWS":{const{keyField:n,rows:r,rowCount:o,mergeSelections:a}=t,i=!e.allSelected,s=!e.toggleOnSelectedRowsChange;if(a){const t=i?[...e.selectedRows,...r.filter((t=>!St(t,e.selectedRows,n)))]:e.selectedRows.filter((e=>!St(e,r,n)));return Object.assign(Object.assign({},e),{allSelected:i,selectedCount:t.length,selectedRows:t,toggleOnSelectedRowsChange:s})}return Object.assign(Object.assign({},e),{allSelected:i,selectedCount:i?o:0,selectedRows:i?r:[],toggleOnSelectedRowsChange:s})}case"SELECT_SINGLE_ROW":{const{keyField:r,row:o,isSelected:a,rowCount:i,singleSelect:s}=t;return s?a?Object.assign(Object.assign({},e),{selectedCount:0,allSelected:!1,selectedRows:[],toggleOnSelectedRowsChange:n}):Object.assign(Object.assign({},e),{selectedCount:1,allSelected:!1,selectedRows:[o],toggleOnSelectedRowsChange:n}):a?Object.assign(Object.assign({},e),{selectedCount:e.selectedRows.length>0?e.selectedRows.length-1:0,allSelected:!1,selectedRows:bt(e.selectedRows,o,r),toggleOnSelectedRowsChange:n}):Object.assign(Object.assign({},e),{selectedCount:e.selectedRows.length+1,allSelected:e.selectedRows.length+1===i,selectedRows:ft(e.selectedRows,o),toggleOnSelectedRowsChange:n})}case"SELECT_MULTIPLE_ROWS":{const{keyField:r,selectedRows:o,totalRows:a,mergeSelections:i}=t;if(i){const t=[...e.selectedRows,...o.filter((t=>!St(t,e.selectedRows,r)))];return Object.assign(Object.assign({},e),{selectedCount:t.length,allSelected:!1,selectedRows:t,toggleOnSelectedRowsChange:n})}return Object.assign(Object.assign({},e),{selectedCount:o.length,allSelected:o.length===a,selectedRows:o,toggleOnSelectedRowsChange:n})}case"CLEAR_SELECTED_ROWS":{const{selectedRowsFlag:n}=t;return Object.assign(Object.assign({},e),{allSelected:!1,selectedCount:0,selectedRows:[],selectedRowsFlag:n})}case"SORT_CHANGE":{const{sortDirection:r,selectedColumn:o,clearSelectedOnSort:a}=t;return Object.assign(Object.assign(Object.assign({},e),{selectedColumn:o,sortDirection:r,currentPage:1}),a&&{allSelected:!1,selectedCount:0,selectedRows:[],toggleOnSelectedRowsChange:n})}case"CHANGE_PAGE":{const{page:r,paginationServer:o,visibleOnly:a,persistSelectedOnPageChange:i}=t,s=o&&i,l=o&&!i||a;return Object.assign(Object.assign(Object.assign(Object.assign({},e),{currentPage:r}),s&&{allSelected:!1}),l&&{allSelected:!1,selectedCount:0,selectedRows:[],toggleOnSelectedRowsChange:n})}case"CHANGE_ROWS_PER_PAGE":{const{rowsPerPage:n,page:r}=t;return Object.assign(Object.assign({},e),{currentPage:r,rowsPerPage:n})}}}const Ot=Ze` pointer-events: none; opacity: 0.4; `,Pt=gt.div` position: relative; box-sizing: border-box; display: flex; flex-direction: column; width: 100%; height: 100%; max-width: 100%; ${({disabled:e})=>e&&Ot}; ${({theme:e})=>e.table.style}; `,At=Ze` position: sticky; position: -webkit-sticky; /* Safari */ top: 0; z-index: 1; `,It=gt.div` display: flex; width: 100%; ${({fixedHeader:e})=>e&&At}; ${({theme:e})=>e.head.style}; `,_t=gt.div` display: flex; align-items: stretch; width: 100%; ${({theme:e})=>e.headRow.style}; ${({dense:e,theme:t})=>e&&t.headRow.denseStyle}; `,Dt=(e,...t)=>Ze` @media screen and (max-width: ${599}px) { ${Ze(e,...t)} } `,Tt=(e,...t)=>Ze` @media screen and (max-width: ${959}px) { ${Ze(e,...t)} } `,Nt=(e,...t)=>Ze` @media screen and (max-width: ${1280}px) { ${Ze(e,...t)} } `,jt=gt.div` position: relative; display: flex; align-items: center; box-sizing: border-box; line-height: normal; ${({theme:e,headCell:t})=>e[t?"headCells":"cells"].style}; ${({noPadding:e})=>e&&"padding: 0"}; `,$t=gt(jt)` flex-grow: ${({button:e,grow:t})=>0===t||e?0:t||1}; flex-shrink: 0; flex-basis: 0; max-width: ${({maxWidth:e})=>e||"100%"}; min-width: ${({minWidth:e})=>e||"100px"}; ${({width:e})=>e&&Ze` min-width: ${e}; max-width: ${e}; `}; ${({right:e})=>e&&"justify-content: flex-end"}; ${({button:e,center:t})=>(t||e)&&"justify-content: center"}; ${({compact:e,button:t})=>(e||t)&&"padding: 0"}; /* handle hiding cells */ ${({hide:e})=>e&&"sm"===e&&Dt` display: none; `}; ${({hide:e})=>e&&"md"===e&&Tt` display: none; `}; ${({hide:e})=>e&&"lg"===e&&Nt` display: none; `}; ${({hide:e})=>e&&Number.isInteger(e)&&(e=>(t,...n)=>Ze` @media screen and (max-width: ${e}px) { ${Ze(t,...n)} } `)(e)` display: none; `}; `,Lt=Ze` div:first-child { white-space: ${({wrapCell:e})=>e?"normal":"nowrap"}; overflow: ${({allowOverflow:e})=>e?"visible":"hidden"}; text-overflow: ellipsis; } `,Ht=gt($t).attrs((e=>({style:e.style})))` ${({renderAsCell:e})=>!e&&Lt}; ${({theme:e,isDragging:t})=>t&&e.cells.draggingStyle}; ${({cellStyle:e})=>e}; `;var Ft=e.memo((function({id:t,column:n,row:r,rowIndex:o,dataTag:a,isDragging:i,onDragStart:s,onDragOver:l,onDragEnd:c,onDragEnter:d,onDragLeave:u}){const{style:p,classNames:g}=Ct(r,n.conditionalCellStyles,["rdt_TableCell"]);return e.createElement(Ht,{id:t,"data-column-id":n.id,role:"gridcell",className:g,"data-tag":a,cellStyle:n.style,renderAsCell:!!n.cell,allowOverflow:n.allowOverflow,button:n.button,center:n.center,compact:n.compact,grow:n.grow,hide:n.hide,maxWidth:n.maxWidth,minWidth:n.minWidth,right:n.right,width:n.width,wrapCell:n.wrap,style:p,isDragging:i,onDragStart:s,onDragOver:l,onDragEnd:c,onDragEnter:d,onDragLeave:u},!n.cell&&e.createElement("div",{"