PageSourceSearch

https://www.mhy.fi/_next/static/chunks/4327.3ca23640e0e05257.js

js mhy.fi collected 2026-09-25 00:40:57 UTC 7,086 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4327],{60148:function(e,t,n){n.r(t),n.d(t,{FormField:function(){return G},default:function(){return F}});var r=n(47568),i=n(26042),l=n(69396),a=n(99534),u=n(97582),o=n(85893),s=n(68527),c=n(43238),d=n(95142),f=n(32543),v=n(67294),h=n(3732),m=n(58657),p=n(66688),b=n(11163),x=n(77421),y=n(10834),g=n(79762),k=n(5152),_=n.n(k),j=n(79503),Z=_()((function(){return n.e(7618).then(n.bind(n,7618))}),{loadableGenerated:{webpack:function(){return[7618]}}}),w=_()((function(){return Promise.all([n.e(7048),n.e(6232)]).then(n.bind(n,56232))}),{loadableGenerated:{webpack:function(){return[56232]}}}),S=_()((function(){return Promise.all([n.e(7048),n.e(821)]).then(n.bind(n,90821))}),{loadableGenerated:{webpack:function(){return[90821]}}}),C=_()((function(){return Promise.all([n.e(7048),n.e(3258)]).then(n.bind(n,33258))}),{loadableGenerated:{webpack:function(){return[33258]}}}),G=function(e){var t=e.type,n=e.fields,r=(0,a.Z)(e,["type","fields"]);if("fieldset"===t)return n&&(null===n||void 0===n?void 0:n.length)?(0,o.jsxs)(g.NI,{mb:"6",as:"fieldset",children:[(0,o.jsx)(g.lX,{as:"legend",fontSize:"lg",fontWeight:"normal",children:r.label}),null===n||void 0===n?void 0:n.map((function(e){var t=e.type,n=(0,a.Z)(e,["type"]);return"resolve:site"===t?(0,v.createElement)(Z,(0,l.Z)((0,i.Z)({},n),{key:n.name})):(0,v.createElement)(C,(0,l.Z)((0,i.Z)({},n),{type:t,key:n.name}))}))]}):null;if(!(0,j.y)(e))return(0,o.jsx)(C,(0,i.Z)({type:t},r));switch(t){case"resolve:site":return(0,o.jsx)(Z,(0,i.Z)({},r,n?{fields:n}:null));case"resolve:contact-method":return(0,o.jsx)(w,(0,i.Z)({},e));case"resolve:other_participants":return(0,o.jsx)(S,(0,i.Z)({},e));default:return(0,o.jsx)(C,(0,i.Z)({type:t},r))}},E={a:{textDecoration:"underline"}},P=function(e){var t=e.emailSent,n=e.type,r=(0,x.$G)();return(0,o.jsxs)(s.xu,{"data-test-id":"form-thankyou-".concat(n),m:"0 auto",maxWidth:"600px",textAlign:"center",children:[(0,o.jsx)(s.xv,{color:"highlightColor",sx:{svg:{m:"0 auto 1em"}},children:(0,o.jsx)(f.r,{size:"60"})}),(0,o.jsx)(y.default,{variant:"h3",as:"p",whiteSpace:"break-spaces",mb:"4",children:r("".concat(n,"_form_submit_thankyou"),{fallback:"form_submit_thankyou"})}),t&&"address"!==n?(0,o.jsx)(s.xv,{children:r("".concat(n,"_form_submit_thankyou_email_notification"),{fallback:"form_submit_thankyou_email_notification"})}):null]})},F=function(e){var t=e.children,n=e.id,f=e.type,y=e.validate,g=e.noThankYou,k=e.initialValues,_=(0,a.Z)(e,["children","id","type","validate","noThankYou","initialValues"]),j=(0,x.eo)(!0),Z=(0,b.useRouter)().locale,w=j.name,S=j.blog_id,C=(0,v.useState)(!1),G=C[0],F=C[1],O=(0,c.pm)(),T=(0,x.$G)(),N=(0,m.CL)().executeRecaptcha,V=(0,v.useCallback)(function(){var e=(0,r.Z)((function(e){var t,r,i,l,a,o;return(0,u.__generator)(this,(function(u){switch(u.label){case 0:return u.trys.push([0,4,,5]),[4,N("form_submit")];case 1:return r=u.sent(),[4,fetch("/api/form",{method:"POST",body:JSON.stringify({lang:Z,blog_id:S,site:w,id:n,type:f,values:e,token:r})})];case 2:return[4,u.sent().json()];case 3:if((i=u.sent())&&i[d.Ck])return l=i[d.Ck],O({title:"object"===typeof l?Object.values(l)[0]:l,status:"error",duration:5e3,isClosable:!0}),[2,l];if(!i||"string"!==typeof(null===i||void 0===i?void 0:i.message)||!(null===i||void 0===i||null===(t=i.informedParties)||void 0===t?void 0:t.backOffice))throw new Error("Form was not received by back office");return F(!0),O({title:null===i||void 0===i?void 0:i.message,status:"success",duration:7500,isClosable:!0}),[3,5];case 4:return a=u.sent(),console.error("Submit failed",a),h.Tb(a,{extra:{formType:f}}),o=T("form_submit_failed_unknown"),O({title:o,status:"error",duration:15e3,isClosable:!0}),[2,o];case 5:return[2,null]}}))}));return function(t){return e.apply(this,arguments)}}(),[N,Z,S,w,n,f,O,T]);return(0,o.jsx)(p.l0,{onSubmit:V,validate:y,initialValues:k,render:function(e){return(0,o.jsxs)(s.xu,(0,l.Z)((0,i.Z)({as:"form",onSubmit:e.handleSubmit},_),{sx:E,children:[!g&&e.submitSucceeded?(0,o.jsx)(P,{emailSent:G,type:f}):t(e,G),e.submitErrors?(0,o.jsx)(s.xv,{textStyle:"error",pt:"3",children:"string"===typeof e.submitErrors?e.submitErrors:T("form_has_errors")}):null]}))}})}},58925:function(e,t,n){var r=n(85893),i=n(68527),l=n(85741);t.Z=function(e){var t=e.legal;return(0,r.jsx)(i.kC,{pt:"4",columnGap:"4",children:t.map((function(e){return(0,r.jsx)(l.default,{href:e.url,target:e.target,children:e.title},e.url)}))})}},15822:function(e,t,n){n.r(t);var r=n(14924),i=n(26042),l=n(69396),a=n(99534),u=n(85893),o=n(68527),s=n(15193),c=n(60148),d=n(58925),f=n(6317),v=n(77421),h=function(e,t){return!!e.find((function(e){var n=e.name,r=e.options;return"lisapalvelut"===n&&r&&(null===r||void 0===r?void 0:r.find((function(e){return(null===e||void 0===e?void 0:e.value)===t})))}))};t.default=function(e){var t=e.type,n=e.lead,m=e.children,p=e.fields,b=e.id,x=e.title,y=e.legal,g=e.service,k=(0,a.Z)(e,["type","lead","children","fields","i
1d","title","legal","service"]),_=(0,v.$G)(),j=(0,v.Dv)().selectedService;return(0,u.jsx)(c.default,(0,l.Z)((0,i.Z)({id:b,type:t,py:"8",initialValues:(0,i.Z)({palvelu:null===g||void 0===g?void 0:g.label},j&&h(p,j)?{lisapalvelut:[j]}:void 0),validate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=p.reduce((function(t,n){var a=n.required,u=n.name,o=n.type;return(0,l.Z)((0,i.Z)({},t),(0,r.Z)({},u,(0,f.YQ)({required:a,type:o,value:e[u]})))}),{});return t}},k),{children:function(e){var t=e.submitting;return(0,u.jsxs)(u.Fragment,{children:[x?(0,u.jsxs)(o.X6,{as:"h2",variant:"h5",mb:"4",children:[x," - ",null===g||void 0===g?void 0:g.label]}):null,n?(0,u.jsx)(o.xv,{mb:"6",children:n}):null,p.map((function(e){return(0,u.jsx)(c.FormField,(0,i.Z)({},e),e.name)})),(0,u.jsxs)(o.kC,{justifyContent:"flex-end",gridGap:"6",pt:"2",children:[m?m({disabled:t}):null,(0,u.jsx)(s.zx,{type:"submit",variant:"solidGreen",disabled:t,isLoading:t,loadingText:_("button_submitting"),children:_("button_submit")})]}),y&&y.length>0?(0,u.jsx)(d.Z,{legal:y}):null]})}}))}},79503:function(e,t,n){n.d(t,{E:function(){return i},y:function(){return r}});var r=function(e){return e.type.startsWith("resolve:")},i=function(e){return e.type.replace(/^resolve:/,"")}},6317:function(e,t,n){n.d(t,{YQ:function(){return i}});var r=n(2695),i=function(e){var t=e.required,n=e.type,i=e.value,l=void 0===i?"":i;switch(n){case"email":if(!t&&!l)return;return(0,r.Jh)(l||"")?void 0:"S\xe4hk\xf6posti ei ole oikea";case"phone":if(!t&&!l)return;return function(e){var t=e.replace(/\s|-/g,"");return t.startsWith("+")?t.length<=13&&t.length>=12:t.length>6&&t.length<=10}(l||"")?void 0:"Puhelinnumero ei ole oikea";case"checkbox":return t&&(!l||(null===l||void 0===l?void 0:l.length)<1)?"Pakollinen kentt\xe4":void 0;default:return t&&(!l||(null===l||void 0===l?void 0:l.length)<2)?"Pakollinen kentt\xe4":void 0}}},63366:function(e,t,n){function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}n.d(t,{Z:function(){return r}})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.