!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b7becf69-8508-47e6-9db1-3a2f4912403f",e._sentryDebugIdIdentifier="sentry-dbid-b7becf69-8508-47e6-9db1-3a2f4912403f")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8841],{58898:function(e,t,r){Promise.resolve().then(r.bind(r,42076))},42076:function(e,t,r){"use strict";r.d(t,{LoginForm:function(){return d}});var n=r(17791),i=r(62949),a=r(6615),s=r(11930),o=r(73930);r(83925);var c=(0,r(83948).$)("1e37ea5e99a4262b97a3957e4415eec62e453b04"),u=r(67068),l=r(37332);function d(e){let{redirectTo:t}=e,[r,d]=function(e,t,r){let[n,i]=(0,u.useTransition)(),[a,s]=(0,l.useFormState)(e,null,void 0);return[a,(0,u.useCallback)(e=>{i(()=>{s(e)})},[s]),n]}(c,0);return(0,n.jsxs)("form",{action:d,children:[(0,n.jsx)("input",{type:"hidden",name:"redirectTo",value:t}),(0,n.jsx)("label",{htmlFor:"email",className:"block",children:"S\xe4hk\xf6posti"}),(0,n.jsx)(o.TextInput,{type:"email",name:"email",id:"email",className:"mb-2 block"}),(0,n.jsx)("label",{htmlFor:"password",className:"block",children:"Salasana"}),(0,n.jsx)(o.TextInput,{name:"password",type:"password",id:"password",className:"mb-2 block"}),(null==r?void 0:r.error)&&(0,n.jsx)(s.b,{title:"Virhe kirjautumisessa",variant:"danger",className:"my-4",children:r.error}),(0,n.jsx)(a.Button,{type:"submit",children:"Kirjaudu sis\xe4\xe4n"}),(0,n.jsx)(i.default,{href:"/forgot_password",prefetch:!1,children:(0,n.jsx)(a.Button,{variant:"link",children:"Unohtunut salasana"})})]})}},62949:function(e,t,r){"use strict";r.d(t,{default:function(){return i.a}});var n=r(75103),i=r.n(n)},83948:function(e,t,r){"use strict";Object.defineProperty(t,"$",{enumerable:!0,get:function(){return i}});let n=r(83925);function i(e){let{createServerReference:t}=r(62049);return t(e,n.callServer)}},6615:function(e,t,r){"use strict";r.d(t,{Button:function(){return l},p:function(){return d}});var n=r(17791),i=r(13973),a=r(1437),s=r(67068),o=r(17776),c=r(356);function u(e){switch(e){case"primary":case"success":case"warning":case"danger":return"secondary";default:return"primary"}}let l=s.forwardRef(function(e,t){let{loading:r,variant:i,size:a,children:l,onClick:d,className:f,disabled:b,...x}=e,p="border-solid inline-flex items-center justify-center ".concat(function(e,t){switch(e){case"primary":return"border-0 bg-[#3892F8] text-white ".concat(t?"opacity-50":"opacity-100b hover:bg-[#1972D8]"," text-white");case"secondary":return"border-0 bg-white border border-[#1972D8] text-[#1972D8] ".concat(t?"opacity-50 cursor-not-allowed":"opacity-100 hover:bg-[#1972D8] hover:text-white");case"success":return"border-0 bg-green-500 ".concat(t?"":"hover:bg-green-600"," text-smokewhite");case"warning":return"border-0 bg-amber-300 text-white ".concat(t?"":"hover:bg-amber-400"," text-gray-800");case"danger":return"border-0 bg-red-500 ".concat(t?"":"hover:bg-red-600"," text-smokewhite");case"naked":return"border border-transparent bg-transparent ".concat(t?"":"hover:bg-[#F9F9F9] border-[#ebebeb]");case"link":return"bg-transparent hover:underline";default:return"border border-gray-200 text-black bg-white ".concat(t?"opacity-50":"hover:bg-smokewhite")}}(i,b||!1)," rounded-md ").concat(function(e){switch(e){case"tight":return"p-1";case"small":return"py-1 px-2";case"wide":return"py-2 md:px-10 px-6";default:return"py-2 md:px-4 px-2"}}(a)," ").concat(b?"":"cursor-pointer"," transition-all"),g=(0,o.m6)(p,f||""),[h,m]=(0,s.useState)(!1),y=(0,s.useCallback)(e=>{if(!b&&d){let e=d();return e&&"then"in e&&"function"==typeof e.then&&(m(!0),e.then(e=>m(!1),e=>m(!1))),e}},[b,d]),v=r||h;return"href"in x?(0,n.jsxs)("a",{...x,className:g,onClick:y,ref:t,children:[l,v&&(0,n.jsx)(c.$,{variant:u(i)})]}):(0,n.jsxs)("button",{type:"button",...x,disabled:b,className:g,onClick:y,ref:t,children:[l,v&&(0,n.jsx)(c.$,{variant:u(i)})]})}),d=s.forwardRef(function(e,t){let{tooltip:r,...o}=e,[c,u]=(0,s.useState)(!1),d=(0,s.useRef)(null),{refs:f,floatingStyles:b,context:x}=(0,i.YF)({open:c,onOpenChange:u,middleware:[(0,a.cv)(10),(0,a.uY)(),(0,a.x7)({element:d})]}),p=(0,i.XI)(x),{getReferenceProps:g,getFloatingProps:h}=(0,i.NI)([p]),m=(0,i.qq)([t,f.setReference]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l,{...o,ref:m,...g()}),c&&r&&(0,n.jsxs)("div",{ref:f.setFloating,style:b,...h(),className:"z-50 rounded bg-black text-white px-2 py-1",children:[(0,n.jsx)(i.Y$,{ref:d,context:x}),r]})]})})},356:function(e,t,r){"use strict";r.d(t,{$:function(){return i}});var n=r(17791);let i=e=>{let{variant:t="secondary",inline:r}=e;return(0,n.jsxs)("svg",{className:"ml-2 -mr-1 h-4 w-4 animate-spin ".concat("primary"===t?"text-blue-500":"text-white"," ").concat(r?"inline":""),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}},11930:function(e,t,r){"use strict";r.d(t,{b:function(){return o}});var n=r(17791),i=r(17776),a=r(63885);let s={success:{border:"border-positive",background:"bg-positive",text:"text-positive-passive"},danger:{border:"border-negative",background:"bg-negative",text:"text-negative-passive"},primary:{border:"border-info",background:"bg-info",text:"text-info"},warning:{border:"border-warning",background:"bg-warning",text:"text-warning"},neutral:{border:"border-default",background:"bg-default",text:"text-primary"}};function o(e){let{variant:t="primary",hasCircleIcon:r=!1,title:o,children:c,className:u}=e,l=s[t],d="warning"!==t||r?a.kI:a.uy;return(0,n.jsxs)("div",{className:(0,i.m6)("px-3  py-3 rounded-[20px] border-[0.5px] flex flex-col gap-0.5",l.background,l.border,l.text,u),children:[o&&(0,n.jsxs)("div",{className:"gap-1 inline-flex items-center",children:[(0,n.jsx)(d,{className:"h-5 w-5 m-px justify-center items-center flex"}),(0,n.jsx)("div",{className:"font-semibold uppercase",children:o})]}),c]})}},73930:function(e,t,r){"use strict";r.d(t,{TextInput:function(){return u}});var n=r(17791),i=r(67068),a=r(17776),s=r(83718),o=r(95908),c=r(43530);let u=Object.assign((0,i.forwardRef)(function(e,t){let{className:r,id:i,disabled:a,readOnly:o}=e,u=(0,s.U0)(),l=(0,c.T)({disabled:a,readOnly:o,className:r});return(0,n.jsx)("input",{role:"textbox",id:i||u,...e,className:l,ref:t})}),{WithIcon:(0,i.forwardRef)(function(e,t){let{className:r,iconLeft:i,iconRight:u,disabled:l,readOnly:d,onClickLeftIcon:f,onClickRightIcon:b,...x}=e,p=(0,s.U0)(),g=(0,o.NM)(),h=(0,c.T)({disabled:l,readOnly:d,className:(0,a.m6)("tight"===g?"!pl-10 rounded-lg":"!pl-12 rounded-lg",r)});return(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("input",{role:"textbox",id:p,className:h,ref:t,...x}),(0,n.jsx)("div",{className:(0,a.dV)("absolute left-0 inset-y-0 flex items-center justify-center aspect-square",f?"cursor-pointer":"pointer-events-none"),onClick:f,children:(0,n.jsx)(i,{className:"text-2xl text-tertiary"})}),u&&(0,n.jsx)("div",{className:(0,a.dV)("absolute right-0 inset-y-0 flex items-center justify-center aspect-square",b?"cursor-pointer":"pointer-events-none"),onClick:b,children:(0,n.jsx)(u,{className:"text-2xl text-tertiary"})})]})})})},83718:function(e,t,r){"use strict";r.d(t,{R8:function(){return a},$Y:function(){return o},gy:function(){return s},U0:function(){return c}});var n=r(67068),i=function(e){let t=(0,n.createContext)(e);return[t.Provider,()=>(0,n.useContext)(t)]};let[a,s]=i(),[o,c]=i("")},95908:function(e,t,r){"use strict";r.d(t,{DesignSystemProvider:function(){return s},MJ:function(){return u},NM:function(){return o},W3:function(){return c}});var n=r(17791),i=r(67068);let a=(0,i.createContext)({spacing:"tight",buttonShape:"pill",checkboxSize:"small"});function s(e){let{children:t,...r}=e;return(0,n.jsx)(a.Provider,{value:r,children:t})}let o=()=>(0,i.useContext)(a).spacing,c=()=>(0,i.useContext)(a).buttonShape,u=()=>(0,i.useContext)(a).checkboxSize},43530:function(e,t,r){"use strict";r.d(t,{T:function(){return s}});var n=r(17776),i=r(83718),a=r(95908);let s=e=>{let{disabled:t,readOnly:r,className:s}=e,o=!!(0,i.gy)(),c=(0,a.NM)();return(0,n.m6)("w-full border border-dark focus:border-focus focus:outline-none focus:ring-0 bg-white-primary hover:bg-tertiary focus:bg-white-primary hover:focus:bg-white-primary form-input relative rounded-lg shadow-inner text-primary placeholder:text-tertiary focus:placeholder:text-quaternary","tight"===c?"p-2":"p-3 text-lg leading-[26px]",t||r?"bg-tertiary text-tertiary":"",o?"border-negative":"",s)}}},function(e){e.O(0,[634,7776,5103,2600,3885,6452,4448,1508,1744],function(){return e(e.s=58898)}),_N_E=e.O()}]);