@codee-sh/medusa-plugin-notification-emails 0.1.0 → 0.1.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/.medusa/server/src/admin/index.js +445 -4410
- package/.medusa/server/src/admin/index.mjs +445 -4410
- package/.medusa/server/src/api/admin/notification-plugin/render-template/route.js +8 -5
- package/.medusa/server/src/hooks/api/preview.js +5 -4
- package/.medusa/server/src/subscribers/order-completed.js +14 -62
- package/.medusa/server/src/subscribers/order-placed.js +12 -58
- package/.medusa/server/src/templates/emails/blocks/components/repeater.js +1 -1
- package/.medusa/server/src/templates/emails/contact-form/config.js +5 -21
- package/.medusa/server/src/templates/emails/index.js +18 -8
- package/.medusa/server/src/templates/emails/order/completed/config.js +221 -0
- package/.medusa/server/src/templates/emails/{order-placed → order/completed}/index.js +1 -1
- package/.medusa/server/src/templates/emails/{order-completed → order/completed}/translations/en.json +1 -1
- package/.medusa/server/src/templates/emails/{order-placed → order/completed}/translations/index.js +1 -1
- package/.medusa/server/src/templates/emails/{order-completed → order/completed}/translations/pl.json +1 -1
- package/.medusa/server/src/templates/emails/{order-completed → order/placed}/config.js +24 -36
- package/.medusa/server/src/templates/emails/{order-completed → order/placed}/index.js +1 -1
- package/.medusa/server/src/templates/emails/{order-completed → order/placed}/translations/index.js +1 -1
- package/.medusa/server/src/templates/emails/{order-placed → order/placed}/translations/pl.json +1 -1
- package/.medusa/server/src/templates/emails/{order-placed → order/updated}/config.js +12 -12
- package/.medusa/server/src/templates/emails/order/updated/index.js +7 -0
- package/.medusa/server/src/templates/emails/order/updated/translations/en.json +24 -0
- package/.medusa/server/src/templates/emails/order/updated/translations/index.js +15 -0
- package/.medusa/server/src/templates/emails/order/updated/translations/pl.json +24 -0
- package/.medusa/server/src/templates/emails/types.js +2 -1
- package/.medusa/server/src/utils/attribute-helpers.js +17 -0
- package/.medusa/server/src/utils/data/modules/index.js +15 -0
- package/.medusa/server/src/utils/data/modules/inventory/index.js +18 -0
- package/.medusa/server/src/utils/data/modules/inventory/inventory.js +108 -0
- package/.medusa/server/src/utils/data/modules/order/index.js +18 -0
- package/.medusa/server/src/utils/data/modules/order/order.js +415 -0
- package/.medusa/server/src/utils/data/modules/product/helpers.js +9 -0
- package/.medusa/server/src/utils/data/modules/product/index.js +18 -0
- package/.medusa/server/src/utils/data/modules/product/product.js +276 -0
- package/.medusa/server/src/utils/data/modules/product-category/index.js +18 -0
- package/.medusa/server/src/utils/data/modules/product-category/product-category.js +75 -0
- package/.medusa/server/src/utils/data/modules/product-tag/index.js +18 -0
- package/.medusa/server/src/utils/data/modules/product-tag/product-tag.js +39 -0
- package/.medusa/server/src/utils/data/modules/product-type/index.js +18 -0
- package/.medusa/server/src/utils/data/modules/product-type/product-type.js +39 -0
- package/.medusa/server/src/utils/data/modules/product-variant/index.js +18 -0
- package/.medusa/server/src/utils/data/modules/product-variant/product-variant.js +139 -0
- package/.medusa/server/src/utils/i18n/i18n.js +2 -20
- package/.medusa/server/src/utils/index.js +7 -1
- package/.medusa/server/src/utils/transforms/index.js +42 -0
- package/.medusa/server/src/utils/transforms/order-transformer.js +42 -0
- package/.medusa/server/src/workflows/order/get-order-by-id.js +23 -0
- package/.medusa/server/src/workflows/order/index.js +18 -0
- package/.medusa/server/src/workflows/order/steps/get-order-by-id.js +40 -0
- package/.medusa/server/src/workflows/order/steps/index.js +18 -0
- package/package.json +1 -1
- /package/.medusa/server/src/templates/emails/{order-placed → order/placed}/translations/en.json +0 -0
|
@@ -2047,9 +2047,9 @@ var KeyValuesItem = (props) => {
|
|
|
2047
2047
|
var isMyArray = Array.isArray(value);
|
|
2048
2048
|
var isMySet = value instanceof Set;
|
|
2049
2049
|
var isMyMap = value instanceof Map;
|
|
2050
|
-
var
|
|
2050
|
+
var isDate = value instanceof Date;
|
|
2051
2051
|
var isUrl = value instanceof URL;
|
|
2052
|
-
var isMyObject = value && typeof value === "object" && !isMyArray && !isMySet && !isMyMap && !
|
|
2052
|
+
var isMyObject = value && typeof value === "object" && !isMyArray && !isMySet && !isMyMap && !isDate && !isUrl;
|
|
2053
2053
|
var isNested = isMyObject || isMyArray || isMySet || isMyMap;
|
|
2054
2054
|
if (isNested) {
|
|
2055
2055
|
var myValue = isMySet ? Array.from(value) : isMyMap ? Object.fromEntries(value) : value;
|
|
@@ -2998,7 +2998,8 @@ const useOrder = (params, options) => {
|
|
|
2998
2998
|
const usePreview = (params, options) => {
|
|
2999
2999
|
const {
|
|
3000
3000
|
templateName,
|
|
3001
|
-
|
|
3001
|
+
context,
|
|
3002
|
+
contextType,
|
|
3002
3003
|
locale,
|
|
3003
3004
|
extraKey = [],
|
|
3004
3005
|
enabled = false
|
|
@@ -3016,4367 +3017,18 @@ const usePreview = (params, options) => {
|
|
|
3016
3017
|
method: "POST",
|
|
3017
3018
|
body: {
|
|
3018
3019
|
templateName,
|
|
3019
|
-
|
|
3020
|
+
context,
|
|
3021
|
+
contextType,
|
|
3020
3022
|
locale
|
|
3021
3023
|
}
|
|
3022
3024
|
});
|
|
3023
3025
|
},
|
|
3024
3026
|
staleTime: 0,
|
|
3025
|
-
enabled: enabled && !!templateName && !!
|
|
3027
|
+
enabled: enabled && !!templateName && !!context && !!locale,
|
|
3026
3028
|
...options
|
|
3027
3029
|
});
|
|
3028
3030
|
return { data, ...rest };
|
|
3029
3031
|
};
|
|
3030
|
-
function toDate(argument) {
|
|
3031
|
-
const argStr = Object.prototype.toString.call(argument);
|
|
3032
|
-
if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") {
|
|
3033
|
-
return new argument.constructor(+argument);
|
|
3034
|
-
} else if (typeof argument === "number" || argStr === "[object Number]" || typeof argument === "string" || argStr === "[object String]") {
|
|
3035
|
-
return new Date(argument);
|
|
3036
|
-
} else {
|
|
3037
|
-
return /* @__PURE__ */ new Date(NaN);
|
|
3038
|
-
}
|
|
3039
|
-
}
|
|
3040
|
-
function constructFrom(date, value) {
|
|
3041
|
-
if (date instanceof Date) {
|
|
3042
|
-
return new date.constructor(value);
|
|
3043
|
-
} else {
|
|
3044
|
-
return new Date(value);
|
|
3045
|
-
}
|
|
3046
|
-
}
|
|
3047
|
-
const millisecondsInWeek = 6048e5;
|
|
3048
|
-
const millisecondsInDay = 864e5;
|
|
3049
|
-
let defaultOptions = {};
|
|
3050
|
-
function getDefaultOptions() {
|
|
3051
|
-
return defaultOptions;
|
|
3052
|
-
}
|
|
3053
|
-
function startOfWeek(date, options) {
|
|
3054
|
-
var _a, _b, _c, _d;
|
|
3055
|
-
const defaultOptions2 = getDefaultOptions();
|
|
3056
|
-
const weekStartsOn = (options == null ? void 0 : options.weekStartsOn) ?? ((_b = (_a = options == null ? void 0 : options.locale) == null ? void 0 : _a.options) == null ? void 0 : _b.weekStartsOn) ?? defaultOptions2.weekStartsOn ?? ((_d = (_c = defaultOptions2.locale) == null ? void 0 : _c.options) == null ? void 0 : _d.weekStartsOn) ?? 0;
|
|
3057
|
-
const _date = toDate(date);
|
|
3058
|
-
const day = _date.getDay();
|
|
3059
|
-
const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
3060
|
-
_date.setDate(_date.getDate() - diff);
|
|
3061
|
-
_date.setHours(0, 0, 0, 0);
|
|
3062
|
-
return _date;
|
|
3063
|
-
}
|
|
3064
|
-
function startOfISOWeek(date) {
|
|
3065
|
-
return startOfWeek(date, { weekStartsOn: 1 });
|
|
3066
|
-
}
|
|
3067
|
-
function getISOWeekYear(date) {
|
|
3068
|
-
const _date = toDate(date);
|
|
3069
|
-
const year = _date.getFullYear();
|
|
3070
|
-
const fourthOfJanuaryOfNextYear = constructFrom(date, 0);
|
|
3071
|
-
fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
|
|
3072
|
-
fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
|
|
3073
|
-
const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
|
|
3074
|
-
const fourthOfJanuaryOfThisYear = constructFrom(date, 0);
|
|
3075
|
-
fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
|
|
3076
|
-
fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
|
|
3077
|
-
const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
|
|
3078
|
-
if (_date.getTime() >= startOfNextYear.getTime()) {
|
|
3079
|
-
return year + 1;
|
|
3080
|
-
} else if (_date.getTime() >= startOfThisYear.getTime()) {
|
|
3081
|
-
return year;
|
|
3082
|
-
} else {
|
|
3083
|
-
return year - 1;
|
|
3084
|
-
}
|
|
3085
|
-
}
|
|
3086
|
-
function startOfDay(date) {
|
|
3087
|
-
const _date = toDate(date);
|
|
3088
|
-
_date.setHours(0, 0, 0, 0);
|
|
3089
|
-
return _date;
|
|
3090
|
-
}
|
|
3091
|
-
function getTimezoneOffsetInMilliseconds(date) {
|
|
3092
|
-
const _date = toDate(date);
|
|
3093
|
-
const utcDate = new Date(
|
|
3094
|
-
Date.UTC(
|
|
3095
|
-
_date.getFullYear(),
|
|
3096
|
-
_date.getMonth(),
|
|
3097
|
-
_date.getDate(),
|
|
3098
|
-
_date.getHours(),
|
|
3099
|
-
_date.getMinutes(),
|
|
3100
|
-
_date.getSeconds(),
|
|
3101
|
-
_date.getMilliseconds()
|
|
3102
|
-
)
|
|
3103
|
-
);
|
|
3104
|
-
utcDate.setUTCFullYear(_date.getFullYear());
|
|
3105
|
-
return +date - +utcDate;
|
|
3106
|
-
}
|
|
3107
|
-
function differenceInCalendarDays(dateLeft, dateRight) {
|
|
3108
|
-
const startOfDayLeft = startOfDay(dateLeft);
|
|
3109
|
-
const startOfDayRight = startOfDay(dateRight);
|
|
3110
|
-
const timestampLeft = +startOfDayLeft - getTimezoneOffsetInMilliseconds(startOfDayLeft);
|
|
3111
|
-
const timestampRight = +startOfDayRight - getTimezoneOffsetInMilliseconds(startOfDayRight);
|
|
3112
|
-
return Math.round((timestampLeft - timestampRight) / millisecondsInDay);
|
|
3113
|
-
}
|
|
3114
|
-
function startOfISOWeekYear(date) {
|
|
3115
|
-
const year = getISOWeekYear(date);
|
|
3116
|
-
const fourthOfJanuary = constructFrom(date, 0);
|
|
3117
|
-
fourthOfJanuary.setFullYear(year, 0, 4);
|
|
3118
|
-
fourthOfJanuary.setHours(0, 0, 0, 0);
|
|
3119
|
-
return startOfISOWeek(fourthOfJanuary);
|
|
3120
|
-
}
|
|
3121
|
-
function isDate(value) {
|
|
3122
|
-
return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]";
|
|
3123
|
-
}
|
|
3124
|
-
function isValid(date) {
|
|
3125
|
-
if (!isDate(date) && typeof date !== "number") {
|
|
3126
|
-
return false;
|
|
3127
|
-
}
|
|
3128
|
-
const _date = toDate(date);
|
|
3129
|
-
return !isNaN(Number(_date));
|
|
3130
|
-
}
|
|
3131
|
-
function startOfYear(date) {
|
|
3132
|
-
const cleanDate = toDate(date);
|
|
3133
|
-
const _date = constructFrom(date, 0);
|
|
3134
|
-
_date.setFullYear(cleanDate.getFullYear(), 0, 1);
|
|
3135
|
-
_date.setHours(0, 0, 0, 0);
|
|
3136
|
-
return _date;
|
|
3137
|
-
}
|
|
3138
|
-
const formatDistanceLocale$2 = {
|
|
3139
|
-
lessThanXSeconds: {
|
|
3140
|
-
one: "less than a second",
|
|
3141
|
-
other: "less than {{count}} seconds"
|
|
3142
|
-
},
|
|
3143
|
-
xSeconds: {
|
|
3144
|
-
one: "1 second",
|
|
3145
|
-
other: "{{count}} seconds"
|
|
3146
|
-
},
|
|
3147
|
-
halfAMinute: "half a minute",
|
|
3148
|
-
lessThanXMinutes: {
|
|
3149
|
-
one: "less than a minute",
|
|
3150
|
-
other: "less than {{count}} minutes"
|
|
3151
|
-
},
|
|
3152
|
-
xMinutes: {
|
|
3153
|
-
one: "1 minute",
|
|
3154
|
-
other: "{{count}} minutes"
|
|
3155
|
-
},
|
|
3156
|
-
aboutXHours: {
|
|
3157
|
-
one: "about 1 hour",
|
|
3158
|
-
other: "about {{count}} hours"
|
|
3159
|
-
},
|
|
3160
|
-
xHours: {
|
|
3161
|
-
one: "1 hour",
|
|
3162
|
-
other: "{{count}} hours"
|
|
3163
|
-
},
|
|
3164
|
-
xDays: {
|
|
3165
|
-
one: "1 day",
|
|
3166
|
-
other: "{{count}} days"
|
|
3167
|
-
},
|
|
3168
|
-
aboutXWeeks: {
|
|
3169
|
-
one: "about 1 week",
|
|
3170
|
-
other: "about {{count}} weeks"
|
|
3171
|
-
},
|
|
3172
|
-
xWeeks: {
|
|
3173
|
-
one: "1 week",
|
|
3174
|
-
other: "{{count}} weeks"
|
|
3175
|
-
},
|
|
3176
|
-
aboutXMonths: {
|
|
3177
|
-
one: "about 1 month",
|
|
3178
|
-
other: "about {{count}} months"
|
|
3179
|
-
},
|
|
3180
|
-
xMonths: {
|
|
3181
|
-
one: "1 month",
|
|
3182
|
-
other: "{{count}} months"
|
|
3183
|
-
},
|
|
3184
|
-
aboutXYears: {
|
|
3185
|
-
one: "about 1 year",
|
|
3186
|
-
other: "about {{count}} years"
|
|
3187
|
-
},
|
|
3188
|
-
xYears: {
|
|
3189
|
-
one: "1 year",
|
|
3190
|
-
other: "{{count}} years"
|
|
3191
|
-
},
|
|
3192
|
-
overXYears: {
|
|
3193
|
-
one: "over 1 year",
|
|
3194
|
-
other: "over {{count}} years"
|
|
3195
|
-
},
|
|
3196
|
-
almostXYears: {
|
|
3197
|
-
one: "almost 1 year",
|
|
3198
|
-
other: "almost {{count}} years"
|
|
3199
|
-
}
|
|
3200
|
-
};
|
|
3201
|
-
const formatDistance$2 = (token, count, options) => {
|
|
3202
|
-
let result;
|
|
3203
|
-
const tokenValue = formatDistanceLocale$2[token];
|
|
3204
|
-
if (typeof tokenValue === "string") {
|
|
3205
|
-
result = tokenValue;
|
|
3206
|
-
} else if (count === 1) {
|
|
3207
|
-
result = tokenValue.one;
|
|
3208
|
-
} else {
|
|
3209
|
-
result = tokenValue.other.replace("{{count}}", count.toString());
|
|
3210
|
-
}
|
|
3211
|
-
if (options == null ? void 0 : options.addSuffix) {
|
|
3212
|
-
if (options.comparison && options.comparison > 0) {
|
|
3213
|
-
return "in " + result;
|
|
3214
|
-
} else {
|
|
3215
|
-
return result + " ago";
|
|
3216
|
-
}
|
|
3217
|
-
}
|
|
3218
|
-
return result;
|
|
3219
|
-
};
|
|
3220
|
-
function buildFormatLongFn(args) {
|
|
3221
|
-
return (options = {}) => {
|
|
3222
|
-
const width = options.width ? String(options.width) : args.defaultWidth;
|
|
3223
|
-
const format2 = args.formats[width] || args.formats[args.defaultWidth];
|
|
3224
|
-
return format2;
|
|
3225
|
-
};
|
|
3226
|
-
}
|
|
3227
|
-
const dateFormats$2 = {
|
|
3228
|
-
full: "EEEE, MMMM do, y",
|
|
3229
|
-
long: "MMMM do, y",
|
|
3230
|
-
medium: "MMM d, y",
|
|
3231
|
-
short: "MM/dd/yyyy"
|
|
3232
|
-
};
|
|
3233
|
-
const timeFormats$2 = {
|
|
3234
|
-
full: "h:mm:ss a zzzz",
|
|
3235
|
-
long: "h:mm:ss a z",
|
|
3236
|
-
medium: "h:mm:ss a",
|
|
3237
|
-
short: "h:mm a"
|
|
3238
|
-
};
|
|
3239
|
-
const dateTimeFormats$2 = {
|
|
3240
|
-
full: "{{date}} 'at' {{time}}",
|
|
3241
|
-
long: "{{date}} 'at' {{time}}",
|
|
3242
|
-
medium: "{{date}}, {{time}}",
|
|
3243
|
-
short: "{{date}}, {{time}}"
|
|
3244
|
-
};
|
|
3245
|
-
const formatLong$2 = {
|
|
3246
|
-
date: buildFormatLongFn({
|
|
3247
|
-
formats: dateFormats$2,
|
|
3248
|
-
defaultWidth: "full"
|
|
3249
|
-
}),
|
|
3250
|
-
time: buildFormatLongFn({
|
|
3251
|
-
formats: timeFormats$2,
|
|
3252
|
-
defaultWidth: "full"
|
|
3253
|
-
}),
|
|
3254
|
-
dateTime: buildFormatLongFn({
|
|
3255
|
-
formats: dateTimeFormats$2,
|
|
3256
|
-
defaultWidth: "full"
|
|
3257
|
-
})
|
|
3258
|
-
};
|
|
3259
|
-
const formatRelativeLocale$2 = {
|
|
3260
|
-
lastWeek: "'last' eeee 'at' p",
|
|
3261
|
-
yesterday: "'yesterday at' p",
|
|
3262
|
-
today: "'today at' p",
|
|
3263
|
-
tomorrow: "'tomorrow at' p",
|
|
3264
|
-
nextWeek: "eeee 'at' p",
|
|
3265
|
-
other: "P"
|
|
3266
|
-
};
|
|
3267
|
-
const formatRelative$2 = (token, _date, _baseDate, _options) => formatRelativeLocale$2[token];
|
|
3268
|
-
function buildLocalizeFn(args) {
|
|
3269
|
-
return (value, options) => {
|
|
3270
|
-
const context = (options == null ? void 0 : options.context) ? String(options.context) : "standalone";
|
|
3271
|
-
let valuesArray;
|
|
3272
|
-
if (context === "formatting" && args.formattingValues) {
|
|
3273
|
-
const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
3274
|
-
const width = (options == null ? void 0 : options.width) ? String(options.width) : defaultWidth;
|
|
3275
|
-
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
3276
|
-
} else {
|
|
3277
|
-
const defaultWidth = args.defaultWidth;
|
|
3278
|
-
const width = (options == null ? void 0 : options.width) ? String(options.width) : args.defaultWidth;
|
|
3279
|
-
valuesArray = args.values[width] || args.values[defaultWidth];
|
|
3280
|
-
}
|
|
3281
|
-
const index = args.argumentCallback ? args.argumentCallback(value) : value;
|
|
3282
|
-
return valuesArray[index];
|
|
3283
|
-
};
|
|
3284
|
-
}
|
|
3285
|
-
const eraValues$2 = {
|
|
3286
|
-
narrow: ["B", "A"],
|
|
3287
|
-
abbreviated: ["BC", "AD"],
|
|
3288
|
-
wide: ["Before Christ", "Anno Domini"]
|
|
3289
|
-
};
|
|
3290
|
-
const quarterValues$2 = {
|
|
3291
|
-
narrow: ["1", "2", "3", "4"],
|
|
3292
|
-
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
3293
|
-
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
3294
|
-
};
|
|
3295
|
-
const monthValues$2 = {
|
|
3296
|
-
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
3297
|
-
abbreviated: [
|
|
3298
|
-
"Jan",
|
|
3299
|
-
"Feb",
|
|
3300
|
-
"Mar",
|
|
3301
|
-
"Apr",
|
|
3302
|
-
"May",
|
|
3303
|
-
"Jun",
|
|
3304
|
-
"Jul",
|
|
3305
|
-
"Aug",
|
|
3306
|
-
"Sep",
|
|
3307
|
-
"Oct",
|
|
3308
|
-
"Nov",
|
|
3309
|
-
"Dec"
|
|
3310
|
-
],
|
|
3311
|
-
wide: [
|
|
3312
|
-
"January",
|
|
3313
|
-
"February",
|
|
3314
|
-
"March",
|
|
3315
|
-
"April",
|
|
3316
|
-
"May",
|
|
3317
|
-
"June",
|
|
3318
|
-
"July",
|
|
3319
|
-
"August",
|
|
3320
|
-
"September",
|
|
3321
|
-
"October",
|
|
3322
|
-
"November",
|
|
3323
|
-
"December"
|
|
3324
|
-
]
|
|
3325
|
-
};
|
|
3326
|
-
const dayValues$2 = {
|
|
3327
|
-
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
3328
|
-
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
3329
|
-
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
3330
|
-
wide: [
|
|
3331
|
-
"Sunday",
|
|
3332
|
-
"Monday",
|
|
3333
|
-
"Tuesday",
|
|
3334
|
-
"Wednesday",
|
|
3335
|
-
"Thursday",
|
|
3336
|
-
"Friday",
|
|
3337
|
-
"Saturday"
|
|
3338
|
-
]
|
|
3339
|
-
};
|
|
3340
|
-
const dayPeriodValues$2 = {
|
|
3341
|
-
narrow: {
|
|
3342
|
-
am: "a",
|
|
3343
|
-
pm: "p",
|
|
3344
|
-
midnight: "mi",
|
|
3345
|
-
noon: "n",
|
|
3346
|
-
morning: "morning",
|
|
3347
|
-
afternoon: "afternoon",
|
|
3348
|
-
evening: "evening",
|
|
3349
|
-
night: "night"
|
|
3350
|
-
},
|
|
3351
|
-
abbreviated: {
|
|
3352
|
-
am: "AM",
|
|
3353
|
-
pm: "PM",
|
|
3354
|
-
midnight: "midnight",
|
|
3355
|
-
noon: "noon",
|
|
3356
|
-
morning: "morning",
|
|
3357
|
-
afternoon: "afternoon",
|
|
3358
|
-
evening: "evening",
|
|
3359
|
-
night: "night"
|
|
3360
|
-
},
|
|
3361
|
-
wide: {
|
|
3362
|
-
am: "a.m.",
|
|
3363
|
-
pm: "p.m.",
|
|
3364
|
-
midnight: "midnight",
|
|
3365
|
-
noon: "noon",
|
|
3366
|
-
morning: "morning",
|
|
3367
|
-
afternoon: "afternoon",
|
|
3368
|
-
evening: "evening",
|
|
3369
|
-
night: "night"
|
|
3370
|
-
}
|
|
3371
|
-
};
|
|
3372
|
-
const formattingDayPeriodValues$1 = {
|
|
3373
|
-
narrow: {
|
|
3374
|
-
am: "a",
|
|
3375
|
-
pm: "p",
|
|
3376
|
-
midnight: "mi",
|
|
3377
|
-
noon: "n",
|
|
3378
|
-
morning: "in the morning",
|
|
3379
|
-
afternoon: "in the afternoon",
|
|
3380
|
-
evening: "in the evening",
|
|
3381
|
-
night: "at night"
|
|
3382
|
-
},
|
|
3383
|
-
abbreviated: {
|
|
3384
|
-
am: "AM",
|
|
3385
|
-
pm: "PM",
|
|
3386
|
-
midnight: "midnight",
|
|
3387
|
-
noon: "noon",
|
|
3388
|
-
morning: "in the morning",
|
|
3389
|
-
afternoon: "in the afternoon",
|
|
3390
|
-
evening: "in the evening",
|
|
3391
|
-
night: "at night"
|
|
3392
|
-
},
|
|
3393
|
-
wide: {
|
|
3394
|
-
am: "a.m.",
|
|
3395
|
-
pm: "p.m.",
|
|
3396
|
-
midnight: "midnight",
|
|
3397
|
-
noon: "noon",
|
|
3398
|
-
morning: "in the morning",
|
|
3399
|
-
afternoon: "in the afternoon",
|
|
3400
|
-
evening: "in the evening",
|
|
3401
|
-
night: "at night"
|
|
3402
|
-
}
|
|
3403
|
-
};
|
|
3404
|
-
const ordinalNumber$2 = (dirtyNumber, _options) => {
|
|
3405
|
-
const number = Number(dirtyNumber);
|
|
3406
|
-
const rem100 = number % 100;
|
|
3407
|
-
if (rem100 > 20 || rem100 < 10) {
|
|
3408
|
-
switch (rem100 % 10) {
|
|
3409
|
-
case 1:
|
|
3410
|
-
return number + "st";
|
|
3411
|
-
case 2:
|
|
3412
|
-
return number + "nd";
|
|
3413
|
-
case 3:
|
|
3414
|
-
return number + "rd";
|
|
3415
|
-
}
|
|
3416
|
-
}
|
|
3417
|
-
return number + "th";
|
|
3418
|
-
};
|
|
3419
|
-
const localize$2 = {
|
|
3420
|
-
ordinalNumber: ordinalNumber$2,
|
|
3421
|
-
era: buildLocalizeFn({
|
|
3422
|
-
values: eraValues$2,
|
|
3423
|
-
defaultWidth: "wide"
|
|
3424
|
-
}),
|
|
3425
|
-
quarter: buildLocalizeFn({
|
|
3426
|
-
values: quarterValues$2,
|
|
3427
|
-
defaultWidth: "wide",
|
|
3428
|
-
argumentCallback: (quarter) => quarter - 1
|
|
3429
|
-
}),
|
|
3430
|
-
month: buildLocalizeFn({
|
|
3431
|
-
values: monthValues$2,
|
|
3432
|
-
defaultWidth: "wide"
|
|
3433
|
-
}),
|
|
3434
|
-
day: buildLocalizeFn({
|
|
3435
|
-
values: dayValues$2,
|
|
3436
|
-
defaultWidth: "wide"
|
|
3437
|
-
}),
|
|
3438
|
-
dayPeriod: buildLocalizeFn({
|
|
3439
|
-
values: dayPeriodValues$2,
|
|
3440
|
-
defaultWidth: "wide",
|
|
3441
|
-
formattingValues: formattingDayPeriodValues$1,
|
|
3442
|
-
defaultFormattingWidth: "wide"
|
|
3443
|
-
})
|
|
3444
|
-
};
|
|
3445
|
-
function buildMatchFn(args) {
|
|
3446
|
-
return (string, options = {}) => {
|
|
3447
|
-
const width = options.width;
|
|
3448
|
-
const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
3449
|
-
const matchResult = string.match(matchPattern);
|
|
3450
|
-
if (!matchResult) {
|
|
3451
|
-
return null;
|
|
3452
|
-
}
|
|
3453
|
-
const matchedString = matchResult[0];
|
|
3454
|
-
const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
3455
|
-
const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : (
|
|
3456
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
3457
|
-
findKey(parsePatterns, (pattern) => pattern.test(matchedString))
|
|
3458
|
-
);
|
|
3459
|
-
let value;
|
|
3460
|
-
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
3461
|
-
value = options.valueCallback ? (
|
|
3462
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
3463
|
-
options.valueCallback(value)
|
|
3464
|
-
) : value;
|
|
3465
|
-
const rest = string.slice(matchedString.length);
|
|
3466
|
-
return { value, rest };
|
|
3467
|
-
};
|
|
3468
|
-
}
|
|
3469
|
-
function findKey(object, predicate) {
|
|
3470
|
-
for (const key in object) {
|
|
3471
|
-
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
|
|
3472
|
-
return key;
|
|
3473
|
-
}
|
|
3474
|
-
}
|
|
3475
|
-
return void 0;
|
|
3476
|
-
}
|
|
3477
|
-
function findIndex(array, predicate) {
|
|
3478
|
-
for (let key = 0; key < array.length; key++) {
|
|
3479
|
-
if (predicate(array[key])) {
|
|
3480
|
-
return key;
|
|
3481
|
-
}
|
|
3482
|
-
}
|
|
3483
|
-
return void 0;
|
|
3484
|
-
}
|
|
3485
|
-
function buildMatchPatternFn(args) {
|
|
3486
|
-
return (string, options = {}) => {
|
|
3487
|
-
const matchResult = string.match(args.matchPattern);
|
|
3488
|
-
if (!matchResult) return null;
|
|
3489
|
-
const matchedString = matchResult[0];
|
|
3490
|
-
const parseResult = string.match(args.parsePattern);
|
|
3491
|
-
if (!parseResult) return null;
|
|
3492
|
-
let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
3493
|
-
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
3494
|
-
const rest = string.slice(matchedString.length);
|
|
3495
|
-
return { value, rest };
|
|
3496
|
-
};
|
|
3497
|
-
}
|
|
3498
|
-
const matchOrdinalNumberPattern$2 = /^(\d+)(th|st|nd|rd)?/i;
|
|
3499
|
-
const parseOrdinalNumberPattern$2 = /\d+/i;
|
|
3500
|
-
const matchEraPatterns$2 = {
|
|
3501
|
-
narrow: /^(b|a)/i,
|
|
3502
|
-
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
3503
|
-
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
3504
|
-
};
|
|
3505
|
-
const parseEraPatterns$2 = {
|
|
3506
|
-
any: [/^b/i, /^(a|c)/i]
|
|
3507
|
-
};
|
|
3508
|
-
const matchQuarterPatterns$2 = {
|
|
3509
|
-
narrow: /^[1234]/i,
|
|
3510
|
-
abbreviated: /^q[1234]/i,
|
|
3511
|
-
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
3512
|
-
};
|
|
3513
|
-
const parseQuarterPatterns$2 = {
|
|
3514
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
3515
|
-
};
|
|
3516
|
-
const matchMonthPatterns$2 = {
|
|
3517
|
-
narrow: /^[jfmasond]/i,
|
|
3518
|
-
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
3519
|
-
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
3520
|
-
};
|
|
3521
|
-
const parseMonthPatterns$2 = {
|
|
3522
|
-
narrow: [
|
|
3523
|
-
/^j/i,
|
|
3524
|
-
/^f/i,
|
|
3525
|
-
/^m/i,
|
|
3526
|
-
/^a/i,
|
|
3527
|
-
/^m/i,
|
|
3528
|
-
/^j/i,
|
|
3529
|
-
/^j/i,
|
|
3530
|
-
/^a/i,
|
|
3531
|
-
/^s/i,
|
|
3532
|
-
/^o/i,
|
|
3533
|
-
/^n/i,
|
|
3534
|
-
/^d/i
|
|
3535
|
-
],
|
|
3536
|
-
any: [
|
|
3537
|
-
/^ja/i,
|
|
3538
|
-
/^f/i,
|
|
3539
|
-
/^mar/i,
|
|
3540
|
-
/^ap/i,
|
|
3541
|
-
/^may/i,
|
|
3542
|
-
/^jun/i,
|
|
3543
|
-
/^jul/i,
|
|
3544
|
-
/^au/i,
|
|
3545
|
-
/^s/i,
|
|
3546
|
-
/^o/i,
|
|
3547
|
-
/^n/i,
|
|
3548
|
-
/^d/i
|
|
3549
|
-
]
|
|
3550
|
-
};
|
|
3551
|
-
const matchDayPatterns$2 = {
|
|
3552
|
-
narrow: /^[smtwf]/i,
|
|
3553
|
-
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
3554
|
-
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
3555
|
-
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
3556
|
-
};
|
|
3557
|
-
const parseDayPatterns$2 = {
|
|
3558
|
-
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
3559
|
-
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
3560
|
-
};
|
|
3561
|
-
const matchDayPeriodPatterns$2 = {
|
|
3562
|
-
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
3563
|
-
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
3564
|
-
};
|
|
3565
|
-
const parseDayPeriodPatterns$2 = {
|
|
3566
|
-
any: {
|
|
3567
|
-
am: /^a/i,
|
|
3568
|
-
pm: /^p/i,
|
|
3569
|
-
midnight: /^mi/i,
|
|
3570
|
-
noon: /^no/i,
|
|
3571
|
-
morning: /morning/i,
|
|
3572
|
-
afternoon: /afternoon/i,
|
|
3573
|
-
evening: /evening/i,
|
|
3574
|
-
night: /night/i
|
|
3575
|
-
}
|
|
3576
|
-
};
|
|
3577
|
-
const match$2 = {
|
|
3578
|
-
ordinalNumber: buildMatchPatternFn({
|
|
3579
|
-
matchPattern: matchOrdinalNumberPattern$2,
|
|
3580
|
-
parsePattern: parseOrdinalNumberPattern$2,
|
|
3581
|
-
valueCallback: (value) => parseInt(value, 10)
|
|
3582
|
-
}),
|
|
3583
|
-
era: buildMatchFn({
|
|
3584
|
-
matchPatterns: matchEraPatterns$2,
|
|
3585
|
-
defaultMatchWidth: "wide",
|
|
3586
|
-
parsePatterns: parseEraPatterns$2,
|
|
3587
|
-
defaultParseWidth: "any"
|
|
3588
|
-
}),
|
|
3589
|
-
quarter: buildMatchFn({
|
|
3590
|
-
matchPatterns: matchQuarterPatterns$2,
|
|
3591
|
-
defaultMatchWidth: "wide",
|
|
3592
|
-
parsePatterns: parseQuarterPatterns$2,
|
|
3593
|
-
defaultParseWidth: "any",
|
|
3594
|
-
valueCallback: (index) => index + 1
|
|
3595
|
-
}),
|
|
3596
|
-
month: buildMatchFn({
|
|
3597
|
-
matchPatterns: matchMonthPatterns$2,
|
|
3598
|
-
defaultMatchWidth: "wide",
|
|
3599
|
-
parsePatterns: parseMonthPatterns$2,
|
|
3600
|
-
defaultParseWidth: "any"
|
|
3601
|
-
}),
|
|
3602
|
-
day: buildMatchFn({
|
|
3603
|
-
matchPatterns: matchDayPatterns$2,
|
|
3604
|
-
defaultMatchWidth: "wide",
|
|
3605
|
-
parsePatterns: parseDayPatterns$2,
|
|
3606
|
-
defaultParseWidth: "any"
|
|
3607
|
-
}),
|
|
3608
|
-
dayPeriod: buildMatchFn({
|
|
3609
|
-
matchPatterns: matchDayPeriodPatterns$2,
|
|
3610
|
-
defaultMatchWidth: "any",
|
|
3611
|
-
parsePatterns: parseDayPeriodPatterns$2,
|
|
3612
|
-
defaultParseWidth: "any"
|
|
3613
|
-
})
|
|
3614
|
-
};
|
|
3615
|
-
const enUS = {
|
|
3616
|
-
code: "en-US",
|
|
3617
|
-
formatDistance: formatDistance$2,
|
|
3618
|
-
formatLong: formatLong$2,
|
|
3619
|
-
formatRelative: formatRelative$2,
|
|
3620
|
-
localize: localize$2,
|
|
3621
|
-
match: match$2,
|
|
3622
|
-
options: {
|
|
3623
|
-
weekStartsOn: 0,
|
|
3624
|
-
firstWeekContainsDate: 1
|
|
3625
|
-
}
|
|
3626
|
-
};
|
|
3627
|
-
function getDayOfYear(date) {
|
|
3628
|
-
const _date = toDate(date);
|
|
3629
|
-
const diff = differenceInCalendarDays(_date, startOfYear(_date));
|
|
3630
|
-
const dayOfYear = diff + 1;
|
|
3631
|
-
return dayOfYear;
|
|
3632
|
-
}
|
|
3633
|
-
function getISOWeek(date) {
|
|
3634
|
-
const _date = toDate(date);
|
|
3635
|
-
const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);
|
|
3636
|
-
return Math.round(diff / millisecondsInWeek) + 1;
|
|
3637
|
-
}
|
|
3638
|
-
function getWeekYear(date, options) {
|
|
3639
|
-
var _a, _b, _c, _d;
|
|
3640
|
-
const _date = toDate(date);
|
|
3641
|
-
const year = _date.getFullYear();
|
|
3642
|
-
const defaultOptions2 = getDefaultOptions();
|
|
3643
|
-
const firstWeekContainsDate = (options == null ? void 0 : options.firstWeekContainsDate) ?? ((_b = (_a = options == null ? void 0 : options.locale) == null ? void 0 : _a.options) == null ? void 0 : _b.firstWeekContainsDate) ?? defaultOptions2.firstWeekContainsDate ?? ((_d = (_c = defaultOptions2.locale) == null ? void 0 : _c.options) == null ? void 0 : _d.firstWeekContainsDate) ?? 1;
|
|
3644
|
-
const firstWeekOfNextYear = constructFrom(date, 0);
|
|
3645
|
-
firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
|
|
3646
|
-
firstWeekOfNextYear.setHours(0, 0, 0, 0);
|
|
3647
|
-
const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);
|
|
3648
|
-
const firstWeekOfThisYear = constructFrom(date, 0);
|
|
3649
|
-
firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
|
|
3650
|
-
firstWeekOfThisYear.setHours(0, 0, 0, 0);
|
|
3651
|
-
const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);
|
|
3652
|
-
if (_date.getTime() >= startOfNextYear.getTime()) {
|
|
3653
|
-
return year + 1;
|
|
3654
|
-
} else if (_date.getTime() >= startOfThisYear.getTime()) {
|
|
3655
|
-
return year;
|
|
3656
|
-
} else {
|
|
3657
|
-
return year - 1;
|
|
3658
|
-
}
|
|
3659
|
-
}
|
|
3660
|
-
function startOfWeekYear(date, options) {
|
|
3661
|
-
var _a, _b, _c, _d;
|
|
3662
|
-
const defaultOptions2 = getDefaultOptions();
|
|
3663
|
-
const firstWeekContainsDate = (options == null ? void 0 : options.firstWeekContainsDate) ?? ((_b = (_a = options == null ? void 0 : options.locale) == null ? void 0 : _a.options) == null ? void 0 : _b.firstWeekContainsDate) ?? defaultOptions2.firstWeekContainsDate ?? ((_d = (_c = defaultOptions2.locale) == null ? void 0 : _c.options) == null ? void 0 : _d.firstWeekContainsDate) ?? 1;
|
|
3664
|
-
const year = getWeekYear(date, options);
|
|
3665
|
-
const firstWeek = constructFrom(date, 0);
|
|
3666
|
-
firstWeek.setFullYear(year, 0, firstWeekContainsDate);
|
|
3667
|
-
firstWeek.setHours(0, 0, 0, 0);
|
|
3668
|
-
const _date = startOfWeek(firstWeek, options);
|
|
3669
|
-
return _date;
|
|
3670
|
-
}
|
|
3671
|
-
function getWeek(date, options) {
|
|
3672
|
-
const _date = toDate(date);
|
|
3673
|
-
const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);
|
|
3674
|
-
return Math.round(diff / millisecondsInWeek) + 1;
|
|
3675
|
-
}
|
|
3676
|
-
function addLeadingZeros(number, targetLength) {
|
|
3677
|
-
const sign = number < 0 ? "-" : "";
|
|
3678
|
-
const output = Math.abs(number).toString().padStart(targetLength, "0");
|
|
3679
|
-
return sign + output;
|
|
3680
|
-
}
|
|
3681
|
-
const lightFormatters = {
|
|
3682
|
-
// Year
|
|
3683
|
-
y(date, token) {
|
|
3684
|
-
const signedYear = date.getFullYear();
|
|
3685
|
-
const year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
3686
|
-
return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
|
|
3687
|
-
},
|
|
3688
|
-
// Month
|
|
3689
|
-
M(date, token) {
|
|
3690
|
-
const month = date.getMonth();
|
|
3691
|
-
return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
|
|
3692
|
-
},
|
|
3693
|
-
// Day of the month
|
|
3694
|
-
d(date, token) {
|
|
3695
|
-
return addLeadingZeros(date.getDate(), token.length);
|
|
3696
|
-
},
|
|
3697
|
-
// AM or PM
|
|
3698
|
-
a(date, token) {
|
|
3699
|
-
const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
|
|
3700
|
-
switch (token) {
|
|
3701
|
-
case "a":
|
|
3702
|
-
case "aa":
|
|
3703
|
-
return dayPeriodEnumValue.toUpperCase();
|
|
3704
|
-
case "aaa":
|
|
3705
|
-
return dayPeriodEnumValue;
|
|
3706
|
-
case "aaaaa":
|
|
3707
|
-
return dayPeriodEnumValue[0];
|
|
3708
|
-
case "aaaa":
|
|
3709
|
-
default:
|
|
3710
|
-
return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
|
|
3711
|
-
}
|
|
3712
|
-
},
|
|
3713
|
-
// Hour [1-12]
|
|
3714
|
-
h(date, token) {
|
|
3715
|
-
return addLeadingZeros(date.getHours() % 12 || 12, token.length);
|
|
3716
|
-
},
|
|
3717
|
-
// Hour [0-23]
|
|
3718
|
-
H(date, token) {
|
|
3719
|
-
return addLeadingZeros(date.getHours(), token.length);
|
|
3720
|
-
},
|
|
3721
|
-
// Minute
|
|
3722
|
-
m(date, token) {
|
|
3723
|
-
return addLeadingZeros(date.getMinutes(), token.length);
|
|
3724
|
-
},
|
|
3725
|
-
// Second
|
|
3726
|
-
s(date, token) {
|
|
3727
|
-
return addLeadingZeros(date.getSeconds(), token.length);
|
|
3728
|
-
},
|
|
3729
|
-
// Fraction of second
|
|
3730
|
-
S(date, token) {
|
|
3731
|
-
const numberOfDigits = token.length;
|
|
3732
|
-
const milliseconds = date.getMilliseconds();
|
|
3733
|
-
const fractionalSeconds = Math.trunc(
|
|
3734
|
-
milliseconds * Math.pow(10, numberOfDigits - 3)
|
|
3735
|
-
);
|
|
3736
|
-
return addLeadingZeros(fractionalSeconds, token.length);
|
|
3737
|
-
}
|
|
3738
|
-
};
|
|
3739
|
-
const dayPeriodEnum = {
|
|
3740
|
-
midnight: "midnight",
|
|
3741
|
-
noon: "noon",
|
|
3742
|
-
morning: "morning",
|
|
3743
|
-
afternoon: "afternoon",
|
|
3744
|
-
evening: "evening",
|
|
3745
|
-
night: "night"
|
|
3746
|
-
};
|
|
3747
|
-
const formatters = {
|
|
3748
|
-
// Era
|
|
3749
|
-
G: function(date, token, localize2) {
|
|
3750
|
-
const era = date.getFullYear() > 0 ? 1 : 0;
|
|
3751
|
-
switch (token) {
|
|
3752
|
-
case "G":
|
|
3753
|
-
case "GG":
|
|
3754
|
-
case "GGG":
|
|
3755
|
-
return localize2.era(era, { width: "abbreviated" });
|
|
3756
|
-
case "GGGGG":
|
|
3757
|
-
return localize2.era(era, { width: "narrow" });
|
|
3758
|
-
case "GGGG":
|
|
3759
|
-
default:
|
|
3760
|
-
return localize2.era(era, { width: "wide" });
|
|
3761
|
-
}
|
|
3762
|
-
},
|
|
3763
|
-
// Year
|
|
3764
|
-
y: function(date, token, localize2) {
|
|
3765
|
-
if (token === "yo") {
|
|
3766
|
-
const signedYear = date.getFullYear();
|
|
3767
|
-
const year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
3768
|
-
return localize2.ordinalNumber(year, { unit: "year" });
|
|
3769
|
-
}
|
|
3770
|
-
return lightFormatters.y(date, token);
|
|
3771
|
-
},
|
|
3772
|
-
// Local week-numbering year
|
|
3773
|
-
Y: function(date, token, localize2, options) {
|
|
3774
|
-
const signedWeekYear = getWeekYear(date, options);
|
|
3775
|
-
const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
|
|
3776
|
-
if (token === "YY") {
|
|
3777
|
-
const twoDigitYear = weekYear % 100;
|
|
3778
|
-
return addLeadingZeros(twoDigitYear, 2);
|
|
3779
|
-
}
|
|
3780
|
-
if (token === "Yo") {
|
|
3781
|
-
return localize2.ordinalNumber(weekYear, { unit: "year" });
|
|
3782
|
-
}
|
|
3783
|
-
return addLeadingZeros(weekYear, token.length);
|
|
3784
|
-
},
|
|
3785
|
-
// ISO week-numbering year
|
|
3786
|
-
R: function(date, token) {
|
|
3787
|
-
const isoWeekYear = getISOWeekYear(date);
|
|
3788
|
-
return addLeadingZeros(isoWeekYear, token.length);
|
|
3789
|
-
},
|
|
3790
|
-
// Extended year. This is a single number designating the year of this calendar system.
|
|
3791
|
-
// The main difference between `y` and `u` localizers are B.C. years:
|
|
3792
|
-
// | Year | `y` | `u` |
|
|
3793
|
-
// |------|-----|-----|
|
|
3794
|
-
// | AC 1 | 1 | 1 |
|
|
3795
|
-
// | BC 1 | 1 | 0 |
|
|
3796
|
-
// | BC 2 | 2 | -1 |
|
|
3797
|
-
// Also `yy` always returns the last two digits of a year,
|
|
3798
|
-
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
3799
|
-
u: function(date, token) {
|
|
3800
|
-
const year = date.getFullYear();
|
|
3801
|
-
return addLeadingZeros(year, token.length);
|
|
3802
|
-
},
|
|
3803
|
-
// Quarter
|
|
3804
|
-
Q: function(date, token, localize2) {
|
|
3805
|
-
const quarter = Math.ceil((date.getMonth() + 1) / 3);
|
|
3806
|
-
switch (token) {
|
|
3807
|
-
case "Q":
|
|
3808
|
-
return String(quarter);
|
|
3809
|
-
case "QQ":
|
|
3810
|
-
return addLeadingZeros(quarter, 2);
|
|
3811
|
-
case "Qo":
|
|
3812
|
-
return localize2.ordinalNumber(quarter, { unit: "quarter" });
|
|
3813
|
-
case "QQQ":
|
|
3814
|
-
return localize2.quarter(quarter, {
|
|
3815
|
-
width: "abbreviated",
|
|
3816
|
-
context: "formatting"
|
|
3817
|
-
});
|
|
3818
|
-
case "QQQQQ":
|
|
3819
|
-
return localize2.quarter(quarter, {
|
|
3820
|
-
width: "narrow",
|
|
3821
|
-
context: "formatting"
|
|
3822
|
-
});
|
|
3823
|
-
case "QQQQ":
|
|
3824
|
-
default:
|
|
3825
|
-
return localize2.quarter(quarter, {
|
|
3826
|
-
width: "wide",
|
|
3827
|
-
context: "formatting"
|
|
3828
|
-
});
|
|
3829
|
-
}
|
|
3830
|
-
},
|
|
3831
|
-
// Stand-alone quarter
|
|
3832
|
-
q: function(date, token, localize2) {
|
|
3833
|
-
const quarter = Math.ceil((date.getMonth() + 1) / 3);
|
|
3834
|
-
switch (token) {
|
|
3835
|
-
case "q":
|
|
3836
|
-
return String(quarter);
|
|
3837
|
-
case "qq":
|
|
3838
|
-
return addLeadingZeros(quarter, 2);
|
|
3839
|
-
case "qo":
|
|
3840
|
-
return localize2.ordinalNumber(quarter, { unit: "quarter" });
|
|
3841
|
-
case "qqq":
|
|
3842
|
-
return localize2.quarter(quarter, {
|
|
3843
|
-
width: "abbreviated",
|
|
3844
|
-
context: "standalone"
|
|
3845
|
-
});
|
|
3846
|
-
case "qqqqq":
|
|
3847
|
-
return localize2.quarter(quarter, {
|
|
3848
|
-
width: "narrow",
|
|
3849
|
-
context: "standalone"
|
|
3850
|
-
});
|
|
3851
|
-
case "qqqq":
|
|
3852
|
-
default:
|
|
3853
|
-
return localize2.quarter(quarter, {
|
|
3854
|
-
width: "wide",
|
|
3855
|
-
context: "standalone"
|
|
3856
|
-
});
|
|
3857
|
-
}
|
|
3858
|
-
},
|
|
3859
|
-
// Month
|
|
3860
|
-
M: function(date, token, localize2) {
|
|
3861
|
-
const month = date.getMonth();
|
|
3862
|
-
switch (token) {
|
|
3863
|
-
case "M":
|
|
3864
|
-
case "MM":
|
|
3865
|
-
return lightFormatters.M(date, token);
|
|
3866
|
-
case "Mo":
|
|
3867
|
-
return localize2.ordinalNumber(month + 1, { unit: "month" });
|
|
3868
|
-
case "MMM":
|
|
3869
|
-
return localize2.month(month, {
|
|
3870
|
-
width: "abbreviated",
|
|
3871
|
-
context: "formatting"
|
|
3872
|
-
});
|
|
3873
|
-
case "MMMMM":
|
|
3874
|
-
return localize2.month(month, {
|
|
3875
|
-
width: "narrow",
|
|
3876
|
-
context: "formatting"
|
|
3877
|
-
});
|
|
3878
|
-
case "MMMM":
|
|
3879
|
-
default:
|
|
3880
|
-
return localize2.month(month, { width: "wide", context: "formatting" });
|
|
3881
|
-
}
|
|
3882
|
-
},
|
|
3883
|
-
// Stand-alone month
|
|
3884
|
-
L: function(date, token, localize2) {
|
|
3885
|
-
const month = date.getMonth();
|
|
3886
|
-
switch (token) {
|
|
3887
|
-
case "L":
|
|
3888
|
-
return String(month + 1);
|
|
3889
|
-
case "LL":
|
|
3890
|
-
return addLeadingZeros(month + 1, 2);
|
|
3891
|
-
case "Lo":
|
|
3892
|
-
return localize2.ordinalNumber(month + 1, { unit: "month" });
|
|
3893
|
-
case "LLL":
|
|
3894
|
-
return localize2.month(month, {
|
|
3895
|
-
width: "abbreviated",
|
|
3896
|
-
context: "standalone"
|
|
3897
|
-
});
|
|
3898
|
-
case "LLLLL":
|
|
3899
|
-
return localize2.month(month, {
|
|
3900
|
-
width: "narrow",
|
|
3901
|
-
context: "standalone"
|
|
3902
|
-
});
|
|
3903
|
-
case "LLLL":
|
|
3904
|
-
default:
|
|
3905
|
-
return localize2.month(month, { width: "wide", context: "standalone" });
|
|
3906
|
-
}
|
|
3907
|
-
},
|
|
3908
|
-
// Local week of year
|
|
3909
|
-
w: function(date, token, localize2, options) {
|
|
3910
|
-
const week = getWeek(date, options);
|
|
3911
|
-
if (token === "wo") {
|
|
3912
|
-
return localize2.ordinalNumber(week, { unit: "week" });
|
|
3913
|
-
}
|
|
3914
|
-
return addLeadingZeros(week, token.length);
|
|
3915
|
-
},
|
|
3916
|
-
// ISO week of year
|
|
3917
|
-
I: function(date, token, localize2) {
|
|
3918
|
-
const isoWeek = getISOWeek(date);
|
|
3919
|
-
if (token === "Io") {
|
|
3920
|
-
return localize2.ordinalNumber(isoWeek, { unit: "week" });
|
|
3921
|
-
}
|
|
3922
|
-
return addLeadingZeros(isoWeek, token.length);
|
|
3923
|
-
},
|
|
3924
|
-
// Day of the month
|
|
3925
|
-
d: function(date, token, localize2) {
|
|
3926
|
-
if (token === "do") {
|
|
3927
|
-
return localize2.ordinalNumber(date.getDate(), { unit: "date" });
|
|
3928
|
-
}
|
|
3929
|
-
return lightFormatters.d(date, token);
|
|
3930
|
-
},
|
|
3931
|
-
// Day of year
|
|
3932
|
-
D: function(date, token, localize2) {
|
|
3933
|
-
const dayOfYear = getDayOfYear(date);
|
|
3934
|
-
if (token === "Do") {
|
|
3935
|
-
return localize2.ordinalNumber(dayOfYear, { unit: "dayOfYear" });
|
|
3936
|
-
}
|
|
3937
|
-
return addLeadingZeros(dayOfYear, token.length);
|
|
3938
|
-
},
|
|
3939
|
-
// Day of week
|
|
3940
|
-
E: function(date, token, localize2) {
|
|
3941
|
-
const dayOfWeek = date.getDay();
|
|
3942
|
-
switch (token) {
|
|
3943
|
-
case "E":
|
|
3944
|
-
case "EE":
|
|
3945
|
-
case "EEE":
|
|
3946
|
-
return localize2.day(dayOfWeek, {
|
|
3947
|
-
width: "abbreviated",
|
|
3948
|
-
context: "formatting"
|
|
3949
|
-
});
|
|
3950
|
-
case "EEEEE":
|
|
3951
|
-
return localize2.day(dayOfWeek, {
|
|
3952
|
-
width: "narrow",
|
|
3953
|
-
context: "formatting"
|
|
3954
|
-
});
|
|
3955
|
-
case "EEEEEE":
|
|
3956
|
-
return localize2.day(dayOfWeek, {
|
|
3957
|
-
width: "short",
|
|
3958
|
-
context: "formatting"
|
|
3959
|
-
});
|
|
3960
|
-
case "EEEE":
|
|
3961
|
-
default:
|
|
3962
|
-
return localize2.day(dayOfWeek, {
|
|
3963
|
-
width: "wide",
|
|
3964
|
-
context: "formatting"
|
|
3965
|
-
});
|
|
3966
|
-
}
|
|
3967
|
-
},
|
|
3968
|
-
// Local day of week
|
|
3969
|
-
e: function(date, token, localize2, options) {
|
|
3970
|
-
const dayOfWeek = date.getDay();
|
|
3971
|
-
const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
3972
|
-
switch (token) {
|
|
3973
|
-
case "e":
|
|
3974
|
-
return String(localDayOfWeek);
|
|
3975
|
-
case "ee":
|
|
3976
|
-
return addLeadingZeros(localDayOfWeek, 2);
|
|
3977
|
-
case "eo":
|
|
3978
|
-
return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
|
|
3979
|
-
case "eee":
|
|
3980
|
-
return localize2.day(dayOfWeek, {
|
|
3981
|
-
width: "abbreviated",
|
|
3982
|
-
context: "formatting"
|
|
3983
|
-
});
|
|
3984
|
-
case "eeeee":
|
|
3985
|
-
return localize2.day(dayOfWeek, {
|
|
3986
|
-
width: "narrow",
|
|
3987
|
-
context: "formatting"
|
|
3988
|
-
});
|
|
3989
|
-
case "eeeeee":
|
|
3990
|
-
return localize2.day(dayOfWeek, {
|
|
3991
|
-
width: "short",
|
|
3992
|
-
context: "formatting"
|
|
3993
|
-
});
|
|
3994
|
-
case "eeee":
|
|
3995
|
-
default:
|
|
3996
|
-
return localize2.day(dayOfWeek, {
|
|
3997
|
-
width: "wide",
|
|
3998
|
-
context: "formatting"
|
|
3999
|
-
});
|
|
4000
|
-
}
|
|
4001
|
-
},
|
|
4002
|
-
// Stand-alone local day of week
|
|
4003
|
-
c: function(date, token, localize2, options) {
|
|
4004
|
-
const dayOfWeek = date.getDay();
|
|
4005
|
-
const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
4006
|
-
switch (token) {
|
|
4007
|
-
case "c":
|
|
4008
|
-
return String(localDayOfWeek);
|
|
4009
|
-
case "cc":
|
|
4010
|
-
return addLeadingZeros(localDayOfWeek, token.length);
|
|
4011
|
-
case "co":
|
|
4012
|
-
return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
|
|
4013
|
-
case "ccc":
|
|
4014
|
-
return localize2.day(dayOfWeek, {
|
|
4015
|
-
width: "abbreviated",
|
|
4016
|
-
context: "standalone"
|
|
4017
|
-
});
|
|
4018
|
-
case "ccccc":
|
|
4019
|
-
return localize2.day(dayOfWeek, {
|
|
4020
|
-
width: "narrow",
|
|
4021
|
-
context: "standalone"
|
|
4022
|
-
});
|
|
4023
|
-
case "cccccc":
|
|
4024
|
-
return localize2.day(dayOfWeek, {
|
|
4025
|
-
width: "short",
|
|
4026
|
-
context: "standalone"
|
|
4027
|
-
});
|
|
4028
|
-
case "cccc":
|
|
4029
|
-
default:
|
|
4030
|
-
return localize2.day(dayOfWeek, {
|
|
4031
|
-
width: "wide",
|
|
4032
|
-
context: "standalone"
|
|
4033
|
-
});
|
|
4034
|
-
}
|
|
4035
|
-
},
|
|
4036
|
-
// ISO day of week
|
|
4037
|
-
i: function(date, token, localize2) {
|
|
4038
|
-
const dayOfWeek = date.getDay();
|
|
4039
|
-
const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
|
|
4040
|
-
switch (token) {
|
|
4041
|
-
case "i":
|
|
4042
|
-
return String(isoDayOfWeek);
|
|
4043
|
-
case "ii":
|
|
4044
|
-
return addLeadingZeros(isoDayOfWeek, token.length);
|
|
4045
|
-
case "io":
|
|
4046
|
-
return localize2.ordinalNumber(isoDayOfWeek, { unit: "day" });
|
|
4047
|
-
case "iii":
|
|
4048
|
-
return localize2.day(dayOfWeek, {
|
|
4049
|
-
width: "abbreviated",
|
|
4050
|
-
context: "formatting"
|
|
4051
|
-
});
|
|
4052
|
-
case "iiiii":
|
|
4053
|
-
return localize2.day(dayOfWeek, {
|
|
4054
|
-
width: "narrow",
|
|
4055
|
-
context: "formatting"
|
|
4056
|
-
});
|
|
4057
|
-
case "iiiiii":
|
|
4058
|
-
return localize2.day(dayOfWeek, {
|
|
4059
|
-
width: "short",
|
|
4060
|
-
context: "formatting"
|
|
4061
|
-
});
|
|
4062
|
-
case "iiii":
|
|
4063
|
-
default:
|
|
4064
|
-
return localize2.day(dayOfWeek, {
|
|
4065
|
-
width: "wide",
|
|
4066
|
-
context: "formatting"
|
|
4067
|
-
});
|
|
4068
|
-
}
|
|
4069
|
-
},
|
|
4070
|
-
// AM or PM
|
|
4071
|
-
a: function(date, token, localize2) {
|
|
4072
|
-
const hours = date.getHours();
|
|
4073
|
-
const dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
|
|
4074
|
-
switch (token) {
|
|
4075
|
-
case "a":
|
|
4076
|
-
case "aa":
|
|
4077
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4078
|
-
width: "abbreviated",
|
|
4079
|
-
context: "formatting"
|
|
4080
|
-
});
|
|
4081
|
-
case "aaa":
|
|
4082
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4083
|
-
width: "abbreviated",
|
|
4084
|
-
context: "formatting"
|
|
4085
|
-
}).toLowerCase();
|
|
4086
|
-
case "aaaaa":
|
|
4087
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4088
|
-
width: "narrow",
|
|
4089
|
-
context: "formatting"
|
|
4090
|
-
});
|
|
4091
|
-
case "aaaa":
|
|
4092
|
-
default:
|
|
4093
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4094
|
-
width: "wide",
|
|
4095
|
-
context: "formatting"
|
|
4096
|
-
});
|
|
4097
|
-
}
|
|
4098
|
-
},
|
|
4099
|
-
// AM, PM, midnight, noon
|
|
4100
|
-
b: function(date, token, localize2) {
|
|
4101
|
-
const hours = date.getHours();
|
|
4102
|
-
let dayPeriodEnumValue;
|
|
4103
|
-
if (hours === 12) {
|
|
4104
|
-
dayPeriodEnumValue = dayPeriodEnum.noon;
|
|
4105
|
-
} else if (hours === 0) {
|
|
4106
|
-
dayPeriodEnumValue = dayPeriodEnum.midnight;
|
|
4107
|
-
} else {
|
|
4108
|
-
dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
|
|
4109
|
-
}
|
|
4110
|
-
switch (token) {
|
|
4111
|
-
case "b":
|
|
4112
|
-
case "bb":
|
|
4113
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4114
|
-
width: "abbreviated",
|
|
4115
|
-
context: "formatting"
|
|
4116
|
-
});
|
|
4117
|
-
case "bbb":
|
|
4118
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4119
|
-
width: "abbreviated",
|
|
4120
|
-
context: "formatting"
|
|
4121
|
-
}).toLowerCase();
|
|
4122
|
-
case "bbbbb":
|
|
4123
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4124
|
-
width: "narrow",
|
|
4125
|
-
context: "formatting"
|
|
4126
|
-
});
|
|
4127
|
-
case "bbbb":
|
|
4128
|
-
default:
|
|
4129
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4130
|
-
width: "wide",
|
|
4131
|
-
context: "formatting"
|
|
4132
|
-
});
|
|
4133
|
-
}
|
|
4134
|
-
},
|
|
4135
|
-
// in the morning, in the afternoon, in the evening, at night
|
|
4136
|
-
B: function(date, token, localize2) {
|
|
4137
|
-
const hours = date.getHours();
|
|
4138
|
-
let dayPeriodEnumValue;
|
|
4139
|
-
if (hours >= 17) {
|
|
4140
|
-
dayPeriodEnumValue = dayPeriodEnum.evening;
|
|
4141
|
-
} else if (hours >= 12) {
|
|
4142
|
-
dayPeriodEnumValue = dayPeriodEnum.afternoon;
|
|
4143
|
-
} else if (hours >= 4) {
|
|
4144
|
-
dayPeriodEnumValue = dayPeriodEnum.morning;
|
|
4145
|
-
} else {
|
|
4146
|
-
dayPeriodEnumValue = dayPeriodEnum.night;
|
|
4147
|
-
}
|
|
4148
|
-
switch (token) {
|
|
4149
|
-
case "B":
|
|
4150
|
-
case "BB":
|
|
4151
|
-
case "BBB":
|
|
4152
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4153
|
-
width: "abbreviated",
|
|
4154
|
-
context: "formatting"
|
|
4155
|
-
});
|
|
4156
|
-
case "BBBBB":
|
|
4157
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4158
|
-
width: "narrow",
|
|
4159
|
-
context: "formatting"
|
|
4160
|
-
});
|
|
4161
|
-
case "BBBB":
|
|
4162
|
-
default:
|
|
4163
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4164
|
-
width: "wide",
|
|
4165
|
-
context: "formatting"
|
|
4166
|
-
});
|
|
4167
|
-
}
|
|
4168
|
-
},
|
|
4169
|
-
// Hour [1-12]
|
|
4170
|
-
h: function(date, token, localize2) {
|
|
4171
|
-
if (token === "ho") {
|
|
4172
|
-
let hours = date.getHours() % 12;
|
|
4173
|
-
if (hours === 0) hours = 12;
|
|
4174
|
-
return localize2.ordinalNumber(hours, { unit: "hour" });
|
|
4175
|
-
}
|
|
4176
|
-
return lightFormatters.h(date, token);
|
|
4177
|
-
},
|
|
4178
|
-
// Hour [0-23]
|
|
4179
|
-
H: function(date, token, localize2) {
|
|
4180
|
-
if (token === "Ho") {
|
|
4181
|
-
return localize2.ordinalNumber(date.getHours(), { unit: "hour" });
|
|
4182
|
-
}
|
|
4183
|
-
return lightFormatters.H(date, token);
|
|
4184
|
-
},
|
|
4185
|
-
// Hour [0-11]
|
|
4186
|
-
K: function(date, token, localize2) {
|
|
4187
|
-
const hours = date.getHours() % 12;
|
|
4188
|
-
if (token === "Ko") {
|
|
4189
|
-
return localize2.ordinalNumber(hours, { unit: "hour" });
|
|
4190
|
-
}
|
|
4191
|
-
return addLeadingZeros(hours, token.length);
|
|
4192
|
-
},
|
|
4193
|
-
// Hour [1-24]
|
|
4194
|
-
k: function(date, token, localize2) {
|
|
4195
|
-
let hours = date.getHours();
|
|
4196
|
-
if (hours === 0) hours = 24;
|
|
4197
|
-
if (token === "ko") {
|
|
4198
|
-
return localize2.ordinalNumber(hours, { unit: "hour" });
|
|
4199
|
-
}
|
|
4200
|
-
return addLeadingZeros(hours, token.length);
|
|
4201
|
-
},
|
|
4202
|
-
// Minute
|
|
4203
|
-
m: function(date, token, localize2) {
|
|
4204
|
-
if (token === "mo") {
|
|
4205
|
-
return localize2.ordinalNumber(date.getMinutes(), { unit: "minute" });
|
|
4206
|
-
}
|
|
4207
|
-
return lightFormatters.m(date, token);
|
|
4208
|
-
},
|
|
4209
|
-
// Second
|
|
4210
|
-
s: function(date, token, localize2) {
|
|
4211
|
-
if (token === "so") {
|
|
4212
|
-
return localize2.ordinalNumber(date.getSeconds(), { unit: "second" });
|
|
4213
|
-
}
|
|
4214
|
-
return lightFormatters.s(date, token);
|
|
4215
|
-
},
|
|
4216
|
-
// Fraction of second
|
|
4217
|
-
S: function(date, token) {
|
|
4218
|
-
return lightFormatters.S(date, token);
|
|
4219
|
-
},
|
|
4220
|
-
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
4221
|
-
X: function(date, token, _localize) {
|
|
4222
|
-
const timezoneOffset = date.getTimezoneOffset();
|
|
4223
|
-
if (timezoneOffset === 0) {
|
|
4224
|
-
return "Z";
|
|
4225
|
-
}
|
|
4226
|
-
switch (token) {
|
|
4227
|
-
case "X":
|
|
4228
|
-
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
4229
|
-
case "XXXX":
|
|
4230
|
-
case "XX":
|
|
4231
|
-
return formatTimezone(timezoneOffset);
|
|
4232
|
-
case "XXXXX":
|
|
4233
|
-
case "XXX":
|
|
4234
|
-
default:
|
|
4235
|
-
return formatTimezone(timezoneOffset, ":");
|
|
4236
|
-
}
|
|
4237
|
-
},
|
|
4238
|
-
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
4239
|
-
x: function(date, token, _localize) {
|
|
4240
|
-
const timezoneOffset = date.getTimezoneOffset();
|
|
4241
|
-
switch (token) {
|
|
4242
|
-
case "x":
|
|
4243
|
-
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
4244
|
-
case "xxxx":
|
|
4245
|
-
case "xx":
|
|
4246
|
-
return formatTimezone(timezoneOffset);
|
|
4247
|
-
case "xxxxx":
|
|
4248
|
-
case "xxx":
|
|
4249
|
-
default:
|
|
4250
|
-
return formatTimezone(timezoneOffset, ":");
|
|
4251
|
-
}
|
|
4252
|
-
},
|
|
4253
|
-
// Timezone (GMT)
|
|
4254
|
-
O: function(date, token, _localize) {
|
|
4255
|
-
const timezoneOffset = date.getTimezoneOffset();
|
|
4256
|
-
switch (token) {
|
|
4257
|
-
case "O":
|
|
4258
|
-
case "OO":
|
|
4259
|
-
case "OOO":
|
|
4260
|
-
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
|
4261
|
-
case "OOOO":
|
|
4262
|
-
default:
|
|
4263
|
-
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
4264
|
-
}
|
|
4265
|
-
},
|
|
4266
|
-
// Timezone (specific non-location)
|
|
4267
|
-
z: function(date, token, _localize) {
|
|
4268
|
-
const timezoneOffset = date.getTimezoneOffset();
|
|
4269
|
-
switch (token) {
|
|
4270
|
-
case "z":
|
|
4271
|
-
case "zz":
|
|
4272
|
-
case "zzz":
|
|
4273
|
-
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
|
4274
|
-
case "zzzz":
|
|
4275
|
-
default:
|
|
4276
|
-
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
4277
|
-
}
|
|
4278
|
-
},
|
|
4279
|
-
// Seconds timestamp
|
|
4280
|
-
t: function(date, token, _localize) {
|
|
4281
|
-
const timestamp = Math.trunc(date.getTime() / 1e3);
|
|
4282
|
-
return addLeadingZeros(timestamp, token.length);
|
|
4283
|
-
},
|
|
4284
|
-
// Milliseconds timestamp
|
|
4285
|
-
T: function(date, token, _localize) {
|
|
4286
|
-
const timestamp = date.getTime();
|
|
4287
|
-
return addLeadingZeros(timestamp, token.length);
|
|
4288
|
-
}
|
|
4289
|
-
};
|
|
4290
|
-
function formatTimezoneShort(offset, delimiter = "") {
|
|
4291
|
-
const sign = offset > 0 ? "-" : "+";
|
|
4292
|
-
const absOffset = Math.abs(offset);
|
|
4293
|
-
const hours = Math.trunc(absOffset / 60);
|
|
4294
|
-
const minutes = absOffset % 60;
|
|
4295
|
-
if (minutes === 0) {
|
|
4296
|
-
return sign + String(hours);
|
|
4297
|
-
}
|
|
4298
|
-
return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
|
|
4299
|
-
}
|
|
4300
|
-
function formatTimezoneWithOptionalMinutes(offset, delimiter) {
|
|
4301
|
-
if (offset % 60 === 0) {
|
|
4302
|
-
const sign = offset > 0 ? "-" : "+";
|
|
4303
|
-
return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
|
|
4304
|
-
}
|
|
4305
|
-
return formatTimezone(offset, delimiter);
|
|
4306
|
-
}
|
|
4307
|
-
function formatTimezone(offset, delimiter = "") {
|
|
4308
|
-
const sign = offset > 0 ? "-" : "+";
|
|
4309
|
-
const absOffset = Math.abs(offset);
|
|
4310
|
-
const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);
|
|
4311
|
-
const minutes = addLeadingZeros(absOffset % 60, 2);
|
|
4312
|
-
return sign + hours + delimiter + minutes;
|
|
4313
|
-
}
|
|
4314
|
-
const dateLongFormatter = (pattern, formatLong2) => {
|
|
4315
|
-
switch (pattern) {
|
|
4316
|
-
case "P":
|
|
4317
|
-
return formatLong2.date({ width: "short" });
|
|
4318
|
-
case "PP":
|
|
4319
|
-
return formatLong2.date({ width: "medium" });
|
|
4320
|
-
case "PPP":
|
|
4321
|
-
return formatLong2.date({ width: "long" });
|
|
4322
|
-
case "PPPP":
|
|
4323
|
-
default:
|
|
4324
|
-
return formatLong2.date({ width: "full" });
|
|
4325
|
-
}
|
|
4326
|
-
};
|
|
4327
|
-
const timeLongFormatter = (pattern, formatLong2) => {
|
|
4328
|
-
switch (pattern) {
|
|
4329
|
-
case "p":
|
|
4330
|
-
return formatLong2.time({ width: "short" });
|
|
4331
|
-
case "pp":
|
|
4332
|
-
return formatLong2.time({ width: "medium" });
|
|
4333
|
-
case "ppp":
|
|
4334
|
-
return formatLong2.time({ width: "long" });
|
|
4335
|
-
case "pppp":
|
|
4336
|
-
default:
|
|
4337
|
-
return formatLong2.time({ width: "full" });
|
|
4338
|
-
}
|
|
4339
|
-
};
|
|
4340
|
-
const dateTimeLongFormatter = (pattern, formatLong2) => {
|
|
4341
|
-
const matchResult = pattern.match(/(P+)(p+)?/) || [];
|
|
4342
|
-
const datePattern = matchResult[1];
|
|
4343
|
-
const timePattern = matchResult[2];
|
|
4344
|
-
if (!timePattern) {
|
|
4345
|
-
return dateLongFormatter(pattern, formatLong2);
|
|
4346
|
-
}
|
|
4347
|
-
let dateTimeFormat;
|
|
4348
|
-
switch (datePattern) {
|
|
4349
|
-
case "P":
|
|
4350
|
-
dateTimeFormat = formatLong2.dateTime({ width: "short" });
|
|
4351
|
-
break;
|
|
4352
|
-
case "PP":
|
|
4353
|
-
dateTimeFormat = formatLong2.dateTime({ width: "medium" });
|
|
4354
|
-
break;
|
|
4355
|
-
case "PPP":
|
|
4356
|
-
dateTimeFormat = formatLong2.dateTime({ width: "long" });
|
|
4357
|
-
break;
|
|
4358
|
-
case "PPPP":
|
|
4359
|
-
default:
|
|
4360
|
-
dateTimeFormat = formatLong2.dateTime({ width: "full" });
|
|
4361
|
-
break;
|
|
4362
|
-
}
|
|
4363
|
-
return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
|
|
4364
|
-
};
|
|
4365
|
-
const longFormatters = {
|
|
4366
|
-
p: timeLongFormatter,
|
|
4367
|
-
P: dateTimeLongFormatter
|
|
4368
|
-
};
|
|
4369
|
-
const dayOfYearTokenRE = /^D+$/;
|
|
4370
|
-
const weekYearTokenRE = /^Y+$/;
|
|
4371
|
-
const throwTokens = ["D", "DD", "YY", "YYYY"];
|
|
4372
|
-
function isProtectedDayOfYearToken(token) {
|
|
4373
|
-
return dayOfYearTokenRE.test(token);
|
|
4374
|
-
}
|
|
4375
|
-
function isProtectedWeekYearToken(token) {
|
|
4376
|
-
return weekYearTokenRE.test(token);
|
|
4377
|
-
}
|
|
4378
|
-
function warnOrThrowProtectedError(token, format2, input) {
|
|
4379
|
-
const _message = message(token, format2, input);
|
|
4380
|
-
console.warn(_message);
|
|
4381
|
-
if (throwTokens.includes(token)) throw new RangeError(_message);
|
|
4382
|
-
}
|
|
4383
|
-
function message(token, format2, input) {
|
|
4384
|
-
const subject = token[0] === "Y" ? "years" : "days of the month";
|
|
4385
|
-
return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format2}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
4386
|
-
}
|
|
4387
|
-
const formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
|
|
4388
|
-
const longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
|
|
4389
|
-
const escapedStringRegExp = /^'([^]*?)'?$/;
|
|
4390
|
-
const doubleQuoteRegExp = /''/g;
|
|
4391
|
-
const unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
4392
|
-
function format(date, formatStr, options) {
|
|
4393
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
4394
|
-
const defaultOptions2 = getDefaultOptions();
|
|
4395
|
-
const locale = (options == null ? void 0 : options.locale) ?? defaultOptions2.locale ?? enUS;
|
|
4396
|
-
const firstWeekContainsDate = (options == null ? void 0 : options.firstWeekContainsDate) ?? ((_b = (_a = options == null ? void 0 : options.locale) == null ? void 0 : _a.options) == null ? void 0 : _b.firstWeekContainsDate) ?? defaultOptions2.firstWeekContainsDate ?? ((_d = (_c = defaultOptions2.locale) == null ? void 0 : _c.options) == null ? void 0 : _d.firstWeekContainsDate) ?? 1;
|
|
4397
|
-
const weekStartsOn = (options == null ? void 0 : options.weekStartsOn) ?? ((_f = (_e = options == null ? void 0 : options.locale) == null ? void 0 : _e.options) == null ? void 0 : _f.weekStartsOn) ?? defaultOptions2.weekStartsOn ?? ((_h = (_g = defaultOptions2.locale) == null ? void 0 : _g.options) == null ? void 0 : _h.weekStartsOn) ?? 0;
|
|
4398
|
-
const originalDate = toDate(date);
|
|
4399
|
-
if (!isValid(originalDate)) {
|
|
4400
|
-
throw new RangeError("Invalid time value");
|
|
4401
|
-
}
|
|
4402
|
-
let parts = formatStr.match(longFormattingTokensRegExp).map((substring) => {
|
|
4403
|
-
const firstCharacter = substring[0];
|
|
4404
|
-
if (firstCharacter === "p" || firstCharacter === "P") {
|
|
4405
|
-
const longFormatter = longFormatters[firstCharacter];
|
|
4406
|
-
return longFormatter(substring, locale.formatLong);
|
|
4407
|
-
}
|
|
4408
|
-
return substring;
|
|
4409
|
-
}).join("").match(formattingTokensRegExp).map((substring) => {
|
|
4410
|
-
if (substring === "''") {
|
|
4411
|
-
return { isToken: false, value: "'" };
|
|
4412
|
-
}
|
|
4413
|
-
const firstCharacter = substring[0];
|
|
4414
|
-
if (firstCharacter === "'") {
|
|
4415
|
-
return { isToken: false, value: cleanEscapedString(substring) };
|
|
4416
|
-
}
|
|
4417
|
-
if (formatters[firstCharacter]) {
|
|
4418
|
-
return { isToken: true, value: substring };
|
|
4419
|
-
}
|
|
4420
|
-
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
|
|
4421
|
-
throw new RangeError(
|
|
4422
|
-
"Format string contains an unescaped latin alphabet character `" + firstCharacter + "`"
|
|
4423
|
-
);
|
|
4424
|
-
}
|
|
4425
|
-
return { isToken: false, value: substring };
|
|
4426
|
-
});
|
|
4427
|
-
if (locale.localize.preprocessor) {
|
|
4428
|
-
parts = locale.localize.preprocessor(originalDate, parts);
|
|
4429
|
-
}
|
|
4430
|
-
const formatterOptions = {
|
|
4431
|
-
firstWeekContainsDate,
|
|
4432
|
-
weekStartsOn,
|
|
4433
|
-
locale
|
|
4434
|
-
};
|
|
4435
|
-
return parts.map((part) => {
|
|
4436
|
-
if (!part.isToken) return part.value;
|
|
4437
|
-
const token = part.value;
|
|
4438
|
-
if (!(options == null ? void 0 : options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(token) || !(options == null ? void 0 : options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(token)) {
|
|
4439
|
-
warnOrThrowProtectedError(token, formatStr, String(date));
|
|
4440
|
-
}
|
|
4441
|
-
const formatter = formatters[token[0]];
|
|
4442
|
-
return formatter(originalDate, token, locale.localize, formatterOptions);
|
|
4443
|
-
}).join("");
|
|
4444
|
-
}
|
|
4445
|
-
function cleanEscapedString(input) {
|
|
4446
|
-
const matched = input.match(escapedStringRegExp);
|
|
4447
|
-
if (!matched) {
|
|
4448
|
-
return input;
|
|
4449
|
-
}
|
|
4450
|
-
return matched[1].replace(doubleQuoteRegExp, "'");
|
|
4451
|
-
}
|
|
4452
|
-
function isSameWeek(dateLeft, dateRight, options) {
|
|
4453
|
-
const dateLeftStartOfWeek = startOfWeek(dateLeft, options);
|
|
4454
|
-
const dateRightStartOfWeek = startOfWeek(dateRight, options);
|
|
4455
|
-
return +dateLeftStartOfWeek === +dateRightStartOfWeek;
|
|
4456
|
-
}
|
|
4457
|
-
const formatDistanceLocale$1 = {
|
|
4458
|
-
lessThanXSeconds: {
|
|
4459
|
-
standalone: {
|
|
4460
|
-
one: "weniger als 1 Sekunde",
|
|
4461
|
-
other: "weniger als {{count}} Sekunden"
|
|
4462
|
-
},
|
|
4463
|
-
withPreposition: {
|
|
4464
|
-
one: "weniger als 1 Sekunde",
|
|
4465
|
-
other: "weniger als {{count}} Sekunden"
|
|
4466
|
-
}
|
|
4467
|
-
},
|
|
4468
|
-
xSeconds: {
|
|
4469
|
-
standalone: {
|
|
4470
|
-
one: "1 Sekunde",
|
|
4471
|
-
other: "{{count}} Sekunden"
|
|
4472
|
-
},
|
|
4473
|
-
withPreposition: {
|
|
4474
|
-
one: "1 Sekunde",
|
|
4475
|
-
other: "{{count}} Sekunden"
|
|
4476
|
-
}
|
|
4477
|
-
},
|
|
4478
|
-
halfAMinute: {
|
|
4479
|
-
standalone: "eine halbe Minute",
|
|
4480
|
-
withPreposition: "einer halben Minute"
|
|
4481
|
-
},
|
|
4482
|
-
lessThanXMinutes: {
|
|
4483
|
-
standalone: {
|
|
4484
|
-
one: "weniger als 1 Minute",
|
|
4485
|
-
other: "weniger als {{count}} Minuten"
|
|
4486
|
-
},
|
|
4487
|
-
withPreposition: {
|
|
4488
|
-
one: "weniger als 1 Minute",
|
|
4489
|
-
other: "weniger als {{count}} Minuten"
|
|
4490
|
-
}
|
|
4491
|
-
},
|
|
4492
|
-
xMinutes: {
|
|
4493
|
-
standalone: {
|
|
4494
|
-
one: "1 Minute",
|
|
4495
|
-
other: "{{count}} Minuten"
|
|
4496
|
-
},
|
|
4497
|
-
withPreposition: {
|
|
4498
|
-
one: "1 Minute",
|
|
4499
|
-
other: "{{count}} Minuten"
|
|
4500
|
-
}
|
|
4501
|
-
},
|
|
4502
|
-
aboutXHours: {
|
|
4503
|
-
standalone: {
|
|
4504
|
-
one: "etwa 1 Stunde",
|
|
4505
|
-
other: "etwa {{count}} Stunden"
|
|
4506
|
-
},
|
|
4507
|
-
withPreposition: {
|
|
4508
|
-
one: "etwa 1 Stunde",
|
|
4509
|
-
other: "etwa {{count}} Stunden"
|
|
4510
|
-
}
|
|
4511
|
-
},
|
|
4512
|
-
xHours: {
|
|
4513
|
-
standalone: {
|
|
4514
|
-
one: "1 Stunde",
|
|
4515
|
-
other: "{{count}} Stunden"
|
|
4516
|
-
},
|
|
4517
|
-
withPreposition: {
|
|
4518
|
-
one: "1 Stunde",
|
|
4519
|
-
other: "{{count}} Stunden"
|
|
4520
|
-
}
|
|
4521
|
-
},
|
|
4522
|
-
xDays: {
|
|
4523
|
-
standalone: {
|
|
4524
|
-
one: "1 Tag",
|
|
4525
|
-
other: "{{count}} Tage"
|
|
4526
|
-
},
|
|
4527
|
-
withPreposition: {
|
|
4528
|
-
one: "1 Tag",
|
|
4529
|
-
other: "{{count}} Tagen"
|
|
4530
|
-
}
|
|
4531
|
-
},
|
|
4532
|
-
aboutXWeeks: {
|
|
4533
|
-
standalone: {
|
|
4534
|
-
one: "etwa 1 Woche",
|
|
4535
|
-
other: "etwa {{count}} Wochen"
|
|
4536
|
-
},
|
|
4537
|
-
withPreposition: {
|
|
4538
|
-
one: "etwa 1 Woche",
|
|
4539
|
-
other: "etwa {{count}} Wochen"
|
|
4540
|
-
}
|
|
4541
|
-
},
|
|
4542
|
-
xWeeks: {
|
|
4543
|
-
standalone: {
|
|
4544
|
-
one: "1 Woche",
|
|
4545
|
-
other: "{{count}} Wochen"
|
|
4546
|
-
},
|
|
4547
|
-
withPreposition: {
|
|
4548
|
-
one: "1 Woche",
|
|
4549
|
-
other: "{{count}} Wochen"
|
|
4550
|
-
}
|
|
4551
|
-
},
|
|
4552
|
-
aboutXMonths: {
|
|
4553
|
-
standalone: {
|
|
4554
|
-
one: "etwa 1 Monat",
|
|
4555
|
-
other: "etwa {{count}} Monate"
|
|
4556
|
-
},
|
|
4557
|
-
withPreposition: {
|
|
4558
|
-
one: "etwa 1 Monat",
|
|
4559
|
-
other: "etwa {{count}} Monaten"
|
|
4560
|
-
}
|
|
4561
|
-
},
|
|
4562
|
-
xMonths: {
|
|
4563
|
-
standalone: {
|
|
4564
|
-
one: "1 Monat",
|
|
4565
|
-
other: "{{count}} Monate"
|
|
4566
|
-
},
|
|
4567
|
-
withPreposition: {
|
|
4568
|
-
one: "1 Monat",
|
|
4569
|
-
other: "{{count}} Monaten"
|
|
4570
|
-
}
|
|
4571
|
-
},
|
|
4572
|
-
aboutXYears: {
|
|
4573
|
-
standalone: {
|
|
4574
|
-
one: "etwa 1 Jahr",
|
|
4575
|
-
other: "etwa {{count}} Jahre"
|
|
4576
|
-
},
|
|
4577
|
-
withPreposition: {
|
|
4578
|
-
one: "etwa 1 Jahr",
|
|
4579
|
-
other: "etwa {{count}} Jahren"
|
|
4580
|
-
}
|
|
4581
|
-
},
|
|
4582
|
-
xYears: {
|
|
4583
|
-
standalone: {
|
|
4584
|
-
one: "1 Jahr",
|
|
4585
|
-
other: "{{count}} Jahre"
|
|
4586
|
-
},
|
|
4587
|
-
withPreposition: {
|
|
4588
|
-
one: "1 Jahr",
|
|
4589
|
-
other: "{{count}} Jahren"
|
|
4590
|
-
}
|
|
4591
|
-
},
|
|
4592
|
-
overXYears: {
|
|
4593
|
-
standalone: {
|
|
4594
|
-
one: "mehr als 1 Jahr",
|
|
4595
|
-
other: "mehr als {{count}} Jahre"
|
|
4596
|
-
},
|
|
4597
|
-
withPreposition: {
|
|
4598
|
-
one: "mehr als 1 Jahr",
|
|
4599
|
-
other: "mehr als {{count}} Jahren"
|
|
4600
|
-
}
|
|
4601
|
-
},
|
|
4602
|
-
almostXYears: {
|
|
4603
|
-
standalone: {
|
|
4604
|
-
one: "fast 1 Jahr",
|
|
4605
|
-
other: "fast {{count}} Jahre"
|
|
4606
|
-
},
|
|
4607
|
-
withPreposition: {
|
|
4608
|
-
one: "fast 1 Jahr",
|
|
4609
|
-
other: "fast {{count}} Jahren"
|
|
4610
|
-
}
|
|
4611
|
-
}
|
|
4612
|
-
};
|
|
4613
|
-
const formatDistance$1 = (token, count, options) => {
|
|
4614
|
-
let result;
|
|
4615
|
-
const tokenValue = (options == null ? void 0 : options.addSuffix) ? formatDistanceLocale$1[token].withPreposition : formatDistanceLocale$1[token].standalone;
|
|
4616
|
-
if (typeof tokenValue === "string") {
|
|
4617
|
-
result = tokenValue;
|
|
4618
|
-
} else if (count === 1) {
|
|
4619
|
-
result = tokenValue.one;
|
|
4620
|
-
} else {
|
|
4621
|
-
result = tokenValue.other.replace("{{count}}", String(count));
|
|
4622
|
-
}
|
|
4623
|
-
if (options == null ? void 0 : options.addSuffix) {
|
|
4624
|
-
if (options.comparison && options.comparison > 0) {
|
|
4625
|
-
return "in " + result;
|
|
4626
|
-
} else {
|
|
4627
|
-
return "vor " + result;
|
|
4628
|
-
}
|
|
4629
|
-
}
|
|
4630
|
-
return result;
|
|
4631
|
-
};
|
|
4632
|
-
const dateFormats$1 = {
|
|
4633
|
-
full: "EEEE, do MMMM y",
|
|
4634
|
-
// Montag, 7. Januar 2018
|
|
4635
|
-
long: "do MMMM y",
|
|
4636
|
-
// 7. Januar 2018
|
|
4637
|
-
medium: "do MMM y",
|
|
4638
|
-
// 7. Jan. 2018
|
|
4639
|
-
short: "dd.MM.y"
|
|
4640
|
-
// 07.01.2018
|
|
4641
|
-
};
|
|
4642
|
-
const timeFormats$1 = {
|
|
4643
|
-
full: "HH:mm:ss zzzz",
|
|
4644
|
-
long: "HH:mm:ss z",
|
|
4645
|
-
medium: "HH:mm:ss",
|
|
4646
|
-
short: "HH:mm"
|
|
4647
|
-
};
|
|
4648
|
-
const dateTimeFormats$1 = {
|
|
4649
|
-
full: "{{date}} 'um' {{time}}",
|
|
4650
|
-
long: "{{date}} 'um' {{time}}",
|
|
4651
|
-
medium: "{{date}} {{time}}",
|
|
4652
|
-
short: "{{date}} {{time}}"
|
|
4653
|
-
};
|
|
4654
|
-
const formatLong$1 = {
|
|
4655
|
-
date: buildFormatLongFn({
|
|
4656
|
-
formats: dateFormats$1,
|
|
4657
|
-
defaultWidth: "full"
|
|
4658
|
-
}),
|
|
4659
|
-
time: buildFormatLongFn({
|
|
4660
|
-
formats: timeFormats$1,
|
|
4661
|
-
defaultWidth: "full"
|
|
4662
|
-
}),
|
|
4663
|
-
dateTime: buildFormatLongFn({
|
|
4664
|
-
formats: dateTimeFormats$1,
|
|
4665
|
-
defaultWidth: "full"
|
|
4666
|
-
})
|
|
4667
|
-
};
|
|
4668
|
-
const formatRelativeLocale$1 = {
|
|
4669
|
-
lastWeek: "'letzten' eeee 'um' p",
|
|
4670
|
-
yesterday: "'gestern um' p",
|
|
4671
|
-
today: "'heute um' p",
|
|
4672
|
-
tomorrow: "'morgen um' p",
|
|
4673
|
-
nextWeek: "eeee 'um' p",
|
|
4674
|
-
other: "P"
|
|
4675
|
-
};
|
|
4676
|
-
const formatRelative$1 = (token, _date, _baseDate, _options) => formatRelativeLocale$1[token];
|
|
4677
|
-
const eraValues$1 = {
|
|
4678
|
-
narrow: ["v.Chr.", "n.Chr."],
|
|
4679
|
-
abbreviated: ["v.Chr.", "n.Chr."],
|
|
4680
|
-
wide: ["vor Christus", "nach Christus"]
|
|
4681
|
-
};
|
|
4682
|
-
const quarterValues$1 = {
|
|
4683
|
-
narrow: ["1", "2", "3", "4"],
|
|
4684
|
-
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
4685
|
-
wide: ["1. Quartal", "2. Quartal", "3. Quartal", "4. Quartal"]
|
|
4686
|
-
};
|
|
4687
|
-
const monthValues$1 = {
|
|
4688
|
-
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
4689
|
-
abbreviated: [
|
|
4690
|
-
"Jan",
|
|
4691
|
-
"Feb",
|
|
4692
|
-
"Mär",
|
|
4693
|
-
"Apr",
|
|
4694
|
-
"Mai",
|
|
4695
|
-
"Jun",
|
|
4696
|
-
"Jul",
|
|
4697
|
-
"Aug",
|
|
4698
|
-
"Sep",
|
|
4699
|
-
"Okt",
|
|
4700
|
-
"Nov",
|
|
4701
|
-
"Dez"
|
|
4702
|
-
],
|
|
4703
|
-
wide: [
|
|
4704
|
-
"Januar",
|
|
4705
|
-
"Februar",
|
|
4706
|
-
"März",
|
|
4707
|
-
"April",
|
|
4708
|
-
"Mai",
|
|
4709
|
-
"Juni",
|
|
4710
|
-
"Juli",
|
|
4711
|
-
"August",
|
|
4712
|
-
"September",
|
|
4713
|
-
"Oktober",
|
|
4714
|
-
"November",
|
|
4715
|
-
"Dezember"
|
|
4716
|
-
]
|
|
4717
|
-
};
|
|
4718
|
-
const formattingMonthValues = {
|
|
4719
|
-
narrow: monthValues$1.narrow,
|
|
4720
|
-
abbreviated: [
|
|
4721
|
-
"Jan.",
|
|
4722
|
-
"Feb.",
|
|
4723
|
-
"März",
|
|
4724
|
-
"Apr.",
|
|
4725
|
-
"Mai",
|
|
4726
|
-
"Juni",
|
|
4727
|
-
"Juli",
|
|
4728
|
-
"Aug.",
|
|
4729
|
-
"Sep.",
|
|
4730
|
-
"Okt.",
|
|
4731
|
-
"Nov.",
|
|
4732
|
-
"Dez."
|
|
4733
|
-
],
|
|
4734
|
-
wide: monthValues$1.wide
|
|
4735
|
-
};
|
|
4736
|
-
const dayValues$1 = {
|
|
4737
|
-
narrow: ["S", "M", "D", "M", "D", "F", "S"],
|
|
4738
|
-
short: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
|
|
4739
|
-
abbreviated: ["So.", "Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa."],
|
|
4740
|
-
wide: [
|
|
4741
|
-
"Sonntag",
|
|
4742
|
-
"Montag",
|
|
4743
|
-
"Dienstag",
|
|
4744
|
-
"Mittwoch",
|
|
4745
|
-
"Donnerstag",
|
|
4746
|
-
"Freitag",
|
|
4747
|
-
"Samstag"
|
|
4748
|
-
]
|
|
4749
|
-
};
|
|
4750
|
-
const dayPeriodValues$1 = {
|
|
4751
|
-
narrow: {
|
|
4752
|
-
am: "vm.",
|
|
4753
|
-
pm: "nm.",
|
|
4754
|
-
midnight: "Mitternacht",
|
|
4755
|
-
noon: "Mittag",
|
|
4756
|
-
morning: "Morgen",
|
|
4757
|
-
afternoon: "Nachm.",
|
|
4758
|
-
evening: "Abend",
|
|
4759
|
-
night: "Nacht"
|
|
4760
|
-
},
|
|
4761
|
-
abbreviated: {
|
|
4762
|
-
am: "vorm.",
|
|
4763
|
-
pm: "nachm.",
|
|
4764
|
-
midnight: "Mitternacht",
|
|
4765
|
-
noon: "Mittag",
|
|
4766
|
-
morning: "Morgen",
|
|
4767
|
-
afternoon: "Nachmittag",
|
|
4768
|
-
evening: "Abend",
|
|
4769
|
-
night: "Nacht"
|
|
4770
|
-
},
|
|
4771
|
-
wide: {
|
|
4772
|
-
am: "vormittags",
|
|
4773
|
-
pm: "nachmittags",
|
|
4774
|
-
midnight: "Mitternacht",
|
|
4775
|
-
noon: "Mittag",
|
|
4776
|
-
morning: "Morgen",
|
|
4777
|
-
afternoon: "Nachmittag",
|
|
4778
|
-
evening: "Abend",
|
|
4779
|
-
night: "Nacht"
|
|
4780
|
-
}
|
|
4781
|
-
};
|
|
4782
|
-
const formattingDayPeriodValues = {
|
|
4783
|
-
narrow: {
|
|
4784
|
-
am: "vm.",
|
|
4785
|
-
pm: "nm.",
|
|
4786
|
-
midnight: "Mitternacht",
|
|
4787
|
-
noon: "Mittag",
|
|
4788
|
-
morning: "morgens",
|
|
4789
|
-
afternoon: "nachm.",
|
|
4790
|
-
evening: "abends",
|
|
4791
|
-
night: "nachts"
|
|
4792
|
-
},
|
|
4793
|
-
abbreviated: {
|
|
4794
|
-
am: "vorm.",
|
|
4795
|
-
pm: "nachm.",
|
|
4796
|
-
midnight: "Mitternacht",
|
|
4797
|
-
noon: "Mittag",
|
|
4798
|
-
morning: "morgens",
|
|
4799
|
-
afternoon: "nachmittags",
|
|
4800
|
-
evening: "abends",
|
|
4801
|
-
night: "nachts"
|
|
4802
|
-
},
|
|
4803
|
-
wide: {
|
|
4804
|
-
am: "vormittags",
|
|
4805
|
-
pm: "nachmittags",
|
|
4806
|
-
midnight: "Mitternacht",
|
|
4807
|
-
noon: "Mittag",
|
|
4808
|
-
morning: "morgens",
|
|
4809
|
-
afternoon: "nachmittags",
|
|
4810
|
-
evening: "abends",
|
|
4811
|
-
night: "nachts"
|
|
4812
|
-
}
|
|
4813
|
-
};
|
|
4814
|
-
const ordinalNumber$1 = (dirtyNumber) => {
|
|
4815
|
-
const number = Number(dirtyNumber);
|
|
4816
|
-
return number + ".";
|
|
4817
|
-
};
|
|
4818
|
-
const localize$1 = {
|
|
4819
|
-
ordinalNumber: ordinalNumber$1,
|
|
4820
|
-
era: buildLocalizeFn({
|
|
4821
|
-
values: eraValues$1,
|
|
4822
|
-
defaultWidth: "wide"
|
|
4823
|
-
}),
|
|
4824
|
-
quarter: buildLocalizeFn({
|
|
4825
|
-
values: quarterValues$1,
|
|
4826
|
-
defaultWidth: "wide",
|
|
4827
|
-
argumentCallback: (quarter) => quarter - 1
|
|
4828
|
-
}),
|
|
4829
|
-
month: buildLocalizeFn({
|
|
4830
|
-
values: monthValues$1,
|
|
4831
|
-
formattingValues: formattingMonthValues,
|
|
4832
|
-
defaultWidth: "wide"
|
|
4833
|
-
}),
|
|
4834
|
-
day: buildLocalizeFn({
|
|
4835
|
-
values: dayValues$1,
|
|
4836
|
-
defaultWidth: "wide"
|
|
4837
|
-
}),
|
|
4838
|
-
dayPeriod: buildLocalizeFn({
|
|
4839
|
-
values: dayPeriodValues$1,
|
|
4840
|
-
defaultWidth: "wide",
|
|
4841
|
-
formattingValues: formattingDayPeriodValues,
|
|
4842
|
-
defaultFormattingWidth: "wide"
|
|
4843
|
-
})
|
|
4844
|
-
};
|
|
4845
|
-
const matchOrdinalNumberPattern$1 = /^(\d+)(\.)?/i;
|
|
4846
|
-
const parseOrdinalNumberPattern$1 = /\d+/i;
|
|
4847
|
-
const matchEraPatterns$1 = {
|
|
4848
|
-
narrow: /^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,
|
|
4849
|
-
abbreviated: /^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,
|
|
4850
|
-
wide: /^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i
|
|
4851
|
-
};
|
|
4852
|
-
const parseEraPatterns$1 = {
|
|
4853
|
-
any: [/^v/i, /^n/i]
|
|
4854
|
-
};
|
|
4855
|
-
const matchQuarterPatterns$1 = {
|
|
4856
|
-
narrow: /^[1234]/i,
|
|
4857
|
-
abbreviated: /^q[1234]/i,
|
|
4858
|
-
wide: /^[1234](\.)? Quartal/i
|
|
4859
|
-
};
|
|
4860
|
-
const parseQuarterPatterns$1 = {
|
|
4861
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
4862
|
-
};
|
|
4863
|
-
const matchMonthPatterns$1 = {
|
|
4864
|
-
narrow: /^[jfmasond]/i,
|
|
4865
|
-
abbreviated: /^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,
|
|
4866
|
-
wide: /^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i
|
|
4867
|
-
};
|
|
4868
|
-
const parseMonthPatterns$1 = {
|
|
4869
|
-
narrow: [
|
|
4870
|
-
/^j/i,
|
|
4871
|
-
/^f/i,
|
|
4872
|
-
/^m/i,
|
|
4873
|
-
/^a/i,
|
|
4874
|
-
/^m/i,
|
|
4875
|
-
/^j/i,
|
|
4876
|
-
/^j/i,
|
|
4877
|
-
/^a/i,
|
|
4878
|
-
/^s/i,
|
|
4879
|
-
/^o/i,
|
|
4880
|
-
/^n/i,
|
|
4881
|
-
/^d/i
|
|
4882
|
-
],
|
|
4883
|
-
any: [
|
|
4884
|
-
/^j[aä]/i,
|
|
4885
|
-
/^f/i,
|
|
4886
|
-
/^mär/i,
|
|
4887
|
-
/^ap/i,
|
|
4888
|
-
/^mai/i,
|
|
4889
|
-
/^jun/i,
|
|
4890
|
-
/^jul/i,
|
|
4891
|
-
/^au/i,
|
|
4892
|
-
/^s/i,
|
|
4893
|
-
/^o/i,
|
|
4894
|
-
/^n/i,
|
|
4895
|
-
/^d/i
|
|
4896
|
-
]
|
|
4897
|
-
};
|
|
4898
|
-
const matchDayPatterns$1 = {
|
|
4899
|
-
narrow: /^[smdmf]/i,
|
|
4900
|
-
short: /^(so|mo|di|mi|do|fr|sa)/i,
|
|
4901
|
-
abbreviated: /^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,
|
|
4902
|
-
wide: /^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i
|
|
4903
|
-
};
|
|
4904
|
-
const parseDayPatterns$1 = {
|
|
4905
|
-
any: [/^so/i, /^mo/i, /^di/i, /^mi/i, /^do/i, /^f/i, /^sa/i]
|
|
4906
|
-
};
|
|
4907
|
-
const matchDayPeriodPatterns$1 = {
|
|
4908
|
-
narrow: /^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,
|
|
4909
|
-
abbreviated: /^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,
|
|
4910
|
-
wide: /^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i
|
|
4911
|
-
};
|
|
4912
|
-
const parseDayPeriodPatterns$1 = {
|
|
4913
|
-
any: {
|
|
4914
|
-
am: /^v/i,
|
|
4915
|
-
pm: /^n/i,
|
|
4916
|
-
midnight: /^Mitte/i,
|
|
4917
|
-
noon: /^Mitta/i,
|
|
4918
|
-
morning: /morgens/i,
|
|
4919
|
-
afternoon: /nachmittags/i,
|
|
4920
|
-
// will never be matched. Afternoon is matched by `pm`
|
|
4921
|
-
evening: /abends/i,
|
|
4922
|
-
night: /nachts/i
|
|
4923
|
-
// will never be matched. Night is matched by `pm`
|
|
4924
|
-
}
|
|
4925
|
-
};
|
|
4926
|
-
const match$1 = {
|
|
4927
|
-
ordinalNumber: buildMatchPatternFn({
|
|
4928
|
-
matchPattern: matchOrdinalNumberPattern$1,
|
|
4929
|
-
parsePattern: parseOrdinalNumberPattern$1,
|
|
4930
|
-
valueCallback: (value) => parseInt(value)
|
|
4931
|
-
}),
|
|
4932
|
-
era: buildMatchFn({
|
|
4933
|
-
matchPatterns: matchEraPatterns$1,
|
|
4934
|
-
defaultMatchWidth: "wide",
|
|
4935
|
-
parsePatterns: parseEraPatterns$1,
|
|
4936
|
-
defaultParseWidth: "any"
|
|
4937
|
-
}),
|
|
4938
|
-
quarter: buildMatchFn({
|
|
4939
|
-
matchPatterns: matchQuarterPatterns$1,
|
|
4940
|
-
defaultMatchWidth: "wide",
|
|
4941
|
-
parsePatterns: parseQuarterPatterns$1,
|
|
4942
|
-
defaultParseWidth: "any",
|
|
4943
|
-
valueCallback: (index) => index + 1
|
|
4944
|
-
}),
|
|
4945
|
-
month: buildMatchFn({
|
|
4946
|
-
matchPatterns: matchMonthPatterns$1,
|
|
4947
|
-
defaultMatchWidth: "wide",
|
|
4948
|
-
parsePatterns: parseMonthPatterns$1,
|
|
4949
|
-
defaultParseWidth: "any"
|
|
4950
|
-
}),
|
|
4951
|
-
day: buildMatchFn({
|
|
4952
|
-
matchPatterns: matchDayPatterns$1,
|
|
4953
|
-
defaultMatchWidth: "wide",
|
|
4954
|
-
parsePatterns: parseDayPatterns$1,
|
|
4955
|
-
defaultParseWidth: "any"
|
|
4956
|
-
}),
|
|
4957
|
-
dayPeriod: buildMatchFn({
|
|
4958
|
-
matchPatterns: matchDayPeriodPatterns$1,
|
|
4959
|
-
defaultMatchWidth: "wide",
|
|
4960
|
-
parsePatterns: parseDayPeriodPatterns$1,
|
|
4961
|
-
defaultParseWidth: "any"
|
|
4962
|
-
})
|
|
4963
|
-
};
|
|
4964
|
-
const de = {
|
|
4965
|
-
code: "de",
|
|
4966
|
-
formatDistance: formatDistance$1,
|
|
4967
|
-
formatLong: formatLong$1,
|
|
4968
|
-
formatRelative: formatRelative$1,
|
|
4969
|
-
localize: localize$1,
|
|
4970
|
-
match: match$1,
|
|
4971
|
-
options: {
|
|
4972
|
-
weekStartsOn: 1,
|
|
4973
|
-
firstWeekContainsDate: 4
|
|
4974
|
-
}
|
|
4975
|
-
};
|
|
4976
|
-
const formatDistanceLocale = {
|
|
4977
|
-
lessThanXSeconds: {
|
|
4978
|
-
one: {
|
|
4979
|
-
regular: "mniej niż sekunda",
|
|
4980
|
-
past: "mniej niż sekundę",
|
|
4981
|
-
future: "mniej niż sekundę"
|
|
4982
|
-
},
|
|
4983
|
-
twoFour: "mniej niż {{count}} sekundy",
|
|
4984
|
-
other: "mniej niż {{count}} sekund"
|
|
4985
|
-
},
|
|
4986
|
-
xSeconds: {
|
|
4987
|
-
one: {
|
|
4988
|
-
regular: "sekunda",
|
|
4989
|
-
past: "sekundę",
|
|
4990
|
-
future: "sekundę"
|
|
4991
|
-
},
|
|
4992
|
-
twoFour: "{{count}} sekundy",
|
|
4993
|
-
other: "{{count}} sekund"
|
|
4994
|
-
},
|
|
4995
|
-
halfAMinute: {
|
|
4996
|
-
one: "pół minuty",
|
|
4997
|
-
twoFour: "pół minuty",
|
|
4998
|
-
other: "pół minuty"
|
|
4999
|
-
},
|
|
5000
|
-
lessThanXMinutes: {
|
|
5001
|
-
one: {
|
|
5002
|
-
regular: "mniej niż minuta",
|
|
5003
|
-
past: "mniej niż minutę",
|
|
5004
|
-
future: "mniej niż minutę"
|
|
5005
|
-
},
|
|
5006
|
-
twoFour: "mniej niż {{count}} minuty",
|
|
5007
|
-
other: "mniej niż {{count}} minut"
|
|
5008
|
-
},
|
|
5009
|
-
xMinutes: {
|
|
5010
|
-
one: {
|
|
5011
|
-
regular: "minuta",
|
|
5012
|
-
past: "minutę",
|
|
5013
|
-
future: "minutę"
|
|
5014
|
-
},
|
|
5015
|
-
twoFour: "{{count}} minuty",
|
|
5016
|
-
other: "{{count}} minut"
|
|
5017
|
-
},
|
|
5018
|
-
aboutXHours: {
|
|
5019
|
-
one: {
|
|
5020
|
-
regular: "około godziny",
|
|
5021
|
-
past: "około godziny",
|
|
5022
|
-
future: "około godzinę"
|
|
5023
|
-
},
|
|
5024
|
-
twoFour: "około {{count}} godziny",
|
|
5025
|
-
other: "około {{count}} godzin"
|
|
5026
|
-
},
|
|
5027
|
-
xHours: {
|
|
5028
|
-
one: {
|
|
5029
|
-
regular: "godzina",
|
|
5030
|
-
past: "godzinę",
|
|
5031
|
-
future: "godzinę"
|
|
5032
|
-
},
|
|
5033
|
-
twoFour: "{{count}} godziny",
|
|
5034
|
-
other: "{{count}} godzin"
|
|
5035
|
-
},
|
|
5036
|
-
xDays: {
|
|
5037
|
-
one: {
|
|
5038
|
-
regular: "dzień",
|
|
5039
|
-
past: "dzień",
|
|
5040
|
-
future: "1 dzień"
|
|
5041
|
-
},
|
|
5042
|
-
twoFour: "{{count}} dni",
|
|
5043
|
-
other: "{{count}} dni"
|
|
5044
|
-
},
|
|
5045
|
-
aboutXWeeks: {
|
|
5046
|
-
one: "około tygodnia",
|
|
5047
|
-
twoFour: "około {{count}} tygodni",
|
|
5048
|
-
other: "około {{count}} tygodni"
|
|
5049
|
-
},
|
|
5050
|
-
xWeeks: {
|
|
5051
|
-
one: "tydzień",
|
|
5052
|
-
twoFour: "{{count}} tygodnie",
|
|
5053
|
-
other: "{{count}} tygodni"
|
|
5054
|
-
},
|
|
5055
|
-
aboutXMonths: {
|
|
5056
|
-
one: "około miesiąc",
|
|
5057
|
-
twoFour: "około {{count}} miesiące",
|
|
5058
|
-
other: "około {{count}} miesięcy"
|
|
5059
|
-
},
|
|
5060
|
-
xMonths: {
|
|
5061
|
-
one: "miesiąc",
|
|
5062
|
-
twoFour: "{{count}} miesiące",
|
|
5063
|
-
other: "{{count}} miesięcy"
|
|
5064
|
-
},
|
|
5065
|
-
aboutXYears: {
|
|
5066
|
-
one: "około rok",
|
|
5067
|
-
twoFour: "około {{count}} lata",
|
|
5068
|
-
other: "około {{count}} lat"
|
|
5069
|
-
},
|
|
5070
|
-
xYears: {
|
|
5071
|
-
one: "rok",
|
|
5072
|
-
twoFour: "{{count}} lata",
|
|
5073
|
-
other: "{{count}} lat"
|
|
5074
|
-
},
|
|
5075
|
-
overXYears: {
|
|
5076
|
-
one: "ponad rok",
|
|
5077
|
-
twoFour: "ponad {{count}} lata",
|
|
5078
|
-
other: "ponad {{count}} lat"
|
|
5079
|
-
},
|
|
5080
|
-
almostXYears: {
|
|
5081
|
-
one: "prawie rok",
|
|
5082
|
-
twoFour: "prawie {{count}} lata",
|
|
5083
|
-
other: "prawie {{count}} lat"
|
|
5084
|
-
}
|
|
5085
|
-
};
|
|
5086
|
-
function declensionGroup(scheme, count) {
|
|
5087
|
-
if (count === 1) {
|
|
5088
|
-
return scheme.one;
|
|
5089
|
-
}
|
|
5090
|
-
const rem100 = count % 100;
|
|
5091
|
-
if (rem100 <= 20 && rem100 > 10) {
|
|
5092
|
-
return scheme.other;
|
|
5093
|
-
}
|
|
5094
|
-
const rem10 = rem100 % 10;
|
|
5095
|
-
if (rem10 >= 2 && rem10 <= 4) {
|
|
5096
|
-
return scheme.twoFour;
|
|
5097
|
-
}
|
|
5098
|
-
return scheme.other;
|
|
5099
|
-
}
|
|
5100
|
-
function declension(scheme, count, time) {
|
|
5101
|
-
const group = declensionGroup(scheme, count);
|
|
5102
|
-
const finalText = typeof group === "string" ? group : group[time];
|
|
5103
|
-
return finalText.replace("{{count}}", String(count));
|
|
5104
|
-
}
|
|
5105
|
-
const formatDistance = (token, count, options) => {
|
|
5106
|
-
const scheme = formatDistanceLocale[token];
|
|
5107
|
-
if (!(options == null ? void 0 : options.addSuffix)) {
|
|
5108
|
-
return declension(scheme, count, "regular");
|
|
5109
|
-
}
|
|
5110
|
-
if (options.comparison && options.comparison > 0) {
|
|
5111
|
-
return "za " + declension(scheme, count, "future");
|
|
5112
|
-
} else {
|
|
5113
|
-
return declension(scheme, count, "past") + " temu";
|
|
5114
|
-
}
|
|
5115
|
-
};
|
|
5116
|
-
const dateFormats = {
|
|
5117
|
-
full: "EEEE, do MMMM y",
|
|
5118
|
-
long: "do MMMM y",
|
|
5119
|
-
medium: "do MMM y",
|
|
5120
|
-
short: "dd.MM.y"
|
|
5121
|
-
};
|
|
5122
|
-
const timeFormats = {
|
|
5123
|
-
full: "HH:mm:ss zzzz",
|
|
5124
|
-
long: "HH:mm:ss z",
|
|
5125
|
-
medium: "HH:mm:ss",
|
|
5126
|
-
short: "HH:mm"
|
|
5127
|
-
};
|
|
5128
|
-
const dateTimeFormats = {
|
|
5129
|
-
full: "{{date}} {{time}}",
|
|
5130
|
-
long: "{{date}} {{time}}",
|
|
5131
|
-
medium: "{{date}}, {{time}}",
|
|
5132
|
-
short: "{{date}}, {{time}}"
|
|
5133
|
-
};
|
|
5134
|
-
const formatLong = {
|
|
5135
|
-
date: buildFormatLongFn({
|
|
5136
|
-
formats: dateFormats,
|
|
5137
|
-
defaultWidth: "full"
|
|
5138
|
-
}),
|
|
5139
|
-
time: buildFormatLongFn({
|
|
5140
|
-
formats: timeFormats,
|
|
5141
|
-
defaultWidth: "full"
|
|
5142
|
-
}),
|
|
5143
|
-
dateTime: buildFormatLongFn({
|
|
5144
|
-
formats: dateTimeFormats,
|
|
5145
|
-
defaultWidth: "full"
|
|
5146
|
-
})
|
|
5147
|
-
};
|
|
5148
|
-
const adjectivesLastWeek = {
|
|
5149
|
-
masculine: "ostatni",
|
|
5150
|
-
feminine: "ostatnia"
|
|
5151
|
-
};
|
|
5152
|
-
const adjectivesThisWeek = {
|
|
5153
|
-
masculine: "ten",
|
|
5154
|
-
feminine: "ta"
|
|
5155
|
-
};
|
|
5156
|
-
const adjectivesNextWeek = {
|
|
5157
|
-
masculine: "następny",
|
|
5158
|
-
feminine: "następna"
|
|
5159
|
-
};
|
|
5160
|
-
const dayGrammaticalGender = {
|
|
5161
|
-
0: "feminine",
|
|
5162
|
-
1: "masculine",
|
|
5163
|
-
2: "masculine",
|
|
5164
|
-
3: "feminine",
|
|
5165
|
-
4: "masculine",
|
|
5166
|
-
5: "masculine",
|
|
5167
|
-
6: "feminine"
|
|
5168
|
-
};
|
|
5169
|
-
function dayAndTimeWithAdjective(token, date, baseDate, options) {
|
|
5170
|
-
let adjectives;
|
|
5171
|
-
if (isSameWeek(date, baseDate, options)) {
|
|
5172
|
-
adjectives = adjectivesThisWeek;
|
|
5173
|
-
} else if (token === "lastWeek") {
|
|
5174
|
-
adjectives = adjectivesLastWeek;
|
|
5175
|
-
} else if (token === "nextWeek") {
|
|
5176
|
-
adjectives = adjectivesNextWeek;
|
|
5177
|
-
} else {
|
|
5178
|
-
throw new Error(`Cannot determine adjectives for token ${token}`);
|
|
5179
|
-
}
|
|
5180
|
-
const day = date.getDay();
|
|
5181
|
-
const grammaticalGender = dayGrammaticalGender[day];
|
|
5182
|
-
const adjective = adjectives[grammaticalGender];
|
|
5183
|
-
return `'${adjective}' eeee 'o' p`;
|
|
5184
|
-
}
|
|
5185
|
-
const formatRelativeLocale = {
|
|
5186
|
-
lastWeek: dayAndTimeWithAdjective,
|
|
5187
|
-
yesterday: "'wczoraj o' p",
|
|
5188
|
-
today: "'dzisiaj o' p",
|
|
5189
|
-
tomorrow: "'jutro o' p",
|
|
5190
|
-
nextWeek: dayAndTimeWithAdjective,
|
|
5191
|
-
other: "P"
|
|
5192
|
-
};
|
|
5193
|
-
const formatRelative = (token, date, baseDate, options) => {
|
|
5194
|
-
const format2 = formatRelativeLocale[token];
|
|
5195
|
-
if (typeof format2 === "function") {
|
|
5196
|
-
return format2(token, date, baseDate, options);
|
|
5197
|
-
}
|
|
5198
|
-
return format2;
|
|
5199
|
-
};
|
|
5200
|
-
const eraValues = {
|
|
5201
|
-
narrow: ["p.n.e.", "n.e."],
|
|
5202
|
-
abbreviated: ["p.n.e.", "n.e."],
|
|
5203
|
-
wide: ["przed naszą erą", "naszej ery"]
|
|
5204
|
-
};
|
|
5205
|
-
const quarterValues = {
|
|
5206
|
-
narrow: ["1", "2", "3", "4"],
|
|
5207
|
-
abbreviated: ["I kw.", "II kw.", "III kw.", "IV kw."],
|
|
5208
|
-
wide: ["I kwartał", "II kwartał", "III kwartał", "IV kwartał"]
|
|
5209
|
-
};
|
|
5210
|
-
const monthValues = {
|
|
5211
|
-
narrow: ["S", "L", "M", "K", "M", "C", "L", "S", "W", "P", "L", "G"],
|
|
5212
|
-
abbreviated: [
|
|
5213
|
-
"sty",
|
|
5214
|
-
"lut",
|
|
5215
|
-
"mar",
|
|
5216
|
-
"kwi",
|
|
5217
|
-
"maj",
|
|
5218
|
-
"cze",
|
|
5219
|
-
"lip",
|
|
5220
|
-
"sie",
|
|
5221
|
-
"wrz",
|
|
5222
|
-
"paź",
|
|
5223
|
-
"lis",
|
|
5224
|
-
"gru"
|
|
5225
|
-
],
|
|
5226
|
-
wide: [
|
|
5227
|
-
"styczeń",
|
|
5228
|
-
"luty",
|
|
5229
|
-
"marzec",
|
|
5230
|
-
"kwiecień",
|
|
5231
|
-
"maj",
|
|
5232
|
-
"czerwiec",
|
|
5233
|
-
"lipiec",
|
|
5234
|
-
"sierpień",
|
|
5235
|
-
"wrzesień",
|
|
5236
|
-
"październik",
|
|
5237
|
-
"listopad",
|
|
5238
|
-
"grudzień"
|
|
5239
|
-
]
|
|
5240
|
-
};
|
|
5241
|
-
const monthFormattingValues = {
|
|
5242
|
-
narrow: ["s", "l", "m", "k", "m", "c", "l", "s", "w", "p", "l", "g"],
|
|
5243
|
-
abbreviated: [
|
|
5244
|
-
"sty",
|
|
5245
|
-
"lut",
|
|
5246
|
-
"mar",
|
|
5247
|
-
"kwi",
|
|
5248
|
-
"maj",
|
|
5249
|
-
"cze",
|
|
5250
|
-
"lip",
|
|
5251
|
-
"sie",
|
|
5252
|
-
"wrz",
|
|
5253
|
-
"paź",
|
|
5254
|
-
"lis",
|
|
5255
|
-
"gru"
|
|
5256
|
-
],
|
|
5257
|
-
wide: [
|
|
5258
|
-
"stycznia",
|
|
5259
|
-
"lutego",
|
|
5260
|
-
"marca",
|
|
5261
|
-
"kwietnia",
|
|
5262
|
-
"maja",
|
|
5263
|
-
"czerwca",
|
|
5264
|
-
"lipca",
|
|
5265
|
-
"sierpnia",
|
|
5266
|
-
"września",
|
|
5267
|
-
"października",
|
|
5268
|
-
"listopada",
|
|
5269
|
-
"grudnia"
|
|
5270
|
-
]
|
|
5271
|
-
};
|
|
5272
|
-
const dayValues = {
|
|
5273
|
-
narrow: ["N", "P", "W", "Ś", "C", "P", "S"],
|
|
5274
|
-
short: ["nie", "pon", "wto", "śro", "czw", "pią", "sob"],
|
|
5275
|
-
abbreviated: ["niedz.", "pon.", "wt.", "śr.", "czw.", "pt.", "sob."],
|
|
5276
|
-
wide: [
|
|
5277
|
-
"niedziela",
|
|
5278
|
-
"poniedziałek",
|
|
5279
|
-
"wtorek",
|
|
5280
|
-
"środa",
|
|
5281
|
-
"czwartek",
|
|
5282
|
-
"piątek",
|
|
5283
|
-
"sobota"
|
|
5284
|
-
]
|
|
5285
|
-
};
|
|
5286
|
-
const dayFormattingValues = {
|
|
5287
|
-
narrow: ["n", "p", "w", "ś", "c", "p", "s"],
|
|
5288
|
-
short: ["nie", "pon", "wto", "śro", "czw", "pią", "sob"],
|
|
5289
|
-
abbreviated: ["niedz.", "pon.", "wt.", "śr.", "czw.", "pt.", "sob."],
|
|
5290
|
-
wide: [
|
|
5291
|
-
"niedziela",
|
|
5292
|
-
"poniedziałek",
|
|
5293
|
-
"wtorek",
|
|
5294
|
-
"środa",
|
|
5295
|
-
"czwartek",
|
|
5296
|
-
"piątek",
|
|
5297
|
-
"sobota"
|
|
5298
|
-
]
|
|
5299
|
-
};
|
|
5300
|
-
const dayPeriodValues = {
|
|
5301
|
-
narrow: {
|
|
5302
|
-
am: "a",
|
|
5303
|
-
pm: "p",
|
|
5304
|
-
midnight: "półn.",
|
|
5305
|
-
noon: "poł",
|
|
5306
|
-
morning: "rano",
|
|
5307
|
-
afternoon: "popoł.",
|
|
5308
|
-
evening: "wiecz.",
|
|
5309
|
-
night: "noc"
|
|
5310
|
-
},
|
|
5311
|
-
abbreviated: {
|
|
5312
|
-
am: "AM",
|
|
5313
|
-
pm: "PM",
|
|
5314
|
-
midnight: "północ",
|
|
5315
|
-
noon: "południe",
|
|
5316
|
-
morning: "rano",
|
|
5317
|
-
afternoon: "popołudnie",
|
|
5318
|
-
evening: "wieczór",
|
|
5319
|
-
night: "noc"
|
|
5320
|
-
},
|
|
5321
|
-
wide: {
|
|
5322
|
-
am: "AM",
|
|
5323
|
-
pm: "PM",
|
|
5324
|
-
midnight: "północ",
|
|
5325
|
-
noon: "południe",
|
|
5326
|
-
morning: "rano",
|
|
5327
|
-
afternoon: "popołudnie",
|
|
5328
|
-
evening: "wieczór",
|
|
5329
|
-
night: "noc"
|
|
5330
|
-
}
|
|
5331
|
-
};
|
|
5332
|
-
const dayPeriodFormattingValues = {
|
|
5333
|
-
narrow: {
|
|
5334
|
-
am: "a",
|
|
5335
|
-
pm: "p",
|
|
5336
|
-
midnight: "o półn.",
|
|
5337
|
-
noon: "w poł.",
|
|
5338
|
-
morning: "rano",
|
|
5339
|
-
afternoon: "po poł.",
|
|
5340
|
-
evening: "wiecz.",
|
|
5341
|
-
night: "w nocy"
|
|
5342
|
-
},
|
|
5343
|
-
abbreviated: {
|
|
5344
|
-
am: "AM",
|
|
5345
|
-
pm: "PM",
|
|
5346
|
-
midnight: "o północy",
|
|
5347
|
-
noon: "w południe",
|
|
5348
|
-
morning: "rano",
|
|
5349
|
-
afternoon: "po południu",
|
|
5350
|
-
evening: "wieczorem",
|
|
5351
|
-
night: "w nocy"
|
|
5352
|
-
},
|
|
5353
|
-
wide: {
|
|
5354
|
-
am: "AM",
|
|
5355
|
-
pm: "PM",
|
|
5356
|
-
midnight: "o północy",
|
|
5357
|
-
noon: "w południe",
|
|
5358
|
-
morning: "rano",
|
|
5359
|
-
afternoon: "po południu",
|
|
5360
|
-
evening: "wieczorem",
|
|
5361
|
-
night: "w nocy"
|
|
5362
|
-
}
|
|
5363
|
-
};
|
|
5364
|
-
const ordinalNumber = (dirtyNumber, _options) => {
|
|
5365
|
-
return String(dirtyNumber);
|
|
5366
|
-
};
|
|
5367
|
-
const localize = {
|
|
5368
|
-
ordinalNumber,
|
|
5369
|
-
era: buildLocalizeFn({
|
|
5370
|
-
values: eraValues,
|
|
5371
|
-
defaultWidth: "wide"
|
|
5372
|
-
}),
|
|
5373
|
-
quarter: buildLocalizeFn({
|
|
5374
|
-
values: quarterValues,
|
|
5375
|
-
defaultWidth: "wide",
|
|
5376
|
-
argumentCallback: (quarter) => quarter - 1
|
|
5377
|
-
}),
|
|
5378
|
-
month: buildLocalizeFn({
|
|
5379
|
-
values: monthValues,
|
|
5380
|
-
defaultWidth: "wide",
|
|
5381
|
-
formattingValues: monthFormattingValues,
|
|
5382
|
-
defaultFormattingWidth: "wide"
|
|
5383
|
-
}),
|
|
5384
|
-
day: buildLocalizeFn({
|
|
5385
|
-
values: dayValues,
|
|
5386
|
-
defaultWidth: "wide",
|
|
5387
|
-
formattingValues: dayFormattingValues,
|
|
5388
|
-
defaultFormattingWidth: "wide"
|
|
5389
|
-
}),
|
|
5390
|
-
dayPeriod: buildLocalizeFn({
|
|
5391
|
-
values: dayPeriodValues,
|
|
5392
|
-
defaultWidth: "wide",
|
|
5393
|
-
formattingValues: dayPeriodFormattingValues,
|
|
5394
|
-
defaultFormattingWidth: "wide"
|
|
5395
|
-
})
|
|
5396
|
-
};
|
|
5397
|
-
const matchOrdinalNumberPattern = /^(\d+)?/i;
|
|
5398
|
-
const parseOrdinalNumberPattern = /\d+/i;
|
|
5399
|
-
const matchEraPatterns = {
|
|
5400
|
-
narrow: /^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i,
|
|
5401
|
-
abbreviated: /^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i,
|
|
5402
|
-
wide: /^(przed\s*nasz(ą|a)\s*er(ą|a)|naszej\s*ery)/i
|
|
5403
|
-
};
|
|
5404
|
-
const parseEraPatterns = {
|
|
5405
|
-
any: [/^p/i, /^n/i]
|
|
5406
|
-
};
|
|
5407
|
-
const matchQuarterPatterns = {
|
|
5408
|
-
narrow: /^[1234]/i,
|
|
5409
|
-
abbreviated: /^(I|II|III|IV)\s*kw\.?/i,
|
|
5410
|
-
wide: /^(I|II|III|IV)\s*kwarta(ł|l)/i
|
|
5411
|
-
};
|
|
5412
|
-
const parseQuarterPatterns = {
|
|
5413
|
-
narrow: [/1/i, /2/i, /3/i, /4/i],
|
|
5414
|
-
any: [/^I kw/i, /^II kw/i, /^III kw/i, /^IV kw/i]
|
|
5415
|
-
};
|
|
5416
|
-
const matchMonthPatterns = {
|
|
5417
|
-
narrow: /^[slmkcwpg]/i,
|
|
5418
|
-
abbreviated: /^(sty|lut|mar|kwi|maj|cze|lip|sie|wrz|pa(ź|z)|lis|gru)/i,
|
|
5419
|
-
wide: /^(stycznia|stycze(ń|n)|lutego|luty|marca|marzec|kwietnia|kwiecie(ń|n)|maja|maj|czerwca|czerwiec|lipca|lipiec|sierpnia|sierpie(ń|n)|wrze(ś|s)nia|wrzesie(ń|n)|pa(ź|z)dziernika|pa(ź|z)dziernik|listopada|listopad|grudnia|grudzie(ń|n))/i
|
|
5420
|
-
};
|
|
5421
|
-
const parseMonthPatterns = {
|
|
5422
|
-
narrow: [
|
|
5423
|
-
/^s/i,
|
|
5424
|
-
/^l/i,
|
|
5425
|
-
/^m/i,
|
|
5426
|
-
/^k/i,
|
|
5427
|
-
/^m/i,
|
|
5428
|
-
/^c/i,
|
|
5429
|
-
/^l/i,
|
|
5430
|
-
/^s/i,
|
|
5431
|
-
/^w/i,
|
|
5432
|
-
/^p/i,
|
|
5433
|
-
/^l/i,
|
|
5434
|
-
/^g/i
|
|
5435
|
-
],
|
|
5436
|
-
any: [
|
|
5437
|
-
/^st/i,
|
|
5438
|
-
/^lu/i,
|
|
5439
|
-
/^mar/i,
|
|
5440
|
-
/^k/i,
|
|
5441
|
-
/^maj/i,
|
|
5442
|
-
/^c/i,
|
|
5443
|
-
/^lip/i,
|
|
5444
|
-
/^si/i,
|
|
5445
|
-
/^w/i,
|
|
5446
|
-
/^p/i,
|
|
5447
|
-
/^lis/i,
|
|
5448
|
-
/^g/i
|
|
5449
|
-
]
|
|
5450
|
-
};
|
|
5451
|
-
const matchDayPatterns = {
|
|
5452
|
-
narrow: /^[npwścs]/i,
|
|
5453
|
-
short: /^(nie|pon|wto|(ś|s)ro|czw|pi(ą|a)|sob)/i,
|
|
5454
|
-
abbreviated: /^(niedz|pon|wt|(ś|s)r|czw|pt|sob)\.?/i,
|
|
5455
|
-
wide: /^(niedziela|poniedzia(ł|l)ek|wtorek|(ś|s)roda|czwartek|pi(ą|a)tek|sobota)/i
|
|
5456
|
-
};
|
|
5457
|
-
const parseDayPatterns = {
|
|
5458
|
-
narrow: [/^n/i, /^p/i, /^w/i, /^ś/i, /^c/i, /^p/i, /^s/i],
|
|
5459
|
-
abbreviated: [/^n/i, /^po/i, /^w/i, /^(ś|s)r/i, /^c/i, /^pt/i, /^so/i],
|
|
5460
|
-
any: [/^n/i, /^po/i, /^w/i, /^(ś|s)r/i, /^c/i, /^pi/i, /^so/i]
|
|
5461
|
-
};
|
|
5462
|
-
const matchDayPeriodPatterns = {
|
|
5463
|
-
narrow: /^(^a$|^p$|pó(ł|l)n\.?|o\s*pó(ł|l)n\.?|po(ł|l)\.?|w\s*po(ł|l)\.?|po\s*po(ł|l)\.?|rano|wiecz\.?|noc|w\s*nocy)/i,
|
|
5464
|
-
any: /^(am|pm|pó(ł|l)noc|o\s*pó(ł|l)nocy|po(ł|l)udnie|w\s*po(ł|l)udnie|popo(ł|l)udnie|po\s*po(ł|l)udniu|rano|wieczór|wieczorem|noc|w\s*nocy)/i
|
|
5465
|
-
};
|
|
5466
|
-
const parseDayPeriodPatterns = {
|
|
5467
|
-
narrow: {
|
|
5468
|
-
am: /^a$/i,
|
|
5469
|
-
pm: /^p$/i,
|
|
5470
|
-
midnight: /pó(ł|l)n/i,
|
|
5471
|
-
noon: /po(ł|l)/i,
|
|
5472
|
-
morning: /rano/i,
|
|
5473
|
-
afternoon: /po\s*po(ł|l)/i,
|
|
5474
|
-
evening: /wiecz/i,
|
|
5475
|
-
night: /noc/i
|
|
5476
|
-
},
|
|
5477
|
-
any: {
|
|
5478
|
-
am: /^am/i,
|
|
5479
|
-
pm: /^pm/i,
|
|
5480
|
-
midnight: /pó(ł|l)n/i,
|
|
5481
|
-
noon: /po(ł|l)/i,
|
|
5482
|
-
morning: /rano/i,
|
|
5483
|
-
afternoon: /po\s*po(ł|l)/i,
|
|
5484
|
-
evening: /wiecz/i,
|
|
5485
|
-
night: /noc/i
|
|
5486
|
-
}
|
|
5487
|
-
};
|
|
5488
|
-
const match = {
|
|
5489
|
-
ordinalNumber: buildMatchPatternFn({
|
|
5490
|
-
matchPattern: matchOrdinalNumberPattern,
|
|
5491
|
-
parsePattern: parseOrdinalNumberPattern,
|
|
5492
|
-
valueCallback: (value) => parseInt(value, 10)
|
|
5493
|
-
}),
|
|
5494
|
-
era: buildMatchFn({
|
|
5495
|
-
matchPatterns: matchEraPatterns,
|
|
5496
|
-
defaultMatchWidth: "wide",
|
|
5497
|
-
parsePatterns: parseEraPatterns,
|
|
5498
|
-
defaultParseWidth: "any"
|
|
5499
|
-
}),
|
|
5500
|
-
quarter: buildMatchFn({
|
|
5501
|
-
matchPatterns: matchQuarterPatterns,
|
|
5502
|
-
defaultMatchWidth: "wide",
|
|
5503
|
-
parsePatterns: parseQuarterPatterns,
|
|
5504
|
-
defaultParseWidth: "any",
|
|
5505
|
-
valueCallback: (index) => index + 1
|
|
5506
|
-
}),
|
|
5507
|
-
month: buildMatchFn({
|
|
5508
|
-
matchPatterns: matchMonthPatterns,
|
|
5509
|
-
defaultMatchWidth: "wide",
|
|
5510
|
-
parsePatterns: parseMonthPatterns,
|
|
5511
|
-
defaultParseWidth: "any"
|
|
5512
|
-
}),
|
|
5513
|
-
day: buildMatchFn({
|
|
5514
|
-
matchPatterns: matchDayPatterns,
|
|
5515
|
-
defaultMatchWidth: "wide",
|
|
5516
|
-
parsePatterns: parseDayPatterns,
|
|
5517
|
-
defaultParseWidth: "any"
|
|
5518
|
-
}),
|
|
5519
|
-
dayPeriod: buildMatchFn({
|
|
5520
|
-
matchPatterns: matchDayPeriodPatterns,
|
|
5521
|
-
defaultMatchWidth: "any",
|
|
5522
|
-
parsePatterns: parseDayPeriodPatterns,
|
|
5523
|
-
defaultParseWidth: "any"
|
|
5524
|
-
})
|
|
5525
|
-
};
|
|
5526
|
-
const pl = {
|
|
5527
|
-
code: "pl",
|
|
5528
|
-
formatDistance,
|
|
5529
|
-
formatLong,
|
|
5530
|
-
formatRelative,
|
|
5531
|
-
localize,
|
|
5532
|
-
match,
|
|
5533
|
-
options: {
|
|
5534
|
-
weekStartsOn: 1,
|
|
5535
|
-
firstWeekContainsDate: 4
|
|
5536
|
-
}
|
|
5537
|
-
};
|
|
5538
|
-
const localeMap = {
|
|
5539
|
-
pl,
|
|
5540
|
-
en: enUS,
|
|
5541
|
-
"en-US": enUS,
|
|
5542
|
-
de
|
|
5543
|
-
};
|
|
5544
|
-
function getDateLocale(localeCode = "pl") {
|
|
5545
|
-
return localeMap[localeCode] || pl;
|
|
5546
|
-
}
|
|
5547
|
-
function formatDate({
|
|
5548
|
-
date,
|
|
5549
|
-
includeTime = false,
|
|
5550
|
-
localeCode = "pl"
|
|
5551
|
-
}) {
|
|
5552
|
-
const ensuredDate = new Date(date);
|
|
5553
|
-
if (isNaN(ensuredDate.getTime())) {
|
|
5554
|
-
return "";
|
|
5555
|
-
}
|
|
5556
|
-
const locale = getDateLocale(localeCode);
|
|
5557
|
-
const timeFormat = includeTime ? "p" : "";
|
|
5558
|
-
return format(ensuredDate, `PP ${timeFormat}`, {
|
|
5559
|
-
locale
|
|
5560
|
-
});
|
|
5561
|
-
}
|
|
5562
|
-
function getCountryByIso2(iso2) {
|
|
5563
|
-
if (!iso2) {
|
|
5564
|
-
return;
|
|
5565
|
-
}
|
|
5566
|
-
return countries.find((c) => c.iso_2.toLowerCase() === iso2.toLowerCase());
|
|
5567
|
-
}
|
|
5568
|
-
const countries = [
|
|
5569
|
-
{
|
|
5570
|
-
iso_2: "af",
|
|
5571
|
-
iso_3: "afg",
|
|
5572
|
-
num_code: "4",
|
|
5573
|
-
name: "AFGHANISTAN",
|
|
5574
|
-
display_name: "Afghanistan"
|
|
5575
|
-
},
|
|
5576
|
-
{
|
|
5577
|
-
iso_2: "al",
|
|
5578
|
-
iso_3: "alb",
|
|
5579
|
-
num_code: "8",
|
|
5580
|
-
name: "ALBANIA",
|
|
5581
|
-
display_name: "Albania"
|
|
5582
|
-
},
|
|
5583
|
-
{
|
|
5584
|
-
iso_2: "dz",
|
|
5585
|
-
iso_3: "dza",
|
|
5586
|
-
num_code: "12",
|
|
5587
|
-
name: "ALGERIA",
|
|
5588
|
-
display_name: "Algeria"
|
|
5589
|
-
},
|
|
5590
|
-
{
|
|
5591
|
-
iso_2: "as",
|
|
5592
|
-
iso_3: "asm",
|
|
5593
|
-
num_code: "16",
|
|
5594
|
-
name: "AMERICAN SAMOA",
|
|
5595
|
-
display_name: "American Samoa"
|
|
5596
|
-
},
|
|
5597
|
-
{
|
|
5598
|
-
iso_2: "ad",
|
|
5599
|
-
iso_3: "and",
|
|
5600
|
-
num_code: "20",
|
|
5601
|
-
name: "ANDORRA",
|
|
5602
|
-
display_name: "Andorra"
|
|
5603
|
-
},
|
|
5604
|
-
{
|
|
5605
|
-
iso_2: "ao",
|
|
5606
|
-
iso_3: "ago",
|
|
5607
|
-
num_code: "24",
|
|
5608
|
-
name: "ANGOLA",
|
|
5609
|
-
display_name: "Angola"
|
|
5610
|
-
},
|
|
5611
|
-
{
|
|
5612
|
-
iso_2: "ai",
|
|
5613
|
-
iso_3: "aia",
|
|
5614
|
-
num_code: "660",
|
|
5615
|
-
name: "ANGUILLA",
|
|
5616
|
-
display_name: "Anguilla"
|
|
5617
|
-
},
|
|
5618
|
-
{
|
|
5619
|
-
iso_2: "aq",
|
|
5620
|
-
iso_3: "ata",
|
|
5621
|
-
num_code: "10",
|
|
5622
|
-
name: "ANTARCTICA",
|
|
5623
|
-
display_name: "Antarctica"
|
|
5624
|
-
},
|
|
5625
|
-
{
|
|
5626
|
-
iso_2: "ag",
|
|
5627
|
-
iso_3: "atg",
|
|
5628
|
-
num_code: "28",
|
|
5629
|
-
name: "ANTIGUA AND BARBUDA",
|
|
5630
|
-
display_name: "Antigua and Barbuda"
|
|
5631
|
-
},
|
|
5632
|
-
{
|
|
5633
|
-
iso_2: "ar",
|
|
5634
|
-
iso_3: "arg",
|
|
5635
|
-
num_code: "32",
|
|
5636
|
-
name: "ARGENTINA",
|
|
5637
|
-
display_name: "Argentina"
|
|
5638
|
-
},
|
|
5639
|
-
{
|
|
5640
|
-
iso_2: "am",
|
|
5641
|
-
iso_3: "arm",
|
|
5642
|
-
num_code: "51",
|
|
5643
|
-
name: "ARMENIA",
|
|
5644
|
-
display_name: "Armenia"
|
|
5645
|
-
},
|
|
5646
|
-
{
|
|
5647
|
-
iso_2: "aw",
|
|
5648
|
-
iso_3: "abw",
|
|
5649
|
-
num_code: "533",
|
|
5650
|
-
name: "ARUBA",
|
|
5651
|
-
display_name: "Aruba"
|
|
5652
|
-
},
|
|
5653
|
-
{
|
|
5654
|
-
iso_2: "au",
|
|
5655
|
-
iso_3: "aus",
|
|
5656
|
-
num_code: "36",
|
|
5657
|
-
name: "AUSTRALIA",
|
|
5658
|
-
display_name: "Australia"
|
|
5659
|
-
},
|
|
5660
|
-
{
|
|
5661
|
-
iso_2: "at",
|
|
5662
|
-
iso_3: "aut",
|
|
5663
|
-
num_code: "40",
|
|
5664
|
-
name: "AUSTRIA",
|
|
5665
|
-
display_name: "Austria"
|
|
5666
|
-
},
|
|
5667
|
-
{
|
|
5668
|
-
iso_2: "az",
|
|
5669
|
-
iso_3: "aze",
|
|
5670
|
-
num_code: "31",
|
|
5671
|
-
name: "AZERBAIJAN",
|
|
5672
|
-
display_name: "Azerbaijan"
|
|
5673
|
-
},
|
|
5674
|
-
{
|
|
5675
|
-
iso_2: "bs",
|
|
5676
|
-
iso_3: "bhs",
|
|
5677
|
-
num_code: "44",
|
|
5678
|
-
name: "BAHAMAS",
|
|
5679
|
-
display_name: "Bahamas"
|
|
5680
|
-
},
|
|
5681
|
-
{
|
|
5682
|
-
iso_2: "bh",
|
|
5683
|
-
iso_3: "bhr",
|
|
5684
|
-
num_code: "48",
|
|
5685
|
-
name: "BAHRAIN",
|
|
5686
|
-
display_name: "Bahrain"
|
|
5687
|
-
},
|
|
5688
|
-
{
|
|
5689
|
-
iso_2: "bd",
|
|
5690
|
-
iso_3: "bgd",
|
|
5691
|
-
num_code: "50",
|
|
5692
|
-
name: "BANGLADESH",
|
|
5693
|
-
display_name: "Bangladesh"
|
|
5694
|
-
},
|
|
5695
|
-
{
|
|
5696
|
-
iso_2: "bb",
|
|
5697
|
-
iso_3: "brb",
|
|
5698
|
-
num_code: "52",
|
|
5699
|
-
name: "BARBADOS",
|
|
5700
|
-
display_name: "Barbados"
|
|
5701
|
-
},
|
|
5702
|
-
{
|
|
5703
|
-
iso_2: "by",
|
|
5704
|
-
iso_3: "blr",
|
|
5705
|
-
num_code: "112",
|
|
5706
|
-
name: "BELARUS",
|
|
5707
|
-
display_name: "Belarus"
|
|
5708
|
-
},
|
|
5709
|
-
{
|
|
5710
|
-
iso_2: "be",
|
|
5711
|
-
iso_3: "bel",
|
|
5712
|
-
num_code: "56",
|
|
5713
|
-
name: "BELGIUM",
|
|
5714
|
-
display_name: "Belgium"
|
|
5715
|
-
},
|
|
5716
|
-
{
|
|
5717
|
-
iso_2: "bz",
|
|
5718
|
-
iso_3: "blz",
|
|
5719
|
-
num_code: "84",
|
|
5720
|
-
name: "BELIZE",
|
|
5721
|
-
display_name: "Belize"
|
|
5722
|
-
},
|
|
5723
|
-
{
|
|
5724
|
-
iso_2: "bj",
|
|
5725
|
-
iso_3: "ben",
|
|
5726
|
-
num_code: "204",
|
|
5727
|
-
name: "BENIN",
|
|
5728
|
-
display_name: "Benin"
|
|
5729
|
-
},
|
|
5730
|
-
{
|
|
5731
|
-
iso_2: "bm",
|
|
5732
|
-
iso_3: "bmu",
|
|
5733
|
-
num_code: "60",
|
|
5734
|
-
name: "BERMUDA",
|
|
5735
|
-
display_name: "Bermuda"
|
|
5736
|
-
},
|
|
5737
|
-
{
|
|
5738
|
-
iso_2: "bt",
|
|
5739
|
-
iso_3: "btn",
|
|
5740
|
-
num_code: "64",
|
|
5741
|
-
name: "BHUTAN",
|
|
5742
|
-
display_name: "Bhutan"
|
|
5743
|
-
},
|
|
5744
|
-
{
|
|
5745
|
-
iso_2: "bo",
|
|
5746
|
-
iso_3: "bol",
|
|
5747
|
-
num_code: "68",
|
|
5748
|
-
name: "BOLIVIA",
|
|
5749
|
-
display_name: "Bolivia"
|
|
5750
|
-
},
|
|
5751
|
-
{
|
|
5752
|
-
iso_2: "bq",
|
|
5753
|
-
iso_3: "bes",
|
|
5754
|
-
num_code: "535",
|
|
5755
|
-
name: "BONAIRE, SINT EUSTATIUS AND SABA",
|
|
5756
|
-
display_name: "Bonaire, Sint Eustatius and Saba"
|
|
5757
|
-
},
|
|
5758
|
-
{
|
|
5759
|
-
iso_2: "ba",
|
|
5760
|
-
iso_3: "bih",
|
|
5761
|
-
num_code: "70",
|
|
5762
|
-
name: "BOSNIA AND HERZEGOVINA",
|
|
5763
|
-
display_name: "Bosnia and Herzegovina"
|
|
5764
|
-
},
|
|
5765
|
-
{
|
|
5766
|
-
iso_2: "bw",
|
|
5767
|
-
iso_3: "bwa",
|
|
5768
|
-
num_code: "72",
|
|
5769
|
-
name: "BOTSWANA",
|
|
5770
|
-
display_name: "Botswana"
|
|
5771
|
-
},
|
|
5772
|
-
{
|
|
5773
|
-
iso_2: "bv",
|
|
5774
|
-
iso_3: "bvd",
|
|
5775
|
-
num_code: "74",
|
|
5776
|
-
name: "BOUVET ISLAND",
|
|
5777
|
-
display_name: "Bouvet Island"
|
|
5778
|
-
},
|
|
5779
|
-
{
|
|
5780
|
-
iso_2: "br",
|
|
5781
|
-
iso_3: "bra",
|
|
5782
|
-
num_code: "76",
|
|
5783
|
-
name: "BRAZIL",
|
|
5784
|
-
display_name: "Brazil"
|
|
5785
|
-
},
|
|
5786
|
-
{
|
|
5787
|
-
iso_2: "io",
|
|
5788
|
-
iso_3: "iot",
|
|
5789
|
-
num_code: "86",
|
|
5790
|
-
name: "BRITISH INDIAN OCEAN TERRITORY",
|
|
5791
|
-
display_name: "British Indian Ocean Territory"
|
|
5792
|
-
},
|
|
5793
|
-
{
|
|
5794
|
-
iso_2: "bn",
|
|
5795
|
-
iso_3: "brn",
|
|
5796
|
-
num_code: "96",
|
|
5797
|
-
name: "BRUNEI DARUSSALAM",
|
|
5798
|
-
display_name: "Brunei Darussalam"
|
|
5799
|
-
},
|
|
5800
|
-
{
|
|
5801
|
-
iso_2: "bg",
|
|
5802
|
-
iso_3: "bgr",
|
|
5803
|
-
num_code: "100",
|
|
5804
|
-
name: "BULGARIA",
|
|
5805
|
-
display_name: "Bulgaria"
|
|
5806
|
-
},
|
|
5807
|
-
{
|
|
5808
|
-
iso_2: "bf",
|
|
5809
|
-
iso_3: "bfa",
|
|
5810
|
-
num_code: "854",
|
|
5811
|
-
name: "BURKINA FASO",
|
|
5812
|
-
display_name: "Burkina Faso"
|
|
5813
|
-
},
|
|
5814
|
-
{
|
|
5815
|
-
iso_2: "bi",
|
|
5816
|
-
iso_3: "bdi",
|
|
5817
|
-
num_code: "108",
|
|
5818
|
-
name: "BURUNDI",
|
|
5819
|
-
display_name: "Burundi"
|
|
5820
|
-
},
|
|
5821
|
-
{
|
|
5822
|
-
iso_2: "kh",
|
|
5823
|
-
iso_3: "khm",
|
|
5824
|
-
num_code: "116",
|
|
5825
|
-
name: "CAMBODIA",
|
|
5826
|
-
display_name: "Cambodia"
|
|
5827
|
-
},
|
|
5828
|
-
{
|
|
5829
|
-
iso_2: "cm",
|
|
5830
|
-
iso_3: "cmr",
|
|
5831
|
-
num_code: "120",
|
|
5832
|
-
name: "CAMEROON",
|
|
5833
|
-
display_name: "Cameroon"
|
|
5834
|
-
},
|
|
5835
|
-
{
|
|
5836
|
-
iso_2: "ca",
|
|
5837
|
-
iso_3: "can",
|
|
5838
|
-
num_code: "124",
|
|
5839
|
-
name: "CANADA",
|
|
5840
|
-
display_name: "Canada"
|
|
5841
|
-
},
|
|
5842
|
-
{
|
|
5843
|
-
iso_2: "cv",
|
|
5844
|
-
iso_3: "cpv",
|
|
5845
|
-
num_code: "132",
|
|
5846
|
-
name: "CAPE VERDE",
|
|
5847
|
-
display_name: "Cape Verde"
|
|
5848
|
-
},
|
|
5849
|
-
{
|
|
5850
|
-
iso_2: "ky",
|
|
5851
|
-
iso_3: "cym",
|
|
5852
|
-
num_code: "136",
|
|
5853
|
-
name: "CAYMAN ISLANDS",
|
|
5854
|
-
display_name: "Cayman Islands"
|
|
5855
|
-
},
|
|
5856
|
-
{
|
|
5857
|
-
iso_2: "cf",
|
|
5858
|
-
iso_3: "caf",
|
|
5859
|
-
num_code: "140",
|
|
5860
|
-
name: "CENTRAL AFRICAN REPUBLIC",
|
|
5861
|
-
display_name: "Central African Republic"
|
|
5862
|
-
},
|
|
5863
|
-
{
|
|
5864
|
-
iso_2: "td",
|
|
5865
|
-
iso_3: "tcd",
|
|
5866
|
-
num_code: "148",
|
|
5867
|
-
name: "CHAD",
|
|
5868
|
-
display_name: "Chad"
|
|
5869
|
-
},
|
|
5870
|
-
{
|
|
5871
|
-
iso_2: "cl",
|
|
5872
|
-
iso_3: "chl",
|
|
5873
|
-
num_code: "152",
|
|
5874
|
-
name: "CHILE",
|
|
5875
|
-
display_name: "Chile"
|
|
5876
|
-
},
|
|
5877
|
-
{
|
|
5878
|
-
iso_2: "cn",
|
|
5879
|
-
iso_3: "chn",
|
|
5880
|
-
num_code: "156",
|
|
5881
|
-
name: "CHINA",
|
|
5882
|
-
display_name: "China"
|
|
5883
|
-
},
|
|
5884
|
-
{
|
|
5885
|
-
iso_2: "cx",
|
|
5886
|
-
iso_3: "cxr",
|
|
5887
|
-
num_code: "162",
|
|
5888
|
-
name: "CHRISTMAS ISLAND",
|
|
5889
|
-
display_name: "Christmas Island"
|
|
5890
|
-
},
|
|
5891
|
-
{
|
|
5892
|
-
iso_2: "cc",
|
|
5893
|
-
iso_3: "cck",
|
|
5894
|
-
num_code: "166",
|
|
5895
|
-
name: "COCOS (KEELING) ISLANDS",
|
|
5896
|
-
display_name: "Cocos (Keeling) Islands"
|
|
5897
|
-
},
|
|
5898
|
-
{
|
|
5899
|
-
iso_2: "co",
|
|
5900
|
-
iso_3: "col",
|
|
5901
|
-
num_code: "170",
|
|
5902
|
-
name: "COLOMBIA",
|
|
5903
|
-
display_name: "Colombia"
|
|
5904
|
-
},
|
|
5905
|
-
{
|
|
5906
|
-
iso_2: "km",
|
|
5907
|
-
iso_3: "com",
|
|
5908
|
-
num_code: "174",
|
|
5909
|
-
name: "COMOROS",
|
|
5910
|
-
display_name: "Comoros"
|
|
5911
|
-
},
|
|
5912
|
-
{
|
|
5913
|
-
iso_2: "cg",
|
|
5914
|
-
iso_3: "cog",
|
|
5915
|
-
num_code: "178",
|
|
5916
|
-
name: "CONGO",
|
|
5917
|
-
display_name: "Congo"
|
|
5918
|
-
},
|
|
5919
|
-
{
|
|
5920
|
-
iso_2: "cd",
|
|
5921
|
-
iso_3: "cod",
|
|
5922
|
-
num_code: "180",
|
|
5923
|
-
name: "CONGO, THE DEMOCRATIC REPUBLIC OF THE",
|
|
5924
|
-
display_name: "Congo, the Democratic Republic of the"
|
|
5925
|
-
},
|
|
5926
|
-
{
|
|
5927
|
-
iso_2: "ck",
|
|
5928
|
-
iso_3: "cok",
|
|
5929
|
-
num_code: "184",
|
|
5930
|
-
name: "COOK ISLANDS",
|
|
5931
|
-
display_name: "Cook Islands"
|
|
5932
|
-
},
|
|
5933
|
-
{
|
|
5934
|
-
iso_2: "cr",
|
|
5935
|
-
iso_3: "cri",
|
|
5936
|
-
num_code: "188",
|
|
5937
|
-
name: "COSTA RICA",
|
|
5938
|
-
display_name: "Costa Rica"
|
|
5939
|
-
},
|
|
5940
|
-
{
|
|
5941
|
-
iso_2: "ci",
|
|
5942
|
-
iso_3: "civ",
|
|
5943
|
-
num_code: "384",
|
|
5944
|
-
name: "COTE D'IVOIRE",
|
|
5945
|
-
display_name: "Cote D'Ivoire"
|
|
5946
|
-
},
|
|
5947
|
-
{
|
|
5948
|
-
iso_2: "hr",
|
|
5949
|
-
iso_3: "hrv",
|
|
5950
|
-
num_code: "191",
|
|
5951
|
-
name: "CROATIA",
|
|
5952
|
-
display_name: "Croatia"
|
|
5953
|
-
},
|
|
5954
|
-
{
|
|
5955
|
-
iso_2: "cu",
|
|
5956
|
-
iso_3: "cub",
|
|
5957
|
-
num_code: "192",
|
|
5958
|
-
name: "CUBA",
|
|
5959
|
-
display_name: "Cuba"
|
|
5960
|
-
},
|
|
5961
|
-
{
|
|
5962
|
-
iso_2: "cw",
|
|
5963
|
-
iso_3: "cuw",
|
|
5964
|
-
num_code: "531",
|
|
5965
|
-
name: "CURAÇAO",
|
|
5966
|
-
display_name: "Curaçao"
|
|
5967
|
-
},
|
|
5968
|
-
{
|
|
5969
|
-
iso_2: "cy",
|
|
5970
|
-
iso_3: "cyp",
|
|
5971
|
-
num_code: "196",
|
|
5972
|
-
name: "CYPRUS",
|
|
5973
|
-
display_name: "Cyprus"
|
|
5974
|
-
},
|
|
5975
|
-
{
|
|
5976
|
-
iso_2: "cz",
|
|
5977
|
-
iso_3: "cze",
|
|
5978
|
-
num_code: "203",
|
|
5979
|
-
name: "CZECH REPUBLIC",
|
|
5980
|
-
display_name: "Czech Republic"
|
|
5981
|
-
},
|
|
5982
|
-
{
|
|
5983
|
-
iso_2: "dk",
|
|
5984
|
-
iso_3: "dnk",
|
|
5985
|
-
num_code: "208",
|
|
5986
|
-
name: "DENMARK",
|
|
5987
|
-
display_name: "Denmark"
|
|
5988
|
-
},
|
|
5989
|
-
{
|
|
5990
|
-
iso_2: "dj",
|
|
5991
|
-
iso_3: "dji",
|
|
5992
|
-
num_code: "262",
|
|
5993
|
-
name: "DJIBOUTI",
|
|
5994
|
-
display_name: "Djibouti"
|
|
5995
|
-
},
|
|
5996
|
-
{
|
|
5997
|
-
iso_2: "dm",
|
|
5998
|
-
iso_3: "dma",
|
|
5999
|
-
num_code: "212",
|
|
6000
|
-
name: "DOMINICA",
|
|
6001
|
-
display_name: "Dominica"
|
|
6002
|
-
},
|
|
6003
|
-
{
|
|
6004
|
-
iso_2: "do",
|
|
6005
|
-
iso_3: "dom",
|
|
6006
|
-
num_code: "214",
|
|
6007
|
-
name: "DOMINICAN REPUBLIC",
|
|
6008
|
-
display_name: "Dominican Republic"
|
|
6009
|
-
},
|
|
6010
|
-
{
|
|
6011
|
-
iso_2: "ec",
|
|
6012
|
-
iso_3: "ecu",
|
|
6013
|
-
num_code: "218",
|
|
6014
|
-
name: "ECUADOR",
|
|
6015
|
-
display_name: "Ecuador"
|
|
6016
|
-
},
|
|
6017
|
-
{
|
|
6018
|
-
iso_2: "eg",
|
|
6019
|
-
iso_3: "egy",
|
|
6020
|
-
num_code: "818",
|
|
6021
|
-
name: "EGYPT",
|
|
6022
|
-
display_name: "Egypt"
|
|
6023
|
-
},
|
|
6024
|
-
{
|
|
6025
|
-
iso_2: "sv",
|
|
6026
|
-
iso_3: "slv",
|
|
6027
|
-
num_code: "222",
|
|
6028
|
-
name: "EL SALVADOR",
|
|
6029
|
-
display_name: "El Salvador"
|
|
6030
|
-
},
|
|
6031
|
-
{
|
|
6032
|
-
iso_2: "gq",
|
|
6033
|
-
iso_3: "gnq",
|
|
6034
|
-
num_code: "226",
|
|
6035
|
-
name: "EQUATORIAL GUINEA",
|
|
6036
|
-
display_name: "Equatorial Guinea"
|
|
6037
|
-
},
|
|
6038
|
-
{
|
|
6039
|
-
iso_2: "er",
|
|
6040
|
-
iso_3: "eri",
|
|
6041
|
-
num_code: "232",
|
|
6042
|
-
name: "ERITREA",
|
|
6043
|
-
display_name: "Eritrea"
|
|
6044
|
-
},
|
|
6045
|
-
{
|
|
6046
|
-
iso_2: "ee",
|
|
6047
|
-
iso_3: "est",
|
|
6048
|
-
num_code: "233",
|
|
6049
|
-
name: "ESTONIA",
|
|
6050
|
-
display_name: "Estonia"
|
|
6051
|
-
},
|
|
6052
|
-
{
|
|
6053
|
-
iso_2: "et",
|
|
6054
|
-
iso_3: "eth",
|
|
6055
|
-
num_code: "231",
|
|
6056
|
-
name: "ETHIOPIA",
|
|
6057
|
-
display_name: "Ethiopia"
|
|
6058
|
-
},
|
|
6059
|
-
{
|
|
6060
|
-
iso_2: "fk",
|
|
6061
|
-
iso_3: "flk",
|
|
6062
|
-
num_code: "238",
|
|
6063
|
-
name: "FALKLAND ISLANDS (MALVINAS)",
|
|
6064
|
-
display_name: "Falkland Islands (Malvinas)"
|
|
6065
|
-
},
|
|
6066
|
-
{
|
|
6067
|
-
iso_2: "fo",
|
|
6068
|
-
iso_3: "fro",
|
|
6069
|
-
num_code: "234",
|
|
6070
|
-
name: "FAROE ISLANDS",
|
|
6071
|
-
display_name: "Faroe Islands"
|
|
6072
|
-
},
|
|
6073
|
-
{
|
|
6074
|
-
iso_2: "fj",
|
|
6075
|
-
iso_3: "fji",
|
|
6076
|
-
num_code: "242",
|
|
6077
|
-
name: "FIJI",
|
|
6078
|
-
display_name: "Fiji"
|
|
6079
|
-
},
|
|
6080
|
-
{
|
|
6081
|
-
iso_2: "fi",
|
|
6082
|
-
iso_3: "fin",
|
|
6083
|
-
num_code: "246",
|
|
6084
|
-
name: "FINLAND",
|
|
6085
|
-
display_name: "Finland"
|
|
6086
|
-
},
|
|
6087
|
-
{
|
|
6088
|
-
iso_2: "fr",
|
|
6089
|
-
iso_3: "fra",
|
|
6090
|
-
num_code: "250",
|
|
6091
|
-
name: "FRANCE",
|
|
6092
|
-
display_name: "France"
|
|
6093
|
-
},
|
|
6094
|
-
{
|
|
6095
|
-
iso_2: "gf",
|
|
6096
|
-
iso_3: "guf",
|
|
6097
|
-
num_code: "254",
|
|
6098
|
-
name: "FRENCH GUIANA",
|
|
6099
|
-
display_name: "French Guiana"
|
|
6100
|
-
},
|
|
6101
|
-
{
|
|
6102
|
-
iso_2: "pf",
|
|
6103
|
-
iso_3: "pyf",
|
|
6104
|
-
num_code: "258",
|
|
6105
|
-
name: "FRENCH POLYNESIA",
|
|
6106
|
-
display_name: "French Polynesia"
|
|
6107
|
-
},
|
|
6108
|
-
{
|
|
6109
|
-
iso_2: "tf",
|
|
6110
|
-
iso_3: "atf",
|
|
6111
|
-
num_code: "260",
|
|
6112
|
-
name: "FRENCH SOUTHERN TERRITORIES",
|
|
6113
|
-
display_name: "French Southern Territories"
|
|
6114
|
-
},
|
|
6115
|
-
{
|
|
6116
|
-
iso_2: "ga",
|
|
6117
|
-
iso_3: "gab",
|
|
6118
|
-
num_code: "266",
|
|
6119
|
-
name: "GABON",
|
|
6120
|
-
display_name: "Gabon"
|
|
6121
|
-
},
|
|
6122
|
-
{
|
|
6123
|
-
iso_2: "gm",
|
|
6124
|
-
iso_3: "gmb",
|
|
6125
|
-
num_code: "270",
|
|
6126
|
-
name: "GAMBIA",
|
|
6127
|
-
display_name: "Gambia"
|
|
6128
|
-
},
|
|
6129
|
-
{
|
|
6130
|
-
iso_2: "ge",
|
|
6131
|
-
iso_3: "geo",
|
|
6132
|
-
num_code: "268",
|
|
6133
|
-
name: "GEORGIA",
|
|
6134
|
-
display_name: "Georgia"
|
|
6135
|
-
},
|
|
6136
|
-
{
|
|
6137
|
-
iso_2: "de",
|
|
6138
|
-
iso_3: "deu",
|
|
6139
|
-
num_code: "276",
|
|
6140
|
-
name: "GERMANY",
|
|
6141
|
-
display_name: "Germany"
|
|
6142
|
-
},
|
|
6143
|
-
{
|
|
6144
|
-
iso_2: "gh",
|
|
6145
|
-
iso_3: "gha",
|
|
6146
|
-
num_code: "288",
|
|
6147
|
-
name: "GHANA",
|
|
6148
|
-
display_name: "Ghana"
|
|
6149
|
-
},
|
|
6150
|
-
{
|
|
6151
|
-
iso_2: "gi",
|
|
6152
|
-
iso_3: "gib",
|
|
6153
|
-
num_code: "292",
|
|
6154
|
-
name: "GIBRALTAR",
|
|
6155
|
-
display_name: "Gibraltar"
|
|
6156
|
-
},
|
|
6157
|
-
{
|
|
6158
|
-
iso_2: "gr",
|
|
6159
|
-
iso_3: "grc",
|
|
6160
|
-
num_code: "300",
|
|
6161
|
-
name: "GREECE",
|
|
6162
|
-
display_name: "Greece"
|
|
6163
|
-
},
|
|
6164
|
-
{
|
|
6165
|
-
iso_2: "gl",
|
|
6166
|
-
iso_3: "grl",
|
|
6167
|
-
num_code: "304",
|
|
6168
|
-
name: "GREENLAND",
|
|
6169
|
-
display_name: "Greenland"
|
|
6170
|
-
},
|
|
6171
|
-
{
|
|
6172
|
-
iso_2: "gd",
|
|
6173
|
-
iso_3: "grd",
|
|
6174
|
-
num_code: "308",
|
|
6175
|
-
name: "GRENADA",
|
|
6176
|
-
display_name: "Grenada"
|
|
6177
|
-
},
|
|
6178
|
-
{
|
|
6179
|
-
iso_2: "gp",
|
|
6180
|
-
iso_3: "glp",
|
|
6181
|
-
num_code: "312",
|
|
6182
|
-
name: "GUADELOUPE",
|
|
6183
|
-
display_name: "Guadeloupe"
|
|
6184
|
-
},
|
|
6185
|
-
{
|
|
6186
|
-
iso_2: "gu",
|
|
6187
|
-
iso_3: "gum",
|
|
6188
|
-
num_code: "316",
|
|
6189
|
-
name: "GUAM",
|
|
6190
|
-
display_name: "Guam"
|
|
6191
|
-
},
|
|
6192
|
-
{
|
|
6193
|
-
iso_2: "gt",
|
|
6194
|
-
iso_3: "gtm",
|
|
6195
|
-
num_code: "320",
|
|
6196
|
-
name: "GUATEMALA",
|
|
6197
|
-
display_name: "Guatemala"
|
|
6198
|
-
},
|
|
6199
|
-
{
|
|
6200
|
-
iso_2: "gg",
|
|
6201
|
-
iso_3: "ggy",
|
|
6202
|
-
num_code: "831",
|
|
6203
|
-
name: "GUERNSEY",
|
|
6204
|
-
display_name: "Guernsey"
|
|
6205
|
-
},
|
|
6206
|
-
{
|
|
6207
|
-
iso_2: "gn",
|
|
6208
|
-
iso_3: "gin",
|
|
6209
|
-
num_code: "324",
|
|
6210
|
-
name: "GUINEA",
|
|
6211
|
-
display_name: "Guinea"
|
|
6212
|
-
},
|
|
6213
|
-
{
|
|
6214
|
-
iso_2: "gw",
|
|
6215
|
-
iso_3: "gnb",
|
|
6216
|
-
num_code: "624",
|
|
6217
|
-
name: "GUINEA-BISSAU",
|
|
6218
|
-
display_name: "Guinea-Bissau"
|
|
6219
|
-
},
|
|
6220
|
-
{
|
|
6221
|
-
iso_2: "gy",
|
|
6222
|
-
iso_3: "guy",
|
|
6223
|
-
num_code: "328",
|
|
6224
|
-
name: "GUYANA",
|
|
6225
|
-
display_name: "Guyana"
|
|
6226
|
-
},
|
|
6227
|
-
{
|
|
6228
|
-
iso_2: "ht",
|
|
6229
|
-
iso_3: "hti",
|
|
6230
|
-
num_code: "332",
|
|
6231
|
-
name: "HAITI",
|
|
6232
|
-
display_name: "Haiti"
|
|
6233
|
-
},
|
|
6234
|
-
{
|
|
6235
|
-
iso_2: "hm",
|
|
6236
|
-
iso_3: "hmd",
|
|
6237
|
-
num_code: "334",
|
|
6238
|
-
name: "HEARD ISLAND AND MCDONALD ISLANDS",
|
|
6239
|
-
display_name: "Heard Island And Mcdonald Islands"
|
|
6240
|
-
},
|
|
6241
|
-
{
|
|
6242
|
-
iso_2: "va",
|
|
6243
|
-
iso_3: "vat",
|
|
6244
|
-
num_code: "336",
|
|
6245
|
-
name: "HOLY SEE (VATICAN CITY STATE)",
|
|
6246
|
-
display_name: "Holy See (Vatican City State)"
|
|
6247
|
-
},
|
|
6248
|
-
{
|
|
6249
|
-
iso_2: "hn",
|
|
6250
|
-
iso_3: "hnd",
|
|
6251
|
-
num_code: "340",
|
|
6252
|
-
name: "HONDURAS",
|
|
6253
|
-
display_name: "Honduras"
|
|
6254
|
-
},
|
|
6255
|
-
{
|
|
6256
|
-
iso_2: "hk",
|
|
6257
|
-
iso_3: "hkg",
|
|
6258
|
-
num_code: "344",
|
|
6259
|
-
name: "HONG KONG",
|
|
6260
|
-
display_name: "Hong Kong"
|
|
6261
|
-
},
|
|
6262
|
-
{
|
|
6263
|
-
iso_2: "hu",
|
|
6264
|
-
iso_3: "hun",
|
|
6265
|
-
num_code: "348",
|
|
6266
|
-
name: "HUNGARY",
|
|
6267
|
-
display_name: "Hungary"
|
|
6268
|
-
},
|
|
6269
|
-
{
|
|
6270
|
-
iso_2: "is",
|
|
6271
|
-
iso_3: "isl",
|
|
6272
|
-
num_code: "352",
|
|
6273
|
-
name: "ICELAND",
|
|
6274
|
-
display_name: "Iceland"
|
|
6275
|
-
},
|
|
6276
|
-
{
|
|
6277
|
-
iso_2: "in",
|
|
6278
|
-
iso_3: "ind",
|
|
6279
|
-
num_code: "356",
|
|
6280
|
-
name: "INDIA",
|
|
6281
|
-
display_name: "India"
|
|
6282
|
-
},
|
|
6283
|
-
{
|
|
6284
|
-
iso_2: "id",
|
|
6285
|
-
iso_3: "idn",
|
|
6286
|
-
num_code: "360",
|
|
6287
|
-
name: "INDONESIA",
|
|
6288
|
-
display_name: "Indonesia"
|
|
6289
|
-
},
|
|
6290
|
-
{
|
|
6291
|
-
iso_2: "ir",
|
|
6292
|
-
iso_3: "irn",
|
|
6293
|
-
num_code: "364",
|
|
6294
|
-
name: "IRAN, ISLAMIC REPUBLIC OF",
|
|
6295
|
-
display_name: "Iran, Islamic Republic of"
|
|
6296
|
-
},
|
|
6297
|
-
{
|
|
6298
|
-
iso_2: "iq",
|
|
6299
|
-
iso_3: "irq",
|
|
6300
|
-
num_code: "368",
|
|
6301
|
-
name: "IRAQ",
|
|
6302
|
-
display_name: "Iraq"
|
|
6303
|
-
},
|
|
6304
|
-
{
|
|
6305
|
-
iso_2: "ie",
|
|
6306
|
-
iso_3: "irl",
|
|
6307
|
-
num_code: "372",
|
|
6308
|
-
name: "IRELAND",
|
|
6309
|
-
display_name: "Ireland"
|
|
6310
|
-
},
|
|
6311
|
-
{
|
|
6312
|
-
iso_2: "im",
|
|
6313
|
-
iso_3: "imn",
|
|
6314
|
-
num_code: "833",
|
|
6315
|
-
name: "ISLE OF MAN",
|
|
6316
|
-
display_name: "Isle Of Man"
|
|
6317
|
-
},
|
|
6318
|
-
{
|
|
6319
|
-
iso_2: "il",
|
|
6320
|
-
iso_3: "isr",
|
|
6321
|
-
num_code: "376",
|
|
6322
|
-
name: "ISRAEL",
|
|
6323
|
-
display_name: "Israel"
|
|
6324
|
-
},
|
|
6325
|
-
{
|
|
6326
|
-
iso_2: "it",
|
|
6327
|
-
iso_3: "ita",
|
|
6328
|
-
num_code: "380",
|
|
6329
|
-
name: "ITALY",
|
|
6330
|
-
display_name: "Italy"
|
|
6331
|
-
},
|
|
6332
|
-
{
|
|
6333
|
-
iso_2: "jm",
|
|
6334
|
-
iso_3: "jam",
|
|
6335
|
-
num_code: "388",
|
|
6336
|
-
name: "JAMAICA",
|
|
6337
|
-
display_name: "Jamaica"
|
|
6338
|
-
},
|
|
6339
|
-
{
|
|
6340
|
-
iso_2: "jp",
|
|
6341
|
-
iso_3: "jpn",
|
|
6342
|
-
num_code: "392",
|
|
6343
|
-
name: "JAPAN",
|
|
6344
|
-
display_name: "Japan"
|
|
6345
|
-
},
|
|
6346
|
-
{
|
|
6347
|
-
iso_2: "je",
|
|
6348
|
-
iso_3: "jey",
|
|
6349
|
-
num_code: "832",
|
|
6350
|
-
name: "JERSEY",
|
|
6351
|
-
display_name: "Jersey"
|
|
6352
|
-
},
|
|
6353
|
-
{
|
|
6354
|
-
iso_2: "jo",
|
|
6355
|
-
iso_3: "jor",
|
|
6356
|
-
num_code: "400",
|
|
6357
|
-
name: "JORDAN",
|
|
6358
|
-
display_name: "Jordan"
|
|
6359
|
-
},
|
|
6360
|
-
{
|
|
6361
|
-
iso_2: "kz",
|
|
6362
|
-
iso_3: "kaz",
|
|
6363
|
-
num_code: "398",
|
|
6364
|
-
name: "KAZAKHSTAN",
|
|
6365
|
-
display_name: "Kazakhstan"
|
|
6366
|
-
},
|
|
6367
|
-
{
|
|
6368
|
-
iso_2: "ke",
|
|
6369
|
-
iso_3: "ken",
|
|
6370
|
-
num_code: "404",
|
|
6371
|
-
name: "KENYA",
|
|
6372
|
-
display_name: "Kenya"
|
|
6373
|
-
},
|
|
6374
|
-
{
|
|
6375
|
-
iso_2: "ki",
|
|
6376
|
-
iso_3: "kir",
|
|
6377
|
-
num_code: "296",
|
|
6378
|
-
name: "KIRIBATI",
|
|
6379
|
-
display_name: "Kiribati"
|
|
6380
|
-
},
|
|
6381
|
-
{
|
|
6382
|
-
iso_2: "kp",
|
|
6383
|
-
iso_3: "prk",
|
|
6384
|
-
num_code: "408",
|
|
6385
|
-
name: "KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF",
|
|
6386
|
-
display_name: "Korea, Democratic People's Republic of"
|
|
6387
|
-
},
|
|
6388
|
-
{
|
|
6389
|
-
iso_2: "kr",
|
|
6390
|
-
iso_3: "kor",
|
|
6391
|
-
num_code: "410",
|
|
6392
|
-
name: "KOREA, REPUBLIC OF",
|
|
6393
|
-
display_name: "Korea, Republic of"
|
|
6394
|
-
},
|
|
6395
|
-
{
|
|
6396
|
-
iso_2: "xk",
|
|
6397
|
-
iso_3: "xkx",
|
|
6398
|
-
num_code: "900",
|
|
6399
|
-
name: "KOSOVO",
|
|
6400
|
-
display_name: "Kosovo"
|
|
6401
|
-
},
|
|
6402
|
-
{
|
|
6403
|
-
iso_2: "kw",
|
|
6404
|
-
iso_3: "kwt",
|
|
6405
|
-
num_code: "414",
|
|
6406
|
-
name: "KUWAIT",
|
|
6407
|
-
display_name: "Kuwait"
|
|
6408
|
-
},
|
|
6409
|
-
{
|
|
6410
|
-
iso_2: "kg",
|
|
6411
|
-
iso_3: "kgz",
|
|
6412
|
-
num_code: "417",
|
|
6413
|
-
name: "KYRGYZSTAN",
|
|
6414
|
-
display_name: "Kyrgyzstan"
|
|
6415
|
-
},
|
|
6416
|
-
{
|
|
6417
|
-
iso_2: "la",
|
|
6418
|
-
iso_3: "lao",
|
|
6419
|
-
num_code: "418",
|
|
6420
|
-
name: "LAO PEOPLE'S DEMOCRATIC REPUBLIC",
|
|
6421
|
-
display_name: "Lao People's Democratic Republic"
|
|
6422
|
-
},
|
|
6423
|
-
{
|
|
6424
|
-
iso_2: "lv",
|
|
6425
|
-
iso_3: "lva",
|
|
6426
|
-
num_code: "428",
|
|
6427
|
-
name: "LATVIA",
|
|
6428
|
-
display_name: "Latvia"
|
|
6429
|
-
},
|
|
6430
|
-
{
|
|
6431
|
-
iso_2: "lb",
|
|
6432
|
-
iso_3: "lbn",
|
|
6433
|
-
num_code: "422",
|
|
6434
|
-
name: "LEBANON",
|
|
6435
|
-
display_name: "Lebanon"
|
|
6436
|
-
},
|
|
6437
|
-
{
|
|
6438
|
-
iso_2: "ls",
|
|
6439
|
-
iso_3: "lso",
|
|
6440
|
-
num_code: "426",
|
|
6441
|
-
name: "LESOTHO",
|
|
6442
|
-
display_name: "Lesotho"
|
|
6443
|
-
},
|
|
6444
|
-
{
|
|
6445
|
-
iso_2: "lr",
|
|
6446
|
-
iso_3: "lbr",
|
|
6447
|
-
num_code: "430",
|
|
6448
|
-
name: "LIBERIA",
|
|
6449
|
-
display_name: "Liberia"
|
|
6450
|
-
},
|
|
6451
|
-
{
|
|
6452
|
-
iso_2: "ly",
|
|
6453
|
-
iso_3: "lby",
|
|
6454
|
-
num_code: "434",
|
|
6455
|
-
name: "LIBYA",
|
|
6456
|
-
display_name: "Libya"
|
|
6457
|
-
},
|
|
6458
|
-
{
|
|
6459
|
-
iso_2: "li",
|
|
6460
|
-
iso_3: "lie",
|
|
6461
|
-
num_code: "438",
|
|
6462
|
-
name: "LIECHTENSTEIN",
|
|
6463
|
-
display_name: "Liechtenstein"
|
|
6464
|
-
},
|
|
6465
|
-
{
|
|
6466
|
-
iso_2: "lt",
|
|
6467
|
-
iso_3: "ltu",
|
|
6468
|
-
num_code: "440",
|
|
6469
|
-
name: "LITHUANIA",
|
|
6470
|
-
display_name: "Lithuania"
|
|
6471
|
-
},
|
|
6472
|
-
{
|
|
6473
|
-
iso_2: "lu",
|
|
6474
|
-
iso_3: "lux",
|
|
6475
|
-
num_code: "442",
|
|
6476
|
-
name: "LUXEMBOURG",
|
|
6477
|
-
display_name: "Luxembourg"
|
|
6478
|
-
},
|
|
6479
|
-
{
|
|
6480
|
-
iso_2: "mo",
|
|
6481
|
-
iso_3: "mac",
|
|
6482
|
-
num_code: "446",
|
|
6483
|
-
name: "MACAO",
|
|
6484
|
-
display_name: "Macao"
|
|
6485
|
-
},
|
|
6486
|
-
{
|
|
6487
|
-
iso_2: "mg",
|
|
6488
|
-
iso_3: "mdg",
|
|
6489
|
-
num_code: "450",
|
|
6490
|
-
name: "MADAGASCAR",
|
|
6491
|
-
display_name: "Madagascar"
|
|
6492
|
-
},
|
|
6493
|
-
{
|
|
6494
|
-
iso_2: "mw",
|
|
6495
|
-
iso_3: "mwi",
|
|
6496
|
-
num_code: "454",
|
|
6497
|
-
name: "MALAWI",
|
|
6498
|
-
display_name: "Malawi"
|
|
6499
|
-
},
|
|
6500
|
-
{
|
|
6501
|
-
iso_2: "my",
|
|
6502
|
-
iso_3: "mys",
|
|
6503
|
-
num_code: "458",
|
|
6504
|
-
name: "MALAYSIA",
|
|
6505
|
-
display_name: "Malaysia"
|
|
6506
|
-
},
|
|
6507
|
-
{
|
|
6508
|
-
iso_2: "mv",
|
|
6509
|
-
iso_3: "mdv",
|
|
6510
|
-
num_code: "462",
|
|
6511
|
-
name: "MALDIVES",
|
|
6512
|
-
display_name: "Maldives"
|
|
6513
|
-
},
|
|
6514
|
-
{
|
|
6515
|
-
iso_2: "ml",
|
|
6516
|
-
iso_3: "mli",
|
|
6517
|
-
num_code: "466",
|
|
6518
|
-
name: "MALI",
|
|
6519
|
-
display_name: "Mali"
|
|
6520
|
-
},
|
|
6521
|
-
{
|
|
6522
|
-
iso_2: "mt",
|
|
6523
|
-
iso_3: "mlt",
|
|
6524
|
-
num_code: "470",
|
|
6525
|
-
name: "MALTA",
|
|
6526
|
-
display_name: "Malta"
|
|
6527
|
-
},
|
|
6528
|
-
{
|
|
6529
|
-
iso_2: "mh",
|
|
6530
|
-
iso_3: "mhl",
|
|
6531
|
-
num_code: "584",
|
|
6532
|
-
name: "MARSHALL ISLANDS",
|
|
6533
|
-
display_name: "Marshall Islands"
|
|
6534
|
-
},
|
|
6535
|
-
{
|
|
6536
|
-
iso_2: "mq",
|
|
6537
|
-
iso_3: "mtq",
|
|
6538
|
-
num_code: "474",
|
|
6539
|
-
name: "MARTINIQUE",
|
|
6540
|
-
display_name: "Martinique"
|
|
6541
|
-
},
|
|
6542
|
-
{
|
|
6543
|
-
iso_2: "mr",
|
|
6544
|
-
iso_3: "mrt",
|
|
6545
|
-
num_code: "478",
|
|
6546
|
-
name: "MAURITANIA",
|
|
6547
|
-
display_name: "Mauritania"
|
|
6548
|
-
},
|
|
6549
|
-
{
|
|
6550
|
-
iso_2: "mu",
|
|
6551
|
-
iso_3: "mus",
|
|
6552
|
-
num_code: "480",
|
|
6553
|
-
name: "MAURITIUS",
|
|
6554
|
-
display_name: "Mauritius"
|
|
6555
|
-
},
|
|
6556
|
-
{
|
|
6557
|
-
iso_2: "yt",
|
|
6558
|
-
iso_3: "myt",
|
|
6559
|
-
num_code: "175",
|
|
6560
|
-
name: "MAYOTTE",
|
|
6561
|
-
display_name: "Mayotte"
|
|
6562
|
-
},
|
|
6563
|
-
{
|
|
6564
|
-
iso_2: "mx",
|
|
6565
|
-
iso_3: "mex",
|
|
6566
|
-
num_code: "484",
|
|
6567
|
-
name: "MEXICO",
|
|
6568
|
-
display_name: "Mexico"
|
|
6569
|
-
},
|
|
6570
|
-
{
|
|
6571
|
-
iso_2: "fm",
|
|
6572
|
-
iso_3: "fsm",
|
|
6573
|
-
num_code: "583",
|
|
6574
|
-
name: "MICRONESIA, FEDERATED STATES OF",
|
|
6575
|
-
display_name: "Micronesia, Federated States of"
|
|
6576
|
-
},
|
|
6577
|
-
{
|
|
6578
|
-
iso_2: "md",
|
|
6579
|
-
iso_3: "mda",
|
|
6580
|
-
num_code: "498",
|
|
6581
|
-
name: "MOLDOVA, REPUBLIC OF",
|
|
6582
|
-
display_name: "Moldova, Republic of"
|
|
6583
|
-
},
|
|
6584
|
-
{
|
|
6585
|
-
iso_2: "mc",
|
|
6586
|
-
iso_3: "mco",
|
|
6587
|
-
num_code: "492",
|
|
6588
|
-
name: "MONACO",
|
|
6589
|
-
display_name: "Monaco"
|
|
6590
|
-
},
|
|
6591
|
-
{
|
|
6592
|
-
iso_2: "mn",
|
|
6593
|
-
iso_3: "mng",
|
|
6594
|
-
num_code: "496",
|
|
6595
|
-
name: "MONGOLIA",
|
|
6596
|
-
display_name: "Mongolia"
|
|
6597
|
-
},
|
|
6598
|
-
{
|
|
6599
|
-
iso_2: "me",
|
|
6600
|
-
iso_3: "mne",
|
|
6601
|
-
num_code: "499",
|
|
6602
|
-
name: "MONTENEGRO",
|
|
6603
|
-
display_name: "Montenegro"
|
|
6604
|
-
},
|
|
6605
|
-
{
|
|
6606
|
-
iso_2: "ms",
|
|
6607
|
-
iso_3: "msr",
|
|
6608
|
-
num_code: "500",
|
|
6609
|
-
name: "MONTSERRAT",
|
|
6610
|
-
display_name: "Montserrat"
|
|
6611
|
-
},
|
|
6612
|
-
{
|
|
6613
|
-
iso_2: "ma",
|
|
6614
|
-
iso_3: "mar",
|
|
6615
|
-
num_code: "504",
|
|
6616
|
-
name: "MOROCCO",
|
|
6617
|
-
display_name: "Morocco"
|
|
6618
|
-
},
|
|
6619
|
-
{
|
|
6620
|
-
iso_2: "mz",
|
|
6621
|
-
iso_3: "moz",
|
|
6622
|
-
num_code: "508",
|
|
6623
|
-
name: "MOZAMBIQUE",
|
|
6624
|
-
display_name: "Mozambique"
|
|
6625
|
-
},
|
|
6626
|
-
{
|
|
6627
|
-
iso_2: "mm",
|
|
6628
|
-
iso_3: "mmr",
|
|
6629
|
-
num_code: "104",
|
|
6630
|
-
name: "MYANMAR",
|
|
6631
|
-
display_name: "Myanmar"
|
|
6632
|
-
},
|
|
6633
|
-
{
|
|
6634
|
-
iso_2: "na",
|
|
6635
|
-
iso_3: "nam",
|
|
6636
|
-
num_code: "516",
|
|
6637
|
-
name: "NAMIBIA",
|
|
6638
|
-
display_name: "Namibia"
|
|
6639
|
-
},
|
|
6640
|
-
{
|
|
6641
|
-
iso_2: "nr",
|
|
6642
|
-
iso_3: "nru",
|
|
6643
|
-
num_code: "520",
|
|
6644
|
-
name: "NAURU",
|
|
6645
|
-
display_name: "Nauru"
|
|
6646
|
-
},
|
|
6647
|
-
{
|
|
6648
|
-
iso_2: "np",
|
|
6649
|
-
iso_3: "npl",
|
|
6650
|
-
num_code: "524",
|
|
6651
|
-
name: "NEPAL",
|
|
6652
|
-
display_name: "Nepal"
|
|
6653
|
-
},
|
|
6654
|
-
{
|
|
6655
|
-
iso_2: "nl",
|
|
6656
|
-
iso_3: "nld",
|
|
6657
|
-
num_code: "528",
|
|
6658
|
-
name: "NETHERLANDS",
|
|
6659
|
-
display_name: "Netherlands"
|
|
6660
|
-
},
|
|
6661
|
-
{
|
|
6662
|
-
iso_2: "nc",
|
|
6663
|
-
iso_3: "ncl",
|
|
6664
|
-
num_code: "540",
|
|
6665
|
-
name: "NEW CALEDONIA",
|
|
6666
|
-
display_name: "New Caledonia"
|
|
6667
|
-
},
|
|
6668
|
-
{
|
|
6669
|
-
iso_2: "nz",
|
|
6670
|
-
iso_3: "nzl",
|
|
6671
|
-
num_code: "554",
|
|
6672
|
-
name: "NEW ZEALAND",
|
|
6673
|
-
display_name: "New Zealand"
|
|
6674
|
-
},
|
|
6675
|
-
{
|
|
6676
|
-
iso_2: "ni",
|
|
6677
|
-
iso_3: "nic",
|
|
6678
|
-
num_code: "558",
|
|
6679
|
-
name: "NICARAGUA",
|
|
6680
|
-
display_name: "Nicaragua"
|
|
6681
|
-
},
|
|
6682
|
-
{
|
|
6683
|
-
iso_2: "ne",
|
|
6684
|
-
iso_3: "ner",
|
|
6685
|
-
num_code: "562",
|
|
6686
|
-
name: "NIGER",
|
|
6687
|
-
display_name: "Niger"
|
|
6688
|
-
},
|
|
6689
|
-
{
|
|
6690
|
-
iso_2: "ng",
|
|
6691
|
-
iso_3: "nga",
|
|
6692
|
-
num_code: "566",
|
|
6693
|
-
name: "NIGERIA",
|
|
6694
|
-
display_name: "Nigeria"
|
|
6695
|
-
},
|
|
6696
|
-
{
|
|
6697
|
-
iso_2: "nu",
|
|
6698
|
-
iso_3: "niu",
|
|
6699
|
-
num_code: "570",
|
|
6700
|
-
name: "NIUE",
|
|
6701
|
-
display_name: "Niue"
|
|
6702
|
-
},
|
|
6703
|
-
{
|
|
6704
|
-
iso_2: "nf",
|
|
6705
|
-
iso_3: "nfk",
|
|
6706
|
-
num_code: "574",
|
|
6707
|
-
name: "NORFOLK ISLAND",
|
|
6708
|
-
display_name: "Norfolk Island"
|
|
6709
|
-
},
|
|
6710
|
-
{
|
|
6711
|
-
iso_2: "mk",
|
|
6712
|
-
iso_3: "mkd",
|
|
6713
|
-
num_code: "807",
|
|
6714
|
-
name: "NORTH MACEDONIA",
|
|
6715
|
-
display_name: "North Macedonia"
|
|
6716
|
-
},
|
|
6717
|
-
{
|
|
6718
|
-
iso_2: "mp",
|
|
6719
|
-
iso_3: "mnp",
|
|
6720
|
-
num_code: "580",
|
|
6721
|
-
name: "NORTHERN MARIANA ISLANDS",
|
|
6722
|
-
display_name: "Northern Mariana Islands"
|
|
6723
|
-
},
|
|
6724
|
-
{
|
|
6725
|
-
iso_2: "no",
|
|
6726
|
-
iso_3: "nor",
|
|
6727
|
-
num_code: "578",
|
|
6728
|
-
name: "NORWAY",
|
|
6729
|
-
display_name: "Norway"
|
|
6730
|
-
},
|
|
6731
|
-
{
|
|
6732
|
-
iso_2: "om",
|
|
6733
|
-
iso_3: "omn",
|
|
6734
|
-
num_code: "512",
|
|
6735
|
-
name: "OMAN",
|
|
6736
|
-
display_name: "Oman"
|
|
6737
|
-
},
|
|
6738
|
-
{
|
|
6739
|
-
iso_2: "pk",
|
|
6740
|
-
iso_3: "pak",
|
|
6741
|
-
num_code: "586",
|
|
6742
|
-
name: "PAKISTAN",
|
|
6743
|
-
display_name: "Pakistan"
|
|
6744
|
-
},
|
|
6745
|
-
{
|
|
6746
|
-
iso_2: "pw",
|
|
6747
|
-
iso_3: "plw",
|
|
6748
|
-
num_code: "585",
|
|
6749
|
-
name: "PALAU",
|
|
6750
|
-
display_name: "Palau"
|
|
6751
|
-
},
|
|
6752
|
-
{
|
|
6753
|
-
iso_2: "ps",
|
|
6754
|
-
iso_3: "pse",
|
|
6755
|
-
num_code: "275",
|
|
6756
|
-
name: "PALESTINIAN TERRITORY, OCCUPIED",
|
|
6757
|
-
display_name: "Palestinian Territory, Occupied"
|
|
6758
|
-
},
|
|
6759
|
-
{
|
|
6760
|
-
iso_2: "pa",
|
|
6761
|
-
iso_3: "pan",
|
|
6762
|
-
num_code: "591",
|
|
6763
|
-
name: "PANAMA",
|
|
6764
|
-
display_name: "Panama"
|
|
6765
|
-
},
|
|
6766
|
-
{
|
|
6767
|
-
iso_2: "pg",
|
|
6768
|
-
iso_3: "png",
|
|
6769
|
-
num_code: "598",
|
|
6770
|
-
name: "PAPUA NEW GUINEA",
|
|
6771
|
-
display_name: "Papua New Guinea"
|
|
6772
|
-
},
|
|
6773
|
-
{
|
|
6774
|
-
iso_2: "py",
|
|
6775
|
-
iso_3: "pry",
|
|
6776
|
-
num_code: "600",
|
|
6777
|
-
name: "PARAGUAY",
|
|
6778
|
-
display_name: "Paraguay"
|
|
6779
|
-
},
|
|
6780
|
-
{
|
|
6781
|
-
iso_2: "pe",
|
|
6782
|
-
iso_3: "per",
|
|
6783
|
-
num_code: "604",
|
|
6784
|
-
name: "PERU",
|
|
6785
|
-
display_name: "Peru"
|
|
6786
|
-
},
|
|
6787
|
-
{
|
|
6788
|
-
iso_2: "ph",
|
|
6789
|
-
iso_3: "phl",
|
|
6790
|
-
num_code: "608",
|
|
6791
|
-
name: "PHILIPPINES",
|
|
6792
|
-
display_name: "Philippines"
|
|
6793
|
-
},
|
|
6794
|
-
{
|
|
6795
|
-
iso_2: "pn",
|
|
6796
|
-
iso_3: "pcn",
|
|
6797
|
-
num_code: "612",
|
|
6798
|
-
name: "PITCAIRN",
|
|
6799
|
-
display_name: "Pitcairn"
|
|
6800
|
-
},
|
|
6801
|
-
{
|
|
6802
|
-
iso_2: "pl",
|
|
6803
|
-
iso_3: "pol",
|
|
6804
|
-
num_code: "616",
|
|
6805
|
-
name: "POLAND",
|
|
6806
|
-
display_name: "Poland"
|
|
6807
|
-
},
|
|
6808
|
-
{
|
|
6809
|
-
iso_2: "pt",
|
|
6810
|
-
iso_3: "prt",
|
|
6811
|
-
num_code: "620",
|
|
6812
|
-
name: "PORTUGAL",
|
|
6813
|
-
display_name: "Portugal"
|
|
6814
|
-
},
|
|
6815
|
-
{
|
|
6816
|
-
iso_2: "pr",
|
|
6817
|
-
iso_3: "pri",
|
|
6818
|
-
num_code: "630",
|
|
6819
|
-
name: "PUERTO RICO",
|
|
6820
|
-
display_name: "Puerto Rico"
|
|
6821
|
-
},
|
|
6822
|
-
{
|
|
6823
|
-
iso_2: "qa",
|
|
6824
|
-
iso_3: "qat",
|
|
6825
|
-
num_code: "634",
|
|
6826
|
-
name: "QATAR",
|
|
6827
|
-
display_name: "Qatar"
|
|
6828
|
-
},
|
|
6829
|
-
{
|
|
6830
|
-
iso_2: "re",
|
|
6831
|
-
iso_3: "reu",
|
|
6832
|
-
num_code: "638",
|
|
6833
|
-
name: "REUNION",
|
|
6834
|
-
display_name: "Reunion"
|
|
6835
|
-
},
|
|
6836
|
-
{
|
|
6837
|
-
iso_2: "ro",
|
|
6838
|
-
iso_3: "rom",
|
|
6839
|
-
num_code: "642",
|
|
6840
|
-
name: "ROMANIA",
|
|
6841
|
-
display_name: "Romania"
|
|
6842
|
-
},
|
|
6843
|
-
{
|
|
6844
|
-
iso_2: "ru",
|
|
6845
|
-
iso_3: "rus",
|
|
6846
|
-
num_code: "643",
|
|
6847
|
-
name: "RUSSIAN FEDERATION",
|
|
6848
|
-
display_name: "Russian Federation"
|
|
6849
|
-
},
|
|
6850
|
-
{
|
|
6851
|
-
iso_2: "rw",
|
|
6852
|
-
iso_3: "rwa",
|
|
6853
|
-
num_code: "646",
|
|
6854
|
-
name: "RWANDA",
|
|
6855
|
-
display_name: "Rwanda"
|
|
6856
|
-
},
|
|
6857
|
-
{
|
|
6858
|
-
iso_2: "bl",
|
|
6859
|
-
iso_3: "blm",
|
|
6860
|
-
num_code: "652",
|
|
6861
|
-
name: "SAINT BARTHÉLEMY",
|
|
6862
|
-
display_name: "Saint Barthélemy"
|
|
6863
|
-
},
|
|
6864
|
-
{
|
|
6865
|
-
iso_2: "sh",
|
|
6866
|
-
iso_3: "shn",
|
|
6867
|
-
num_code: "654",
|
|
6868
|
-
name: "SAINT HELENA",
|
|
6869
|
-
display_name: "Saint Helena"
|
|
6870
|
-
},
|
|
6871
|
-
{
|
|
6872
|
-
iso_2: "kn",
|
|
6873
|
-
iso_3: "kna",
|
|
6874
|
-
num_code: "659",
|
|
6875
|
-
name: "SAINT KITTS AND NEVIS",
|
|
6876
|
-
display_name: "Saint Kitts and Nevis"
|
|
6877
|
-
},
|
|
6878
|
-
{
|
|
6879
|
-
iso_2: "lc",
|
|
6880
|
-
iso_3: "lca",
|
|
6881
|
-
num_code: "662",
|
|
6882
|
-
name: "SAINT LUCIA",
|
|
6883
|
-
display_name: "Saint Lucia"
|
|
6884
|
-
},
|
|
6885
|
-
{
|
|
6886
|
-
iso_2: "mf",
|
|
6887
|
-
iso_3: "maf",
|
|
6888
|
-
num_code: "663",
|
|
6889
|
-
name: "SAINT MARTIN (FRENCH PART)",
|
|
6890
|
-
display_name: "Saint Martin (French part)"
|
|
6891
|
-
},
|
|
6892
|
-
{
|
|
6893
|
-
iso_2: "pm",
|
|
6894
|
-
iso_3: "spm",
|
|
6895
|
-
num_code: "666",
|
|
6896
|
-
name: "SAINT PIERRE AND MIQUELON",
|
|
6897
|
-
display_name: "Saint Pierre and Miquelon"
|
|
6898
|
-
},
|
|
6899
|
-
{
|
|
6900
|
-
iso_2: "vc",
|
|
6901
|
-
iso_3: "vct",
|
|
6902
|
-
num_code: "670",
|
|
6903
|
-
name: "SAINT VINCENT AND THE GRENADINES",
|
|
6904
|
-
display_name: "Saint Vincent and the Grenadines"
|
|
6905
|
-
},
|
|
6906
|
-
{
|
|
6907
|
-
iso_2: "ws",
|
|
6908
|
-
iso_3: "wsm",
|
|
6909
|
-
num_code: "882",
|
|
6910
|
-
name: "SAMOA",
|
|
6911
|
-
display_name: "Samoa"
|
|
6912
|
-
},
|
|
6913
|
-
{
|
|
6914
|
-
iso_2: "sm",
|
|
6915
|
-
iso_3: "smr",
|
|
6916
|
-
num_code: "674",
|
|
6917
|
-
name: "SAN MARINO",
|
|
6918
|
-
display_name: "San Marino"
|
|
6919
|
-
},
|
|
6920
|
-
{
|
|
6921
|
-
iso_2: "st",
|
|
6922
|
-
iso_3: "stp",
|
|
6923
|
-
num_code: "678",
|
|
6924
|
-
name: "SAO TOME AND PRINCIPE",
|
|
6925
|
-
display_name: "Sao Tome and Principe"
|
|
6926
|
-
},
|
|
6927
|
-
{
|
|
6928
|
-
iso_2: "sa",
|
|
6929
|
-
iso_3: "sau",
|
|
6930
|
-
num_code: "682",
|
|
6931
|
-
name: "SAUDI ARABIA",
|
|
6932
|
-
display_name: "Saudi Arabia"
|
|
6933
|
-
},
|
|
6934
|
-
{
|
|
6935
|
-
iso_2: "sn",
|
|
6936
|
-
iso_3: "sen",
|
|
6937
|
-
num_code: "686",
|
|
6938
|
-
name: "SENEGAL",
|
|
6939
|
-
display_name: "Senegal"
|
|
6940
|
-
},
|
|
6941
|
-
{
|
|
6942
|
-
iso_2: "rs",
|
|
6943
|
-
iso_3: "srb",
|
|
6944
|
-
num_code: "688",
|
|
6945
|
-
name: "SERBIA",
|
|
6946
|
-
display_name: "Serbia"
|
|
6947
|
-
},
|
|
6948
|
-
{
|
|
6949
|
-
iso_2: "sc",
|
|
6950
|
-
iso_3: "syc",
|
|
6951
|
-
num_code: "690",
|
|
6952
|
-
name: "SEYCHELLES",
|
|
6953
|
-
display_name: "Seychelles"
|
|
6954
|
-
},
|
|
6955
|
-
{
|
|
6956
|
-
iso_2: "sl",
|
|
6957
|
-
iso_3: "sle",
|
|
6958
|
-
num_code: "694",
|
|
6959
|
-
name: "SIERRA LEONE",
|
|
6960
|
-
display_name: "Sierra Leone"
|
|
6961
|
-
},
|
|
6962
|
-
{
|
|
6963
|
-
iso_2: "sg",
|
|
6964
|
-
iso_3: "sgp",
|
|
6965
|
-
num_code: "702",
|
|
6966
|
-
name: "SINGAPORE",
|
|
6967
|
-
display_name: "Singapore"
|
|
6968
|
-
},
|
|
6969
|
-
{
|
|
6970
|
-
iso_2: "sx",
|
|
6971
|
-
iso_3: "sxm",
|
|
6972
|
-
num_code: "534",
|
|
6973
|
-
name: "SINT MAARTEN",
|
|
6974
|
-
display_name: "Sint Maarten"
|
|
6975
|
-
},
|
|
6976
|
-
{
|
|
6977
|
-
iso_2: "sk",
|
|
6978
|
-
iso_3: "svk",
|
|
6979
|
-
num_code: "703",
|
|
6980
|
-
name: "SLOVAKIA",
|
|
6981
|
-
display_name: "Slovakia"
|
|
6982
|
-
},
|
|
6983
|
-
{
|
|
6984
|
-
iso_2: "si",
|
|
6985
|
-
iso_3: "svn",
|
|
6986
|
-
num_code: "705",
|
|
6987
|
-
name: "SLOVENIA",
|
|
6988
|
-
display_name: "Slovenia"
|
|
6989
|
-
},
|
|
6990
|
-
{
|
|
6991
|
-
iso_2: "sb",
|
|
6992
|
-
iso_3: "slb",
|
|
6993
|
-
num_code: "90",
|
|
6994
|
-
name: "SOLOMON ISLANDS",
|
|
6995
|
-
display_name: "Solomon Islands"
|
|
6996
|
-
},
|
|
6997
|
-
{
|
|
6998
|
-
iso_2: "so",
|
|
6999
|
-
iso_3: "som",
|
|
7000
|
-
num_code: "706",
|
|
7001
|
-
name: "SOMALIA",
|
|
7002
|
-
display_name: "Somalia"
|
|
7003
|
-
},
|
|
7004
|
-
{
|
|
7005
|
-
iso_2: "za",
|
|
7006
|
-
iso_3: "zaf",
|
|
7007
|
-
num_code: "710",
|
|
7008
|
-
name: "SOUTH AFRICA",
|
|
7009
|
-
display_name: "South Africa"
|
|
7010
|
-
},
|
|
7011
|
-
{
|
|
7012
|
-
iso_2: "gs",
|
|
7013
|
-
iso_3: "sgs",
|
|
7014
|
-
num_code: "239",
|
|
7015
|
-
name: "SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS",
|
|
7016
|
-
display_name: "South Georgia and the South Sandwich Islands"
|
|
7017
|
-
},
|
|
7018
|
-
{
|
|
7019
|
-
iso_2: "ss",
|
|
7020
|
-
iso_3: "ssd",
|
|
7021
|
-
num_code: "728",
|
|
7022
|
-
name: "SOUTH SUDAN",
|
|
7023
|
-
display_name: "South Sudan"
|
|
7024
|
-
},
|
|
7025
|
-
{
|
|
7026
|
-
iso_2: "es",
|
|
7027
|
-
iso_3: "esp",
|
|
7028
|
-
num_code: "724",
|
|
7029
|
-
name: "SPAIN",
|
|
7030
|
-
display_name: "Spain"
|
|
7031
|
-
},
|
|
7032
|
-
{
|
|
7033
|
-
iso_2: "lk",
|
|
7034
|
-
iso_3: "lka",
|
|
7035
|
-
num_code: "144",
|
|
7036
|
-
name: "SRI LANKA",
|
|
7037
|
-
display_name: "Sri Lanka"
|
|
7038
|
-
},
|
|
7039
|
-
{
|
|
7040
|
-
iso_2: "sd",
|
|
7041
|
-
iso_3: "sdn",
|
|
7042
|
-
num_code: "729",
|
|
7043
|
-
name: "SUDAN",
|
|
7044
|
-
display_name: "Sudan"
|
|
7045
|
-
},
|
|
7046
|
-
{
|
|
7047
|
-
iso_2: "sr",
|
|
7048
|
-
iso_3: "sur",
|
|
7049
|
-
num_code: "740",
|
|
7050
|
-
name: "SURINAME",
|
|
7051
|
-
display_name: "Suriname"
|
|
7052
|
-
},
|
|
7053
|
-
{
|
|
7054
|
-
iso_2: "sj",
|
|
7055
|
-
iso_3: "sjm",
|
|
7056
|
-
num_code: "744",
|
|
7057
|
-
name: "SVALBARD AND JAN MAYEN",
|
|
7058
|
-
display_name: "Svalbard and Jan Mayen"
|
|
7059
|
-
},
|
|
7060
|
-
{
|
|
7061
|
-
iso_2: "sz",
|
|
7062
|
-
iso_3: "swz",
|
|
7063
|
-
num_code: "748",
|
|
7064
|
-
name: "SWAZILAND",
|
|
7065
|
-
display_name: "Swaziland"
|
|
7066
|
-
},
|
|
7067
|
-
{
|
|
7068
|
-
iso_2: "se",
|
|
7069
|
-
iso_3: "swe",
|
|
7070
|
-
num_code: "752",
|
|
7071
|
-
name: "SWEDEN",
|
|
7072
|
-
display_name: "Sweden"
|
|
7073
|
-
},
|
|
7074
|
-
{
|
|
7075
|
-
iso_2: "ch",
|
|
7076
|
-
iso_3: "che",
|
|
7077
|
-
num_code: "756",
|
|
7078
|
-
name: "SWITZERLAND",
|
|
7079
|
-
display_name: "Switzerland"
|
|
7080
|
-
},
|
|
7081
|
-
{
|
|
7082
|
-
iso_2: "sy",
|
|
7083
|
-
iso_3: "syr",
|
|
7084
|
-
num_code: "760",
|
|
7085
|
-
name: "SYRIAN ARAB REPUBLIC",
|
|
7086
|
-
display_name: "Syrian Arab Republic"
|
|
7087
|
-
},
|
|
7088
|
-
{
|
|
7089
|
-
iso_2: "tw",
|
|
7090
|
-
iso_3: "twn",
|
|
7091
|
-
num_code: "158",
|
|
7092
|
-
name: "TAIWAN, PROVINCE OF CHINA",
|
|
7093
|
-
display_name: "Taiwan, Province of China"
|
|
7094
|
-
},
|
|
7095
|
-
{
|
|
7096
|
-
iso_2: "tj",
|
|
7097
|
-
iso_3: "tjk",
|
|
7098
|
-
num_code: "762",
|
|
7099
|
-
name: "TAJIKISTAN",
|
|
7100
|
-
display_name: "Tajikistan"
|
|
7101
|
-
},
|
|
7102
|
-
{
|
|
7103
|
-
iso_2: "tz",
|
|
7104
|
-
iso_3: "tza",
|
|
7105
|
-
num_code: "834",
|
|
7106
|
-
name: "TANZANIA, UNITED REPUBLIC OF",
|
|
7107
|
-
display_name: "Tanzania, United Republic of"
|
|
7108
|
-
},
|
|
7109
|
-
{
|
|
7110
|
-
iso_2: "th",
|
|
7111
|
-
iso_3: "tha",
|
|
7112
|
-
num_code: "764",
|
|
7113
|
-
name: "THAILAND",
|
|
7114
|
-
display_name: "Thailand"
|
|
7115
|
-
},
|
|
7116
|
-
{
|
|
7117
|
-
iso_2: "tl",
|
|
7118
|
-
iso_3: "tls",
|
|
7119
|
-
num_code: "626",
|
|
7120
|
-
name: "TIMOR LESTE",
|
|
7121
|
-
display_name: "Timor Leste"
|
|
7122
|
-
},
|
|
7123
|
-
{
|
|
7124
|
-
iso_2: "tg",
|
|
7125
|
-
iso_3: "tgo",
|
|
7126
|
-
num_code: "768",
|
|
7127
|
-
name: "TOGO",
|
|
7128
|
-
display_name: "Togo"
|
|
7129
|
-
},
|
|
7130
|
-
{
|
|
7131
|
-
iso_2: "tk",
|
|
7132
|
-
iso_3: "tkl",
|
|
7133
|
-
num_code: "772",
|
|
7134
|
-
name: "TOKELAU",
|
|
7135
|
-
display_name: "Tokelau"
|
|
7136
|
-
},
|
|
7137
|
-
{
|
|
7138
|
-
iso_2: "to",
|
|
7139
|
-
iso_3: "ton",
|
|
7140
|
-
num_code: "776",
|
|
7141
|
-
name: "TONGA",
|
|
7142
|
-
display_name: "Tonga"
|
|
7143
|
-
},
|
|
7144
|
-
{
|
|
7145
|
-
iso_2: "tt",
|
|
7146
|
-
iso_3: "tto",
|
|
7147
|
-
num_code: "780",
|
|
7148
|
-
name: "TRINIDAD AND TOBAGO",
|
|
7149
|
-
display_name: "Trinidad and Tobago"
|
|
7150
|
-
},
|
|
7151
|
-
{
|
|
7152
|
-
iso_2: "tn",
|
|
7153
|
-
iso_3: "tun",
|
|
7154
|
-
num_code: "788",
|
|
7155
|
-
name: "TUNISIA",
|
|
7156
|
-
display_name: "Tunisia"
|
|
7157
|
-
},
|
|
7158
|
-
{
|
|
7159
|
-
iso_2: "tr",
|
|
7160
|
-
iso_3: "tur",
|
|
7161
|
-
num_code: "792",
|
|
7162
|
-
name: "TURKEY",
|
|
7163
|
-
display_name: "Turkey"
|
|
7164
|
-
},
|
|
7165
|
-
{
|
|
7166
|
-
iso_2: "tm",
|
|
7167
|
-
iso_3: "tkm",
|
|
7168
|
-
num_code: "795",
|
|
7169
|
-
name: "TURKMENISTAN",
|
|
7170
|
-
display_name: "Turkmenistan"
|
|
7171
|
-
},
|
|
7172
|
-
{
|
|
7173
|
-
iso_2: "tc",
|
|
7174
|
-
iso_3: "tca",
|
|
7175
|
-
num_code: "796",
|
|
7176
|
-
name: "TURKS AND CAICOS ISLANDS",
|
|
7177
|
-
display_name: "Turks and Caicos Islands"
|
|
7178
|
-
},
|
|
7179
|
-
{
|
|
7180
|
-
iso_2: "tv",
|
|
7181
|
-
iso_3: "tuv",
|
|
7182
|
-
num_code: "798",
|
|
7183
|
-
name: "TUVALU",
|
|
7184
|
-
display_name: "Tuvalu"
|
|
7185
|
-
},
|
|
7186
|
-
{
|
|
7187
|
-
iso_2: "ug",
|
|
7188
|
-
iso_3: "uga",
|
|
7189
|
-
num_code: "800",
|
|
7190
|
-
name: "UGANDA",
|
|
7191
|
-
display_name: "Uganda"
|
|
7192
|
-
},
|
|
7193
|
-
{
|
|
7194
|
-
iso_2: "ua",
|
|
7195
|
-
iso_3: "ukr",
|
|
7196
|
-
num_code: "804",
|
|
7197
|
-
name: "UKRAINE",
|
|
7198
|
-
display_name: "Ukraine"
|
|
7199
|
-
},
|
|
7200
|
-
{
|
|
7201
|
-
iso_2: "ae",
|
|
7202
|
-
iso_3: "are",
|
|
7203
|
-
num_code: "784",
|
|
7204
|
-
name: "UNITED ARAB EMIRATES",
|
|
7205
|
-
display_name: "United Arab Emirates"
|
|
7206
|
-
},
|
|
7207
|
-
{
|
|
7208
|
-
iso_2: "gb",
|
|
7209
|
-
iso_3: "gbr",
|
|
7210
|
-
num_code: "826",
|
|
7211
|
-
name: "UNITED KINGDOM",
|
|
7212
|
-
display_name: "United Kingdom"
|
|
7213
|
-
},
|
|
7214
|
-
{
|
|
7215
|
-
iso_2: "us",
|
|
7216
|
-
iso_3: "usa",
|
|
7217
|
-
num_code: "840",
|
|
7218
|
-
name: "UNITED STATES",
|
|
7219
|
-
display_name: "United States"
|
|
7220
|
-
},
|
|
7221
|
-
{
|
|
7222
|
-
iso_2: "um",
|
|
7223
|
-
iso_3: "umi",
|
|
7224
|
-
num_code: "581",
|
|
7225
|
-
name: "UNITED STATES MINOR OUTLYING ISLANDS",
|
|
7226
|
-
display_name: "United States Minor Outlying Islands"
|
|
7227
|
-
},
|
|
7228
|
-
{
|
|
7229
|
-
iso_2: "uy",
|
|
7230
|
-
iso_3: "ury",
|
|
7231
|
-
num_code: "858",
|
|
7232
|
-
name: "URUGUAY",
|
|
7233
|
-
display_name: "Uruguay"
|
|
7234
|
-
},
|
|
7235
|
-
{
|
|
7236
|
-
iso_2: "uz",
|
|
7237
|
-
iso_3: "uzb",
|
|
7238
|
-
num_code: "860",
|
|
7239
|
-
name: "UZBEKISTAN",
|
|
7240
|
-
display_name: "Uzbekistan"
|
|
7241
|
-
},
|
|
7242
|
-
{
|
|
7243
|
-
iso_2: "vu",
|
|
7244
|
-
iso_3: "vut",
|
|
7245
|
-
num_code: "548",
|
|
7246
|
-
name: "VANUATU",
|
|
7247
|
-
display_name: "Vanuatu"
|
|
7248
|
-
},
|
|
7249
|
-
{
|
|
7250
|
-
iso_2: "ve",
|
|
7251
|
-
iso_3: "ven",
|
|
7252
|
-
num_code: "862",
|
|
7253
|
-
name: "VENEZUELA",
|
|
7254
|
-
display_name: "Venezuela"
|
|
7255
|
-
},
|
|
7256
|
-
{
|
|
7257
|
-
iso_2: "vn",
|
|
7258
|
-
iso_3: "vnm",
|
|
7259
|
-
num_code: "704",
|
|
7260
|
-
name: "VIET NAM",
|
|
7261
|
-
display_name: "Viet Nam"
|
|
7262
|
-
},
|
|
7263
|
-
{
|
|
7264
|
-
iso_2: "vg",
|
|
7265
|
-
iso_3: "vgb",
|
|
7266
|
-
num_code: "92",
|
|
7267
|
-
name: "VIRGIN ISLANDS, BRITISH",
|
|
7268
|
-
display_name: "Virgin Islands, British"
|
|
7269
|
-
},
|
|
7270
|
-
{
|
|
7271
|
-
iso_2: "vi",
|
|
7272
|
-
iso_3: "vir",
|
|
7273
|
-
num_code: "850",
|
|
7274
|
-
name: "VIRGIN ISLANDS, U.S.",
|
|
7275
|
-
display_name: "Virgin Islands, U.S."
|
|
7276
|
-
},
|
|
7277
|
-
{
|
|
7278
|
-
iso_2: "wf",
|
|
7279
|
-
iso_3: "wlf",
|
|
7280
|
-
num_code: "876",
|
|
7281
|
-
name: "WALLIS AND FUTUNA",
|
|
7282
|
-
display_name: "Wallis and Futuna"
|
|
7283
|
-
},
|
|
7284
|
-
{
|
|
7285
|
-
iso_2: "eh",
|
|
7286
|
-
iso_3: "esh",
|
|
7287
|
-
num_code: "732",
|
|
7288
|
-
name: "WESTERN SAHARA",
|
|
7289
|
-
display_name: "Western Sahara"
|
|
7290
|
-
},
|
|
7291
|
-
{
|
|
7292
|
-
iso_2: "ye",
|
|
7293
|
-
iso_3: "yem",
|
|
7294
|
-
num_code: "887",
|
|
7295
|
-
name: "YEMEN",
|
|
7296
|
-
display_name: "Yemen"
|
|
7297
|
-
},
|
|
7298
|
-
{
|
|
7299
|
-
iso_2: "zm",
|
|
7300
|
-
iso_3: "zmb",
|
|
7301
|
-
num_code: "894",
|
|
7302
|
-
name: "ZAMBIA",
|
|
7303
|
-
display_name: "Zambia"
|
|
7304
|
-
},
|
|
7305
|
-
{
|
|
7306
|
-
iso_2: "zw",
|
|
7307
|
-
iso_3: "zwe",
|
|
7308
|
-
num_code: "716",
|
|
7309
|
-
name: "ZIMBABWE",
|
|
7310
|
-
display_name: "Zimbabwe"
|
|
7311
|
-
},
|
|
7312
|
-
{
|
|
7313
|
-
iso_2: "ax",
|
|
7314
|
-
iso_3: "ala",
|
|
7315
|
-
num_code: "248",
|
|
7316
|
-
name: "ÅLAND ISLANDS",
|
|
7317
|
-
display_name: "Åland Islands"
|
|
7318
|
-
}
|
|
7319
|
-
];
|
|
7320
|
-
const getFormattedAddress = ({
|
|
7321
|
-
address
|
|
7322
|
-
}) => {
|
|
7323
|
-
if (!address) {
|
|
7324
|
-
return [];
|
|
7325
|
-
}
|
|
7326
|
-
const {
|
|
7327
|
-
first_name,
|
|
7328
|
-
last_name,
|
|
7329
|
-
company,
|
|
7330
|
-
address_1,
|
|
7331
|
-
address_2,
|
|
7332
|
-
city,
|
|
7333
|
-
postal_code,
|
|
7334
|
-
province,
|
|
7335
|
-
country,
|
|
7336
|
-
country_code
|
|
7337
|
-
} = address;
|
|
7338
|
-
const name = [first_name, last_name].filter(Boolean).join(" ");
|
|
7339
|
-
const formattedAddress = [];
|
|
7340
|
-
if (name) {
|
|
7341
|
-
formattedAddress.push(name);
|
|
7342
|
-
}
|
|
7343
|
-
if (company) {
|
|
7344
|
-
formattedAddress.push(company);
|
|
7345
|
-
}
|
|
7346
|
-
if (address_1) {
|
|
7347
|
-
formattedAddress.push(address_1);
|
|
7348
|
-
}
|
|
7349
|
-
if (address_2) {
|
|
7350
|
-
formattedAddress.push(address_2);
|
|
7351
|
-
}
|
|
7352
|
-
const cityProvincePostal = [city, province, postal_code].filter(Boolean).join(" ");
|
|
7353
|
-
if (cityProvincePostal) {
|
|
7354
|
-
formattedAddress.push(cityProvincePostal);
|
|
7355
|
-
}
|
|
7356
|
-
if (country) {
|
|
7357
|
-
formattedAddress.push(country.display_name);
|
|
7358
|
-
} else if (country_code) {
|
|
7359
|
-
const country2 = getCountryByIso2(country_code);
|
|
7360
|
-
if (country2) {
|
|
7361
|
-
formattedAddress.push(country2.display_name);
|
|
7362
|
-
} else {
|
|
7363
|
-
formattedAddress.push(country_code.toUpperCase());
|
|
7364
|
-
}
|
|
7365
|
-
}
|
|
7366
|
-
return formattedAddress;
|
|
7367
|
-
};
|
|
7368
|
-
const getLocaleAmount = (amount, currencyCode) => {
|
|
7369
|
-
const formatter = new Intl.NumberFormat([], {
|
|
7370
|
-
style: "currency",
|
|
7371
|
-
currencyDisplay: "narrowSymbol",
|
|
7372
|
-
currency: currencyCode
|
|
7373
|
-
});
|
|
7374
|
-
return formatter.format(amount);
|
|
7375
|
-
};
|
|
7376
|
-
const getTotalCaptured = (paymentCollections) => paymentCollections.reduce((acc, paymentCollection) => {
|
|
7377
|
-
acc = acc + (paymentCollection.captured_amount - paymentCollection.refunded_amount);
|
|
7378
|
-
return acc;
|
|
7379
|
-
}, 0);
|
|
7380
3032
|
function SectionBlock({
|
|
7381
3033
|
id,
|
|
7382
3034
|
props,
|
|
@@ -7588,8 +3240,415 @@ const TEMPLATES_NAMES = {
|
|
|
7588
3240
|
INVENTORY_LEVEL: "inventory-level",
|
|
7589
3241
|
ORDER_PLACED: "order-placed",
|
|
7590
3242
|
ORDER_COMPLETED: "order-completed",
|
|
3243
|
+
ORDER_UPDATED: "order-updated",
|
|
7591
3244
|
CONTACT_FORM: "contact-form"
|
|
7592
3245
|
};
|
|
3246
|
+
const ORDER_ATTRIBUTES = [
|
|
3247
|
+
// Basic fields
|
|
3248
|
+
{
|
|
3249
|
+
value: "order.id",
|
|
3250
|
+
label: "ID",
|
|
3251
|
+
description: "Unique identifier of the order"
|
|
3252
|
+
},
|
|
3253
|
+
{
|
|
3254
|
+
value: "order.display_id",
|
|
3255
|
+
label: "Display ID",
|
|
3256
|
+
description: "Human-readable order number displayed to customers"
|
|
3257
|
+
},
|
|
3258
|
+
{
|
|
3259
|
+
value: "order.custom_display_id",
|
|
3260
|
+
label: "Custom Display ID",
|
|
3261
|
+
description: "Custom order identifier set by the merchant"
|
|
3262
|
+
},
|
|
3263
|
+
{
|
|
3264
|
+
value: "order.status",
|
|
3265
|
+
label: "Status",
|
|
3266
|
+
description: "Current status of the order"
|
|
3267
|
+
},
|
|
3268
|
+
{
|
|
3269
|
+
value: "order.locale",
|
|
3270
|
+
label: "Locale",
|
|
3271
|
+
description: "Locale code for the order (language and region)"
|
|
3272
|
+
},
|
|
3273
|
+
{
|
|
3274
|
+
value: "order.email",
|
|
3275
|
+
label: "Email",
|
|
3276
|
+
description: "Customer email address associated with the order"
|
|
3277
|
+
},
|
|
3278
|
+
{
|
|
3279
|
+
value: "order.currency_code",
|
|
3280
|
+
label: "Currency Code",
|
|
3281
|
+
description: "ISO 4217 currency code for the order"
|
|
3282
|
+
},
|
|
3283
|
+
{
|
|
3284
|
+
value: "order.region_id",
|
|
3285
|
+
label: "Region ID",
|
|
3286
|
+
description: "Unique identifier of the region"
|
|
3287
|
+
},
|
|
3288
|
+
{
|
|
3289
|
+
value: "order.created_at",
|
|
3290
|
+
label: "Created At",
|
|
3291
|
+
description: "Date and time when the order was created (ISO 8601 format)"
|
|
3292
|
+
},
|
|
3293
|
+
{
|
|
3294
|
+
value: "order.updated_at",
|
|
3295
|
+
label: "Updated At",
|
|
3296
|
+
description: "Date and time when the order was last updated (ISO 8601 format)"
|
|
3297
|
+
},
|
|
3298
|
+
// Totals
|
|
3299
|
+
{
|
|
3300
|
+
value: "order.total",
|
|
3301
|
+
label: "Total",
|
|
3302
|
+
description: "Total amount of the order including taxes, shipping, and discounts"
|
|
3303
|
+
},
|
|
3304
|
+
{
|
|
3305
|
+
value: "order.subtotal",
|
|
3306
|
+
label: "Subtotal",
|
|
3307
|
+
description: "Subtotal amount before taxes and shipping"
|
|
3308
|
+
},
|
|
3309
|
+
{
|
|
3310
|
+
value: "order.tax_total",
|
|
3311
|
+
label: "Tax Total",
|
|
3312
|
+
description: "Total amount of taxes applied to the order"
|
|
3313
|
+
},
|
|
3314
|
+
{
|
|
3315
|
+
value: "order.original_total",
|
|
3316
|
+
label: "Original Total",
|
|
3317
|
+
description: "Original total amount before any changes or adjustments"
|
|
3318
|
+
},
|
|
3319
|
+
{
|
|
3320
|
+
value: "order.original_subtotal",
|
|
3321
|
+
label: "Original Subtotal",
|
|
3322
|
+
description: "Original subtotal before any changes or adjustments"
|
|
3323
|
+
},
|
|
3324
|
+
{
|
|
3325
|
+
value: "order.original_tax_total",
|
|
3326
|
+
label: "Original Tax Total",
|
|
3327
|
+
description: "Original tax total before any changes or adjustments"
|
|
3328
|
+
},
|
|
3329
|
+
{
|
|
3330
|
+
value: "order.discount_total",
|
|
3331
|
+
label: "Discount Total",
|
|
3332
|
+
description: "Total amount of discounts applied to the order"
|
|
3333
|
+
},
|
|
3334
|
+
{
|
|
3335
|
+
value: "order.discount_tax_total",
|
|
3336
|
+
label: "Discount Tax Total",
|
|
3337
|
+
description: "Tax amount on discounts applied to the order"
|
|
3338
|
+
},
|
|
3339
|
+
// Shipping (specific fields, not *)
|
|
3340
|
+
{
|
|
3341
|
+
value: "order.shipping_methods.amount",
|
|
3342
|
+
label: "Shipping Methods Amount",
|
|
3343
|
+
description: "Total shipping cost for all shipping methods. This is an array - operator 'eq' checks if ANY value matches",
|
|
3344
|
+
type: "array",
|
|
3345
|
+
isRelation: true,
|
|
3346
|
+
relationType: "shipping_methods"
|
|
3347
|
+
},
|
|
3348
|
+
{
|
|
3349
|
+
value: "order.shipping_methods.subtotal",
|
|
3350
|
+
label: "Shipping Methods Subtotal",
|
|
3351
|
+
description: "Shipping subtotal before taxes. This is an array - operator 'eq' checks if ANY value matches",
|
|
3352
|
+
type: "array",
|
|
3353
|
+
isRelation: true,
|
|
3354
|
+
relationType: "shipping_methods"
|
|
3355
|
+
},
|
|
3356
|
+
{
|
|
3357
|
+
value: "order.shipping_methods.tax_total",
|
|
3358
|
+
label: "Shipping Methods Tax Total",
|
|
3359
|
+
description: "Tax amount on shipping. This is an array - operator 'eq' checks if ANY value matches",
|
|
3360
|
+
type: "array",
|
|
3361
|
+
isRelation: true,
|
|
3362
|
+
relationType: "shipping_methods"
|
|
3363
|
+
},
|
|
3364
|
+
{
|
|
3365
|
+
value: "order.shipping_methods.original_total",
|
|
3366
|
+
label: "Shipping Methods Original Total",
|
|
3367
|
+
description: "Original shipping total before adjustments. This is an array - operator 'eq' checks if ANY value matches",
|
|
3368
|
+
type: "array",
|
|
3369
|
+
isRelation: true,
|
|
3370
|
+
relationType: "shipping_methods"
|
|
3371
|
+
},
|
|
3372
|
+
{
|
|
3373
|
+
value: "order.shipping_methods.original_subtotal",
|
|
3374
|
+
label: "Shipping Methods Original Subtotal",
|
|
3375
|
+
description: "Original shipping subtotal before adjustments. This is an array - operator 'eq' checks if ANY value matches",
|
|
3376
|
+
type: "array",
|
|
3377
|
+
isRelation: true,
|
|
3378
|
+
relationType: "shipping_methods"
|
|
3379
|
+
},
|
|
3380
|
+
{
|
|
3381
|
+
value: "order.shipping_methods.original_tax_total",
|
|
3382
|
+
label: "Shipping Methods Original Tax Total",
|
|
3383
|
+
description: "Original shipping tax total before adjustments. This is an array - operator 'eq' checks if ANY value matches",
|
|
3384
|
+
type: "array",
|
|
3385
|
+
isRelation: true,
|
|
3386
|
+
relationType: "shipping_methods"
|
|
3387
|
+
},
|
|
3388
|
+
{
|
|
3389
|
+
value: "order.shipping_methods.discount_total",
|
|
3390
|
+
label: "Shipping Methods Discount Total",
|
|
3391
|
+
description: "Total shipping discounts applied. This is an array - operator 'eq' checks if ANY value matches",
|
|
3392
|
+
type: "array",
|
|
3393
|
+
isRelation: true,
|
|
3394
|
+
relationType: "shipping_methods"
|
|
3395
|
+
},
|
|
3396
|
+
{
|
|
3397
|
+
value: "order.shipping_methods.discount_subtotal",
|
|
3398
|
+
label: "Shipping Methods Discount Subtotal",
|
|
3399
|
+
description: "Shipping discount subtotal. This is an array - operator 'eq' checks if ANY value matches",
|
|
3400
|
+
type: "array",
|
|
3401
|
+
isRelation: true,
|
|
3402
|
+
relationType: "shipping_methods"
|
|
3403
|
+
},
|
|
3404
|
+
{
|
|
3405
|
+
value: "order.shipping_methods.discount_tax_total",
|
|
3406
|
+
label: "Shipping Methods Discount Tax Total",
|
|
3407
|
+
description: "Tax amount on shipping discounts. This is an array - operator 'eq' checks if ANY value matches",
|
|
3408
|
+
type: "array",
|
|
3409
|
+
isRelation: true,
|
|
3410
|
+
relationType: "shipping_methods"
|
|
3411
|
+
},
|
|
3412
|
+
// Summary (specific fields)
|
|
3413
|
+
{
|
|
3414
|
+
value: "order.summary.total",
|
|
3415
|
+
label: "Summary Total",
|
|
3416
|
+
description: "Summary total amount including all adjustments"
|
|
3417
|
+
},
|
|
3418
|
+
{
|
|
3419
|
+
value: "order.summary.subtotal",
|
|
3420
|
+
label: "Summary Subtotal",
|
|
3421
|
+
description: "Summary subtotal amount"
|
|
3422
|
+
},
|
|
3423
|
+
{
|
|
3424
|
+
value: "order.summary.tax_total",
|
|
3425
|
+
label: "Summary Tax Total",
|
|
3426
|
+
description: "Summary tax total amount"
|
|
3427
|
+
},
|
|
3428
|
+
{
|
|
3429
|
+
value: "order.summary.discount_total",
|
|
3430
|
+
label: "Summary Discount Total",
|
|
3431
|
+
description: "Summary discount total amount"
|
|
3432
|
+
},
|
|
3433
|
+
{
|
|
3434
|
+
value: "order.summary.original_order_total",
|
|
3435
|
+
label: "Summary Original Order Total",
|
|
3436
|
+
description: "Summary original order total before adjustments"
|
|
3437
|
+
},
|
|
3438
|
+
{
|
|
3439
|
+
value: "order.summary.current_order_total",
|
|
3440
|
+
label: "Summary Current Order Total",
|
|
3441
|
+
description: "Summary current order total after all adjustments"
|
|
3442
|
+
},
|
|
3443
|
+
{
|
|
3444
|
+
value: "order.summary.paid_total",
|
|
3445
|
+
label: "Summary Paid Total",
|
|
3446
|
+
description: "Total amount that has been paid for this order"
|
|
3447
|
+
},
|
|
3448
|
+
{
|
|
3449
|
+
value: "order.summary.refunded_total",
|
|
3450
|
+
label: "Summary Refunded Total",
|
|
3451
|
+
description: "Total amount that has been refunded for this order"
|
|
3452
|
+
},
|
|
3453
|
+
{
|
|
3454
|
+
value: "order.summary.accounting_total",
|
|
3455
|
+
label: "Summary Accounting Total",
|
|
3456
|
+
description: "Total amount for accounting purposes"
|
|
3457
|
+
},
|
|
3458
|
+
{
|
|
3459
|
+
value: "order.summary.credit_line_total",
|
|
3460
|
+
label: "Summary Credit Line Total",
|
|
3461
|
+
description: "Total amount from credit lines applied to this order"
|
|
3462
|
+
},
|
|
3463
|
+
{
|
|
3464
|
+
value: "order.summary.transaction_total",
|
|
3465
|
+
label: "Summary Transaction Total",
|
|
3466
|
+
description: "Total amount of all transactions for this order"
|
|
3467
|
+
},
|
|
3468
|
+
{
|
|
3469
|
+
value: "order.summary.pending_difference",
|
|
3470
|
+
label: "Summary Pending Difference",
|
|
3471
|
+
description: "Difference between expected and actual payment amounts"
|
|
3472
|
+
},
|
|
3473
|
+
// Customer relation
|
|
3474
|
+
{
|
|
3475
|
+
value: "order.customer.id",
|
|
3476
|
+
label: "Customer ID",
|
|
3477
|
+
description: "Unique identifier of the customer who placed the order"
|
|
3478
|
+
},
|
|
3479
|
+
{
|
|
3480
|
+
value: "order.customer.email",
|
|
3481
|
+
label: "Customer Email",
|
|
3482
|
+
description: "Email address of the customer who placed the order"
|
|
3483
|
+
},
|
|
3484
|
+
{
|
|
3485
|
+
value: "order.customer.first_name",
|
|
3486
|
+
label: "Customer First Name",
|
|
3487
|
+
description: "First name of the customer"
|
|
3488
|
+
},
|
|
3489
|
+
{
|
|
3490
|
+
value: "order.customer.last_name",
|
|
3491
|
+
label: "Customer Last Name",
|
|
3492
|
+
description: "Last name of the customer"
|
|
3493
|
+
},
|
|
3494
|
+
// Sales channel relation
|
|
3495
|
+
{
|
|
3496
|
+
value: "order.sales_channel.id",
|
|
3497
|
+
label: "Sales Channel ID",
|
|
3498
|
+
description: "Unique identifier of the sales channel"
|
|
3499
|
+
},
|
|
3500
|
+
{
|
|
3501
|
+
value: "order.sales_channel.name",
|
|
3502
|
+
label: "Sales Channel Name",
|
|
3503
|
+
description: "Name of the sales channel"
|
|
3504
|
+
},
|
|
3505
|
+
// Shipping address
|
|
3506
|
+
{
|
|
3507
|
+
value: "order.shipping_address.first_name",
|
|
3508
|
+
label: "Shipping First Name",
|
|
3509
|
+
description: "First name for shipping address"
|
|
3510
|
+
},
|
|
3511
|
+
{
|
|
3512
|
+
value: "order.shipping_address.last_name",
|
|
3513
|
+
label: "Shipping Last Name",
|
|
3514
|
+
description: "Last name for shipping address"
|
|
3515
|
+
},
|
|
3516
|
+
{
|
|
3517
|
+
value: "order.shipping_address.address_1",
|
|
3518
|
+
label: "Shipping Address 1",
|
|
3519
|
+
description: "Primary street address for shipping"
|
|
3520
|
+
},
|
|
3521
|
+
{
|
|
3522
|
+
value: "order.shipping_address.city",
|
|
3523
|
+
label: "Shipping City",
|
|
3524
|
+
description: "City for shipping address"
|
|
3525
|
+
},
|
|
3526
|
+
{
|
|
3527
|
+
value: "order.shipping_address.country_code",
|
|
3528
|
+
label: "Shipping Country Code",
|
|
3529
|
+
description: "ISO 3166-1 alpha-2 country code for shipping"
|
|
3530
|
+
},
|
|
3531
|
+
{
|
|
3532
|
+
value: "order.shipping_address.postal_code",
|
|
3533
|
+
label: "Shipping Postal Code",
|
|
3534
|
+
description: "Postal/ZIP code for shipping address"
|
|
3535
|
+
},
|
|
3536
|
+
// Billing address
|
|
3537
|
+
{
|
|
3538
|
+
value: "order.billing_address.first_name",
|
|
3539
|
+
label: "Billing First Name",
|
|
3540
|
+
description: "First name for billing address"
|
|
3541
|
+
},
|
|
3542
|
+
{
|
|
3543
|
+
value: "order.billing_address.last_name",
|
|
3544
|
+
label: "Billing Last Name",
|
|
3545
|
+
description: "Last name for billing address"
|
|
3546
|
+
},
|
|
3547
|
+
{
|
|
3548
|
+
value: "order.billing_address.address_1",
|
|
3549
|
+
label: "Billing Address 1",
|
|
3550
|
+
description: "Primary street address for billing"
|
|
3551
|
+
},
|
|
3552
|
+
{
|
|
3553
|
+
value: "order.billing_address.city",
|
|
3554
|
+
label: "Billing City",
|
|
3555
|
+
description: "City for billing address"
|
|
3556
|
+
},
|
|
3557
|
+
{
|
|
3558
|
+
value: "order.billing_address.country_code",
|
|
3559
|
+
label: "Billing Country Code",
|
|
3560
|
+
description: "ISO 3166-1 alpha-2 country code for billing"
|
|
3561
|
+
},
|
|
3562
|
+
{
|
|
3563
|
+
value: "order.billing_address.postal_code",
|
|
3564
|
+
label: "Billing Postal Code",
|
|
3565
|
+
description: "Postal/ZIP code for billing address"
|
|
3566
|
+
},
|
|
3567
|
+
// Items (specific fields, not *)
|
|
3568
|
+
{
|
|
3569
|
+
value: "order.items.id",
|
|
3570
|
+
label: "Item ID",
|
|
3571
|
+
description: "Unique identifier of the order item"
|
|
3572
|
+
},
|
|
3573
|
+
{
|
|
3574
|
+
value: "order.items.quantity",
|
|
3575
|
+
label: "Item Quantity",
|
|
3576
|
+
description: "Quantity of this item in the order"
|
|
3577
|
+
},
|
|
3578
|
+
{
|
|
3579
|
+
value: "order.items.title",
|
|
3580
|
+
label: "Item Title",
|
|
3581
|
+
description: "Title/name of the order item"
|
|
3582
|
+
},
|
|
3583
|
+
{
|
|
3584
|
+
value: "order.items.unit_price",
|
|
3585
|
+
label: "Item Unit Price",
|
|
3586
|
+
description: "Price per unit of this item"
|
|
3587
|
+
},
|
|
3588
|
+
{
|
|
3589
|
+
value: "order.items.variant.id",
|
|
3590
|
+
label: "Item Variant ID",
|
|
3591
|
+
description: "Unique identifier of the product variant"
|
|
3592
|
+
},
|
|
3593
|
+
{
|
|
3594
|
+
value: "order.items.variant.sku",
|
|
3595
|
+
label: "Item Variant SKU",
|
|
3596
|
+
description: "SKU (Stock Keeping Unit) of the product variant"
|
|
3597
|
+
},
|
|
3598
|
+
{
|
|
3599
|
+
value: "order.items.product.id",
|
|
3600
|
+
label: "Item Product ID",
|
|
3601
|
+
description: "Unique identifier of the product"
|
|
3602
|
+
},
|
|
3603
|
+
{
|
|
3604
|
+
value: "order.items.product.title",
|
|
3605
|
+
label: "Item Product Title",
|
|
3606
|
+
description: "Title/name of the product"
|
|
3607
|
+
},
|
|
3608
|
+
// Payment collections
|
|
3609
|
+
{
|
|
3610
|
+
value: "order.payment_collections.id",
|
|
3611
|
+
label: "Payment Collection ID",
|
|
3612
|
+
description: "Unique identifier of the payment collection"
|
|
3613
|
+
},
|
|
3614
|
+
{
|
|
3615
|
+
value: "order.payment_collections.status",
|
|
3616
|
+
label: "Payment Collection Status",
|
|
3617
|
+
description: "Status of payment collections for this order"
|
|
3618
|
+
},
|
|
3619
|
+
{
|
|
3620
|
+
value: "order.payment_collections.amount",
|
|
3621
|
+
label: "Payment Collection Amount",
|
|
3622
|
+
description: "Amount of the payment collection"
|
|
3623
|
+
},
|
|
3624
|
+
// Fulfillments
|
|
3625
|
+
{
|
|
3626
|
+
value: "order.fulfillments.id",
|
|
3627
|
+
label: "Fulfillment ID",
|
|
3628
|
+
description: "Unique identifier of the fulfillment"
|
|
3629
|
+
},
|
|
3630
|
+
{
|
|
3631
|
+
value: "order.fulfillments.status",
|
|
3632
|
+
label: "Fulfillment Status",
|
|
3633
|
+
description: "Status of fulfillments for this order"
|
|
3634
|
+
}
|
|
3635
|
+
];
|
|
3636
|
+
[
|
|
3637
|
+
// Basic fields from ORDER_ATTRIBUTES
|
|
3638
|
+
...ORDER_ATTRIBUTES.map((attr) => attr.value),
|
|
3639
|
+
// Technical relations required for totals calculation
|
|
3640
|
+
// These fields are not available in UI rules, but are needed for correct data retrieval
|
|
3641
|
+
"order.items.*",
|
|
3642
|
+
"order.items.tax_lines.*",
|
|
3643
|
+
"order.items.adjustments.*",
|
|
3644
|
+
"order.shipping_methods.*",
|
|
3645
|
+
"order.shipping_methods.tax_lines.*",
|
|
3646
|
+
"order.shipping_methods.adjustments.*",
|
|
3647
|
+
"order.fulfillments.*",
|
|
3648
|
+
"order.credit_lines.*",
|
|
3649
|
+
"order.summary.*",
|
|
3650
|
+
"order.payment_collections.*"
|
|
3651
|
+
];
|
|
7593
3652
|
const baseTemplateConfig = {
|
|
7594
3653
|
[TEMPLATES_NAMES.BASE_TEMPLATE]: {
|
|
7595
3654
|
getHtml: async (data, options) => {
|
|
@@ -7613,61 +3672,34 @@ const baseTemplateConfig = {
|
|
|
7613
3672
|
[TEMPLATES_NAMES.ORDER_COMPLETED]: {
|
|
7614
3673
|
...baseTemplateConfig[TEMPLATES_NAMES.BASE_TEMPLATE]
|
|
7615
3674
|
},
|
|
3675
|
+
[TEMPLATES_NAMES.ORDER_UPDATED]: {
|
|
3676
|
+
...baseTemplateConfig[TEMPLATES_NAMES.BASE_TEMPLATE]
|
|
3677
|
+
},
|
|
7616
3678
|
[TEMPLATES_NAMES.INVENTORY_LEVEL]: {
|
|
7617
3679
|
...baseTemplateConfig[TEMPLATES_NAMES.BASE_TEMPLATE]
|
|
7618
3680
|
}
|
|
7619
3681
|
});
|
|
7620
3682
|
const OrderPlacedTemplate = ({ orderId }) => {
|
|
7621
|
-
const [
|
|
7622
|
-
const [
|
|
3683
|
+
const [context, setContext] = react.useState(null);
|
|
3684
|
+
const [previewContext, setPreviewData] = react.useState(null);
|
|
7623
3685
|
const { data: order, isLoading: isOrderLoading } = useOrder({
|
|
7624
3686
|
order_id: orderId,
|
|
7625
3687
|
enabled: !!orderId
|
|
7626
3688
|
});
|
|
7627
3689
|
react.useEffect(() => {
|
|
7628
|
-
var _a, _b;
|
|
7629
3690
|
if (order == null ? void 0 : order.display_id) {
|
|
7630
|
-
|
|
7631
|
-
|
|
7632
|
-
|
|
7633
|
-
orderNumber: `#${order.display_id}`,
|
|
7634
|
-
customerName: order.email,
|
|
7635
|
-
customerEmail: order.email,
|
|
7636
|
-
orderDate: formatDate({ date: order.created_at, includeTime: true, localeCode: "pl" }),
|
|
7637
|
-
totalAmount: order.items.reduce((acc, item) => {
|
|
7638
|
-
var _a2, _b2, _c;
|
|
7639
|
-
return acc + (((_c = (_b2 = (_a2 = item.variant) == null ? void 0 : _a2.prices) == null ? void 0 : _b2[0]) == null ? void 0 : _c.amount) || 0) * item.quantity;
|
|
7640
|
-
}, 0),
|
|
7641
|
-
currency_code: order.currency_code,
|
|
7642
|
-
items: order.items.map((item) => ({
|
|
7643
|
-
thumbnail: item.thumbnail == null ? "" : item.thumbnail,
|
|
7644
|
-
title: item.title,
|
|
7645
|
-
quantity: item.quantity,
|
|
7646
|
-
price: getLocaleAmount(item.unit_price, order.currency_code)
|
|
7647
|
-
})),
|
|
7648
|
-
shippingAddress: shippingAddressText,
|
|
7649
|
-
billingAddress: billingAddressText,
|
|
7650
|
-
summary: {
|
|
7651
|
-
total: getLocaleAmount(order.summary.original_order_total, order.currency_code),
|
|
7652
|
-
paid_total: getLocaleAmount(getTotalCaptured(order.payment_collections || []), order.currency_code),
|
|
7653
|
-
tax_total: getLocaleAmount(order.tax_total, order.currency_code),
|
|
7654
|
-
discount_total: getLocaleAmount(order.discount_total, order.currency_code)
|
|
7655
|
-
},
|
|
7656
|
-
sales_channel: {
|
|
7657
|
-
name: (_a = order == null ? void 0 : order.sales_channel) == null ? void 0 : _a.name,
|
|
7658
|
-
description: (_b = order == null ? void 0 : order.sales_channel) == null ? void 0 : _b.description
|
|
7659
|
-
}
|
|
7660
|
-
};
|
|
7661
|
-
console.log(order);
|
|
7662
|
-
setTemplateData(templateData2);
|
|
3691
|
+
setContext({
|
|
3692
|
+
order
|
|
3693
|
+
});
|
|
7663
3694
|
}
|
|
7664
3695
|
}, [order]);
|
|
7665
3696
|
const { data: preview } = usePreview({
|
|
7666
3697
|
templateName: TEMPLATES_NAMES.ORDER_PLACED,
|
|
7667
|
-
|
|
3698
|
+
context,
|
|
3699
|
+
contextType: "order",
|
|
7668
3700
|
locale: "pl",
|
|
7669
|
-
enabled: !!
|
|
7670
|
-
extraKey: [
|
|
3701
|
+
enabled: !!context,
|
|
3702
|
+
extraKey: [context, orderId]
|
|
7671
3703
|
});
|
|
7672
3704
|
react.useEffect(() => {
|
|
7673
3705
|
if (isOrderLoading) {
|
|
@@ -7685,10 +3717,10 @@ const OrderPlacedTemplate = ({ orderId }) => {
|
|
|
7685
3717
|
orderId,
|
|
7686
3718
|
"..."
|
|
7687
3719
|
] }),
|
|
7688
|
-
|
|
3720
|
+
previewContext && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-6 py-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7689
3721
|
"iframe",
|
|
7690
3722
|
{
|
|
7691
|
-
srcDoc: (
|
|
3723
|
+
srcDoc: (previewContext == null ? void 0 : previewContext.html) || "",
|
|
7692
3724
|
style: { width: "100%", border: "none", minHeight: "600px" },
|
|
7693
3725
|
sandbox: "allow-same-origin"
|
|
7694
3726
|
}
|
|
@@ -7731,17 +3763,20 @@ const contactFormMockData = {
|
|
|
7731
3763
|
message: "Test messages"
|
|
7732
3764
|
};
|
|
7733
3765
|
const ContactFormTemplate = () => {
|
|
7734
|
-
const [
|
|
7735
|
-
const [
|
|
3766
|
+
const [context, setContext] = react.useState(null);
|
|
3767
|
+
const [previewContext, setPreviewData] = react.useState(null);
|
|
7736
3768
|
react.useEffect(() => {
|
|
7737
|
-
|
|
3769
|
+
setContext({
|
|
3770
|
+
contact_form: contactFormMockData
|
|
3771
|
+
});
|
|
7738
3772
|
}, []);
|
|
7739
3773
|
const { data: preview, isLoading: isPreviewLoading } = usePreview({
|
|
7740
3774
|
templateName: TEMPLATES_NAMES.CONTACT_FORM,
|
|
7741
|
-
|
|
3775
|
+
context,
|
|
3776
|
+
contextType: "contact_form",
|
|
7742
3777
|
locale: "pl",
|
|
7743
|
-
enabled: !!
|
|
7744
|
-
extraKey: [
|
|
3778
|
+
enabled: !!context,
|
|
3779
|
+
extraKey: [context]
|
|
7745
3780
|
});
|
|
7746
3781
|
react.useEffect(() => {
|
|
7747
3782
|
if (preview) {
|
|
@@ -7750,10 +3785,10 @@ const ContactFormTemplate = () => {
|
|
|
7750
3785
|
}, [preview]);
|
|
7751
3786
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-6 py-4", children: [
|
|
7752
3787
|
isPreviewLoading && /* @__PURE__ */ jsxRuntime.jsx(ui.Alert, { variant: "info", children: "Loading preview..." }),
|
|
7753
|
-
|
|
3788
|
+
previewContext && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-6 py-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7754
3789
|
"iframe",
|
|
7755
3790
|
{
|
|
7756
|
-
srcDoc: (
|
|
3791
|
+
srcDoc: (previewContext == null ? void 0 : previewContext.html) || "",
|
|
7757
3792
|
style: { width: "100%", border: "none", minHeight: "600px" },
|
|
7758
3793
|
sandbox: "allow-same-origin"
|
|
7759
3794
|
}
|
|
@@ -7838,17 +3873,17 @@ const menuItemModule = {
|
|
|
7838
3873
|
path: "/notifications-emails",
|
|
7839
3874
|
nested: void 0
|
|
7840
3875
|
},
|
|
7841
|
-
{
|
|
7842
|
-
label: config$1.label,
|
|
7843
|
-
icon: config$1.icon,
|
|
7844
|
-
path: "/notifications-emails/list",
|
|
7845
|
-
nested: void 0
|
|
7846
|
-
},
|
|
7847
3876
|
{
|
|
7848
3877
|
label: config.label,
|
|
7849
3878
|
icon: config.icon,
|
|
7850
3879
|
path: "/notifications-emails/render",
|
|
7851
3880
|
nested: void 0
|
|
3881
|
+
},
|
|
3882
|
+
{
|
|
3883
|
+
label: config$1.label,
|
|
3884
|
+
icon: config$1.icon,
|
|
3885
|
+
path: "/notifications-emails/list",
|
|
3886
|
+
nested: void 0
|
|
7852
3887
|
}
|
|
7853
3888
|
]
|
|
7854
3889
|
};
|