{
  "version": 3,
  "sources": ["../../src/middlewares/user-locale.ts"],
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { addQueryArgs, hasQueryArg } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport type { APIFetchMiddleware } from '../types';\n\nconst userLocaleMiddleware: APIFetchMiddleware = ( options, next ) => {\n\tif (\n\t\ttypeof options.url === 'string' &&\n\t\t! hasQueryArg( options.url, '_locale' )\n\t) {\n\t\toptions.url = addQueryArgs( options.url, { _locale: 'user' } );\n\t}\n\n\tif (\n\t\ttypeof options.path === 'string' &&\n\t\t! hasQueryArg( options.path, '_locale' )\n\t) {\n\t\toptions.path = addQueryArgs( options.path, { _locale: 'user' } );\n\t}\n\n\treturn next( options );\n};\n\nexport default userLocaleMiddleware;\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,iBAA0C;AAO1C,IAAM,uBAA2C,CAAE,SAAS,SAAU;AACrE,MACC,OAAO,QAAQ,QAAQ,YACvB,KAAE,wBAAa,QAAQ,KAAK,SAAU,GACrC;AACD,YAAQ,UAAM,yBAAc,QAAQ,KAAK,EAAE,SAAS,OAAO,CAAE;AAAA,EAC9D;AAEA,MACC,OAAO,QAAQ,SAAS,YACxB,KAAE,wBAAa,QAAQ,MAAM,SAAU,GACtC;AACD,YAAQ,WAAO,yBAAc,QAAQ,MAAM,EAAE,SAAS,OAAO,CAAE;AAAA,EAChE;AAEA,SAAO,KAAM,OAAQ;AACtB;AAEA,IAAO,sBAAQ;",
  "names": []
}
