import{t as $,a as f}from"./DW82XzVD.js";import{p as g,a as v,c as y,r as w}from"./DNoLdQ8h.js";import{h as b}from"./CsmhBHkB.js";function j(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var p,h;function _(){if(h)return p;h=1;var i={code:({data:t})=>`
${t.code}
`,embed:({data:t})=>{const r=t.service;return r==="vimeo"?``:r==="youtube"?``:(console.error("[editorjs-html]: Only Youtube & Vimeo embeds are available by default. Write your own embed parser for other options."),"")},header:({data:t})=>`${t.text}`,image:({data:t})=>{var l;const r=t.caption?t.caption:"Image";return`${r}`},list:({data:t})=>{const r=t.style==="unordered"?"ul":"ol",l=(c,o)=>{const n=c.map(a=>{var s;if(!a.content&&!a.items)return`
  • ${a}
  • `;let e="";return(s=a.items)!=null&&s.length&&(e=l(a.items,o)),a.content?`
  • ${a.content}${e}
  • `:void 0});return`<${o}>${n.join("")}`};return l(t.items,r)},paragraph:({data:t})=>{const r=t.alignment||t.align;return r?`

    ${t.text}

    `:`

    ${t.text}

    `},quote:({data:t})=>`
    ${t.text}
    - ${t.caption}`,delimiter:({data:t})=>"
    "};return p=(t={},r={strict:!1})=>{const l={...i,...t};return{parse:c=>(({blocks:o},n,a)=>o.reduce((e,s)=>{if(s.type in n)return e+n[s.type](s);const d=`[editorjs-html]: Parser function for ${s.type} does not exist`;if(a.strict)throw new Error(d);return console.error(d),e},""))(c,l,r),parseBlock:c=>((o,n,a)=>{if(o.type in n)return n[o.type](o);const e=`[editorjs-html]: Parser function for ${o.type} does not exist`;if(a.strict)throw new Error(e);console.error(e)})(c,l,r)}},p}var x=_();const E=j(x);var P=$("
    ");function L(i,t){g(t,!0);const r={paragraph:e=>`

    ${e.data.text}

    `,header:e=>`${e.data.text}`,list:e=>{const s=e.data.style==="ordered"?"ol":"ul",d=e.data.items.map(u=>`
  • ${u}
  • `).join("");return`<${s} class="list">${d}`},image:e=>`${e.data.caption}`,centeredParagraph:e=>`

    ${e.data.text}

    `},l=e=>e.replace(/]*>(.*?)<\/a>/g,(s,d,u)=>{const m=d.startsWith("https://fundacja-wroclaw.org")?"_self":"_blank";return`${u}`}),c=E(r),o=l(c.parse(t.value));var n=P(),a=y(n);b(a,()=>o),w(n),f(i,n),v()}export{L as C};