react-intl 5.10.18 → 5.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -38,4 +38,5 @@ export { default as FormattedRelativeTime } from './src/components/relative';
38
38
  export { default as FormattedPlural } from './src/components/plural';
39
39
  export { default as FormattedMessage } from './src/components/message';
40
40
  export { default as FormattedDateTimeRange } from './src/components/dateTimeRange';
41
+ export { MessageFormatElement } from 'intl-messageformat-parser';
41
42
  //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/react-intl/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAC,qBAAqB,EAAC,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAC,mBAAmB,EAAC,MAAM,6BAA6B,CAAC;AAChE,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,aAAa,CAAC;AAClD,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,cAAc,EACd,wBAAwB,EACxB,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,aAAa,IAAI,kBAAkB,EACnC,SAAS,IAAI,cAAc,GAC5B,MAAM,gBAAgB,CAAC;AAExB,wBAAgB,cAAc,CAC5B,CAAC,SAAS,MAAM,GAAG,EACnB,CAAC,GAAG,iBAAiB,EACrB,CAAC,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AO,IAAI,qBAAqB,EAAC,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAC,OAAO,IAAI,sBAAsB,EAAC,MAAM,gCAAgC,CAAC;AACjF,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC"}
package/lib/index.d.ts CHANGED
@@ -38,4 +38,5 @@ export { default as FormattedRelativeTime } from './src/components/relative';
38
38
  export { default as FormattedPlural } from './src/components/plural';
39
39
  export { default as FormattedMessage } from './src/components/message';
40
40
  export { default as FormattedDateTimeRange } from './src/components/dateTimeRange';
41
+ export { MessageFormatElement } from 'intl-messageformat-parser';
41
42
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/react-intl/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAC,qBAAqB,EAAC,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAC,mBAAmB,EAAC,MAAM,6BAA6B,CAAC;AAChE,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,aAAa,CAAC;AAClD,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,cAAc,EACd,wBAAwB,EACxB,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,uBA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,GAAG,EAAE,IAAI,CAAC,kBAAkB,EAAE,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;CACrE,CACoD,CAAC;AAExD,OAAO,EAAC,oBAAoB,EAAC,MAAM,2CAA2C,CAAC;AAC/E,OAAO,EAAC,OAAO,IAAI,qBAAqB,EAAC,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAC,OAAO,IAAI,sBAAsB,EAAC,MAAM,gCAAgC,CAAC;AACjF,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC"}
@@ -1,10 +1,11 @@
1
1
  import * as React from 'react';
2
- import type { PrimitiveType, FormatXMLElementFn } from 'intl-messageformat';
2
+ import type { PrimitiveType, FormatXMLElementFn, Options as IntlMessageFormatOptions } from 'intl-messageformat';
3
3
  import { MessageDescriptor } from '@formatjs/intl';
4
4
  export interface Props<V extends Record<string, any> = Record<string, React.ReactNode>> extends MessageDescriptor {
5
5
  values?: V;
6
6
  tagName?: React.ElementType<any>;
7
7
  children?(...nodes: React.ReactNodeArray): React.ReactNode;
8
+ ignoreTag?: IntlMessageFormatOptions['ignoreTag'];
8
9
  }
