1(self.webpackChunkGEM=self.webpackChunkGEM||[]).push([[8430,23312,64140],{1287:(e,t,n)=>{"use strict";n.d(t,{R:()=>a});var o=n(47509);const a=e=>(0,o.n)((()=>n.e(19981).then(n.t.bind(n,19981,17))),e)},2082:(e,t,n)=>{"use strict";n.d(t,{N:()=>m});var o=n(27157),a=n(81923),i=n(63850);const r=(0,a.A)("textarea",{target:"e1m3crg20"})(i.z,";max-width:100%;");var l=n(33754),s=n(29763),c=n(13798),u=n(2445);const m=e=>{const t=(0,c.useDecodeHtml)(e.textAreaConfig.placeholder);return(0,l.t)(e.textAreaConfig.cId),(0,u.Y)(r,{ref:e.setInputRef,value:e.value,rows:e.textAreaConfig.numberOfRows,"aria-invalid":e.error,"aria-errormessage":(0,o.Fl)(e.textAreaConfig.cId),"aria-describedby":(0,s.l)(e.textAreaConfig.cId,e.textAreaConfig.description),id:e.textAreaConfig.cId,placeholder:t,onChange:e.dispatchValue,disabled:e.disabled})}},3388:(e,t,n)=>{"use strict";n.d(t,{G:()=>a});var o=n(47509);const a=e=>(0,o.n)((()=>n.e(88419).then(n.t.bind(n,88419,17))),e)},4438:(e,t,n)=>{"use strict";n.d(t,{f:()=>o});const o="timebank-profile"},6610:(e,t,n)=>{"use strict";n.d(t,{K:()=>c,c:()=>s});var o=n(71868),a=n(62919),i=n(75058),r=n(76870),l=n(38468);function s(e,t,n){var o,a;const l={...t,tabItems:(o=n,a=(0,i.y)(e),o.map((e=>{const t={...e,content:""},n=a.find((t=>t.cId===e.cId));return n&&(t.content=(0,r.S)(n.templateElement.innerHTML)),t})))};return{defState:c(l),configWithTabsAndPath:l}}function c(e){const t=(0,o.K)(l.N.getInstance().location.pathname,e.cId),n=t?.id;return{selected:(0,a.R)(e.tabItems,n),id:n,cId:e.cId,tabItems:e.tabItems,initialized:!1}}},7329:(e,t,n)=>{"use strict";n.d(t,{E:()=>o,p:()=>a});const o="codeChallenge",a="george"},16052:(e,t,n)=>{"use strict";n.d(t,{v:()=>r});var o=n(16522),a=n(52260),i=n(32668);function r(e){const t=(0,o.c)(4),[n,r]=(0,a.useState)(e?.clientWidth??0),{hydrated:l}=(0,i.Sd)();let s,c;return t[0]!==e||t[1]!==l?(s=()=>{if(!e||"undefined"==typeof ResizeObserver||!(0,i.oe)(l))return;const t=new ResizeObserver((e=>{for(const t of e)r(t.target.clientWidth)}));return t.observe(e),()=>{t.disconnect()}},c=[e,r,l],t[0]=e,t[1]=l,t[2]=s,t[3]=c):(s=t[2],c=t[3]),(0,a.useEffect)(s,c),n}},18687:(e,t,n)=>{"use strict";n.d(t,{$:()=>u});var o=n(16522),a=n(46942),i=n.n(a),r=n(52260),l=n(78928),s=n(47803),c=n(2445);const u=(0,r.memo)((e=>{const t=(0,o.c)(19),{children:n,className:a,id:r,setRef:u,style:m,imgClassName:d,imgWidth:f,testId:g,sanitizeType:b,tagName:p}=e,h=void 0===g?"rich-text":g,y=void 0===p?"div":p;let C;t[0]!==n||t[1]!==d||t[2]!==f?(C={text:n,imgClassName:d,imgWidth:f},t[0]=n,t[1]=d,t[2]=f,t[3]=C):C=t[3];const L=(0,l.I)(C);let E;t[4]!==a?(E=i()("editor-content",a),t[4]=a,t[5]=E):E=t[5];const T=E;let v;t[6]!==m?(v={"--overflow-editor-content":"visible",...m},t[6]=m,t[7]=v):v=t[7];const N=v;let S;t[8]!==u?(S=u?e=>{(null===e||e instanceof HTMLDivElement)&&u(e)}:void 0,t[8]=u,t[9]=S):S=t[9];const M=S;if(!L)return;let O;return t[10]!==N||t[11]!==T||t[12]!==M||t[13]!==r||t[14]!==L||t[15]!==b||t[16]!==y||t[17]!==h?(O=(0,c.Y)(s.ZO,{sanitizeType:b,tagName:y,className:T,id:r,setRef:M,style:N,"data-testid":h,children:L}),t[10]=N,t[11]=T,t[12]=M,t[13]=r,t[14]=L,t[15]=b,t[16]=y,t[17]=h,t[18]=O):O=t[18],O}))},19538:(e,t,n)=>{"use strict";function o(e,t){return-1===e&&0===t||e===t?0:-1}n.d(t,{y:()=>o})},22760:(e,t,n)=>{"use strict";n.d(t,{j:()=>a});var o=n(87873);function a(e,t){const n=o.gemStore.getState().scrollDeeplink.find((e=>"DEEPLINK"===e.type&&e.list.includes(t)));return!!n&&Array.from(e.querySelectorAll("script[data-cid]")).some((e=>{const t=e.getAttribute("data-cid");return t&&n.cId===t}))}},23312:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fetchGenericApiConfiguration:()=>s,getRequestOptions:()=>c,transformResponse:()=>u});var o=n(8752),a=n(43410),i=n(90171),r=n(90124),l=n(88856);async function s(e,t,n={}){const{requestParameters:r,url:l}=c(e,t,n),{signal:s,...m}=r,d=await(0,o.Q)({url:l,requestInit:m,signal:s??void 0});if(!d.ok)throw new a.f("Response is not ok",d);const f=await async function(e,t,n){switch(t){case i.y.JSON:{const t=await e.json();return n?u(n,t):t}case i.y.TEXT:return e.text();default:return e}}(d,n.responseType||i.y.JSON,e.mapping);return t.author&&e.mapping&&console.log("Transformed response: ",f),f}function c(e,t,n={}){const o=function(e,t,n){const o={method:e.method||"GET",referrerPolicy:e.referrerPolicy};switch(e.headers&&(o.headers=(0,l.replacePlaceholdersInObject)({obj:e.headers,gemSettings:n,additionalValues:t.additionalValues})),e.payloadBody){case"RAW_PAYLOAD":e.rawPayload&&(o.body=(0,l.replacePlaceholders)({template:e.rawPayload,gemSettings:n,additionalValues:t.additionalValues}));break;case"BODY_PARAMETERS":e.bodyParameters&&(o.body=(0,r._)((0,l.replacePlaceholdersInObject)({obj:e.bodyParameters,gemSettings:n,additionalValues:t.additionalValues})))}return t.signal&&(o.signal=t.signal),o}(e,n,t);return{requestParameters:o,url:(0,l.replacePlaceholders)({template:e.url,gemSettings:t,additionalValues:n.additionalValues})}}function u(e,t){return t?new Function("responseData",e)(t):t}},23863:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AlertMessage:()=>c,default:()=>m});var o=n(81923),a=n(16522),i=n(35359),r=n(92428),l=n(88080),s=n(2445);const c=e=>{const t=(0,a.c)(12);let n,o,l,c,m;return t[0]!==e?(({type:o,...n}=e),t[0]=e,t[1]=n,t[2]=o):(n=t[1],o=t[2]),t[3]!==n||t[4]!==o?(l="error"===o&&(0,s.Y)(i.K,{...n}),t[3]=n,t[4]=o,t[5]=l):l=t[5],t[6]!==n||t[7]!==o?(c="error"!==o&&(0,s.Y)(r.c,{...n}),t[6]=n,t[7]=o,t[8]=c):c=t[8],t[9]!==l||t[10]!==c?(m=(0,s.FD)(u,{children:[l,c]}),t[9]=l,t[10]=c,t[11]=m):m=t[11],m},u=(0,o.A)("div",{target:"e15uj6g30"})("max-width:",l.yK.max,";margin:0 auto;"),m=c},26445:(e,t,n)=>{"use strict";n.d(t,{x:()=>l});var o=n(18987),a=n(9478),i=n(23312),r=n(90171);async function l({federatedLoginLogoutApi:e,alfaLogoutApi:t,gemSettings:n}){if(!e&&!t)return;const i=o.A.get(a.eO);i&&i.startsWith("ALF-")&&t?await s(t,n):e&&await s(e,n)}async function s(e,t){await(0,i.fetchGenericApiConfiguration)(e,t,{responseType:r.y.NONE})}},35359:(e,t,n)=>{"use strict";n.d(t,{K:()=>s});var o=n(81923),a=n(16522),i=n(47803),r=n(88080),l=n(2445);const s=e=>{const t=(0,a.c)(9),{msg:n,className:o,children:r}=e;let s,m,d,f;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,l.Y)(u,{children:(0,l.Y)("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNzQgMTc0Ij48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2ZmZjt9LmNscy0ye2ZpbGw6IzAwNDk3Yjt9PC9zdHlsZT48L2RlZnM+PGcgaWQ9IkxheWVyXzIiIGRhdGEtbmFtZT0iTGF5ZXIgMiI+PGcgaWQ9IkxheWVyXzEtMiIgZGF0YS1uYW1lPSJMYXllciAxIj48Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9Ijg3IiBjeT0iODciIHI9IjgyLjYzIi8+PHBhdGggY2xhc3M9ImNscy0yIiBkPSJNODcsOC43NGE3OC4yNiw3OC4yNiwwLDAsMSw1NS4zNCwxMzMuNkE3OC4yNiw3OC4yNiwwLDAsMSwzMS42NiwzMS42Niw3Ny43OCw3Ny43OCwwLDAsMSw4Nyw4Ljc0TTg3LDBhODcsODcsMCwxLDAsODcsODdBODcsODcsMCwwLDAsODcsMFoiLz48Y2lyY2xlIGNsYXNzPSJjbHMtMiIgY3g9IjU3LjUzIiBjeT0iNzEuOTYiIHI9IjkuNjYiLz48cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik01Ny41Myw2My4zOUE4LjU3LDguNTcsMCwxLDEsNDksNzJhOC41Nyw4LjU3LDAsMCwxLDguNTctOC41N20wLTIuMThBMTAuNzUsMTAuNzUsMCwxLDAsNjguMjgsNzIsMTAuNzUsMTAuNzUsMCwwLDAsNTcuNTMsNjEuMjFaIi8+PGNpcmNsZSBjbGFzcz0iY2xzLTIiIGN4PSIxMTIuOTciIGN5PSI3MS45NiIgcj0iOS42NiIvPjxwYXRoIGNsYXNzPSJjbHMtMiIgZD0iTTExMyw2My4zOUE4LjU3LDguNTcsMCwxLDEsMTA0LjQxLDcyLDguNTcsOC41NywwLDAsMSwxMTMsNjMuMzltMC0yLjE4QTEwLjc1LDEwLjc1LDAsMSwwLDEyMy43Miw3MiwxMC43NSwxMC43NSwwLDAsMCwxMTMsNjEuMjFaIi8+PHBhdGggY2xhc3M9ImNscy0yIiBkPSJNMjguNTksNjIuNDRhMy4yOCwzLjI4LDAsMCwxLTEuMDctNi4zOEw2NC4zNiw0My41M2EzLjM5LDMuMzksMCwwLDEsMS0uMTcsMy4yOCwzLjI4LDAsMCwxLDEuMDYsNi4zOEwyOS42Myw2Mi4yNkEzLjEyLDMuMTIsMCwwLDEsMjguNTksNjIuNDRaIi8+PHBhdGggY2xhc3M9ImNscy0yIiBkPSJNNjUuNDEsNDQuNDVhMi4xOCwyLjE4LDAsMCwxLDIsMy4xNSwyLjE3LDIuMTcsMCwwLDEtMS4yNSwxLjExTDI5LjI4LDYxLjIzYTIsMiwwLDAsMS0uNjkuMTEsMi4xOCwyLjE4LDAsMCwxLTIuMDgtMS40OCwyLjEzLDIuMTMsMCwwLDEsLjExLTEuNjYsMi4yLDIuMiwwLDAsMSwxLjI1LT
1EuMTFMNjQuNzEsNDQuNTdhMi4xLDIuMSwwLDAsMSwuNy0uMTJtMC0yLjE4YTQuMjQsNC4yNCwwLDAsMC0xLjQuMjNMMjcuMTcsNTVhNC4zNyw0LjM3LDAsMCwwLDEuNDIsOC41MUE0LjIyLDQuMjIsMCwwLDAsMzAsNjMuM0w2Ni44Miw1MC43OGE0LjM3LDQuMzcsMCwwLDAtMS40MS04LjUxWiIvPjxwYXRoIGNsYXNzPSJjbHMtMiIgZD0iTTE0Mi43Myw2Ny41NGEzLjMxLDMuMzEsMCwwLDEtMS45Mi0uNjJMMTA5LjM0LDQ0YTMuMjcsMy4yNywwLDAsMSwxLjkzLTUuOTIsMy4yMSwzLjIxLDAsMCwxLDEuOTIuNjJsMzEuNDgsMjIuODdhMy4zLDMuMywwLDAsMSwuNzIsNC41OEEzLjI5LDMuMjksMCwwLDEsMTQyLjczLDY3LjU0WiIvPjxwYXRoIGNsYXNzPSJjbHMtMiIgZD0iTTExMS4yNywzOS4yMWgwYTIuMTUsMi4xNSwwLDAsMSwxLjI4LjQxTDE0NCw2Mi40OWEyLjE5LDIuMTksMCwwLDEsLjg2LDEuNDMsMi4xNCwyLjE0LDAsMCwxLS4zOCwxLjYzLDIuMiwyLjIsMCwwLDEtMS43OC44OSwyLjE0LDIuMTQsMCwwLDEtMS4yNy0uNDFMMTEwLDQzLjE2YTIuMTgsMi4xOCwwLDAsMSwxLjI5LTMuOTVtMC0yLjE5YTQuMzcsNC4zNywwLDAsMC0yLjU4LDcuOTFMMTQwLjE3LDY3LjhhNC4zNyw0LjM3LDAsMSwwLDUuMTQtNy4wN0wxMTMuODMsMzcuODVBNC4zNCw0LjM0LDAsMCwwLDExMS4yNywzN1oiLz48cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik04Ni43MywxMzQuMDZhMy4yOCwzLjI4LDAsMCwxLTEuMDYtNi4zOGwzNi44NC0xMi41MmEzLjM4LDMuMzgsMCwwLDEsMS0uMTcsMy4yOCwzLjI4LDAsMCwxLDEuMDcsNi4zOEw4Ny43OCwxMzMuODlBMy4xMiwzLjEyLDAsMCwxLDg2LjczLDEzNC4wNloiLz48cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik0xMjMuNTUsMTE2LjA4YTIuMTgsMi4xOCwwLDAsMSwuNzIsNC4yNUw4Ny40MywxMzIuODZhMi4zOCwyLjM4LDAsMCwxLS43LjExLDIuMTgsMi4xOCwwLDAsMS0uNzEtNC4yNWwzNi44NC0xMi41MmEyLDIsMCwwLDEsLjY5LS4xMm0wLTIuMTlhNC4yNCw0LjI0LDAsMCwwLTEuMzkuMjRMODUuMzIsMTI2LjY1YTQuMzcsNC4zNywwLDAsMCwxLjQxLDguNTEsNC4yNSw0LjI1LDAsMCwwLDEuNC0uMjRMMTI1LDEyMi40YTQuMzcsNC4zNywwLDAsMC0xLjQyLTguNTFaIi8+PC9nPjwvZz48L3N2Zz4=",alt:"",width:60})}),t[0]=s):s=t[0],t[1]!==n?(m=(0,l.Y)(i.I2,{className:"fs-4",children:n}),t[1]=n,t[2]=m):m=t[2],t[3]!==r||t[4]!==m?(d=(0,l.FD)("div",{className:"fs-4",children:[m,r]}),t[3]=r,t[4]=m,t[5]=d):d=t[5],t[6]!==o||t[7]!==d?(f=(0,l.FD)(c,{className:o,role:"alert",children:[s,d]}),t[6]=o,t[7]=d,t[8]=f):f=t[8],f},c=(0,o.A)("div",{target:"es68cnv1"})("display:flex;justify-content:center;align-items:center;padding:",r.YK.small,";margin:",r.YK.small," 0;"),u=(0,o.A)("div",{target:"es68cnv0"})("padding-right:",r.YK.mSmall,";")},36047:(e,t,n)=>{"use strict";n.d(t,{x:()=>a});var o=n(47509);const a=e=>(0,o.n)((()=>n.e(9468).then(n.t.bind(n,9468,17))),e)}
1,38889:(e,t,n)=>{"use strict";function o(e){const t=Array.from(e.querySelectorAll("script")).filter((e=>"application/gem+json"!==e.type)),n=t.filter((e=>Boolean(e.src))).map((e=>{const t=document.createElement("script");a(e,t);const n=new Promise(((n,o)=>{t.addEventListener("load",(()=>{n()})),t.addEventListener("error",(()=>{o(new Error(`Failed to load script: ${e.src}`))}))}));return document.head.appendChild(t),n}));Promise.allSettled(n).then((()=>{t.forEach((e=>{if(!e.textContent)return;const t=document.createElement("script");a(e,t),t.appendChild(document.createTextNode(e.textContent)),document.head.appendChild(t)}))}))}function a(e,t){Array.from(e.attributes).forEach((e=>{t.setAttribute("id"===e.nodeName?"data-id":e.nodeName,e.nodeValue||"")}))}n.d(t,{v:()=>o})},39065:(e,t,n)=>{"use strict";n.d(t,{L:()=>o});const o=e=>`tabNavigation_${e}`},40181:(e,t,n)=>{"use strict";function o(e,t){return e?-e.offsetLeft+t/2:null}n.d(t,{O:()=>o})},40316:(e,t,n)=>{"use strict";n.d(t,{Vy:()=>c,dU:()=>s,iK:()=>u,pO:()=>r,qj:()=>l});var o=n(83750);let a=!1;function i(e,t){if(!a){const n={key:e,libraries:["maps","places","core","geocoding","marker"],v:"quarterly"};t&&(n.mapIds=[t]),(0,o.hn)(n),a=!0}}function r(e,t){return i(e,t),(0,o.lB)("maps")}function l(e,t){return i(e,t),(0,o.lB)("places")}function s(e,t){return i(e,t),(0,o.lB)("core")}function c(e,t){return i(e,t),(0,o.lB)("geocoding")}function u(e,t){return i(e,t),(0,o.lB)("marker")}},42115:(e,t,n)=>{"use strict";n.d(t,{T:()=>a,m:()=>i});var o=n(22497);function a(e){const t=(0,o.A)(e.rows).map((e=>{return{...e,userCommunityGroups:(t=e.userCommunityGroups,t.map((e=>(0,o.A)(e))))};var t}));return{count:parseInt(e.count,10),rows:t}}function i(e,t){const n=t.find((t=>t.communityId===e));return n?.name}},43410:(e,t,n)=>{"use strict";n.d(t,{N:()=>a,f:()=>o});class o extends Error{constructor(e,t){super(e),this.name="FetchError",this.response=t}}function a(e){return e instanceof o}},44115:(e,t,n)=>{"use strict";n.d(t,{B:()=>l,T:()=>r});var o=n(16522),a=n(52260),i=n(40181);function r(e,t,n,i){const r=(0,o.c)(22),[l,s]=(0,a.useState)(!1),[c,u]=(0,a.useState)(!1),[m,d]=(0,a.useState)(0);let f,g,b,p,h;r[0]!==e||r[1]!==i||r[2]!==t||r[3]!==m?(f=()=>{i?(u(i>0),s(Math.ceil(i)+e<t)):(u(m<0),s(e>0&&t>0&&Math.ceil(Math.abs(m)+e)<t))},g=[m,e,t,i],r[0]=e,r[1]=i,r[2]=t,r[3]=m,r[4]=f,r[5]=g):(f=r[4],g=r[5]),(0,a.useEffect)(f,g),r[6]!==e||r[7]!==n||r[8]!==t?(b=()=>{const o=e-t,a=Math.min(Math.max(o,n||0),0);d(a)},p=[n,e,t],r[6]=e,r[7]=n,r[8]=t,r[9]=b,r[10]=p):(b=r[9],p=r[10]),(0,a.useEffect)(b,p),r[11]!==e||r[12]!==t?(h=()=>{d((n=>n-Math.min(t-(Math.abs(n)+e),e)))},r[11]=e,r[12]=t,r[13]=h):h=r[13];const y=h;let C;r[14]!==e?(C=()=>{d((t=>t+Math.min(e,Math.abs(t))))},r[14]=e,r[15]=C):C=r[15];const L=C;let E;return r[16]!==y||r[17]!==L||r[18]!==c||r[19]!==l||r[20]!==m?(E={translate:m,overLeft:c,overRight:l,moveLeft:y,moveRight:L},r[16]=y,r[17]=L,r[18]=c,r[19]=l,r[20]=m,r[21]=E):E=r[21],E}function l(e,t){const n=(0,o.c)(5);let r;n[0]===Symbol.for("react.memo_cache_sentinel")?(r={clippedWidth:0,fullWidth:0,customTranslate:0},n[0]=r):r=n[0];const[l,s]=(0,a.useState)(r);let c,u;return n[1]!==e||n[2]!==t?(c=()=>{if(!e||"undefined"==typeof ResizeObserver)return;const n=new ResizeObserver((n=>{for(const o of n){const n=o.target.clientWidth;let a=0;if(t)try{const o=e.querySelector(t);o&&(a=(0,i.O)(o,n))}catch(e){const t=e;console.log("Wrong selected selector!",t)}s({clippedWidth:n,customTranslate:a,fullWidth:e.scrollWidth})}}));return n.observe(e),()=>{n.disconnect()}},u=[e,t,s],n[1]=e,n[2]=t,n[3]=c,n[4]=u):(c=n[3],u=n[4]),(0,a.useEffect)(c,u),l}},45508:(e,t,n)=>{"use strict";n.d(t,{G:()=>a});var o=n(49399);function a(e,t,n){(0,o.L)(e,n).forEach(((e,n)=>{t===n&&e.focus()}))}},47678:(e,t,n)=>{"use strict";n.d(t,{u:()=>a});var o=n(47509);const a=e=>(0,o.n)((()=>n.e(65497).then(n.t.bind(n,65497,17))),e)},49399:(e,t,n)=>{"use strict";function o(e,t){return t.includes("menuitem")?Array.from(e.children).reduce(((e,n)=>{const o=n.matches(t)?n:n.querySelector(t);return o&&e.push(o),e}),[]):Array.from(e.querySelectorAll(t))}n.d(t,{L:()=>o})},54057:(e,t,n)=>{"use strict";function o(e){return e.reduce(((e,t)=>t.placePrediction?[...e,t.placePrediction]:e),[])}n.d(t,{L:()=>o})},55447:(e,t,n)=>{"use strict";n.d(t,{D6:()=>l,_o:()=>i,vH:()=>r});var o=n(16522),a=n(87873);function i(e,t){const n=(0,o.c)(3);let i;return n[0]!==t||n[1]!==e?(i=n=>
1l(n,e,t),n[0]=t,n[1]=e,n[2]=i):i=n[2],(0,a.useGemStore)(i)}function r(e){const t=(0,o.c)(2);let n;return t[0]!==e?(n=t=>t.scrollDeeplink.find((t=>"DEEPLINK"===t.type&&t.cId===e)),t[0]=e,t[1]=n):n=t[1],(0,a.useGemStore)(n)}function l(e,t,n){return e.scrollDeeplink.find((e=>"LAZY_SCROLL"===e.type&&e.component===t&&e.cId===n))}},55698:(e,t,n)=>{"use strict";n.d(t,{a:()=>F});var o=n(16522),a=n(46942),i=n.n(a),r=n(52260),l=n(87873);const s=(e,t)=>{c(e,"tabNavigation/setSelectedAction",(e=>{if(-1===t)return{...e,selected:t,id:void 0};const n=e.tabItems[t],o=n?.hasConfiguredId?n.cId:void 0;return{...e,selected:t,id:o}}))};function c(e,t,n){const o=l.gemStore.getState()[e];o&&l.gemStore.setState({[e]:n(o)},!1,t)}var u=n(39065),m=n(59882),d=n(72065);function f(e,t,n){return{role:"tabpanel",className:i()({"pos-a v-h w-full":!n}),id:(0,d.OX)(e,"tabpanel",t),tabIndex:0,"aria-labelledby":(0,d.OX)(e,"tab",t),"aria-hidden":!n,"data-testid":`tab-${t}`}}var g=n(37040),b=n(93574),p=n(31702),h=n(2445);const y=e=>{const t=(0,o.c)(14),n=(0,l.useGemStore)(C),[a,i]=(0,g.g)();let r;(0,b.S)(e.content?a:null),t[0]!==n||t[1]!==e.gridPosition?(r=n?void 0:(0,d.dM)(e.gridPosition),t[0]=n,t[1]=e.gridPosition,t[2]=r):r=t[2];const s=r;let c,u,m;return t[3]!==e.cid||t[4]!==e.index||t[5]!==e.selected?(c=f(e.cid,e.index,e.selected),t[3]=e.cid,t[4]=e.index,t[5]=e.selected,t[6]=c):c=t[6],t[7]!==e.content?(u={__html:e.content},t[7]=e.content,t[8]=u):u=t[8],t[9]!==s||t[10]!==i||t[11]!==c||t[12]!==u?(m=(0,h.Y)("div",{...c,style:s,ref:i,dangerouslySetInnerHTML:u}),t[9]=s,t[10]=i,t[11]=c,t[12]=u,t[13]=m):m=t[13],m};function C(e){return e.mediaBreakpoint>=p.E.SM}var L=n(97969),E=n(78341),T=n(62919),v=n(71868),N=n(22760),S=n(75081);const M=(e,t,n)=>function(){const o=(0,S.F)(this);if(!o)return;let a=function(e,t){const n=(0,v.K)(t,e.cId);return n?.id?e.tabItems.findIndex((e=>e.cId===n.id)):-1}(t,o);-1===a&&(a=function(e,t){let n=-1;return Array.from(e.querySelectorAll('[role="tabpanel"]')).forEach(((e,o)=>{(0,N.j)(e,t)&&(n=o)})),n}(e,o)),a>-1&&n(a)};var O=n(33475),I=n(34184),w=n(49595),A=n(55447),Y=n(50357),k=n(77084),D=n(80418),P=n(83604),x=n(58777),U=n(38468),j=n(6653);const F=e=>{const t=(0,o.c)(82),{config:n,defaultState:a,element:b,shouldRenderOnlySelected:p}=e;let C;t[0]!==a.cId?(C=(0,u.L)(a.cId),t[0]=a.cId,t[1]=C):C=t[1];const v=C;let N;t[2]!==a||t[3]!==v?(N={sliceKey:v,defaultState:a},t[2]=a,t[3]=v,t[4]=N):N=t[4],(0,O.R)(N);const{selected:S,initialized:P}=((e,t)=>{const n=(0,o.c)(3);let a;return n[0]!==t||n[1]!==e?(a=n=>n[e]??t,n[0]=t,n[1]=e,n[2]=a):a=n[2],(0,l.useGemStore)(a)})(v,a);let F;t[5]!==n.cId?(F=e=>({tabHashState:e.urlStateComponent.hashState?.[n.cId]}),t[5]=n.cId,t[6]=F):F=t[6];const{tabHashState:B}=(0,l.useGemStore)(F),[G,z]=(0,g.g)();let q;t[7]!==n.cId||t[8]!==n.tabItems||t[9]!==v||t[10]!==B?(q=e=>()=>{const t=n.tabItems[e],o={...l.gemStore.getState().urlStateComponent.hashState??{}},a=U.N.getInstance();t.hasConfiguredId?(o[n.cId]={id:t.cId},a.pushAndDispatch(`${(0,j.SU)(o)}`)):void 0!==B?(s(v,e),delete o[n.cId],a.pushAndDispatch(`${(0,j.SU)(o)}`)):s(v,e)},t[7]=n.cId,t[8]=n.tabItems,t[9]=v,t[10]=B,t[11]=q):q=t[11];const $=q;let V,W;t[12]!==G||t[13]!==P||t[14]!==v?(V=()=>{!P&&G&&c(v,"tabNavigation/setInitializedAction",(e=>({...e,initialized:!0})))},W=[G,P,v],t[12]=G,t[13]=P,t[14]=v,t[15]=V,t[16]=W):(V=t[15],W=t[16]),(0,r.useEffect)(V,W);const H=(0,A._o)("TAB_NAVIGATION",n.cId),X=(0,I.j)();let K,J,Z,Q,ee,te,ne;t[17]!==n.cId||t[18]!==n.tabItems||t[19]!==X?(K=()=>{X||(0,E.d)(n.cId,n.tabItems)},J=[n.cId,n.tabItems,X],t[17]=n.cId,t[18]=n.tabItems,t[19]=X,t[20]=K,t[21]=J):(K=t[20],J=t[21]),(0,r.useEffect)(K,J),t[22]!==n.cId||t[23]!==n.tabItems||t[24]!==G||t[25]!==b||t[26]!==H||t[27]!==v||t[28]!==B?(Z=()=>{if(G&&(B||H))if(H)(0,w.j)(n.cId),s(v,H.tabIndex),R(b);else if(B){const e=(0,T.R)(n.tabItems,B.id);s(v,e)}},t[22]=n.cId,t[23]=n.tabItems,t[24]=G,t[25]=b,t[26]=H,t[27]=v,t[28]=B,t[29]=Z):Z=t[29],t[30]!==n||t[31]!==G||t[32]!==b||t[33]!==H||t[34]!==v||t[35]!==B?(Q=[n,B,H,v,b,G],t[30]=n,t[31]=G,t[32]=b,t[33]=H,t[34]=v,t[35]=B,t[36]=Q):Q=t[36],(0,r.useEffect)(Z,Q),t[37]!==n||t[38]!==b||t[39]!==v?(ee=()=>(0,D.delegateEvent)("click",Y.rd,M(b,n,(e=>{s(v,e),R(b)}))),te=[n,b,v],t[37]=n,t[38]=b,t[39]=v,t[40]=ee,t[41]=te):(ee=t[40],te=t[41]),(0,r.useEffect)(ee,te),t[42]!==n.spacer||t[43]!==n.theme?(ne=i()((0,d.O4)(n.theme),n.spacer?(0,x.T)(n.spacer):void 0),t[42]=n.spacer,t[43]=n.theme,t[44]=ne):ne=t[44];const oe=ne;let ae;t[45]!==n.tabItems?(ae=n.tabItems.map(_),t[45]=n.tabItems,t[46]=ae):ae=t[46];const ie=ae,re=(0,k.useGemInitializeComponents)();let le,se,ce,ue,me,de,fe,ge;if(t[47]!==n.cId||t[48]!==$||t[49]!==S||t[50]!==ie?(le=(0,h.Y)(m.w,{tabItems:ie,cId:n.cId,selected:S,clickTab:$}),t[47]=n.cId,t[48]=$,t[49]=S,t[50]=ie,t[51]=le):le=t[51],t[52]!==n.alignment||t[53]!==le?(se=(0,h.Y)(L.Y5,{alignment:n.alignment,children:le}),t[52]=n.alignment,t[53]=le,t[54]=se):se=t[54],t[55]!==n.cId||t[56]!==n.spacer?.gridPosition||t[57]!==n.tabItems||t[58]!==S||t[59]!==p){let e;t[61]!==n.cId||t[62]!==n.spacer?.gridPosition||t[63]!==S||t[64]!==p?(e=(e,t)=>{const o=!p||S===t;return(0,h.FD)(r.Fragment,{children:["string"==typeof e.content&&(0,h.Y)(y,{cid:n.cId,index:t,content:e.content,selected:S===t,gridPosition:n.spacer?.gridPosition}
1),"function"==typeof e.content&&o&&(0,h.Y)("div",{...f(e.cId,t,S===t),children:(0,h.Y)(e.content,{})})]},e.cId)},t[61]=n.cId,t[62]=n.spacer?.gridPosition,t[63]=S,t[64]=p,t[65]=e):e=t[65],ce=n.tabItems.map(e),t[55]=n.cId,t[56]=n.spacer?.gridPosition,t[57]=n.tabItems,t[58]=S,t[59]=p,t[60]=ce}else ce=t[60];return t[66]!==z||t[67]!==ce?(ue=(0,h.Y)("div",{ref:z,children:ce}),t[66]=z,t[67]=ce,t[68]=ue):ue=t[68],t[69]!==se||t[70]!==ue?(me=(0,h.FD)("div",{className:"wrapper d-f fd-c",children:[se,ue]}),t[69]=se,t[70]=ue,t[71]=me):me=t[71],t[72]!==oe||t[73]!==me?(de=(0,h.Y)("div",{className:oe,children:me}),t[72]=oe,t[73]=me,t[74]=de):de=t[74],t[75]!==re||t[76]!==G||t[77]!==p?(fe=G&&!p&&re&&(0,h.Y)(re,{context:G}),t[75]=re,t[76]=G,t[77]=p,t[78]=fe):fe=t[78],t[79]!==de||t[80]!==fe?(ge=(0,h.FD)(h.FK,{children:[de,fe]}),t[79]=de,t[80]=fe,t[81]=ge):ge=t[81],ge};function R(e){e.closest(".modal")||(0,P.Vf)(e)}function _(e){return{cId:e.cId,label:e.title}}},57119:(e,t,n)=>{"use strict";n.d(t,{U:()=>a,s:()=>i});var o=n(88703);const{useConfig:a,ConfigProvider:i}=(0,o.c)()},57684:(e,t,n)=>{"use strict";n.d(t,{m:()=>r});var o=n(16522),a=n(52260),i=n(44115);const r=(0,a.memo)((e=>{const t=(0,o.c)(3),{fullWidth:n,children:a,clippedWidth:r,customTranslate:l,currentScroll:s}=e,c=(0,i.T)(r,n,l,s);let u;return t[0]!==c||t[1]!==a?(u=a(c),t[0]=c,t[1]=a,t[2]=u):u=t[2],u}))},59882:(e,t,n)=>{"use strict";n.d(t,{w:()=>y});var o=n(16522),a=n(52260),i=n(16052),r=n(97969),l=n(57684),s=n(40181),c=n(37040),u=n(47803),m=n(37159),d=n(19538),f=n(88354),g=n(36047),b=n(75234),p=n(72065),h=(n(94908),n(2445));const y=e=>{const t=(0,o.c)(31),{ariaLabelledBy:n,clickTab:y,cId:C,selected:L,tabItems:E,showOverflowButtons:T}=e,v=void 0===T||T,[N,S]=(0,c.g)(),[M,O]=(0,a.useState)(0),[I,w]=(0,a.useState)(0),[A,Y]=(0,a.useState)(0),k=(0,i.v)(N);let D;t[0]!==N?(D={containerRef:N,childSelector:"[role=tab]"},t[0]=N,t[1]=D):D=t[1];const{focusedIndex:P}=(0,f.A)(D);let x,U,j,F;t[2]!==N?(x=()=>{if(!N)return;const e=parseInt(window.getComputedStyle(N).gap,10),t=Array.from(N.querySelectorAll("li")).reduce(((t,n)=>t+n.getBoundingClientRect().width+e),0)-e;w(N.getBoundingClientRect().width),Y(Math.floor(t))},t[2]=N,t[3]=x):x=t[3],t[4]!==k||t[5]!==N?(U=[N,k],t[4]=k,t[5]=N,t[6]=U):U=t[6],(0,a.useEffect)(x,U),t[7]!==N||t[8]!==I?(j=()=>{if(!N)return;const e=N.querySelector("button[aria-selected=true]"),t=(0,s.O)(e,I);e&&null!==t&&N.scrollTo({left:-t,behavior:"smooth"})},t[7]=N,t[8]=I,t[9]=j):j=t[9],t[10]!==N||t[11]!==I||t[12]!==L?(F=[L,N,I],t[10]=N,t[11]=I,t[12]=L,t[13]=F):F=t[13],(0,a.useEffect)(j,F);const R=N?.scrollLeft;let _,B;return t[14]!==n||t[15]!==C||t[16]!==y||t[17]!==P||t[18]!==N||t[19]!==I||t[20]!==L||t[21]!==S||t[22]!==v||t[23]!==E?(_=e=>(0,h.FD)(r.lT,{children:[e.overLeft&&(0,h.Y)(r.mB,{children:v&&(0,h.Y)(r.Vh,{tabIndex:-1,onClick:()=>{N?.scrollBy({left:-I,behavior:"smooth"})},"data-testid":"button-left","aria-hidden":!0,children:(0,h.Y)(m.p,{iconPath:g.x,width:"16"})})}),(0,h.Y)(r.J,{role:"tablist","aria-labelledby":n,"data-testid":"tablist",ref:S,onScroll:()=>{N&&O(-N.scrollLeft)},children:E.map(((e,t)=>(0,h.Y)("li",{role:"none","data-testid":"item","data-gem-id":`nav-tab-${t+1}`,children:(0,h.FD)(r.bL,{role:"tab","aria-selected":t===L,"aria-controls":(0,p.OX)(C,"tabpanel",t),tabIndex:(0,d.y)(P,t),id:(0,p.OX)(C,"tab",t),onClick:y(t),active:t===L,"data-testid":"tab",children:[(0,h.Y)(u.I2,{className:"o-h ws-nowrap",children:e.label}),e.ariaDescription&&(0,h.FD)("span",{className:"visuallyhidden",children:[", ",e.ariaDescription]})]})},e.cId)))}),e.overRight&&(0,h.Y)(r.FF,{children:v&&(0,h.Y)(r.Vh,{tabIndex:-1,onClick:()=>{N?.scrollBy({left:I,behavior:"smooth"})},"aria-hidden":!0,"data-testid":"button-right",children:(0,h.Y)(m.p,{iconPath:b.m,width:"16"})})})]}),t[14]=n,t[15]=C,t[16]=y,t[17]=P,t[18]=N,t[19]=I,t[20]=L,t[21]=S,t[22]=v,t[23]=E,t[24]=_):_=t[24],t[25]!==M||t[26]!==I||t[27]!==A||t[28]!==R||t[29]!==_?(B=(0,h.Y)(l.m,{clippedWidth:I,fullWidth:A,customTranslate:M,currentScroll:R,children:_}),t[25]=M,t[26]=I,t[27]=A,t[28]=R,t[29]=_,t[30]=B):B=t[30],B}},65648:(e,t,n)=>{"use strict";n.d(t,{H:()=>a,R:()=>i});var o=n(40316);async function a(e,t){const n=new((await(0,o.Vy)(t)).Geocoder),{results:a}=await n.geocode({address:e}),i=a[0].geometry.location;return{lat:i.lat(),lng:i.lng()}}async function i(e,t){const n=new((await(0,o.Vy)(t)).Geocoder),{results:a}=await n.geocode({location:e});return a[0].formatted_address}},67606:(e,t,n)=>{"use strict";n.d(t,{s:()=>a});var o=n(49399);function a({event:e,containerRef:t,childSelector:n,currentFocusedIndex:a,onEscape:l,direction:s}
1){const c=function({currentFocusedIndex:e,eventKey:t,onEscape:n,items:o,direction:a}){if(function(e){return["ArrowLeft","ArrowRight","ArrowDown","ArrowUp","End","Escape","Home"].includes(e)}(t))switch(t){case"ArrowDown":if(!a||"VERTICAL"===a)return i(e,o);break;case"ArrowRight":if(!a||"HORIZONTAL"===a)return i(e,o);break;case"ArrowUp":if(!a||"VERTICAL"===a)return r(e,o);break;case"ArrowLeft":if(!a||"HORIZONTAL"===a)return r(e,o);break;case"Home":return 0;case"End":return o.length-1;case"Escape":if(n){n();break}if(o[e]?.matches('[role="menuitem"]'))return-1}}({currentFocusedIndex:a,items:(0,o.L)(t,n),onEscape:l,direction:s,eventKey:e.key});return void 0!==c&&(e.stopPropagation(),e.preventDefault()),c}function i(e,t){return(e+1)%t.length}function r(e,t){return e>0?e-1:t.length-1}},71339:(e,t,n)=>{"use strict";n.d(t,{K:()=>r,U:()=>l});var o=n(16522),a=(n(52260),n(17390)),i=n(21065);function r(e){const t=(0,o.c)(4),{stateType:n,cId:i}=(0,a.K)();let r;return t[0]!==i||t[1]!==e||t[2]!==n?(r=t=>{l({cId:i,name:e,stateType:n,query:t.target.value})},t[0]=i,t[1]=e,t[2]=n,t[3]=r):r=t[3],r}function l({stateType:e,query:t,name:n,cId:o}){const a=encodeURIComponent(t);"HASH"===e?(0,i.n1)(o,a,n):"QUERY"===e&&(0,i.LF)(a,n)}},72065:(e,t,n)=>{"use strict";n.d(t,{O4:()=>i,OX:()=>a,dM:()=>r});var o=n(15033);function a(e,t,n){return`${e}-${t}-${n}`}function i(e){const t=(0,o.x3)(e);return t?`theme ${t}`:void 0}function r(e){const t=e?Number(e):0;if(t&&0!==t)return{marginInline:t/12*100+"%"}}},76870:(e,t,n)=>{"use strict";function o(e){return e.replaceAll("data-rendered-remotely","data-rendered-remotely-false")}n.d(t,{S:()=>o})},78654:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>fr});var o=n(16522),a=n(2445);const i=e=>{const t=(0,o.c)(2),{children:n}=e;let i;return t[0]!==n?(i=(0,a.Y)("div",{className:"pos-r z-1 p-t-lg p-b-xl",children:n}),t[0]=n,t[1]=i):i=t[1],i};var r=n(88703);const{useConfig:l,ConfigProvider:s}=(0,r.c)();var c=n(52260),u=n(57119),m=n(87873),d=n(40676),f=n(90774),g=n(7329),b=n(88856);function p(e){return e.siteLogin.socialUser}var h=n(42115),y=n(4438),C=n(45254),L=n(13328),E=n(24691),T=n(61793);function v(e){return{type:"SET_FAVOURITE_OFFER_DIALOG",dialog:e}}function N(e,t){switch(t.type){case"SET_FAVOURITE_OFFERS":return{...e,favouriteOffers:t.favouriteOffers};case"RESET_FAVOURITE_OFFERS":return{...e,forceResetTrigger:(0,T.k)()};case"SET_FAVOURITE_OFFER_DIALOG":return{...e,dialog:t.dialog};case"SET_ACTUAL_FAVOURITE_OFFER":return{...e,actualFavourite:t.favourite};default:return e}}const S={favouriteOffers:[]};var M=n(5332),O=n(47477),I=n(36628),w=n(2584);const A=e=>{const t=(0,o.c)(19),{actualFavourite:n,dispatch:i}=e,r=(0,u.U)(),l=r.communityConfiguration.general,s=r.communityConfiguration.userProfile,m=(0,w.S)(),[d,f]=function(){const e=(0,o.c)(6),t=(0,u.U)(),[n,a]=(0,I.s)();let i,r;return e[0]!==t.communityConfiguration.errorMessage.errorCodes||e[1]!==n?(i={fetchState:n,method:"DELETE",errorCodes:t.communityConfiguration.errorMessage.errorCodes,isModal:!0},e[0]=t.communityConfiguration.errorMessage.errorCodes,e[1]=n,e[2]=i):i=e[2],(0,M.h)(i),(0,O.s)(n,t.communityConfiguration.errorMessage.successMessage),e[3]!==a||e[4]!==n?(r=[a,n],e[3]=a,e[4]=n,e[5]=r):r=e[5],r}();let g,b,p;t[0]!==i||t[1]!==f.response?(g=()=>{f.response&&(i({type:"RESET_FAVOURITE_OFFERS"}),i(v()))},t[0]=i,t[1]=f.response,t[2]=g):g=t[2],t[3]!==i||t[4]!==f?(b=[f,i],t[3]=i,t[4]=f,t[5]=b):b=t[5],(0,c.useEffect)(g,b),t[6]!==n.id||t[7]!==d||t[8]!==l||t[9]!==m.jwtToken?(p=async()=>{await async function(e,t,n,o){const a={headers:(0,E.d)(t),method:"DELETE"};await o(`${(0,L.y)(e)}/etb/offers/favourites/${n}`,a)}(l,m.jwtToken,n.id,d)},t[6]=n.id,t[7]=d,t[8]=l,t[9]=m.jwtToken,t[10]=p):p=t[10];const h=p;let y;t[11]!==i?(y=()=>{i(v())},t[11]=i,t[12]=y):y=t[12];const T=y,N=r.communityConfiguration.etbUserProfileConfig.removeFromFavoritesLabel;let S;return t[13]!==T||t[14]!==l.cancelButtonLabel||t[15]!==h||t[16]!==N||t[17]!==s.areYouSureText?(S=(0,a.Y)(C.l,{type:"CONFIRM",title:N,message:s.areYouSureText,confirmClick:h,cancelText:l.cancelButtonLabel,confirmText:N,cancelClick:T}
1),t[13]=T,t[14]=l.cancelButtonLabel,t[15]=h,t[16]=N,t[17]=s.areYouSureText,t[18]=S):S=t[18],S};var Y=n(40890);const k=e=>{const t=(0,o.c)(11),{id:n,dispatch:i}=e,r=(0,u.U)().cmpConsentConfiguration,l=(0,u.U)().communityConfiguration;let s;t[0]!==i?(s=()=>{i(v()),i({type:"RESET_FAVOURITE_OFFERS"})},t[0]=i,t[1]=s):s=t[1];const c=s,m=l.general.cancelButtonLabel,d=Number(n);let f,g;return t[2]!==c||t[3]!==l||t[4]!==d?(f=(0,a.Y)(Y.i,{offerId:d,socialConfig:l,handleNGOFilter:c,setOfferDetailsId:c}),t[2]=c,t[3]=l,t[4]=d,t[5]=f):f=t[5],t[6]!==c||t[7]!==r||t[8]!==l.general.cancelButtonLabel||t[9]!==f?(g=(0,a.Y)(C.l,{type:"CONFIRM",theme:"theme-white",cancelText:m,cancelClick:c,cmpConsentConfiguration:r,children:f}),t[6]=c,t[7]=r,t[8]=l.general.cancelButtonLabel,t[9]=f,t[10]=g):g=t[10],g};var D=n(24281),P=n(81923),x=n(49291),U=n(88080),j=n(73174),F=n(62958);const R=(0,P.A)(x.N,{target:"ejhcf7i2"})("--dropdown-option-background-color:'#a3b5c926';width:100%;min-height:",(0,j.a)(40),";text-align:left;padding:0 ",(0,j.a)(10),";border-radius:2px;background-color:var(--dropdown-option-background-color, #fff);E &:hover{--dropdown-option-background-color:#a3b5c926;--color-btn-unstyled:#135ee2;}&:focus-visible{--dropdown-option-background-color:#a3b5c926;outline:none;}"),_=(0,P.A)(x.N,{target:"ejhcf7i1"})("--color-btn-unstyled:#135ee2;display:flex;padding:var(--spacing-s01);border:",(0,j.a)(2)," solid ",F.flc,";border-radius:",(0,j.a)(6),";"),B=(0,P.A)("div",{target:"ejhcf7i0"})("table{border-radius:4px;border-collapse:separate;border:1px solid ",F.i9e,";}th{padding:var(--spacing-s02) var(--spacing-s015);font-weight:",U.Wy.semibold,";color:",F.TT6,";background-color:",F.DJJ,";border:none;font-size:",U.J.t6,";}tr{border:none;box-shadow:0px 1px 0px 0px ",F.i9e," inset;&:last-child{td{border-bottom-right-radius:10px;}}&:nth-of-type(odd){background-color:",F.Vjb,";}&:first-child{font-weight:var(--font-weight-first-row, normal);}}td{border:none;padding:var(--spacing-s02) var(--spacing-s015);}");var G=n(47803);const z=e=>{const t=(0,o.c)(10),{handleClick:n,label:i,optionProps:r}=e;let l;t[0]!==n||t[1]!==r?(l=e=>{n(e),r.handleClick?.(e)},t[0]=n,t[1]=r,t[2]=l):l=t[2];const s=l,c=r?.role,u=r?.tabIndex;let m,d;return t[3]!==i?(m=(0,a.Y)(G.I2,{children:i}),t[3]=i,t[4]=m):m=t[4],t[5]!==s||t[6]!==c||t[7]!==u||t[8]!==m?(d=(0,a.Y)(R,{onClick:s,role:c,tabIndex:u,children:m}),t[5]=s,t[6]=c,t[7]=u,t[8]=m,t[9]=d):d=t[9],d};var q=n(37159),$=n(72285),V=n(47678);const W=(0,c.memo)((e=>{const t=(0,o.c)(2),{options:n}=e;if(n.length>0){let e;return t[0]!==n?(e=(0,a.Y)($.R,{SelectedToggleButton:H,options:n,type:"DROPDOWN_LEFT",rolePattern:"MENU"}),t[0]=n,t[1]=e):e=t[1],e}})),H=e=>{const t=(0,o.c)(3);let n,i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,a.Y)(q.p,{iconPath:V.u,className:"glyph-icon"}),t[0]=n):n=t[0],t[1]!==e?(i=(0,a.Y)(_,{...e,"aria-label":"Actions",children:n}),t[1]=e,t[2]=i):i=t[2],i},X=e=>{const t=(0,o.c)(4);let n;t[0]!==e?(n=function({favourite:e,dispatch:t,config:n}){const o=n=>()=>{t(v(n)),t(function(e){return{type:"SET_ACTUAL_FAVOURITE_OFFER",favourite:e}}(e))},i=n.communityConfiguration.etbOfferConfig.offerInformationLabel,r=n.communityConfiguration.etbUserProfileConfig.removeFromFavoritesLabel;return[{label:e=>(0,a.Y)(z,{handleClick:o("DETAIL"),label:i,optionProps:e}),value:i},{label:e=>(0,a.Y)(z,{handleClick:o("DELETE"),label:r,optionProps:e}),value:r}]}(e),t[0]=e,t[1]=n):n=t[1];const i=n;let r;return t[2]!==i?(r=(0,a.Y)(W,{options:i}),t[2]=i,t[3]=r):r=t[3],r};var K=n(80071);function J(e,t,n){const o=n.communityConfiguration.etbOfferConfig;switch(e){case"offerName":return t.offerName;case"ngo":return t.ngo;case"addresses":return t.addresses.map(K.M).join("<br/>");case"type":return Z(o,t.offerType);case"timeOfDays":return t.timeOfDays.map((e=>Z(o,e))).join(", ");case"periodicities":return t.periodicities.map((e=>Z(o,e))).join(", ");default:return""}}function Z(e,t){return e[`${t}Label`]}function Q(e,t,n,o){return"actions"===e?(0,a.Y)(X,{config:n,favourite:t,dispatch:o}):(0,a.Y)(a.FK,{})}var ee=n(31702);const te=e=>{const t=(0,o.c)(7),{favouriteOffers:n,dispatch:i}=e,r=(0,m.useGemStore)(ne),l=(0,u.U)();let s;t[0]!==l||t[1]!==i||t[2]!==n?(s=function(e,t,n){const o=function(e){const t=e.communityConfiguration.etbOfferConfig,n=e.communityConfiguration.etbNgoConfig;return[{type:"TEXT",apiFieldName:"offerName",sorting:!1,title:t.offerN
1ameLabel},{type:"TEXT",apiFieldName:"ngo",sorting:!1,title:n.companyName},{type:"TEXT",apiFieldName:"type",sorting:!1,title:t.typeOfOfferLabel},{type:"TEXT",apiFieldName:"timeOfDays",sorting:!1,title:t.timeOfDayLabel},{type:"TEXT",apiFieldName:"periodicities",sorting:!1,title:t.periodicityLabel},{type:"TEXT",apiFieldName:"addresses",sorting:!1,title:t.addressLabel},{type:"COMPONENT",apiFieldName:"actions",sorting:!1}]}(t),a={columns:[],data:[],id:(0,T.k)()};return a.columns=[o.map((e=>({id:(0,T.k)(),name:e.apiFieldName,label:e.title??"",type:e.type,sorting:e.sorting})))],a.data=e.map(((e,a)=>o.reduce(((o,i,r)=>{let l;switch(i.type){case"TEXT":l={type:"TEXT",id:`${a}-${r}`,value:J(i.apiFieldName,e,t),valueForSorting:""};break;case"COMPONENT":l={type:"COMPONENT",id:`${a}-${r}`,value:Q(i.apiFieldName,e,t,n),valueForSorting:""}}return l?{...o,[i.apiFieldName]:l}:o}),{}))),a}(n,l,i),t[0]=l,t[1]=i,t[2]=n,t[3]=s):s=t[3];const c=s;let d;return t[4]!==r||t[5]!==c?(d=(0,a.Y)(B,{children:(0,a.Y)(D.d,{tableData:c,isMobile:r})}),t[4]=r,t[5]=c,t[6]=d):d=t[6],d};function ne(e){return e.mediaBreakpoint<ee.E.SM}var oe=n(48135),ae=n(2150);const ie=(0,ae.Ik)({id:(0,ae.ai)(),name:(0,ae.Yj)()}),re=(0,ae.Ik)({id:(0,ae.lq)((0,ae.KC)([(0,ae.ai)(),(0,ae.Yj)()])),zip:(0,ae.Yj)(),street:(0,ae.Yj)(),houseNumber:(0,ae.Yj)(),door:(0,ae.lq)((0,ae.Yj)()),city:(0,ae.Yj)(),lon:(0,ae.ai)(),lat:(0,ae.ai)()}),le=["activity","donation","event","training","groupActivity"],se=(0,ae.vP)(le),ce=(0,ae.vP)(["morning","afternoon","evening","individualTOD","halfDay","wholeDay"]),ue=(0,ae.vP)(["onceAWeek","onceAMonth","bimonthly","once","individual","limited"]),me=(0,ae.vP)(["german","english","french","italian","spanish","czech","slovakian","hungarian","croatian","serbian","romanian","russian","ukrainian","otherLanguageSkills"]),de=(0,ae.vP)(["drivingLicenseB","drivingLicenseC","officeApp","programmingDB","itSkills","managment","organisation","projectManagment","marketing","sales","legal","generalCareKnowledgeSkills"]),fe=(0,ae.vP)(["under5","between5to10","between10to20","over20"]),ge=(0,ae.vP)(["generalCareActivityType","helpForElderlyAndSick","workingWithElderlyPeople","workingWithChildrenYouth","workingWithHandicappedPeople","workingWithMigrants","officeWork","specialSkilledActivity","visiting","other","accompaniment","gardening","craftWork","cooking","outdoor"]),be=(0,ae.vP)(["childrenAndBabys","foodsAndHousekeeping","clothing","hygieneAndHealth","officeAndSchool","gamesAndFun","otherDonation"]),pe=(0,ae.vP)(["groupWorkingWithElderlyPeople","groupWorkingWithChildrenYouth","groupWorkingWithHandicappedPeople","groupWorkingWithMigrants","groupSpecialSkilledActivity","groupOther","groupAccompaniment","groupGardening","groupCraftWork","groupCooking","groupOutdoor"]),he=(0,ae.Ik)({id:(0,ae.ai)(),name:(0,ae.Yj)(),activated:(0,ae.zM)(),offerType:se,timeOfDays:(0,ae.YO)(ce),peri
1odicities:(0,ae.YO)(ue),createdAt:(0,ae.lq)((0,ae.Yj)()),updatedAt:(0,ae.lq)((0,ae.Yj)()),profile:ie,addresses:(0,ae.YO)(re)}),ye=(0,ae.YO)(he),Ce=(0,ae.Ik)({rows:ye,count:(0,ae.ai)()}),Le=(0,ae.Ik)({id:(0,ae.lq)((0,ae.ai)()),offerType:se,name:(0,ae.Yj)(),activated:(0,ae.zM)(),email:(0,ae.Yj)(),phone:(0,ae.lq)((0,ae.Yj)()),description:(0,ae.Yj)(),createdAt:(0,ae.lq)((0,ae.Yj)()),updatedAt:(0,ae.lq)((0,ae.Yj)()),profile:ie,addresses:(0,ae.YO)(re),timeOfDays:(0,ae.YO)(ce),additionalInformation:(0,ae.lq)((0,ae.Yj)()),languageSkills:(0,ae.lq)((0,ae.YO)(me)),skills:(0,ae.lq)((0,ae.YO)(de))}),Ee=(0,ae.Ik)({...Le.schema,activityTypes:(0,ae.lq)((0,ae.YO)(ge)),donationTypes:(0,ae.lq)((0,ae.YO)(be)),groupActivityTypes:(0,ae.lq)((0,ae.YO)(pe)),groupSize:(0,ae.lq)(fe),periodicities:(0,ae.lq)((0,ae.YO)(ue)),requiredPeople:(0,ae.lq)((0,ae.Yj)()),trainingNeeded:(0,ae.lq)((0,ae.zM)()),startDate:(0,ae.lq)((0,ae.Yj)()),endDate:(0,ae.lq)((0,ae.Yj)()),startTime:(0,ae.lq)((0,ae.Yj)()),endTime:(0,ae.lq)((0,ae.Yj)())}),Te=((0,ae.Ik)({...Le.schema,offerType:(0,ae.vP)(["activity"]),activityTypes:(0,ae.YO)(ge),periodicities:(0,ae.YO)(ue),requiredPeople:(0,ae.lq)((0,ae.Yj)()),trainingNeeded:(0,ae.zM)()}),(0,ae.Ik)({...Le.schema,offerType:(0,ae.vP)(["donation"]),donationTypes:(0,ae.YO)(be),periodicities:(0,ae.YO)(ue),requiredPeople:(0,ae.lq)((0,ae.Yj)()),trainingNeeded:(0,ae.zM)()}),(0,ae.Ik)({...Le.schema,offerType:(0,ae.vP)(["groupActivity"]),groupActivityTypes:(0,ae.YO)(pe),groupSize:fe,trainingNeeded:(0,ae.zM)()}),(0,ae.Ik)({...Le.schema,offerType:(0,ae.vP)(["training"]),periodicities:(0,ae.YO)(ue),groupSize:fe,startDate:(0,ae.Yj)(),endDate:(0,ae.lq)((0,ae.Yj)()),startTime:(0,ae.Yj)(),endTime:(0,ae.lq)((0,ae.Yj)())})),ve=((0,ae.Ik)({...Te.schema,offerType:(0,ae.vP)(["event"]),trainingNeeded:(0,ae.zM)()}),(0,ae.Ik)({id:(0,ae.Yj)(),offerName:(0,ae.Yj)(),ngo:(0,ae.Yj)(),offerType:se,addresses:(0,ae.YO)(re),timeOfDays:(0,ae.YO)(ce),peri
1odicities:(0,ae.YO)(ue)})),Ne=(0,ae.YO)(ve);var Se=n(52255);const Me=()=>{const e=(0,o.c)(18),[t,n]=(0,c.useReducer)(N,S),[i,r]=function(e){const t=(0,o.c)(14),n=(0,u.U)(),a=(0,w.S)();let i;t[0]!==n.communityConfiguration.errorMessage.errorCodes?(i={method:"GET",responseStruct:Ne,errorCodes:n.communityConfiguration.errorMessage.errorCodes},t[0]=n.communityConfiguration.errorMessage.errorCodes,t[1]=i):i=t[1];const[r,l,s]=(0,oe.q)(i);let m,d,f;return t[2]!==n.communityConfiguration.general||t[3]!==l||t[4]!==a.jwtToken?(m=()=>{!async function(e,t,n){const o={headers:(0,E.d)(t),method:"GET"};await n(`${(0,L.y)(e)}/etb/offers/favourites`,o)}(n.communityConfiguration.general,a.jwtToken,l)},t[2]=n.communityConfiguration.general,t[3]=l,t[4]=a.jwtToken,t[5]=m):m=t[5],t[6]!==n.communityConfiguration.general||t[7]!==l||t[8]!==e||t[9]!==a.jwtToken?(d=[n.communityConfiguration.general,a.jwtToken,l,e],t[6]=n.communityConfiguration.general,t[7]=l,t[8]=e,t[9]=a.jwtToken,t[10]=d):d=t[10],(0,c.useEffect)(m,d),t[11]!==r||t[12]!==s?(f=[r,s],t[11]=r,t[12]=s,t[13]=f):f=t[13],f}(t.forceResetTrigger);let l,s,m,d,f,g,b;return e[0]!==i?(l=()=>{i&&n({type:"SET_FAVOURITE_OFFERS",favouriteOffers:i})},s=[i],e[0]=i,e[1]=l,e[2]=s):(l=e[1],s=e[2]),(0,c.useEffect)(l,s),e[3]!==r?(m=r&&(0,a.Y)(Se.h,{}),e[3]=r,e[4]=m):m=e[4],e[5]!==t.favouriteOffers?(d=(0,a.Y)(te,{favouriteOffers:t.favouriteOffers,dispatch:n}),e[5]=t.favouriteOffers,e[6]=d):d=e[6],e[7]!==t.actualFavourite||e[8]!==t.dialog?(f="DETAIL"===t.dialog&&t.actualFavourite&&(0,a.Y)(k,{id:t.actualFavourite.id,dispatch:n}),e[7]=t.actualFavourite,e[8]=t.dialog,e[9]=f):f=e[9],e[10]!==t.actualFavourite||e[11]!==t.dialog?(g="DELETE"===t.dialog&&t.actualFavourite&&(0,a.Y)(A,{actualFavourite:t.actualFavourite,dispatch:n}),e[10]=t.actualFavourite,e[11]=t.dialog,e[12]=g):g=e[12],e[13]!==m||e[14]!==d||e[15]!==f||e[16]!==g?(b=(0,a.FD)(a.FK,{children:[m,d,f,g]}),e[13]=m,e[14]=d,e[15]=f,e[16]=g,e[17]=b):b=e[17],b},Oe=(0,ae.Ik)({lang:(0,ae.Yj)(),title:(0,ae.Yj)(),description:(0,ae.Yj)(),boxTitle:(0,ae.Yj)(),boxDescription:(0,ae.Yj)()}),Ie=(0,ae.Ik)({email:(0,ae.Yj)(),firstName:(0,ae.lq)((0,ae.me)((0,ae.Yj)())),lastName:(0,ae.lq)((0,ae.me)((0,ae.Yj)()))}),we=(0,ae.Ik)({id:(0,ae.ai)(),name:(0,ae.Yj)(),link:(0,ae.Yj)(),email:(0,ae.Yj)(),phone:(0,ae.Yj)(),zip:(0,ae.Yj)(),street:(0,ae.Yj)(),houseNumber:(0,ae.Yj)(),isImage:(0,ae.zM)(),isBoxImage:(0,ae.zM)(),createdAt:(0,ae.Yj)(),updatedAt:(0,ae.Yj)(),langs:(0,ae.YO)(Oe),ngoAdmins:(0,ae.YO)(Ie)}),Ae=(0,ae.Ik)({email:(0,ae.lq)((0,ae.Yj)()),phone:(0,ae.lq)((0,ae.Yj)()),zip:(0,ae.lq)((0,ae.Yj)()),city:(0,ae.lq)((0,ae.Yj)()),street:(0,ae.lq)((0,ae.Yj)()),houseNumber:(0,ae.lq)((0,ae.Yj)()),door:(0,ae.lq)((0,ae.Yj)())}),Ye=(0,ae.Ik)({...we.schema,defaultOfferAddress:(0,ae.lq)(Ae)}),ke=(0,ae.YO)(Ye),De=(0,ae.YO)(we);function Pe(){const e=(0,o.c)(16),t=(0,u.U)();let n;e[0]!==t.communityConfiguration.general?(n=(0,L.y)(t.communityConfiguration.general),e[0]=t.communityConfiguration.general,e[1]=n):n=e[1];const a=n,i=(0,w.S)();let r;e[2]!==t.communityConfiguration.errorMessage.errorCodes?(r={method:"GET",responseStruct:ke,errorCodes:t.communityConfiguration.errorMessage.errorCodes},e[2]=t.communityConfiguration.errorMessage.errorCodes,e[3]=r):r=e[3];const[l,s,m]=(0,oe.q)(r);let d,f;e[4]!==s||e[5]!==i.jwtToken||e[6]!==i.userId||e[7]!==a?(d=()=>{const e={headers:(0,E.d)(i.jwtToken),method:"GET"};s(`${a}/etb/profiles/new_design/?user_id=${i.userId}`,e)},e[4]=s,e[5]=i.jwtToken,e[6]=i.userId,e[7]=a,e[8]=d):d=e[8],e[9]!==s||e[10]!==i||e[11]!==a?(f=[s,i,a],e[9]=s,e[10]=i,e[11]=a,e[12]=f):f=e[12],(0,c.useEffect)(d,f);const g=l?l[0]:l;let b;return e[13]!==m||e[14]!==g?(b=[m,g],e[13]=m,e[14]=g,e[15]=b):b=e[15],b}function xe(){const e=(0,o.c)(6),t=(0,u.U)(),[n,a]=(0,I.s)();let i,r;return e[0]!==t.communityConfiguration.errorMessage.errorCodes||e[1]!==n?(i={fetchState:n,method:"PUT",errorCodes:t.communityConfiguration.errorMessage.errorCodes,isModal:!0},e[0]=t.communityConfiguration.errorMessage.errorCodes,e[1]=n,e[2]=i):i=e[2],(0,M.h)(i),(0,O.s)(n,t.communityConfiguration.errorMessage.successMessage),e[3]!==a||e[4]!==n?(r=[a,n],e[3]=a,e[4]=n,e[5]=r):r=e[5],r}var Ue=n(76364),je=n(54944);function Fe(e,t,n,o,a){return o?t.communityConfiguration.errorMessage.errorCodes.find((e=>"413"===e.errorCode))?.message:a?"":(0,je.h)(e,t.communityConfiguration.general,n
1)}function Re(e,t,n){return`${(0,L.y)(e.communityConfiguration.general)}/etb/profiles/${t}/images/${n}?${(new Date).getTime()}`}const _e=(0,P.A)("img",{target:"eu1x6820"})({name:"1squi6r",styles:"max-width:33%"}),Be=e=>{const t=(0,o.c)(2),{imageUrl:n}=e;let i;return t[0]!==n?(i=(0,a.Y)("div",{className:"d-f jc-c m-t-sm m-b-sm",children:(0,a.Y)(_e,{alt:"",src:n})}),t[0]=n,t[1]=i):i=t[1],i};var Ge=n(43037);function ze(e){const t={cId:e.name,label:e.label??"",name:e.name,componentType:"text-area",numberOfRows:e.numberOfRows};return{value:e.value,textAreaConfig:t,dispatchValue:t=>{e.setter(t.target.value)}}}var qe=n(17196);function $e(e){return{uploadConfig:{cId:e.name,name:e.name,label:e.label,dragAndDropText:"Drag and Drop",dragAndDropTextHover:"Drop now!",browseFilesLabel:"Browse",uploadingStatusLabel:"Uploading...",antivirusScanFailedErrorMessage:"Antivirus Scan Failed",maxNumberOfFiles:1,maxNumberOfFilesErrorMessage:"Maximum number of files exceeded",allowedFileFormatsText:"Allowed File Formats",fileFormatErrorMessage:"File Format Error",maxSizeErrorMessage:"Maximum Size per File Error",optional:!1,extensions:["pdf","apng","bmp","gif","ico","jpeg","jpg","png","svg","tif","tiff","webp"],maxSize:1,componentType:"upload",minNumberOfFiles:1,mandatoryErrorMessage:"Mandatory",minNumberOfFilesErrorMessage:"Upload more files",deleteFileAltText:"Delete file",maxNumberOfFilesReachedTextHover:"Maximum number of files reached"},disabled:!1,value:{files:Ve(e)},uploadFiles:async t=>{e.setter(t),e.setError(!1)},removeFile:t=>{e.setter([]),e.setError(!1)},onFilesRejected(t){0!==t.length&&t[0].errors.find((e=>"file-too-large"===e.code))&&e.setError(!0)},onUploadStatusChange(e){}}}function Ve(e){return 0===e.value.length?[]:[{file:e.value[0],id:e.value[0].name,base64Data:""}]}var We=n(18514),He=n(2082),Xe=n(66936),Ke=n(76576);const Je=e=>{const t=(0,o.c)(391),{ngo:n,isDialog:i,doFetch:r,closeDialog:l}=e,s=(0,u.U)(),m=s.communityConfiguration.general,d=s.communityConfiguration.etbNgoConfig,f=s.communityConfiguration.etbOfferConfig,g=(0,w.S)();let b;t[0]!==n.langs?(b=n.langs.find(Ze),t[0]=n.langs,t[1]=b):b=t[1];const p=b;let h;t[2]!==n.langs?(h=n.langs.find(Qe),t[2]=n.langs,t[3]=h):h=t[3];const y=h,[E,T]=(0,c.useState)(!1),[v,N]=(0,c.useState)(!1),[S,M]=(0,c.useState)(!1),[O,I]=(0,c.useState)(n.name),[A,Y]=(0,c.useState)(n.link),[k,D]=(0,c.useState)(n.email),[P,x]=(0,c.useState)(n.phone),[U,j]=(0,c.useState)(n.zip),[F,R]=(0,c.useState)(n.street),[_,B]=(0,c.useState)(n.houseNumber),[G,z]=(0,c.useState)(p?.boxTitle??""),[q,$]=(0,c.useState)(p?.boxDescription??""),[V,W]=(0,c.useState)(y?.boxTitle??""),[H,X]=(0,c.useState)(y?.boxDescription??"");let K;t[4]===Symbol.for("react.memo_cache_sentinel")?(K=[],t[4]=K):K=t[4];const[J,Z]=(0,c.useState)(K),[Q,ee]=(0,c.useState)(p?.title??""),[te,ne]=(0,c.useState)(p?.description??""),[oe,ae]=(0,c.useState)(y?.title??""),[ie,re]=(0,c.useState)(y?.description??"");let le;t[5]===Symbol.for("react.memo_cache_sentinel")?(le=[],t[5]=le):le=t[5];const[se,ce]=(0,c.useState)(le),[ue,me]=(0,c.useState)(n?.defaultOfferAddress?.city??""),[de,fe]=(0,c.useState)(n?.defaultOfferAddress?.zip??""),[ge,be]=(0,c.useState)(n?.defaultOfferAddress?.street??""),[pe,he]=(0,c.useState)(n?.defaultOfferAddress?.houseNumber??""),[ye,Ce]=(0,c.useState)(n?.defaultOfferAddress?.door??""),[Le,Ee]=(0,c.useState)(n?.defaultOfferAddress?.email??""),[Te,ve]=(0,c.useState)(n?.defaultOfferAddress?.phone??"");let Ne;t[6]!==O||t[7]!==d.companyName?(Ne=(0,qe.p)("name",d.companyName,O,I),t[6]=O,t[7]=d.companyName,t[8]=Ne):Ne=t[8];const Se=Ne;let Me;t[9]!==A||t[10]!==d.companyUrl?(Me=(0,qe.p)("link",d.companyUrl,A,Y),t[9]=A,t[10]=d.companyUrl,t[11]=Me):Me=t[11];const Oe=Me;let Ie;t[12]!==k||t[13]!==d.companyEmailAddress?(Ie=(0,qe.p)("email",d.companyEmailAddress,k,D),t[12]=k,t[13]=d.companyEmailAddress,t[14]=Ie):Ie=t[14];const we=Ie;let Ae;t[15]!==d.companyPhoneNumber||t[16]!==P?(Ae=(0,qe.p)("phone",d.companyPhoneNumber,P,x),t[15]=d.companyPhoneNumber,t[16]=P,t[17]=Ae):Ae=t[17];const Ye=Ae;let ke;t[18]!==d.headquarterZipCode||t[19]!==U?(ke=(0,qe.p)("zip",d.headquarterZipCode,U,j),t[18]=d.headquarterZipCode,t[19]=U,t[20]=ke):ke=t[20];const De=ke;let Pe;t[21]!==d.headquarterStreet||t[22]!==F?(Pe=(0,qe.p)("street",d.headquarterStreet,F,R),t[21]=d.headquarterStreet,t[22]=F,t[23]=Pe):Pe=t[23];const xe=Pe;let _e;t[24]!==_||t[25]!==d.headquarterHouseNumber?(_e=(0,qe.p)("houseNumber",d.headquarterHouseNumber,_,B),t[24]=_,t[25]=d.headquarterHouseNumber,t[26]=_e):_e=t[26];const Ve=_e;let Je;t[27]!==G||t[28]!==d.boxTitleGerman?(Je=(0,qe.p)("boxTitleGerman",d.boxTitleGerman,G,z),t[27]=G,t[28]=d.boxTitleGerman,t[29]=Je):Je=t[29];const et=Je;let tt;t[30]!==q||t[31]!==d.boxTextGerman?(tt=ze({numberOfRows:7,name:"boxTextGerman",label:d.boxTextGerman,setter:$,value:q}),t[30]=q,t[31]=d.boxTextGerman,t[32]=tt):tt=t[32];const nt=tt;let ot;t[33]!==V||t[34]!==d.boxTitleEnglish?(ot=(0,qe.p)("boxTitleEnglish",d.boxTitleEnglish,V,W),t[33]=V,t[34]=d.boxTitleEnglish,t[35]=ot):ot=t[35];const at=ot;let it;t[36]!==H||t[37]!==d.boxTextEnglish?(it=ze({numberOfRows:7,name:"boxTextEnglish",label:d.boxTextEnglish,setter:X,value:H}),t[36]=H,t[37]=d.boxTextEnglish,t[38]=it):it=t[38];const rt=it;let lt;t[39]!==d.detailPageTitleGerman||t[40]!==Q?(lt=ze({numberOfRows:3,name:"titleGerman",label:d.detailPageTitleGerman,setter:ee,value:Q}),t[39]=d.detailPageTitleGerman,t[40]=Q,t[41]=lt):lt=t[41];const st=lt;let ct;t[42]!==d.detailPageTitleGerman||t[43]!==te?(ct=ze({numberOfRows:7,name:"textGerman",label:d.detailPageTitleGerman,setter:ne,value:te}),t[42]=d.detailPageTitleGerman,t[43]=te,t[44]=ct):ct=t[44];const ut=ct;let mt;
1t[45]!==d.detailPageTitleEnglish||t[46]!==oe?(mt=ze({numberOfRows:3,name:"titleEnglish",label:d.detailPageTitleEnglish,setter:ae,value:oe}),t[45]=d.detailPageTitleEnglish,t[46]=oe,t[47]=mt):mt=t[47];const dt=mt;let ft;t[48]!==d.detailPageTextEnglish||t[49]!==ie?(ft=ze({numberOfRows:7,name:"textEnglish",label:d.detailPageTextEnglish,setter:re,value:ie}),t[48]=d.detailPageTextEnglish,t[49]=ie,t[50]=ft):ft=t[50];const gt=ft;let bt;t[51]!==ue||t[52]!==f.cityLabel?(bt=(0,qe.p)("defaultOfferCity",f.cityLabel,ue,me),t[51]=ue,t[52]=f.cityLabel,t[53]=bt):bt=t[53];const pt=bt;let ht;t[54]!==de||t[55]!==f.zipCodeLabel?(ht=(0,qe.p)("defaultOfferZip",f.zipCodeLabel,de,fe),t[54]=de,t[55]=f.zipCodeLabel,t[56]=ht):ht=t[56];const yt=ht;let Ct;t[57]!==ge||t[58]!==f.streetLabel?(Ct=(0,qe.p)("defaultOfferStreet",f.streetLabel,ge,be),t[57]=ge,t[58]=f.streetLabel,t[59]=Ct):Ct=t[59];const Lt=Ct;let Et;t[60]!==pe||t[61]!==f.houseNumberLabel?(Et=(0,qe.p)("defaultOfferHouseNumber",f.houseNumberLabel,pe,he),t[60]=pe,t[61]=f.houseNumberLabel,t[62]=Et):Et=t[62];const Tt=Et;let vt;t[63]!==ye||t[64]!==f.doorNumberLabel?(vt=(0,qe.p)("defaultOfferDoor",f.doorNumberLabel,ye,Ce),t[63]=ye,t[64]=f.doorNumberLabel,t[65]=vt):vt=t[65];const Nt=vt;let St;t[66]!==Le||t[67]!==f.emailLabel?(St=(0,qe.p)("defaultOfferEmail",f.emailLabel,Le,Ee),t[66]=Le,t[67]=f.emailLabel,t[68]=St):St=t[68];const Mt=St;let Ot;t[69]!==Te||t[70]!==f.phoneLabel?(Ot=(0,qe.p)("defaultOfferPhone",f.phoneLabel,Te,ve),t[69]=Te,t[70]=f.phoneLabel,t[71]=Ot):Ot=t[71];const It=Ot;let wt;t[72]!==J||t[73]!==d.boxImage?(wt=$e({name:"boxImage",label:d.boxImage,setter:Z,setError:N,value:J}),t[72]=J,t[73]=d.boxImage,t[74]=wt):wt=t[74];const At=wt;let Yt;t[75]!==se||t[76]!==d.detailPageImage?(Yt=$e({name:"detailImage",label:d.detailPageImage,setter:ce,setError:M,value:se}),t[75]=se,t[76]=d.detailPageImage,t[77]=Yt):Yt=t[77];const kt=Yt;let Dt;t[78]!==J||t[79]!==H||t[80]!==q||t[81]!==V||t[82]!==G||t[83]!==ue||t[84]!==ye||t[85]!==Le||t[86]!==pe||t[87]!==Te||t[88]!==ge||t[89]!==de||t[90]!==se||t[91]!==r||t[92]!==k||t[93]!==m||t[94]!==_||t[95]!==A||t[96]!==g||t[97]!==O||t[98]!==n.id||t[99]!==n.isBoxImage||t[100]!==n.isImage||t[101]!==P||t[102]!==F||t[103]!==ie||t[104]!==te||t[105]!==oe||t[106]!==Q||t[107]!==U?(Dt=async()=>{T(!0);const e=function(e){const{boxImage:t,detailImage:n,name:o,link:a,email:i,phone:r,zip:l,street:s,houseNumber:c,boxTitleGerman:u,boxTextGerman:m,titleGerman:d,textGerman:f,boxTitleEnglish:g,boxTextEnglish:b,titleEnglish:p,textEnglish:h,defaultOfferHouseNumber:y,defaultOfferCity:C,defaultOfferDoor:L,defaultOfferPhone:E,defaultOfferEmail:T,defaultOfferZip:v,defaultOfferStreet:N,isBoxImage:S,isDetailImage:M}=e;if(!(o&&a&&i&&r&&l&&s&&c&&u&&m&&d&&f&&g&&b&&p&&h))return;if(!S&&0===t?.length)return;if(!M&&0===n?.length)return;const O=new FormData;O.append("name",o),O.append("link",a),O.append("email",i),O.append("phone",r),O.append("street",s),O.append("zip",l),O.append("houseNumber",c);const I={lang:"de",title:d,description:f,boxTitle:u,boxDescription:m},w={lang:"en",title:p,description:h,boxTitle:g,boxDescription:b};return O.append("emailDefault",T??""),O.append("phoneDefault",E??""),O.append("zipDefault",v??""),O.append("cityDefault",C??""),O.append("streetDefault",N??""),O.append("houseNumberDefault",y??""),O.append("doorDefault",L??""),O.append("langs",JSON.stringify([I,w])),n&&n.length>0&&O.append("image",n[0]),t&&t.length>0&&O.append("boxImage",t[0]),O}({detailImage:se,boxImage:J,name:O,link:A,email:k,phone:P,zip:U,street:F,houseNumber:_,boxTitleGerman:G,boxTextGerman:q,boxTitleEnglish:V,boxTextEnglish:H,titleGerman:Q,textGerman:te,titleEnglish:oe,textEnglish:ie,defaultOfferCity:ue,defaultOfferZip:de,defaultOfferStreet:ge,defaultOfferHouseNumber:pe,defaultOfferDoor:ye,defaultOfferEmail:Le,defaultOfferPhone:Te,isDetailImage:n.isImage,isBoxImage:n.isBoxImage});e&&await async function(e,t,n,o,a){const i={headers:{Authorization:`Bearer ${t}`},method:"PUT",body:n};await a(`${(0,L.y)(e)}/etb/profiles/${o}/new_design`,i)}(m,g.jwtToken,e,n.id,r)},t[78]=J,t[79]=H,t[80]=q,t[81]=V,t[82]=G,t[83]=ue,t[84]=ye,t[85]=Le,t[86]=pe,t[87]=Te,t[88]=ge,t[89]=de,t[90]=se,t[91]=r,t[92]=k,t[93]=m,t[94]=_,t[95]=A,t[96]=g,t[97]=O,t[98]=n.id,t[99]=n.isBoxImage,t[100]=n.isImage,t[101]=P,t[102]=F,t[103]=ie,t[104]=te,t[105]=oe,t[106]=Q,t[107]=U,t[108]=Dt):Dt=t[108];const Pt=Dt,xt=s.communityConfiguration.userProfile.optionalFieldLabel??"";let Ut,jt,Ft,Rt,_t,Bt,Gt,zt,qt,$t,Vt,Wt,Ht,Xt,Kt,Jt,Zt,Qt,en,tn,nn,on,an,rn,ln,sn,cn,un,mn,dn,fn,gn,bn,pn,hn,yn,Cn,Ln,En,Tn,vn,Nn,Sn,Mn,On,In,wn,An,Yn,kn,Dn,Pn,xn,Un,jn,Fn,Rn,_n,Bn,Gn,zn,qn,$n,Vn,Wn,Hn,Xn,Kn,Jn,Zn,Qn,eo,to,no,oo,ao,io;t[109]!==m||t[110]!==O||t[111]!==d.companyName||t[112]!==E?(Ut=(0,Ge.s)({name:"name",label:d.companyName,errorMessage:(0,je.h)(E,m,O)}),t[109]=m,t[110]=O,t[111]=d.companyName,t[112]=E,t[113]=Ut):Ut=t[113],t[114]!==Se?(jt=(0,a.Y)(Xe.p,{...Se}),t[114]=Se,t[115]=jt):jt=t[115],t[116]!==Ut||t[117]!==jt?(Ft=(0,a.Y)(We.E,{...Ut,children:jt}),t[116]=Ut,t[117]=jt,t[118]=Ft):Ft=t[118],t[119]!==m||t[120]!==A||t[121]!==d.companyUrl||t[122]!==E?(Rt=(0,Ge.s)({name:"link",label:d.companyUrl,errorMessage:(0,je.h)(E,m,A)}),t[119]=m,t[120]=A,t[121]=d.companyUrl,t[122]=E,t[123]=Rt):Rt=t[123],t[124]!==Oe?(_t=(0,a.Y)(Xe.p,{...Oe}),t[124]=Oe,t[125]=_t):_t=t[125],t[126]!==Rt||t[127]!==_t?(Bt=(0,a.Y)(We.E,{...Rt,children:_t}),t[126]=Rt,t[127]=_t,t[128]=Bt):Bt=t[128],t[129]!==k||t[130]!==m||t[131]!==d.companyEmailAddress||t[132]!==E?(Gt=(0,Ge.s)({name:"email",label:d.companyEmailAddress,errorMessage:(0,je.h)(E,m,k)}
1),t[129]=k,t[130]=m,t[131]=d.companyEmailAddress,t[132]=E,t[133]=Gt):Gt=t[133],t[134]!==we?(zt=(0,a.Y)(Xe.p,{...we}),t[134]=we,t[135]=zt):zt=t[135],t[136]!==Gt||t[137]!==zt?(qt=(0,a.Y)(We.E,{...Gt,children:zt}),t[136]=Gt,t[137]=zt,t[138]=qt):qt=t[138],t[139]!==m||t[140]!==d.companyPhoneNumber||t[141]!==P||t[142]!==E?($t=(0,Ge.s)({name:"phone",label:d.companyPhoneNumber,errorMessage:(0,je.h)(E,m,P)}),t[139]=m,t[140]=d.companyPhoneNumber,t[141]=P,t[142]=E,t[143]=$t):$t=t[143],t[144]!==Ye?(Vt=(0,a.Y)(Xe.p,{...Ye}),t[144]=Ye,t[145]=Vt):Vt=t[145],t[146]!==$t||t[147]!==Vt?(Wt=(0,a.Y)(We.E,{...$t,children:Vt}),t[146]=$t,t[147]=Vt,t[148]=Wt):Wt=t[148],t[149]!==m||t[150]!==d.headquarterZipCode||t[151]!==E||t[152]!==U?(Ht=(0,Ge.s)({name:"zip",label:d.headquarterZipCode,errorMessage:(0,je.h)(E,m,U)}),t[149]=m,t[150]=d.headquarterZipCode,t[151]=E,t[152]=U,t[153]=Ht):Ht=t[153],t[154]!==De?(Xt=(0,a.Y)(Xe.p,{...De}),t[154]=De,t[155]=Xt):Xt=t[155],t[156]!==Ht||t[157]!==Xt?(Kt=(0,a.Y)(We.E,{...Ht,children:Xt}),t[156]=Ht,t[157]=Xt,t[158]=Kt):Kt=t[158],t[159]!==m||t[160]!==d.headquarterStreet||t[161]!==E||t[162]!==F?(Jt=(0,Ge.s)({name:"street",label:d.headquarterStreet,errorMessage:(0,je.h)(E,m,F)}),t[159]=m,t[160]=d.headquarterStreet,t[161]=E,t[162]=F,t[163]=Jt):Jt=t[163],t[164]!==xe?(Zt=(0,a.Y)(Xe.p,{...xe}),t[164]=xe,t[165]=Zt):Zt=t[165],t[166]!==Jt||t[167]!==Zt?(Qt=(0,a.Y)(We.E,{...Jt,children:Zt}),t[166]=Jt,t[167]=Zt,t[168]=Qt):Qt=t[168],t[169]!==m||t[170]!==_||t[171]!==d.headquarterHouseNumber||t[172]!==E?(en=(0,Ge.s)({name:"houseNumber",label:d.headquarterHouseNumber,errorMessage:(0,je.h)(E,m,_)}),t[169]=m,t[170]=_,t[171]=d.headquarterHouseNumber,t[172]=E,t[173]=en):en=t[173],t[174]!==Ve?(tn=(0,a.Y)(Xe.p,{...Ve}),t[174]=Ve,t[175]=tn):tn=t[175],t[176]!==en||t[177]!==tn?(nn=(0,a.Y)(We.E,{...en,children:tn}),t[176]=en,t[177]=tn,t[178]=nn):nn=t[178],t[179]!==G||t[180]!==m||t[181]!==d.boxTitleGerman||t[182]!==E?(on=(0,Ge.s)({name:"boxTitleGerman",label:d.boxTitleGerman,errorMessage:(0,je.h)(E,m,G)}),t[179]=G,t[180]=m,t[181]=d.boxTitleGerman,t[182]=E,t[183]=on):on=t[183],t[184]!==et?(an=(0,a.Y)(Xe.p,{...et}),t[184]=et,t[185]=an):an=t[185],t[186]!==on||t[187]!==an?(rn=(0,a.Y)(We.E,{...on,children:an}),t[186]=on,t[187]=an,t[188]=rn):rn=t[188],t[189]!==q||t[190]!==m||t[191]!==d.boxTextGerman||t[192]!==E?(ln=(0,Ge.s)({name:"boxTextGerman",label:d.boxTextGerman,errorMessage:(0,je.h)(E,m,q)}),t[189]=q,t[190]=m,t[191]=d.boxTextGerman,t[192]=E,t[193]=ln):ln=t[193],t[194]!==nt?(sn=(0,a.Y)(He.N,{...nt}),t[194]=nt,t[195]=sn):sn=t[195],t[196]!==ln||t[197]!==sn?(cn=(0,a.Y)(We.E,{...ln,children:sn}),t[196]=ln,t[197]=sn,t[198]=cn):cn=t[198],t[199]!==V||t[200]!==m||t[201]!==d.boxTitleEnglish||t[202]!==E?(un=(0,Ge.s)({name:"boxTitleEnglish",label:d.boxTitleEnglish,errorMessage:(0,je.h)(E,m,V)}),t[199]=V,t[200]=m,t[201]=d.boxTitleEnglish,t[202]=E,t[203]=un):un=t[203],t[204]!==at?(mn=(0,a.Y)(Xe.p,{...at}),t[204]=at,t[205]=mn):mn=t[205],t[206]!==un||t[207]!==mn?(dn=(0,a.Y)(We.E,{...un,children:mn}),t[206]=un,t[207]=mn,t[208]=dn):dn=t[208],t[209]!==H||t[210]!==m||t[211]!==d.boxTextEnglish||t[212]!==E?(fn=(0,Ge.s)({name:"boxTextEnglish",label:d.boxTextEnglish,errorMessage:(0,je.h)(E,m,H)}),t[209]=H,t[210]=m,t[211]=d.boxTextEnglish,t[212]=E,t[213]=fn):fn=t[213],t[214]!==rt?(gn=(0,a.Y)(He.N,{...rt}),t[214]=rt,t[215]=gn):gn=t[215],t[216]!==fn||t[217]!==gn?(bn=(0,a.Y)(We.E,{...fn,children:gn}),t[216]=fn,t[217]=gn,t[218]=bn):bn=t[218],t[219]!==J||t[220]!==v||t[221]!==s||t[222]!==n.isBoxImage||t[223]!==d.boxImage||t[224]!==E?(pn=(0,Ge.s)({name:"boxImage",fieldLabelPosition:"ABOVE",label:d.boxImage,optional:n.isBoxImage,errorMessage:Fe(E,s,J,v,n.isBoxImage)}),t[219]=J,t[220]=v,t[221]=s,t[222]=n.isBoxImage,t[223]=d.boxImage,t[224]=E,t[225]=pn):pn=t[225],t[226]!==At?(hn=(0,a.Y)(Ke.S,{...At}),t[226]=At,t[227]=hn):hn=t[227],t[228]!==s||t[229]!==n.id||t[230]!==n.isBoxImage?(yn=n.isBoxImage&&Boolean(n.id)&&(0,a.Y)(Be,{imageUrl:Re(s,n.id,"box_image")}),t[228]=s,t[229]=n.id,t[230]=n.isBoxImage,t[231]=yn):yn=t[231],t[232]!==pn||t[233]!==hn||t[234]!==yn?(Cn=(0,a.FD)(We.E,{...pn,children:[hn,yn]}),t[232]=pn,t[233]=hn,t[234]=yn,t[235]=Cn):Cn=t[235],t[236]!==m||t[237]!==d.detailPageTitleGerman||t[238]!==E||t[239]!==Q?(Ln=(0,Ge.s)({name:"textTitleGerman",label:d.detailPageTitleGerman,errorMessage:(0,je.h)(E,m,Q)}),t[236]=m,t[237]=d.detailPageTitleGerman,t[238]=E,t[239]=Q,t[240]=Ln):Ln=t[240],t[241]!==st?(En=(0,a.Y)(He.N,{...st}),t[241]=st,t[242]=En):En=t[242],t[243]!==Ln||t[244]!==En?(Tn=(0,a.Y)(We.E,{...Ln,children:En}),t[243]=Ln,t[244]=En,t[245]=Tn):Tn=t[245],t[246]!==m||t[247]!==d.detailPageTextGerman||t[248]!==E||t[249]!==te?(vn=(0,Ge.s)({name:"textGerman",label:d.detailPageTextGerman,errorMessage:(0,je.h)(E,m,te)}),t[246]=m,t[247]=d.detailPageTextGerman,t[248]=E,t[249]=te,t[250]=vn):vn=t[250],t[251]!==ut?(Nn=(0,a.Y)(He.N,{...ut}),t[251]=ut,t[252]=Nn):Nn=t[252],t[253]!==vn||t[254]!==Nn?(Sn=(0,a.Y)(We.E,{...vn,children:Nn}
1),t[253]=vn,t[254]=Nn,t[255]=Sn):Sn=t[255],t[256]!==m||t[257]!==d.detailPageTitleEnglish||t[258]!==E||t[259]!==oe?(Mn=(0,Ge.s)({name:"textTitleEnglish",label:d.detailPageTitleEnglish,errorMessage:(0,je.h)(E,m,oe)}),t[256]=m,t[257]=d.detailPageTitleEnglish,t[258]=E,t[259]=oe,t[260]=Mn):Mn=t[260],t[261]!==dt?(On=(0,a.Y)(He.N,{...dt}),t[261]=dt,t[262]=On):On=t[262],t[263]!==Mn||t[264]!==On?(In=(0,a.Y)(We.E,{...Mn,children:On}),t[263]=Mn,t[264]=On,t[265]=In):In=t[265],t[266]!==m||t[267]!==d.detailPageTextGerman||t[268]!==E||t[269]!==ie?(wn=(0,Ge.s)({name:"textEnglish",label:d.detailPageTextGerman,errorMessage:(0,je.h)(E,m,ie)}),t[266]=m,t[267]=d.detailPageTextGerman,t[268]=E,t[269]=ie,t[270]=wn):wn=t[270],t[271]!==gt?(An=(0,a.Y)(He.N,{...gt}),t[271]=gt,t[272]=An):An=t[272],t[273]!==wn||t[274]!==An?(Yn=(0,a.Y)(We.E,{...wn,children:An}),t[273]=wn,t[274]=An,t[275]=Yn):Yn=t[275],t[276]!==s||t[277]!==se||t[278]!==S||t[279]!==n.isImage||t[280]!==d.detailPageImage||t[281]!==E?(kn=(0,Ge.s)({name:"detailImage",fieldLabelPosition:"ABOVE",label:d.detailPageImage,errorMessage:Fe(E,s,se,S,n.isImage)}),t[276]=s,t[277]=se,t[278]=S,t[279]=n.isImage,t[280]=d.detailPageImage,t[281]=E,t[282]=kn):kn=t[282],t[283]!==kt?(Dn=(0,a.Y)(Ke.S,{...kt}),t[283]=kt,t[284]=Dn):Dn=t[284],t[285]!==s||t[286]!==n.id||t[287]!==n.isImage?(Pn=n.isImage&&Boolean(n.id)&&(0,a.Y)(Be,{imageUrl:Re(s,n.id,"image")}),t[285]=s,t[286]=n.id,t[287]=n.isImage,t[288]=Pn):Pn=t[288],t[289]!==kn||t[290]!==Dn||t[291]!==Pn?(xn=(0,a.FD)(We.E,{...kn,children:[Dn,Pn]}),t[289]=kn,t[290]=Dn,t[291]=Pn,t[292]=xn):xn=t[292],t[293]!==f.defaultOfferButtonLabel?(Un=(0,a.Y)("h3",{className:"m-b-xs",children:f.defaultOfferButtonLabel}),t[293]=f.defaultOfferButtonLabel,t[294]=Un):Un=t[294],t[295]!==f.defaultOfferDescriptionLabel?(jn=(0,a.Y)("p",{className:"m-t-xs",children:f.defaultOfferDescriptionLabel}),t[295]=f.defaultOfferDescriptionLabel,t[296]=jn):jn=t[296],t[297]!==f.cityLabel||t[298]!==xt?(Fn=(0,Ge.s)({optionalLabel:xt,optional:!0,name:"defaultOfferCity",label:f.cityLabel}),t[297]=f.cityLabel,t[298]=xt,t[299]=Fn):Fn=t[299],t[300]!==pt?(Rn=(0,a.Y)(Xe.p,{...pt}),t[300]=pt,t[301]=Rn):Rn=t[301],t[302]!==Fn||t[303]!==Rn?(_n=(0,a.Y)(We.E,{...Fn,children:Rn}),t[302]=Fn,t[303]=Rn,t[304]=_n):_n=t[304],t[305]!==f.zipCodeLabel||t[306]!==xt?(Bn=(0,Ge.s)({optionalLabel:xt,optional:!0,name:"defaultOfferZip",label:f.zipCodeLabel}),t[305]=f.zipCodeLabel,t[306]=xt,t[307]=Bn):Bn=t[307],t[308]!==yt?(Gn=(0,a.Y)(Xe.p,{...yt}),t[308]=yt,t[309]=Gn):Gn=t[309],t[310]!==Bn||t[311]!==Gn?(zn=(0,a.Y)(We.E,{...Bn,children:Gn}),t[310]=Bn,t[311]=Gn,t[312]=zn):zn=t[312],t[313]!==f.streetLabel||t[314]!==xt?(qn=(0,Ge.s)({optionalLabel:xt,optional:!0,name:"defaultOfferStreet",label:f.streetLabel}),t[313]=f.streetLabel,t[314]=xt,t[315]=qn):qn=t[315],t[316]!==Lt?($n=(0,a.Y)(Xe.p,{...Lt}),t[316]=Lt,t[317]=$n):$n=t[317],t[318]!==qn||t[319]!==$n?(Vn=(0,a.Y)(We.E,{...qn,children:$n}),t[318]=qn,t[319]=$n,t[320]=Vn):Vn=t[320],t[321]!==f.houseNumberLabel||t[322]!==xt?(Wn=(0,Ge.s)({optionalLabel:xt,optional:!0,name:"defaultOfferHouseNumber",label:f.houseNumberLabel}),t[321]=f.houseNumberLabel,t[322]=xt,t[323]=Wn):Wn=t[323],t[324]!==Tt?(Hn=(0,a.Y)(Xe.p,{...Tt}),t[324]=Tt,t[325]=Hn):Hn=t[325],t[326]!==Wn||t[327]!==Hn?(Xn=(0,a.Y)(We.E,{...Wn,children:Hn}),t[326]=Wn,t[327]=Hn,t[328]=Xn):Xn=t[328],t[329]!==f.doorNumberLabel||t[330]!==xt?(Kn=(0,Ge.s)({optionalLabel:xt,optional:!0,name:"defaultOfferDoor",label:f.doorNumberLabel}),t[329]=f.doorNumberLabel,t[330]=xt,t[331]=Kn):Kn=t[331],t[332]!==Nt?(Jn=(0,a.Y)(Xe.p,{...Nt}),t[332]=Nt,t[333]=Jn):Jn=t[333],t[334]!==Kn||t[335]!==Jn?(Zn=(0,a.Y)(We.E,{...Kn,children:Jn}),t[334]=Kn,t[335]=Jn,t[336]=Zn):Zn=t[336],t[337]!==f.emailLabel||t[338]!==xt?(Qn=(0,Ge.s)({optionalLabel:xt,optional:!0,name:"defaultOfferEmail",label:f.emailLabel}),t[337]=f.emailLabel,t[338]=xt,t[339]=Qn):Qn=t[339],t[340]!==Mt?(eo=(0,a.Y)(Xe.p,{...Mt}),t[340]=Mt,t[341]=eo):eo=t[341],t[342]!==Qn||t[343]!==eo?(to=(0,a.Y)(We.E,{...Qn,children:eo}),t[342]=Qn,t[343]=eo,t[344]=to):to=t[344],t[345]!==f.phoneLabel||t[346]!==xt?(no=(0,Ge.s)({optionalLabel:xt,optional:!0,name:"defaultOfferPhone",label:f.phoneLabel}),t[345]=f.phoneLabel,t[346]=xt,t[347]=no):no=t[347],t[348]!==It?(oo=(0,a.Y)(Xe.p,{...It}),t[348]=It,t[349]=oo):oo=t[349],t[350]!==no||t[351]!==oo?(ao=(0,a.Y)(We.E,{...no,children:oo}),t[350]=no,t[351]=oo,t[352]=ao):ao=t[352],t[353]!==to||t[354]!==ao||t[355]!==Ft||t[356]!==Bt||t[357]!==qt||t[358]!==Wt||t[359]!==Kt||t[360]!==Qt||t[361]!==nn||t[362]!==rn||t[363]!==cn||t[364]!==dn||t[365]!==bn||t[366]!==Cn||t[367]!==Tn||t[368]!==Sn||t[369]!==In||t[370]!==Yn||t[371]!==xn||t[372]!==Un||t[373]!==jn||t[374]!==_n||t[375]!==zn||t[376]!==Vn||t[377]!==Xn||t[378]!==Zn?(io=(0,a.FD)(a.FK,{children:[Ft,Bt,qt,Wt,Kt,Qt,nn,rn,cn,dn,bn,Cn,Tn,Sn,In,Yn,xn,Un,jn,_n,zn,Vn,
1Xn,Zn,to,ao]}),t[353]=to,t[354]=ao,t[355]=Ft,t[356]=Bt,t[357]=qt,t[358]=Wt,t[359]=Kt,t[360]=Qt,t[361]=nn,t[362]=rn,t[363]=cn,t[364]=dn,t[365]=bn,t[366]=Cn,t[367]=Tn,t[368]=Sn,t[369]=In,t[370]=Yn,t[371]=xn,t[372]=Un,t[373]=jn,t[374]=_n,t[375]=zn,t[376]=Vn,t[377]=Xn,t[378]=Zn,t[379]=io):io=t[379];const ro=io;if(i){let e;return t[380]!==l||t[381]!==Pt||t[382]!==ro||t[383]!==m.cancelButtonLabel||t[384]!==m.saveButtonLabel||t[385]!==d.editNgoLabel?(e=(0,a.Y)(C.l,{type:"FORM",title:d.editNgoLabel,cancelClick:l,cancelText:m.cancelButtonLabel,confirmText:m.saveButtonLabel,confirmClick:Pt,children:ro}),t[380]=l,t[381]=Pt,t[382]=ro,t[383]=m.cancelButtonLabel,t[384]=m.saveButtonLabel,t[385]=d.editNgoLabel,t[386]=e):e=t[386],e}let lo;return t[387]!==Pt||t[388]!==ro||t[389]!==m.saveButtonLabel?(lo=(0,a.Y)(Ue.s,{confirmText:m.saveButtonLabel,confirmClick:Pt,children:ro}),t[387]=Pt,t[388]=ro,t[389]=m.saveButtonLabel,t[390]=lo):lo=t[390],lo};function Ze(e){return"de"===e.lang}function Qe(e){return"en"===e.lang}const et=()=>{const e=(0,o.c)(8),[t,n]=Pe(),[i]=xe();let r,l,s;return e[0]!==t?(r=t&&(0,a.Y)(Se.h,{}),e[0]=t,e[1]=r):r=e[1],e[2]!==i||e[3]!==n?(l=n&&(0,a.Y)(Je,{ngo:n,isDialog:!1,doFetch:i}),e[2]=i,e[3]=n,e[4]=l):l=e[4],e[5]!==r||e[6]!==l?(s=(0,a.FD)(a.FK,{children:[r,l]}),e[5]=r,e[6]=l,e[7]=s):s=e[7],s};function tt(e){return{type:"SET_DIALOG",dialog:e}}function nt(e,t){switch(t.type){case"SET_NGOS":return{...e,ngos:t.ngos};case"RESET_TABLE":return{...e,forceResetTrigger:(0,T.k)()};case"SET_DIALOG":return{...e,dialog:t.dialog};case"SET_ACTUAL_NGO":return{...e,actualNgo:t.ngo};default:return e}}const ot={ngos:[]},at=e=>{const t=(0,o.c)(33),{dispatch:n}=e,i=(0,u.U)(),r=(0,w.S)(),l=i.communityConfiguration.general,[s,m]=(0,c.useState)(""),[d,f]=(0,c.useState)(),[g,b]=function(){const e=(0,o.c)(6),t=(0,u.U)(),[n,a]=(0,I.s)();let i,r;return e[0]!==t.communityConfiguration.errorMessage.errorCodes||e[1]!==n?(i={fetchState:n,method:"POST",errorCodes:t.communityConfiguration.errorMessage.errorCodes,isModal:!0},e[0]=t.communityConfiguration.errorMessage.errorCodes,e[1]=n,e[2]=i):i=e[2],(0,M.h)(i),(0,O.s)(n,t.communityConfiguration.errorMessage.successMessage),e[3]!==a||e[4]!==n?(r=[a,n],e[3]=a,e[4]=n,e[5]=r):r=e[5],r}();let p;t[0]!==i.communityConfiguration.general||t[1]!==g||t[2]!==l.requiredFieldMessage||t[3]!==r||t[4]!==s?(p=async()=>{s?await async function(e,t,n,o){const a={headers:(0,E.d)(t),method:"POST",body:JSON.stringify({name:n})};await o(`${(0,L.y)(e)}/etb/profiles/new_design`,a)}(i.communityConfiguration.general,r.jwtToken,s,g):f({fromConfig:l.requiredFieldMessage})},t[0]=i.communityConfiguration.general,t[1]=g,t[2]=l.requiredFieldMessage,t[3]=r,t[4]=s,t[5]=p):p=t[5];const h=p;let y;t[6]!==n||t[7]!==b.rawResponse?.ok?(y=()=>{b.rawResponse?.ok&&(n(tt()),n({type:"RESET_TABLE"}))},t[6]=n,t[7]=b.rawResponse?.ok,t[8]=y):y=t[8];const T=b.rawResponse?.ok;let v,N;t[9]!==n||t[10]!==T?(v=[n,T],t[9]=n,t[10]=T,t[11]=v):v=t[11],(0,c.useEffect)(y,v),t[12]!==n?(N=()=>{n(tt())},t[12]=n,t[13]=N):N=t[13];const S=N;let A,Y,k;t[14]!==s.length?(A=()=>{s.length>0&&f(void 0)},t[14]=s.length,t[15]=A):A=t[15],t[16]!==s?(Y=[s],t[16]=s,t[17]=Y):Y=t[17],(0,c.useEffect)(A,Y),t[18]!==s?(k={placeholder:"",value:s,description:"",name:"ngoName",cId:"ngoName",dispatchValue(e){m(e.target.value)}},t[18]=s,t[19]=k):k=t[19];const D=k;let P,x,U;return t[20]!==D?(P=(0,a.Y)(Xe.p,{...D}),t[20]=D,t[21]=P):P=t[21],t[22]!==i.communityConfiguration.etbNgoConfig.companyName||t[23]!==d||t[24]!==P?(x=(0,a.Y)(We.E,{label:i.communityConfiguration.etbNgoConfig.companyName,cId:"ngoName",optionalLabel:"",error:d,fieldLabelPosition:"LEFT",labelWidth:"WIDTH_5",testId:"ngoName",warning:void 0,info:void 0,children:P}),t[22]=i.communityConfiguration.etbNgoConfig.companyName,t[23]=d,t[24]=P,t[25]=x):x=t[25],t[26]!==i.communityConfiguration.etbNgoConfig.addNewNgoLabel||t[27]!==l.cancelButtonLabel||t[28]!==l.saveButtonLabel||t[29]!==S||t[30]!==h||t[31]!==x?(U=(0,a.Y)(C.l,{type:"FORM",title:i.communityConfiguration.etbNgoConfig.addNewNgoLabel,cancelClick:S,cancelText:l.cancelButtonLabel,confirmText:l.saveButtonLabel,confirmClick:h,children:x}),t[26]=i.communityConfiguration.etbNgoConfig.addNewNgoLabel,t[27]=l.cancelButtonLabel,t[28]=l.saveButtonLabel,t[29]=S,t[30]=h,t[31]=x,t[32]=U):U=t[32],U},it=e=>{const t=(0,o.c)(17),{ngoId:n,dispatch:i,closeDialog:r}=e,l=(0,u.U)(),s=l.communityConfiguration.general,[m,d]=function(e){const t=(0,o.c)(17),n=(0,u.U
1)();let a;t[0]!==n.communityConfiguration.general?(a=(0,L.y)(n.communityConfiguration.general),t[0]=n.communityConfiguration.general,t[1]=a):a=t[1];const i=a,r=(0,w.S)();let l;t[2]!==n.communityConfiguration.errorMessage.errorCodes?(l={method:"GET",responseStruct:Ye,errorCodes:n.communityConfiguration.errorMessage.errorCodes,isModal:!0},t[2]=n.communityConfiguration.errorMessage.errorCodes,t[3]=l):l=t[3];const[s,m,d]=(0,oe.q)(l);let f,g,b;return t[4]!==m||t[5]!==r.jwtToken||t[6]!==e||t[7]!==i?(f=()=>{const t={headers:(0,E.d)(r.jwtToken),method:"GET"};m(`${i}/etb/profiles/${e}/new_design`,t)},t[4]=m,t[5]=r.jwtToken,t[6]=e,t[7]=i,t[8]=f):f=t[8],t[9]!==m||t[10]!==r||t[11]!==e||t[12]!==i?(g=[m,r,e,i],t[9]=m,t[10]=r,t[11]=e,t[12]=i,t[13]=g):g=t[13],(0,c.useEffect)(f,g),t[14]!==s||t[15]!==d?(b=[d,s],t[14]=s,t[15]=d,t[16]=b):b=t[16],b}(n),[f,g]=xe();let b,p,h,y,T;return t[0]!==r||t[1]!==i||t[2]!==g.response?(b=()=>{g.response&&(i({type:"RESET_TABLE"}),r())},p=[r,i,g.response],t[0]=r,t[1]=i,t[2]=g.response,t[3]=b,t[4]=p):(b=t[3],p=t[4]),(0,c.useEffect)(b,p),t[5]!==m?(h=m&&(0,a.Y)(Se.h,{}),t[5]=m,t[6]=h):h=t[6],t[7]!==r||t[8]!==f||t[9]!==d?(y=d&&(0,a.Y)(Je,{ngo:d,isDialog:!0,doFetch:f,closeDialog:r}),t[7]=r,t[8]=f,t[9]=d,t[10]=y):y=t[10],t[11]!==l.communityConfiguration.etbNgoConfig.editNgoLabel||t[12]!==s.cancelButtonLabel||t[13]!==s.saveButtonLabel||t[14]!==h||t[15]!==y?(T=(0,a.FD)(C.l,{type:"FORM",title:l.communityConfiguration.etbNgoConfig.editNgoLabel,cancelClick:rt,cancelText:s.cancelButtonLabel,confirmText:s.saveButtonLabel,confirmClick:lt,children:[h,y]}),t[11]=l.communityConfiguration.etbNgoConfig.editNgoLabel,t[12]=s.cancelButtonLabel,t[13]=s.saveButtonLabel,t[14]=h,t[15]=y,t[16]=T):T=t[16],T};function rt(){}function lt(){}const st=e=>{const t=(0,o.c)(6),{dispatch:n,ngo:i,config:r}=e;let l;t[0]!==n||t[1]!==i?(l=e=>()=>{n(tt(e)),n(function(e){return{type:"SET_ACTUAL_NGO",ngo:e}}(i))},t[0]=n,t[1]=i,t[2]=l):l=t[2];const s=l;let c;if(t[3]!==r||t[4]!==s){const e=[{label:e=>(0,a.Y)(z,{handleClick:s("EDIT"),label:r.communityConfiguration.etbNgoConfig.editNgoLabel,optionProps:e}),value:"editNGO"},{label:e=>(0,a.Y)(z,{handleClick:s("DELETE"),label:r.communityConfiguration.etbNgoConfig.deleteNgoLabel,optionProps:e}),value:"deleteNGO"}];c=(0,a.Y)(W,{options:e}),t[3]=r,t[4]=s,t[5]=c}else c=t[5];return c},ct=new Intl.DateTimeFormat("de",{year:"numeric",month:"2-digit",day:"2-digit"});function ut(e,t){switch(e){case"name":return t.name;case"firstName":return t.ngoAdmins[0]?.firstName??"";case"lastName":return t.ngoAdmins[0]?.lastName??"";case"email":return t.ngoAdmins[0]?.email??"";case"createdAt":return ct.format(new Date(t.createdAt));case"updatedAt":return ct.format(new Date(t.updatedAt));default:return""}}function mt(e,t,n,o){return"actions"===e?(0,a.Y)(st,{config:t,ngo:n,dispatch:o}):(0,a.Y)(a.FK,{})}const dt=e=>{const t=(0,o.c)(7),{ngos:n,dispatch:i}=e,r=(0,m.useGemStore)(ft),l=(0,u.U)();let s;t[0]!==l||t[1]!==i||t[2]!==n?(s=function(e,t,n){const o=function(e){const t=e.communityConfiguration;return[{type:"TEXT",apiFieldName:"name",sorting:!1,title:t.etbNgoConfig.companyName},{type:"TEXT",apiFieldName:"firstName",sorting:!1,title:`${t.general.ngoAdmin} ${t.userProfile.firstNameLabel}`},{type:"TEXT",apiFieldName:"lastName",sorting:!1,title:`${t.general.ngoAdmin} ${t.userProfile.lastNameLabel}`},{type:"TEXT",apiFieldName:"email",sorting:!1,title:`${t.general.ngoAdmin} ${t.userProfile.email}`},{type:"TEXT",apiFieldName:"createdAt",sorting:!1,title:t.etbOfferConfig.createdLabel},{type:"TEXT",apiFieldName:"updatedAt",sorting:!1,title:t.etbOfferConfig.modifiedLabel},{type:"COMPONENT",apiFieldName:"actions",sorting:!1,title:""}]}(t),a={columns:[],data:[],id:(0,T.k)()};return a.columns=[o.map((e=>({id:(0,T.k)(),name:e.apiFieldName,label:e.title??"",type:e.type,sorting:e.sorting})))],a.data=e.map(((e,a)=>o.reduce(((o,i,r)=>{let l;switch(i.type){case"TEXT":l={type:"TEXT",id:`${a}-${r}`,value:ut(i.apiFieldName,e),valueForSorting:""};break;case"COMPONENT":l={type:"COMPONENT",id:`${a}-${r}`,value:mt(i.apiFieldName,t,e,n),valueForSorting:""}}return l?{...o,[i.apiFieldName]:l}:o}),{}))),a}(n,l,i),t[0]=l,t[1]=i,t[2]=n,t[3]=s):s=t[3];const c=s;let d;return t[4]!==r||t[5]!==c?(d=(0,a.Y)(B,{children:(0,a.Y)(D.d,{tableData:c,isMobile:r})}),t[4]=r,t[5]=c,t[6]=d):d=t[6],d};function ft(e){return e.mediaBreakpoint<ee.E.SM}const gt=[];
1function bt(e){const t=(0,o.c)(16),n=(0,u.U)();let a;t[0]!==n.communityConfiguration.general?(a=(0,L.y)(n.communityConfiguration.general),t[0]=n.communityConfiguration.general,t[1]=a):a=t[1];const i=a,r=(0,w.S)();let l;t[2]!==n.communityConfiguration.errorMessage.errorCodes?(l={method:"GET",responseStruct:De,errorCodes:n.communityConfiguration.errorMessage.errorCodes},t[2]=n.communityConfiguration.errorMessage.errorCodes,t[3]=l):l=t[3];const[s,m,d]=(0,oe.q)(l);let f,g;t[4]!==m||t[5]!==i||t[6]!==r.jwtToken?(f=()=>{const e={headers:(0,E.d)(r.jwtToken),method:"GET"};m(`${i}/etb/profiles`,e)},t[4]=m,t[5]=i,t[6]=r.jwtToken,t[7]=f):f=t[7],t[8]!==m||t[9]!==e||t[10]!==i||t[11]!==r.jwtToken?(g=[m,r.jwtToken,i,e],t[8]=m,t[9]=e,t[10]=i,t[11]=r.jwtToken,t[12]=g):g=t[12],(0,c.useEffect)(f,g);const b=s??gt;let p;return t[13]!==d||t[14]!==b?(p=[b,d],t[13]=d,t[14]=b,t[15]=p):p=t[15],p}var pt=n(332);const ht=(0,P.A)("span",{target:"e1scpufr1"})("color:",F.TT6,";"),yt=(0,P.A)(pt.g,{target:"e1scpufr0"})("width:100%;@media (min-width: ",U.fi.sm,"px){width:auto;}"),Ct=()=>{const e=(0,o.c)(36),t=(0,u.U)(),n=(0,w.S)(),[i,r]=(0,c.useReducer)(nt,ot),[l,s]=bt(i.forceResetTrigger),[m,d]=function(){const e=(0,o.c)(6),t=(0,u.U)(),[n,a]=(0,I.s)();let i,r;return e[0]!==t.communityConfiguration.errorMessage.errorCodes||e[1]!==n?(i={fetchState:n,method:"DELETE",errorCodes:t.communityConfiguration.errorMessage.errorCodes},e[0]=t.communityConfiguration.errorMessage.errorCodes,e[1]=n,e[2]=i):i=e[2],(0,M.h)(i),(0,O.s)(n,t.communityConfiguration.errorMessage.successMessage),e[3]!==a||e[4]!==n?(r=[a,n],e[3]=a,e[4]=n,e[5]=r):r=e[5],r}(),f=t.communityConfiguration.general,g=t.communityConfiguration.userProfile,b=t.communityConfiguration.etbNgoConfig;let p,h,y;e[0]!==l?(p=()=>{r(function(e){return{ngos:e,type:"SET_NGOS"}}(l))},h=[l],e[0]=l,e[1]=p,e[2]=h):(p=e[1],h=e[2]),(0,c.useEffect)(p,h),e[3]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{r(tt())},e[3]=y):y=e[3];const T=y;let v;e[4]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{r(tt("CREATE"))},e[4]=v):v=e[4];const N=v;let S,A,Y;e[5]!==d.rawResponse?.ok?(S=()=>{d.rawResponse?.ok&&r({type:"RESET_TABLE"})},e[5]=d.rawResponse?.ok,e[6]=S):S=e[6],e[7]!==d?(A=[d],e[7]=d,e[8]=A):A=e[8],(0,c.useEffect)(S,A),e[9]!==m||e[10]!==f||e[11]!==n||e[12]!==i.actualNgo?(Y=()=>async()=>{i.actualNgo&&(await async function(e,t,n,o){const a={headers:(0,E.d)(t),method:"DELETE"};await o(`${(0,L.y)(e)}/etb/profiles/${n}`,a)}(f,n.jwtToken,i.actualNgo.id,m),T())},e[9]=m,e[10]=f,e[11]=n,e[12]=i.actualNgo,e[13]=Y):Y=e[13];const k=Y;if(s){let t;return e[14]===Symbol.for("react.memo_cache_sentinel")?(t=(0,a.Y)(Se.h,{}),e[14]=t):t=e[14],t}let D,P,x,U,j,F;return e[15]!==i.dialog?(D="CREATE"===i.dialog&&(0,a.Y)(at,{dispatch:r}),e[15]=i.dialog,e[16]=D):D=e[16],e[17]!==f||e[18]!==k||e[19]!==b.deleteNgoLabel||e[20]!==i.dialog||e[21]!==g?(P="DELETE"===i.dialog&&(0,a.Y)(C.l,{type:"CONFIRM",title:b.deleteNgoLabel,message:g.deleteUserNote,confirmClick:k(),cancelText:f.cancelButtonLabel,confirmText:b.deleteNgoLabel,cancelClick:T}),e[17]=f,e[18]=k,e[19]=b.deleteNgoLabel,e[20]=i.dialog,e[21]=g,e[22]=P):P=e[22],e[23]!==i.actualNgo||e[24]!==i.dialog?(x="EDIT"===i.dialog&&i.actualNgo&&(0,a.Y)(it,{ngoId:i.actualNgo.id,dispatch:r,closeDialog:T}),e[23]=i.actualNgo,e[24]=i.dialog,e[25]=x):x=e[25],e[26]!==b.addNewNgoLabel?(U=(0,a.Y)("div",{className:"d-f jc-fe m-b-md",children:(0,a.Y)(yt,{onClick:N,children:b.addNewNgoLabel})}),e[26]=b.addNewNgoLabel,e[27]=U):U=e[27],e[28]!==i.ngos?(j=(0,a.Y)(dt,{ngos:i.ngos,dispatch:r}),e[28]=i.ngos,e[29]=j):j=e[29],e[30]!==U||e[31]!==j||e[32]!==D||e[33]!==P||e[34]!==x?(F=(0,a.FD)(a.FK,{children:[D,P,x,U,j]}),e[30]=U,e[31]=j,e[32]=D,e[33]=P,e[34]=x,e[35]=F):F=e[35],F},Lt={activities:(0,ae.ai)(),donations:(0,ae.ai)(),events:(0,ae.ai)(),trainings:(0,ae.ai)(),groupActivities:(0,ae.ai)(),active:(0,ae.ai)(),inactive:(0,ae.ai)(),total:(0,ae.ai)()},Et=(0,ae.Ik)({name:(0,ae.Yj)(),...Lt}),Tt=(0,ae.Ik)({ngoCount:(0,ae.ai)(),...Lt}),vt=(0,ae.Ik)({count:(0,ae.ai)(),rows:(0,ae.YO)(Et),total:Tt});var Nt=n(88989);function St(e){const t=(0,o.c)(7);let n,a,i;return t[0]!==e.communityConfiguration?(n=(0,Nt.I9)(e.communityConfiguration,"employer",!1),t[0]=e.communityConfiguration,t[1]=n):n=t[1],t[2]!==e.communityConfiguration.etbStatistics.totalLabel?(a=function(e){const t=2017,n=(new Date).getFullYear();return[{value:"",label:e},...Array.from({length:n-t+1},((e,n)=>({value:String(t+n),label:String(t+n)})))]}(e.communityConfiguration.etbStatistics.totalLabel),t[2]=e.communityConfiguration.etbStatistics.totalLabel,t[3]=a):a=t[3],t[4]!==n||t[5]!==a?(i={...n,options:a},t[4]=n,t[5]=a,t[6]=i):i=t[6],i}const Mt=e=>{const t=(0,o.c)(11),{data:n,totalCount:i}=e,r=(0,m.useGemStore)(Ot),l=(0,u.U)();let s;t[0]!==l||t[1]!==n?(s=function(e,t){const n=function(e){const t=e.communityConfiguration.etbOfferConfig,n=e.communityConfiguration.etbStatistics;return[{type:"TEXT",apiFieldName:"name",sorting:!1,title:e.communityConfiguration.etbNgoConfig.companyName},{type:"TEXT",apiFieldName:"activities",sorting:!1,title:t.activityLabel},{type:"TEXT",apiFieldName:"groupActivities",sorting:!1,title:t.groupActivityLabel},{type:"TEXT",apiFieldName:"donations",sorting:!1,title:t.donationLabel},{type:"TEXT",apiFieldName:"events",sorting:!1,title:t.eventLabel},{type:"TEXT",apiFieldName:"trainings",sorting:!1,title:t.trainingLabel},{type:"TEXT",apiFieldName:"active",sorting:!1,title:t.activeLabel},{type:"TEXT",apiFieldName:"inactive",sorting:!1,title:t.inactiveLabel},{type:"TEXT",apiFieldName:"total",sorting:!1,title:n.totalLabel}]}(t),o={columns:[],data:[],id:(0,T.k)()};return o.columns=[n.map((e=>({id:(0,T.k)(),name:e.apiFieldName,label:e.title??"",type:e.type,sorting:e.sorting})))],o.data=e.map(((e,t)=>n.reduce(((n,o,a)=>{let i;return"TEXT"===o.type&&(i={type:"TEXT",id:`${t}-${a}`,value:String(e[o.apiFieldName]??""),valueForSorting:""}),i?{...n,[o.apiFieldName]:i}:n}),{}))),o}(n,l),t[0]=l,t[1]=n,t[2]=s):s=t[2];const c=s;let d,f,g;return t[3]!==i?(d=(0,a.FD)("p",{className:"fw-b",children:["NGOs: ",i]}),t[3]=i,t[4]=d):d=t[4],t[5]!==r||t[6]!==c?(f=(0,a.Y)(B,{children:(0,a.Y)(D.d,{tableData:c,isMobile:r})}),t[5]=r,t[6]=c,t[7]=f):f=t[7],t[8]!==d||t[9]!==f?(g=(0,a.FD)(a.FK,{children:[d,f]}),t[8]=d,t[9]=f,t[10]=g):g=t[10],g};function Ot(e){return e.mediaBreakpoint<ee.E.SM}const It=(0,P.A)("div",{target:"erumimy0"})({name:"566o5y",styles:"--font-weight-first-row:bold"});var wt=n(34157),At=n(92172),Yt=n(78918);const kt=()=>{const e=(0,o.c)(26),t=(0,u.U)(),n=t.communityConfiguration.etbStatistics,[i,r]=(0,c.useState)(""),l=St(t),[s,m]=function(e){const t=(0,o.c)(11),n=(0,u.U
1)(),a=(0,w.S)();let i;t[0]!==n.communityConfiguration.errorMessage.errorCodes?(i={method:"GET",responseStruct:vt,errorCodes:n.communityConfiguration.errorMessage.errorCodes},t[0]=n.communityConfiguration.errorMessage.errorCodes,t[1]=i):i=t[1];const[r,l,s]=(0,oe.q)(i);let m,d,f;return t[2]!==n.communityConfiguration.general||t[3]!==l||t[4]!==a.jwtToken||t[5]!==e?(m=()=>{!async function(e,t,n,o){const a={headers:(0,E.d)(t),method:"GET"};let i=`${(0,L.y)(e)}/etb/stats/ngo`;o&&(i+=`?year=${o}`),await n(i,a)}(n.communityConfiguration.general,a.jwtToken,l,e)},d=[n.communityConfiguration.general,a.jwtToken,e,l],t[2]=n.communityConfiguration.general,t[3]=l,t[4]=a.jwtToken,t[5]=e,t[6]=m,t[7]=d):(m=t[6],d=t[7]),(0,c.useEffect)(m,d),t[8]!==r||t[9]!==s?(f=[r,s],t[8]=r,t[9]=s,t[10]=f):f=t[10],f}(i);let d;e[0]!==s||e[1]!==n.totalLabel?(d=s?[{name:n.totalLabel,...s.total},...s.rows]:[],e[0]=s,e[1]=n.totalLabel,e[2]=d):d=e[2];const f=d;let g,b,p;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=(0,Yt.S8)({"--col-count-md":4}),e[3]=g):g=e[3],e[4]!==n.yearLabel||e[5]!==l.name?(b=(0,Ge.s)({name:l.name,label:n.yearLabel}),e[4]=n.yearLabel,e[5]=l.name,e[6]=b):b=e[6],e[7]===Symbol.for("react.memo_cache_sentinel")?(p=e=>{r(e.map(Dt)[0])},e[7]=p):p=e[7];const h=l.options,y=String(i);let C,T,v,N,S,M;return e[8]!==y||e[9]!==l.options?(C=(0,wt.o)(h,y),e[8]=y,e[9]=l.options,e[10]=C):C=e[10],e[11]!==C||e[12]!==l?(T=(0,a.Y)(At.A,{disabled:!1,dispatchValue:p,selectInputConfig:l,value:C}),e[11]=C,e[12]=l,e[13]=T):T=e[13],e[14]!==b||e[15]!==T?(v=(0,a.Y)("div",{className:"gem-grid",style:g,children:(0,a.Y)(We.E,{...b,children:T})}),e[14]=b,e[15]=T,e[16]=v):v=e[16],e[17]!==m?(N=m&&(0,a.Y)(Se.h,{}),e[17]=m,e[18]=N):N=e[18],e[19]!==s||e[20]!==f?(S=s&&(0,a.Y)(Mt,{data:f,totalCount:s.count}),e[19]=s,e[20]=f,e[21]=S):S=e[21],e[22]!==S||e[23]!==v||e[24]!==N?(M=(0,a.FD)(It,{children:[v,N,S]}),e[22]=S,e[23]=v,e[24]=N,e[25]=M):M=e[25],M};function Dt(e){return e.value}function Pt(e){return{type:"SET_DIALOG",dialog:e}}function xt(e,t){switch(t.type){case"SET_USERS":return{...e,users:t.users};case"RESET_TABLE":return{...e,forceResetTrigger:(0,T.k)()};case"SET_DIALOG":return{...e,dialog:t.dialog};case"SET_ACTUAL_USER":return{...e,actualUser:t.user};default:return e}}const Ut={users:[]};async function jt(e,t,n,o,a){const i={profileId:o,userId:n},r={headers:(0,E.d)(t),body:JSON.stringify(i),method:"POST"};await a(`${(0,L.y)(e)}/etb/profiles/users/new_design`,r)}async function Ft(e,t,n,o,a){const i={group_name:o},r={headers:(0,E.d)(t),body:JSON.stringify(i),method:"PUT"};await a(`${(0,L.y)(e)}/users/${n}/group`,r)}function Rt(e){const t=(0,o.c)(7),n=(0,u.U)(),[a,i]=(0,I.s)();let r,l;return t[0]!==n.communityConfiguration.errorMessage.errorCodes||t[1]!==a||t[2]!==e?(r={fetchState:a,method:"POST",errorCodes:n.communityConfiguration.errorMessage.errorCodes,isModal:e},t[0]=n.communityConfiguration.errorMessage.errorCodes,t[1]=a,t[2]=e,t[3]=r):r=t[3],(0,M.h)(r),t[4]!==i||t[5]!==a?(l=[i,a],t[4]=i,t[5]=a,t[6]=l):l=t[6],l}function _t(){const e=(0,o.c)(6),t=(0,u.U)(),[n,a]=(0,I.s)();let i,r;return e[0]!==t.communityConfiguration.errorMessage.errorCodes||e[1]!==n?(i={fetchState:n,method:"PUT",errorCodes:t.communityConfiguration.errorMessage.errorCodes},e[0]=t.communityConfiguration.errorMessage.errorCodes,e[1]=n,e[2]=i):i=e[2],(0,M.h)(i),(0,O.s)(n,t.communityConfiguration.errorMessage.successMessage),e[3]!==a||e[4]!==n?(r=[a,n],e[3]=a,e[4]=n,e[5]=r):r=e[5],r}const Bt=e=>{const t=(0,o.c)(55),{dispatch:n,ngoId:i}=e,r=(0,u.U)(),l=(0,w.S)(),s=r.communityConfiguration.general,[m,d]=(0,c.useState)(""),[f,g]=(0,c.useState)(),[b,p]=function(){const e=(0,o.c)(3),[t,n]=(0,I.s)();let a;return e[0]!==n||e[1]!==t?(a=[n,t],e[0]=n,e[1]=t,e[2]=a):a=e[2],a}(),[h]=Rt(!0),[y,T]=_t(),[v,N]=(0,c.useState)(),[S,M]=(0,c.useState)(!1);let O;t[0]!==r.communityConfiguration.general||t[1]!==b||t[2]!==m||t[3]!==s.requiredFieldMessage||t[4]!==l.jwtToken?(O=async()=>{m?(M(!0),await async function(e,t,n,o){const a={headers:(0,E.d)(t),method:"GET"};await o(`${(0,L.y)(e)}/etb/users/?email=${n}`,a)}(r.communityConfiguration.general,l.jwtToken,m,b)):g({fromConfig:s.requiredFieldMessage})},t[0]=r.communityConfiguration.general,t[1]=b,t[2]=m,t[3]=s.requiredFieldMessage,t[4]=l.jwtToken,t[5]=O):O=t[5];const A=O;let Y;t[6]!==n?(Y=()=>{n(Pt())},t[6]=n,t[7]=Y):Y=t[7];const k=Y;let D,P,x,U,j,F,R,_,B;t[8]!==n||t[9]!==T.response||t[10]!==k?(D=()=>{T.response&&(n({type:"RESET_TABLE"}),k())},P=[n,T.response,k],t[8]=n,t[9]=T.response,t[10]=k,t[11]=D,t[12]=P):(D=t[11],P=t[12]),(0,c.useEffect)(D,P),t[13]!==r.communityConfiguration.etbUserProfileConfig.noUserWithEmailMessage||t[14]!==p||t[15]!==S?(x=()=>{S&&(p.isError?g({fromConfig:r.communityConfiguration.etbUserProfileConfig.noUserWithEmailMessage}):p?.response?.id&&(N(p?.response?.id),g(void 0)))},t[13]=r.communityConfiguration.etbUserProfileConfig.noUserWithEmailMessage,t[14]=p,t[15]=S,t[16]=x):x=t[16],t[17]!==r||t[18]!==p||t[19]!==S?(U=[r,p,S],t[17]=r,t[18]=p,t[19]=S,t[20]=U):U=t[20],(0,c.useEffect)(x,U),t[21]!==
1h||t[22]!==y||t[23]!==s||t[24]!==l.jwtToken||t[25]!==v||t[26]!==i?(j=()=>{(async()=>{v&&(await jt(s,l.jwtToken,v,i,h),await Ft(s,l.jwtToken,v,"NGO_USER",y))})()},t[21]=h,t[22]=y,t[23]=s,t[24]=l.jwtToken,t[25]=v,t[26]=i,t[27]=j):j=t[27],t[28]!==h||t[29]!==y||t[30]!==s||t[31]!==k||t[32]!==l.jwtToken||t[33]!==v||t[34]!==i?(F=[h,y,s,k,l.jwtToken,v,i],t[28]=h,t[29]=y,t[30]=s,t[31]=k,t[32]=l.jwtToken,t[33]=v,t[34]=i,t[35]=F):F=t[35],(0,c.useEffect)(j,F),t[36]!==m.length?(R=()=>{m.length>0&&g(void 0)},t[36]=m.length,t[37]=R):R=t[37],t[38]!==m?(_=[m],t[38]=m,t[39]=_):_=t[39],(0,c.useEffect)(R,_),t[40]!==m?(B={placeholder:"",value:m,description:"",name:"email",cId:"email",dispatchValue(e){d(e.target.value)}},t[40]=m,t[41]=B):B=t[41];const G=B;let z,q,$;return t[42]!==G?(z=(0,a.Y)(Xe.p,{...G}),t[42]=G,t[43]=z):z=t[43],t[44]!==r.communityConfiguration.userProfile.email||t[45]!==f||t[46]!==z?(q=(0,a.Y)(We.E,{label:r.communityConfiguration.userProfile.email,cId:"email",optionalLabel:"",error:f,fieldLabelPosition:"LEFT",labelWidth:"WIDTH_5",testId:"email",warning:void 0,info:void 0,children:z}),t[44]=r.communityConfiguration.userProfile.email,t[45]=f,t[46]=z,t[47]=q):q=t[47],t[48]!==r.communityConfiguration.etbUserProfileConfig.addUserLabel||t[49]!==s.cancelButtonLabel||t[50]!==s.saveButtonLabel||t[51]!==k||t[52]!==A||t[53]!==q?($=(0,a.Y)(C.l,{type:"FORM",title:r.communityConfiguration.etbUserProfileConfig.addUserLabel,cancelClick:k,cancelText:s.cancelButtonLabel,confirmText:s.saveButtonLabel,confirmClick:A,children:q}),t[48]=r.communityConfiguration.etbUserProfileConfig.addUserLabel,t[49]=s.cancelButtonLabel,t[50]=s.saveButtonLabel,t[51]=k,t[52]=A,t[53]=q,t[54]=$):$=t[54],$},Gt=(0,ae.Ik)({id:(0,ae.ai)(),name:(0,ae.Yj)(),accepted:(0,ae.lq)((0,ae.zM)()),updatedAt:(0,ae.lq)((0,ae.p6)())}),zt=(0,ae.Ik)({name:(0,ae.vP)(["BANNED","DEFAULT","TRUSTED","MODERATOR","NGO_ADMIN","NGO_USER","ADMIN","UNREGISTERED"]),communityId:(0,ae.ai)(),disclaimer:(0,ae.lq)((0,ae.YO)(Gt))}),qt=(0,ae.Ik)({id:(0,ae.ai)(),name:(0,ae.Yj)()}),$t=(0,ae.Ik)({id:(0,ae.ai)(),fedId:(0,ae.Yj)(),institute:(0,ae.lq)((0,ae.ai)()),nickname:(0,ae.Yj)(),email:(0,ae.Yj)(),portal:(0,ae.lq)((0,ae.Yj)()),gender:(0,ae.lq)((0,ae.vP)(["FEMALE","MALE","INTER","NO_VALUE"])),userType:(0,ae.Yj)(),firstName:(0,ae.lq)((0,ae.Yj)()),lastName:(0,ae.lq)((0,ae.Yj)()),firstLogin:(0,ae.lq)((0,ae.Yj)()),lastLogin:(0,ae.lq)((0,ae.Yj)()),createdAt:(0,ae.lq)((0,ae.Yj)()),updatedAt:(0,ae.lq)((0,ae.Yj)()),decadeOfBirth:(0,ae.lq)((0,ae.Yj)()),userDataUpdatedAt:(0,ae.lq)((0,ae.Yj)()),emailNotification:(0,ae.lq)((0,ae.Yj)()),userCommunityGroups:(0,ae.YO)(zt),etbProfiles:(0,ae.YO)(qt),etbEmployer:(0,ae.lq)(qt)}),Vt=(0,ae.YO)($t),Wt=(0,ae.Ik)({rows:Vt,count:(0,ae.ai)()}),Ht=(0,ae.Ik)({emailSubjectLocal:(0,ae.Yj)(),emailSubjectEn:(0,ae.Yj)(),emailMessageLocal:(0,ae.Yj)(),emailMessageEn:(0,ae.Yj)(),loginButtonLocal:(0,ae.Yj)(),loginButtonEn:(0,ae.Yj)(),buttonPathLocal:(0,ae.Yj)(),buttonPathEn:(0,ae.Yj)(),checkPreferencesMessageLocal:(0,ae.Yj)(),checkPreferencesMessageEn:(0,ae.Yj)(),showOfferEn:(0,ae.Yj)(),showOfferLocal:(0,ae.Yj)(),pathToOffersListLocal:(0,ae.Yj)(),pathToOffersListEn:(0,ae.Yj)()}),Xt=(0,ae.Ik)({id:(0,ae.ai)(),firstName:(0,ae.lq)((0,ae.Yj)()),lastName:(0,ae.lq)((0,ae.Yj)()),email:(0,ae.lq)((0,ae.Yj)()),userCommunityGroups:(0,ae.YO)(zt)}),Kt=(0,ae.YO)(Xt);(0,ae.Ik)({id:(0,ae.ai)()});const Jt=(0,P.A)("div",{target:"e5i8x9k0"})("display:var(--display-badge, block);padding:",(0,j.a)(2)," ",(0,j.a)(8),";border-radius:",(0,j.a)(50),";text-align:center;hyphens:manual;background-color:",(({type:e})=>"ACTIVE"===e?F.olj:F.y4U),";border:1px solid ",(({type:e})=>"ACTIVE"===e?F.t$2:F.Fry),";color:",(({type:e})=>"ACTIVE"===e?F.t$2:F.Fry),";font-weight:",U.Wy.semibold,";"),Zt=e=>{const t=(0,o.c)(3),{type:n,activeLabel:i,inactiveLabel:r}=e,l="ACTIVE"===n?i:r;let s;return t[0]!==l||t[1]!==n?(s=(0,a.Y)(Jt,{type:n,className:"p--minor",children:l}),t[0]=l,t[1]=n,t[2]=s):s=t[2],s};var Qt=n(68946);const en=e=>{const t=(0,o.c)(2),n=function(e){const t=(0,o.c)(17),{user:n,dispatch:i,config:r}=e;let l;t[0]!==i||t[1]!==n?(l=e=>()=>{i(Pt(e)),i(function(e){return{type:"SET_ACTUAL_USER",user:e}}(n))},t[0]=i,t[1]=n,t[2]=l):l=t[2];const s=l;let c;t[3]!==r.communityConfiguration.general.communityId||t[4]!==n.userCommunityGroups?(c=(0,Qt.m)(r.communityConfiguration.general.communityId,n.userCommunityGroups),t[3]=r.communityConfiguration.general.communityId,t[4]=n.userCommunityGroups,t[5]=c):c=t[5];const u="NGO_ADMIN"===c;let m,d;if(t[6]!==r.communityConfiguration.userProfile||t[7]!==s?(m={label:e=>(0,a.Y)(z,{handleClick:s("DELETE"),label:r.communityConfiguration.userProfile.deleteUserButton,optionProps:e}),value:"deleteUser"},t[6]=r.communityConfiguration.userProfile,t[7]=s,t[8]=m):m=t[8],t[9]!==r.communityConfiguration.etbUserProfileConfig||t[10]!==u||t[11]!==s||t[12]!==m){if(d=[m],!u){let e;t[14]!==r.communityConfiguration.etbUserProfileConfig||t[15]!==s?(e={label:e=>(0,a.Y)(z,{handleClick:s("NGO_ADMIN"),label:r.communityConfiguration.etbUserProfileConfig.makeAdminLabel||"",optionProps:e}),value:"ngoAdmin"},t[14]=r.communityConfiguration.etbUserProfileConfig,t[15]=s,t[16]=e):e=t[16],d.push(e)}t[9]=r.communityConfiguration.etbUserProfileConfig,t[10]=u,t[11]=s,t[12]=m,t[13]=d}else d=t[13];return d}(e);let i;return t[0]!==n?(i=(0,a.Y)(W,{options:n}),t[0]=n,t[1]=i):i=t[1],i};function tn(e,t){switch(e){case"firstName":return t.firstName??"";case"lastName":return t.lastName??"";case"email":return t.email??"";default:return""}}function nn(e,t,n,o){switch(e){case"admin":return n.userCommunityGroups.some((e=>"NGO_ADMIN"===e.name))?(0,a.Y)(Zt,{type:"ACTIVE",activeLabel:t.communityConfiguration.general.admin}):(0,a.Y)(a.FK,{});case"actions":return(0,a.Y)(en,{user:n,dispatch:o,config:t});default:return(0,a.Y)(a.FK,{})}}const on=e=>{const t=(0,o.c)(7),{users:n,dispatch:i}=e,r=(0,m.useGemStore)(an),l=(0,u.U)();let s;t[0]!==l||t[1]!==i||t[2]!==n?(s=function(e,t,n){const o=function(e){const t=e.communityConfiguration.userProfile;return[{type:"TEXT",apiFieldName:"firstName",sorting:!1,title:t.firstNameLabel},{type:"TEXT",apiFieldName:"lastName",sorting:!1,title:t.lastNameLabel},{type:"TEXT",apiFieldName:"email",sorting:!1,title:t.email},{type:"COMPONENT",apiFieldName:"admin",sorting:!1,title:e.communityConfiguration.general.admin},{type:"COMPONENT",apiFieldName:"actions",sorting:!1,title:""}]}(t),a={columns:[],data:[],id:(0,T.k)()};return a.columns=[o.map((e=>({id:(0,T.k)(),name:e.apiFieldName,label:e.title??"",type:e.type,sorting:e.sorting})))],a.data=e.map(((e,a)=>o.reduce(((o,i,r)=>{let l;switch(i.type){case"TEXT":l={type:"TEXT",id:`${a}-${r}`,value:tn(i.apiFieldName,e),valueForSorting:""};break;case"COMPONENT":l={type:"COMPONENT",id:`${a}-${r}
1`,value:nn(i.apiFieldName,t,e,n),valueForSorting:""}}return l?{...o,[i.apiFieldName]:l}:o}),{}))),a}(n,l,i),t[0]=l,t[1]=i,t[2]=n,t[3]=s):s=t[3];const c=s;let d;return t[4]!==r||t[5]!==c?(d=(0,a.Y)(B,{children:(0,a.Y)(D.d,{tableData:c,isMobile:r})}),t[4]=r,t[5]=c,t[6]=d):d=t[6],d};function an(e){return e.mediaBreakpoint<ee.E.SM}const rn=(0,P.A)("div",{target:"e1eg30sk0"})({name:"1y08nc8",styles:"--display-badge:inline-block"});var ln=n(26936),sn=n(10691);const cn=()=>{const e=(0,o.c)(56),t=(0,u.U)(),n=(0,w.S)(),[i,r]=(0,c.useReducer)(xt,Ut),[l,s]=Pe(),[m,d]=function(e,t){const n=(0,o.c)(18),a=(0,u.U)();let i;n[0]!==a.communityConfiguration.general?(i=(0,L.y)(a.communityConfiguration.general),n[0]=a.communityConfiguration.general,n[1]=i):i=n[1];const r=i,l=(0,w.S)();let s;n[2]!==a.communityConfiguration.errorMessage.errorCodes?(s={method:"GET",responseStruct:Kt,errorCodes:a.communityConfiguration.errorMessage.errorCodes},n[2]=a.communityConfiguration.errorMessage.errorCodes,n[3]=s):s=n[3];const[m,d,f]=(0,oe.q)(s);let g,b,p;return n[4]!==d||n[5]!==e||n[6]!==r||n[7]!==l.jwtToken?(g=()=>{if(void 0===e)return;const t={headers:(0,E.d)(l.jwtToken),method:"GET"};d(`${r}/etb/profiles/${e}/users`,t)},n[4]=d,n[5]=e,n[6]=r,n[7]=l.jwtToken,n[8]=g):g=n[8],n[9]!==d||n[10]!==t||n[11]!==e||n[12]!==r||n[13]!==l.jwtToken?(b=[d,l.jwtToken,r,e,t],n[9]=d,n[10]=t,n[11]=e,n[12]=r,n[13]=l.jwtToken,n[14]=b):b=n[14],(0,c.useEffect)(g,b),n[15]!==m||n[16]!==f?(p=[m,f],n[15]=m,n[16]=f,n[17]=p):p=n[17],p}(s?.id,i.forceResetTrigger),[f]=function(){const e=(0,o.c)(6),t=(0,u.U)(),[n,a]=(0,I.s)();let i,r;return e[0]!==t.communityConfiguration.errorMessage.errorCodes||e[1]!==n?(i={fetchState:n,method:"DELETE",errorCodes:t.communityConfiguration.errorMessage.errorCodes},e[0]=t.communityConfiguration.errorMessage.errorCodes,e[1]=n,e[2]=i):i=e[2],(0,M.h)(i),e[3]!==a||e[4]!==n?(r=[a,n],e[3]=a,e[4]=n,e[5]=r):r=e[5],r}(),[g,b]=_t(),[p,h]=_t(),[y,T]=_t(),v=t.communityConfiguration.general,N=t.communityConfiguration.userProfile,S=t.communityConfiguration.etbUserProfileConfig;let O,A,Y,k,D,P,x;e[0]!==m?(O=()=>{m&&r(function(e){return{users:e,type:"SET_USERS"}}(m))},A=[m],e[0]=m,e[1]=O,e[2]=A):(O=e[1],A=e[2]),(0,c.useEffect)(O,A),e[3]!==b.response?(Y=()=>{b.response&&r({type:"RESET_TABLE"})},e[3]=b.response,e[4]=Y):Y=e[4],e[5]!==b?(k=[b],e[5]=b,e[6]=k):k=e[6],(0,c.useEffect)(Y,k),e[7]!==T.response||e[8]!==h.response?(D=()=>{h.response&&T.response&&((0,ln.CO)(),(0,sn.v)(),window.location.reload())},P=[h.response,T.response],e[7]=T.response,e[8]=h.response,e[9]=D,e[10]=P):(D=e[9],P=e[10]),(0,c.useEffect)(D,P),e[11]===Symbol.for("react.memo_cache_sentinel")?(x=()=>{r(Pt("CREATE"))},e[11]=x):x=e[11];const U=x;let j;e[12]===Symbol.for("react.memo_cache_sentinel")?(j=()=>{r(Pt())},e[12]=j):j=e[12];const F=j;let R;e[13]!==f||e[14]!==g||e[15]!==v||e[16]!==n.jwtToken||e[17]!==s?.id||e[18]!==i.actualUser?(R=async()=>{i.actualUser&&s?.id&&(await async function(e,t,n,o,a){const i={headers:(0,E.d)(t),body:JSON.stringify({ngoId:n,userId:o}),method:"DELETE"};await a(`${(0,L.y)(e)}/etb/profiles/users/new_design`,i)}(v,n.jwtToken,s?.id,i.actualUser.id,f),await Ft(v,n.jwtToken,i.actualUser.id,"BANNED",g),F())},e[13]=f,e[14]=g,e[15]=v,e[16]=n.jwtToken,e[17]=s?.id,e[18]=i.actualUser,e[19]=R):R=e[19];const _=R;let B;e[20]!==y||e[21]!==p||e[22]!==v||e[23]!==n.jwtToken||e[24]!==n.userId||e[25]!==s?.id||e[26]!==i.actualUser?(B=async()=>{i.actualUser&&s?.id&&(await Ft(v,n.jwtToken,i.actualUser.id,"NGO_ADMIN",y),await Ft(v,n.jwtToken,n.userId,"NGO_USER",p),F())},e[20]=y,e[21]=p,e[22]=v,e[23]=n.jwtToken,e[24]=n.userId,e[25]=s?.id,e[26]=i.actualUser,e[27]=B):B=e[27];const G=B;let z,q,$,V,W,H,X;return e[28]!==l||e[29]!==d?(z=(d||l)&&(0,a.Y)(Se.h,{}),e[28]=l,e[29]=d,e[30]=z):z=e[30],e[31]!==v||e[32]!==_||e[33]!==i.dialog||e[34]!==N?(q="DELETE"===i.dialog&&(0,a.Y)(C.l,{type:"CONFIRM",message:N.areYouSureText,cancelText:v.cancelButtonLabel,confirmText:N.yes,confirmClick:_,cancelClick:F}),e[31]=v,e[32]=_,e[33]=i.dialog,e[34]=N,e[35]=q):q=e[35],e[36]!==v||e[37]!==G||e[38]!==i.dialog||e[39]!==S.makeAdminLabel||e[40]!==S.makeAdminMessage?($="NGO_ADMIN"===i.dialog&&(0,a.Y)(C.l,{type:"CONFIRM",title:S.makeAdminLabel,message:S.makeAdminMessage,cancelText:v.cancelButtonLabel,confirmText:S.makeAdminLabel,confirmClick:G,cancelClick:F}),e[36]=v,e[37]=G,e[38]=i.dialog,e[39]=S.makeAdminLabel,e[40]=S.makeAdminMessage,e[41]=$):$=e[41],e[42]!==s||e[43]!==i.dialog?(V="CREATE"===i.dialog&&s&&(0,a.Y)(Bt,{dispatch:r,ngoId:s?.id}),e[42]=s,e[43]=i.dialog,e[44]=V):V=e[44],e[45]!==S.addUserLabel?(W=(0,a.Y)("div",{className:"d-f jc-fe m-b-md",children:(0,a.Y)(yt,{onClick:U,children:S.addUserLabel})}),e[45]=S.addUserLabel,e[46]=W):W=e[46],e[47]!==i.users?(H=i.users?.length>0&&(0,a.Y)(on,{users:i.users,dispatch:r}),e[47]=i.users,e[48]=H):H=e[48],e[49]!==z||e[50]!==q||e[51]!==$||e[52]!==V||e[53]!==W||e[54]!==H?(X=(0,a.FD)(rn,{children:[z,q,$,V,W,H]}),e[49]=z,e[50]=q,e[51]=$,e[52]=V,e[53]=W,e[54]=H,e[55]=X):X=e[55],X};function un(e){return{type:"SET_DIALOG",dialog:e}}function mn(e){return{type:"SET_ACTUAL_OFFER",offer:e}}function dn(e){return{filters:e,type:"SET_FILTERS"}}function fn(e,t){switch(t.type){case"SET_OFFERS":return 0===e.offset?{...e,offers:t.offers,count:t.count}:{...e,offers:[...e.offers,...t.offers],count:t.count};case"LOAD_MORE":return{...e,offset:e.offers.length};case"RESET_TABLE":return{...e,offset:0,forceResetTrigger:(0,T.k)()};case"SET_DIALOG":return{...e,dialog:t.dialog};case"SET_ACTUAL_OFFER":return{...e,actualOffer:t.offer};case"SET_FILTERS":return{...e,offset:0,filters:t.filters};case"UPDATE_ACTIVATE_IN_OFFERS":return{...e,offers:(n=e.offers,o=!e.actualOffer?.activated,a=e.actualOffer?.id,a?n.map((e=>e.id===a?{...e,activated:o}:e)):n)};default:return e}var n,o,a}const gn={offers:[],offset:0,count:0},bn=e=>{const t=(0,o.c)(20),{actualOffer:n,isActivate:i,dispatch:r}=e,l=(0,u.U)(),s=l.communityConfiguration.general,m=l.communityConfiguration.etbUserProfileConfig,d=(0,w.S)(),[f,g]=function(){const e=(0,o.c)(6),t=(0,u.U)(),[n,a]=(0,I.s)();let i,r;return e[0]!==t.communityConfiguration.errorMessage.errorCodes||e[1]!==n?(i={fetchState:n,method:"PATCH",errorCodes:t.communityConfiguration.errorMessage.errorCodes,isModal:!0},e[0]=t.communityConfiguration.errorMessage.errorCodes,e[1]=n,e[2]=i):i=e[2],(0,M.h)(i),(0,O.s)(n,t.communityConfiguration.errorMessage.successMessage),e[3]!==a||e[4]!==n?(r=[a,n],e[3]=a,e[4]=n,e[5]=r):r=e[5],r}();let b,p,h;t[0]!==r||t[1]!==g.response?(b=()=>{g.response&&(r({type:"UPDATE_ACTIVATE_IN_OFFERS"}),r(un()))},t[0]=r,t[1]=g.response,t[2]=b):b=t[2],t[3]!==r||t[4]!==g?(p=[g,r],t[3]=r,t[4]=g,t[5]=p):p=t[5],(0,c.useEffect)(b,p),t[6]!==n.id||t[7]!==f||t[8]!==s||t[9]!==i||t[10]!==d.jwtToken?(h=async()=>{await async function(e,t,n,o,a){const i={activated:o},r={headers:(0,E.d)(t),body:JSON.stringify(i),method:"PATCH"};await a(`${(0,L.y)(e)}/etb/offers/${n}/new_design`,r)}(s,d.jwtToken,n.id,i,f)},t[6]=n.id,t[7]=f,t[8]=s,t[9]=i,t[10]=d.jwtToken,t[11]=h):h=t[11];const y=h;let T;t[12]!==r?(T=()=>{r(un())},t[12]=r,t[13]=T):T=t[13];const v=T,N=i?m.activateOfferLabel:m.deactivateOfferLabel,S=i?m.activateOfferMessage:m.deactivateOfferMessage;let A;return t[14]!==v||t[15]!==s.cancelButtonLabel||t[16]!==y||t[17]!==S||t[18]!==N?(A=(0,a.Y)(C.l,{type:"CONFIRM",title:N,message:S,confirmClick:y,cancelText:s.cancelButtonLabel,confirmText:N,cancelClick:v}),t[14]=v,t[15]=s.cancelButtonLabel,t[16]=y,t[17]=S,t[18]=N,t[19]=A):A=t[19],A},pn=(0,c.lazy)((()=>Promise.all([n.e(36459),n.e(26729),n.e(38339),n.e(55110),n.e(51524),n.e(41302),n.e(26783),n.e(79351),n.e(5723),n.e(36761),n.e(32635),n.e(64292),n.e(48229),n.e(37624),n.e(34453)]).then(n.bind(n,118))));var hn=n(63850);const yn=(0,P.A)("div",{target:"eo1gdt04"})("display:flex;flex-direction:column;gap:",U.YK.xSmall,";"),Cn=(0,P.A)("div",{target:"eo1gdt03"})(hn.z,";height:auto;min-height:",(0,j.a)(65),";"),Ln=(0,P.A)("div",{target:"eo1gdt02"})("position:relative;height:",(0,j.a)(40),";display:flex;gap:",U.YK.mSmall,";align-items:center;"),En=(0,P.A)("div",{target:"eo1gdt01"})("display:flex;position:absolute;top:",(0,j.a)(33),";width:100%;background:",F.DJJ,";gap:var(--spacing-s01);padding:var(--spacing-s01);border-radius:",(0,j.a)(8),";box-shadow:0 4px 14px 2px rgba(11, 32, 66, 0.14);"),Tn=(0,P.A)("input",{target:"eo1gdt00"})(hn.z,";flex:1;");var vn=n(37040);const Nn=e=>{const t=(0,o.c)(16),{handleAnchorInDOM:n,hrefValue:i,okLabel:r,handleHref:l,setShowHrefInput:s}=e,[u,m]=(0,vn.g)();let d;t[0]!==s?(d=()=>{s(!1)},t[0]=s,t[1]=d):d=t[1];const f=d;let g,b,p,h,y;return t[2]!==f||t[3]!==u?(g=()=>{if(!u)return;const e=e=>{u.contains(e.target)||e.target.closest(".add-link-button")||f()};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}},b=[u,f],t[2]=f,t[3]=u,t[4]=g,t[5]=b):(g=t[4],b=t[5]),(0,c.useEffect)(g,b),t[6]!==l||t[7]!==i?(p=(0,a.Y)(Tn,{type:"text",onInput:l,value:i}),t[6]=l,t[7]=i,t[8]=p):p=t[8],t[9]!==n||t[10]!==r?(h=(0,a.Y)(pt.g,{onClick:n,children:r}),t[9]=n,t[10]=r,t[11]=h):h=t[11],t[12]!==m||t[13]!==p||t[14]!==h?(y=(0,a.FD)(En,{ref:m,children:[p,h]}),t[12]=m,t[13]=p,t[14]=h,t[15]=y):y=t[15],y};var Sn=n(84074);function Mn(e){return(0,Sn.sanitize)(e,{ALLOWED_TAGS:["a","br"],ALLOWED_ATTR:["href"]})}var On=n(98843),In=n(83467),wn=n(3388);const An=({value:e,dispatchValue:t,buttonLabels:n,labelBy:o,allowLink:i=!0})=>{const[r,l]=(0,vn.g)(),[s,u]=(0,c.useState)(),[m,d]=(0,c.useState)(!1),[f,g]=(0,c.useState)(""),[b,p]=(0,c.useState)();return(0,c.useEffect)((()=>
1{if(!r||"string"!=typeof e)return;const t=Mn(r.innerHTML),n=Mn(e);t!==n&&(r.innerHTML=n)}),[e,r]),(0,c.useEffect)((()=>{if("string"!=typeof e||!r||!i)return;const t=()=>{const e=document.getSelection();if(!e||!r.contains(e.anchorNode))return;const t="A"===e.anchorNode?.parentElement?.tagName;if("Range"!==e?.type||t)if("Caret"===e?.type&&t){const t=e.anchorNode?.parentElement.getAttribute("href");t&&(g(t),p(e.anchorNode?.parentElement))}else u(void 0),g(""),p(void 0);else u(e.getRangeAt(0))};return document.addEventListener("selectionchange",t),()=>{document.removeEventListener("selectionchange",t)}}),[i,e,r]),(0,c.useEffect)((()=>{if(!r)return;const e=e=>{"Enter"===e.key&&(e.preventDefault(),document.execCommand("insertLineBreak"))};return r.addEventListener("keydown",e),()=>{r.removeEventListener("keydown",e)}}),[r]),(0,a.FD)(yn,{children:[(0,a.Y)(Cn,{ref:l,className:"editor-content",onInput:e=>{e.target instanceof HTMLElement&&("<br>"!==e.target.innerHTML?t(Mn(e.target.innerHTML)):t(""))},contentEditable:"true","aria-labelledby":o,"data-testid":"rich-text"}),i&&(0,a.FD)(Ln,{children:[(0,a.Y)(On.K,{onClick:()=>{g((()=>{const e=b?.getAttribute("href");return e||""})),d(!0)},disabled:!s&&!b,title:"Add link",className:"add-link-button fw-sb",children:(0,a.Y)(q.p,{iconPath:In.F,className:"glyph-icon"})}),(0,a.Y)(On.K,{onClick:()=>{b?.textContent&&r&&(b.replaceWith(b.textContent),t(Mn(r.innerHTML)))},disabled:!b,title:"Remove link",children:(0,a.Y)(q.p,{iconPath:wn.G,className:"glyph-icon"})}),m&&(0,a.Y)(Nn,{setShowHrefInput:d,handleAnchorInDOM:()=>{if(r){if(s){const e=document.createElement("a");e.href=f,s.surroundContents(e)}else b&&b.setAttribute("href",f);p(void 0),u(void 0),d(!1),t(Mn(r.innerHTML))}},handleHref:e=>{e.target instanceof HTMLInputElement&&g(e.target.value)},hrefValue:f,okLabel:n.ok})]})]})};function Yn(e){const t=(0,o.c)(7);let n,a;var i;let r;return t[0]!==e.communityConfiguration?(n=(0,Nt.I9)(e.communityConfiguration,"selectLanguages",!0),t[0]=e.communityConfiguration,t[1]=n):n=t[1],t[2]!==e.communityConfiguration.etbOfferConfig?(a=[{value:"german",label:(i=e.communityConfiguration.etbOfferConfig).germanLabel},{value:"english",label:i.englishLabel},{value:"french",label:i.frenchLabel},{value:"italian",label:i.italianLabel},{value:"spanish",label:i.spanishLabel},{value:"czech",label:i.czechLabel},{value:"slovakian",label:i.slovakianLabel},{value:"hungarian",label:i.hungarianLabel},{value:"croatian",label:i.croatianLabel},{value:"serbian",label:i.serbianLabel},{value:"romanian",label:i.romanianLabel},{value:"russian",label:i.russianLabel},{value:"ukrainian",label:i.ukrainianLabel},{value:"otherLanguageSkills",label:i.otherLanguageSkillsLabel}],t[2]=e.communityConfiguration.etbOfferConfig,t[3]=a):a=t[3],t[4]!==n||t[5]!==a?(r={...n,options:a},t[4]=n,t[5]=a,t[6]=r):r=t[6],r}function kn(e){const t=(0,o.c)(7);let n,a;var i;let r;return t[0]!==e.communityConfiguration?(n=(0,Nt.I9)(e.communityConfiguration,"selectPeriodicties",!0),t[0]=e.communityConfiguration,t[1]=n):n=t[1],t[2]!==e.communityConfiguration.etbOfferConfig?(a=[{value:"bimonthly",label:(i=e.communityConfiguration.etbOfferConfig).bimonthlyLabel},{value:"individual",label:i.individualLabel},{value:"limited",label:i.limitedLabel},{value:"once",label:i.onceLabel},{value:"onceAMonth",label:i.onceAMonthLabel},{value:"onceAWeek",label:i.onceAWeekLabel}],t[2]=e.communityConfiguration.etbOfferConfig,t[3]=a):a=t[3],t[4]!==n||t[5]!==a?(r={...n,options:a},t[4]=n,t[5]=a,t[6]=r):r=t[6],r}function Dn(e){const t=(0,o.c)(7);let n,a;var i;let r;return t[0]!==e.communityConfiguration?(n=(0,Nt.I9)(e.communityConfiguration,"selectSkills",!0),t[0]=e.communityConfiguration,t[1]=n):n=t[1],t[2]!==e.communityConfiguration.etbOfferConfig?(a=[{value:"drivingLicenseB",label:(i=e.communityConfiguration.etbOfferConfig).drivingLicenseBLabel},{value:"drivingLicenseC",label:i.drivingLicenseCLabel},{value:"officeApp",label:i.officeAppLabel},{value:"programmingDB",label:i.programmingDBLabel},{value:"itSkills",label:i.itSkillsLabel},{value:"managment",label:i.managmentLabel},{value:"organisation",label:i.organisationLabel},{value:"projectManagment",label:i.projectManagmentLabel},{value:"marketing",label:i.marketingLabel},{value:"sales",label:i.salesLabel},{value:"legal",label:i.legalLabel},{value:"generalCareKnowledgeSkills",label:i.generalCareKnowledgeSkillsLabel}],t[2]=e.communityConfiguration.etbOfferConfig,t[3]=a):a=t[3],t[4]!==n||t[5]!==a?(r={...n,options:a},t[4]=n,t[5]=a,t[6]=r):r=t[6],r}function Pn(e){const t=(0,o.c)(7);let n,a;var i;let r;return t[0]!==e.communityConfiguration?(n=(0,Nt.I9)(e.communityConfiguration,"timeOfDay",!0),t[0]=e.communityConfiguration,t[1]=n):n=t[1],t[2]!==e.communityConfiguration.etbOfferConfig?(a=[{value:"morning",label:(i=e.communityConfiguration.etbOfferConfig).morningLabel},{value:"afternoon",label:i.afternoonLabel},{value:"evening",label:i.eveningLabel},{value:"individualTOD",label:i.individualLabel},{value:"halfDay",label:i.halfDayLabel},{value:"wholeDay",label:i.wholeDayLabel}],t[2]=e.communityConfiguration.etbOfferConfig,t[3]=a):a=t[3],t[4]!==n||t[5]!==a?(r={...n,options:a},t[4]=n,t[5]=a,t[6]=r):r=t[6],r}function xn({defaultProfile:e}){return{id:(0,T.k)(),zip:e.zipDefault??"",city:e.cityDefault??"",street:e.streetDefault??"",houseNumber:e.houseNumberDefault??"",door:e.doorDefault??"",lon:0,lat:0}}const Un=(0,P.A)("div",{target:"e1kmpgdb3"})("display:flex;flex-direction:column;gap:var(--spacing-s015);padding:var(--spacing-s025) 0;",(e=>e.isLast?"":"border-bottom: 1px solid var(--color-separator);"),";"),jn=(0,P.A)("div",{target:"e1kmpgdb2"}
1)({name:"r6dock",styles:"display:flex;justify-content:flex-end;margin-top:var(--spacing-s03)"}),Fn=(0,P.A)(x.N,{target:"e1kmpgdb1"})("--color-btn-unstyled:#e72222;font-weight:",U.Wy.semibold,";display:flex;gap:var(--spacing-s01);align-content:center;justify-content:flex-end;"),Rn=(0,P.A)("div",{target:"e1kmpgdb0"})({name:"6jdkwi",styles:"display:flex;justify-content:space-between;margin:var(--spacing-s02) 0"});var _n=n(89891),Bn=n(5137),Gn=n(1287);const zn=e=>{const t=(0,o.c)(99),{address:n,isLast:i,isOnlyOne:r,wasSaveClicked:l,id:s,addAddress:m,removeAddress:d,updateAddress:f}=e,g=(0,u.U)(),b=g.communityConfiguration.etbOfferConfig,p=g.communityConfiguration.general,[h,y]=(0,c.useState)(n.zip),[C,L]=(0,c.useState)(n.street),[E,T]=(0,c.useState)(n.houseNumber),[v,N]=(0,c.useState)(n.door??""),[S,M]=(0,c.useState)(n.city);let O;t[0]!==b.zipCodeLabel||t[1]!==h?(O=(0,qe.p)("zip",b.zipCodeLabel,h,y),t[0]=b.zipCodeLabel,t[1]=h,t[2]=O):O=t[2];const I=O;let w;t[3]!==b.streetLabel||t[4]!==C?(w=(0,qe.p)("street",b.streetLabel,C,L),t[3]=b.streetLabel,t[4]=C,t[5]=w):w=t[5];const A=w;let Y;t[6]!==E||t[7]!==b.houseNumberLabel?(Y=(0,qe.p)("houseNumber",b.houseNumberLabel,E,T),t[6]=E,t[7]=b.houseNumberLabel,t[8]=Y):Y=t[8];const k=Y;let D;t[9]!==S||t[10]!==b.cityLabel?(D=(0,qe.p)("city",b.cityLabel,S,M),t[9]=S,t[10]=b.cityLabel,t[11]=D):D=t[11];const P=D;let x;t[12]!==v||t[13]!==b.doorNumberLabel?(x=(0,qe.p)("door",b.doorNumberLabel,v,N),t[12]=v,t[13]=b.doorNumberLabel,t[14]=x):x=t[14];const U=x;let F;t[15]!==m?(F=()=>{m()},t[15]=m,t[16]=F):F=t[16];const R=F;let _;t[17]!==s||t[18]!==d?(_=()=>{d(s)},t[17]=s,t[18]=d,t[19]=_):_=t[19];const B=_;let G,z,$,V,W,H,X,K,J,Z,Q,ee,te,ne,oe,ae,ie,re,le,se,ce,ue;return t[20]!==S||t[21]!==v||t[22]!==E||t[23]!==s||t[24]!==C||t[25]!==f||t[26]!==h?(G=()=>{f(s,{zip:h,street:C,houseNumber:E,door:v,city:S,id:s})},z=[S,v,E,s,C,f,h],t[20]=S,t[21]=v,t[22]=E,t[23]=s,t[24]=C,t[25]=f,t[26]=h,t[27]=G,t[28]=z):(G=t[27],z=t[28]),(0,c.useEffect)(G,z),t[29]!==b.addressLabel?($=(0,a.Y)(_n.PS,{children:b.addressLabel}),t[29]=b.addressLabel,t[30]=$):$=t[30],t[31]!==g.communityConfiguration.etbOfferConfig||t[32]!==r||t[33]!==B?(V=!r&&(0,a.FD)(Fn,{onClick:B,children:[(0,a.Y)(q.p,{iconPath:Gn.R,className:"glyph-icon",width:(0,j.a)(12)}),g.communityConfiguration.etbOfferConfig.removeAddressLabel]}),t[31]=g.communityConfiguration.etbOfferConfig,t[32]=r,t[33]=B,t[34]=V):V=t[34],t[35]!==$||t[36]!==V?(W=(0,a.FD)(Rn,{children:[$,V]}),t[35]=$,t[36]=V,t[37]=W):W=t[37],t[38]!==p||t[39]!==b.zipCodeLabel||t[40]!==l||t[41]!==h?(H=(0,Ge.s)({name:"zip",label:b.zipCodeLabel,errorMessage:(0,je.h)(l,p,h)}),t[38]=p,t[39]=b.zipCodeLabel,t[40]=l,t[41]=h,t[42]=H):H=t[42],t[43]!==I?(X=(0,a.Y)(Xe.p,{...I}),t[43]=I,t[44]=X):X=t[44],t[45]!==H||t[46]!==X?(K=(0,a.Y)(We.E,{...H,children:X}),t[45]=H,t[46]=X,t[47]=K):K=t[47],t[48]!==p||t[49]!==b.streetLabel||t[50]!==C||t[51]!==l?(J=(0,Ge.s)({name:"street",label:b.streetLabel,errorMessage:(0,je.h)(l,p,C)}),t[48]=p,t[49]=b.streetLabel,t[50]=C,t[51]=l,t[52]=J):J=t[52],t[53]!==A?(Z=(0,a.Y)(Xe.p,{...A}),t[53]=A,t[54]=Z):Z=t[54],t[55]!==J||t[56]!==Z?(Q=(0,a.Y)(We.E,{...J,children:Z}),t[55]=J,t[56]=Z,t[57]=Q):Q=t[57],t[58]!==p||t[59]!==E||t[60]!==b.houseNumberLabel||t[61]!==l?(ee=(0,Ge.s)({name:"houseNumber",label:b.houseNumberLabel,errorMessage:(0,je.h)(l,p,E)}),t[58]=p,t[59]=E,t[60]=b.houseNumberLabel,t[61]=l,t[62]=ee):ee=t[62],t[63]!==k?(te=(0,a.Y)(Xe.p,{...k}),t[63]=k,t[64]=te):te=t[64],t[65]!==ee||t[66]!==te?(ne=(0,a.Y)(We.E,{...ee,children:te}),t[65]=ee,t[66]=te,t[67]=ne):ne=t[67],t[68]!==g.communityConfiguration.userProfile.optionalFieldLabel||t[69]!==b.doorNumberLabel?(oe=(0,Ge.s)({name:"door",label:b.doorNumberLabel,optional:!0,optionalLabel:g.communityConfiguration.userProfile.optionalFieldLabel}),t[68]=g.communityConfiguration.userProfile.optionalFieldLabel,t[69]=b.doorNumberLabel,t[70]=oe):oe=t[70],t[71]!==U?(ae=(0,a.Y)(Xe.p,{...U}),t[71]=U,t[72]=ae):ae=t[72],t[73]!==oe||t[74]!==ae?(ie=(0,a.Y)(We.E,{...oe,children:ae}),t[73]=oe,t[74]=ae,t[75]=ie):ie=t[75],t[76]!==S||t[77]!==p||t[78]!==b.cityLabel||t[79]!==l?(re=(0,Ge.s)({name:"city",label:b.cityLabel,errorMessage:(0,je.h)(l,p,S)}),t[76]=S,t[77]=p,t[78]=b.cityLabel,t[79]=l,t[80]=re):re=t[80],t[81]!==P?(le=(0,a.Y)(Xe.p,{...P}),t[81]=P,t[82]=le):le=t[82],t[83]!==re||t[84]!==le?(se=(0,a.Y)(We.E,{...re,children:le}),t[83]=re,t[84]=le,t[85]=se):se=t[85],t[86]!==R||t[87]!==g.communityConfiguration.etbOfferConfig||t[88]!==i?(ce=i&&(0,a.Y)(jn,{children:(0,a.Y)(Bn.r,{onClick:R,children:g.communityConfiguration.etbOfferConfig.addAddressLabel})}),t[86]=R,t[87]=g.communityConfiguration.etbOfferConfig,t[88]=i,t[89]=ce):ce=t[89],t[90]!==i||t[91]!==W||t[92]!==K||t[93]!==Q||t[94]!==ne||t[95]!==ie||t[96]!==se||t[97]!==ce?(ue=(0,a.FD)(Un,{isLast:i,children:[W,K,Q,ne,ie,se,ce]}),t[90]=i,t[91]=W,t[92]=K,t[93]=Q,t[94]=ne,t[95]=ie,t[96]=se,t[97]=ce,t[98]=ue):ue=t[98],ue};function qn(e,t){const n=e?function(e){const t=new Date(e);return`${t.getDate()}.${t.getMonth()+1}.${t.getFullYear()}`}(e):"";return[n,t??""]}function $n(){return{id:(0,T.k)(),zip:"",street:"",houseNumber:"",city:"",lon:0,lat:0}}function Vn({zip:e,street:t,houseNumber:n,city:o}){return""===e&&""===t&&""===n&&""===o}function Wn(e,t){const n=(0,o.c)(3);let a;return n[0]!==t||n[1]!==e?(a={label:t,name:e,cId:e,type:"SINGLE_DATE_WITH_TIME",dateMinimumType:"NONE",dateMaximumType:"NONE",componentType:"date-input"},n[0]=t,n[1]=e,n[2]=a):a=n[2],a}var Hn=n(65648);function Xn(e){const{common:t,periodicities:n,groupSize:o,startDateTime:a,endDateTime:i}=e;if(!o||!n||0===n.length||2!==a?.length||""===a[0].trim()||""===a[1].trim())return;let r={...t,offerType:"training",periodicities:n,groupSize:o,startDate:Kn(a[0]),startTime:a[1]};return i?.[0]&&(r={...r,endDate:Kn(i[0])}),i?.[1]&&(r={...r,endTime:i[1]}),r}function Kn(e){const[t,n,o]=e.split(".").map(Number);return`${o}-${String(n).padStart(2,"0")}-${String(t).padStart(2,"0")}`}function Jn(e,t,n,o){return{value:t,buttonLabels:n,labelBy:`${e}-label`,dispatchValue:e=>{o(e)}}}var Zn=n(54657);const Qn=({dispatch:e,ngoId:t,offer:n,defaultProfile:i})=>{const r=(0,u.U)(),l=r.communityConfiguration.general,s=r.communityConfiguration.etbUserProfileConfig,m=r.communityConfiguration.etbOfferConfig,d=(0,w.S)(),[f,g]=function(e){const t=(0,o.c)(7),n=(0,u.U
1)(),[a,i]=(0,I.s)(),r=e?"POST":"PUT";let l,s;return t[0]!==n.communityConfiguration.errorMessage.errorCodes||t[1]!==a||t[2]!==r?(l={fetchState:a,method:r,errorCodes:n.communityConfiguration.errorMessage.errorCodes,isModal:!0},t[0]=n.communityConfiguration.errorMessage.errorCodes,t[1]=a,t[2]=r,t[3]=l):l=t[3],(0,M.h)(l),(0,O.s)(a,n.communityConfiguration.errorMessage.successMessage),t[4]!==i||t[5]!==a?(s=[i,a],t[4]=i,t[5]=a,t[6]=s):s=t[6],s}(Boolean(n)),[b,p]=(0,c.useState)(!1),[h,y]=(0,c.useState)(n?.name??""),[T,v]=(0,c.useState)(n?.activated??!1),[N,S]=(0,c.useState)(n?.offerType??void 0),[A,Y]=(0,c.useState)(n?.email??i?.emailDefault??""),[k,D]=(0,c.useState)(n?.phone??i?.phoneDefault??""),[P,x]=(0,c.useState)(n?.description??""),[U,j]=(0,c.useState)(n?.addresses??(i?[xn({defaultProfile:i})]:[$n()])),[F,R]=(0,c.useState)(n?.periodicities??[]),[_,B]=(0,c.useState)(n?.timeOfDays??[]),[G,z]=(0,c.useState)(n?.skills??[]),[q,$]=(0,c.useState)(n?.languageSkills??[]),[V,W]=(0,c.useState)(n?.additionalInformation??""),[H,X]=(0,c.useState)(n?.activityTypes??[]),[K,J]=(0,c.useState)(n?.trainingNeeded??!1),[Z,Q]=(0,c.useState)(n?.requiredPeople??""),[ee,te]=(0,c.useState)(n?.donationTypes??[]),[ne,oe]=(0,c.useState)(n?.groupActivityTypes??[]),[ae,ie]=(0,c.useState)(n?.groupSize??"under5"),[re,le]=(0,c.useState)(n?qn(n.startDate,n.startTime):qn()),[se,ce]=(0,c.useState)(n?qn(n.endDate,n.endTime):qn());(0,c.useEffect)((()=>{!n&&i&&(Y((e=>(e||i.emailDefault)??"")),D((e=>(e||i.phoneDefault)??"")),j((e=>e.every(Vn)?[xn({defaultProfile:i})]:e)))}),[i,n]);const ue=(0,c.useMemo)((()=>(0,qe.p)("name",m.offerNameLabel,h,y)),[m,h]),me=(0,c.useMemo)((()=>(0,qe.p)("email",m.emailLabel,A,Y)),[m,A]),de=(0,c.useMemo)((()=>(0,qe.p)("phone",m.phoneLabel,k,D)),[m,k]),fe=(0,c.useMemo)((()=>ze({name:"description",value:P,setter:x,label:m.descriptionLabel,numberOfRows:9})),[m,P]),ge=function(e){const t=(0,o.c)(7);let n,a;var i;let r;return t[0]!==e.communityConfiguration?(n=(0,Nt.I9)(e.communityConfiguration,"status",!1),t[0]=e.communityConfiguration,t[1]=n):n=t[1],t[2]!==e.communityConfiguration.etbOfferConfig?(a=[{value:"active",label:(i=e.communityConfiguration.etbOfferConfig).activeLabel},{value:"inactive",label:i.inactiveLabel}],t[2]=e.communityConfiguration.etbOfferConfig,t[3]=a):a=t[3],t[4]!==n||t[5]!==a?(r={...n,options:a},t[4]=n,t[5]=a,t[6]=r):r=t[6],r}(r),be=function(e){const t=(0,o.c)(7);let n,a,i;return t[0]!==e.communityConfiguration?(n=(0,Nt.I9)(e.communityConfiguration,"offerType",!1),t[0]=e.communityConfiguration,t[1]=n):n=t[1],t[2]!==e.communityConfiguration.etbOfferConfig?(a=(0,Nt.VE)(e.communityConfiguration.etbOfferConfig),t[2]=e.communityConfiguration.etbOfferConfig,t[3]=a):a=t[3],t[4]!==n||t[5]!==a?(i={...n,options:a},t[4]=n,t[5]=a,t[6]=i):i=t[6],i}(r),pe=kn(r),he=Pn(r),ye=Dn(r),Ce=Yn(r),Le=Jn("additionalInfo",V,{ok:l.okButtonLabel,cancel:l.cancelButtonLabel},W),Ee=function(e){const t=(0,o.c)(7);let n,a;var i;let r;return t[0]!==e.communityConfiguration?(n=(0,Nt.I9)(e.communityConfiguration,"activities",!0),t[0]=e.communityConfiguration,t[1]=n):n=t[1],t[2]!==e.communityConfiguration.etbOfferConfig?(a=[{value:"generalCareActivityType",label:(i=e.communityConfiguration.etbOfferConfig).generalCareActivityTypeLabel},{value:"helpForElderlyAndSick",label:i.helpForElderlyAndSickLabel},{value:"workingWithElderlyPeople",label:i.workingWithElderlyPeopleLabel},{value:"workingWithChildrenYouth",label:i.workingWithChildrenYouthLabel},{value:"workingWithHandicappedPeople",label:i.workingWithHandicappedPeopleLabel},{value:"workingWithMigrants",label:i.workingWithMigrantsLabel},{value:"officeWork",label:i.officeWorkLabel},{value:"specialSkilledActivity",label:i.specialSkilledActivityLabel},{value:"visiting",label:i.visitingLabel},{value:"accompaniment",label:i.accompanimentLabel},{value:"gardening",label:i.gardeningLabel},{value:"craftWork",label:i.craftWorkLabel},{value:"cooking",label:i.cookingLabel},{value:"outdoor",label:i.outdoorLabel},{value:"other",label:i.otherLabel}],t[2]=e.communityConfiguration.etbOfferConfig,t[3]=a):a=t[3],t[4]!==n||t[5]!==a?(r={...n,options:a},t[4]=n,t[5]=a,t[6]=r):r=t[6],r}(r),Te=function(e){const t=(0,o.c)(7);let n,a;var i;let r;return t[0]!==e.communityConfiguration?(n=(0,Nt.I9)(e.communityConfiguration,"isTrainingNeeded",!1),t[0]=e.communityConfiguration,t[1]=n):n=t[1],t[2]!==e.communityConfiguration.userProfile?(a=[{value:"yes",label:(i=e.communityConfiguration.userProfile).yes},{value:"no",label:i.no}],t[2]=e.communityConfiguration.userProfile,t[3]=a):a=t[3],t[4]!==n||t[5]!==a?(r={...n,options:a},t[4]=n,t[5]=a,t[6]=r):r=t[6],r}(r),ve=(0,c.useMemo)((()=>(0,qe.p)("requiredPeople",m.requiredPeopleLabel,Z,Q)),[m,Z]),Ne=function(e){const t=(0,o.c)(7);let n,a;var i;let r;return t[0]!==e.communityConfiguration?(n=(0,Nt.I9)(e.communityConfiguration,"donations",!0),t[0]=e.communityConfiguration,t[1]=n):n=t[1],t[2]!==e.communityConfiguration.etbOfferConfig?(a=[{value:"childrenAndBabys",label:(i=e.communityConfiguration.etbOfferConfig).childrenAndBabysLabel},{value:"foodsAndHousekeeping",label:i.foodsAndHousekeepingLabel},{value:"clothing",label:i.clothingLabel},{value:"hygieneAndHealth",label:i.hygieneAndHealthLabel},{value:"officeAndSchool",label:i.officeAndSchoolLabel},{value:"gamesAndFun",label:i.gamesAndFunLabel},{value:"otherDonation",label:i.otherDonationLabel}],t[2]=e.communityConfiguration.etbOfferConfig,t[3]=a):a=t[3],t[4]!==n||t[5]!==a?(r={...n,options:a},t[4]=n,t[5]=a,t[6]=r):r=t[6],r}(r),Me=function(e){const t=(0,o.c)(7);let n,a;var i;let r;return t[0]!==e.communityConfiguration?(n=(0,Nt.I9)(e.communityConfiguration,"groupActivities",!0),t[0]=e.communityConfiguration,t[1]=n):n=t[1],t[2]!==e.communityConfiguration.etbOfferConfig?(a=[{value:"groupWorkingWithElderlyPeople",label:(i=e.communityConfiguration.etbOfferConfig).workingWithElderlyPeopleLabel},{value:"groupWorkingWithChildrenYouth",label:i.workingWithChildrenYouthLabel},{value:"groupWorkingWithHandicappedPeople",label:i.workingWithHandicappedPeopleLabel},{value:"groupWorkingWithMigrants",label:i.workingWithMigrantsLabel},{value:"groupAccompaniment",label:i.accompanimentLabel},{value:"groupSpecialSkilledActivity",label:i.specialSkilledActivityLabel},{value:"groupGardening",label:i.gardeningLabel},{value:"groupCraftWork",label:i.craftWorkLabel},{value:"groupCooking",label:i.cookingLabel},{value:"groupOutdoor",label:i.outdoorLabel},{value:"groupOther",label:i.otherLabel}],t[2]=e.communityConfiguration.etbOfferConfig,t[3]=a):a=t[3],t[4]!==n||t[5]!==a?(r={...n,options:a},t[4]=n,t[5]=a,t[6]=r):r=t[6],r}(r),Oe=function(e){const t=(0,o.c)(7);let n,a;var i;let r;return t[0]!==e.communityConfiguration?(n=(0,Nt.I9)(e.communityConfiguration,"groupSize",!1),t[0]=e.communityConfiguration,t[1]=n):n=t[1],t[2]!==e.communityConfiguration.etbOfferConfig?(a=[{value:"under5",label:(i=e.communityConfiguration.etbOfferConfig).under5Label},{value:"between5to10",label:i.between5To10Label},{value:"between10to20",label:i.between10To20Label},{value:"over20",label:i.over20Label}],t[2]=e.communityConfiguration.etbOfferConfig,t[3]=a):a=t[3],t[4]!==n||t[5]!==a?(r={...n,options:a},t[4]=n,t[5]=a,t[6]=r):r=t[6],r}(r),Ie=Wn("startDateTime",m.startDateLabel),we=Wn("endDateTime",m.expirationDateLabel),Ae=(0,c.useCallback)((()=>{j((e=>[...e,$n()]))}),[]),Ye=(0,c.useCallback)(((e,t)=>{j((n=>n.map((n=>n.id===e?{...t,lat:n.lat,lon:n.lon,id:n.id}:n))))}),[]),ke=(0,c.useCallback)((e=>{j((t=>t.filter((t=>
1t.id!==e))))}),[]),De=r.communityConfiguration.userProfile.optionalFieldLabel,Pe=(0,c.useCallback)((()=>{e(un()),e(mn(void 0))}),[e]);return(0,c.useEffect)((()=>{g.rawResponse?.ok&&(e({type:"RESET_TABLE"}),Pe())}),[Pe,e,g.isError,g.rawResponse?.ok]),(0,a.FD)(C.l,{type:"FORM",title:n?m.editOfferLabel:s.addOfferLabel,cancelText:l.cancelButtonLabel,cancelClick:()=>{e(un())},confirmText:n?l.saveButtonLabel:s.addOfferLabel,confirmClick:async()=>{if(p(!0),!N)return;let e;try{e=await async function(e,t){if(!(e.common.offerType&&e.common.name&&e.common.description&&e.common.email&&e.common.timeOfDays&&0!==e.common.timeOfDays.length))return;if(e.common.addresses.some((e=>{const{zip:t,street:n,houseNumber:o,city:a}=e;return""===t||""===n||""===o||""===a})))return;let n;switch(e.common.offerType){case"activity":n=function(e){const{common:t,activities:n,periodicities:o,isTrainingNeeded:a,requiredPeople:i}=e;if(n&&0!==n.length&&o&&0!==o.length)return{...t,offerType:"activity",activityTypes:n,periodicities:o,trainingNeeded:a??!1,requiredPeople:i}}(e);break;case"donation":n=function(e){const{common:t,donations:n,periodicities:o,isTrainingNeeded:a,requiredPeople:i}=e;if(n&&0!==n.length&&o&&0!==o.length)return{...t,offerType:"donation",donationTypes:n,periodicities:o,trainingNeeded:a??!1,requiredPeople:i}}(e);break;case"groupActivity":n=function(e){const{common:t,groupActivities:n,groupSize:o,isTrainingNeeded:a}=e;if(n&&0!==n.length&&o)return{...t,offerType:"groupActivity",groupActivityTypes:n,groupSize:o,trainingNeeded:a??!1}}(e);break;case"training":n=Xn(e);break;case"event":n=function(e){const{isTrainingNeeded:t}=e,n=Xn(e);if(n)return{...n,offerType:"event",trainingNeeded:t??!1}}(e)}if(!n)return;const o=await async function(e,t){return await Promise.all(e.map((async e=>{const n={...e};delete n.id;try{const e=await(0,Hn.H)(`${n.street} ${n.houseNumber} ${n.zip} ${n.city}`,t);return{...n,lat:e?.lat,lon:e?.lng}}catch(e){const t=e instanceof Error?e:new Error(String(e));throw new Error("Could not geocode address!",{cause:t})}})))}(e.common.addresses,t);return{...n,addresses:o}}({common:{offerType:N,name:h,description:P,email:A,phone:k,timeOfDays:_,skills:G,id:n?.id,profileId:t,languageSkills:q,additionalInformation:V,activated:T,addresses:U},periodicities:F,activities:H,donations:ee,isTrainingNeeded:K,requiredPeople:Z,groupActivities:ne,groupSize:ae,startDateTime:re,endDateTime:se},r.googleApiConfiguration.googleApiKey)}catch(e){return void console.warn("cannot save ",e)}e&&await async function(e,t,n,o){const a={headers:(0,E.d)(t),method:n.id?"PUT":"POST",body:JSON.stringify(n)},i=n.id?`${n.id}/`:"";await o(`${(0,L.y)(e)}/etb/offers/${i}new_design`,a)}(l,d.jwtToken,e,f)},cmpConsentConfiguration:r.cmpConsentConfiguration,children:[(0,a.FD)(a.FK,{children:[(0,a.Y)(We.E,{...(0,Ge.s)({name:"name",label:m.offerNameLabel,errorMessage:(0,je.h)(b,l,h)}),children:(0,a.Y)(Xe.p,{...ue})}),(0,a.Y)(We.E,{...(0,Ge.s)({name:ge.name,label:m.statusLabel}),children:(0,a.Y)(At.A,{disabled:!1,dispatchValue:e=>{v("active"===e.map((e=>e.value))[0])},selectInputConfig:ge,value:(0,wt.o)(ge.options,T?"active":"inactive")})}),(0,a.Y)(We.E,{...(0,Ge.s)({name:be.name,label:m.typeOfOfferLabel,errorMessage:(0,je.h)(b,l,N)}),children:(0,a.Y)(At.A,{disabled:!1,dispatchValue:e=>{S(e.map((e=>e.value))[0])},selectInputConfig:be,value:(0,wt.o)(be.options,N)})}),"activity"===N&&(0,a.Y)(We.E,{...(0,Ge.s)({name:Ee.name,label:m.activityLabel,errorMessage:(0,je.h)(b,l,H)}),children:(0,a.Y)(At.A,{disabled:!1,dispatchValue:e=>{X(e.map((e=>e.value)))},selectInputConfig:Ee,value:(0,wt.o)(Ee.options,H)})}),"donation"===N&&(0,a.Y)(We.E,{...(0,Ge.s)({name:Ne.name,label:m.donationLabel,errorMessage:(0,je.h)(b,l,ee)}),children:(0,a.Y)(At.A,{disabled:!1,dispatchValue:e=>{te(e.map((e=>e.value)))},selectInputConfig:Ne,value:(0,wt.o)(Ne.options,ee)})}),"groupActivity"===N&&(0,a.Y)(We.E,{...(0,Ge.s)({name:Me.name,label:m.groupActivityLabel,errorMessage:(0,je.h)(b,l,ne)}),children:(0,a.Y)(At.A,{disabled:!1,dispatchValue:e=>{oe(e.map((e=>e.value)))},selectInputConfig:Me,value:(0,wt.o)(Me.options,ne)})}),U.map(((e,t)=>(0,a.Y)(zn,{address:e,wasSaveClicked:b,isLast:t===U.length-1,id:e.id,isOnlyOne:1===U.length,addAddress:Ae,removeAddress:ke,updateAddress:Ye},e.id))),(0,a.Y)(We.E,{...(0,Ge.s)({name:"email",label:m.emailLabel,errorMessage:(0,je.h)(b,l,A)}),children:(0,a.Y)(Xe.p,{...me})}),(0,a.Y)(We.E,{...(0,Ge.s)({optionalLabel:De,name:"phone",label:m.phoneLabel,optional:!0}),children:(0,a.Y)(Xe.p,{...de})}),(0,a.Y)(We.E,{...(0,Ge.s)({name:"description",label:m.descriptionLabel,errorMessage:(0,je.h)(b,l,P)}),children:(0,a.Y)(He.N,{...fe})}),"groupActivity"!==N&&(0,a.Y)(We.E,{...(0,Ge.s)({name:pe.name,label:m.periodicityLabel,errorMessage:(0,je.h)(b,l,F)}),children:(0,a.Y)(At.A,{disabled:!1,dispatchValue:e=>{R(e.map((e=>e.value)))},selectInputConfig:pe,value:(0,wt.o)(pe.options,F)})}),(0,a.Y)(We.E,{...(0,Ge.s)({name:he.name,label:m.timeOfDayLabel,errorMessage:(0,je.h)(b,l,_)}),children:(0,a.Y)(At.A,{disabled:!1,dispatchValue:e=>{B(e.map((e=>e.value)))},selectInputConfig:he,value:(0,wt.o)(he.options,_)})}),("training"===N||"event"===N)&&(0,a.FD)(a.FK,{children:[(0,a.Y)(We.E,{...(0,Ge.s)({name:Ie.name,label:m.startDateLabel,errorMessage:(0,je.k)(b,l,re)}),children:(0,a.Y)(Zn.Y,{value:re,dateInputConfig:Ie,handleOnChange:e=>{le(e)},disabled:!1,validate:!1,error:void 0})}),(0,a.Y)(We.E,{...(0,Ge.s)({name:we.name,label:m.expirationDateLabel,optional:!0,optionalLabel:De}),children:(0,a.Y)(Zn.Y,{value:se,dateInputConfig:we,handleOnChange:e=>{ce(e)},disabled:!1,validate:!1,error:void 0})})]}),"training"!==N&&(0,a.Y)(We.E,{...(0,Ge.s)({name:Te.name,label:m.trainingLabel}),children:(0,a.Y)(At.A,{disabled:!1,dispatchValue:e=>{J("yes"===e.map((e=>e.value))[0])},selectInputConfig:Te,value:(0,wt.o)(Te.options,K?"yes":"no")})}),("activity"===N||"donation"===N)&&(0,a.Y)(We.E,{...(0,Ge.s)({optionalLabel:De,name:"requiredPeople",label:m.requiredPeopleLabel,optional:!0}),children:(0,a.Y)(Xe.p,{...ve})}),("groupActivity"===N||"event"===N||"training"===N)&&(0,a.Y)(We.E,{...(0,Ge.s)({name:Oe.name,label:m.groupSizeLabel,errorMessage:(0,je.h)(b,l,ae)}),children:(0,a.Y)(At.A,{disabled:!1,dispatchValue:e=>{ie(e.map((e=>e.value))[0])},selectInputConfig:Oe,value:(0,wt.o)(Oe.options,ae)})}),(0,a.Y)(We.E,{...(0,Ge.s)({optionalLabel:De,optional:!0,name:ye.name,label:m.knowledgeSkillsLabel}),children:(0,a.Y)(At.A,{disabled:!1,dispatchValue:e=>{z(e.map((e=>e.value)))},selectInputConfig:ye,value:(0,wt.o)(ye.options,G??[])})}),(0,a.Y)(We.E,{...(0,Ge.s)({optionalLabel:De,optional:!0,name:Ce.name,label:m.languageSkillsLabel}),children:(0,a.Y)(At.A,{disabled:!1,dispatchValue:e=>{$(e.map((e=>e.value)))},selectInputConfig:Ce,value:(0,wt.o)(Ce.options,q??[])})}),(0,a.Y)(We.E,{...(0,Ge.s)({optionalLabel:De,optional:!0,name:"additionalInfo",label:m.additionalInformationLabel}),children:(0,a.Y)(An,{...Le})})]}),g.isLoading&&(0,a.Y)(Se.h,{})]})},eo=(0,ae.Ik)({id:(0,ae.ai)(),emailDefault:(0,ae.lq)((0,ae.Yj)()),phoneDefault:(0,ae.lq)((0,ae.Yj)()),zipDefault:(0,ae.lq)((0,ae.Yj)()),cityDefault:(0,ae.lq)((0,ae.Yj)()),streetDefault:(0,ae.lq)((0,ae.Yj)()),house
1NumberDefault:(0,ae.lq)((0,ae.Yj)()),doorDefault:(0,ae.lq)((0,ae.Yj)())}),to=e=>{const t=(0,o.c)(5),{dispatch:n,ngoId:i}=e,[r,l]=function(e){const t=(0,o.c)(13),n=(0,u.U)();let a;t[0]!==n.communityConfiguration.general?(a=(0,L.y)(n.communityConfiguration.general),t[0]=n.communityConfiguration.general,t[1]=a):a=t[1];const i=a,r=(0,w.S)();let l;t[2]!==n.communityConfiguration.errorMessage.errorCodes?(l={method:"GET",responseStruct:eo,errorCodes:n.communityConfiguration.errorMessage.errorCodes},t[2]=n.communityConfiguration.errorMessage.errorCodes,t[3]=l):l=t[3];const[s,m,d]=(0,oe.q)(l);let f,g,b;return t[4]!==m||t[5]!==e||t[6]!==i||t[7]!==r.jwtToken?(f=()=>{const t={headers:(0,E.d)(r.jwtToken),method:"GET"};m(`${i}/etb/profiles/default/${e}`,t)},g=[m,r.jwtToken,i,e],t[4]=m,t[5]=e,t[6]=i,t[7]=r.jwtToken,t[8]=f,t[9]=g):(f=t[8],g=t[9]),(0,c.useEffect)(f,g),t[10]!==s||t[11]!==d?(b=[s,d],t[10]=s,t[11]=d,t[12]=b):b=t[12],b}(i);if(l){let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.Y)(Se.h,{}),t[0]=e):e=t[0],e}let s;return t[1]!==r||t[2]!==n||t[3]!==i?(s=(0,a.Y)(Qn,{dispatch:n,ngoId:i,defaultProfile:r}),t[1]=r,t[2]=n,t[3]=i,t[4]=s):s=t[4],s},no=e=>{const t=(0,o.c)(19),{actualOffer:n,dispatch:i}=e,r=(0,u.U)(),l=r.communityConfiguration.general,s=r.communityConfiguration.etbUserProfileConfig,m=(0,w.S)(),[d,f]=function(){const e=(0,o.c)(6),t=(0,u.U)(),[n,a]=(0,I.s)();let i,r;return e[0]!==t.communityConfiguration.errorMessage.errorCodes||e[1]!==n?(i={fetchState:n,method:"DELETE",errorCodes:t.communityConfiguration.errorMessage.errorCodes,isModal:!0},e[0]=t.communityConfiguration.errorMessage.errorCodes,e[1]=n,e[2]=i):i=e[2],(0,M.h)(i),(0,O.s)(n,t.communityConfiguration.errorMessage.successMessage),e[3]!==a||e[4]!==n?(r=[a,n],e[3]=a,e[4]=n,e[5]=r):r=e[5],r}();let g,b,p;t[0]!==i||t[1]!==f.response?(g=()=>{f.response&&(i({type:"RESET_TABLE"}),i(un()))},t[0]=i,t[1]=f.response,t[2]=g):g=t[2],t[3]!==i||t[4]!==f?(b=[f,i],t[3]=i,t[4]=f,t[5]=b):b=t[5],(0,c.useEffect)(g,b),t[6]!==n.id||t[7]!==d||t[8]!==l||t[9]!==m.jwtToken?(p=async()=>{await async function(e,t,n,o){const a={headers:(0,E.d)(t),method:"DELETE"};await o(`${(0,L.y)(e)}/etb/offers/${n}`,a)}(l,m.jwtToken,n.id,d)},t[6]=n.id,t[7]=d,t[8]=l,t[9]=m.jwtToken,t[10]=p):p=t[10];const h=p;let y;t[11]!==i?(y=()=>{i(un())},t[11]=i,t[12]=y):y=t[12];const T=y;let v;return t[13]!==T||t[14]!==s.deleteOfferLabel||t[15]!==s.deleteOfferMessage||t[16]!==l.cancelButtonLabel||t[17]!==h?(v=(0,a.Y)(C.l,{type:"CONFIRM",title:s.deleteOfferLabel,message:s.deleteOfferMessage,confirmClick:h,cancelText:l.cancelButtonLabel,confirmText:s.deleteOfferLabel,cancelClick:T}),t[13]=T,t[14]=s.deleteOfferLabel,t[15]=s.deleteOfferMessage,t[16]=l.cancelButtonLabel,t[17]=h,t[18]=v):v=t[18],v},oo=e=>{const t=(0,o.c)(15),{id:n,dispatch:i}=e,r=(0,u.U)().cmpConsentConfiguration,l=(0,u.U)().communityConfiguration;let s;t[0]!==i?(s=()=>{i(un())},t[0]=i,t[1]=s):s=t[1];const c=s;let m;t[2]!==i?(m=()=>{i(un("EDIT"))},t[2]=i,t[3]=m):m=t[3];const d=m;let f,g;return t[4]!==c||t[5]!==l||t[6]!==n?(f=(0,a.Y)(Y.i,{offerId:n,socialConfig:l,handleNGOFilter:c,setOfferDetailsId:c}),t[4]=c,t[5]=l,t[6]=n,t[7]=f):f=t[7],t[8]!==c||t[9]!==r||t[10]!==l.etbUserProfileConfig.editOfferLabel||t[11]!==l.general.cancelButtonLabel||t[12]!==d||t[13]!==f?(g=(0,a.Y)(C.l,{type:"CONFIRM",theme:"theme-white",cancelText:l.general.cancelButtonLabel,cancelClick:c,confirmText:l.etbUserProfileConfig.editOfferLabel,confirmClick:d,cmpConsentConfiguration:r,children:f}),t[8]=c,t[9]=r,t[10]=l.etbUserProfileConfig.editOfferLabel,t[11]=l.general.cancelButtonLabel,t[12]=d,t[13]=f,t[14]=g):g=t[14],g},ao=e=>{const t=(0,o.c)(12),{id:n,ngoId:i,dispatch:r}=e,l=(0,u.U)();let s;t[0]!==l.communityConfiguration.general?(s=(0,L.y)(l.communityConfiguration.general),t[0]=l.communityConfiguration.general,t[1]=s):s=t[1];const[m,d]=function(e,t,n){const a=(0,o.c)(11),i=(0,w.S)();let r;a[0]!==n?(r={method:"GET",responseStruct:Ee,errorCodes:n},a[0]=n,a[1]=r):r=a[1];const[l,s,u]=(0,oe.q)(r);let m,d,f;return a[2]!==s||a[3]!==t||a[4]!==e||a[5]!==i.jwtToken?(m=()=>{const n={headers:(0,E.d)(i.jwtToken),method:"GET"};s(`${e}/etb/offers/${t}/new_design`,n)},d=[s,i.jwtToken,e,t],a[2]=s,a[3]=t,a[4]=e,a[5]=i.jwtToken,a[6]=m,a[7]=d):(m=a[6],d=a[7]),(0,c.useEffect)(m,d),a[8]!==l||a[9]!==u?(f=[l,u],a[8]=l,a[9]=u,a[10]=f):f=a[
110],f}(s,n,l.communityConfiguration.errorMessage.errorCodes);let f,g,b;return t[2]!==d?(f=!d&&(0,a.Y)(Se.h,{}),t[2]=d,t[3]=f):f=t[3],t[4]!==m||t[5]!==r||t[6]!==d||t[7]!==i?(g=m&&!d&&(0,a.Y)(Qn,{dispatch:r,ngoId:i,offer:m}),t[4]=m,t[5]=r,t[6]=d,t[7]=i,t[8]=g):g=t[8],t[9]!==f||t[10]!==g?(b=(0,a.FD)(a.FK,{children:[f,g]}),t[9]=f,t[10]=g,t[11]=b):b=t[11],b},io=(0,P.A)("div",{target:"e1q5dtll0"})({name:"1311dp1",styles:"display:flex;flex-direction:column;gap:var(--spacing-s02);padding:var(--spacing-s04) 0"});function ro(e){const t=(0,o.c)(7);let n;return t[0]!==e.allLabel||t[1]!==e.clearAll||t[2]!==e.filtersLabel||t[3]!==e.itemsFound||t[4]!==e.noResultInfo||t[5]!==e.searchPlaceholder?(n={all:e.allLabel,clearAll:e.clearAll,itemsFound:e.itemsFound,noResults:e.noResultInfo,searchPlaceholder:e.searchPlaceholder,filters:e.filtersLabel},t[0]=e.allLabel,t[1]=e.clearAll,t[2]=e.filtersLabel,t[3]=e.itemsFound,t[4]=e.noResultInfo,t[5]=e.searchPlaceholder,t[6]=n):n=t[6],n}var lo=n(47516),so=n(82732),co=n(98164),uo=n(78357),mo=n(17390),fo=n(68257);const go=e=>{const t=(0,o.c)(21),{label:n,name:i,placeholder:r,type:l,options:s}=e,[u,m]=(0,c.useState)(""),[d,f]=(0,c.useState)(s),g=(0,fo.i)(i);let b;t[0]!==s||t[1]!==g?(b=(0,co.R)(s,g,!1),t[0]=s,t[1]=g,t[2]=b):b=t[2];const p=b,{rootOnChangeCallback:h}=(0,mo.K)(),y=(0,uo._)(i);let C;(0,lo.s)(m,p),t[3]!==s||t[4]!==r||t[5]!==u?(C={query:u,placeholder:r,selectedOptionCountLabel:"",onQueryInput(e){m(e),f(e?s.filter((t=>t.label.toLowerCase().includes(e.toLowerCase()))):s)},type:"COMBOBOX",defaultOptions:s},t[3]=s,t[4]=r,t[5]=u,t[6]=C):C=t[6];const L=C;let E,T,v;return t[7]!==i||t[8]!==h||t[9]!==p||t[10]!==l?(E=()=>{h(i,l,p)},T=[i,l,h,p],t[7]=i,t[8]=h,t[9]=p,t[10]=l,t[11]=E,t[12]=T):(E=t[11],T=t[12]),(0,c.useEffect)(E,T),t[13]!==y||t[14]!==n||t[15]!==i||t[16]!==r||t[17]!==L||t[18]!==d||t[19]!==p?(v=(0,a.Y)(so.P,{options:d,label:n,name:i,value:p,internalOnChangeCallback:y,disabled:!1,searchConfig:L,placeholder:r}),t[13]=y,t[14]=n,t[15]=i,t[16]=r,t[17]=L,t[18]=d,t[19]=p,t[20]=v):v=t[20],v};var bo=n(71985);function po(){return(0,bo.css)("max-width:",(0,j.a)(705),";","")}const ho=(0,P.A)("div",{target:"e4x5d979"})("min-height:",(0,j.a)(400),";"),yo=(0,P.A)("div",{target:"e4x5d978"})(po,";display:flex;flex-direction:column;gap:var(--spacing-s025);@media (min-width: ",U.fi.sm,"px){margin-inline:auto;}"),Co=(0,P.A)("div",{target:"e4x5d977"})("display:flex;flex-direction:column;gap:var(--spacing-s03);justify-content:space-between;align-items:center;padding:var(--spacing-s03) 0;border-bottom:1px solid var(--color-separator);@media (min-width: ",U.fi.sm,"px){flex-direction:row;}"),Lo=(0,P.A)("div",{target:"e4x5d976"})({name:"n7vcsb",styles:"display:flex;align-items:center;gap:var(--spacing-s025)"}),Eo=(0,P.A)("div",{target:"e4x5d975"})("display:flex;flex-direction:column;justify-content:flex-end;gap:var(--spacing-s01);width:100%;@media (min-width: ",U.fi.sm,"px){flex-direction:row;width:auto;}"),To=(0,P.A)("div",{target:"e4x5d974"})({name:"10xbj18",styles:"display:flex;align-items:center;justify-content:center;background:#eef4fe;border-radius:50%;padding:var(--spacing-s02);color:#135ee2"}),vo=(0,P.A)("p",{target:"e4x5d973"})({name:"1nu6tll",styles:"--margin-paragraph:0;line-height:1.3"}),No=(0,P.A)("span",{target:"e4x5d972"})("font-size:",(0,j.a)(18),";font-weight:bold;margin-right:var(--spacing-s01);"),So=(0,P.A)("span",{target:"e4x5d971"})("color:#537091;font-size:",(0,j.a)(14),";"),Mo=(0,P.A)(x.N,{target:"e4x5d970"})({name:"1e3f55n",styles:"--color-btn-unstyled:var(--color-link);display:flex;flex-direction:row;gap:var(--spacing-s01);align-items:center"});var Oo=n(68093);const Io="ngo",wo=e=>{const t=(0,o.c)(34),{ngos:n,dispatch:i,count:r}=e,l=(0,u.U)().communityConfiguration;let s;t[0]!==n?(s=n.map(Ao),t[0]=n,t[1]=s):s=t[1];const c=s,m=ro(l.userProfile),d=(0,w.S)();let f;t[2]!==l.general.communityId||t[3]!==d.userRoles?(f=(0,Qt.m)(l.general.communityId,d.userRoles),t[2]=l.general.communityId,t[3]=d.userRoles,t[4]=f):f=t[4];const g="NGO_ADMIN"===f;let b;t[5]!==l.general.communityId||t[6]!==d.userRoles?(b=(0,Qt.m)(l.general.communityId,d.userRoles),t[5]=l.general.communityId,t[6]=d.userRoles,t[7]=b):b=t[7];const p="NGO_USER"===b;let h;t[8]!==i?(h=()=>{i(un("ADD"))},t[8]=i,t[9]=h):h=t[9];const C=h;let L;t[10]!==i?(L=()=>{i(un("CONTACT"))},t[10]=i,t[11]=L):L=t[11];const E=L;let T;t[12]!==i?(T=e=>{i(dn(e))},t[12]=i,t[13]=T):T=t[13];const v=T;let N,S,M,O,I;return t[14]!==l.etbUserProfileConfig.ngoAdminsUsersContactButtonLabel||t[15]!==E?(N=l.etbUserProfileConfig.ngoAdminsUsersContactButtonLabel&&(0,a.Y)(Bn.r,{onClick:E,children:l.etbUserProfileConfig.ngoAdminsUsersContactButtonLabel}),t[14]=l.etbUserProfileConfig.ngoAdminsUsersContactButtonLabel,t[15]=E,t[16]=N):N=t[16],t[17]!==C||t[18]!==l.etbUserProfileConfig.addOfferLabel?(S=(0,a.Y)(yt,{onClick:C,children:l.etbUserProfileConfig.addOfferLabel}),t[17]=C,t[18]=l.etbUserProfileConfig.addOfferLabel,t[19]=S):S=t[19],t[20]!==N||t[21]!==S?(M=(0,a.FD)(Eo,{children:[N,S]}),t[20]=N,t[21]=S,t[22]=M):M=t[22],t[23]!==l.etbUserProfileConfig.selectNgoLabel||t[24]!==r||t[25]!==v||t[26]!==g||t[27]!==p||t[28]!==m||t[29]!==c?(O=!g&&!p&&(0,a.Y)(Oo.s,{cId:y.f,labels:m,onFiltersChange:v,filteredCount:r,children:(0,a.Y)(go,{placeholder:"",label:l.etbUserProfileConfig.selectNgoLabel,name:Io,options:c,type:"NGO"})}),t[23]=l.etbUserProfileConfig.selectNgoLabel,t[24]=r,t[25]=v,t[26]=g,t[27]=p,t[28]=m,t[29]=c,t[30]=O):O=t[30],t[31]!==O||t[32]!==M?(I=(0,a.FD)(io,{children:[M,O]}),t[31]=O,t[32]=M,t[33]=I):I=t[33],I};function Ao(e){return{value:String(e.id),label:e.name}}var Yo=n(47695);const ko=e=>{const t=(0,o.c)(2),n=function(e){const t=(0,o.c)(33),{config:n,offer:i,dispatch:r}=e,l=n.communityConfiguration.etbOfferConfig,s=n.communityConfiguration.etbUserProfileConfig;let c;t[0]!==r||t[1]!==i?(c=e=>()=>{r(un(e)),r(mn(i))},t[0]=r,t[1]=i,t[2]=c):c=t[2];const u=c;let m,d,f,g,b,p,h,y,C;t[3]!==l.offerInformationLabel||t[4]!==u?(m=e=>(0,a.Y)(z,{handleClick:u("DETAIL"),label:l.offerInformationLabel,optionProps:e}),t[3]=l.offerInformationLabel,t[4]=u,t[5]=m):m=t[5],t[6]!==l.offerInformationLabel||t[7]!==m?(d={label:m,value:l.offerInformationLabel},t[6]=l.offerInformationLabel,t[7]=m,t[8]=d):d=t[8],t[9]!==l.editOfferLabel||t[10]!==u?(f=e=>(0,a.Y)(z,{handleClick:u("EDIT"),label:l.editOfferLabel,optionProps:e}
1),t[9]=l.editOfferLabel,t[10]=u,t[11]=f):f=t[11],t[12]!==l.editOfferLabel||t[13]!==f?(g={label:f,value:l.editOfferLabel},t[12]=l.editOfferLabel,t[13]=f,t[14]=g):g=t[14],t[15]!==s||t[16]!==i||t[17]!==u?(b=e=>(0,a.Y)(z,{handleClick:u(i.activated?"INACTIVATE":"ACTIVATE"),label:i.activated?s.deactivateOfferLabel:s.activateOfferLabel,optionProps:e}),t[15]=s,t[16]=i,t[17]=u,t[18]=b):b=t[18],t[19]!==l.statusLabel||t[20]!==b?(p={label:b,value:l.statusLabel},t[19]=l.statusLabel,t[20]=b,t[21]=p):p=t[21],t[22]!==l.deleteOfferLabel||t[23]!==u?(h=e=>(0,a.Y)(z,{handleClick:u("DELETE"),label:l.deleteOfferLabel,optionProps:e}),t[22]=l.deleteOfferLabel,t[23]=u,t[24]=h):h=t[24],t[25]!==l.deleteOfferLabel||t[26]!==h?(y={label:h,value:l.deleteOfferLabel},t[25]=l.deleteOfferLabel,t[26]=h,t[27]=y):y=t[27],t[28]!==d||t[29]!==g||t[30]!==p||t[31]!==y?(C=[d,g,p,y],t[28]=d,t[29]=g,t[30]=p,t[31]=y,t[32]=C):C=t[32];return C}(e);let i;return t[0]!==n?(i=(0,a.Y)(W,{options:n}),t[0]=n,t[1]=i):i=t[1],i},Do=new Intl.DateTimeFormat("de",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"});function Po(e,t,n){const o=n.communityConfiguration.etbOfferConfig;switch(e){case"name":return t.name;case"type":return xo(o,t.offerType);case"timeOfDays":return t.timeOfDays.map((e=>xo(o,e))).join(", ");case"periodicities":return t.periodicities.map((e=>xo(o,e))).join(", ");case"createdAt":return t.createdAt?Do.format(new Date(t.createdAt)):"";case"updatedAt":return t.updatedAt?Do.format(new Date(t.updatedAt)):"";default:return""}}function xo(e,t){return e[`${t}Label`]}function Uo(e,t,n,o){switch(e){case"status":return(0,a.Y)(Zt,{type:t.activated?"ACTIVE":"INACTIVE",activeLabel:n.communityConfiguration.etbOfferConfig.activeLabel,inactiveLabel:n.communityConfiguration.etbOfferConfig.inactiveLabel});case"actions":return(0,a.Y)(ko,{config:n,offer:t,dispatch:o});default:return(0,a.Y)(a.FK,{})}}const jo=e=>{const t=(0,o.c)(19),{offers:n,count:i,dispatch:r}=e,l=(0,m.useGemStore)(Fo),s=(0,u.U)(),[d,f]=(0,Yo.Wx)();let g;t[0]!==s||t[1]!==r||t[2]!==n?(g=function(e,t,n){const o=function(e){const t=e.communityConfiguration.etbOfferConfig;return[{type:"TEXT",apiFieldName:"name",sorting:!1,title:t.offerNameLabel},{type:"TEXT",apiFieldName:"type",sorting:!1,title:t.typeOfOfferLabel},{type:"TEXT",apiFieldName:"timeOfDays",sorting:!1,title:t.timeOfDayLabel},{type:"TEXT",apiFieldName:"periodicities",sorting:!1,title:t.periodicityLabel},{type:"TEXT",apiFieldName:"createdAt",sorting:!1,title:t.createdLabel},{type:"TEXT",apiFieldName:"updatedAt",sorting:!1,title:t.modifiedLabel},{type:"COMPONENT",apiFieldName:"status",sorting:!1,title:t.statusLabel},{type:"COMPONENT",apiFieldName:"actions",sorting:!1}]}(t),a={columns:[],data:[],id:(0,T.k)()};return a.columns=[o.map((e=>({id:(0,T.k)(),name:e.apiFieldName,label:e.title??"",type:e.type,sorting:e.sorting})))],a.data=e.map(((e,a)=>o.reduce(((o,i,r)=>{let l;switch(i.type){case"TEXT":l={type:"TEXT",id:`${a}-${r}`,value:Po(i.apiFieldName,e,t),valueForSorting:""};break;case"COMPONENT":l={type:"COMPONENT",id:`${a}-${r}`,value:Uo(i.apiFieldName,e,t,n),valueForSorting:""}}return l?{...o,[i.apiFieldName]:l}:o}),{}))),a}(n,s,r),t[0]=s,t[1]=r,t[2]=n,t[3]=g):g=t[3];const b=g;let p,h,y,C,L;return t[4]!==r||t[5]!==f||t[6]!==n.length?(p=()=>{f&&r({offset:n.length,type:"LOAD_MORE"})},h=[r,f,n.length],t[4]=r,t[5]=f,t[6]=n.length,t[7]=p,t[8]=h):(p=t[7],h=t[8]),(0,c.useEffect)(p,h),t[9]!==l||t[10]!==b?(y=(0,a.Y)(D.d,{tableData:b,isMobile:l}),t[9]=l,t[10]=b,t[11]=y):y=t[11],t[12]!==i||t[13]!==d||t[14]!==n.length?(C=n.length!==i&&(0,a.Y)("div",{ref:d}),t[12]=i,t[13]=d,t[14]=n.length,t[15]=C):C=t[15],t[16]!==y||t[17]!==C?(L=(0,a.FD)(B,{children:[y,C]}),t[16]=y,t[17]=C,t[18]=L):L=t[18],L};function Fo(e){return e.mediaBreakpoint<ee.E.SM}var Ro=n(90124),_o=n(21065);const Bo=()=>{const e=(0,o.c)(83),t=(0,u.U)(),n=t.communityConfiguration.etbUserProfileConfig,[i,r]=(0,c.useReducer)(fn,gn),[l,s]=bt(),[m,d]=function(){const e=(0,o.c)(6),t=(0,u.U)();let n;e[0]!==t.communityConfiguration.errorMessage.errorCodes?(n={method:"GET",responseStruct:De,errorCodes:t.communityConfiguration.errorMessage.errorCodes},e[0]=t.communityConfiguration.errorMessage.errorCodes,e[1]=n):n=e[1];const[a,i,r]=(0,oe.q)(n);let l;return e[2]!==a||e[3]!==i||e[4]!==r?(l=[i,a,r],e[2]=a,e[3]=i,e[4]=r,e[5]=l):l=e[5],l}(),f=(0,w.S)();let g;e[0]!==t.communityConfiguration.general.communityId||e[1]!==f.userRoles?(g=(0,Qt.m)(t.communityConfiguration.general.communityId,f.userRoles),e[0]=t.communityConfiguration.general.communityId,e[1]=f.userRoles,e[2]=g):g=e[2];const b="NGO_ADMIN"===g;let p;e[3]!==t.communityConfiguration.general.communityId||e[4]!==f.userRoles?(p=(0,Qt.m)(t.communityConfiguration.general.communityId,f.userRoles),e[3]=t.communityConfiguration.general.communityId,e[4]=f.userRoles,e[5]=p):p=e[5];const h="NGO_USER"===p;let C;e[6]!==i.filters?(C=i.filters?.find(Go),e[6]=i.filters,e[7]=C):C=e[7];const T=C,v=Array.isArray(T?.value)?T.value[0]?.value:void 0,N=v?Number(v):void 0;let S;e[8]!==i.filters||e[9]!==i.forceResetTrigger||e[10]!==i.offset?(S=function(e,t){const n={offset:String(e),limit:String(10)};return t&&0!==t.length?(t.forEach((e=>{"NGO"===e.type&&Array.isArray(e.value)&&(n.profile_ids=e.value[0].value)})),n):n}(i.offset,i.filters,i.forceResetTrigger),e[8]=i.filters,e[9]=i.forceResetTrigger,e[10]=i.offset,e[11]=S):S=e[11];const M=S;let O;e[12]!==t.communityConfiguration.general?(O=(0,L.y)(t.communityConfiguration.general),e[12]=t.communityConfiguration.general,e[13]=O):O=e[13];const[I,A]=function(e,t,n){const a=(0,o.c)(11),i=(0,w.S)();let r;a[0]!==n?(r={method:"GET",responseStruct:Ce,errorCodes:n},a[0]=n,a[1]=r):r=a[1];const[l,s,u]=(0,oe.q)(r);let m,d,f;return a[2]!==s||a[3]!==t||a[4]!==e||a[5]!==i.jwtToken?(m=()=>{if(!t.profile_ids)return;const n={headers:(0,E.d)(i.jwtToken),method:"GET"},o=`${(0,Ro._)(t)}`;s(`${e}/etb/offers/new_design?${o}`,n)},d=[s,i.jwtToken,e,t],a[2]=s,a[3]=t,a[4]=e,a[5]=i.jwtToken,a[6]=m,a[7]=d):(m=a[6],d=a[7]),(0,c.useEffect)(m,d),a[8]!==l||a[9]!==u?(f=[l,u],a[8]=l,a[9]=u,a[10]=f):f=a[
110],f}(O,M,t.communityConfiguration.errorMessage.errorCodes);let Y,k,D,P,x,U,j,F,R;e[14]!==b||e[15]!==h||e[16]!==l?(Y=()=>{if(!b&&!h&&l&&l.length>0){(0,_o.n1)(y.f,String(l[0].id),Io);const e={type:"NGO",name:Io,value:[{value:String(l[0].id),label:l[0].name}]};r(dn([e]))}},k=[b,h,l],e[14]=b,e[15]=h,e[16]=l,e[17]=Y,e[18]=k):(Y=e[17],k=e[18]),(0,c.useEffect)(Y,k),e[19]!==I?(D=()=>{I?.rows&&r({offers:I.rows,count:I.count,type:"SET_OFFERS"})},P=[I],e[19]=I,e[20]=D,e[21]=P):(D=e[20],P=e[21]),(0,c.useEffect)(D,P),e[22]!==b||e[23]!==h||e[24]!==d?(x=()=>{if((b||h)&&d&&d.length>0){(0,_o.n1)(y.f,String(d[0].id),Io);const e={type:"NGO",name:Io,value:[{value:String(d[0].id),label:d[0].name}]};r(dn([e]))}},e[22]=b,e[23]=h,e[24]=d,e[25]=x):x=e[25],e[26]!==b||e[27]!==h||e[28]!==d||e[29]!==l?(U=[b,h,d,l],e[26]=b,e[27]=h,e[28]=d,e[29]=l,e[30]=U):U=e[30],(0,c.useEffect)(x,U),e[31]!==t.communityConfiguration.general||e[32]!==m||e[33]!==b||e[34]!==h||e[35]!==f.jwtToken||e[36]!==f.userId?(j=()=>{(b||h)&&(async()=>{await async function(e,t,n,o){const a={headers:(0,E.d)(t),method:"GET"};await o(`${(0,L.y)(e)}/etb/profiles/?user_id=${n}`,a)}(t.communityConfiguration.general,f.jwtToken,f.userId,m)})()},e[31]=t.communityConfiguration.general,e[32]=m,e[33]=b,e[34]=h,e[35]=f.jwtToken,e[36]=f.userId,e[37]=j):j=e[37],e[38]!==t||e[39]!==m||e[40]!==b||e[41]!==h||e[42]!==f?(F=[t,m,b,h,f],e[38]=t,e[39]=m,e[40]=b,e[41]=h,e[42]=f,e[43]=F):F=e[43],(0,c.useEffect)(j,F),e[44]===Symbol.for("react.memo_cache_sentinel")?(R=()=>{r(un())},e[44]=R):R=e[44];const _=R;let B,G,z,q,$,V,W,H,X,K;return e[45]!==s||e[46]!==A?(B=(s||A)&&(0,a.Y)(Se.h,{}),e[45]=s,e[46]=A,e[47]=B):B=e[47],e[48]!==l||e[49]!==i.count?(G=l.length>0&&(0,a.Y)(wo,{ngos:l,count:i.count,dispatch:r}),e[48]=l,e[49]=i.count,e[50]=G):G=e[50],e[51]!==i.count||e[52]!==i.offers?(z=i.offers&&(0,a.Y)(jo,{offers:i.offers,count:i.count,dispatch:r}),e[51]=i.count,e[52]=i.offers,e[53]=z):z=e[53],e[54]!==i.actualOffer||e[55]!==i.dialog?(q="DELETE"===i.dialog&&i.actualOffer&&(0,a.Y)(no,{actualOffer:i.actualOffer,dispatch:r}),e[54]=i.actualOffer,e[55]=i.dialog,e[56]=q):q=e[56],e[57]!==i.actualOffer||e[58]!==i.dialog?($=("ACTIVATE"===i.dialog||"INACTIVATE"===i.dialog)&&i.actualOffer&&(0,a.Y)(bn,{actualOffer:i.actualOffer,isActivate:"ACTIVATE"===i.dialog,dispatch:r}),e[57]=i.actualOffer,e[58]=i.dialog,e[59]=$):$=e[59],e[60]!==i.actualOffer||e[61]!==i.dialog?(V="DETAIL"===i.dialog&&i.actualOffer?.id&&(0,a.Y)(oo,{dispatch:r,id:i.actualOffer.id}),e[60]=i.actualOffer,e[61]=i.dialog,e[62]=V):V=e[62],e[63]!==i.dialog||e[64]!==N?(W="ADD"===i.dialog&&N&&(0,a.Y)(to,{dispatch:r,ngoId:N}),e[63]=i.dialog,e[64]=N,e[65]=W):W=e[65],e[66]!==i.actualOffer||e[67]!==i.dialog||e[68]!==N?(H="EDIT"===i.dialog&&N&&i.actualOffer?.id&&(0,a.Y)(ao,{id:i.actualOffer.id,ngoId:N,dispatch:r}),e[66]=i.actualOffer,e[67]=i.dialog,e[68]=N,e[69]=H):H=e[69],e[70]!==n||e[71]!==i.dialog?(X="CONTACT"===i.dialog&&n.ngoAdminsUsersContactSuperform&&(0,a.Y)(c.Suspense,{children:(0,a.Y)(pn,{config:n.ngoAdminsUsersContactSuperform,cancelClick:_})}),e[70]=n,e[71]=i.dialog,e[72]=X):X=e[72],e[73]!==B||e[74]!==G||e[75]!==z||e[76]!==q||e[77]!==$||e[78]!==V||e[79]!==W||e[80]!==H||e[81]!==X?(K=(0,a.FD)(a.FK,{children:[B,G,z,q,$,V,W,H,X]}),e[73]=B,e[74]=G,e[75]=z,e[76]=q,e[77]=$,e[78]=V,e[79]=W,e[80]=H,e[81]=X,e[82]=K):K=e[82],K};function Go(e){return e.name===Io}function zo(e,t){return t.filter((t=>e.includes(Number(t.id)))).map((e=>({label:e.name,value:String(e.id)})))}const qo=(0,ae.vP)([...le,"all"]),$o=(0,ae.Ik)({lat:(0,ae.lq)((0,ae.ai)()),lon:(0,ae.lq)((0,ae.ai)()),location:(0,ae.lq)((0,ae.Yj)()),ngos:(0,ae.YO)((0,ae.ai)()),timeOfDays:(0,ae.YO)(ce),languageSkills:(0,ae.YO)(me),periodicities:(0,ae.YO)(ue),previousExperience:(0,ae.YO)((0,ae.vP)(["socialServices","politics","emergencyHelp","localCommunity","culture","environment","parish","education","sport","zweiteSparkasse","ngos","generalCare"])),motivations:(0,ae.YO)((0,ae.vP)(["broadeningExperience","enjoyHelping","meetNewPeople","contributionToSociety","newMeaningfulActivity"])),offerType:(0,ae.me)((0,ae.lq)(qo)),skills:(0,ae.YO)(de),knowEtbFrom:(0,ae.YO)((0,ae.vP)(["intranet","colleagues","worksCouncil","hrDivision","lineManager"]))});function Vo(e){return[{value:"intranet",label:e.intranetLabel},{value:"colleagues",label:e.colleaguesLabel},{value:"worksCouncil",label:e.worksCouncilLabel},{value:"hrDivision",label:e.hrDivisionLabel},{value:"lineManager",label:e.lineManagerLabel}]}function Wo(e){return[{value:"broadeningExperience",label:e.broadeningExpLabel},{value:"contributionToSociety",label:e.contributionToSociety},{value:"enjoyHelping",label:e.enjoyHelpingLabel},{value:"newMeaningfulActivity",label:e.newMeaningfulActivityLabel},{value:"meetNewPeople",label:e.meetNewPeopleLabel}]}var Ho=n(22053);function Xo(e,t,n,a){const i=(0,o.c)(13),r=Boolean(a);let l;i[0]!==e||i[1]!==r?(l=(0,Nt.I9)(e,"selectNgos",r),i[0]=e,i[1]=r,i[2]=l):l=i[2];const s=a?e.general.placeholderMultipleChoice:e.general.placeholderSingleChoice,c=a?e.general.multipleOptionsSelectedLabel:"";let u,m;i[3]!==t?(u=t.map(Ko),i[3]=t,i[4]=u):u=i[4],i[5]!==l||i[6]!==s||i[7]!==c||i[8]!==u?(m={...l,placeholder:s,multipleSelectionLabel:c,type:"COMBOBOX",options:u},i[5]=l,i[6]=s,i[7]=c,i[8]=u,i[9]=m):m=i[9];const d=m,{selectInputConfig:f,searchConfig:g}=(0,Ho.b)(d,n,e.general.numberOfSelectedOptionsAltText);let b;return i[10]!==g||i[11]!==f?(b={ngoComboboxConfig:f,searchConfig:g},i[10]=g,i[11]=f,i[12]=b):b=i[12],b}function Ko(e){return{label:e.name,value:String(e.id)}}function Jo(e){return[{value:"socialServices",label:e.socialServicesLabel},{value:"politics",label:e.politicsLabel},{value:"emergencyHelp",label:e.emergencyHelpLabel},{value:"localCommunity",label:e.localCommunityLabel},{value:"culture",label:e.cultureLabel},{value:"environment",label:e.environmentLabel},{value:"parish",label:e.parishLabel},{value:"education",label:e.educationLabel},{value:"sport",label:e.sportLabel},{value:"zweiteSparkasse",label:e.zweiteSparkasseLabel},{value:"ngos",label:e.ngoLabelOfferPreferences},{value:"generalCare",label:e.generalCareKnowledgeSkillsLabel}]}var Zo=n(79448),Qo=n(81021);const ea=e=>{const t=(0,o.c)(22),{location:n,setLocation:i}=e,r=(0,u.U)(),l=n.length>0?n[0]:"";let s;t[0]!==r.googleApiConfiguration.googleApiKey||t[1]!==l?(s={cId:"location",name:"selectLocation",label:"",googleApiKey:r.googleApiConfiguration.googleApiKey,c
1ountryCode:"AT",hasConsent:!0,value:l},t[0]=r.googleApiConfiguration.googleApiKey,t[1]=l,t[2]=s):s=t[2];const{searchConfig:c,selectInputConfig:m}=(0,Zo.x)(s),d=r.communityConfiguration.userProfile.optionalFieldLabel||"";let f,g,b;t[3]!==n?(f=n.map(ta),t[3]=n,t[4]=f):f=t[4],t[5]!==i?(g=e=>i(e.map(na)),t[5]=i,t[6]=g):g=t[6],t[7]!==c||t[8]!==m||t[9]!==f||t[10]!==g?(b=(0,a.Y)(At.A,{selectInputConfig:m,value:f,error:void 0,searchConfig:c,disabled:!1,dispatchValue:g}),t[7]=c,t[8]=m,t[9]=f,t[10]=g,t[11]=b):b=t[11];const p=b;let h,y;t[12]!==r.communityConfiguration.etbOffersListConfig.searchFieldLabel||t[13]!==d?(h=(0,Ge.s)({optionalLabel:d,name:"location",label:r.communityConfiguration.etbOffersListConfig.searchFieldLabel,optional:!0}),t[12]=r.communityConfiguration.etbOffersListConfig.searchFieldLabel,t[13]=d,t[14]=h):h=t[14],t[15]!==r.cmpConsentConfiguration||t[16]!==p?(y=r.cmpConsentConfiguration&&(0,a.Y)(Qo.X,{config:r.cmpConsentConfiguration,children:p}),t[15]=r.cmpConsentConfiguration,t[16]=p,t[17]=y):y=t[17];const C=!r.cmpConsentConfiguration&&p;let L;return t[18]!==h||t[19]!==y||t[20]!==C?(L=(0,a.FD)(We.E,{...h,children:[y,C]}),t[18]=h,t[19]=y,t[20]=C,t[21]=L):L=t[21],L};function ta(e){return{value:"locationValue",label:e}}function na(e){return e.label}function oa(e){return e&&e.length>0?e:null}const aa=()=>{const e=(0,o.c)(175),t=(0,u.U)(),n=t.communityConfiguration.etbOfferConfig,i=t.communityConfiguration.etbOffersListConfig,r=t.communityConfiguration.etbUserProfileConfig,l=(0,w.S)(),[s,m]=bt(),[d,f]=function(){const e=(0,o.c)(12),t=(0,u.U)();let n;e[0]!==t.communityConfiguration.general?(n=(0,L.y)(t.communityConfiguration.general),e[0]=t.communityConfiguration.general,e[1]=n):n=e[1];const a=n,i=(0,w.S)();let r;e[2]!==t.communityConfiguration.errorMessage.errorCodes?(r={method:"GET",responseStruct:$o,errorCodes:t.communityConfiguration.errorMessage.errorCodes},e[2]=t.communityConfiguration.errorMessage.errorCodes,e[3]=r):r=e[3];const[l,s,m]=(0,oe.q)(r);let d,f,g;return e[4]!==s||e[5]!==a||e[6]!==i.jwtToken?(d=()=>{const e={headers:(0,E.d)(i.jwtToken),method:"GET"};s(`${a}/etb/offers/preferences`,e)},f=[s,i.jwtToken,a],e[4]=s,e[5]=a,e[6]=i.jwtToken,e[7]=d,e[8]=f):(d=e[7],f=e[8]),(0,c.useEffect)(d,f),e[9]!==l||e[10]!==m?(g=[l,m],e[9]=l,e[10]=m,e[11]=g):g=e[11],g}(),g=function(){const e=(0,o.c)(3),t=(0,u.U)(),[n,a]=(0,I.s)();let i;return e[0]!==t.communityConfiguration.errorMessage.errorCodes||e[1]!==n?(i={fetchState:n,method:"POST",errorCodes:t.communityConfiguration.errorMessage.errorCodes},e[0]=t.communityConfiguration.errorMessage.errorCodes,e[1]=n,e[2]=i):i=e[2],(0,M.h)(i),(0,O.s)(n,t.communityConfiguration.errorMessage.successMessage),a}();let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=[],e[0]=b):b=e[0];const[p,h]=(0,c.useState)(b);let y;e[1]===Symbol.for("react.memo_cache_sentinel")?(y=[],e[1]=y):y=e[1];const[C,T]=(0,c.useState)(y);let v;e[2]===Symbol.for("react.memo_cache_sentinel")?(v=[],e[2]=v):v=e[2];const[N,S]=(0,c.useState)(v);let A;e[3]===Symbol.for("react.memo_cache_sentinel")?(A=[],e[3]=A):A=e[3];const[Y,k]=(0,c.useState)(A);let D;e[4]===Symbol.for("react.memo_cache_sentinel")?(D=[],e[4]=D):D=e[4];const[P,x]=(0,c.useState)(D);let U;e[5]===Symbol.for("react.memo_cache_sentinel")?(U=[],e[5]=U):U=e[5];const[j,F]=(0,c.useState)(U);let R;e[6]===Symbol.for("react.memo_cache_sentinel")?(R=[],e[6]=R):R=e[6];const[_,B]=(0,c.useState)(R);let G;e[7]===Symbol.for("react.memo_cache_sentinel")?(G=[],e[7]=G):G=e[7];const[z,q]=(0,c.useState)(G);let $;e[8]===Symbol.for("react.memo_cache_sentinel")?($=[],e[8]=$):$=e[8];const[V,W]=(0,c.useState)($);let H;e[9]===Symbol.for("react.memo_cache_sentinel")?(H=[],e[9]=H):H=e[9];const[X,K]=(0,c.useState)(H),[J,Z]=(0,c.useState)(),[Q,ee]=(0,c.useState)(),te=Pn(t),ne=Yn(t),ae=kn(t),ie=Dn(t),re=function(e){const t=(0,o.c)(7);let n,a,i;return t[0]!==e.communityConfiguration?(n=(0,Nt.I9)(e.communityConfiguration,"selectPrevExperiences",!0),t[0]=e.communityConfiguration,t[1]=n):n=t[1],t[2]!==e.communityConfiguration.etbOfferConfig?(a=Jo(e.communityConfiguration.etbOfferConfig),t[2]=e.communityConfiguration.etbOfferConfig,t[3]=a):a=t[3],t[4]!==n||t[5]!==a?(i={...n,options:a},t[4]=n,t[5]=a,t[6]=i):i=t[6],i}(t),le=function(e){const t=(0,o.c)(7);let n,a,i;return t[0]!==e.communityConfiguration?(n=(0,Nt.I9)(e.communityConfiguration,"selectMotivations",!0),t[0]=e.communityConfiguration,t[1]=n):n=t[1],t[2]!==e.communityConfiguration.etbOfferConfig?(a=Wo(e.communityConfiguration.etbOfferConfig),t[2]=e.communityConfiguration.etbOfferConfig,t[3]=a):a=t[3],t[4]!==n||t[5]!==a?(i={...n,options:a},t[4]=n,t[5]=a,t[6]=i):i=t[6],i}(t),se=function(e){const t=(0,o.c)(7);let n,a,i;return t[0]!==e.communityConfiguration?(n=(0,Nt.I9)(e.communityConfiguration,"selectKnowEtbFrom",!0),t[0]=e.communityConfiguration,t[1]=n):n=t[1],t[2]!==e.communityConfiguration.etbOfferConfig?(a=Vo(e.communityConfiguration.etbOfferConfig),t[2]=e.communityConfiguration.etbOfferConfig,t[3]=a):a=t[3],t[4]!==n||t[5]!==a?(i={...n,options:a},t[4]=n,t[5]=a,t[6]=i):i=t[6],i}(t),ce=(0,Nt.T9)(n,i.allLabel);let ue,me,de;e[10]!==d?(ue=()=>{d&&(h(d.timeOfDays),T(d?.languageSkills),k(d?.skills),S(d?.periodicities),x(d?.previousExperience),F(d?.motivations),B(d?.knowEtbFrom),W(d.ngos),q([d.offerType??"all"]),d.location&&(K([d.location]),Z(d.lat),ee(d.lon))
1)},me=[d],e[10]=d,e[11]=ue,e[12]=me):(ue=e[11],me=e[12]),(0,c.useEffect)(ue,me),e[13]!==s||e[14]!==V?(de=zo(V,s),e[13]=s,e[14]=V,e[15]=de):de=e[15];const fe=de,{ngoComboboxConfig:ge,searchConfig:be}=Xo(t.communityConfiguration,s,fe,!0);let pe,he,ye;e[16]!==t.googleApiConfiguration||e[17]!==X[0]||e[18]!==X.length?(pe=()=>{(async()=>{if(X.length>0){const e=await(0,Hn.H)(X[0],t.googleApiConfiguration.googleApiKey);Z(e.lat),ee(e.lng)}})()},e[16]=t.googleApiConfiguration,e[17]=X[0],e[18]=X.length,e[19]=pe):pe=e[19],e[20]!==t||e[21]!==X?(he=[t,X],e[20]=t,e[21]=X,e[22]=he):he=e[22],(0,c.useEffect)(pe,he),e[23]!==t.communityConfiguration||e[24]!==_||e[25]!==C||e[26]!==J||e[27]!==X[0]||e[28]!==X.length||e[29]!==Q||e[30]!==j||e[31]!==V||e[32]!==z[0]||e[33]!==N||e[34]!==P||e[35]!==g||e[36]!==Y||e[37]!==p||e[38]!==l?(ye=async()=>{await async function(e,t,n,o){const a={know_etb_from:oa(n?.knowEtbFrom),language_skills:oa(n?.languageSkills),motivations:oa(n?.motivations),ngos:oa(n?.ngos),periodicities:oa(n?.periodicities),previous_experience:oa(n?.previousExperience),skills:oa(n?.skills),time_of_days:oa(n?.timeOfDays),offer_type:n?.offerType&&"all"!==n.offerType?n.offerType:null,location:n.location??null,lat:n?.lat??null,lon:n?.lon??null},i={headers:(0,E.d)(t.jwtToken),method:"POST",body:JSON.stringify(a)};await o(`${(0,L.y)(e.general)}/etb/offers/preferences`,i)}(t.communityConfiguration,l,{motivations:j,ngos:V,periodicities:N,knowEtbFrom:_,skills:Y,timeOfDays:p,languageSkills:C,offerType:z[0],previousExperience:P,location:X.length>0?X[0]:void 0,lat:J,lon:Q},g)},e[23]=t.communityConfiguration,e[24]=_,e[25]=C,e[26]=J,e[27]=X[0],e[28]=X.length,e[29]=Q,e[30]=j,e[31]=V,e[32]=z[0],e[33]=N,e[34]=P,e[35]=g,e[36]=Y,e[37]=p,e[38]=l,e[39]=ye):ye=e[39];const Ce=ye,Le=t.communityConfiguration.userProfile.optionalFieldLabel??"",Ee=Ue.s,Te=t.communityConfiguration.general.saveButtonLabel;let ve,Ne,Me,Oe,Ie,we,Ae;e[40]!==f||e[41]!==m?(ve=(m||f)&&(0,a.Y)(Se.h,{}),e[40]=f,e[41]=m,e[42]=ve):ve=e[42],e[43]!==X?(Ne=(0,a.Y)(ea,{location:X,setLocation:K}),e[43]=X,e[44]=Ne):Ne=e[44],e[45]!==n.timeOfDayLabel||e[46]!==Le||e[47]!==te.name?(Me=(0,Ge.s)({optionalLabel:Le,name:te.name,label:n.timeOfDayLabel,optional:!0}),e[45]=n.timeOfDayLabel,e[46]=Le,e[47]=te.name,e[48]=Me):Me=e[48],e[49]===Symbol.for("react.memo_cache_sentinel")?(Oe=e=>{h(e.map(ia))},e[49]=Oe):Oe=e[49],e[50]!==p||e[51]!==te.options?(Ie=(0,wt.o)(te.options,p),e[50]=p,e[51]=te.options,e[52]=Ie):Ie=e[52],e[53]!==Ie||e[54]!==te?(we=(0,a.Y)(At.A,{disabled:!1,dispatchValue:Oe,selectInputConfig:te,value:Ie}),e[53]=Ie,e[54]=te,e[55]=we):we=e[55],e[56]!==Me||e[57]!==we?(Ae=(0,a.Y)(We.E,{...Me,children:we}),e[56]=Me,e[57]=we,e[58]=Ae):Ae=e[58];const Ye=We.E,ke=(0,Ge.s)({optionalLabel:Le,name:ce.name,label:i.offerTypeDropdownLabel,optional:!0}),De=At.A;let Pe;e[59]===Symbol.for("react.memo_cache_sentinel")?(Pe=e=>{q(e.map(ra))},e[59]=Pe):Pe=e[59];const xe=(0,wt.o)(ce.options,z);let je,Fe,Re,_e,Be,ze,qe,$e,Ve,He,Xe,Ke,Je,Ze,Qe,et,tt,nt,ot,at,it,rt,lt,st,ct,ut,mt,dt,ft,gt,pt,ht,yt,Ct;return e[60]!==De||e[61]!==ce||e[62]!==Pe||e[63]!==xe?(je=(0,a.Y)(De,{disabled:!1,dispatchValue:Pe,selectInputConfig:ce,value:xe}),e[60]=De,e[61]=ce,e[62]=Pe,e[63]=xe,e[64]=je):je=e[64],e[65]!==Ye||e[66]!==ke||e[67]!==je?(Fe=(0,a.Y)(Ye,{...ke,children:je}),e[65]=Ye,e[66]=ke,e[67]=je,e[68]=Fe):Fe=e[68],e[69]!==n.periodicityLabel||e[70]!==Le||e[71]!==ae.name?(Re=(0,Ge.s)({optionalLabel:Le,name:ae.name,label:n.periodicityLabel,optional:!0}),e[69]=n.periodicityLabel,e[70]=Le,e[71]=ae.name,e[72]=Re):Re=e[72],e[73]===Symbol.for("react.memo_cache_sentinel")?(_e=e=>{S(e.map(la))},e[73]=_e):_e=e[73],e[74]!==N||e[75]!==ae.options?(Be=(0,wt.o)(ae.options,N),e[74]=N,e[75]=ae.options,e[76]=Be):Be=e[76],e[77]!==ae||e[78]!==Be?(ze=(0,a.Y)(At.A,{disabled:!1,dispatchValue:_e,selectInputConfig:ae,value:Be}),e[77]=ae,e[78]=Be,e[79]=ze):ze=e[79],e[80]!==Re||e[81]!==ze?(qe=(0,a.Y)(We.E,{...Re,children:ze}),e[80]=Re,e[81]=ze,e[82]=qe):qe=e[82],e[83]!==ge||e[84]!==s.length||e[85]!==Le||e[86]!==be||e[87]!==fe||e[88]!==r?($e=s.length>0&&ge&&(0,a.Y)(We.E,{...(0,Ge.s)({optionalLabel:Le,name:ge.name,label:r.selectNgoLabel,optional:!0}),children:(0,a.Y)(At.A,{disabled:!1,searchConfig:be,dispatchValue:e=>{W(e.map(sa))},selectInputConfig:ge,value:fe})}),e[83]=ge,e[84]=s.length,e[85]=Le,e[86]=be,e[87]=fe,e[88]=r,e[89]=$e):$e=e[89],e[90]!==ne.name||e[91]!==n.languageSkillsLabel||e[92]!==Le?(Ve=(0,Ge.s)({name:ne.name,label:n.languageSkillsLabel,optionalLabel:Le,optional:!0}),e[90]=ne.name,e[91]=n.languageSkillsLabel,e[92]=Le,e[93]=Ve):Ve=e[93],e[94]===Symbol.for("react.memo_cache_sentinel")?(He=e=>{T(e.map(ca))},e[94]=He):He=e[94],e[95]!==C||e[96]!==ne.options?(Xe=(0,wt.o)(ne.options,C),e[95]=C,e[96]=ne.options,e[97]=Xe):Xe=e[97],e[98]!==ne||e[99]!==Xe?(Ke=(0,a.Y)(At.A,{disabled:!1,dispatchValue:He,selectInputConfig:ne,value:Xe}),e[98]=ne,e[99]=Xe,e[100]=Ke):Ke=e[100],e[101]!==Ve||e[102]!==Ke?(Je=(0,a.Y)(We.E,{...Ve,children:Ke}),e[101]=Ve,e[102]=Ke,e[103]=Je):Je=e[103],e[104]!==n.knowledgeSkillsLabel||e[105]!==Le||e[106]!==ie.name?(Ze=(0,Ge.s)({name:ie.name,label:n.knowledgeSkillsLabel,optionalLabel:Le,optional:!0}),e[104]=n.knowledgeSkillsLabel,e[105]=Le,e[106]=ie.name,e[107]=Ze):Ze=e[107],e[108]===Symbol.for("react.memo_cache_sentinel")?(Qe=e=>{k(e.map(ua))},e[108]=Qe):Qe=e[108],e[109]!==Y||e[110]!==ie.options?(et=(0,wt.o)(ie.options,Y),e[109]=Y,e[110]=ie.options,e[111]=et):et=e[111],e[112]!==ie||e[113]!==et?(tt=(0,a.Y)(At.A,{disabled:!1,dispatchValue:Qe,selectInputConfig:ie,value:et}),e[112]=ie,e[113]=et,e[114]=tt):tt=e[114],e[115]!==Ze||e[116]!==tt?(nt=(0,a.Y)(We.E,{...Ze,children:tt}),e[115]=Ze,e[116]=tt,e[117]=nt):nt=e[117],e[118]!==se.name||e[119]!==n.howLearnTimeBankLabel||e[120]!==Le?
1(ot=(0,Ge.s)({name:se.name,label:n.howLearnTimeBankLabel,optionalLabel:Le,optional:!0}),e[118]=se.name,e[119]=n.howLearnTimeBankLabel,e[120]=Le,e[121]=ot):ot=e[121],e[122]===Symbol.for("react.memo_cache_sentinel")?(at=e=>{B(e.map(ma))},e[122]=at):at=e[122],e[123]!==_||e[124]!==se.options?(it=(0,wt.o)(se.options,_),e[123]=_,e[124]=se.options,e[125]=it):it=e[125],e[126]!==se||e[127]!==it?(rt=(0,a.Y)(At.A,{disabled:!1,dispatchValue:at,selectInputConfig:se,value:it}),e[126]=se,e[127]=it,e[128]=rt):rt=e[128],e[129]!==ot||e[130]!==rt?(lt=(0,a.Y)(We.E,{...ot,children:rt}),e[129]=ot,e[130]=rt,e[131]=lt):lt=e[131],e[132]!==n.previousVolunteerExpLabel||e[133]!==Le||e[134]!==re.name?(st=(0,Ge.s)({name:re.name,label:n.previousVolunteerExpLabel,optionalLabel:Le,optional:!0}),e[132]=n.previousVolunteerExpLabel,e[133]=Le,e[134]=re.name,e[135]=st):st=e[135],e[136]===Symbol.for("react.memo_cache_sentinel")?(ct=e=>{x(e.map(da))},e[136]=ct):ct=e[136],e[137]!==P||e[138]!==re.options?(ut=(0,wt.o)(re.options,P),e[137]=P,e[138]=re.options,e[139]=ut):ut=e[139],e[140]!==re||e[141]!==ut?(mt=(0,a.Y)(At.A,{disabled:!1,dispatchValue:ct,selectInputConfig:re,value:ut}),e[140]=re,e[141]=ut,e[142]=mt):mt=e[142],e[143]!==st||e[144]!==mt?(dt=(0,a.Y)(We.E,{...st,children:mt}),e[143]=st,e[144]=mt,e[145]=dt):dt=e[145],e[146]!==le.name||e[147]!==n.motivationForVolunteerWorkLabel||e[148]!==Le?(ft=(0,Ge.s)({name:le.name,label:n.motivationForVolunteerWorkLabel,optionalLabel:Le,optional:!0}),e[146]=le.name,e[147]=n.motivationForVolunteerWorkLabel,e[148]=Le,e[149]=ft):ft=e[149],e[150]===Symbol.for("react.memo_cache_sentinel")?(gt=e=>{F(e.map(fa))},e[150]=gt):gt=e[150],e[151]!==j||e[152]!==le.options?(pt=(0,wt.o)(le.options,j),e[151]=j,e[152]=le.options,e[153]=pt):pt=e[153],e[154]!==le||e[155]!==pt?(ht=(0,a.Y)(At.A,{disabled:!1,dispatchValue:gt,selectInputConfig:le,value:pt}),e[154]=le,e[155]=pt,e[156]=ht):ht=e[156],e[157]!==ft||e[158]!==ht?(yt=(0,a.Y)(We.E,{...ft,children:ht}),e[157]=ft,e[158]=ht,e[159]=yt):yt=e[159],e[160]!==Ee||e[161]!==t.communityConfiguration.general.saveButtonLabel||e[162]!==Ce||e[163]!==ve||e[164]!==Ne||e[165]!==Ae||e[166]!==Fe||e[167]!==qe||e[168]!==$e||e[169]!==Je||e[170]!==nt||e[171]!==lt||e[172]!==dt||e[173]!==yt?(Ct=(0,a.FD)(Ee,{confirmText:Te,confirmClick:Ce,children:[ve,Ne,Ae,Fe,qe,$e,Je,nt,lt,dt,yt]}),e[160]=Ee,e[161]=t.communityConfiguration.general.saveButtonLabel,e[162]=Ce,e[163]=ve,e[164]=Ne,e[165]=Ae,e[166]=Fe,e[167]=qe,e[168]=$e,e[169]=Je,e[170]=nt,e[171]=lt,e[172]=dt,e[173]=yt,e[174]=Ct):Ct=e[174],Ct};function ia(e){return e.value}function ra(e){return e.value}function la(e){return e.value}function sa(e){return Number(e.value)}function ca(e){return e.value}function ua(e){return e.value}function ma(e){return e.value}function da(e){return e.value}function fa(e){return e.value}var ga=n(46965),ba=n(48319),pa=n(82626),ha=n(14755),ya=n(25782);const Ca=e=>{const t=(0,o.c)(25),{userData:n,closeDialog:i,resetTable:r}=e,l=(0,w.S)(),s=(0,u.U)(),{general:m,etbUserProfileConfig:d}=s.communityConfiguration,f=(0,ha.c)(n),[g,b]=(0,pa.U)();let p,h,y;t[0]!==i||t[1]!==b.response||t[2]!==r?(p=()=>{b.response&&(r(),i())},t[0]=i,t[1]=b.response,t[2]=r,t[3]=p):p=t[3],t[4]!==i||t[5]!==b||t[6]!==r?(h=[i,b,r],t[4]=i,t[5]=b,t[6]=r,t[7]=h):h=t[7],(0,c.useEffect)(p,h),t[8]!==g||t[9]!==f||t[10]!==m||t[11]!==l?(y=async()=>{f.setShowRequiredError(!0);const e=(0,ya.v)({firstName:f.firstName,lastName:f.lastName,decadeOfBirth:f.decadeOfBirth,gender:f.gender,userType:f.userType,employer:f.employer,employers:f.employers,manager:f.manager,email:f.email,emailOfRelated:f.emailOfRelated,emailNotification:f.emailNotification,emailLanguage:f.emailLanguage});e&&await(0,ga.L)(m,l,e,g)},t[8]=g,t[9]=f,t[10]=m,t[11]=l,t[12]=y):y=t[12];const L=y;let E,T,v;return t[13]!==f.isLoading?(E=f.isLoading&&(0,a.Y)(Se.h,{}),t[13]=f.isLoading,t[14]=E):E=t[14],t[15]!==f?(T=!f.isLoading&&(0,a.Y)(ba.d,{state:f,mode:"PROFILE"}),t[15]=f,t[16]=T):T=t[16],t[17]!==i||t[18]!==d.editUserLabel||t[19]!==m.cancelButtonLabel||t[20]!==m.saveButtonLabel||t[21]!==L||t[22]!==E||t[23]!==T?(v=(0,a.FD)(C.l,{type:"FORM",title:d.editUserLabel,cancelClick:i,cancelText:m.cancelButtonLabel,confirmText:m.saveButtonLabel,confirmClick:L,children:[E,T]}),t[17]=i,t[18]=d.editUserLabel,t[19]=m.cancelButtonLabel,t[20]=m.saveButtonLabel,t[21]=L,t[22]=E,t[23]=T,t[24]=v):v=t[24],v};var La=n(81812);const Ea=e=>{const t=(0,o.c)(27),{nickname:n,email:i,type:r,onEditClick:l}
1=e,s=(0,u.U)().communityConfiguration;let c,m,d,f;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=(0,a.Y)(To,{children:(0,a.Y)(q.p,{iconPath:La.y,className:"glyph-icon",width:"26px"})}),t[0]=c):c=t[0],t[1]!==n||t[2]!==s.userProfile.userNickname?(m=n&&(0,a.FD)(a.FK,{children:[(0,a.FD)("span",{className:"visuallyhidden",children:[s.userProfile.userNickname,","]}),(0,a.FD)(No,{children:[n,","]})]}),t[1]=n,t[2]=s.userProfile.userNickname,t[3]=m):m=t[3],t[4]!==s.userProfile.email?(d=(0,a.FD)("span",{className:"visuallyhidden",children:[s.userProfile.email,","]}),t[4]=s.userProfile.email,t[5]=d):d=t[5],t[6]!==i?(f=(0,a.FD)(So,{children:[i,","]}),t[6]=i,t[7]=f):f=t[7];const g=s.etbUserProfileConfig?.userTypeLabel;let b,p,h,y;t[8]!==g?(b=(0,a.FD)("span",{className:"visuallyhidden",children:[g,","]}),t[8]=g,t[9]=b):b=t[9],t[10]!==s.etbUserProfileConfig||t[11]!==r?(p=function(e,t){if(t)switch(e){case"EMPLOYEE":return t.employeeLabel;case"FAMILY_MEMBER":return t.familyMemberLabel;case"RETIRED_EMPLOYEE":return t.retiredEmployeeLabel}}(r,s.etbUserProfileConfig),t[10]=s.etbUserProfileConfig,t[11]=r,t[12]=p):p=t[12],t[13]!==p?(h=(0,a.Y)("span",{className:"d-b",children:(0,a.Y)(So,{children:p})}),t[13]=p,t[14]=h):h=t[14],t[15]!==m||t[16]!==d||t[17]!==f||t[18]!==b||t[19]!==h?(y=(0,a.FD)(Lo,{children:[c,(0,a.Y)("div",{className:"d-f fd-c",children:(0,a.FD)(vo,{children:[m,d,f,b,h]})})]}),t[15]=m,t[16]=d,t[17]=f,t[18]=b,t[19]=h,t[20]=y):y=t[20];const C=s.etbUserProfileConfig?.editUserLabel;let L,E;return t[21]!==l||t[22]!==C?(L=(0,a.Y)(Eo,{children:(0,a.Y)(pt.g,{onClick:l,children:C})}),t[21]=l,t[22]=C,t[23]=L):L=t[23],t[24]!==L||t[25]!==y?(E=(0,a.FD)(Co,{children:[y,L]}),t[24]=L,t[25]=y,t[26]=E):E=t[26],E},Ta=(0,P.A)("dl",{target:"e1kzzc9n2"})("margin-top:var(--spacing-s03);display:grid;grid-template-columns:1fr;@media (min-width: ",U.fi.sm,"px){grid-template-columns:1fr 1fr;}"),va=(0,P.A)("dt",{target:"e1kzzc9n1"})("font-weight:",U.Wy.semibold,";"),Na=(0,P.A)("dd",{target:"e1kzzc9n0"})("margin:0 0 var(--spacing-s02);@media (min-width: ",U.fi.sm,"px){grid-column-start:2;text-align:right;}"),Sa=e=>{const t=(0,o.c)(9),{label:n,value:i}=e,r=(0,c.useId)();let l,s,u;return t[0]!==r||t[1]!==n?(l=(0,a.Y)(va,{id:r,children:n}),t[0]=r,t[1]=n,t[2]=l):l=t[2],t[3]!==r||t[4]!==i?(s=(0,a.Y)(Na,{"aria-labelledby":r,children:i}),t[3]=r,t[4]=i,t[5]=s):s=t[5],t[6]!==l||t[7]!==s?(u=(0,a.FD)(a.FK,{children:[l,s]}),t[6]=l,t[7]=s,t[8]=u):u=t[8],u};function Ma(e,t){switch(e){case"FEMALE":return t.femaleGenderLabel;case"INTER":return t.interGenderLabel;default:return t.maleGenderLabel}}const Oa=e=>{const t=(0,o.c)(42),{data:n}=e,i=(0,u.U)();if(!i.communityConfiguration.etbUserProfileConfig)return;const r=i.communityConfiguration.etbUserProfileConfig,l=i.communityConfiguration.notification,s=i.communityConfiguration.userProfile;let c,m,d,f,g,b;t[0]!==n.firstName||t[1]!==s?(c=n.firstName&&(0,a.Y)(Sa,{label:s.firstNameLabel,value:n.firstName}),t[0]=n.firstName,t[1]=s,t[2]=c):c=t[2],t[3]!==n.lastName||t[4]!==s?(m=n.lastName&&(0,a.Y)(Sa,{label:s.lastNameLabel,value:n.lastName}),t[3]=n.lastName,t[4]=s,t[5]=m):m=t[5],t[6]!==n.gender||t[7]!==s?(d=n.gender&&(0,a.Y)(Sa,{label:s.genderLabel,value:Ma(n.gender,s)}),t[6]=n.gender,t[7]=s,t[8]=d):d=t[8],t[9]!==n.decadeOfBirth||t[10]!==r.decadeOfBirthLabel?(f=n.decadeOfBirth&&(0,a.Y)(Sa,{label:r.decadeOfBirthLabel,value:n.decadeOfBirth.replace("-"," - ")}),t[9]=n.decadeOfBirth,t[10]=r.decadeOfBirthLabel,t[11]=f):f=t[11],t[12]!==n.etb?.managerPosition||t[13]!==n.etb?.userType||t[14]!==r.managerLabel||t[15]!==s?(g="EMPLOYEE"===n.etb?.userType&&(0,a.Y)(Sa,{label:r.managerLabel,value:n.etb?.managerPosition?s.yes:s.no}),t[12]=n.etb?.managerPosition,t[13]=n.etb?.userType,t[14]=r.managerLabel,t[15]=s,t[16]=g):g=t[16],t[17]!==n.etb||t[18]!==r.emailAddressOfFamilyMemberLabel?(b="FAMILY_MEMBER"===n.etb?.userType&&n.etb.emailAddressOfRelatedEmployee&&(0,a.Y)(Sa,{label:r.emailAddressOfFamilyMemberLabel,value:n.etb.emailAddressOfRelatedEmployee}),t[17]=n.etb,t[18]=r.emailAddressOfFamilyMemberLabel,t[19]=b):b=t[19];const p=n.etb?.employerName;let h,y,C,L;return t[20]!==r.employerLabel||t[21]!==p?(h=(0,a.Y)(Sa,{label:r.employerLabel,value:p}),t[20]=r.employerLabel,t[21]=p,t[22]=h):h=t[22],t[23]!==n.etb?.offersEmailNotification||t[24]!==l.emailNotificationsPreferences||t[25]!==s?(y=l.emailNotificationsPreferences&&(0,a.Y)(Sa,{label:l.emailNotificationsPreferences,value:"NEVER"===n.etb?.offersEmailNotification?s.no:s.yes}),t[23]=n.etb?.offersEmailNotification,t[24]=l.emailNotificationsPreferences,t[25]=s,t[26]=y):y=t[26],t[27]!==n.etb?.preferredLanguage||t[28]!==l.emailLanguagePreferencesLabel||t[29]!==l.englishLanguageLabel||t[30]!==l.localLanguageLabel?(C=l.emailLanguagePreferencesLabel&&(0,a.Y)(Sa,{label:l.emailLanguagePreferencesLabel,value:"LOCAL"===n.etb?.preferredLanguage?l.localLanguageLabel:l.englishLanguageLabel}),t[27]=n.etb?.preferredLanguage,t[28]=l.emailLanguagePreferencesLabel,t[29]=l.englishLanguageLabel,t[30]=l.localLanguageLabel,t[31]=C):C=t[31],t[32]!==c||t[33]!==C||t[34]!==m||t[35]!==d||t[36]!==f||t[37]!==g||t[38]!==b||t[39]!==h||t[40]!==y?(L=(0,a.FD)(Ta,{children:[c,m,d,f,g,b,h,y,C]}),t[32]=c,t[33]=C,t[34]=m,t[35]=d,t[36]=f,t[37]=g,t[38]=b,t[39]=h,t[40]=y,t[41]=L):L=t[41],L};var Ia=n(26461),wa=n(26445),Aa=n(7940),Ya=n(43806),ka=n(83841);const Da=()=>{const e=(0,o.c)(36),t=(0,u.U)(),n=l(),i=(0,w.S)(),[r,s]=(0,c.useState)("");let m;e[0]!==t.communityConfiguration.general?(m=(0,L.y)(t.communityConfiguration.general),e[0]=t.communityConfiguration.general,e[1]=m):m=e[1];const[f,g,b]=(0,Ya.r)(m,t.communityConfiguration.errorMessage.errorCodes),p=function(){const e=(0,o.c)(3),t=(0,u.U)(),[n,a]=(0,I.s)();let i;return e[0]!==t.communityConfiguration.errorMessage.errorCodes||e[1]!==n?(i={fetchState:n,method:"DELETE",errorCodes:t.communityConfiguration.errorMessage.errorCodes},e[0]=t.communityConfiguration.errorMessage.errorCodes,e[1]=n,e[2]=i):i=e[2],(0,M.h)(i),(0,O.s)(n,t.communityConfiguration.errorMessage.successMessage,t.communityConfiguration.userProfile.deleteUser),a}(),h=(0,d.useGemSettings)();let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{s("")},e[2]=y):y=e[2];const T=y;let v;e[3]!==t.communityConfiguration||e[4]!==p||e[5]!==h||e[6]!==i||e[7]!==n?(v=async()=>{await async function(e,t,n,o,a){try{await(0,wa.x)({federatedLoginLogoutApi:t.general.federatedLoginLogoutApi,alfaLogoutApi:t.general.alfaLogoutApi,gemSettings:a});const i={...(0,E.d)(n.jwtToken),method:"DELETE"};await o(`${(0,L.y)(e.general)}/users/${n.userId}`,i),(0,ln.CO)(),(0,sn.v)(),window.location.href=e.userProfile.deleteUrlRedirect}catch(t){const n=t?.response?.status??0,o=t instanceof Error?t.message:"";(0,Aa.iL)("ERROR",(0,Ia.u)(n,o,e.errorMessage.errorCodes),"DELET
1E")}}(t.communityConfiguration,n,i,p,h),s("")},e[3]=t.communityConfiguration,e[4]=p,e[5]=h,e[6]=i,e[7]=n,e[8]=v):v=e[8];const N=v;let S;e[9]===Symbol.for("react.memo_cache_sentinel")?(S=async()=>{s("DELETE")},e[9]=S):S=e[9];const A=S;let Y;e[10]===Symbol.for("react.memo_cache_sentinel")?(Y=async()=>{s("EDIT")},e[10]=Y):Y=e[10];const k=Y;let D;e[11]!==t.communityConfiguration.general.cancelButtonLabel||e[12]!==t.communityConfiguration.userProfile.deleteUser||e[13]!==t.communityConfiguration.userProfile.deleteUserButton||e[14]!==t.communityConfiguration.userProfile.deleteUserNote||e[15]!==N?(D={type:"CONFIRM",title:t.communityConfiguration.userProfile.deleteUser,message:t.communityConfiguration.userProfile.deleteUserNote,cancelClick:T,cancelText:t.communityConfiguration.general.cancelButtonLabel,confirmText:t.communityConfiguration.userProfile.deleteUserButton,confirmClick:N},e[11]=t.communityConfiguration.general.cancelButtonLabel,e[12]=t.communityConfiguration.userProfile.deleteUser,e[13]=t.communityConfiguration.userProfile.deleteUserButton,e[14]=t.communityConfiguration.userProfile.deleteUserNote,e[15]=N,e[16]=D):D=e[16];const P=D;let x;e[17]!==b?(x=()=>{b()},e[17]=b,e[18]=x):x=e[18];const U=x;let j,F,R,_,B;return e[19]!==g?(j=g&&(0,a.Y)(Se.h,{}),e[19]=g,e[20]=j):j=e[20],e[21]!==t.communityConfiguration.userProfile.deleteUserButton||e[22]!==f?(F=f&&(0,a.FD)(a.FK,{children:[(0,a.Y)(Ea,{nickname:f.nickname,email:f.email,type:f.etb?.userType,onEditClick:k}),(0,a.FD)(yo,{children:[(0,a.Y)(Oa,{data:f}),(0,a.FD)(Mo,{onClick:A,children:[(0,a.Y)(q.p,{iconPath:ka.t,width:"16px"}),t.communityConfiguration.userProfile.deleteUserButton]})]})]}),e[21]=t.communityConfiguration.userProfile.deleteUserButton,e[22]=f,e[23]=F):F=e[23],e[24]!==P||e[25]!==r?(R="DELETE"===r&&(0,a.Y)(C.l,{...P}),e[24]=P,e[25]=r,e[26]=R):R=e[26],e[27]!==r||e[28]!==U||e[29]!==f?(_="EDIT"===r&&f&&(0,a.Y)(Ca,{userData:f,closeDialog:T,resetTable:U}),e[27]=r,e[28]=U,e[29]=f,e[30]=_):_=e[30],e[31]!==_||e[32]!==j||e[33]!==F||e[34]!==R?(B=(0,a.FD)(ho,{children:[j,F,R,_]}),e[31]=_,e[32]=j,e[33]=F,e[34]=R,e[35]=B):B=e[35],B},Pa=(0,P.A)("section",{target:"e16484zh4"})("width:",(0,j.a)(572),";padding:",(0,j.a)(24),";border-radius:",(0,j.a)(12),";box-shadow:0 ",(0,j.a)(1)," ",(0,j.a)(1)," 0 rgba(11, 31, 66, 0.04),0 ",(0,j.a)(2)," ",(0,j.a)(8)," 0 rgba(11, 31, 66, 0.1);"),xa=(0,P.A)("div",{target:"e16484zh3"})("display:flex;justify-content:space-between;align-items:flex-start;gap:",(0,j.a)(16),";"),Ua=(0,P.A)("h3",{target:"e16484zh2"})("--margin-h3:0;font-size:",(0,j.a)(18),";"),ja=(0,P.A)("li",{target:"e16484zh1"})("display:flex;justify-content:space-between;padding:",(0,j.a)(6)," 0;gap:",(0,j.a)(16),";"),Fa=(0,P.A)("span",{target:"e16484zh0"})({name:"1bmnxg7",styles:"white-space:nowrap"}),Ra=e=>{const t=(0,o.c)(15),{title:n,totalLabel:i,totalCount:r,data:l}=e;let s,c,u,m,d,f;return t[0]!==n?(s=(0,a.Y)(Ua,{children:n}),t[0]=n,t[1]=s):s=t[1],t[2]!==r||t[3]!==i?(c=(0,a.FD)(Fa,{className:"p--minor",children:[i,": ",r]}),t[2]=r,t[3]=i,t[4]=c):c=t[4],t[5]!==s||t[6]!==c?(u=(0,a.FD)(xa,{children:[s,c]}),t[5]=s,t[6]=c,t[7]=u):u=t[7],t[8]!==l?(m=l?.map(_a),t[8]=l,t[9]=m):m=t[9],t[10]!==m?(d=(0,a.Y)("ul",{className:"w-full m-t-md",children:m}),t[10]=m,t[11]=d):d=t[11],t[12]!==u||t[13]!==d?(f=(0,a.FD)(Pa,{children:[u,d]}),t[12]=u,t[13]=d,t[14]=f):f=t[14],f};function _a(e){return(0,a.FD)(ja,{className:"p--minor",children:[e.label,(0,a.Y)("span",{className:"fw-sb",children:e.count})]},e.label)}var Ba=n(62313);function Ga(e,t){const n=(0,Ba.U)(t.communityConfiguration.etbUserProfileConfig),o=e.rows.map((e=>({label:`${Wa(e.name,n)} ${e.isManagerPosition?"(Manager)":""}`,count:e.count})));return{title:t.communityConfiguration.etbUserProfileConfig.userTypeLabel,totalCount:e.count,totalLabel:t.communityConfiguration.etbStatistics.totalLabel,data:o}}function za(e,t){const n=Wo(t.communityConfiguration.etbOfferConfig),o=e.rows.map((e=>({label:Wa(e.name,n),count:e.count})));return{title:t.communityConfiguration.etbOfferConfig.motivationForVolunteerWorkLabel,totalCount:e.count,totalLabel:t.communityConfiguration.etbStatistics.totalLabel,data:o}}function qa(e,t){const n=Jo(t.communityConfiguration.etbOfferConfig),o=e.rows.map((e=>({label:Wa(e.name,n),count:e.count})));return{title:t.communityConfiguration.etbOfferConfig.previousVolunteerExpLabel,totalCount:e.count,totalLabel:t.communityConfiguration.etbStatistics.totalLabel,data:o}}function $a(e,t){const n=Vo(t.communityConfiguration.etbOfferConfig),o=e.rows.map((e=>({label:Wa(e.name,n),count:e.count})));return{title:t.communityConfiguration.etbOfferConfig.howLearnTimeBankLabel,totalCount:e.count,totalLabel:t.communityConfiguration.etbStatistics.totalLabel,data:o}}function Va(e,t){const n=e.rows.map((e=>({label:e.name,count:e.count})));return{title:t.communityConfiguration.etbUserProfileConfig.employerLabel,totalCount:e.count,totalLabel:t.communityConfiguration.etbStatistics.totalLabel,data:n}}function Wa(e,t){return t.find((t=>t.value===e))?.label??e}const Ha="TOTAL",Xa=(0,ae.Ik)({name:(0,ae.Yj)(),count:(0,ae.ai)(),isManagerPosition:(0,ae.lq)((0,ae.zM)())}),Ka=(0,ae.Ik)({rows:(0,ae.YO)(Xa),count:(0,ae.ai)()}),Ja=(0,ae.Ik)({name:(0,ae.Yj)(),values:(0,ae.g1)((0,ae.Yj)(),(0,ae.ai)())}),Za=(0,ae.Ik)({volunteerType:Ka,genders:(0,ae.YO)(Ja),employers:Ka,motivations:Ka,experience:Ka,knowEtb:Ka});const Qa=["1930-1939","1940-1949","1950-1959","1960-1969","1970-1979","1980-1989","1990-1999","2000-2009","2010-2019"];const ei=e=>{const t=(0,o.c)(6),{data:n}=e,i=(0,m.useGemStore)(ti),r=(0,u.U)();let l;t[0]!==r||t[1]!==n?(l=function(e,t){const n=function(e){const t=e.communityConfiguration.etbStatistics;return[{type:"TEXT",apiFieldName:"gender",sorting:!1,title:e.communityConfiguration.userProfile.genderLabel},{type:"TEXT",apiFieldName:"total",sorting:!1,title:t.totalLabel},...Qa.map((e=>({type:"TEXT",apiFieldName:e,sorting:!1,title:e})))]}(t),o={columns:[],data:[],id:(0,T.k)()};return o.columns=[n.map((e=>({id:(0,T.k)(),name:e.apiFieldName,label:e.title??"",type:e.type,sorting:e.sorting})))],o.data=e.map(((e,o)=>n.reduce(((n,a,i)=>{let r;if("TEXT"===a.type){const n="gender"===a.apiFieldName?function(e,t){return"TOTAL"===e?t.communityConfiguration.etbStatistics.totalLabel:Ma(e,t.communityConfiguration.userProfile)}(e.name,t):String(e.values[a.apiFieldName.replace("-","")]??"");r={type:"TEXT",id:`${o}-${i}`,value:n,valueForSorting:""}}return r?{...n,[a.apiFieldName]:r}:n}),{}))),o}(n,r),t[0]=r,t[1]=n,t[2]=l):l=t[2];const s=l;let c;return t[3]!==i||t[4]!==s?(c=(0,a.Y)(B,{children:(0,a.Y)(D.d,{tableData:s,isMobile:i})}),t[3]=i,t[4]=s,t[5]=c):c=t[5],c};function ti(e){return e.mediaBreakpoint<ee.E.SM}const ni=(0,P.A)("div",{target:"eqq4q8n1"})("--font-weight-first-row:bold;display:flex;flex-direction:column;gap:",(0,j.a)(32),";"),oi=(0,P.A)("div",{target:"eqq4q8n0"})("display:flex;gap:",(0,j.a)(24),";flex-wrap:wrap;margin-top:",(0,j.a)(32),";"),ai=()=>{const e=(0,o.c)(26),t=(0,u.U)(),n=t.communityConfiguration.etbStatistics,[i,r]=(0,c.useState)(""),l=St(t),[s,m]=function(e){const t=(0,o.c)(11),n=(0,u.U
1)(),a=(0,w.S)();let i;t[0]!==n.communityConfiguration.errorMessage.errorCodes?(i={method:"GET",responseStruct:Za,errorCodes:n.communityConfiguration.errorMessage.errorCodes},t[0]=n.communityConfiguration.errorMessage.errorCodes,t[1]=i):i=t[1];const[r,l,s]=(0,oe.q)(i);let m,d,f;return t[2]!==n.communityConfiguration.general||t[3]!==l||t[4]!==a.jwtToken||t[5]!==e?(m=()=>{!async function(e,t,n,o){const a={headers:(0,E.d)(t),method:"GET"};let i=`${(0,L.y)(e)}/etb/stats`;o&&(i+=`?year=${o}`),await n(i,a)}(n.communityConfiguration.general,a.jwtToken,l,e)},d=[n.communityConfiguration.general,a.jwtToken,e,l],t[2]=n.communityConfiguration.general,t[3]=l,t[4]=a.jwtToken,t[5]=e,t[6]=m,t[7]=d):(m=t[6],d=t[7]),(0,c.useEffect)(m,d),t[8]!==r||t[9]!==s?(f=[r,s],t[8]=r,t[9]=s,t[10]=f):f=t[10],f}(i);let d;e[0]!==s?(d=s?function(e){const t=e.find((e=>e.name===Ha)),n=e.filter((e=>e.name!==Ha));return t?[t,...n]:n}(s.genders):[],e[0]=s,e[1]=d):d=e[1];const f=d;let g,b,p;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=(0,Yt.S8)({"--col-count-md":4}),e[2]=g):g=e[2],e[3]!==n.yearLabel||e[4]!==l.name?(b=(0,Ge.s)({name:l.name,label:n.yearLabel}),e[3]=n.yearLabel,e[4]=l.name,e[5]=b):b=e[5],e[6]===Symbol.for("react.memo_cache_sentinel")?(p=e=>{r(e.map(ii)[0])},e[6]=p):p=e[6];const h=l.options,y=String(i);let C,T,v,N,S,M;return e[7]!==y||e[8]!==l.options?(C=(0,wt.o)(h,y),e[7]=y,e[8]=l.options,e[9]=C):C=e[9],e[10]!==C||e[11]!==l?(T=(0,a.Y)(At.A,{disabled:!1,dispatchValue:p,selectInputConfig:l,value:C}),e[10]=C,e[11]=l,e[12]=T):T=e[12],e[13]!==b||e[14]!==T?(v=(0,a.Y)("div",{className:"gem-grid",style:g,children:(0,a.Y)(We.E,{...b,children:T})}),e[13]=b,e[14]=T,e[15]=v):v=e[15],e[16]!==m?(N=m&&(0,a.Y)(Se.h,{}),e[16]=m,e[17]=N):N=e[17],e[18]!==t||e[19]!==s||e[20]!==f?(S=s&&(0,a.FD)(a.FK,{children:[(0,a.Y)(ei,{data:f}),(0,a.FD)(oi,{children:[(0,a.Y)(Ra,{...Ga(s.volunteerType,t)}),(0,a.Y)(Ra,{...za(s.motivations,t)}),(0,a.Y)(Ra,{...qa(s.experience,t)}),(0,a.Y)(Ra,{...$a(s.knowEtb,t)}),(0,a.Y)(Ra,{...Va(s.employers,t)})]})]}),e[18]=t,e[19]=s,e[20]=f,e[21]=S):S=e[21],e[22]!==S||e[23]!==v||e[24]!==N?(M=(0,a.FD)(ni,{children:[v,N,S]}),e[22]=S,e[23]=v,e[24]=N,e[25]=M):M=e[25],M};function ii(e){return e.value}var ri=n(83758),li=n(80158);function si(e,t,n,o){return t&&n&&o?e.map((e=>{const a={...e};return a.id!==t||"NGO_ADMIN"!==n&&"NGO_USER"!==n||(a.userCommunityGroups[0].name=n,a.etbProfiles=[o]),a})):e}const ci={ASC:"DESC",NONE:"ASC",DESC:"NONE"};function ui(e){return{dialog:e,type:"SET_ACTUAL_DIALOG"}}function mi(e){return{type:"SET_ACTUAL_USER",user:e}}function di(e){return{type:"SET_ACTUAL_ROLE",role:e}}function fi(e,t){switch(t.type){case"SET_USERS":return 0===e.offset?{...e,users:t.users,count:t.count}:{...e,users:[...e.users,...t.users],count:t.count};case"LOAD_MORE":return{...e,offset:e.users.length};case"RESET_TABLE":return{...e,offset:0,forceResetTrigger:(0,T.k)()};case"SET_ACTUAL_DIALOG":return{...e,dialog:t.dialog};case"SET_ACTUAL_USER":return{...e,actualUser:t.user};case"SET_ACTUAL_NGO":return{...e,actualNgo:t.ngo};case"SET_ACTUAL_ROLE":return{...e,actualRole:t.role};case"SORT_BY":{let n=ci[e.sorting.direction];return e.sorting.field!==t.field&&(n=ci.NONE),{...e,offset:0,sorting:{field:t.field,direction:n}}}case"UPDATE_ROLE_IN_USERS":return{...e,users:(n=e.users,o=e.actualUser?.id,a=e.actualRole,o&&a?n.map((e=>{const t={...e};return t.id===o&&(t.userCommunityGroups[0].name=a),t})):n)};case"UPDATE_NGO_IN_USERS":return{...e,users:si(e.users,e.actualUser?.id,e.actualRole,e.actualNgo)};case"SET_FILTERS":return{...e,offset:0,filters:t.filters};default:return e}var n,o,a}const gi={users:[],offset:0,count:0,sorting:{direction:"NONE"}},bi=e=>{const t=(0,o.c)(82),{ngos:n,handleOpenDialog:i,count:r,dispatch:l}=e,s=(0,u.U)().communityConfiguration,c=s.userProfile,m=s.etbUserProfileConfig,d=(0,w.S)();let f;t[0]!==s.general.communityId||t[1]!==d.userRoles?(f=(0,Qt.m)(s.general.communityId,d.userRoles),t[0]=s.general.communityId,t[1]=d.userRoles,t[2]=f):f=t[2];const g="ADMIN"===f;let b;t[3]!==s.general.communityId||t[4]!==d.userRoles?(b=(0,Qt.m)(s.general.communityId,d.userRoles),t[3]=s.general.communityId,t[4]=d.userRoles,t[5]=b):b=t[5];const p="MODERATOR"===b,h=ro(s.userProfile);let C;if(t[6]!==s.general.admin||t[7]!==s.general.banned||t[8]!==s.general.defaultUserType||t[9]!==s.general.moderator||t[10]!==s.general.ngoAdmin||t[11]!==s.general.ngoUser||t[12]!==g||t[13]!==p){if(C=[],g||p){let e;t[15]!==s.general.admin?(e={value:"ADMIN",label:s.general.admin},t[15]=s.general.admin,t[16]=e):e=t[16],C.push(e)}
1let e,n,o,a,i;t[17]!==s.general.moderator?(e={value:"MODERATOR",label:s.general.moderator},t[17]=s.general.moderator,t[18]=e):e=t[18],C.push(e),t[19]!==s.general.ngoAdmin?(n={value:"NGO_ADMIN",label:s.general.ngoAdmin},t[19]=s.general.ngoAdmin,t[20]=n):n=t[20],C.push(n),t[21]!==s.general.ngoUser?(o={value:"NGO_USER",label:s.general.ngoUser},t[21]=s.general.ngoUser,t[22]=o):o=t[22],C.push(o),t[23]!==s.general.defaultUserType?(a={value:"DEFAULT",label:s.general.defaultUserType},t[23]=s.general.defaultUserType,t[24]=a):a=t[24],C.push(a),t[25]!==s.general.banned?(i={value:"BANNED",label:s.general.banned},t[25]=s.general.banned,t[26]=i):i=t[26],C.push(i),t[6]=s.general.admin,t[7]=s.general.banned,t[8]=s.general.defaultUserType,t[9]=s.general.moderator,t[10]=s.general.ngoAdmin,t[11]=s.general.ngoUser,t[12]=g,t[13]=p,t[14]=C}else C=t[14];const L=C;let E,T,v,N,S;t[27]!==m.employeeLabel?(E={value:"EMPLOYEE",label:m.employeeLabel},t[27]=m.employeeLabel,t[28]=E):E=t[28],t[29]!==m.familyMemberLabel?(T={value:"FAMILY_MEMBER",label:m.familyMemberLabel},t[29]=m.familyMemberLabel,t[30]=T):T=t[30],t[31]!==m.retiredEmployeeLabel?(v={value:"RETIRED_EMPLOYEE",label:m.retiredEmployeeLabel},t[31]=m.retiredEmployeeLabel,t[32]=v):v=t[32],t[33]!==m.managerFilterLabel?(N={value:"MANAGER",label:m.managerFilterLabel},t[33]=m.managerFilterLabel,t[34]=N):N=t[34],t[35]!==E||t[36]!==T||t[37]!==v||t[38]!==N?(S=[E,T,v,N],t[35]=E,t[36]=T,t[37]=v,t[38]=N,t[39]=S):S=t[39];const M=S;let O,I;t[40]!==c.allLabel?(O={value:"",label:c.allLabel},t[40]=c.allLabel,t[41]=O):O=t[41],t[42]!==n||t[43]!==O?(I=[O,...n.map(pi)],t[42]=n,t[43]=O,t[44]=I):I=t[44];const A=I;let Y;t[45]!==l?(Y=e=>{l({filters:e,type:"SET_FILTERS"})},t[45]=l,t[46]=Y):Y=t[46];const k=Y;let D,P,x,U,j,F,R,_,B,G;return t[47]!==m.emailMessageSettingsButtonLabel||t[48]!==i||t[49]!==g||t[50]!==p?(D=(g||p)&&(0,a.Y)(Bn.r,{onClick:i("EMAIL_TEMPLATE"),children:m.emailMessageSettingsButtonLabel}),t[47]=m.emailMessageSettingsButtonLabel,t[48]=i,t[49]=g,t[50]=p,t[51]=D):D=t[51],t[52]!==i?(P=i("RESET_DISCLAIMER"),t[52]=i,t[53]=P):P=t[53],t[54]!==c.showTermsAndConditionsButtonLabel||t[55]!==P?(x=(0,a.Y)(yt,{onClick:P,children:c.showTermsAndConditionsButtonLabel}),t[54]=c.showTermsAndConditionsButtonLabel,t[55]=P,t[56]=x):x=t[56],t[57]!==D||t[58]!==x?(U=(0,a.FD)(Eo,{children:[D,x]}),t[57]=D,t[58]=x,t[59]=U):U=t[59],t[60]!==c.searchingFor?(j=(0,a.Y)(li.j,{name:"0",type:"FULL_TEXT_SEARCH_LOCAL",label:c.searchingFor}),t[60]=c.searchingFor,t[61]=j):j=t[61],t[62]!==c.userTypeLabel||t[63]!==L?(F=(0,a.Y)(ri.J,{options:L,name:"1",label:c.userTypeLabel,type:"USER_PERMISSION"}),t[62]=c.userTypeLabel,t[63]=L,t[64]=F):F=t[64],t[65]!==c.volunteerTypeLabel||t[66]!==M?(R=(0,a.Y)(ri.J,{options:M,name:"2",label:c.volunteerTypeLabel,type:"USER_TYPE"}),t[65]=c.volunteerTypeLabel,t[66]=M,t[67]=R):R=t[67],t[68]!==s.etbUserProfileConfig.selectNgoLabel||t[69]!==A?(_=(0,a.Y)(go,{placeholder:"",label:s.etbUserProfileConfig.selectNgoLabel,name:"3",options:A,type:"NGO"}),t[68]=s.etbUserProfileConfig.selectNgoLabel,t[69]=A,t[70]=_):_=t[70],t[71]!==r||t[72]!==k||t[73]!==h||t[74]!==j||t[75]!==F||t[76]!==R||t[77]!==_?(B=(0,a.FD)(Oo.s,{cId:y.f,labels:h,onFiltersChange:k,filteredCount:r,children:[j,F,R,_]}),t[71]=r,t[72]=k,t[73]=h,t[74]=j,t[75]=F,t[76]=R,t[77]=_,t[78]=B):B=t[78],t[79]!==U||t[80]!==B?(G=(0,a.FD)(io,{children:[U,B]}),t[79]=U,t[80]=B,t[81]=G):G=t[81],G};function pi(e){return{value:String(e.id),label:e.name}}const hi=e=>{const t=(0,o.c)(20),{actualUser:n,dispatch:i}=e,r=(0,u.U)(),l=r.communityConfiguration.general,s=r.communityConfiguration.userProfile,m=(0,w.S)(),[d,f]=function(){const e=(0,o.c)(6),t=(0,u.U)(),[n,a]=(0,I.s)();let i,r;return e[0]!==t.communityConfiguration.errorMessage.errorCodes||e[1]!==n?(i={fetchState:n,method:"DELETE",errorCodes:t.communityConfiguration.errorMessage.errorCodes},e[0]=t.communityConfiguration.errorMessage.errorCodes,e[1]=n,e[2]=i):i=e[2],(0,M.h)(i),(0,O.s)(n,t.communityConfiguration.errorMessage.successMessage),e[3]!==a||e[4]!==n?(r=[a,n],e[3]=a,e[4]=n,e[5]=r):r=e[5],r}();let g,b,p;t[0]!==i||t[1]!==f.response?(g=()=>{f.response&&(i({type:"RESET_TABLE"}),i(ui()))},t[0]=i,t[1]=f.response,t[2]=g):g=t[2],t[3]!==i||t[4]!==f?(b=[f,i],t[3]=i,t[4]=f,t[5]=b):b=t[5],(0,c.useEffect)(g,b),t[6]!==n.id||t[7]!==d||t[8]!==l||t[9]!==m.jwtToken?(p=async()=>{await async function(e,t,n,o){const a={headers:(0,E.d)(t),method:"DELETE"};await o(`${(0,L.y)(e)}/delete-user/${n}`,a)}(l,m.jwtToken,n.id,d)},t[6]=n.id,t[7]=d,t[8]=l,t[9]=m.jwtToken,t[10]=p):p=t[10];const h=p;let y;t[11]!==i?(y=()=>{i(ui())},t[11]=i,t[12]=y):y=t[12];const T=y;let v;return t[13]!==T||t[14]!==l.cancelButtonLabel||t[15]!==h||t[16]!==s.deleteUser||t[17]!==s.deleteUserButton||t[18]!==s.deleteUserNote?(v=(0,a.Y)(C.l,{type:"CONFIRM",title:s.deleteUser,message:s.deleteUserNote,confirmClick:h,cancelText:l.cancelButtonLabel,confirmText:s.deleteUserButton,cancelClick:T}
1),t[13]=T,t[14]=l.cancelButtonLabel,t[15]=h,t[16]=s.deleteUser,t[17]=s.deleteUserButton,t[18]=s.deleteUserNote,t[19]=v):v=t[19],v};var yi=n(16587),Ci=n(97867);const Li=[404],Ei="offersEmailTemplate",Ti="ngoOffersEmailTemplate";function vi(e){const t=(0,o.c)(167),{closeDialog:n,mode:i}=e,r=(0,w.S)(),l=(0,u.U)(),s=l.communityConfiguration.general,m=l.communityConfiguration.etbUserProfileConfig,d="NGO"===i?Ti:Ei,[f,g]=function(e){const t=(0,o.c)(13),n=(0,u.U)();let a;t[0]!==n.communityConfiguration.general?(a=(0,L.y)(n.communityConfiguration.general),t[0]=n.communityConfiguration.general,t[1]=a):a=t[1];const i=a,r=(0,w.S)();let l;t[2]!==n.communityConfiguration.errorMessage.errorCodes?(l={method:"GET",responseStruct:Ht,errorCodes:n.communityConfiguration.errorMessage.errorCodes,isModal:!0,ignoredStatusCodes:Li},t[2]=n.communityConfiguration.errorMessage.errorCodes,t[3]=l):l=t[3];const[s,m,d]=(0,oe.q)(l);let f,g,b;return t[4]!==m||t[5]!==e||t[6]!==i||t[7]!==r.jwtToken?(f=()=>{const t={headers:(0,E.d)(r.jwtToken),method:"GET"};m(`${i}/template?name=${e}`,t)},g=[m,r.jwtToken,i,e],t[4]=m,t[5]=e,t[6]=i,t[7]=r.jwtToken,t[8]=f,t[9]=g):(f=t[8],g=t[9]),(0,c.useEffect)(f,g),t[10]!==s||t[11]!==d?(b=[s,d],t[10]=s,t[11]=d,t[12]=b):b=t[12],b}(d),[b,p]=function(){const e=(0,o.c)(6),t=(0,u.U)(),[n,a]=(0,I.s)();let i,r;return e[0]!==t.communityConfiguration.errorMessage.errorCodes||e[1]!==n?(i={fetchState:n,method:"POST",errorCodes:t.communityConfiguration.errorMessage.errorCodes,isModal:!0},e[0]=t.communityConfiguration.errorMessage.errorCodes,e[1]=n,e[2]=i):i=e[2],(0,M.h)(i),(0,O.s)(n,t.communityConfiguration.errorMessage.successMessage),e[3]!==a||e[4]!==n?(r=[a,n],e[3]=a,e[4]=n,e[5]=r):r=e[5],r}(),[h,y]=(0,c.useState)(""),[C,T]=(0,c.useState)(""),[v,N]=(0,c.useState)(""),[S,A]=(0,c.useState)(""),[Y,k]=(0,c.useState)(""),[D,P]=(0,c.useState)(""),[x,U]=(0,c.useState)(""),[j,F]=(0,c.useState)(""),[R,_]=(0,c.useState)(""),[B,G]=(0,c.useState)(""),[z,q]=(0,c.useState)(""),[$,V]=(0,c.useState)(""),[W,H]=(0,c.useState)(""),[X,K]=(0,c.useState)(""),[J,Z]=(0,c.useState)(!1);let Q;t[0]!==j||t[1]!==x||t[2]!==B||t[3]!==R||t[4]!==l.communityConfiguration||t[5]!==b||t[6]!==S||t[7]!==v||t[8]!==C||t[9]!==h||t[10]!==D||t[11]!==Y||t[12]!==i||t[13]!==X||t[14]!==W||t[15]!==z||t[16]!==$||t[17]!==d||t[18]!==r?(Q=async()=>{Z(!0);const e=function({mode:e,emailSubjectLocal:t,emailSubjectEn:n,emailMessageLocal:o,emailMessageEn:a,loginButtonLocal:i,loginButtonEn:r,buttonPathLocal:l,buttonPathEn:s,showOfferEn:c,showOfferLocal:u,checkPreferencesMessageLocal:m,checkPreferencesMessageEn:d,pathToOffersListLocal:f,pathToOffersListEn:g}){const b="DEFAULT"===e;return{emailSubjectLocal:t,emailSubjectEn:n,emailMessageLocal:o,emailMessageEn:a,loginButtonLocal:i,loginButtonEn:r,buttonPathLocal:l,buttonPathEn:s,showOfferEn:c,showOfferLocal:u,checkPreferencesMessageLocal:b?m:"",checkPreferencesMessageEn:b?d:"",pathToOffersListLocal:f,pathToOffersListEn:g}}({mode:i,emailSubjectLocal:h,emailSubjectEn:C,emailMessageLocal:v,emailMessageEn:S,loginButtonLocal:Y,loginButtonEn:D,buttonPathLocal:x,buttonPathEn:j,showOfferEn:z,showOfferLocal:$,checkPreferencesMessageLocal:R,checkPreferencesMessageEn:B,pathToOffersListLocal:W,pathToOffersListEn:X});(function(e,t){const n="NGO"===t?["checkPreferencesMessageLocal","checkPreferencesMessageEn"]:[];return Object.entries(e).filter((([e])=>!n.includes(e))).map((([,e])=>e)).every((e=>""!==e.trim()))})(e,i)&&await async function(e,t,n,o,a){const i={name:a,emailSubjectLocal:n.emailSubjectLocal,emailSubjectEn:n.emailSubjectEn,emailMessageLocal:n.emailMessageLocal,emailMessageEn:n.emailMessageEn,loginButtonLocal:n.loginButtonLocal,loginButtonEn:n.loginButtonEn,buttonPathLocal:n.buttonPathLocal,buttonPathEn:n.buttonPathEn,checkPreferencesMessageLocal:n.checkPreferencesMessageLocal,checkPreferencesMessageEn:n.checkPreferencesMessageEn,showOfferLocal:n.showOfferLocal,showOfferEn:n.showOfferEn,pathToOffersListEn:n.pathToOffersListEn,pathToOffersListLocal:n.pathToOffersListLocal},r={headers:(0,E.d)(t.jwtToken),method:"POST",body:JSON.stringify(i)};await o(`${(0,L.y)(e.general)}/template/new_design`,r)}(l.communityConfiguration,r,e,b,d)},t[0]=j,t[1]=x,t[2]=B,t[3]=R,t[4]=l.communityConfiguration,t[5]=b,t[6]=S,t[7]=v,t[8]=C,t[9]=h,t[10]=D,t[11]=Y,t[12]=i,t[13]=X,t[14]=W,t[15]=z,t[16]=$,t[17]=d,t[18]=r,t[19]=Q):Q=t[19];const ee=Q;let te,ne,ae,ie,re,le,se,ce,ue,me,de,fe,ge,be,pe,he,ye,Ce;if(t[20]!==n||t[21]!==p.response?(te=()=>{p.response&&n()},ne=[n,p.response],t[20]=n,t[21]=p.response,t[22]=te,t[23]=ne):(te=t[22],ne=t[23]),(0,c.useEffect)(te,ne),t[24]!==f?(ae=()=>{f&&(y(f.emailSubjectLocal),T(f.emailSubjectEn),N(f.emailMessageLocal),A(f.emailMessageEn),k(f.loginButtonLocal),P(f.loginButtonEn),U(f.buttonPathLocal),F(f.buttonPathEn),_(f.checkPreferencesMessageLocal),G(f.checkPreferencesMessageEn),q(f.showOfferEn),V(f.showOfferLocal),H(f.pathToOffersListLocal),K(f.pathToOffersListEn))},ie=[f],t[24]=f,t[25]=ae,t[26]=ie):(ae=t[25],ie=t[26]),(0,c.useEffect)(ae,ie),t[27]!==j||t[28]!==x||t[29]!==B||t[30]!==R||t[31]!==S||t[32]!==v||t[33]!==C||t[34]!==h||t[35]!==s.cancelButtonLabel||t[36]!==s.okButtonLabel||t[37]!==D||t[38]!==Y||t[39]!==X||t[40]!==W||t[41]!==m?.buttonPathForEnglishLabel||t[42]!==m?.buttonPathForLocalLanguageLabel||t[43]!==m?.emailMessageInEnglishLabel||t[44]!==m?.emailMessageInLocalLanguageLabel||t[45]!==m?.emailSubjectInEnglishLabel||t[46]!==m?.emailSubjectInLocalLanguageLabel||t[47]!==m?.loginButtonInEnglishLabel||t[48]!==m?.loginButtonInLocalLanguageLabel||t[49]!==m?.pathToOffersListInEnglishLabel||t[50]!==m?.pathToOffersListInLocalLanguageLabel||t[51]!==m?.showOfferInEnglishLabel||t[52]!==m?.showOfferInLocalLanguageLabel||t[53]!==z||t[54]!==$){const e={ok:s.okButtonLabel,cancel:s.cancelButtonLabel},n=m?.emailSubjectInLocalLanguageLabel??"";let o;t[69]!==h||t[70]!==n?(o=(0,qe.p)("emailSubjectLocal",n,h,y),t[69]=h,t[70]=n,t[71]=o):o=t[71],de=o;const a=m?.emailMessageInLocalLanguageLabel;let i;t[72]!==v||t[73]!==a?(i=ze({numberOfRows:8,name:"emailMessageLocal",label:a,setter:N,value:v}),t[72]=v,t[73]=a,t[74]=i):i=t[74],ue=i;const r=m?.pathToOffersListInLocalLanguageLabel??"";let l;t[75]!==W||t[76]!==r?(l=(0,qe.p)("pathToOffersListLocal",r,W,H),t[75]=W,t[76]=r,t[77]=l):l=t[77],pe
1=l;const c=m?.showOfferInLocalLanguageLabel??"";let u;t[78]!==$||t[79]!==c?(u=(0,qe.p)("showOfferLocal",c,$,V),t[78]=$,t[79]=c,t[80]=u):u=t[80],ye=u;const d=m?.loginButtonInLocalLanguageLabel??"";let f;t[81]!==Y||t[82]!==d?(f=(0,qe.p)("loginButtonLocal",d,Y,k),t[81]=Y,t[82]=d,t[83]=f):f=t[83],ge=f;const g=m?.buttonPathForLocalLanguageLabel??"";let b;t[84]!==x||t[85]!==g?(b=(0,qe.p)("buttonPathLocal",g,x,U),t[84]=x,t[85]=g,t[86]=b):b=t[86],le=b,se=Jn("checkPreferencesMessageLocal",R,e,_);const p=m?.emailSubjectInEnglishLabel??"";let L;t[87]!==C||t[88]!==p?(L=(0,qe.p)("emailSubjectEn",p,C,T),t[87]=C,t[88]=p,t[89]=L):L=t[89],me=L;const E=m?.emailMessageInEnglishLabel;let M;t[90]!==S||t[91]!==E?(M=ze({name:"emailMessageEn",label:E,value:S,setter:A,numberOfRows:8}),t[90]=S,t[91]=E,t[92]=M):M=t[92],ce=M;const O=m?.pathToOffersListInEnglishLabel??"";let I;t[93]!==X||t[94]!==O?(I=(0,qe.p)("pathToOffersListEn",O,X,K),t[93]=X,t[94]=O,t[95]=I):I=t[95],be=I;const w=m?.showOfferInEnglishLabel??"";let J;t[96]!==z||t[97]!==w?(J=(0,qe.p)("showOfferEn",w,z,q),t[96]=z,t[97]=w,t[98]=J):J=t[98],he=J;const Z=m?.loginButtonInEnglishLabel??"";let Q;t[99]!==D||t[100]!==Z?(Q=(0,qe.p)("loginButtonEn",Z,D,P),t[99]=D,t[100]=Z,t[101]=Q):Q=t[101],fe=Q;const ee=m?.buttonPathForEnglishLabel??"";let te;t[102]!==j||t[103]!==ee?(te=(0,qe.p)("buttonPathEn",ee,j,F),t[102]=j,t[103]=ee,t[104]=te):te=t[104],re=te,Ce=Jn("checkPreferencesMessageEn",B,e,G),t[27]=j,t[28]=x,t[29]=B,t[30]=R,t[31]=S,t[32]=v,t[33]=C,t[34]=h,t[35]=s.cancelButtonLabel,t[36]=s.okButtonLabel,t[37]=D,t[38]=Y,t[39]=X,t[40]=W,t[41]=m?.buttonPathForEnglishLabel,t[42]=m?.buttonPathForLocalLanguageLabel,t[43]=m?.emailMessageInEnglishLabel,t[44]=m?.emailMessageInLocalLanguageLabel,t[45]=m?.emailSubjectInEnglishLabel,t[46]=m?.emailSubjectInLocalLanguageLabel,t[47]=m?.loginButtonInEnglishLabel,t[48]=m?.loginButtonInLocalLanguageLabel,t[49]=m?.pathToOffersListInEnglishLabel,t[50]=m?.pathToOffersListInLocalLanguageLabel,t[51]=m?.showOfferInEnglishLabel,t[52]=m?.showOfferInLocalLanguageLabel,t[53]=z,t[54]=$,t[55]=re,t[56]=le,t[57]=se,t[58]=ce,t[59]=ue,t[60]=me,t[61]=de,t[62]=fe,t[63]=ge,t[64]=be,t[65]=pe,t[66]=he,t[67]=ye,t[68]=Ce}else re=t[55],le=t[56],se=t[57],ce=t[58],ue=t[59],me=t[60],de=t[61],fe=t[62],ge=t[63],be=t[64],pe=t[65],he=t[66],ye=t[67],Ce=t[68];const Le=Ce;let Ee,Te,ve,Ne,Me,Oe;return t[105]!==g?(Ee=g&&(0,a.Y)(Se.h,{}),t[105]=g,t[106]=Ee):Ee=t[106],t[107]!==j||t[108]!==re||t[109]!==x||t[110]!==le||t[111]!==B||t[112]!==Le||t[113]!==R||t[114]!==se||t[115]!==S||t[116]!==ce||t[117]!==ue||t[118]!==v||t[119]!==C||t[120]!==me||t[121]!==h||t[122]!==de||t[123]!==s||t[124]!==g||t[125]!==D||t[126]!==fe||t[127]!==Y||t[128]!==ge||t[129]!==i||t[130]!==X||t[131]!==be||t[132]!==W||t[133]!==pe||t[134]!==m?.buttonPathForEnglishLabel||t[135]!==m?.buttonPathForLocalLanguageLabel||t[136]!==m?.checkPreferencesMessageInEnglishLabel||t[137]!==m?.checkPreferencesMessageInLocalLanguageLabel||t[138]!==m?.emailMessageInEnglishLabel||t[139]!==m?.emailMessageInLocalLanguageLabel||t[140]!==m?.emailSubjectInEnglishLabel||t[141]!==m?.emailSubjectInLocalLanguageLabel||t[142]!==m?.loginButtonInEnglishLabel||t[143]!==m?.loginButtonInLocalLanguageLabel||t[144]!==m?.pathToOffersListInEnglishLabel||t[145]!==m?.pathToOffersListInLocalLanguageLabel||t[146]!==m?.showOfferInEnglishLabel||t[147]!==m?.showOfferInLocalLanguageLabel||t[148]!==J||t[149]!==z||t[150]!==he||t[151]!==$||t[152]!==ye?(Te=!g&&(0,a.FD)(a.FK,{children:[(0,a.Y)(We.E,{...(0,Ge.s)({name:"emailSubjectLocal",label:m?.emailSubjectInLocalLanguageLabel,errorMessage:(0,je.h)(J,s,h)}),children:(0,a.Y)(Xe.p,{...de})}),(0,a.Y)(We.E,{...(0,Ge.s)({name:"emailMessageLocal",label:m?.emailMessageInLocalLanguageLabel,errorMessage:(0,je.h)(J,s,v),description:Ni}),children:(0,a.Y)(He.N,{...ue})}),(0,a.Y)(We.E,{...(0,Ge.s)({name:"pathToOffersListLocal",label:m?.pathToOffersListInLocalLanguageLabel??"",errorMessage:(0,je.h)(J,s,W)}),children:(0,a.Y)(Xe.p,{...pe})}),(0,a.Y)(We.E,{...(0,Ge.s)({name:"showOfferLocal",label:m?.showOfferInLocalLanguageLabel??"",errorMessage:(0,je.h)(J,s,$)}),children:(0,a.Y)(Xe.p,{...ye})}),(0,a.Y)(We.E,{...(0,Ge.s)({name:"loginButtonLocal",label:m?.loginButtonInLocalLanguageLabel??"",errorMessage:(0,je.h)(J,s,Y)}),children:(0,a.Y)(Xe.p,{...ge})}),(0,a.Y)(We.E,{...(0,Ge.s)({name:"buttonPathLocal",label:m?.buttonPathForLocalLanguageLabel??"",errorMessage:(0,je.h)(J,s,x)}),children:(0,a.Y)(Xe.p,{...le})}),"DEFAULT"===i&&(0,a.Y)(We.E,{...(0,Ge.s)({name:"checkPreferencesMessageLocal",label:m?.checkPreferencesMessageInLocalLanguageLabel??"",errorMessage:(0,je.h)(J,s,R)}),children:(0,a.Y)(An,{...se})}),(0,a.Y)(We.E,{...(0,Ge.s)({name:"emailSubjectEn",label:m?.emailSubjectInEnglishLabel,errorMessage:(0,je.h)(J,s,C)}),children:(0,a.Y)(Xe.p,{...me})}),(0,a.Y)(We.E,{...(0,Ge.s)({name:"emailMessageEn",label:m?.emailMessageInEnglishLabel,errorMessage:(0,je.h)(J,s,S),description:Ni}),children:(0,a.Y)(He.N,{...ce})}),(0,a.Y)(We.E,{...(0,Ge.s)({name:"pathToOffersListEn",label:m?.pathToOffersListInEnglishLabel??"",errorMessage:(0,je.h)(J,s,X)}),children:(0,a.Y)(Xe.p,{...be})}),(0,a.Y)(We.E,{...(0,Ge.s)({name:"showOfferEn",label:m?.showOfferInEnglishLabel??"",errorMessage:(0,je.h)(J,s,z)}),children:(0,a.Y)(Xe.p,{...he})}),(0,a.Y)(We.E,{...(0,Ge.s)({name:"loginButtonEn",label:m?.loginButtonInEnglishLabel??"",errorMessage:(0,je.h)(J,s,D)}),children:(0,a.Y)(Xe.p,{...fe})}),(0,a.Y)(We.E,{...(0,Ge.s)({name:"buttonPathEn",label:m?.buttonPathForEnglishLabel??"",errorMessage:(0,je.h)(J,s,j)}),children:(0,a.Y)(Xe.p,{...re})}),"DEFAULT"===i&&(0,a.Y)(We.E,{...(0,Ge.s)({name:"checkPreferencesMessageEn",label:m?.checkPreferencesMessageInEnglishLabel??"",errorMessage:(0,je.h)(J,s,B)}),children:(0,a.Y)(An,{...Le})})]}),t[107]=j,t[108]=re,t[109]=x,t[110]=le,t[111]=B,t[112]=Le,t[113]=R,t[114]=se,t[115]=S,t[116]=ce,t[117]=ue,t[118]=v,t[119]=C,t[120]=me,t[121]=h,t[122]=de,t[123]=s,t[124]=g,t[125]=D,t[126]=fe,t[127]=Y,t[128]=ge,t[129]=i,t[130]=X,t[131]=be,t[132]=W,t[133]=pe,t[134]=m?.buttonPathForEnglishLabel,t[135]=m?.buttonPathForLocalLanguageLabel,t[136]=m?.checkPreferencesMessageInEnglishLabel,t[137]=m?.checkPreferencesMessageInLocalLanguageLabel,t[138]=m?.emailMessageInEnglishLabel,t[139]=m?.emailMessageInLocalLanguageLabel,t[140]=m?.emailSubjectInEnglishLabel,t[141]=m?.emailSubjectInLocalLanguageLabel,t[142]=m?.loginButtonInEnglishLabel,t[143]=m?.loginButtonInLocalLanguageLabel,t[144]=m?.pathToOffersListInEnglishLabel,t[145]=m?.pathToOffersListInLocalLanguageLabel,t[146]=m?.showOfferInEnglishLabel,t[147]=m?.showOfferInLocalLanguageLabel,t[148]=J,t[149]=z,t[150]=he,t[151]=$,t[152]=ye,t[153]=Te):Te=t[153],t[154]!==n||t[155]!==s.cancelButtonLabel?(ve=(0,a.Y)(Bn.r,{onClick:n,children:s.cancelButtonLabel}),t[154]=n,t[155]=s.cancelButtonLabel,t[156]=ve):ve=t[156],t[157]!==s.saveButtonLabel||t[158]!==ee?(Ne=(0,a.Y)(pt.g,{onClick:ee,children:s.saveButtonLabel}),t[157]=s.saveButtonLabel,t[158]=ee,t[159]=Ne):Ne=t[159],t[160]!==Ne||t[161]!==ve?(Me=(0,a.FD)(Ci.lH,{children:[ve,Ne]}),t[160]=Ne,t[161]=ve,t[162]=Me):Me=t[162],t[163]!==Me||t[164]!==Ee||t[165]!==Te?(Oe=(0,a.FD)(a.FK,{children:[Ee,Te,Me]}),t[163]=Me,t[164]=Ee,t[165]=Te,t[166]=Oe):Oe=t[166],Oe}const Ni="Use the placeholders {{nickname}}, {{first_name}} and {{last_name}} to add the users name or nickname anywhere in the text",Si=e=>{const t=(0,o.c)(17),{closeDialog:n}
1=e,i=(0,u.U)(),r=i.communityConfiguration.general,l=i.communityConfiguration.etbUserProfileConfig,s={label:l.defaultUsersLabel??"",value:"DEFAULT_USERS"},m={label:l.ngoAdminsAndNgoUsersLabel??"",value:"NGO_ADMIN_USERS"},[d,f]=(0,c.useState)([s]),[g,b]=(0,c.useState)(!1),p={selectInputConfig:{cId:(h={name:"emailMessageSettingsMode",label:l.emailMessageForLabel??"",options:[s,m],setter:f}).name,name:h.name,label:h.label,description:h.description,componentType:"select-input",type:"RADIO_BUTTONS",options:h.options},disabled:!1,dispatchValue:e=>()=>{h.setter([e])}};var h;let y;t[0]!==d[0]?.value?(y=()=>{const e=d[0]?.value;return"NGO_ADMIN_USERS"===e?"NGO":"DEFAULT"},t[0]=d[0]?.value,t[1]=y):y=t[1];const L=y;let E;t[2]===Symbol.for("react.memo_cache_sentinel")?(E=()=>{b(!0)},t[2]=E):E=t[2];const T=E,v=C.l,N=g?void 0:l.whichEmailMessageWouldYouLikeToEditHeadline,S=g?void 0:r.nextButtonLabel,M=g?void 0:T;let O;t[3]!==n||t[4]!==L||t[5]!==g?(O=g&&(0,a.Y)(vi,{closeDialog:n,mode:L()}),t[3]=n,t[4]=L,t[5]=g,t[6]=O):O=t[6];const I=!g&&(0,a.Y)(We.E,{...(0,Ge.s)({name:p.selectInputConfig.name,label:p.selectInputConfig.label,description:p.selectInputConfig.description}),children:(0,a.Y)(yi.z,{selectInputConfig:p.selectInputConfig,value:d,disabled:p.disabled,dispatchValue:p.dispatchValue,layout:"VERTICAL"})});let w;return t[7]!==v||t[8]!==n||t[9]!==r.cancelButtonLabel||t[10]!==g||t[11]!==N||t[12]!==S||t[13]!==M||t[14]!==O||t[15]!==I?(w=(0,a.FD)(v,{type:"FORM",title:N,cancelText:r.cancelButtonLabel,cancelClick:n,confirmText:S,confirmClick:M,hideActions:g,children:[O,I]}),t[7]=v,t[8]=n,t[9]=r.cancelButtonLabel,t[10]=g,t[11]=N,t[12]=S,t[13]=M,t[14]=O,t[15]=I,t[16]=w):w=t[16],w},Mi=e=>{const t=(0,o.c)(18),{dispatch:n}=e,i=(0,u.U)(),r=i.communityConfiguration.general,l=i.communityConfiguration.userProfile,s=(0,w.S)(),[m,d]=function(){const e=(0,o.c)(6),t=(0,u.U)(),[n,a]=(0,I.s)();let i,r;return e[0]!==t.communityConfiguration.errorMessage.errorCodes||e[1]!==n?(i={fetchState:n,method:"PUT",errorCodes:t.communityConfiguration.errorMessage.errorCodes,isModal:!0},e[0]=t.communityConfiguration.errorMessage.errorCodes,e[1]=n,e[2]=i):i=e[2],(0,M.h)(i),(0,O.s)(n,t.communityConfiguration.errorMessage.successMessage),e[3]!==a||e[4]!==n?(r=[a,n],e[3]=a,e[4]=n,e[5]=r):r=e[5],r}();let f,g,b;t[0]!==n||t[1]!==d.response?(f=()=>{d.response&&n(ui())},t[0]=n,t[1]=d.response,t[2]=f):f=t[2],t[3]!==n||t[4]!==d?(g=[d,n],t[3]=n,t[4]=d,t[5]=g):g=t[5],(0,c.useEffect)(f,g),t[6]!==m||t[7]!==r||t[8]!==s.jwtToken?(b=async()=>{await async function(e,t,n){const o={headers:(0,E.d)(t),body:JSON.stringify({name:"TERMS_CONDITIONS"}),method:"PUT"};await n(`${(0,L.y)(e)}/user-community-groups:reset-disclaimer`,o)}(r,s.jwtToken,m)},t[6]=m,t[7]=r,t[8]=s.jwtToken,t[9]=b):b=t[9];const p=b;let h;t[10]!==n?(h=()=>{n(ui())},t[10]=n,t[11]=h):h=t[11];const y=h;let T;return t[12]!==y||t[13]!==p||t[14]!==l.confirmShowTermsAndConditionsText||t[15]!==l.no||t[16]!==l.yes?(T=(0,a.Y)(C.l,{type:"CONFIRM",message:l.confirmShowTermsAndConditionsText,confirmText:l.yes,cancelText:l.no,confirmClick:p,cancelClick:y}),t[12]=y,t[13]=p,t[14]=l.confirmShowTermsAndConditionsText,t[15]=l.no,t[16]=l.yes,t[17]=T):T=t[17],T},Oi=e=>{const t=(0,o.c)(20),{actualUser:n,dispatch:i}=e,r=(0,u.U)(),l=r.communityConfiguration.general,s=r.communityConfiguration.userProfile,m=(0,w.S)(),[d,f]=function(){const e=(0,o.c)(6),t=(0,u.U)(),[n,a]=(0,I.s)();let i,r;return e[0]!==t.communityConfiguration.errorMessage.errorCodes||e[1]!==n?(i={fetchState:n,method:"GET",errorCodes:t.communityConfiguration.errorMessage.errorCodes,isModal:!0},e[0]=t.communityConfiguration.errorMessage.errorCodes,e[1]=n,e[2]=i):i=e[2],(0,M.h)(i),(0,O.s)(n,t.communityConfiguration.errorMessage.successMessage),e[3]!==a||e[4]!==n?(r=[a,n],e[3]=a,e[4]=n,e[5]=r):r=e[5],r}(),g=(0,Qt.m)(l.communityId,n.userCommunityGroups)??"DEFAULT",b="NGO_ADMIN"===g||"NGO_USER"===g?Ti:Ei;let p,h,y;t[0]!==i||t[1]!==f.response?(p=()=>{f.response&&i(ui())},t[0]=i,t[1]=f.response,t[2]=p):p=t[2],t[3]!==i||t[4]!==f?(h=[f,i],t[3]=i,t[4]=f,t[5]=h):h=t[5],(0,c.useEffect)(p,h),t[6]!==n.id||t[7]!==d||t[8]!==l||t[9]!==m.jwtToken||t[10]!==b?(y=async()=>{await async function(e,t,n,o,a){const i={headers:(0,E.d)(t),method:"GET"},r=new URLSearchParams({userId:String(n),name:o});await a(`${(0,L.y)(e)}/manualOffersEmailNotificationsJob?${r.toString()}`,i)}(l,m.jwtToken,n.id,b,d)},t[6]=n.id,t[7]=d,t[8]=l,t[9]=m.jwtToken,t[10]=b,t[11]=y):y=t[11];const T=y;let v;t[12]!==i?(v=()=>{i(ui())},t[12]=i,t[13]=v):v=t[13];const N=v;let S;return t[14]!==N||t[15]!==T||t[16]!==s.areYouSureText||t[17]!==s.no||t[18]!==s.yes?(S=(0,a.Y)(C.l,{type:"CONFIRM",confirmText:s.yes,message:s.areYouSureText,cancelText:s.no,confirmClick:T,cancelClick:N}),t[14]=N,t[15]=T,t[16]=s.areYouSureText,t[17]=s.no,t[18]=s.yes,t[19]=S):S=t[19],S},Ii=e=>{const t=(0,o.c)(14),{selectedNgos:n,setter:i}=e,r=(0,u.U)(),[l,s]=bt();let c;t[0]!==l||t[1]!==n?(c=zo(n,l),t[0]=l,t[1]=n,t[2]=c):c=t[2];const m=c,{ngoComboboxConfig:d,searchConfig:f}=Xo(r.communityConfiguration,l,m);let g,b,p;return t[3]!==s?(g=s&&(0,a.Y)(Se.h,{}),t[3]=s,t[4]=g):g=t[4],t[5]!==s||t[6]!==d||t[7]!==f||t[8]!==m||t[9]!==i?(b=!s&&(0,a.Y)(At.A,{disabled:!1,searchConfig:f,dispatchValue:e=>{i(e.map(wi))},selectInputConfig:d,value:m}),t[5]=s,t[6]=d,t[7]=f,t[8]=m,t[9]=i,t[10]=b):b=t[10],t[11]!==g||t[12]!==b?(p=(0,a.FD)(a.FK,{children:[g,b]}),t[11]=g,t[12]=b,t[13]=p):p=t[13],p};function wi(e){return Number(e.value)}var Ai=n(38137);const Yi=(0,P.A)("div",{target:"e1vhdn8f1"})(Ai.fg,"{background-color:",F.DJJ,";}"),ki=e=>{const t=(0,o.c)(52),{ngos:n,actualUser:i,ngoRole:r,dispatch:l}
1=e,s=(0,u.U)(),m=s.communityConfiguration.general,d=s.communityConfiguration.etbUserProfileConfig,f=(0,w.S)();let g;t[0]===Symbol.for("react.memo_cache_sentinel")?(g=[],t[0]=g):g=t[0];const[b,p]=(0,c.useState)(g),[h,y]=(0,c.useState)(),[L,E]=Rt(!1),[T,v]=_t();let N,S,M,O,I;t[1]!==i.id||t[2]!==l||t[3]!==T||t[4]!==E.response||t[5]!==m||t[6]!==f.jwtToken||t[7]!==r?(N=()=>{E.response&&(l({type:"UPDATE_NGO_IN_USERS"}),Ft(m,f.jwtToken,i.id,r,T))},t[1]=i.id,t[2]=l,t[3]=T,t[4]=E.response,t[5]=m,t[6]=f.jwtToken,t[7]=r,t[8]=N):N=t[8],t[9]!==i.id||t[10]!==l||t[11]!==T||t[12]!==E||t[13]!==m||t[14]!==f.jwtToken||t[15]!==r?(S=[E,l,m,f.jwtToken,i.id,r,T],t[9]=i.id,t[10]=l,t[11]=T,t[12]=E,t[13]=m,t[14]=f.jwtToken,t[15]=r,t[16]=S):S=t[16],(0,c.useEffect)(N,S),t[17]!==l||t[18]!==v.response?(M=()=>{v.response&&(l({type:"UPDATE_ROLE_IN_USERS"}),l(ui()))},t[17]=l,t[18]=v.response,t[19]=M):M=t[19],t[20]!==l||t[21]!==v?(O=[v,l],t[20]=l,t[21]=v,t[22]=O):O=t[22],(0,c.useEffect)(M,O),t[23]!==i.id||t[24]!==l||t[25]!==L||t[26]!==m||t[27]!==f.jwtToken||t[28]!==r||t[29]!==n||t[30]!==b[0]||t[31]!==b.length?(I=async()=>{if(0===b.length)return void y({fromConfig:m.requiredFieldMessage});const e=n?.find((e=>e.id===b[0]));e&&(l({type:"SET_ACTUAL_NGO",ngo:e}),l(di(r)),await jt(m,f.jwtToken,i.id,e.id,L))},t[23]=i.id,t[24]=l,t[25]=L,t[26]=m,t[27]=f.jwtToken,t[28]=r,t[29]=n,t[30]=b[0],t[31]=b.length,t[32]=I):I=t[32];const A=I;let Y;t[33]!==l?(Y=()=>{l(ui())},t[33]=l,t[34]=Y):Y=t[34];const k=Y;let D,P;t[35]!==b.length?(D=()=>{b.length>0&&y(void 0)},t[35]=b.length,t[36]=D):D=t[36],t[37]!==b?(P=[b],t[37]=b,t[38]=P):P=t[38],(0,c.useEffect)(D,P);const x="NGO_USER"===r?d.setAsNgoUser:d.setAsNgoAdmin;let U,j,F;return t[39]!==b?(U=(0,a.Y)(Ii,{selectedNgos:b,setter:p}),t[39]=b,t[40]=U):U=t[40],t[41]!==s.communityConfiguration.etbUserProfileConfig.selectNgoLabel||t[42]!==h||t[43]!==U?(j=(0,a.Y)(Yi,{children:(0,a.Y)(We.E,{label:s.communityConfiguration.etbUserProfileConfig.selectNgoLabel,cId:"selectNgo",optionalLabel:"",error:h,fieldLabelPosition:"LEFT",labelWidth:"WIDTH_5",testId:"selectNgo",warning:void 0,info:void 0,children:U})}),t[41]=s.communityConfiguration.etbUserProfileConfig.selectNgoLabel,t[42]=h,t[43]=U,t[44]=j):j=t[44],t[45]!==k||t[46]!==m.cancelButtonLabel||t[47]!==m.saveButtonLabel||t[48]!==A||t[49]!==j||t[50]!==x?(F=(0,a.Y)(C.l,{type:"FORM",title:x,cancelClick:k,cancelText:m.cancelButtonLabel,confirmText:m.saveButtonLabel,confirmClick:A,children:j}),t[45]=k,t[46]=m.cancelButtonLabel,t[47]=m.saveButtonLabel,t[48]=A,t[49]=j,t[50]=x,t[51]=F):F=t[51],F};var Di=n(32543),Pi=n(35723);const xi=(0,c.memo)((e=>{const t=(0,o.c)(4);let n;t[0]!==e?(n={...e,Wrapper:Fi},t[0]=e,t[1]=n):n=t[1];const i=n;let r;return t[2]!==i?(r=(0,a.Y)(Pi.Bo,{...i}),t[2]=i,t[3]=r):r=t[3],r})),Ui=F.TT6,ji="rgba(88, 100, 111, .3)",Fi=(0,P.A)(On.z,{target:"e1sdkvxt0"})("position:relative;font-weight:var(--font-weight-link, ",F.RXW,");color:",F.TT6,";border:0 none;padding-right:",U.YK.medium,";",_i,";");function Ri(){return`position: absolute;\n top: calc(50% - 3px);\n margin-top: -2.5px;\n right: ${(0,j.a)(7)};\n content: '';\n width: 0;\n height: 0;\n border-left: ${(0,j.a)(4)} solid transparent;\n border-right: ${(0,j.a)(4)} solid transparent;`}function _i(e){return`\n &:before {\n ${Ri()}\n border-top: 0; \n border-bottom: ${(0,j.a)(4)} solid ${ji};\n \n ${"ASC"===e.sorted?`border-bottom: ${(0,j.a)(4)} solid ${Ui}`:""} \n }\n &:after {\n ${Ri()}\n top: calc(50% + 3px);\n \n border-top: ${(0,j.a)(4)} solid ${ji};\n ${"DESC"===e.sorted?`border-top: ${(0,j.a)(4)} solid ${Ui}`:""} \n }`}const Bi=e=>{const t=(0,o.c)(2),n=function(e){const t=(0,o.c)(81),{config:n,loggedUser:i,userItem:r,handleOpenDialog:l,setRole:s}=e;let c;e:{const e=n.communityConfiguration.general;let o,u,m,d;if(t[0]!==e.communityId||t[1]!==i.userRoles||t[2]!==r.userCommunityGroups){let n;m=(0,Qt.m)(e.communityId,r.userCommunityGroups),t[6]!==e.communityId||t[7]!==i.userRoles?(n=(0,Qt.m)(e.communityId,i.userRoles),t[6]=e.communityId,t[7]=i.userRoles,t[8]=n):n=t[8],o="ADMIN"===n,u=function(e,t){return e||"ADMIN"!==t}(o,m),t[0]=e.communityId,t[1]=i.userRoles,t[2]=r.userCommunityGroups,t[3]=o,t[4]=u,t[5]=m}else o=t[3],u=t[4],m=t[5];if(!u){let e;t[9]===Symbol.for("react.memo_cache_sentinel")?(e=[],t[9]=e):e=t[9],c=e;break e}t[10]!==e.communityId||t[11]!==i.userRoles?(d=(0,Qt.m)(e.communityId,i.userRoles),t[10]=e.communityId,t[11]=i.userRoles,t[12]=d):d=t[12];const f="MODERATOR"===d;let g;t[13]!==n.communityConfiguration.etbUserProfileConfig||t[14]!==l||t[15]!==r?(g=e=>(0,a.Y)(z,{handleClick:l("NGO_ADMIN",r),label:n.communityConfiguration.etbUserProfileConfig.setAsNgoAdmin,optionProps:e}),t[13]=n.communityConfiguration.etbUserProfileConfig,t[14]=l,t[15]=r,t[16]=g):g=t[16];const b=e.ngoAdmin??"";let p,h;t[17]!==g||t[18]!==b?(p={label:g,value:b},t[17]=g,t[18]=b,t[19]=p):p=t[19],t[20]!==n.communityConfiguration.etbUserProfileConfig||t[21]!==l||t[22]!==r?(h=e=>(0,a.Y)(z,{handleClick:l("NGO_USER",r),label:n.communityConfiguration.etbUserProfileConfig.setAsNgoUser,optionProps:e}),t[20]=n.communityConfiguration.etbUserProfileConfig,t[21]=l,t[22]=r,t[23]=h):h=t[23];const y=e.ngoUser??"";let C,L;if(t[24]!==h||t[25]!==y?(C={label:h,value:y},t[24]=h,t[25]=y,t[26]=C):C=t[26],t[27]!==n.communityConfiguration.etbUserProfileConfig||t[28]!==n.communityConfiguration.userProfile||t[29]!==e.moderator||t[30]!==l||t[31]!==o||t[32]!==f||t[33]!==s||t[34]!==p||t[35]!==C||t[36]!==r||t[37]!==m){if(L=[p,C],(o||f)&&"MODERATOR"!==m){let o,i;t[39]!==n.communityConfiguration.userProfile||t[40]!==s||t[41]!==r?(o=e=>(0,a.Y)(z,{handleClick:s(r,"MODERATOR"),label:n.communityConfiguration.userProfile.setAsModerator,optionProps:e}),t[39]=n.communityConfiguration.userProfile,t[40]=s,t[41]=r,t[42]=o):o=t[42],t[43]!==e.moderator||t[44]!==o?(i={label:o,value:e.moderator},t[43]=e.moderator,t[44]=o,t[45]=i):i=t[45],L.push(i)}if("DEFAULT"!==m){let e,o;t[46]!==n.communityConfiguration.userProfile.setAsDefault||t[47]!==s||t[48]!==r?(e=e=>(0,a.Y)(z,{handleClick:s(r,"DEFAULT"),label:n.communityConfiguration.userProfile.setAsDefault,optionProps:e}),t[46]=n.communityConfiguration.userProfile.setAsDefault,t[47]=s,t[48]=r,t[49]=e):e=t[49],t[50]!==n.communityConfiguration.userProfile.setAsDefault||t[51]!==e?
1(o={label:e,value:n.communityConfiguration.userProfile.setAsDefault},t[50]=n.communityConfiguration.userProfile.setAsDefault,t[51]=e,t[52]=o):o=t[52],L.push(o)}if("BANNED"!==m){let e,o;t[53]!==n.communityConfiguration.userProfile.banUser||t[54]!==s||t[55]!==r?(e=e=>(0,a.Y)(z,{handleClick:s(r,"BANNED"),label:n.communityConfiguration.userProfile.banUser,optionProps:e}),t[53]=n.communityConfiguration.userProfile.banUser,t[54]=s,t[55]=r,t[56]=e):e=t[56],t[57]!==n.communityConfiguration.userProfile.banUser||t[58]!==e?(o={label:e,value:n.communityConfiguration.userProfile.banUser},t[57]=n.communityConfiguration.userProfile.banUser,t[58]=e,t[59]=o):o=t[59],L.push(o)}if(o&&"ADMIN"!==m){let e,o;t[60]!==n.communityConfiguration.userProfile.setAsAdministrator||t[61]!==s||t[62]!==r?(e=e=>(0,a.Y)(z,{handleClick:s(r,"ADMIN"),label:n.communityConfiguration.userProfile.setAsAdministrator,optionProps:e}),t[60]=n.communityConfiguration.userProfile.setAsAdministrator,t[61]=s,t[62]=r,t[63]=e):e=t[63],t[64]!==n.communityConfiguration.userProfile.setAsAdministrator||t[65]!==e?(o={label:e,value:n.communityConfiguration.userProfile.setAsAdministrator},t[64]=n.communityConfiguration.userProfile.setAsAdministrator,t[65]=e,t[66]=o):o=t[66],L.push(o)}if(o||f&&"MODERATOR"!==m){let e,o;t[67]!==n.communityConfiguration.userProfile.deleteUserButton||t[68]!==l||t[69]!==r?(e=e=>(0,a.Y)(z,{handleClick:l("DELETE_USER",r),label:n.communityConfiguration.userProfile.deleteUserButton,optionProps:e}),t[67]=n.communityConfiguration.userProfile.deleteUserButton,t[68]=l,t[69]=r,t[70]=e):e=t[70],t[71]!==n.communityConfiguration.userProfile.deleteUserButton||t[72]!==e?(o={label:e,value:n.communityConfiguration.userProfile.deleteUserButton},t[71]=n.communityConfiguration.userProfile.deleteUserButton,t[72]=e,t[73]=o):o=t[73],L.push(o)}if(o||f){let e,o;t[74]!==n.communityConfiguration.etbUserProfileConfig.sendEmailNotificationLabel||t[75]!==l||t[76]!==r?(e=e=>(0,a.Y)(z,{handleClick:l("SEND_EMAIL_NOTIFICATION",r),label:n.communityConfiguration.etbUserProfileConfig.sendEmailNotificationLabel,optionProps:e}),t[74]=n.communityConfiguration.etbUserProfileConfig.sendEmailNotificationLabel,t[75]=l,t[76]=r,t[77]=e):e=t[77],t[78]!==n.communityConfiguration.etbUserProfileConfig.sendEmailNotificationLabel||t[79]!==e?(o={label:e,value:n.communityConfiguration.etbUserProfileConfig.sendEmailNotificationLabel},t[78]=n.communityConfiguration.etbUserProfileConfig.sendEmailNotificationLabel,t[79]=e,t[80]=o):o=t[80],L.push(o)}t[27]=n.communityConfiguration.etbUserProfileConfig,t[28]=n.communityConfiguration.userProfile,t[29]=e.moderator,t[30]=l,t[31]=o,t[32]=f,t[33]=s,t[34]=p,t[35]=C,t[36]=r,t[37]=m,t[38]=L}else L=t[38];c=L}return c}(e);let i;return t[0]!==n?(i=(0,a.Y)(W,{options:n}),t[0]=n,t[1]=i):i=t[1],i},Gi=e=>{const t=(0,o.c)(10),{user:n}=e;let i,r,l,s;return t[0]!==n.firstName?(i=(0,a.Y)("span",{children:n.firstName}),t[0]=n.firstName,t[1]=i):i=t[1],t[2]!==n.lastName?(r=(0,a.Y)("span",{className:"p-l-xs",children:n.lastName}),t[2]=n.lastName,t[3]=r):r=t[3],t[4]!==n.nickname?(l=(0,a.Y)(ht,{className:"d-b",children:n.nickname}),t[4]=n.nickname,t[5]=l):l=t[5],t[6]!==i||t[7]!==r||t[8]!==l?(s=(0,a.FD)(a.FK,{children:[i,r,l]}),t[6]=i,t[7]=r,t[8]=l,t[9]=s):s=t[9],s},zi=new Intl.DateTimeFormat("de",{year:"numeric",month:"2-digit",day:"2-digit"});function qi(e,t,n){switch(e){case"email":return t.email;case"userType":return function(e,t){if(!e||0===e.length)return"";switch(e[0].name){case"MODERATOR":return"ETB Admin";case"NGO_USER":return t.ngoUser??"";case"NGO_ADMIN":return t.ngoAdmin??"";case"ADMIN":return t.admin;case"BANNED":return t.banned;case"DEFAULT":return t.defaultUserType;case"UNREGISTERED":return t.unregistered;default:return""}}(t.userCommunityGroups,n.communityConfiguration.general);case"lastLogin":return t.lastLogin?zi.format(new Date(t.lastLogin)):"";case"firstLogin":return t.firstLogin?zi.format(new Date(t.firstLogin)):"";case"ngo":return function(e){if(!e.userCommunityGroups||0===e.userCommunityGroups.length)return"";const t=e.userCommunityGroups[0].name;return"NGO_ADMIN"===t||"NGO_USER"===t?e.etbProfiles.length>0?e.etbProfiles[0].name:"":e.etbEmployer?.name??""}(t);default:return""}}function $i(e,t,n,o,i,r){switch(e){case"userName":return(0,a.Y)(Gi,{user:t});case"actions":return(0,a.Y)(Bi,{loggedUser:n,config:o,setRole:i,userItem:t,handleOpenDialog:r});default:return(0,a.Y)(a.FK,{})}}const Vi=e=>{const t=(0,o.c)(29),{users:n,setRole:i,handleOpenDialog:r,count:l,sorting:s,dispatch:d}=e,f=(0,m.useGemStore)(Wi),g=(0,u.U)(),b=(0,w.S)(),[p,h]=(0,Yo.Wx)();let y;t[0]!==g||t[1]!==r||t[2]!==b||t[3]!==i||t[4]!==n?(y=function(e,t,n,o,a){const i=function(e){return[{type:"COMPONENT",apiFieldName:"userName",sorting:!1,title:e.communityConfiguration.userProfile.userInformation},{type:"TEXT",apiFieldName:"email",sorting:!1,title:e.communityConfiguration.userProfile.email},{type:"TEXT",apiFieldName:"userType",sorting:!1,title:"User type"},{type:"TEXT",apiFieldName:"ngo",sorting:!1,title:"NGO / Employee"},{type:"TEXT",apiFieldName:"firstLogin",sorting:!0,title:"Register date"},{type:"TEXT",apiFieldName:"lastLogin",sorting:!0,title:"Last login"},{type:"COMPONENT",apiFieldName:"actions",sorting:!1,title:""}]}(t),r={columns:[],data:[],id:(0,T.k)()};return r.columns=[i.map((e=>({id:(0,T.k)(),name:e.apiFieldName,label:e.title??"",type:e.type,sorting:e.sorting})))],r.data=e.map(((e,r)=>i.reduce(((i,l,s)=>{let c;switch(l.type){case"TEXT":c={type:"TEXT",id:`${r}-${s}`,value:qi(l.apiFieldName,e,t),valueForSorting:""};break;case"COMPONENT":c={type:"COMPONENT",id:`${r}-${s}`,value:$i(l.apiFieldName,e,n,t,o,a),valueForSorting:""}}return c?{...i,[l.apiFieldName]:c}:i}),{}))),r}(n,g,b,i,r),t[0]=g,t[1]=r,t[2]=b,t[3]=i,t[4]=n,t[5]=y):y=t[5];const C=y;let L,E,v;t[6]!==d||t[7]!==h||t[8]!==n.length?(L=()=>{h&&d({offset:n.length,type:"LOAD_MORE"})},E=[d,h,n.length],t[6]=d,t[7]=h,t[8]=n.length,t[9]=L,t[10]=E):(L=t[9],E=t[10]),(0,c.useEffect)(L,E),t[11]!==d?(v=e=>d(function(e){return{field:e,type:"SORT_BY"}}(e)),t[11]=d,t[12]=v):v=t[12];const N=v,S=s.field??"";let M;t[13]!==N||t[14]!==f||t[15]!==s.direction||t[16]!==S?(M={handleSortBy:N,isMobile:f,SortLink:xi,sort:s.direction,sortBy:S,sortingLabel:"sort",sortingAltLabel:"Set sorting",placeholderL
1abel:"Set sorting"},t[13]=N,t[14]=f,t[15]=s.direction,t[16]=S,t[17]=M):M=t[17];const O=M;let I,A,Y;return t[18]!==f||t[19]!==O||t[20]!==C?(I=(0,a.Y)(D.d,{sorting:O,tableData:C,isMobile:f}),t[18]=f,t[19]=O,t[20]=C,t[21]=I):I=t[21],t[22]!==l||t[23]!==p||t[24]!==n.length?(A=n.length!==l&&(0,a.Y)("div",{ref:p}),t[22]=l,t[23]=p,t[24]=n.length,t[25]=A):A=t[25],t[26]!==I||t[27]!==A?(Y=(0,a.FD)(B,{children:[I,A]}),t[26]=I,t[27]=A,t[28]=Y):Y=t[28],Y};function Wi(e){return e.mediaBreakpoint<ee.E.SM}const Hi=()=>{const e=(0,o.c)(56),t=(0,u.U)(),n=t.communityConfiguration.general,i=(0,w.S)(),[r,l]=(0,c.useReducer)(fi,gi),[s,m]=_t();let d;e[0]!==r.filters||e[1]!==r.offset||e[2]!==r.sorting?(d=function(e,t,n){const o={offset:String(e),limit:String(10)};return n?.field&&"NONE"!==n.direction&&(o.order=String(n.direction).toLowerCase(),o.order_by=(0,Di.L)(String(n.field))),t?(t.forEach((e=>{switch(e.type){case"FULL_TEXT_SEARCH_LOCAL":"string"==typeof e.value&&(o.search=e.value);break;case"USER_TYPE":Array.isArray(e.value)&&(o.user_type=e.value[0].value);break;case"USER_PERMISSION":Array.isArray(e.value)&&(o.permission=e.value[0].value);break;case"NGO":Array.isArray(e.value)&&(o.ngo=e.value[0].value)}})),o):o}(r.offset,r.filters,r.sorting),e[0]=r.filters,e[1]=r.offset,e[2]=r.sorting,e[3]=d):d=e[3];const f=d,[g,b]=bt();let p;e[4]!==t.communityConfiguration.general?(p=(0,L.y)(t.communityConfiguration.general),e[4]=t.communityConfiguration.general,e[5]=p):p=e[5];const[h,y]=function(e,t,n,a){const i=(0,o.c)(16),r=(0,w.S)();let l;i[0]!==n?(l={method:"GET",responseStruct:Wt,errorCodes:n},i[0]=n,i[1]=l):l=i[1];const[s,u,m]=(0,oe.q)(l);let d,f,g;return i[2]!==u||i[3]!==t||i[4]!==e||i[5]!==r.jwtToken?(d=()=>{const n={headers:(0,E.d)(r.jwtToken),method:"GET"},o=`${(0,Ro._)(t)}`;u(`${e}/users?${o}`,n)},i[2]=u,i[3]=t,i[4]=e,i[5]=r.jwtToken,i[6]=d):d=i[6],i[7]!==u||i[8]!==a||i[9]!==t||i[10]!==e||i[11]!==r.jwtToken?(f=[u,r.jwtToken,e,t,a],i[7]=u,i[8]=a,i[9]=t,i[10]=e,i[11]=r.jwtToken,i[12]=f):f=i[12],(0,c.useEffect)(d,f),i[13]!==s||i[14]!==m?(g=[s,m],i[13]=s,i[14]=m,i[15]=g):g=i[15],g}(p,f,t.communityConfiguration.errorMessage.errorCodes,r.forceResetTrigger);let C,T,v;e[6]!==h?(C=()=>{h?.rows&&l({users:h.rows,count:h.count,type:"SET_USERS"})},T=[h],e[6]=h,e[7]=C,e[8]=T):(C=e[7],T=e[8]),(0,c.useEffect)(C,T),e[9]!==s||e[10]!==n||e[11]!==i.jwtToken?(v=(e,t)=>async()=>{l(di()),l(mi()),await Ft(n,i.jwtToken,e.id,t,s),l(di(t)),l(mi(e))},e[9]=s,e[10]=n,e[11]=i.jwtToken,e[12]=v):v=e[12];const N=v;let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S=(e,t)=>()=>{l(ui(e)),l(mi(t))},e[13]=S):S=e[13];const M=S;let O;e[14]===Symbol.for("react.memo_cache_sentinel")?(O=()=>{l(ui())},e[14]=O):O=e[14];const I=O;let A,Y,k;e[15]!==m.rawResponse?.ok?(A=()=>{m.rawResponse?.ok&&l({type:"UPDATE_ROLE_IN_USERS"})},e[15]=m.rawResponse?.ok,e[16]=A):A=e[16],e[17]!==m?(Y=[m],e[17]=m,e[18]=Y):Y=e[18],(0,c.useEffect)(A,Y),e[19]!==r.sorting.direction||e[20]!==r.sorting.field?(k={field:r.sorting.field,direction:r.sorting.direction},e[19]=r.sorting.direction,e[20]=r.sorting.field,e[21]=k):k=e[21];const D=k;let P,x,U,j,F,R,_,B,G;return e[22]!==b||e[23]!==y?(P=(b||y)&&(0,a.Y)(Se.h,{}),e[22]=b,e[23]=y,e[24]=P):P=e[24],e[25]!==g||e[26]!==r.count?(x=g.length>0&&(0,a.Y)(bi,{handleOpenDialog:M,ngos:g,count:r.count,dispatch:l}),e[25]=g,e[26]=r.count,e[27]=x):x=e[27],e[28]!==N||e[29]!==D||e[30]!==r.count||e[31]!==r.users?(U=r.users&&(0,a.Y)(Vi,{users:r.users,count:r.count,setRole:N,handleOpenDialog:M,sorting:D,dispatch:l}),e[28]=N,e[29]=D,e[30]=r.count,e[31]=r.users,e[32]=U):U=e[32],e[33]!==g||e[34]!==r.actualUser||e[35]!==r.dialog?(j=("NGO_ADMIN"===r.dialog||"NGO_USER"===r.dialog)&&r.actualUser&&(0,a.Y)(ki,{ngos:g,actualUser:r.actualUser,ngoRole:"NGO_ADMIN"===r.dialog?"NGO_ADMIN":"NGO_USER",dispatch:l}),e[33]=g,e[34]=r.actualUser,e[35]=r.dialog,e[36]=j):j=e[36],e[37]!==r.actualUser||e[38]!==r.dialog?(F="DELETE_USER"===r.dialog&&r.actualUser&&(0,a.Y)(hi,{actualUser:r.actualUser,dispatch:l}),e[37]=r.actualUser,e[38]=r.dialog,e[39]=F):F=e[39],e[40]!==r.dialog?(R="RESET_DISCLAIMER"===r.dialog&&(0,a.Y)(Mi,{dispatch:l}),e[40]=r.dialog,e[41]=R):R=e[41],e[42]!==r.dialog?(_="EMAIL_TEMPLATE"===r.dialog&&(0,a.Y)(Si,{closeDialog:I}),e[42]=r.dialog,e[43]=_):_=e[43],e[44]!==r.actualUser||e[45]!==r.dialog?(B="SEND_EMAIL_NOTIFICATION"===r.dialog&&r.actualUser&&(0,a.Y)(Oi,{actualUser:r.actualUser,dispatch:l}),e[44]=r.actualUser,e[45]=r.dialog,e[46]=B):B=e[46],e[47]!==P||e[48]!==x||e[49]!==U||e[50]!==j||e[51]!==F||e[52]!==R||e[53]!==_||e[54]!==B?(G=(0,a.FD)(a.FK,{children:[P,x,U,j,F,R,_,B]}),e[47]=P,e[48]=x,e[49]=U,e[50]=j,e[51]=F,e[52]=R,e[53]=_,e[54]=B,e[55]=G):G=e[55],G};var Xi=n(55698),Ki=n(6610);const Ji=e=>{const t=(0,o.c)(17),{element:n}
1=e,i=(0,u.U)(),r=(0,w.S)(),l=Zi,s=Qi,c=er,m=tr,d=nr,f=or,g=ar,b=ir,p=rr,C=lr;let L,E;if(t[0]!==i.communityConfiguration.etbUserProfileConfig?.favoritesTabLabel||t[1]!==i.communityConfiguration.etbUserProfileConfig?.ngoInfoTabLabel||t[2]!==i.communityConfiguration.etbUserProfileConfig?.ngoStatistics||t[3]!==i.communityConfiguration.etbUserProfileConfig?.ngoTabLabel||t[4]!==i.communityConfiguration.etbUserProfileConfig?.offerPreferencesTabLabel||t[5]!==i.communityConfiguration.etbUserProfileConfig?.offersTabLabel||t[6]!==i.communityConfiguration.etbUserProfileConfig?.statisticsTabLabel||t[7]!==i.communityConfiguration.etbUserProfileConfig?.usersTabLabel||t[8]!==i.communityConfiguration.general.communityId||t[9]!==i.communityConfiguration.userProfile.profile||t[10]!==r){const e={cId:"profile",hasConfiguredId:!0,content:l,title:i.communityConfiguration.userProfile.profile},n={cId:"preferences",hasConfiguredId:!0,content:s,title:i.communityConfiguration.etbUserProfileConfig?.offerPreferencesTabLabel||""},o={cId:"favouriteOffers",hasConfiguredId:!0,content:C,title:i.communityConfiguration.etbUserProfileConfig?.favoritesTabLabel||""},a={cId:"users",hasConfiguredId:!0,content:c,title:i.communityConfiguration.etbUserProfileConfig?.usersTabLabel||""},u={cId:"offers",hasConfiguredId:!0,content:m,title:i.communityConfiguration.etbUserProfileConfig?.offersTabLabel||""},T={cId:"ngoDetail",hasConfiguredId:!0,content:d,title:i.communityConfiguration.etbUserProfileConfig?.ngoInfoTabLabel||""},v={cId:"ngos",hasConfiguredId:!0,content:f,title:i.communityConfiguration.etbUserProfileConfig?.ngoTabLabel||""},N={cId:"ngoUsers",hasConfiguredId:!0,content:g,title:i.communityConfiguration.etbUserProfileConfig?.usersTabLabel||""},S={cId:"statistics",hasConfiguredId:!0,content:p,title:i.communityConfiguration.etbUserProfileConfig?.statisticsTabLabel||""},M={cId:"ngoStatistics",hasConfiguredId:!0,content:b,title:i.communityConfiguration.etbUserProfileConfig?.ngoStatistics||""},O=i.communityConfiguration.general.communityId,I=[e];(function(e,t){return["MODERATOR","ADMIN","DEFAULT"].includes((0,h.m)(e,t.userRoles)??"")})(O,r)&&I.push(n),I.push(o),function(e,t){return["ADMIN","MODERATOR"].includes((0,h.m)(e,t.userRoles)??"")}(O,r)&&I.push(a),function(e,t){return["NGO_USER","NGO_ADMIN"].includes((0,h.m)(e,t.userRoles)??"")}(O,r)&&I.push(T),function(e,t){return["ADMIN","MODERATOR","NGO_ADMIN","NGO_USER"].includes((0,h.m)(e,t.userRoles)??"")}(O,r)&&I.push(u),function(e,t){return["ADMIN","MODERATOR"].includes((0,h.m)(e,t.userRoles)??"")}(O,r)&&I.push(v),function(e,t){return"NGO_ADMIN"===((0,h.m)(e,t.userRoles)??"")}(O,r)&&I.push(N),function(e,t){return["ADMIN","MODERATOR"].includes((0,h.m)(e,t.userRoles)??"")}(O,r)&&(I.push(S),I.push(M)),E={alignment:"HORIZONTAL_CENTERED",cId:y.f,theme:"white",tabItems:I},L=(0,Ki.K)(E),t[0]=i.communityConfiguration.etbUserProfileConfig?.favoritesTabLabel,t[1]=i.communityConfiguration.etbUserProfileConfig?.ngoInfoTabLabel,t[2]=i.communityConfiguration.etbUserProfileConfig?.ngoStatistics,t[3]=i.communityConfiguration.etbUserProfileConfig?.ngoTabLabel,t[4]=i.communityConfiguration.etbUserProfileConfig?.offerPreferencesTabLabel,t[5]=i.communityConfiguration.etbUserProfileConfig?.offersTabLabel,t[6]=i.communityConfiguration.etbUserProfileConfig?.statisticsTabLabel,t[7]=i.communityConfiguration.etbUserProfileConfig?.usersTabLabel,t[8]=i.communityConfiguration.general.communityId,t[9]=i.communityConfiguration.userProfile.profile,t[10]=r,t[11]=L,t[12]=E}else L=t[11],E=t[12];const T=L;let v;return t[13]!==T||t[14]!==n||t[15]!==E?(v=(0,a.Y)(Xi.a,{element:n,config:E,defaultState:T,shouldRenderOnlySelected:!0}),t[13]=T,t[14]=n,t[15]=E,t[16]=v):v=t[16],v};function Zi(){return(0,a.Y)(Da,{})}function Qi(){return(0,a.Y)(aa,{})}function er(){return(0,a.Y)(Hi,{})}function tr(){return(0,a.Y)(Bo,{})}function nr(){return(0,a.Y)(et,{})}function or(){return(0,a.Y)(Ct,{})}function ar(){return(0,a.Y)(cn,{})}function ir(){return(0,a.Y)(kt,{})}function rr(){return(0,a.Y)(ai,{})}function lr(){return(0,a.Y)(Me,{})}var sr=n(8743);const cr=e=>{const t=(0,o.c)(5),{element:n}=e,{isLoggedIn:i}=(()=>{const e=(0,o.c)(7),t=(0,u.U)(),n=(0,d.useGemSettings)(),a=(0,m.useGemStore)(p
1);let i,r;e[0]!==t||e[1]!==n||e[2]!==a?(i=()=>{if("DISABLED"!==n.wcmMode)return;let e,o=!1;const i=t.communityConfiguration.login.loginUrl??"";return(async()=>{const t=i.includes(g.E)?(0,b.replacePlaceholders)({template:i,gemSettings:n,additionalValues:{codeChallenge:await(0,f.j)()}}):(0,b.replacePlaceholders)({template:i,gemSettings:n});e=setTimeout((()=>{o||a||(window.location.href=t)}),3e3)})(),()=>{o=!0,e&&clearTimeout(e)}},r=[a,n,t],e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=r):(i=e[3],r=e[4]),(0,c.useEffect)(i,r);const l=!!a;let s;return e[5]!==l?(s={isLoggedIn:l},e[5]=l,e[6]=s):s=e[6],s})(),r=(0,u.U)();if(!i){let e,n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.Y)(q.p,{iconPath:sr.r,width:(0,j.a)(20)}),t[0]=e):e=t[0],t[1]!==r.communityConfiguration.login.redirectLoginMessage?(n=(0,a.FD)("p",{className:"d-f jc-c p--large",children:[e,(0,a.Y)("span",{className:"p-l-xs",children:r.communityConfiguration.login.redirectLoginMessage})]}),t[1]=r.communityConfiguration.login.redirectLoginMessage,t[2]=n):n=t[2],n}let l;return t[3]!==n?(l=(0,a.Y)(Ji,{element:n}),t[3]=n,t[4]=l):l=t[4],l};var ur=n(81828),mr=n(23863),dr=n(23629);const fr=e=>{const t=(0,o.c)(13),{element:n,config:r}=e;if(!r.communityConfiguration){let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.Y)(mr.AlertMessage,{msg:"Community config is missing! Check Social config in site configuration.",type:"error"}),t[0]=e):e=t[0],e}let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,ur.I)(),t[1]=l):l=t[1];const{general:c}=l;if(!c.userLoginConfiguration)throw new Error("userLoginConfiguration config is missing!");let m,d,f,g;return t[2]!==n?(m=(0,a.Y)(cr,{element:n}),t[2]=n,t[3]=m):m=t[3],t[4]!==r.communityConfiguration.errorMessage.errorMessage||t[5]!==m?(d=(0,a.Y)(dr.t,{msg:r.communityConfiguration.errorMessage.errorMessage,children:m}),t[4]=r.communityConfiguration.errorMessage.errorMessage,t[5]=m,t[6]=d):d=t[6],t[7]!==r.communityConfiguration.componentType||t[8]!==d?(f=(0,a.Y)(s,{value:c.userLoginConfiguration,children:(0,a.Y)(i,{type:r.communityConfiguration.componentType,children:d})}),t[7]=r.communityConfiguration.componentType,t[8]=d,t[9]=f):f=t[9],t[10]!==r||t[11]!==f?(g=(0,a.Y)(u.s,{value:r,children:f}),t[10]=r,t[11]=f,t[12]=g):g=t[12],g}},78918:(e,t,n)=>{"use strict";function o(e){return e}function a(e){return e}n.d(t,{S8:()=>o,kx:()=>a})},78928:(e,t,n)=>{"use strict";n.d(t,{I:()=>i});var o=n(16522),a=(n(52260),n(32668));function i(e){const t=(0,o.c)(8),{text:n,imgClassName:i,imgWidth:l}=e,s=void 0===i?"":i,{hydrated:c}=(0,a.Sd)();let u;e:{if("string"!=typeof n){u=void 0;break e}if(!(0,a.oe)(c)){u=n;break e}let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=/<img(.+?)\/?>/g,t[0]=e):e=t[0];const o=e;let i;if(t[1]!==s||t[2]!==l||t[3]!==n){let e;t[5]!==s||t[6]!==l?(e=(e,t,n)=>{const a=n.replace(o,r(s,l));return`<gem-rte-link${t} data-content="${encodeURIComponent(a)}"><span data-temp-link-content="true">${a}</span></gem-rte-link>`},t[5]=s,t[6]=l,t[7]=e):e=t[7],i=n.replace(/<a(.+?)>(.*?)<\/a>/g,e).replace(o,r(s,l)),t[1]=s,t[2]=l,t[3]=n,t[4]=i}else i=t[4];u=i}return u}const r=(e,t)=>(n,o)=>{let a=o.replace(/([a-z]+)="(.*?)"/g,'data-$1="$2"');return e&&(a.includes("data-class")?a=a.replace(/data-class="(.+?)"/g,`data-class="$1 ${e}"`):a+=` data-class="${e}"`),t&&!a.includes("data-width")&&(a+=` data-width="${t}"`),`<gem-rte-img${a}></gem-rte-img>`}},79448:(e,t,n)=>{"use strict";n.d(t,{x:()=>s});var o=n(16522),a=n(52260),i=n(54057),r=n(40316),l=n(13798);function s(e){const t=(0,o.c)(27),{cId:n,name:s,label:u,googleApiKey:m,countryCode:d,hasConsent:f,placeholder:g,value:b,noResultsMessage:p}=e;let h,y;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0],t[1]!==n||t[2]!==u||t[3]!==s?(y={cId:n,name:s,label:u,type:"COMBOBOX",options:h,componentType:"select-input"},t[1]=n,t[2]=u,t[3]=s,t[4]=y):y=t[4];const C=y,[L,E]=(0,a.useState)(C),[T,v]=(0,a.useState)(""),[N,S]=(0,a.useState)(!1);let M,O,I;t[5]!==b?(M=()=>{const e=b??"";v((t=>t!==e?(0,l.decodeHtml)(e):t))},O=[v,b],t[5]=b,t[6]=M,t[7]=O):(M=t[6],O=t[7]),(0,a.useEffect)(M,O),t[8]!==d||t[9]!==C||t[10]!==m?(I=async e=>{const t=await async function(e,t,n){const o={input:e,includedReg
1ionCodes:[n]};return(await(0,r.qj)(t)).AutocompleteSuggestion.fetchAutocompleteSuggestions(o).then((e=>(0,i.L)(e.suggestions)))}(e,m,d);E({...C,options:t.map(c)}),S(!0)},t[8]=d,t[9]=C,t[10]=m,t[11]=I):I=t[11];const w=I;let A;t[12]!==w||t[13]!==C||t[14]!==f||t[15]!==N||t[16]!==p||t[17]!==g||t[18]!==T?(A={query:T,placeholder:g,onQueryInput(e){v(e),S(!1),f&&(e?w(e):E(C))},type:"COMBOBOX_SUGGEST",noResultsMessage:p,hasFetchedOptions:N},t[12]=w,t[13]=C,t[14]=f,t[15]=N,t[16]=p,t[17]=g,t[18]=T,t[19]=A):A=t[19];const Y=A,k=(0,a.useRef)(!1);let D,P,x;return t[20]!==Y||t[21]!==b?(D=()=>{k.current||"string"!=typeof b||(k.current=!0,Y.onQueryInput(b))},P=[Y,b],t[20]=Y,t[21]=b,t[22]=D,t[23]=P):(D=t[22],P=t[23]),(0,a.useEffect)(D,P),t[24]!==Y||t[25]!==L?(x={searchConfig:Y,selectInputConfig:L},t[24]=Y,t[25]=L,t[26]=x):x=t[26],x}function c(e){return{value:e.placeId,label:e.text.text}}},80158:(e,t,n)=>{"use strict";n.d(t,{j:()=>g});var o=n(16522),a=(n(52260),n(27157)),i=n(66936),r=n(99860),l=n(71339),s=n(95738),c=n(17390),u=n(94447),m=n(40676),d=n(68117),f=n(2445);const g=e=>{const t=(0,o.c)(23),{type:n,label:g,placeholder:b,name:p,disabled:h}=e,{cId:y}=(0,c.K)();let C;t[0]!==y||t[1]!==p?(C=(0,u.O)(y,p),t[0]=y,t[1]=p,t[2]=C):C=t[2];const L=C,E=(0,l.K)(p),T=(0,m.useGemSettingsFeature)("accessibility"),v=T?.searchResultsUpdate;let N;t[3]!==L||t[4]!==p||t[5]!==b||t[6]!==v?(N={name:p,placeholder:b,cId:L,label:"",typeValidation:"NONE",componentType:"text-input",description:v},t[3]=L,t[4]=p,t[5]=b,t[6]=v,t[7]=N):N=t[7];const S=N,M=(0,r.L)(p,n);let O,I,w;return t[8]!==h||t[9]!==M||t[10]!==E||t[11]!==S.cId||t[12]!==S.description||t[13]!==S.placeholder?(O=(0,f.Y)(i.p,{cId:S.cId,placeholder:S.placeholder,disabled:h,dispatchValue:E,value:M,description:S.description}),t[8]=h,t[9]=M,t[10]=E,t[11]=S.cId,t[12]=S.description,t[13]=S.placeholder,t[14]=O):O=t[14],t[15]!==T?.searchResultsUpdate||t[16]!==S.cId?(I=T?.searchResultsUpdate&&(0,f.Y)("span",{id:(0,a.TE)(S.cId),"aria-hidden":!0,className:"visuallyhidden",children:T?.searchResultsUpdate}),t[15]=T?.searchResultsUpdate,t[16]=S.cId,t[17]=I):I=t[17],t[18]!==L||t[19]!==g||t[20]!==O||t[21]!==I?(w=(0,f.FD)(d.x,{label:g,testId:"full_text_search_local",colWidth:s.U2,cId:L,children:[O,I]}),t[18]=L,t[19]=g,t[20]=O,t[21]=I,t[22]=w):w=t[22],w}},81349:(e,t,n)=>{"use strict";n.d(t,{F:()=>a});var o=n(49399);function a(e,t,n){let a=e.target;if(!(a instanceof Element))return;if(a.matches(n)||(a=a.closest(n)),!a)return;const i=(0,o.L)(t,n).findIndex((e=>e===a));return-1!==i?i:void 0}},81812:(e,t,n)=>{"use strict";n.d(t,{y:()=>a});var o=n(47509);const a=e=>(0,o.n)((()=>n.e(6802).then(n.t.bind(n,6802,17))),e)},81828:(e,t,n)=>{"use strict";n.d(t,{I:()=>i,g:()=>r});var o=n(30916),a=n(88924);const i=(0,o.B)((()=>(0,a.E)("mobile-header")));function r(e){const t=e.general.additionalConfiguration;if(t?.general?.socialEndpoint)return t}},83467:(e,t,n)=>{"use strict";n.d(t,{F:()=>a});var o=n(47509);const a=e=>(0,o.n)((()=>n.e(59994).then(n.t.bind(n,59994,17))),e)},83620:(e,t,n)=>{"use strict";n.d(t,{OX:()=>r,vP:()=>a,wz:()=>i});var o=n(87873);const a=e=>o.gemStore.getState().addNotification(e),i=e=>o.gemStore.getState().removeNotification(e),r=()=>o.gemStore.getState().removeAllNotifications()},88354:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(16522),a=n(52260),i=n(45508),r=n(81349),l=n(67606);function s(e){const t=(0,o.c)(26),{containerRef:n,inputRef:s,childSelector:u,onEscape:m,currentFocusedIndex:d,syncWithTab:f,resetIndex:g,activedescendant:b,direction:p}=e,h=void 0===d?-1:d,y=void 0!==f&&f,C=void 0!==b&&b,[L,E]=(0,a.useState)(h),[T,v]=(0,a.useState)();let N,S,M,O,I,w,A,Y,k;return t[0]!==C||t[1]!==u||t[2]!==n||t[3]!==p||t[4]!==s||t[5]!==m||t[6]!==T||t[7]!==y?(N=()=>{if(!n)return;const e=e=>{E((t=>{const o=(0,l.s)({event:e,containerRef:n,onEscape:m,childSelector:u,direction:p,currentFocusedIndex:c(T,t,C)});return void 0!==o?o:t}))},t=s??n;let o;return t.addEventListener("keydown",e),y&&(o=e=>{const t=(0,r.F)(e,n,u);void 0!==t&&v(t)},n.addEventListener("focus",o,!0)),()=>{t.removeEventListener("keydown",e),y&&o&&n.removeEventListener("focus",o,!0)}},S=[n,m,u,y,T,s,C,p],t[0]=C,t[1]=u,t[2]=n,t[3]=p,t[4]=s,t[5]=m,t[6]=T,t[7]=y,t[8]=N,t[9]=S):(N=t[8],S=t[9]),(0,a.useEffect)(N,S),t[10]!==C||t[11]!==u||t[12]!==n||t[13]!==L||t[14]!==s?(M=()=>{!n||s||C||(0,i.G)(n,L,u)},O=[L,n,u,s,C],t[10]=C,t[11]=u,t[12]=n,t[13]=L,t[14]=s,t[15]=M,t[16]=O):(M=t[15],O=t[16]),(0,a.useEffect)(M,O),t[17]!==
1h||t[18]!==g?(I=()=>{E(g||void 0===g?h:-1)},w=[h,g],t[17]=h,t[18]=g,t[19]=I,t[20]=w):(I=t[19],w=t[20]),(0,a.useEffect)(I,w),t[21]!==T?(A=()=>{void 0!==T&&E(-1)},Y=[T],t[21]=T,t[22]=A,t[23]=Y):(A=t[22],Y=t[23]),(0,a.useEffect)(A,Y),t[24]!==L?(k={focusedIndex:L,setFocusedIndex:E},t[24]=L,t[25]=k):k=t[25],k}function c(e,t,n){return void 0!==e&&e!==t?e:-1!==t||n?t:0}},88703:(e,t,n)=>{"use strict";n.d(t,{c:()=>a});var o=n(52260);const a=()=>{const e=(0,o.createContext)(void 0);return{useConfig:()=>{const t=(0,o.useContext)(e);if(!t)throw new Error("CreateConfigContext must be used within a Provider");return t},ConfigProvider:e.Provider}}},90171:(e,t,n)=>{"use strict";n.d(t,{y:()=>o});var o=(e=>(e[e.JSON=0]="JSON",e[e.TEXT=1]="TEXT",e[e.NONE=2]="NONE",e))(o||{})},90774:(e,t,n)=>{"use strict";n.d(t,{j:()=>i});var o=n(9478),a=n(83282);async function i(){let e=(0,a.Ml)(o.KL);e||(e=function(){let e="";for(let t=0;t<50;t++)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~".charAt(Math.floor(66*Math.random()));return e}(),(0,a.EY)(o.KL,e));const t=await crypto.subtle.digest("SHA-256",(new TextEncoder).encode(e));return window.btoa(String.fromCharCode(...new Uint8Array(t))).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}},91541:(e,t,n)=>{"use strict";function o(e){return"string"==typeof e}function a(e){return Array.isArray(e)}function i(e){return a(e)?e.map((e=>e.value)):o(e)?[e]:void 0}function r(e){return a(e)?e.map((e=>e.label)):o(e)?[e]:void 0}n.d(t,{I8:()=>i,M_:()=>o,Os:()=>a,vb:()=>r})},92428:(e,t,n)=>{"use strict";n.d(t,{c:()=>m});var o=n(81923),a=n(16522),i=n(52260),r=n(47803),l=n(37159),s=n(88080),c=n(8743),u=n(2445);const m=(0,i.memo)((e=>{const t=(0,a.c)(6),{msg:n,className:o}=e;let i,s,m;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,u.Y)(l.p,{iconPath:c.r,className:"glyph-icon"}),t[0]=i):i=t[0],t[1]!==n?(s=(0,u.Y)(r.I2,{children:n}),t[1]=n,t[2]=s):s=t[2],t[3]!==o||t[4]!==s?(m=(0,u.FD)(d,{className:o,role:"alert",children:[i,s]}),t[3]=o,t[4]=s,t[5]=m):m=t[5],m})),d=(0,o.A)("div",{target:"e14tn70t0"})("display:flex;justify-content:center;align-items:center;position:relative;padding:",s.YK.small,";margin:",s.YK.small," 0;border-radius:",s.Vq.base,";color:var(--color-headline);background-color:#d1ebfe;.glyph-icon{margin-right:",s.YK.xSmall,";color:#199cf9;width:20px;}")},93574:(e,t,n)=>{"use strict";n.d(t,{S:()=>r});var o=n(16522),a=n(52260),i=n(38889);function r(e){const t=(0,o.c)(3),n=(0,a.useRef)(!1);let r,l;t[0]!==e?(r=()=>{e&&!n.current&&(n.current=!0,(0,i.v)(e))},l=[e],t[0]=e,t[1]=r,t[2]=l):(r=t[1],l=t[2]),(0,a.useEffect)(r,l)}},94908:(e,t,n)=>{var o=n(85072),a=n(97825),i=n(77659),r=n(55056),l=n(10540),s=n(41113),c=n(94957);c=c.__esModule?c.default:c;var u={};u.styleTagTransform=s,u.setAttributes=r,u.insert=i.bind(null,"head"),u.domAPI=a,u.insertStyleElement=l,o(c,u),e.exports=c&&c.locals||{}},94957:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var o=n(31601),a=n.n(o),i=n(76314),r=n.n(i)()(a());r.push([e.id,".theme-light-aubergine,.theme-light-bright-blue,.theme-light-forest,.theme-light-grey,.theme-white,body{--color-tab-background:transparent;--color-tab-background-active:#2870ed;--color-tab-background-hover:rgba(40,112,237,.1);--color-tab-text:#135ee2;--color-tab-text-active:#fff}.theme-aubergine,.theme-bright-blue,.theme-dark-aubergine,.theme-dark-forest,.theme-dark-stone,.theme-forest,.theme-george-business,.theme-indigo,.theme-stone{--color-tab-background:transparent;--color-tab-background-active:#fff;--color-tab-background-hover:hsla(0,0%,100%,.1);--color-tab-text:#fff;--color-tab-text-active:#2870ed}",""]);const l=r},97969:(e,t,n)=>{"use strict";n.d(t,{FF:()=>g,J:()=>s,Vh:()=>u,Y5:()=>l,bL:()=>c,lT:()=>d,mB:()=>f});var o=n(81923),a=n(49291),i=n(88080),r=n(73174);const l=(0,o.A)("div",{target:"emkyg2o7"})("display:flex;justify-content:",(({alignment:e})=>"HORIZONTAL_CENTERED"===e?"center":"start"),";margin-block:var(--margin-block-tab-list, ",i.YK.large,");"),s=(0,o.A)("ul",{target:"emkyg2o6"})("overflow-x:auto;display:flex;gap:",i.YK.xSmall,";scrollbar-width:none;padding:0 ",i.YK.xxSmall,";"),c=(0,o.A)(a.N,{target:"emkyg2o5"})("font-weight:",i.Wy.semibold,";font-size:",i.J.base,";padding:",i.YK.xxSmall," ",i.YK.medium,";margin:",i.YK.xxSmall," 0;border-radius:",(0,r.a)(100),";color:",(({active:e})=>e?"var(--color-tab-text-active)":"var(--color-tab-text)"),";background-color:",(({active:e})=>e?"var(--color-tab-background-active)":"var(--color-tab-background)"),";&:hover{background-color:",(({active:e})=>e?"var(--color-tab-background-active)":"var(--color-tab-background-hover)"),";}"),u=(0,o.A)(a.N,{target:"emkyg2o4"})("color:var(--color-tab-text-active);background-color:var(--color-tab-background-active);border-radius:",(0,r.a)(100),";height:var(--spacing-s025);width:var(--spacing-s025);display:grid;place-content:center;"),m=(0,o.A)("div",{target:"emkyg2o3"})("position:absolute;top:0;height:100%;display:flex;align-items:center;width:var(--spacing-s05);z-index:1;pointer-events:none;",u,"{pointer-events:initial;}"),d=(0,o.A)("div",{target:"emkyg2o2"})({name:"13hsvey",styles:"position:relative;max-width:100%;width:fit-content;overflow:hidden"}),f=(0,o.A)(m,{target:"emkyg2o1"})({name:"1fxey22",styles:"background:linear-gradient(to right, var(--color-background), transparent);left:0"}),g=(0,o.A)(m,{target:"emkyg2o0"})({name:"12ln7gz",styles:"background:linear-gradient(to left, var(--color-background), transparent);right:0;display:flex;justify-content:flex-end"})},99860:(e,t,n)=>{"use strict";n.d(t,{L:()=>s});var o=n(16522),a=n(95101),i=n(52260),r=n(17390),l=n(68257);function s(e,t){const n=(0,o.c)(13),{rootOnChangeCallback:s}=(0,r.K)(),c=(0,l.i)(e);let u;
1u=c?decodeURIComponent(c):"";const m=u;let d;n[0]!==s?(d=(0,a.s)(s,300),n[0]=s,n[1]=d):d=n[1];const f=d;let g,b;return n[2]!==f||n[3]!==m||n[4]!==e||n[5]!==t?(g=()=>(f(e,t,m),()=>{f.cancel()}),n[2]=f,n[3]=m,n[4]=e,n[5]=t,n[6]=g):g=n[6],n[7]!==f||n[8]!==m||n[9]!==e||n[10]!==s||n[11]!==t?(b=[f,m,e,s,t],n[7]=f,n[8]=m,n[9]=e,n[10]=s,n[11]=t,n[12]=b):b=n[12],(0,i.useEffect)(g,b),m}}}]);
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.