1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2949],{62949:function(e,n,i){i.r(n);var t=i(26042),r=i(69396),s=i(99534),a=i(29815),o=i(85893),l=i(67294),c=i(11163),u=i(68527),d=i(15193),f=i(4612),x=i(5152),h=i.n(x),p=i(33318),v=i(58124),g=i(77421),m=i(57753),j=h()((function(){return Promise.all([i.e(6094),i.e(4852)]).then(i.bind(i,74852))}),{loadableGenerated:{webpack:function(){return[74852]}}}),Z=function(e){var n=e.firstname,i=e.surname,t=e.image_src_md,r=e.office,s=e.territory,a=e.searchTerm,l=e.blogname,c=s.filter((function(e){return new RegExp(a,"i").test(e)}));return(0,o.jsxs)(u.kC,{py:"2",px:"1",children:[(0,o.jsx)(u.xu,{flex:"0 0 36px",maxWidth:"36px",height:"45px",backgroundColor:"gray2",borderRadius:"lg",children:t&&(0,o.jsx)(m.default,{width:"36",height:"45",src:t,useUnoptimizedImage:!0,alt:"".concat(n," ").concat(i)})}),(0,o.jsxs)(u.kC,{flexDirection:"column",alignItems:"flex-start",justifyContent:"start",gridRowGap:1,ml:"2",children:[(0,o.jsxs)(u.xv,{lineHeight:1,children:[n," ",i]}),(0,o.jsxs)(u.xv,{lineHeight:1,children:[(0,o.jsx)(u.xv,{as:"span",children:l||""}),(0,o.jsx)(u.xv,{as:"span",children:r[0]})]}),(null===c||void 0===c?void 0:c.length)>0&&(0,o.jsx)(u.xv,{color:"greenSpruce",lineHeight:1.25,flexFlow:"row wrap",display:"inline-flex",children:c.map((function(e,n){return(0,o.jsxs)(u.xv,{as:"span",mr:1,children:[e,c.length!==n+1?(0,o.jsx)("span",{"aria-hidden":"true",children:","}):null]},e)}))})]})]})};n.default=function(e){var n=e.isActive,i=void 0!==n&&n,u=e.allowReset,x=void 0!==u&&u,h=(0,s.Z)(e,["isActive","allowReset"]),m=(0,c.useRouter)().locale,_=void 0===m?"fi":m,w=(0,g.z_)().subsite,b=(0,l.useState)({isActive:i,subsite:w}),y=b[0].isActive,k=b[1],z=(0,g.ih)(),C=z.forestExpert,A=z.setForestExpert,E=(0,v.HU)(y?w?"/entities/experts?sites=".concat(w):"/entities/experts?sites=all&lang=".concat(_):null).data,R=(0,g.$G)(),I=(0,c.useRouter)();if((0,l.useEffect)((function(){k((function(e){return(0,r.Z)((0,t.Z)({},e),{isActive:!1})}))}),[I.query.entry,C]),C)return x?(0,o.jsx)(d.zx,(0,r.Z)((0,t.Z)({},h),{variant:"solidGreen",size:"large",onClick:function(){A(null)},children:R("forest_expert_remove")})):null;if(!y)return(0,o.jsx)(d.zx,(0,r.Z)((0,t.Z)({},h),{variant:"solidGreen",size:"large",onClick:function(){k((function(e){return(0,r.Z)((0,t.Z)({},e),{isActive:!0})}))},whiteSpace:"initial",height:"auto",children:R("forest_expert_find_title")}));var G=[];return(null===E||void 0===E?void 0:E.length)&&(G=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return e.map((function(e){var l=e.id,c=e.firstname,u=e.surname,d=e.territory,f=e.office,x=(0,s.Z)(e,["id","firstname","surname","territory","office"]);return{id:l,name:"".concat(c||""," ").concat(u||"").trim(),value:l.toString(),tags:i?(0,a.Z)(d).concat((0,a.Z)(n),[i]):d,office:f,node:function(e){return(0,o.jsx)(Z,(0,r.Z)((0,t.Z)({},x),{id:l,territory:d,firstname:c,surname:u,searchTerm:e,blogname:i,office:f}),l)}}}))}(E)),(0,o.jsx)(j,{items:G||[],initialItems:w?G:void 0,onAdd:function(e){A(E.find((function(n){return n.id===e.id}))),k((function(e){return(0,r.Z)((0,t.Z)({},e),{subsite:w})}))},maxWidth:"400px",children:function(e){var n=e.getOuterProps,i=e.getInputProps,s=e.openMenu;return(0,o.jsxs)(f.BZ,(0,r.Z)((0,t.Z)({},n()),{display:"inline-flex",width:"auto",size:"lg",children:[(0,o.jsx)(f.Z8,{pointerEvents:"none",color:"highlightColor",children:(0,o.jsx)(p._,{size:"18"})}),(0,o.jsx)(f.II,(0,t.Z)({variant:"search",pr:"8",pl:"10"},i({id:"forest-expert-search",placeholder:R("forest_expert_search_placeholder"),onFocus:s}))),E?null:(0,o.jsx)(f.xH,{children:(0,o.jsx)(d.zx,{as:"span",variant:"transparent",isLoading:!0})})]}))}})}}}]);
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.