9
10
  declare class FormattedMessage<V extends Record<string, any> = Record<string, PrimitiveType | React.ReactElement | FormatXMLElementFn<React.ReactNode, React.ReactNode>>> extends React.Component<Props<V>> {
10
11
  static displayName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/react-intl/src/components/message.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,aAAa,EAAE,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAI1E,OAAO,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;AAIjD,MAAM,WAAW,KAAK,CACpB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAC/D,SAAQ,iBAAiB;IACzB,MAAM,CAAC,EAAE,CAAC,CAAC;IACX,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACjC,QAAQ,CAAC,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,cAAc,GAAG,KAAK,CAAC,SAAS,CAAC;CAC5D;AAED,cAAM,gBAAgB,CACpB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CACpC,MAAM,EACJ,aAAa,GACb,KAAK,CAAC,YAAY,GAClB,kBAAkB,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CACvD,CACD,SAAQ,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACjC,MAAM,CAAC,WAAW,SAAsB;IAExC,qBAAqB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO;IASnD,MAAM,IAAI,GAAG,CAAC,OAAO;CAqCtB;AAED,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/react-intl/src/components/message.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EAClB,OAAO,IAAI,wBAAwB,EACpC,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;AAIjD,MAAM,WAAW,KAAK,CACpB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAC/D,SAAQ,iBAAiB;IACzB,MAAM,CAAC,EAAE,CAAC,CAAC;IACX,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACjC,QAAQ,CAAC,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,cAAc,GAAG,KAAK,CAAC,SAAS,CAAC;IAC3D,SAAS,CAAC,EAAE,wBAAwB,CAAC,WAAW,CAAC,CAAC;CACnD;AAED,cAAM,gBAAgB,CACpB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CACpC,MAAM,EACJ,aAAa,GACb,KAAK,CAAC,YAAY,GAClB,kBAAkB,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CACvD,CACD,SAAQ,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACjC,MAAM,CAAC,WAAW,SAAsB;IAExC,qBAAqB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO;IASnD,MAAM,IAAI,GAAG,CAAC,OAAO;CAwCtB;AAED,eAAe,gBAAgB,CAAC"}
@@ -25,9 +25,11 @@ var FormattedMessage = /** @class */ (function (_super) {
25
25
  return (React.createElement(Context.Consumer, null, function (intl) {
26
26
  invariantIntlContext(intl);
27
27
  var formatMessage = intl.formatMessage, _a = intl.textComponent, Text = _a === void 0 ? React.Fragment : _a;
28
- var _b = _this.props, id = _b.id, description = _b.description, defaultMessage = _b.defaultMessage, values = _b.values, children = _b.children, _c = _b.tagName, Component = _c === void 0 ? Text : _c;
28
+ var _b = _this.props, id = _b.id, description = _b.description, defaultMessage = _b.defaultMessage, values = _b.values, children = _b.children, _c = _b.tagName, Component = _c === void 0 ? Text : _c, ignoreTag = _b.ignoreTag;
29
29
  var descriptor = { id: id, description: description, defaultMessage: defaultMessage };
30
- var nodes = formatMessage(descriptor, values);
30
+ var nodes = formatMessage(descriptor, values, {
31
+ ignoreTag: ignoreTag,
32
+ });
31
33
  if (!Array.isArray(nodes)) {
32
34
  nodes = [nodes];
33
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/react-intl/src/components/provider.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,mBAAmB,EAGpB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,UAAU,CAAC;AAC/C,OAAO,EAEL,SAAS,EAET,YAAY,EAEb,MAAM,gBAAgB,CAAC;AAWxB,UAAU,KAAK;IACb;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;OAIG;IACH,UAAU,EAAE,kBAAkB,CAAC;CAChC;AAED,oBAAY,kBAAkB,GAAG,IAAI,CACnC,UAAU,EACV,MAAM,OAAO,mBAAmB,CACjC,GACC,OAAO,CAAC,OAAO,mBAAmB,CAAC,CAAC;AA+DtC;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,YAAY,CACnC,KAAK,CAAC,SAAS,EACf,kBAAkB,EAClB,SAAS,CAkCV,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,KAAK,CAAC,aAAa,CAG3D,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,EAC3C,KAAK,CACN;IACC,MAAM,CAAC,WAAW,SAAkB;IACpC,MAAM,CAAC,YAAY,2HAAuB;IAC1C,OAAO,CAAC,KAAK,CAAgC;IAC7C,KAAK,EAAE,KAAK,CAIV;IAEF,MAAM,CAAC,wBAAwB,CAC7B,KAAK,EAAE,kBAAkB,EACzB,EAAC,UAAU,EAAE,KAAK,EAAC,EAAE,KAAK,GACzB,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI;IAWxB,MAAM,IAAI,GAAG,CAAC,OAAO;CAItB"}
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/react-intl/src/components/provider.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,mBAAmB,EAGpB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,UAAU,CAAC;AAC/C,OAAO,EAEL,SAAS,EAET,YAAY,EAEb,MAAM,gBAAgB,CAAC;AAWxB,UAAU,KAAK;IACb;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;OAIG;IACH,UAAU,EAAE,kBAAkB,CAAC;CAChC;AAED,oBAAY,kBAAkB,GAAG,IAAI,CACnC,UAAU,EACV,MAAM,OAAO,mBAAmB,CACjC,GACC,OAAO,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAiEtC;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,YAAY,CACnC,KAAK,CAAC,SAAS,EACf,kBAAkB,EAClB,SAAS,CAkCV,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,KAAK,CAAC,aAAa,CAG3D,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,EAC3C,KAAK,CACN;IACC,MAAM,CAAC,WAAW,SAAkB;IACpC,MAAM,CAAC,YAAY,2HAAuB;IAC1C,OAAO,CAAC,KAAK,CAAgC;IAC7C,KAAK,EAAE,KAAK,CAIV;IAEF,MAAM,CAAC,wBAAwB,CAC7B,KAAK,EAAE,kBAAkB,EACzB,EAAC,UAAU,EAAE,KAAK,EAAC,EAAE,KAAK,GACzB,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI;IAWxB,MAAM,IAAI,GAAG,CAAC,OAAO;CAItB"}
@@ -3,7 +3,7 @@
3
3
  * Copyrights licensed under the New BSD License.
4
4
  * See the accompanying LICENSE file for terms.
5
5
  */
6
- import { __assign, __extends, __rest } from "tslib";
6
+ import { __assign, __extends, __rest, __spreadArrays } from "tslib";
7
7
  import * as React from 'react';
8
8
  import { Provider } from './injectIntl';
9
9
  import { DEFAULT_INTL_CONFIG, invariantIntlContext, assignUniqueKeysToParts, } from '../utils';
@@ -38,8 +38,14 @@ function assignUniqueKeysToFormatXMLElementFnArgument(values) {
38
38
  }, {});
39
39
  }
40
40
  var formatMessage = function (config, formatters, descriptor, rawValues) {
41
+ var rest = [];
42
+ for (var _i = 4; _i < arguments.length; _i++) {
43
+ rest[_i - 4] = arguments[_i];
44
+ }
41
45
  var values = assignUniqueKeysToFormatXMLElementFnArgument(rawValues);
42
- var chunks = coreFormatMessage(config, formatters, descriptor, values);
46
+ var chunks = coreFormatMessage.apply(void 0, __spreadArrays([config,
47
+ formatters,
48
+ descriptor, values], rest));
43
49
  if (Array.isArray(chunks)) {
44
50
  return React.Children.toArray(chunks);
45
51
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-intl",
3
- "version": "5.10.18",
3
+ "version": "5.12.1",
4
4
  "description": "Internationalize React apps. This library provides React components and an API to format dates, numbers, and strings, including pluralization and handling translations.",
5
5
  "keywords": [
6
6
  "intl",
@@ -128,16 +128,16 @@
128
128
  "types": "index.d.ts",
129
129
  "sideEffects": false,
130
130
  "dependencies": {
131
- "@formatjs/ecma402-abstract": "1.5.1",
132
- "@formatjs/intl": "1.6.3",
133
- "@formatjs/intl-displaynames": "4.0.4",
134
- "@formatjs/intl-listformat": "5.0.4",
135
- "@formatjs/intl-relativetimeformat": "8.0.3",
131
+ "@formatjs/ecma402-abstract": "1.5.2",
132
+ "@formatjs/intl": "1.6.6",
133
+ "@formatjs/intl-displaynames": "4.0.5",
134
+ "@formatjs/intl-listformat": "5.0.5",
135
+ "@formatjs/intl-relativetimeformat": "8.0.4",
136
136
  "@types/hoist-non-react-statics": "^3.3.1",
137
137
  "fast-memoize": "^2.5.2",
138
138
  "hoist-non-react-statics": "^3.3.2",
139
- "intl-messageformat": "9.4.5",
140
- "intl-messageformat-parser": "6.3.0",
139
+ "intl-messageformat": "9.4.6",
140
+ "intl-messageformat-parser": "6.3.1",
141
141
  "shallow-equal": "^1.2.1",
142
142
  "tslib": "^2.0.1"
143
143
  },
@@ -2026,8 +2026,14 @@
2026
2026
  }, {});
2027
2027
  }
2028
2028
  var formatMessage$1 = function (config, formatters, descriptor, rawValues) {
2029
+ var rest = [];
2030
+ for (var _i = 4; _i < arguments.length; _i++) {
2031
+ rest[_i - 4] = arguments[_i];
2032
+ }
2029
2033
  var values = assignUniqueKeysToFormatXMLElementFnArgument(rawValues);
2030
- var chunks = formatMessage(config, formatters, descriptor, values);
2034
+ var chunks = formatMessage.apply(void 0, __spreadArrays([config,
2035
+ formatters,
2036
+ descriptor, values], rest));
2031
2037
  if (Array.isArray(chunks)) {
2032
2038
  return React.Children.toArray(chunks);
2033
2039
  }
@@ -2282,9 +2288,11 @@
2282
2288
  return (React.createElement(Context.Consumer, null, function (intl) {
2283
2289
  invariantIntlContext(intl);
2284
2290
  var formatMessage = intl.formatMessage, _a = intl.textComponent, Text = _a === void 0 ? React.Fragment : _a;
2285
- var _b = _this.props, id = _b.id, description = _b.description, defaultMessage = _b.defaultMessage, values = _b.values, children = _b.children, _c = _b.tagName, Component = _c === void 0 ? Text : _c;
2291
+ var _b = _this.props, id = _b.id, description = _b.description, defaultMessage = _b.defaultMessage, values = _b.values, children = _b.children, _c = _b.tagName, Component = _c === void 0 ? Text : _c, ignoreTag = _b.ignoreTag;
2286
2292
  var descriptor = { id: id, description: description, defaultMessage: defaultMessage };
2287
- var nodes = formatMessage(descriptor, values);
2293
+ var nodes = formatMessage(descriptor, values, {
2294
+ ignoreTag: ignoreTag,
2295
+ });
2288
2296
  if (!Array.isArray(nodes)) {
2289
2297
  nodes = [nodes];
2290
2298
  }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  * This source code is licensed under the MIT license found in the
22
22
  * LICENSE file in the root directory of this source tree.
23
- */(o):o,r}),{}):e}var zt=function(e,r,n,o){var a=Ee(e,r,n,Gt(o));return Array.isArray(a)?t.Children.toArray(a):a},Zt=function(e,t){var r=e.defaultRichTextElements,n=u(e,["defaultRichTextElements"]),o=Gt(r),a=function l(e,t){var r=function n(e){void 0===e&&(e={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}});var t=Intl.RelativeTimeFormat,r=Intl.ListFormat,n=Intl.DisplayNames,o=ve((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.DateTimeFormat).bind.apply(e,f([void 0],t)))}),{cache:ye(e.dateTime),strategy:ve.strategies.variadic}),a=ve((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.NumberFormat).bind.apply(e,f([void 0],t)))}),{cache:ye(e.number),strategy:ve.strategies.variadic}),u=ve((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.PluralRules).bind.apply(e,f([void 0],t)))}),{cache:ye(e.pluralRules),strategy:ve.strategies.variadic});return{getDateTimeFormat:o,getNumberFormat:a,getMessageFormat:ve((function(e,t,r,n){return new ie(e,t,r,i({formatters:{getNumberFormat:a,getDateTimeFormat:o,getPluralRules:u}},n||{}))}),{cache:ye(e.message),strategy:ve.strategies.variadic}),getRelativeTimeFormat:ve((function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new(t.bind.apply(t,f([void 0],e)))}),{cache:ye(e.relativeTime),strategy:ve.strategies.variadic}),getPluralRules:u,getListFormat:ve((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(r.bind.apply(r,f([void 0],e)))}),{cache:ye(e.list),strategy:ve.strategies.variadic}),getDisplayNames:ve((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(n.bind.apply(n,f([void 0],e)))}),{cache:ye(e.displayNames),strategy:ve.strategies.variadic})}}(t),o=i(i({},de),e),a=o.locale,u=o.defaultLocale,l=o.onError;return a?!Intl.NumberFormat.supportedLocalesOf(a).length&&l?l(new ce('Missing locale data for locale: "'+a+'" in Intl.NumberFormat. Using default locale: "'+u+'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details')):!Intl.DateTimeFormat.supportedLocalesOf(a).length&&l&&l(new ce('Missing locale data for locale: "'+a+'" in Intl.DateTimeFormat. Using default locale: "'+u+'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details')):(l&&l(new se('"locale" was not configured, using "'+u+'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details')),o.locale=o.defaultLocale||"en"),function s(e){e.defaultRichTextElements&&!Ge(e.messages||{})&&console.warn('[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled. \nPlease consider using "@formatjs/cli" to pre-compile your messages for performance.\nFor more details see https://formatjs.io/docs/getting-started/message-distribution')}(o),i(i({},o),{formatters:r,formatNumber:Ue.bind(null,o,r.getNumberFormat),formatNumberToParts:Ve.bind(null,o,r.getNumberFormat),formatRelativeTime:Ce.bind(null,o,r.getRelativeTimeFormat),formatDate:Se.bind(null,o,r.getDateTimeFormat),formatDateToParts:Pe.bind(null,o,r.getDateTimeFormat),formatTime:Ie.bind(null,o,r.getDateTimeFormat),formatDateTimeRange:Oe.bind(null,o,r.getDateTimeFormat),formatTimeToParts:Re.bind(null,o,r.getDateTimeFormat),formatPlural:Le.bind(null,o,r.getPluralRules),formatMessage:Ee.bind(null,o,r),formatList:Me.bind(null,o,r.getListFormat),formatDisplayName:Fe.bind(null,o,r.getDisplayNames),__addMessages:function(t){var r=Ge(o.messages),n=Ge(t);e.onError&&(r&&!n||!r&&n)&&e.onError(new se("Cannot mix AST & non-AST messages for locale "+o.locale)),o.messages=i(i({},o.messages),t)}})}(i(i(i({},Ze),n),{defaultRichTextElements:o}),t);return i(i({},a),{formatMessage:zt.bind(null,{locale:a.locale,timeZone:a.timeZone,formats:a.formats,defaultLocale:a.defaultLocale,defaultFormats:a.defaultFormats,messages:a.messages,onError:a.onError,defaultRichTextElements:o},a.formatters)})},Yt=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.cache={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}},t.state={cache:t.cache,intl:Zt(Vt(t.props),t.cache),prevConfig:Vt(t.props)},t}return a(r,e),r.getDerivedStateFromProps=function(e,t){var r=t.prevConfig,n=t.cache,o=Vt(e);return Ut(r,o)?null:{intl:Zt(o,n),prevConfig:o}},r.prototype.render=function(){return ze(this.state.intl),t.createElement(Dt,{value:this.state.intl},this.props.children)},r.displayName="IntlProvider",r.defaultProps=Ze,r}(t.PureComponent);function qt(e){var t=Math.abs(e);return t<60?"second":t<3600?"minute":t<86400?"hour":"day"}function Kt(e){switch(e){case"second":return 1;case"minute":return 60;case"hour":return 3600;default:return 86400}}function Wt(e,t){if(!e)return 0;switch(t){case"second":return e;case"minute":return 60*e;default:return 3600*e}}var Bt=["second","minute","hour"];function Ht(e){return void 0===e&&(e="second"),Bt.includes(e)}var Jt=function(e){function r(t){var r=e.call(this,t)||this;return r._updateTimer=null,r.state={prevUnit:r.props.unit,prevValue:r.props.value,currentValueInSeconds:Ht(r.props.unit)?Wt(r.props.value,r.props.unit):0},D(!t.updateIntervalInSeconds||!(!t.updateIntervalInSeconds||!Ht(t.unit)),"Cannot schedule update with unit longer than hour"),r}return a(r,e),r.prototype.scheduleNextUpdate=function(e,t){var r=this,n=e.updateIntervalInSeconds,o=e.unit,a=t.currentValueInSeconds;if(clearTimeout(this._updateTimer),this._updateTimer=null,n&&Ht(o)){var i=a-n,u=qt(i);if("day"!==u){var l=Kt(u),s=i-i%l,c=s>=a?s-l:s,f=Math.abs(c-a);this._updateTimer=setTimeout((function(){return r.setState({currentValueInSeconds:c})}),1e3*f)}}},r.prototype.componentDidMount=function(){this.scheduleNextUpdate(this.props,this.state)},r.prototype.componentDidUpdate=function(){this.scheduleNextUpdate(this.props,this.state)},r.prototype.componentWillUnmount=function(){clearTimeout(this._updateTimer),this._updateTimer=null},r.getDerivedStateFromProps=function(e,t){return e.unit!==t.prevUnit||e.value!==t.prevValue?{prevValue:e.value,prevUnit:e.unit,currentValueInSeconds:Ht(e.unit)?Wt(e.value,e.unit):0}:null},r.prototype.render=function(){var e=this;return t.createElement(jt.Consumer,null,(function(r){ze(r);var n=r.formatRelativeTime,o=r.textComponent,a=e.props,u=a.children,l=a.unit,s=a.updateIntervalInSeconds,c=e.state.currentValueInSeconds,f=a.value||0,m=l;if(Ht(l)&&"number"==typeof c&&s){var p=Kt(m=qt(c));f=Math.round(c/p)}var d=n(f,m,i({},e.props));return"function"==typeof u?u(d):o?t.createElement(o,null,d):d}))},r.displayName="FormattedRelativeTime",r.defaultProps={value:0,unit:"second"},r}(t.PureComponent),Qt=function(e){var r=e.other,n=e.children,o=e.intl,a=o.textComponent,i=e[(0,o.formatPlural)(e.value,e)]||r;return"function"==typeof n?n(i):a?t.createElement(a,null,i):i};Qt.defaultProps={type:"cardinal"},Qt.displayName="FormattedPlural";var Xt=Mt(Qt),er=Ct||$t,tr=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return a(r,e),r.prototype.shouldComponentUpdate=function(e){var t=this.props,r=t.values,n=u(t,["values"]),o=e.values,a=u(e,["values"]);return!er(o,r)||!er(n,a)},r.prototype.render=function(){var e=this;return t.createElement(jt.Consumer,null,(function(r){ze(r);var o=r.textComponent,a=e.props,i=a.children,u=a.tagName,l=void 0===u?void 0===o?t.Fragment:o:u,s=(0,r.formatMessage)({id:a.id,description:a.description,defaultMessage:a.defaultMessage},a.values);return Array.isArray(s)||(s=[s]),"function"==typeof i?i(s):l?t.createElement.apply(n,f([l,null],s)):s}))},r.displayName="FormattedMessage",r}(t.Component),rr=function(e){return t.createElement(jt.Consumer,null,(function(r){ze(r);var n=e.from,o=e.to,a=e.children,i=u(e,["from","to","children"]),l=r.formatDateTimeRange(n,o,i);return"function"==typeof a?a(l):t.createElement(r.textComponent||t.Fragment,null,l)}))};rr.displayName="FormattedDateTimeRange";var nr=xt("formatDate"),or=xt("formatTime"),ar=xt("formatNumber"),ir=xt("formatList"),ur=xt("formatDisplayName"),lr=Lt("formatDate"),sr=Lt("formatTime");e.FormattedDate=nr,e.FormattedDateParts=lr,e.FormattedDateTimeRange=rr,e.FormattedDisplayName=ur,e.FormattedList=ir,e.FormattedMessage=tr,e.FormattedNumber=ar,e.FormattedNumberParts=At,e.FormattedPlural=Xt,e.FormattedRelativeTime=Jt,e.FormattedTime=or,e.FormattedTimeParts=sr,e.IntlContext=jt,e.IntlProvider=Yt,e.InvalidConfigError=se,e.MessageFormatError=fe,e.MissingDataError=ce,e.MissingTranslationError=me,e.RawIntlProvider=Dt,e.ReactIntlError=ue,e.UnsupportedFormatterError=le,e.createIntl=Zt,e.createIntlCache=function cr(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}},e.defineMessage=function fr(e){return e},e.defineMessages=function mr(e){return e},e.injectIntl=Mt,e.useIntl=function pr(){var e=t.useContext(jt);return ze(e),e},Object.defineProperty(e,"__esModule",{value:!0})}));
23
+ */(o):o,r}),{}):e}var zt=function(e,r,n,o){for(var a=[],i=4;i<arguments.length;i++)a[i-4]=arguments[i];var u=Gt(o),l=Ee.apply(void 0,f([e,r,n,u],a));return Array.isArray(l)?t.Children.toArray(l):l},Zt=function(e,t){var r=e.defaultRichTextElements,n=u(e,["defaultRichTextElements"]),o=Gt(r),a=function l(e,t){var r=function n(e){void 0===e&&(e={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}});var t=Intl.RelativeTimeFormat,r=Intl.ListFormat,n=Intl.DisplayNames,o=ve((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.DateTimeFormat).bind.apply(e,f([void 0],t)))}),{cache:ye(e.dateTime),strategy:ve.strategies.variadic}),a=ve((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.NumberFormat).bind.apply(e,f([void 0],t)))}),{cache:ye(e.number),strategy:ve.strategies.variadic}),u=ve((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.PluralRules).bind.apply(e,f([void 0],t)))}),{cache:ye(e.pluralRules),strategy:ve.strategies.variadic});return{getDateTimeFormat:o,getNumberFormat:a,getMessageFormat:ve((function(e,t,r,n){return new ie(e,t,r,i({formatters:{getNumberFormat:a,getDateTimeFormat:o,getPluralRules:u}},n||{}))}),{cache:ye(e.message),strategy:ve.strategies.variadic}),getRelativeTimeFormat:ve((function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new(t.bind.apply(t,f([void 0],e)))}),{cache:ye(e.relativeTime),strategy:ve.strategies.variadic}),getPluralRules:u,getListFormat:ve((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(r.bind.apply(r,f([void 0],e)))}),{cache:ye(e.list),strategy:ve.strategies.variadic}),getDisplayNames:ve((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(n.bind.apply(n,f([void 0],e)))}),{cache:ye(e.displayNames),strategy:ve.strategies.variadic})}}(t),o=i(i({},de),e),a=o.locale,u=o.defaultLocale,l=o.onError;return a?!Intl.NumberFormat.supportedLocalesOf(a).length&&l?l(new ce('Missing locale data for locale: "'+a+'" in Intl.NumberFormat. Using default locale: "'+u+'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details')):!Intl.DateTimeFormat.supportedLocalesOf(a).length&&l&&l(new ce('Missing locale data for locale: "'+a+'" in Intl.DateTimeFormat. Using default locale: "'+u+'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details')):(l&&l(new se('"locale" was not configured, using "'+u+'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details')),o.locale=o.defaultLocale||"en"),function s(e){e.defaultRichTextElements&&!Ge(e.messages||{})&&console.warn('[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled. \nPlease consider using "@formatjs/cli" to pre-compile your messages for performance.\nFor more details see https://formatjs.io/docs/getting-started/message-distribution')}(o),i(i({},o),{formatters:r,formatNumber:Ue.bind(null,o,r.getNumberFormat),formatNumberToParts:Ve.bind(null,o,r.getNumberFormat),formatRelativeTime:Ce.bind(null,o,r.getRelativeTimeFormat),formatDate:Se.bind(null,o,r.getDateTimeFormat),formatDateToParts:Pe.bind(null,o,r.getDateTimeFormat),formatTime:Ie.bind(null,o,r.getDateTimeFormat),formatDateTimeRange:Oe.bind(null,o,r.getDateTimeFormat),formatTimeToParts:Re.bind(null,o,r.getDateTimeFormat),formatPlural:Le.bind(null,o,r.getPluralRules),formatMessage:Ee.bind(null,o,r),formatList:Me.bind(null,o,r.getListFormat),formatDisplayName:Fe.bind(null,o,r.getDisplayNames),__addMessages:function(t){var r=Ge(o.messages),n=Ge(t);e.onError&&(r&&!n||!r&&n)&&e.onError(new se("Cannot mix AST & non-AST messages for locale "+o.locale)),o.messages=i(i({},o.messages),t)}})}(i(i(i({},Ze),n),{defaultRichTextElements:o}),t);return i(i({},a),{formatMessage:zt.bind(null,{locale:a.locale,timeZone:a.timeZone,formats:a.formats,defaultLocale:a.defaultLocale,defaultFormats:a.defaultFormats,messages:a.messages,onError:a.onError,defaultRichTextElements:o},a.formatters)})},Yt=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.cache={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}},t.state={cache:t.cache,intl:Zt(Vt(t.props),t.cache),prevConfig:Vt(t.props)},t}return a(r,e),r.getDerivedStateFromProps=function(e,t){var r=t.prevConfig,n=t.cache,o=Vt(e);return Ut(r,o)?null:{intl:Zt(o,n),prevConfig:o}},r.prototype.render=function(){return ze(this.state.intl),t.createElement(Dt,{value:this.state.intl},this.props.children)},r.displayName="IntlProvider",r.defaultProps=Ze,r}(t.PureComponent);function qt(e){var t=Math.abs(e);return t<60?"second":t<3600?"minute":t<86400?"hour":"day"}function Kt(e){switch(e){case"second":return 1;case"minute":return 60;case"hour":return 3600;default:return 86400}}function Wt(e,t){if(!e)return 0;switch(t){case"second":return e;case"minute":return 60*e;default:return 3600*e}}var Bt=["second","minute","hour"];function Ht(e){return void 0===e&&(e="second"),Bt.includes(e)}var Jt=function(e){function r(t){var r=e.call(this,t)||this;return r._updateTimer=null,r.state={prevUnit:r.props.unit,prevValue:r.props.value,currentValueInSeconds:Ht(r.props.unit)?Wt(r.props.value,r.props.unit):0},D(!t.updateIntervalInSeconds||!(!t.updateIntervalInSeconds||!Ht(t.unit)),"Cannot schedule update with unit longer than hour"),r}return a(r,e),r.prototype.scheduleNextUpdate=function(e,t){var r=this,n=e.updateIntervalInSeconds,o=e.unit,a=t.currentValueInSeconds;if(clearTimeout(this._updateTimer),this._updateTimer=null,n&&Ht(o)){var i=a-n,u=qt(i);if("day"!==u){var l=Kt(u),s=i-i%l,c=s>=a?s-l:s,f=Math.abs(c-a);this._updateTimer=setTimeout((function(){return r.setState({currentValueInSeconds:c})}),1e3*f)}}},r.prototype.componentDidMount=function(){this.scheduleNextUpdate(this.props,this.state)},r.prototype.componentDidUpdate=function(){this.scheduleNextUpdate(this.props,this.state)},r.prototype.componentWillUnmount=function(){clearTimeout(this._updateTimer),this._updateTimer=null},r.getDerivedStateFromProps=function(e,t){return e.unit!==t.prevUnit||e.value!==t.prevValue?{prevValue:e.value,prevUnit:e.unit,currentValueInSeconds:Ht(e.unit)?Wt(e.value,e.unit):0}:null},r.prototype.render=function(){var e=this;return t.createElement(jt.Consumer,null,(function(r){ze(r);var n=r.formatRelativeTime,o=r.textComponent,a=e.props,u=a.children,l=a.unit,s=a.updateIntervalInSeconds,c=e.state.currentValueInSeconds,f=a.value||0,m=l;if(Ht(l)&&"number"==typeof c&&s){var p=Kt(m=qt(c));f=Math.round(c/p)}var d=n(f,m,i({},e.props));return"function"==typeof u?u(d):o?t.createElement(o,null,d):d}))},r.displayName="FormattedRelativeTime",r.defaultProps={value:0,unit:"second"},r}(t.PureComponent),Qt=function(e){var r=e.other,n=e.children,o=e.intl,a=o.textComponent,i=e[(0,o.formatPlural)(e.value,e)]||r;return"function"==typeof n?n(i):a?t.createElement(a,null,i):i};Qt.defaultProps={type:"cardinal"},Qt.displayName="FormattedPlural";var Xt=Mt(Qt),er=Ct||$t,tr=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return a(r,e),r.prototype.shouldComponentUpdate=function(e){var t=this.props,r=t.values,n=u(t,["values"]),o=e.values,a=u(e,["values"]);return!er(o,r)||!er(n,a)},r.prototype.render=function(){var e=this;return t.createElement(jt.Consumer,null,(function(r){ze(r);var o=r.textComponent,a=e.props,i=a.children,u=a.tagName,l=void 0===u?void 0===o?t.Fragment:o:u,s=(0,r.formatMessage)({id:a.id,description:a.description,defaultMessage:a.defaultMessage},a.values,{ignoreTag:a.ignoreTag});return Array.isArray(s)||(s=[s]),"function"==typeof i?i(s):l?t.createElement.apply(n,f([l,null],s)):s}))},r.displayName="FormattedMessage",r}(t.Component),rr=function(e){return t.createElement(jt.Consumer,null,(function(r){ze(r);var n=e.from,o=e.to,a=e.children,i=u(e,["from","to","children"]),l=r.formatDateTimeRange(n,o,i);return"function"==typeof a?a(l):t.createElement(r.textComponent||t.Fragment,null,l)}))};rr.displayName="FormattedDateTimeRange";var nr=xt("formatDate"),or=xt("formatTime"),ar=xt("formatNumber"),ir=xt("formatList"),ur=xt("formatDisplayName"),lr=Lt("formatDate"),sr=Lt("formatTime");e.FormattedDate=nr,e.FormattedDateParts=lr,e.FormattedDateTimeRange=rr,e.FormattedDisplayName=ur,e.FormattedList=ir,e.FormattedMessage=tr,e.FormattedNumber=ar,e.FormattedNumberParts=At,e.FormattedPlural=Xt,e.FormattedRelativeTime=Jt,e.FormattedTime=or,e.FormattedTimeParts=sr,e.IntlContext=jt,e.IntlProvider=Yt,e.InvalidConfigError=se,e.MessageFormatError=fe,e.MissingDataError=ce,e.MissingTranslationError=me,e.RawIntlProvider=Dt,e.ReactIntlError=ue,e.UnsupportedFormatterError=le,e.createIntl=Zt,e.createIntlCache=function cr(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}},e.defineMessage=function fr(e){return e},e.defineMessages=function mr(e){return e},e.injectIntl=Mt,e.useIntl=function pr(){var e=t.useContext(jt);return ze(e),e},Object.defineProperty(e,"__esModule",{value:!0})}));
package/react-intl.umd.js CHANGED
@@ -5269,8 +5269,14 @@
5269
5269
  }, {});
