Build 589089stable
Module 331188
1,007 characters · in 514.d733764d42c2ab66.jsDependencies
Source Raw
function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dataFormatterCache=void 0,t.dataFormatterCache=new class{constructor(){this.dateTime=new Map,this.duration=new Map,this.list=new Map,this.number=new Map,this.pluralRules=new Map,this.relativeTime=new Map}getDateTimeFormatter(...e){return this._getCached(this.dateTime,e,e=>new Intl.DateTimeFormat(...e))}getDurationFormatter(...e){return this._getCached(this.duration,e,e=>new Intl.DurationFormat(...e))}getListFormatter(...e){return this._getCached(this.list,e,e=>new Intl.ListFormat(...e))}getNumberFormatter(...e){return this._getCached(this.number,e,e=>new Intl.NumberFormat(...e))}getPluralRules(...e){return this._getCached(this.pluralRules,e,e=>new Intl.PluralRules(...e))}getRelativeTimeFormatter(...e){return this._getCached(this.relativeTime,e,e=>new Intl.RelativeTimeFormat(...e))}_getCached(e,t,n){let r=this._getKey(t),i=e.get(r);if(i)return i;let a=n(t);return e.set(r,a),a}_getKey(...e){return JSON.stringify(e)}}}