import*as StringUtilities from"./string-utilities.js";class LocalizedStringTag{}export const LocalizedEmptyString="";export function UIString(t,...i){return StringUtilities.vsprintf(localize(t),Array.prototype.slice.call(arguments,1))}export function localize(t){return t}export class UIStringFormat{constructor(t){this.localizedFormat=localize(t),this.tokenizedFormat=StringUtilities.tokenizeFormatString(this.localizedFormat,StringUtilities.standardFormatters)}format(...t){return StringUtilities.format(this.localizedFormat,arguments,StringUtilities.standardFormatters,"",((t,i)=>t+i),this.tokenizedFormat).formattedResult}}const SUBSTITUTION_STRINGS=new WeakMap;export function ls(t,...i){if("string"===typeof t)return t;let r=SUBSTITUTION_STRINGS.get(t);return r||(r=t.join("%s"),SUBSTITUTION_STRINGS.set(t,r)),UIString(r,...i)}