5270
5270
  }
5271
5271
  var formatMessage$1 = function (config, formatters, descriptor, rawValues) {
5272
+ var rest = [];
5273
+ for (var _i = 4; _i < arguments.length; _i++) {
5274
+ rest[_i - 4] = arguments[_i];
5275
+ }
5272
5276
  var values = assignUniqueKeysToFormatXMLElementFnArgument(rawValues);
5273
- var chunks = formatMessage(config, formatters, descriptor, values);
5277
+ var chunks = formatMessage.apply(void 0, __spreadArrays([config,
5278
+ formatters,
5279
+ descriptor, values], rest));
5274
5280
  if (Array.isArray(chunks)) {
5275
5281
  return React.Children.toArray(chunks);
5276
5282
  }
@@ -5525,9 +5531,11 @@
5525
5531
  return (React.createElement(Context.Consumer, null, function (intl) {
5526
5532
  invariantIntlContext(intl);
5527
5533
  var formatMessage = intl.formatMessage, _a = intl.textComponent, Text = _a === void 0 ? React.Fragment : _a;
5528
- var _b = _this.props, id = _b.id, description = _b.description, defaultMessage = _b.defaultMessage, values = _b.values, children = _b.children, _c = _b.tagName, Component = _c === void 0 ? Text : _c;
5534
+ var _b = _this.props, id = _b.id, description = _b.description, defaultMessage = _b.defaultMessage, values = _b.values, children = _b.children, _c = _b.tagName, Component = _c === void 0 ? Text : _c, ignoreTag = _b.ignoreTag;
5529
5535
  var descriptor = { id: id, description: description, defaultMessage: defaultMessage };
5530
- var nodes = formatMessage(descriptor, values);
5536
+ var nodes = formatMessage(descriptor, values, {
5537
+ ignoreTag: ignoreTag,
5538
+ });
5531
5539
  if (!Array.isArray(nodes)) {
5532
5540
  nodes = [nodes];
5533
5541
  }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  * This source code is licensed under the MIT license found in the
22
22
  * LICENSE file in the root directory of this source tree.
23
- */()}},r.exports),r.exports}((function(e){e.exports=pt})),ht={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},yt={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},vt={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},bt={};function wt(e){return dt.isMemo(e)?vt:bt[e.$$typeof]||ht}bt[dt.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},bt[dt.Memo]=vt;var At,Tt,Et=Object.defineProperty,Ft=Object.getOwnPropertyNames,It=Object.getOwnPropertySymbols,Rt=Object.getOwnPropertyDescriptor,St=Object.getPrototypeOf,Dt=Object.prototype,Ot=function e(t,r,n){if("string"!=typeof r){if(Dt){var a=St(r);a&&a!==Dt&&e(t,a,n)}var o=Ft(r);It&&(o=o.concat(It(r)));for(var i=wt(t),u=wt(r),s=0;s<o.length;++s){var c=o[s];if(!(yt[c]||n&&n[c]||u&&u[c]||i&&i[c])){var l=Rt(r,c);try{Et(t,c,l)}catch(e){}}}}return t},Ct=Ot.default||Ot,Nt=t.createContext(null),xt=Nt.Consumer,Pt=Nt.Provider,Mt=Nt;function _t(e,r){var n=r||{},a=n.intlPropName,o=void 0===a?"intl":a,i=n.forwardRef,u=void 0!==i&&i,c=n.enforceContext,l=void 0===c||c,f=function(r){return t.createElement(xt,null,(function(n){var a;l&&Ge(n);var i=((a={})[o]=n,a);return t.createElement(e,s({},r,i,{ref:u?r.forwardedRef:null}))}))};return f.displayName="injectIntl("+function m(e){return e.displayName||e.name||"Component"}(e)+")",f.WrappedComponent=e,Ct(u?t.forwardRef((function(e,r){return t.createElement(f,s({},e,{forwardedRef:r}))})):f,e)}!function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"}(At||(At={})),function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"}(Tt||(Tt={}));var jt=function(e){return t.createElement(Mt.Consumer,null,(function(t){Ge(t);var r=e.value,n=e.children,a=c(e,["value","children"]);return n(t.formatNumberToParts(r,a))}))};function kt(e){var r=function(r){return t.createElement(Mt.Consumer,null,(function(t){Ge(t);var n=r.value,a=r.children,o=c(r,["value","children"]),i="string"==typeof n?new Date(n||0):n;return a("formatDate"===e?t.formatDateToParts(i,o):t.formatTimeToParts(i,o))}))};return r.displayName=Tt[e],r}function Lt(e){var r=function(r){return t.createElement(Mt.Consumer,null,(function(n){Ge(n);var a=r.value,o=r.children,i=c(r,["value","children"]),u=n[e](a,i);return"function"==typeof o?o(u):t.createElement(n.textComponent||t.Fragment,null,u)}))};return r.displayName=At[e],r}jt.displayName="FormattedNumberParts";var $t=function Ut(e,t){if(e===t)return!0;if(!e||!t)return!1;var r=Object.keys(e),n=Object.keys(t),a=r.length;if(n.length!==a)return!1;for(var o=0;o<a;o++){var i=r[o];if(e[i]!==t[i]||!Object.prototype.hasOwnProperty.call(t,i))return!1}return!0},zt=Object.freeze(Object.assign(Object.create(null),$t,{default:$t})),Vt=$t||zt;function Zt(e){return{locale:e.locale,timeZone:e.timeZone,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError,wrapRichTextChunksInFragment:e.wrapRichTextChunksInFragment,defaultRichTextElements:e.defaultRichTextElements}}function Gt(e){return e?Object.keys(e).reduce((function(r,n){var a=e[n];return r[n]=ne(a)?function o(e){return function(r){return e(t.Children.toArray(r))}}(a):a,r}),{}):e}var Bt=function(e,r,n,a){var o=Te(e,r,n,Gt(a));return Array.isArray(o)?t.Children.toArray(o):o},qt=function(e,t){var r=e.defaultRichTextElements,n=c(e,["defaultRichTextElements"]),a=Gt(r),o=function i(e,t){var r=function n(e){void 0===e&&(e={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}});var t=Intl.RelativeTimeFormat,r=Intl.ListFormat,n=Intl.DisplayNames,a=ye((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.DateTimeFormat).bind.apply(e,l([void 0],t)))}),{cache:he(e.dateTime),strategy:ye.strategies.variadic}),o=ye((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.NumberFormat).bind.apply(e,l([void 0],t)))}),{cache:he(e.number),strategy:ye.strategies.variadic}),i=ye((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.PluralRules).bind.apply(e,l([void 0],t)))}),{cache:he(e.pluralRules),strategy:ye.strategies.variadic});return{getDateTimeFormat:a,getNumberFormat:o,getMessageFormat:ye((function(e,t,r,n){return new ue(e,t,r,s({formatters:{getNumberFormat:o,getDateTimeFormat:a,getPluralRules:i}},n||{}))}),{cache:he(e.message),strategy:ye.strategies.variadic}),getRelativeTimeFormat:ye((function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new(t.bind.apply(t,l([void 0],e)))}),{cache:he(e.relativeTime),strategy:ye.strategies.variadic}),getPluralRules:i,getListFormat:ye((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(r.bind.apply(r,l([void 0],e)))}),{cache:he(e.list),strategy:ye.strategies.variadic}),getDisplayNames:ye((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(n.bind.apply(n,l([void 0],e)))}),{cache:he(e.displayNames),strategy:ye.strategies.variadic})}}(t),a=s(s({},ge),e),o=a.locale,i=a.defaultLocale,u=a.onError;return o?!Intl.NumberFormat.supportedLocalesOf(o).length&&u?u(new fe('Missing locale data for locale: "'+o+'" in Intl.NumberFormat. Using default locale: "'+i+'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details')):!Intl.DateTimeFormat.supportedLocalesOf(o).length&&u&&u(new fe('Missing locale data for locale: "'+o+'" in Intl.DateTimeFormat. Using default locale: "'+i+'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details')):(u&&u(new le('"locale" was not configured, using "'+i+'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details')),a.locale=a.defaultLocale||"en"),function c(e){e.defaultRichTextElements&&!Ze(e.messages||{})&&console.warn('[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled. \nPlease consider using "@formatjs/cli" to pre-compile your messages for performance.\nFor more details see https://formatjs.io/docs/getting-started/message-distribution')}(a),s(s({},a),{formatters:r,formatNumber:ze.bind(null,a,r.getNumberFormat),formatNumberToParts:Ve.bind(null,a,r.getNumberFormat),formatRelativeTime:Le.bind(null,a,r.getRelativeTimeFormat),formatDate:Ie.bind(null,a,r.getDateTimeFormat),formatDateToParts:De.bind(null,a,r.getDateTimeFormat),formatTime:Re.bind(null,a,r.getDateTimeFormat),formatDateTimeRange:Se.bind(null,a,r.getDateTimeFormat),formatTimeToParts:Oe.bind(null,a,r.getDateTimeFormat),formatPlural:je.bind(null,a,r.getPluralRules),formatMessage:Te.bind(null,a,r),formatList:Me.bind(null,a,r.getListFormat),formatDisplayName:Ne.bind(null,a,r.getDisplayNames),__addMessages:function(t){var r=Ze(a.messages),n=Ze(t);e.onError&&(r&&!n||!r&&n)&&e.onError(new le("Cannot mix AST & non-AST messages for locale "+a.locale)),a.messages=s(s({},a.messages),t)}})}(s(s(s({},Be),n),{defaultRichTextElements:a}),t);return s(s({},o),{formatMessage:Bt.bind(null,{locale:o.locale,timeZone:o.timeZone,formats:o.formats,defaultLocale:o.defaultLocale,defaultFormats:o.defaultFormats,messages:o.messages,onError:o.onError,defaultRichTextElements:a},o.formatters)})},Wt=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.cache={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}},t.state={cache:t.cache,intl:qt(Zt(t.props),t.cache),prevConfig:Zt(t.props)},t}return o(r,e),r.getDerivedStateFromProps=function(e,t){var r=t.prevConfig,n=t.cache,a=Zt(e);return Vt(r,a)?null:{intl:qt(a,n),prevConfig:a}},r.prototype.render=function(){return Ge(this.state.intl),t.createElement(Pt,{value:this.state.intl},this.props.children)},r.displayName="IntlProvider",r.defaultProps=Be,r}(t.PureComponent);function Ht(e){var t=Math.abs(e);return t<60?"second":t<3600?"minute":t<86400?"hour":"day"}function Kt(e){switch(e){case"second":return 1;case"minute":return 60;case"hour":return 3600;default:return 86400}}function Jt(e,t){if(!e)return 0;switch(t){case"second":return e;case"minute":return 60*e;default:return 3600*e}}var Qt=["second","minute","hour"];function Xt(e){return void 0===e&&(e="second"),Qt.includes(e)}var Yt=function(e){function r(t){var r=e.call(this,t)||this;return r._updateTimer=null,r.state={prevUnit:r.props.unit,prevValue:r.props.value,currentValueInSeconds:Xt(r.props.unit)?Jt(r.props.value,r.props.unit):0},f(!t.updateIntervalInSeconds||!(!t.updateIntervalInSeconds||!Xt(t.unit)),"Cannot schedule update with unit longer than hour"),r}return o(r,e),r.prototype.scheduleNextUpdate=function(e,t){var r=this,n=e.updateIntervalInSeconds,a=e.unit,o=t.currentValueInSeconds;if(clearTimeout(this._updateTimer),this._updateTimer=null,n&&Xt(a)){var i=o-n,u=Ht(i);if("day"!==u){var s=Kt(u),c=i-i%s,l=c>=o?c-s:c,f=Math.abs(l-o);this._updateTimer=setTimeout((function(){return r.setState({currentValueInSeconds:l})}),1e3*f)}}},r.prototype.componentDidMount=function(){this.scheduleNextUpdate(this.props,this.state)},r.prototype.componentDidUpdate=function(){this.scheduleNextUpdate(this.props,this.state)},r.prototype.componentWillUnmount=function(){clearTimeout(this._updateTimer),this._updateTimer=null},r.getDerivedStateFromProps=function(e,t){return e.unit!==t.prevUnit||e.value!==t.prevValue?{prevValue:e.value,prevUnit:e.unit,currentValueInSeconds:Xt(e.unit)?Jt(e.value,e.unit):0}:null},r.prototype.render=function(){var e=this;return t.createElement(Mt.Consumer,null,(function(r){Ge(r);var n=r.formatRelativeTime,a=r.textComponent,o=e.props,i=o.children,u=o.unit,c=o.updateIntervalInSeconds,l=e.state.currentValueInSeconds,f=o.value||0,m=u;if(Xt(u)&&"number"==typeof l&&c){var p=Kt(m=Ht(l));f=Math.round(l/p)}var d=n(f,m,s({},e.props));return"function"==typeof i?i(d):a?t.createElement(a,null,d):d}))},r.displayName="FormattedRelativeTime",r.defaultProps={value:0,unit:"second"},r}(t.PureComponent),er=function(e){var r=e.other,n=e.children,a=e.intl,o=a.textComponent,i=e[(0,a.formatPlural)(e.value,e)]||r;return"function"==typeof n?n(i):o?t.createElement(o,null,i):i};er.defaultProps={type:"cardinal"},er.displayName="FormattedPlural";var tr=_t(er),rr=$t||zt,nr=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return o(r,e),r.prototype.shouldComponentUpdate=function(e){var t=this.props,r=t.values,n=c(t,["values"]),a=e.values,o=c(e,["values"]);return!rr(a,r)||!rr(n,o)},r.prototype.render=function(){var e=this;return t.createElement(Mt.Consumer,null,(function(r){Ge(r);var a=r.textComponent,o=e.props,i=o.children,u=o.tagName,s=void 0===u?void 0===a?t.Fragment:a:u,c=(0,r.formatMessage)({id:o.id,description:o.description,defaultMessage:o.defaultMessage},o.values);return Array.isArray(c)||(c=[c]),"function"==typeof i?i(c):s?t.createElement.apply(n,l([s,null],c)):c}))},r.displayName="FormattedMessage",r}(t.Component),ar=function(e){return t.createElement(Mt.Consumer,null,(function(r){Ge(r);var n=e.from,a=e.to,o=e.children,i=c(e,["from","to","children"]),u=r.formatDateTimeRange(n,a,i);return"function"==typeof o?o(u):t.createElement(r.textComponent||t.Fragment,null,u)}))};ar.displayName="FormattedDateTimeRange";var or=Lt("formatDate"),ir=Lt("formatTime"),ur=Lt("formatNumber"),sr=Lt("formatList"),cr=Lt("formatDisplayName"),lr=kt("formatDate"),fr=kt("formatTime");e.FormattedDate=or,e.FormattedDateParts=lr,e.FormattedDateTimeRange=ar,e.FormattedDisplayName=cr,e.FormattedList=sr,e.FormattedMessage=nr,e.FormattedNumber=ur,e.FormattedNumberParts=jt,e.FormattedPlural=tr,e.FormattedRelativeTime=Yt,e.FormattedTime=ir,e.FormattedTimeParts=fr,e.IntlContext=Mt,e.IntlProvider=Wt,e.InvalidConfigError=le,e.MessageFormatError=me,e.MissingDataError=fe,e.MissingTranslationError=pe,e.RawIntlProvider=Pt,e.ReactIntlError=se,e.UnsupportedFormatterError=ce,e.createIntl=qt,e.createIntlCache=function mr(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}},e.defineMessage=function pr(e){return e},e.defineMessages=function dr(e){return e},e.injectIntl=_t,e.useIntl=function gr(){var e=t.useContext(Mt);return Ge(e),e},Object.defineProperty(e,"__esModule",{value:!0})}));
23
+ */()}},r.exports),r.exports}((function(e){e.exports=pt})),ht={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},yt={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},vt={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},bt={};function wt(e){return dt.isMemo(e)?vt:bt[e.$$typeof]||ht}bt[dt.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},bt[dt.Memo]=vt;var At,Tt,Et=Object.defineProperty,Ft=Object.getOwnPropertyNames,It=Object.getOwnPropertySymbols,Rt=Object.getOwnPropertyDescriptor,St=Object.getPrototypeOf,Dt=Object.prototype,Ot=function e(t,r,n){if("string"!=typeof r){if(Dt){var a=St(r);a&&a!==Dt&&e(t,a,n)}var o=Ft(r);It&&(o=o.concat(It(r)));for(var i=wt(t),u=wt(r),s=0;s<o.length;++s){var c=o[s];if(!(yt[c]||n&&n[c]||u&&u[c]||i&&i[c])){var l=Rt(r,c);try{Et(t,c,l)}catch(e){}}}}return t},Ct=Ot.default||Ot,Nt=t.createContext(null),xt=Nt.Consumer,Pt=Nt.Provider,Mt=Nt;function _t(e,r){var n=r||{},a=n.intlPropName,o=void 0===a?"intl":a,i=n.forwardRef,u=void 0!==i&&i,c=n.enforceContext,l=void 0===c||c,f=function(r){return t.createElement(xt,null,(function(n){var a;l&&Ge(n);var i=((a={})[o]=n,a);return t.createElement(e,s({},r,i,{ref:u?r.forwardedRef:null}))}))};return f.displayName="injectIntl("+function m(e){return e.displayName||e.name||"Component"}(e)+")",f.WrappedComponent=e,Ct(u?t.forwardRef((function(e,r){return t.createElement(f,s({},e,{forwardedRef:r}))})):f,e)}!function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"}(At||(At={})),function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"}(Tt||(Tt={}));var jt=function(e){return t.createElement(Mt.Consumer,null,(function(t){Ge(t);var r=e.value,n=e.children,a=c(e,["value","children"]);return n(t.formatNumberToParts(r,a))}))};function kt(e){var r=function(r){return t.createElement(Mt.Consumer,null,(function(t){Ge(t);var n=r.value,a=r.children,o=c(r,["value","children"]),i="string"==typeof n?new Date(n||0):n;return a("formatDate"===e?t.formatDateToParts(i,o):t.formatTimeToParts(i,o))}))};return r.displayName=Tt[e],r}function Lt(e){var r=function(r){return t.createElement(Mt.Consumer,null,(function(n){Ge(n);var a=r.value,o=r.children,i=c(r,["value","children"]),u=n[e](a,i);return"function"==typeof o?o(u):t.createElement(n.textComponent||t.Fragment,null,u)}))};return r.displayName=At[e],r}jt.displayName="FormattedNumberParts";var $t=function Ut(e,t){if(e===t)return!0;if(!e||!t)return!1;var r=Object.keys(e),n=Object.keys(t),a=r.length;if(n.length!==a)return!1;for(var o=0;o<a;o++){var i=r[o];if(e[i]!==t[i]||!Object.prototype.hasOwnProperty.call(t,i))return!1}return!0},zt=Object.freeze(Object.assign(Object.create(null),$t,{default:$t})),Vt=$t||zt;function Zt(e){return{locale:e.locale,timeZone:e.timeZone,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError,wrapRichTextChunksInFragment:e.wrapRichTextChunksInFragment,defaultRichTextElements:e.defaultRichTextElements}}function Gt(e){return e?Object.keys(e).reduce((function(r,n){var a=e[n];return r[n]=ne(a)?function o(e){return function(r){return e(t.Children.toArray(r))}}(a):a,r}),{}):e}var Bt=function(e,r,n,a){for(var o=[],i=4;i<arguments.length;i++)o[i-4]=arguments[i];var u=Gt(a),s=Te.apply(void 0,l([e,r,n,u],o));return Array.isArray(s)?t.Children.toArray(s):s},qt=function(e,t){var r=e.defaultRichTextElements,n=c(e,["defaultRichTextElements"]),a=Gt(r),o=function i(e,t){var r=function n(e){void 0===e&&(e={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}});var t=Intl.RelativeTimeFormat,r=Intl.ListFormat,n=Intl.DisplayNames,a=ye((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.DateTimeFormat).bind.apply(e,l([void 0],t)))}),{cache:he(e.dateTime),strategy:ye.strategies.variadic}),o=ye((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.NumberFormat).bind.apply(e,l([void 0],t)))}),{cache:he(e.number),strategy:ye.strategies.variadic}),i=ye((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.PluralRules).bind.apply(e,l([void 0],t)))}),{cache:he(e.pluralRules),strategy:ye.strategies.variadic});return{getDateTimeFormat:a,getNumberFormat:o,getMessageFormat:ye((function(e,t,r,n){return new ue(e,t,r,s({formatters:{getNumberFormat:o,getDateTimeFormat:a,getPluralRules:i}},n||{}))}),{cache:he(e.message),strategy:ye.strategies.variadic}),getRelativeTimeFormat:ye((function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new(t.bind.apply(t,l([void 0],e)))}),{cache:he(e.relativeTime),strategy:ye.strategies.variadic}),getPluralRules:i,getListFormat:ye((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(r.bind.apply(r,l([void 0],e)))}),{cache:he(e.list),strategy:ye.strategies.variadic}),getDisplayNames:ye((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(n.bind.apply(n,l([void 0],e)))}),{cache:he(e.displayNames),strategy:ye.strategies.variadic})}}(t),a=s(s({},ge),e),o=a.locale,i=a.defaultLocale,u=a.onError;return o?!Intl.NumberFormat.supportedLocalesOf(o).length&&u?u(new fe('Missing locale data for locale: "'+o+'" in Intl.NumberFormat. Using default locale: "'+i+'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details')):!Intl.DateTimeFormat.supportedLocalesOf(o).length&&u&&u(new fe('Missing locale data for locale: "'+o+'" in Intl.DateTimeFormat. Using default locale: "'+i+'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details')):(u&&u(new le('"locale" was not configured, using "'+i+'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details')),a.locale=a.defaultLocale||"en"),function c(e){e.defaultRichTextElements&&!Ze(e.messages||{})&&console.warn('[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled. \nPlease consider using "@formatjs/cli" to pre-compile your messages for performance.\nFor more details see https://formatjs.io/docs/getting-started/message-distribution')}(a),s(s({},a),{formatters:r,formatNumber:ze.bind(null,a,r.getNumberFormat),formatNumberToParts:Ve.bind(null,a,r.getNumberFormat),formatRelativeTime:Le.bind(null,a,r.getRelativeTimeFormat),formatDate:Ie.bind(null,a,r.getDateTimeFormat),formatDateToParts:De.bind(null,a,r.getDateTimeFormat),formatTime:Re.bind(null,a,r.getDateTimeFormat),formatDateTimeRange:Se.bind(null,a,r.getDateTimeFormat),formatTimeToParts:Oe.bind(null,a,r.getDateTimeFormat),formatPlural:je.bind(null,a,r.getPluralRules),formatMessage:Te.bind(null,a,r),formatList:Me.bind(null,a,r.getListFormat),formatDisplayName:Ne.bind(null,a,r.getDisplayNames),__addMessages:function(t){var r=Ze(a.messages),n=Ze(t);e.onError&&(r&&!n||!r&&n)&&e.onError(new le("Cannot mix AST & non-AST messages for locale "+a.locale)),a.messages=s(s({},a.messages),t)}})}(s(s(s({},Be),n),{defaultRichTextElements:a}),t);return s(s({},o),{formatMessage:Bt.bind(null,{locale:o.locale,timeZone:o.timeZone,formats:o.formats,defaultLocale:o.defaultLocale,defaultFormats:o.defaultFormats,messages:o.messages,onError:o.onError,defaultRichTextElements:a},o.formatters)})},Wt=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.cache={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}},t.state={cache:t.cache,intl:qt(Zt(t.props),t.cache),prevConfig:Zt(t.props)},t}return o(r,e),r.getDerivedStateFromProps=function(e,t){var r=t.prevConfig,n=t.cache,a=Zt(e);return Vt(r,a)?null:{intl:qt(a,n),prevConfig:a}},r.prototype.render=function(){return Ge(this.state.intl),t.createElement(Pt,{value:this.state.intl},this.props.children)},r.displayName="IntlProvider",r.defaultProps=Be,r}(t.PureComponent);function Ht(e){var t=Math.abs(e);return t<60?"second":t<3600?"minute":t<86400?"hour":"day"}function Kt(e){switch(e){case"second":return 1;case"minute":return 60;case"hour":return 3600;default:return 86400}}function Jt(e,t){if(!e)return 0;switch(t){case"second":return e;case"minute":return 60*e;default:return 3600*e}}var Qt=["second","minute","hour"];function Xt(e){return void 0===e&&(e="second"),Qt.includes(e)}var Yt=function(e){function r(t){var r=e.call(this,t)||this;return r._updateTimer=null,r.state={prevUnit:r.props.unit,prevValue:r.props.value,currentValueInSeconds:Xt(r.props.unit)?Jt(r.props.value,r.props.unit):0},f(!t.updateIntervalInSeconds||!(!t.updateIntervalInSeconds||!Xt(t.unit)),"Cannot schedule update with unit longer than hour"),r}return o(r,e),r.prototype.scheduleNextUpdate=function(e,t){var r=this,n=e.updateIntervalInSeconds,a=e.unit,o=t.currentValueInSeconds;if(clearTimeout(this._updateTimer),this._updateTimer=null,n&&Xt(a)){var i=o-n,u=Ht(i);if("day"!==u){var s=Kt(u),c=i-i%s,l=c>=o?c-s:c,f=Math.abs(l-o);this._updateTimer=setTimeout((function(){return r.setState({currentValueInSeconds:l})}),1e3*f)}}},r.prototype.componentDidMount=function(){this.scheduleNextUpdate(this.props,this.state)},r.prototype.componentDidUpdate=function(){this.scheduleNextUpdate(this.props,this.state)},r.prototype.componentWillUnmount=function(){clearTimeout(this._updateTimer),this._updateTimer=null},r.getDerivedStateFromProps=function(e,t){return e.unit!==t.prevUnit||e.value!==t.prevValue?{prevValue:e.value,prevUnit:e.unit,currentValueInSeconds:Xt(e.unit)?Jt(e.value,e.unit):0}:null},r.prototype.render=function(){var e=this;return t.createElement(Mt.Consumer,null,(function(r){Ge(r);var n=r.formatRelativeTime,a=r.textComponent,o=e.props,i=o.children,u=o.unit,c=o.updateIntervalInSeconds,l=e.state.currentValueInSeconds,f=o.value||0,m=u;if(Xt(u)&&"number"==typeof l&&c){var p=Kt(m=Ht(l));f=Math.round(l/p)}var d=n(f,m,s({},e.props));return"function"==typeof i?i(d):a?t.createElement(a,null,d):d}))},r.displayName="FormattedRelativeTime",r.defaultProps={value:0,unit:"second"},r}(t.PureComponent),er=function(e){var r=e.other,n=e.children,a=e.intl,o=a.textComponent,i=e[(0,a.formatPlural)(e.value,e)]||r;return"function"==typeof n?n(i):o?t.createElement(o,null,i):i};er.defaultProps={type:"cardinal"},er.displayName="FormattedPlural";var tr=_t(er),rr=$t||zt,nr=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return o(r,e),r.prototype.shouldComponentUpdate=function(e){var t=this.props,r=t.values,n=c(t,["values"]),a=e.values,o=c(e,["values"]);return!rr(a,r)||!rr(n,o)},r.prototype.render=function(){var e=this;return t.createElement(Mt.Consumer,null,(function(r){Ge(r);var a=r.textComponent,o=e.props,i=o.children,u=o.tagName,s=void 0===u?void 0===a?t.Fragment:a:u,c=(0,r.formatMessage)({id:o.id,description:o.description,defaultMessage:o.defaultMessage},o.values,{ignoreTag:o.ignoreTag});return Array.isArray(c)||(c=[c]),"function"==typeof i?i(c):s?t.createElement.apply(n,l([s,null],c)):c}))},r.displayName="FormattedMessage",r}(t.Component),ar=function(e){return t.createElement(Mt.Consumer,null,(function(r){Ge(r);var n=e.from,a=e.to,o=e.children,i=c(e,["from","to","children"]),u=r.formatDateTimeRange(n,a,i);return"function"==typeof o?o(u):t.createElement(r.textComponent||t.Fragment,null,u)}))};ar.displayName="FormattedDateTimeRange";var or=Lt("formatDate"),ir=Lt("formatTime"),ur=Lt("formatNumber"),sr=Lt("formatList"),cr=Lt("formatDisplayName"),lr=kt("formatDate"),fr=kt("formatTime");e.FormattedDate=or,e.FormattedDateParts=lr,e.FormattedDateTimeRange=ar,e.FormattedDisplayName=cr,e.FormattedList=sr,e.FormattedMessage=nr,e.FormattedNumber=ur,e.FormattedNumberParts=jt,e.FormattedPlural=tr,e.FormattedRelativeTime=Yt,e.FormattedTime=ir,e.FormattedTimeParts=fr,e.IntlContext=Mt,e.IntlProvider=Wt,e.InvalidConfigError=le,e.MessageFormatError=me,e.MissingDataError=fe,e.MissingTranslationError=pe,e.RawIntlProvider=Pt,e.ReactIntlError=se,e.UnsupportedFormatterError=ce,e.createIntl=qt,e.createIntlCache=function mr(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}},e.defineMessage=function pr(e){return e},e.defineMessages=function dr(e){return e},e.injectIntl=_t,e.useIntl=function gr(){var e=t.useContext(Mt);return Ge(e),e},Object.defineProperty(e,"__esModule",{value:!0})}));
@@ -1,10 +1,11 @@
1
1
  import * as React from 'react';
