import{h as g,i as x}from"./chunk-BRJ3RGGT.js";import{c as i,d as T}from"./chunk-E7BKRPHP.js";import{f as h}from"./chunk-PGS4AHIT.js";var a,S=h(()=>{"use strict";a=(()=>{class l{static{this.setParam=null}static{this.sys=null}static{this.locale="sl-SI"}static{this.formatting={datetime:{date:"dd.MM.yyyy",dateTime:"dd.MM.yyyy HH:mm"},numeral:{currencyCode:"EUR",decimalSeparator:",",thousandsSeparator:"."}}}}return l})()});var P,F=h(()=>{"use strict";x();T();S();P=class l{static currency(t,r,e=a.sys?.defaultDecimalPlacesPrice||2){if(t===void 0&&(t=0),!i.isSet(r))return l.decimal(t,e);let n={style:"currency",currency:r,minimumFractionDigits:e??a.sys?.defaultDecimalPlacesPrice,maximumFractionDigits:e??a.sys?.defaultDecimalPlacesPrice};return new Intl.NumberFormat(a.locale,n).format(t)}static decimal(t,r=a.sys?.defaultDecimalPlacesPrice||2,e=a.formatting.numeral.decimalSeparator,n=a.formatting.numeral.thousandsSeparator){let s=i.numToStr(i.isNumber(t)?t:i.strToFloat(t));if(i.isEmpty(s)&&(s="0"),s.indexOf(".")===-1&&i.isSet(r)&&r>0)s+=".0";else if(r===0)return i.isNumber(t)?i.numToStr(t):i.numToStr(i.strToNum(t));let d=s.split("."),m=i.zeroPad(d[1]||"",r);s=`${d[0]}.${m}`;let c=s.indexOf(".");return c>-1&&e!=="."?(s=s.replace(".",e),s.substring(0,c+(r||0)+1)):s}static thousands(t,r=a.formatting.numeral.thousandsSeparator){let e=t.indexOf("-")===0,n=t.indexOf(".")>-1,s=n?t.indexOf("."):t.indexOf(",");n?r=",":!n&&r===","&&(r=".");let d=e?1:0,m=t.substring(d,s),c=d,y="";for(let o=0;o<m.length;o++){if(m[o]!=="0"){c=o;break}y+="0"}let D=c>0?c-1:0,f="";for(let o=m.length-1;o>=c;o--){let p=m[o],u=m.length-o+D;f=(u>c&&u<m.length&&u%3===0?r:"")+p+f}return(e?"-":"")+(f!="0"?y:"")+f+t.substring(s)}static formatNumberToThousands(t,r=0,e=a.formatting.numeral.thousandsSeparator){if(t==null||t==="")return"0";let n=typeof t=="string"?parseFloat(t):t;return isNaN(n)?"0":n.toLocaleString(a.locale||"en-US",{minimumFractionDigits:r,maximumFractionDigits:r})}static date(t,r=a.formatting.datetime.date,e="MMM d yyyy hh:mma"){return this.datetime(t,r,e)}static dateFromIso(t,r=a.formatting.datetime.date){if(!i.isSet(t)||i.isString(t)&&t.length===0)return"";let e=t instanceof Date?t.toISOString():i.collapseWhitespace(t),n=g.fromISO(e);return n.isValid?n.toFormat(r):(console.error("Invalid date format"),e)}static datetime(t,r,e="MMM d yyyy hh:mma"){if(i.notSet(t))return"";let n=g.fromFormat(i.collapseWhitespace(t),e);return n.isValid?n.toFormat(r):(console.error("Invalid date format"),t)}}});export{a,S as b,P as c,F as d};
