@goodhood-web/nebenan-base 3.0.0-development.91 → 3.0.0-development.92

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -852,7 +852,7 @@ ${n}</tr>
852
852
  `}tablecell(n){const i=this.parser.parseInline(n.tokens),t=n.header?"th":"td";return(n.align?`<${t} align="${n.align}">`:`<${t}>`)+i+`</${t}>
853
853
  `}strong({tokens:n}){return`<strong>${this.parser.parseInline(n)}</strong>`}em({tokens:n}){return`<em>${this.parser.parseInline(n)}</em>`}codespan({text:n}){return`<code>${n}</code>`}br(n){return"<br>"}del({tokens:n}){return`<del>${this.parser.parseInline(n)}</del>`}link({href:n,title:i,tokens:t}){const r=this.parser.parseInline(t),a=Mp(n);if(a===null)return r;n=a;let o='<a href="'+n+'"';return i&&(o+=' title="'+i+'"'),o+=">"+r+"</a>",o}image({href:n,title:i,text:t}){const r=Mp(n);if(r===null)return t;n=r;let a=`<img src="${n}" alt="${t}"`;return i&&(a+=` title="${i}"`),a+=">",a}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):n.text}}class $h{strong({text:n}){return n}em({text:n}){return n}codespan({text:n}){return n}del({text:n}){return n}html({text:n}){return n}text({text:n}){return n}link({text:n}){return""+n}image({text:n}){return""+n}br(){return""}}class vt{constructor(n){wn(this,"options");wn(this,"renderer");wn(this,"textRenderer");this.options=n||za,this.options.renderer=this.options.renderer||new od,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new $h}static parse(n,i){return new vt(i).parse(n)}static parseInline(n,i){return new vt(i).parseInline(n)}parse(n,i=!0){let t="";for(let r=0;r<n.length;r++){const a=n[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){const f=a,d=this.options.extensions.renderers[f.type].call({parser:this},f);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(f.type)){t+=d||"";continue}}const o=a;switch(o.type){case"space":{t+=this.renderer.space(o);continue}case"hr":{t+=this.renderer.hr(o);continue}case"heading":{t+=this.renderer.heading(o);continue}case"code":{t+=this.renderer.code(o);continue}case"table":{t+=this.renderer.table(o);continue}case"blockquote":{t+=this.renderer.blockquote(o);continue}case"list":{t+=this.renderer.list(o);continue}case"html":{t+=this.renderer.html(o);continue}case"paragraph":{t+=this.renderer.paragraph(o);continue}case"text":{let f=o,d=this.renderer.text(f);for(;r+1<n.length&&n[r+1].type==="text";)f=n[++r],d+=`
854
854
  `+this.renderer.text(f);i?t+=this.renderer.paragraph({type:"paragraph",raw:d,text:d,tokens:[{type:"text",raw:d,text:d}]}):t+=d;continue}default:{const f='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return t}parseInline(n,i){i=i||this.renderer;let t="";for(let r=0;r<n.length;r++){const a=n[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){const f=this.options.extensions.renderers[a.type].call({parser:this},a);if(f!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){t+=f||"";continue}}const o=a;switch(o.type){case"escape":{t+=i.text(o);break}case"html":{t+=i.html(o);break}case"link":{t+=i.link(o);break}case"image":{t+=i.image(o);break}case"strong":{t+=i.strong(o);break}case"em":{t+=i.em(o);break}case"codespan":{t+=i.codespan(o);break}case"br":{t+=i.br(o);break}case"del":{t+=i.del(o);break}case"text":{t+=i.text(o);break}default:{const f='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return t}}class Lo{constructor(n){wn(this,"options");wn(this,"block");this.options=n||za}preprocess(n){return n}postprocess(n){return n}processAllTokens(n){return n}provideLexer(){return this.block?pt.lex:pt.lexInline}provideParser(){return this.block?vt.parse:vt.parseInline}}wn(Lo,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class bq{constructor(...n){wn(this,"defaults",Lh());wn(this,"options",this.setOptions);wn(this,"parse",this.parseMarkdown(!0));wn(this,"parseInline",this.parseMarkdown(!1));wn(this,"Parser",vt);wn(this,"Renderer",od);wn(this,"TextRenderer",$h);wn(this,"Lexer",pt);wn(this,"Tokenizer",ad);wn(this,"Hooks",Lo);this.use(...n)}walkTokens(n,i){var r,a;let t=[];for(const o of n)switch(t=t.concat(i.call(this,o)),o.type){case"table":{const f=o;for(const d of f.header)t=t.concat(this.walkTokens(d.tokens,i));for(const d of f.rows)for(const u of d)t=t.concat(this.walkTokens(u.tokens,i));break}case"list":{const f=o;t=t.concat(this.walkTokens(f.items,i));break}default:{const f=o;(a=(r=this.defaults.extensions)==null?void 0:r.childTokens)!=null&&a[f.type]?this.defaults.extensions.childTokens[f.type].forEach(d=>{const u=f[d].flat(1/0);t=t.concat(this.walkTokens(u,i))}):f.tokens&&(t=t.concat(this.walkTokens(f.tokens,i)))}}return t}use(...n){const i=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(t=>{const r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const o=i.renderers[a.name];o?i.renderers[a.name]=function(...f){let d=a.renderer.apply(this,f);return d===!1&&(d=o.apply(this,f)),d}:i.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=i[a.level];o?o.unshift(a.tokenizer):i[a.level]=[a.tokenizer],a.start&&(a.level==="block"?i.startBlock?i.startBlock.push(a.start):i.startBlock=[a.start]:a.level==="inline"&&(i.startInline?i.startInline.push(a.start):i.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(i.childTokens[a.name]=a.childTokens)}),r.extensions=i),t.renderer){const a=this.defaults.renderer||new od(this.defaults);for(const o in t.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const f=o,d=t.renderer[f],u=a[f];a[f]=(...c)=>{let g=d.apply(a,c);return g===!1&&(g=u.apply(a,c)),g||""}}r.renderer=a}if(t.tokenizer){const a=this.defaults.tokenizer||new ad(this.defaults);for(const o in t.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const f=o,d=t.tokenizer[f],u=a[f];a[f]=(...c)=>{let g=d.apply(a,c);return g===!1&&(g=u.apply(a,c)),g}}r.tokenizer=a}if(t.hooks){const a=this.defaults.hooks||new Lo;for(const o in t.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const f=o,d=t.hooks[f],u=a[f];Lo.passThroughHooks.has(o)?a[f]=c=>{if(this.defaults.async)return Promise.resolve(d.call(a,c)).then(m=>u.call(a,m));const g=d.call(a,c);return u.call(a,g)}:a[f]=(...c)=>{let g=d.apply(a,c);return g===!1&&(g=u.apply(a,c)),g}}r.hooks=a}if(t.walkTokens){const a=this.defaults.walkTokens,o=t.walkTokens;r.walkTokens=function(f){let d=[];return d.push(o.call(this,f)),a&&(d=d.concat(a.call(this,f))),d}}this.defaults={...this.defaults,...r}}),this}setOptions(n){return this.defaults={...this.defaults,...n},this}lexer(n,i){return pt.lex(n,i??this.defaults)}parser(n,i){return vt.parse(n,i??this.defaults)}parseMarkdown(n){return(t,r)=>{const a={...r},o={...this.defaults,...a},f=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&a.async===!1)return f(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return f(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return f(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=n);const d=o.hooks?o.hooks.provideLexer():n?pt.lex:pt.lexInline,u=o.hooks?o.hooks.provideParser():n?vt.parse:vt.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then(c=>d(c,o)).then(c=>o.hooks?o.hooks.processAllTokens(c):c).then(c=>o.walkTokens?Promise.all(this.walkTokens(c,o.walkTokens)).then(()=>c):c).then(c=>u(c,o)).then(c=>o.hooks?o.hooks.postprocess(c):c).catch(f);try{o.hooks&&(t=o.hooks.preprocess(t));let c=d(t,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let g=u(c,o);return o.hooks&&(g=o.hooks.postprocess(g)),g}catch(c){return f(c)}}}onError(n,i){return t=>{if(t.message+=`
