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