import{d as p,s as i}from"./index.nsvc8vqf.js";import{c as f}from"./postSlug.cemx0kwk.js";import{g as m}from"./runtime-dom.esm-bundler.h3clfjuw.js";const A=({separator:s})=>{const n=m(s);return{parseTags:e=>{const r=p();return!e||!r.tags?e:(r.tags.forEach(a=>{if(a.id==="custom_field"){const o=new RegExp(`#${a.id}-([a-zA-Z0-9_-]+)`),c=e.match(o);c&&c[1]&&(e=e.replace(o,f(c[1])));return}if(a.id==="tax_name"){const o=new RegExp(`#${a.id}-([a-zA-Z0-9_-]+)`,"g");e=e.replace(o,`[${a.name} - $1]`);return}const t=new RegExp(`#${a.id}(?![a-zA-Z0-9_])`,"g");a.id==="separator_sa"&&n.value!==void 0&&(e=e.replace(t,n.value));const u=e.match(t),l=r.liveTags[a.id]??a.value;u&&(e=e.replace(t,"%|%"+l))}),e=e.replace(/%\|%/g,""),i(e))},separator:n}};export{A as u};