855
- Please report this to https://github.com/markedjs/marked.`,n){const r="<p>An error occurred:</p><pre>"+Ji(t.message+"",!0)+"</pre>";return i?Promise.resolve(r):r}if(i)return Promise.reject(t);throw t}}}const Ma=new bq;function xn(e,n){return Ma.parse(e,n)}xn.options=xn.setOptions=function(e){return Ma.setOptions(e),xn.defaults=Ma.defaults,Vk(xn.defaults),xn};xn.getDefaults=Lh;xn.defaults=za;xn.use=function(...e){return Ma.use(...e),xn.defaults=Ma.defaults,Vk(xn.defaults),xn};xn.walkTokens=function(e,n){return Ma.walkTokens(e,n)};xn.parseInline=Ma.parseInline;xn.Parser=vt;xn.parser=vt.parse;xn.Renderer=od;xn.TextRenderer=$h;xn.Lexer=pt;xn.lexer=pt.lex;xn.Tokenizer=ad;xn.Hooks=Lo;xn.parse=xn;xn.options;xn.setOptions;xn.use;xn.walkTokens;xn.parseInline;vt.parse;pt.lex;const yq=e=>e.replace(/"/g,"QUOTE"),xq=e=>e.replace(new RegExp("QUOTE","g"),'"');function Sq({className:e,elementTag:n="span",inline:i=!1,text:t}){const r=xq(jk(yq(t))),a=n;return k.jsx(a,{className:e,dangerouslySetInnerHTML:{__html:i?xn.parseInline(r,{breaks:!0}):xn.parse(r,{breaks:!0})}})}const Cq="_typography-landing--claim_1gfm2_120",Eq="_typography-landing--claim-uppercase_1gfm2_158",Fq="_typography-landing--h1_1gfm2_196",Mq="_typography-landing--h1-uppercase_1gfm2_234",Tq="_typography-landing--h2_1gfm2_272",Lq="_typography-landing--h3_1gfm2_310",Pq="_typography-landing--h4_1gfm2_348",Rq="_typography-landing--h5_1gfm2_373",Aq="_typography-landing--h6_1gfm2_398",zq="_typography-landing--overline_1gfm2_423",Bq="_typography-landing--body-large_1gfm2_460",$q="_typography-landing--body-large-semibold_1gfm2_484",Oq="_typography-landing--body_1gfm2_460",Iq="_typography-landing--body-semibold_1gfm2_519",Dq="_typography-landing--body-italic_1gfm2_530",jq="_typography-landing--quote-large_1gfm2_542",Hq="_typography-landing--detail-small_1gfm2_567",Nq="_typography-landing--detail-small-bold_1gfm2_578",Vq="_typography-landing_1gfm2_120",Gq="_typography-product--h1_1gfm2_607",Wq="_typography-product--h2_1gfm2_619",qq="_typography-product--h3_1gfm2_631",Uq="_typography-product--h4_1gfm2_643",Zq="_typography-product--h5_1gfm2_655",Kq="_typography-product--h6_1gfm2_667",Yq="_typography-product--h7_1gfm2_679",Jq="_typography-product--h8_1gfm2_691",Qq="_typography-product--body-large_1gfm2_703",Xq="_typography-product--body-regular_1gfm2_715",eU="_typography-product--body-semibold_1gfm2_727",nU="_typography-product--body-italic_1gfm2_739",iU="_typography-product--body-text-link_1gfm2_752",tU="_typography-product--detail-medium_1gfm2_764",rU="_typography-product--detail-bold_1gfm2_776",aU="_typography-product--detail-upper-case_1gfm2_788",sU="_typography-product--detail-regular_1gfm2_800",oU="_typography-product_1gfm2_607",Rp={"typography-landing--claim":"_typography-landing--claim_1gfm2_120",typographyLandingClaim:Cq,"typography-landing--claim-uppercase":"_typography-landing--claim-uppercase_1gfm2_158",typographyLandingClaimUppercase:Eq,"typography-landing--h1":"_typography-landing--h1_1gfm2_196",typographyLandingH1:Fq,"typography-landing--h1-uppercase":"_typography-landing--h1-uppercase_1gfm2_234",typographyLandingH1Uppercase:Mq,"typography-landing--h2":"_typography-landing--h2_1gfm2_272",typographyLandingH2:Tq,"typography-landing--h3":"_typography-landing--h3_1gfm2_310",typographyLandingH3:Lq,"typography-landing--h4":"_typography-landing--h4_1gfm2_348",typographyLandingH4:Pq,"typography-landing--h5":"_typography-landing--h5_1gfm2_373",typographyLandingH5:Rq,"typography-landing--h6":"_typography-landing--h6_1gfm2_398",typographyLandingH6:Aq,"typography-landing--overline":"_typography-landing--overline_1gfm2_423",typographyLandingOverline:zq,"typography-landing--body-large":"_typography-landing--body-large_1gfm2_460",typographyLandingBodyLarge:Bq,"typography-landing--body-large-semibold":"_typography-landing--body-large-semibold_1gfm2_484",typographyLandingBodyLargeSemibold:$q,"typography-landing--body":"_typography-landing--body_1gfm2_460",typographyLandingBody:Oq,"typography-landing--body-semibold":"_typography-landing--body-semibold_1gfm2_519",typographyLandingBodySemibold:Iq,"typography-landing--body-italic":"_typography-landing--body-italic_1gfm2_530",typographyLandingBodyItalic:Dq,"typography-landing--quote-large":"_typography-landing--quote-large_1gfm2_542",typographyLandingQuoteLarge:jq,"typography-landing--detail-small":"_typography-landing--detail-small_1gfm2_567",typographyLandingDetailSmall:Hq,"typography-landing--detail-small-bold":"_typography-landing--detail-small-bold_1gfm2_578",typographyLandingDetailSmallBold:Nq,"typography-landing":"_typography-landing_1gfm2_120",typographyLanding:Vq,"typography-product--h1":"_typography-product--h1_1gfm2_607",typographyProductH1:Gq,"typography-product--h2":"_typography-product--h2_1gfm2_619",typographyProductH2:Wq,"typography-product--h3":"_typography-product--h3_1gfm2_631",typographyProductH3:qq,"typography-product--h4":"_typography-product--h4_1gfm2_643",typographyProductH4:Uq,"typography-product--h5":"_typography-product--h5_1gfm2_655",typographyProductH5:Zq,"typography-product--h6":"_typography-product--h6_1gfm2_667",typographyProductH6:Kq,"typography-product--h7":"_typography-product--h7_1gfm2_679",typographyProductH7:Yq,"typography-product--h8":"_typography-product--h8_1gfm2_691",typographyProductH8:Jq,"typography-product--body-large":"_typography-product--body-large_1gfm2_703",typographyProductBodyLarge:Qq,"typography-product--body-regular":"_typography-product--body-regular_1gfm2_715",typographyProductBodyRegular:Xq,"typography-product--body-semibold":"_typography-product--body-semibold_1gfm2_727",typographyProductBodySemibold:eU,"typography-product--body-italic":"_typography-product--body-italic_1gfm2_739",typographyProductBodyItalic:nU,"typography-product--body-text-link":"_typography-product--body-text-link_1gfm2_752",typographyProductBodyTextLink:iU,"typography-product--detail-medium":"_typography-product--detail-medium_1gfm2_764",typographyProductDetailMedium:tU,"typography-product--detail-bold":"_typography-product--detail-bold_1gfm2_776",typographyProductDetailBold:rU,"typography-product--detail-upper-case":"_typography-product--detail-upper-case_1gfm2_788",typographyProductDetailUpperCase:aU,"typography-product--detail-regular":"_typography-product--detail-regular_1gfm2_800",typographyProductDetailRegular:sU,"typography-product":"_typography-product_1gfm2_607",typographyProduct:oU};function lU(e){switch(e){case"h1":case"h1-uppercase":return"h1";case"h2":case"claim":case"claim-uppercase":return"h2";case"h3":case"h4":case"h5":return e;case"h6":case"overline":return"h6";default:return"span"}}const uf=e=>{const{as:n,children:i,className:t,fontSet:r="product",markdown:a=r==="landing",type:o}=e,f=n||lU(o),d=Ue(Rp[`typography-${r}`],Rp[`typography-${r}--${o}`],t);return k.jsx(k.Fragment,{children:typeof i=="string"&&a?k.jsx(Sq,{className:d,text:i,inline:!0,elementTag:f}):k.jsx(f,{className:d,children:i})})},fU="_root_1p8e7_120",dU="_root__content_1p8e7_130",uU="_root__bookmark_1p8e7_136",cU="_root__header_1p8e7_142",hU="_root__header__reserved_1p8e7_149",gU="_root__header__reserved__box_1p8e7_162",mU="_root__header__image_1p8e7_171",pU="_root__info_1p8e7_176",vU="_root__info__top_1p8e7_182",kU="_root__info__price_1p8e7_185",wU="_root__info__title_1p8e7_191",_U="_root__info__timeStamp_1p8e7_200",Bi={root:fU,root__content:dU,root__bookmark:uU,root__header:cU,root__header__reserved:hU,"root__header__reserved--visible":"_root__header__reserved--visible_1p8e7_159",root__header__reserved__box:gU,root__header__image:mU,root__info:pU,root__info__top:vU,root__info__price:kU,"root__info__price--reserved":"_root__info__price--reserved_1p8e7_188",root__info__title:wU,root__info__timeStamp:_U};function Oh({bookmarked:e,id:n,image:i,onClick:t,price:r,reserved:a,reservedText:o,timeStamp:f,title:d}){const u=kt(),c=()=>{u(`/feed/${n}`),t&&t()};return k.jsxs("div",{className:Bi.root,children:[k.jsx($k,{className:Bi.root__bookmark,isBookmarked:e,id:n}),k.jsxs(B.Button,{className:Bi.root__content,onClick:c,children:[k.jsxs("div",{className:Bi.root__header,children:[k.jsx("div",{className:Ue(Bi.root__header__reserved,{[Bi["root__header__reserved--visible"]]:a}),children:k.jsx("div",{className:Bi.root__header__reserved__box,children:k.jsx(uf,{type:"detail-upper-case",children:o})})}),i?k.jsx(RW,{alt:"product image",src:i,className:Bi.root__header__image}):k.jsx(PW,{size:"large",style:"rounded",icon:k.jsx(Ok,{name:"camera_crossed"})})]}),k.jsxs("div",{className:Bi.root__info,children:[k.jsxs("div",{className:Bi.root__info__top,children:[k.jsx(uf,{type:"body-semibold",as:"p",className:Ue(Bi.root__info__price,{[Bi["root__info__price--reserved"]]:a}),children:r}),k.jsx(uf,{type:"body-semibold",as:"p",className:Bi.root__info__title,children:d})]}),k.jsx(uf,{type:"detail-medium",as:"p",className:Bi.root__info__timeStamp,children:rd(f)})]})]})]})}const bU=({children:e,navigate:n})=>k.jsx(f3.Provider,{value:{navigate:n},children:e}),yU="_root_1elhz_120",xU={root:yU},Ih={event:"event",feed:"feed",group:"group",marketplace:"marketplace",post:"post"},SU="_root_17i32_120",CU="_root__list_17i32_125",EU="_root__itemCta_17i32_135",FU="_root__item_17i32_135",oo={root:SU,root__list:CU,root__itemCta:EU,root__item:FU},MU={event:"",feed:"",group:"",marketplace:"/feed/marketplace",post:""},TU=({feedType:e,item:n})=>{switch(e){case Ih[e]:return k.jsx(Oh,{...n});default:return null}},LU=(e,n,i=6)=>{let t=[];if(!e.length)return[[]];const r=n?n.filter(m=>Number(m.block)>=0):[];let a=Array(i).fill(null),o=0,f=0,d=1;const u=()=>{let m=0;r.forEach(w=>{w.block===d&&(a.splice(w.position,1,w),m+=1)}),o=m};r.length&&u();const c=(m,w)=>{if(a[m]!==null&&o<i&&m<i){c(m+1,w);return}a.splice(m,1,w),o+=1,f+=1},g=(m=0,w=[])=>{if(m>e.length){if(o>0){const _=a.filter(C=>C!=null);_.length&&w.push(_)}return w}return c(f,e[m]),o===i&&a.filter(Boolean).length===i&&(w.push(a.filter(_=>_!=null)),a=Array(i).fill(null),o=0,f=0,d+=1,r.length&&u()),g(m+1,w)};return t=g(),n&&n.length>=0&&n.sort((m,w)=>m.position-w.position).forEach(m=>{!m.block&&t.length>=m.position&&t.splice(m.position,0,m)}),t},PU=e=>e?new Intl.NumberFormat("de-DE",{currency:"EUR",maximumFractionDigits:0,minimumFractionDigits:0,style:"currency"}).format(e/100).replace("€","").trim()+" €":"Zu verschenken",RU=(e,n)=>{const i=[];return e.forEach(t=>{var r,a;typeof t=="number"?i.push({bookmarked:n[t].is_bookmarked,id:n[t].id,image:(a=(r=n[t])==null?void 0:r.images[0])==null?void 0:a.url,price:PU(n[t].price),reserved:x$(n[t].outcome),reservedText:"Reserviert",timeStamp:n[t].created_at,title:n[t].subject,type:"feed"}):i.push({type:"ad",...t})}),i},AU=(e,n="de-DE")=>e[n],zU={"de-DE":{marketplace:{description:"Gib deinen Sachen ein neues Zuhause.",title:"Etwas zu verkaufen?",cta:"Angebot erstellen"},feed:{description:"",title:"",cta:""},event:{description:"",title:"",cta:""},group:{description:"",title:"",cta:""},post:{description:"",title:"",cta:""}}},BU=AU(zU),$U=(e,n)=>BU[Ih[e]][n];function Ap({feedType:e,isCard:n=!1,onClick:i}){const t=r=>$U(e,r);return k.jsx(B.EmptyState,{primaryText:t("title"),stickerProps:{color:"teal",icon:"marketplace"},secondaryText:t("description"),size:n?"small":"medium",buttons:[{buttonType:"primary",children:k.jsx(B.Typography,{type:n?"body-semibold":"h5",children:t("cta")}),onClick:i,size:n?"small":"large"}]})}const OU=(e,n)=>e?n%3!==0:n%2!==0;function Xk({feedType:e,items:n}){const i=kt(),t=X1(800),r=OU(t,n.length),a=()=>{i(MU[e])};return k.jsx(k.Fragment,{children:n.length?k.jsx(B.Card,{className:Ue(oo.root),borderRadius:!0,responsive:!0,children:k.jsx(B.CardBody,{className:oo.root__body,withoutPadding:!0,children:k.jsxs("ul",{className:oo.root__list,children:[n.map((o,f)=>k.jsx("li",{className:oo.root__item,children:o.type==="feed"?k.jsx(TU,{feedType:e,item:o}):o.content},`grid_item_${o.type}_${o.id}`)),r&&k.jsx("li",{className:oo.root__itemCta,children:k.jsx(Ap,{isCard:!0,onClick:a,feedType:e})},"empty_state_cta_card")]})})}):k.jsx(Ap,{onClick:a,feedType:e})})}const IU=({feedItem:e,feedItems:n,feedType:i})=>{switch(i){case Ih[i]:return k.jsx(Xk,{feedType:i,items:RU(e,n)});default:return null}},DU=({ads:e,feedItems:n,feedType:i,items:t})=>{const r=LU(t,e);return r.length?k.jsx("section",{className:xU.root,children:r.map((a,o)=>Array.isArray(a)?k.jsx(IU,{feedItem:a,feedItems:n,feedType:i},`grid_block_${o}`):k.jsx(y.Fragment,{children:a.content},`ad_block_${o}_${a.id}`))}):null};function jU(e){e.__scriptingEnabledHTMLContentHasBeenExecuted=!0}const HU=`(${jU.toString()})(document.currentScript);`,e4=y.forwardRef((e,n)=>{const i=y.useRef(null);return y.useImperativeHandle(n,()=>({get hasBeenExecuted(){const t=i.current;return t?!!t.__scriptingEnabledHTMLContentHasBeenExecuted:!1}})),k.jsx("script",{ref:i,dangerouslySetInnerHTML:{__html:HU}})});e4.displayName="InnerHTMLScript";const NU=(e,n)=>{const i=document.createRange().createContextualFragment(n);e.innerHTML="",e.appendChild(i)},VU=({html:e,...n})=>{const i=y.useRef(null),t=y.useRef(null);return y.useEffect(()=>{const r=t.current,a=i.current;!r||!a||a.hasBeenExecuted||NU(r,e)},[e]),k.jsxs(k.Fragment,{children:[k.jsx(e4,{ref:i}),k.jsx("div",{...n,ref:t,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:e}})]})},GU="_imageGallery_10c2p_120",WU="_imageGalleryImage_10c2p_126",qU="_imageGalleryPill_10c2p_134",Hc={imageGallery:GU,imageGalleryImage:WU,imageGalleryPill:qU},UU=({gallerySize:e,imageAlt:n,imageURL:i,onClick:t})=>{let r;if(e>1){const a=`+${e-1}`;r=k.jsx("div",{className:Hc.imageGalleryPill,children:k.jsx(B.LabelPill,{label:a,shape:"tile",size:"medium"})})}return k.jsxs("div",{className:Hc.imageGallery,onClick:t,children:[k.jsx(B.Image,{alt:n,src:i,className:Hc.imageGalleryImage}),r]})},ZU="_container_y0t0p_120",KU="_circle_y0t0p_128",YU="_logo_y0t0p_136",Nc={container:ZU,circle:KU,logo:YU},JU=(e,n)=>p.createElement("svg",{width:72,height:80,viewBox:"0 0 72 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,...e},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M67.7997 17.7397L39.7431 1.45626C37.3242 0.0510383 34.3374 0.0510383 31.9184 1.45626L3.87632 17.7397C1.48151 19.136 0.00627151 21.6971 0 24.4692V55.5447C0.0040404 58.3136 1.48055 60.8715 3.87632 62.2598L15.5846 69.0614V50.9839L21.4279 54.3414C21.6617 54.4879 21.8054 54.7428 21.8097 55.0187V72.6783L31.8968 78.5576C34.3242 79.9506 37.3085 79.9506 39.7359 78.5576L49.823 72.6783V55.0187C49.8291 54.7396 49.9789 54.4834 50.2193 54.3414L56.0554 50.9839V69.0614L60.7315 66.3451L67.7708 62.2598C70.1649 60.8707 71.6389 58.3126 71.64 55.5447V24.4692C71.6426 21.7041 70.1817 19.144 67.7997 17.7397ZM33.4975 74.07L26.487 69.9991V55.0198C26.4907 53.076 25.4583 51.2775 23.7779 50.3005L15.0237 45.2569C14.1803 44.77 13.1412 44.7705 12.2982 45.2581C11.4552 45.7457 10.9368 46.6464 10.9384 47.6202V60.928L6.21913 58.2333C5.26735 57.6719 4.68151 56.6508 4.67725 55.5458V25.3926L33.4975 42.1227V74.07ZM6.98877 21.3007L33.4962 36.7267V5.93945L6.98877 21.3007ZM38.187 5.93945L64.6872 21.3007L38.187 36.7267V5.93945ZM65.451 58.2333C66.4104 57.6776 67.0029 56.6545 67.0073 55.5458V25.3926L38.187 42.1227V74.07L45.1759 69.9991V55.027C45.1841 53.0789 46.2267 51.2818 47.9138 50.3077L56.6824 45.2641C57.5253 44.7809 58.5619 44.7833 59.4025 45.2705C60.2432 45.7577 60.7606 46.6558 60.7605 47.6274V60.928L65.451 58.2333Z",fill:"#201649"})),QU=y.forwardRef(JU),n4=()=>k.jsxs("div",{className:Nc.container,children:[k.jsx("div",{className:Nc.circle}),k.jsx(QU,{className:Nc.logo})]}),XU="_container_1kk1s_120",eZ="_header_1kk1s_127",nZ="_navBar_1kk1s_133",iZ="_mainContent_1kk1s_138",tZ="_sidebarRight_1kk1s_144",rZ="_adSlot_1kk1s_153",aZ="_adSlot--right_1kk1s_164",sZ="_adSlot--left_1kk1s_169",cr={container:XU,header:eZ,navBar:nZ,mainContent:iZ,sidebarRight:tZ,adSlot:rZ,"adSlot--right":"_adSlot--right_1kk1s_164",adSlotRight:aZ,"adSlot--left":"_adSlot--left_1kk1s_169",adSlotLeft:sZ},oZ=({banner:e,children:n,leftAdSlot:i,navbar:t,right:r,rightAdSlot:a})=>k.jsxs("div",{className:cr.container,children:[k.jsxs("header",{className:cr.header,children:[k.jsx("nav",{className:cr.navBar,children:t}),e]}),i&&k.jsx("div",{className:Ue(cr.adSlot,cr["adSlot--left"]),children:i}),k.jsx("main",{className:cr.mainContent,children:n}),r&&k.jsx("aside",{className:cr.sidebarRight,children:r}),a&&k.jsx("div",{className:Ue(cr.adSlot,cr["adSlot--right"]),children:a})]});var i4={exports:{}};(()=>{var e={d:(o,f)=>{for(var d in f)e.o(f,d)&&!e.o(o,d)&&Object.defineProperty(o,d,{enumerable:!0,get:f[d]})},o:(o,f)=>Object.prototype.hasOwnProperty.call(o,f),r:o=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{default:()=>a});const i=y;function t(o,f){return function(d){if(Array.isArray(d))return d}(o)||function(d,u){var c=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(c!=null){var g,m,w=[],_=!0,C=!1;try{for(c=c.call(d);!(_=(g=c.next()).done)&&(w.push(g.value),!u||w.length!==u);_=!0);}catch(E){C=!0,m=E}finally{try{_||c.return==null||c.return()}finally{if(C)throw m}}return w}}(o,f)||function(d,u){if(d){if(typeof d=="string")return r(d,u);var c=Object.prototype.toString.call(d).slice(8,-1);return c==="Object"&&d.constructor&&(c=d.constructor.name),c==="Map"||c==="Set"?Array.from(d):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?r(d,u):void 0}}(o,f)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
855
+ Please report this to https://github.com/markedjs/marked.`,n){const r="<p>An error occurred:</p><pre>"+Ji(t.message+"",!0)+"</pre>";return i?Promise.resolve(r):r}if(i)return Promise.reject(t);throw t}}}const Ma=new bq;function xn(e,n){return Ma.parse(e,n)}xn.options=xn.setOptions=function(e){return Ma.setOptions(e),xn.defaults=Ma.defaults,Vk(xn.defaults),xn};xn.getDefaults=Lh;xn.defaults=za;xn.use=function(...e){return Ma.use(...e),xn.defaults=Ma.defaults,Vk(xn.defaults),xn};xn.walkTokens=function(e,n){return Ma.walkTokens(e,n)};xn.parseInline=Ma.parseInline;xn.Parser=vt;xn.parser=vt.parse;xn.Renderer=od;xn.TextRenderer=$h;xn.Lexer=pt;xn.lexer=pt.lex;xn.Tokenizer=ad;xn.Hooks=Lo;xn.parse=xn;xn.options;xn.setOptions;xn.use;xn.walkTokens;xn.parseInline;vt.parse;pt.lex;const yq=e=>e.replace(/"/g,"QUOTE"),xq=e=>e.replace(new RegExp("QUOTE","g"),'"');function Sq({className:e,elementTag:n="span",inline:i=!1,text:t}){const r=xq(jk(yq(t))),a=n;return k.jsx(a,{className:e,dangerouslySetInnerHTML:{__html:i?xn.parseInline(r,{breaks:!0}):xn.parse(r,{breaks:!0})}})}const Cq="_typography-landing--claim_1gfm2_120",Eq="_typography-landing--claim-uppercase_1gfm2_158",Fq="_typography-landing--h1_1gfm2_196",Mq="_typography-landing--h1-uppercase_1gfm2_234",Tq="_typography-landing--h2_1gfm2_272",Lq="_typography-landing--h3_1gfm2_310",Pq="_typography-landing--h4_1gfm2_348",Rq="_typography-landing--h5_1gfm2_373",Aq="_typography-landing--h6_1gfm2_398",zq="_typography-landing--overline_1gfm2_423",Bq="_typography-landing--body-large_1gfm2_460",$q="_typography-landing--body-large-semibold_1gfm2_484",Oq="_typography-landing--body_1gfm2_460",Iq="_typography-landing--body-semibold_1gfm2_519",Dq="_typography-landing--body-italic_1gfm2_530",jq="_typography-landing--quote-large_1gfm2_542",Hq="_typography-landing--detail-small_1gfm2_567",Nq="_typography-landing--detail-small-bold_1gfm2_578",Vq="_typography-landing_1gfm2_120",Gq="_typography-product--h1_1gfm2_607",Wq="_typography-product--h2_1gfm2_619",qq="_typography-product--h3_1gfm2_631",Uq="_typography-product--h4_1gfm2_643",Zq="_typography-product--h5_1gfm2_655",Kq="_typography-product--h6_1gfm2_667",Yq="_typography-product--h7_1gfm2_679",Jq="_typography-product--h8_1gfm2_691",Qq="_typography-product--body-large_1gfm2_703",Xq="_typography-product--body-regular_1gfm2_715",eU="_typography-product--body-semibold_1gfm2_727",nU="_typography-product--body-italic_1gfm2_739",iU="_typography-product--body-text-link_1gfm2_752",tU="_typography-product--detail-medium_1gfm2_764",rU="_typography-product--detail-bold_1gfm2_776",aU="_typography-product--detail-upper-case_1gfm2_788",sU="_typography-product--detail-regular_1gfm2_800",oU="_typography-product_1gfm2_607",Rp={"typography-landing--claim":"_typography-landing--claim_1gfm2_120",typographyLandingClaim:Cq,"typography-landing--claim-uppercase":"_typography-landing--claim-uppercase_1gfm2_158",typographyLandingClaimUppercase:Eq,"typography-landing--h1":"_typography-landing--h1_1gfm2_196",typographyLandingH1:Fq,"typography-landing--h1-uppercase":"_typography-landing--h1-uppercase_1gfm2_234",typographyLandingH1Uppercase:Mq,"typography-landing--h2":"_typography-landing--h2_1gfm2_272",typographyLandingH2:Tq,"typography-landing--h3":"_typography-landing--h3_1gfm2_310",typographyLandingH3:Lq,"typography-landing--h4":"_typography-landing--h4_1gfm2_348",typographyLandingH4:Pq,"typography-landing--h5":"_typography-landing--h5_1gfm2_373",typographyLandingH5:Rq,"typography-landing--h6":"_typography-landing--h6_1gfm2_398",typographyLandingH6:Aq,"typography-landing--overline":"_typography-landing--overline_1gfm2_423",typographyLandingOverline:zq,"typography-landing--body-large":"_typography-landing--body-large_1gfm2_460",typographyLandingBodyLarge:Bq,"typography-landing--body-large-semibold":"_typography-landing--body-large-semibold_1gfm2_484",typographyLandingBodyLargeSemibold:$q,"typography-landing--body":"_typography-landing--body_1gfm2_460",typographyLandingBody:Oq,"typography-landing--body-semibold":"_typography-landing--body-semibold_1gfm2_519",typographyLandingBodySemibold:Iq,"typography-landing--body-italic":"_typography-landing--body-italic_1gfm2_530",typographyLandingBodyItalic:Dq,"typography-landing--quote-large":"_typography-landing--quote-large_1gfm2_542",typographyLandingQuoteLarge:jq,"typography-landing--detail-small":"_typography-landing--detail-small_1gfm2_567",typographyLandingDetailSmall:Hq,"typography-landing--detail-small-bold":"_typography-landing--detail-small-bold_1gfm2_578",typographyLandingDetailSmallBold:Nq,"typography-landing":"_typography-landing_1gfm2_120",typographyLanding:Vq,"typography-product--h1":"_typography-product--h1_1gfm2_607",typographyProductH1:Gq,"typography-product--h2":"_typography-product--h2_1gfm2_619",typographyProductH2:Wq,"typography-product--h3":"_typography-product--h3_1gfm2_631",typographyProductH3:qq,"typography-product--h4":"_typography-product--h4_1gfm2_643",typographyProductH4:Uq,"typography-product--h5":"_typography-product--h5_1gfm2_655",typographyProductH5:Zq,"typography-product--h6":"_typography-product--h6_1gfm2_667",typographyProductH6:Kq,"typography-product--h7":"_typography-product--h7_1gfm2_679",typographyProductH7:Yq,"typography-product--h8":"_typography-product--h8_1gfm2_691",typographyProductH8:Jq,"typography-product--body-large":"_typography-product--body-large_1gfm2_703",typographyProductBodyLarge:Qq,"typography-product--body-regular":"_typography-product--body-regular_1gfm2_715",typographyProductBodyRegular:Xq,"typography-product--body-semibold":"_typography-product--body-semibold_1gfm2_727",typographyProductBodySemibold:eU,"typography-product--body-italic":"_typography-product--body-italic_1gfm2_739",typographyProductBodyItalic:nU,"typography-product--body-text-link":"_typography-product--body-text-link_1gfm2_752",typographyProductBodyTextLink:iU,"typography-product--detail-medium":"_typography-product--detail-medium_1gfm2_764",typographyProductDetailMedium:tU,"typography-product--detail-bold":"_typography-product--detail-bold_1gfm2_776",typographyProductDetailBold:rU,"typography-product--detail-upper-case":"_typography-product--detail-upper-case_1gfm2_788",typographyProductDetailUpperCase:aU,"typography-product--detail-regular":"_typography-product--detail-regular_1gfm2_800",typographyProductDetailRegular:sU,"typography-product":"_typography-product_1gfm2_607",typographyProduct:oU};function lU(e){switch(e){case"h1":case"h1-uppercase":return"h1";case"h2":case"claim":case"claim-uppercase":return"h2";case"h3":case"h4":case"h5":return e;case"h6":case"overline":return"h6";default:return"span"}}const uf=e=>{const{as:n,children:i,className:t,fontSet:r="product",markdown:a=r==="landing",type:o}=e,f=n||lU(o),d=Ue(Rp[`typography-${r}`],Rp[`typography-${r}--${o}`],t);return k.jsx(k.Fragment,{children:typeof i=="string"&&a?k.jsx(Sq,{className:d,text:i,inline:!0,elementTag:f}):k.jsx(f,{className:d,children:i})})},fU="_root_1p8e7_120",dU="_root__content_1p8e7_130",uU="_root__bookmark_1p8e7_136",cU="_root__header_1p8e7_142",hU="_root__header__reserved_1p8e7_149",gU="_root__header__reserved__box_1p8e7_162",mU="_root__header__image_1p8e7_171",pU="_root__info_1p8e7_176",vU="_root__info__top_1p8e7_182",kU="_root__info__price_1p8e7_185",wU="_root__info__title_1p8e7_191",_U="_root__info__timeStamp_1p8e7_200",Bi={root:fU,root__content:dU,root__bookmark:uU,root__header:cU,root__header__reserved:hU,"root__header__reserved--visible":"_root__header__reserved--visible_1p8e7_159",root__header__reserved__box:gU,root__header__image:mU,root__info:pU,root__info__top:vU,root__info__price:kU,"root__info__price--reserved":"_root__info__price--reserved_1p8e7_188",root__info__title:wU,root__info__timeStamp:_U};function Oh({bookmarked:e,id:n,image:i,onClick:t,price:r,reserved:a,reservedText:o,timeStamp:f,title:d}){const u=kt(),c=()=>{u(`/feed/${n}`),t&&t()};return k.jsxs("div",{className:Bi.root,children:[k.jsx($k,{className:Bi.root__bookmark,isBookmarked:e,id:n}),k.jsxs(B.Button,{className:Bi.root__content,onClick:c,children:[k.jsxs("div",{className:Bi.root__header,children:[k.jsx("div",{className:Ue(Bi.root__header__reserved,{[Bi["root__header__reserved--visible"]]:a}),children:k.jsx("div",{className:Bi.root__header__reserved__box,children:k.jsx(uf,{type:"detail-upper-case",children:o})})}),i?k.jsx(RW,{alt:"product image",src:i,className:Bi.root__header__image}):k.jsx(PW,{size:"large",style:"rounded",icon:k.jsx(Ok,{name:"camera_crossed"})})]}),k.jsxs("div",{className:Bi.root__info,children:[k.jsxs("div",{className:Bi.root__info__top,children:[k.jsx(uf,{type:"body-semibold",as:"p",className:Ue(Bi.root__info__price,{[Bi["root__info__price--reserved"]]:a}),children:r}),k.jsx(uf,{type:"body-semibold",as:"p",className:Bi.root__info__title,children:d})]}),k.jsx(uf,{type:"detail-medium",as:"p",className:Bi.root__info__timeStamp,children:rd(f)})]})]})]})}const bU=({children:e,navigate:n})=>k.jsx(f3.Provider,{value:{navigate:n},children:e}),yU="_root_1elhz_120",xU={root:yU},Ih={event:"event",feed:"feed",group:"group",marketplace:"marketplace",post:"post"},SU="_root_19omr_120",CU="_root__list_19omr_125",EU="_root__itemCta_19omr_135",FU="_root__item_19omr_135",oo={root:SU,root__list:CU,root__itemCta:EU,root__item:FU},MU={event:"",feed:"",group:"",marketplace:"/feed/marketplace",post:""},TU=({feedType:e,item:n})=>{switch(e){case Ih[e]:return k.jsx(Oh,{...n});default:return null}},LU=(e,n,i=6)=>{let t=[];if(!e.length)return[[]];const r=n?n.filter(m=>Number(m==null?void 0:m.position)>=0):[];let a=Array(i).fill(null),o=0,f=0,d=0;const u=()=>{let m=0;r.forEach(w=>{w.block===d&&(a.splice(w==null?void 0:w.position,1,w),m+=1)}),o=m};r.length&&u();const c=(m,w)=>{if(a[m]!==null&&o<i&&m<i){c(m+1,w);return}a.splice(m,1,w),o+=1,f+=1},g=(m=0,w=[])=>{if(m>e.length){if(o>0){const _=a.filter(C=>C!=null);_.length&&w.push(_)}return w}return c(f,e[m]),o===i&&a.filter(Boolean).length===i&&(w.push(a.filter(_=>_!=null)),a=Array(i).fill(null),o=0,f=0,d+=1,r.length&&u()),g(m+1,w)};return t=g(),n&&n.length>=0&&(t=n.sort((m,w)=>m.block-w.block).filter(m=>(m==null?void 0:m.position)==null).reduce((m,w,_)=>{if(t.length>=w.block){const C=w.block+_+1;return[...m.slice(0,C),w,...m.slice(C)]}return m},[...t])),t},PU=e=>e?new Intl.NumberFormat("de-DE",{currency:"EUR",maximumFractionDigits:0,minimumFractionDigits:0,style:"currency"}).format(e/100).replace("€","").trim()+" €":"Zu verschenken",RU=(e,n)=>{const i=[];return e.forEach(t=>{var r,a;typeof t=="number"?i.push({bookmarked:n[t].is_bookmarked,id:n[t].id,image:(a=(r=n[t])==null?void 0:r.images[0])==null?void 0:a.url,price:PU(n[t].price),reserved:x$(n[t].outcome),reservedText:"Reserviert",timeStamp:n[t].created_at,title:n[t].subject,type:"feed"}):i.push({type:"ad",...t})}),i},AU=(e,n="de-DE")=>e[n],zU={"de-DE":{marketplace:{description:"Gib deinen Sachen ein neues Zuhause.",title:"Etwas zu verkaufen?",cta:"Angebot erstellen"},feed:{description:"",title:"",cta:""},event:{description:"",title:"",cta:""},group:{description:"",title:"",cta:""},post:{description:"",title:"",cta:""}}},BU=AU(zU),$U=(e,n)=>BU[Ih[e]][n];function Ap({feedType:e,isCard:n=!1,onClick:i}){const t=r=>$U(e,r);return k.jsx(B.EmptyState,{primaryText:t("title"),stickerProps:{color:"teal",icon:"marketplace"},secondaryText:t("description"),size:n?"small":"medium",buttons:[{buttonType:"primary",children:k.jsx(B.Typography,{type:n?"body-semibold":"h5",children:t("cta")}),onClick:i,size:n?"small":"large"}]})}const OU=(e,n)=>e?n%3!==0:n%2!==0;function Xk({feedType:e,items:n}){const i=kt(),t=X1(800),r=OU(t,n.length),a=()=>{i(MU[e])};return k.jsx(k.Fragment,{children:n.length?k.jsx(B.Card,{className:Ue(oo.root),borderRadius:!0,responsive:!0,children:k.jsx(B.CardBody,{className:oo.root__body,withoutPadding:!0,children:k.jsxs("ul",{className:oo.root__list,children:[n.map((o,f)=>k.jsx("li",{className:oo.root__item,children:o.type==="feed"?k.jsx(TU,{feedType:e,item:o}):o.content},`grid_item_${o.type}_${o.id}`)),r&&k.jsx("li",{className:oo.root__itemCta,children:k.jsx(Ap,{isCard:!0,onClick:a,feedType:e})},"empty_state_cta_card")]})})}):k.jsx(Ap,{onClick:a,feedType:e})})}const IU=({feedItem:e,feedItems:n,feedType:i})=>{switch(i){case Ih[i]:return k.jsx(Xk,{feedType:i,items:RU(e,n)});default:return null}},DU=({ads:e,feedItems:n,feedType:i,items:t})=>{const r=LU(t,e);return r.length?k.jsx("section",{className:xU.root,children:r.map((a,o)=>Array.isArray(a)?k.jsx(IU,{feedItem:a,feedItems:n,feedType:i},`grid_block_${o}`):k.jsx(y.Fragment,{children:a.content},`ad_block_${o}_${a.id}`))}):null};function jU(e){e.__scriptingEnabledHTMLContentHasBeenExecuted=!0}const HU=`(${jU.toString()})(document.currentScript);`,e4=y.forwardRef((e,n)=>{const i=y.useRef(null);return y.useImperativeHandle(n,()=>({get hasBeenExecuted(){const t=i.current;return t?!!t.__scriptingEnabledHTMLContentHasBeenExecuted:!1}})),k.jsx("script",{ref:i,dangerouslySetInnerHTML:{__html:HU}})});e4.displayName="InnerHTMLScript";const NU=(e,n)=>{const i=document.createRange().createContextualFragment(n);e.innerHTML="",e.appendChild(i)},VU=({html:e,...n})=>{const i=y.useRef(null),t=y.useRef(null);return y.useEffect(()=>{const r=t.current,a=i.current;!r||!a||a.hasBeenExecuted||NU(r,e)},[e]),k.jsxs(k.Fragment,{children:[k.jsx(e4,{ref:i}),k.jsx("div",{...n,ref:t,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:e}})]})},GU="_imageGallery_10c2p_120",WU="_imageGalleryImage_10c2p_126",qU="_imageGalleryPill_10c2p_134",Hc={imageGallery:GU,imageGalleryImage:WU,imageGalleryPill:qU},UU=({gallerySize:e,imageAlt:n,imageURL:i,onClick:t})=>{let r;if(e>1){const a=`+${e-1}`;r=k.jsx("div",{className:Hc.imageGalleryPill,children:k.jsx(B.LabelPill,{label:a,shape:"tile",size:"medium"})})}return k.jsxs("div",{className:Hc.imageGallery,onClick:t,children:[k.jsx(B.Image,{alt:n,src:i,className:Hc.imageGalleryImage}),r]})},ZU="_container_y0t0p_120",KU="_circle_y0t0p_128",YU="_logo_y0t0p_136",Nc={container:ZU,circle:KU,logo:YU},JU=(e,n)=>p.createElement("svg",{width:72,height:80,viewBox:"0 0 72 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,...e},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M67.7997 17.7397L39.7431 1.45626C37.3242 0.0510383 34.3374 0.0510383 31.9184 1.45626L3.87632 17.7397C1.48151 19.136 0.00627151 21.6971 0 24.4692V55.5447C0.0040404 58.3136 1.48055 60.8715 3.87632 62.2598L15.5846 69.0614V50.9839L21.4279 54.3414C21.6617 54.4879 21.8054 54.7428 21.8097 55.0187V72.6783L31.8968 78.5576C34.3242 79.9506 37.3085 79.9506 39.7359 78.5576L49.823 72.6783V55.0187C49.8291 54.7396 49.9789 54.4834 50.2193 54.3414L56.0554 50.9839V69.0614L60.7315 66.3451L67.7708 62.2598C70.1649 60.8707 71.6389 58.3126 71.64 55.5447V24.4692C71.6426 21.7041 70.1817 19.144 67.7997 17.7397ZM33.4975 74.07L26.487 69.9991V55.0198C26.4907 53.076 25.4583 51.2775 23.7779 50.3005L15.0237 45.2569C14.1803 44.77 13.1412 44.7705 12.2982 45.2581C11.4552 45.7457 10.9368 46.6464 10.9384 47.6202V60.928L6.21913 58.2333C5.26735 57.6719 4.68151 56.6508 4.67725 55.5458V25.3926L33.4975 42.1227V74.07ZM6.98877 21.3007L33.4962 36.7267V5.93945L6.98877 21.3007ZM38.187 5.93945L64.6872 21.3007L38.187 36.7267V5.93945ZM65.451 58.2333C66.4104 57.6776 67.0029 56.6545 67.0073 55.5458V25.3926L38.187 42.1227V74.07L45.1759 69.9991V55.027C45.1841 53.0789 46.2267 51.2818 47.9138 50.3077L56.6824 45.2641C57.5253 44.7809 58.5619 44.7833 59.4025 45.2705C60.2432 45.7577 60.7606 46.6558 60.7605 47.6274V60.928L65.451 58.2333Z",fill:"#201649"})),QU=y.forwardRef(JU),n4=()=>k.jsxs("div",{className:Nc.container,children:[k.jsx("div",{className:Nc.circle}),k.jsx(QU,{className:Nc.logo})]}),XU="_container_1kk1s_120",eZ="_header_1kk1s_127",nZ="_navBar_1kk1s_133",iZ="_mainContent_1kk1s_138",tZ="_sidebarRight_1kk1s_144",rZ="_adSlot_1kk1s_153",aZ="_adSlot--right_1kk1s_164",sZ="_adSlot--left_1kk1s_169",cr={container:XU,header:eZ,navBar:nZ,mainContent:iZ,sidebarRight:tZ,adSlot:rZ,"adSlot--right":"_adSlot--right_1kk1s_164",adSlotRight:aZ,"adSlot--left":"_adSlot--left_1kk1s_169",adSlotLeft:sZ},oZ=({banner:e,children:n,leftAdSlot:i,navbar:t,right:r,rightAdSlot:a})=>k.jsxs("div",{className:cr.container,children:[k.jsxs("header",{className:cr.header,children:[k.jsx("nav",{className:cr.navBar,children:t}),e]}),i&&k.jsx("div",{className:Ue(cr.adSlot,cr["adSlot--left"]),children:i}),k.jsx("main",{className:cr.mainContent,children:n}),r&&k.jsx("aside",{className:cr.sidebarRight,children:r}),a&&k.jsx("div",{className:Ue(cr.adSlot,cr["adSlot--right"]),children:a})]});var i4={exports:{}};(()=>{var e={d:(o,f)=>{for(var d in f)e.o(f,d)&&!e.o(o,d)&&Object.defineProperty(o,d,{enumerable:!0,get:f[d]})},o:(o,f)=>Object.prototype.hasOwnProperty.call(o,f),r:o=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{default:()=>a});const i=y;function t(o,f){return function(d){if(Array.isArray(d))return d}(o)||function(d,u){var c=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(c!=null){var g,m,w=[],_=!0,C=!1;try{for(c=c.call(d);!(_=(g=c.next()).done)&&(w.push(g.value),!u||w.length!==u);_=!0);}catch(E){C=!0,m=E}finally{try{_||c.return==null||c.return()}finally{if(C)throw m}}return w}}(o,f)||function(d,u){if(d){if(typeof d=="string")return r(d,u);var c=Object.prototype.toString.call(d).slice(8,-1);return c==="Object"&&d.constructor&&(c=d.constructor.name),c==="Map"||c==="Set"?Array.from(d):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?r(d,u):void 0}}(o,f)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
856
856
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function r(o,f){(f==null||f>o.length)&&(f=o.length);for(var d=0,u=new Array(f);d<f;d++)u[d]=o[d];return u}const a=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:300,f=arguments.length>1?arguments[1]:void 0,d=(0,i.useState)(f),u=t(d,2),c=u[0],g=u[1];return(0,i.useEffect)(function(){var m=function(){var w=window.screen.height-o>window.visualViewport.height;c!=w&&g(w)};return typeof visualViewport<"u"&&window.visualViewport.addEventListener("resize",m),function(){typeof visualViewport<"u"&&window.visualViewport.removeEventListener("resize",m)}},[]),c};i4.exports=n})();var lZ=i4.exports;const fZ=Kr(lZ),dZ="_mobileLayout_xjah2_120",uZ="_mobileLayoutHeader_xjah2_125",cZ="_mobileLayoutMain_xjah2_133",hZ="_mobileLayoutMainWithFooter_xjah2_140",gZ="_mobileLayoutActionButton_xjah2_143",mZ="_mobileLayoutFooter_xjah2_150",ns={mobileLayout:dZ,mobileLayoutHeader:uZ,mobileLayoutMain:cZ,mobileLayoutMainWithFooter:hZ,mobileLayoutActionButton:gZ,mobileLayoutFooter:mZ},t4=({action:e,banner:n,children:i,footer:t,header:r,showFooter:a=!0})=>{const o=fZ();return k.jsxs("section",{className:ns.mobileLayout,children:[k.jsx("header",{className:ns.mobileLayoutHeader,children:r}),k.jsxs("main",{className:Ue(ns.mobileLayoutMain,{[ns.mobileLayoutMainWithFooter]:a}),tabIndex:0,children:[n,i]}),a&&k.jsxs("footer",{className:ns.mobileLayoutFooter,children:[e&&!o&&k.jsx("div",{className:ns.mobileLayoutActionButton,children:e}),t]})]})},pZ="_loadingSpinnerContainer_55hqs_120",vZ={loadingSpinnerContainer:pZ},kZ=({children:e,desktop:n,keepLoading:i,mobile:t})=>{const[r,a]=y.useState(0),o=()=>{a(window.innerWidth)};return y.useEffect(()=>(o(),window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}),[]),!r||i?k.jsx("div",{className:vZ.loadingSpinnerContainer,children:k.jsx(n4,{})}):r<800?k.jsx(t4,{...t,children:e}):k.jsx(oZ,{...n,children:e})};var wZ=_Z;function _Z(e){if(e)throw e}/*!
857
857
  * Determine if an object is a Buffer
858
858
  *
package/index.mjs CHANGED
@@ -63374,7 +63374,7 @@ const tue = ({
63374
63374
  group: "group",
63375
63375
  marketplace: "marketplace",
63376
63376
  post: "post"
63377
- }, vZ = "_root_17i32_120", kZ = "_root__list_17i32_125", _Z = "_root__itemCta_17i32_135", wZ = "_root__item_17i32_135", xo = {
63377
+ }, vZ = "_root_19omr_120", kZ = "_root__list_19omr_125", _Z = "_root__itemCta_19omr_135", wZ = "_root__item_19omr_135", xo = {
63378
63378
  root: vZ,
63379
63379
  root__list: kZ,
63380
63380
  root__itemCta: _Z,
@@ -63396,12 +63396,12 @@ const tue = ({
63396
63396
  let t = [];
63397
63397
  if (!e.length)
63398
63398
  return [[]];
63399
- const r = n ? n.filter((m) => Number(m.block) >= 0) : [];
63400
- let a = Array(i).fill(null), o = 0, f = 0, d = 1;
63399
+ const r = n ? n.filter((m) => Number(m == null ? void 0 : m.position) >= 0) : [];
63400
+ let a = Array(i).fill(null), o = 0, f = 0, d = 0;
63401
63401
  const u = () => {
63402
63402
  let m = 0;
63403
63403
  r.forEach((_) => {
63404
- _.block === d && (a.splice(_.position, 1, _), m += 1);
63404
+ _.block === d && (a.splice(_ == null ? void 0 : _.position, 1, _), m += 1);
63405
63405
  }), o = m;
63406
63406
  };
63407
63407
  r.length && u();
@@ -63425,9 +63425,16 @@ const tue = ({
63425
63425
  a.filter((w) => w != null)
63426
63426
  ), a = Array(i).fill(null), o = 0, f = 0, d += 1, r.length && u()), g(m + 1, _);
63427
63427
  };
63428
- return t = g(), n && n.length >= 0 && n.sort((m, _) => m.position - _.position).forEach((m) => {
63429
- !m.block && t.length >= m.position && t.splice(m.position, 0, m);
63430
- }), t;
63428
+ return t = g(), n && n.length >= 0 && (t = n.sort((m, _) => m.block - _.block).filter((m) => (m == null ? void 0 : m.position) == null).reduce(
63429
+ (m, _, w) => {
63430
+ if (t.length >= _.block) {
63431
+ const S = _.block + w + 1;
63432
+ return [...m.slice(0, S), _, ...m.slice(S)];
63433
+ }
63434
+ return m;
63435
+ },
63436
+ [...t]
63437
+ )), t;
63431
63438
  }, SZ = (e) => e ? new Intl.NumberFormat("de-DE", {
63432
63439
  currency: "EUR",
63433
63440
  maximumFractionDigits: 0,
@@ -12,11 +12,13 @@ export interface FeedItems {
12
12
  is_bookmarked: boolean;
13
13
  };
14
14
  }
15
+ declare const ALLOWED_POSITIONS: readonly [0, 1, 2, 3, 4, 5];
16
+ type Position = (typeof ALLOWED_POSITIONS)[number];
15
17
  export interface AdItem {
16
- block?: number;
18
+ block: number;
17
19
  content: React.ReactNode;
18
20
  id: string;
19
- position: number;
21
+ position?: Position;
20
22
  type?: string;
21
23
  }
22
24
  export interface GridFeedProps {
@@ -28,3 +30,4 @@ export interface GridFeedProps {
28
30
  export type ChunkItem = number | AdItem;
29
31
  export type ResultType = Array<ChunkItem[] | AdItem>;
30
32
  export type GridFeedMarketplaceItem = MarketplaceItemCardlessTypes | AdItem;
33
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodhood-web/nebenan-base",
3
- "version": "3.0.0-development.91",
3
+ "version": "3.0.0-development.92",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "repository": "https://github.com/good-hood-gmbh/goodhood-web",