From 99e64a6c23a376c300f2df68943e582fb9d1c909 Mon Sep 17 00:00:00 2001 From: Lisa Kim Date: Tue, 1 Mar 2022 18:31:42 -0800 Subject: [PATCH] a18685fe Maintain aspect ratio on Desktop Playback (gravitational/webapps#635) https://github.com/gravitational/webapps/commit/a18685fe --- e | 2 +- .../{52.5c9b60f080c0cd8c5422.js => 52.5a9ecb1b1434fedbc90f.js} | 0 teleport/app/app.7da0781832e664c39f82.js | 1 + teleport/app/app.c788e6600f7be52b731c.js | 1 - ...r.c788e6600f7be52b731c.js => vendor.7da0781832e664c39f82.js} | 2 +- ...s.LICENSE.txt => vendor.7da0781832e664c39f82.js.LICENSE.txt} | 0 teleport/index.html | 2 +- 7 files changed, 4 insertions(+), 4 deletions(-) rename teleport/app/{52.5c9b60f080c0cd8c5422.js => 52.5a9ecb1b1434fedbc90f.js} (100%) create mode 100644 teleport/app/app.7da0781832e664c39f82.js delete mode 100644 teleport/app/app.c788e6600f7be52b731c.js rename teleport/app/{vendor.c788e6600f7be52b731c.js => vendor.7da0781832e664c39f82.js} (99%) rename teleport/app/{vendor.c788e6600f7be52b731c.js.LICENSE.txt => vendor.7da0781832e664c39f82.js.LICENSE.txt} (100%) diff --git a/e b/e index eb1d6f4..2f512a5 160000 --- a/e +++ b/e @@ -1 +1 @@ -Subproject commit eb1d6f496a1a0e20bdd6a743762733df452934b0 +Subproject commit 2f512a57a5a439d67ead3210c20ba57ee5fe5a34 diff --git a/teleport/app/52.5c9b60f080c0cd8c5422.js b/teleport/app/52.5a9ecb1b1434fedbc90f.js similarity index 100% rename from teleport/app/52.5c9b60f080c0cd8c5422.js rename to teleport/app/52.5a9ecb1b1434fedbc90f.js diff --git a/teleport/app/app.7da0781832e664c39f82.js b/teleport/app/app.7da0781832e664c39f82.js new file mode 100644 index 0000000..55cf5e8 --- /dev/null +++ b/teleport/app/app.7da0781832e664c39f82.js @@ -0,0 +1 @@ +(()=>{var e,t,n,r={"+2B0":(e,t,n)=>{"use strict";n.d(t,{b0:()=>y,kI:()=>m,fB:()=>w,ZP:()=>B});var r,o=n("ERkP"),i=n("Qm3L"),c=n("aWzz"),a=n.n(c),s=n("x0Gi"),u=n("v25O");function A(){return A=Object.assign||function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>g});var r,o=n("Qm3L"),i=n("v25O"),c=n("x0Gi");function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t{"use strict";n.d(t,{ZP:()=>w,DF:()=>B,PL:()=>E,ku:()=>b,U3:()=>I});var r,o=n("ERkP"),i=n("Qm3L"),c=n("aWzz"),a=n.n(c),s=n("x0Gi"),u=n("v25O"),A=["children","setRef"];function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,A);return o.createElement(m,p({},r,{ref:n}),t)},m=i.ZP.button(r||(d=["\n line-height: 1.5;\n margin: 0;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n box-sizing: border-box;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-family: inherit;\n font-weight: 600;\n outline: none;\n position: relative;\n text-align: center;\n text-decoration: none;\n text-transform: uppercase;\n transition: all 0.3s;\n -webkit-font-smoothing: antialiased;\n\n &:active {\n opacity: 0.56;\n }\n\n ","\n"],h||(h=d.slice(0)),r=Object.freeze(Object.defineProperties(d,{raw:{value:Object.freeze(h)}}))),(function(e){var t=e.theme.colors,n={color:t.text.primary,"&:disabled":{background:t.action.disabledBackground,color:t.action.disabled}};return f(f(f(f(f(f(f({},function(e){var t=e.kind,n=e.theme;switch(t){case"secondary":return{background:n.colors.primary.light,"&:hover, &:focus":{background:n.colors.primary.lighter}};case"border":return{background:n.colors.primary.lighter,border:"1px solid "+n.colors.primary.main,opacity:".87","&:hover, &:focus":{background:n.colors.primary.lighter,border:"1px solid "+n.colors.action.hover,opacity:1},"&:active":{opacity:.24}};case"warning":return{background:n.colors.error.dark,"&:hover, &:focus":{background:n.colors.error.main}};default:return{background:n.colors.secondary.main,"&:hover, &:focus":{background:n.colors.secondary.light},"&:active":{background:n.colors.secondary.dark}}}}(e)),n),function(e){switch(e.size){case"small":return{fontSize:"10px",minHeight:"24px",padding:"0px 16px"};case"large":return{minHeight:"40px",fontSize:"12px",padding:"0px 40px"};default:return{minHeight:"32px",fontSize:"12px",padding:"0px 24px"}}}(e)),(0,s.Dh)(e)),(0,s.bf)(e)),function(e){return e.block?{width:"100%"}:null}(e)),(0,s.Cb)(e))}));y.propTypes=f(f({block:a().bool,kind:a().string,size:a().string},s.Dh.propTypes),s.Cb.propTypes),y.defaultProps={size:"medium",kind:"primary"},m.defaultProps={theme:u.Z},y.displayName="Button";const w=y;var B=function(e){return o.createElement(y,p({kind:"primary"},e))},E=function(e){return o.createElement(y,p({kind:"secondary"},e))},b=function(e){return o.createElement(y,p({kind:"border"},e))},I=function(e){return o.createElement(y,p({kind:"warning"},e))}},qD9L:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>o,DF:()=>r.DF,U3:()=>r.U3,PL:()=>r.PL,ku:()=>r.ku});var r=n("cOAj");const o=r.ZP},merR:(e,t,n)=>{"use strict";n.d(t,{Z:()=>A});var r,o,i,c=n("Qm3L"),a=n("UwTl"),s=n("v25O"),u=(0,c.ZP)(a.Z)(r||(o=["\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.24);\n border-radius: 8px;\n"],i||(i=o.slice(0)),r=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(i)}}))));u.defaultProps={theme:s.Z,bg:"primary.light"},u.displayName="Card";const A=u},aj0S:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r,o=n("Qm3L"),i=n("x0Gi"),c=n("v25O"),a=n("UwTl");function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t{"use strict";n.d(t,{mm:()=>g,qH:()=>p,K5:()=>d,ol:()=>h,Sp:()=>y,Dz:()=>m,E_:()=>w,N7:()=>B,m3:()=>E,yG:()=>b,id:()=>I,rN:()=>C,zl:()=>v,TU:()=>Q,ob:()=>M,x8:()=>D,vu:()=>F,Cc:()=>S,Oz:()=>U,Qy:()=>P,vo:()=>j,Hi:()=>O,UW:()=>Y,mH:()=>x,C_:()=>k,Ey:()=>N,ie:()=>T,kJ:()=>R,SK:()=>L,kI:()=>z,RG:()=>J,YJ:()=>G,OG:()=>H,aV:()=>K,Tv:()=>V,P0:()=>W,LT:()=>Z,HE:()=>q,RK:()=>X,Bd:()=>_,mR:()=>$,Lk:()=>ee,HN:()=>te,xF:()=>ne,PE:()=>re,Hz:()=>oe,tX:()=>ie,$j:()=>ce,oI:()=>ae,Sl:()=>se,gq:()=>ue,n5:()=>Ae,Q:()=>le,s2:()=>fe,$8:()=>ge,de:()=>pe,ZP:()=>de});var r,o=n("ERkP"),i=n("Qm3L"),c=n("GkOb"),a=(n("MgJD"),["className"]);function s(){return s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,a),c="".concat(n," ").concat(r);return o.createElement(l,s({className:c},i))}}l.displayName="Icon",l.defaultProps={color:"light"};var g=f(0,"icon-add"),p=(f(0,"icon-users-plus"),f(0,"icon-amazonaws")),d=(f(0,"icon-cc-amex"),f(0,"icon-apartment"),f(0,"icon-app-installed"),f(0,"icon-apple"),f(0,"icon-app-rollback"),f(0,"icon-archive2"),f(0,"icon-chevron-down")),h=(f(0,"icon-chevron-left"),f(0,"icon-chevron-right")),y=(f(0,"icon-chevrons-expand-vertical"),f(0,"icon-chevron-up"),f(0,"icon-alarm-ringing")),m=(f(0,"icon-bag-dollar"),f(0,"icon-bitbucket")),w=(f(0,"icon-bubble"),f(0,"icon-camera"),f(0,"icon-th-large"),f(0,"icon-th"),f(0,"icon-caret-left"),f(0,"icon-caret-right"),f(0,"icon-caret-down")),B=(f(0,"icon-caret-left"),f(0,"icon-caret-right"),f(0,"icon-sort"),f(0,"icon-caret-up"),f(0,"icon-cash-dollar"),f(0,"icon-chevron-down-circle"),f(0,"icon-chevron-left-circle"),f(0,"icon-chevron-right-circle"),f(0,"icon-chevron-up-circle"),f(0,"icon-arrow-left-circle")),E=f(0,"icon-arrow-right-circle"),b=f(0,"icon-checkmark-circle"),I=(f(0,"icon-cross-circle"),f(0,"icon-pause-circle")),C=f(0,"icon-play-circle"),v=(f(0,"icon-stop-circle"),f(0,"icon-terminal")),Q=f(0,"icon-clipboard-text"),M=f(0,"icon-clipboard-user"),D=f(0,"icon-close"),F=(f(0,"icon-cloud"),f(0,"icon-cloud-sync"),f(0,"icon-site-map")),S=f(0,"icon-icons2"),U=(f(0,"icon-cluster-added"),f(0,"icon-cluster-auth"),f(0,"icon-code"),f(0,"icon-cog")),P=(f(0,"icon-config"),f(0,"icon-frame-contract"),f(0,"icon-credit-card1"),f(0,"icon-credit-card-alt"),f(0,"icon-credit-card")),j=(f(0,"icon-cross"),f(0,"icon-database")),O=f(0,"icon-desktop"),Y=(f(0,"icon-cc-discover"),f(0,"icon-get_app")),x=(f(0,"icon-earth"),f(0,"icon-pencil4"),f(0,"icon-ellipsis")),k=(f(0,"icon-email-solid"),f(0,"icon-envelope-open"),f(0,"icon-equalizer"),f(0,"icon-equalizer1")),N=(f(0,"icon-frame-expand"),f(0,"icon-facebook"),f(0,"icon-facebook2"),f(0,"icon-file-code"),f(0,"icon-add-fowarder"),f(0,"icon-github")),T=f(0,"icon-google-plus"),R=f(0,"icon-graph"),L=f(0,"icon-home3"),z=f(0,"icon-info_outline"),J=f(0,"icon-keypair"),G=f(0,"icon-kubernetes"),H=(f(0,"icon-label"),f(0,"icon-lan"),f(0,"icon-lan2")),K=(f(0,"icon-layers"),f(0,"icon-layers1"),f(0,"icon-license2"),f(0,"icon-link"),f(0,"icon-linkedin"),f(0,"icon-linux"),f(0,"icon-list")),V=f(0,"icon-list1"),W=(f(0,"icon-playlist_add_check"),f(0,"icon-list4"),f(0,"icon-list3")),Z=(f(0,"icon-th-list"),f(0,"icon-local_play")),q=f(0,"icon-lock"),X=(f(0,"icon-magnifier"),f(0,"icon-cc-mastercard"),f(0,"icon-memory"),f(0,"icon-more_horiz"),f(0,"icon-more_vert"),f(0,"icon-mute"),f(0,"icon-new-tab")),_=(f(0,"icon-note_add"),f(0,"icon-notifications_active")),$=f(0,"icon-openid"),ee=(f(0,"icon-paper-plane"),f(0,"icon-cc-paypal"),f(0,"icon-pencil"),f(0,"icon-person"),f(0,"icon-person_add"),f(0,"icon-phonelink_erase"),f(0,"icon-phonelink_setup"),f(0,"icon-planet"),f(0,"icon-play"),f(0,"icon-power-switch")),te=(f(0,"icon-profile"),f(0,"icon-question-circle")),ne=(f(0,"icon-restore"),f(0,"icon-server")),re=(f(0,"icon-settings_input_composite"),f(0,"icon-settings_overscan"),f(0,"icon-share"),f(0,"icon-chart-bars"),f(0,"icon-shield-check"),f(0,"icon-shrink"),f(0,"icon-arrow_drop_down"),f(0,"icon-arrow_drop_up"),f(0,"icon-chevrons-expand-vertical")),oe=f(0,"icon-chevron-up"),ie=f(0,"icon-chevron-down"),ce=(f(0,"icon-speed-fast"),f(0,"icon-spinner8")),ae=(f(0,"icon-stars"),f(0,"icon-cc-stripe"),f(0,"icon-sync2"),f(0,"icon-tablet2"),f(0,"icon-tags"),f(0,"icon-cli")),se=(f(0,"icon-trash2"),f(0,"icon-twitter"),f(0,"icon-usb-drive"),f(0,"icon-unarchive"),f(0,"icon-unlock")),ue=f(0,"icon-file_upload"),Ae=f(0,"icon-user"),le=(f(0,"icon-user-created"),f(0,"icon-users2")),fe=(f(0,"icon-videogame_asset"),f(0,"icon-cc-visa"),f(0,"icon-volume-high"),f(0,"icon-vpn_key")),ge=f(0,"icon-magic-wand"),pe=(f(0,"icon-warning"),f(0,"icon-wifi"),f(0,"icon-windows"));f(0,"icon-youtube");const de=l},NL5n:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>o,mm:()=>r.mm,qH:()=>r.qH,K5:()=>r.K5,ol:()=>r.ol,Sp:()=>r.Sp,Dz:()=>r.Dz,E_:()=>r.E_,N7:()=>r.N7,m3:()=>r.m3,yG:()=>r.yG,id:()=>r.id,rN:()=>r.rN,zl:()=>r.zl,TU:()=>r.TU,ob:()=>r.ob,x8:()=>r.x8,vu:()=>r.vu,Cc:()=>r.Cc,Oz:()=>r.Oz,vo:()=>r.vo,Hi:()=>r.Hi,UW:()=>r.UW,mH:()=>r.mH,C_:()=>r.C_,Ey:()=>r.Ey,ie:()=>r.ie,kJ:()=>r.kJ,SK:()=>r.SK,YJ:()=>r.YJ,OG:()=>r.OG,P0:()=>r.P0,Tv:()=>r.Tv,LT:()=>r.LT,HE:()=>r.HE,RK:()=>r.RK,Bd:()=>r.Bd,mR:()=>r.mR,Lk:()=>r.Lk,HN:()=>r.HN,xF:()=>r.xF,PE:()=>r.PE,Hz:()=>r.Hz,tX:()=>r.tX,$j:()=>r.$j,oI:()=>r.oI,gq:()=>r.gq,n5:()=>r.n5,Q:()=>r.Q,$8:()=>r.$8,de:()=>r.de});var r=n("UvTA");const o=r.ZP},"ICW/":(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r,o=n("ERkP"),i=n("Qm3L"),c=n("aWzz"),a=n.n(c),s=n("x0Gi");function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t{"use strict";n.d(t,{sq:()=>g,ZP:()=>p});var r,o=n("ERkP"),i=n("Qm3L"),c=n("x0Gi"),a=n("aWzz"),s=n.n(a);function u(){return u=Object.assign||function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>k});var r,o=n("ERkP"),i=n("aWzz"),c=n.n(i),a=n("7nmT");function s(e){if(!r&&0!==r||e){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),r=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return r}var u,A=n("JhHO"),l=n("Qm3L");function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}var g=["children"];function p(){return p=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,g);return o.createElement(I,p({role:"menu"},n),t)}}])&&h(t.prototype,n),a}(o.Component),I=l.ZP.div(u||(B=["\n background-color: ",";\n border-radius: 4px;\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);\n box-sizing: border-box;\n max-height: calc(100% - 96px);\n overflow: hidden;\n position: relative;\n padding: 0;\n\n ","\n"],E||(E=B.slice(0)),u=Object.freeze(Object.defineProperties(B,{raw:{value:Object.freeze(E)}}))),(function(e){return e.theme.colors.light}),(function(e){return e.menuListCss&&e.menuListCss(e)}));b.propTypes={children:c().node,menuListCss:c().func};const C=b;function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}var Q=["children","popoverCss","menuListCss"];function M(){return M=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Q);return o.createElement(A.Z,M({popoverCss:n,getContentAnchorEl:this.getContentAnchorEl,onEntering:this.handleEntering,anchorOrigin:Y,transformOrigin:Y},i),o.createElement(C,{menuListCss:r,ref:this.handleMenuListRef},t))}}])&&F(t.prototype,n),u}(o.Component);x.propTypes={anchorEl:c().oneOfType([c().object,c().func]),children:c().node,onClose:c().func,onEntering:c().func,open:c().bool.isRequired,popoverCss:c().func,menuListCss:c().func};const k=x},"9Xch":(e,t,n)=>{"use strict";n.d(t,{sN:()=>y,ZH:()=>E,ZP:()=>b});var r,o=n("yO0X"),i=n("aWzz"),c=n.n(i),a=n("Qm3L"),s=n("GkOb"),u=n("v25O");function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>H});var r=n("ERkP"),o=n("Qm3L"),i=n("aWzz"),c=n.n(i),a=n("N1PV"),s=n("7nmT");function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,U);return r.createElement(J,j({"data-testid":"backdrop","aria-hidden":"true",invisible:t},n))}L.propTypes={BackdropProps:c().object,children:c().element,container:c().oneOfType([c().object,c().func]),disableAutoFocus:c().bool,disableBackdropClick:c().bool,disableEnforceFocus:c().bool,disableEscapeKeyDown:c().bool,disablePortal:c().bool,disableRestoreFocus:c().bool,hideBackdrop:c().bool,onBackdropClick:c().func,onClose:c().func,onEscapeKeyDown:c().func,onRendered:c().func,open:c().bool.isRequired},L.defaultProps={disableAutoFocus:!1,disableBackdropClick:!1,disableEnforceFocus:!1,disableEscapeKeyDown:!1,disablePortal:!1,disableRestoreFocus:!1,hideBackdrop:!1};var J=o.ZP.div(F||(F=P(["\n z-index: -1;\n position: fixed;\n right: 0;\n bottom: 0;\n top: 0;\n left: 0;\n background-color: ",";\n opacity: 1;\n touch-action: none;\n"])),(function(e){return e.invisible?"transparent":"rgba(0, 0, 0, 0.5)"})),G=o.ZP.div(S||(S=P(["\n position: fixed;\n z-index: 1200;\n right: 0;\n bottom: 0;\n top: 0;\n left: 0;\n ","\n"])),(function(e){return e.modalCss&&e.modalCss(e)}));const H=L},JhHO:(e,t,n)=>{"use strict";n.d(t,{Z:()=>x});var r=n("ERkP"),o=n("Qm3L"),i=n("aWzz"),c=n.n(i),a=n("7nmT");function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}var u=["children"];function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,u);delete n.onEntering;var o=r.Children.only(t);return r.cloneElement(o,n)}}])&&l(t.prototype,n),s}(r.Component);var h,y=n("N1PV"),m=n("w9VJ");function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}var B=["anchorEl","children","container","open","popoverCss"];function E(){return E=Object.assign||function(e){for(var t=1;td){var w=f-d;A-=w,s.vertical+=w}if(lh){var E=g-h;l-=E,s.horizontal+=E}return{top:"".concat(A,"px"),left:"".concat(l,"px"),transformOrigin:S(s)}})),M(v(e),"handleEntering",(function(t){e.props.onEntering&&e.props.onEntering(t),e.setPositioningStyles(t)})),"undefined"!=typeof window&&(e.handleResize=function(){e.props.open&&e.setPositioningStyles(e.paperRef)}),e}return t=s,n=[{key:"componentDidMount",value:function(){this.props.action&&this.props.action({updatePosition:this.handleResize})}},{key:"getAnchorOffset",value:function(e){var t=this.props,n=t.anchorEl,r=t.anchorOrigin,o=(U(n)||(0,y.P)(this.paperRef).body).getBoundingClientRect(),i=0===e?r.vertical:"center";return{top:o.top+this.handleGetOffsetTop(o,i),left:o.left+this.handleGetOffsetLeft(o,r.horizontal)}}},{key:"getContentAnchorOffset",value:function(e){var t=this.props,n=t.getContentAnchorEl,r=t.anchorReference,o=0;if(n&&"anchorEl"===r){var i=n(e);if(i&&e.contains(i)){var c=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentNode).scrollTop;return r}(e,i);o=i.offsetTop+i.clientHeight/2-c||0}}return o}},{key:"getTransformOrigin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.props.transformOrigin,r=this.handleGetOffsetTop(e,n.vertical)+t,o=this.handleGetOffsetLeft(e,n.horizontal);return{vertical:r,horizontal:o}}},{key:"render",value:function(){var e=this,t=this.props,n=t.anchorEl,o=t.children,i=t.container,c=t.open,s=t.popoverCss,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,B),A=i||(n?(0,y.P)(U(n)).body:void 0);return r.createElement(m.Z,E({container:A,open:c,BackdropProps:{invisible:!0}},u),r.createElement(d,{onEntering:this.handleEntering},r.createElement(Y,{popoverCss:s,"data-mui-test":"Popover",ref:function(t){e.paperRef=a.findDOMNode(t)}},o)))}}],n&&b(t.prototype,n),s}(r.Component);P.propTypes={action:c().func,anchorEl:c().oneOfType([c().object,c().func]),anchorOrigin:c().shape({horizontal:c().oneOfType([c().number,c().oneOf(["left","center","right"])]).isRequired,vertical:c().oneOfType([c().number,c().oneOf(["top","center","bottom"])]).isRequired}),anchorPosition:c().shape({left:c().number.isRequired,top:c().number.isRequired}),anchorReference:c().oneOf(["anchorEl","anchorPosition","none"]),children:c().node,container:c().oneOfType([c().object,c().func]),getContentAnchorEl:c().func,marginThreshold:c().number,onClose:c().func,onEnter:c().func,onEntered:c().func,onEntering:c().func,open:c().bool.isRequired,PaperProps:c().object,role:c().string,transformOrigin:c().shape({horizontal:c().oneOfType([c().number,c().oneOf(["left","center","right"])]).isRequired,vertical:c().oneOfType([c().number,c().oneOf(["top","center","bottom"])]).isRequired})},P.defaultProps={anchorReference:"anchorEl",anchorOrigin:{vertical:"top",horizontal:"left"},marginThreshold:16,transformOrigin:{vertical:"top",horizontal:"left"}};var j,O,Y=o.ZP.div(h||(j=["\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.24);\n border-radius: 4px;\n max-width: calc(100% - 32px);\n max-height: calc(100% - 32px);\n min-height: 16px;\n min-width: 16px;\n outline: none;\n overflow-x: hidden;\n overflow-y: auto;\n position: absolute;\n ","\n"],O||(O=j.slice(0)),h=Object.freeze(Object.defineProperties(j,{raw:{value:Object.freeze(O)}}))),(function(e){return e.popoverCss&&e.popoverCss(e)}));const x=P},RzLB:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r,o=n("Qm3L"),i=n("x0Gi"),c=n("v25O");function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r,o,i,c=n("Qm3L"),a=n("x0Gi"),s=c.ZP.button(r||(o=["\n align-items: center;\n background: none;\n border: none;\n color: ",";\n cursor: pointer;\n display: inline-flex;\n font-size: 11px;\n font-weight: 600;\n height: 100%;\n margin: 0;\n outline: none;\n padding: 0 16px;\n position: relative;\n text-decoration: none;\n\n &:hover, &:focus {\n background: ",";\n }\n\n &.active{\n background: ",";\n color: ",";\n }\n\n &.active:after {\n background-color: ",';\n content: "";\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 4px;\n }\n\n ',"\n ","\n ","\n ","\n ","\n"],i||(i=o.slice(0)),r=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(i)}}))),(function(e){return e.active?e.theme.colors.light:"rgba(255, 255, 255, .56)"}),(function(e){return e.active?e.theme.colors.primary.light:"rgba(255, 255, 255, .06)"}),(function(e){return e.theme.colors.primary.light}),(function(e){return e.theme.colors.light}),(function(e){return e.theme.colors.accent}),a.Dh,a.bf,a.kk,a.Cb,a.kC);s.displayName="TopNavItem";const u=s},qaZA:(e,t,n)=>{"use strict";n.d(t,{bZ:()=>o.ZP,xu:()=>i.Z,ku:()=>c.ku,Ei:()=>m,ZP:()=>M,JU:()=>N,DF:()=>c.DF,PL:()=>c.PL,U3:()=>c.U3,Zb:()=>T.Z,Pk:()=>L,kC:()=>Ee.Z,Ee:()=>ye.Z,z$:()=>$,II:()=>re,__:()=>ie.ZP,SO:()=>ae,rU:()=>de,xv:()=>me.Z,tD:()=>Me});var r,o=n("+2B0"),i=n("UwTl"),c=n("qD9L"),a=n("ERkP"),s=n("Qm3L"),u=n("NL5n"),A=n("x0Gi"),l=["children","setRef"];function f(){return f=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,l);return a.createElement(y,f({ref:n},r),t)};var w,B=n("v25O"),E=n("cOAj");function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(){return C=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,F);return a.createElement(k,j({},r,{ref:n}),a.createElement("span",null,t))},Y=function(e){var t=e.kind,n=e.theme;return"primary"===t?{borderColor:n.colors.secondary.main,color:n.colors.secondary.light,"&:hover, &:focus":{borderColor:n.colors.secondary.light},"&:active":{borderColor:n.colors.secondary.dark}}:{borderColor:n.colors.text.primary,color:n.colors.text.primary,"&:hover, &:focus":{borderColor:n.colors.light,color:n.colors.light}}},x=function(e){return e.block?{width:"100%"}:null},k=s.ZP.button(D||(D=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n line-height: 1.5;\n border-radius: 4px;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n border: 1px solid;\n box-sizing: border-box;\n background-color: transparent;\n cursor: pointer;\n font-family: inherit;\n font-weight: bold;\n outline: none;\n opacity: .56;\n position: relative;\n text-align: center;\n text-decoration: none;\n text-transform: uppercase;\n transition: all .3s;\n -webkit-font-smoothing: antialiased;\n\n &:hover {\n opacity: 1;\n }\n\n &:active {\n opacity: .24;\n }\n\n > span {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n ","\n ","\n ","\n"])),(function(e){var t=e.theme.colors,n={color:t.secondary.contrastText,"&:disabled":{background:t.action.disabledBackground,color:t.action.disabled}};return U(U(U(U(U(U({},Y(e)),n),function(e){switch(e.size){case"small":return{fontSize:"10px",minHeight:"24px",padding:"0px 16px"};case"large":return{minHeight:"40px",fontSize:"12px",padding:"0px 40px"};default:return{minHeight:"32px",fontSize:"12px",padding:"0px 24px"}}}(e)),(0,A.Dh)(e)),(0,A.bf)(e)),x(e))}),Y,x);O.propTypes=U({},A.Dh.propTypes),O.defaultProps={size:"medium",theme:B.Z},O.displayName="ButtonOutlined";const N=O;var T=n("merR");function R(e){var t=e.title,n=e.children;return a.createElement(T.Z,{width:"540px",p:7,my:4,mx:"auto",textAlign:"center"},a.createElement(u.yG,{mb:3,fontSize:56,color:"success"}),t&&a.createElement(me.Z,{typography:"h2",mb:"4"},t),n)}function L(){return a.createElement(R,{title:"Login Successful"},"You have successfully signed into your account. ",a.createElement("br",null)," You can close this window and continue using the product.")}a.Component;var z,J=n("aWzz"),G=n.n(J);function H(e){return H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H(e)}function K(e,t){for(var n=0;n{"use strict";n.d(t,{cq:()=>r.cq,uk:()=>r.uk,tv:()=>r.tv,E0:()=>h,Lz:()=>r.Lz,$_:()=>r.$_,fU:()=>r.fU,Me:()=>r.Me,WO:()=>r.WO,JB:()=>r.JB,Ue:()=>r.Ue,Cb:()=>r.Cb,Kl:()=>r.Kl,zo:()=>r.zo,kC:()=>r.kC,kk:()=>r.kk,jw:()=>r.jw,ih:()=>r.ih,tx:()=>r.tx,iG:()=>r.iG,Dh:()=>r.Dh,yd:()=>r.yd,cp:()=>A,bf:()=>r.bf});var r=n("GkOb"),o=n("aWzz"),i=n.n(o);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>p});var r,o=n("TMlT"),i='"Droid Sans Mono", "monospace", monospace, "Droid Sans Fallback"',c={sansSerif:'Ubuntu2, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";',mono:(r=(0,o.Z)(),r.isLinux?i:r.isMac?'Menlo, Monaco, "Courier New", monospace':r.isWin?'Consolas, "Courier New", monospace':i)},a=n("Dkqv"),s=300,u=400,A={light:s,regular:u,bold:600};const l={h1:{fontWeight:s,fontSize:"34px",lineHeight:"56px"},h2:{fontWeight:s,fontSize:"28px",lineHeight:"32px"},h3:{fontWeight:300,fontSize:"22px",lineHeight:"32px"},h4:{fontWeight:u,fontSize:"18px",lineHeight:"32px"},h5:{fontWeight:u,fontSize:"16px",lineHeight:"24px"},h6:{fontWeight:600,fontSize:"14px",lineHeight:"24px"},body1:{fontWeight:u,fontSize:"14px",lineHeight:"24px"},body2:{fontWeight:u,fontSize:"12px",lineHeight:"16px"},paragraph:{fontWeight:s,fontSize:"16px",lineHeight:"32px"},paragraph2:{fontWeight:s,fontSize:"12px",lineHeight:"24px"},subtitle1:{fontWeight:u,fontSize:"14px",lineHeight:"24px"},subtitle2:{fontWeight:600,fontSize:"10px",lineHeight:"16px"}};function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p={colors:{accent:"#651FFF",dark:"#000",light:"#FFFFFF",primary:{main:"#1C254D",light:"#222C59",lighter:"#2C3A73",dark:"#111B48",contrastText:"#FFFFFF"},secondary:{main:"#512FC9",light:"#651FFF",dark:"#354AA4",contrastText:"#FFFFFF"},text:{primary:"rgba(255,255,255,0.87)",secondary:"rgba(255, 255, 255, 0.56)",placeholder:"rgba(255, 255, 255, 0.24)",disabled:"rgba(0, 0, 0, 0.24)",hint:"rgba(0, 0, 0, 0.24)",onLight:"#324148",onDark:"rgba(255, 255, 255, 0.87)"},grey:function(e){for(var t=1;t{"use strict";n.d(t,{iN:()=>r,BU:()=>o,P_:()=>i,sl:()=>c,bK:()=>a,ek:()=>s,f7:()=>u,$y:()=>A,iQ:()=>l,Q6:()=>f,$C:()=>g,er:()=>p});var r={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},o={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64"},i={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037"},c={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4"},a={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00"},s={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},u={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},A={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},l={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},f={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},g={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5"},p={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600"}},"4tV6":(e,t,n)=>{"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return en?n:e}function o(e){if("#"===e.charAt(0))return o(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb(".concat(n.map((function(e){return parseInt(e,16)})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t),r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function i(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")&&(n=n.map((function(e,t){return t<3?parseInt(e,10):e}))),-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(e.type,"(").concat(n.join(", "),")")}function c(e,t){return e=o(e),t=r(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,i(e)}function a(e,t){if(e=o(e),t=r(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return i(e)}n.d(t,{U1:()=>c,_j:()=>a})},TMlT:(e,t,n)=>{"use strict";function r(){var e=window.navigator.userAgent;return{isWin:e.indexOf("Windows")>=0,isMac:e.indexOf("Macintosh")>=0,isLinux:e.indexOf("Linux")>=0}}n.d(t,{Z:()=>r})},N1PV:(e,t,n)=>{"use strict";function r(e){return e&&e.ownerDocument||document}function o(e){var t=r(e);return t&&t.defaultView||window}n.d(t,{P:()=>r,k:()=>o})},bmsW:function(e,t,n){var r,o,i;o=[n("ERkP"),n("aWzz"),n("Y3fD")],void 0===(i="function"==typeof(r=function(e,t,n){function r(e){return e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),!1}function o(e){return null==e?[]:Array.isArray(e)?e:[e]}function i(e){return null!=e&&1===e.length?e[0]:e}var c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return n({displayName:"ReactSlider",propTypes:{min:t.number,max:t.number,step:t.number,minDistance:t.number,defaultValue:t.oneOfType([t.number,t.arrayOf(t.number)]),value:t.oneOfType([t.number,t.arrayOf(t.number)]),orientation:t.oneOf(["horizontal","vertical"]),className:t.string,handleClassName:t.string,handleActiveClassName:t.string,withBars:t.bool,barClassName:t.string,pearling:t.bool,disabled:t.bool,snapDragDisabled:t.bool,invert:t.bool,onBeforeChange:t.func,onChange:t.func,onAfterChange:t.func,onSliderClick:t.func},getDefaultProps:function(){return{min:0,max:100,step:1,minDistance:0,defaultValue:0,orientation:"horizontal",className:"slider",handleClassName:"handle",handleActiveClassName:"active",barClassName:"bar",withBars:!1,pearling:!1,disabled:!1,snapDragDisabled:!1,invert:!1}},getInitialState:function(){var e=this._or(o(this.props.value),o(this.props.defaultValue));this.tempArray=e.slice(),this.pendingResizeTimeouts=[];for(var t=[],n=0;nt.length&&(this.state.value.length=t.length),0===this.state.upperBound&&this._resize()},_or:function(t,n){var r=e.Children.count(this.props.children);switch(r){case 0:return t.length>0?t:n;case t.length:return t;case n.length:return n;default:return t.length===r&&n.length===r||window.console.warn(this.constructor.displayName+": Number of values does not match number of children."),function(e,t,n){for(var r=(t-e)/(n-1),o=[],i=0;i=0?this._posMinKey():"",zIndex:this.state.zIndices.indexOf(t)+1};return n[this._posMinKey()]=e+"px",n},_buildBarStyle:function(e,t){var n={position:"absolute",willChange:this.state.index>=0?this._posMinKey()+","+this._posMaxKey():""};return n[this._posMinKey()]=e,n[this._posMaxKey()]=t,n},_getClosestIndex:function(e){for(var t=Number.MAX_VALUE,n=-1,r=this.state.value,o=r.length,i=0;i1)){var n=this._getTouchPosition(t);this.startPosition=n,this.isScrolling=void 0,this._start(e,n[0]),this._addHandlers(this._getTouchEventMap()),function(e){e.stopPropagation&&e.stopPropagation()}(t)}}.bind(this)},_addHandlers:function(e){for(var t in e)document.addEventListener(t,e[t],!1)},_removeHandlers:function(e){for(var t in e)document.removeEventListener(t,e[t],!1)},_start:function(e,t){var n=document.activeElement,r=this["handle"+e];n&&n!=document.body&&n!=r&&n.blur&&n.blur(),this.hasMoved=!1,this._fireChangeEvent("onBeforeChange");var o=this.state.zIndices;o.splice(o.indexOf(e),1),o.push(e),this.setState((function(n){return{startValue:this.state.value[e],startPosition:void 0!==t?t:n.startPosition,index:e,zIndices:o}}))},_onMouseUp:function(){this._onEnd(this._getMouseEventMap())},_onTouchEnd:function(){this._onEnd(this._getTouchEventMap())},_onBlur:function(){this._onEnd(this._getKeyDownEventMap())},_onEnd:function(e){this._removeHandlers(e),this.setState({index:-1},this._fireChangeEvent.bind(this,"onAfterChange"))},_onMouseMove:function(e){var t=this._getMousePosition(e),n=this._getDiffPosition(t[0]),r=this._getValueFromPosition(n);this._move(r)},_onTouchMove:function(e){if(!(e.touches.length>1)){var t=this._getTouchPosition(e);if(void 0===this.isScrolling){var n=t[0]-this.startPosition[0],o=t[1]-this.startPosition[1];this.isScrolling=Math.abs(o)>Math.abs(n)}if(this.isScrolling)this.setState({index:-1});else{r(e);var i=this._getDiffPosition(t[0]),c=this._getValueFromPosition(i);this._move(c)}}},_onKeyDown:function(e){if(!(e.ctrlKey||e.shiftKey||e.altKey))switch(e.key){case"ArrowLeft":case"ArrowUp":return e.preventDefault(),this._moveDownOneStep();case"ArrowRight":case"ArrowDown":return e.preventDefault(),this._moveUpOneStep();case"Home":return this._move(this.props.min);case"End":return this._move(this.props.max);default:return}},_moveUpOneStep:function(){var e=this.state.value[this.state.index]+this.props.step;this._move(Math.min(e,this.props.max))},_moveDownOneStep:function(){var e=this.state.value[this.state.index]-this.props.step;this._move(Math.max(e,this.props.min))},_getValueFromPosition:function(e){var t=e/(this.state.sliderLength-this.state.handleSize)*(this.props.max-this.props.min);return this._trimAlignValue(this.state.startValue+t)},_getDiffPosition:function(e){var t=e-this.state.startPosition;return this.props.invert&&(t*=-1),t},_move:function(e){this.hasMoved=!0;var t=this.props,n=this.state,r=n.index,o=n.value,i=o.length,c=o[r],a=t.minDistance;if(!t.pearling){if(r>0){var s=o[r-1];eu-a&&(e=u-a)}}o[r]=e,t.pearling&&i>1&&(e>c?(this._pushSucceeding(o,a,r),this._trimSucceeding(i,o,a,t.max)):ee[r+1];o=e[++r]+t)e[r+1]=this._alignValue(o)},_trimSucceeding:function(e,t,n,r){for(var o=0;oi&&(t[e-1-o]=i)}},_pushPreceding:function(e,t,n){var r,o;for(o=e[r=n]-t;null!=e[r-1]&&o=t.max&&(e=t.max),e},_alignValue:function(e,t){var n=(e-(t=t||this.props).min)%t.step,r=e-n;return 2*Math.abs(n)>=t.step&&(r+=n>0?t.step:-t.step),parseFloat(r.toFixed(5))},_renderHandle:function(t,n,r){var o=this,i=this.props.handleClassName+" "+this.props.handleClassName+"-"+r+" "+(this.state.index===r?this.props.handleActiveClassName:"");return e.createElement("div",{ref:function(e){o["handle"+r]=e},key:"handle"+r,className:i,style:t,onMouseDown:this._createOnMouseDown(r),onTouchStart:this._createOnTouchStart(r),onFocus:this._createOnKeyDown(r),tabIndex:0,role:"slider","aria-valuenow":this.state.value[r],"aria-valuemin":this.props.min,"aria-valuemax":this.props.max,"aria-label":c(this.props.ariaLabel)?this.props.ariaLabel[r]:this.props.ariaLabel,"aria-valuetext":this.props.ariaValuetext},n)},_renderHandles:function(t){for(var n=t.length,r=this.tempArray,o=0;o0)e.Children.forEach(this.props.children,(function(e,t){i[t]=c(r[t],e,t)}));else for(o=0;o{"use strict";n.d(t,{Z:()=>i,U:()=>o});var r=n("ERkP"),o=r.createContext(null);const i=function(e){return r.createElement(o.Provider,{value:e.ctx,children:e.children})}},uvmP:(e,t,n)=>{"use strict";var r=n("7nmT"),o=n("ERkP"),i=n("dn/X"),c=n("mPIB"),a=n("n8+b"),s=null;function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=new URLSearchParams(t),r=n.get(e);return r||""}const A={original:function(){return s},init:function(e){s=e||(0,i.lX)()},replace:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e=this.ensureKnownRoute(e),s.replace(e)},push:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e=this.ensureKnownRoute(e),t?this._pageRefresh(e):s.push(e)},reload:function(){window.location.reload()},goToLogin:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=a.Z.routes.login;if(e){var n=s.location,r=n.search,o=n.pathname,i=this.ensureKnownRoute(o),c=this.ensureBaseUrl(i),u=r?encodeURIComponent(r):"";t="".concat(t,"?redirect_uri=").concat(c).concat(u)}this._pageRefresh(t)},getRedirectParam:function(){return u("redirect_uri",this.original().location.search)},ensureKnownRoute:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._canPush(e)?e:a.Z.routes.root},ensureBaseUrl:function(e){return 0!==(e=e||"").indexOf(a.Z.baseUrl)&&(e=e.startsWith("/")?"".concat(a.Z.baseUrl).concat(e):"".concat(a.Z.baseUrl,"/").concat(e)),e},getRoutes:function(){return Object.getOwnPropertyNames(a.Z.routes).map((function(e){return a.Z.routes[e]}))},getLocation:function(){return this.original().location},_canPush:function(e){var t=this.getRoutes(),n=new URL(this.ensureBaseUrl(e)).pathname;return t.some((function(e){return(0,c.LX)(n,{path:e,exact:!0})}))},_pageRefresh:function(e){window.location.href=this.ensureBaseUrl(e)}};var l,f=n("Qm3L");n("rABy");var g,p,d=(0,f.vJ)(l||(g=["\n\n html {\n font-family: ",";\n ",";\n }\n\n body {\n margin: 0;\n background-color: ",";\n color: ",";\n padding: 0;\n }\n\n input, textarea {\n font-family: ",";\n }\n\n // custom scrollbars\n ::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n }\n\n ::-webkit-scrollbar-thumb {\n background: #757575;\n }\n\n ::-webkit-scrollbar-corner {\n background: rgba(0,0,0,0.5);\n }\n\n // remove dotted Firefox outline\n button, a {\n outline: 0;\n ::-moz-focus-inner {\n border: 0;\n }\n }\n"],p||(p=g.slice(0)),l=Object.freeze(Object.defineProperties(g,{raw:{value:Object.freeze(p)}}))),(function(e){return e.theme.font}),(function(e){return e.theme.typography.body1}),(function(e){return e.theme.colors.primary.dark}),(function(e){return e.theme.colors.light}),(function(e){return e.theme.font})),h=n("v25O");const y=function(e){return o.createElement(f.f6,{theme:e.theme||h.Z},o.createElement(f.LC,{disableVendorPrefixes:!0},o.createElement(o.Fragment,null,o.createElement(d,null),e.children)))};var m,w=n("daAW"),B=n("aWzz"),E=n.n(B),b=n("qaZA"),I=["message"],C=["message"];function v(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Q(){return Q=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Y),i=(0,c.UO)().clusterId;return o.useEffect((function(){n&&i?document.title="".concat(i," • ").concat(n):n&&(document.title="".concat(n))}),[n]),o.createElement(c.AW,r)},T=w.OL,R=c.l_;function L(e,t,n){return L=z()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&J(o,n.prototype),o},L.apply(null,arguments)}function z(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function J(e,t){return J=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},J(e,t)}function G(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"default";G(this,e),this.name=t}var t,n;return t=e,n=[{key:"log",value:function(){for(var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"log",n=arguments.length,r=new Array(n>1?n-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:{};e=window.location.origin+e;var n=ve(ve({},De),t);return n.headers=ve(ve({},n.headers),Fe()),fetch(e,n)}))},De={credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json; charset=utf-8"},mode:"same-origin",cache:"no-store"};function Fe(){var e=Ue();return{"X-CSRF-Token":Se(),Authorization:"Bearer ".concat(e)}}var Se=function(){var e=document.querySelector("[name=grv_csrf_token]");return e?e.content:""};function Ue(){return(fe()||{}).accessToken}function Pe(){return location.hostname+(location.port?":"+location.port:"")}const je=Me;function Oe(e){return{accessToken:e.token,expiresIn:e.expires_in,created:(new Date).getTime(),sessionExpires:e.sessionExpires,sessionInactiveTimeout:e.sessionInactiveTimeout}}var Ye=V("services/session"),xe=null,ke={logout:function(){je.delete(a.Z.api.sessionPath).finally((function(){A.goToLogin()})),this.clear()},clear:function(){this._stopTokenChecker(),Ae(Ne),se()},ensureSession:function(){var e=this;this._stopTokenChecker(),this._ensureLocalStorageSubscription(),this.isValid()?this._shouldRenewToken()?this._renewToken().then((function(){e._startTokenChecker()})).catch(this.logout.bind(this)):this._startTokenChecker():this.logout()},renewSession:function(e){return this._renewToken(e).then((function(e){return e.sessionExpires}))},isValid:function(){return this._timeLeft()>0},getInactivityTimeout:function(){var e=this._getBearerToken();return Number(e.sessionInactiveTimeout)||0},_getBearerToken:function(){var e=null;try{(e=this._extractBearerTokenFromHtml())?le(e):e=fe()}catch(e){Ye.error("Cannot find bearer token",e)}return e},_extractBearerTokenFromHtml:function(){var e=document.querySelector("[name=grv_bearer_token]");if(!e||!e.content)return null;e.parentNode.removeChild(e);var t=window.atob(e.content);return Oe(JSON.parse(t))},_shouldRenewToken:function(){return!this._getIsRenewing()&&this._timeLeft()<18e4},_renewToken:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._setAndBroadcastIsRenewing(!0),je.post(a.Z.getRenewTokenUrl(),t).then((function(e){var t=Oe(e);return le(t),t})).finally((function(){e._setAndBroadcastIsRenewing(!1)}))},_setAndBroadcastIsRenewing:function(e){this._setIsRenewing(e),de(ce,e)},_setIsRenewing:function(e){this._isRenewing=e},_getIsRenewing:function(){return!!this._isRenewing},_timeLeft:function(){var e=this._getBearerToken();if(!e)return 0;var t=e.expiresIn,n=e.created;return n&&t?n+(t*=1e3)-(new Date).getTime():0},_shouldCheckStatus:function(){return!this._getIsRenewing()&&this._timeLeft()>3e4},_ensureLocalStorageSubscription:function(){ue(Ne)},_fetchStatus:function(){var e=this;je.get(a.Z.api.userStatusPath).catch((function(t){403==t.response.status&&e.logout()}))},_startTokenChecker:function(){var e=this;this._stopTokenChecker(),xe=setInterval((function(){e.ensureSession(),e._shouldCheckStatus()&&e._fetchStatus()}),15e3)},_stopTokenChecker:function(){clearInterval(xe),xe=null}};function Ne(e){var t=e.key,n=e.newValue;null===fe()&&ke.logout(),t===ce&&n&&ke._setIsRenewing(JSON.parse(n))}const Te=ke;var Re=V("/components/Authenticated"),Le=3e4,ze=["keydown","pointermove","pointerdown"];function Je(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=pe();return t>0&&Date.now()-t>e}const Ge=function(e){var t=e.children;return o.useEffect((function(){if(!Te.isValid())return Re.warn("invalid session"),Te.clear(),void A.goToLogin(!0);Te.ensureSession();var e=Te.getInactivityTimeout();return 0!==e?function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)-Le;if(Je(e))return Re.warn("inactive session"),void Te.logout();ge(Date.now());var t=setInterval((function(){Je(e)&&(Re.warn("inactive session"),Te.logout())}),Le),n=(0,oe.throttle)((function(){ge(Date.now())}),15e3);function r(){n.cancel(),clearInterval(t),ze.forEach((function(e){return window.removeEventListener(e,n)}))}return ze.forEach((function(e){return window.addEventListener(e,n)})),r}(e):void 0}),[]),Te.isValid()?o.createElement(o.Fragment,null,t):null};var He,Ke=n("NL5n"),Ve=(0,f.ZP)(Ke.ZP)(He||(He=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}([""])));Ve.displayName="SideNavItemIcon",Ve.defaultProps={mr:3,ml:-6,fontSize:"16px",color:"inherit"};const We=Ve;var Ze,qe=n("x0Gi"),Xe=f.ZP.div(Ze||(Ze=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n border: none;\n border-left: 4px solid transparent;\n cursor: pointer;\n outline: none;\n text-decoration: none;\n width: 100%;\n line-height: 24px;\n ","\n ","\n"])),(function(e){var t=e.$nested,n=void 0!==t&&t,r=e.theme,o=void 0===r?h.Z:r,i={position:"relative",fontSize:"12px",fontWeight:o.regular,fontFamily:o.font,paddingLeft:o.space[9]+"px",paddingRight:o.space[5]+"px",background:o.colors.primary.light,color:o.colors.text.secondary,minHeight:"56px","&:active, &.active":{borderLeftColor:n?"none":o.colors.accent,background:o.colors.primary.lighter,color:o.colors.primary.contrastText,fontWeight:o.bold,".marker":{background:o.colors.secondary.light}},"&:hover":{background:o.colors.primary.lighter},"&:focus, &:hover":{color:o.colors.primary.contrastText}};return n&&(i.fontSize="11px",i.background="none",i.fontWeight=o.regular,i.paddingLeft="96px",i.minHeight="40px"),i}),qe.$_);const _e=Xe;var $e,et,tt;function nt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?o.createElement(ot,{path:n,item:e,key:t}):o.createElement(_e,{key:t,as:w.OL,exact:e.exact,to:e.route},o.createElement(We,{as:e.Icon}),e.title)}));return o.createElement(ht,null,o.createElement(dt,{pl:"4",width:"208px",as:w.rU,to:a.Z.routes.root},o.createElement(b.Ee,{src:At,mx:"3",maxHeight:"24px",maxWidth:"160px"})),o.createElement("div",{style:{display:"flex",flexDirection:"column",overflow:"auto"}},r))}var dt=(0,f.ZP)(b.kC)((function(e){return"\n min-height: 56px;\n align-items: center;\n cursor: pointer;\n outline: none;\n text-decoration: none;\n width: 100%;\n &:hover {\n background ".concat(e.theme.colors.primary.lighter,";\n color ").concat(e.theme.colors.primary.contrastText,";\n }\n")})),ht=f.ZP.nav(lt||(lt=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n background: ",";\n border-right: 1px solid ",";\n min-width: 240px;\n width: 240px;\n overflow: auto;\n height: 100%;\n display: flex;\n flex-direction: column;\n"])),(function(e){return e.theme.colors.primary.light}),(function(e){return e.theme.colors.primary.dark}));const yt=function(){var e,t,n,r,i=(e=(0,c.k6)(),t=(0,ft.Z)(),n=gt().clusterId,r=(0,o.useMemo)((function(){return function(e,t){for(var n=new Map,r={team:{Icon:Ke.Q,title:"Team",items:[],route:""},activity:{Icon:Ke.Sp,title:"Activity",items:[],route:""},clusters:{Icon:Ke.Cc,title:"Clusters",items:[],route:""}},o=0;o=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Lt(e){var t=e.hasError,n=void 0!==t&&t,r=Rt(e,Nt);return o.createElement(zt,{hasError:n},o.createElement(xt.ZP,Tt({className:"react-select-container",classNamePrefix:"react-select",clearable:!1,isSearchable:!0,defaultOptions:!1,cacheOptions:!1,defaultMenuIsOpen:!1,placeholder:"Select..."},r)))}var zt=f.ZP.div(Pt||(Pt=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n .react-select-container {\n box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.24);\n box-sizing: border-box;\n border: none;\n display: block;\n font-size: 14px;\n outline: none;\n width: 100%;\n color: rgba(0, 0, 0, 0.87);\n background-color: #ffffff;\n margin-bottom: 0px;\n border-radius: 4px;\n }\n\n .react-select__control,\n .react-select__control--is-focused {\n min-height: 40px;\n height: 40px;\n background-color: transparent;\n border-color: transparent;\n border-radius: 4px;\n border-style: solid;\n border-width: 1px;\n box-shadow: none;\n ","\n\n &:hover {\n border-color: transparent;\n cursor: pointer;\n }\n }\n\n .react-select__option {\n &:hover {\n cursor: pointer;\n background-color: #eceff1;\n }\n }\n\n .react-select__option--is-focused {\n background-color: #eceff1;\n }\n\n .react-select__option--is-selected {\n background-color: #cfd8dc;\n color: inherit;\n\n &:hover {\n background-color: #cfd8dc;\n }\n }\n\n .react-select__menu {\n margin-top: 0px;\n }\n\n .react-select__indicator-separator {\n display: none;\n }\n\n .react-select__loading-indicator {\n display: none;\n }\n\n .react-select--is-disabled {\n .react-select__single-value,\n .react-select__placeholder {\n color: rgba(0, 0, 0, 0.24);\n }\n\n .react-select__indicator {\n color: rgba(0, 0, 0, 0.14);\n }\n }\n\n ","\n ","\n"])),(function(e){var t=e.hasError,n=e.theme;if(t)return{borderRadius:"inherit !important",borderWidth:"2px !important",border:"2px solid ".concat(n.colors.error.main," !important")}}),qe.bf,qe.Dh);const Jt=(0,f.ZP)(zt)((function(e){var t=e.theme;return"\n .react-select-container {\n background: transparent;\n }\n\n .react-select__option--is-focused:active {\n background-color: ".concat(t.colors.grey[50],";\n }\n \n .react-select__value-container {\n padding: 0 8px;\n }\n\n .react-select__single-value {\n color: ").concat(t.colors.text.primary,"\n }\n\n \n .react-select__control {\n min-height: 34px;\n height: 34px;\n border-color: rgba(255, 255, 255, 0.24);\n color: ").concat(t.colors.text.secondary,";\n\n &:focus, &:active {\n background-color: ").concat(t.colors.primary.lighter,";\n }\n\n &:hover {\n border-color: rgba(255, 255, 255, 0.24);\n background-color: ").concat(t.colors.primary.lighter,";\n .react-select__dropdown-indicator {\n color: #666;\n }\n }\n\n .react-select__indicator,\n .react-select__dropdown-indicator {\n padding: 4px 8px;\n color: #666;\n &:hover {\n color: #999;\n }\n }\n }\n\n .react-select__control--menu-is-open {\n background-color: ").concat(t.colors.primary.lighter,";\n border-color: transparent;\n border-radius: 4px;\n border-style: solid;\n border-width: 1px;\n box-shadow: none;\n border-color: rgba(255, 255, 255, 0.24);\n\n .react-select__indicator,\n .react-select__dropdown-indicator {\n color: #999 !important;\n &:hover {\n color: #ccc !important;\n }\n }\n }\n\n .react-select__input {\n color: ").concat(t.colors.text.primary,"\n }\n\n .react-select__placeholder {\n color: ").concat(t.colors.text.secondary,"\n }\n\n .react-select__option {\n padding: 4px 12px;\n } \n\n .react-select__menu {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n\n .react-select__multi-value {\n background-color: ").concat(t.colors.primary.dark,";\n border: 1px solid ").concat(t.colors.text.placeholder,";\n }\n\n .react-select__multi-value__label {\n color: ").concat(t.colors.text.primary,";\n padding: 0 6px;\n }\n\n .react-select--is-disabled {\n .react-select__single-value,\n .react-select__placeholder,\n .react-select__indicator {\n color: ").concat(t.colors.text.placeholder,";\n }\n }\n")})),Gt=function(e){var t=e.hasError,n=void 0!==t&&t,r=Rt(e,kt);return o.createElement(zt,{hasError:n},o.createElement(Yt.ZP,Tt({menuPlacement:"auto",className:"react-select-container",classNamePrefix:"react-select",clearable:!1,isMulti:!1,isSearchable:!0,placeholder:"Select..."},r)))};var Ht,Kt=["children"],Vt=["value","onChange","onLoad","defaultMenuIsOpen"];function Wt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Zt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zt(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Xt=function(e){var t=e.children,n=qt(e,Kt);return o.createElement(Ot.F.ValueContainer,n,o.createElement(b.kC,{alignItems:"center",color:"text.primary"},o.createElement(b.xv,{typography:"h6",fontWeight:"regular",mr:"2"},"CLUSTER:"),t))},_t=(0,f.ZP)(Jt)(Ht||(Ht=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n .react-select__single-value {\n transform: none;\n position: absolute;\n left: 78px;\n top: 4px;\n width: 270px;\n text-overflow: ellipsis;\n }\n"])));const $t=function(e){var t=e.value,n=e.onChange,r=e.onLoad,i=e.defaultMenuIsOpen,c=void 0!==i&&i,a=qt(e,Vt),s=Wt(o.useState(null),2),u=s[0],A=s[1],l=Wt(o.useState([]),2),f=l[0],g=l[1],p={value:t,label:t};return o.createElement(b.xu,a,o.createElement(_t,null,o.createElement(Lt,{components:{ValueContainer:Xt},noOptionsMessage:function(){return u?"Error: ".concat(u):"No leaf clusters found"},value:p,onChange:function(e){n(e.value)},loadOptions:function(e){var t=Promise.resolve(f);return 0===f.length&&(t=r().then((function(e){return e.map((function(e){return{value:e.clusterId,label:e.clusterId}}))})).then((function(e){return g(e),e}))),t.then((function(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e=e.toLocaleLowerCase(),t.filter((function(t){return-1!==t.value.toLocaleLowerCase().indexOf(e)}))}(e,t)})).catch((function(e){A(e.message)}))},defaultMenuIsOpen:c,hasError:!1,maxMenuHeight:600,menuPosition:"fixed",isSearchable:!0,isSimpleValue:!1,isClearable:!1,defaultOptions:!0,cacheOptions:!0})))};function en(){return en=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n thead > tr > th,\n & > tbody > tr > th,\n & > tfoot > tr > th,\n & > thead > tr > td,\n & > tbody > tr > td,\n & > tfoot > tr > td {\n padding: 8px 8px;\n vertical-align: middle;\n\n &:first-child {\n padding-left: 24px;\n }\n &:last-child {\n padding-right: 24px;\n }\n }\n\n & > tbody > tr > td {\n vertical-align: baseline;\n }\n\n & > thead > tr > th {\n background: ").concat(e.theme.colors.primary.dark,";\n color: ").concat(e.theme.colors.primary.contrastText,";\n cursor: pointer;\n font-size: 10px;\n font-weight: 400;\n padding-bottom: 0;\n padding-top: 0;\n text-align: left;\n opacity: 0.75;\n text-transform: uppercase;\n white-space: nowrap;\n\n ").concat(Ke.ZP," {\n font-weight: bold;\n font-size: 8px;\n margin-left: 8px;\n }\n }\n\n & > tbody > tr > td {\n color: rgba(255, 255, 255, 0.87);\n line-height: 16px;\n }\n\n tbody tr {\n border-bottom: 1px solid ").concat(e.theme.colors.primary.main,";\n }\n\n tbody tr:hover {\n background-color: ").concat((0,sn._j)(e.theme.colors.primary.lighter,.14),";\n }\n\n tbody > tr:last-child {\n td:first-child {\n border-bottom-left-radius: 8px;\n }\n \n td:last-child {\n border-bottom-right-radius: 8px;\n }\n }\n\n ")}),qe.Dh,qe.E0),An=f.ZP.nav(cn||(cn=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n padding: 16px 24px;\n display: flex;\n height: 24px;\n flex-shrink: 0;\n align-items: center;\n justify-content: space-between;\n background: ",";\n ","\n"])),(function(e){return e.theme.colors.primary.light}),qe.E0),ln=(f.ZP.div((function(e){return"\n background: ".concat(e.theme.colors.primary.main,";\n border-radius: 4px;\n box-sizing: border-box;\n margin: 48px auto;\n max-width: 720px;\n padding: 48px 32px;\n text-align: center;\n\n a {\n color: ").concat(e.theme.colors.link,";\n }\n")})),n("W/SA"));const fn="yyyy-MM-dd HH:mm:ss",gn="yyyy-MM-dd";var pn=V("services/loc");function dn(e){try{return(0,ln.Z)(e,gn)}catch(e){return pn.error("displayDate()",e),"undefined"}}function hn(e){try{return(0,ln.Z)(e,fn)}catch(e){return pn.error("displayDateTime()",e),"undefined"}}function yn(){return yn=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=e.map((function(e){return o.createElement(b.__,{mb:"1",mr:"1",key:e,kind:"secondary"},e)}));return o.createElement(Bn,null,t)};function Qn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Mn=f.ZP.button(mn||(mn=Qn(["\n background: none;\n border: none;\n cursor: pointer;\n\n "," {\n font-size: 20px;\n transition: all 0.3s;\n opacity: 0.5;\n }\n\n &:hover,\n &:focus {\n "," {\n opacity: 1;\n }\n }\n\n &:disabled {\n cursor: default;\n "," {\n opacity: 0.1;\n }\n }\n"])),Ke.ZP,Ke.ZP,Ke.ZP),Dn=f.ZP.button(wn||(wn=Qn(["\n color: ",";\n background: none;\n text-decoration: underline;\n text-transform: none;\n outline: none;\n border: none;\n font-weight: bold;\n line-height: 0;\n font-size: 12px;\n\n &:hover,\n &:focus {\n cursor: pointer;\n }\n\n &:disabled {\n color: ",";\n cursor: wait;\n }\n"])),(function(e){return e.theme.colors.link}),(function(e){return e.theme.colors.action.disabled})),Fn=["nextPage","prevPage","data","paginatedData","currentPage","pageSize"];function Sn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Un(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pn(e){var t=e.nextPage,n=e.prevPage,r=e.data,o=void 0===r?[]:r,i=e.paginatedData,c=void 0===i?[]:i,a=e.currentPage,s=e.pageSize,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Fn),A=c[a],l=a*s,f=o.indexOf(A[0],l),g=o.lastIndexOf(A[A.length-1],l+s-1);return function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=Math.ceil(e.length/t),r=[],o=0;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Rn),a=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Gn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,o.useState)((function(){var e,o=c.initialSort?n.find((function(e){return e.key===c.initialSort.key})):n.find((function(e){return e.isSortable}));return{data:[],searchValue:"",sort:o?{key:o.key,onSort:o.onSort,dir:(null===(e=c.initialSort)||void 0===e?void 0:e.dir)||"ASC"}:null,pagination:r?{paginatedData:Tn(t,r.pageSize),currentPage:0,pagerPosition:r.pagerPosition||"top",pageSize:r.pageSize||10}:null}})),2),s=a[0],u=a[1],A=function(e,o){var c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=e.filter((function(e){return Nn(e,t,{searchableProps:r,cb:Kn})}));if(n&&(n.onSort?i.sort((function(e,t){return n.onSort(e[n.key],t[n.key])})):i.sort((function(e,t){var r=e[n.key],o=t[n.key];return"string"==typeof r&&"string"==typeof o?r.localeCompare(o,void 0,{numeric:!0}):r-o})),"DESC"===n.dir&&i.reverse()),o){var c=i.indexOf(o(e));if(-1!==c){var a=i[c];i.splice(c,1),i.unshift(a)}}return i}(t,o,e,n.map((function(e){return e.key})),i);u(zn(zn({},s),{},r?{sort:e,searchValue:o,data:c,pagination:zn(zn({},s.pagination),{},{currentPage:0,paginatedData:Tn(c,r.pageSize)})}:{sort:e,searchValue:o,data:c}))};return(0,o.useEffect)((function(){A(s.sort,s.searchValue)}),[t]),zn({state:s,columns:n,setState:u,setSearchValue:function(e){A(s.sort,e)},onSort:function(e){var t;A({key:e.key,onSort:e.onSort,dir:"ASC"===(null===(t=s.sort)||void 0===t?void 0:t.dir)?"DESC":"ASC"},s.searchValue)},nextPage:function(){u(zn(zn({},s),{},{pagination:zn(zn({},s.pagination),{},{currentPage:s.pagination.currentPage+1})}))},prevPage:function(){u(zn(zn({},s),{},{pagination:zn(zn({},s.pagination),{},{currentPage:s.pagination.currentPage-1})}))}},c)}function Kn(e,t,n){return"tags"===n?e.some((function(e){return e.toLocaleLowerCase().includes(t.toLocaleLowerCase())})):n.toLocaleLowerCase().includes("date")?dn(e).includes(t):void 0}function Vn(){return Vn=Object.assign||function(e){for(var t=1;t .ace_editor {\n position: absolute;\n top: 8px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n }\n"])),(function(e){return e.theme.colors.bgTerminal}),(function(e){return e.theme.colors.bgTerminal}),(function(e){return e.theme.colors.bgTerminal}));const or=rr;function ir(e){return ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ir(e)}function cr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ar(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[];this.isDirty=!1,this.sessions=t.map((function(t){return e.createSession(t)})),this.setActiveSession(0)}},{key:"componentDidMount",value:function(){var e=this.props,t=e.data,n=e.readOnly,r=e.theme,o=void 0===r?"ace/theme/monokai":r;this.editor=nr().edit(this.ace_viewer),this.editor.setFadeFoldWidgets(!0),this.editor.setWrapBehavioursEnabled(!0),this.editor.setHighlightActiveLine(!1),this.editor.setShowInvisibles(!1),this.editor.renderer.setShowGutter(!1),this.editor.renderer.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!0),this.editor.on("input",this.onChange),this.editor.setReadOnly(n),this.editor.setTheme(o),this.initSessions(t),this.editor.focus()}},{key:"componentWillUnmount",value:function(){this.editor.destroy(),this.editor=null,this.session=null}},{key:"render",value:function(){var e=this;return o.createElement(or,null,o.createElement("div",{ref:function(t){return e.ace_viewer=t}}))}}],n&&ar(t.prototype,n),a}(o.Component);const dr=pr;var hr,yr,mr=n("w9VJ");function wr(e){return wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wr(e)}var Br=["children","dialogCss"];function Er(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function br(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ir(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Br);return o.createElement(mr.Z,vr({role:"dialog"},r),o.createElement(Pr,null,o.createElement(jr,{"data-testid":"dialogbox",dialogCss:n},t)))}}],n&&Mr(t.prototype,n),a}(o.Component);Ur.defaultProps={disableBackdropClick:!0,disableEscapeKeyDown:!0},Ur.propTypes=Ir(Ir({},mr.Z.propTypes),{},{children:E().node,dialogCss:E().func});var Pr=f.ZP.div(hr||(hr=Er(["\n height: 100%;\n outline: none;\n color: black;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 1;\n will-change: opacity;\n transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n"]))),jr=f.ZP.div(yr||(yr=Er(["\n padding: 32px;\n padding-top: 24px;\n background: ",";\n color: ",";\n border-radius: 8px;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24);\n display: flex;\n flex-direction: column;\n position: relative;\n overflow-y: auto;\n max-height: calc(100% - 96px);\n ",";\n"])),(function(e){return e.theme.colors.primary.main}),(function(e){return e.theme.colors.text.primary}),(function(e){return e.dialogCss&&e.dialogCss(e)})),Or=n("RzLB");function Yr(){return Yr=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var $i=(Xi(ro={},co,{type:"access_request.create",desc:"Access Request Created",format:function(e){var t=e.id,n=e.state;return"Access request [".concat(t,"] has been created and is ").concat(n)}}),Xi(ro,so,{type:"access_request.update",desc:"Access Request Updated",format:function(e){var t=e.id,n=e.state;return"Access request [".concat(t,"] has been updated to ").concat(n)}}),Xi(ro,ao,{type:"access_request.review",desc:"Access Request Reviewed",format:function(e){var t=e.id,n=e.reviewer;return"User [".concat(n,"] reviewed access request [").concat(t,"]")}}),Xi(ro,uo,{type:"access_request.delete",desc:"Access Request Deleted",format:function(e){var t=e.id;return"Access request [".concat(t,"] has been deleted")}}),Xi(ro,yi,{type:"session.command",desc:"Session Command",format:function(e){var t=e.program,n=e.sid;return"Program [".concat(t,"] has been executed within a session [").concat(n,"]")}}),Xi(ro,wi,{type:"session.disk",desc:"Session File Access",format:function(e){var t=e.path,n=e.sid,r=e.program;return"Program [".concat(r,"] accessed a file [").concat(t,"] within a session [").concat(n,"]")}}),Xi(ro,Ii,{type:"session.network",desc:"Session Network Connection",format:function(e){var t=e.sid,n=e.program,r=e.src_addr,o=e.dst_addr,i=e.dst_port;return"Program [".concat(n,"] opened a connection [").concat(r," <-> ").concat(o,":").concat(i,"] within a session [").concat(t,"]")}}),Xi(ro,Ci,{type:"session.process_exit",desc:"Session Process Exit",format:function(e){var t=e.program,n=e.exit_status,r=e.sid;return"Program [".concat(t,"] has exited with status ").concat(n,", within a session [").concat(r,"]")}}),Xi(ro,mi,{type:"session.data",desc:"Session Data",format:function(e){var t=e.sid;return"Usage report has been updated for session [".concat(t||"","]")}}),Xi(ro,Ti,{type:"user.password_change",desc:"User Password Updated",format:function(e){var t=e.user;return"User [".concat(t,"] has changed a password")}}),Xi(ro,zi,{type:"user.update",desc:"User Updated",format:function(e){var t=e.name;return"User [".concat(t,"] has been updated")}}),Xi(ro,si,{type:"reset_password_token.create",desc:"Reset Password Token Created",format:function(e){var t=e.name,n=e.user;return"User [".concat(n,"] created a password reset token for user [").concat(t,"]")}}),Xi(ro,fo,{type:"auth",desc:"Auth Attempt Failed",format:function(e){var t=e.user,n=e.error;return"User [".concat(t,"] failed auth attempt: ").concat(n)}}),Xi(ro,mo,{type:"client.disconnect",desc:"Client Disconnected",format:function(e){var t=e.user,n=e.reason;return"User [".concat(t,"] has been disconnected: ").concat(n)}}),Xi(ro,Ho,{type:"exec",desc:"Command Execution",format:function(e){var t=e.proto,n=e.kubernetes_cluster,r=e.user,o=void 0===r?"":r;return"kube"===t?n?"User [".concat(o,"] executed a command on kubernetes cluster [").concat(n,"]"):"User [".concat(o,"] executed a kubernetes command"):"User [".concat(o,"] executed a command on node ").concat(e["addr.local"])}}),Xi(ro,Go,{type:"exec",desc:"Command Execution Failed",format:function(e){var t=e.user,n=e.exitError,r=_i(e,Ki);return"User [".concat(t,"] command execution on node ").concat(r["addr.local"]," failed [").concat(n,"]")}}),Xi(ro,Ko,{type:"github.created",desc:"GITHUB Auth Connector Created",format:function(e){var t=e.user,n=e.name;return"User [".concat(t,"] created Github connector [").concat(n,"] has been created")}}),Xi(ro,Vo,{type:"github.deleted",desc:"GITHUB Auth Connector Deleted",format:function(e){var t=e.user,n=e.name;return"User [".concat(t,"] deleted Github connector [").concat(n,"]")}}),Xi(ro,$o,{type:"oidc.created",desc:"OIDC Auth Connector Created",format:function(e){var t=e.user,n=e.name;return"User [".concat(t,"] created OIDC connector [").concat(n,"]")}}),Xi(ro,ei,{type:"oidc.deleted",desc:"OIDC Auth Connector Deleted",format:function(e){var t=e.user,n=e.name;return"User [".concat(t,"] deleted OIDC connector [").concat(n,"]")}}),Xi(ro,ni,{type:"port",desc:"Port Forwarding Started",format:function(e){var t=e.user;return"User [".concat(t,"] started port forwarding")}}),Xi(ro,ti,{type:"port",desc:"Port Forwarding Failed",format:function(e){var t=e.user,n=e.error;return"User [".concat(t,"] port forwarding request failed: ").concat(n)}}),Xi(ro,li,{type:"saml.created",desc:"SAML Connector Created",format:function(e){var t=e.user,n=e.name;return"User [".concat(t,"] created SAML connector [").concat(n,"]")}}),Xi(ro,fi,{type:"saml.deleted",desc:"SAML Connector Deleted",format:function(e){var t=e.user,n=e.name;return"User [".concat(t,"] deleted SAML connector [").concat(n,"]")}}),Xi(ro,pi,{type:"scp",desc:"SCP Download",format:function(e){var t=e.user,n=e.path,r=_i(e,Vi);return"User [".concat(t,"] downloaded a file [").concat(n,"] from node [").concat(r["addr.local"],"]")}}),Xi(ro,gi,{type:"scp",desc:"SCP Download Failed",format:function(e){var t=e.exitError,n=_i(e,Wi);return"File download from node [".concat(n["addr.local"],"] failed [").concat(t,"]")}}),Xi(ro,hi,{type:"scp",desc:"SCP Upload",format:function(e){var t=e.user,n=e.path,r=_i(e,Zi);return"User [".concat(t,"] uploaded a file [").concat(n,"] to node [").concat(r["addr.local"],"]")}}),Xi(ro,di,{type:"scp",desc:"SCP Upload Failed",format:function(e){var t=e.exitError,n=_i(e,qi);return"File upload to node [".concat(n["addr.local"],"] failed [").concat(t,"]")}}),Xi(ro,Ei,{type:"session.join",desc:"User Joined",format:function(e){var t=e.user,n=e.sid;return"User [".concat(t,"] has joined the session [").concat(n,"]")}}),Xi(ro,Bi,{type:"session.end",desc:"Session Ended",format:function(e){var t=e.user||"",n=e.server_hostname||e.server_addr||e.server_id;if("kube"===e.proto)return e.kubernetes_cluster?"User [".concat(t,"] has ended a session [").concat(e.sid,"] on kubernetes cluster [").concat(e.kubernetes_cluster,"]"):"User [".concat(t,"] has ended a kubernetes session [").concat(e.sid,"]");if(!e.interactive)return"User [".concat(t,"] has ended a non-interactive session [").concat(e.sid,"] on node [").concat(n,"] ");if(e.session_start&&e.session_stop){var r=new Date(e.session_start),o=new Date(e.session_stop),i=(0,io.Z)(r,o);return"User [".concat(t,"] has ended an interactive session lasting ").concat(i," [").concat(e.sid,"] on node [").concat(n,"]")}return"User [".concat(t,"] has ended interactive session [").concat(e.sid,"] on node [").concat(n,"] ")}}),Xi(ro,vi,{type:"session.rejected",desc:"Session Rejected",format:function(e){var t=e.user,n=e.login,r=e.server_id,o=e.reason;return"User [".concat(t,"] was denied access to [").concat(n,"@").concat(r,"] because [").concat(o,"]")}}),Xi(ro,bi,{type:"session.leave",desc:"User Disconnected",format:function(e){var t=e.user,n=e.sid;return"User [".concat(t,"] has left the session [").concat(n,"]")}}),Xi(ro,Qi,{type:"session.start",desc:"Session Started",format:function(e){var t=e.user,n=e.sid;return"User [".concat(t,"] has started a session [").concat(n,"]")}}),Xi(ro,Mi,{type:"session.upload",desc:"Session Uploaded",format:function(){return"Recorded session has been uploaded"}}),Xi(ro,lo,{type:"app.session.start",desc:"App Session Started",format:function(e){var t=e.user,n=e.sid;return"User [".concat(t,"] has started an app session [").concat(n,"]")}}),Xi(ro,Ao,{type:"app.session.chunk",desc:"App Session Data",format:function(e){var t=e.sid;return"New app session data created [".concat(t,"]")}}),Xi(ro,Si,{type:"subsystem",desc:"Subsystem Requested",format:function(e){var t=e.user,n=e.name;return"User [".concat(t,"] requested subsystem [").concat(n,"]")}}),Xi(ro,Fi,{type:"subsystem",desc:"Subsystem Request Failed",format:function(e){var t=e.user,n=e.name,r=e.exitError;return"User [".concat(t,"] subsystem [").concat(n,"] request failed [").concat(r,"]")}}),Xi(ro,Ui,{type:"resize",desc:"Terminal Resize",format:function(e){var t=e.user,n=e.sid;return"User [".concat(t,"] resized the session [").concat(n,"] terminal")}}),Xi(ro,Yi,{type:"user.create",desc:"User Created",format:function(e){var t=e.name;return"User [".concat(t,"] has been created")}}),Xi(ro,xi,{type:"user.delete",desc:"User Deleted",format:function(e){var t=e.name;return"User [".concat(t,"] has been deleted")}}),Xi(ro,ki,{type:"user.login",desc:"Local Login",format:function(e){var t=e.user;return"Local user [".concat(t,"] successfully logged in")}}),Xi(ro,Ni,{type:"user.login",desc:"Local Login Failed",format:function(e){var t=e.user,n=e.error;return"Local user [".concat(t,"] login failed [").concat(n,"]")}}),Xi(ro,Ri,{type:"user.login",desc:"SSO Login",format:function(e){var t=e.user;return"SSO user [".concat(t,"] successfully logged in")}}),Xi(ro,Li,{type:"user.login",desc:"SSO Login Failed",format:function(e){var t=e.error;return"SSO user login failed [".concat(t,"]")}}),Xi(ro,ui,{type:"role.created",desc:"User Role Created",format:function(e){var t=e.user,n=e.name;return"User [".concat(t,"] created a role [").concat(n,"]")}}),Xi(ro,Ai,{type:"role.deleted",desc:"User Role Deleted",format:function(e){var t=e.user,n=e.name;return"User [".concat(t,"] deleted a role [").concat(n,"]")}}),Xi(ro,Oi,{type:"trusted_cluster_token.create",desc:"Trusted Cluster Token Created",format:function(e){var t=e.user;return"User [".concat(t,"] has created a trusted cluster token")}}),Xi(ro,Pi,{type:"trusted_cluster.create",desc:"Trusted Cluster Created",format:function(e){var t=e.user,n=e.name;return"User [".concat(t,"] has created a trusted relationship with cluster [").concat(n,"]")}}),Xi(ro,ji,{type:"trusted_cluster.delete",desc:"Trusted Cluster Deleted",format:function(e){var t=e.user,n=e.name;return"User [".concat(t,"] has deleted a trusted relationship with cluster [").concat(n,"]")}}),Xi(ro,Wo,{type:"kube.request",desc:"Kubernetes Request",format:function(e){var t=e.user,n=e.kubernetes_cluster;return"User [".concat(t,"] made a request to kubernetes cluster [").concat(n,"]")}}),Xi(ro,Io,{type:"db.session.start",desc:"Database Session Started",format:function(e){var t=e.user,n=e.db_service,r=e.db_name,o=e.db_user;return"User [".concat(t,"] has connected to database [").concat(r,"] as [").concat(o,"] on [").concat(n,"]")}}),Xi(ro,bo,{type:"db.session.start",desc:"Database Session Denied",format:function(e){var t=e.user,n=e.db_service,r=e.db_name,o=e.db_user;return"User [".concat(t,"] was denied access to database [").concat(r,"] as [").concat(o,"] on [").concat(n,"]")}}),Xi(ro,wo,{type:"db.session.end",desc:"Database Session Ended",format:function(e){var t=e.user,n=e.db_service,r=e.db_name;return"User [".concat(t,"] has disconnected from database [").concat(r,"] on [").concat(n,"]")}}),Xi(ro,Bo,{type:"db.session.query",desc:"Database Query",format:function(e){var t=e.user,n=e.db_service,r=e.db_name,o=e.db_query;return"User [".concat(t,"] has executed query [").concat(rc(o,80),"] in database [").concat(r,"] on [").concat(n,"]")}}),Xi(ro,Eo,{type:"db.session.query.failed",desc:"Database Query Failed",format:function(e){var t=e.user,n=e.db_service,r=e.db_name,o=e.db_query;return"User [".concat(t,"] query [").concat(rc(o,80),"] in database [").concat(r,"] on [").concat(n,"] failed")}}),Xi(ro,Co,{type:"db.create",desc:"Database Created",format:function(e){var t=e.user,n=e.name;return"User [".concat(t,"] created database [").concat(n,"]")}}),Xi(ro,vo,{type:"db.update",desc:"Database Updated",format:function(e){var t=e.user,n=e.name;return"User [".concat(t,"] updated database [").concat(n,"]")}}),Xi(ro,Qo,{type:"db.delete",desc:"Database Deleted",format:function(e){var t=e.user,n=e.name;return"User [".concat(t,"] deleted database [").concat(n,"]")}}),Xi(ro,Mo,{type:"db.session.postgres.statements.parse",desc:"PostgreSQL Statement Parse",format:function(e){var t=e.user,n=e.db_service,r=e.statement_name,o=e.query;return"User [".concat(t,"] has prepared [").concat(rc(o,80),"] as statement [").concat(r,"] on [").concat(n,"]")}}),Xi(ro,Do,{type:"db.session.postgres.statements.bind",desc:"PostgreSQL Statement Bind",format:function(e){var t=e.user,n=e.db_service,r=e.statement_name,o=e.portal_name;return"User [".concat(t,"] has readied statement [").concat(r,"] for execution as portal [").concat(o,"] on [").concat(n,"]")}}),Xi(ro,Fo,{type:"db.session.postgres.statements.execute",desc:"PostgreSQL Statement Execute",format:function(e){var t=e.user,n=e.db_service,r=e.portal_name;return"User [".concat(t,"] has executed portal [").concat(r,"] on [").concat(n,"]")}}),Xi(ro,So,{type:"db.session.postgres.statements.close",desc:"PostgreSQL Statement Close",format:function(e){return e.portal_name?"User [".concat(e.user,"] has closed portal [").concat(e.portal_name,"] on [").concat(e.db_service,"]"):"User [".concat(e.user,"] has closed statement [").concat(e.statement_name,"] on [").concat(e.db_service,"]")}}),Xi(ro,Uo,{type:"db.session.postgres.function",desc:"PostgreSQL Function Call",format:function(e){var t=e.user,n=e.db_service,r=e.function_oid;return"User [".concat(t,"] has executed function with OID [").concat(r,"] on [").concat(n,"]")}}),Xi(ro,Po,{type:"db.session.mysql.statements.prepare",desc:"MySQL Statement Prepare",format:function(e){var t=e.user,n=e.db_service,r=e.db_name,o=e.query;return"User [".concat(t,"] has prepared [").concat(rc(o,80),"] in database [").concat(r,"] on [").concat(n,"]")}}),Xi(ro,jo,{type:"db.session.mysql.statements.execute",desc:"MySQL Statement Execute",format:function(e){var t=e.user,n=e.db_service,r=e.db_name,o=e.statement_id;return"User [".concat(t,"] has executed statement [").concat(o,"] in database [").concat(r,"] on [").concat(n,"]")}}),Xi(ro,Oo,{type:"db.session.mysql.statements.send_long_data",desc:"MySQL Statement Send Long Data",format:function(e){var t=e.user,n=e.db_service,r=e.db_name,o=e.statement_id,i=e.parameter_id,c=e.data_size;return"User [".concat(t,"] has sent ").concat(c," bytes of data to parameter [").concat(i,"] of statement [").concat(o,"] in database [").concat(r,"] on [").concat(n,"]")}}),Xi(ro,Yo,{type:"db.session.mysql.statements.close",desc:"MySQL Statement Close",format:function(e){var t=e.user,n=e.db_service,r=e.db_name,o=e.statement_id;return"User [".concat(t,"] has closed statement [").concat(o,"] in database [").concat(r,"] on [").concat(n,"]")}}),Xi(ro,xo,{type:"db.session.mysql.statements.reset",desc:"MySQL Statement Reset",format:function(e){var t=e.user,n=e.db_service,r=e.db_name,o=e.statement_id;return"User [".concat(t,"] has reset statement [").concat(o,"] in database [").concat(r,"] on [").concat(n,"]")}}),Xi(ro,ko,{type:"db.session.mysql.statements.fetch",desc:"MySQL Statement Fetch",format:function(e){var t=e.user,n=e.db_service,r=e.db_name,o=e.rows_count,i=e.statement_id;return"User [".concat(t,"] has fetched ").concat(o," rows of statement [").concat(i,"] in database [").concat(r,"] on [").concat(n,"]")}}),Xi(ro,No,{type:"db.session.mysql.statements.bulk_execute",desc:"MySQL Statement Bulk Execute",format:function(e){var t=e.user,n=e.db_service,r=e.db_name,o=e.statement_id;return"User [".concat(t,"] has executed statement [").concat(o,"] in database [").concat(r,"] on [").concat(n,"]")}}),Xi(ro,Xo,{type:"mfa.add",desc:"MFA Device Added",format:function(e){var t=e.user,n=e.mfa_device_name,r=e.mfa_device_type;return"User [".concat(t,"] added ").concat(r," device [").concat(n,"]")}}),Xi(ro,_o,{type:"mfa.delete",desc:"MFA Device Deleted",format:function(e){var t=e.user,n=e.mfa_device_name,r=e.mfa_device_type;return"User [".concat(t,"] deleted ").concat(r," device [").concat(n,"]")}}),Xi(ro,po,{type:"billing.create_card",desc:"Credit Card Added",format:function(e){var t=e.user;return"User [".concat(t,"] has added a credit card")}}),Xi(ro,ho,{type:"billing.delete_card",desc:"Credit Card Deleted",format:function(e){var t=e.user;return"User [".concat(t,"] has deleted a credit card")}}),Xi(ro,yo,{type:"billing.update_card",desc:"Credit Card Updated",format:function(e){var t=e.user;return"User [".concat(t,"] has updated a credit card")}}),Xi(ro,go,{type:"billing.update_info",desc:"Billing Information Updated",format:function(e){var t=e.user;return"User [".concat(t,"] has updated the billing information")}}),Xi(ro,Zo,{type:"lock.created",desc:"Lock Created",format:function(e){var t=e.user,n=e.name;return"Lock [".concat(n,"] was created by user [").concat(t,"]")}}),Xi(ro,qo,{type:"lock.deleted",desc:"Lock Deleted",format:function(e){var t=e.user,n=e.name;return"Lock [".concat(n,"] was deleted by user [").concat(t,"]")}}),Xi(ro,oi,{type:"privilege_token.create",desc:"Privilege Token Created",format:function(e){var t=e.name;return"Privilege token was created for user [".concat(t,"]")}}),Xi(ro,ri,{type:"recovery_token.create",desc:"Recovery Token Created",format:function(e){var t=e.name;return"Recovery token was created for user [".concat(t,"]")}}),Xi(ro,ii,{type:"recovery_code.generated",desc:"Recovery Codes Generated",format:function(e){var t=e.user;return"New recovery codes were generated for user [".concat(t,"]")}}),Xi(ro,ci,{type:"recovery_code.used",desc:"Recovery Code Used",format:function(e){var t=e.user;return"User [".concat(t,"] successfully used a recovery code")}}),Xi(ro,ai,{type:"recovery_code.used",desc:"Recovery Code Use Failed",format:function(e){var t=e.user;return"User [".concat(t,"] failed an attempt to use a recovery code")}}),Xi(ro,To,{type:"windows.desktop.session.start",desc:"Windows Desktop Session Started",format:function(e){var t=e.user,n=e.windows_domain,r=e.desktop_addr,o=e.windows_user;return"User [".concat(t,"] has connected to Windows desktop [").concat(o,"@").concat(r,"] on [").concat(n,"]")}}),Xi(ro,Ro,{type:"windows.desktop.session.start",desc:"Windows Desktop Session Denied",format:function(e){var t=e.user,n=e.windows_domain,r=e.desktop_addr,o=e.windows_user;return"User [".concat(t,"] was denied access to Windows desktop [").concat(o,"@").concat(r,"] on [").concat(n,"]")}}),Xi(ro,Lo,{type:"windows.desktop.session.end",desc:"Windows Desktop Session Ended",format:function(e){var t=e.user,n=e.windows_domain,r=e.desktop_addr,o=e.windows_user;return"Session for Windows desktop [".concat(o,"@").concat(r,"] on [").concat(n,"] has ended for user [").concat(t,"]")}}),Xi(ro,Jo,{type:"desktop.clipboard.receive",desc:"Clipboard Data Received",format:function(e){var t=e.user,n=e.desktop_addr,r=e.length;return"User [".concat(t,"] received ").concat(r," bytes of clipboard data from desktop [").concat(n,"]")}}),Xi(ro,zo,{type:"desktop.clipboard.send",desc:"Clipboard Data Sent",format:function(e){var t=e.user,n=e.desktop_addr,r=e.length;return"User [".concat(t,"] sent ").concat(r," bytes of clipboard data to desktop [").concat(n,"]")}}),Xi(ro,Ji,{type:"x11-forward",desc:"X11 Forwarding Requested",format:function(e){var t=e.user;return"User [".concat(t,"] has requested x11 forwarding for a session")}}),Xi(ro,Gi,{type:"x11-forward",desc:"X11 Forwarding Request Failed",format:function(e){var t=e.user;return"User [".concat(t,"] was denied x11 forwarding for a session")}}),Xi(ro,Di,{type:"session.connect",desc:"Session Connected",format:function(e){var t=e.server_addr;return"Session connected to [".concat(t,"]")}}),Xi(ro,Hi,{type:"cert.create",desc:"Certificate Issued",format:function(e){var t=e.cert_type,n=e.identity.user;return"user"===t?"User certificate issued for [".concat(n,"]"):"Certificate of type [".concat(t,"] issued for [").concat(n,"]")}}),ro),ec={desc:"Unknown",format:function(){return"Unknown"}};function tc(e){var t=$i[e.code]||ec;return{codeDesc:t.desc,message:t.format(e),id:nc(e),code:e.code,user:e.user,time:new Date(e.time),raw:e}}function nc(e){var t=e.uid,n=e.event,r=e.time;return t||"".concat(n,":").concat(r)}function rc(e,t){return e.length<=t?e:e.substring(0,t-3)+"..."}function oc(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Nc),r=n.getValue()[0].value,i=r.isCustom,c=r.from,a=r.to;return i?o.createElement(Ot.F.ValueContainer,n,o.createElement(b.xv,{color:"text.primary"},"".concat(dn(c)," - ").concat(dn(a))),t):o.createElement(Ot.F.ValueContainer,n,t)},zc=n("c+I6");function Jc(){return[{name:"Today",from:(0,Ic.Z)(new Date),to:(0,Ec.Z)(new Date)},{name:"7 days",from:(0,Ic.Z)((0,zc.Z)(new Date,6)),to:(0,Ec.Z)(new Date)},{name:"Custom Range...",isCustom:!0,from:new Date,to:new Date}]}const Gc=function(e){var t=e.ml,n=e.range,r=e.onChangeRange,i=e.ranges,c=Tc((0,o.useState)(!1),2),a=c[0],s=c[1],u=(0,o.useState)((function(){return i.map((function(e){return{value:e,label:e.name}}))})),A=Tc(u,1)[0];function l(){s(!1)}return o.createElement(o.Fragment,null,o.createElement(Jt,{ml:t,width:"210px"},o.createElement(Gt,{isSearchable:!1,components:{ValueContainer:Lc},options:A,onChange:function(e){e.value.isCustom?s(!0):r(e.value)},value:{value:n,label:n.name}})),o.createElement(yc,{dialogCss:function(){return{padding:"0"}},disableEscapeKeyDown:!1,onClose:l,open:a},o.createElement(kc,{from:n.from,to:n.to,onChange:function(e,t){r({isCustom:!0,from:e,to:t}),l()},onClosePicker:l})))};var Hc=n("+2B0");function Kc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Vc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vc(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:"",t=o.useState((function(){return{status:e,statusText:""}})),n=Kc(t,2),r=n[0],i=n[1];function c(e){Wc.error("attempt",e),i({status:"failed",statusText:e.message})}function a(e){try{return i({status:"processing"}),e().then((function(){return i({status:"success"}),!0})).catch((function(e){return c(e),!1}))}catch(e){return c(e),Promise.resolve(!1)}}return{attempt:r,setAttempt:i,run:a,handleError:c}}function qc(e){return function(e){if(Array.isArray(e))return na(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ta(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _c(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n]+)>/g,(function(e,t){return"$"+i[t]})))}if("function"==typeof o){var c=this;return e[Symbol.replace].call(this,n,(function(){var e=arguments;return"object"!==ua(e[e.length-1])&&(e=[].slice.call(e)).push(r(e,c)),o.apply(this,e)}))}return e[Symbol.replace].call(this,n,o)},pa.apply(this,arguments)}function da(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ha(e,t)}function ha(e,t){return ha=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ha(e,t)}var ya=pa(/^(?:((?:(?![\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])[\s\S])+)@)((?:(?![\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])[\s\S])+)$/,{username:1,host:2}),ma=(0,f.ZP)(b.kC)(ia||(ia=la(["\n align-items: center;\n height: 32px;\n border: 1px solid;\n border-radius: 4px;\n border-color: rgba(255, 255, 255, 0.24);\n ","\n"])),(function(e){var t=e.hasError,n=e.theme;if(t)return{border:"1px solid ".concat(n.colors.error.main),paddifngLeft:"7px",paddifngRight:"1px"}})),wa=f.ZP.div(ca||(ca=la(["\n opacity: 0.75;\n font-size: 11px;\n font-weight: 500;\n padding: 0 8px;\n border-bottom-left-radius: 4px;\n border-top-left-radius: 4px;\n"]))),Ba=f.ZP.input(aa||(aa=la(["\n appearance: none;\n border: none;\n border-radius: 4px;\n box-sizing: border-box;\n border-bottom-left-radius: unset;\n border-top-left-radius: unset;\n display: block;\n outline: none;\n width: 100%;\n height: 100%;\n box-shadow: none;\n padding-left: 8px;\n font-size: 12px;\n\n ::-ms-clear {\n display: none;\n }\n\n :read-only {\n cursor: not-allowed;\n }\n\n ::placeholder {\n opacity: 1;\n color: ",";\n font-size: ","px;\n }\n\n &:hover,\n &:focus {\n background: ",";\n }\n\n "," "," "," ",";\n"])),(function(e){return e.theme.colors.text.placeholder}),(function(e){return e.theme.fontSizes[1]}),(function(e){return e.theme.colors.primary.lighter}),sa.$_,sa.Dh,sa.bf,sa.Cb);const Ea=function(e){var t=e.onPress,n=e.autoFocus,r=void 0!==n&&n,i=e.inputProps,c=void 0===i?{}:i,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Aa),s=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ga(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ga(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(o.useState(!1),2),u=s[0],A=s[1];return o.createElement(ma,fa({},a,{hasError:u}),o.createElement(wa,null,"SSH:"),o.createElement(Ba,fa({bg:"primary.light",color:"text.primary",placeholder:"login@host:port",autoFocus:r,onKeyPress:function(e){var n=e.target.value;if("Enter"!==e.key&&"click"!==e.type||!n)A(!1);else{var r=function(e){return ya.exec(e.trim())}(n);if(A(!r),r){var o=r.groups,i=o.username,c=o.host;t(i,c)}}}},c)))};var ba=n("merR"),Ia=n("ICW/");const Ca=n.p+"/assets/img/img-2a6939.png",va=function(e){var t=e.canCreate,n=e.onClick,r=e.clusterId,i=e.emptyStateInfo,c=i.title,a=i.description,s=i.buttonText,u=i.videoLink,A=i.readOnly;return t?o.createElement(ba.Z,{p:4,as:b.kC,maxWidth:"900px",width:"100%",mt:4,mx:"auto",bg:"primary.main"},o.createElement(b.kC,{as:b.rU,mr:4,maxWidth:"296px",maxHeight:"176px",bg:"primary.dark",p:4,borderRadius:8,alignItems:"center",justifyContent:"center",style:{position:"relative"},target:"_blank",href:u},o.createElement(Ia.Z,{width:"220px",src:Ca}),o.createElement(b.kC,{style:{position:"absolute"},flexDirection:"column",alignItems:"center",mt:3},o.createElement(Ke.rN,{mb:3,fontSize:"64px"}),o.createElement(b.xv,{color:"text.primary",fontWeight:700},"WATCH THE QUICKSTART"))),o.createElement(b.xu,null,o.createElement(b.xu,{mb:4},o.createElement(b.xv,{typography:"h3",mb:2,fontWeight:700,fontSize:14},c),a),o.createElement(b.DF,{onClick:n,width:"224px"},s))):o.createElement(b.xu,{p:8,mt:4,mx:"auto",maxWidth:"664px",textAlign:"center",color:"text.primary",bg:"primary.light",borderRadius:"12px"},o.createElement(b.xv,{typography:"h2",mb:"3"},A.title),o.createElement(b.xv,null,"Either there are no ",A.resource,' in the "',o.createElement(b.xv,{as:"span",bold:!0},r),"\" cluster, or your roles don't grant you access."))};function Qa(e){return Qa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qa(e)}function Ma(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Da(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Va),a=n||(0,f.Fg)().fonts.mono,s=o.useRef(),u=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Za(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Za(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(o.useState((function(){return"Copy"})),2),A=u[0],l=u[1],g=i?{overflow:"auto",whiteSpace:"pre",wordBreak:"break-all",fontSize:"12px",fontFamily:a}:{wordBreak:"break-all",fontSize:"12px",fontFamily:a};return o.createElement(b.kC,Wa({bg:"bgTerminal",p:"2",alignItems:"center",justifyContent:"space-between",borderRadius:2},c),o.createElement(b.kC,{mr:"2",style:g},i&&o.createElement(b.xu,{mr:"1"},"$"),o.createElement("div",{ref:s},t)),o.createElement(b.DF,{onClick:function(){var e,n,r,o;(o=t,function(e){var t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select();var n=document.execCommand("copy");return document.body.removeChild(t),n}(o)?Promise.resolve():navigator.clipboard.writeText(o).catch((function(e){window.prompt("Cannot copy to clipboard. Use ctrl/cmd + c",e)}))).then((function(){return l("Copied")})),e=s.current,window.getSelection&&document.createRange&&(r=window.getSelection(),(n=document.createRange()).selectNodeContents(e),r.removeAllRanges(),r.addRange(n))},style:{maxWidth:"48px",width:"100%",padding:"4px 8px",minHeight:"10px",fontSize:"10px"}},A))};function Xa(e,t,n){var r="linux-amd64",o=n?"ent-":"";return"mac"===e?r="darwin-amd64":"linux32"===e&&(r="linux-386"),"".concat("https://get.gravitational.com/","teleport-").concat(o,"v").concat(t,"-").concat(r,"-bin.tar.gz")}const _a=function(e){var t=e.isEnterprise,n=e.version;return o.createElement(b.xu,null,o.createElement(b.rU,{href:Xa("mac",n,t),target:"_blank",mr:"2"},"MacOS"),o.createElement(b.rU,{href:Xa("linux64",n,t),target:"_blank",mr:"2"},"Linux 64-bit"),o.createElement(b.rU,{href:Xa("linux32",n,t),target:"_blank"},"Linux 32-bit"))},$a=function(e){var t=e.isEnterprise,n=e.user,r=e.version,i=e.isAuthTypeLocal,c=window.document.location,a=c.hostname,s=c.port,u="".concat(a,":").concat(s||"443"),A="tsh login --proxy=".concat(u);return i&&(A="".concat(A," --auth=local --user=").concat(n)),o.createElement(o.Fragment,null,o.createElement(b.xu,{mb:4},o.createElement(b.xv,{bold:!0,as:"span"},"Step 1")," ","- Download Teleport package to your computer",o.createElement(_a,{isEnterprise:t,version:r})),o.createElement(b.xu,{mb:4},o.createElement(b.xv,{bold:!0,as:"span"},"Step 2")," - Login to Teleport",o.createElement(qa,{mt:"2",text:A})),o.createElement(b.xu,{mb:4},o.createElement(b.xv,{bold:!0,as:"span"},"Step 3")," - Generate a join token",o.createElement(qa,{mt:"2",text:"tctl tokens add --type=node --ttl=1h"})),o.createElement(b.xu,null,o.createElement(b.xv,{bold:!0,as:"span"},"Step 4")," - Start the Teleport agent with the following parameters",o.createElement(qa,{mt:"2",text:"teleport start --roles=node --token=[generated-join-token] --auth-server=".concat(u," ")})))};var es=["script","expiry","createJoinToken","attempt"];const ts=function(e){var t=e.script,n=e.expiry,r=e.createJoinToken,i=e.attempt,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,es);return"processing"===i.status?o.createElement(b.xu,{textAlign:"center"},o.createElement(b.z$,null)):"failed"===i.status?o.createElement(b.bZ,{kind:"danger",children:i.statusText}):o.createElement(o.Fragment,null,o.createElement(b.xv,c,"Use below script to add a server to your cluster. This script will install the Teleport agent to provide secure access to your server.",o.createElement(b.xv,{mt:"3"},"The script will be valid for"," ",o.createElement(b.xv,{bold:!0,as:"span"},n,"."))),o.createElement(qa,{text:t,mb:2}),o.createElement(b.xu,null,o.createElement(b.ZP,{onClick:r},"Regenerate Script")))};function ns(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return rs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rs(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0;return o.createElement(an.Ob,null,o.createElement(an.OX,{alignItems:"center",justifyContent:"space-between"},o.createElement(an.u4,null,"Servers"),o.createElement(b.kC,{alignItems:"center"},g&&o.createElement(Ea,{width:"280px",onPress:function(e,t){r(e,t)},mr:3}),o.createElement(as,{isLeafCluster:u,canCreate:a,onClick:c}))),"failed"===i.status&&o.createElement(Hc.b0,null,i.statusText," "),"processing"===i.status&&o.createElement(b.xu,{textAlign:"center",m:10},o.createElement(b.z$,null)),g&&o.createElement(o.Fragment,null,o.createElement(Ra,{nodes:t,onLoginMenuOpen:n,onLoginSelect:function(e,t,n){e.preventDefault(),r(t,n)}})),f&&o.createElement(va,{clusterId:l,canCreate:a&&!u,onClick:c,emptyStateInfo:us}),A&&o.createElement(cs,{onClose:s}))}var us={title:"ADD YOUR FIRST SERVER",description:o.createElement(b.xv,null,"Instant SSH access for engineers with native security and compliance."),buttonText:"ADD SERVER",videoLink:"https://www.youtube.com/watch?v=tUXYtwP-Kvw",readOnly:{title:"No Servers Found",resource:"servers"}};const As=function(){var e,t,n,r,i,c,s,u,A,l,f,g,p,d,h,y,m=(e=(0,ft.Z)(),t=gt(),n=t.isLeafCluster,r=t.clusterId,i=Ja((0,o.useState)([]),2),c=i[0],s=i[1],u=Zc("processing"),A=u.attempt,l=u.run,f=u.setAttempt,g=Ja((0,o.useState)(!1),2),p=g[0],d=g[1],h=e.storeUser.getTokenAccess().create,y=e.storeUser.getSshLogins(),(0,o.useEffect)((function(){l((function(){return e.nodeService.fetchNodes(r).then((function(e){return s(e.nodes)}))}))}),[r]),{canCreate:h,attempt:A,nodes:c,getNodeLoginOptions:function(e){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).map((function(n){return{login:n,url:a.Z.getSshConnectRoute({clusterId:e,serverId:t,login:n})}}))}(r,e,y)},startSshSession:function(e,t){var n=a.Z.getSshConnectRoute({clusterId:r,serverId:t,login:e});za(n)},isAddNodeVisible:p,isLeafCluster:n,clusterId:r,hideAddNode:function(){d(!1),e.nodeService.fetchNodes(r).then((function(e){return s(e.nodes)})).catch((function(e){return f({status:"failed",statusText:e.message})}))},showAddNode:function(){d(!0)}});return o.createElement(ss,m)};function ls(e){return ls="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ls(e)}function fs(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:"";e(Ws(Ws({},_s),{},{isSuccess:!0,message:t}))}function n(){e(Ws(Ws({},_s),{},{isProcessing:!0}))}function r(t){Xs.error("attempt",t),e(Ws(Ws({},_s),{},{isFailed:!0,message:t.message}))}return{do:function(e){try{return n(),e().then((function(){t()})).catch((function(e){throw r(e),e}))}catch(e){r(e)}},stop:t,start:n,clear:function(){e(Ws({},_s))},error:r}}(r)}),[r]);return[n,i]}function eu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tu(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]&&arguments[2],r=[];if("off"===e||!e)return r;var o="on"===e||"optional"===e,i=o&&"webauthn"===t,c=o&&"u2f"===t;return("webauthn"===e||i)&&r.push({value:"webauthn",label:"Hardware Key"}),("u2f"===e||c)&&r.push({value:"u2f",label:"Hardware Key"}),("otp"===e||o)&&r.push({value:"otp",label:"Authenticator App"}),n||"optional"!==e||r.push({value:"optional",label:"None"}),r}function iu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1&&this._subs.splice(t,1)}},{key:"addResult",value:function(e){var t=!1;(0,oe.isObject)(e)?t=e.valid:au.error("rule should return a valid object"),this.valid=this.valid&&Boolean(t)}},{key:"reset",value:function(){this.valid=!0,this.validating=!1}},{key:"validate",value:function(){return this.reset(),this.validating=!0,this._subs.forEach((function(e){try{e()}catch(e){au.error(e)}})),this.valid}}])&&cu(t.prototype,n),e}(),uu=o.createContext({});function Au(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,pu),m=fu(s(n)),w=m.valid,B=m.message,E=!w,I=E?B:t;return o.createElement(b.xu,du({mb:"4"},y),t&&o.createElement(b.SO,{hasError:E},I),o.createElement(b.II,{type:A,autoFocus:f,hasError:E,placeholder:c,value:n,autoComplete:p,onChange:r,onKeyPress:i,readOnly:h}))};var mu=["label","value","options","onChange","placeholder","maxMenuHeight","isClearable","isMulti","menuPosition","rule","isSearchable","isSimpleValue","autoFocus","isDisabled"];function wu(){return wu=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,mu),I=fu(f(n)),C=I.valid,v=I.message,Q=Boolean(!C),M=Q?v:t;return o.createElement(b.xu,wu({mb:"4"},E),t&&o.createElement(b.SO,{hasError:Q},M),o.createElement(Gt,{menuPosition:A,hasError:Q,isSimpleValue:h,isSearchable:p,isClearable:s,value:n,onChange:i,options:r,maxMenuHeight:a,placeholder:c,isMulti:u,autoFocus:m,isDisabled:B}))};var bu=function(e){return function(t){return function(){var n=!(!t||0===t.length);return{valid:n,message:n?"":e}}}},Iu=function(e){return function(){return e&&0!==e.length?{valid:!0}:{valid:!1,message:"Token is required"}}},Cu=function(e){return function(){return!e||e.length<6?{valid:!1,message:"Enter at least 6 characters"}:{valid:!0}}},vu=function(e){return function(t){return function(){return t?t!==e?{valid:!1,message:"Password does not match"}:{valid:!0}:{valid:!1,message:"Please confirm your password"}}}};function Qu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Mu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mu(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n>4,A[s++]=(15&r)<<4|o>>2,A[s++]=(3&o)<<6|63&i;return u};function ku(e){var t="==".slice(0,(4-e.length%4)%4),n=e.replace(/-/g,"+").replace(/_/g,"/")+t;return xu(n)}function Nu(e){return Yu(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Tu(e){var t,n,r=null===(t=e.webauthn)||void 0===t?void 0:t.publicKey;if(r){var o,i=r.challenge||"",c=(null===(o=r.user)||void 0===o?void 0:o.id)||"",a=r.excludeCredentials||[];r.challenge=ku(i),r.user.id=ku(c),r.excludeCredentials=a.map((function(e,t){return a[t].id=ku(e.id),a[t]}))}return{u2fRegisterRequest:e.u2f,qrCode:null===(n=e.totp)||void 0===n?void 0:n.qrCode,webauthnPublicKey:r}}function Ru(e){var t,n=null===(t=e.webauthn_challenge)||void 0===t?void 0:t.publicKey;if(n){var r=n.challenge||"",o=n.allowCredentials||[];n.challenge=ku(r),n.allowCredentials=o.map((function(e,t){return o[t].id=ku(e.id),o[t]}))}return{u2f:{appId:e.appId,challenge:e.challenge,registeredKeys:e.u2f_challenges||[]},webauthnPublicKey:n}}function Lu(e){var t,n;if(!e)throw new Error("error creating credential, please try again");var r=e.getClientExtensionResults();return{id:e.id,type:e.type,extensions:{appid:Boolean(null==r?void 0:r.appid)},rawId:Nu(e.rawId),response:{attestationObject:Nu(null===(t=e.response)||void 0===t?void 0:t.attestationObject),clientDataJSON:Nu(null===(n=e.response)||void 0===n?void 0:n.clientDataJSON)}}}function zu(e){var t,n,r,o;if(!e)throw new Error("error obtaining credential, please try again");var i=e.getClientExtensionResults();return{id:e.id,type:e.type,extensions:{appid:Boolean(null==i?void 0:i.appid)},rawId:Nu(e.rawId),response:{authenticatorData:Nu(null===(t=e.response)||void 0===t?void 0:t.authenticatorData),clientDataJSON:Nu(null===(n=e.response)||void 0===n?void 0:n.clientDataJSON),signature:Nu(null===(r=e.response)||void 0===r?void 0:r.signature),userHandle:Nu(null===(o=e.response)||void 0===o?void 0:o.userHandle)}}}var Ju={u2fBrowserSupported:function(){if(!window.u2f||navigator.userAgent.includes("Chrome"))return new Error("The U2F API for hardware keys is not supported by your browser. Please notify your system administrator to update cluster settings to use WebAuthn as the second factor protocol. In the meantime, you can use Firefox to use this hardware key.")},checkWebauthnSupport:function(){return window.PublicKeyCredential?Promise.resolve():Promise.reject(new Error("this browser does not support Webauthn required for hardware tokens, please try the latest version of Chrome, Firefox or Safari"))},createMfaRegistrationChallenge:function(e,t){return je.post(a.Z.getMfaCreateRegistrationChallengeUrl(e),{deviceType:t}).then(Tu)},createMfaAuthnChallengeWithToken:function(e){return je.post(a.Z.getAuthnChallengeWithTokenUrl(e)).then(Ru)},mfaLoginBegin:function(e,t){return je.post(a.Z.api.mfaLoginBegin,{user:e,pass:t}).then(Ru)},mfaChangePasswordBegin:function(e){return je.post(a.Z.api.mfaChangePasswordBegin,{pass:e}).then(Ru)},login:function(e,t,n){var r={user:e,pass:t,second_factor_token:n};return je.post(a.Z.api.sessionPath,r)},loginWithU2f:function(e,t){var n=this.u2fBrowserSupported();return n?Promise.reject(n):Ju.mfaLoginBegin(e,t).then((function(t){var n=new Promise((function(n,r){var o=t.u2f,i=o.appId,c=o.challenge,s=o.registeredKeys;window.u2f.sign(i,c,s,(function(t){if(t.errorCode){var o=Ju._getU2fErr(t.errorCode);r(o)}else{var i={user:e,u2f_sign_response:t};je.post(a.Z.api.mfaLoginFinish,i).then((function(e){n(e)})).catch((function(e){r(e)}))}}))}));return n}))},loginWithWebauthn:function(e,t){return Ju.checkWebauthnSupport().then((function(){return Ju.mfaLoginBegin(e,t)})).then((function(e){return navigator.credentials.get({publicKey:e.webauthnPublicKey})})).then((function(t){var n={user:e,webauthnAssertionResponse:zu(t)};return je.post(a.Z.api.mfaLoginFinish,n)}))},fetchPasswordToken:function(e){var t=a.Z.getPasswordTokenUrl(e);return je.get(t).then(Su)},resetPasswordWithWebauthn:function(e,t){return Ju.checkWebauthnSupport().then((function(){return Ju.createMfaRegistrationChallenge(e,"webauthn")})).then((function(e){return navigator.credentials.create({publicKey:e.webauthnPublicKey})})).then((function(n){var r={token:e,password:Gu(t),webauthnCreationResponse:Lu(n)};return je.put(a.Z.getPasswordTokenUrl(),r)})).then(Uu)},resetPasswordWithU2f:function(e,t){var n=this.u2fBrowserSupported();return n?Promise.reject(n):Ju._getU2FRegisterRes(e).then((function(n){return Ju._resetPassword(e,t,null,n)}))},resetPassword:function(e,t,n){return this._resetPassword(e,t,n)},changePassword:function(e,t,n){var r={old_password:Gu(e),new_password:Gu(t),second_factor_token:n};return je.put(a.Z.api.changeUserPasswordPath,r)},changePasswordWithU2f:function(e,t){var n=this.u2fBrowserSupported();return n?Promise.reject(n):Ju.mfaChangePasswordBegin(e).then((function(e){return new Promise((function(n,r){var o=e.u2f,i=o.appId,c=o.challenge,s=o.registeredKeys;window.u2f.sign(i,c,s,(function(e){if(e.errorCode){var o=Ju._getU2fErr(e.errorCode);r(o)}else{var i={new_password:Gu(t),u2f_sign_response:e};je.put(a.Z.api.changeUserPasswordPath,i).then((function(e){n(e)})).catch((function(e){r(e)}))}}))}))}))},changePasswordWithWebauthn:function(e,t){return Ju.checkWebauthnSupport().then((function(){return je.post(a.Z.api.mfaChangePasswordBegin,{pass:e})})).then((function(e){return navigator.credentials.get({publicKey:Ru(e).webauthnPublicKey})})).then((function(n){var r={old_password:Gu(e),new_password:Gu(t),webauthnAssertionResponse:zu(n)};return je.put(a.Z.api.changeUserPasswordPath,r)}))},createPrivilegeTokenWithTotp:function(e){return je.post(a.Z.api.createPrivilegeTokenPath,{secondFactorToken:e})},createPrivilegeTokenWithWebauthn:function(){return Ju.checkWebauthnSupport().then((function(){return je.post(a.Z.api.mfaAuthnChallengePath).then(Ru)})).then((function(e){return navigator.credentials.get({publicKey:e.webauthnPublicKey})})).then((function(e){return je.post(a.Z.api.createPrivilegeTokenPath,{webauthnAssertionResponse:zu(e)})}))},createPrivilegeTokenWithU2f:function(){var e=Ju.u2fBrowserSupported();return e?Promise.reject(e):je.post(a.Z.api.mfaAuthnChallengePath).then((function(e){return new Promise((function(t,n){var r=[e];e.u2f_challenges&&(r=e.u2f_challenges),window.u2f.sign(e.appId,e.challenge,r,(function(e){if(e.errorCode){var r=Ju._getU2fErr(e.errorCode);n(r)}else je.post(a.Z.api.createPrivilegeTokenPath,{u2fSignResponse:e}).then(t).catch((function(e){n(e)}))}))}))}))},createRestrictedPrivilegeToken:function(){return je.post(a.Z.api.createPrivilegeTokenPath,{})},_resetPassword:function(e,t,n,r){var o={password:Gu(t),second_factor_token:n,token:e,u2f_register_response:r};return je.put(a.Z.getPasswordTokenUrl(),o).then(Uu)},_getU2FRegisterRes:function(e){return Ju.createMfaRegistrationChallenge(e,"u2f").then((function(e){var t=e.u2fRegisterRequest;return new Promise((function(e,n){window.u2f.register(t.appId,[t],[],(function(t){if(t.errorCode){var r=Ju._getU2fErr(t.errorCode);n(r)}else e(t)}))}))}))},_getU2fErr:function(e){var t="error code ".concat(e);for(var n in window.u2f.ErrorCodes)window.u2f.ErrorCodes[n]==e&&(t=n);var r="Please check your U2F settings, make sure it is plugged in and you are using the supported browser.\nU2F error: ".concat(t);return new Error(r)}};function Gu(e){return window.btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){var n="0x"+t;return String.fromCharCode(Number(n))})))}const Hu=Ju;function Ku(e){var t=e.changePassword,n=e.changePasswordWithU2f,r=e.changePasswordWithWebauthn,i=e.preferredMfaType,c=e.auth2faType;return o.createElement(o.Fragment,null,o.createElement(b.xv,{typography:"h3",mb:3},"Change Password"),o.createElement(Fu,{auth2faType:c,preferredMfaType:i,onChangePass:t,onChangePassWithU2f:n,onChangePassWithWebauthn:r}))}const Vu=function(){var e={changePassword:function(e,t,n){return Hu.changePassword(e,t,n)},changePasswordWithU2f:function(e,t){return Hu.changePasswordWithU2f(e,t)},changePasswordWithWebauthn:function(e,t){return Hu.changePasswordWithWebauthn(e,t)},preferredMfaType:a.Z.getPreferredMfaType(),auth2faType:a.Z.getAuth2faType()};return o.createElement(Ku,e)};var Wu,Zu=function(e){var t=e.name;return o.createElement(Bn,{title:t},o.createElement(b.xv,{style:{maxWidth:"96px",whiteSpace:"nowrap"}},t))},qu=(0,f.ZP)($n)(Wu||(Wu=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n & > tbody > tr {\n td {\n vertical-align: middle;\n height: 32px;\n }\n }\n"])));const Xu=function(e){var t=e.name,n=e.onClose,r=e.onRemove,i=Zc(""),c=i.attempt,a=i.handleError,s=i.setAttempt;return o.createElement(yc,{disableEscapeKeyDown:!1,onClose:n,open:!0},o.createElement(Vr,{width:"400px"},o.createElement(b.xv,{typography:"h2",mb:2},"Remove Device"),"failed"==c.status&&o.createElement(Hc.b0,{mb:2},c.statusText),o.createElement(b.xv,{typography:"paragraph",mb:"6"},"Are you sure you want to remove device"," ",o.createElement(b.xv,{as:"span",bold:!0,color:"primary.contrastText"},t)," ","?")),o.createElement(_r,null,o.createElement(b.U3,{mr:"3",disabled:"processing"===c.status,onClick:function(){s({status:"processing"}),r().catch(a)}},"Remove"),o.createElement(b.PL,{disabled:"processing"===c.status,onClick:n},"Cancel")))},_u=function(e){var t=e.devices,n=void 0===t?[]:t,r=e.remove,i=e.mostRecentDevice,c=e.mfaDisabled,a=void 0!==c&&c,s=e.isSearchable,u=void 0!==s&&s,A=e.style;return o.createElement(qu,{data:n,style:A,columns:[{key:"description",headerText:"Type"},{key:"name",headerText:"Device Name",render:Zu},{key:"registeredDate",headerText:"Registered",isSortable:!0,render:function(e){var t=e.registeredDate;return o.createElement(Bn,null,dn(t))}},{key:"lastUsedDate",headerText:"Last Used",isSortable:!0,render:function(e){var t=e.lastUsedDate;return o.createElement(Bn,null,dn(t))}},{altKey:"remove-btn",render:function(e){return function(e,t,n,r){var i=e.id,c=e.name;return i===(null==n?void 0:n.id)?null:o.createElement(Bn,{align:"right"},o.createElement(b.ku,{size:"small",onClick:function(){return t({id:i,name:c})},disabled:r,title:r?"Two-factor authentication is disabled":""},"Remove"))}(e,r,i,a)}}],emptyText:"No Devices Found",isSearchable:u,initialSort:{key:"registeredDate",dir:"DESC"}})};function $u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n tbody > tr > td {\n vertical-align: middle;\n }\n"])));const OA=function(e){var t=e.apps,n=void 0===t?[]:t,r=e.pageSize,i=void 0===r?100:r;return o.createElement(jA,{data:n,columns:[{altKey:"app-icon",render:SA},{key:"name",headerText:"Name",isSortable:!0},{key:"description",headerText:"Description",isSortable:!0},{key:"publicAddr",headerText:"Address",render:FA,isSortable:!0},{key:"tags",headerText:"Labels",render:function(e){var t=e.tags;return o.createElement(Cn,{data:t})}},{altKey:"launch-btn",render:UA}],emptyText:"No Applications Found",pagination:{pageSize:i},isSearchable:!0})},YA=function(e){var t=e.isEnterprise,n=e.user,r=e.version,i=e.onClose,c=e.isAuthTypeLocal,a=window.document.location,s=a.hostname,u=a.port,A="".concat(s,":").concat(u||"443"),l="tsh login --proxy=".concat(A);return c&&(l="".concat(l," --auth=local --user=").concat(n)),o.createElement(o.Fragment,null,o.createElement(Vr,{minHeight:"240px",flex:"0 0 auto"},o.createElement(b.xu,{mb:4},o.createElement(b.xv,{bold:!0,as:"span"},"Step 1")," ","- Download Teleport package to your computer",o.createElement(_a,{isEnterprise:t,version:r})),o.createElement(b.xu,{mb:4},o.createElement(b.xv,{bold:!0,as:"span"},"Step 2")," - Login to Teleport",o.createElement(qa,{mt:"2",text:l})),o.createElement(b.xu,{mb:4},o.createElement(b.xv,{bold:!0,as:"span"},"Step 3")," - Generate a join token",o.createElement(qa,{mt:"2",text:"tctl tokens add --type=app"})),o.createElement(b.xu,{mb:"4"},o.createElement(b.xv,{bold:!0,as:"span"},"Step 4")," - Start the Teleport agent with the following parameters",o.createElement(qa,{mt:"2",text:"teleport start --roles=app --app-name=[example-app] --app-uri=http://localhost/ --token=[generated-join-token] --auth-server=".concat(A)})),o.createElement(b.xu,null,"* Note: For a self-hosted Teleport version, you may need to update DNS and obtain a TLS certificate for this application.\n Learn more about application access ",o.createElement(b.rU,{href:"https://goteleport.com/teleport/docs/application-access/",target:"_blank"},"here"),".")),o.createElement(_r,null,o.createElement(b.PL,{onClick:i},"Close")))};function xA(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return kA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kA(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n63?{valid:!1,message:"Must be 63 chars or less"}:e.match(RA)?{valid:!0}:{valid:!1,message:"Invalid DNS sub-domain name"}:{valid:!1,message:"Required"}}};const zA=function(e){var t=e.cmd,n=e.onClose,r=e.attempt,i=e.expires,c=xA(o.useState(""),2),a=c[0],s=c[1],u=xA(o.useState(""),2),A=u[0],l=u[1];function f(t){t.validate()&&e.onCreate(a,A)}function g(e,t){"Enter"===e.key&&f(t)}return o.createElement(gu,null,(function(e){var c=e.validator;return o.createElement(o.Fragment,null,o.createElement(Vr,{minHeight:"254px",flex:"0 0 auto"},o.createElement(b.kC,{alignItems:"center",flexDirection:"row"},o.createElement(yu,{rule:LA,label:"App Name",autoFocus:!0,value:a,placeholder:"jenkins",width:"320px",mr:"3",onKeyPress:function(e){return g(e,c)},onChange:function(e){return s(e.target.value.toLowerCase())}}),o.createElement(yu,{rule:TA,label:"INTERNAL APPLICATION URL",width:"100%",value:A,placeholder:"https://localhost:4000",onKeyPress:function(e){return g(e,c)},onChange:function(e){return l(e.target.value)}})),!t&&o.createElement(b.xv,{mb:"3"},"Teleport can automatically set up application access. Provide the name and URL of your application to generate our auto-installer script.",o.createElement(b.xv,{mt:"2"},"The script will install the Teleport agent to provide secure access to your application.")),"failed"===r.status&&o.createElement(b.bZ,{kind:"danger",children:r.statusText}),t&&o.createElement(o.Fragment,null,o.createElement(b.xv,{mb:"3"},"Use the script below to add an application to your cluster."," ","The script will be valid for",o.createElement(b.xv,{bold:!0,as:"span"}," ".concat(i),"."),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t="https://".concat(e,".").concat(window.location.host);return o.createElement(b.xv,null,"This app will be available on "," ",o.createElement(b.rU,{target:"_blank",href:t},"".concat(t)))}(a)),o.createElement(qa,{text:t,mb:2}))),o.createElement(_r,null,!t&&o.createElement(b.DF,{mr:"3",disabled:"processing"===r.status,onClick:function(){return f(c)}},"Generate Script"),t&&o.createElement(b.DF,{mr:"3",disabled:"processing"===r.status,onClick:function(){return f(c)}},"Regenerate"),o.createElement(b.PL,{disabled:"processing"===r.status,onClick:n},"Close")))}))};function JA(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return GA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?GA(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function GA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return i((function(){return t.nodeService.createAppBashCommand(e,n).then((function(e){h(e.text),w(e.expires)}))}))},cmd:d,expires:m,attempt:r,automatic:f,setAutomatic:g,isAuthTypeLocal:u,isEnterprise:A});return o.createElement(KA,HA({},B,e))};function WA(e){var t=e.canCreate,n=e.isLeafCluster,r=e.onClick,i=n||!t,c="";return t||(c="You do not have access to add an application"),n&&(c="Adding an application to a leaf cluster is not supported"),o.createElement(b.DF,{title:c,disabled:i,width:"240px",onClick:r},"Add Application")}function ZA(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return qA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qA(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0;return o.createElement(an.Ob,null,o.createElement(an.OX,{alignItems:"center",justifyContent:"space-between"},o.createElement(an.u4,null,"Applications"),o.createElement(WA,{isLeafCluster:n,canCreate:a,onClick:i})),"processing"===s.status&&o.createElement(b.xu,{textAlign:"center",m:10},o.createElement(b.z$,null)),"failed"===s.status&&o.createElement(Hc.b0,null,s.statusText," "),l&&o.createElement(OA,{apps:u}),A&&o.createElement(va,{clusterId:t,canCreate:a&&!n,onClick:i,emptyStateInfo:_A}),r&&o.createElement(VA,{onClose:c}))}var _A={title:"ADD YOUR FIRST APPLICATION",description:o.createElement(b.xv,null,"Quick access to web applications running behind NAT and firewalls with\n security and compliance. Follow ",o.createElement(b.rU,{target:"_blank",href:"https://goteleport.com/docs/application-access/getting-started/"},"the documentation")," to get started."),videoLink:"https://www.youtube.com/watch?v=HkBQY-uWIbU",buttonText:"ADD APPLICATION",readOnly:{title:"No Applications Found",resource:"applications"}};const $A=function(){var e,t,n,r,i,c,a,s,u,A,l,f,g,p,d,h,y=(e=(0,ft.Z)(),t=e.storeUser.getTokenAccess().create,n=ZA((0,o.useState)(!1),2),r=n[0],i=n[1],c=gt(),a=c.clusterId,s=c.isLeafCluster,u=Zc("processing"),A=u.attempt,l=u.setAttempt,f=u.run,g=ZA((0,o.useState)([]),2),p=g[0],d=g[1],h=e.isEnterprise,(0,o.useEffect)((function(){f((function(){return e.appService.fetchApps(a).then((function(e){return d(e.apps)}))}))}),[a]),{clusterId:a,isLeafCluster:s,isEnterprise:h,isAddAppVisible:r,hideAddApp:function(){i(!1),e.appService.fetchApps(a).then((function(e){return d(e.apps)})).catch((function(e){return l({status:"failed",statusText:e.message})}))},showAddApp:function(){i(!0)},canCreate:t,attempt:A,apps:p});return o.createElement(XA,y)};var el=function(){return"\n min-height: 400px;\n max-width: 600px;\n width: 100%;\n"};const tl=function(e){var t=e.onClose,n=e.username,r=e.authType,i=e.kubeConnectName,c=e.clusterId,a=window.document.location,s=a.hostname,u=a.port,A="".concat(s,":").concat(u||"443"),l="local"===r?"--auth=".concat(r," --user=").concat(n," "):"",f="tsh login --proxy=".concat(A," ").concat(l).concat(c);return o.createElement($r,{dialogCss:el,disableEscapeKeyDown:!1,onClose:t,open:!0},o.createElement(Rr,null,o.createElement(xr,null,"connect to kubernetes cluster")),o.createElement(Vr,null,o.createElement(b.xu,{mb:4},o.createElement(b.xv,{bold:!0,as:"span"},"Step 1")," - Login to Teleport",o.createElement(qa,{mt:"2",text:f})),o.createElement(b.xu,{mb:4},o.createElement(b.xv,{bold:!0,as:"span"},"*Step 2")," - Select the Kubernetes cluster",o.createElement(qa,{mt:"2",text:"tsh kube login ".concat(i)})),o.createElement(b.xu,{mb:4},o.createElement(b.xv,{bold:!0,as:"span"},"Step 3")," - Connect to the Kubernetes cluster",o.createElement(qa,{mt:"2",text:"kubectl get pods"})),o.createElement(b.xu,null,"* Note: To write kubectl configuration to a separate file instead of having your global kubectl configuration modified, run the following command, before running Step 2:",o.createElement(qa,{mt:"2",text:"export KUBECONFIG=${HOME?}/teleport-kubeconfig.yaml"}))),o.createElement(_r,null,o.createElement(b.PL,{onClick:t},"Close")))};function nl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0;return o.createElement(an.Ob,null,o.createElement(an.OX,{alignItems:"center",justifyContent:"space-between"},o.createElement(an.u4,null,"Kubernetes"),o.createElement(b.DF,{as:"a",width:"240px",target:"_blank",href:il,rel:"noreferrer"},"View documentation")),"failed"===n.status&&o.createElement(Hc.b0,null,n.statusText),"processing"===n.status&&o.createElement(b.xu,{textAlign:"center",m:10},o.createElement(b.z$,null)),A&&o.createElement(o.Fragment,null,o.createElement(rl,{kubes:t,username:r,authType:i,clusterId:a})),u&&o.createElement(va,{clusterId:a,canCreate:s&&!c,onClick:function(){return window.open(il)},emptyStateInfo:al}))}var al={title:"ADD YOUR FIRST KUBERNETES CLUSTER",description:o.createElement(b.xv,null,"Fast, secure access to Kubernetes clusters. Follow"," ",o.createElement(b.rU,{target:"_blank",href:il},"the documentation")," ","to connect your first cluster."),videoLink:"https://www.youtube.com/watch?v=2diX_UAmJ1c",buttonText:"VIEW DOCUMENTATION",readOnly:{title:"No Kubernetes Clusters Found",resource:"kubernetes clusters"}};const sl=function(){var e,t,n,r,i,c,a,s,u,A,l,f,g,p,d=(e=(0,ft.Z)(),t=gt(),n=t.clusterId,r=t.isLeafCluster,i=e.storeUser.state,c=i.username,a=i.authType,s=e.storeUser.getTokenAccess().create,u=Zc("processing"),A=u.run,l=u.attempt,f=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ol(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ol(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,o.useState)([]),2),g=f[0],p=f[1],(0,o.useEffect)((function(){A((function(){return e.kubeService.fetchKubernetes(n).then((function(e){return p(e.kubes)}))}))}),[n]),{kubes:g,attempt:l,username:c,authType:a,isLeafCluster:r,clusterId:n,canCreate:s});return o.createElement(cl,d)},ul=o.lazy((function(){return n.e(52).then(n.bind(n,"QtRT"))}));var Al,ll=n("g9RG");function fl(e){var t=e.clusterId,n=a.Z.proxyCluster===t;return o.createElement(Bn,{style:{width:"40px"}},n&&o.createElement(ll.sq,null,"ROOT"))}function gl(e,t){return o.createElement(jt.sN,{as:w.OL,to:t,key:e},e)}var pl=(0,f.ZP)($n)(Al||(Al=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n td {\n height: 22px;\n }\n"])));const dl=function(e){var t=e.clusters,n=void 0===t?[]:t,r=e.pageSize,i=void 0===r?50:r,c=e.menuFlags;return o.createElement(pl,{data:n,columns:[{altKey:"root-label",render:fl},{key:"clusterId",headerText:"Name",isSortable:!0},{altKey:"menu-btn",render:function(e){return t=c,n=e.clusterId,r=[],t.showNodes&&r.push(gl("Servers",a.Z.getNodesRoute(n))),t.showApps&&r.push(gl("Applications",a.Z.getAppsRoute(n))),t.showKubes&&r.push(gl("Kubernetes",a.Z.getKubernetesRoute(n))),t.showDatabases&&r.push(gl("Databases",a.Z.getDatabasesRoute(n))),t.showDesktops&&r.push(gl("Desktops",a.Z.getDesktopsRoute(n))),t.showAudit&&r.push(gl("Audit Log",a.Z.getAuditRoute(n))),t.showRecordings&&r.push(gl("Session Recordings",a.Z.getRecordingsRoute(n))),o.createElement(Bn,{align:"right"},r&&o.createElement(Ts,{children:r}));var t,n,r}}],emptyText:"No Clusters Found",isSearchable:!0,showFirst:function(e){return e.find((function(e){return e.clusterId===a.Z.proxyCluster}))},pagination:{pageSize:i}})};function hl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return yl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yl(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Dl);return o.createElement(b.kC,Fl({style:{position:"relative",boxShadow:"0 8px 32px rgba(0, 0, 0, 0.24)"},width:"240px",height:"240px",borderRadius:"3",flexDirection:"column",alignItems:"center",justifyContent:"center",bg:"primary.light",px:"5",pt:"4",pb:"5"},c),o.createElement(b.kC,{width:"100%",justifyContent:"center"},o.createElement(Ds,{buttonIconProps:Ul},o.createElement(jt.sN,{onClick:function(){return i(n)}},"Delete..."))),o.createElement(b.kC,{flex:"1",mb:"3",alignItems:"center",justifyContent:"center",flexDirection:"column"},o.createElement(Ke.OG,{my:"4",style:{textAlign:"center"},fontSize:"48px",color:"text.primary"}),o.createElement(b.xv,{typography:"p",bold:!0,caps:!0,mb:"1",textAlign:"center",title:t,style:{width:"200px"}},t)),o.createElement(b.DF,{mt:"auto",px:"1",size:"medium",block:!0,onClick:function(){return r(n)}},"EDIT TRUSTED CLUSTER"))}var Ul={style:{right:"10px",position:"absolute",top:"10px"}},Pl=["items","onEdit","onDelete"];function jl(){return jl=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Pl),c=(t=t||[]).map((function(e){var t=e.id,i=e.name,c=e.kind;return o.createElement(Sl,{mb:4,mr:5,key:t,id:t,onEdit:n,onDelete:r,name:i,kind:c})}));return o.createElement(b.kC,jl({flexWrap:"wrap",alignItems:"center"},i),c)};function Yl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,r=zl(e.items,kl),i="creating"===r.status?"Add a new trusted cluster":"Edit trusted cluster";return o.createElement(an.Ob,null,o.createElement(an.OX,{alignItems:"center"},o.createElement(an.u4,null,"Trusted Clusters"),n&&o.createElement(b.DF,{disabled:!e.canCreate,ml:"auto",width:"240px",onClick:function(){return r.create("trusted_cluster")}},"Connect to Root Cluster")),e.isFailed&&o.createElement(Hc.b0,null,e.message," "),e.isProcessing&&o.createElement(b.xu,{textAlign:"center",m:10},o.createElement(b.z$,null)),t&&o.createElement(Zl,{disabled:!e.canCreate,onCreate:function(){return r.create("trusted_cluster")}}),n&&o.createElement(b.kC,{alignItems:"start"},o.createElement(Ol,{mt:"4",flex:"1",items:e.items,onEdit:r.edit,onDelete:r.remove}),o.createElement(Wl,{ml:"4",width:"240px",color:"text.primary",style:{flexShrink:0}})),("creating"===r.status||"editing"===r.status)&&o.createElement(Ml,{onSave:function(t){var n="creating"===r.status;return e.save(t,n)},title:i,onClose:r.disregard,text:r.item.content,name:r.item.name,isNew:"creating"===r.status}),"removing"===r.status&&o.createElement(xl,{name:r.item.name,onClose:r.disregard,onDelete:function(){return e.remove(r.item.name)}}))};var Xl=function(e){var t=e.user,n=e.onEdit,r=e.onReset,i=e.onDelete;return t.isLocal?o.createElement(Bn,{align:"right"},o.createElement(Ts,null,o.createElement(jt.sN,{onClick:function(){return n(t)}},"Edit..."),o.createElement(jt.sN,{onClick:function(){return r(t)}},"Reset Password..."),o.createElement(jt.sN,{onClick:function(){return i(t)}},"Delete..."))):o.createElement(Bn,{align:"right"})},_l=function(e){var t=e.roles.sort().map((function(e){return o.createElement(b.__,{mb:"1",mr:"1",key:e,kind:"secondary"},e)}));return o.createElement(Bn,null,t)};const $l=function(e){var t=e.users,n=void 0===t?[]:t,r=e.pageSize,i=void 0===r?20:r,c=e.onEdit,a=e.onDelete,s=e.onReset;return o.createElement($n,{data:n,columns:[{key:"name",headerText:"Name",isSortable:!0},{key:"roles",headerText:"Roles",isSortable:!0,render:function(e){var t=e.roles;return o.createElement(_l,{roles:t})}},{key:"authType",headerText:"Type",isSortable:!0,render:function(e){var t=e.authType;return o.createElement(Bn,{style:{textTransform:"capitalize"}},t)}},{altKey:"options-btn",render:function(e){return o.createElement(Xl,{user:e,onEdit:c,onReset:s,onDelete:a})}}],emptyText:"No Users Found",isSearchable:!0,pagination:{pageSize:i}})},ef=function(e){var t=e.token,n=e.onClose,r=e.asInvite,i=void 0!==r&&r,c=a.Z.getUserResetTokenRoute(t.value,i),s=(0,io.Z)(Date.now(),t.expires);return o.createElement($r,{dialogCss:function(){return{maxWidth:"500px",width:"100%"}},disableEscapeKeyDown:!1,onClose:close,open:!0},o.createElement(Rr,null,o.createElement(xr,null,"Share Link")),o.createElement(Vr,null,i?o.createElement(b.xv,{mb:4,mt:1},"User",o.createElement(b.xv,{bold:!0,as:"span"}," ".concat(t.username," ")),"has been created but requires a password. Share this URL with the user to set up a password, link is valid for ",s,"."):o.createElement(b.xv,{mb:4,mt:1},"User",o.createElement(b.xv,{bold:!0,as:"span"}," ".concat(t.username," ")),"has been reset. Share this URL with the user to set up a new password, link is valid for ",s,"."),o.createElement(qa,{text:c,bash:!1})),o.createElement(_r,null,o.createElement(b.PL,{onClick:n},"Close")))};function tf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return nf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nf(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:"")},onChangeRoles:function(){g(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[])},roles:e.roles,isNew:e.isNew,attempt:n,name:c,selectedRoles:f,token:u}}(e);return o.createElement(rf,t)};function cf(e){var t=e.username,n=e.onDelete,r=e.onClose,i=e.attempt;return o.createElement($r,{dialogCss:function(){return{maxWidth:"500px",width:"100%"}},disableEscapeKeyDown:!1,onClose:close,open:!0},o.createElement(Rr,null,o.createElement(xr,null,"Delete User?")),o.createElement(Vr,null,"failed"===i.status&&o.createElement(b.bZ,{children:i.statusText}),o.createElement(b.xv,{mb:4},"You are about to delete user",o.createElement(b.xv,{bold:!0,as:"span"}," ".concat(t)),". This will revoke the user's access to this cluster.")),o.createElement(_r,null,o.createElement(b.U3,{mr:"3",disabled:"processing"===i.status,onClick:n},"I understand, delete user"),o.createElement(b.PL,{onClick:r},"Cancel")))}const af=function(e){var t=function(e){var t=Zc(),n=t.attempt,r=t.setAttempt;return{username:e.username,onClose:e.onClose,onDelete:function(){r({status:"processing"}),e.onDelete(e.username).then((function(){r({status:"success"}),e.onClose()})).catch((function(e){r({status:"failed",statusText:e.message})}))},attempt:n}}(e);return o.createElement(cf,t)};function sf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n\n # Github OAuth app client secret\n client_secret: \n # Github will make a callback to this URL after successful authentication\n # cluster-url is the address the cluster UI is reachable at\n redirect_url: "https:///v1/webapi/github/callback"\n # connector display name that will be appended to the title of "Login with"\n # button on the cluster login screen so it will say "Login with Github"\n display: Github\n # mapping of Github team memberships to Teleport cluster roles\n teams_to_logins:\n - organization: \n team: \n logins:\n - "access"\n'};function Vf(e){var t=e.attempt,n=e.items,r=e.remove,i=e.save,c=0===n.length,a=zl(n,Kf),s="creating"===a.status?"Creating a new github connector":"Editing github connector";return o.createElement(an.Ob,null,o.createElement(an.OX,null,o.createElement(an.u4,null,"Auth Connectors"),o.createElement(b.DF,{ml:"auto",width:"240px",onClick:function(){return a.create("github")}},"New Github Connector")),"failed"===t.status&&o.createElement(b.bZ,{children:t.statusText}),"processing"===t.status&&o.createElement(b.xu,{textAlign:"center",m:10},o.createElement(b.z$,null)),"success"===t.status&&o.createElement(b.kC,{alignItems:"start"},c&&o.createElement(b.kC,{mt:"4",width:"100%",justifyContent:"center"},o.createElement(Rf,{onCreate:function(){return a.create("github")}})),!c&&o.createElement(o.Fragment,null,o.createElement(Jf,{items:n,onEdit:a.edit,onDelete:a.remove}),o.createElement(b.xu,{ml:"4",width:"240px",color:"text.primary",style:{flexShrink:0}},o.createElement(b.xv,{typography:"h6",mb:3,caps:!0},"Authentication Connectors"),o.createElement(b.xv,{typography:"subtitle1",mb:3},"Authentication connectors allow Teleport to authenticate users via an external identity source such as Okta, Active Directory, GitHub, etc. This authentication method is frequently called single sign-on (SSO)."),o.createElement(b.xv,{typography:"subtitle1",mb:2},"Please"," ",o.createElement(b.rU,{color:"light",href:"https://goteleport.com/docs/admin-guide/#github-oauth-20",target:"_blank"},"view our documentation")," ","on how to configure a GitHub connector.")))),("creating"===a.status||"editing"===a.status)&&o.createElement(Ml,{title:s,onSave:function(e){var t="creating"===a.status;return i(e,t)},text:a.item.content,name:a.item.name,isNew:"creating"===a.status,onClose:a.disregard}),"removing"===a.status&&o.createElement(Gf,{name:a.item.name,onClose:a.disregard,onDelete:function(){return r(a.item.name)}}))}const Wf=function(){var e=function(){var e=(0,ft.Z)(),t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Hf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hf(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,o.useState)([]),2),n=t[0],r=t[1],i=Zc("processing"),c=i.attempt,a=i.run;function s(){return e.resourceService.fetchGithubConnectors().then((function(e){r(e)}))}return(0,o.useEffect)((function(){a((function(){return s()}))}),[]),{items:n,attempt:c,save:function(t,n){return n?e.resourceService.createGithubConnector(t).then(s):e.resourceService.updateGithubConnector(t).then(s)},remove:function(t){return e.resourceService.deleteGithubConnector(t).then(s)}}}();return o.createElement(Vf,e)},Zf=function(e){var t=e.username,n=e.dbName,r=e.onClose,i=e.authType,c=window.document.location,a=c.hostname,s=c.port,u="".concat(a,":").concat(s||"443"),A="sso"===i?"tsh login --proxy=".concat(u):"tsh login --proxy=".concat(u," --auth=local --user=").concat(t);return o.createElement($r,{dialogCss:function(){return{maxWidth:"600px",width:"100%"}},disableEscapeKeyDown:!1,onClose:r,open:!0},o.createElement(Rr,{mb:4},o.createElement(xr,null,"Connect To Database")),o.createElement(Vr,{minHeight:"240px",flex:"0 0 auto"},o.createElement(b.xu,{mb:4},o.createElement(b.xv,{bold:!0,as:"span"},"Step 1")," - Login to Teleport",o.createElement(qa,{mt:"2",text:A})),o.createElement(b.xu,{mb:4},o.createElement(b.xv,{bold:!0,as:"span"},"Step 2")," - Retrieve credentials for the database",o.createElement(qa,{mt:"2",text:"tsh db login [--db-user=] [--db-name=] ".concat(n)})),o.createElement(b.xu,{mb:4},o.createElement(b.xv,{bold:!0,as:"span"},"Step 3")," - Connect to the database",o.createElement(qa,{mt:"2",text:"tsh db connect [--db-user=] [--db-name=] ".concat(n)})),o.createElement(b.xu,null,"* Note: To connect with a GUI database client, see our ",o.createElement(b.rU,{href:"https://goteleport.com/docs/database-access/guides/gui-clients/",target:"_blank"},"documentation")," for instructions.")),o.createElement(_r,null,o.createElement(b.PL,{onClick:r},"Close")))};function qf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0;return o.createElement(an.Ob,null,o.createElement(an.OX,{alignItems:"center",justifyContent:"space-between"},o.createElement(an.u4,null,"Databases"),o.createElement(eg,{isLeafCluster:r,canCreate:i,onClick:c})),"processing"===n.status&&o.createElement(b.xu,{textAlign:"center",m:10},o.createElement(b.z$,null)),"failed"===n.status&&o.createElement(Hc.b0,null,n.statusText),d&&o.createElement(o.Fragment,null,o.createElement(Xf,{databases:t,username:A,clusterId:f,authType:g})),p&&o.createElement(va,{clusterId:f,canCreate:i&&!r,onClick:c,emptyStateInfo:Ag}),s&&o.createElement(sg,{isEnterprise:u,username:A,version:l,authType:g,onClose:a}))}var Ag={title:"ADD YOUR FIRST DATABASE",description:o.createElement(b.xv,null,"Consolidate access to databases running behind NAT, prevent data exfiltration, meet compliance requirements, and have complete visibility into access and behavior. Follow"," ",o.createElement(b.rU,{target:"_blank",href:"https://goteleport.com/docs/database-access/guides/"},"the documentation")," ","to get started."),videoLink:"https://www.youtube.com/watch?v=PCYyTecSzCY",buttonText:"ADD DATABASE",readOnly:{title:"No Databases Found",resource:"databases"}};const lg=function(){var e,t,n,r,i,c,a,s,u,A,l,f,g,p,d,h,y,m,w,B=(e=(0,ft.Z)(),t=Zc("processing"),n=t.attempt,r=t.run,i=t.setAttempt,c=gt(),a=c.clusterId,s=c.isLeafCluster,u=e.storeUser.state.username,A=e.storeUser.getTokenAccess().create,l=e.isEnterprise,f=e.storeUser.state.cluster.authVersion,g=e.storeUser.state.authType,p=_f((0,o.useState)([]),2),d=p[0],h=p[1],y=_f((0,o.useState)(!1),2),m=y[0],w=y[1],(0,o.useEffect)((function(){r((function(){return e.databaseService.fetchDatabases(a).then((function(e){return h(e.databases)}))}))}),[a]),{databases:d,attempt:n,canCreate:A,isLeafCluster:s,isEnterprise:l,hideAddDialog:function(){w(!1),e.databaseService.fetchDatabases(a).then((function(e){return h(e.databases)})).catch((function(e){return i({status:"failed",statusText:e.message})}))},showAddDialog:function(){w(!0)},isAddDialogVisible:m,username:u,version:f,clusterId:a,authType:g});return o.createElement(ug,B)},fg=function(e){var t=e.desktops,n=void 0===t?[]:t,r=e.pageSize,i=void 0===r?100:r,c=e.onLoginMenuOpen,a=e.onLoginSelect;function s(e,t,n){e.preventDefault(),a(t,n)}return o.createElement($n,{data:n,columns:[{key:"addr",headerText:"Address",isSortable:!0},{key:"name",headerText:"Name",isSortable:!0},{key:"tags",headerText:"Labels",render:function(e){var t=e.tags;return o.createElement(Cn,{data:t})}},{altKey:"login-cell",render:function(e){return t=c,n=s,r=e.name,o.createElement(Bn,{align:"right"},o.createElement(Na,{onOpen:function(){return t(r)},onSelect:function(e,t){return n?n(e,t,r):[]},transformOrigin:{vertical:"top",horizontal:"right"},anchorOrigin:{vertical:"center",horizontal:"right"}}));var t,n,r}}],pagination:{pageSize:i},initialSort:{key:"name",dir:"ASC"},isSearchable:!0,emptyText:"No Desktops Found"})};function gg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:"";return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).map((function(n){return{login:n,url:a.Z.getDesktopRoute({clusterId:e,desktopName:t,username:n})}}))}(i,e,s)},openRemoteDesktopTab:function(e,t){var n=a.Z.getDesktopRoute({clusterId:i,desktopName:t,username:e});za(n)}}}function dg(e){var t=e.attempt,n=e.username,r=e.clusterId,i=e.desktops,c=e.getWindowsLoginOptions,a=e.openRemoteDesktopTab;return o.createElement(an.Ob,null,o.createElement(an.OX,{alignItems:"center",justifyContent:"space-between"},o.createElement(an.u4,null,"Desktops")),"processing"===t.status&&o.createElement(b.xu,{textAlign:"center",m:10},o.createElement(b.z$,null)),"failed"===t.status&&o.createElement(Hc.b0,null,t.statusText),"success"===t.status&&o.createElement(o.Fragment,null,o.createElement(fg,{desktops:i,username:n,clusterId:r,onLoginMenuOpen:c,onLoginSelect:a})))}const hg=function(){var e=pg((0,ft.Z)());return o.createElement(dg,e)};function yg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mg(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,ip);if("failed"===n.status)return o.createElement(tp,null);if("success"!==n.status)return null;var c=r.user,a=r.qrCode;return o.createElement(rp,cp({user:c,qr:a,attempt:t},i))}function up(e){var t=e.title,n=e.subTitle,r=e.btnText,i=e.onClick;return o.createElement(b.Zb,{bg:"primary.light",my:6,mx:"auto",width:"464px"},o.createElement(b.xu,{p:6},o.createElement(b.xv,{typography:"h2",mb:3,textAlign:"center",color:"light"},t),o.createElement(b.xv,{typography:"h5",mb:3,textAlign:"center"},n),o.createElement(b.DF,{width:"100%",mt:3,size:"large",onClick:i},r)))}const Ap=function(e){var t=(0,c.UO)().tokenId,n=e.CustomForm?e.CustomForm:ap;return o.createElement(o.Fragment,null,o.createElement(Zg,null),o.createElement(k,null,o.createElement(N,{exact:!0,path:a.Z.routes.userInvite},o.createElement(up,{title:"Welcome to Teleport",subTitle:"Please click the button below to create an account",btnText:"Get started",onClick:function(){A.push(a.Z.getUserInviteTokenContinueRoute(t))}})),o.createElement(N,{exact:!0,path:a.Z.routes.userReset},o.createElement(up,{title:"Reset Password",subTitle:"Please click the button below to begin recovery of your account",btnText:"Continue",onClick:function(){A.push(a.Z.getUserResetTokenContinueRoute(t))}})),o.createElement(N,{path:a.Z.routes.userInviteContinue},o.createElement(n,{tokenId:t,title:"Welcome to Teleport",submitBtnText:"Create Account"})),o.createElement(N,{path:a.Z.routes.userResetContinue},o.createElement(n,{resetMode:!0,tokenId:t,title:"Reset Password",submitBtnText:"Change Password"}))))};var lp,fp,gp=n("qD9L"),pp=["ssoType","title"];function dp(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function hp(){return hp=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,pp),c=function(e){switch(e.toLowerCase()){case"microsoft":return{color:"#2672ec",Icon:Ke.de,type:e};case"github":return{color:"#444444",Icon:Ke.Ey,type:e};case"bitbucket":return{color:"#205081",Icon:Ke.Dz,type:e};case"google":return{color:"#dd4b39",Icon:Ke.ie,type:e};default:return{color:"#f7931e",Icon:Ke.mR}}}(n),a=c.color,s=c.Icon;return o.createElement(yp,hp({color:a,block:!0},i),Boolean(s)&&o.createElement(mp,null,o.createElement(s,{"data-testid":"icon"})),r)},Bp=function(e){var t=e.providers,n=e.prefixText,r=e.isDisabled,i=e.onClick,c=t.map((function(e,t){var c=e.name,a=e.type,s=e.displayName||"".concat(n," ").concat(c),u=function(){var e=arguments.length>1?arguments[1]:void 0,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase();return-1!==t.indexOf("microsoft")?"microsoft":-1!==t.indexOf("bitbucket")?"bitbucket":-1!==t.indexOf("google")?"google":-1!==t.indexOf("github")||"github"===e?"github":"oidc"===e?"openid":"unknown"}(s,a);return o.createElement(wp,{key:t,title:s,ssoType:u,disabled:r,mt:3,onClick:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(t){t.preventDefault(),i(e)}))})}));return 0===c.length?o.createElement("h4",null," You have no SSO providers configured "):o.createElement(b.xu,{px:6,pt:2,pb:5},c)};var Ep,bp=["title","children"];function Ip(){return Ip=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,bp);return o.createElement(b.Zb,Ip({bg:"primary.light",my:"5",mx:"auto",width:"464px"},i),o.createElement(b.xv,{typography:"h3",pt:5,textAlign:"center",color:"light"},n),r)},Dp=function(e){var t=e.title,n=void 0===t?"":t;return o.createElement(Mp,{title:n,px:5,pb:5},o.createElement(Hc.b0,{my:5},"Login has not been enabled"),o.createElement(b.xv,{mb:2,typography:"paragraph2",width:"100%"},"The ability to login has not been enabled. Please contact your system administrator for more information."))},Fp=f.ZP.div(Ep||(Ep=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n background: ",";\n display: flex;\n align-items: center;\n font-size: 10px;\n height: 32px;\n width: 32px;\n top: -16px;\n justify-content: center;\n border-radius: 50%;\n position: absolute;\n z-index: 1;\n"])),(function(e){return e.theme.colors.primary.light}));const Sp=function(e){var t=e.title,n=e.attempt,r=e.onLoginWithU2f,i=e.onLoginWithWebauthn,c=e.onLogin,a=e.onLoginWithSso,s=e.authProviders,u=e.auth2faType,A=void 0===u?"off":u,l=e.preferredMfaType,f=void 0===l?"":l,g=e.isLocalAuthEnabled,p=void 0===g||g,d=e.isRecoveryEnabled,h=void 0!==d&&d,y=e.onRecover,m=e.clearAttempt,w=s&&s.length>0,B=Cp((0,o.useState)(""),2),E=B[0],I=B[1],C=Cp((0,o.useState)(""),2),v=C[0],Q=C[1],M=Cp((0,o.useState)(""),2),D=M[0],F=M[1],S=(0,o.useMemo)((function(){return ou(A,f)}),[]),U=Cp((0,o.useState)(S[0]),2),P=U[0],j=U[1],O=Cp((0,o.useState)(!(p&&w)),2),Y=O[0],x=O[1],k=n.isFailed,N=n.isProcessing,T=n.message;if(!w&&!p)return o.createElement(Dp,{title:t});var R=w&&p?"primary.main":"primary.light";return o.createElement(gu,null,(function(e){var n=e.validator;return o.createElement(Mp,{title:t},k&&o.createElement(Hc.b0,{m:5,mb:0,style:{wordBreak:"break-word"}},T),w&&o.createElement(Bp,{prefixText:"Login with",isDisabled:N,providers:s,onClick:a}),w&&p&&o.createElement(b.kC,{alignItems:"center",justifyContent:"center",style:{position:"relative"},flexDirection:"column"},o.createElement(Fp,null,"Or")),w&&p&&!Y&&o.createElement(Qp,{bg:R,flexDirection:"row"},o.createElement(b.ZP,{autoFocus:!0,onClick:function(){return x(!Y)}},"Sign in with your Username and Password")),p&&Y&&o.createElement(Qp,{as:"form",bg:R},o.createElement(yu,{rule:bu("Username is required"),label:"Username",autoFocus:!0,value:v,onChange:function(e){return Q(e.target.value)},placeholder:"Username"}),o.createElement(b.xu,{mb:h?2:4},o.createElement(yu,{rule:bu("Password is required"),label:"Password",value:E,onChange:function(e){return I(e.target.value)},type:"password",placeholder:"Password",mb:0,width:"100%"}),h&&o.createElement(b.xu,{textAlign:"right"},o.createElement(b.ZP,{style:{padding:"0px",minHeight:0},onClick:function(){return y(!0)}},"Forgot Password?"))),"off"!==A&&o.createElement(b.xu,{mb:h?3:4},o.createElement(b.kC,{alignItems:"flex-end"},o.createElement(Eu,{maxWidth:"50%",width:"100%","data-testid":"mfa-select",label:"Two-factor type",value:P,options:S,onChange:function(e){return function(e,t){F(""),m(),t.reset(),j(e)}(e,n)},mr:3,mb:0,isDisabled:N}),"otp"===P.value&&o.createElement(yu,{width:"50%",label:"Authenticator code",rule:Iu,autoComplete:"off",value:D,onChange:function(e){return F(e.target.value)},placeholder:"123 456",mb:0}),"u2f"===P.value&&N&&o.createElement(b.xv,{typography:"body2",mb:1},"Insert your hardware key and press the button on the key.")),h&&o.createElement(b.ZP,{style:{padding:"0px",minHeight:0},onClick:function(){return y(!1)}},"Lost Two-Factor Device?")),o.createElement(b.DF,{width:"100%",mt:3,type:"submit",size:"large",onClick:function(e){return function(e,t){if(e.preventDefault(),t.validate())switch(null==P?void 0:P.value){case"u2f":r(v,E);break;case"webauthn":i(v,E);break;default:c(v,E,D)}}(e,n)},disabled:N},"LOGIN")))}))};function Up(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1){var n=this.constructor.name;Kp("unsubscribe from store ".concat(n)),this._subs.splice(t,1)}}},{key:"setState",value:function(e){var t=this;this.state=function(e,t){return td(t)&&td(e)?Xp(Xp({},t),e):e}(e,this.state),Vp(this.constructor.name,this.state,"with",e),this._subs.forEach((function(e){try{e()}catch(e){Wp("Store ".concat(t.constructor.name," failed to notify subscriber"),e)}}))}}])&&_p(t.prototype,n),e}();function td(e){return!Array.isArray(e)&&"object"===Zp(e)&&null!==e}function nd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Nd),A=t.filter((function(e){return"blank"!==e.kind})).map((function(e){var t=e.id===r,a=[];return"terminal"===e.kind&&(a=n[e.sid]||[]),o.createElement(jd,{name:e.title,key:e.id,users:a,active:t,onClick:function(){return i(e)},onClose:function(){return c(e)},style:{flex:"1",flexBasis:"0",flexGrow:"1"}})}));return o.createElement(Ld,Td({as:"nav",typography:"h5",color:"text.secondary",bold:!0},u),A,A.length>0&&o.createElement(b.Ei,{ml:"2",size:0,disabled:s,title:"New Tab",onClick:a},o.createElement(Ke.mm,{fontSize:"16px"})))}var Ld=(0,f.ZP)(b.xu)(Od||(Od=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n background: ",";\n min-height: 32px;\n border-radius: 4px;\n display: flex;\n flex-wrap: no-wrap;\n align-items: center;\n flex-shrink: 0;\n overflow: hidden;\n ","\n"])),dd,qe.cp);const zd=function(e){var t=cd();return rd(t.storeParties),o.createElement(Rd,Td({},e,{parties:t.storeParties.state}))};var Jd={menuListCss:function(){return"\n width: 250px;\n"}};const Gd=function(e){return o.createElement(b.kC,{alignItems:"center"},o.createElement(Ds,{buttonIconProps:{mr:2,ml:2,size:0,style:{fontSize:"16px"}},menuProps:Jd},o.createElement(jt.sN,{as:w.OL,to:a.Z.routes.root},o.createElement(jt.ZH,{as:Ke.SK,mr:"2"}),"Main"),o.createElement(jt.sN,null,o.createElement(b.DF,{my:3,block:!0,onClick:e.onLogout},"Sign Out"))))};var Hd,Kd=f.ZP.button(Hd||(Hd=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n background: none;\n border-color: ",";\n border: 1px solid;\n box-sizing: border-box;\n cursor: pointer;\n text-transform: uppercase;\n\n &:disabled {\n border: 1px solid ",";\n color: ",";\n opacity: 0.24;\n }\n\n color: ",";\n background-color: none;\n ","\n"])),pd,fd,fd,pd,qe.Dh);Kd.defaultProps={px:"8fdpx",py:"4px",border:1};const Vd=Kd;var Wd;function Zd(){return Zd=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:[],n=0;n0?"".concat(n.length," files selected"):"Select files to upload or drag & drop them here";return o.createElement(ch,{color:"terminal"},o.createElement(ih,null,"(SCP) UPLOAD Files"),o.createElement(rh,null,"Upload destination "),o.createElement(eh,{className:"grv-file-transfer-input m-r-sm",width:"100%",mb:0,ref:this.refInput,value:t,autoFocus:!0,onFocus:this.moveCaretAtEnd,onChange:this.onFilePathChanged,onKeyDown:this.onKeyDown}),o.createElement("input",{ref:this.refFileSelector,type:"file",multiple:!0,style:{display:"none"},accept:"*.*",name:"file",onChange:this.onFileSelected}),o.createElement(Qh,{ref:this.refDropzone,onDragOver:function(e){return e.preventDefault()},onDrop:this.onDrop,onClick:this.onOpenFilePicker},i),o.createElement(Vd,{disabled:r,onClick:this.onUpload},"Upload"))}}],n&&wh(t.prototype,n),a}(o.Component),Qh=f.ZP.div(yh||(yh=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n background: ",";\n border: 1px dashed ",";\n color: ",";\n display: block;\n margin: 16px 0;\n height: 72px;\n line-height: 72px;\n text-align: center;\n text-transform: uppercase;\n cursor: pointer;\n"])),hd,md,pd);const Mh=vh;var Dh,Fh,Sh,Uh,Ph,jh=o.createContext(null),Oh=function(e){return o.createElement(jh.Provider,e)};function Yh(){var e=o.useContext(jh);if(rd(e.store),!e)throw new Error("ScpContext is missing a context");return e}function xh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kh(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,ym);return o.createElement(b.kC,mm({flex:"1",style:{overflow:"auto",background:hd,display:t?"flex":"none",position:"relative"}},r),n)},Bm=function(e){var t=e.onContinue,n=e.onCancel,r=e.errorText;return o.createElement($r,{dialogCss:function(){return{width:"400px"}},open:!0},o.createElement(Rr,{style:{flexDirection:"column"}},o.createElement(xr,{textAlign:"center"},"Verify Your Identity")),o.createElement(Vr,{mb:6},r&&o.createElement(Hc.b0,{mt:2,width:"100%"},r),o.createElement(b.xv,{textAlign:"center"},"Re-authentication is required. Follow the prompts given by your browser to complete authentication.")),o.createElement(_r,{textAlign:"center"},o.createElement(b.DF,{onClick:t,mr:3,width:"130px"},r?"Retry":"Verify"),o.createElement(b.PL,{onClick:n},"Cancel")))};function Em(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bm(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,jm),a=cd(),s=Om(o.useState(null),2),u=s[0],A=s[1],l=Om(o.useState([]),2),f=l[0],g=l[1],p={value:t,label:t};return o.createElement(b.xu,c,o.createElement(b.SO,null," Clusters "),o.createElement(xm,null,o.createElement(Lt,{noOptionsMessage:function(){return u?"Error: ".concat(u):"No leaf clusters found"},value:p,onChange:function(e){n(e.value)},loadOptions:function(e){var t=Promise.resolve(f);return 0===f.length&&(t=a.fetchClusters().then((function(e){return e.map((function(e){return{value:e.clusterId,label:e.clusterId}}))})).then((function(e){return g(e),e}))),t.then((function(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e=e.toLocaleLowerCase(),t.filter((function(t){return-1!==t.value.toLocaleLowerCase().indexOf(e)}))}(e,t)})).catch((function(e){A(e.message)}))},defaultMenuIsOpen:i,hasError:!1,maxMenuHeight:400,isSearchable:!0,isSimpleValue:!1,isClearable:!1,defaultOptions:!0,cacheOptions:!0})))};function Nm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Tm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tm(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n3e4}return o.useEffect((function(){var n=function(n){Te.isValid()&&e.getDocuments().some(t)&&(n.preventDefault(),n.returnValue="")};return window.addEventListener("beforeunload",n),function(){window.removeEventListener("beforeunload",n)}}),[]),{verifyAndConfirm:function(n){if(t(n)){var r=n.sid,o=e.storeParties.state[r];return!o||(o.length>1?window.confirm("Are you sure you want to leave this session?"):window.confirm("Are you sure you want to terminate this session?"))}return!0},hasLastingSshConnection:t}}(r).verifyAndConfirm,s=function(e){var t=(0,c.TH)().pathname,n=(0,c.UO)().clusterId,r=(0,c.$B)(a.Z.routes.consoleConnect),i=(0,c.$B)(a.Z.routes.consoleNodes),s=(0,c.$B)(a.Z.routes.consoleSession);return o.useMemo((function(){-1===e.getActiveDocId(t)&&(r?e.addSshDocument(r.params):s?e.addSshDocument(s.params):i&&e.addNodeDocument(n))}),[e,t]),{clusterId:n,activeDocId:e.getActiveDocId(t)}}(r),u=s.clusterId,A=s.activeDocId,l=r.storeDocs,f=l.getDocuments(),g=f.find((function(e){return e.id===A})),p=l.getSshDocuments().length>0;n=r,o.useEffect((function(){var e=function(e){var t=im(e).tabSwitch;if(t){e.preventDefault();var r=n.getDocuments()[t.index+1];r&&n.gotoTab(r)}};return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}}),[]),rd(r.storeDocs),t=(e=g)&&e.title?"".concat(e.clusterId," • ").concat(e.title):"Console",o.useEffect((function(){document.title=t}),[t]);var d=l.getNodeDocuments().length>0,h=f.map((function(e){return o.createElement(Xm,{doc:e,visible:e.id===A,key:e.id})}));return o.createElement(_m,null,o.createElement(b.kC,{bg:dd,height:"32px"},o.createElement(zd,{flex:"1",items:f,onClose:function(e){i(e)&&r.closeTab(e)},onSelect:function(e){r.gotoTab(e)},activeTab:A,clusterId:u,disableNew:d,onNew:function(){r.gotoNodeTab(u)}}),o.createElement(Gd,{onLogout:function(){r.logout()}})),h,p&&o.createElement(ws,{time:5e3,onFetch:function(){return r.refreshParties()}}))}function Xm(e){var t=e.doc,n=e.visible;return o.useMemo((function(){switch(t.kind){case"terminal":return o.createElement(Pm,{doc:t,visible:n});case"nodes":return o.createElement(Vm,{doc:t,visible:n});default:return o.createElement(Wm,{doc:t,visible:n})}}),[n,t])}var _m=f.ZP.div(Zm||(Zm=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n background-color: ",";\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n display: flex;\n flex-direction: column;\n"])),hd);function $m(e){return $m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$m(e)}function ew(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nn+1)return t[n+1].id;if(t.length===n+1&&0!==n)return t[n-1].id}return-1}},{key:"find",value:function(e){return this.state.items.find((function(t){return t.id===e}))}},{key:"findByUrl",value:function(e){return this.state.items.find((function(t){return t.url===encodeURI(e)}))}},{key:"getNodeDocuments",value:function(){return this.state.items.filter((function(e){return"nodes"===e.kind}))}},{key:"getSshDocuments",value:function(){return this.state.items.filter((function(e){return"terminal"===e.kind&&"connected"===e.status}))}},{key:"getDocuments",value:function(){return this.state.items}}],n&&ow(t.prototype,n),c}(ed);function lw(e){return lw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lw(e)}function fw(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gw(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n>>0,r=Math.floor((t-n)/4294967296)>>>0;r>0||n>127;)e.push(127&n|128),n=(n>>>7|r<<25)>>>0,r>>>=7;e.push(n)}},{key:"decode",value:function(e){return{version:this.decodeVersion(e),type:this.decodeType(e),payload:this.decodePayload(e)}}},{key:"decodeVersion",value:function(e){if(e[0]===Sw.version.code&&e[1]===Sw.version.length)return String.fromCharCode(e[2]);throw new Error("invalid version field")}},{key:"decodeType",value:function(e){if(e[3]===Sw.type.code&&e[4]===Sw.type.length)return String.fromCharCode(e[5]);throw new Error("invalid type field")}},{key:"decodePayload",value:function(e){if(!e[6])return"";if(e[6]!==Sw.payload.code)throw new Error("invalid payload field");var t=e.slice(7),n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Mw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mw(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.decodeVarint(t),2),r=n[0],o=n[1],i=t.slice(r,r+o);return this._uintArrayToText(i)}},{key:"decodeVarint",value:function(e){for(var t=0,n=0,r=0;r9||9==r&&o>1)throw new Error("unable to decode varint: overflow");return[r+1,t|o<e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{};xw(this,c),zw(Rw(t=i.call(this)),"socket",null),zw(Rw(t),"_buffered",!0),zw(Rw(t),"_attachSocketBufferTimer",void 0),zw(Rw(t),"_attachSocketBuffer",void 0),zw(Rw(t),"_addressResolver",null),zw(Rw(t),"_proto",new Uw);var r=Yw(Yw({},Gw),n);return t._addressResolver=e,t._buffered=r.buffered,t._onOpenConnection=t._onOpenConnection.bind(Rw(t)),t._onCloseConnection=t._onCloseConnection.bind(Rw(t)),t._onMessage=t._onMessage.bind(Rw(t)),t}return t=c,n=[{key:"disconnect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3;null!==this.socket&&this.socket.close(e)}},{key:"connect",value:function(e,t){var n=this._addressResolver.getConnStr(e,t);this.socket=new WebSocket(n),this.socket.binaryType="arraybuffer",this.socket.onopen=this._onOpenConnection,this.socket.onmessage=this._onMessage,this.socket.onclose=this._onCloseConnection}},{key:"send",value:function(e){if(this.socket&&e){var t=this._proto.encodeRawMessage(e),n=new Uint8Array(t);this.socket.send(n.buffer)}}},{key:"sendWebAuthn",value:function(e){this.send(JSON.stringify(e))}},{key:"pauseFlow",value:function(){}},{key:"resumeFlow",value:function(){}},{key:"requestResize",value:function(e,t){if(this.socket){Jw.info("requesting new screen size","w:".concat(e," and h:").concat(t));var n=JSON.stringify({event:Ky,width:e,height:t,size:"".concat(e,":").concat(t)}),r=this._proto.encodeResizeMessage(n),o=new Uint8Array(r);this.socket.send(o.buffer)}}},{key:"_flushBuffer",value:function(){this.emit(qy,this._attachSocketBuffer),this._attachSocketBuffer=null,clearTimeout(this._attachSocketBufferTimer),this._attachSocketBufferTimer=null}},{key:"_pushToBuffer",value:function(e){this._attachSocketBuffer?this._attachSocketBuffer+=e:(this._attachSocketBuffer=e,setTimeout(this._flushBuffer.bind(this),10))}},{key:"_onOpenConnection",value:function(){this.emit("open"),Jw.info("websocket is open")}},{key:"_onCloseConnection",value:function(e){this.socket.onopen=null,this.socket.onmessage=null,this.socket.onclose=null,this.socket=null,this.emit(Xy,e),Jw.info("websocket is closed")}},{key:"_onMessage",value:function(e){try{var t=new Uint8Array(e.data),n=this._proto.decode(t);switch(n.type){case Fw.U2F_CHALLENGE:this.emit(_y,n.payload);break;case Fw.WEBAUTHN_CHALLENGE:this.emit($y,n.payload);break;case Fw.AUDIT:this._processAuditPayload(n.payload);break;case Fw.SESSION_END:this.emit(Wy,n.payload);break;case Fw.RAW:this._buffered?this._pushToBuffer(n.payload):this.emit(qy,n.payload);break;default:throw Error("unknown message type: ".concat(n.type))}}catch(e){Jw.error("failed to parse incoming message.",e)}}},{key:"_processAuditPayload",value:function(e){var t=JSON.parse(e);if(t.event===Ky){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return jw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jw(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.size.split(":"),2),r=n[0],o=n[1];r=Number(r),o=Number(o),this.emit(Vy,{w:r,h:o})}}}],n&&kw(t.prototype,n),c}(vw);const Kw=Hw;function Vw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ww(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=(0,io.Z)(new Date,e.expiry),o=encodeURIComponent(n).replace(/'/g,"%27"),i=a.Z.baseUrl+a.Z.api.appNodeScriptPath.replace(":token",e.id).replace(":name",t).replace(":uri",o);return{text:"sudo bash -c \"$(curl -fsSL '".concat(i,"')\""),expires:r}}(n,e,t)}))}};function lB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0])||arguments[0];return e&&bB.userContext?Promise.resolve(bB.userContext):je.get(a.Z.getUserContextUrl()).then(dB).then((function(e){return bB.userContext=e,bB.userContext}))},fetchUsers:function(){return je.get(a.Z.getUsersUrl()).then(EB)},updateUser:function(e){return je.put(a.Z.getUsersUrl(),e).then(BB)},createUser:function(e){return je.post(a.Z.getUsersUrl(),e).then(BB)},createResetPasswordToken:function(e,t){return je.post(a.Z.api.resetPasswordTokenPath,{name:e,type:t}).then(mB)},deleteUser:function(e){return je.delete(a.Z.getUsersDeleteUrl(e))}};function CB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vB(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:a.Z.proxyCluster;return this.storeDocs.add({clusterId:e,title:"New session",kind:"nodes",url:a.Z.getConsoleNodesRoute(e),created:new Date})}},{key:"addSshDocument",value:function(e){var t=e.login,n=e.serverId,r=e.sid,o=e.clusterId,i=t&&n?"".concat(t,"@").concat(n):r,c=this.getSshDocumentUrl({clusterId:o,login:t,serverId:n,sid:r});return this.storeDocs.add({kind:"terminal",status:"disconnected",clusterId:o,title:i,serverId:n,login:t,sid:r,url:c,created:new Date})}},{key:"getDocuments",value:function(){return this.storeDocs.state.items}},{key:"getNodeDocumentUrl",value:function(e){return a.Z.getConsoleNodesRoute(e)}},{key:"getSshDocumentUrl",value:function(e){return e.sid?a.Z.getSshSessionRoute(e):a.Z.getSshConnectRoute(e)}},{key:"refreshParties",value:function(){var e,t=this,n=this.storeDocs.getSshDocuments().filter((function(e){return"connected"===e.status})).map((function(e){return e.clusterId})),r=(e=new Set(n),function(e){if(Array.isArray(e))return MB(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||QB(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){return iB.fetchParticipants({clusterId:e}).catch((function(e){return SB.error("failed to refresh participants",e),{}}))}));return Promise.all(r).then((function(e){for(var n={},r=0;r1&&void 0!==arguments[1])||arguments[1];n?A.replace(t):A.push(t)}},{key:"closeTab",value:function(e){var t=this.removeDocument(e.id);this.gotoTab(t)}}],n&&DB(t.prototype,n),e}();function PB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nxB.MFA_JSON)throw new Error("invalid message type: ".concat(t));return t}},{key:"decodeErrorMessage",value:function(e){return this._decodeStringMessage(e)}},{key:"decodeMfaJson",value:function(e){var t=new DataView(e),n=String.fromCharCode(t.getUint8(1));if("n"!==n&&"u"!==n)throw new Error("invalid mfa type ".concat(n,', should be "n" or "u"'));return{mfaType:n,jsonString:this.decoder.decode(new Uint8Array(e.slice(6)))}}},{key:"_decodeStringMessage",value:function(e){return this.decoder.decode(new Uint8Array(e.slice(5)))}},{key:"decodePngFrame",value:function(e,t){var n=new DataView(e),r=new Image,o={left:n.getUint32(1),top:n.getUint32(5),right:n.getUint32(9),bottom:n.getUint32(13),data:r};return o.data.onload=t(o),o.data.src=this._asBase64Url(e),o}},{key:"_asBase64Url",value:function(e){return"data:image/png;base64,".concat(Yu(e.slice(17)))}}],n&&OB(t.prototype,n),e}(),GB=1,HB=4;function KB(e){return KB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},KB(e)}function VB(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n9?r:"0"+r,o=o>9?o:"0"+o,"".concat(n=n>0?n+":":"").concat(r,":").concat(o)}(e.ms),e.ms=e.ms>0?Math.floor(e.ms/10):0,e.msNormalized=e.ms}));for(var t=e[0],n=[],r=1;r=25&&c<50?25:c>=50&&c<100?50:c>=100?100:c),n.push(t),t=e[r])}var c;return-1===n.indexOf(t)&&n.push(t),n}}],n&&cb(t.prototype,n),e}();function Ab(e){return e.eventType===Hy}function lb(e){return lb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lb(e)}function fb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nthis.duration&&this.stop();var t=this._getEventIndex(e)+1;if(t===this.currentEventIndex)return this.current=e,void this._change();var n=this.currentEventIndex>t;try{n&&(this._chunkQueue=[],this.emit(Zy));var r=n?0:this.currentEventIndex,o=t,i=this._eventProvider.events.slice(r,o).filter(Ab);this._render(i),this.currentEventIndex=t,this.current=e,this._change()}catch(e){yb.error("move",e),this._handleError(e)}}}},{key:"stop",value:function(){this.status=Bb,this.timer=clearInterval(this.timer),this._change()}},{key:"play",value:function(){this.status!==mb&&(this.status=mb,this.current>=this.duration&&(this.current=0,this.emit(Zy)),this.timer=setInterval(this.move.bind(this),10),this._change())}},{key:"getCurrentTime",value:function(){return this.currentEventIndex?this._eventProvider.events[this.currentEventIndex-1].displayTime:"--:--"}},{key:"getEventCount",value:function(){return this._eventProvider.events.length}},{key:"isLoading",value:function(){return this.status===Eb}},{key:"isPlaying",value:function(){return this.status===mb}},{key:"isError",value:function(){return this.status===wb}},{key:"isReady",value:function(){return this.status!==Eb&&this.status!==wb}},{key:"disconnect",value:function(){}},{key:"_init",value:function(){var e=this;this.duration=this._eventProvider.getDuration(),this._eventProvider.events.forEach((function(t){return e._posToEventIndexMap.push(t.msNormalized)}))}},{key:"_chunkDequeue",value:function(){var e=this._chunkQueue.shift();if(e){var t=e.data.join("");this.emit(Vy,{h:e.h,w:e.w}),this.emit(qy,t)}}},{key:"_render",value:function(e){if(e&&0!==e.length){for(var t=[{data:[e[0].data],w:e[0].w,h:e[0].h}],n=t[0],r=1;r1;){var o=Math.floor((n+r)/2);t[o]e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o.createElement(Yb,{tty:r})):o.createElement(oI,null,o.createElement(b.xv,{typography:"h4"},"Recording for this session is not available."))}var rI,oI=function(e){return o.createElement(b.xu,tI({width:"100%",textAlign:"center",p:3},e))},iI=f.ZP.div($b||($b=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n display: flex;\n height: 100%;\n width: 100%;\n position: absolute;\n flex-direction: column;\n flex: 1;\n justify-content: space-between;\n"])));function cI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);na?e.style.height="".concat(o*t.height/t.width,"px"):c