import{tickStep as K}from"/-/d3-array@v2.12.1-Ilh7e293asl3yQWpnFdl/dist=es2020,mode=imports,min/optimized/d3-array.js";import{formatSpecifier as N,precisionFixed as X,precisionRound as Z,precisionPrefix as G,formatLocale as J,format as V,formatPrefix as $}from"/-/d3-format@v2.0.0-LHjsNQf9R9i81XmXePB9/dist=es2020,mode=imports,min/optimized/d3-format.js";import{SECONDS as p,MINUTES as D,HOURS as I,DATE as y,WEEK as M,MONTH as S,QUARTER as k,YEAR as v,MILLISECONDS as _,DAY as tt,timeInterval as et,utcInterval as rt}from"/-/vega-time@v2.0.4-Ylq8WGKplJoZYQPOPvwD/dist=es2020,mode=imports,min/optimized/vega-time.js";import{isString as O,extend as ot,error as E,isObject as it}from"/-/vega-util@v1.17.0-uRskU0IBL2vWCP4Va8OC/dist=es2020,mode=imports,min/optimized/vega-util.js";import{timeFormat as nt,timeParse as mt,utcFormat as at,utcParse as ut,timeFormatLocale as st}from"/-/d3-time-format@v3.0.0-IRDcxbKsu7MvYYkQhe0L/dist=es2020,mode=imports,min/optimized/d3-time-format.js";function f(t){const r={};return e=>r[e]||(r[e]=t(e))}function ct(t,r){return e=>{const o=t(e),n=o.indexOf(r);if(n<0)return o;let a=ft(o,n);const m=a<o.length?o.slice(a):"";for(;--a>n;)if(o[a]!=="0"){++a;break}return o.slice(0,a)+m}}function ft(t,r){let e=t.lastIndexOf("e"),o;if(e>0)return e;for(e=t.length;--e>r;)if(o=t.charCodeAt(e),o>=48&&o<=57)return e+1}function R(t){const r=f(t.format),e=t.formatPrefix;return{format:r,formatPrefix:e,formatFloat(o){const n=N(o||",");if(n.precision==null){n.precision=12;switch(n.type){case"%":n.precision-=2;break;case"e":n.precision-=1;break}return ct(r(n),r(".1f")(1)[1])}else return r(n)},formatSpan(o,n,a,m){m=N(m??",f");const s=K(o,n,a),c=Math.max(Math.abs(o),Math.abs(n));let u;if(m.precision==null)switch(m.type){case"s":return isNaN(u=G(s,c))||(m.precision=u),e(m,c);case"":case"e":case"g":case"p":case"r":{isNaN(u=Z(s,c))||(m.precision=u-(m.type==="e"));break}case"f":case"%":{isNaN(u=X(s))||(m.precision=u-(m.type==="%")*2);break}}return r(m)}}}let L;F();function F(){return L=R({format:V,formatPrefix:$})}function h(t){return R(J(t))}function l(t){return arguments.length?L=h(t):L}function j(t,r,e){e=e||{},it(e)||E("Invalid time multi-format specifier: ".concat(e));const o=r(p),n=r(D),a=r(I),m=r(y),s=r(M),c=r(S),u=r(k),Y=r(v),T=t(e[_]||".%L"),A=t(e[p]||":%S"),C=t(e[D]||"%I:%M"),Q=t(e[I]||"%I %p"),B=t(e[y]||e[tt]||"%a %d"),H=t(e[M]||"%b %d"),U=t(e[S]||"%B"),W=t(e[k]||"%B"),q=t(e[v]||"%Y");return i=>(o(i)<i?T:n(i)<i?A:a(i)<i?C:m(i)<i?Q:c(i)<i?s(i)<i?B:H:Y(i)<i?u(i)<i?U:W:q)(i)}function w(t){const r=f(t.format),e=f(t.utcFormat);return{timeFormat:o=>O(o)?r(o):j(r,et,o),utcFormat:o=>O(o)?e(o):j(e,rt,o),timeParse:f(t.parse),utcParse:f(t.utcParse)}}let g;b();function b(){return g=w({format:nt,parse:mt,utcFormat:at,utcParse:ut})}function x(t){return w(st(t))}function d(t){return arguments.length?g=x(t):g}const P=(t,r)=>ot({},t,r);function lt(t,r){const e=t?h(t):l(),o=r?x(r):d();return P(e,o)}function z(t,r){const e=arguments.length;return e&&e!==2&&E("defaultLocale expects either zero or two arguments."),e?P(l(t),d(r)):P(l(),d())}function dt(){return F(),b(),z()}export{z as defaultLocale,lt as locale,l as numberFormatDefaultLocale,h as numberFormatLocale,dt as resetDefaultLocale,F as resetNumberFormatDefaultLocale,b as resetTimeFormatDefaultLocale,d as timeFormatDefaultLocale,x as timeFormatLocale};export default null;
