import{t as e}from"../../shared/js/rolldown-runtime.WmLfqUcM.js";var t=e((e=>{e.buildFormatLongFn=t;function t(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}})),n=e((e=>{e.buildLocalizeFn=t;function t(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}})),r=e((e=>{e.buildMatchFn=t;function t(e){return(t,i={})=>{let a=i.width,o=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;let c=s[0],l=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?r(l,e=>e.test(c)):n(l,e=>e.test(c)),d;d=e.valueCallback?e.valueCallback(u):u,d=i.valueCallback?i.valueCallback(d):d;let f=t.slice(c.length);return{value:d,rest:f}}}function n(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function r(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}})),i=e((e=>{e.buildMatchPatternFn=t;function t(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}}));export{t as i,r as n,n as r,i as t};