import{g as m}from"./apexcharts.js";var _={};(function(b){(function(){var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function l(t){return k(w(t),arguments)}function x(t,a){return l.apply(null,[t].concat(a||[]))}function k(t,a){var r=1,c=t.length,e,p="",o,s,n,f,y,d,h,u;for(o=0;o<c;o++)if(typeof t[o]=="string")p+=t[o];else if(typeof t[o]=="object"){if(n=t[o],n.keys)for(e=a[r],s=0;s<n.keys.length;s++){if(e==null)throw new Error(l('[sprintf] Cannot access property "%s" of undefined value "%s"',n.keys[s],n.keys[s-1]));e=e[n.keys[s]]}else n.param_no?e=a[n.param_no]:e=a[r++];if(i.not_type.test(n.type)&&i.not_primitive.test(n.type)&&e instanceof Function&&(e=e()),i.numeric_arg.test(n.type)&&typeof e!="number"&&isNaN(e))throw new TypeError(l("[sprintf] expecting number but found %T",e));switch(i.number.test(n.type)&&(h=e>=0),n.type){case"b":e=parseInt(e,10).toString(2);break;case"c":e=String.fromCharCode(parseInt(e,10));break;case"d":case"i":e=parseInt(e,10);break;case"j":e=JSON.stringify(e,null,n.width?parseInt(n.width):0);break;case"e":e=n.precision?parseFloat(e).toExponential(n.precision):parseFloat(e).toExponential();break;case"f":e=n.precision?parseFloat(e).toFixed(n.precision):parseFloat(e);break;case"g":e=n.precision?String(Number(e.toPrecision(n.precision))):parseFloat(e);break;case"o":e=(parseInt(e,10)>>>0).toString(8);break;case"s":e=String(e),e=n.precision?e.substring(0,n.precision):e;break;case"t":e=String(!!e),e=n.precision?e.substring(0,n.precision):e;break;case"T":e=Object.prototype.toString.call(e).slice(8,-1).toLowerCase(),e=n.precision?e.substring(0,n.precision):e;break;case"u":e=parseInt(e,10)>>>0;break;case"v":e=e.valueOf(),e=n.precision?e.substring(0,n.precision):e;break;case"x":e=(parseInt(e,10)>>>0).toString(16);break;case"X":e=(parseInt(e,10)>>>0).toString(16).toUpperCase();break}i.json.test(n.type)?p+=e:(i.number.test(n.type)&&(!h||n.sign)?(u=h?"+":"-",e=e.toString().replace(i.sign,"")):u="",y=n.pad_char?n.pad_char==="0"?"0":n.pad_char.charAt(1):" ",d=n.width-(u+e).length,f=n.width&&d>0?y.repeat(d):"",p+=n.align?u+e+f:y==="0"?u+f+e:f+u+e)}return p}var g=Object.create(null);function w(t){if(g[t])return g[t];for(var a=t,r,c=[],e=0;a;){if((r=i.text.exec(a))!==null)c.push(r[0]);else if((r=i.modulo.exec(a))!==null)c.push("%");else if((r=i.placeholder.exec(a))!==null){if(r[2]){e|=1;var p=[],o=r[2],s=[];if((s=i.key.exec(o))!==null)for(p.push(s[1]);(o=o.substring(s[0].length))!=="";)if((s=i.key_access.exec(o))!==null)p.push(s[1]);else if((s=i.index_access.exec(o))!==null)p.push(s[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");r[2]=p}else e|=2;if(e===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");c.push({placeholder:r[0],param_no:r[1],keys:r[2],sign:r[3],pad_char:r[4],align:r[5],width:r[6],precision:r[7],type:r[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");a=a.substring(r[0].length)}return g[t]=c}b.sprintf=l,b.vsprintf=x,typeof window<"u"&&(window.sprintf=l,window.vsprintf=x)})()})(_);const S=m(_);export{S as s};
