@beweco/aurora-ui 0.6.35 → 0.6.37

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/index.esm.js CHANGED
@@ -1735,6 +1735,7 @@ var countries = [
1735
1735
  { code: "+55", name: "Brazil", country: "BR" },
1736
1736
  { code: "+52", name: "Mexico", country: "MX" },
1737
1737
  { code: "+503", name: "El Salvador", country: "SV" },
1738
+ { code: "+507", name: "Panama", country: "PA" },
1738
1739
  { code: "+51", name: "Peru", country: "PE" },
1739
1740
  { code: "+56", name: "Chile", country: "CL" },
1740
1741
  { code: "+1", name: "United States", country: "US" },
@@ -1769,10 +1770,10 @@ var defaultTranslations$c = {
1769
1770
 
1770
1771
  /**
1771
1772
  * Países que no entran en la lista por defecto de moneda.
1772
- * El Salvador (y otros casos de dolarización sin código ISO propio) no deben duplicar "USD":
1773
+ * El Salvador, Panamá (y otros casos de dolarización sin código ISO propio) no deben duplicar "USD":
1773
1774
  * el dólar solo se lista con bandera de EE. UU. (país emisor ISO 4217).
1774
1775
  */
1775
- var EXCLUDED_FROM_DEFAULT_CURRENCY = new Set(["SV"]);
1776
+ var EXCLUDED_FROM_DEFAULT_CURRENCY = new Set(["SV", "PA"]);
1776
1777
  /**
1777
1778
  * Países de la lista telefónica que usan EUR pero se agrupan en una sola fila
1778
1779
  * con código `EU` y bandera de la Unión Europea (no se distingue país emisor).
@@ -1786,6 +1787,7 @@ var currencyByCountry = {
1786
1787
  MX: "MXN",
1787
1788
  PE: "PEN",
1788
1789
  CL: "CLP",
1790
+ PA: "USD",
1789
1791
  US: "USD",
1790
1792
  RU: "RUB",
1791
1793
  EG: "EGP",
@@ -4080,18 +4082,410 @@ var RowSteps = React.forwardRef(function (_a, ref) {
4080
4082
  });
4081
4083
  RowSteps.displayName = "RowSteps";
4082
4084
 
4085
+ /*
4086
+ * Copyright 2020 Adobe. All rights reserved.
4087
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4088
+ * you may not use this file except in compliance with the License. You may obtain a copy
4089
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
4090
+ *
4091
+ * Unless required by applicable law or agreed to in writing, software distributed under
4092
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
4093
+ * OF ANY KIND, either express or implied. See the License for the specific language
4094
+ * governing permissions and limitations under the License.
4095
+ */ function $2b4dce13dd5a17fa$export$842a2cf37af977e1(amount, numerator) {
4096
+ return amount - numerator * Math.floor(amount / numerator);
4097
+ }
4098
+
4099
+ /*
4100
+ * Copyright 2020 Adobe. All rights reserved.
4101
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4102
+ * you may not use this file except in compliance with the License. You may obtain a copy
4103
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
4104
+ *
4105
+ * Unless required by applicable law or agreed to in writing, software distributed under
4106
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
4107
+ * OF ANY KIND, either express or implied. See the License for the specific language
4108
+ * governing permissions and limitations under the License.
4109
+ */ // Portions of the code in this file are based on code from ICU.
4110
+ // Original licensing can be found in the NOTICE file in the root directory of this source tree.
4111
+
4112
+
4113
+ const $3b62074eb05584b2$var$EPOCH = 1721426; // 001/01/03 Julian C.E.
4114
+ function $3b62074eb05584b2$export$f297eb839006d339(era, year, month, day) {
4115
+ year = $3b62074eb05584b2$export$c36e0ecb2d4fa69d(era, year);
4116
+ let y1 = year - 1;
4117
+ let monthOffset = -2;
4118
+ if (month <= 2) monthOffset = 0;
4119
+ else if ($3b62074eb05584b2$export$553d7fa8e3805fc0(year)) monthOffset = -1;
4120
+ 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);
4121
+ }
4122
+ function $3b62074eb05584b2$export$553d7fa8e3805fc0(year) {
4123
+ return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
4124
+ }
4125
+ function $3b62074eb05584b2$export$c36e0ecb2d4fa69d(era, year) {
4126
+ return era === 'BC' ? 1 - year : year;
4127
+ }
4128
+ function $3b62074eb05584b2$export$4475b7e617eb123c(year) {
4129
+ let era = 'AD';
4130
+ if (year <= 0) {
4131
+ era = 'BC';
4132
+ year = 1 - year;
4133
+ }
4134
+ return [
4135
+ era,
4136
+ year
4137
+ ];
4138
+ }
4139
+ const $3b62074eb05584b2$var$daysInMonth = {
4140
+ standard: [
4141
+ 31,
4142
+ 28,
4143
+ 31,
4144
+ 30,
4145
+ 31,
4146
+ 30,
4147
+ 31,
4148
+ 31,
4149
+ 30,
4150
+ 31,
4151
+ 30,
4152
+ 31
4153
+ ],
4154
+ leapyear: [
4155
+ 31,
4156
+ 29,
4157
+ 31,
4158
+ 30,
4159
+ 31,
4160
+ 30,
4161
+ 31,
4162
+ 31,
4163
+ 30,
4164
+ 31,
4165
+ 30,
4166
+ 31
4167
+ ]
4168
+ };
4169
+ class $3b62074eb05584b2$export$80ee6245ec4f29ec {
4170
+ fromJulianDay(jd) {
4171
+ let jd0 = jd;
4172
+ let depoch = jd0 - $3b62074eb05584b2$var$EPOCH;
4173
+ let quadricent = Math.floor(depoch / 146097);
4174
+ let dqc = ($2b4dce13dd5a17fa$export$842a2cf37af977e1)(depoch, 146097);
4175
+ let cent = Math.floor(dqc / 36524);
4176
+ let dcent = ($2b4dce13dd5a17fa$export$842a2cf37af977e1)(dqc, 36524);
4177
+ let quad = Math.floor(dcent / 1461);
4178
+ let dquad = ($2b4dce13dd5a17fa$export$842a2cf37af977e1)(dcent, 1461);
4179
+ let yindex = Math.floor(dquad / 365);
4180
+ let extendedYear = quadricent * 400 + cent * 100 + quad * 4 + yindex + (cent !== 4 && yindex !== 4 ? 1 : 0);
4181
+ let [era, year] = $3b62074eb05584b2$export$4475b7e617eb123c(extendedYear);
4182
+ let yearDay = jd0 - $3b62074eb05584b2$export$f297eb839006d339(era, year, 1, 1);
4183
+ let leapAdj = 2;
4184
+ if (jd0 < $3b62074eb05584b2$export$f297eb839006d339(era, year, 3, 1)) leapAdj = 0;
4185
+ else if ($3b62074eb05584b2$export$553d7fa8e3805fc0(year)) leapAdj = 1;
4186
+ let month = Math.floor(((yearDay + leapAdj) * 12 + 373) / 367);
4187
+ let day = jd0 - $3b62074eb05584b2$export$f297eb839006d339(era, year, month, 1) + 1;
4188
+ return new ($35ea8db9cb2ccb90$export$99faa760c7908e4f)(era, year, month, day);
4189
+ }
4190
+ toJulianDay(date) {
4191
+ return $3b62074eb05584b2$export$f297eb839006d339(date.era, date.year, date.month, date.day);
4192
+ }
4193
+ getDaysInMonth(date) {
4194
+ return $3b62074eb05584b2$var$daysInMonth[$3b62074eb05584b2$export$553d7fa8e3805fc0(date.year) ? 'leapyear' : 'standard'][date.month - 1];
4195
+ }
4196
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4197
+ getMonthsInYear(date) {
4198
+ return 12;
4199
+ }
4200
+ getDaysInYear(date) {
4201
+ return $3b62074eb05584b2$export$553d7fa8e3805fc0(date.year) ? 366 : 365;
4202
+ }
4203
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4204
+ getYearsInEra(date) {
4205
+ return 9999;
4206
+ }
4207
+ getEras() {
4208
+ return [
4209
+ 'BC',
4210
+ 'AD'
4211
+ ];
4212
+ }
4213
+ isInverseEra(date) {
4214
+ return date.era === 'BC';
4215
+ }
4216
+ balanceDate(date) {
4217
+ if (date.year <= 0) {
4218
+ date.era = date.era === 'BC' ? 'AD' : 'BC';
4219
+ date.year = 1 - date.year;
4220
+ }
4221
+ }
4222
+ constructor(){
4223
+ this.identifier = 'gregory';
4224
+ }
4225
+ }
4226
+
4227
+ function $14e0f24ef4ac5c92$export$dbc69fd56b53d5e(a, b) {
4228
+ var _a_isEqual, _b_isEqual;
4229
+ var _a_isEqual1, _ref;
4230
+ return (_ref = (_a_isEqual1 = (_a_isEqual = a.isEqual) === null || _a_isEqual === void 0 ? void 0 : _a_isEqual.call(a, b)) !== null && _a_isEqual1 !== void 0 ? _a_isEqual1 : (_b_isEqual = b.isEqual) === null || _b_isEqual === void 0 ? void 0 : _b_isEqual.call(b, a)) !== null && _ref !== void 0 ? _ref : a.identifier === b.identifier;
4231
+ }
4232
+ function $14e0f24ef4ac5c92$export$68781ddf31c0090f(a, b) {
4233
+ return a.calendar.toJulianDay(a) - b.calendar.toJulianDay(b);
4234
+ }
4083
4235
  function $14e0f24ef4ac5c92$export$c19a80a9721b80f6(a, b) {
4084
4236
  return $14e0f24ef4ac5c92$var$timeToMs(a) - $14e0f24ef4ac5c92$var$timeToMs(b);
4085
4237
  }
4086
4238
  function $14e0f24ef4ac5c92$var$timeToMs(a) {
4087
4239
  return a.hour * 3600000 + a.minute * 60000 + a.second * 1000 + a.millisecond;
4088
4240
  }
4241
+ let $14e0f24ef4ac5c92$var$localTimeZone = null;
4242
+ function $14e0f24ef4ac5c92$export$aa8b41735afcabd2() {
4243
+ // TODO: invalidate this somehow?
4244
+ if ($14e0f24ef4ac5c92$var$localTimeZone == null) $14e0f24ef4ac5c92$var$localTimeZone = new Intl.DateTimeFormat().resolvedOptions().timeZone;
4245
+ return $14e0f24ef4ac5c92$var$localTimeZone;
4246
+ }
4247
+
4248
+ /*
4249
+ * Copyright 2020 Adobe. All rights reserved.
4250
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4251
+ * you may not use this file except in compliance with the License. You may obtain a copy
4252
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
4253
+ *
4254
+ * Unless required by applicable law or agreed to in writing, software distributed under
4255
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
4256
+ * OF ANY KIND, either express or implied. See the License for the specific language
4257
+ * governing permissions and limitations under the License.
4258
+ */ // Portions of the code in this file are based on code from the TC39 Temporal proposal.
4259
+ // Original licensing can be found in the NOTICE file in the root directory of this source tree.
4260
+
4261
+
4262
+
4263
+
4264
+ function $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) {
4265
+ date = $11d87f3f76e88657$export$b4a036af3fc0b032(date, new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
4266
+ let year = ($3b62074eb05584b2$export$c36e0ecb2d4fa69d)(date.era, date.year);
4267
+ return $11d87f3f76e88657$var$epochFromParts(year, date.month, date.day, date.hour, date.minute, date.second, date.millisecond);
4268
+ }
4269
+ function $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, millisecond) {
4270
+ // Note: Date.UTC() interprets one and two-digit years as being in the
4271
+ // 20th century, so don't use it
4272
+ let date = new Date();
4273
+ date.setUTCHours(hour, minute, second, millisecond);
4274
+ date.setUTCFullYear(year, month - 1, day);
4275
+ return date.getTime();
4276
+ }
4277
+ function $11d87f3f76e88657$export$59c99f3515d3493f(ms, timeZone) {
4278
+ // Fast path for UTC.
4279
+ if (timeZone === 'UTC') return 0;
4280
+ // Fast path: for local timezone after 1970, use native Date.
4281
+ if (ms > 0 && timeZone === ($14e0f24ef4ac5c92$export$aa8b41735afcabd2)()) return new Date(ms).getTimezoneOffset() * -6e4;
4282
+ let { year: year, month: month, day: day, hour: hour, minute: minute, second: second } = $11d87f3f76e88657$var$getTimeZoneParts(ms, timeZone);
4283
+ let utc = $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, 0);
4284
+ return utc - Math.floor(ms / 1000) * 1000;
4285
+ }
4286
+ const $11d87f3f76e88657$var$formattersByTimeZone = new Map();
4287
+ function $11d87f3f76e88657$var$getTimeZoneParts(ms, timeZone) {
4288
+ let formatter = $11d87f3f76e88657$var$formattersByTimeZone.get(timeZone);
4289
+ if (!formatter) {
4290
+ formatter = new Intl.DateTimeFormat('en-US', {
4291
+ timeZone: timeZone,
4292
+ hour12: false,
4293
+ era: 'short',
4294
+ year: 'numeric',
4295
+ month: 'numeric',
4296
+ day: 'numeric',
4297
+ hour: 'numeric',
4298
+ minute: 'numeric',
4299
+ second: 'numeric'
4300
+ });
4301
+ $11d87f3f76e88657$var$formattersByTimeZone.set(timeZone, formatter);
4302
+ }
4303
+ let parts = formatter.formatToParts(new Date(ms));
4304
+ let namedParts = {};
4305
+ for (let part of parts)if (part.type !== 'literal') namedParts[part.type] = part.value;
4306
+ return {
4307
+ // Firefox returns B instead of BC... https://bugzilla.mozilla.org/show_bug.cgi?id=1752253
4308
+ year: namedParts.era === 'BC' || namedParts.era === 'B' ? -namedParts.year + 1 : +namedParts.year,
4309
+ month: +namedParts.month,
4310
+ day: +namedParts.day,
4311
+ hour: namedParts.hour === '24' ? 0 : +namedParts.hour,
4312
+ minute: +namedParts.minute,
4313
+ second: +namedParts.second
4314
+ };
4315
+ }
4316
+ const $11d87f3f76e88657$var$DAYMILLIS = 86400000;
4317
+ function $11d87f3f76e88657$var$getValidWallTimes(date, timeZone, earlier, later) {
4318
+ let found = earlier === later ? [
4319
+ earlier
4320
+ ] : [
4321
+ earlier,
4322
+ later
4323
+ ];
4324
+ return found.filter((absolute)=>$11d87f3f76e88657$var$isValidWallTime(date, timeZone, absolute));
4325
+ }
4326
+ function $11d87f3f76e88657$var$isValidWallTime(date, timeZone, absolute) {
4327
+ let parts = $11d87f3f76e88657$var$getTimeZoneParts(absolute, timeZone);
4328
+ 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;
4329
+ }
4330
+ function $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguation = 'compatible') {
4331
+ let dateTime = $11d87f3f76e88657$export$b21e0b124e224484(date);
4332
+ // Fast path: if the time zone is UTC, use native Date.
4333
+ if (timeZone === 'UTC') return $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);
4334
+ // Fast path: if the time zone is the local timezone and disambiguation is compatible, use native Date.
4335
+ if (timeZone === ($14e0f24ef4ac5c92$export$aa8b41735afcabd2)() && disambiguation === 'compatible') {
4336
+ dateTime = $11d87f3f76e88657$export$b4a036af3fc0b032(dateTime, new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
4337
+ // Don't use Date constructor here because two-digit years are interpreted in the 20th century.
4338
+ let date = new Date();
4339
+ let year = ($3b62074eb05584b2$export$c36e0ecb2d4fa69d)(dateTime.era, dateTime.year);
4340
+ date.setFullYear(year, dateTime.month - 1, dateTime.day);
4341
+ date.setHours(dateTime.hour, dateTime.minute, dateTime.second, dateTime.millisecond);
4342
+ return date.getTime();
4343
+ }
4344
+ let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);
4345
+ let offsetBefore = $11d87f3f76e88657$export$59c99f3515d3493f(ms - $11d87f3f76e88657$var$DAYMILLIS, timeZone);
4346
+ let offsetAfter = $11d87f3f76e88657$export$59c99f3515d3493f(ms + $11d87f3f76e88657$var$DAYMILLIS, timeZone);
4347
+ let valid = $11d87f3f76e88657$var$getValidWallTimes(dateTime, timeZone, ms - offsetBefore, ms - offsetAfter);
4348
+ if (valid.length === 1) return valid[0];
4349
+ if (valid.length > 1) switch(disambiguation){
4350
+ // 'compatible' means 'earlier' for "fall back" transitions
4351
+ case 'compatible':
4352
+ case 'earlier':
4353
+ return valid[0];
4354
+ case 'later':
4355
+ return valid[valid.length - 1];
4356
+ case 'reject':
4357
+ throw new RangeError('Multiple possible absolute times found');
4358
+ }
4359
+ switch(disambiguation){
4360
+ case 'earlier':
4361
+ return Math.min(ms - offsetBefore, ms - offsetAfter);
4362
+ // 'compatible' means 'later' for "spring forward" transitions
4363
+ case 'compatible':
4364
+ case 'later':
4365
+ return Math.max(ms - offsetBefore, ms - offsetAfter);
4366
+ case 'reject':
4367
+ throw new RangeError('No such absolute time found');
4368
+ }
4369
+ }
4370
+ function $11d87f3f76e88657$export$e67a095c620b86fe(dateTime, timeZone, disambiguation = 'compatible') {
4371
+ return new Date($11d87f3f76e88657$export$5107c82f94518f5c(dateTime, timeZone, disambiguation));
4372
+ }
4373
+ function $11d87f3f76e88657$export$b21e0b124e224484(date, time) {
4374
+ let hour = 0, minute = 0, second = 0, millisecond = 0;
4375
+ if ('timeZone' in date) ({ hour: hour, minute: minute, second: second, millisecond: millisecond } = date);
4376
+ else if ('hour' in date && !time) return date;
4377
+ if (time) ({ hour: hour, minute: minute, second: second, millisecond: millisecond } = time);
4378
+ return new ($35ea8db9cb2ccb90$export$ca871e8dbb80966f)(date.calendar, date.era, date.year, date.month, date.day, hour, minute, second, millisecond);
4379
+ }
4380
+ function $11d87f3f76e88657$export$b4a036af3fc0b032(date, calendar) {
4381
+ if (($14e0f24ef4ac5c92$export$dbc69fd56b53d5e)(date.calendar, calendar)) return date;
4382
+ let calendarDate = calendar.fromJulianDay(date.calendar.toJulianDay(date));
4383
+ let copy = date.copy();
4384
+ copy.calendar = calendar;
4385
+ copy.era = calendarDate.era;
4386
+ copy.year = calendarDate.year;
4387
+ copy.month = calendarDate.month;
4388
+ copy.day = calendarDate.day;
4389
+ ($735220c2d4774dd3$export$c4e2ecac49351ef2)(copy);
4390
+ return copy;
4391
+ }
4089
4392
 
