You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
12 KiB
1 lines
12 KiB
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[459],{8263:function(n,r,t){"use strict";t.d(r,{ZP:function(){return v}});var e=t(3366),i=t(7462),o=t(7294),a=t(6010),s=t(5408),u=t(9707),l=t(7192),c=t(1496),p=t(3616);var d=o.createContext(),m=t(8673),f=t(5893);const g=["className","columns","columnSpacing","component","container","direction","item","lg","md","rowSpacing","sm","spacing","wrap","xl","xs","zeroMinWidth"];function h(n){const r=parseFloat(n);return`${r}${String(n).replace(String(r),"")||"px"}`}function x(n,r,t={}){if(!r||!n||n<=0)return[];if("string"===typeof n&&!Number.isNaN(Number(n))||"number"===typeof n)return[t[`spacing-xs-${String(n)}`]||`spacing-xs-${String(n)}`];const{xs:e,sm:i,md:o,lg:a,xl:s}=n;return[Number(e)>0&&(t[`spacing-xs-${String(e)}`]||`spacing-xs-${String(e)}`),Number(i)>0&&(t[`spacing-sm-${String(i)}`]||`spacing-sm-${String(i)}`),Number(o)>0&&(t[`spacing-md-${String(o)}`]||`spacing-md-${String(o)}`),Number(a)>0&&(t[`spacing-lg-${String(a)}`]||`spacing-lg-${String(a)}`),Number(s)>0&&(t[`spacing-xl-${String(s)}`]||`spacing-xl-${String(s)}`)]}const b=(0,c.ZP)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(n,r)=>{const{container:t,direction:e,item:i,lg:o,md:a,sm:s,spacing:u,wrap:l,xl:c,xs:p,zeroMinWidth:d}=n.ownerState;return[r.root,t&&r.container,i&&r.item,d&&r.zeroMinWidth,...x(u,t,r),"row"!==e&&r[`direction-xs-${String(e)}`],"wrap"!==l&&r[`wrap-xs-${String(l)}`],!1!==p&&r[`grid-xs-${String(p)}`],!1!==s&&r[`grid-sm-${String(s)}`],!1!==a&&r[`grid-md-${String(a)}`],!1!==o&&r[`grid-lg-${String(o)}`],!1!==c&&r[`grid-xl-${String(c)}`]]}})((({ownerState:n})=>(0,i.Z)({boxSizing:"border-box"},n.container&&{display:"flex",flexWrap:"wrap",width:"100%"},n.item&&{margin:0},n.zeroMinWidth&&{minWidth:0},"wrap"!==n.wrap&&{flexWrap:n.wrap})),(function({theme:n,ownerState:r}){const t=(0,s.P$)({values:r.direction,breakpoints:n.breakpoints.values});return(0,s.k9)({theme:n},t,(n=>{const r={flexDirection:n};return 0===n.indexOf("column")&&(r[`& > .${m.Z.item}`]={maxWidth:"none"}),r}))}),(function({theme:n,ownerState:r}){const{container:t,rowSpacing:e}=r;let i={};if(t&&0!==e){const r=(0,s.P$)({values:e,breakpoints:n.breakpoints.values});i=(0,s.k9)({theme:n},r,(r=>{const t=n.spacing(r);return"0px"!==t?{marginTop:`-${h(t)}`,[`& > .${m.Z.item}`]:{paddingTop:h(t)}}:{}}))}return i}),(function({theme:n,ownerState:r}){const{container:t,columnSpacing:e}=r;let i={};if(t&&0!==e){const r=(0,s.P$)({values:e,breakpoints:n.breakpoints.values});i=(0,s.k9)({theme:n},r,(r=>{const t=n.spacing(r);return"0px"!==t?{width:`calc(100% + ${h(t)})`,marginLeft:`-${h(t)}`,[`& > .${m.Z.item}`]:{paddingLeft:h(t)}}:{}}))}return i}),(function({theme:n,ownerState:r}){let t;return n.breakpoints.keys.reduce(((e,o)=>{let a={};if(r[o]&&(t=r[o]),!t)return e;if(!0===t)a={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===t)a={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const u=(0,s.P$)({values:r.columns,breakpoints:n.breakpoints.values}),l="object"===typeof u?u[o]:u;if(void 0===l||null===l)return e;const c=Math.round(t/l*1e8)/1e6+"%";let p={};if(r.container&&r.item&&0!==r.columnSpacing){const t=n.spacing(r.columnSpacing);if("0px"!==t){const n=`calc(${c} + ${h(t)})`;p={flexBasis:n,maxWidth:n}}}a=(0,i.Z)({flexBasis:c,flexGrow:0,maxWidth:c},p)}return 0===n.breakpoints.values[o]?Object.assign(e,a):e[n.breakpoints.up(o)]=a,e}),{})}));var v=o.forwardRef((function(n,r){const t=(0,p.Z)({props:n,name:"MuiGrid"}),s=(0,u.Z)(t),{className:c,columns:h,columnSpacing:v,component:w="div",container:S=!1,direction:y="row",item:$=!1,lg:P=!1,md:j=!1,rowSpacing:Z,sm:O=!1,spacing:k=0,wrap:I="wrap",xl:W=!1,xs:M=!1,zeroMinWidth:N=!1}=s,A=(0,e.Z)(s,g),L=Z||k,C=v||k,B=o.useContext(d),F=h||B||12,R=(0,i.Z)({},s,{columns:F,container:S,direction:y,item:$,lg:P,md:j,sm:O,rowSpacing:L,columnSpacing:C,wrap:I,xl:W,xs:M,zeroMinWidth:N}),_=(n=>{const{classes:r,container:t,direction:e,item:i,lg:o,md:a,sm:s,spacing:u,wrap:c,xl:p,xs:d,zeroMinWidth:f}=n,g={root:["root",t&&"container",i&&"item",f&&"zeroMinWidth",...x(u,t),"row"!==e&&`direction-xs-${String(e)}`,"wrap"!==c&&`wrap-xs-${String(c)}`,!1!==d&&`grid-xs-${String(d)}`,!1!==s&&`grid-sm-${String(s)}`,!1!==a&&`grid-md-${String(a)}`,!1!==o&&`grid-lg-${String(o)}`,!1!==p&&`grid-xl-${String(p)}`]};return(0,l.Z)(g,m.H,r)})(R);return T=(0,f.jsx)(b,(0,i.Z)({ownerState:R,className:(0,a.Z)(_.root,c),as:w,ref:r},A)),12!==F?(0,f.jsx)(d.Provider,{value:F,children:T}):T;var T}))},8673:function(n,r,t){"use strict";t.d(r,{H:function(){return i}});var e=t(8979);function i(n){return(0,e.Z)("MuiGrid",n)}const o=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],a=(0,t(6087).Z)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((n=>`spacing-xs-${n}`)),...["column-reverse","column","row-reverse","row"].map((n=>`direction-xs-${n}`)),...["nowrap","wrap-reverse","wrap"].map((n=>`wrap-xs-${n}`)),...o.map((n=>`grid-xs-${n}`)),...o.map((n=>`grid-sm-${n}`)),...o.map((n=>`grid-md-${n}`)),...o.map((n=>`grid-lg-${n}`)),...o.map((n=>`grid-xl-${n}`))]);r.Z=a},7106:function(n,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return t(1686)}])},4629:function(n,r,t){"use strict";var e=t(5893),i=t(7357),o=t(7294),a=t(4188),s=t(4825),u=t(4690),l=t(7504),c=t(4069),p=t(7869),d=t(6284),m=t(2152),f=t(7987),g=t(8859),h=t(2749);function x(n,r){(null==r||r>n.length)&&(r=n.length);for(var t=0,e=new Array(r);t<r;t++)e[t]=n[t];return e}function b(n,r,t){return r in n?Object.defineProperty(n,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[r]=t,n}function v(n){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},e=Object.keys(t);"function"===typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(t).filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})))),e.forEach((function(r){b(n,r,t[r])}))}return n}function w(n,r){if(null==n)return{};var t,e,i=function(n,r){if(null==n)return{};var t,e,i={},o=Object.keys(n);for(e=0;e<o.length;e++)t=o[e],r.indexOf(t)>=0||(i[t]=n[t]);return i}(n,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(e=0;e<o.length;e++)t=o[e],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(i[t]=n[t])}return i}function S(n,r){return function(n){if(Array.isArray(n))return n}(n)||function(n,r){var t=null==n?null:"undefined"!==typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var e,i,o=[],a=!0,s=!1;try{for(t=t.call(n);!(a=(e=t.next()).done)&&(o.push(e.value),!r||o.length!==r);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==t.return||t.return()}finally{if(s)throw i}}return o}}(n,r)||$(n,r)||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 y(n){return function(n){if(Array.isArray(n))return x(n)}(n)||function(n){if("undefined"!==typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||$(n)||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 $(n,r){if(n){if("string"===typeof n)return x(n,r);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?x(n,r):void 0}}var P={width:"100%"},j="gate-input",Z="".concat(j,"-credential-id"),O="".concat(j,"-credential-passphrase"),k="access",I=(0,o.forwardRef)((function(n,r){var t,x,b=n.formContainer,$=void 0===b||b,j=n.gridProps,I=void 0===j?{}:j,W=I.columns,M=void 0===W?{xs:1,sm:2}:W,N=(I.layout,I.spacing),A=void 0===N?"1em":N,L=n.identifierId,C=void 0===L?Z:L,B=n.identifierInputTestBatchBuilder,F=void 0===B?f.Gn:B,R=n.identifierLabel,_=n.identifierOutlinedInputWithLabelProps,T=void 0===_?{}:_,G=T.formControlProps,z=void 0===G?{}:G,E=T.inputProps,U=n.onIdentifierBlurAppend,q=n.onSubmit,D=n.onSubmitAppend,H=n.passphraseId,V=void 0===H?O:H,X=n.passphraseLabel,J=n.passphraseOutlinedInputWithLabelProps,K=void 0===J?{}:J,Q=K.formControlProps,Y=void 0===Q?{}:Q,nn=K.inputProps,rn=n.submitLabel,tn=n.allowSubmit,en=void 0===tn?$:tn,on=w(n.gridProps,["columns","layout","spacing"]),an=w(n.identifierOutlinedInputWithLabelProps,["formControlProps","inputProps"]),sn=w(n.passphraseOutlinedInputWithLabelProps,["formControlProps","inputProps"]),un=z.sx,ln=w(z,["sx"]),cn=Y.sx,pn=w(Y,["sx"]),dn=(0,o.useRef)({}),mn=(0,o.useRef)({}),fn=(0,o.useRef)({}),gn=S((0,h.Z)(!1),2),hn=gn[0],xn=gn[1],bn=(0,g.Z)([Z,O],fn),vn=bn.buildFinishInputTestBatchFunction,wn=bn.buildInputFirstRenderFunction,Sn=bn.buildInputUnmountFunction,yn=bn.isFormInvalid,$n=bn.setMessage,Pn=(0,o.useMemo)((function(){return null!==q&&void 0!==q?q:function(){for(var n=arguments.length,r=new Array(n),t=0;t<n;t++)r[t]=arguments[t];var e,i=r[0];i.preventDefault(),$n(k),xn(!0);var o=i.target,a=o.elements,s=a.namedItem(Z),u=s.value,l=a.namedItem(O),c=l.value;null===D||void 0===D||(e=D).call.apply(e,[null,u,c,function(n){$n(k,n)},xn].concat(y(r)))}}),[q,D,xn,$n]),jn=(0,o.useMemo)((function(){return hn?(0,e.jsx)(m.Z,{mt:0}):(0,e.jsx)(u.Z,{row:!0,sx:{justifyContent:"flex-end"},children:(0,e.jsx)(s.Z,{disabled:yn,type:"submit",children:rn})})}),[yn,hn,rn]),Zn=(0,o.useMemo)((function(){var n={};return en&&(n["gate-cell-message-group"]={children:(0,e.jsx)(p.Z,{count:1,defaultMessageType:"warning",ref:fn}),sm:2},n["gate-cell-submit"]={children:jn,sm:2}),n}),[en,jn]),On=(0,o.useMemo)((function(){var n={};return $&&(n.component="form",n.onSubmit=Pn),n}),[$,Pn]);return(0,o.useImperativeHandle)(r,(function(){return{get:function(){var n,r;return{identifier:null!==(t=null===(n=dn.current.getValue)||void 0===n?void 0:n.call(null))&&void 0!==t?t:"",passphrase:null!==(x=null===(r=mn.current.getValue)||void 0===r?void 0:r.call(null))&&void 0!==x?x:""}},messageGroup:v({},fn.current),setIsSubmitting:function(n){xn(n)}}})),(0,e.jsx)(i.Z,v({},On,{children:(0,e.jsx)(l.Z,v({columns:M,layout:v({"gate-input-cell-credential-id":{children:(0,e.jsx)(c.Z,{input:(0,e.jsx)(d.Z,v({formControlProps:v({},ln,{sx:v({},P,un)}),id:C,inputProps:E,label:R},an)),inputTestBatch:F(R,(function(){$n(C)}),{onFinishBatch:vn(C)},(function(n){$n(C,{children:n})})),onBlurAppend:function(){for(var n=arguments.length,r=new Array(n),t=0;t<n;t++)r[t]=arguments[t];var e;null===U||void 0===U||(e=U).call.apply(e,[null].concat(y(r)))},onFirstRender:wn(C),onUnmount:Sn(C),ref:dn,required:!0})},"gate-input-cell-credential-passphrase":{children:(0,e.jsx)(c.Z,{input:(0,e.jsx)(d.Z,v({formControlProps:v({},pn,{sx:v({},P,cn)}),id:V,inputProps:nn,label:X,type:a.Z.password},sn)),inputTestBatch:(0,f.Gn)(X,(function(){$n(V)}),{onFinishBatch:vn(V)},(function(n){$n(V,{children:n})})),onFirstRender:wn(V),onUnmount:Sn(V),ref:mn,required:!0})}},Zn),spacing:A},on))}))}));I.displayName="GateForm",r.ZP=I},1686:function(n,r,t){"use strict";t.r(r),t.d(r,{default:function(){return d}});var e=t(5893),i=t(9008),o=t(1163),a=t(4390),s=t(4629),u=t(1770),l=t(3679),c=function(){var n=(0,o.useRouter)().query.rt;return(0,e.jsx)(l.s_,{sx:{marginLeft:{xs:"1em",sm:"auto"},marginRight:{xs:"1em",sm:"auto"},marginTop:"calc(50vh - 14em)",minWidth:"16em",width:{xs:"fit-content",sm:"26em"}},children:(0,e.jsx)(s.ZP,{gridProps:{columns:1},identifierLabel:"Username",onSubmitAppend:function(r,t,e,i){i(!0),a.Z.post("/auth/login",{username:r,password:t}).then((function(){var r=n?String(n):"/";window.location.replace(r)})).catch((function(n){var r=(0,u.Z)(n,{onResponseErrorAppend:function(){return{children:"Credentials mismatched.",type:"warning"}}});e(r)})).finally((function(){i(!1)}))},passphraseLabel:"Passphrase",submitLabel:"Login"})})},p=t(5521),d=function(){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(i.default,{children:(0,e.jsx)("title",{children:"Login"})}),(0,e.jsx)(p.Z,{}),(0,e.jsx)(c,{})]})}},1163:function(n,r,t){n.exports=t(387)}},function(n){n.O(0,[412,438,894,62,195,987,248,336,774,888,179],(function(){return r=7106,n(n.s=r);var r}));var r=n.O();_N_E=r}]); |