@strapi/plugin-users-permissions 5.0.0-beta.10 → 5.0.0-beta.11
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/dist/_chunks/{index-CkV_Gx1w.js → index--GpG6tLA.js} +4 -4
- package/dist/_chunks/{index-CkV_Gx1w.js.map → index--GpG6tLA.js.map} +1 -1
- package/dist/_chunks/{index-jwAq-BX--Cqx0wYbj.js → index-7Wlj8eA7-7OWx8SwS.js} +1076 -197
- package/dist/_chunks/index-7Wlj8eA7-7OWx8SwS.js.map +1 -0
- package/dist/_chunks/{index-jwAq-BX--dMZbL-qM.mjs → index-7Wlj8eA7-DHTckV6T.mjs} +1078 -199
- package/dist/_chunks/index-7Wlj8eA7-DHTckV6T.mjs.map +1 -0
- package/dist/_chunks/{index-b5IzYPqT.mjs → index-C5U4ePo7.mjs} +2 -2
- package/dist/_chunks/{index-b5IzYPqT.mjs.map → index-C5U4ePo7.mjs.map} +1 -1
- package/dist/_chunks/{index-D9CJMgdl.js → index-C5qelx5h.js} +8 -8
- package/dist/_chunks/{index-D9CJMgdl.js.map → index-C5qelx5h.js.map} +1 -1
- package/dist/_chunks/{index-Bmp8oEaL.js → index-C61Rq3Wy.js} +7 -7
- package/dist/_chunks/{index-Bmp8oEaL.js.map → index-C61Rq3Wy.js.map} +1 -1
- package/dist/_chunks/{index-BoMRcQMw.mjs → index-CeYJys9a.mjs} +8 -8
- package/dist/_chunks/{index-BoMRcQMw.mjs.map → index-CeYJys9a.mjs.map} +1 -1
- package/dist/_chunks/{index-CqRSlrYn.js → index-CulAxKsW.js} +2 -2
- package/dist/_chunks/{index-CqRSlrYn.js.map → index-CulAxKsW.js.map} +1 -1
- package/dist/_chunks/{index-CgwV7-UQ.mjs → index-DPPPDM5v.mjs} +2 -2
- package/dist/_chunks/{index-CgwV7-UQ.mjs.map → index-DPPPDM5v.mjs.map} +1 -1
- package/dist/_chunks/{index-Ck-grCz9.js → index-UMWzcJhY.js} +2 -2
- package/dist/_chunks/{index-Ck-grCz9.js.map → index-UMWzcJhY.js.map} +1 -1
- package/dist/_chunks/{index-C3uAp27O.mjs → index-_80225_r.mjs} +3 -3
- package/dist/_chunks/{index-C3uAp27O.mjs.map → index-_80225_r.mjs.map} +1 -1
- package/dist/_chunks/{index-DNNjHtHG.mjs → index-xP-F2lwk.mjs} +3 -3
- package/dist/_chunks/{index-DNNjHtHG.mjs.map → index-xP-F2lwk.mjs.map} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/package.json +4 -4
- package/dist/_chunks/index-jwAq-BX--Cqx0wYbj.js.map +0 -1
- package/dist/_chunks/index-jwAq-BX--dMZbL-qM.mjs.map +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import "react-dom/client";
|
|
2
2
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
4
|
-
import { createContext as createContext$1, useRef, useState, createElement, useEffect, useLayoutEffect, useContext, useReducer, useCallback, useMemo, useDebugValue, forwardRef, memo } from "react";
|
|
5
|
-
import { Link, Alert, Typography, useCallbackRef, useComposedRefs, Field, Toggle, Checkbox, DatePicker, DateTimePicker, TextInput, SingleSelect, SingleSelectOption, JSONInput, NumberInput, Textarea, TimePicker, Box, Flex, Popover, Button } from "@strapi/design-system";
|
|
3
|
+
import { Link, Alert, Typography, Box, Flex, useCallbackRef, useComposedRefs, Field, Toggle, Checkbox, DatePicker, DateTimePicker, TextInput, SingleSelect, SingleSelectOption, JSONInput, NumberInput, Textarea, TimePicker, Popover, Button } from "@strapi/design-system";
|
|
6
4
|
import "lodash/isFunction";
|
|
7
5
|
import "lodash/merge";
|
|
8
6
|
import "lodash/pick";
|
|
9
|
-
import { shallowEqual, batch, useDispatch, useSelector, useStore } from "react-redux";
|
|
10
7
|
import { NavLink, useLocation, useNavigate } from "react-router-dom";
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
import { createContext as createContext$1, useRef, useState, createElement, useEffect, useLayoutEffect, useContext, useReducer, useCallback, useMemo, useDebugValue, forwardRef, memo } from "react";
|
|
11
10
|
import { useIntl } from "react-intl";
|
|
12
11
|
import { ArrowLeft, Eye, EyeStriked, Filter, CaretDown } from "@strapi/icons";
|
|
13
12
|
import "@strapi/icons/symbols";
|
|
14
13
|
import { unstable_batchedUpdates } from "react-dom";
|
|
15
14
|
import createNextState2, { enableES5, isDraftable, isDraft, enablePatches, applyPatches, produceWithPatches, original, produce } from "immer";
|
|
15
|
+
import { shallowEqual, batch, useDispatch, useSelector, useStore } from "react-redux";
|
|
16
16
|
import pipe from "lodash/fp/pipe";
|
|
17
17
|
import isEqual from "lodash/isEqual";
|
|
18
18
|
import "lodash/defaultsDeep";
|
|
@@ -8992,6 +8992,869 @@ function generateNKeysBetween(a2, b, n, digits = BASE_62_DIGITS) {
|
|
|
8992
8992
|
...generateNKeysBetween(c, b, n - mid - 1, digits)
|
|
8993
8993
|
];
|
|
8994
8994
|
}
|
|
8995
|
+
function $2b4dce13dd5a17fa$export$842a2cf37af977e1(amount, numerator) {
|
|
8996
|
+
return amount - numerator * Math.floor(amount / numerator);
|
|
8997
|
+
}
|
|
8998
|
+
const $3b62074eb05584b2$var$EPOCH = 1721426;
|
|
8999
|
+
function $3b62074eb05584b2$export$f297eb839006d339(era, year, month, day) {
|
|
9000
|
+
year = $3b62074eb05584b2$export$c36e0ecb2d4fa69d(era, year);
|
|
9001
|
+
let y1 = year - 1;
|
|
9002
|
+
let monthOffset = -2;
|
|
9003
|
+
if (month <= 2)
|
|
9004
|
+
monthOffset = 0;
|
|
9005
|
+
else if ($3b62074eb05584b2$export$553d7fa8e3805fc0(year))
|
|
9006
|
+
monthOffset = -1;
|
|
9007
|
+
return $3b62074eb05584b2$var$EPOCH - 1 + 365 * y1 + Math.floor(y1 / 4) - Math.floor(y1 / 100) + Math.floor(y1 / 400) + Math.floor((367 * month - 362) / 12 + monthOffset + day);
|
|
9008
|
+
}
|
|
9009
|
+
function $3b62074eb05584b2$export$553d7fa8e3805fc0(year) {
|
|
9010
|
+
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
9011
|
+
}
|
|
9012
|
+
function $3b62074eb05584b2$export$c36e0ecb2d4fa69d(era, year) {
|
|
9013
|
+
return era === "BC" ? 1 - year : year;
|
|
9014
|
+
}
|
|
9015
|
+
function $3b62074eb05584b2$export$4475b7e617eb123c(year) {
|
|
9016
|
+
let era = "AD";
|
|
9017
|
+
if (year <= 0) {
|
|
9018
|
+
era = "BC";
|
|
9019
|
+
year = 1 - year;
|
|
9020
|
+
}
|
|
9021
|
+
return [
|
|
9022
|
+
era,
|
|
9023
|
+
year
|
|
9024
|
+
];
|
|
9025
|
+
}
|
|
9026
|
+
const $3b62074eb05584b2$var$daysInMonth = {
|
|
9027
|
+
standard: [
|
|
9028
|
+
31,
|
|
9029
|
+
28,
|
|
9030
|
+
31,
|
|
9031
|
+
30,
|
|
9032
|
+
31,
|
|
9033
|
+
30,
|
|
9034
|
+
31,
|
|
9035
|
+
31,
|
|
9036
|
+
30,
|
|
9037
|
+
31,
|
|
9038
|
+
30,
|
|
9039
|
+
31
|
|
9040
|
+
],
|
|
9041
|
+
leapyear: [
|
|
9042
|
+
31,
|
|
9043
|
+
29,
|
|
9044
|
+
31,
|
|
9045
|
+
30,
|
|
9046
|
+
31,
|
|
9047
|
+
30,
|
|
9048
|
+
31,
|
|
9049
|
+
31,
|
|
9050
|
+
30,
|
|
9051
|
+
31,
|
|
9052
|
+
30,
|
|
9053
|
+
31
|
|
9054
|
+
]
|
|
9055
|
+
};
|
|
9056
|
+
class $3b62074eb05584b2$export$80ee6245ec4f29ec {
|
|
9057
|
+
fromJulianDay(jd) {
|
|
9058
|
+
let jd0 = jd;
|
|
9059
|
+
let depoch = jd0 - $3b62074eb05584b2$var$EPOCH;
|
|
9060
|
+
let quadricent = Math.floor(depoch / 146097);
|
|
9061
|
+
let dqc = $2b4dce13dd5a17fa$export$842a2cf37af977e1(depoch, 146097);
|
|
9062
|
+
let cent = Math.floor(dqc / 36524);
|
|
9063
|
+
let dcent = $2b4dce13dd5a17fa$export$842a2cf37af977e1(dqc, 36524);
|
|
9064
|
+
let quad = Math.floor(dcent / 1461);
|
|
9065
|
+
let dquad = $2b4dce13dd5a17fa$export$842a2cf37af977e1(dcent, 1461);
|
|
9066
|
+
let yindex = Math.floor(dquad / 365);
|
|
9067
|
+
let extendedYear = quadricent * 400 + cent * 100 + quad * 4 + yindex + (cent !== 4 && yindex !== 4 ? 1 : 0);
|
|
9068
|
+
let [era, year] = $3b62074eb05584b2$export$4475b7e617eb123c(extendedYear);
|
|
9069
|
+
let yearDay = jd0 - $3b62074eb05584b2$export$f297eb839006d339(era, year, 1, 1);
|
|
9070
|
+
let leapAdj = 2;
|
|
9071
|
+
if (jd0 < $3b62074eb05584b2$export$f297eb839006d339(era, year, 3, 1))
|
|
9072
|
+
leapAdj = 0;
|
|
9073
|
+
else if ($3b62074eb05584b2$export$553d7fa8e3805fc0(year))
|
|
9074
|
+
leapAdj = 1;
|
|
9075
|
+
let month = Math.floor(((yearDay + leapAdj) * 12 + 373) / 367);
|
|
9076
|
+
let day = jd0 - $3b62074eb05584b2$export$f297eb839006d339(era, year, month, 1) + 1;
|
|
9077
|
+
return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(era, year, month, day);
|
|
9078
|
+
}
|
|
9079
|
+
toJulianDay(date) {
|
|
9080
|
+
return $3b62074eb05584b2$export$f297eb839006d339(date.era, date.year, date.month, date.day);
|
|
9081
|
+
}
|
|
9082
|
+
getDaysInMonth(date) {
|
|
9083
|
+
return $3b62074eb05584b2$var$daysInMonth[$3b62074eb05584b2$export$553d7fa8e3805fc0(date.year) ? "leapyear" : "standard"][date.month - 1];
|
|
9084
|
+
}
|
|
9085
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9086
|
+
getMonthsInYear(date) {
|
|
9087
|
+
return 12;
|
|
9088
|
+
}
|
|
9089
|
+
getDaysInYear(date) {
|
|
9090
|
+
return $3b62074eb05584b2$export$553d7fa8e3805fc0(date.year) ? 366 : 365;
|
|
9091
|
+
}
|
|
9092
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9093
|
+
getYearsInEra(date) {
|
|
9094
|
+
return 9999;
|
|
9095
|
+
}
|
|
9096
|
+
getEras() {
|
|
9097
|
+
return [
|
|
9098
|
+
"BC",
|
|
9099
|
+
"AD"
|
|
9100
|
+
];
|
|
9101
|
+
}
|
|
9102
|
+
isInverseEra(date) {
|
|
9103
|
+
return date.era === "BC";
|
|
9104
|
+
}
|
|
9105
|
+
balanceDate(date) {
|
|
9106
|
+
if (date.year <= 0) {
|
|
9107
|
+
date.era = date.era === "BC" ? "AD" : "BC";
|
|
9108
|
+
date.year = 1 - date.year;
|
|
9109
|
+
}
|
|
9110
|
+
}
|
|
9111
|
+
constructor() {
|
|
9112
|
+
this.identifier = "gregory";
|
|
9113
|
+
}
|
|
9114
|
+
}
|
|
9115
|
+
function $14e0f24ef4ac5c92$export$68781ddf31c0090f(a2, b) {
|
|
9116
|
+
return a2.calendar.toJulianDay(a2) - b.calendar.toJulianDay(b);
|
|
9117
|
+
}
|
|
9118
|
+
function $14e0f24ef4ac5c92$export$c19a80a9721b80f6(a2, b) {
|
|
9119
|
+
return $14e0f24ef4ac5c92$var$timeToMs(a2) - $14e0f24ef4ac5c92$var$timeToMs(b);
|
|
9120
|
+
}
|
|
9121
|
+
function $14e0f24ef4ac5c92$var$timeToMs(a2) {
|
|
9122
|
+
return a2.hour * 36e5 + a2.minute * 6e4 + a2.second * 1e3 + a2.millisecond;
|
|
9123
|
+
}
|
|
9124
|
+
let $14e0f24ef4ac5c92$var$localTimeZone = null;
|
|
9125
|
+
function $14e0f24ef4ac5c92$export$aa8b41735afcabd2() {
|
|
9126
|
+
if ($14e0f24ef4ac5c92$var$localTimeZone == null)
|
|
9127
|
+
$14e0f24ef4ac5c92$var$localTimeZone = new Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
9128
|
+
return $14e0f24ef4ac5c92$var$localTimeZone;
|
|
9129
|
+
}
|
|
9130
|
+
function $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) {
|
|
9131
|
+
date = $11d87f3f76e88657$export$b4a036af3fc0b032(date, new $3b62074eb05584b2$export$80ee6245ec4f29ec());
|
|
9132
|
+
let year = $3b62074eb05584b2$export$c36e0ecb2d4fa69d(date.era, date.year);
|
|
9133
|
+
return $11d87f3f76e88657$var$epochFromParts(year, date.month, date.day, date.hour, date.minute, date.second, date.millisecond);
|
|
9134
|
+
}
|
|
9135
|
+
function $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, millisecond) {
|
|
9136
|
+
let date = /* @__PURE__ */ new Date();
|
|
9137
|
+
date.setUTCHours(hour, minute, second, millisecond);
|
|
9138
|
+
date.setUTCFullYear(year, month - 1, day);
|
|
9139
|
+
return date.getTime();
|
|
9140
|
+
}
|
|
9141
|
+
function $11d87f3f76e88657$export$59c99f3515d3493f(ms, timeZone) {
|
|
9142
|
+
if (timeZone === "UTC")
|
|
9143
|
+
return 0;
|
|
9144
|
+
if (ms > 0 && timeZone === $14e0f24ef4ac5c92$export$aa8b41735afcabd2())
|
|
9145
|
+
return new Date(ms).getTimezoneOffset() * -6e4;
|
|
9146
|
+
let { year, month, day, hour, minute, second } = $11d87f3f76e88657$var$getTimeZoneParts(ms, timeZone);
|
|
9147
|
+
let utc = $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, 0);
|
|
9148
|
+
return utc - Math.floor(ms / 1e3) * 1e3;
|
|
9149
|
+
}
|
|
9150
|
+
const $11d87f3f76e88657$var$formattersByTimeZone = /* @__PURE__ */ new Map();
|
|
9151
|
+
function $11d87f3f76e88657$var$getTimeZoneParts(ms, timeZone) {
|
|
9152
|
+
let formatter = $11d87f3f76e88657$var$formattersByTimeZone.get(timeZone);
|
|
9153
|
+
if (!formatter) {
|
|
9154
|
+
formatter = new Intl.DateTimeFormat("en-US", {
|
|
9155
|
+
timeZone,
|
|
9156
|
+
hour12: false,
|
|
9157
|
+
era: "short",
|
|
9158
|
+
year: "numeric",
|
|
9159
|
+
month: "numeric",
|
|
9160
|
+
day: "numeric",
|
|
9161
|
+
hour: "numeric",
|
|
9162
|
+
minute: "numeric",
|
|
9163
|
+
second: "numeric"
|
|
9164
|
+
});
|
|
9165
|
+
$11d87f3f76e88657$var$formattersByTimeZone.set(timeZone, formatter);
|
|
9166
|
+
}
|
|
9167
|
+
let parts = formatter.formatToParts(new Date(ms));
|
|
9168
|
+
let namedParts = {};
|
|
9169
|
+
for (let part of parts)
|
|
9170
|
+
if (part.type !== "literal")
|
|
9171
|
+
namedParts[part.type] = part.value;
|
|
9172
|
+
return {
|
|
9173
|
+
// Firefox returns B instead of BC... https://bugzilla.mozilla.org/show_bug.cgi?id=1752253
|
|
9174
|
+
year: namedParts.era === "BC" || namedParts.era === "B" ? -namedParts.year + 1 : +namedParts.year,
|
|
9175
|
+
month: +namedParts.month,
|
|
9176
|
+
day: +namedParts.day,
|
|
9177
|
+
hour: namedParts.hour === "24" ? 0 : +namedParts.hour,
|
|
9178
|
+
minute: +namedParts.minute,
|
|
9179
|
+
second: +namedParts.second
|
|
9180
|
+
};
|
|
9181
|
+
}
|
|
9182
|
+
const $11d87f3f76e88657$var$DAYMILLIS = 864e5;
|
|
9183
|
+
function $11d87f3f76e88657$var$getValidWallTimes(date, timeZone, earlier, later) {
|
|
9184
|
+
let found = earlier === later ? [
|
|
9185
|
+
earlier
|
|
9186
|
+
] : [
|
|
9187
|
+
earlier,
|
|
9188
|
+
later
|
|
9189
|
+
];
|
|
9190
|
+
return found.filter((absolute) => $11d87f3f76e88657$var$isValidWallTime(date, timeZone, absolute));
|
|
9191
|
+
}
|
|
9192
|
+
function $11d87f3f76e88657$var$isValidWallTime(date, timeZone, absolute) {
|
|
9193
|
+
let parts = $11d87f3f76e88657$var$getTimeZoneParts(absolute, timeZone);
|
|
9194
|
+
return date.year === parts.year && date.month === parts.month && date.day === parts.day && date.hour === parts.hour && date.minute === parts.minute && date.second === parts.second;
|
|
9195
|
+
}
|
|
9196
|
+
function $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguation = "compatible") {
|
|
9197
|
+
let dateTime = $11d87f3f76e88657$export$b21e0b124e224484(date);
|
|
9198
|
+
if (timeZone === "UTC")
|
|
9199
|
+
return $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);
|
|
9200
|
+
if (timeZone === $14e0f24ef4ac5c92$export$aa8b41735afcabd2() && disambiguation === "compatible") {
|
|
9201
|
+
dateTime = $11d87f3f76e88657$export$b4a036af3fc0b032(dateTime, new $3b62074eb05584b2$export$80ee6245ec4f29ec());
|
|
9202
|
+
let date2 = /* @__PURE__ */ new Date();
|
|
9203
|
+
let year = $3b62074eb05584b2$export$c36e0ecb2d4fa69d(dateTime.era, dateTime.year);
|
|
9204
|
+
date2.setFullYear(year, dateTime.month - 1, dateTime.day);
|
|
9205
|
+
date2.setHours(dateTime.hour, dateTime.minute, dateTime.second, dateTime.millisecond);
|
|
9206
|
+
return date2.getTime();
|
|
9207
|
+
}
|
|
9208
|
+
let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);
|
|
9209
|
+
let offsetBefore = $11d87f3f76e88657$export$59c99f3515d3493f(ms - $11d87f3f76e88657$var$DAYMILLIS, timeZone);
|
|
9210
|
+
let offsetAfter = $11d87f3f76e88657$export$59c99f3515d3493f(ms + $11d87f3f76e88657$var$DAYMILLIS, timeZone);
|
|
9211
|
+
let valid = $11d87f3f76e88657$var$getValidWallTimes(dateTime, timeZone, ms - offsetBefore, ms - offsetAfter);
|
|
9212
|
+
if (valid.length === 1)
|
|
9213
|
+
return valid[0];
|
|
9214
|
+
if (valid.length > 1)
|
|
9215
|
+
switch (disambiguation) {
|
|
9216
|
+
case "compatible":
|
|
9217
|
+
case "earlier":
|
|
9218
|
+
return valid[0];
|
|
9219
|
+
case "later":
|
|
9220
|
+
return valid[valid.length - 1];
|
|
9221
|
+
case "reject":
|
|
9222
|
+
throw new RangeError("Multiple possible absolute times found");
|
|
9223
|
+
}
|
|
9224
|
+
switch (disambiguation) {
|
|
9225
|
+
case "earlier":
|
|
9226
|
+
return Math.min(ms - offsetBefore, ms - offsetAfter);
|
|
9227
|
+
case "compatible":
|
|
9228
|
+
case "later":
|
|
9229
|
+
return Math.max(ms - offsetBefore, ms - offsetAfter);
|
|
9230
|
+
case "reject":
|
|
9231
|
+
throw new RangeError("No such absolute time found");
|
|
9232
|
+
}
|
|
9233
|
+
}
|
|
9234
|
+
function $11d87f3f76e88657$export$e67a095c620b86fe(dateTime, timeZone, disambiguation = "compatible") {
|
|
9235
|
+
return new Date($11d87f3f76e88657$export$5107c82f94518f5c(dateTime, timeZone, disambiguation));
|
|
9236
|
+
}
|
|
9237
|
+
function $11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone) {
|
|
9238
|
+
let offset = $11d87f3f76e88657$export$59c99f3515d3493f(ms, timeZone);
|
|
9239
|
+
let date = new Date(ms + offset);
|
|
9240
|
+
let year = date.getUTCFullYear();
|
|
9241
|
+
let month = date.getUTCMonth() + 1;
|
|
9242
|
+
let day = date.getUTCDate();
|
|
9243
|
+
let hour = date.getUTCHours();
|
|
9244
|
+
let minute = date.getUTCMinutes();
|
|
9245
|
+
let second = date.getUTCSeconds();
|
|
9246
|
+
let millisecond = date.getUTCMilliseconds();
|
|
9247
|
+
return new $35ea8db9cb2ccb90$export$d3b7288e7994edea(year, month, day, timeZone, offset, hour, minute, second, millisecond);
|
|
9248
|
+
}
|
|
9249
|
+
function $11d87f3f76e88657$export$93522d1a439f3617(dateTime) {
|
|
9250
|
+
return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(dateTime.calendar, dateTime.era, dateTime.year, dateTime.month, dateTime.day);
|
|
9251
|
+
}
|
|
9252
|
+
function $11d87f3f76e88657$export$b21e0b124e224484(date, time) {
|
|
9253
|
+
let hour = 0, minute = 0, second = 0, millisecond = 0;
|
|
9254
|
+
if ("timeZone" in date)
|
|
9255
|
+
({ hour, minute, second, millisecond } = date);
|
|
9256
|
+
else if ("hour" in date && !time)
|
|
9257
|
+
return date;
|
|
9258
|
+
if (time)
|
|
9259
|
+
({ hour, minute, second, millisecond } = time);
|
|
9260
|
+
return new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(date.calendar, date.era, date.year, date.month, date.day, hour, minute, second, millisecond);
|
|
9261
|
+
}
|
|
9262
|
+
function $11d87f3f76e88657$export$b4a036af3fc0b032(date, calendar) {
|
|
9263
|
+
if (date.calendar.identifier === calendar.identifier)
|
|
9264
|
+
return date;
|
|
9265
|
+
let calendarDate = calendar.fromJulianDay(date.calendar.toJulianDay(date));
|
|
9266
|
+
let copy = date.copy();
|
|
9267
|
+
copy.calendar = calendar;
|
|
9268
|
+
copy.era = calendarDate.era;
|
|
9269
|
+
copy.year = calendarDate.year;
|
|
9270
|
+
copy.month = calendarDate.month;
|
|
9271
|
+
copy.day = calendarDate.day;
|
|
9272
|
+
$735220c2d4774dd3$export$c4e2ecac49351ef2(copy);
|
|
9273
|
+
return copy;
|
|
9274
|
+
}
|
|
9275
|
+
function $11d87f3f76e88657$export$84c95a83c799e074(date, timeZone, disambiguation) {
|
|
9276
|
+
if (date instanceof $35ea8db9cb2ccb90$export$d3b7288e7994edea) {
|
|
9277
|
+
if (date.timeZone === timeZone)
|
|
9278
|
+
return date;
|
|
9279
|
+
return $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone);
|
|
9280
|
+
}
|
|
9281
|
+
let ms = $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguation);
|
|
9282
|
+
return $11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone);
|
|
9283
|
+
}
|
|
9284
|
+
function $11d87f3f76e88657$export$83aac07b4c37b25(date) {
|
|
9285
|
+
let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) - date.offset;
|
|
9286
|
+
return new Date(ms);
|
|
9287
|
+
}
|
|
9288
|
+
function $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone) {
|
|
9289
|
+
let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) - date.offset;
|
|
9290
|
+
return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone), date.calendar);
|
|
9291
|
+
}
|
|
9292
|
+
const $735220c2d4774dd3$var$ONE_HOUR = 36e5;
|
|
9293
|
+
function $735220c2d4774dd3$export$e16d8520af44a096(date, duration) {
|
|
9294
|
+
let mutableDate = date.copy();
|
|
9295
|
+
let days = "hour" in mutableDate ? $735220c2d4774dd3$var$addTimeFields(mutableDate, duration) : 0;
|
|
9296
|
+
$735220c2d4774dd3$var$addYears(mutableDate, duration.years || 0);
|
|
9297
|
+
if (mutableDate.calendar.balanceYearMonth)
|
|
9298
|
+
mutableDate.calendar.balanceYearMonth(mutableDate, date);
|
|
9299
|
+
mutableDate.month += duration.months || 0;
|
|
9300
|
+
$735220c2d4774dd3$var$balanceYearMonth(mutableDate);
|
|
9301
|
+
$735220c2d4774dd3$var$constrainMonthDay(mutableDate);
|
|
9302
|
+
mutableDate.day += (duration.weeks || 0) * 7;
|
|
9303
|
+
mutableDate.day += duration.days || 0;
|
|
9304
|
+
mutableDate.day += days;
|
|
9305
|
+
$735220c2d4774dd3$var$balanceDay(mutableDate);
|
|
9306
|
+
if (mutableDate.calendar.balanceDate)
|
|
9307
|
+
mutableDate.calendar.balanceDate(mutableDate);
|
|
9308
|
+
if (mutableDate.year < 1) {
|
|
9309
|
+
mutableDate.year = 1;
|
|
9310
|
+
mutableDate.month = 1;
|
|
9311
|
+
mutableDate.day = 1;
|
|
9312
|
+
}
|
|
9313
|
+
let maxYear = mutableDate.calendar.getYearsInEra(mutableDate);
|
|
9314
|
+
if (mutableDate.year > maxYear) {
|
|
9315
|
+
var _mutableDate_calendar_isInverseEra, _mutableDate_calendar;
|
|
9316
|
+
let isInverseEra = (_mutableDate_calendar_isInverseEra = (_mutableDate_calendar = mutableDate.calendar).isInverseEra) === null || _mutableDate_calendar_isInverseEra === void 0 ? void 0 : _mutableDate_calendar_isInverseEra.call(_mutableDate_calendar, mutableDate);
|
|
9317
|
+
mutableDate.year = maxYear;
|
|
9318
|
+
mutableDate.month = isInverseEra ? 1 : mutableDate.calendar.getMonthsInYear(mutableDate);
|
|
9319
|
+
mutableDate.day = isInverseEra ? 1 : mutableDate.calendar.getDaysInMonth(mutableDate);
|
|
9320
|
+
}
|
|
9321
|
+
if (mutableDate.month < 1) {
|
|
9322
|
+
mutableDate.month = 1;
|
|
9323
|
+
mutableDate.day = 1;
|
|
9324
|
+
}
|
|
9325
|
+
let maxMonth = mutableDate.calendar.getMonthsInYear(mutableDate);
|
|
9326
|
+
if (mutableDate.month > maxMonth) {
|
|
9327
|
+
mutableDate.month = maxMonth;
|
|
9328
|
+
mutableDate.day = mutableDate.calendar.getDaysInMonth(mutableDate);
|
|
9329
|
+
}
|
|
9330
|
+
mutableDate.day = Math.max(1, Math.min(mutableDate.calendar.getDaysInMonth(mutableDate), mutableDate.day));
|
|
9331
|
+
return mutableDate;
|
|
9332
|
+
}
|
|
9333
|
+
function $735220c2d4774dd3$var$addYears(date, years) {
|
|
9334
|
+
var _date_calendar_isInverseEra, _date_calendar;
|
|
9335
|
+
if ((_date_calendar_isInverseEra = (_date_calendar = date.calendar).isInverseEra) === null || _date_calendar_isInverseEra === void 0 ? void 0 : _date_calendar_isInverseEra.call(_date_calendar, date))
|
|
9336
|
+
years = -years;
|
|
9337
|
+
date.year += years;
|
|
9338
|
+
}
|
|
9339
|
+
function $735220c2d4774dd3$var$balanceYearMonth(date) {
|
|
9340
|
+
while (date.month < 1) {
|
|
9341
|
+
$735220c2d4774dd3$var$addYears(date, -1);
|
|
9342
|
+
date.month += date.calendar.getMonthsInYear(date);
|
|
9343
|
+
}
|
|
9344
|
+
let monthsInYear = 0;
|
|
9345
|
+
while (date.month > (monthsInYear = date.calendar.getMonthsInYear(date))) {
|
|
9346
|
+
date.month -= monthsInYear;
|
|
9347
|
+
$735220c2d4774dd3$var$addYears(date, 1);
|
|
9348
|
+
}
|
|
9349
|
+
}
|
|
9350
|
+
function $735220c2d4774dd3$var$balanceDay(date) {
|
|
9351
|
+
while (date.day < 1) {
|
|
9352
|
+
date.month--;
|
|
9353
|
+
$735220c2d4774dd3$var$balanceYearMonth(date);
|
|
9354
|
+
date.day += date.calendar.getDaysInMonth(date);
|
|
9355
|
+
}
|
|
9356
|
+
while (date.day > date.calendar.getDaysInMonth(date)) {
|
|
9357
|
+
date.day -= date.calendar.getDaysInMonth(date);
|
|
9358
|
+
date.month++;
|
|
9359
|
+
$735220c2d4774dd3$var$balanceYearMonth(date);
|
|
9360
|
+
}
|
|
9361
|
+
}
|
|
9362
|
+
function $735220c2d4774dd3$var$constrainMonthDay(date) {
|
|
9363
|
+
date.month = Math.max(1, Math.min(date.calendar.getMonthsInYear(date), date.month));
|
|
9364
|
+
date.day = Math.max(1, Math.min(date.calendar.getDaysInMonth(date), date.day));
|
|
9365
|
+
}
|
|
9366
|
+
function $735220c2d4774dd3$export$c4e2ecac49351ef2(date) {
|
|
9367
|
+
if (date.calendar.constrainDate)
|
|
9368
|
+
date.calendar.constrainDate(date);
|
|
9369
|
+
date.year = Math.max(1, Math.min(date.calendar.getYearsInEra(date), date.year));
|
|
9370
|
+
$735220c2d4774dd3$var$constrainMonthDay(date);
|
|
9371
|
+
}
|
|
9372
|
+
function $735220c2d4774dd3$export$3e2544e88a25bff8(duration) {
|
|
9373
|
+
let inverseDuration = {};
|
|
9374
|
+
for (let key in duration)
|
|
9375
|
+
if (typeof duration[key] === "number")
|
|
9376
|
+
inverseDuration[key] = -duration[key];
|
|
9377
|
+
return inverseDuration;
|
|
9378
|
+
}
|
|
9379
|
+
function $735220c2d4774dd3$export$4e2d2ead65e5f7e3(date, duration) {
|
|
9380
|
+
return $735220c2d4774dd3$export$e16d8520af44a096(date, $735220c2d4774dd3$export$3e2544e88a25bff8(duration));
|
|
9381
|
+
}
|
|
9382
|
+
function $735220c2d4774dd3$export$adaa4cf7ef1b65be(date, fields) {
|
|
9383
|
+
let mutableDate = date.copy();
|
|
9384
|
+
if (fields.era != null)
|
|
9385
|
+
mutableDate.era = fields.era;
|
|
9386
|
+
if (fields.year != null)
|
|
9387
|
+
mutableDate.year = fields.year;
|
|
9388
|
+
if (fields.month != null)
|
|
9389
|
+
mutableDate.month = fields.month;
|
|
9390
|
+
if (fields.day != null)
|
|
9391
|
+
mutableDate.day = fields.day;
|
|
9392
|
+
$735220c2d4774dd3$export$c4e2ecac49351ef2(mutableDate);
|
|
9393
|
+
return mutableDate;
|
|
9394
|
+
}
|
|
9395
|
+
function $735220c2d4774dd3$export$e5d5e1c1822b6e56(value, fields) {
|
|
9396
|
+
let mutableValue = value.copy();
|
|
9397
|
+
if (fields.hour != null)
|
|
9398
|
+
mutableValue.hour = fields.hour;
|
|
9399
|
+
if (fields.minute != null)
|
|
9400
|
+
mutableValue.minute = fields.minute;
|
|
9401
|
+
if (fields.second != null)
|
|
9402
|
+
mutableValue.second = fields.second;
|
|
9403
|
+
if (fields.millisecond != null)
|
|
9404
|
+
mutableValue.millisecond = fields.millisecond;
|
|
9405
|
+
$735220c2d4774dd3$export$7555de1e070510cb(mutableValue);
|
|
9406
|
+
return mutableValue;
|
|
9407
|
+
}
|
|
9408
|
+
function $735220c2d4774dd3$var$balanceTime(time) {
|
|
9409
|
+
time.second += Math.floor(time.millisecond / 1e3);
|
|
9410
|
+
time.millisecond = $735220c2d4774dd3$var$nonNegativeMod(time.millisecond, 1e3);
|
|
9411
|
+
time.minute += Math.floor(time.second / 60);
|
|
9412
|
+
time.second = $735220c2d4774dd3$var$nonNegativeMod(time.second, 60);
|
|
9413
|
+
time.hour += Math.floor(time.minute / 60);
|
|
9414
|
+
time.minute = $735220c2d4774dd3$var$nonNegativeMod(time.minute, 60);
|
|
9415
|
+
let days = Math.floor(time.hour / 24);
|
|
9416
|
+
time.hour = $735220c2d4774dd3$var$nonNegativeMod(time.hour, 24);
|
|
9417
|
+
return days;
|
|
9418
|
+
}
|
|
9419
|
+
function $735220c2d4774dd3$export$7555de1e070510cb(time) {
|
|
9420
|
+
time.millisecond = Math.max(0, Math.min(time.millisecond, 1e3));
|
|
9421
|
+
time.second = Math.max(0, Math.min(time.second, 59));
|
|
9422
|
+
time.minute = Math.max(0, Math.min(time.minute, 59));
|
|
9423
|
+
time.hour = Math.max(0, Math.min(time.hour, 23));
|
|
9424
|
+
}
|
|
9425
|
+
function $735220c2d4774dd3$var$nonNegativeMod(a2, b) {
|
|
9426
|
+
let result = a2 % b;
|
|
9427
|
+
if (result < 0)
|
|
9428
|
+
result += b;
|
|
9429
|
+
return result;
|
|
9430
|
+
}
|
|
9431
|
+
function $735220c2d4774dd3$var$addTimeFields(time, duration) {
|
|
9432
|
+
time.hour += duration.hours || 0;
|
|
9433
|
+
time.minute += duration.minutes || 0;
|
|
9434
|
+
time.second += duration.seconds || 0;
|
|
9435
|
+
time.millisecond += duration.milliseconds || 0;
|
|
9436
|
+
return $735220c2d4774dd3$var$balanceTime(time);
|
|
9437
|
+
}
|
|
9438
|
+
function $735220c2d4774dd3$export$d52ced6badfb9a4c(value, field, amount, options) {
|
|
9439
|
+
let mutable = value.copy();
|
|
9440
|
+
switch (field) {
|
|
9441
|
+
case "era": {
|
|
9442
|
+
let eras = value.calendar.getEras();
|
|
9443
|
+
let eraIndex = eras.indexOf(value.era);
|
|
9444
|
+
if (eraIndex < 0)
|
|
9445
|
+
throw new Error("Invalid era: " + value.era);
|
|
9446
|
+
eraIndex = $735220c2d4774dd3$var$cycleValue(eraIndex, amount, 0, eras.length - 1, options === null || options === void 0 ? void 0 : options.round);
|
|
9447
|
+
mutable.era = eras[eraIndex];
|
|
9448
|
+
$735220c2d4774dd3$export$c4e2ecac49351ef2(mutable);
|
|
9449
|
+
break;
|
|
9450
|
+
}
|
|
9451
|
+
case "year":
|
|
9452
|
+
var _mutable_calendar_isInverseEra, _mutable_calendar;
|
|
9453
|
+
if ((_mutable_calendar_isInverseEra = (_mutable_calendar = mutable.calendar).isInverseEra) === null || _mutable_calendar_isInverseEra === void 0 ? void 0 : _mutable_calendar_isInverseEra.call(_mutable_calendar, mutable))
|
|
9454
|
+
amount = -amount;
|
|
9455
|
+
mutable.year = $735220c2d4774dd3$var$cycleValue(value.year, amount, -Infinity, 9999, options === null || options === void 0 ? void 0 : options.round);
|
|
9456
|
+
if (mutable.year === -Infinity)
|
|
9457
|
+
mutable.year = 1;
|
|
9458
|
+
if (mutable.calendar.balanceYearMonth)
|
|
9459
|
+
mutable.calendar.balanceYearMonth(mutable, value);
|
|
9460
|
+
break;
|
|
9461
|
+
case "month":
|
|
9462
|
+
mutable.month = $735220c2d4774dd3$var$cycleValue(value.month, amount, 1, value.calendar.getMonthsInYear(value), options === null || options === void 0 ? void 0 : options.round);
|
|
9463
|
+
break;
|
|
9464
|
+
case "day":
|
|
9465
|
+
mutable.day = $735220c2d4774dd3$var$cycleValue(value.day, amount, 1, value.calendar.getDaysInMonth(value), options === null || options === void 0 ? void 0 : options.round);
|
|
9466
|
+
break;
|
|
9467
|
+
default:
|
|
9468
|
+
throw new Error("Unsupported field " + field);
|
|
9469
|
+
}
|
|
9470
|
+
if (value.calendar.balanceDate)
|
|
9471
|
+
value.calendar.balanceDate(mutable);
|
|
9472
|
+
$735220c2d4774dd3$export$c4e2ecac49351ef2(mutable);
|
|
9473
|
+
return mutable;
|
|
9474
|
+
}
|
|
9475
|
+
function $735220c2d4774dd3$export$dd02b3e0007dfe28(value, field, amount, options) {
|
|
9476
|
+
let mutable = value.copy();
|
|
9477
|
+
switch (field) {
|
|
9478
|
+
case "hour": {
|
|
9479
|
+
let hours = value.hour;
|
|
9480
|
+
let min = 0;
|
|
9481
|
+
let max = 23;
|
|
9482
|
+
if ((options === null || options === void 0 ? void 0 : options.hourCycle) === 12) {
|
|
9483
|
+
let isPM = hours >= 12;
|
|
9484
|
+
min = isPM ? 12 : 0;
|
|
9485
|
+
max = isPM ? 23 : 11;
|
|
9486
|
+
}
|
|
9487
|
+
mutable.hour = $735220c2d4774dd3$var$cycleValue(hours, amount, min, max, options === null || options === void 0 ? void 0 : options.round);
|
|
9488
|
+
break;
|
|
9489
|
+
}
|
|
9490
|
+
case "minute":
|
|
9491
|
+
mutable.minute = $735220c2d4774dd3$var$cycleValue(value.minute, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round);
|
|
9492
|
+
break;
|
|
9493
|
+
case "second":
|
|
9494
|
+
mutable.second = $735220c2d4774dd3$var$cycleValue(value.second, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round);
|
|
9495
|
+
break;
|
|
9496
|
+
case "millisecond":
|
|
9497
|
+
mutable.millisecond = $735220c2d4774dd3$var$cycleValue(value.millisecond, amount, 0, 999, options === null || options === void 0 ? void 0 : options.round);
|
|
9498
|
+
break;
|
|
9499
|
+
default:
|
|
9500
|
+
throw new Error("Unsupported field " + field);
|
|
9501
|
+
}
|
|
9502
|
+
return mutable;
|
|
9503
|
+
}
|
|
9504
|
+
function $735220c2d4774dd3$var$cycleValue(value, amount, min, max, round = false) {
|
|
9505
|
+
if (round) {
|
|
9506
|
+
value += Math.sign(amount);
|
|
9507
|
+
if (value < min)
|
|
9508
|
+
value = max;
|
|
9509
|
+
let div = Math.abs(amount);
|
|
9510
|
+
if (amount > 0)
|
|
9511
|
+
value = Math.ceil(value / div) * div;
|
|
9512
|
+
else
|
|
9513
|
+
value = Math.floor(value / div) * div;
|
|
9514
|
+
if (value > max)
|
|
9515
|
+
value = min;
|
|
9516
|
+
} else {
|
|
9517
|
+
value += amount;
|
|
9518
|
+
if (value < min)
|
|
9519
|
+
value = max - (min - value - 1);
|
|
9520
|
+
else if (value > max)
|
|
9521
|
+
value = min + (value - max - 1);
|
|
9522
|
+
}
|
|
9523
|
+
return value;
|
|
9524
|
+
}
|
|
9525
|
+
function $735220c2d4774dd3$export$96b1d28349274637(dateTime, duration) {
|
|
9526
|
+
let ms;
|
|
9527
|
+
if (duration.years != null && duration.years !== 0 || duration.months != null && duration.months !== 0 || duration.weeks != null && duration.weeks !== 0 || duration.days != null && duration.days !== 0) {
|
|
9528
|
+
let res2 = $735220c2d4774dd3$export$e16d8520af44a096($11d87f3f76e88657$export$b21e0b124e224484(dateTime), {
|
|
9529
|
+
years: duration.years,
|
|
9530
|
+
months: duration.months,
|
|
9531
|
+
weeks: duration.weeks,
|
|
9532
|
+
days: duration.days
|
|
9533
|
+
});
|
|
9534
|
+
ms = $11d87f3f76e88657$export$5107c82f94518f5c(res2, dateTime.timeZone);
|
|
9535
|
+
} else
|
|
9536
|
+
ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime) - dateTime.offset;
|
|
9537
|
+
ms += duration.milliseconds || 0;
|
|
9538
|
+
ms += (duration.seconds || 0) * 1e3;
|
|
9539
|
+
ms += (duration.minutes || 0) * 6e4;
|
|
9540
|
+
ms += (duration.hours || 0) * 36e5;
|
|
9541
|
+
let res = $11d87f3f76e88657$export$1b96692a1ba042ac(ms, dateTime.timeZone);
|
|
9542
|
+
return $11d87f3f76e88657$export$b4a036af3fc0b032(res, dateTime.calendar);
|
|
9543
|
+
}
|
|
9544
|
+
function $735220c2d4774dd3$export$6814caac34ca03c7(dateTime, duration) {
|
|
9545
|
+
return $735220c2d4774dd3$export$96b1d28349274637(dateTime, $735220c2d4774dd3$export$3e2544e88a25bff8(duration));
|
|
9546
|
+
}
|
|
9547
|
+
function $735220c2d4774dd3$export$9a297d111fc86b79(dateTime, field, amount, options) {
|
|
9548
|
+
switch (field) {
|
|
9549
|
+
case "hour": {
|
|
9550
|
+
let min = 0;
|
|
9551
|
+
let max = 23;
|
|
9552
|
+
if ((options === null || options === void 0 ? void 0 : options.hourCycle) === 12) {
|
|
9553
|
+
let isPM = dateTime.hour >= 12;
|
|
9554
|
+
min = isPM ? 12 : 0;
|
|
9555
|
+
max = isPM ? 23 : 11;
|
|
9556
|
+
}
|
|
9557
|
+
let plainDateTime = $11d87f3f76e88657$export$b21e0b124e224484(dateTime);
|
|
9558
|
+
let minDate = $11d87f3f76e88657$export$b4a036af3fc0b032($735220c2d4774dd3$export$e5d5e1c1822b6e56(plainDateTime, {
|
|
9559
|
+
hour: min
|
|
9560
|
+
}), new $3b62074eb05584b2$export$80ee6245ec4f29ec());
|
|
9561
|
+
let minAbsolute = [
|
|
9562
|
+
$11d87f3f76e88657$export$5107c82f94518f5c(minDate, dateTime.timeZone, "earlier"),
|
|
9563
|
+
$11d87f3f76e88657$export$5107c82f94518f5c(minDate, dateTime.timeZone, "later")
|
|
9564
|
+
].filter((ms2) => $11d87f3f76e88657$export$1b96692a1ba042ac(ms2, dateTime.timeZone).day === minDate.day)[0];
|
|
9565
|
+
let maxDate = $11d87f3f76e88657$export$b4a036af3fc0b032($735220c2d4774dd3$export$e5d5e1c1822b6e56(plainDateTime, {
|
|
9566
|
+
hour: max
|
|
9567
|
+
}), new $3b62074eb05584b2$export$80ee6245ec4f29ec());
|
|
9568
|
+
let maxAbsolute = [
|
|
9569
|
+
$11d87f3f76e88657$export$5107c82f94518f5c(maxDate, dateTime.timeZone, "earlier"),
|
|
9570
|
+
$11d87f3f76e88657$export$5107c82f94518f5c(maxDate, dateTime.timeZone, "later")
|
|
9571
|
+
].filter((ms2) => $11d87f3f76e88657$export$1b96692a1ba042ac(ms2, dateTime.timeZone).day === maxDate.day).pop();
|
|
9572
|
+
let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime) - dateTime.offset;
|
|
9573
|
+
let hours = Math.floor(ms / $735220c2d4774dd3$var$ONE_HOUR);
|
|
9574
|
+
let remainder = ms % $735220c2d4774dd3$var$ONE_HOUR;
|
|
9575
|
+
ms = $735220c2d4774dd3$var$cycleValue(hours, amount, Math.floor(minAbsolute / $735220c2d4774dd3$var$ONE_HOUR), Math.floor(maxAbsolute / $735220c2d4774dd3$var$ONE_HOUR), options === null || options === void 0 ? void 0 : options.round) * $735220c2d4774dd3$var$ONE_HOUR + remainder;
|
|
9576
|
+
return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms, dateTime.timeZone), dateTime.calendar);
|
|
9577
|
+
}
|
|
9578
|
+
case "minute":
|
|
9579
|
+
case "second":
|
|
9580
|
+
case "millisecond":
|
|
9581
|
+
return $735220c2d4774dd3$export$dd02b3e0007dfe28(dateTime, field, amount, options);
|
|
9582
|
+
case "era":
|
|
9583
|
+
case "year":
|
|
9584
|
+
case "month":
|
|
9585
|
+
case "day": {
|
|
9586
|
+
let res = $735220c2d4774dd3$export$d52ced6badfb9a4c($11d87f3f76e88657$export$b21e0b124e224484(dateTime), field, amount, options);
|
|
9587
|
+
let ms = $11d87f3f76e88657$export$5107c82f94518f5c(res, dateTime.timeZone);
|
|
9588
|
+
return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms, dateTime.timeZone), dateTime.calendar);
|
|
9589
|
+
}
|
|
9590
|
+
default:
|
|
9591
|
+
throw new Error("Unsupported field " + field);
|
|
9592
|
+
}
|
|
9593
|
+
}
|
|
9594
|
+
function $735220c2d4774dd3$export$31b5430eb18be4f8(dateTime, fields, disambiguation) {
|
|
9595
|
+
let plainDateTime = $11d87f3f76e88657$export$b21e0b124e224484(dateTime);
|
|
9596
|
+
let res = $735220c2d4774dd3$export$e5d5e1c1822b6e56($735220c2d4774dd3$export$adaa4cf7ef1b65be(plainDateTime, fields), fields);
|
|
9597
|
+
if (res.compare(plainDateTime) === 0)
|
|
9598
|
+
return dateTime;
|
|
9599
|
+
let ms = $11d87f3f76e88657$export$5107c82f94518f5c(res, dateTime.timeZone, disambiguation);
|
|
9600
|
+
return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms, dateTime.timeZone), dateTime.calendar);
|
|
9601
|
+
}
|
|
9602
|
+
const $fae977aafc393c5c$var$ABSOLUTE_RE = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;
|
|
9603
|
+
function $fae977aafc393c5c$export$5adfdab05168c219(value, timeZone) {
|
|
9604
|
+
let m = value.match($fae977aafc393c5c$var$ABSOLUTE_RE);
|
|
9605
|
+
if (!m)
|
|
9606
|
+
throw new Error("Invalid ISO 8601 date time string: " + value);
|
|
9607
|
+
let date = new $35ea8db9cb2ccb90$export$d3b7288e7994edea($fae977aafc393c5c$var$parseNumber(m[1], 1, 9999), $fae977aafc393c5c$var$parseNumber(m[2], 1, 12), 1, timeZone, 0, m[4] ? $fae977aafc393c5c$var$parseNumber(m[4], 0, 23) : 0, m[5] ? $fae977aafc393c5c$var$parseNumber(m[5], 0, 59) : 0, m[6] ? $fae977aafc393c5c$var$parseNumber(m[6], 0, 59) : 0, m[7] ? $fae977aafc393c5c$var$parseNumber(m[7], 0, Infinity) * 1e3 : 0);
|
|
9608
|
+
date.day = $fae977aafc393c5c$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date));
|
|
9609
|
+
var _m_;
|
|
9610
|
+
if (m[8])
|
|
9611
|
+
date.offset = $fae977aafc393c5c$var$parseNumber(m[8], -23, 23) * 36e5 + $fae977aafc393c5c$var$parseNumber((_m_ = m[9]) !== null && _m_ !== void 0 ? _m_ : "0", 0, 59) * 6e4;
|
|
9612
|
+
return $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone);
|
|
9613
|
+
}
|
|
9614
|
+
function $fae977aafc393c5c$var$parseNumber(value, min, max) {
|
|
9615
|
+
let val = Number(value);
|
|
9616
|
+
if (val < min || val > max)
|
|
9617
|
+
throw new RangeError(`Value out of range: ${min} <= ${val} <= ${max}`);
|
|
9618
|
+
return val;
|
|
9619
|
+
}
|
|
9620
|
+
function $fae977aafc393c5c$export$f59dee82248f5ad4(time) {
|
|
9621
|
+
return `${String(time.hour).padStart(2, "0")}:${String(time.minute).padStart(2, "0")}:${String(time.second).padStart(2, "0")}${time.millisecond ? String(time.millisecond / 1e3).slice(1) : ""}`;
|
|
9622
|
+
}
|
|
9623
|
+
function $fae977aafc393c5c$export$60dfd74aa96791bd(date) {
|
|
9624
|
+
let gregorianDate = $11d87f3f76e88657$export$b4a036af3fc0b032(date, new $3b62074eb05584b2$export$80ee6245ec4f29ec());
|
|
9625
|
+
return `${String(gregorianDate.year).padStart(4, "0")}-${String(gregorianDate.month).padStart(2, "0")}-${String(gregorianDate.day).padStart(2, "0")}`;
|
|
9626
|
+
}
|
|
9627
|
+
function $fae977aafc393c5c$export$4223de14708adc63(date) {
|
|
9628
|
+
return `${$fae977aafc393c5c$export$60dfd74aa96791bd(date)}T${$fae977aafc393c5c$export$f59dee82248f5ad4(date)}`;
|
|
9629
|
+
}
|
|
9630
|
+
function $fae977aafc393c5c$var$offsetToString(offset) {
|
|
9631
|
+
let sign = Math.sign(offset) < 0 ? "-" : "+";
|
|
9632
|
+
offset = Math.abs(offset);
|
|
9633
|
+
let offsetHours = Math.floor(offset / 36e5);
|
|
9634
|
+
let offsetMinutes = offset % 36e5 / 6e4;
|
|
9635
|
+
return `${sign}${String(offsetHours).padStart(2, "0")}:${String(offsetMinutes).padStart(2, "0")}`;
|
|
9636
|
+
}
|
|
9637
|
+
function $fae977aafc393c5c$export$bf79f1ebf4b18792(date) {
|
|
9638
|
+
return `${$fae977aafc393c5c$export$4223de14708adc63(date)}${$fae977aafc393c5c$var$offsetToString(date.offset)}[${date.timeZone}]`;
|
|
9639
|
+
}
|
|
9640
|
+
function _check_private_redeclaration(obj, privateCollection) {
|
|
9641
|
+
if (privateCollection.has(obj)) {
|
|
9642
|
+
throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
9643
|
+
}
|
|
9644
|
+
}
|
|
9645
|
+
function _class_private_field_init(obj, privateMap, value) {
|
|
9646
|
+
_check_private_redeclaration(obj, privateMap);
|
|
9647
|
+
privateMap.set(obj, value);
|
|
9648
|
+
}
|
|
9649
|
+
function $35ea8db9cb2ccb90$var$shiftArgs(args) {
|
|
9650
|
+
let calendar = typeof args[0] === "object" ? args.shift() : new $3b62074eb05584b2$export$80ee6245ec4f29ec();
|
|
9651
|
+
let era;
|
|
9652
|
+
if (typeof args[0] === "string")
|
|
9653
|
+
era = args.shift();
|
|
9654
|
+
else {
|
|
9655
|
+
let eras = calendar.getEras();
|
|
9656
|
+
era = eras[eras.length - 1];
|
|
9657
|
+
}
|
|
9658
|
+
let year = args.shift();
|
|
9659
|
+
let month = args.shift();
|
|
9660
|
+
let day = args.shift();
|
|
9661
|
+
return [
|
|
9662
|
+
calendar,
|
|
9663
|
+
era,
|
|
9664
|
+
year,
|
|
9665
|
+
month,
|
|
9666
|
+
day
|
|
9667
|
+
];
|
|
9668
|
+
}
|
|
9669
|
+
var $35ea8db9cb2ccb90$var$_type = /* @__PURE__ */ new WeakMap();
|
|
9670
|
+
class $35ea8db9cb2ccb90$export$99faa760c7908e4f {
|
|
9671
|
+
/** Returns a copy of this date. */
|
|
9672
|
+
copy() {
|
|
9673
|
+
if (this.era)
|
|
9674
|
+
return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar, this.era, this.year, this.month, this.day);
|
|
9675
|
+
else
|
|
9676
|
+
return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar, this.year, this.month, this.day);
|
|
9677
|
+
}
|
|
9678
|
+
/** Returns a new `CalendarDate` with the given duration added to it. */
|
|
9679
|
+
add(duration) {
|
|
9680
|
+
return $735220c2d4774dd3$export$e16d8520af44a096(this, duration);
|
|
9681
|
+
}
|
|
9682
|
+
/** Returns a new `CalendarDate` with the given duration subtracted from it. */
|
|
9683
|
+
subtract(duration) {
|
|
9684
|
+
return $735220c2d4774dd3$export$4e2d2ead65e5f7e3(this, duration);
|
|
9685
|
+
}
|
|
9686
|
+
/** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */
|
|
9687
|
+
set(fields) {
|
|
9688
|
+
return $735220c2d4774dd3$export$adaa4cf7ef1b65be(this, fields);
|
|
9689
|
+
}
|
|
9690
|
+
/**
|
|
9691
|
+
* Returns a new `CalendarDate` with the given field adjusted by a specified amount.
|
|
9692
|
+
* When the resulting value reaches the limits of the field, it wraps around.
|
|
9693
|
+
*/
|
|
9694
|
+
cycle(field, amount, options) {
|
|
9695
|
+
return $735220c2d4774dd3$export$d52ced6badfb9a4c(this, field, amount, options);
|
|
9696
|
+
}
|
|
9697
|
+
/** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */
|
|
9698
|
+
toDate(timeZone) {
|
|
9699
|
+
return $11d87f3f76e88657$export$e67a095c620b86fe(this, timeZone);
|
|
9700
|
+
}
|
|
9701
|
+
/** Converts the date to an ISO 8601 formatted string. */
|
|
9702
|
+
toString() {
|
|
9703
|
+
return $fae977aafc393c5c$export$60dfd74aa96791bd(this);
|
|
9704
|
+
}
|
|
9705
|
+
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
|
|
9706
|
+
compare(b) {
|
|
9707
|
+
return $14e0f24ef4ac5c92$export$68781ddf31c0090f(this, b);
|
|
9708
|
+
}
|
|
9709
|
+
constructor(...args) {
|
|
9710
|
+
_class_private_field_init(this, $35ea8db9cb2ccb90$var$_type, {
|
|
9711
|
+
writable: true,
|
|
9712
|
+
value: void 0
|
|
9713
|
+
});
|
|
9714
|
+
let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
|
|
9715
|
+
this.calendar = calendar;
|
|
9716
|
+
this.era = era;
|
|
9717
|
+
this.year = year;
|
|
9718
|
+
this.month = month;
|
|
9719
|
+
this.day = day;
|
|
9720
|
+
$735220c2d4774dd3$export$c4e2ecac49351ef2(this);
|
|
9721
|
+
}
|
|
9722
|
+
}
|
|
9723
|
+
var $35ea8db9cb2ccb90$var$_type2 = /* @__PURE__ */ new WeakMap();
|
|
9724
|
+
class $35ea8db9cb2ccb90$export$ca871e8dbb80966f {
|
|
9725
|
+
/** Returns a copy of this date. */
|
|
9726
|
+
copy() {
|
|
9727
|
+
if (this.era)
|
|
9728
|
+
return new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
|
|
9729
|
+
else
|
|
9730
|
+
return new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
|
|
9731
|
+
}
|
|
9732
|
+
/** Returns a new `CalendarDateTime` with the given duration added to it. */
|
|
9733
|
+
add(duration) {
|
|
9734
|
+
return $735220c2d4774dd3$export$e16d8520af44a096(this, duration);
|
|
9735
|
+
}
|
|
9736
|
+
/** Returns a new `CalendarDateTime` with the given duration subtracted from it. */
|
|
9737
|
+
subtract(duration) {
|
|
9738
|
+
return $735220c2d4774dd3$export$4e2d2ead65e5f7e3(this, duration);
|
|
9739
|
+
}
|
|
9740
|
+
/** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
|
|
9741
|
+
set(fields) {
|
|
9742
|
+
return $735220c2d4774dd3$export$adaa4cf7ef1b65be($735220c2d4774dd3$export$e5d5e1c1822b6e56(this, fields), fields);
|
|
9743
|
+
}
|
|
9744
|
+
/**
|
|
9745
|
+
* Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
|
|
9746
|
+
* When the resulting value reaches the limits of the field, it wraps around.
|
|
9747
|
+
*/
|
|
9748
|
+
cycle(field, amount, options) {
|
|
9749
|
+
switch (field) {
|
|
9750
|
+
case "era":
|
|
9751
|
+
case "year":
|
|
9752
|
+
case "month":
|
|
9753
|
+
case "day":
|
|
9754
|
+
return $735220c2d4774dd3$export$d52ced6badfb9a4c(this, field, amount, options);
|
|
9755
|
+
default:
|
|
9756
|
+
return $735220c2d4774dd3$export$dd02b3e0007dfe28(this, field, amount, options);
|
|
9757
|
+
}
|
|
9758
|
+
}
|
|
9759
|
+
/** Converts the date to a native JavaScript Date object in the given time zone. */
|
|
9760
|
+
toDate(timeZone, disambiguation) {
|
|
9761
|
+
return $11d87f3f76e88657$export$e67a095c620b86fe(this, timeZone, disambiguation);
|
|
9762
|
+
}
|
|
9763
|
+
/** Converts the date to an ISO 8601 formatted string. */
|
|
9764
|
+
toString() {
|
|
9765
|
+
return $fae977aafc393c5c$export$4223de14708adc63(this);
|
|
9766
|
+
}
|
|
9767
|
+
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
|
|
9768
|
+
compare(b) {
|
|
9769
|
+
let res = $14e0f24ef4ac5c92$export$68781ddf31c0090f(this, b);
|
|
9770
|
+
if (res === 0)
|
|
9771
|
+
return $14e0f24ef4ac5c92$export$c19a80a9721b80f6(this, $11d87f3f76e88657$export$b21e0b124e224484(b));
|
|
9772
|
+
return res;
|
|
9773
|
+
}
|
|
9774
|
+
constructor(...args) {
|
|
9775
|
+
_class_private_field_init(this, $35ea8db9cb2ccb90$var$_type2, {
|
|
9776
|
+
writable: true,
|
|
9777
|
+
value: void 0
|
|
9778
|
+
});
|
|
9779
|
+
let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
|
|
9780
|
+
this.calendar = calendar;
|
|
9781
|
+
this.era = era;
|
|
9782
|
+
this.year = year;
|
|
9783
|
+
this.month = month;
|
|
9784
|
+
this.day = day;
|
|
9785
|
+
this.hour = args.shift() || 0;
|
|
9786
|
+
this.minute = args.shift() || 0;
|
|
9787
|
+
this.second = args.shift() || 0;
|
|
9788
|
+
this.millisecond = args.shift() || 0;
|
|
9789
|
+
$735220c2d4774dd3$export$c4e2ecac49351ef2(this);
|
|
9790
|
+
}
|
|
9791
|
+
}
|
|
9792
|
+
var $35ea8db9cb2ccb90$var$_type3 = /* @__PURE__ */ new WeakMap();
|
|
9793
|
+
class $35ea8db9cb2ccb90$export$d3b7288e7994edea {
|
|
9794
|
+
/** Returns a copy of this date. */
|
|
9795
|
+
copy() {
|
|
9796
|
+
if (this.era)
|
|
9797
|
+
return new $35ea8db9cb2ccb90$export$d3b7288e7994edea(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
|
|
9798
|
+
else
|
|
9799
|
+
return new $35ea8db9cb2ccb90$export$d3b7288e7994edea(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
|
|
9800
|
+
}
|
|
9801
|
+
/** Returns a new `ZonedDateTime` with the given duration added to it. */
|
|
9802
|
+
add(duration) {
|
|
9803
|
+
return $735220c2d4774dd3$export$96b1d28349274637(this, duration);
|
|
9804
|
+
}
|
|
9805
|
+
/** Returns a new `ZonedDateTime` with the given duration subtracted from it. */
|
|
9806
|
+
subtract(duration) {
|
|
9807
|
+
return $735220c2d4774dd3$export$6814caac34ca03c7(this, duration);
|
|
9808
|
+
}
|
|
9809
|
+
/** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
|
|
9810
|
+
set(fields, disambiguation) {
|
|
9811
|
+
return $735220c2d4774dd3$export$31b5430eb18be4f8(this, fields, disambiguation);
|
|
9812
|
+
}
|
|
9813
|
+
/**
|
|
9814
|
+
* Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.
|
|
9815
|
+
* When the resulting value reaches the limits of the field, it wraps around.
|
|
9816
|
+
*/
|
|
9817
|
+
cycle(field, amount, options) {
|
|
9818
|
+
return $735220c2d4774dd3$export$9a297d111fc86b79(this, field, amount, options);
|
|
9819
|
+
}
|
|
9820
|
+
/** Converts the date to a native JavaScript Date object. */
|
|
9821
|
+
toDate() {
|
|
9822
|
+
return $11d87f3f76e88657$export$83aac07b4c37b25(this);
|
|
9823
|
+
}
|
|
9824
|
+
/** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */
|
|
9825
|
+
toString() {
|
|
9826
|
+
return $fae977aafc393c5c$export$bf79f1ebf4b18792(this);
|
|
9827
|
+
}
|
|
9828
|
+
/** Converts the date to an ISO 8601 formatted string in UTC. */
|
|
9829
|
+
toAbsoluteString() {
|
|
9830
|
+
return this.toDate().toISOString();
|
|
9831
|
+
}
|
|
9832
|
+
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
|
|
9833
|
+
compare(b) {
|
|
9834
|
+
return this.toDate().getTime() - $11d87f3f76e88657$export$84c95a83c799e074(b, this.timeZone).toDate().getTime();
|
|
9835
|
+
}
|
|
9836
|
+
constructor(...args) {
|
|
9837
|
+
_class_private_field_init(this, $35ea8db9cb2ccb90$var$_type3, {
|
|
9838
|
+
writable: true,
|
|
9839
|
+
value: void 0
|
|
9840
|
+
});
|
|
9841
|
+
let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
|
|
9842
|
+
let timeZone = args.shift();
|
|
9843
|
+
let offset = args.shift();
|
|
9844
|
+
this.calendar = calendar;
|
|
9845
|
+
this.era = era;
|
|
9846
|
+
this.year = year;
|
|
9847
|
+
this.month = month;
|
|
9848
|
+
this.day = day;
|
|
9849
|
+
this.timeZone = timeZone;
|
|
9850
|
+
this.offset = offset;
|
|
9851
|
+
this.hour = args.shift() || 0;
|
|
9852
|
+
this.minute = args.shift() || 0;
|
|
9853
|
+
this.second = args.shift() || 0;
|
|
9854
|
+
this.millisecond = args.shift() || 0;
|
|
9855
|
+
$735220c2d4774dd3$export$c4e2ecac49351ef2(this);
|
|
9856
|
+
}
|
|
9857
|
+
}
|
|
8995
9858
|
const [Provider, useHistory] = createContext("History", {
|
|
8996
9859
|
history: [],
|
|
8997
9860
|
currentLocationIndex: 0,
|
|
@@ -9051,10 +9914,184 @@ styled(Typography)`
|
|
|
9051
9914
|
word-break: break-all;
|
|
9052
9915
|
color: ${({ theme }) => theme.colors.danger600};
|
|
9053
9916
|
`;
|
|
9054
|
-
({
|
|
9055
|
-
|
|
9056
|
-
|
|
9057
|
-
}
|
|
9917
|
+
const ActionLayout = ({ startActions, endActions }) => {
|
|
9918
|
+
if (!startActions && !endActions) {
|
|
9919
|
+
return null;
|
|
9920
|
+
}
|
|
9921
|
+
return /* @__PURE__ */ jsxs(
|
|
9922
|
+
Flex,
|
|
9923
|
+
{
|
|
9924
|
+
justifyContent: "space-between",
|
|
9925
|
+
alignItems: "flex-start",
|
|
9926
|
+
paddingBottom: 4,
|
|
9927
|
+
paddingLeft: 10,
|
|
9928
|
+
paddingRight: 10,
|
|
9929
|
+
children: [
|
|
9930
|
+
/* @__PURE__ */ jsx(Flex, { gap: 2, wrap: "wrap", children: startActions }),
|
|
9931
|
+
/* @__PURE__ */ jsx(Flex, { gap: 2, shrink: 0, wrap: "wrap", children: endActions })
|
|
9932
|
+
]
|
|
9933
|
+
}
|
|
9934
|
+
);
|
|
9935
|
+
};
|
|
9936
|
+
const ContentLayout = ({ children }) => {
|
|
9937
|
+
return /* @__PURE__ */ jsx(Box, { paddingLeft: 10, paddingRight: 10, children });
|
|
9938
|
+
};
|
|
9939
|
+
const GridColSize = {
|
|
9940
|
+
S: 180,
|
|
9941
|
+
M: 250
|
|
9942
|
+
};
|
|
9943
|
+
const StyledGrid = styled(Box)`
|
|
9944
|
+
display: grid;
|
|
9945
|
+
grid-template-columns: repeat(
|
|
9946
|
+
auto-fit,
|
|
9947
|
+
minmax(${({ $size }) => `${GridColSize[$size]}px`}, 1fr)
|
|
9948
|
+
);
|
|
9949
|
+
grid-gap: ${({ theme }) => theme.spaces[4]};
|
|
9950
|
+
`;
|
|
9951
|
+
const GridLayout = ({ size, children }) => {
|
|
9952
|
+
return /* @__PURE__ */ jsx(StyledGrid, { $size: size, children });
|
|
9953
|
+
};
|
|
9954
|
+
const BaseHeaderLayout = React.forwardRef(
|
|
9955
|
+
({ navigationAction, primaryAction, secondaryAction, subtitle, title, sticky, width, ...props }, ref) => {
|
|
9956
|
+
const isSubtitleString = typeof subtitle === "string";
|
|
9957
|
+
if (sticky) {
|
|
9958
|
+
return /* @__PURE__ */ jsx(
|
|
9959
|
+
Box,
|
|
9960
|
+
{
|
|
9961
|
+
paddingLeft: 6,
|
|
9962
|
+
paddingRight: 6,
|
|
9963
|
+
paddingTop: 3,
|
|
9964
|
+
paddingBottom: 3,
|
|
9965
|
+
position: "fixed",
|
|
9966
|
+
top: 0,
|
|
9967
|
+
right: 0,
|
|
9968
|
+
background: "neutral0",
|
|
9969
|
+
shadow: "tableShadow",
|
|
9970
|
+
width: `${width}rem`,
|
|
9971
|
+
zIndex: 1,
|
|
9972
|
+
"data-strapi-header-sticky": true,
|
|
9973
|
+
children: /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", children: [
|
|
9974
|
+
/* @__PURE__ */ jsxs(Flex, { children: [
|
|
9975
|
+
navigationAction && /* @__PURE__ */ jsx(Box, { paddingRight: 3, children: navigationAction }),
|
|
9976
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
9977
|
+
/* @__PURE__ */ jsx(Typography, { variant: "beta", tag: "h1", ...props, children: title }),
|
|
9978
|
+
isSubtitleString ? /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral600", children: subtitle }) : subtitle
|
|
9979
|
+
] }),
|
|
9980
|
+
secondaryAction ? /* @__PURE__ */ jsx(Box, { paddingLeft: 4, children: secondaryAction }) : null
|
|
9981
|
+
] }),
|
|
9982
|
+
/* @__PURE__ */ jsx(Flex, { children: primaryAction ? /* @__PURE__ */ jsx(Box, { paddingLeft: 2, children: primaryAction }) : void 0 })
|
|
9983
|
+
] })
|
|
9984
|
+
}
|
|
9985
|
+
);
|
|
9986
|
+
}
|
|
9987
|
+
return /* @__PURE__ */ jsxs(
|
|
9988
|
+
Box,
|
|
9989
|
+
{
|
|
9990
|
+
ref,
|
|
9991
|
+
paddingLeft: 10,
|
|
9992
|
+
paddingRight: 10,
|
|
9993
|
+
paddingBottom: 8,
|
|
9994
|
+
paddingTop: navigationAction ? 6 : 8,
|
|
9995
|
+
background: "neutral100",
|
|
9996
|
+
"data-strapi-header": true,
|
|
9997
|
+
children: [
|
|
9998
|
+
navigationAction ? /* @__PURE__ */ jsx(Box, { paddingBottom: 2, children: navigationAction }) : null,
|
|
9999
|
+
/* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", children: [
|
|
10000
|
+
/* @__PURE__ */ jsxs(Flex, { minWidth: 0, children: [
|
|
10001
|
+
/* @__PURE__ */ jsx(Typography, { tag: "h1", variant: "alpha", ...props, children: title }),
|
|
10002
|
+
secondaryAction ? /* @__PURE__ */ jsx(Box, { paddingLeft: 4, children: secondaryAction }) : null
|
|
10003
|
+
] }),
|
|
10004
|
+
primaryAction
|
|
10005
|
+
] }),
|
|
10006
|
+
isSubtitleString ? /* @__PURE__ */ jsx(Typography, { variant: "epsilon", textColor: "neutral600", tag: "p", children: subtitle }) : subtitle
|
|
10007
|
+
]
|
|
10008
|
+
}
|
|
10009
|
+
);
|
|
10010
|
+
}
|
|
10011
|
+
);
|
|
10012
|
+
const HeaderLayout = (props) => {
|
|
10013
|
+
const baseHeaderLayoutRef = React.useRef(null);
|
|
10014
|
+
const [headerSize, setHeaderSize] = React.useState(null);
|
|
10015
|
+
const [containerRef, isVisible] = useElementOnScreen({
|
|
10016
|
+
root: null,
|
|
10017
|
+
rootMargin: "0px",
|
|
10018
|
+
threshold: 0
|
|
10019
|
+
});
|
|
10020
|
+
useResizeObserver(containerRef, () => {
|
|
10021
|
+
if (containerRef.current) {
|
|
10022
|
+
setHeaderSize(containerRef.current.getBoundingClientRect());
|
|
10023
|
+
}
|
|
10024
|
+
});
|
|
10025
|
+
React.useEffect(() => {
|
|
10026
|
+
if (baseHeaderLayoutRef.current) {
|
|
10027
|
+
setHeaderSize(baseHeaderLayoutRef.current.getBoundingClientRect());
|
|
10028
|
+
}
|
|
10029
|
+
}, [baseHeaderLayoutRef]);
|
|
10030
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10031
|
+
/* @__PURE__ */ jsx("div", { style: { height: headerSize?.height }, ref: containerRef, children: isVisible && /* @__PURE__ */ jsx(BaseHeaderLayout, { ref: baseHeaderLayoutRef, ...props }) }),
|
|
10032
|
+
!isVisible && /* @__PURE__ */ jsx(BaseHeaderLayout, { ...props, sticky: true, width: headerSize?.width })
|
|
10033
|
+
] });
|
|
10034
|
+
};
|
|
10035
|
+
HeaderLayout.displayName = "HeaderLayout";
|
|
10036
|
+
const useElementOnScreen = (options) => {
|
|
10037
|
+
const containerRef = React.useRef(null);
|
|
10038
|
+
const [isVisible, setIsVisible] = React.useState(true);
|
|
10039
|
+
const callback = ([entry]) => {
|
|
10040
|
+
setIsVisible(entry.isIntersecting);
|
|
10041
|
+
};
|
|
10042
|
+
React.useEffect(() => {
|
|
10043
|
+
const containerEl = containerRef.current;
|
|
10044
|
+
const observer = new IntersectionObserver(callback, options);
|
|
10045
|
+
if (containerEl) {
|
|
10046
|
+
observer.observe(containerRef.current);
|
|
10047
|
+
}
|
|
10048
|
+
return () => {
|
|
10049
|
+
if (containerEl) {
|
|
10050
|
+
observer.disconnect();
|
|
10051
|
+
}
|
|
10052
|
+
};
|
|
10053
|
+
}, [containerRef, options]);
|
|
10054
|
+
return [containerRef, isVisible];
|
|
10055
|
+
};
|
|
10056
|
+
const useResizeObserver = (sources, onResize) => {
|
|
10057
|
+
const handleResize = useCallbackRef(onResize);
|
|
10058
|
+
React.useLayoutEffect(() => {
|
|
10059
|
+
const resizeObs = new ResizeObserver(handleResize);
|
|
10060
|
+
if (Array.isArray(sources)) {
|
|
10061
|
+
sources.forEach((source) => {
|
|
10062
|
+
if (source.current) {
|
|
10063
|
+
resizeObs.observe(source.current);
|
|
10064
|
+
}
|
|
10065
|
+
});
|
|
10066
|
+
} else if (sources.current) {
|
|
10067
|
+
resizeObs.observe(sources.current);
|
|
10068
|
+
}
|
|
10069
|
+
return () => {
|
|
10070
|
+
resizeObs.disconnect();
|
|
10071
|
+
};
|
|
10072
|
+
}, [sources, handleResize]);
|
|
10073
|
+
};
|
|
10074
|
+
const GridContainer = styled(Box)`
|
|
10075
|
+
display: grid;
|
|
10076
|
+
grid-template-columns: ${({ $hasSideNav }) => $hasSideNav ? `auto 1fr` : "1fr"};
|
|
10077
|
+
`;
|
|
10078
|
+
const OverflowingItem = styled(Box)`
|
|
10079
|
+
overflow-x: hidden;
|
|
10080
|
+
`;
|
|
10081
|
+
const RootLayout = ({ sideNav, children }) => {
|
|
10082
|
+
return /* @__PURE__ */ jsxs(GridContainer, { $hasSideNav: Boolean(sideNav), children: [
|
|
10083
|
+
sideNav,
|
|
10084
|
+
/* @__PURE__ */ jsx(OverflowingItem, { paddingBottom: 10, children })
|
|
10085
|
+
] });
|
|
10086
|
+
};
|
|
10087
|
+
const Layouts = {
|
|
10088
|
+
Root: RootLayout,
|
|
10089
|
+
Header: HeaderLayout,
|
|
10090
|
+
BaseHeader: BaseHeaderLayout,
|
|
10091
|
+
Grid: GridLayout,
|
|
10092
|
+
Action: ActionLayout,
|
|
10093
|
+
Content: ContentLayout
|
|
10094
|
+
};
|
|
9058
10095
|
function getIn(obj, key, def, pathStartIndex = 0) {
|
|
9059
10096
|
const path = toPath(key);
|
|
9060
10097
|
while (obj && pathStartIndex < path.length) {
|
|
@@ -9580,7 +10617,7 @@ const DateInput = forwardRef(
|
|
|
9580
10617
|
field.onChange(name, date);
|
|
9581
10618
|
},
|
|
9582
10619
|
onClear: () => field.onChange(name, void 0),
|
|
9583
|
-
value,
|
|
10620
|
+
value: value ? convertLocalDateToUTCDate(value) : void 0,
|
|
9584
10621
|
...props
|
|
9585
10622
|
}
|
|
9586
10623
|
),
|
|
@@ -9589,6 +10626,12 @@ const DateInput = forwardRef(
|
|
|
9589
10626
|
] });
|
|
9590
10627
|
}
|
|
9591
10628
|
);
|
|
10629
|
+
const convertLocalDateToUTCDate = (date) => {
|
|
10630
|
+
const utcDateString = date.toISOString();
|
|
10631
|
+
const timeZone = $14e0f24ef4ac5c92$export$aa8b41735afcabd2();
|
|
10632
|
+
const zonedDateTime = $fae977aafc393c5c$export$5adfdab05168c219(utcDateString, timeZone);
|
|
10633
|
+
return $11d87f3f76e88657$export$93522d1a439f3617(zonedDateTime).toDate("UTC");
|
|
10634
|
+
};
|
|
9592
10635
|
const MemoizedDateInput = memo(DateInput);
|
|
9593
10636
|
const DateTimeInput = forwardRef(
|
|
9594
10637
|
({ name, required, label, hint, labelAction, ...props }, ref) => {
|
|
@@ -9829,7 +10872,7 @@ const TimeInput = forwardRef(
|
|
|
9829
10872
|
ref: composedRefs,
|
|
9830
10873
|
clearLabel: formatMessage({ id: "clearLabel", defaultMessage: "Clear" }),
|
|
9831
10874
|
onChange: (time) => {
|
|
9832
|
-
field.onChange(name, time);
|
|
10875
|
+
field.onChange(name, `${time}:00.000`);
|
|
9833
10876
|
},
|
|
9834
10877
|
onClear: () => field.onChange(name, void 0),
|
|
9835
10878
|
value: field.value ?? "",
|
|
@@ -10125,184 +11168,10 @@ yup.object().shape({
|
|
|
10125
11168
|
defaultMessage: "Passwords must match"
|
|
10126
11169
|
})
|
|
10127
11170
|
});
|
|
10128
|
-
|
|
10129
|
-
|
|
10130
|
-
|
|
10131
|
-
|
|
10132
|
-
return /* @__PURE__ */ jsxs(
|
|
10133
|
-
Flex,
|
|
10134
|
-
{
|
|
10135
|
-
justifyContent: "space-between",
|
|
10136
|
-
alignItems: "flex-start",
|
|
10137
|
-
paddingBottom: 4,
|
|
10138
|
-
paddingLeft: 10,
|
|
10139
|
-
paddingRight: 10,
|
|
10140
|
-
children: [
|
|
10141
|
-
/* @__PURE__ */ jsx(Flex, { gap: 2, wrap: "wrap", children: startActions }),
|
|
10142
|
-
/* @__PURE__ */ jsx(Flex, { gap: 2, shrink: 0, wrap: "wrap", children: endActions })
|
|
10143
|
-
]
|
|
10144
|
-
}
|
|
10145
|
-
);
|
|
10146
|
-
};
|
|
10147
|
-
const ContentLayout = ({ children }) => {
|
|
10148
|
-
return /* @__PURE__ */ jsx(Box, { paddingLeft: 10, paddingRight: 10, children });
|
|
10149
|
-
};
|
|
10150
|
-
const GridColSize = {
|
|
10151
|
-
S: 180,
|
|
10152
|
-
M: 250
|
|
10153
|
-
};
|
|
10154
|
-
const StyledGrid = styled(Box)`
|
|
10155
|
-
display: grid;
|
|
10156
|
-
grid-template-columns: repeat(
|
|
10157
|
-
auto-fit,
|
|
10158
|
-
minmax(${({ $size }) => `${GridColSize[$size]}px`}, 1fr)
|
|
10159
|
-
);
|
|
10160
|
-
grid-gap: ${({ theme }) => theme.spaces[4]};
|
|
10161
|
-
`;
|
|
10162
|
-
const GridLayout = ({ size, children }) => {
|
|
10163
|
-
return /* @__PURE__ */ jsx(StyledGrid, { $size: size, children });
|
|
10164
|
-
};
|
|
10165
|
-
const BaseHeaderLayout = React.forwardRef(
|
|
10166
|
-
({ navigationAction, primaryAction, secondaryAction, subtitle, title, sticky, width, ...props }, ref) => {
|
|
10167
|
-
const isSubtitleString = typeof subtitle === "string";
|
|
10168
|
-
if (sticky) {
|
|
10169
|
-
return /* @__PURE__ */ jsx(
|
|
10170
|
-
Box,
|
|
10171
|
-
{
|
|
10172
|
-
paddingLeft: 6,
|
|
10173
|
-
paddingRight: 6,
|
|
10174
|
-
paddingTop: 3,
|
|
10175
|
-
paddingBottom: 3,
|
|
10176
|
-
position: "fixed",
|
|
10177
|
-
top: 0,
|
|
10178
|
-
right: 0,
|
|
10179
|
-
background: "neutral0",
|
|
10180
|
-
shadow: "tableShadow",
|
|
10181
|
-
width: `${width}rem`,
|
|
10182
|
-
zIndex: 1,
|
|
10183
|
-
"data-strapi-header-sticky": true,
|
|
10184
|
-
children: /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", children: [
|
|
10185
|
-
/* @__PURE__ */ jsxs(Flex, { children: [
|
|
10186
|
-
navigationAction && /* @__PURE__ */ jsx(Box, { paddingRight: 3, children: navigationAction }),
|
|
10187
|
-
/* @__PURE__ */ jsxs(Box, { children: [
|
|
10188
|
-
/* @__PURE__ */ jsx(Typography, { variant: "beta", tag: "h1", ...props, children: title }),
|
|
10189
|
-
isSubtitleString ? /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral600", children: subtitle }) : subtitle
|
|
10190
|
-
] }),
|
|
10191
|
-
secondaryAction ? /* @__PURE__ */ jsx(Box, { paddingLeft: 4, children: secondaryAction }) : null
|
|
10192
|
-
] }),
|
|
10193
|
-
/* @__PURE__ */ jsx(Flex, { children: primaryAction ? /* @__PURE__ */ jsx(Box, { paddingLeft: 2, children: primaryAction }) : void 0 })
|
|
10194
|
-
] })
|
|
10195
|
-
}
|
|
10196
|
-
);
|
|
10197
|
-
}
|
|
10198
|
-
return /* @__PURE__ */ jsxs(
|
|
10199
|
-
Box,
|
|
10200
|
-
{
|
|
10201
|
-
ref,
|
|
10202
|
-
paddingLeft: 10,
|
|
10203
|
-
paddingRight: 10,
|
|
10204
|
-
paddingBottom: 8,
|
|
10205
|
-
paddingTop: navigationAction ? 6 : 8,
|
|
10206
|
-
background: "neutral100",
|
|
10207
|
-
"data-strapi-header": true,
|
|
10208
|
-
children: [
|
|
10209
|
-
navigationAction ? /* @__PURE__ */ jsx(Box, { paddingBottom: 2, children: navigationAction }) : null,
|
|
10210
|
-
/* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", children: [
|
|
10211
|
-
/* @__PURE__ */ jsxs(Flex, { minWidth: 0, children: [
|
|
10212
|
-
/* @__PURE__ */ jsx(Typography, { tag: "h1", variant: "alpha", ...props, children: title }),
|
|
10213
|
-
secondaryAction ? /* @__PURE__ */ jsx(Box, { paddingLeft: 4, children: secondaryAction }) : null
|
|
10214
|
-
] }),
|
|
10215
|
-
primaryAction
|
|
10216
|
-
] }),
|
|
10217
|
-
isSubtitleString ? /* @__PURE__ */ jsx(Typography, { variant: "epsilon", textColor: "neutral600", tag: "p", children: subtitle }) : subtitle
|
|
10218
|
-
]
|
|
10219
|
-
}
|
|
10220
|
-
);
|
|
10221
|
-
}
|
|
10222
|
-
);
|
|
10223
|
-
const HeaderLayout = (props) => {
|
|
10224
|
-
const baseHeaderLayoutRef = React.useRef(null);
|
|
10225
|
-
const [headerSize, setHeaderSize] = React.useState(null);
|
|
10226
|
-
const [containerRef, isVisible] = useElementOnScreen({
|
|
10227
|
-
root: null,
|
|
10228
|
-
rootMargin: "0px",
|
|
10229
|
-
threshold: 0
|
|
10230
|
-
});
|
|
10231
|
-
useResizeObserver(containerRef, () => {
|
|
10232
|
-
if (containerRef.current) {
|
|
10233
|
-
setHeaderSize(containerRef.current.getBoundingClientRect());
|
|
10234
|
-
}
|
|
10235
|
-
});
|
|
10236
|
-
React.useEffect(() => {
|
|
10237
|
-
if (baseHeaderLayoutRef.current) {
|
|
10238
|
-
setHeaderSize(baseHeaderLayoutRef.current.getBoundingClientRect());
|
|
10239
|
-
}
|
|
10240
|
-
}, [baseHeaderLayoutRef]);
|
|
10241
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10242
|
-
/* @__PURE__ */ jsx("div", { style: { height: headerSize?.height }, ref: containerRef, children: isVisible && /* @__PURE__ */ jsx(BaseHeaderLayout, { ref: baseHeaderLayoutRef, ...props }) }),
|
|
10243
|
-
!isVisible && /* @__PURE__ */ jsx(BaseHeaderLayout, { ...props, sticky: true, width: headerSize?.width })
|
|
10244
|
-
] });
|
|
10245
|
-
};
|
|
10246
|
-
HeaderLayout.displayName = "HeaderLayout";
|
|
10247
|
-
const useElementOnScreen = (options) => {
|
|
10248
|
-
const containerRef = React.useRef(null);
|
|
10249
|
-
const [isVisible, setIsVisible] = React.useState(true);
|
|
10250
|
-
const callback = ([entry]) => {
|
|
10251
|
-
setIsVisible(entry.isIntersecting);
|
|
10252
|
-
};
|
|
10253
|
-
React.useEffect(() => {
|
|
10254
|
-
const containerEl = containerRef.current;
|
|
10255
|
-
const observer = new IntersectionObserver(callback, options);
|
|
10256
|
-
if (containerEl) {
|
|
10257
|
-
observer.observe(containerRef.current);
|
|
10258
|
-
}
|
|
10259
|
-
return () => {
|
|
10260
|
-
if (containerEl) {
|
|
10261
|
-
observer.disconnect();
|
|
10262
|
-
}
|
|
10263
|
-
};
|
|
10264
|
-
}, [containerRef, options]);
|
|
10265
|
-
return [containerRef, isVisible];
|
|
10266
|
-
};
|
|
10267
|
-
const useResizeObserver = (sources, onResize) => {
|
|
10268
|
-
const handleResize = useCallbackRef(onResize);
|
|
10269
|
-
React.useLayoutEffect(() => {
|
|
10270
|
-
const resizeObs = new ResizeObserver(handleResize);
|
|
10271
|
-
if (Array.isArray(sources)) {
|
|
10272
|
-
sources.forEach((source) => {
|
|
10273
|
-
if (source.current) {
|
|
10274
|
-
resizeObs.observe(source.current);
|
|
10275
|
-
}
|
|
10276
|
-
});
|
|
10277
|
-
} else if (sources.current) {
|
|
10278
|
-
resizeObs.observe(sources.current);
|
|
10279
|
-
}
|
|
10280
|
-
return () => {
|
|
10281
|
-
resizeObs.disconnect();
|
|
10282
|
-
};
|
|
10283
|
-
}, [sources, handleResize]);
|
|
10284
|
-
};
|
|
10285
|
-
const GridContainer = styled(Box)`
|
|
10286
|
-
display: grid;
|
|
10287
|
-
grid-template-columns: ${({ $hasSideNav }) => $hasSideNav ? `auto 1fr` : "1fr"};
|
|
10288
|
-
`;
|
|
10289
|
-
const OverflowingItem = styled(Box)`
|
|
10290
|
-
overflow-x: hidden;
|
|
10291
|
-
`;
|
|
10292
|
-
const RootLayout = ({ sideNav, children }) => {
|
|
10293
|
-
return /* @__PURE__ */ jsxs(GridContainer, { $hasSideNav: Boolean(sideNav), children: [
|
|
10294
|
-
sideNav,
|
|
10295
|
-
/* @__PURE__ */ jsx(OverflowingItem, { paddingBottom: 10, children })
|
|
10296
|
-
] });
|
|
10297
|
-
};
|
|
10298
|
-
const Layouts = {
|
|
10299
|
-
Root: RootLayout,
|
|
10300
|
-
Header: HeaderLayout,
|
|
10301
|
-
BaseHeader: BaseHeaderLayout,
|
|
10302
|
-
Grid: GridLayout,
|
|
10303
|
-
Action: ActionLayout,
|
|
10304
|
-
Content: ContentLayout
|
|
10305
|
-
};
|
|
11171
|
+
({
|
|
11172
|
+
[adminApi.reducerPath]: adminApi.reducer,
|
|
11173
|
+
admin_app: reducer$1
|
|
11174
|
+
});
|
|
10306
11175
|
React.memo(
|
|
10307
11176
|
({ description, id, props, update }) => {
|
|
10308
11177
|
const comp = description(props);
|
|
@@ -10387,18 +11256,28 @@ React.forwardRef(
|
|
|
10387
11256
|
onPageSizeChange(pageSize);
|
|
10388
11257
|
}
|
|
10389
11258
|
};
|
|
10390
|
-
return /* @__PURE__ */ jsx(
|
|
10391
|
-
|
|
11259
|
+
return /* @__PURE__ */ jsx(
|
|
11260
|
+
Flex,
|
|
10392
11261
|
{
|
|
10393
|
-
|
|
10394
|
-
|
|
10395
|
-
|
|
10396
|
-
|
|
10397
|
-
|
|
10398
|
-
|
|
10399
|
-
|
|
11262
|
+
ref: forwardedRef,
|
|
11263
|
+
paddingTop: 4,
|
|
11264
|
+
paddingBottom: 4,
|
|
11265
|
+
alignItems: "flex-end",
|
|
11266
|
+
justifyContent: "space-between",
|
|
11267
|
+
children: /* @__PURE__ */ jsx(
|
|
11268
|
+
PaginationProvider,
|
|
11269
|
+
{
|
|
11270
|
+
currentQuery: query,
|
|
11271
|
+
page: query.page,
|
|
11272
|
+
pageSize: query.pageSize,
|
|
11273
|
+
pageCount: pageCount.toString(),
|
|
11274
|
+
setPageSize,
|
|
11275
|
+
total,
|
|
11276
|
+
children
|
|
11277
|
+
}
|
|
11278
|
+
)
|
|
10400
11279
|
}
|
|
10401
|
-
)
|
|
11280
|
+
);
|
|
10402
11281
|
}
|
|
10403
11282
|
);
|
|
10404
11283
|
createContext("Table");
|
|
@@ -10567,4 +11446,4 @@ export {
|
|
|
10567
11446
|
Layouts as L,
|
|
10568
11447
|
useTracking as u
|
|
10569
11448
|
};
|
|
10570
|
-
//# sourceMappingURL=index-
|
|
11449
|
+
//# sourceMappingURL=index-7Wlj8eA7-DHTckV6T.mjs.map
|