4393
+ function $735220c2d4774dd3$export$e16d8520af44a096(date, duration) {
4394
+ let mutableDate = date.copy();
4395
+ let days = 'hour' in mutableDate ? $735220c2d4774dd3$var$addTimeFields(mutableDate, duration) : 0;
4396
+ $735220c2d4774dd3$var$addYears(mutableDate, duration.years || 0);
4397
+ if (mutableDate.calendar.balanceYearMonth) mutableDate.calendar.balanceYearMonth(mutableDate, date);
4398
+ mutableDate.month += duration.months || 0;
4399
+ $735220c2d4774dd3$var$balanceYearMonth(mutableDate);
4400
+ $735220c2d4774dd3$var$constrainMonthDay(mutableDate);
4401
+ mutableDate.day += (duration.weeks || 0) * 7;
4402
+ mutableDate.day += duration.days || 0;
4403
+ mutableDate.day += days;
4404
+ $735220c2d4774dd3$var$balanceDay(mutableDate);
4405
+ if (mutableDate.calendar.balanceDate) mutableDate.calendar.balanceDate(mutableDate);
4406
+ // Constrain in case adding ended up with a date outside the valid range for the calendar system.
4407
+ // The behavior here is slightly different than when constraining in the `set` function in that
4408
+ // we adjust smaller fields to their minimum/maximum values rather than constraining each field
4409
+ // individually. This matches the general behavior of `add` vs `set` regarding how fields are balanced.
4410
+ if (mutableDate.year < 1) {
4411
+ mutableDate.year = 1;
4412
+ mutableDate.month = 1;
4413
+ mutableDate.day = 1;
4414
+ }
4415
+ let maxYear = mutableDate.calendar.getYearsInEra(mutableDate);
4416
+ if (mutableDate.year > maxYear) {
4417
+ var _mutableDate_calendar_isInverseEra, _mutableDate_calendar;
4418
+ 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);
4419
+ mutableDate.year = maxYear;
4420
+ mutableDate.month = isInverseEra ? 1 : mutableDate.calendar.getMonthsInYear(mutableDate);
4421
+ mutableDate.day = isInverseEra ? 1 : mutableDate.calendar.getDaysInMonth(mutableDate);
4422
+ }
4423
+ if (mutableDate.month < 1) {
4424
+ mutableDate.month = 1;
4425
+ mutableDate.day = 1;
4426
+ }
4427
+ let maxMonth = mutableDate.calendar.getMonthsInYear(mutableDate);
4428
+ if (mutableDate.month > maxMonth) {
4429
+ mutableDate.month = maxMonth;
4430
+ mutableDate.day = mutableDate.calendar.getDaysInMonth(mutableDate);
4431
+ }
4432
+ mutableDate.day = Math.max(1, Math.min(mutableDate.calendar.getDaysInMonth(mutableDate), mutableDate.day));
4433
+ return mutableDate;
4434
+ }
4435
+ function $735220c2d4774dd3$var$addYears(date, years) {
4436
+ var _date_calendar_isInverseEra, _date_calendar;
4437
+ if ((_date_calendar_isInverseEra = (_date_calendar = date.calendar).isInverseEra) === null || _date_calendar_isInverseEra === void 0 ? void 0 : _date_calendar_isInverseEra.call(_date_calendar, date)) years = -years;
4438
+ date.year += years;
4439
+ }
4440
+ function $735220c2d4774dd3$var$balanceYearMonth(date) {
4441
+ while(date.month < 1){
4442
+ $735220c2d4774dd3$var$addYears(date, -1);
4443
+ date.month += date.calendar.getMonthsInYear(date);
4444
+ }
4445
+ let monthsInYear = 0;
4446
+ while(date.month > (monthsInYear = date.calendar.getMonthsInYear(date))){
4447
+ date.month -= monthsInYear;
4448
+ $735220c2d4774dd3$var$addYears(date, 1);
4449
+ }
4450
+ }
4451
+ function $735220c2d4774dd3$var$balanceDay(date) {
4452
+ while(date.day < 1){
4453
+ date.month--;
4454
+ $735220c2d4774dd3$var$balanceYearMonth(date);
4455
+ date.day += date.calendar.getDaysInMonth(date);
4456
+ }
4457
+ while(date.day > date.calendar.getDaysInMonth(date)){
4458
+ date.day -= date.calendar.getDaysInMonth(date);
4459
+ date.month++;
4460
+ $735220c2d4774dd3$var$balanceYearMonth(date);
4461
+ }
4462
+ }
4463
+ function $735220c2d4774dd3$var$constrainMonthDay(date) {
4464
+ date.month = Math.max(1, Math.min(date.calendar.getMonthsInYear(date), date.month));
4465
+ date.day = Math.max(1, Math.min(date.calendar.getDaysInMonth(date), date.day));
4466
+ }
4467
+ function $735220c2d4774dd3$export$c4e2ecac49351ef2(date) {
4468
+ if (date.calendar.constrainDate) date.calendar.constrainDate(date);
4469
+ date.year = Math.max(1, Math.min(date.calendar.getYearsInEra(date), date.year));
4470
+ $735220c2d4774dd3$var$constrainMonthDay(date);
4471
+ }
4090
4472
  function $735220c2d4774dd3$export$3e2544e88a25bff8(duration) {
4091
4473
  let inverseDuration = {};
4092
4474
  for(let key in duration)if (typeof duration[key] === 'number') inverseDuration[key] = -duration[key];
4093
4475
  return inverseDuration;
4094
4476
  }