2
- import type { PrimitiveType, FormatXMLElementFn } from 'intl-messageformat';
2
+ import type { PrimitiveType, FormatXMLElementFn, Options as IntlMessageFormatOptions } from 'intl-messageformat';
3
3
  import { MessageDescriptor } from '@formatjs/intl';
4
4
  export interface Props<V extends Record<string, any> = Record<string, React.ReactNode>> extends MessageDescriptor {
5
5
  values?: V;
6
6
  tagName?: React.ElementType<any>;
7
7
  children?(...nodes: React.ReactNodeArray): React.ReactNode;
8
+ ignoreTag?: IntlMessageFormatOptions['ignoreTag'];
8
9
  }
9
10
  declare class FormattedMessage<V extends Record<string, any> = Record<string, PrimitiveType | React.ReactElement | FormatXMLElementFn<React.ReactNode, React.ReactNode>>> extends React.Component<Props<V>> {
10
11
  static displayName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react-intl/src/components/message.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,aAAa,EAAE,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAI1E,OAAO,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;AAIjD,MAAM,WAAW,KAAK,CACpB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAC/D,SAAQ,iBAAiB;IACzB,MAAM,CAAC,EAAE,CAAC,CAAC;IACX,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACjC,QAAQ,CAAC,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,cAAc,GAAG,KAAK,CAAC,SAAS,CAAC;CAC5D;AAED,cAAM,gBAAgB,CACpB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CACpC,MAAM,EACJ,aAAa,GACb,KAAK,CAAC,YAAY,GAClB,kBAAkB,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CACvD,CACD,SAAQ,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACjC,MAAM,CAAC,WAAW,SAAsB;IAExC,qBAAqB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO;IASnD,MAAM,IAAI,GAAG,CAAC,OAAO;CAqCtB;AAED,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react-intl/src/components/message.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EAClB,OAAO,IAAI,wBAAwB,EACpC,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;AAIjD,MAAM,WAAW,KAAK,CACpB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAC/D,SAAQ,iBAAiB;IACzB,MAAM,CAAC,EAAE,CAAC,CAAC;IACX,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACjC,QAAQ,CAAC,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,cAAc,GAAG,KAAK,CAAC,SAAS,CAAC;IAC3D,SAAS,CAAC,EAAE,wBAAwB,CAAC,WAAW,CAAC,CAAC;CACnD;AAED,cAAM,gBAAgB,CACpB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CACpC,MAAM,EACJ,aAAa,GACb,KAAK,CAAC,YAAY,GAClB,kBAAkB,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CACvD,CACD,SAAQ,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACjC,MAAM,CAAC,WAAW,SAAsB;IAExC,qBAAqB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO;IASnD,MAAM,IAAI,GAAG,CAAC,OAAO;CAwCtB;AAED,eAAe,gBAAgB,CAAC"}
@@ -27,9 +27,11 @@ var FormattedMessage = /** @class */ (function (_super) {
27
27
  return (React.createElement(injectIntl_1.Context.Consumer, null, function (intl) {
28
28
  utils_1.invariantIntlContext(intl);
29
29
  var formatMessage = intl.formatMessage, _a = intl.textComponent, Text = _a === void 0 ? React.Fragment : _a;
30
- var _b = _this.props, id = _b.id, description = _b.description, defaultMessage = _b.defaultMessage, values = _b.values, children = _b.children, _c = _b.tagName, Component = _c === void 0 ? Text : _c;
30
+ var _b = _this.props, id = _b.id, description = _b.description, defaultMessage = _b.defaultMessage, values = _b.values, children = _b.children, _c = _b.tagName, Component = _c === void 0 ? Text : _c, ignoreTag = _b.ignoreTag;
31
31
  var descriptor = { id: id, description: description, defaultMessage: defaultMessage };
32
- var nodes = formatMessage(descriptor, values);
32
+ var nodes = formatMessage(descriptor, values, {
33
+ ignoreTag: ignoreTag,
34
+ });
33
35
  if (!Array.isArray(nodes)) {
34
36
  nodes = [nodes];
35
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react-intl/src/components/provider.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,mBAAmB,EAGpB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,UAAU,CAAC;AAC/C,OAAO,EAEL,SAAS,EAET,YAAY,EAEb,MAAM,gBAAgB,CAAC;AAWxB,UAAU,KAAK;IACb;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;OAIG;IACH,UAAU,EAAE,kBAAkB,CAAC;CAChC;AAED,oBAAY,kBAAkB,GAAG,IAAI,CACnC,UAAU,EACV,MAAM,OAAO,mBAAmB,CACjC,GACC,OAAO,CAAC,OAAO,mBAAmB,CAAC,CAAC;AA+DtC;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,YAAY,CACnC,KAAK,CAAC,SAAS,EACf,kBAAkB,EAClB,SAAS,CAkCV,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,KAAK,CAAC,aAAa,CAG3D,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,EAC3C,KAAK,CACN;IACC,MAAM,CAAC,WAAW,SAAkB;IACpC,MAAM,CAAC,YAAY,2HAAuB;IAC1C,OAAO,CAAC,KAAK,CAAgC;IAC7C,KAAK,EAAE,KAAK,CAIV;IAEF,MAAM,CAAC,wBAAwB,CAC7B,KAAK,EAAE,kBAAkB,EACzB,EAAC,UAAU,EAAE,KAAK,EAAC,EAAE,KAAK,GACzB,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI;IAWxB,MAAM,IAAI,GAAG,CAAC,OAAO;CAItB"}
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react-intl/src/components/provider.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,mBAAmB,EAGpB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,UAAU,CAAC;AAC/C,OAAO,EAEL,SAAS,EAET,YAAY,EAEb,MAAM,gBAAgB,CAAC;AAWxB,UAAU,KAAK;IACb;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;OAIG;IACH,UAAU,EAAE,kBAAkB,CAAC;CAChC;AAED,oBAAY,kBAAkB,GAAG,IAAI,CACnC,UAAU,EACV,MAAM,OAAO,mBAAmB,CACjC,GACC,OAAO,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAiEtC;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,YAAY,CACnC,KAAK,CAAC,SAAS,EACf,kBAAkB,EAClB,SAAS,CAkCV,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,KAAK,CAAC,aAAa,CAG3D,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,EAC3C,KAAK,CACN;IACC,MAAM,CAAC,WAAW,SAAkB;IACpC,MAAM,CAAC,YAAY,2HAAuB;IAC1C,OAAO,CAAC,KAAK,CAAgC;IAC7C,KAAK,EAAE,KAAK,CAIV;IAEF,MAAM,CAAC,wBAAwB,CAC7B,KAAK,EAAE,kBAAkB,EACzB,EAAC,UAAU,EAAE,KAAK,EAAC,EAAE,KAAK,GACzB,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI;IAWxB,MAAM,IAAI,GAAG,CAAC,OAAO;CAItB"}
@@ -41,8 +41,14 @@ function assignUniqueKeysToFormatXMLElementFnArgument(values) {
41
41
  }, {});
42
42
  }
43
43
  var formatMessage = function (config, formatters, descriptor, rawValues) {
44
+ var rest = [];
45
+ for (var _i = 4; _i < arguments.length; _i++) {
46
+ rest[_i - 4] = arguments[_i];
47
+ }
44
48
  var values = assignUniqueKeysToFormatXMLElementFnArgument(rawValues);
45
- var chunks = intl_1.formatMessage(config, formatters, descriptor, values);
49
+ var chunks = intl_1.formatMessage.apply(void 0, tslib_1.__spreadArrays([config,
50
+ formatters,
51
+ descriptor, values], rest));
46
52
  if (Array.isArray(chunks)) {
47
53
  return React.Children.toArray(chunks);
48
54
  }