{
  "version": 3,
  "sources": ["../src/default-i18n.ts"],
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { defaultHooks } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport { createI18n } from './create-i18n';\nimport {\n\tLocaleData,\n\tSubscribeCallback,\n\tTransformedText,\n\tUnsubscribeCallback,\n} from './types';\n\nconst i18n = createI18n( undefined, undefined, defaultHooks );\n\n/**\n * Default, singleton instance of `I18n`.\n */\nexport default i18n;\n\n/*\n * Comments in this file are duplicated from ./i18n due to\n * https://github.com/WordPress/gutenberg/pull/20318#issuecomment-590837722\n */\n\n/**\n * Returns locale data by domain in a Jed-formatted JSON object shape.\n *\n * @see http://messageformat.github.io/Jed/\n *\n * @param { string | undefined } [domain] Domain for which to get the data.\n * @return { LocaleData } Locale data.\n */\nexport const getLocaleData = i18n.getLocaleData.bind( i18n );\n\n/**\n * Merges locale data into the Tannin instance by domain. Accepts data in a\n * Jed-formatted JSON object shape.\n *\n * @see http://messageformat.github.io/Jed/\n *\n * @param {LocaleData }        [data]   Locale data configuration.\n * @param {string | undefined} [domain] Domain for which configuration applies.\n */\nexport const setLocaleData = i18n.setLocaleData.bind( i18n );\n\n/**\n * Resets all current Tannin instance locale data and sets the specified\n * locale data for the domain. Accepts data in a Jed-formatted JSON object shape.\n *\n * @see http://messageformat.github.io/Jed/\n *\n * @param {LocaleData}         [data]   Locale data configuration.\n * @param {string | undefined} [domain] Domain for which configuration applies.\n */\nexport const resetLocaleData = i18n.resetLocaleData.bind( i18n );\n\n/**\n * Subscribes to changes of locale data\n *\n * @param {SubscribeCallback} callback Subscription callback\n * @return {UnsubscribeCallback} Unsubscribe callback\n */\nexport const subscribe = i18n.subscribe.bind( i18n );\n\n/**\n * Retrieve the translation of text.\n *\n * @see https://developer.wordpress.org/reference/functions/__/\n *\n * @template {string} Text\n *\n * @param {Text}               text   Text to translate.\n * @param {string | undefined} domain Domain to retrieve the translated text.\n *\n * @return {TransformedText<Text>} Translated text.\n */\nexport const __ = i18n.__.bind( i18n );\n\n/**\n * Retrieve translated string with gettext context.\n *\n * @see https://developer.wordpress.org/reference/functions/_x/\n *\n * @template {string} Text\n *\n * @param {Text}               text    Text to translate.\n * @param {string}             context Context information for the translators.\n * @param {string | undefined} domain  Domain to retrieve the translated text.\n *\n * @return {TransformedText<Text>} Translated context string without pipe.\n */\nexport const _x = i18n._x.bind( i18n );\n\n/**\n * Translates and retrieves the singular or plural form based on the supplied\n * number.\n *\n * @see https://developer.wordpress.org/reference/functions/_n/\n *\n * @template {string} Single\n * @template {string} Plural\n *\n * @param {Single}             single The text to be used if the number is singular.\n * @param {Plural}             plural The text to be used if the number is plural.\n * @param {number}             number The number to compare against to use either the\n *                                    singular or plural form.\n * @param {string | undefined} domain Domain to retrieve the translated text.\n *\n * @return {TransformedText<Single | Plural>} The translated singular or plural form.\n */\nexport const _n = i18n._n.bind( i18n );\n\n/**\n * Translates and retrieves the singular or plural form based on the supplied\n * number, with gettext context.\n *\n * @see https://developer.wordpress.org/reference/functions/_nx/\n *\n * @template {string} Single\n * @template {string} Plural\n * @param {Single}             single   The text to be used if the number is singular.\n *\n * @param {Single}             single   The text to be used if the number is singular.\n * @param {Plural}             plural   The text to be used if the number is plural.\n * @param {number}             number   The number to compare against to use either the\n *                                      singular or plural form.\n * @param {string}             context  Context information for the translators.\n * @param {string | undefined} [domain] Domain to retrieve the translated text.\n *\n * @return {TransformedText<Single | Plural>} The translated singular or plural form.\n */\nexport const _nx = i18n._nx.bind( i18n );\n\n/**\n * Check if current locale is RTL.\n *\n * **RTL (Right To Left)** is a locale property indicating that text is written from right to left.\n * For example, the `he` locale (for Hebrew) specifies right-to-left. Arabic (ar) is another common\n * language written RTL. The opposite of RTL, LTR (Left To Right) is used in other languages,\n * including English (`en`, `en-US`, `en-GB`, etc.), Spanish (`es`), and French (`fr`).\n *\n * @return {boolean} Whether locale is RTL.\n */\nexport const isRTL = i18n.isRTL.bind( i18n );\n\n/**\n * Check if there is a translation for a given string (in singular form).\n *\n * @param {string} single  Singular form of the string to look up.\n * @param {string} context Context information for the translators.\n * @param {string} domain  Domain to retrieve the translated text.\n *\n * @return {boolean} Whether the translation exists or not.\n */\nexport const hasTranslation = i18n.hasTranslation.bind( i18n );\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,mBAA6B;AAK7B,yBAA2B;AAQ3B,IAAM,WAAO,+BAAY,QAAW,QAAW,yBAAa;AAK5D,IAAO,uBAAQ;AAeR,IAAM,gBAAgB,KAAK,cAAc,KAAM,IAAK;AAWpD,IAAM,gBAAgB,KAAK,cAAc,KAAM,IAAK;AAWpD,IAAM,kBAAkB,KAAK,gBAAgB,KAAM,IAAK;AAQxD,IAAM,YAAY,KAAK,UAAU,KAAM,IAAK;AAc5C,IAAM,KAAK,KAAK,GAAG,KAAM,IAAK;AAe9B,IAAM,KAAK,KAAK,GAAG,KAAM,IAAK;AAmB9B,IAAM,KAAK,KAAK,GAAG,KAAM,IAAK;AAqB9B,IAAM,MAAM,KAAK,IAAI,KAAM,IAAK;AAYhC,IAAM,QAAQ,KAAK,MAAM,KAAM,IAAK;AAWpC,IAAM,iBAAiB,KAAK,eAAe,KAAM,IAAK;",
  "names": []
}