4477
+ function $735220c2d4774dd3$export$4e2d2ead65e5f7e3(date, duration) {
4478
+ return $735220c2d4774dd3$export$e16d8520af44a096(date, $735220c2d4774dd3$export$3e2544e88a25bff8(duration));
4479
+ }
4480
+ function $735220c2d4774dd3$export$adaa4cf7ef1b65be(date, fields) {
4481
+ let mutableDate = date.copy();
4482
+ if (fields.era != null) mutableDate.era = fields.era;
4483
+ if (fields.year != null) mutableDate.year = fields.year;
4484
+ if (fields.month != null) mutableDate.month = fields.month;
4485
+ if (fields.day != null) mutableDate.day = fields.day;
4486
+ $735220c2d4774dd3$export$c4e2ecac49351ef2(mutableDate);
4487
+ return mutableDate;
4488
+ }
4095
4489
  function $735220c2d4774dd3$export$e5d5e1c1822b6e56(value, fields) {
4096
4490
  let mutableValue = value.copy();
4097
4491
  if (fields.hour != null) mutableValue.hour = fields.hour;
@@ -4138,6 +4532,43 @@ function $735220c2d4774dd3$export$7ed87b6bc2506470(time, duration) {
4138
4532
  function $735220c2d4774dd3$export$fe34d3a381cd7501(time, duration) {
4139
4533
  return $735220c2d4774dd3$export$7ed87b6bc2506470(time, $735220c2d4774dd3$export$3e2544e88a25bff8(duration));
4140
4534
  }
4535
+ function $735220c2d4774dd3$export$d52ced6badfb9a4c(value, field, amount, options) {
4536
+ let mutable = value.copy();
4537
+ switch(field){
4538
+ case 'era':
4539
+ {
4540
+ let eras = value.calendar.getEras();
4541
+ let eraIndex = eras.indexOf(value.era);
4542
+ if (eraIndex < 0) throw new Error('Invalid era: ' + value.era);
4543
+ eraIndex = $735220c2d4774dd3$var$cycleValue(eraIndex, amount, 0, eras.length - 1, options === null || options === void 0 ? void 0 : options.round);
4544
+ mutable.era = eras[eraIndex];
4545
+ // Constrain the year and other fields within the era, so the era doesn't change when we balance below.
4546
+ $735220c2d4774dd3$export$c4e2ecac49351ef2(mutable);
4547
+ break;
4548
+ }
4549
+ case 'year':
4550
+ var _mutable_calendar_isInverseEra, _mutable_calendar;
4551
+ if ((_mutable_calendar_isInverseEra = (_mutable_calendar = mutable.calendar).isInverseEra) === null || _mutable_calendar_isInverseEra === void 0 ? void 0 : _mutable_calendar_isInverseEra.call(_mutable_calendar, mutable)) amount = -amount;
4552
+ // The year field should not cycle within the era as that can cause weird behavior affecting other fields.
4553
+ // We need to also allow values < 1 so that decrementing goes to the previous era. If we get -Infinity back
4554
+ // we know we wrapped around after reaching 9999 (the maximum), so set the year back to 1.
4555
+ mutable.year = $735220c2d4774dd3$var$cycleValue(value.year, amount, -Infinity, 9999, options === null || options === void 0 ? void 0 : options.round);
4556
+ if (mutable.year === -Infinity) mutable.year = 1;
4557
+ if (mutable.calendar.balanceYearMonth) mutable.calendar.balanceYearMonth(mutable, value);
4558
+ break;
4559
+ case 'month':
4560
+ mutable.month = $735220c2d4774dd3$var$cycleValue(value.month, amount, 1, value.calendar.getMonthsInYear(value), options === null || options === void 0 ? void 0 : options.round);
4561
+ break;
4562
+ case 'day':
4563
+ mutable.day = $735220c2d4774dd3$var$cycleValue(value.day, amount, 1, value.calendar.getDaysInMonth(value), options === null || options === void 0 ? void 0 : options.round);
4564
+ break;
4565
+ default:
4566
+ throw new Error('Unsupported field ' + field);
4567
+ }
4568
+ if (value.calendar.balanceDate) value.calendar.balanceDate(mutable);
4569
+ $735220c2d4774dd3$export$c4e2ecac49351ef2(mutable);
4570
+ return mutable;
4571
+ }
4141
4572
  function $735220c2d4774dd3$export$dd02b3e0007dfe28(value, field, amount, options) {
4142
4573
  let mutable = value.copy();
4143
4574
  switch(field){
@@ -4184,9 +4615,33 @@ function $735220c2d4774dd3$var$cycleValue(value, amount, min, max, round = false
4184
4615
  return value;
4185
4616
  }
4186
4617
 
4618
+ const $fae977aafc393c5c$var$DATE_RE = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/;
4619
+ function $fae977aafc393c5c$export$6b862160d295c8e(value) {
4620
+ let m = value.match($fae977aafc393c5c$var$DATE_RE);
4621
+ if (!m) throw new Error('Invalid ISO 8601 date string: ' + value);
4622
+ let date = new ($35ea8db9cb2ccb90$export$99faa760c7908e4f)($fae977aafc393c5c$var$parseNumber(m[1], 0, 9999), $fae977aafc393c5c$var$parseNumber(m[2], 1, 12), 1);
4623
+ date.day = $fae977aafc393c5c$var$parseNumber(m[3], 1, date.calendar.getDaysInMonth(date));
4624
+ return date;
4625
+ }
4626
+ function $fae977aafc393c5c$var$parseNumber(value, min, max) {
4627
+ let val = Number(value);
4628
+ if (val < min || val > max) throw new RangeError(`Value out of range: ${min} <= ${val} <= ${max}`);
4629
+ return val;
4630
+ }
4187
4631
  function $fae977aafc393c5c$export$f59dee82248f5ad4(time) {
4188
4632
  return `${String(time.hour).padStart(2, '0')}:${String(time.minute).padStart(2, '0')}:${String(time.second).padStart(2, '0')}${time.millisecond ? String(time.millisecond / 1000).slice(1) : ''}`;
4189
4633
  }
4634
+ function $fae977aafc393c5c$export$60dfd74aa96791bd(date) {
4635
+ let gregorianDate = ($11d87f3f76e88657$export$b4a036af3fc0b032)(date, new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
4636
+ let year;
4637
+ if (gregorianDate.era === 'BC') year = gregorianDate.year === 1 ? '0000' : '-' + String(Math.abs(1 - gregorianDate.year)).padStart(6, '00');
4638
+ else year = String(gregorianDate.year).padStart(4, '0');
4639
+ return `${year}-${String(gregorianDate.month).padStart(2, '0')}-${String(gregorianDate.day).padStart(2, '0')}`;
4640
+ }
4641
+ function $fae977aafc393c5c$export$4223de14708adc63(date) {
4642
+ // @ts-ignore
4643
+ return `${$fae977aafc393c5c$export$60dfd74aa96791bd(date)}T${$fae977aafc393c5c$export$f59dee82248f5ad4(date)}`;
4644
+ }
4190
4645
 
4191
4646
  function _check_private_redeclaration(obj, privateCollection) {
4192
4647
  if (privateCollection.has(obj)) {
@@ -4199,6 +4654,89 @@ function _class_private_field_init(obj, privateMap, value) {
4199
4654
  privateMap.set(obj, value);
4200
4655
  }
4201
4656
 
4657
+ /*
4658
+ * Copyright 2020 Adobe. All rights reserved.
4659
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4660
+ * you may not use this file except in compliance with the License. You may obtain a copy
4661
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
4662
+ *
4663
+ * Unless required by applicable law or agreed to in writing, software distributed under
4664
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
4665
+ * OF ANY KIND, either express or implied. See the License for the specific language
4666
+ * governing permissions and limitations under the License.
4667
+ */
4668
+
4669
+
4670
+
4671
+
4672
+
4673
+ function $35ea8db9cb2ccb90$var$shiftArgs(args) {
4674
+ let calendar = typeof args[0] === 'object' ? args.shift() : new ($3b62074eb05584b2$export$80ee6245ec4f29ec)();
4675
+ let era;
4676
+ if (typeof args[0] === 'string') era = args.shift();
4677
+ else {
4678
+ let eras = calendar.getEras();
4679
+ era = eras[eras.length - 1];
4680
+ }
4681
+ let year = args.shift();
4682
+ let month = args.shift();
4683
+ let day = args.shift();
4684
+ return [
4685
+ calendar,
4686
+ era,
4687
+ year,
4688
+ month,
4689
+ day
4690
+ ];
4691
+ }
4692
+ var // This prevents TypeScript from allowing other types with the same fields to match.
4693
+ // i.e. a ZonedDateTime should not be be passable to a parameter that expects CalendarDate.
4694
+ // If that behavior is desired, use the AnyCalendarDate interface instead.
4695
+ // @ts-ignore
4696
+ $35ea8db9cb2ccb90$var$_type = /*#__PURE__*/ new WeakMap();
4697
+ class $35ea8db9cb2ccb90$export$99faa760c7908e4f {
4698
+ /** Returns a copy of this date. */ copy() {
4699
+ if (this.era) return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar, this.era, this.year, this.month, this.day);
4700
+ else return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar, this.year, this.month, this.day);
4701
+ }
4702
+ /** Returns a new `CalendarDate` with the given duration added to it. */ add(duration) {
4703
+ return ($735220c2d4774dd3$export$e16d8520af44a096)(this, duration);
4704
+ }
4705
+ /** Returns a new `CalendarDate` with the given duration subtracted from it. */ subtract(duration) {
4706
+ return ($735220c2d4774dd3$export$4e2d2ead65e5f7e3)(this, duration);
4707
+ }
4708
+ /** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields) {
4709
+ return ($735220c2d4774dd3$export$adaa4cf7ef1b65be)(this, fields);
4710
+ }
4711
+ /**
4712
+ * Returns a new `CalendarDate` with the given field adjusted by a specified amount.
4713
+ * When the resulting value reaches the limits of the field, it wraps around.
4714
+ */ cycle(field, amount, options) {
4715
+ return ($735220c2d4774dd3$export$d52ced6badfb9a4c)(this, field, amount, options);
4716
+ }
4717
+ /** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */ toDate(timeZone) {
4718
+ return ($11d87f3f76e88657$export$e67a095c620b86fe)(this, timeZone);
4719
+ }
4720
+ /** Converts the date to an ISO 8601 formatted string. */ toString() {
4721
+ return ($fae977aafc393c5c$export$60dfd74aa96791bd)(this);
4722
+ }
4723
+ /** 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. */ compare(b) {
4724
+ return ($14e0f24ef4ac5c92$export$68781ddf31c0090f)(this, b);
4725
+ }
4726
+ constructor(...args){
4727
+ (_class_private_field_init)(this, $35ea8db9cb2ccb90$var$_type, {
4728
+ writable: true,
4729
+ value: void 0
4730
+ });
4731
+ let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
4732
+ this.calendar = calendar;
4733
+ this.era = era;
4734
+ this.year = year;
4735
+ this.month = month;
4736
+ this.day = day;
4737
+ ($735220c2d4774dd3$export$c4e2ecac49351ef2)(this);
4738
+ }
4739
+ }
4202
4740
  var // This prevents TypeScript from allowing other types with the same fields to match.
4203
4741
  // @ts-ignore
4204
4742
  $35ea8db9cb2ccb90$var$_type1 = /*#__PURE__*/ new WeakMap();
@@ -4239,6 +4777,66 @@ class $35ea8db9cb2ccb90$export$680ea196effce5f {
4239
4777
  ($735220c2d4774dd3$export$7555de1e070510cb)(this);
4240
4778
  }
4241
4779
  }
4780
+ var // This prevents TypeScript from allowing other types with the same fields to match.
4781
+ // @ts-ignore
4782
+ $35ea8db9cb2ccb90$var$_type2 = /*#__PURE__*/ new WeakMap();
4783
+ class $35ea8db9cb2ccb90$export$ca871e8dbb80966f {
4784
+ /** Returns a copy of this date. */ copy() {
4785
+ if (this.era) return new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
4786
+ else return new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
4787
+ }
4788
+ /** Returns a new `CalendarDateTime` with the given duration added to it. */ add(duration) {
4789
+ return ($735220c2d4774dd3$export$e16d8520af44a096)(this, duration);
4790
+ }
4791
+ /** Returns a new `CalendarDateTime` with the given duration subtracted from it. */ subtract(duration) {
4792
+ return ($735220c2d4774dd3$export$4e2d2ead65e5f7e3)(this, duration);
4793
+ }
4794
+ /** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields) {
4795
+ return ($735220c2d4774dd3$export$adaa4cf7ef1b65be)(($735220c2d4774dd3$export$e5d5e1c1822b6e56)(this, fields), fields);
4796
+ }
4797
+ /**
4798
+ * Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
4799
+ * When the resulting value reaches the limits of the field, it wraps around.
4800
+ */ cycle(field, amount, options) {
4801
+ switch(field){
4802
+ case 'era':
4803
+ case 'year':
4804
+ case 'month':
4805
+ case 'day':
4806
+ return ($735220c2d4774dd3$export$d52ced6badfb9a4c)(this, field, amount, options);
4807
+ default:
4808
+ return ($735220c2d4774dd3$export$dd02b3e0007dfe28)(this, field, amount, options);
4809
+ }
4810
+ }
4811
+ /** Converts the date to a native JavaScript Date object in the given time zone. */ toDate(timeZone, disambiguation) {
4812
+ return ($11d87f3f76e88657$export$e67a095c620b86fe)(this, timeZone, disambiguation);
4813
+ }
4814
+ /** Converts the date to an ISO 8601 formatted string. */ toString() {
4815
+ return ($fae977aafc393c5c$export$4223de14708adc63)(this);
4816
+ }
4817
+ /** 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. */ compare(b) {
4818
+ let res = ($14e0f24ef4ac5c92$export$68781ddf31c0090f)(this, b);
4819
+ if (res === 0) return ($14e0f24ef4ac5c92$export$c19a80a9721b80f6)(this, ($11d87f3f76e88657$export$b21e0b124e224484)(b));
4820
+ return res;
4821
+ }
4822
+ constructor(...args){
4823
+ (_class_private_field_init)(this, $35ea8db9cb2ccb90$var$_type2, {
4824
+ writable: true,
4825
+ value: void 0
4826
+ });
4827
+ let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
4828
+ this.calendar = calendar;
4829
+ this.era = era;
4830
+ this.year = year;
4831
+ this.month = month;
4832
+ this.day = day;
4833
+ this.hour = args.shift() || 0;
4834
+ this.minute = args.shift() || 0;
4835
+ this.second = args.shift() || 0;
4836
+ this.millisecond = args.shift() || 0;
4837
+ ($735220c2d4774dd3$export$c4e2ecac49351ef2)(this);
4838
+ }
4839
+ }
4242
4840
 
4243
4841
  var Switch = function (_a) {
4244
4842
  var id = _a.id, props = __rest(_a, ["id"]);
@@ -6549,7 +7147,35 @@ var DateFilter = function (_a) {
6549
7147
  }
6550
7148
  return HolidayType.SingleDay;
6551
7149
  };
6552
- return (jsx(DateSelector, { initialType: getInitialType(), initialDate: undefined, initialDateRange: undefined, onChange: handleDateSelectorChange, className: "w-full" }));
7150
+ var getInitialDate = function () {
7151
+ if ((value === null || value === void 0 ? void 0 : value.type) === "singleDay" && value.date) {
7152
+ try {
7153
+ return $fae977aafc393c5c$export$6b862160d295c8e(value.date);
7154
+ }
7155
+ catch (_a) {
7156
+ return undefined;
7157
+ }
7158
+ }
7159
+ return undefined;
7160
+ };
7161
+ var getInitialDateRange = function () {
7162
+ var _a, _b;
7163
+ if ((value === null || value === void 0 ? void 0 : value.type) === "dateRange" &&
7164
+ ((_a = value.dateRange) === null || _a === void 0 ? void 0 : _a.start) &&
7165
+ ((_b = value.dateRange) === null || _b === void 0 ? void 0 : _b.end)) {
7166
+ try {
7167
+ return {
7168
+ start: $fae977aafc393c5c$export$6b862160d295c8e(value.dateRange.start),
7169
+ end: $fae977aafc393c5c$export$6b862160d295c8e(value.dateRange.end),
7170
+ };
7171
+ }
7172
+ catch (_c) {
7173
+ return undefined;
7174
+ }
7175
+ }
7176
+ return undefined;
7177
+ };
7178
+ return (jsx(DateSelector, { initialType: getInitialType(), initialDate: getInitialDate(), initialDateRange: getInitialDateRange(), onChange: handleDateSelectorChange, className: "w-full" }));
6553
7179
  };
6554
7180
  // =========================================================================
6555
7181
  // TEXT FILTER