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