From 8900c5ee2ae635846c3586a2d7d42774ec540f53 Mon Sep 17 00:00:00 2001 From: conor Date: Fri, 8 Mar 2024 00:47:13 +0000 Subject: [PATCH] Remove calls to .clone and replace them with {...object} as clone is no longer a method or required --- .../{index.6c0e64f1.js => index.be40edba.js} | 2 +- ...{index.12bcf05e.css => index.f13f5edb.css} | 2 +- ui/dist/index.html | 4 ++-- .../dashboard/config/SettingCard.tsx | 2 +- ui/src/routes/Dashboards/Config.tsx | 22 +++++++++---------- ui/src/routes/Dashboards/Team.tsx | 6 ++--- 6 files changed, 19 insertions(+), 19 deletions(-) rename ui/dist/assets/{index.6c0e64f1.js => index.be40edba.js} (90%) rename ui/dist/assets/{index.12bcf05e.css => index.f13f5edb.css} (97%) diff --git a/ui/dist/assets/index.6c0e64f1.js b/ui/dist/assets/index.be40edba.js similarity index 90% rename from ui/dist/assets/index.6c0e64f1.js rename to ui/dist/assets/index.be40edba.js index 49484c6..c07c61c 100644 --- a/ui/dist/assets/index.6c0e64f1.js +++ b/ui/dist/assets/index.be40edba.js @@ -793,4 +793,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Fa=60103,ja=60106,Or=60107,Er=60108,Pr=60114,Ar=60109,Tr=60110,Nr=60112,Rr=60113,po=60120,Dr=60115,Mr=60116,Lu=60121,$u=60122,Fu=60117,ju=60129,Uu=60131;if(typeof Symbol=="function"&&Symbol.for){var Be=Symbol.for;Fa=Be("react.element"),ja=Be("react.portal"),Or=Be("react.fragment"),Er=Be("react.strict_mode"),Pr=Be("react.profiler"),Ar=Be("react.provider"),Tr=Be("react.context"),Nr=Be("react.forward_ref"),Rr=Be("react.suspense"),po=Be("react.suspense_list"),Dr=Be("react.memo"),Mr=Be("react.lazy"),Lu=Be("react.block"),$u=Be("react.server.block"),Fu=Be("react.fundamental"),ju=Be("react.debug_trace_mode"),Uu=Be("react.legacy_hidden")}function gt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Fa:switch(e=e.type,e){case Or:case Pr:case Er:case Rr:case po:return e;default:switch(e=e&&e.$$typeof,e){case Tr:case Nr:case Mr:case Dr:case Ar:return e;default:return t}}case ja:return t}}}var ov=Ar,sv=Fa,lv=Nr,cv=Or,uv=Mr,dv=Dr,fv=ja,hv=Pr,mv=Er,pv=Rr;ge.ContextConsumer=Tr;ge.ContextProvider=ov;ge.Element=sv;ge.ForwardRef=lv;ge.Fragment=cv;ge.Lazy=uv;ge.Memo=dv;ge.Portal=fv;ge.Profiler=hv;ge.StrictMode=mv;ge.Suspense=pv;ge.isAsyncMode=function(){return!1};ge.isConcurrentMode=function(){return!1};ge.isContextConsumer=function(e){return gt(e)===Tr};ge.isContextProvider=function(e){return gt(e)===Ar};ge.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fa};ge.isForwardRef=function(e){return gt(e)===Nr};ge.isFragment=function(e){return gt(e)===Or};ge.isLazy=function(e){return gt(e)===Mr};ge.isMemo=function(e){return gt(e)===Dr};ge.isPortal=function(e){return gt(e)===ja};ge.isProfiler=function(e){return gt(e)===Pr};ge.isStrictMode=function(e){return gt(e)===Er};ge.isSuspense=function(e){return gt(e)===Rr};ge.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Or||e===Pr||e===ju||e===Er||e===Rr||e===po||e===Uu||typeof e=="object"&&e!==null&&(e.$$typeof===Mr||e.$$typeof===Dr||e.$$typeof===Ar||e.$$typeof===Tr||e.$$typeof===Nr||e.$$typeof===Fu||e.$$typeof===Lu||e[0]===$u)};ge.typeOf=gt;(function(e){e.exports=ge})(iv);let dl=e=>typeof e=="object"&&e!=null&&e.nodeType===1,fl=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",ii=(e,t)=>{if(e.clientHeight{let a=(i=>{if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!a&&(a.clientHeightit||i>e&&o=t&&s>=n?i-e-r:o>t&&sn?o-t+a:0,gv=e=>{let t=e.parentElement;return t==null?e.getRootNode().host||null:t};var vv=(e,t)=>{var n,r,a,i,o,s;if(typeof document>"u")return[];let{scrollMode:c,block:d,inline:u,boundary:f,skipOverflowHiddenElements:m}=t,p=typeof f=="function"?f:ue=>ue!==f;if(!dl(e))throw new TypeError("Invalid target");let g=document.scrollingElement||document.documentElement,v=[],h=e;for(;dl(h)&&p(h);){if(h=gv(h),h===g){v.push(h);break}h!=null&&h===document.body&&ii(h)&&!ii(document.documentElement)||h!=null&&ii(h,m)&&v.push(h)}let _=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,w=(i=(a=window.visualViewport)==null?void 0:a.height)!=null?i:innerHeight,y=(o=window.scrollX)!=null?o:pageXOffset,O=(s=window.scrollY)!=null?s:pageYOffset,{height:E,width:T,top:A,right:P,bottom:z,left:te}=e.getBoundingClientRect(),ce=d==="start"||d==="nearest"?A:d==="end"?z:A+E/2,ne=u==="center"?te+T/2:u==="end"?P:te,Oe=[];for(let ue=0;ue=0&&te>=0&&z<=w&&P<=_&&A>=B&&z<=fe&&te>=Ae&&P<=de)return Oe;let R=getComputedStyle(Z),I=parseInt(R.borderLeftWidth,10),C=parseInt(R.borderTopWidth,10),N=parseInt(R.borderRightWidth,10),K=parseInt(R.borderBottomWidth,10),D=0,L=0,H="offsetWidth"in Z?Z.offsetWidth-Z.clientWidth-I-N:0,J="offsetHeight"in Z?Z.offsetHeight-Z.clientHeight-C-K:0,_e="offsetWidth"in Z?Z.offsetWidth===0?0:De/Z.offsetWidth:0,Ce="offsetHeight"in Z?Z.offsetHeight===0?0:Re/Z.offsetHeight:0;if(g===Z)D=d==="start"?ce:d==="end"?ce-w:d==="nearest"?Gr(O,O+w,w,C,K,O+ce,O+ce+E,E):ce-w/2,L=u==="start"?ne:u==="center"?ne-_/2:u==="end"?ne-_:Gr(y,y+_,_,I,N,y+ne,y+ne+T,T),D=Math.max(0,D+O),L=Math.max(0,L+y);else{D=d==="start"?ce-B-C:d==="end"?ce-fe+K+J:d==="nearest"?Gr(B,fe,Re,C,K+J,ce,ce+E,E):ce-(B+Re/2)+J/2,L=u==="start"?ne-Ae-I:u==="center"?ne-(Ae+De/2)+H/2:u==="end"?ne-de+N+H:Gr(Ae,de,De,I,N+H,ne,ne+T,T);let{scrollLeft:Ee,scrollTop:ve}=Z;D=Math.max(0,Math.min(ve+D/Ce,Z.scrollHeight-Re/Ce+J)),L=Math.max(0,Math.min(Ee+L/_e,Z.scrollWidth-De/_e+H)),ce+=ve-D,ne+=Ee-L}Oe.push({el:Z,top:D,left:L})}return Oe},ga=function(){return ga=Object.assign||function(t){for(var n,r=1,a=arguments.length;r1?a-1:0),o=1;o=37&&n<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function Ut(e,t,n,r,a){if(a===void 0&&(a=!0),n===0)return-1;var i=n-1;(typeof t!="number"||t<0||t>=n)&&(t=e>0?-1:i+1);var o=t+e;o<0?o=a?i:0:o>i&&(o=a?0:i);var s=on(e,o,n,r,a);return s===-1?t>=n?-1:t:s}function on(e,t,n,r,a){var i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(var o=t+1;o=0;s--)if(!r(s).hasAttribute("disabled"))return s;return a?e>0?on(1,0,n,r,!1):on(-1,n-1,n,r,!1):-1}function ml(e,t,n,r){return r===void 0&&(r=!0),t.some(function(a){return a&&(hl(a,e,n)||r&&hl(a,n.document.activeElement,n))})}var Sv=go(function(e){Ku(e).textContent=""},500);function xv(e,t){var n=Ku(t);!e||(n.textContent=e,Sv(t))}function Ku(e){e===void 0&&(e=document);var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var Iv=["isInitialMount","highlightedIndex","items","environment"],zu={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function Cv(e,t,n){var r=e.props,a=e.type,i={};Object.keys(t).forEach(function(o){kv(o,e,t,n),n[o]!==t[o]&&(i[o]=n[o])}),r.onStateChange&&Object.keys(i).length&&r.onStateChange(ie({type:a},i))}function kv(e,t,n,r){var a=t.props,i=t.type,o="on"+vo(e)+"Change";a[o]&&r[e]!==void 0&&r[e]!==n[e]&&a[o](ie({type:i},r))}function Ov(e,t){return t.changes}function Ev(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}var Pv=go(function(e,t){xv(e(),t)},200),Av=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Rn:X;function Wu(e){var t=e.id,n=t===void 0?"downshift-"+_v():t,r=e.labelId,a=e.menuId,i=e.getItemId,o=e.toggleButtonId,s=e.inputId,c=Ie({labelId:r||n+"-label",menuId:a||n+"-menu",getItemId:i||function(d){return n+"-item-"+d},toggleButtonId:o||n+"-toggle-button",inputId:s||n+"-input"});return c.current}function qu(e,t,n,r){var a,i;if(e===void 0){if(t===void 0)throw new Error(r);a=n[t],i=t}else i=t===void 0?n.indexOf(e):t,a=e;return[a,i]}function Tv(e){return e?String(e):""}function Nv(e){return/^\S{1}$/.test(e)}function vo(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function bo(e){var t=Ie(e);return t.current=e,t}function Gu(e,t,n){var r=Ie(),a=Ie(),i=ae(function(m,p){a.current=p,m=va(m,p.props);var g=e(m,p),v=p.props.stateReducer(m,ie({},p,{changes:g}));return v},[e]),o=Ea(i,t),s=o[0],c=o[1],d=bo(n),u=ae(function(m){return c(ie({props:d.current},m))},[d]),f=a.current;return X(function(){f&&r.current&&r.current!==s&&Cv(f,va(r.current,f.props),s),r.current=s},[s,n,f]),[s,u]}function Rv(e,t,n){var r=Gu(e,t,n),a=r[0],i=r[1];return[va(a,n),i]}var Zn={itemToString:Tv,stateReducer:Ov,getA11ySelectionMessage:Ev,scrollIntoView:yv,environment:typeof window>"u"?{}:window};function Xe(e,t,n){n===void 0&&(n=zu);var r=e["default"+vo(t)];return r!==void 0?r:n[t]}function Yr(e,t,n){n===void 0&&(n=zu);var r=e[t];if(r!==void 0)return r;var a=e["initial"+vo(t)];return a!==void 0?a:Xe(e,t,n)}function Yu(e){var t=Yr(e,"selectedItem"),n=Yr(e,"isOpen"),r=Yr(e,"highlightedIndex"),a=Yr(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:a}}function tn(e,t,n){var r=e.items,a=e.initialHighlightedIndex,i=e.defaultHighlightedIndex,o=t.selectedItem,s=t.highlightedIndex;return r.length===0?-1:a!==void 0&&s===a?a:i!==void 0?i:o?r.indexOf(o):n===0?-1:n<0?r.length-1:0}function Ju(e,t,n,r){var a=Ie({isMouseDown:!1,isTouchMove:!1});return X(function(){if((n==null?void 0:n.addEventListener)!=null){var i=function(){a.current.isMouseDown=!0},o=function(f){a.current.isMouseDown=!1,e&&!ml(f.target,t.map(function(m){return m.current}),n)&&r()},s=function(){a.current.isTouchMove=!1},c=function(){a.current.isTouchMove=!0},d=function(f){e&&!a.current.isTouchMove&&!ml(f.target,t.map(function(m){return m.current}),n,!1)&&r()};return n.addEventListener("mousedown",i),n.addEventListener("mouseup",o),n.addEventListener("touchstart",s),n.addEventListener("touchmove",c),n.addEventListener("touchend",d),function(){n.removeEventListener("mousedown",i),n.removeEventListener("mouseup",o),n.removeEventListener("touchstart",s),n.removeEventListener("touchmove",c),n.removeEventListener("touchend",d)}}},[e,n]),a}var Xu=function(){return Bu};function ba(e,t,n){var r=n.isInitialMount,a=n.highlightedIndex,i=n.items,o=n.environment,s=jt(n,Iv);X(function(){r||Pv(function(){return e(ie({highlightedIndex:a,highlightedItem:i[a],resultCount:i.length},s))},o.document)},t)}function Zu(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,a=e.getItemNodeFromIndex,i=e.menuElement,o=e.scrollIntoView,s=Ie(!0);return Av(function(){t<0||!n||!Object.keys(r.current).length||(s.current===!1?s.current=!0:o(a(t),i))},[t]),s}var Qu=Bu;function ya(e,t,n){var r;n===void 0&&(n=!0);var a=((r=e.items)==null?void 0:r.length)&&t>=0;return ie({isOpen:!1,highlightedIndex:-1},a&&ie({selectedItem:e.items[t],isOpen:Xe(e,"isOpen"),highlightedIndex:Xe(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}function ed(e,t,n){var r=t.type,a=t.props,i;switch(r){case n.ItemMouseMove:i={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:i={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:i={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:tn(a,e,0)};break;case n.FunctionOpenMenu:i={isOpen:!0,highlightedIndex:tn(a,e,0)};break;case n.FunctionCloseMenu:i={isOpen:!1};break;case n.FunctionSetHighlightedIndex:i={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:i={inputValue:t.inputValue};break;case n.FunctionReset:i={highlightedIndex:Xe(a,"highlightedIndex"),isOpen:Xe(a,"isOpen"),selectedItem:Xe(a,"selectedItem"),inputValue:Xe(a,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return ie({},e,i)}function Dv(e){for(var t=e.keysSoFar,n=e.highlightedIndex,r=e.items,a=e.itemToString,i=e.getItemNodeFromIndex,o=t.toLowerCase(),s=0;s=0&&((n=a.items)==null?void 0:n.length)&&{selectedItem:a.items[e.highlightedIndex]});break;case Po:o={selectedItem:t.selectedItem};break;default:return ed(e,t,ld)}return ie({},e,o)}var Fv=["onMouseLeave","refKey","onKeyDown","onBlur","ref"],jv=["onBlur","onClick","onPress","onKeyDown","refKey","ref"],Uv=["item","index","onMouseMove","onClick","onPress","refKey","ref","disabled"];cd.stateChangeTypes=ld;function cd(e){e===void 0&&(e={});var t=ie({},Lv,e),n=t.items,r=t.scrollIntoView,a=t.environment,i=t.itemToString,o=t.getA11ySelectionMessage,s=t.getA11yStatusMessage,c=Yu(t),d=Rv($v,c,t),u=d[0],f=d[1],m=u.isOpen,p=u.highlightedIndex,g=u.selectedItem,v=u.inputValue,h=Ie(null),_=Ie(null),w=Ie({}),y=Ie(null),O=Wu(t),E=Ie(),T=Ie(!0),A=bo({state:u,props:t}),P=ae(function(C){return w.current[O.getItemId(C)]},[O]);ba(s,[m,p,v,n],ie({isInitialMount:T.current,previousResultCount:E.current,items:n,environment:a,itemToString:i},u)),ba(o,[g],ie({isInitialMount:T.current,previousResultCount:E.current,items:n,environment:a,itemToString:i},u));var z=Zu({menuElement:_.current,highlightedIndex:p,isOpen:m,itemRefs:w,scrollIntoView:r,getItemNodeFromIndex:P});X(function(){return y.current=go(function(C){C({type:Di,inputValue:""})},500),function(){y.current.cancel()}},[]),X(function(){!v||y.current(f)},[f,v]),Qu({isInitialMount:T.current,props:t,state:u}),X(function(){T.current||(E.current=n.length)});var te=Ju(m,[_,h],a,function(){f({type:wa})}),ce=Xu();X(function(){return T.current=!1,function(){T.current=!0}},[]),X(function(){m||(w.current={})},[m]);var ne=et(function(){return{ArrowDown:function(N){N.preventDefault(),f({type:yo,getItemNodeFromIndex:P,altKey:N.altKey})},ArrowUp:function(N){N.preventDefault(),f({type:_o,getItemNodeFromIndex:P,altKey:N.altKey})},Home:function(N){N.preventDefault(),f({type:So,getItemNodeFromIndex:P})},End:function(N){N.preventDefault(),f({type:xo,getItemNodeFromIndex:P})},Escape:function(){A.current.state.isOpen&&f({type:wo})},Enter:function(N){N.preventDefault(),f({type:A.current.state.isOpen?Io:ta})},PageUp:function(N){A.current.state.isOpen&&(N.preventDefault(),f({type:ko,getItemNodeFromIndex:P}))},PageDown:function(N){A.current.state.isOpen&&(N.preventDefault(),f({type:Oo,getItemNodeFromIndex:P}))}," ":function(N){N.preventDefault();var K=A.current.state;if(!K.isOpen){f({type:ta});return}K.inputValue?f({type:_a,key:" ",getItemNodeFromIndex:P}):f({type:Co})}}},[f,P,A]),Oe=ae(function(){f({type:rd})},[f]),ue=ae(function(){f({type:id})},[f]),Z=ae(function(){f({type:ad})},[f]),Re=ae(function(C){f({type:od,highlightedIndex:C})},[f]),De=ae(function(C){f({type:Po,selectedItem:C})},[f]),B=ae(function(){f({type:sd})},[f]),de=ae(function(C){f({type:Di,inputValue:C})},[f]),fe=ae(function(C){return ie({id:O.labelId,htmlFor:O.toggleButtonId},C)},[O]),Ae=ae(function(C,N){var K,D=C===void 0?{}:C,L=D.onMouseLeave,H=D.refKey,J=H===void 0?"ref":H;D.onKeyDown,D.onBlur;var _e=D.ref,Ce=jt(D,Fv),Ee=N===void 0?{}:N;Ee.suppressRefError;var ve=function(){f({type:td})};return ie((K={},K[J]=Qt(_e,function(Te){_.current=Te}),K.id=O.menuId,K.role="listbox",K["aria-labelledby"]=Ce&&Ce["aria-label"]?void 0:""+O.labelId,K.onMouseLeave=qe(L,ve),K),Ce)},[f,ce,O]),R=ae(function(C,N){var K,D=C===void 0?{}:C,L=D.onBlur,H=D.onClick;D.onPress;var J=D.onKeyDown,_e=D.refKey,Ce=_e===void 0?"ref":_e,Ee=D.ref,ve=jt(D,jv),Te=N===void 0?{}:N;Te.suppressRefError;var Pe=A.current.state,Ke=function(){f({type:ta})},wt=function(){Pe.isOpen&&!te.current.isMouseDown&&f({type:wa})},He=function(Ge){var ze=Vu(Ge);ze&&ne[ze]?ne[ze](Ge):Nv(ze)&&f({type:_a,key:ze,getItemNodeFromIndex:P})},tt=ie((K={},K[Ce]=Qt(Ee,function(he){h.current=he}),K["aria-activedescendant"]=Pe.isOpen&&Pe.highlightedIndex>-1?O.getItemId(Pe.highlightedIndex):"",K["aria-controls"]=O.menuId,K["aria-expanded"]=A.current.state.isOpen,K["aria-haspopup"]="listbox",K["aria-labelledby"]=ve&&ve["aria-label"]?void 0:""+O.labelId,K.id=O.toggleButtonId,K.role="combobox",K.tabIndex=0,K.onBlur=qe(L,wt),K),ve);return ve.disabled||(tt.onClick=qe(H,Ke),tt.onKeyDown=qe(J,He)),tt},[A,O,ce,f,te,ne,P]),I=ae(function(C){var N,K=C===void 0?{}:C,D=K.item,L=K.index,H=K.onMouseMove,J=K.onClick;K.onPress;var _e=K.refKey,Ce=_e===void 0?"ref":_e,Ee=K.ref,ve=K.disabled,Te=jt(K,Uv),Pe=A.current,Ke=Pe.state,wt=Pe.props,He=qu(D,L,wt.items,"Pass either item or index to getItemProps!"),tt=He[0],he=He[1],Ge=function(){he!==Ke.highlightedIndex&&(z.current=!1,f({type:nd,index:he,disabled:ve}))},ze=function(){f({type:Eo,index:he})},nt=ie((N={disabled:ve,role:"option","aria-selected":""+(tt===g),id:O.getItemId(he)},N[Ce]=Qt(Ee,function(We){We&&(w.current[O.getItemId(he)]=We)}),N),Te);return ve||(nt.onClick=qe(J,ze)),nt.onMouseMove=qe(H,Ge),nt},[A,g,O,z,f]);return{getToggleButtonProps:R,getLabelProps:fe,getMenuProps:Ae,getItemProps:I,toggleMenu:Oe,openMenu:Z,closeMenu:ue,setHighlightedIndex:Re,selectItem:De,reset:B,setInputValue:de,highlightedIndex:p,isOpen:m,selectedItem:g,inputValue:v}}var Ao=0,To=1,No=2,Ro=3,Do=4,Mo=5,Lo=6,$o=7,Fo=8,Sa=9,jo=10,ud=11,dd=12,Uo=13,fd=14,hd=15,md=16,pd=17,gd=18,Bo=19,vd=20,bd=21,Ho=22,yd=Object.freeze({__proto__:null,InputKeyDownArrowDown:Ao,InputKeyDownArrowUp:To,InputKeyDownEscape:No,InputKeyDownHome:Ro,InputKeyDownEnd:Do,InputKeyDownPageUp:Mo,InputKeyDownPageDown:Lo,InputKeyDownEnter:$o,InputChange:Fo,InputBlur:Sa,InputFocus:jo,MenuMouseLeave:ud,ItemMouseMove:dd,ItemClick:Uo,ToggleButtonClick:fd,FunctionToggleMenu:hd,FunctionOpenMenu:md,FunctionCloseMenu:pd,FunctionSetHighlightedIndex:gd,FunctionSelectItem:Bo,FunctionSetInputValue:vd,FunctionReset:bd,ControlledPropUpdatedSelectedItem:Ho});function Bv(e){var t=Yu(e),n=t.selectedItem,r=t.inputValue;return r===""&&n&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(r=e.itemToString(n)),ie({},t,{inputValue:r})}x.exports.array.isRequired,x.exports.func,x.exports.func,x.exports.func,x.exports.func,x.exports.number,x.exports.number,x.exports.number,x.exports.bool,x.exports.bool,x.exports.bool,x.exports.any,x.exports.any,x.exports.any,x.exports.string,x.exports.string,x.exports.string,x.exports.string,x.exports.string,x.exports.string,x.exports.func,x.exports.string,x.exports.string,x.exports.func,x.exports.func,x.exports.func,x.exports.func,x.exports.func,x.exports.func,x.exports.shape({addEventListener:x.exports.func,removeEventListener:x.exports.func,document:x.exports.shape({getElementById:x.exports.func,activeElement:x.exports.any,body:x.exports.any})});function Hv(e,t,n){var r=Ie(),a=Gu(e,t,n),i=a[0],o=a[1];return X(function(){!Hu(n,"selectedItem")||(n.selectedItemChanged(r.current,n.selectedItem)&&o({type:Ho,inputValue:n.itemToString(n.selectedItem)}),r.current=i.selectedItem===r.current?n.selectedItem:i.selectedItem)},[i.selectedItem,n.selectedItem]),[va(i,n),o]}var Vv=ie({},Zn,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:wv});function Kv(e,t){var n,r=t.type,a=t.props,i=t.altKey,o;switch(r){case Uo:o={isOpen:Xe(a,"isOpen"),highlightedIndex:Xe(a,"highlightedIndex"),selectedItem:a.items[t.index],inputValue:a.itemToString(a.items[t.index])};break;case Ao:e.isOpen?o={highlightedIndex:Ut(1,e.highlightedIndex,a.items.length,t.getItemNodeFromIndex,!0)}:o={highlightedIndex:i&&e.selectedItem==null?-1:tn(a,e,1,t.getItemNodeFromIndex),isOpen:a.items.length>=0};break;case To:e.isOpen?i?o=ya(a,e.highlightedIndex):o={highlightedIndex:Ut(-1,e.highlightedIndex,a.items.length,t.getItemNodeFromIndex,!0)}:o={highlightedIndex:tn(a,e,-1,t.getItemNodeFromIndex),isOpen:a.items.length>=0};break;case $o:o=ya(a,e.highlightedIndex);break;case No:o=ie({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Mo:o={highlightedIndex:Ut(-10,e.highlightedIndex,a.items.length,t.getItemNodeFromIndex,!1)};break;case Lo:o={highlightedIndex:Ut(10,e.highlightedIndex,a.items.length,t.getItemNodeFromIndex,!1)};break;case Ro:o={highlightedIndex:on(1,0,a.items.length,t.getItemNodeFromIndex,!1)};break;case Do:o={highlightedIndex:on(-1,a.items.length-1,a.items.length,t.getItemNodeFromIndex,!1)};break;case Sa:o=ie({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((n=a.items)==null?void 0:n.length)&&t.selectItem&&{selectedItem:a.items[e.highlightedIndex],inputValue:a.itemToString(a.items[e.highlightedIndex])});break;case Fo:o={isOpen:!0,highlightedIndex:Xe(a,"highlightedIndex"),inputValue:t.inputValue};break;case jo:o={isOpen:!0,highlightedIndex:tn(a,e,0)};break;case Bo:o={selectedItem:t.selectedItem,inputValue:a.itemToString(t.selectedItem)};break;case Ho:o={inputValue:t.inputValue};break;default:return ed(e,t,yd)}return ie({},e,o)}var zv=["onMouseLeave","refKey","ref"],Wv=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],qv=["onClick","onPress","refKey","ref"],Gv=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];_d.stateChangeTypes=yd;function _d(e){e===void 0&&(e={});var t=ie({},Vv,e),n=t.initialIsOpen,r=t.defaultIsOpen,a=t.items,i=t.scrollIntoView,o=t.environment,s=t.getA11yStatusMessage,c=t.getA11ySelectionMessage,d=t.itemToString,u=Bv(t),f=Hv(Kv,u,t),m=f[0],p=f[1],g=m.isOpen,v=m.highlightedIndex,h=m.selectedItem,_=m.inputValue,w=Ie(null),y=Ie({}),O=Ie(null),E=Ie(null),T=Ie(!0),A=Wu(t),P=Ie(),z=bo({state:m,props:t}),te=ae(function(D){return y.current[A.getItemId(D)]},[A]);ba(s,[g,v,_,a],ie({isInitialMount:T.current,previousResultCount:P.current,items:a,environment:o,itemToString:d},m)),ba(c,[h],ie({isInitialMount:T.current,previousResultCount:P.current,items:a,environment:o,itemToString:d},m));var ce=Zu({menuElement:w.current,highlightedIndex:v,isOpen:g,itemRefs:y,scrollIntoView:i,getItemNodeFromIndex:te});Qu({isInitialMount:T.current,props:t,state:m}),X(function(){var D=n||r||g;D&&O.current&&O.current.focus()},[]),X(function(){T.current||(P.current=a.length)});var ne=Ju(g,[O,w,E],o,function(){p({type:Sa,selectItem:!1})}),Oe=Xu();X(function(){return T.current=!1,function(){T.current=!0}},[]),X(function(){var D;if(!g)y.current={};else if(((D=o.document)==null?void 0:D.activeElement)!==O.current){var L;O==null||(L=O.current)==null||L.focus()}},[g,o]);var ue=et(function(){return{ArrowDown:function(L){L.preventDefault(),p({type:Ao,altKey:L.altKey,getItemNodeFromIndex:te})},ArrowUp:function(L){L.preventDefault(),p({type:To,altKey:L.altKey,getItemNodeFromIndex:te})},Home:function(L){!z.current.state.isOpen||(L.preventDefault(),p({type:Ro,getItemNodeFromIndex:te}))},End:function(L){!z.current.state.isOpen||(L.preventDefault(),p({type:Do,getItemNodeFromIndex:te}))},Escape:function(L){var H=z.current.state;(H.isOpen||H.inputValue||H.selectedItem||H.highlightedIndex>-1)&&(L.preventDefault(),p({type:No}))},Enter:function(L){var H=z.current.state;!H.isOpen||L.which===229||(L.preventDefault(),p({type:$o,getItemNodeFromIndex:te}))},PageUp:function(L){z.current.state.isOpen&&(L.preventDefault(),p({type:Mo,getItemNodeFromIndex:te}))},PageDown:function(L){z.current.state.isOpen&&(L.preventDefault(),p({type:Lo,getItemNodeFromIndex:te}))}}},[p,z,te]),Z=ae(function(D){return ie({id:A.labelId,htmlFor:A.inputId},D)},[A]),Re=ae(function(D,L){var H,J=D===void 0?{}:D,_e=J.onMouseLeave,Ce=J.refKey,Ee=Ce===void 0?"ref":Ce,ve=J.ref,Te=jt(J,zv),Pe=L===void 0?{}:L;return Pe.suppressRefError,ie((H={},H[Ee]=Qt(ve,function(Ke){w.current=Ke}),H.id=A.menuId,H.role="listbox",H["aria-labelledby"]=Te&&Te["aria-label"]?void 0:""+A.labelId,H.onMouseLeave=qe(_e,function(){p({type:ud})}),H),Te)},[p,Oe,A]),De=ae(function(D){var L,H,J=D===void 0?{}:D,_e=J.item,Ce=J.index,Ee=J.refKey,ve=Ee===void 0?"ref":Ee,Te=J.ref,Pe=J.onMouseMove,Ke=J.onMouseDown,wt=J.onClick;J.onPress;var He=J.disabled,tt=jt(J,Wv),he=z.current,Ge=he.props,ze=he.state,nt=qu(_e,Ce,Ge.items,"Pass either item or index to getItemProps!"),We=nt[1],$n="onClick",Wt=wt,vt=function(){We!==ze.highlightedIndex&&(ce.current=!1,p({type:dd,index:We,disabled:He}))},b=function(){p({type:Uo,index:We})},S=function($){return $.preventDefault()};return ie((L={},L[ve]=Qt(Te,function(k){k&&(y.current[A.getItemId(We)]=k)}),L.disabled=He,L.role="option",L["aria-selected"]=""+(We===ze.highlightedIndex),L.id=A.getItemId(We),L),!He&&(H={},H[$n]=qe(Wt,b),H),{onMouseMove:qe(Pe,vt),onMouseDown:qe(Ke,S)},tt)},[p,z,ce,A]),B=ae(function(D){var L,H=D===void 0?{}:D,J=H.onClick;H.onPress;var _e=H.refKey,Ce=_e===void 0?"ref":_e,Ee=H.ref,ve=jt(H,qv),Te=z.current.state,Pe=function(){p({type:fd})};return ie((L={},L[Ce]=Qt(Ee,function(Ke){E.current=Ke}),L["aria-controls"]=A.menuId,L["aria-expanded"]=Te.isOpen,L.id=A.toggleButtonId,L.tabIndex=-1,L),!ve.disabled&&ie({},{onClick:qe(J,Pe)}),ve)},[p,z,A]),de=ae(function(D,L){var H,J=D===void 0?{}:D,_e=J.onKeyDown,Ce=J.onChange,Ee=J.onInput,ve=J.onFocus,Te=J.onBlur;J.onChangeText;var Pe=J.refKey,Ke=Pe===void 0?"ref":Pe,wt=J.ref,He=jt(J,Gv),tt=L===void 0?{}:L;tt.suppressRefError;var he=z.current.state,Ge=function(S){var k=Vu(S);k&&ue[k]&&ue[k](S)},ze=function(S){p({type:Fo,inputValue:S.target.value})},nt=function(S){he.isOpen&&!ne.current.isMouseDown&&p({type:Sa,selectItem:S.relatedTarget!==null})},We=function(){he.isOpen||p({type:jo})},$n="onChange",Wt={};if(!He.disabled){var vt;Wt=(vt={},vt[$n]=qe(Ce,Ee,ze),vt.onKeyDown=qe(_e,Ge),vt.onBlur=qe(Te,nt),vt.onFocus=qe(ve,We),vt)}return ie((H={},H[Ke]=Qt(wt,function(b){O.current=b}),H["aria-activedescendant"]=he.isOpen&&he.highlightedIndex>-1?A.getItemId(he.highlightedIndex):"",H["aria-autocomplete"]="list",H["aria-controls"]=A.menuId,H["aria-expanded"]=he.isOpen,H["aria-labelledby"]=He&&He["aria-label"]?void 0:""+A.labelId,H.autoComplete="off",H.id=A.inputId,H.role="combobox",H.value=he.inputValue,H),Wt,He)},[p,ue,z,ne,Oe,A]),fe=ae(function(){p({type:hd})},[p]),Ae=ae(function(){p({type:pd})},[p]),R=ae(function(){p({type:md})},[p]),I=ae(function(D){p({type:gd,highlightedIndex:D})},[p]),C=ae(function(D){p({type:Bo,selectedItem:D})},[p]),N=ae(function(D){p({type:vd,inputValue:D})},[p]),K=ae(function(){p({type:bd})},[p]);return{getItemProps:De,getLabelProps:Z,getMenuProps:Re,getInputProps:de,getToggleButtonProps:B,toggleMenu:fe,openMenu:R,closeMenu:Ae,setHighlightedIndex:I,setInputValue:N,selectItem:C,reset:K,highlightedIndex:v,isOpen:g,selectedItem:h,inputValue:_}}function Yv(e){var t=e.removedSelectedItem,n=e.itemToString;return n(t)+" has been removed."}x.exports.array,x.exports.array,x.exports.array,x.exports.func,x.exports.func,x.exports.func,x.exports.number,x.exports.number,x.exports.number,x.exports.func,x.exports.func,x.exports.string,x.exports.string,x.exports.shape({addEventListener:x.exports.func,removeEventListener:x.exports.func,document:x.exports.shape({getElementById:x.exports.func,activeElement:x.exports.any,body:x.exports.any})});Zn.itemToString,Zn.stateReducer,Zn.environment;var Vo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="fas",n="caret-up",r=320,a=512,i=[],o="f0d8",s="M182.6 137.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8H288c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z";e.definition={prefix:t,iconName:n,icon:[r,a,i,o,s]},e.faCaretUp=e.definition,e.prefix=t,e.iconName=n,e.width=r,e.height=a,e.ligatures=i,e.unicode=o,e.svgPathData=s,e.aliases=i})(Vo);var Ko={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="fas",n="caret-down",r=320,a=512,i=[],o="f0d7",s="M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z";e.definition={prefix:t,iconName:n,icon:[r,a,i,o,s]},e.faCaretDown=e.definition,e.prefix=t,e.iconName=n,e.width=r,e.height=a,e.ligatures=i,e.unicode=o,e.svgPathData=s,e.aliases=i})(Ko);function pl(e){return e?e.title:""}function Jv(e,t){return e.map(n=>{var r;return n.title.toLowerCase().includes(t.toLowerCase())||((r=n.description)==null?void 0:r.toLowerCase().includes(t.toLowerCase()))?n:null})}function zo(e){var d;const{isOpen:t,selectedItem:n,getToggleButtonProps:r,getLabelProps:a,getMenuProps:i,highlightedIndex:o,getItemProps:s,inputValue:c}=cd({items:e.items,defaultSelectedItem:e.defaultValue,itemToString:pl});return X(()=>{var u;(u=e.onSelectedItemChange)==null||u.call(e,n)},[n]),l("div",{class:"dialog-input-dropdown",children:[l("div",{className:"dialog-input-dropdown-dropdown",...r(),children:[l("label",{...a(),class:"dialog-input-dropdown-dropdown-text",children:n?pl(n):(d=e.selectText)!=null?d:"Select Item"}),l("span",{class:"dialog-input-dropdown-dropdown-icon",children:t?l(xe,{icon:Vo.faCaretUp}):l(xe,{icon:Ko.faCaretDown})})]}),l("ul",{className:`dialog-input-dropdown-dropdown-items ${!t&&"dialog-input-dropdown-dropdown-items__hidden"}`,...i(),children:t&&Jv(e.items,c).map((u,f)=>{var m;return u&&l("li",{className:`${o===f&&"dialog-input-dropdown-dropdown-item__highlighted"} ${n===u&&"dialog-input-dropdown-dropdown-item__selected"} dialog-input-dropdown-dropdown-item`,...s({item:u,index:f}),children:[l("span",{class:"dialog-input-dropdown-dropdown-item-name",children:u.title}),l("span",{className:"dialog-input-dropdown-dropdown-item-username",children:(m=u.description)!=null?m:""})]},`${u.value}${f}`)})})]})}function gl(e){return e.map(t=>({value:t.id,title:t.name}))}function Wo(e){var o,s,c;const t=pt(),[n,r]=pe.useState(gl(e.environment?[e.environment]:[])),a=e.environment?{value:e.environment.id,title:e.environment.name}:null;X(()=>{e.project&&V.collection("environment").getFullList(void 0,{filter:`project = "${e.project.id}"`}).then(d=>{r(gl(d))})},[e.project]);const i=d=>{d!==null&&t("./../"+d.value)};return l("div",{className:"navbar-links-breadcrumb",children:[e.team&&l(le,{children:l(Et,{class:"breadcrumb-page",to:`/dashboard/${e.team.id}`,children:e.team.name})}),e.project&&l(le,{children:[l("div",{class:"breadcrumb-spacer",children:">"}),l(Et,{class:"breadcrumb-page",to:`/dashboard/${(o=e.team)==null?void 0:o.id}/${e.project.id}`,children:e.project.name})]}),e.config&&l(le,{children:[l("div",{class:"breadcrumb-spacer",children:">"}),e.environment?l(Et,{class:"breadcrumb-page",to:`/dashboard/${(s=e.team)==null?void 0:s.id}/${(c=e.project)==null?void 0:c.id}/${e.config.id}/${e.environment.id}`,children:e.config.name}):l("p",{children:e.config.name})]}),e.environment&&l(le,{children:[l("div",{class:"breadcrumb-spacer",children:">"}),l(zo,{items:n,defaultValue:a,onSelectedItemChange:i})]})]})}var Tn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="fas",n="plus",r=448,a=512,i=[10133,61543,"add"],o="2b",s="M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z";e.definition={prefix:t,iconName:n,icon:[r,a,i,o,s]},e.faPlus=e.definition,e.prefix=t,e.iconName=n,e.width=r,e.height=a,e.ligatures=i,e.unicode=o,e.svgPathData=s,e.aliases=i})(Tn);function Xv(e){return l("div",{className:"dialog-overlay",onClick:e.onClick?e.onClick:()=>null,children:e.children})}function dt(e,t){const[n,r]=ee(!1);X(()=>{t!=null&&t.afterSetShowing&&t.afterSetShowing(n)},[n]);function a(i){i.target===i.currentTarget&&r(!1)}return[r,n?l(Xv,{onClick:a,children:e}):null]}function Pt(e){return l("div",{className:"dialog",children:e.children})}function ft(e){return l("div",{className:"dialog-header",children:e.children})}function ht(e){var t;return l("div",{className:`dialog-body ${(t=e.class)!=null?t:""}`,children:e.children})}function mt(e){return l("div",{className:"dialog-footer",children:e.children})}function vl(e){return e?e.username:""}function Zv(e,t){return e.map(n=>n.name.toLowerCase().includes(t.toLowerCase())||n.username.toLowerCase().includes(t.toLowerCase())?n:null)}function Qv(e){const{isOpen:t,selectedItem:n,getToggleButtonProps:r,getLabelProps:a,getInputProps:i,getMenuProps:o,highlightedIndex:s,getItemProps:c,inputValue:d,reset:u}=_d({items:e.users,itemToString:vl});return X(()=>{e.reset&&u()},[e.reset]),X(()=>{var f;(f=e.onSelectedUserChange)==null||f.call(e,n)},[n]),l("div",{class:"dialog-input-dropdown",children:[l("div",{className:"dialog-input-dropdown-dropdown",...r(),children:[t?l("input",{...i(),class:"dialog-input-dropdown-dropdown-input",placeholder:"Search Users"}):l("label",{...a(),class:"dialog-input-dropdown-dropdown-text",children:n?vl(n):"Select User"}),l("span",{class:"dialog-input-dropdown-dropdown-icon",children:t?l(xe,{icon:Vo.faCaretUp}):l(xe,{icon:Ko.faCaretDown})})]}),l("ul",{className:`dialog-input-dropdown-dropdown-items ${!t&&"dialog-input-dropdown-dropdown-items__hidden"}`,...o(),children:t&&Zv(e.users,d).map((f,m)=>{var p;return f&&l("li",{className:`${s===m&&"dialog-input-dropdown-dropdown-item__highlighted"} ${n===f&&"dialog-input-dropdown-dropdown-item__selected"} dialog-input-dropdown-dropdown-item`,...c({item:f,index:m}),children:[l("span",{class:"dialog-input-dropdown-dropdown-item-name",children:f.username}),l("span",{className:"dialog-input-dropdown-dropdown-item-username",children:(p=f.name)!=null?p:""})]},`${f.value}${m}`)})})]})}const bl=[{value:"viewers",title:"Viewer",description:"Can view all flags and values but can't edit anything."},{value:"editors",title:"Editor",description:"Can manage, create and delete all flags and values."},{value:"admins",title:"Admin",description:"Can manage, create and delete all projects, configs, environments, flags and values."}];function eb(){var Ae,R;const[e,t,n]=Dn(),[r,a]=ee(t),[i,o]=ee(""),[s,c]=ee(null),[d,u]=ee(bl[0]),[f,m]=ee(""),[p,g]=ee(""),[v,h]=ee(e),[_,w]=ee(!1),[y,O]=ee(""),[E,T]=ee(null),[A,P]=ee(""),z=pt();X(()=>{h(e)},[e]),X(()=>{a(t)},[t]);const[te,ce]=dt(l(Pt,{children:[l(ft,{children:l("h1",{class:"dialog-heading",children:["Delete ",y]})}),l(ht,{class:"dialog-form",children:l("p",{children:["Are you sure you want to remove the ",y," ",(Ae=E==null?void 0:E.username)!=null?Ae:E==null?void 0:E.name,"?"]})}),l(mt,{children:[l("button",{className:"dialog-action dialog-action__delete",onClick:()=>Re(),children:"Remove"}),l("button",{className:"dialog-action dialog-action__cancel",onClick:()=>te(!1),children:"Cancel"}),l("p",{class:"dialog-error",children:A})]})]}),{afterSetShowing:I=>{I||(O(""),T(null),P(""))}}),[ne,Oe]=dt(l(Pt,{children:[l(ft,{children:l("h1",{class:"dialog-heading",children:"Create Team"})}),l(ht,{class:"dialog-form",children:[l("label",{class:"dialog-input-label",children:"Project Name:"}),l("input",{class:"dialog-input",value:i,onChange:I=>o(I==null?void 0:I.currentTarget.value),type:"text",placeholder:"Project Name"})]}),l(mt,{children:[l("button",{className:"dialog-action dialog-action__save",onClick:()=>fe(),children:"Create"}),l("button",{className:"dialog-action dialog-action__cancel",onClick:()=>ne(!1),children:"Cancel"}),l("p",{class:"dialog-error",children:f})]})]}),{afterSetShowing:I=>{I||o("")}}),[ue,Z]=dt(l(Pt,{children:[l(ft,{children:l("h1",{class:"dialog-heading",children:"Add User"})}),l(ht,{class:"dialog-form",children:[l("label",{class:"dialog-input-label",children:"User:"}),l(Qv,{users:n,onSelectedUserChange:c,reset:_}),l("label",{class:"dialog-input-label",children:"Role:"}),l(zo,{items:bl,onSelectedItemChange:u,defaultValue:d})]}),l(mt,{children:[l("button",{className:"dialog-action dialog-action__save",onClick:()=>de(),children:"Add Member"}),l("button",{className:"dialog-action dialog-action__cancel",onClick:()=>ue(!1),children:"Cancel"}),l("p",{class:"dialog-error",children:p})]})]}),{afterSetShowing:I=>{I?w(!1):(c(null),w(!0))}}),Re=async()=>{E!==null&&y!==""&&(y==="project"&&V.collection("project").delete(E.id).then(()=>{a(r.filter(I=>I.id!==E.id)),te(!1)}).catch(I=>{P(I.message)}),y==="user"&&V.collection("team").update(v.id,{admins:v.admins.filter(I=>I!==E.id),editors:v.editors.filter(I=>I!==E.id),viewers:v.viewers.filter(I=>I!==E.id)}).then(()=>{h(I=>(I.admins=I.admins.filter(C=>C!==E.id),I.editors=I.editors.filter(C=>C!==E.id),I.viewers=I.viewers.filter(C=>C!==E.id),I.expand.admins&&(I.expand.admins=I.expand.admins.filter(C=>C.id!==E.id)),I.expand.editors&&(I.expand.editors=I.expand.editors.filter(C=>C.id!==E.id)),I.expand.viewers&&(I.expand.viewers=I.expand.viewers.filter(C=>C.id!==E.id)),I)),te(!1)}).catch(I=>{P(I.message)}))},De=(I,C)=>{I.stopPropagation(),O("user"),T(C),te(!0)},B=(I,C)=>{I.stopPropagation(),O("project"),T(C),te(!0)},de=()=>{if(s===null){g("Please select a user to add"),setTimeout(()=>g(""),5e3);return}if(d===null){g("Please select a role for the user"),setTimeout(()=>g(""),5e3);return}if(v.owner===s.id){g("User is already in the team"),setTimeout(()=>g(""),5e3);return}if(v.admins.includes(s.id)){g("User is already in the team"),setTimeout(()=>g(""),5e3);return}if(v.editors.includes(s.id)){g("User is already in the team"),setTimeout(()=>g(""),5e3);return}if(v.viewers.includes(s.id)){g("User is already in the team"),setTimeout(()=>g(""),5e3);return}V.collection("team").update(v.id,{[d.value]:[...v[d.value],s.id]}).then(()=>{const I=s.clone();h(C=>{let N=C.clone();return N[d.value].push(I.id),N.expand[d.value]&&N.expand[d.value].push(I),N}),ue(!1)}).catch(I=>{g("Error adding user to team: "+I),setTimeout(()=>g(""),5e3)})},fe=()=>{V.collection("project").create({name:i,team:v.id}).then(I=>{a([...r,I]),o(""),ne(!1)}).catch(I=>{m("Error creating project: "+I),setTimeout(()=>m(""),5e3)})};return l(le,{children:[l(kr,{children:l(Wo,{team:v})}),l(Qe,{pageName:"dashboard",children:[l(lr,{children:[l(cr,{children:"Projects"}),l(ur,{children:[r.map(I=>l(ut,{onClick:()=>z(`./${I.id}`),children:l(st,{children:[l(lt,{children:l(An,{value:I.name})}),l(ct,{children:I.name}),l(or,{children:l(sr,{onClick:C=>B(C,I),children:l(xe,{icon:an.faTrash})})})]})})),l(ut,{onClick:()=>ne(!0),children:l(st,{children:[l(lt,{children:l(xe,{icon:Tn.faPlus})}),l(ct,{children:"New Project"})]})})]})]}),v.owner===((R=V.authStore.model)==null?void 0:R.id)&&l(lr,{children:[l(cr,{children:"Members"}),l(ur,{children:[l(qr,{title:"Owner",expand:v.expand.owner,onUserDelete:De}),l(qr,{title:"Admin",expand:v.expand.admins,onUserDelete:De}),l(qr,{title:"Editor",expand:v.expand.editors,onUserDelete:De}),l(qr,{title:"Viewer",expand:v.expand.viewers,onUserDelete:De}),l(ut,{onClick:()=>ue(!0),children:l(st,{children:[l(lt,{children:l(xe,{icon:Tn.faPlus})}),l(ct,{children:"Add Member"})]})})]})]})]}),Oe,Z,ce]})}function tb({params:e}){return Promise.all([V.collection("team").getOne(e.team,{expand:"owner,admins,editors,viewers"}),V.collection("project").getFullList(void 0,{filter:`team = "${e.team}"`}),V.collection("users").getFullList()])}function nb(){const[e,t,n,r]=Dn(),a=pt(),[i,o]=ee([]),[s,c]=ee([]),[d,u]=ee(""),[f,m]=ee(""),[p,g]=ee(""),[v,h]=ee(""),[_,w]=ee(""),[y,O]=ee(null),[E,T]=ee("");X(()=>{o(n)},[n]),X(()=>{c(r)},[r]);const A=()=>{if(d.length===0){g("Error: Config name cannot be empty."),setTimeout(()=>g(""),5e3);return}V.collection("config").create({name:d,project:t.id}).then(B=>{o(de=>[...de,B]),ne(!1)}).catch(B=>{console.error(B),g("Error: Could not create config."),setTimeout(()=>g(""),5e3)})},P=()=>{if(f.length===0){h("Error: Environment name cannot be empty."),setTimeout(()=>h(""),5e3);return}V.collection("environment").create({name:f,project:t.id}).then(B=>{c(de=>[...de,B]),ue(!1)}).catch(B=>{console.error(B),h("Error: Could not create environment."),setTimeout(()=>h(""),5e3)})},[z,te]=dt(l(Pt,{children:[l(ft,{children:l("h1",{className:"dialog-heading",children:["Delete ",_]})}),l(ht,{class:"dialog-form",children:l("p",{children:["Are you sure you want to delete the ",_," ",y==null?void 0:y.name,"?"]})}),l(mt,{children:[l("button",{class:"dialog-action dialog-action__delete",onClick:()=>ce(),children:"Delete"}),l("button",{class:"dialog-action dialog-action__cancel",onClick:()=>z(!1),children:"Cancel"}),l("p",{className:"dialog-error",children:E})]})]}),{afterSetShowing:B=>{B||(w(""),O(null),T(""))}}),ce=()=>{if(y===null){T("Error: Could not delete object.");return}_==="config"?V.collection("config").delete(y==null?void 0:y.id).then(()=>{o(B=>B.filter(de=>de.id!==(y==null?void 0:y.id))),z(!1)}).catch(B=>{console.error(B),T("Error: Could not delete config."),setTimeout(()=>T(""),5e3)}):_==="environment"&&V.collection("environment").delete(y==null?void 0:y.id).then(()=>{c(B=>B.filter(de=>de.id!==(y==null?void 0:y.id))),z(!1)}).catch(B=>{console.error(B),T("Error: Could not delete environment."),setTimeout(()=>T(""),5e3)})},[ne,Oe]=dt(l(Pt,{children:[l(ft,{children:l("h1",{className:"dialog-heading",children:"Create Config"})}),l(ht,{class:"dialog-form",children:[l("label",{class:"dialog-input-label",children:"Config Name:"}),l("input",{type:"text",class:"dialog-input",value:d,placeholder:"Config Name",onInput:B=>u(B.currentTarget.value)})]}),l(mt,{children:[l("button",{class:"dialog-action dialog-action__save",onClick:()=>A(),children:"Create"}),l("button",{class:"dialog-action dialog-action__cancel",onClick:()=>ne(!1),children:"Cancel"}),l("p",{className:"dialog-error",children:p})]})]}),{afterSetShowing:B=>{B||(u(""),g(""))}}),[ue,Z]=dt(l(Pt,{children:[l(ft,{children:l("h1",{className:"dialog-heading",children:"Create Environment"})}),l(ht,{class:"dialog-form",children:[l("label",{class:"dialog-input-label",children:"Environment Name:"}),l("input",{type:"text",class:"dialog-input",value:f,placeholder:"Environment Name",onInput:B=>m(B.currentTarget.value)})]}),l(mt,{children:[l("button",{class:"dialog-action dialog-action__save",onClick:()=>P(),children:"Create"}),l("button",{class:"dialog-action dialog-action__cancel",onClick:()=>ue(!1),children:"Cancel"}),l("p",{className:"dialog-error",children:v})]})]}),{afterSetShowing:B=>{B||(m(""),h(""))}}),Re=(B,de)=>{B.stopPropagation(),w("config"),O(de),z(!0)},De=(B,de)=>{B.stopPropagation(),w("environment"),O(de),z(!0)};return l(le,{children:[l(kr,{children:l(Wo,{team:e,project:t})}),l(Qe,{pageName:"dashboard",children:[l(lr,{children:[l(cr,{children:"Environments"}),l(ur,{children:[s.map(B=>l(ut,{children:l(st,{children:[l(lt,{children:l(An,{value:B.name})}),l(ct,{children:B.name}),l(or,{children:l(sr,{onClick:de=>De(de,B),children:l(xe,{icon:an.faTrash})})})]})})),l(ut,{onClick:()=>ue(!0),children:l(st,{children:[l(lt,{children:l(xe,{icon:Tn.faPlus})}),l(ct,{children:"New Environment"})]})})]})]}),l(lr,{children:[l(cr,{children:"Configs"}),l(ur,{children:[i.map(B=>l(ut,{onClick:()=>s.length===0?a(`./${B.id}`):a(`./${B.id}/${s[0].id}`),children:l(st,{children:[l(lt,{children:l(An,{value:B.name})}),l(ct,{children:B.name}),l(or,{children:l(sr,{onClick:de=>Re(de,B),children:l(xe,{icon:an.faTrash})})})]})})),l(ut,{onClick:()=>ne(!0),children:l(st,{children:[l(lt,{children:l(xe,{icon:Tn.faPlus})}),l(ct,{children:"New Config"})]})})]})]})]}),Oe,Z,te]})}function rb({params:e}){return Promise.all([V.collection("team").getOne(e.team),V.collection("project").getOne(e.project,{}),V.collection("config").getFullList(void 0,{filter:`project = "${e.project}"`}),V.collection("environment").getFullList(void 0,{filter:`project = "${e.project}"`})])}const ab=[{value:"boolean",title:"Boolean",description:"True or false"},{value:"string",title:"String",description:"A string of text"},{value:"number",title:"Number",description:"A number"},{value:"json",title:"JSON",description:"A JSON object"},{value:"array",title:"Array",description:"A JSON array of values"}];function ib(e){switch(e){case"boolean":return"checkbox";case"string":return"text";case"number":return"number";case"json":return"text";case"array":return"text";default:return"text"}}var wd={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="fas",n="up-right-and-down-left-from-center",r=512,a=512,i=["expand-alt"],o="f424",s="M344 0H488c13.3 0 24 10.7 24 24V168c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87L327 41c-6.9-6.9-8.9-17.2-5.2-26.2S334.3 0 344 0zM168 512H24c-13.3 0-24-10.7-24-24V344c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39 87-87c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8z";e.definition={prefix:t,iconName:n,icon:[r,a,i,o,s]},e.faUpRightAndDownLeftFromCenter=e.definition,e.prefix=t,e.iconName=n,e.width=r,e.height=a,e.ligatures=i,e.unicode=o,e.svgPathData=s,e.aliases=i})(wd);function yl(e){return l("div",{className:"dialog dialog__wide",children:e.children})}function ob(e){const[t,n]=ee(null),{flag:r,originalValue:a,value:i,setValue:o,saveValue:s}=e;function c(y){let O=e.value.clone();O.value=y,o(O)}const[d,u]=dt(l(yl,{children:[l(ft,{children:l("h1",{className:"dialog-heading",children:["Update ",r.name," Value"]})}),l(ht,{children:l("textarea",{className:"dialog-input-large",value:i.value,onInput:y=>c(y.currentTarget.value)})}),l(mt,{children:l("button",{className:"dialog-action dialog-action__save",onClick:()=>d(!1),children:"Done"})})]})),[f,m]=dt(l(yl,{children:[l(ft,{children:l("h1",{className:"dialog-heading",children:["Delete ",r.name,"?"]})}),l(ht,{children:l("p",{children:["Are you sure you want to delete the flag ",r.name,"? This action cannot be undone."]})}),l(mt,{children:[l("button",{className:"dialog-action dialog-action__delete",onClick:y=>e.onDelete(y,r),children:"Delete"}),l("button",{className:"dialog-action dialog-action__cancel",onClick:()=>f(!1),children:"Cancel"})]})]})),p=ib(r.type);let g;function v(){s(i).then(y=>{n(y),setTimeout(()=>n(null),5e3)})}let h=l("button",{onClick:()=>d(!0),className:"setting-card-button",title:"Expand Editor",children:l(xe,{icon:wd.faUpRightAndDownLeftFromCenter})});switch(p){case"text":g=l("input",{type:p,value:i.value,class:"setting-card-value",onInput:y=>c(y.currentTarget.value)});break;case"number":g=l("input",{type:p,value:i.value,class:"setting-card-value",onInput:y=>c(y.currentTarget.value)}),h=null;break;case"checkbox":g=l("label",{className:"setting-card-value-switch",children:[l("input",{type:p,checked:i.value==="true",className:"setting-card-value",onClick:y=>c(y.currentTarget.checked?"true":"false")}),l("span",{className:"setting-card-value-slider"})]}),h=null;break}const _=y=>{y.preventDefault(),c(a.value)};function w(){return t===null?null:t[0]===1?l("p",{class:"setting-card-save-status-message",children:"Value saved successfully."}):t[0]===0?t[1].toString().startsWith("SyntaxError: JSON.parse")?l("p",{class:"setting-card-save-status-message",children:"JSON is not correctly formatted."}):l("p",{class:"setting-card-save-status-message",children:"Failed to save value."}):l("p",{class:"setting-card-save-status-message",children:t[1]})}return l("div",{class:"setting-card",children:[l("div",{class:"setting-card-header",children:[l("h3",{class:"setting-card-title",children:r.name}),l("p",{class:"setting-card-key",children:r.identifier})]}),l("div",{class:"setting-card-body",children:[g,h]}),l("div",{class:"setting-card-footer",children:[w(),l("button",{class:"setting-card-button",onClick:()=>f(!0),children:l(xe,{icon:an.faTrash})}),l("button",{class:"setting-card-button",onClick:_,disabled:a.value===i.value,children:"Reset"}),l("button",{class:"setting-card-button",onClick:v,disabled:a.value===i.value,children:"Save"})]}),u,m]})}function sb(){return l("div",{className:"dashboard-spacer"})}function lb(e){const[t,n]=ee("go"),r={go:`let configDN = new ConfigDN("${e.apiKey}");`,javascript:`let configDN = new ConfigDN("${e.apiKey}");`};return l("div",{className:"api-info",children:[l("h1",{className:"api-info-title",children:"Accessing this config"}),l("div",{className:"api-info-key",children:[l("p",{className:"api-info-section-title",children:["API Key (",e.config,", ",e.environment," Environment)"]}),l("p",{className:"api-info-box",children:e.apiKey})]}),l("h2",{className:"api-info-section-title",children:"Integrations"}),l("div",{className:"language-buttons",children:[l("button",{className:`language-button ${t==="go"?"selected":""}`,onClick:()=>n("go"),children:"Go"}),l("button",{className:`language-button ${t==="javascript"?"selected":""}`,onClick:()=>n("javascript"),children:"JavaScript"})]}),l("div",{className:"api-info-box",children:l("pre",{children:r[t]})})]})}function cb(e){return l("div",{className:"setting-buttons",children:e.children})}function oi(e){return l("button",{class:`setting-buttons-button button__${e.type.toLowerCase().replaceAll(" ","-")}`,onClick:e.onClick?e.onClick:()=>null,children:e.type})}function ub(e){return l("div",{className:"setting-cards",children:e.children})}const db=[..."abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~"],fb=[..."0123456789"],hb=[..."CDEHKMPRTUWXY012458"],mb=[..."!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"],pb=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"],gb=(e,t)=>e[t]+(e[t+1]<<8),vb=(e,t,n)=>{const r=t.length,a=Math.floor(65536/r)*r-1,i=2*Math.ceil(1.1*e);let o="",s=0;for(;sa)&&(o+=t[u%r],s++)}}return o},bb=new Set([void 0,"hex","base64","url-safe","numeric","distinguishable","ascii-printable","alphanumeric"]),yb=(e,t,n)=>({length:r,type:a,characters:i})=>{if(!(r>=0&&Number.isFinite(r)))throw new TypeError("Expected a `length` to be a non-negative finite number");if(a!==void 0&&i!==void 0)throw new TypeError("Expected either `type` or `characters`");if(i!==void 0&&typeof i!="string")throw new TypeError("Expected `characters` to be string");if(!bb.has(a))throw new TypeError(`Unknown type: ${a}`);if(a===void 0&&i===void 0&&(a="hex"),a==="hex"||a===void 0&&i===void 0)return t(Math.ceil(r*.5),"hex",r);if(a==="base64")return t(Math.ceil(r*.75),"base64",r);if(a==="url-safe")return e(r,db,n);if(a==="numeric")return e(r,fb,n);if(a==="distinguishable")return e(r,hb,n);if(a==="ascii-printable")return e(r,mb,n);if(a==="alphanumeric")return e(r,pb,n);if(i.length===0)throw new TypeError("Expected `characters` string length to be greater than or equal to 1");if(i.length>65536)throw new TypeError("Expected `characters` string length to be less or equal to 65536");return e(r,i,n)};function _b(e,t){return yb(vb,e,t)}const wb=e=>[...e].map(t=>t.toString(16).padStart(2,"0")).join(""),Sb=e=>btoa(String.fromCodePoint(...e)),_l=65536;function Sd(e){const t=new Uint8Array(e);for(let n=0;n{c(a)},[a]),X(()=>{const R=i.map(I=>{var N;const C=(N=a.find(K=>K.id===I.flag))==null?void 0:N.type;return I=I.clone(),I.value=wl(I.value,C),I});m(R.map(I=>I.clone())),g(R.map(I=>I.clone()))},[i,a]),X(()=>{u(o)},[o]);const z=()=>{if(v===""){P("Flag name cannot be blank"),setTimeout(()=>P(""),5e3);return}if(_===""){P("Flag identifier cannot be blank"),setTimeout(()=>P(""),5e3);return}if(E===null){P("Flag type cannot be blank"),setTimeout(()=>P(""),5e3);return}if(e===void 0){P("Environment not found"),setTimeout(()=>P(""),5e3);return}V.collection("flag").create({config:r.id,type:E.value,name:v,identifier:_}).then(R=>{V.collection("value").create({environment:e.id,flag:R.id,value:Mi(E.value)}).then(I=>{c(C=>[...C,R.clone()]),I.value=xa(I.value,E.value),g(C=>[...C,I.clone()]),m(C=>[...C,I.clone()]),te(!1)}).catch(I=>{console.error(I)})}).catch(R=>{console.error(R),P("An error occurred while creating the flag")})},[te,ce]=dt(l(Pt,{children:[l(ft,{children:l("h1",{className:"dialog-heading",children:"Create Flag"})}),l(ht,{class:"dialog-form",children:[l("label",{class:"dialog-input-label",children:"Flag Name:"}),l("input",{type:"text",class:"dialog-input",value:v,placeholder:"Flag Name",onInput:R=>{if(h(R.currentTarget.value),y){let I=R.currentTarget.value.replace(/^\w|[A-Z]|\b\w/g,function(C,N){return N===0?C.toLowerCase():C.toUpperCase()}).replace(/\W+/g,"");w(I)}}}),l("label",{class:"dialog-input-label",children:"Flag Identifier:"}),l("input",{type:"text",class:"dialog-input",value:_,placeholder:"Flag Identifier",onInput:R=>{O(!1),w(R.currentTarget.value)}}),l("label",{class:"dialog-input-label",children:"Flag Type:"}),l(zo,{selectText:"Select Type",items:ab,onSelectedItemChange:T})]}),l(mt,{children:[l("button",{class:"dialog-action dialog-action__save",onClick:()=>z(),children:"Create"}),l("button",{class:"dialog-action dialog-action__cancel",onClick:()=>te(!1),children:"Cancel"}),l("p",{className:"dialog-error",children:A})]})]}),{afterSetShowing:R=>{R||(h(""),w(""),T(null),O(!0),P(""))}});if(typeof e>"u")return l("div",{class:"content",children:[l("h1",{children:"No environments found!"}),l("p",{children:["Go back to the ",l(Et,{to:"../",children:"project page"})," to create a new environment."]})]});X(()=>{o.length===0&&typeof e<"u"&&V.collection("api_key").create({environment:e.id,config:r.id,name:`Default API Key For ${t.name}/${n.name}/${r.name}/${e.name}`,key:Ib({length:45,type:"alphanumeric"})}).then(R=>{u([R])}).catch(R=>{console.error(R)})},[o]),X(()=>{for(let R=0;RC.flag===I.id)===void 0&&V.collection("value").create({environment:e.id,flag:I.id,value:Mi(I.type)}).then(C=>{C.value=xa(C.value,I.type),g(N=>[...N,C.clone()]),m(N=>[...N,C.clone()])}).catch(C=>{console.error(C)})}},[a,i]);function ne(R){g(I=>I.map(C=>C.id===R.id?R:C))}const Oe=R=>{var I;return(I=p.find(C=>C.flag===R.id))!=null?I:xl(R.type)};function ue(R){var I;return(I=f.find(C=>C.flag===R.id))!=null?I:xl(R.type)}function Z(R){const I=JSON.parse(JSON.stringify(R));m(C=>C.map(N=>N.id===I.id?I:N))}function Re(R){var N;const I=(N=a.find(K=>K.id===R.flag))==null?void 0:N.type,C=R.clone();return C.value=wl(R.value,I),C}function De(R){var I;R.preventDefault();for(let C=0;CL.id===N.id),D=f[K];if(JSON.stringify(D.value)!==JSON.stringify(p[C].value)){const L=N.clone();L.value=Sl(N.value,(I=a.find(H=>H.id===N.flag))==null?void 0:I.type),V.collection("value").update(N.id,L),Z(N)}}}async function B(R){var C;const I=f.findIndex(N=>N.id===R.id);if(JSON.stringify(f[I].value)===JSON.stringify(R.value))return[-1,"Value is the same as the previous value"];try{const N=R.clone();N.value=Sl(R.value,(C=a.find(D=>D.id===R.flag))==null?void 0:C.type);const K=await V.collection("value").update(R.id,N);return Z(Re(K)),ne(Re(K)),[1,K]}catch(N){return[0,N]}}const de=(R,I)=>{R.stopPropagation(),V.collection("flag").delete(I.id).then(()=>{c(s.filter(C=>C.id!==I.id)),g(p.filter(C=>C.flag!==I.id)),m(f.filter(C=>C.flag!==I.id))})};function fe(){g(JSON.parse(JSON.stringify(f)))}return l(le,{children:[l(kr,{children:l(Wo,{team:t,project:n,environment:e,config:r})}),l(Qe,{pageName:"dashboard dashboard-config",children:[l(ub,{children:[l("h2",{children:"Flags"}),s.map(R=>l(ob,{flag:R,originalValue:ue(R),onDelete:de,value:Oe(R),saveValue:B,setValue:ne}))]}),l(cb,{children:[l(oi,{onClick:()=>te(!0),type:"New Flag"}),l(oi,{onClick:fe,type:"Reset All"}),l(oi,{onClick:De,type:"Save All"})]}),l(sb,{}),l(lb,{config:r.name,environment:e.name,apiKey:(Ae=d[0])==null?void 0:Ae.key})]}),ce]})}function Ob({params:e}){return e.environment?Promise.all([V.collection("environment").getOne(e.environment,{}),V.collection("team").getOne(e.team,{expand:"owner,admins,editors,viewers"}),V.collection("project").getOne(e.project,{}),V.collection("config").getOne(e.config,{}),V.collection("flag").getFullList(void 0,{filter:`config = "${e.config}"`}),V.collection("value").getFullList(void 0,{filter:`environment = "${e.environment}" && flag.config = "${e.config}"`}),V.collection("api_key").getFullList(void 0,{filter:`config = "${e.config}" && environment = "${e.environment}"`})]):Promise.all([V.collection("environment").getList(void 0,1,{filter:`project = "${e.project}"`}).then(t=>t.items[0]||void 0)])}const Eb="/assets/404.571aed3a.svg",Il="/assets/error.7cebe82a.svg";function Jr(){const e=mu();let t;if(e instanceof je)switch(e.status){case 404:t=l(Qe,{pageName:"dashboard dashboard-error",children:[l("img",{src:Eb,alt:"404"}),l("h1",{children:"404"}),l("p",{children:e.message})]});break;default:t=l(Qe,{pageName:"dashboard dashboard-error",children:[l("img",{src:Il,alt:"500"}),l("h1",{children:"500"}),l("p",{children:e.message})]});break}else t=l(Qe,{pageName:"dashboard dashboard-error",children:[l("img",{src:Il,alt:"500"}),l("h1",{children:"500"}),l("p",{children:e.message})]});return l(le,{children:[l(kr,{}),t]})}function Pb(){const[e]=Dn(),[t,n]=pe.useState([]),[r,a]=pe.useState(""),[i,o]=pe.useState(""),[s,c]=pe.useState(null),[d,u]=pe.useState(""),f=pt();X(()=>{n(e)},[e]);const m=()=>{var w,y;if(r.length===0){o("Error: Team name cannot be empty."),setTimeout(()=>o(""),5e3);return}V.collection("team").create({name:r,owner:[(y=(w=V.authStore)==null?void 0:w.model)==null?void 0:y.id]}).then(O=>{n([...t,O]),a(""),h(!1)}).catch(O=>{o("Error Creating Team: "+O.message),setTimeout(()=>o(""),5e3)})},p=()=>{s!==null&&V.collection("team").delete(s.id).then(()=>{n(w=>w.filter(y=>y.id!==s.id)),c(null),g(!1)}).catch(w=>{u("Error Deleting Team: "+w.message),setTimeout(()=>u(""),5e3)})},[g,v]=dt(l(Pt,{children:[l(ft,{children:l("h1",{class:"dialog-heading",children:"Delete Team"})}),l(ht,{class:"dialog-form",children:l("p",{children:["Are you sure you want to delete the team ",s==null?void 0:s.name,"? This is irreversible and will delete all associated configs, projects, environments and API Keys."]})}),l(mt,{children:[l("button",{className:"dialog-action dialog-action__delete",onClick:p,children:"Delete"}),l("button",{className:"dialog-action dialog-action__cancel",onClick:()=>g(!1),children:"Cancel"}),l("p",{class:"dialog-error",children:d})]})]}),{afterSetShowing:w=>{w||(c(null),u(""))}}),[h,_]=dt(l(Pt,{children:[l(ft,{children:l("h1",{class:"dialog-heading",children:"Create Team"})}),l(ht,{class:"dialog-form",children:[l("label",{class:"dialog-input-label",children:"Team Name:"}),l("input",{class:"dialog-input",value:r,onChange:w=>a(w==null?void 0:w.currentTarget.value),type:"text",placeholder:"Team Name"})]}),l(mt,{children:[l("button",{className:"dialog-action dialog-action__save",onClick:()=>m(),children:"Create"}),l("button",{className:"dialog-action dialog-action__cancel",onClick:()=>h(!1),children:"Cancel"}),l("p",{class:"dialog-error",children:i})]})]}),{afterSetShowing:w=>{w||a("")}});return l(le,{children:[l(kr,{}),l(Qe,{pageName:"dashboard",children:[l(lr,{children:[l(cr,{children:"Teams"}),l(ur,{children:[t.map(w=>{var y;return l(ut,{onClick:()=>f(`./${w.id}`),children:l(st,{children:[l(lt,{children:l(An,{value:w.name})}),l(ct,{children:w.name}),l(or,{children:w.owner===((y=V.authStore.model)==null?void 0:y.id)?l(sr,{onClick:O=>{O.stopPropagation(),c(w),g(!0)},children:l(xe,{icon:an.faTrash})}):null})]})},w.id)}),l(ut,{onClick:()=>h(!0),children:l(st,{children:[l(lt,{children:l(xe,{icon:Tn.faPlus})}),l(ct,{children:"New Team"})]})})]})]}),_,v]})]})}function Ab(){return Promise.all([V.collection("team").getFullList()])}function Tb(){const[e]=pu(),t=pt();return X(()=>{const n=e.get("code"),r=xu.get("provider"),a=location.origin+ye.OAUTH2_REDIRECT;r.state!==e.get("state")&&t(ye.LOGIN+"?error=Could not verify state, please try to login again."),n&&V.collection("users").authWithOAuth2(r.name,n,r.codeVerifier,a,{emailVisibility:!1}).then(async i=>{var o,s,c,d;V.collection("users").update(i.record.id,{name:(s=(o=i.meta)==null?void 0:o.name)!=null?s:"",username:(d=(c=i.meta)==null?void 0:c.username.replace(/\W/g,""))!=null?d:""}).catch(u=>console.error(u)),t(ye.DASHBOARD)}).catch(i=>t(ye.LOGIN+"?error="+i.message))},[]),l("div",{children:"Please wait while we log you in..."})}function Nb(){const[e,t]=pe.useState(""),[n,r]=pe.useState({}),[a,i]=pe.useState(""),[o,s]=pe.useState(!0);Ra(ye.DASHBOARD,!0);async function c(d){d.preventDefault(),s(!1);try{await V.collection("users").requestPasswordReset(e),r({}),i("If an account is associated with this email address, a password reset email has been sent.")}catch(u){if(console.log(u),u instanceof je){const f=u.data.message;r({form:f})}else u instanceof Error&&r({form:u.message})}s(!0)}return l(fr,{class:"auth-page",children:[l(hr,{logo:mr,children:l(pr,{children:l(xr,{})})}),l(Qe,{pageName:"auth-content",children:l("form",{class:"auth-form",onSubmit:c,children:[l("div",{class:"auth-form-header",children:l("p",{children:"Forgot Password?"})}),l("div",{class:"auth-form-body",children:l(Zt,{value:e,valueUpdate:t,name:"email",label:"Email",errors:n,type:"email",required:!0})}),l("div",{className:"auth-form-footer",children:[l("button",{class:"auth-form-submit-button",type:"submit",disabled:!o,children:"Send Password Reset"}),l("div",{className:"auth-form-submit-error",children:n.form?n.form:""}),l("div",{className:"auth-form-submit-success",children:a||""}),l("p",{className:"auth-form-text",children:["Remember your password? ",l(Et,{to:ye.LOGIN,class:"auth-form-link",children:"Login"})]}),l("p",{className:"auth-form-text",children:["Need an account? ",l(Et,{to:ye.REGISTER,class:"auth-form-link",children:"Register"})]})]})]})})]})}const Rb=Tp([{path:ye.HOME,errorElement:l(sl,{}),element:l($p,{})},{path:ye.LOGIN,element:l(Tg,{}),loader:Ng},{path:ye.REGISTER,element:l(Dg,{}),loader:Mg},{path:ye.FORGOT_PASSWORD,element:l(Nb,{})},{path:ye.OAUTH2_REDIRECT,element:l(Tb,{})},{path:ye.DASHBOARD,element:l($g,{}),children:[{path:"",element:l(Pb,{}),loader:Ab,errorElement:l(Jr,{})},{path:":team",element:l(eb,{}),loader:tb,errorElement:l(Jr,{})},{path:":team/:project",element:l(nb,{}),loader:rb,errorElement:l(Jr,{})},{path:":team/:project/:config",element:l(sl,{})},{path:":team/:project/:config/:environment",element:l(kb,{}),loader:Ob,errorElement:l(Jr,{})}]},{path:ye.LOGOUT,element:l(Fg,{})}]);Sn(l(_p,{router:Rb}),document.getElementById("app")); + */var Fa=60103,ja=60106,Or=60107,Er=60108,Pr=60114,Ar=60109,Tr=60110,Nr=60112,Rr=60113,po=60120,Dr=60115,Mr=60116,Lu=60121,$u=60122,Fu=60117,ju=60129,Uu=60131;if(typeof Symbol=="function"&&Symbol.for){var Be=Symbol.for;Fa=Be("react.element"),ja=Be("react.portal"),Or=Be("react.fragment"),Er=Be("react.strict_mode"),Pr=Be("react.profiler"),Ar=Be("react.provider"),Tr=Be("react.context"),Nr=Be("react.forward_ref"),Rr=Be("react.suspense"),po=Be("react.suspense_list"),Dr=Be("react.memo"),Mr=Be("react.lazy"),Lu=Be("react.block"),$u=Be("react.server.block"),Fu=Be("react.fundamental"),ju=Be("react.debug_trace_mode"),Uu=Be("react.legacy_hidden")}function gt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Fa:switch(e=e.type,e){case Or:case Pr:case Er:case Rr:case po:return e;default:switch(e=e&&e.$$typeof,e){case Tr:case Nr:case Mr:case Dr:case Ar:return e;default:return t}}case ja:return t}}}var ov=Ar,sv=Fa,lv=Nr,cv=Or,uv=Mr,dv=Dr,fv=ja,hv=Pr,mv=Er,pv=Rr;ge.ContextConsumer=Tr;ge.ContextProvider=ov;ge.Element=sv;ge.ForwardRef=lv;ge.Fragment=cv;ge.Lazy=uv;ge.Memo=dv;ge.Portal=fv;ge.Profiler=hv;ge.StrictMode=mv;ge.Suspense=pv;ge.isAsyncMode=function(){return!1};ge.isConcurrentMode=function(){return!1};ge.isContextConsumer=function(e){return gt(e)===Tr};ge.isContextProvider=function(e){return gt(e)===Ar};ge.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fa};ge.isForwardRef=function(e){return gt(e)===Nr};ge.isFragment=function(e){return gt(e)===Or};ge.isLazy=function(e){return gt(e)===Mr};ge.isMemo=function(e){return gt(e)===Dr};ge.isPortal=function(e){return gt(e)===ja};ge.isProfiler=function(e){return gt(e)===Pr};ge.isStrictMode=function(e){return gt(e)===Er};ge.isSuspense=function(e){return gt(e)===Rr};ge.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Or||e===Pr||e===ju||e===Er||e===Rr||e===po||e===Uu||typeof e=="object"&&e!==null&&(e.$$typeof===Mr||e.$$typeof===Dr||e.$$typeof===Ar||e.$$typeof===Tr||e.$$typeof===Nr||e.$$typeof===Fu||e.$$typeof===Lu||e[0]===$u)};ge.typeOf=gt;(function(e){e.exports=ge})(iv);let dl=e=>typeof e=="object"&&e!=null&&e.nodeType===1,fl=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",ii=(e,t)=>{if(e.clientHeight{let a=(i=>{if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!a&&(a.clientHeightit||i>e&&o=t&&s>=n?i-e-r:o>t&&sn?o-t+a:0,gv=e=>{let t=e.parentElement;return t==null?e.getRootNode().host||null:t};var vv=(e,t)=>{var n,r,a,i,o,s;if(typeof document>"u")return[];let{scrollMode:c,block:d,inline:u,boundary:f,skipOverflowHiddenElements:m}=t,p=typeof f=="function"?f:ue=>ue!==f;if(!dl(e))throw new TypeError("Invalid target");let g=document.scrollingElement||document.documentElement,v=[],h=e;for(;dl(h)&&p(h);){if(h=gv(h),h===g){v.push(h);break}h!=null&&h===document.body&&ii(h)&&!ii(document.documentElement)||h!=null&&ii(h,m)&&v.push(h)}let _=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,w=(i=(a=window.visualViewport)==null?void 0:a.height)!=null?i:innerHeight,y=(o=window.scrollX)!=null?o:pageXOffset,O=(s=window.scrollY)!=null?s:pageYOffset,{height:E,width:T,top:A,right:P,bottom:z,left:te}=e.getBoundingClientRect(),ce=d==="start"||d==="nearest"?A:d==="end"?z:A+E/2,ne=u==="center"?te+T/2:u==="end"?P:te,Oe=[];for(let ue=0;ue=0&&te>=0&&z<=w&&P<=_&&A>=B&&z<=fe&&te>=Ae&&P<=de)return Oe;let R=getComputedStyle(Z),I=parseInt(R.borderLeftWidth,10),C=parseInt(R.borderTopWidth,10),N=parseInt(R.borderRightWidth,10),K=parseInt(R.borderBottomWidth,10),D=0,L=0,H="offsetWidth"in Z?Z.offsetWidth-Z.clientWidth-I-N:0,J="offsetHeight"in Z?Z.offsetHeight-Z.clientHeight-C-K:0,_e="offsetWidth"in Z?Z.offsetWidth===0?0:De/Z.offsetWidth:0,Ce="offsetHeight"in Z?Z.offsetHeight===0?0:Re/Z.offsetHeight:0;if(g===Z)D=d==="start"?ce:d==="end"?ce-w:d==="nearest"?Gr(O,O+w,w,C,K,O+ce,O+ce+E,E):ce-w/2,L=u==="start"?ne:u==="center"?ne-_/2:u==="end"?ne-_:Gr(y,y+_,_,I,N,y+ne,y+ne+T,T),D=Math.max(0,D+O),L=Math.max(0,L+y);else{D=d==="start"?ce-B-C:d==="end"?ce-fe+K+J:d==="nearest"?Gr(B,fe,Re,C,K+J,ce,ce+E,E):ce-(B+Re/2)+J/2,L=u==="start"?ne-Ae-I:u==="center"?ne-(Ae+De/2)+H/2:u==="end"?ne-de+N+H:Gr(Ae,de,De,I,N+H,ne,ne+T,T);let{scrollLeft:Ee,scrollTop:ve}=Z;D=Math.max(0,Math.min(ve+D/Ce,Z.scrollHeight-Re/Ce+J)),L=Math.max(0,Math.min(Ee+L/_e,Z.scrollWidth-De/_e+H)),ce+=ve-D,ne+=Ee-L}Oe.push({el:Z,top:D,left:L})}return Oe},ga=function(){return ga=Object.assign||function(t){for(var n,r=1,a=arguments.length;r1?a-1:0),o=1;o=37&&n<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function Ut(e,t,n,r,a){if(a===void 0&&(a=!0),n===0)return-1;var i=n-1;(typeof t!="number"||t<0||t>=n)&&(t=e>0?-1:i+1);var o=t+e;o<0?o=a?i:0:o>i&&(o=a?0:i);var s=on(e,o,n,r,a);return s===-1?t>=n?-1:t:s}function on(e,t,n,r,a){var i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(var o=t+1;o=0;s--)if(!r(s).hasAttribute("disabled"))return s;return a?e>0?on(1,0,n,r,!1):on(-1,n-1,n,r,!1):-1}function ml(e,t,n,r){return r===void 0&&(r=!0),t.some(function(a){return a&&(hl(a,e,n)||r&&hl(a,n.document.activeElement,n))})}var Sv=go(function(e){Ku(e).textContent=""},500);function xv(e,t){var n=Ku(t);!e||(n.textContent=e,Sv(t))}function Ku(e){e===void 0&&(e=document);var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var Iv=["isInitialMount","highlightedIndex","items","environment"],zu={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function Cv(e,t,n){var r=e.props,a=e.type,i={};Object.keys(t).forEach(function(o){kv(o,e,t,n),n[o]!==t[o]&&(i[o]=n[o])}),r.onStateChange&&Object.keys(i).length&&r.onStateChange(ie({type:a},i))}function kv(e,t,n,r){var a=t.props,i=t.type,o="on"+vo(e)+"Change";a[o]&&r[e]!==void 0&&r[e]!==n[e]&&a[o](ie({type:i},r))}function Ov(e,t){return t.changes}function Ev(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}var Pv=go(function(e,t){xv(e(),t)},200),Av=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Rn:X;function Wu(e){var t=e.id,n=t===void 0?"downshift-"+_v():t,r=e.labelId,a=e.menuId,i=e.getItemId,o=e.toggleButtonId,s=e.inputId,c=Ie({labelId:r||n+"-label",menuId:a||n+"-menu",getItemId:i||function(d){return n+"-item-"+d},toggleButtonId:o||n+"-toggle-button",inputId:s||n+"-input"});return c.current}function qu(e,t,n,r){var a,i;if(e===void 0){if(t===void 0)throw new Error(r);a=n[t],i=t}else i=t===void 0?n.indexOf(e):t,a=e;return[a,i]}function Tv(e){return e?String(e):""}function Nv(e){return/^\S{1}$/.test(e)}function vo(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function bo(e){var t=Ie(e);return t.current=e,t}function Gu(e,t,n){var r=Ie(),a=Ie(),i=ae(function(m,p){a.current=p,m=va(m,p.props);var g=e(m,p),v=p.props.stateReducer(m,ie({},p,{changes:g}));return v},[e]),o=Ea(i,t),s=o[0],c=o[1],d=bo(n),u=ae(function(m){return c(ie({props:d.current},m))},[d]),f=a.current;return X(function(){f&&r.current&&r.current!==s&&Cv(f,va(r.current,f.props),s),r.current=s},[s,n,f]),[s,u]}function Rv(e,t,n){var r=Gu(e,t,n),a=r[0],i=r[1];return[va(a,n),i]}var Zn={itemToString:Tv,stateReducer:Ov,getA11ySelectionMessage:Ev,scrollIntoView:yv,environment:typeof window>"u"?{}:window};function Xe(e,t,n){n===void 0&&(n=zu);var r=e["default"+vo(t)];return r!==void 0?r:n[t]}function Yr(e,t,n){n===void 0&&(n=zu);var r=e[t];if(r!==void 0)return r;var a=e["initial"+vo(t)];return a!==void 0?a:Xe(e,t,n)}function Yu(e){var t=Yr(e,"selectedItem"),n=Yr(e,"isOpen"),r=Yr(e,"highlightedIndex"),a=Yr(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:a}}function tn(e,t,n){var r=e.items,a=e.initialHighlightedIndex,i=e.defaultHighlightedIndex,o=t.selectedItem,s=t.highlightedIndex;return r.length===0?-1:a!==void 0&&s===a?a:i!==void 0?i:o?r.indexOf(o):n===0?-1:n<0?r.length-1:0}function Ju(e,t,n,r){var a=Ie({isMouseDown:!1,isTouchMove:!1});return X(function(){if((n==null?void 0:n.addEventListener)!=null){var i=function(){a.current.isMouseDown=!0},o=function(f){a.current.isMouseDown=!1,e&&!ml(f.target,t.map(function(m){return m.current}),n)&&r()},s=function(){a.current.isTouchMove=!1},c=function(){a.current.isTouchMove=!0},d=function(f){e&&!a.current.isTouchMove&&!ml(f.target,t.map(function(m){return m.current}),n,!1)&&r()};return n.addEventListener("mousedown",i),n.addEventListener("mouseup",o),n.addEventListener("touchstart",s),n.addEventListener("touchmove",c),n.addEventListener("touchend",d),function(){n.removeEventListener("mousedown",i),n.removeEventListener("mouseup",o),n.removeEventListener("touchstart",s),n.removeEventListener("touchmove",c),n.removeEventListener("touchend",d)}}},[e,n]),a}var Xu=function(){return Bu};function ba(e,t,n){var r=n.isInitialMount,a=n.highlightedIndex,i=n.items,o=n.environment,s=jt(n,Iv);X(function(){r||Pv(function(){return e(ie({highlightedIndex:a,highlightedItem:i[a],resultCount:i.length},s))},o.document)},t)}function Zu(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,a=e.getItemNodeFromIndex,i=e.menuElement,o=e.scrollIntoView,s=Ie(!0);return Av(function(){t<0||!n||!Object.keys(r.current).length||(s.current===!1?s.current=!0:o(a(t),i))},[t]),s}var Qu=Bu;function ya(e,t,n){var r;n===void 0&&(n=!0);var a=((r=e.items)==null?void 0:r.length)&&t>=0;return ie({isOpen:!1,highlightedIndex:-1},a&&ie({selectedItem:e.items[t],isOpen:Xe(e,"isOpen"),highlightedIndex:Xe(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}function ed(e,t,n){var r=t.type,a=t.props,i;switch(r){case n.ItemMouseMove:i={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:i={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:i={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:tn(a,e,0)};break;case n.FunctionOpenMenu:i={isOpen:!0,highlightedIndex:tn(a,e,0)};break;case n.FunctionCloseMenu:i={isOpen:!1};break;case n.FunctionSetHighlightedIndex:i={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:i={inputValue:t.inputValue};break;case n.FunctionReset:i={highlightedIndex:Xe(a,"highlightedIndex"),isOpen:Xe(a,"isOpen"),selectedItem:Xe(a,"selectedItem"),inputValue:Xe(a,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return ie({},e,i)}function Dv(e){for(var t=e.keysSoFar,n=e.highlightedIndex,r=e.items,a=e.itemToString,i=e.getItemNodeFromIndex,o=t.toLowerCase(),s=0;s=0&&((n=a.items)==null?void 0:n.length)&&{selectedItem:a.items[e.highlightedIndex]});break;case Po:o={selectedItem:t.selectedItem};break;default:return ed(e,t,ld)}return ie({},e,o)}var Fv=["onMouseLeave","refKey","onKeyDown","onBlur","ref"],jv=["onBlur","onClick","onPress","onKeyDown","refKey","ref"],Uv=["item","index","onMouseMove","onClick","onPress","refKey","ref","disabled"];cd.stateChangeTypes=ld;function cd(e){e===void 0&&(e={});var t=ie({},Lv,e),n=t.items,r=t.scrollIntoView,a=t.environment,i=t.itemToString,o=t.getA11ySelectionMessage,s=t.getA11yStatusMessage,c=Yu(t),d=Rv($v,c,t),u=d[0],f=d[1],m=u.isOpen,p=u.highlightedIndex,g=u.selectedItem,v=u.inputValue,h=Ie(null),_=Ie(null),w=Ie({}),y=Ie(null),O=Wu(t),E=Ie(),T=Ie(!0),A=bo({state:u,props:t}),P=ae(function(C){return w.current[O.getItemId(C)]},[O]);ba(s,[m,p,v,n],ie({isInitialMount:T.current,previousResultCount:E.current,items:n,environment:a,itemToString:i},u)),ba(o,[g],ie({isInitialMount:T.current,previousResultCount:E.current,items:n,environment:a,itemToString:i},u));var z=Zu({menuElement:_.current,highlightedIndex:p,isOpen:m,itemRefs:w,scrollIntoView:r,getItemNodeFromIndex:P});X(function(){return y.current=go(function(C){C({type:Di,inputValue:""})},500),function(){y.current.cancel()}},[]),X(function(){!v||y.current(f)},[f,v]),Qu({isInitialMount:T.current,props:t,state:u}),X(function(){T.current||(E.current=n.length)});var te=Ju(m,[_,h],a,function(){f({type:wa})}),ce=Xu();X(function(){return T.current=!1,function(){T.current=!0}},[]),X(function(){m||(w.current={})},[m]);var ne=et(function(){return{ArrowDown:function(N){N.preventDefault(),f({type:yo,getItemNodeFromIndex:P,altKey:N.altKey})},ArrowUp:function(N){N.preventDefault(),f({type:_o,getItemNodeFromIndex:P,altKey:N.altKey})},Home:function(N){N.preventDefault(),f({type:So,getItemNodeFromIndex:P})},End:function(N){N.preventDefault(),f({type:xo,getItemNodeFromIndex:P})},Escape:function(){A.current.state.isOpen&&f({type:wo})},Enter:function(N){N.preventDefault(),f({type:A.current.state.isOpen?Io:ta})},PageUp:function(N){A.current.state.isOpen&&(N.preventDefault(),f({type:ko,getItemNodeFromIndex:P}))},PageDown:function(N){A.current.state.isOpen&&(N.preventDefault(),f({type:Oo,getItemNodeFromIndex:P}))}," ":function(N){N.preventDefault();var K=A.current.state;if(!K.isOpen){f({type:ta});return}K.inputValue?f({type:_a,key:" ",getItemNodeFromIndex:P}):f({type:Co})}}},[f,P,A]),Oe=ae(function(){f({type:rd})},[f]),ue=ae(function(){f({type:id})},[f]),Z=ae(function(){f({type:ad})},[f]),Re=ae(function(C){f({type:od,highlightedIndex:C})},[f]),De=ae(function(C){f({type:Po,selectedItem:C})},[f]),B=ae(function(){f({type:sd})},[f]),de=ae(function(C){f({type:Di,inputValue:C})},[f]),fe=ae(function(C){return ie({id:O.labelId,htmlFor:O.toggleButtonId},C)},[O]),Ae=ae(function(C,N){var K,D=C===void 0?{}:C,L=D.onMouseLeave,H=D.refKey,J=H===void 0?"ref":H;D.onKeyDown,D.onBlur;var _e=D.ref,Ce=jt(D,Fv),Ee=N===void 0?{}:N;Ee.suppressRefError;var ve=function(){f({type:td})};return ie((K={},K[J]=Qt(_e,function(Te){_.current=Te}),K.id=O.menuId,K.role="listbox",K["aria-labelledby"]=Ce&&Ce["aria-label"]?void 0:""+O.labelId,K.onMouseLeave=qe(L,ve),K),Ce)},[f,ce,O]),R=ae(function(C,N){var K,D=C===void 0?{}:C,L=D.onBlur,H=D.onClick;D.onPress;var J=D.onKeyDown,_e=D.refKey,Ce=_e===void 0?"ref":_e,Ee=D.ref,ve=jt(D,jv),Te=N===void 0?{}:N;Te.suppressRefError;var Pe=A.current.state,Ke=function(){f({type:ta})},wt=function(){Pe.isOpen&&!te.current.isMouseDown&&f({type:wa})},He=function(Ge){var ze=Vu(Ge);ze&&ne[ze]?ne[ze](Ge):Nv(ze)&&f({type:_a,key:ze,getItemNodeFromIndex:P})},tt=ie((K={},K[Ce]=Qt(Ee,function(he){h.current=he}),K["aria-activedescendant"]=Pe.isOpen&&Pe.highlightedIndex>-1?O.getItemId(Pe.highlightedIndex):"",K["aria-controls"]=O.menuId,K["aria-expanded"]=A.current.state.isOpen,K["aria-haspopup"]="listbox",K["aria-labelledby"]=ve&&ve["aria-label"]?void 0:""+O.labelId,K.id=O.toggleButtonId,K.role="combobox",K.tabIndex=0,K.onBlur=qe(L,wt),K),ve);return ve.disabled||(tt.onClick=qe(H,Ke),tt.onKeyDown=qe(J,He)),tt},[A,O,ce,f,te,ne,P]),I=ae(function(C){var N,K=C===void 0?{}:C,D=K.item,L=K.index,H=K.onMouseMove,J=K.onClick;K.onPress;var _e=K.refKey,Ce=_e===void 0?"ref":_e,Ee=K.ref,ve=K.disabled,Te=jt(K,Uv),Pe=A.current,Ke=Pe.state,wt=Pe.props,He=qu(D,L,wt.items,"Pass either item or index to getItemProps!"),tt=He[0],he=He[1],Ge=function(){he!==Ke.highlightedIndex&&(z.current=!1,f({type:nd,index:he,disabled:ve}))},ze=function(){f({type:Eo,index:he})},nt=ie((N={disabled:ve,role:"option","aria-selected":""+(tt===g),id:O.getItemId(he)},N[Ce]=Qt(Ee,function(We){We&&(w.current[O.getItemId(he)]=We)}),N),Te);return ve||(nt.onClick=qe(J,ze)),nt.onMouseMove=qe(H,Ge),nt},[A,g,O,z,f]);return{getToggleButtonProps:R,getLabelProps:fe,getMenuProps:Ae,getItemProps:I,toggleMenu:Oe,openMenu:Z,closeMenu:ue,setHighlightedIndex:Re,selectItem:De,reset:B,setInputValue:de,highlightedIndex:p,isOpen:m,selectedItem:g,inputValue:v}}var Ao=0,To=1,No=2,Ro=3,Do=4,Mo=5,Lo=6,$o=7,Fo=8,Sa=9,jo=10,ud=11,dd=12,Uo=13,fd=14,hd=15,md=16,pd=17,gd=18,Bo=19,vd=20,bd=21,Ho=22,yd=Object.freeze({__proto__:null,InputKeyDownArrowDown:Ao,InputKeyDownArrowUp:To,InputKeyDownEscape:No,InputKeyDownHome:Ro,InputKeyDownEnd:Do,InputKeyDownPageUp:Mo,InputKeyDownPageDown:Lo,InputKeyDownEnter:$o,InputChange:Fo,InputBlur:Sa,InputFocus:jo,MenuMouseLeave:ud,ItemMouseMove:dd,ItemClick:Uo,ToggleButtonClick:fd,FunctionToggleMenu:hd,FunctionOpenMenu:md,FunctionCloseMenu:pd,FunctionSetHighlightedIndex:gd,FunctionSelectItem:Bo,FunctionSetInputValue:vd,FunctionReset:bd,ControlledPropUpdatedSelectedItem:Ho});function Bv(e){var t=Yu(e),n=t.selectedItem,r=t.inputValue;return r===""&&n&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(r=e.itemToString(n)),ie({},t,{inputValue:r})}x.exports.array.isRequired,x.exports.func,x.exports.func,x.exports.func,x.exports.func,x.exports.number,x.exports.number,x.exports.number,x.exports.bool,x.exports.bool,x.exports.bool,x.exports.any,x.exports.any,x.exports.any,x.exports.string,x.exports.string,x.exports.string,x.exports.string,x.exports.string,x.exports.string,x.exports.func,x.exports.string,x.exports.string,x.exports.func,x.exports.func,x.exports.func,x.exports.func,x.exports.func,x.exports.func,x.exports.shape({addEventListener:x.exports.func,removeEventListener:x.exports.func,document:x.exports.shape({getElementById:x.exports.func,activeElement:x.exports.any,body:x.exports.any})});function Hv(e,t,n){var r=Ie(),a=Gu(e,t,n),i=a[0],o=a[1];return X(function(){!Hu(n,"selectedItem")||(n.selectedItemChanged(r.current,n.selectedItem)&&o({type:Ho,inputValue:n.itemToString(n.selectedItem)}),r.current=i.selectedItem===r.current?n.selectedItem:i.selectedItem)},[i.selectedItem,n.selectedItem]),[va(i,n),o]}var Vv=ie({},Zn,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:wv});function Kv(e,t){var n,r=t.type,a=t.props,i=t.altKey,o;switch(r){case Uo:o={isOpen:Xe(a,"isOpen"),highlightedIndex:Xe(a,"highlightedIndex"),selectedItem:a.items[t.index],inputValue:a.itemToString(a.items[t.index])};break;case Ao:e.isOpen?o={highlightedIndex:Ut(1,e.highlightedIndex,a.items.length,t.getItemNodeFromIndex,!0)}:o={highlightedIndex:i&&e.selectedItem==null?-1:tn(a,e,1,t.getItemNodeFromIndex),isOpen:a.items.length>=0};break;case To:e.isOpen?i?o=ya(a,e.highlightedIndex):o={highlightedIndex:Ut(-1,e.highlightedIndex,a.items.length,t.getItemNodeFromIndex,!0)}:o={highlightedIndex:tn(a,e,-1,t.getItemNodeFromIndex),isOpen:a.items.length>=0};break;case $o:o=ya(a,e.highlightedIndex);break;case No:o=ie({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Mo:o={highlightedIndex:Ut(-10,e.highlightedIndex,a.items.length,t.getItemNodeFromIndex,!1)};break;case Lo:o={highlightedIndex:Ut(10,e.highlightedIndex,a.items.length,t.getItemNodeFromIndex,!1)};break;case Ro:o={highlightedIndex:on(1,0,a.items.length,t.getItemNodeFromIndex,!1)};break;case Do:o={highlightedIndex:on(-1,a.items.length-1,a.items.length,t.getItemNodeFromIndex,!1)};break;case Sa:o=ie({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((n=a.items)==null?void 0:n.length)&&t.selectItem&&{selectedItem:a.items[e.highlightedIndex],inputValue:a.itemToString(a.items[e.highlightedIndex])});break;case Fo:o={isOpen:!0,highlightedIndex:Xe(a,"highlightedIndex"),inputValue:t.inputValue};break;case jo:o={isOpen:!0,highlightedIndex:tn(a,e,0)};break;case Bo:o={selectedItem:t.selectedItem,inputValue:a.itemToString(t.selectedItem)};break;case Ho:o={inputValue:t.inputValue};break;default:return ed(e,t,yd)}return ie({},e,o)}var zv=["onMouseLeave","refKey","ref"],Wv=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],qv=["onClick","onPress","refKey","ref"],Gv=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];_d.stateChangeTypes=yd;function _d(e){e===void 0&&(e={});var t=ie({},Vv,e),n=t.initialIsOpen,r=t.defaultIsOpen,a=t.items,i=t.scrollIntoView,o=t.environment,s=t.getA11yStatusMessage,c=t.getA11ySelectionMessage,d=t.itemToString,u=Bv(t),f=Hv(Kv,u,t),m=f[0],p=f[1],g=m.isOpen,v=m.highlightedIndex,h=m.selectedItem,_=m.inputValue,w=Ie(null),y=Ie({}),O=Ie(null),E=Ie(null),T=Ie(!0),A=Wu(t),P=Ie(),z=bo({state:m,props:t}),te=ae(function(D){return y.current[A.getItemId(D)]},[A]);ba(s,[g,v,_,a],ie({isInitialMount:T.current,previousResultCount:P.current,items:a,environment:o,itemToString:d},m)),ba(c,[h],ie({isInitialMount:T.current,previousResultCount:P.current,items:a,environment:o,itemToString:d},m));var ce=Zu({menuElement:w.current,highlightedIndex:v,isOpen:g,itemRefs:y,scrollIntoView:i,getItemNodeFromIndex:te});Qu({isInitialMount:T.current,props:t,state:m}),X(function(){var D=n||r||g;D&&O.current&&O.current.focus()},[]),X(function(){T.current||(P.current=a.length)});var ne=Ju(g,[O,w,E],o,function(){p({type:Sa,selectItem:!1})}),Oe=Xu();X(function(){return T.current=!1,function(){T.current=!0}},[]),X(function(){var D;if(!g)y.current={};else if(((D=o.document)==null?void 0:D.activeElement)!==O.current){var L;O==null||(L=O.current)==null||L.focus()}},[g,o]);var ue=et(function(){return{ArrowDown:function(L){L.preventDefault(),p({type:Ao,altKey:L.altKey,getItemNodeFromIndex:te})},ArrowUp:function(L){L.preventDefault(),p({type:To,altKey:L.altKey,getItemNodeFromIndex:te})},Home:function(L){!z.current.state.isOpen||(L.preventDefault(),p({type:Ro,getItemNodeFromIndex:te}))},End:function(L){!z.current.state.isOpen||(L.preventDefault(),p({type:Do,getItemNodeFromIndex:te}))},Escape:function(L){var H=z.current.state;(H.isOpen||H.inputValue||H.selectedItem||H.highlightedIndex>-1)&&(L.preventDefault(),p({type:No}))},Enter:function(L){var H=z.current.state;!H.isOpen||L.which===229||(L.preventDefault(),p({type:$o,getItemNodeFromIndex:te}))},PageUp:function(L){z.current.state.isOpen&&(L.preventDefault(),p({type:Mo,getItemNodeFromIndex:te}))},PageDown:function(L){z.current.state.isOpen&&(L.preventDefault(),p({type:Lo,getItemNodeFromIndex:te}))}}},[p,z,te]),Z=ae(function(D){return ie({id:A.labelId,htmlFor:A.inputId},D)},[A]),Re=ae(function(D,L){var H,J=D===void 0?{}:D,_e=J.onMouseLeave,Ce=J.refKey,Ee=Ce===void 0?"ref":Ce,ve=J.ref,Te=jt(J,zv),Pe=L===void 0?{}:L;return Pe.suppressRefError,ie((H={},H[Ee]=Qt(ve,function(Ke){w.current=Ke}),H.id=A.menuId,H.role="listbox",H["aria-labelledby"]=Te&&Te["aria-label"]?void 0:""+A.labelId,H.onMouseLeave=qe(_e,function(){p({type:ud})}),H),Te)},[p,Oe,A]),De=ae(function(D){var L,H,J=D===void 0?{}:D,_e=J.item,Ce=J.index,Ee=J.refKey,ve=Ee===void 0?"ref":Ee,Te=J.ref,Pe=J.onMouseMove,Ke=J.onMouseDown,wt=J.onClick;J.onPress;var He=J.disabled,tt=jt(J,Wv),he=z.current,Ge=he.props,ze=he.state,nt=qu(_e,Ce,Ge.items,"Pass either item or index to getItemProps!"),We=nt[1],$n="onClick",Wt=wt,vt=function(){We!==ze.highlightedIndex&&(ce.current=!1,p({type:dd,index:We,disabled:He}))},b=function(){p({type:Uo,index:We})},S=function($){return $.preventDefault()};return ie((L={},L[ve]=Qt(Te,function(k){k&&(y.current[A.getItemId(We)]=k)}),L.disabled=He,L.role="option",L["aria-selected"]=""+(We===ze.highlightedIndex),L.id=A.getItemId(We),L),!He&&(H={},H[$n]=qe(Wt,b),H),{onMouseMove:qe(Pe,vt),onMouseDown:qe(Ke,S)},tt)},[p,z,ce,A]),B=ae(function(D){var L,H=D===void 0?{}:D,J=H.onClick;H.onPress;var _e=H.refKey,Ce=_e===void 0?"ref":_e,Ee=H.ref,ve=jt(H,qv),Te=z.current.state,Pe=function(){p({type:fd})};return ie((L={},L[Ce]=Qt(Ee,function(Ke){E.current=Ke}),L["aria-controls"]=A.menuId,L["aria-expanded"]=Te.isOpen,L.id=A.toggleButtonId,L.tabIndex=-1,L),!ve.disabled&&ie({},{onClick:qe(J,Pe)}),ve)},[p,z,A]),de=ae(function(D,L){var H,J=D===void 0?{}:D,_e=J.onKeyDown,Ce=J.onChange,Ee=J.onInput,ve=J.onFocus,Te=J.onBlur;J.onChangeText;var Pe=J.refKey,Ke=Pe===void 0?"ref":Pe,wt=J.ref,He=jt(J,Gv),tt=L===void 0?{}:L;tt.suppressRefError;var he=z.current.state,Ge=function(S){var k=Vu(S);k&&ue[k]&&ue[k](S)},ze=function(S){p({type:Fo,inputValue:S.target.value})},nt=function(S){he.isOpen&&!ne.current.isMouseDown&&p({type:Sa,selectItem:S.relatedTarget!==null})},We=function(){he.isOpen||p({type:jo})},$n="onChange",Wt={};if(!He.disabled){var vt;Wt=(vt={},vt[$n]=qe(Ce,Ee,ze),vt.onKeyDown=qe(_e,Ge),vt.onBlur=qe(Te,nt),vt.onFocus=qe(ve,We),vt)}return ie((H={},H[Ke]=Qt(wt,function(b){O.current=b}),H["aria-activedescendant"]=he.isOpen&&he.highlightedIndex>-1?A.getItemId(he.highlightedIndex):"",H["aria-autocomplete"]="list",H["aria-controls"]=A.menuId,H["aria-expanded"]=he.isOpen,H["aria-labelledby"]=He&&He["aria-label"]?void 0:""+A.labelId,H.autoComplete="off",H.id=A.inputId,H.role="combobox",H.value=he.inputValue,H),Wt,He)},[p,ue,z,ne,Oe,A]),fe=ae(function(){p({type:hd})},[p]),Ae=ae(function(){p({type:pd})},[p]),R=ae(function(){p({type:md})},[p]),I=ae(function(D){p({type:gd,highlightedIndex:D})},[p]),C=ae(function(D){p({type:Bo,selectedItem:D})},[p]),N=ae(function(D){p({type:vd,inputValue:D})},[p]),K=ae(function(){p({type:bd})},[p]);return{getItemProps:De,getLabelProps:Z,getMenuProps:Re,getInputProps:de,getToggleButtonProps:B,toggleMenu:fe,openMenu:R,closeMenu:Ae,setHighlightedIndex:I,setInputValue:N,selectItem:C,reset:K,highlightedIndex:v,isOpen:g,selectedItem:h,inputValue:_}}function Yv(e){var t=e.removedSelectedItem,n=e.itemToString;return n(t)+" has been removed."}x.exports.array,x.exports.array,x.exports.array,x.exports.func,x.exports.func,x.exports.func,x.exports.number,x.exports.number,x.exports.number,x.exports.func,x.exports.func,x.exports.string,x.exports.string,x.exports.shape({addEventListener:x.exports.func,removeEventListener:x.exports.func,document:x.exports.shape({getElementById:x.exports.func,activeElement:x.exports.any,body:x.exports.any})});Zn.itemToString,Zn.stateReducer,Zn.environment;var Vo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="fas",n="caret-up",r=320,a=512,i=[],o="f0d8",s="M182.6 137.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8H288c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z";e.definition={prefix:t,iconName:n,icon:[r,a,i,o,s]},e.faCaretUp=e.definition,e.prefix=t,e.iconName=n,e.width=r,e.height=a,e.ligatures=i,e.unicode=o,e.svgPathData=s,e.aliases=i})(Vo);var Ko={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="fas",n="caret-down",r=320,a=512,i=[],o="f0d7",s="M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z";e.definition={prefix:t,iconName:n,icon:[r,a,i,o,s]},e.faCaretDown=e.definition,e.prefix=t,e.iconName=n,e.width=r,e.height=a,e.ligatures=i,e.unicode=o,e.svgPathData=s,e.aliases=i})(Ko);function pl(e){return e?e.title:""}function Jv(e,t){return e.map(n=>{var r;return n.title.toLowerCase().includes(t.toLowerCase())||((r=n.description)==null?void 0:r.toLowerCase().includes(t.toLowerCase()))?n:null})}function zo(e){var d;const{isOpen:t,selectedItem:n,getToggleButtonProps:r,getLabelProps:a,getMenuProps:i,highlightedIndex:o,getItemProps:s,inputValue:c}=cd({items:e.items,defaultSelectedItem:e.defaultValue,itemToString:pl});return X(()=>{var u;(u=e.onSelectedItemChange)==null||u.call(e,n)},[n]),l("div",{class:"dialog-input-dropdown",children:[l("div",{className:"dialog-input-dropdown-dropdown",...r(),children:[l("label",{...a(),class:"dialog-input-dropdown-dropdown-text",children:n?pl(n):(d=e.selectText)!=null?d:"Select Item"}),l("span",{class:"dialog-input-dropdown-dropdown-icon",children:t?l(xe,{icon:Vo.faCaretUp}):l(xe,{icon:Ko.faCaretDown})})]}),l("ul",{className:`dialog-input-dropdown-dropdown-items ${!t&&"dialog-input-dropdown-dropdown-items__hidden"}`,...i(),children:t&&Jv(e.items,c).map((u,f)=>{var m;return u&&l("li",{className:`${o===f&&"dialog-input-dropdown-dropdown-item__highlighted"} ${n===u&&"dialog-input-dropdown-dropdown-item__selected"} dialog-input-dropdown-dropdown-item`,...s({item:u,index:f}),children:[l("span",{class:"dialog-input-dropdown-dropdown-item-name",children:u.title}),l("span",{className:"dialog-input-dropdown-dropdown-item-username",children:(m=u.description)!=null?m:""})]},`${u.value}${f}`)})})]})}function gl(e){return e.map(t=>({value:t.id,title:t.name}))}function Wo(e){var o,s,c;const t=pt(),[n,r]=pe.useState(gl(e.environment?[e.environment]:[])),a=e.environment?{value:e.environment.id,title:e.environment.name}:null;X(()=>{e.project&&V.collection("environment").getFullList(void 0,{filter:`project = "${e.project.id}"`}).then(d=>{r(gl(d))})},[e.project]);const i=d=>{d!==null&&t("./../"+d.value)};return l("div",{className:"navbar-links-breadcrumb",children:[e.team&&l(le,{children:l(Et,{class:"breadcrumb-page",to:`/dashboard/${e.team.id}`,children:e.team.name})}),e.project&&l(le,{children:[l("div",{class:"breadcrumb-spacer",children:">"}),l(Et,{class:"breadcrumb-page",to:`/dashboard/${(o=e.team)==null?void 0:o.id}/${e.project.id}`,children:e.project.name})]}),e.config&&l(le,{children:[l("div",{class:"breadcrumb-spacer",children:">"}),e.environment?l(Et,{class:"breadcrumb-page",to:`/dashboard/${(s=e.team)==null?void 0:s.id}/${(c=e.project)==null?void 0:c.id}/${e.config.id}/${e.environment.id}`,children:e.config.name}):l("p",{children:e.config.name})]}),e.environment&&l(le,{children:[l("div",{class:"breadcrumb-spacer",children:">"}),l(zo,{items:n,defaultValue:a,onSelectedItemChange:i})]})]})}var Tn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="fas",n="plus",r=448,a=512,i=[10133,61543,"add"],o="2b",s="M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z";e.definition={prefix:t,iconName:n,icon:[r,a,i,o,s]},e.faPlus=e.definition,e.prefix=t,e.iconName=n,e.width=r,e.height=a,e.ligatures=i,e.unicode=o,e.svgPathData=s,e.aliases=i})(Tn);function Xv(e){return l("div",{className:"dialog-overlay",onClick:e.onClick?e.onClick:()=>null,children:e.children})}function dt(e,t){const[n,r]=ee(!1);X(()=>{t!=null&&t.afterSetShowing&&t.afterSetShowing(n)},[n]);function a(i){i.target===i.currentTarget&&r(!1)}return[r,n?l(Xv,{onClick:a,children:e}):null]}function Pt(e){return l("div",{className:"dialog",children:e.children})}function ft(e){return l("div",{className:"dialog-header",children:e.children})}function ht(e){var t;return l("div",{className:`dialog-body ${(t=e.class)!=null?t:""}`,children:e.children})}function mt(e){return l("div",{className:"dialog-footer",children:e.children})}function vl(e){return e?e.username:""}function Zv(e,t){return e.map(n=>n.name.toLowerCase().includes(t.toLowerCase())||n.username.toLowerCase().includes(t.toLowerCase())?n:null)}function Qv(e){const{isOpen:t,selectedItem:n,getToggleButtonProps:r,getLabelProps:a,getInputProps:i,getMenuProps:o,highlightedIndex:s,getItemProps:c,inputValue:d,reset:u}=_d({items:e.users,itemToString:vl});return X(()=>{e.reset&&u()},[e.reset]),X(()=>{var f;(f=e.onSelectedUserChange)==null||f.call(e,n)},[n]),l("div",{class:"dialog-input-dropdown",children:[l("div",{className:"dialog-input-dropdown-dropdown",...r(),children:[t?l("input",{...i(),class:"dialog-input-dropdown-dropdown-input",placeholder:"Search Users"}):l("label",{...a(),class:"dialog-input-dropdown-dropdown-text",children:n?vl(n):"Select User"}),l("span",{class:"dialog-input-dropdown-dropdown-icon",children:t?l(xe,{icon:Vo.faCaretUp}):l(xe,{icon:Ko.faCaretDown})})]}),l("ul",{className:`dialog-input-dropdown-dropdown-items ${!t&&"dialog-input-dropdown-dropdown-items__hidden"}`,...o(),children:t&&Zv(e.users,d).map((f,m)=>{var p;return f&&l("li",{className:`${s===m&&"dialog-input-dropdown-dropdown-item__highlighted"} ${n===f&&"dialog-input-dropdown-dropdown-item__selected"} dialog-input-dropdown-dropdown-item`,...c({item:f,index:m}),children:[l("span",{class:"dialog-input-dropdown-dropdown-item-name",children:f.username}),l("span",{className:"dialog-input-dropdown-dropdown-item-username",children:(p=f.name)!=null?p:""})]},`${f.value}${m}`)})})]})}const bl=[{value:"viewers",title:"Viewer",description:"Can view all flags and values but can't edit anything."},{value:"editors",title:"Editor",description:"Can manage, create and delete all flags and values."},{value:"admins",title:"Admin",description:"Can manage, create and delete all projects, configs, environments, flags and values."}];function eb(){var Ae,R;const[e,t,n]=Dn(),[r,a]=ee(t),[i,o]=ee(""),[s,c]=ee(null),[d,u]=ee(bl[0]),[f,m]=ee(""),[p,g]=ee(""),[v,h]=ee(e),[_,w]=ee(!1),[y,O]=ee(""),[E,T]=ee(null),[A,P]=ee(""),z=pt();X(()=>{h(e)},[e]),X(()=>{a(t)},[t]);const[te,ce]=dt(l(Pt,{children:[l(ft,{children:l("h1",{class:"dialog-heading",children:["Delete ",y]})}),l(ht,{class:"dialog-form",children:l("p",{children:["Are you sure you want to remove the ",y," ",(Ae=E==null?void 0:E.username)!=null?Ae:E==null?void 0:E.name,"?"]})}),l(mt,{children:[l("button",{className:"dialog-action dialog-action__delete",onClick:()=>Re(),children:"Remove"}),l("button",{className:"dialog-action dialog-action__cancel",onClick:()=>te(!1),children:"Cancel"}),l("p",{class:"dialog-error",children:A})]})]}),{afterSetShowing:I=>{I||(O(""),T(null),P(""))}}),[ne,Oe]=dt(l(Pt,{children:[l(ft,{children:l("h1",{class:"dialog-heading",children:"Create Team"})}),l(ht,{class:"dialog-form",children:[l("label",{class:"dialog-input-label",children:"Project Name:"}),l("input",{class:"dialog-input",value:i,onChange:I=>o(I==null?void 0:I.currentTarget.value),type:"text",placeholder:"Project Name"})]}),l(mt,{children:[l("button",{className:"dialog-action dialog-action__save",onClick:()=>fe(),children:"Create"}),l("button",{className:"dialog-action dialog-action__cancel",onClick:()=>ne(!1),children:"Cancel"}),l("p",{class:"dialog-error",children:f})]})]}),{afterSetShowing:I=>{I||o("")}}),[ue,Z]=dt(l(Pt,{children:[l(ft,{children:l("h1",{class:"dialog-heading",children:"Add User"})}),l(ht,{class:"dialog-form",children:[l("label",{class:"dialog-input-label",children:"User:"}),l(Qv,{users:n,onSelectedUserChange:c,reset:_}),l("label",{class:"dialog-input-label",children:"Role:"}),l(zo,{items:bl,onSelectedItemChange:u,defaultValue:d})]}),l(mt,{children:[l("button",{className:"dialog-action dialog-action__save",onClick:()=>de(),children:"Add Member"}),l("button",{className:"dialog-action dialog-action__cancel",onClick:()=>ue(!1),children:"Cancel"}),l("p",{class:"dialog-error",children:p})]})]}),{afterSetShowing:I=>{I?w(!1):(c(null),w(!0))}}),Re=async()=>{E!==null&&y!==""&&(y==="project"&&V.collection("project").delete(E.id).then(()=>{a(r.filter(I=>I.id!==E.id)),te(!1)}).catch(I=>{P(I.message)}),y==="user"&&V.collection("team").update(v.id,{admins:v.admins.filter(I=>I!==E.id),editors:v.editors.filter(I=>I!==E.id),viewers:v.viewers.filter(I=>I!==E.id)}).then(()=>{h(I=>(I.admins=I.admins.filter(C=>C!==E.id),I.editors=I.editors.filter(C=>C!==E.id),I.viewers=I.viewers.filter(C=>C!==E.id),I.expand.admins&&(I.expand.admins=I.expand.admins.filter(C=>C.id!==E.id)),I.expand.editors&&(I.expand.editors=I.expand.editors.filter(C=>C.id!==E.id)),I.expand.viewers&&(I.expand.viewers=I.expand.viewers.filter(C=>C.id!==E.id)),I)),te(!1)}).catch(I=>{P(I.message)}))},De=(I,C)=>{I.stopPropagation(),O("user"),T(C),te(!0)},B=(I,C)=>{I.stopPropagation(),O("project"),T(C),te(!0)},de=()=>{if(s===null){g("Please select a user to add"),setTimeout(()=>g(""),5e3);return}if(d===null){g("Please select a role for the user"),setTimeout(()=>g(""),5e3);return}if(v.owner===s.id){g("User is already in the team"),setTimeout(()=>g(""),5e3);return}if(v.admins.includes(s.id)){g("User is already in the team"),setTimeout(()=>g(""),5e3);return}if(v.editors.includes(s.id)){g("User is already in the team"),setTimeout(()=>g(""),5e3);return}if(v.viewers.includes(s.id)){g("User is already in the team"),setTimeout(()=>g(""),5e3);return}V.collection("team").update(v.id,{[d.value]:[...v[d.value],s.id]}).then(()=>{const I={...s};h(C=>{let N={...C};return N[d.value].push(I.id),N.expand[d.value]&&N.expand[d.value].push(I),N}),ue(!1)}).catch(I=>{g("Error adding user to team: "+I),setTimeout(()=>g(""),5e3)})},fe=()=>{V.collection("project").create({name:i,team:v.id}).then(I=>{a([...r,I]),o(""),ne(!1)}).catch(I=>{m("Error creating project: "+I),setTimeout(()=>m(""),5e3)})};return l(le,{children:[l(kr,{children:l(Wo,{team:v})}),l(Qe,{pageName:"dashboard",children:[l(lr,{children:[l(cr,{children:"Projects"}),l(ur,{children:[r.map(I=>l(ut,{onClick:()=>z(`./${I.id}`),children:l(st,{children:[l(lt,{children:l(An,{value:I.name})}),l(ct,{children:I.name}),l(or,{children:l(sr,{onClick:C=>B(C,I),children:l(xe,{icon:an.faTrash})})})]})})),l(ut,{onClick:()=>ne(!0),children:l(st,{children:[l(lt,{children:l(xe,{icon:Tn.faPlus})}),l(ct,{children:"New Project"})]})})]})]}),v.owner===((R=V.authStore.model)==null?void 0:R.id)&&l(lr,{children:[l(cr,{children:"Members"}),l(ur,{children:[l(qr,{title:"Owner",expand:v.expand.owner,onUserDelete:De}),l(qr,{title:"Admin",expand:v.expand.admins,onUserDelete:De}),l(qr,{title:"Editor",expand:v.expand.editors,onUserDelete:De}),l(qr,{title:"Viewer",expand:v.expand.viewers,onUserDelete:De}),l(ut,{onClick:()=>ue(!0),children:l(st,{children:[l(lt,{children:l(xe,{icon:Tn.faPlus})}),l(ct,{children:"Add Member"})]})})]})]})]}),Oe,Z,ce]})}function tb({params:e}){return Promise.all([V.collection("team").getOne(e.team,{expand:"owner,admins,editors,viewers"}),V.collection("project").getFullList(void 0,{filter:`team = "${e.team}"`}),V.collection("users").getFullList()])}function nb(){const[e,t,n,r]=Dn(),a=pt(),[i,o]=ee([]),[s,c]=ee([]),[d,u]=ee(""),[f,m]=ee(""),[p,g]=ee(""),[v,h]=ee(""),[_,w]=ee(""),[y,O]=ee(null),[E,T]=ee("");X(()=>{o(n)},[n]),X(()=>{c(r)},[r]);const A=()=>{if(d.length===0){g("Error: Config name cannot be empty."),setTimeout(()=>g(""),5e3);return}V.collection("config").create({name:d,project:t.id}).then(B=>{o(de=>[...de,B]),ne(!1)}).catch(B=>{console.error(B),g("Error: Could not create config."),setTimeout(()=>g(""),5e3)})},P=()=>{if(f.length===0){h("Error: Environment name cannot be empty."),setTimeout(()=>h(""),5e3);return}V.collection("environment").create({name:f,project:t.id}).then(B=>{c(de=>[...de,B]),ue(!1)}).catch(B=>{console.error(B),h("Error: Could not create environment."),setTimeout(()=>h(""),5e3)})},[z,te]=dt(l(Pt,{children:[l(ft,{children:l("h1",{className:"dialog-heading",children:["Delete ",_]})}),l(ht,{class:"dialog-form",children:l("p",{children:["Are you sure you want to delete the ",_," ",y==null?void 0:y.name,"?"]})}),l(mt,{children:[l("button",{class:"dialog-action dialog-action__delete",onClick:()=>ce(),children:"Delete"}),l("button",{class:"dialog-action dialog-action__cancel",onClick:()=>z(!1),children:"Cancel"}),l("p",{className:"dialog-error",children:E})]})]}),{afterSetShowing:B=>{B||(w(""),O(null),T(""))}}),ce=()=>{if(y===null){T("Error: Could not delete object.");return}_==="config"?V.collection("config").delete(y==null?void 0:y.id).then(()=>{o(B=>B.filter(de=>de.id!==(y==null?void 0:y.id))),z(!1)}).catch(B=>{console.error(B),T("Error: Could not delete config."),setTimeout(()=>T(""),5e3)}):_==="environment"&&V.collection("environment").delete(y==null?void 0:y.id).then(()=>{c(B=>B.filter(de=>de.id!==(y==null?void 0:y.id))),z(!1)}).catch(B=>{console.error(B),T("Error: Could not delete environment."),setTimeout(()=>T(""),5e3)})},[ne,Oe]=dt(l(Pt,{children:[l(ft,{children:l("h1",{className:"dialog-heading",children:"Create Config"})}),l(ht,{class:"dialog-form",children:[l("label",{class:"dialog-input-label",children:"Config Name:"}),l("input",{type:"text",class:"dialog-input",value:d,placeholder:"Config Name",onInput:B=>u(B.currentTarget.value)})]}),l(mt,{children:[l("button",{class:"dialog-action dialog-action__save",onClick:()=>A(),children:"Create"}),l("button",{class:"dialog-action dialog-action__cancel",onClick:()=>ne(!1),children:"Cancel"}),l("p",{className:"dialog-error",children:p})]})]}),{afterSetShowing:B=>{B||(u(""),g(""))}}),[ue,Z]=dt(l(Pt,{children:[l(ft,{children:l("h1",{className:"dialog-heading",children:"Create Environment"})}),l(ht,{class:"dialog-form",children:[l("label",{class:"dialog-input-label",children:"Environment Name:"}),l("input",{type:"text",class:"dialog-input",value:f,placeholder:"Environment Name",onInput:B=>m(B.currentTarget.value)})]}),l(mt,{children:[l("button",{class:"dialog-action dialog-action__save",onClick:()=>P(),children:"Create"}),l("button",{class:"dialog-action dialog-action__cancel",onClick:()=>ue(!1),children:"Cancel"}),l("p",{className:"dialog-error",children:v})]})]}),{afterSetShowing:B=>{B||(m(""),h(""))}}),Re=(B,de)=>{B.stopPropagation(),w("config"),O(de),z(!0)},De=(B,de)=>{B.stopPropagation(),w("environment"),O(de),z(!0)};return l(le,{children:[l(kr,{children:l(Wo,{team:e,project:t})}),l(Qe,{pageName:"dashboard",children:[l(lr,{children:[l(cr,{children:"Environments"}),l(ur,{children:[s.map(B=>l(ut,{children:l(st,{children:[l(lt,{children:l(An,{value:B.name})}),l(ct,{children:B.name}),l(or,{children:l(sr,{onClick:de=>De(de,B),children:l(xe,{icon:an.faTrash})})})]})})),l(ut,{onClick:()=>ue(!0),children:l(st,{children:[l(lt,{children:l(xe,{icon:Tn.faPlus})}),l(ct,{children:"New Environment"})]})})]})]}),l(lr,{children:[l(cr,{children:"Configs"}),l(ur,{children:[i.map(B=>l(ut,{onClick:()=>s.length===0?a(`./${B.id}`):a(`./${B.id}/${s[0].id}`),children:l(st,{children:[l(lt,{children:l(An,{value:B.name})}),l(ct,{children:B.name}),l(or,{children:l(sr,{onClick:de=>Re(de,B),children:l(xe,{icon:an.faTrash})})})]})})),l(ut,{onClick:()=>ne(!0),children:l(st,{children:[l(lt,{children:l(xe,{icon:Tn.faPlus})}),l(ct,{children:"New Config"})]})})]})]})]}),Oe,Z,te]})}function rb({params:e}){return Promise.all([V.collection("team").getOne(e.team),V.collection("project").getOne(e.project,{}),V.collection("config").getFullList(void 0,{filter:`project = "${e.project}"`}),V.collection("environment").getFullList(void 0,{filter:`project = "${e.project}"`})])}const ab=[{value:"boolean",title:"Boolean",description:"True or false"},{value:"string",title:"String",description:"A string of text"},{value:"number",title:"Number",description:"A number"},{value:"json",title:"JSON",description:"A JSON object"},{value:"array",title:"Array",description:"A JSON array of values"}];function ib(e){switch(e){case"boolean":return"checkbox";case"string":return"text";case"number":return"number";case"json":return"text";case"array":return"text";default:return"text"}}var wd={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="fas",n="up-right-and-down-left-from-center",r=512,a=512,i=["expand-alt"],o="f424",s="M344 0H488c13.3 0 24 10.7 24 24V168c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87L327 41c-6.9-6.9-8.9-17.2-5.2-26.2S334.3 0 344 0zM168 512H24c-13.3 0-24-10.7-24-24V344c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39 87-87c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8z";e.definition={prefix:t,iconName:n,icon:[r,a,i,o,s]},e.faUpRightAndDownLeftFromCenter=e.definition,e.prefix=t,e.iconName=n,e.width=r,e.height=a,e.ligatures=i,e.unicode=o,e.svgPathData=s,e.aliases=i})(wd);function yl(e){return l("div",{className:"dialog dialog__wide",children:e.children})}function ob(e){const[t,n]=ee(null),{flag:r,originalValue:a,value:i,setValue:o,saveValue:s}=e;function c(y){let O={...e.value};O.value=y,o(O)}const[d,u]=dt(l(yl,{children:[l(ft,{children:l("h1",{className:"dialog-heading",children:["Update ",r.name," Value"]})}),l(ht,{children:l("textarea",{className:"dialog-input-large",value:i.value,onInput:y=>c(y.currentTarget.value)})}),l(mt,{children:l("button",{className:"dialog-action dialog-action__save",onClick:()=>d(!1),children:"Done"})})]})),[f,m]=dt(l(yl,{children:[l(ft,{children:l("h1",{className:"dialog-heading",children:["Delete ",r.name,"?"]})}),l(ht,{children:l("p",{children:["Are you sure you want to delete the flag ",r.name,"? This action cannot be undone."]})}),l(mt,{children:[l("button",{className:"dialog-action dialog-action__delete",onClick:y=>e.onDelete(y,r),children:"Delete"}),l("button",{className:"dialog-action dialog-action__cancel",onClick:()=>f(!1),children:"Cancel"})]})]})),p=ib(r.type);let g;function v(){s(i).then(y=>{n(y),setTimeout(()=>n(null),5e3)})}let h=l("button",{onClick:()=>d(!0),className:"setting-card-button",title:"Expand Editor",children:l(xe,{icon:wd.faUpRightAndDownLeftFromCenter})});switch(p){case"text":g=l("input",{type:p,value:i.value,class:"setting-card-value",onInput:y=>c(y.currentTarget.value)});break;case"number":g=l("input",{type:p,value:i.value,class:"setting-card-value",onInput:y=>c(y.currentTarget.value)}),h=null;break;case"checkbox":g=l("label",{className:"setting-card-value-switch",children:[l("input",{type:p,checked:i.value==="true",className:"setting-card-value",onClick:y=>c(y.currentTarget.checked?"true":"false")}),l("span",{className:"setting-card-value-slider"})]}),h=null;break}const _=y=>{y.preventDefault(),c(a.value)};function w(){return t===null?null:t[0]===1?l("p",{class:"setting-card-save-status-message",children:"Value saved successfully."}):t[0]===0?t[1].toString().startsWith("SyntaxError: JSON.parse")?l("p",{class:"setting-card-save-status-message",children:"JSON is not correctly formatted."}):l("p",{class:"setting-card-save-status-message",children:"Failed to save value."}):l("p",{class:"setting-card-save-status-message",children:t[1]})}return l("div",{class:"setting-card",children:[l("div",{class:"setting-card-header",children:[l("h3",{class:"setting-card-title",children:r.name}),l("p",{class:"setting-card-key",children:r.identifier})]}),l("div",{class:"setting-card-body",children:[g,h]}),l("div",{class:"setting-card-footer",children:[w(),l("button",{class:"setting-card-button",onClick:()=>f(!0),children:l(xe,{icon:an.faTrash})}),l("button",{class:"setting-card-button",onClick:_,disabled:a.value===i.value,children:"Reset"}),l("button",{class:"setting-card-button",onClick:v,disabled:a.value===i.value,children:"Save"})]}),u,m]})}function sb(){return l("div",{className:"dashboard-spacer"})}function lb(e){const[t,n]=ee("go"),r={go:`let configDN = new ConfigDN("${e.apiKey}");`,javascript:`let configDN = new ConfigDN("${e.apiKey}");`};return l("div",{className:"api-info",children:[l("h1",{className:"api-info-title",children:"Accessing this config"}),l("div",{className:"api-info-key",children:[l("p",{className:"api-info-section-title",children:["API Key (",e.config,", ",e.environment," Environment)"]}),l("p",{className:"api-info-box",children:e.apiKey})]}),l("h2",{className:"api-info-section-title",children:"Integrations"}),l("div",{className:"language-buttons",children:[l("button",{className:`language-button ${t==="go"?"selected":""}`,onClick:()=>n("go"),children:"Go"}),l("button",{className:`language-button ${t==="javascript"?"selected":""}`,onClick:()=>n("javascript"),children:"JavaScript"})]}),l("div",{className:"api-info-box",children:l("pre",{children:r[t]})})]})}function cb(e){return l("div",{className:"setting-buttons",children:e.children})}function oi(e){return l("button",{class:`setting-buttons-button button__${e.type.toLowerCase().replaceAll(" ","-")}`,onClick:e.onClick?e.onClick:()=>null,children:e.type})}function ub(e){return l("div",{className:"setting-cards",children:e.children})}const db=[..."abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~"],fb=[..."0123456789"],hb=[..."CDEHKMPRTUWXY012458"],mb=[..."!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"],pb=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"],gb=(e,t)=>e[t]+(e[t+1]<<8),vb=(e,t,n)=>{const r=t.length,a=Math.floor(65536/r)*r-1,i=2*Math.ceil(1.1*e);let o="",s=0;for(;sa)&&(o+=t[u%r],s++)}}return o},bb=new Set([void 0,"hex","base64","url-safe","numeric","distinguishable","ascii-printable","alphanumeric"]),yb=(e,t,n)=>({length:r,type:a,characters:i})=>{if(!(r>=0&&Number.isFinite(r)))throw new TypeError("Expected a `length` to be a non-negative finite number");if(a!==void 0&&i!==void 0)throw new TypeError("Expected either `type` or `characters`");if(i!==void 0&&typeof i!="string")throw new TypeError("Expected `characters` to be string");if(!bb.has(a))throw new TypeError(`Unknown type: ${a}`);if(a===void 0&&i===void 0&&(a="hex"),a==="hex"||a===void 0&&i===void 0)return t(Math.ceil(r*.5),"hex",r);if(a==="base64")return t(Math.ceil(r*.75),"base64",r);if(a==="url-safe")return e(r,db,n);if(a==="numeric")return e(r,fb,n);if(a==="distinguishable")return e(r,hb,n);if(a==="ascii-printable")return e(r,mb,n);if(a==="alphanumeric")return e(r,pb,n);if(i.length===0)throw new TypeError("Expected `characters` string length to be greater than or equal to 1");if(i.length>65536)throw new TypeError("Expected `characters` string length to be less or equal to 65536");return e(r,i,n)};function _b(e,t){return yb(vb,e,t)}const wb=e=>[...e].map(t=>t.toString(16).padStart(2,"0")).join(""),Sb=e=>btoa(String.fromCodePoint(...e)),_l=65536;function Sd(e){const t=new Uint8Array(e);for(let n=0;n{c(a)},[a]),X(()=>{const R=i.map(I=>{var N;const C=(N=a.find(K=>K.id===I.flag))==null?void 0:N.type;return I={...I},I.value=wl(I.value,C),I});m(R.map(I=>({...I}))),g(R.map(I=>({...I})))},[i,a]),X(()=>{u(o)},[o]);const z=()=>{if(v===""){P("Flag name cannot be blank"),setTimeout(()=>P(""),5e3);return}if(_===""){P("Flag identifier cannot be blank"),setTimeout(()=>P(""),5e3);return}if(E===null){P("Flag type cannot be blank"),setTimeout(()=>P(""),5e3);return}if(e===void 0){P("Environment not found"),setTimeout(()=>P(""),5e3);return}V.collection("flag").create({config:r.id,type:E.value,name:v,identifier:_}).then(R=>{V.collection("value").create({environment:e.id,flag:R.id,value:Mi(E.value)}).then(I=>{c(C=>[...C,{...R}]),I.value=xa(I.value,E.value),g(C=>[...C,{...I}]),m(C=>[...C,{...I}]),te(!1)}).catch(I=>{console.error(I)})}).catch(R=>{console.error(R),P("An error occurred while creating the flag")})},[te,ce]=dt(l(Pt,{children:[l(ft,{children:l("h1",{className:"dialog-heading",children:"Create Flag"})}),l(ht,{class:"dialog-form",children:[l("label",{class:"dialog-input-label",children:"Flag Name:"}),l("input",{type:"text",class:"dialog-input",value:v,placeholder:"Flag Name",onInput:R=>{if(h(R.currentTarget.value),y){let I=R.currentTarget.value.replace(/^\w|[A-Z]|\b\w/g,function(C,N){return N===0?C.toLowerCase():C.toUpperCase()}).replace(/\W+/g,"");w(I)}}}),l("label",{class:"dialog-input-label",children:"Flag Identifier:"}),l("input",{type:"text",class:"dialog-input",value:_,placeholder:"Flag Identifier",onInput:R=>{O(!1),w(R.currentTarget.value)}}),l("label",{class:"dialog-input-label",children:"Flag Type:"}),l(zo,{selectText:"Select Type",items:ab,onSelectedItemChange:T})]}),l(mt,{children:[l("button",{class:"dialog-action dialog-action__save",onClick:()=>z(),children:"Create"}),l("button",{class:"dialog-action dialog-action__cancel",onClick:()=>te(!1),children:"Cancel"}),l("p",{className:"dialog-error",children:A})]})]}),{afterSetShowing:R=>{R||(h(""),w(""),T(null),O(!0),P(""))}});if(typeof e>"u")return l("div",{class:"content",children:[l("h1",{children:"No environments found!"}),l("p",{children:["Go back to the ",l(Et,{to:"../",children:"project page"})," to create a new environment."]})]});X(()=>{o.length===0&&typeof e<"u"&&V.collection("api_key").create({environment:e.id,config:r.id,name:`Default API Key For ${t.name}/${n.name}/${r.name}/${e.name}`,key:Ib({length:45,type:"alphanumeric"})}).then(R=>{u([R])}).catch(R=>{console.error(R)})},[o]),X(()=>{for(let R=0;RC.flag===I.id)===void 0&&V.collection("value").create({environment:e.id,flag:I.id,value:Mi(I.type)}).then(C=>{C.value=xa(C.value,I.type),g(N=>[...N,{...C}]),m(N=>[...N,{...C}])}).catch(C=>{console.error(C)})}},[a,i]);function ne(R){g(I=>I.map(C=>C.id===R.id?R:C))}const Oe=R=>{var I;return(I=p.find(C=>C.flag===R.id))!=null?I:xl(R.type)};function ue(R){var I;return(I=f.find(C=>C.flag===R.id))!=null?I:xl(R.type)}function Z(R){const I=JSON.parse(JSON.stringify(R));m(C=>C.map(N=>N.id===I.id?I:N))}function Re(R){var N;const I=(N=a.find(K=>K.id===R.flag))==null?void 0:N.type,C={...R};return C.value=wl(R.value,I),C}function De(R){var I;R.preventDefault();for(let C=0;CL.id===N.id),D=f[K];if(JSON.stringify(D.value)!==JSON.stringify(p[C].value)){const L={...N};L.value=Sl(N.value,(I=a.find(H=>H.id===N.flag))==null?void 0:I.type),V.collection("value").update(N.id,L),Z(N)}}}async function B(R){var C;const I=f.findIndex(N=>N.id===R.id);if(JSON.stringify(f[I].value)===JSON.stringify(R.value))return[-1,"Value is the same as the previous value"];try{const N={...R};N.value=Sl(R.value,(C=a.find(D=>D.id===R.flag))==null?void 0:C.type);const K=await V.collection("value").update(R.id,N);return Z(Re(K)),ne(Re(K)),[1,K]}catch(N){return[0,N]}}const de=(R,I)=>{R.stopPropagation(),V.collection("flag").delete(I.id).then(()=>{c(s.filter(C=>C.id!==I.id)),g(p.filter(C=>C.flag!==I.id)),m(f.filter(C=>C.flag!==I.id))})};function fe(){g(JSON.parse(JSON.stringify(f)))}return l(le,{children:[l(kr,{children:l(Wo,{team:t,project:n,environment:e,config:r})}),l(Qe,{pageName:"dashboard dashboard-config",children:[l(ub,{children:[l("h2",{children:"Flags"}),s.map(R=>l(ob,{flag:R,originalValue:ue(R),onDelete:de,value:Oe(R),saveValue:B,setValue:ne}))]}),l(cb,{children:[l(oi,{onClick:()=>te(!0),type:"New Flag"}),l(oi,{onClick:fe,type:"Reset All"}),l(oi,{onClick:De,type:"Save All"})]}),l(sb,{}),l(lb,{config:r.name,environment:e.name,apiKey:(Ae=d[0])==null?void 0:Ae.key})]}),ce]})}function Ob({params:e}){return e.environment?Promise.all([V.collection("environment").getOne(e.environment,{}),V.collection("team").getOne(e.team,{expand:"owner,admins,editors,viewers"}),V.collection("project").getOne(e.project,{}),V.collection("config").getOne(e.config,{}),V.collection("flag").getFullList(void 0,{filter:`config = "${e.config}"`}),V.collection("value").getFullList(void 0,{filter:`environment = "${e.environment}" && flag.config = "${e.config}"`}),V.collection("api_key").getFullList(void 0,{filter:`config = "${e.config}" && environment = "${e.environment}"`})]):Promise.all([V.collection("environment").getList(void 0,1,{filter:`project = "${e.project}"`}).then(t=>t.items[0]||void 0)])}const Eb="/assets/404.571aed3a.svg",Il="/assets/error.7cebe82a.svg";function Jr(){const e=mu();let t;if(e instanceof je)switch(e.status){case 404:t=l(Qe,{pageName:"dashboard dashboard-error",children:[l("img",{src:Eb,alt:"404"}),l("h1",{children:"404"}),l("p",{children:e.message})]});break;default:t=l(Qe,{pageName:"dashboard dashboard-error",children:[l("img",{src:Il,alt:"500"}),l("h1",{children:"500"}),l("p",{children:e.message})]});break}else t=l(Qe,{pageName:"dashboard dashboard-error",children:[l("img",{src:Il,alt:"500"}),l("h1",{children:"500"}),l("p",{children:e.message})]});return l(le,{children:[l(kr,{}),t]})}function Pb(){const[e]=Dn(),[t,n]=pe.useState([]),[r,a]=pe.useState(""),[i,o]=pe.useState(""),[s,c]=pe.useState(null),[d,u]=pe.useState(""),f=pt();X(()=>{n(e)},[e]);const m=()=>{var w,y;if(r.length===0){o("Error: Team name cannot be empty."),setTimeout(()=>o(""),5e3);return}V.collection("team").create({name:r,owner:[(y=(w=V.authStore)==null?void 0:w.model)==null?void 0:y.id]}).then(O=>{n([...t,O]),a(""),h(!1)}).catch(O=>{o("Error Creating Team: "+O.message),setTimeout(()=>o(""),5e3)})},p=()=>{s!==null&&V.collection("team").delete(s.id).then(()=>{n(w=>w.filter(y=>y.id!==s.id)),c(null),g(!1)}).catch(w=>{u("Error Deleting Team: "+w.message),setTimeout(()=>u(""),5e3)})},[g,v]=dt(l(Pt,{children:[l(ft,{children:l("h1",{class:"dialog-heading",children:"Delete Team"})}),l(ht,{class:"dialog-form",children:l("p",{children:["Are you sure you want to delete the team ",s==null?void 0:s.name,"? This is irreversible and will delete all associated configs, projects, environments and API Keys."]})}),l(mt,{children:[l("button",{className:"dialog-action dialog-action__delete",onClick:p,children:"Delete"}),l("button",{className:"dialog-action dialog-action__cancel",onClick:()=>g(!1),children:"Cancel"}),l("p",{class:"dialog-error",children:d})]})]}),{afterSetShowing:w=>{w||(c(null),u(""))}}),[h,_]=dt(l(Pt,{children:[l(ft,{children:l("h1",{class:"dialog-heading",children:"Create Team"})}),l(ht,{class:"dialog-form",children:[l("label",{class:"dialog-input-label",children:"Team Name:"}),l("input",{class:"dialog-input",value:r,onChange:w=>a(w==null?void 0:w.currentTarget.value),type:"text",placeholder:"Team Name"})]}),l(mt,{children:[l("button",{className:"dialog-action dialog-action__save",onClick:()=>m(),children:"Create"}),l("button",{className:"dialog-action dialog-action__cancel",onClick:()=>h(!1),children:"Cancel"}),l("p",{class:"dialog-error",children:i})]})]}),{afterSetShowing:w=>{w||a("")}});return l(le,{children:[l(kr,{}),l(Qe,{pageName:"dashboard",children:[l(lr,{children:[l(cr,{children:"Teams"}),l(ur,{children:[t.map(w=>{var y;return l(ut,{onClick:()=>f(`./${w.id}`),children:l(st,{children:[l(lt,{children:l(An,{value:w.name})}),l(ct,{children:w.name}),l(or,{children:w.owner===((y=V.authStore.model)==null?void 0:y.id)?l(sr,{onClick:O=>{O.stopPropagation(),c(w),g(!0)},children:l(xe,{icon:an.faTrash})}):null})]})},w.id)}),l(ut,{onClick:()=>h(!0),children:l(st,{children:[l(lt,{children:l(xe,{icon:Tn.faPlus})}),l(ct,{children:"New Team"})]})})]})]}),_,v]})]})}function Ab(){return Promise.all([V.collection("team").getFullList()])}function Tb(){const[e]=pu(),t=pt();return X(()=>{const n=e.get("code"),r=xu.get("provider"),a=location.origin+ye.OAUTH2_REDIRECT;r.state!==e.get("state")&&t(ye.LOGIN+"?error=Could not verify state, please try to login again."),n&&V.collection("users").authWithOAuth2(r.name,n,r.codeVerifier,a,{emailVisibility:!1}).then(async i=>{var o,s,c,d;V.collection("users").update(i.record.id,{name:(s=(o=i.meta)==null?void 0:o.name)!=null?s:"",username:(d=(c=i.meta)==null?void 0:c.username.replace(/\W/g,""))!=null?d:""}).catch(u=>console.error(u)),t(ye.DASHBOARD)}).catch(i=>t(ye.LOGIN+"?error="+i.message))},[]),l("div",{children:"Please wait while we log you in..."})}function Nb(){const[e,t]=pe.useState(""),[n,r]=pe.useState({}),[a,i]=pe.useState(""),[o,s]=pe.useState(!0);Ra(ye.DASHBOARD,!0);async function c(d){d.preventDefault(),s(!1);try{await V.collection("users").requestPasswordReset(e),r({}),i("If an account is associated with this email address, a password reset email has been sent.")}catch(u){if(console.log(u),u instanceof je){const f=u.data.message;r({form:f})}else u instanceof Error&&r({form:u.message})}s(!0)}return l(fr,{class:"auth-page",children:[l(hr,{logo:mr,children:l(pr,{children:l(xr,{})})}),l(Qe,{pageName:"auth-content",children:l("form",{class:"auth-form",onSubmit:c,children:[l("div",{class:"auth-form-header",children:l("p",{children:"Forgot Password?"})}),l("div",{class:"auth-form-body",children:l(Zt,{value:e,valueUpdate:t,name:"email",label:"Email",errors:n,type:"email",required:!0})}),l("div",{className:"auth-form-footer",children:[l("button",{class:"auth-form-submit-button",type:"submit",disabled:!o,children:"Send Password Reset"}),l("div",{className:"auth-form-submit-error",children:n.form?n.form:""}),l("div",{className:"auth-form-submit-success",children:a||""}),l("p",{className:"auth-form-text",children:["Remember your password? ",l(Et,{to:ye.LOGIN,class:"auth-form-link",children:"Login"})]}),l("p",{className:"auth-form-text",children:["Need an account? ",l(Et,{to:ye.REGISTER,class:"auth-form-link",children:"Register"})]})]})]})})]})}const Rb=Tp([{path:ye.HOME,errorElement:l(sl,{}),element:l($p,{})},{path:ye.LOGIN,element:l(Tg,{}),loader:Ng},{path:ye.REGISTER,element:l(Dg,{}),loader:Mg},{path:ye.FORGOT_PASSWORD,element:l(Nb,{})},{path:ye.OAUTH2_REDIRECT,element:l(Tb,{})},{path:ye.DASHBOARD,element:l($g,{}),children:[{path:"",element:l(Pb,{}),loader:Ab,errorElement:l(Jr,{})},{path:":team",element:l(eb,{}),loader:tb,errorElement:l(Jr,{})},{path:":team/:project",element:l(nb,{}),loader:rb,errorElement:l(Jr,{})},{path:":team/:project/:config",element:l(sl,{})},{path:":team/:project/:config/:environment",element:l(kb,{}),loader:Ob,errorElement:l(Jr,{})}]},{path:ye.LOGOUT,element:l(Fg,{})}]);Sn(l(_p,{router:Rb}),document.getElementById("app")); diff --git a/ui/dist/assets/index.12bcf05e.css b/ui/dist/assets/index.f13f5edb.css similarity index 97% rename from ui/dist/assets/index.12bcf05e.css rename to ui/dist/assets/index.f13f5edb.css index 34e26e2..13c0ff8 100644 --- a/ui/dist/assets/index.12bcf05e.css +++ b/ui/dist/assets/index.f13f5edb.css @@ -1 +1 @@ -:root{font-family:Inter,Avenir,Helvetica,Arial,sans-serif;font-size:16px;line-height:24px;font-weight:400;color-scheme:light dark;color:#dce6e8;background-color:#1f2a2d;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}*{box-sizing:border-box}a{color:inherit;text-decoration:inherit}body{margin:0;min-width:320px;min-height:100vh}.page{display:grid;grid-template-columns:300px 1fr;grid-template-rows:70px 1fr;grid-column-gap:10px;min-height:100vh}.page div.content{grid-area:1/1/3/3}.page nav.navbar,.page div.page-transition{grid-area:1/1/2/3}.page nav.navbar+div.content,.page div.page-transition+div.content{grid-area:2/1/3/3}nav.sidebar~.page div.content{grid-area:1/2/3/3;margin:0 10px 10px;border-radius:10px}nav.sidebar~.page nav.navbar,nav.sidebar~.page div.page-transition{grid-area:1/1/2/3}nav.sidebar~.page nav.navbar+div.content,nav.sidebar~.page div.page-transition+div.content{grid-area:2/2/3/3}nav.navbar{display:flex;position:relative;z-index:100;background-color:#1f2a2d}nav.navbar .navbar-brand{border-radius:50px;height:70px;width:70px;background-color:#1f2a2d;display:flex;align-items:center;justify-content:center;flex-shrink:0;z-index:50}nav.navbar .navbar-brand .navbar-logo{height:80%;width:80%;border-radius:50px;background-color:#0080aa;display:flex;justify-content:center;align-items:center}nav.navbar .navbar-brand .navbar-logo img{width:80%;height:80%}nav.navbar .navbar-links{flex:100%;height:50px;margin:10px 10px 0 -10px;z-index:25;background-color:#0080aa;border-radius:0 10px 10px 0;display:flex;justify-content:flex-end}nav.navbar .navbar-links .navbar-links-breadcrumb{flex:100% 1 1;background-color:#145a7c;padding-left:30px;display:flex;align-items:center;padding-top:3px;font-size:1.6em;line-height:initial;font-weight:700}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown{position:relative;height:auto;width:auto;margin-top:auto;margin-bottom:auto}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown .dialog-input-dropdown-dropdown{display:flex;align-items:center;justify-content:space-between;border:none;border-radius:5px;padding:3px;font-size:1em;line-height:1.2em;background-color:#27334d;color:#fff;cursor:pointer;width:100%}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown .dialog-input-dropdown-dropdown .dialog-input-dropdown-dropdown-text{flex:1;overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;line-height:1em}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown .dialog-input-dropdown-dropdown .dialog-input-dropdown-dropdown-input{width:100%;height:100%;border:none;outline:none;padding:0;font-size:1em;background-color:transparent}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown .dialog-input-dropdown-dropdown .dialog-input-dropdown-dropdown-icon{font-size:1em;padding-left:5px}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown .dialog-input-dropdown-dropdown-items{position:absolute;z-index:1000;background-color:#1f4260;border-radius:5px;padding:0;font-size:1em;color:#fff;cursor:pointer;width:auto;overflow-x:hidden;overflow-y:auto;max-height:50vh}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown .dialog-input-dropdown-dropdown-items.dialog-input-dropdown-dropdown-items__hidden{display:none}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown .dialog-input-dropdown-dropdown-items .dialog-input-dropdown-dropdown-item{padding:10px}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown .dialog-input-dropdown-dropdown-items .dialog-input-dropdown-dropdown-item .dialog-input-dropdown-dropdown-item-name{font-weight:700;display:block;font-size:1em;white-space:nowrap}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown .dialog-input-dropdown-dropdown-items .dialog-input-dropdown-dropdown-item.dialog-input-dropdown-dropdown-item__selected{background-color:#145a7c}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown .dialog-input-dropdown-dropdown-items .dialog-input-dropdown-dropdown-item.dialog-input-dropdown-dropdown-item__highlighted{background-color:#1b4a69}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown .dialog-input-dropdown-dropdown-items .dialog-input-dropdown-dropdown-item:last-of-type{border-bottom:none;margin-bottom:0}nav.navbar .navbar-links .navbar-links-breadcrumb .breadcrumb-page:hover{text-decoration:underline}nav.navbar .navbar-links .navbar-links-breadcrumb .breadcrumb-spacer{margin:0 5px}nav.navbar .navbar-links .navbar-link{height:100%;padding:7px 10px;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0}nav.navbar .navbar-links .navbar-link .navbar-link__text{margin-top:32px;transition-duration:.5s}nav.navbar .navbar-links .navbar-link .navbar-link__text div{display:inline-block}nav.navbar .navbar-links .navbar-link .navbar-link__text div svg{height:2em;width:2em;margin:0 2px}nav.navbar .navbar-links .navbar-link .navbar-link__decoration{width:60%;background-color:#27334d;border-radius:50px;align-items:center;flex:0 0 8px;margin-top:25px;transition-duration:.5s;line-height:1em;font-size:1em;display:inline-flex;opacity:0}nav.navbar .navbar-links .navbar-link .navbar-link__decoration .navbar-link__decoration__switch{height:6px;background-color:#fff;border-radius:50px;display:inline-block;margin:0 2px;transition-duration:.5s;flex:0 0 6px}nav.navbar .navbar-links .navbar-link:hover .navbar-link__text{margin-top:0}nav.navbar .navbar-links .navbar-link:hover .navbar-link__decoration{margin-top:0;opacity:1}nav.navbar .navbar-links .navbar-link.navbar-link__active .navbar-link__text{margin-top:0}nav.navbar .navbar-links .navbar-link.navbar-link__active .navbar-link__decoration{margin-top:0;opacity:1}nav.navbar .navbar-links .navbar-link.navbar-link__active .navbar-link__decoration .navbar-link__decoration__switch{margin-left:calc(100% - 8px)}.page .content{margin:0}.page .content.homepage{display:flex;flex-direction:column;align-items:center;justify-content:center}.page .content.homepage .page-title{text-align:center;font-size:2.5em;line-height:initial;font-weight:700;margin-bottom:50px;justify-self:auto}.page .content.homepage .content-demo{width:80%;max-width:1200px;height:200px;border-radius:10px;display:flex;flex-wrap:wrap}.page .content.homepage .content-demo .content-demo-flags,.page .content.homepage .content-demo .content-demo-site{flex:400px 1 0;height:100%;background:#161d20;border-radius:10px}.page .content.homepage .content-demo .content-demo-arrow{flex:100px 0 1;display:flex;align-items:center;justify-content:center;height:auto}.page .content.homepage .content-demo .content-demo-arrow svg{font-size:75px;width:75%;fill:#fff}nav.sidebar~.page .content{margin-left:0}nav.sidebar{position:fixed;margin:0;border-radius:0 10px 10px 0;padding:10px 0;top:70px;left:0;bottom:10px;width:300px;background-color:#27334d}nav.sidebar .sidebar-team{display:flex;flex-direction:column;padding-top:10px}nav.sidebar .sidebar-team:first-of-type{padding-top:0}nav.sidebar .sidebar-team div.sidebar-team-details{display:flex;align-items:center}nav.sidebar .sidebar-team div.sidebar-team-details div.sidebar-team-decoration{width:10px;height:25px;display:inline-block;color:#0080aa}nav.sidebar .sidebar-team div.sidebar-team-details div.sidebar-team-decoration svg{width:100%;height:100%}nav.sidebar .sidebar-team div.sidebar-team-details .sidebar-team-text{padding-left:5px;font-size:1.5em;display:inline-block}nav.sidebar .sidebar-team .sidebar-project-decoration-svg-has-config-before{display:none}nav.sidebar .sidebar-team .sidebar-project:has(.sidebar-config)+.sidebar-project .sidebar-project-decoration-svg-has-project-before{display:none}nav.sidebar .sidebar-team .sidebar-project:has(.sidebar-config)+.sidebar-project .sidebar-project-decoration-svg-has-config-before{display:inline}nav.sidebar .sidebar-team .sidebar-project{display:flex;flex-direction:column}nav.sidebar .sidebar-team .sidebar-project div.sidebar-project-details{display:flex;align-items:center}nav.sidebar .sidebar-team .sidebar-project div.sidebar-project-details div.sidebar-project-decoration{width:20px;height:25px;display:inline-block;color:#0080aa}nav.sidebar .sidebar-team .sidebar-project div.sidebar-project-details div.sidebar-project-decoration svg{width:100%;height:100%}nav.sidebar .sidebar-team .sidebar-project div.sidebar-project-details .sidebar-project-text{padding-left:5px;font-size:1.2em;display:inline-block}nav.sidebar .sidebar-team .sidebar-project .sidebar-config{display:flex;flex-direction:column}nav.sidebar .sidebar-team .sidebar-project .sidebar-config div.sidebar-config-details{display:flex;align-items:center}nav.sidebar .sidebar-team .sidebar-project .sidebar-config div.sidebar-config-details div.sidebar-config-decoration{width:30px;height:25px;display:inline-block;color:#0080aa}nav.sidebar .sidebar-team .sidebar-project .sidebar-config div.sidebar-config-details div.sidebar-config-decoration svg{width:100%;height:100%}nav.sidebar .sidebar-team .sidebar-project .sidebar-config div.sidebar-config-details .sidebar-config-text{font-size:1em;display:inline-block;padding-left:5px}.sidebar+.page nav.navbar{position:sticky;top:0}div.page-transition svg{width:100%;height:100%}.background--oxford-blue{background-color:#27334d}.background--celadon-blue{background-color:#0080aa}.text--oxford-blue{color:#27334d}.text--celadon-blue{color:#0080aa}.text--charleston-green{color:#1f2a2d}.page--shorter{min-height:calc(100vh - 20px)}.page .content.dashboard.dashboard-error{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;text-align:center}.page .content.dashboard.dashboard-error h1{font-size:3em;line-height:1.2em}.page .content.dashboard.dashboard-error p{font-size:1.5em;line-height:1.2em}.page .content.dashboard .dashboard-objects{margin-top:50px}.page .content.dashboard .dashboard-objects>h1{font-size:2em;line-height:initial}.page .content.dashboard .dashboard-objects:first-of-type{margin-top:0}.page .content.dashboard .dashboard-objects .dashboard-objects-list{display:flex;flex-wrap:wrap;gap:10px}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object{background-color:#0080aa;border-radius:5px;overflow:hidden;width:300px}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object.dashboard-objects-object__clickable{cursor:pointer}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object .dashboard-objects-object-header{background-color:#175272;display:flex;padding:5px 10px;align-items:center}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object .dashboard-objects-object-header .dashboard-objects-object-icon{width:50px;height:50px;overflow:hidden;display:flex;justify-content:center;align-items:center}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object .dashboard-objects-object-header .dashboard-objects-object-icon *{width:100%;height:100%}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object .dashboard-objects-object-header .dashboard-objects-object-actions{display:flex;gap:10px;justify-content:flex-end;flex:0px 1 0;height:100%}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object .dashboard-objects-object-header .dashboard-objects-object-actions .dashboard-objects-object-action{background-color:#27334d;border:none;border-radius:5px;padding:5px 10px;color:#fff;flex:35px 0 0;height:100%}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object .dashboard-objects-object-header .dashboard-objects-object-actions .dashboard-objects-object-action:hover{color:#d4d6db}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object .dashboard-objects-object-header .dashboard-objects-object-actions .dashboard-objects-object-action:active{color:#a9adb8}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object .dashboard-objects-object-header .dashboard-objects-object-actions .dashboard-objects-object-action svg{width:100%;height:100%}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object .dashboard-objects-object-header .dashboard-objects-object-name{font-size:1.4em;font-weight:700;margin-left:10px;user-select:none}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object .dashboard-objects-object-body{padding:5px 10px}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object .dashboard-objects-object-body p{user-select:none}.page .content.dashboard.dashboard-config{display:flex;flex-direction:column}.page .content.dashboard.dashboard-config .dashboard-spacer{flex:10px 1 0}.page .content.dashboard.dashboard-config .setting-cards{display:flex;flex-wrap:wrap;gap:10px}.page .content.dashboard.dashboard-config .setting-cards>h2{font-size:2em;line-height:initial;width:100%}.page .content.dashboard.dashboard-config .setting-cards .setting-card{background-color:#0080aa;border-radius:10px;overflow:hidden;flex:400px 1 1}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-header{background-color:#175272;padding:5px}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-header .setting-card-title{font-weight:700;font-size:1.2em;line-height:initial}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-header .setting-card-key{margin-left:auto;font-size:1em;line-height:initial}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body{padding:5px;display:flex}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-value{flex:95% 1 1;border-radius:5px 0 0 5px;border:1px solid white;background:#1f2a2d;padding:5px;font-size:1.1em}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-value:focus,.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-value:active{outline:2px solid #fca311}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-value-switch{position:relative;display:inline-block;width:60px;height:34px}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-value-switch .setting-card-value{opacity:0;width:0;height:0}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-value-switch .setting-card-value:checked+.setting-card-value-slider{background-color:#175272}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-value-switch .setting-card-value:checked+.setting-card-value-slider:before{transform:translate(26px)}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-value-switch .setting-card-value-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s;border-radius:34px}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-value-switch .setting-card-value-slider:before{position:absolute;content:"";height:26px;width:26px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.4s;transition:.4s;border-radius:50%}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-button{flex:5% 1 1;border-radius:0 5px 5px 0;border:1px solid white;background:#1f2a2d}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-button:hover,.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-button:focus{background:#4c5557}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-button:active{background:#626a6c}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-footer{padding:5px;display:flex;align-items:center;justify-content:end;gap:10px}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-footer .setting-card-button{font-size:1.1em;padding:5px;background-color:#2b2a33;border-radius:5px;border:1px solid rgb(117,116,122)}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-footer .setting-card-save-status-message{margin-right:10px;font-size:1.5em;line-height:initial;margin-top:auto;margin-bottom:auto}.page .content.dashboard.dashboard-config .setting-buttons{margin-top:10px}.page .content.dashboard.dashboard-config .setting-buttons .setting-buttons-button{flex:5% 1 1;font-size:1.2em;border-radius:5px;padding:5px 10px;border:1px solid white;background:#0080aa;margin-left:10px}.page .content.dashboard.dashboard-config .setting-buttons .setting-buttons-button:first-of-type{margin-left:0}.page .content.dashboard.dashboard-config .setting-buttons .setting-buttons-button:hover,.page .content.dashboard.dashboard-config .setting-buttons .setting-buttons-button:focus{background:#3399bb}.page .content.dashboard.dashboard-config .setting-buttons .setting-buttons-button:active{background:#4da6c4}.page .content.dashboard.dashboard-config .setting-buttons .setting-buttons-button.button__save-all{background:#175272}.page .content.dashboard.dashboard-config .setting-buttons .setting-buttons-button.button__save-all:hover,.page .content.dashboard.dashboard-config .setting-buttons .setting-buttons-button.button__save-all:focus{background:#45758e}.page .content.dashboard.dashboard-config .setting-buttons .setting-buttons-button.button__save-all:active{background:#5d869c}.page .content.dashboard.dashboard-config .api-info{background:#0080aa;border-radius:10px;padding:15px 10px}.page .content.dashboard.dashboard-config .api-info .api-info-title{font-size:1.5em;line-height:initial;font-weight:700}.page .content.dashboard.dashboard-config .api-info .language-buttons{margin-bottom:10px}.page .content.dashboard.dashboard-config .api-info .language-buttons .language-button{background:#27334d;border-radius:10px;padding:5px 10px;font-size:1.2em;line-height:initial;border:none;font-weight:700;margin-left:10px}.page .content.dashboard.dashboard-config .api-info .language-buttons .language-button:first-of-type{margin-left:0}.page .content.dashboard.dashboard-config .api-info .language-buttons .language-button.selected{background-color:#ffd027;color:#000}.page .content.dashboard.dashboard-config .api-info .language-buttons .language-button.selected:hover{background-color:#e9c02b}.page .content.dashboard.dashboard-config .api-info .language-buttons .language-button.selected:active{background-color:#d4b12f}.page .content.dashboard.dashboard-config .api-info .language-buttons .language-button:hover{background-color:#525c71}.page .content.dashboard.dashboard-config .api-info .language-buttons .language-button:active{background-color:#3d475f}.page .content.dashboard.dashboard-config .api-info .api-info-box{background-color:#000;padding:5px 10px;border-radius:10px;margin-bottom:10px}.page .content.dashboard.dashboard-config .api-info .api-info-section-title{font-size:1.2em;margin-top:10px}.dialog-overlay{position:fixed;top:0;left:0;bottom:0;right:0;z-index:1000;background-color:#fff9;display:flex;align-items:safe center;justify-content:safe center}.dialog-overlay .dialog{background-color:#1f2a2d;width:600px;max-width:90vw;border-radius:10px;padding:10px}.dialog-overlay .dialog .dialog-header{margin-bottom:10px}.dialog-overlay .dialog .dialog-header .dialog-heading{font-size:1.4em;font-weight:700;line-height:initial}.dialog-overlay .dialog.dialog__wide{width:1000px}.dialog-overlay .dialog-body{margin-top:5px;margin-bottom:5px}.dialog-overlay .dialog-body.dialog-form .dialog-input-label{font-size:1.2em;line-height:initial;margin-bottom:5px}.dialog-overlay .dialog-body.dialog-form .dialog-input{width:100%;border:none;border-radius:5px;padding:10px;font-size:1.2em;background-color:#27334d;color:#fff}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown{position:relative;width:100%;margin-bottom:5px}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown{display:flex;align-items:center;justify-content:space-between;border:none;border-radius:5px;padding:10px;font-size:1.2em;background-color:#27334d;color:#fff;cursor:pointer}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown .dialog-input-dropdown-dropdown-text{flex:1;overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;line-height:1em}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown .dialog-input-dropdown-dropdown-input{width:100%;height:100%;border:none;outline:none;padding:0;font-size:1em;background-color:transparent}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown .dialog-input-dropdown-dropdown-arrow{font-size:1.2em;margin-left:10px}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown-items{position:absolute;z-index:1000;background-color:#1f4260;border-radius:5px;padding:0;font-size:1.2em;color:#fff;cursor:pointer;width:100%;overflow-x:hidden;overflow-y:auto;max-height:50vh}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown-items.dialog-input-dropdown-dropdown-items__hidden{display:none}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown-items .dialog-input-dropdown-dropdown-item{padding:10px}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown-items .dialog-input-dropdown-dropdown-item .dialog-input-dropdown-dropdown-item-name{font-weight:700;display:block;font-size:1em}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown-items .dialog-input-dropdown-dropdown-item .dialog-input-dropdown-dropdown-item-username{font-size:.8em;display:block;color:#fff}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown-items .dialog-input-dropdown-dropdown-item.dialog-input-dropdown-dropdown-item__selected{background-color:#145a7c}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown-items .dialog-input-dropdown-dropdown-item.dialog-input-dropdown-dropdown-item__highlighted{background-color:#1b4a69}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown-items .dialog-input-dropdown-dropdown-item:last-of-type{border-bottom:none;margin-bottom:0}.dialog-overlay .dialog-body .dialog-input-large{width:100%;height:300px;border:none;border-radius:5px;padding:10px;font-size:1.2em;background-color:#27334d;color:#fff;resize:none}.dialog-overlay .dialog-footer .dialog-error{color:red;font-size:1.2em;line-height:initial;margin-bottom:10px}.dialog-overlay .dialog-footer .dialog-action{font-size:1.1em;padding:10px;border:none;border-radius:5px;margin-left:10px}.dialog-overlay .dialog-footer .dialog-action:first-of-type{margin-left:0}.dialog-overlay .dialog-footer .dialog-action.dialog-action__save{background-color:#0080aa}.dialog-overlay .dialog-footer .dialog-action.dialog-action__save:hover{background-color:#0c698e}.dialog-overlay .dialog-footer .dialog-action.dialog-action__save:active{background-color:#106185}.dialog-overlay .dialog-footer .dialog-action.dialog-action__cancel{background-color:#aaa;color:#000}.dialog-overlay .dialog-footer .dialog-action.dialog-action__cancel:hover{background-color:#c4c4c4}.dialog-overlay .dialog-footer .dialog-action.dialog-action__cancel:active{background-color:#ccc}.dialog-overlay .dialog-footer .dialog-action.dialog-action__delete{background-color:#900}.dialog-overlay .dialog-footer .dialog-action.dialog-action__delete:hover{background-color:#ad3333}.dialog-overlay .dialog-footer .dialog-action.dialog-action__delete:active{background-color:#b84d4d}.page.auth-page .content.auth-content{display:flex;justify-content:safe center;align-items:safe center}.page.auth-page .content.auth-content form.auth-form{background-color:#0080aa;overflow:hidden;border-radius:10px;width:400px;max-width:100vw}.page.auth-page .content.auth-content form.auth-form .auth-form-header{background-color:#175272;padding:5px 5px 0}.page.auth-page .content.auth-content form.auth-form .auth-form-header p{font-size:1.5em;line-height:1.5em;font-weight:700;margin:0}.page.auth-page .content.auth-content form.auth-form .auth-form-body{padding:10px}.page.auth-page .content.auth-content form.auth-form .auth-form-body .auth-form-input{margin-bottom:10px}.page.auth-page .content.auth-content form.auth-form .auth-form-body .auth-form-input-label{font-size:1.2em;line-height:1.2em;font-weight:700}.page.auth-page .content.auth-content form.auth-form .auth-form-body .auth-form-input-field{font-size:1.2em;line-height:1.2em;padding:5px;border:none;border-radius:5px;background-color:#27334d;color:#fff;width:100%}.page.auth-page .content.auth-content form.auth-form .auth-form-body .auth-form-input-error{font-size:1.1em;line-height:1.1em;color:#f66}.page.auth-page .content.auth-content form.auth-form .auth-form-footer{padding:0 10px 10px}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-submit-button{font-size:1.2em;line-height:1.2em;padding:5px 10px;border:none;border-radius:5px;background-color:#1f4260;color:#fff;font-weight:700;width:100%}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-submit-button:hover{background-color:#1b4a69}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-text{font-size:.9em;line-height:1.1em}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-link{text-decoration:underline;font-size:.9em}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-text>.auth-form-link{font-size:1em}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-oauth2 p{font-size:1.1em;line-height:1.1em;font-weight:700;margin:10px 0 0}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-oauth2 .auth-form-oauth2-buttons{display:flex;flex-direction:column;margin-top:2px}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-oauth2 .auth-form-oauth2-buttons .auth-form-oauth2-button{font-size:2em;line-height:1.1em;padding:5px 10px;border:none;border-radius:5px;background:#175272;color:#fff;font-weight:700;justify-content:center;align-items:center;display:flex}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-oauth2 .auth-form-oauth2-buttons .auth-form-oauth2-button p{font-size:.7em;display:inline-block;line-height:1.2em;margin:5px 0 0 10px;user-select:none}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-oauth2 .auth-form-oauth2-buttons .auth-form-oauth2-button:hover{background-color:#1b4a69}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-oauth2 .auth-form-oauth2-buttons .auth-form-oauth2-button:active{background-color:#1f4260}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-submit-error{margin-top:10px;font-size:1.1em;line-height:1.1em;font-weight:700;color:#f66}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-submit-success{margin-top:10px;font-size:1.1em;line-height:1.1em;font-weight:700;color:#9c9}/*! minireset.css v0.0.6 | MIT License | github.com/jgthms/minireset.css */html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0;font-family:Arial,Helvetica,sans-serif}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}ul{list-style:none}button,input,select{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}img,video{height:auto;max-width:100%}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} +:root{font-family:Inter,Avenir,Helvetica,Arial,sans-serif;font-size:16px;line-height:24px;font-weight:400;color-scheme:light dark;color:#dce6e8;background-color:#1f2a2d;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}*{box-sizing:border-box}a{color:inherit;text-decoration:inherit}body{margin:0;min-width:320px;min-height:100vh}.page{display:grid;grid-template-columns:300px 1fr;grid-template-rows:70px 1fr;grid-column-gap:10px;min-height:100vh}.page div.content{grid-area:1/1/3/3}.page nav.navbar,.page div.page-transition{grid-area:1/1/2/3}.page nav.navbar+div.content,.page div.page-transition+div.content{grid-area:2/1/3/3}nav.sidebar~.page div.content{grid-area:1/2/3/3;margin:0 10px 10px;border-radius:10px}nav.sidebar~.page nav.navbar,nav.sidebar~.page div.page-transition{grid-area:1/1/2/3}nav.sidebar~.page nav.navbar+div.content,nav.sidebar~.page div.page-transition+div.content{grid-area:2/2/3/3}nav.navbar{display:flex;position:relative;z-index:100;background-color:#1f2a2d}nav.navbar .navbar-brand{border-radius:50px;height:70px;width:70px;background-color:#1f2a2d;display:flex;align-items:center;justify-content:center;flex-shrink:0;z-index:50}nav.navbar .navbar-brand .navbar-logo{height:80%;width:80%;border-radius:50px;background-color:#0080aa;display:flex;justify-content:center;align-items:center}nav.navbar .navbar-brand .navbar-logo img{width:80%;height:80%}nav.navbar .navbar-links{flex:100%;height:50px;margin:10px 10px 0 -10px;z-index:25;background-color:#0080aa;border-radius:0 10px 10px 0;display:flex;justify-content:flex-end}nav.navbar .navbar-links .navbar-links-breadcrumb{flex:100% 1 1;background-color:#145a7c;padding-left:30px;display:flex;align-items:center;padding-top:3px;font-size:1.6em;line-height:initial;font-weight:700}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown{position:relative;height:auto;width:auto;margin-top:auto;margin-bottom:auto}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown .dialog-input-dropdown-dropdown{display:flex;align-items:center;justify-content:space-between;border:none;border-radius:5px;padding:3px;font-size:1em;line-height:1.2em;background-color:#27334d;color:#fff;cursor:pointer;width:100%}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown .dialog-input-dropdown-dropdown .dialog-input-dropdown-dropdown-text{flex:1;overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;line-height:1em}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown .dialog-input-dropdown-dropdown .dialog-input-dropdown-dropdown-input{width:100%;height:100%;border:none;outline:none;padding:0;font-size:1em;background-color:transparent}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown .dialog-input-dropdown-dropdown .dialog-input-dropdown-dropdown-icon{font-size:1em;padding-left:5px}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown .dialog-input-dropdown-dropdown-items{position:absolute;z-index:1000;background-color:#1f4260;border-radius:5px;padding:0;font-size:1em;color:#fff;cursor:pointer;width:auto;overflow-x:hidden;overflow-y:auto;max-height:50vh}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown .dialog-input-dropdown-dropdown-items.dialog-input-dropdown-dropdown-items__hidden{display:none}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown .dialog-input-dropdown-dropdown-items .dialog-input-dropdown-dropdown-item{padding:10px}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown .dialog-input-dropdown-dropdown-items .dialog-input-dropdown-dropdown-item .dialog-input-dropdown-dropdown-item-name{font-weight:700;display:block;font-size:1em;white-space:nowrap}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown .dialog-input-dropdown-dropdown-items .dialog-input-dropdown-dropdown-item.dialog-input-dropdown-dropdown-item__selected{background-color:#145a7c}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown .dialog-input-dropdown-dropdown-items .dialog-input-dropdown-dropdown-item.dialog-input-dropdown-dropdown-item__highlighted{background-color:#1b4a69}nav.navbar .navbar-links .navbar-links-breadcrumb .dialog-input-dropdown .dialog-input-dropdown-dropdown-items .dialog-input-dropdown-dropdown-item:last-of-type{border-bottom:none;margin-bottom:0}nav.navbar .navbar-links .navbar-links-breadcrumb .breadcrumb-page:hover{text-decoration:underline}nav.navbar .navbar-links .navbar-links-breadcrumb .breadcrumb-spacer{margin:0 5px}nav.navbar .navbar-links .navbar-link{height:100%;padding:7px 10px;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0}nav.navbar .navbar-links .navbar-link .navbar-link__text{margin-top:32px;transition-duration:.5s}nav.navbar .navbar-links .navbar-link .navbar-link__text div{display:inline-block}nav.navbar .navbar-links .navbar-link .navbar-link__text div svg{height:2em;width:2em;margin:0 2px}nav.navbar .navbar-links .navbar-link .navbar-link__decoration{width:60%;background-color:#27334d;border-radius:50px;align-items:center;flex:0 0 8px;margin-top:25px;transition-duration:.5s;line-height:1em;font-size:1em;display:inline-flex;opacity:0}nav.navbar .navbar-links .navbar-link .navbar-link__decoration .navbar-link__decoration__switch{height:6px;background-color:#fff;border-radius:50px;display:inline-block;margin:0 2px;transition-duration:.5s;flex:0 0 6px}nav.navbar .navbar-links .navbar-link:hover .navbar-link__text{margin-top:0}nav.navbar .navbar-links .navbar-link:hover .navbar-link__decoration{margin-top:0;opacity:1}nav.navbar .navbar-links .navbar-link.navbar-link__active .navbar-link__text{margin-top:0}nav.navbar .navbar-links .navbar-link.navbar-link__active .navbar-link__decoration{margin-top:0;opacity:1}nav.navbar .navbar-links .navbar-link.navbar-link__active .navbar-link__decoration .navbar-link__decoration__switch{margin-left:calc(100% - 8px)}.page .content{margin:0}.page .content.homepage{display:flex;flex-direction:column;align-items:center;justify-content:center}.page .content.homepage .page-title{text-align:center;font-size:2.5em;line-height:initial;font-weight:700;margin-bottom:50px;justify-self:auto}.page .content.homepage .content-demo{width:80%;max-width:1200px;height:200px;border-radius:10px;display:flex;flex-wrap:wrap}.page .content.homepage .content-demo .content-demo-flags,.page .content.homepage .content-demo .content-demo-site{flex:400px 1 0;height:100%;background:#161d20;border-radius:10px}.page .content.homepage .content-demo .content-demo-arrow{flex:100px 0 1;display:flex;align-items:center;justify-content:center;height:auto}.page .content.homepage .content-demo .content-demo-arrow svg{font-size:75px;width:75%;fill:#fff}nav.sidebar~.page .content{margin-left:0}nav.sidebar{position:fixed;margin:0;border-radius:0 10px 10px 0;padding:10px 0;top:70px;left:0;bottom:10px;width:300px;background-color:#27334d}nav.sidebar .sidebar-team{display:flex;flex-direction:column;padding-top:10px}nav.sidebar .sidebar-team:first-of-type{padding-top:0}nav.sidebar .sidebar-team div.sidebar-team-details{display:flex;align-items:center}nav.sidebar .sidebar-team div.sidebar-team-details div.sidebar-team-decoration{width:10px;height:25px;display:inline-block;color:#0080aa}nav.sidebar .sidebar-team div.sidebar-team-details div.sidebar-team-decoration svg{width:100%;height:100%}nav.sidebar .sidebar-team div.sidebar-team-details .sidebar-team-text{padding-left:5px;font-size:1.5em;display:inline-block}nav.sidebar .sidebar-team .sidebar-project-decoration-svg-has-config-before{display:none}nav.sidebar .sidebar-team .sidebar-project:has(.sidebar-config)+.sidebar-project .sidebar-project-decoration-svg-has-project-before{display:none}nav.sidebar .sidebar-team .sidebar-project:has(.sidebar-config)+.sidebar-project .sidebar-project-decoration-svg-has-config-before{display:inline}nav.sidebar .sidebar-team .sidebar-project{display:flex;flex-direction:column}nav.sidebar .sidebar-team .sidebar-project div.sidebar-project-details{display:flex;align-items:center}nav.sidebar .sidebar-team .sidebar-project div.sidebar-project-details div.sidebar-project-decoration{width:20px;height:25px;display:inline-block;color:#0080aa}nav.sidebar .sidebar-team .sidebar-project div.sidebar-project-details div.sidebar-project-decoration svg{width:100%;height:100%}nav.sidebar .sidebar-team .sidebar-project div.sidebar-project-details .sidebar-project-text{padding-left:5px;font-size:1.2em;display:inline-block}nav.sidebar .sidebar-team .sidebar-project .sidebar-config{display:flex;flex-direction:column}nav.sidebar .sidebar-team .sidebar-project .sidebar-config div.sidebar-config-details{display:flex;align-items:center}nav.sidebar .sidebar-team .sidebar-project .sidebar-config div.sidebar-config-details div.sidebar-config-decoration{width:30px;height:25px;display:inline-block;color:#0080aa}nav.sidebar .sidebar-team .sidebar-project .sidebar-config div.sidebar-config-details div.sidebar-config-decoration svg{width:100%;height:100%}nav.sidebar .sidebar-team .sidebar-project .sidebar-config div.sidebar-config-details .sidebar-config-text{font-size:1em;display:inline-block;padding-left:5px}.sidebar+.page nav.navbar{position:sticky;top:0}div.page-transition svg{width:100%;height:100%}.background--oxford-blue{background-color:#27334d}.background--celadon-blue{background-color:#0080aa}.text--oxford-blue{color:#27334d}.text--celadon-blue{color:#0080aa}.text--charleston-green{color:#1f2a2d}.page--shorter{min-height:calc(100vh - 20px)}.page .content.dashboard.dashboard-error{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;text-align:center}.page .content.dashboard.dashboard-error h1{font-size:3em;line-height:1.2em}.page .content.dashboard.dashboard-error p{font-size:1.5em;line-height:1.2em}.page .content.dashboard .dashboard-objects{margin-top:50px}.page .content.dashboard .dashboard-objects>h1{font-size:2em;line-height:initial}.page .content.dashboard .dashboard-objects:first-of-type{margin-top:0}.page .content.dashboard .dashboard-objects .dashboard-objects-list{display:flex;flex-wrap:wrap;gap:10px}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object{background-color:#0080aa;border-radius:5px;overflow:hidden;width:300px}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object.dashboard-objects-object__clickable{cursor:pointer}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object .dashboard-objects-object-header{background-color:#175272;display:flex;padding:5px 10px;align-items:center}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object .dashboard-objects-object-header .dashboard-objects-object-icon{width:50px;height:50px;overflow:hidden;display:flex;justify-content:center;align-items:center}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object .dashboard-objects-object-header .dashboard-objects-object-icon *{width:100%;height:100%}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object .dashboard-objects-object-header .dashboard-objects-object-actions{display:flex;gap:10px;justify-content:flex-end;flex:0px 1 0;height:100%}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object .dashboard-objects-object-header .dashboard-objects-object-actions .dashboard-objects-object-action{background-color:#27334d;border:none;border-radius:5px;padding:5px 10px;color:#fff;flex:35px 0 0;height:100%}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object .dashboard-objects-object-header .dashboard-objects-object-actions .dashboard-objects-object-action:hover{color:#d4d6db}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object .dashboard-objects-object-header .dashboard-objects-object-actions .dashboard-objects-object-action:active{color:#a9adb8}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object .dashboard-objects-object-header .dashboard-objects-object-actions .dashboard-objects-object-action svg{width:100%;height:100%}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object .dashboard-objects-object-header .dashboard-objects-object-name{font-size:1.4em;font-weight:700;margin-left:10px;user-select:none}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object .dashboard-objects-object-body{padding:5px 10px}.page .content.dashboard .dashboard-objects .dashboard-objects-list .dashboard-objects-object .dashboard-objects-object-body p{user-select:none}.page .content.dashboard.dashboard-config{display:flex;flex-direction:column}.page .content.dashboard.dashboard-config .dashboard-spacer{flex:10px 1 0}.page .content.dashboard.dashboard-config .setting-cards{display:flex;flex-wrap:wrap;gap:10px}.page .content.dashboard.dashboard-config .setting-cards>h2{font-size:2em;line-height:initial;width:100%}.page .content.dashboard.dashboard-config .setting-cards .setting-card{background-color:#0080aa;border-radius:10px;overflow:hidden;flex:400px 1 1}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-header{background-color:#175272;padding:5px}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-header .setting-card-title{font-weight:700;font-size:1.2em;line-height:initial}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-header .setting-card-key{margin-left:auto;font-size:1em;line-height:initial}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body{padding:5px;display:flex}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-value{flex:95% 1 1;border-radius:5px 0 0 5px;border:1px solid white;background:#1f2a2d;padding:5px;font-size:1.1em}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-value:focus,.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-value:active{outline:2px solid #fca311}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-value-switch{position:relative;display:inline-block;width:60px;height:34px}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-value-switch .setting-card-value{opacity:0;width:0;height:0}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-value-switch .setting-card-value:checked+.setting-card-value-slider{background-color:#175272}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-value-switch .setting-card-value:checked+.setting-card-value-slider:before{transform:translate(26px)}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-value-switch .setting-card-value-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s;border-radius:34px}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-value-switch .setting-card-value-slider:before{position:absolute;content:"";height:26px;width:26px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.4s;transition:.4s;border-radius:50%}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-button{flex:5% 1 1;border-radius:0 5px 5px 0;border:1px solid white;background:#1f2a2d}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-button:hover,.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-button:focus{background:#4c5557}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-body .setting-card-button:active{background:#626a6c}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-footer{padding:5px;display:flex;align-items:center;justify-content:end;gap:10px}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-footer .setting-card-button{font-size:1.1em;padding:5px;background-color:#2b2a33;border-radius:5px;border:1px solid rgb(117,116,122)}.page .content.dashboard.dashboard-config .setting-cards .setting-card .setting-card-footer .setting-card-save-status-message{margin-right:10px;font-size:1.5em;line-height:initial;margin-top:auto;margin-bottom:auto}.page .content.dashboard.dashboard-config .setting-buttons{margin-top:10px}.page .content.dashboard.dashboard-config .setting-buttons .setting-buttons-button{flex:5% 1 1;font-size:1.2em;border-radius:5px;padding:5px 10px;border:1px solid white;background:#0080aa;margin-left:10px}.page .content.dashboard.dashboard-config .setting-buttons .setting-buttons-button:first-of-type{margin-left:0}.page .content.dashboard.dashboard-config .setting-buttons .setting-buttons-button:hover,.page .content.dashboard.dashboard-config .setting-buttons .setting-buttons-button:focus{background:#3399bb}.page .content.dashboard.dashboard-config .setting-buttons .setting-buttons-button:active{background:#4da6c4}.page .content.dashboard.dashboard-config .setting-buttons .setting-buttons-button.button__save-all{background:#175272}.page .content.dashboard.dashboard-config .setting-buttons .setting-buttons-button.button__save-all:hover,.page .content.dashboard.dashboard-config .setting-buttons .setting-buttons-button.button__save-all:focus{background:#45758e}.page .content.dashboard.dashboard-config .setting-buttons .setting-buttons-button.button__save-all:active{background:#5d869c}.page .content.dashboard.dashboard-config .api-info{background:#0080aa;border-radius:10px;padding:15px 10px}.page .content.dashboard.dashboard-config .api-info .api-info-title{font-size:1.5em;line-height:initial;font-weight:700}.page .content.dashboard.dashboard-config .api-info .language-buttons{margin-bottom:10px}.page .content.dashboard.dashboard-config .api-info .language-buttons .language-button{background:#27334d;border-radius:10px;padding:5px 10px;font-size:1.2em;line-height:initial;border:none;font-weight:700;margin-left:10px}.page .content.dashboard.dashboard-config .api-info .language-buttons .language-button:first-of-type{margin-left:0}.page .content.dashboard.dashboard-config .api-info .language-buttons .language-button.selected{background-color:#ffd027;color:#000}.page .content.dashboard.dashboard-config .api-info .language-buttons .language-button.selected:hover{background-color:#e9c02b}.page .content.dashboard.dashboard-config .api-info .language-buttons .language-button.selected:active{background-color:#d4b12f}.page .content.dashboard.dashboard-config .api-info .language-buttons .language-button:hover{background-color:#525c71}.page .content.dashboard.dashboard-config .api-info .language-buttons .language-button:active{background-color:#3d475f}.page .content.dashboard.dashboard-config .api-info .api-info-box{background-color:#000;padding:5px 10px;border-radius:10px;margin-bottom:10px}.page .content.dashboard.dashboard-config .api-info .api-info-section-title{font-size:1.2em;margin-top:10px}.dialog-overlay{position:fixed;top:0;left:0;bottom:0;right:0;z-index:1000;background-color:#fff9;display:flex;align-items:safe center;justify-content:safe center}.dialog-overlay .dialog{background-color:#1f2a2d;width:600px;max-width:90vw;border-radius:10px;padding:10px}.dialog-overlay .dialog .dialog-header{margin-bottom:10px}.dialog-overlay .dialog .dialog-header .dialog-heading{font-size:1.4em;font-weight:700;line-height:initial}.dialog-overlay .dialog.dialog__wide{width:1000px}.dialog-overlay .dialog-body{margin-top:5px;margin-bottom:5px}.dialog-overlay .dialog-body.dialog-form .dialog-input-label{font-size:1.2em;line-height:initial;margin-bottom:5px}.dialog-overlay .dialog-body.dialog-form .dialog-input{width:100%;border:none;border-radius:5px;padding:10px;font-size:1.2em;background-color:#27334d;color:#fff}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown{position:relative;width:100%;margin-bottom:5px}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown{display:flex;align-items:center;justify-content:space-between;border:none;border-radius:5px;padding:10px;font-size:1.2em;background-color:#27334d;color:#fff;cursor:pointer}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown .dialog-input-dropdown-dropdown-text{flex:1;overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;line-height:1em}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown .dialog-input-dropdown-dropdown-input{width:100%;height:100%;border:none;outline:none;padding:0;font-size:1em;background-color:transparent}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown .dialog-input-dropdown-dropdown-arrow{font-size:1.2em;margin-left:10px}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown-items{position:absolute;z-index:1000;background-color:#1f4260;border-radius:5px;padding:0;font-size:1.2em;color:#fff;cursor:pointer;width:100%;overflow-x:hidden;overflow-y:auto;max-height:50vh}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown-items.dialog-input-dropdown-dropdown-items__hidden{display:none}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown-items .dialog-input-dropdown-dropdown-item{padding:10px}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown-items .dialog-input-dropdown-dropdown-item .dialog-input-dropdown-dropdown-item-name{font-weight:700;display:block;font-size:1em}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown-items .dialog-input-dropdown-dropdown-item .dialog-input-dropdown-dropdown-item-username{font-size:.8em;display:block;color:#fff}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown-items .dialog-input-dropdown-dropdown-item.dialog-input-dropdown-dropdown-item__selected{background-color:#145a7c}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown-items .dialog-input-dropdown-dropdown-item.dialog-input-dropdown-dropdown-item__highlighted{background-color:#1b4a69}.dialog-overlay .dialog-body.dialog-form .dialog-input-dropdown .dialog-input-dropdown-dropdown-items .dialog-input-dropdown-dropdown-item:last-of-type{border-bottom:none;margin-bottom:0}.dialog-overlay .dialog-body .dialog-input-large{width:100%;height:300px;border:none;border-radius:5px;padding:10px;font-size:1.2em;background-color:#27334d;color:#fff;resize:none}.dialog-overlay .dialog-footer .dialog-error{color:red;font-size:1.2em;line-height:initial;margin-bottom:10px}.dialog-overlay .dialog-footer .dialog-action{font-size:1.1em;padding:10px;border:none;border-radius:5px;margin-left:10px}.dialog-overlay .dialog-footer .dialog-action:first-of-type{margin-left:0}.dialog-overlay .dialog-footer .dialog-action.dialog-action__save{background-color:#0080aa}.dialog-overlay .dialog-footer .dialog-action.dialog-action__save:hover{background-color:#0c698e}.dialog-overlay .dialog-footer .dialog-action.dialog-action__save:active{background-color:#106185}.dialog-overlay .dialog-footer .dialog-action.dialog-action__cancel{background-color:#aaa;color:#000}.dialog-overlay .dialog-footer .dialog-action.dialog-action__cancel:hover{background-color:#c4c4c4}.dialog-overlay .dialog-footer .dialog-action.dialog-action__cancel:active{background-color:#ccc}.dialog-overlay .dialog-footer .dialog-action.dialog-action__delete{background-color:#900}.dialog-overlay .dialog-footer .dialog-action.dialog-action__delete:hover{background-color:#ad3333}.dialog-overlay .dialog-footer .dialog-action.dialog-action__delete:active{background-color:#b84d4d}.page.auth-page .content.auth-content{display:flex;justify-content:safe center;align-items:safe center}.page.auth-page .content.auth-content form.auth-form{background-color:#0080aa;overflow:hidden;border-radius:10px;width:400px;max-width:100vw}.page.auth-page .content.auth-content form.auth-form .auth-form-header{background-color:#175272;padding:5px 5px 0}.page.auth-page .content.auth-content form.auth-form .auth-form-header p{font-size:1.5em;line-height:1.5em;font-weight:700;margin:0}.page.auth-page .content.auth-content form.auth-form .auth-form-body{padding:10px}.page.auth-page .content.auth-content form.auth-form .auth-form-body .auth-form-input{margin-bottom:10px}.page.auth-page .content.auth-content form.auth-form .auth-form-body .auth-form-input-label{font-size:1.2em;line-height:1.2em;font-weight:700}.page.auth-page .content.auth-content form.auth-form .auth-form-body .auth-form-input-field{font-size:1.2em;line-height:1.2em;padding:5px;border:none;border-radius:5px;background-color:#27334d;color:#fff;width:100%}.page.auth-page .content.auth-content form.auth-form .auth-form-body .auth-form-input-error{font-size:1.1em;line-height:1.1em;color:#f66}.page.auth-page .content.auth-content form.auth-form .auth-form-footer{padding:0 10px 10px}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-submit-button{font-size:1.2em;line-height:1.2em;padding:5px 10px;border:none;border-radius:5px;background-color:#1f4260;color:#fff;font-weight:700;width:100%}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-submit-button:hover{background-color:#1b4a69}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-text{font-size:.9em;line-height:1.1em}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-link{text-decoration:underline;font-size:.9em}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-text>.auth-form-link{font-size:1em}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-oauth2 p{font-size:1.1em;line-height:1.1em;font-weight:700;margin:10px 0 0}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-oauth2 .auth-form-oauth2-buttons{display:flex;flex-direction:column;margin-top:2px}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-oauth2 .auth-form-oauth2-buttons .auth-form-oauth2-button{font-size:2em;line-height:1.1em;padding:5px 10px;border:none;border-radius:5px;background:#175272;color:#fff;font-weight:700;justify-content:center;align-items:center;display:flex}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-oauth2 .auth-form-oauth2-buttons .auth-form-oauth2-button p{font-size:.7em;display:inline-block;line-height:1.2em;margin:5px 0 0 10px;user-select:none}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-oauth2 .auth-form-oauth2-buttons .auth-form-oauth2-button:hover{background-color:#1b4a69}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-oauth2 .auth-form-oauth2-buttons .auth-form-oauth2-button:active{background-color:#1f4260}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-submit-error{margin-top:10px;font-size:1.1em;line-height:1.1em;font-weight:700;color:#f66}.page.auth-page .content.auth-content form.auth-form .auth-form-footer .auth-form-submit-success{margin-bottom:10px;font-size:1.1em;line-height:1.1em;font-weight:700;color:#e6f2e6}/*! minireset.css v0.0.6 | MIT License | github.com/jgthms/minireset.css */html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0;font-family:Arial,Helvetica,sans-serif}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}ul{list-style:none}button,input,select{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}img,video{height:auto;max-width:100%}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} diff --git a/ui/dist/index.html b/ui/dist/index.html index 402b814..c74fafc 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -5,8 +5,8 @@ ConfigDN - - + +
diff --git a/ui/src/components/dashboard/config/SettingCard.tsx b/ui/src/components/dashboard/config/SettingCard.tsx index 6284f72..f8ecad0 100644 --- a/ui/src/components/dashboard/config/SettingCard.tsx +++ b/ui/src/components/dashboard/config/SettingCard.tsx @@ -17,7 +17,7 @@ export default function SettingCard(props: { flag: FlagRecord, originalValue: Va const {flag, originalValue, value, setValue: setValue2, saveValue} = props; function setValue(value: string) { - let clone = props.value.clone() as ValueRecordString; + let clone = {...props.value} as ValueRecordString; clone.value = value; diff --git a/ui/src/routes/Dashboards/Config.tsx b/ui/src/routes/Dashboards/Config.tsx index 6d080fd..6594d8d 100644 --- a/ui/src/routes/Dashboards/Config.tsx +++ b/ui/src/routes/Dashboards/Config.tsx @@ -137,15 +137,15 @@ export default function Config() { const newValues = valuesInDB.map((v) => { const type = flagsData.find(f => f.id === v.flag)?.type; - v = v.clone() as ValueRecordString; + v = {...v} as ValueRecordString; v.value = specialJsonLoad(v.value, type); return v as ValueRecordString; }); - setOriginalValues(newValues.map(v => v.clone() as ValueRecordString)); - setEditedValues(newValues.map(v => v.clone() as ValueRecordString)); + setOriginalValues(newValues.map(v => ({...v} as ValueRecordString))); + setEditedValues(newValues.map(v => ({...v} as ValueRecordString))); }, [valuesInDB, flagsData]); useEffect(() => { @@ -190,14 +190,14 @@ export default function Config() { value: getDefaultValue(newFlagType.value) }).then((response) => { setFlags(flags => { - return [...flags, responseFlag.clone() as FlagRecord]; + return [...flags, {...responseFlag} as FlagRecord]; }); // update value to use string response.value = specialJsonStringify(response.value, newFlagType.value); - setEditedValues(editedValues => [...editedValues, response.clone() as ValueRecordString]); - setOriginalValues(originalValues => [...originalValues, response.clone() as ValueRecordString]); + setEditedValues(editedValues => [...editedValues, {...response} as ValueRecordString]); + setOriginalValues(originalValues => [...originalValues, {...response} as ValueRecordString]); setNewFlagDialogShowing(false); }).catch((error) => { @@ -294,8 +294,8 @@ export default function Config() { // update value to use string response.value = specialJsonStringify(response.value, flag.type); - setEditedValues(editedValues => [...editedValues, response.clone() as ValueRecordString]); - setOriginalValues(originalValues => [...originalValues, response.clone() as ValueRecordString]); + setEditedValues(editedValues => [...editedValues, {...response} as ValueRecordString]); + setOriginalValues(originalValues => [...originalValues, {...response} as ValueRecordString]); }).catch((error) => { console.error(error); }); @@ -325,7 +325,7 @@ export default function Config() { function toValueRecordString(value: ValueRecord): ValueRecordString { const type = flagsData.find((f) => f.id === value.flag)?.type; - const newValue = value.clone(); + const newValue = {...value}; newValue.value = specialJsonLoad(value.value, type); return newValue as ValueRecordString; @@ -340,7 +340,7 @@ export default function Config() { const previousValue = originalValues[previousValueIndex]; if (JSON.stringify(previousValue.value) !== JSON.stringify(editedValues[i].value)) { - const editedValueClone = editedValue.clone(); + const editedValueClone = {...editedValue} editedValueClone.value = specialJsonParse(editedValue.value, flagsData.find((f) => f.id === editedValue.flag)?.type); pocketbase.collection('value').update(editedValue.id, editedValueClone); @@ -358,7 +358,7 @@ export default function Config() { } try { - const newVal = value.clone(); + const newVal = {...value}; newVal.value = specialJsonParse(value.value, flagsData.find((f) => f.id === value.flag)?.type) const record = await pocketbase.collection('value').update(value.id, newVal); diff --git a/ui/src/routes/Dashboards/Team.tsx b/ui/src/routes/Dashboards/Team.tsx index ccc4e66..9be0ca9 100644 --- a/ui/src/routes/Dashboards/Team.tsx +++ b/ui/src/routes/Dashboards/Team.tsx @@ -2,7 +2,7 @@ import pocketbase from "../../libraries/Pocketbase"; import {useLoaderData, useNavigate} from "react-router-dom"; import {ProjectRecord, TeamRecord, UserRecord} from "../../types/Structures"; import DashboardUserSection from "../../components/dashboard/DashboardUserSection"; -import React, {useEffect, useState} from "preact/compat"; +import {useEffect, useState} from "preact/compat"; import DashboardObjects from "../../components/dashboard/DashboardObjects"; import DashboardObjectsTitle from "../../components/dashboard/DashboardObjectsTitle"; import DashboardObjectsList from "../../components/dashboard/DashboardObjectsList"; @@ -264,10 +264,10 @@ export default function Team() { [userRole.value]: [...team[userRole.value], userToAdd.id], }).then(() => { // need to add it manually because otherwise we lose the extra data - const userObjectClone = userToAdd.clone() as UserRecord; + const userObjectClone = {...userToAdd} as UserRecord; setTeam(team => { - let teamClone = team.clone() as TeamRecord; + let teamClone = {...team} as TeamRecord; teamClone[userRole.value].push(userObjectClone.id);