"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react/jsx-runtime");require("react");const d=require("string-template"),x=/(\+?\%)[\(]([A-z0-9,.,-]+)\)/gi,y=/(\+?\#)[\(]([A-z0-9,.,-]+)\)/gi,v=/(\+?\#C)[\(]([A-z0-9,.,-]+)\)/gi,i=(n,e,r,t,m,A)=>{let o,s=e;for(;(o=n.exec(e))!==null;){const p=o[2],a=o[1],f=((c,g=2)=>m.formatNumber(t?c/100:c,{maximumFractionDigits:g,...r,signDisplay:a&&a.startsWith("+")?"never":"auto"})).apply(void 0,p.split(","));s=s.replaceAll(o[0],f)}return s},u=(n,e,r)=>{let t=d(n,{...e,...e.meta}).replace(/(?:\r\n|\r|\n)/g,"<br>");return t=i(x,t,{style:"percent"},!0,r),t=i(y,t,{style:"decimal"},!1,r),t=i(v,t,{notation:"compact"},!1,r),t},j=({tooltip:n,data:e,intl:r})=>{if(e){const t=u(n,e,r);return l.jsx("div",{dangerouslySetInnerHTML:{__html:t}})}else return l.jsx("div",{})};exports.default=j;exports.formatContent=u;
