@blueking/date-picker 0.0.20 → 0.0.22

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.
@@ -1,3102 +0,0 @@
1
- import dayjs from "dayjs";
2
- import { Dayjs, default as default2 } from "dayjs";
3
- import customParseFormat from "dayjs/plugin/customParseFormat";
4
- import localizedFormat from "dayjs/plugin/localizedFormat";
5
- import tz from "dayjs/plugin/timezone";
6
- import utc from "dayjs/plugin/utc";
7
- import { provide, inject, defineComponent, openBlock, createElementBlock, createVNode, unref, withCtx, Fragment, renderList, createBlock, createTextVNode, toDisplayString, createCommentVNode, shallowRef, watch, createElementVNode, normalizeClass, withModifiers, ref, withDirectives, withKeys, computed, vShow, KeepAlive, resolveDynamicComponent, onBeforeUnmount, normalizeStyle } from "vue";
8
- import { Tab, Button, Checkbox, Popover, Select, Input, Exception, provideGlobalConfig } from "bkui-vue";
9
- import { clickoutside } from "bkui-vue/lib/directives";
10
- import { AngleDoubleLeft, AngleLeft, AngleRight, AngleDoubleRight, Close } from "bkui-vue/lib/icon";
11
- import "bkui-vue/lib/styles/reset.css";
12
- import en from "dayjs/locale/en";
13
- import cn from "dayjs/locale/zh-cn";
14
- const getCookieByName = (name) => {
15
- const match = document.cookie.match(new RegExp(`(^| )${name}=([^;]*)(;|$)`));
16
- if (match) {
17
- return match[2];
18
- }
19
- return "";
20
- };
21
- const langData = {
22
- "option-上周": "Last week",
23
- "option-上月": "Last month",
24
- "option-今天": "Today",
25
- "option-分钟": "minutes",
26
- "option-前天": "now-2d/d",
27
- "option-周": "weeks",
28
- "option-天": "days",
29
- "option-小时": "hours",
30
- "option-年": "years",
31
- "option-昨天": "Yesterday",
32
- "option-月": "Months",
33
- "option-本周": "This week",
34
- "option-本月": "This month",
35
- "option-秒": "Seconds",
36
- 上周: "now-1w/w",
37
- 上月: "now-1M/M",
38
- 今天: "now/d",
39
- 分钟: "m",
40
- 前: "Previous",
41
- "前 N 周": "Previous N weeks",
42
- "前 N 天": "Previous N days",
43
- 前天: "The day before yesterday",
44
- 周: "w",
45
- 天: "d",
46
- 将来: "Future",
47
- 小时: "h",
48
- 常用时间: "Common",
49
- 年: "y",
50
- 开始时间: "Start Time",
51
- 支持多种时间格式自动转换: "Support multiple time formats for automatic conversion",
52
- 整: "whole",
53
- 无匹配数据: "No matching data",
54
- 日期选择: "Time Range",
55
- 时区设置: "Timezone setting",
56
- 时间格式支持: "Time format support",
57
- 昨天: "now-1d/d",
58
- 暂无最近使用记录: "No recent records",
59
- 最近: "Last",
60
- 最近使用: "Recently",
61
- 月: "M",
62
- 未来: "Future",
63
- 本周: "now/w",
64
- 本月: "now/M",
65
- 查看支持格式: "View supported formats",
66
- 格式: "Format",
67
- 此刻: "now",
68
- 浏览器时间: "Browser time",
69
- 确定: "Confirm",
70
- 示例: "Example",
71
- 秒: "s",
72
- 结束时间: "End Time",
73
- 自然日期: "Natural",
74
- 至今: "so far",
75
- 请输入: "Please enter",
76
- "请输入搜索(国家,城市,简称)": "Please enter search (country, city, abbreviation)",
77
- 近: "Last ",
78
- "(至今)": "(so far)"
79
- };
80
- const langValueMap = Object.keys(langData).reduce((pre, cur) => {
81
- pre[langData[cur]] = cur;
82
- return pre;
83
- }, {});
84
- const lang = getCookieByName("blueking_language") || "zh-cn";
85
- const t = (key, isOption = true) => {
86
- if (!langData[key]) {
87
- console.info(`[i18n] ${key}: ${langData[key]}`);
88
- }
89
- if (lang !== "en")
90
- return key;
91
- if (isOption) {
92
- const val = langData[`option-${key}`];
93
- return (val == null ? void 0 : val.includes("now")) ? langData[key] : val || langData[key];
94
- }
95
- return langData[key];
96
- };
97
- var DateMode = /* @__PURE__ */ ((DateMode2) => {
98
- DateMode2["Date"] = "date";
99
- DateMode2["FUTURE"] = "now+";
100
- DateMode2["NATURAL"] = "natural";
101
- DateMode2["RECENT"] = "now-";
102
- return DateMode2;
103
- })(DateMode || {});
104
- const DateUnitList = [
105
- {
106
- id: "s",
107
- name: t("秒")
108
- },
109
- {
110
- id: "m",
111
- name: t("分钟")
112
- },
113
- {
114
- id: "h",
115
- name: t("小时")
116
- },
117
- {
118
- id: "d",
119
- name: t("天")
120
- },
121
- {
122
- id: "w",
123
- name: t("周")
124
- },
125
- {
126
- id: "M",
127
- name: t("月")
128
- },
129
- {
130
- id: "y",
131
- name: t("年")
132
- }
133
- ];
134
- const dateUnit = DateUnitList.map((item) => item.id).join("");
135
- var NaturalOptionType = /* @__PURE__ */ ((NaturalOptionType2) => {
136
- NaturalOptionType2["custom"] = "custom";
137
- NaturalOptionType2["default"] = "default";
138
- NaturalOptionType2["edit"] = "edit";
139
- return NaturalOptionType2;
140
- })(NaturalOptionType || {});
141
- const CommonNaturalOptions = [
142
- {
143
- id: "now/d",
144
- name: t("今天", true),
145
- type: "default"
146
- /* default */
147
- },
148
- {
149
- id: "now-1d/d",
150
- name: t("昨天", true),
151
- type: "default"
152
- /* default */
153
- },
154
- {
155
- id: "now-2d/d",
156
- name: t("前天", true),
157
- type: "default"
158
- /* default */
159
- },
160
- {
161
- id: "now/w",
162
- name: t("本周", true),
163
- type: "default"
164
- /* default */
165
- },
166
- {
167
- id: "now-1w/w",
168
- name: t("上周", true),
169
- type: "default"
170
- /* default */
171
- },
172
- {
173
- id: "now/M",
174
- name: t("本月", true),
175
- type: "default"
176
- /* default */
177
- },
178
- {
179
- id: "now-1M/M",
180
- name: t("上月", true),
181
- type: "default"
182
- /* default */
183
- },
184
- {
185
- id: "now-nd/d",
186
- name: t("前 N 天"),
187
- prefix: t("前"),
188
- suffix: t("天"),
189
- type: "edit",
190
- unit: "d"
191
- },
192
- {
193
- id: "now-nw/w",
194
- name: t("前 N 周"),
195
- prefix: t("前"),
196
- suffix: t("周"),
197
- type: "edit",
198
- unit: "w"
199
- }
200
- ];
201
- var NaturalUnit = /* @__PURE__ */ ((NaturalUnit2) => {
202
- NaturalUnit2["ALL"] = "all";
203
- NaturalUnit2["NOW"] = "now";
204
- return NaturalUnit2;
205
- })(NaturalUnit || {});
206
- const naturalUnitOptions = [
207
- {
208
- id: "all",
209
- name: t("整")
210
- },
211
- {
212
- id: "now",
213
- name: t("至今")
214
- }
215
- ];
216
- const panels = [
217
- {
218
- id: "common",
219
- name: t("常用时间")
220
- },
221
- {
222
- id: "recent",
223
- name: t("最近使用")
224
- }
225
- ];
226
- const datePickTabList = [
227
- {
228
- id: DateMode.RECENT,
229
- name: t("最近")
230
- },
231
- {
232
- id: DateMode.FUTURE,
233
- name: t("未来")
234
- },
235
- {
236
- id: DateMode.NATURAL,
237
- name: t("自然日期")
238
- },
239
- {
240
- id: DateMode.Date,
241
- name: t("日期选择")
242
- }
243
- ];
244
- const storeKey = "__bk_time_picker_store__";
245
- const getStoreKey = (key = 1) => `${storeKey}_${key}`;
246
- const dateFormatList = [
247
- "YYYY-MM-DD HH:mm:ss",
248
- "YYYY-MM-DD HH:mm:ss,SSS",
249
- "YYYY-MM-DD HH:mm:ss.SSS",
250
- "YYYY-MM-DD+HH:mm:ss",
251
- "MM/DD/YYYY HH:mm:ss",
252
- "YYYYMMDDHHmmss",
253
- "YYYYMMDD HHmmss",
254
- "YYYYMMDD HHmmss.SSS",
255
- "DD/MMM/YYYY:HH:mm:ss",
256
- "DD/MMM/YYYY:HH:mm:ssZ",
257
- "DD/MMM/YYYY:HH:mm:ss Z",
258
- "DD/MMM/YYYY:HH:mm:ssZZ",
259
- "DD/MMM/YYYY:HH:mm:ss ZZ",
260
- "YYYY-MM-DDTHH:mm:ss",
261
- "YYYY-MM-DDTHH:mm:ss.SSS",
262
- "YYYYMMDDTHHmmssZ",
263
- "YYYYMMDDTHHmmss.SSSSSSZ",
264
- "YYYY-MM-DDTHH:mm:ss.SSSZ",
265
- "YYYY-MM-DDTHH:mm:ssZ",
266
- "YYYY-MM-DDTHH:mm:ss.SSSSSSZ"
267
- ];
268
- const recentDateRegexp = new RegExp(`now[+-](\\d+)([${dateUnit}]{1})`);
269
- const naturalDateRegexp = new RegExp(`now[+-]?(\\d*)([${dateUnit}]?)\\/([${dateUnit}]?)`);
270
- const DATE_PICKER_PROVIDER_KEY = Symbol("DATE_PICKER_PROVIDER_KEY");
271
- const useDatePickerProvider = (data) => {
272
- provide(DATE_PICKER_PROVIDER_KEY, data);
273
- };
274
- const useDatePickertInject = () => inject(DATE_PICKER_PROVIDER_KEY);
275
- const getDateValueToString = (value, format) => {
276
- if (!isValidDateValue(value)) {
277
- return (value == null ? void 0 : value[0]) || "";
278
- }
279
- const [start, end] = value;
280
- let startDate = dayjs(start, format);
281
- startDate = startDate.isValid() ? startDate : dayjs(start);
282
- let endDate = dayjs(end, format);
283
- endDate = endDate.isValid() ? endDate : dayjs(end);
284
- if (startDate.isValid() || endDate.isValid()) {
285
- let replaceFormat = format;
286
- if (end === "now") {
287
- return `${startDate.format(format)} ~ ${t("此刻")}`;
288
- }
289
- const startStep = ["Y", "M", "D", "H", "m", "s"].reduce(
290
- (prev, cur, i, arr) => {
291
- if (i < 1)
292
- return prev;
293
- const v = format.indexOf(cur) > format.indexOf(arr[i - 1]);
294
- if (v) {
295
- prev.push(cur);
296
- } else {
297
- prev = [];
298
- }
299
- return prev;
300
- },
301
- ["Y"]
302
- );
303
- if (startStep.length > 1 && startStep.includes("D") && startDate.isSame(endDate, "year")) {
304
- const [, yearFormat] = format.match(/(Y+)/);
305
- let commonStr = format.replace(yearFormat, startDate.format(yearFormat));
306
- replaceFormat = replaceFormat.replace(/Y+[-/\\\s]/, "");
307
- if (startDate.isSame(endDate, "month")) {
308
- const [, monthFormat] = format.match(/(M+)/);
309
- commonStr = commonStr.replace(monthFormat, startDate.format(monthFormat));
310
- replaceFormat = replaceFormat.replace(/M+[-/\\\s]/, "");
311
- if (startDate.isSame(endDate, "day")) {
312
- const [, dayFormat] = format.match(/(d+|D+)/);
313
- commonStr = commonStr.replace(dayFormat, startDate.format(dayFormat));
314
- replaceFormat = replaceFormat.replace(/(d|D)+[-/\\\s]/, "");
315
- if (startDate.isSame(endDate, "hour")) {
316
- const [, hourFormat] = format.match(/(H+|h+)/);
317
- commonStr = commonStr.replace(hourFormat, startDate.format(hourFormat));
318
- replaceFormat = replaceFormat.replace(/[Hh]+[-/\\\s:]/, "");
319
- if (startDate.isSame(endDate, "minute")) {
320
- const [, minuteFormat] = format.match(/(m+)/);
321
- commonStr = commonStr.replace(minuteFormat, startDate.format(minuteFormat));
322
- replaceFormat = replaceFormat.replace(/m+[-/\\\s:]/, "");
323
- }
324
- }
325
- }
326
- }
327
- return commonStr.replace(
328
- replaceFormat,
329
- `(${startDate.format(replaceFormat)} ~ ${endDate.format(replaceFormat)})`
330
- );
331
- }
332
- return `${startDate.format(format)} ~ ${endDate.format(format)}`;
333
- }
334
- if (!start.includes("/") && end === "now" || start === "now") {
335
- const [, num2, unit2] = (start === "now" ? end : start).match(recentDateRegexp) || [];
336
- if (!num2 || !unit2) {
337
- return "";
338
- }
339
- return `${start === "now" ? t("未来") : t("近")}${num2}${lang === "en" ? " " : ""}${t(
340
- langValueMap[unit2],
341
- true
342
- )}`;
343
- }
344
- const subfix = end !== "now" ? "" : t("(至今)");
345
- if (langValueMap[start]) {
346
- return t(langValueMap[start].replace("option-", ""), true) + subfix;
347
- }
348
- const [, num, unit] = start.match(naturalDateRegexp) || [];
349
- if (!num || !unit) {
350
- return "";
351
- }
352
- return `${`${t("前")} ${num} ${t(langValueMap[unit], true)}`}${subfix}`;
353
- };
354
- const getDateValueMode = (value) => {
355
- if (!isValidDateValue(value)) {
356
- return DateMode.RECENT;
357
- }
358
- const [start, end] = value;
359
- const startDate = dayjs(start);
360
- const endDate = dayjs(end);
361
- if (startDate.isValid() || endDate.isValid()) {
362
- return DateMode.Date;
363
- }
364
- if (!start.includes("/") && end === "now")
365
- return DateMode.RECENT;
366
- if (start === "now") {
367
- return DateMode.FUTURE;
368
- }
369
- if ((start === end || end === "now") && naturalDateRegexp.test(start)) {
370
- return DateMode.NATURAL;
371
- }
372
- if (naturalDateRegexp.test(start) && naturalDateRegexp.test(end)) {
373
- return DateMode.NATURAL;
374
- }
375
- return DateMode.Date;
376
- };
377
- const transformDateValueToDayjs = (value) => {
378
- if (!isValidDateValue(value)) {
379
- return [];
380
- }
381
- const [start, end] = value;
382
- const startDate = dayjs(start);
383
- const endDate = dayjs(end);
384
- if (startDate.isValid() || endDate.isValid()) {
385
- return [startDate, end === "now" ? dayjs() : endDate];
386
- }
387
- if (!start.includes("/") && end === "now") {
388
- const [, num2, unit2] = start.match(recentDateRegexp) || [];
389
- if (!num2 || !unit2) {
390
- return [];
391
- }
392
- return [dayjs().add(-num2, unit2), dayjs()];
393
- }
394
- if (start === "now") {
395
- const [, num2, unit2] = end.match(recentDateRegexp) || [];
396
- if (!num2 || !unit2) {
397
- return [];
398
- }
399
- return [dayjs(), dayjs().add(+num2, unit2)];
400
- }
401
- const [, num, unit, diffUnit] = start.match(naturalDateRegexp) || [];
402
- if ((!num || !unit) && !diffUnit) {
403
- return [];
404
- }
405
- const dateUnit2 = unit || diffUnit;
406
- const startDayjs = dayjs().startOf(dateUnit2).subtract(+num, unit || diffUnit);
407
- if (end === "now")
408
- return [startDayjs, dayjs()];
409
- if (start === end)
410
- return [startDayjs, startDayjs.endOf(dateUnit2)];
411
- const [, endNum] = end.match(naturalDateRegexp) || [];
412
- const endDayjs = dayjs().subtract(+endNum, dateUnit2).endOf(dateUnit2);
413
- console.info(startDayjs.format(), endDayjs.format());
414
- return [startDayjs, endDayjs];
415
- };
416
- const isValidDateValue = (val) => {
417
- if (!Array.isArray(val) || val.length < 2)
418
- return false;
419
- const [start, end] = val;
420
- const startDate = dayjs(start);
421
- const endDate = dayjs(end);
422
- if (startDate.isValid() || endDate.isValid()) {
423
- if (end === "now")
424
- return startDate.isValid();
425
- return startDate.isValid() && endDate.isValid();
426
- }
427
- if (!start.includes("/") && end === "now" || start === "now") {
428
- const date = start === "now" ? end : start;
429
- return recentDateRegexp.test(date);
430
- }
431
- if (end === "now" || start === end)
432
- return naturalDateRegexp.test(start);
433
- return naturalDateRegexp.test(start) && naturalDateRegexp.test(end);
434
- };
435
- const getStoreDateList = (storeKey2) => {
436
- const storeListStr = localStorage.getItem(storeKey2);
437
- let list = [];
438
- if (storeListStr) {
439
- try {
440
- list = JSON.parse(storeListStr);
441
- } catch {
442
- list = [];
443
- }
444
- }
445
- if (!Array.isArray(list)) {
446
- list = [];
447
- }
448
- return list;
449
- };
450
- const setStoreDateList = (val, storeKey2) => {
451
- if (!isValidDateValue(val))
452
- return;
453
- let list = [];
454
- const storeListStr = localStorage.getItem(storeKey2);
455
- if (storeListStr) {
456
- try {
457
- list = JSON.parse(storeListStr);
458
- } catch {
459
- list = [];
460
- }
461
- }
462
- if (!Array.isArray(list)) {
463
- list = [];
464
- }
465
- if (list.some((item) => item[0] === val[0] && item[1] === val[1]))
466
- return;
467
- list.unshift(val);
468
- localStorage.setItem(storeKey2, JSON.stringify(list.slice(0, 10)));
469
- };
470
- const _hoisted_1$7 = { class: "common-panel-tab" };
471
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
472
- __name: "common-tab",
473
- props: {
474
- modelValue: {
475
- required: true,
476
- type: String
477
- },
478
- /** panels */
479
- panels: {
480
- required: true,
481
- type: Array
482
- }
483
- },
484
- setup(__props) {
485
- return (_ctx, _cache) => {
486
- return openBlock(), createElementBlock("div", _hoisted_1$7, [
487
- createVNode(unref(Tab), {
488
- active: __props.modelValue,
489
- type: "unborder-card",
490
- "onUpdate:active": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
491
- }, {
492
- default: withCtx(() => [
493
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.panels, (item) => {
494
- return openBlock(), createBlock(unref(Tab).TabPanel, {
495
- key: item.id,
496
- name: item.id,
497
- label: item.name
498
- }, null, 8, ["name", "label"]);
499
- }), 128))
500
- ]),
501
- _: 1
502
- }, 8, ["active"])
503
- ]);
504
- };
505
- }
506
- });
507
- const commonTab_vue_vue_type_style_index_0_lang = "";
508
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
509
- __name: "common-submit",
510
- props: {
511
- disabled: { type: Boolean }
512
- },
513
- emits: ["submit"],
514
- setup(__props) {
515
- return (_ctx, _cache) => {
516
- return openBlock(), createElementBlock(Fragment, null, [
517
- createVNode(unref(Button), {
518
- class: "common-submit",
519
- outline: true,
520
- theme: "primary",
521
- disabled: _ctx.disabled,
522
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("submit"))
523
- }, {
524
- default: withCtx(() => [
525
- createTextVNode(toDisplayString(unref(t)("确定")), 1)
526
- ]),
527
- _: 1
528
- }, 8, ["disabled"]),
529
- createCommentVNode("", true)
530
- ], 64);
531
- };
532
- }
533
- });
534
- const commonSubmit_vue_vue_type_style_index_0_lang = "";
535
- const _hoisted_1$6 = { class: "date-panel" };
536
- const _hoisted_2$5 = { class: "date-panel-title" };
537
- const _hoisted_3$4 = { class: "date-panel-main" };
538
- const _hoisted_4$3 = { class: "date-header" };
539
- const _hoisted_5$3 = { class: "date-header-left" };
540
- const _hoisted_6$3 = { class: "date-header-center" };
541
- const _hoisted_7$2 = /* @__PURE__ */ createElementVNode("span", { class: "date-split" }, null, -1);
542
- const _hoisted_8$2 = { class: "date-header-right" };
543
- const _hoisted_9$2 = { class: "date-content" };
544
- const _hoisted_10$2 = { class: "date-grid" };
545
- const _hoisted_11$1 = ["onClick"];
546
- const panelRowCount = 6;
547
- const weekItemCount = 7;
548
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
549
- __name: "date-panel",
550
- props: {
551
- format: { default: "YYYY-MM-DD HH:mm:ss" },
552
- isNow: { type: Boolean },
553
- minDate: {},
554
- modelValue: {}
555
- },
556
- emits: ["update:isNow", "update:modelValue"],
557
- setup(__props, { emit: __emit }) {
558
- const props = __props;
559
- const emits = __emit;
560
- const weekList = lang === "en" ? ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] : ["日", "一", "二", "三", "四", "五", "六"];
561
- const panleDateList = shallowRef([]);
562
- const today = dayjs();
563
- const curPanelDate = shallowRef(props.modelValue || today);
564
- watch(curPanelDate, () => {
565
- const firstDay = curPanelDate.value.startOf("month").startOf("week");
566
- const list = [];
567
- for (let i = 0; i < panelRowCount * weekItemCount; i++) {
568
- list.push(firstDay.add(i, "day"));
569
- }
570
- panleDateList.value = list;
571
- }, {
572
- immediate: true
573
- });
574
- const nextMonth = (number) => {
575
- curPanelDate.value = curPanelDate.value.add(number, "month");
576
- };
577
- const nextYear = (number) => {
578
- curPanelDate.value = curPanelDate.value.add(number, "year");
579
- };
580
- const handleDateChange = (date) => {
581
- if (props.minDate && date.isBefore(props.minDate, "day")) {
582
- return;
583
- }
584
- emits("update:modelValue", date);
585
- };
586
- return (_ctx, _cache) => {
587
- return openBlock(), createElementBlock("div", _hoisted_1$6, [
588
- createElementVNode("div", _hoisted_2$5, [
589
- createTextVNode(toDisplayString(unref(t)("结束时间")) + " ", 1),
590
- createVNode(unref(Checkbox), {
591
- size: "small",
592
- class: "title-check",
593
- "model-value": props.isNow,
594
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:isNow", !$event))
595
- }, {
596
- default: withCtx(() => [
597
- createTextVNode(" now ")
598
- ]),
599
- _: 1
600
- }, 8, ["model-value"])
601
- ]),
602
- createElementVNode("div", _hoisted_3$4, [
603
- createElementVNode("div", _hoisted_4$3, [
604
- createElementVNode("div", _hoisted_5$3, [
605
- createVNode(unref(AngleDoubleLeft), {
606
- class: "hand-icon",
607
- onClick: _cache[1] || (_cache[1] = ($event) => nextYear(-1))
608
- }),
609
- createVNode(unref(AngleLeft), {
610
- class: "hand-icon",
611
- onClick: _cache[2] || (_cache[2] = ($event) => nextMonth(-1))
612
- })
613
- ]),
614
- createElementVNode("div", _hoisted_6$3, [
615
- createTextVNode(toDisplayString(curPanelDate.value.year()), 1),
616
- _hoisted_7$2,
617
- createTextVNode(toDisplayString(curPanelDate.value.month() + 1), 1)
618
- ]),
619
- createElementVNode("div", _hoisted_8$2, [
620
- createVNode(unref(AngleRight), {
621
- class: "hand-icon",
622
- onClick: _cache[3] || (_cache[3] = ($event) => nextMonth(1))
623
- }),
624
- createVNode(unref(AngleDoubleRight), {
625
- class: "hand-icon",
626
- onClick: _cache[4] || (_cache[4] = ($event) => nextYear(1))
627
- })
628
- ])
629
- ]),
630
- createElementVNode("div", _hoisted_9$2, [
631
- createElementVNode("ul", _hoisted_10$2, [
632
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(weekList), (day, index) => {
633
- return openBlock(), createElementBlock("li", {
634
- class: "date-grid-item not-click",
635
- key: index
636
- }, toDisplayString(day), 1);
637
- }), 128))
638
- ]),
639
- (openBlock(), createElementBlock(Fragment, null, renderList(panelRowCount, (row) => {
640
- return createElementVNode("ul", {
641
- class: "date-grid",
642
- key: row
643
- }, [
644
- (openBlock(true), createElementBlock(Fragment, null, renderList(panleDateList.value.slice((row - 1) * weekItemCount, (row - 1) * weekItemCount + weekItemCount), (date) => {
645
- return openBlock(), createElementBlock("li", {
646
- class: normalizeClass(["date-grid-item", {
647
- "is-last-month": date.isBefore(curPanelDate.value, "month"),
648
- "is-next-month": date.isAfter(curPanelDate.value, "month"),
649
- "is-today": date.isSame(unref(today), "day"),
650
- "is-disabled": _ctx.minDate && date.isBefore(_ctx.minDate, "day"),
651
- "is-selected": props.modelValue && date.isSame(props.modelValue, "day")
652
- }]),
653
- key: date.unix(),
654
- onClick: withModifiers(($event) => handleDateChange(date), ["prevent"])
655
- }, toDisplayString(date.date()), 11, _hoisted_11$1);
656
- }), 128))
657
- ]);
658
- }), 64))
659
- ])
660
- ])
661
- ]);
662
- };
663
- }
664
- });
665
- const datePanel_vue_vue_type_style_index_0_lang = "";
666
- const _hoisted_1$5 = { class: "date-wrapper" };
667
- const _hoisted_2$4 = { class: "date-input" };
668
- const _hoisted_3$3 = { class: "date-picker" };
669
- const _hoisted_4$2 = /* @__PURE__ */ createElementVNode("span", { class: "date-picker-icon" }, [
670
- /* @__PURE__ */ createElementVNode("svg", {
671
- class: "date-content-icon",
672
- viewBox: "0 0 1024 1024",
673
- version: "1.1",
674
- xmlns: "http://www.w3.org/2000/svg",
675
- "xmlns:xlink": "http://www.w3.org/1999/xlink",
676
- width: "14",
677
- height: "14"
678
- }, [
679
- /* @__PURE__ */ createElementVNode("path", {
680
- xmlns: "http://www.w3.org/2000/svg",
681
- d: "M558.933 465.067h-93.866v93.866h93.866v-93.866z m0 162.133h-93.866v93.867h93.866V627.2z m371.2-533.333h-93.866V21.333c0-12.8-8.534-21.333-21.334-21.333S793.6 8.533 793.6 21.333V89.6H234.667V21.333c0-12.8-12.8-21.333-25.6-21.333s-21.334 8.533-21.334 21.333V89.6H93.867C42.667 93.867 0 136.533 0 187.733V934.4c0 46.933 42.667 89.6 93.867 89.6h836.266c51.2 0 93.867-42.667 93.867-93.867v-742.4c0-51.2-42.667-93.866-93.867-93.866z m46.934 836.266c0 25.6-21.334 46.934-46.934 46.934H93.867c-25.6 0-46.934-21.334-46.934-46.934V371.2h930.134v558.933z m0-605.866H46.933V187.733c0-25.6 21.334-46.933 46.934-46.933h93.866v68.267c0 12.8 8.534 21.333 21.334 21.333s21.333-8.533 21.333-21.333V140.8h558.933v68.267c0 12.8 8.534 21.333 21.334 21.333S832 221.867 832 209.067V140.8h93.867c25.6 0 46.933 21.333 46.933 46.933v136.534h4.267zM789.333 627.2h-93.866v93.867h93.866V627.2z m0-162.133h-93.866v93.866h93.866v-93.866z m-230.4 324.266h-93.866V883.2h93.866v-93.867z m-234.666 0h-89.6V883.2h93.866v-93.867h-4.266z m0-324.266h-89.6v93.866h93.866v-93.866h-4.266z m0 162.133h-89.6v93.867h93.866V627.2h-4.266z",
682
- fill: "#C4C6CC"
683
- })
684
- ])
685
- ], -1);
686
- const _hoisted_5$2 = ["placeholder", "value"];
687
- const _hoisted_6$2 = /* @__PURE__ */ createElementVNode("span", { class: "date-picker-split" }, "~", -1);
688
- const _hoisted_7$1 = ["placeholder", "value"];
689
- const _hoisted_8$1 = { class: "show-format" };
690
- const _hoisted_9$1 = { class: "date-format-wrapper" };
691
- const _hoisted_10$1 = { class: "content-title" };
692
- const _hoisted_11 = { class: "content-table" };
693
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
694
- __name: "date-picker",
695
- props: {
696
- value: {}
697
- },
698
- emits: ["change"],
699
- setup(__props, { emit: __emit }) {
700
- dayjs.extend(customParseFormat);
701
- const props = __props;
702
- const emits = __emit;
703
- const startInput = ref(null);
704
- const endInput = ref(null);
705
- const showStartPanel = ref(false);
706
- const showEndPanel = ref(false);
707
- const startDate = shallowRef();
708
- const endDate = shallowRef();
709
- const isNow = ref(false);
710
- const { format } = useDatePickertInject();
711
- const today = dayjs();
712
- watch(() => props.value, (val) => {
713
- if (!Array.isArray(val) || val.length < 2)
714
- return;
715
- const [start, end] = val;
716
- const dateStart = dayjs(start);
717
- const dateEnd = dayjs(end);
718
- if (!dateStart.isValid() && !dateEnd.isValid())
719
- return;
720
- if (dateStart.isValid()) {
721
- const realDate = dayjs(start, format.value);
722
- startDate.value = realDate.isValid() ? realDate : dateStart;
723
- }
724
- if (end === "now") {
725
- isNow.value = true;
726
- endDate.value = dayjs();
727
- return;
728
- }
729
- if (dateEnd.isValid()) {
730
- const realDate = dayjs(end, format.value);
731
- endDate.value = realDate.isValid() ? realDate : dateEnd;
732
- }
733
- }, {
734
- immediate: true
735
- });
736
- const handleInputEnter = async (e, type) => {
737
- var _a, _b, _c;
738
- const val = e.target.value.toString().trim();
739
- if (!val || type === "end" && val === "now" && isNow.value)
740
- return;
741
- if (val === "now" && type === "end") {
742
- if (!isNow.value) {
743
- isNow.value = true;
744
- handleEndTimeChange(dayjs(), false);
745
- }
746
- return;
747
- }
748
- const editDate = type === "start" ? startDate.value : endDate.value;
749
- const date = dayjs(val);
750
- if (date.isValid()) {
751
- if (!(editDate == null ? void 0 : editDate.isSame(date))) {
752
- if (type === "start") {
753
- handleStartTimeChange(date);
754
- } else {
755
- isNow.value = val === "now";
756
- handleEndTimeChange(date, !!((_a = startDate.value) == null ? void 0 : _a.isSame(date)));
757
- }
758
- }
759
- }
760
- e.target.value = type === "start" ? ((_b = startDate.value) == null ? void 0 : _b.format(format.value)) || "" : ((_c = endDate.value) == null ? void 0 : _c.format(format.value)) || "";
761
- };
762
- const handleFocusStart = () => {
763
- showStartPanel.value = true;
764
- };
765
- const handleFocusEnd = () => {
766
- showEndPanel.value = true;
767
- };
768
- const hiddenStartPanel = (interval = 32) => {
769
- setTimeout(() => showStartPanel.value = false, interval);
770
- };
771
- const hiddenEndPanel = (interval = 32) => {
772
- setTimeout(() => showEndPanel.value = false, interval);
773
- };
774
- const handleStartTimeChange = (date) => {
775
- var _a;
776
- startDate.value = date;
777
- if (!endDate.value) {
778
- (_a = endInput.value) == null ? void 0 : _a.focus();
779
- handleFocusEnd();
780
- }
781
- hiddenStartPanel();
782
- };
783
- const handleEndTimeChange = (date, needEndOfDay = true) => {
784
- var _a;
785
- endDate.value = needEndOfDay ? dayjs(date.endOf("day")) : date;
786
- isNow.value = needEndOfDay ? false : isNow.value;
787
- if (!startDate.value) {
788
- (_a = startInput.value) == null ? void 0 : _a.focus();
789
- handleFocusStart();
790
- }
791
- hiddenEndPanel();
792
- };
793
- const handleIsNowChange = () => {
794
- isNow.value = !isNow.value;
795
- handleEndTimeChange(dayjs(), false);
796
- if (startDate.value)
797
- showStartPanel.value = false;
798
- };
799
- const handleClear = () => {
800
- startDate.value = void 0;
801
- endDate.value = void 0;
802
- isNow.value = false;
803
- hiddenStartPanel();
804
- hiddenEndPanel();
805
- };
806
- const handleSubmit = () => {
807
- var _a, _b;
808
- if (startDate.value && endDate.value) {
809
- emits("change", [
810
- ((_a = startDate.value) == null ? void 0 : _a.format(format.value)) || "",
811
- isNow.value ? "now" : ((_b = endDate.value) == null ? void 0 : _b.format(format.value)) || ""
812
- ]);
813
- }
814
- };
815
- const handleClickoutsideStart = (e) => {
816
- var _a;
817
- if (!showStartPanel.value)
818
- return;
819
- if (!((_a = document.querySelector(".__date-picker-popover-start__")) == null ? void 0 : _a.contains(e.target))) {
820
- hiddenStartPanel();
821
- }
822
- };
823
- const handleClickoutsideEnd = (e) => {
824
- var _a;
825
- if (!showEndPanel.value)
826
- return;
827
- if (!((_a = document.querySelector(".__date-picker-popover-end__")) == null ? void 0 : _a.contains(e.target))) {
828
- hiddenEndPanel();
829
- }
830
- };
831
- return (_ctx, _cache) => {
832
- return openBlock(), createElementBlock("div", _hoisted_1$5, [
833
- createElementVNode("div", _hoisted_2$4, [
834
- createElementVNode("div", _hoisted_3$3, [
835
- _hoisted_4$2,
836
- createVNode(unref(Popover), {
837
- trigger: "manual",
838
- theme: "light",
839
- placement: "bottom-start",
840
- boundary: "parent",
841
- "ext-cls": "__bk-date-picker-popover__ __date-picker-popover-start__",
842
- arrow: false,
843
- "is-show": showStartPanel.value
844
- }, {
845
- content: withCtx(() => [
846
- createVNode(_sfc_main$6, {
847
- format: unref(format),
848
- "is-now": isNow.value,
849
- key: "start",
850
- "model-value": startDate.value,
851
- "onUpdate:modelValue": handleStartTimeChange,
852
- "onUpdate:isNow": handleIsNowChange
853
- }, null, 8, ["format", "is-now", "model-value"])
854
- ]),
855
- default: withCtx(() => {
856
- var _a;
857
- return [
858
- withDirectives(createElementVNode("input", {
859
- ref_key: "startInput",
860
- ref: startInput,
861
- class: "date-picker-start",
862
- spellcheck: "false",
863
- placeholder: unref(t)("开始时间"),
864
- value: (_a = startDate.value) == null ? void 0 : _a.format(unref(format)),
865
- onClick: handleFocusStart,
866
- onBlur: _cache[0] || (_cache[0] = (e) => handleInputEnter(e, "start")),
867
- onKeypress: _cache[1] || (_cache[1] = withKeys((e) => handleInputEnter(e, "start"), ["enter"]))
868
- }, null, 40, _hoisted_5$2), [
869
- [unref(clickoutside), handleClickoutsideStart]
870
- ])
871
- ];
872
- }),
873
- _: 1
874
- }, 8, ["is-show"]),
875
- _hoisted_6$2,
876
- createVNode(unref(Popover), {
877
- trigger: "manual",
878
- theme: "light",
879
- placement: "bottom-start",
880
- boundary: "parent",
881
- "ext-cls": "__bk-date-picker-popover__ __date-picker-popover-end__",
882
- arrow: false,
883
- "is-show": showEndPanel.value
884
- }, {
885
- content: withCtx(() => [
886
- createVNode(_sfc_main$6, {
887
- format: unref(format),
888
- "is-now": isNow.value,
889
- "min-date": startDate.value,
890
- "model-value": endDate.value,
891
- key: "end",
892
- "onUpdate:modelValue": handleEndTimeChange,
893
- "onUpdate:isNow": handleIsNowChange
894
- }, null, 8, ["format", "is-now", "min-date", "model-value"])
895
- ]),
896
- default: withCtx(() => {
897
- var _a;
898
- return [
899
- withDirectives(createElementVNode("input", {
900
- ref_key: "endInput",
901
- ref: endInput,
902
- class: "date-picker-end",
903
- placeholder: unref(t)("结束时间"),
904
- value: isNow.value ? "now" : (_a = endDate.value) == null ? void 0 : _a.format(unref(format)),
905
- onClick: handleFocusEnd,
906
- onBlur: _cache[2] || (_cache[2] = (e) => handleInputEnter(e, "end")),
907
- onKeypress: _cache[3] || (_cache[3] = withKeys((e) => handleInputEnter(e, "end"), ["enter"]))
908
- }, null, 40, _hoisted_7$1), [
909
- [unref(clickoutside), handleClickoutsideEnd]
910
- ])
911
- ];
912
- }),
913
- _: 1
914
- }, 8, ["is-show"]),
915
- !!(startDate.value || endDate.value) ? (openBlock(), createBlock(unref(Close), {
916
- key: 0,
917
- class: "date-picker-clear",
918
- onClick: handleClear
919
- })) : createCommentVNode("", true)
920
- ]),
921
- createVNode(_sfc_main$7, {
922
- disabled: !(startDate.value && endDate.value),
923
- onSubmit: handleSubmit
924
- }, null, 8, ["disabled"])
925
- ]),
926
- createElementVNode("div", _hoisted_8$1, [
927
- createTextVNode(toDisplayString(unref(t)("支持多种时间格式自动转换")) + " ", 1),
928
- createVNode(unref(Popover), {
929
- trigger: "click",
930
- placement: "bottom",
931
- theme: "light"
932
- }, {
933
- content: withCtx(() => [
934
- createElementVNode("div", _hoisted_9$1, [
935
- createElementVNode("div", _hoisted_10$1, toDisplayString(unref(t)("时间格式支持")), 1),
936
- createElementVNode("table", _hoisted_11, [
937
- createElementVNode("thead", null, [
938
- createElementVNode("tr", null, [
939
- createElementVNode("th", null, toDisplayString(unref(t)("格式")), 1),
940
- createElementVNode("th", null, toDisplayString(unref(t)("示例")), 1)
941
- ])
942
- ]),
943
- createElementVNode("tbody", null, [
944
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(dateFormatList), (f) => {
945
- return openBlock(), createElementBlock("tr", { key: f }, [
946
- createElementVNode("td", null, toDisplayString(f), 1),
947
- createElementVNode("td", null, toDisplayString(unref(today).format(f)), 1)
948
- ]);
949
- }), 128))
950
- ])
951
- ])
952
- ])
953
- ]),
954
- default: withCtx(() => [
955
- createVNode(unref(Button), {
956
- text: "",
957
- theme: "primary",
958
- class: "format-button"
959
- }, {
960
- default: withCtx(() => [
961
- createTextVNode(toDisplayString(unref(t)("查看支持格式")), 1)
962
- ]),
963
- _: 1
964
- })
965
- ]),
966
- _: 1
967
- })
968
- ])
969
- ]);
970
- };
971
- }
972
- });
973
- const datePicker_vue_vue_type_style_index_0_lang$1 = "";
974
- const _hoisted_1$4 = { class: "natural-picker" };
975
- const _hoisted_2$3 = ["onClick"];
976
- const splitDate = "__";
977
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
978
- __name: "natural-picker",
979
- props: {
980
- value: {}
981
- },
982
- emits: ["change"],
983
- setup(__props, { emit: __emit }) {
984
- const emits = __emit;
985
- const props = __props;
986
- const naturalSelectRef = ref();
987
- const naturalOptions = shallowRef(CommonNaturalOptions.slice());
988
- const naturalUnitValue = ref(naturalUnitOptions[0].id);
989
- const canEditNautralId = ref("");
990
- const inputValue = ref();
991
- const naturalValue = ref(naturalOptions.value[0]);
992
- watch(() => props.value, (val) => {
993
- if (![DateMode.NATURAL].includes(getDateValueMode(val)))
994
- return;
995
- const [start, end] = val;
996
- naturalUnitValue.value = end === "now" ? NaturalUnit.NOW : NaturalUnit.ALL;
997
- const [, num, unit, dateUnit2] = start.match(naturalDateRegexp) || [];
998
- if ((!num || !unit) && !dateUnit2)
999
- return;
1000
- const specialDate = CommonNaturalOptions.find((item) => item.id === start && item.type === NaturalOptionType.default);
1001
- if (end !== "now" && start !== end && specialDate || !specialDate) {
1002
- const name = `${`${t("前")} ${num} ${t(langValueMap[unit], true)}`}`;
1003
- naturalOptions.value.unshift({
1004
- id: start,
1005
- name,
1006
- type: NaturalOptionType.custom
1007
- });
1008
- [naturalValue.value] = naturalOptions.value;
1009
- return;
1010
- }
1011
- specialDate && (naturalValue.value = specialDate);
1012
- }, {
1013
- immediate: true
1014
- });
1015
- const getNaturalOptionId = (date) => {
1016
- return `${date.id}${splitDate}${date.type}`;
1017
- };
1018
- const getNaturalDateValue = (date) => {
1019
- const value = date.id;
1020
- if (naturalUnitValue.value === NaturalUnit.ALL) {
1021
- const [, num, unit, dateUnit2] = value.match(naturalDateRegexp) || [];
1022
- if (+num > 1) {
1023
- if (+num === 2 && unit === "d")
1024
- return [value, value];
1025
- return [value, `now-1${unit}/${dateUnit2}`];
1026
- }
1027
- return [value, value];
1028
- }
1029
- return [value, "now"];
1030
- };
1031
- const handleClickItem = (item) => {
1032
- var _a;
1033
- if (item.type === NaturalOptionType.edit) {
1034
- inputValue.value = "";
1035
- canEditNautralId.value = item.id;
1036
- setTimeout(() => {
1037
- var _a2, _b;
1038
- (_b = (_a2 = naturalSelectRef.value) == null ? void 0 : _a2.inputRef) == null ? void 0 : _b.focus();
1039
- }, 20);
1040
- return;
1041
- }
1042
- naturalValue.value = item;
1043
- canEditNautralId.value = "";
1044
- (_a = naturalSelectRef.value) == null ? void 0 : _a.hidePopover();
1045
- };
1046
- const handleUnitChange = (value) => {
1047
- naturalUnitValue.value = value;
1048
- };
1049
- const customNaturalOptions = (v, item) => {
1050
- var _a, _b;
1051
- canEditNautralId.value = "";
1052
- const value = `now-${+v}${item.unit}/${item.unit}`;
1053
- const date = naturalOptions.value.find((item2) => item2.id === value);
1054
- if (date) {
1055
- naturalValue.value = date;
1056
- (_a = naturalSelectRef.value) == null ? void 0 : _a.hidePopover();
1057
- return;
1058
- }
1059
- naturalOptions.value.unshift({
1060
- id: value,
1061
- name: item.name.replace("N", v.toString()),
1062
- type: NaturalOptionType.custom
1063
- });
1064
- [naturalValue.value] = naturalOptions.value;
1065
- (_b = naturalSelectRef.value) == null ? void 0 : _b.hidePopover();
1066
- };
1067
- const handleInputBlur = (e, item) => {
1068
- const v = e.target.value;
1069
- if (!v || !canEditNautralId.value)
1070
- return;
1071
- customNaturalOptions(+v, item);
1072
- };
1073
- const handleInputKeyPress = (e, v, item) => {
1074
- if (e.key !== "Enter" || !canEditNautralId.value)
1075
- return;
1076
- customNaturalOptions(v, item);
1077
- };
1078
- const handleSubmit = () => {
1079
- emits("change", getNaturalDateValue(naturalValue.value));
1080
- };
1081
- return (_ctx, _cache) => {
1082
- return openBlock(), createElementBlock("div", _hoisted_1$4, [
1083
- createVNode(unref(Select), {
1084
- ref_key: "naturalSelectRef",
1085
- ref: naturalSelectRef,
1086
- "model-value": getNaturalOptionId(naturalValue.value),
1087
- filterable: "",
1088
- "input-search": false,
1089
- prefix: unref(t)("自然日期"),
1090
- clearable: false,
1091
- "popover-options": { boundary: "parent" },
1092
- "search-placeholder": unref(t)("请输入"),
1093
- "no-match-text": unref(t)("无匹配数据")
1094
- }, {
1095
- default: withCtx(() => [
1096
- (openBlock(true), createElementBlock(Fragment, null, renderList(naturalOptions.value, (item) => {
1097
- return openBlock(), createBlock(unref(Select).Option, {
1098
- id: getNaturalOptionId(item),
1099
- key: getNaturalOptionId(item),
1100
- name: item.name
1101
- }, {
1102
- default: withCtx(() => [
1103
- createElementVNode("div", {
1104
- onClick: _cache[1] || (_cache[1] = withModifiers(() => {
1105
- }, ["prevent", "stop"])),
1106
- style: { "width": "100%", "padding": "0 12px", "margin": "0 -12px" }
1107
- }, [
1108
- canEditNautralId.value === item.id ? (openBlock(), createBlock(unref(Input), {
1109
- key: 0,
1110
- style: { "width": "100%" },
1111
- type: "number",
1112
- size: "small",
1113
- prefix: item.prefix,
1114
- suffix: item.suffix,
1115
- clearable: false,
1116
- autofocus: true,
1117
- "show-control": false,
1118
- placeholder: unref(t)("请输入"),
1119
- modelValue: inputValue.value,
1120
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
1121
- onBlur: (e) => handleInputBlur(e, item),
1122
- onKeypress: (v, e) => handleInputKeyPress(e, v, item)
1123
- }, null, 8, ["prefix", "suffix", "placeholder", "modelValue", "onBlur", "onKeypress"])) : (openBlock(), createElementBlock("div", {
1124
- key: 1,
1125
- onClick: ($event) => handleClickItem(item),
1126
- style: { "width": "100%" }
1127
- }, toDisplayString(item.name), 9, _hoisted_2$3))
1128
- ])
1129
- ]),
1130
- _: 2
1131
- }, 1032, ["id", "name"]);
1132
- }), 128))
1133
- ]),
1134
- _: 1
1135
- }, 8, ["model-value", "prefix", "search-placeholder", "no-match-text"]),
1136
- createVNode(unref(Select), {
1137
- class: "natural-unit",
1138
- "model-value": naturalUnitValue.value,
1139
- clearable: false,
1140
- "popover-options": { boundary: "parent" },
1141
- onChange: handleUnitChange
1142
- }, {
1143
- default: withCtx(() => [
1144
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(naturalUnitOptions), (item) => {
1145
- return openBlock(), createBlock(unref(Select).Option, {
1146
- id: item.id,
1147
- key: item.id,
1148
- name: item.name
1149
- }, null, 8, ["id", "name"]);
1150
- }), 128))
1151
- ]),
1152
- _: 1
1153
- }, 8, ["model-value"]),
1154
- createVNode(_sfc_main$7, { onSubmit: handleSubmit })
1155
- ]);
1156
- };
1157
- }
1158
- });
1159
- const naturalPicker_vue_vue_type_style_index_0_lang = "";
1160
- const _hoisted_1$3 = { class: "recent-picker" };
1161
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1162
- __name: "recent-picker",
1163
- props: {
1164
- type: { default: DateMode.RECENT },
1165
- value: {}
1166
- },
1167
- emits: ["change"],
1168
- setup(__props, { emit: __emit }) {
1169
- const emits = __emit;
1170
- const props = __props;
1171
- const recentUnit = ref("m");
1172
- const dateValue = ref();
1173
- watch(() => props.value, (val) => {
1174
- if (![DateMode.FUTURE, DateMode.RECENT].includes(getDateValueMode(val)))
1175
- return;
1176
- const [start, end] = val;
1177
- const date = props.type === DateMode.FUTURE ? end : start;
1178
- const [, num, unit] = date.match(recentDateRegexp) || [];
1179
- recentUnit.value = unit || "m";
1180
- dateValue.value = Number(num) || void 0;
1181
- }, {
1182
- immediate: true
1183
- });
1184
- const canSubmit = computed(() => !!dateValue.value && !!recentUnit.value);
1185
- const handleSubmit = () => {
1186
- if (!dateValue.value)
1187
- return;
1188
- if (props.type === DateMode.FUTURE) {
1189
- emits("change", ["now", `${DateMode.FUTURE}${dateValue.value}${recentUnit.value}`]);
1190
- return;
1191
- }
1192
- emits("change", [`${DateMode.RECENT}${dateValue.value}${recentUnit.value}`, "now"]);
1193
- };
1194
- return (_ctx, _cache) => {
1195
- return openBlock(), createElementBlock("div", _hoisted_1$3, [
1196
- createVNode(unref(Input), {
1197
- modelValue: dateValue.value,
1198
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => dateValue.value = $event),
1199
- type: "number",
1200
- prefix: _ctx.type === "now-" ? unref(t)("最近") : unref(t)("将来"),
1201
- placeholder: unref(t)("请输入")
1202
- }, {
1203
- suffix: withCtx(() => [
1204
- createVNode(unref(Select), {
1205
- class: "recent-unit",
1206
- modelValue: recentUnit.value,
1207
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => recentUnit.value = $event),
1208
- filterable: "",
1209
- clearable: false,
1210
- "popover-options": { boundary: "parent" }
1211
- }, {
1212
- default: withCtx(() => [
1213
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(DateUnitList), (item) => {
1214
- return openBlock(), createBlock(unref(Select).Option, {
1215
- id: item.id,
1216
- key: item.id,
1217
- name: item.name
1218
- }, null, 8, ["id", "name"]);
1219
- }), 128))
1220
- ]),
1221
- _: 1
1222
- }, 8, ["modelValue"])
1223
- ]),
1224
- _: 1
1225
- }, 8, ["modelValue", "prefix", "placeholder"]),
1226
- createVNode(_sfc_main$7, {
1227
- disabled: !canSubmit.value,
1228
- onSubmit: handleSubmit
1229
- }, null, 8, ["disabled"])
1230
- ]);
1231
- };
1232
- }
1233
- });
1234
- const recentPicker_vue_vue_type_style_index_0_lang = "";
1235
- dayjs.extend(utc);
1236
- dayjs.extend(tz);
1237
- const timezoneData = [
1238
- // {
1239
- // label: '',
1240
- // options: [
1241
- // { label: 'Browser Time', searchIndex: 'browser time|cst|utc+08:00|china|cn', value: 'browser' },
1242
- // // { label: 'Coordinated Universal Time', searchIndex: 'coordinated universal time|utc, gmt|utc', value: 'utc' },
1243
- // ],
1244
- // },
1245
- {
1246
- label: "Africa",
1247
- options: [
1248
- {
1249
- label: "Africa/Abidjan",
1250
- searchIndex: "africa/abidjan|gmt|utc|burkina faso|bf|cote d'ivoire|ci|ghana|gh|gambia|gm|guinea|gn|iceland|is|mali|ml|mauritania|mr|saint helena|sh|sierra leone|sl|senegal|sn|togo|tg",
1251
- value: "Africa/Abidjan"
1252
- },
1253
- { label: "Africa/Accra", searchIndex: "africa/accra|gmt|utc|ghana|gh", value: "Africa/Accra" },
1254
- {
1255
- label: "Africa/Addis_Ababa",
1256
- searchIndex: "africa/addis_ababa|eat|utc+03:00|ethiopia|et",
1257
- value: "Africa/Addis_Ababa"
1258
- },
1259
- { label: "Africa/Algiers", searchIndex: "africa/algiers|cet|utc+01:00|algeria|dz", value: "Africa/Algiers" },
1260
- { label: "Africa/Asmara", searchIndex: "africa/asmara|eat|utc+03:00|eritrea|er", value: "Africa/Asmara" },
1261
- { label: "Africa/Bamako", searchIndex: "africa/bamako|gmt|utc|mali|ml", value: "Africa/Bamako" },
1262
- {
1263
- label: "Africa/Bangui",
1264
- searchIndex: "africa/bangui|wat|utc+01:00|central african republic|cf",
1265
- value: "Africa/Bangui"
1266
- },
1267
- { label: "Africa/Banjul", searchIndex: "africa/banjul|gmt|utc|gambia|gm", value: "Africa/Banjul" },
1268
- { label: "Africa/Bissau", searchIndex: "africa/bissau|gmt|utc|guinea-bissau|gw", value: "Africa/Bissau" },
1269
- { label: "Africa/Blantyre", searchIndex: "africa/blantyre|cat|utc+02:00|malawi|mw", value: "Africa/Blantyre" },
1270
- {
1271
- label: "Africa/Brazzaville",
1272
- searchIndex: "africa/brazzaville|wat|utc+01:00|congo|cg",
1273
- value: "Africa/Brazzaville"
1274
- },
1275
- {
1276
- label: "Africa/Bujumbura",
1277
- searchIndex: "africa/bujumbura|cat|utc+02:00|burundi|bi",
1278
- value: "Africa/Bujumbura"
1279
- },
1280
- { label: "Africa/Cairo", searchIndex: "africa/cairo|eest|utc+03:00|egypt|eg", value: "Africa/Cairo" },
1281
- {
1282
- label: "Africa/Casablanca",
1283
- searchIndex: "africa/casablanca||utc+01:00|morocco|ma",
1284
- value: "Africa/Casablanca"
1285
- },
1286
- { label: "Africa/Ceuta", searchIndex: "africa/ceuta|cest|utc+02:00|spain|es", value: "Africa/Ceuta" },
1287
- { label: "Africa/Conakry", searchIndex: "africa/conakry|gmt|utc|guinea|gn", value: "Africa/Conakry" },
1288
- { label: "Africa/Dakar", searchIndex: "africa/dakar|gmt|utc|senegal|sn", value: "Africa/Dakar" },
1289
- {
1290
- label: "Africa/Dar_es_Salaam",
1291
- searchIndex: "africa/dar_es_salaam|eat|utc+03:00|tanzania|tz",
1292
- value: "Africa/Dar_es_Salaam"
1293
- },
1294
- { label: "Africa/Djibouti", searchIndex: "africa/djibouti|eat|utc+03:00|djibouti|dj", value: "Africa/Djibouti" },
1295
- { label: "Africa/Douala", searchIndex: "africa/douala|wat|utc+01:00|cameroon|cm", value: "Africa/Douala" },
1296
- {
1297
- label: "Africa/El_Aaiun",
1298
- searchIndex: "africa/el_aaiun||utc+01:00|western sahara|eh",
1299
- value: "Africa/El_Aaiun"
1300
- },
1301
- { label: "Africa/Freetown", searchIndex: "africa/freetown|gmt|utc|sierra leone|sl", value: "Africa/Freetown" },
1302
- { label: "Africa/Gaborone", searchIndex: "africa/gaborone|cat|utc+02:00|botswana|bw", value: "Africa/Gaborone" },
1303
- { label: "Africa/Harare", searchIndex: "africa/harare|cat|utc+02:00|zimbabwe|zw", value: "Africa/Harare" },
1304
- {
1305
- label: "Africa/Johannesburg",
1306
- searchIndex: "africa/johannesburg|sast|utc+02:00|lesotho|ls|swaziland|sz|south africa|za",
1307
- value: "Africa/Johannesburg"
1308
- },
1309
- { label: "Africa/Kampala", searchIndex: "africa/kampala|eat|utc+03:00|uganda|ug", value: "Africa/Kampala" },
1310
- { label: "Africa/Khartoum", searchIndex: "africa/khartoum|cat|utc+02:00|sudan|sd", value: "Africa/Khartoum" },
1311
- { label: "Africa/Kigali", searchIndex: "africa/kigali|cat|utc+02:00|rwanda|rw", value: "Africa/Kigali" },
1312
- {
1313
- label: "Africa/Kinshasa",
1314
- searchIndex: "africa/kinshasa|wat|utc+01:00|congo, democratic republic|cd",
1315
- value: "Africa/Kinshasa"
1316
- },
1317
- {
1318
- label: "Africa/Lagos",
1319
- searchIndex: "africa/lagos|wat|utc+01:00|angola|ao|benin|bj|congo, democratic republic|cd|central african republic|cf|congo|cg|cameroon|cm|gabon|ga|equatorial guinea|gq|niger|ne|nigeria|ng",
1320
- value: "Africa/Lagos"
1321
- },
1322
- {
1323
- label: "Africa/Libreville",
1324
- searchIndex: "africa/libreville|wat|utc+01:00|gabon|ga",
1325
- value: "Africa/Libreville"
1326
- },
1327
- { label: "Africa/Lome", searchIndex: "africa/lome|gmt|utc|togo|tg", value: "Africa/Lome" },
1328
- { label: "Africa/Luanda", searchIndex: "africa/luanda|wat|utc+01:00|angola|ao", value: "Africa/Luanda" },
1329
- {
1330
- label: "Africa/Lubumbashi",
1331
- searchIndex: "africa/lubumbashi|cat|utc+02:00|congo, democratic republic|cd",
1332
- value: "Africa/Lubumbashi"
1333
- },
1334
- { label: "Africa/Lusaka", searchIndex: "africa/lusaka|cat|utc+02:00|zambia|zm", value: "Africa/Lusaka" },
1335
- {
1336
- label: "Africa/Malabo",
1337
- searchIndex: "africa/malabo|wat|utc+01:00|equatorial guinea|gq",
1338
- value: "Africa/Malabo"
1339
- },
1340
- {
1341
- label: "Africa/Maputo",
1342
- searchIndex: "africa/maputo|cat|utc+02:00|burundi|bi|botswana|bw|congo, democratic republic|cd|malawi|mw|mozambique|mz|rwanda|rw|zambia|zm|zimbabwe|zw",
1343
- value: "Africa/Maputo"
1344
- },
1345
- { label: "Africa/Maseru", searchIndex: "africa/maseru|sast|utc+02:00|lesotho|ls", value: "Africa/Maseru" },
1346
- { label: "Africa/Mbabane", searchIndex: "africa/mbabane|sast|utc+02:00|swaziland|sz", value: "Africa/Mbabane" },
1347
- {
1348
- label: "Africa/Mogadishu",
1349
- searchIndex: "africa/mogadishu|eat|utc+03:00|somalia|so",
1350
- value: "Africa/Mogadishu"
1351
- },
1352
- { label: "Africa/Monrovia", searchIndex: "africa/monrovia|gmt|utc|liberia|lr", value: "Africa/Monrovia" },
1353
- {
1354
- label: "Africa/Nairobi",
1355
- searchIndex: "africa/nairobi|eat|utc+03:00|djibouti|dj|eritrea|er|ethiopia|et|kenya|ke|comoros|km|madagascar|mg|somalia|so|tanzania|tz|uganda|ug|mayotte|yt",
1356
- value: "Africa/Nairobi"
1357
- },
1358
- { label: "Africa/Ndjamena", searchIndex: "africa/ndjamena|wat|utc+01:00|chad|td", value: "Africa/Ndjamena" },
1359
- { label: "Africa/Niamey", searchIndex: "africa/niamey|wat|utc+01:00|niger|ne", value: "Africa/Niamey" },
1360
- {
1361
- label: "Africa/Nouakchott",
1362
- searchIndex: "africa/nouakchott|gmt|utc|mauritania|mr",
1363
- value: "Africa/Nouakchott"
1364
- },
1365
- {
1366
- label: "Africa/Ouagadougou",
1367
- searchIndex: "africa/ouagadougou|gmt|utc|burkina faso|bf",
1368
- value: "Africa/Ouagadougou"
1369
- },
1370
- {
1371
- label: "Africa/Porto-Novo",
1372
- searchIndex: "africa/porto-novo|wat|utc+01:00|benin|bj",
1373
- value: "Africa/Porto-Novo"
1374
- },
1375
- {
1376
- label: "Africa/Sao_Tome",
1377
- searchIndex: "africa/sao_tome|gmt|utc|sao tome and principe|st",
1378
- value: "Africa/Sao_Tome"
1379
- },
1380
- {
1381
- label: "Africa/Tripoli",
1382
- searchIndex: "africa/tripoli|eet|utc+02:00|libyan arab jamahiriya|ly",
1383
- value: "Africa/Tripoli"
1384
- },
1385
- { label: "Africa/Tunis", searchIndex: "africa/tunis|cet|utc+01:00|tunisia|tn", value: "Africa/Tunis" },
1386
- { label: "Africa/Windhoek", searchIndex: "africa/windhoek|cat|utc+02:00|namibia|na", value: "Africa/Windhoek" }
1387
- ]
1388
- },
1389
- {
1390
- label: "America",
1391
- options: [
1392
- { label: "America/Adak", searchIndex: "america/adak|hdt|utc-09:00|united states|us", value: "America/Adak" },
1393
- {
1394
- label: "America/Anchorage",
1395
- searchIndex: "america/anchorage|akdt|utc-08:00|united states|us",
1396
- value: "America/Anchorage"
1397
- },
1398
- {
1399
- label: "America/Anguilla",
1400
- searchIndex: "america/anguilla|ast|utc-04:00|anguilla|ai",
1401
- value: "America/Anguilla"
1402
- },
1403
- {
1404
- label: "America/Antigua",
1405
- searchIndex: "america/antigua|ast|utc-04:00|antigua and barbuda|ag",
1406
- value: "America/Antigua"
1407
- },
1408
- { label: "America/Araguaina", searchIndex: "america/araguaina||utc-03:00|brazil|br", value: "America/Araguaina" },
1409
- {
1410
- label: "America/Argentina/Buenos_Aires",
1411
- searchIndex: "america/argentina/buenos_aires||utc-03:00|argentina|ar",
1412
- value: "America/Argentina/Buenos_Aires"
1413
- },
1414
- {
1415
- label: "America/Argentina/Catamarca",
1416
- searchIndex: "america/argentina/catamarca||utc-03:00|argentina|ar",
1417
- value: "America/Argentina/Catamarca"
1418
- },
1419
- {
1420
- label: "America/Argentina/Cordoba",
1421
- searchIndex: "america/argentina/cordoba||utc-03:00|argentina|ar",
1422
- value: "America/Argentina/Cordoba"
1423
- },
1424
- {
1425
- label: "America/Argentina/Jujuy",
1426
- searchIndex: "america/argentina/jujuy||utc-03:00|argentina|ar",
1427
- value: "America/Argentina/Jujuy"
1428
- },
1429
- {
1430
- label: "America/Argentina/La_Rioja",
1431
- searchIndex: "america/argentina/la_rioja||utc-03:00|argentina|ar",
1432
- value: "America/Argentina/La_Rioja"
1433
- },
1434
- {
1435
- label: "America/Argentina/Mendoza",
1436
- searchIndex: "america/argentina/mendoza||utc-03:00|argentina|ar",
1437
- value: "America/Argentina/Mendoza"
1438
- },
1439
- {
1440
- label: "America/Argentina/Rio_Gallegos",
1441
- searchIndex: "america/argentina/rio_gallegos||utc-03:00|argentina|ar",
1442
- value: "America/Argentina/Rio_Gallegos"
1443
- },
1444
- {
1445
- label: "America/Argentina/Salta",
1446
- searchIndex: "america/argentina/salta||utc-03:00|argentina|ar",
1447
- value: "America/Argentina/Salta"
1448
- },
1449
- {
1450
- label: "America/Argentina/San_Juan",
1451
- searchIndex: "america/argentina/san_juan||utc-03:00|argentina|ar",
1452
- value: "America/Argentina/San_Juan"
1453
- },
1454
- {
1455
- label: "America/Argentina/San_Luis",
1456
- searchIndex: "america/argentina/san_luis||utc-03:00|argentina|ar",
1457
- value: "America/Argentina/San_Luis"
1458
- },
1459
- {
1460
- label: "America/Argentina/Tucuman",
1461
- searchIndex: "america/argentina/tucuman||utc-03:00|argentina|ar",
1462
- value: "America/Argentina/Tucuman"
1463
- },
1464
- {
1465
- label: "America/Argentina/Ushuaia",
1466
- searchIndex: "america/argentina/ushuaia||utc-03:00|argentina|ar",
1467
- value: "America/Argentina/Ushuaia"
1468
- },
1469
- { label: "America/Aruba", searchIndex: "america/aruba|ast|utc-04:00|aruba|aw", value: "America/Aruba" },
1470
- { label: "America/Asuncion", searchIndex: "america/asuncion||utc-03:00|paraguay|py", value: "America/Asuncion" },
1471
- { label: "America/Atikokan", searchIndex: "america/atikokan|est|utc-05:00|canada|ca", value: "America/Atikokan" },
1472
- { label: "America/Bahia", searchIndex: "america/bahia||utc-03:00|brazil|br", value: "America/Bahia" },
1473
- {
1474
- label: "America/Bahia_Banderas",
1475
- searchIndex: "america/bahia_banderas|cst|utc-06:00|mexico|mx",
1476
- value: "America/Bahia_Banderas"
1477
- },
1478
- {
1479
- label: "America/Barbados",
1480
- searchIndex: "america/barbados|ast|utc-04:00|barbados|bb",
1481
- value: "America/Barbados"
1482
- },
1483
- { label: "America/Belem", searchIndex: "america/belem||utc-03:00|brazil|br", value: "America/Belem" },
1484
- { label: "America/Belize", searchIndex: "america/belize|cst|utc-06:00|belize|bz", value: "America/Belize" },
1485
- {
1486
- label: "America/Blanc-Sablon",
1487
- searchIndex: "america/blanc-sablon|ast|utc-04:00|canada|ca",
1488
- value: "America/Blanc-Sablon"
1489
- },
1490
- { label: "America/Boa_Vista", searchIndex: "america/boa_vista||utc-04:00|brazil|br", value: "America/Boa_Vista" },
1491
- { label: "America/Bogota", searchIndex: "america/bogota||utc-05:00|colombia|co", value: "America/Bogota" },
1492
- { label: "America/Boise", searchIndex: "america/boise|mdt|utc-06:00|united states|us", value: "America/Boise" },
1493
- {
1494
- label: "America/Cambridge_Bay",
1495
- searchIndex: "america/cambridge_bay|mdt|utc-06:00|canada|ca",
1496
- value: "America/Cambridge_Bay"
1497
- },
1498
- {
1499
- label: "America/Campo_Grande",
1500
- searchIndex: "america/campo_grande||utc-04:00|brazil|br",
1501
- value: "America/Campo_Grande"
1502
- },
1503
- { label: "America/Cancun", searchIndex: "america/cancun|est|utc-05:00|mexico|mx", value: "America/Cancun" },
1504
- { label: "America/Caracas", searchIndex: "america/caracas||utc-04:00|venezuela|ve", value: "America/Caracas" },
1505
- {
1506
- label: "America/Cayenne",
1507
- searchIndex: "america/cayenne||utc-03:00|french guiana|gf",
1508
- value: "America/Cayenne"
1509
- },
1510
- {
1511
- label: "America/Cayman",
1512
- searchIndex: "america/cayman|est|utc-05:00|cayman islands|ky",
1513
- value: "America/Cayman"
1514
- },
1515
- {
1516
- label: "America/Chicago",
1517
- searchIndex: "america/chicago|cdt|utc-05:00|united states|us",
1518
- value: "America/Chicago"
1519
- },
1520
- {
1521
- label: "America/Chihuahua",
1522
- searchIndex: "america/chihuahua|cst|utc-06:00|mexico|mx",
1523
- value: "America/Chihuahua"
1524
- },
1525
- {
1526
- label: "America/Ciudad_Juarez",
1527
- searchIndex: "america/ciudad_juarez|mdt|utc-06:00|mexico|mx",
1528
- value: "America/Ciudad_Juarez"
1529
- },
1530
- {
1531
- label: "America/Costa_Rica",
1532
- searchIndex: "america/costa_rica|cst|utc-06:00|costa rica|cr",
1533
- value: "America/Costa_Rica"
1534
- },
1535
- { label: "America/Creston", searchIndex: "america/creston|mst|utc-07:00|canada|ca", value: "America/Creston" },
1536
- { label: "America/Cuiaba", searchIndex: "america/cuiaba||utc-04:00|brazil|br", value: "America/Cuiaba" },
1537
- {
1538
- label: "America/Danmarkshavn",
1539
- searchIndex: "america/danmarkshavn|gmt|utc|greenland|gl",
1540
- value: "America/Danmarkshavn"
1541
- },
1542
- { label: "America/Dawson", searchIndex: "america/dawson|mst|utc-07:00|canada|ca", value: "America/Dawson" },
1543
- {
1544
- label: "America/Dawson_Creek",
1545
- searchIndex: "america/dawson_creek|mst|utc-07:00|canada|ca",
1546
- value: "America/Dawson_Creek"
1547
- },
1548
- {
1549
- label: "America/Denver",
1550
- searchIndex: "america/denver|mdt|utc-06:00|united states|us",
1551
- value: "America/Denver"
1552
- },
1553
- {
1554
- label: "America/Detroit",
1555
- searchIndex: "america/detroit|edt|utc-04:00|united states|us",
1556
- value: "America/Detroit"
1557
- },
1558
- {
1559
- label: "America/Dominica",
1560
- searchIndex: "america/dominica|ast|utc-04:00|dominica|dm",
1561
- value: "America/Dominica"
1562
- },
1563
- { label: "America/Edmonton", searchIndex: "america/edmonton|mdt|utc-06:00|canada|ca", value: "America/Edmonton" },
1564
- { label: "America/Eirunepe", searchIndex: "america/eirunepe||utc-05:00|brazil|br", value: "America/Eirunepe" },
1565
- {
1566
- label: "America/El_Salvador",
1567
- searchIndex: "america/el_salvador|cst|utc-06:00|el salvador|sv",
1568
- value: "America/El_Salvador"
1569
- },
1570
- {
1571
- label: "America/Fort_Nelson",
1572
- searchIndex: "america/fort_nelson|mst|utc-07:00|canada|ca",
1573
- value: "America/Fort_Nelson"
1574
- },
1575
- { label: "America/Fortaleza", searchIndex: "america/fortaleza||utc-03:00|brazil|br", value: "America/Fortaleza" },
1576
- {
1577
- label: "America/Glace_Bay",
1578
- searchIndex: "america/glace_bay|adt|utc-03:00|canada|ca",
1579
- value: "America/Glace_Bay"
1580
- },
1581
- {
1582
- label: "America/Goose_Bay",
1583
- searchIndex: "america/goose_bay|adt|utc-03:00|canada|ca",
1584
- value: "America/Goose_Bay"
1585
- },
1586
- {
1587
- label: "America/Grand_Turk",
1588
- searchIndex: "america/grand_turk|edt|utc-04:00|turks and caicos islands|tc",
1589
- value: "America/Grand_Turk"
1590
- },
1591
- { label: "America/Grenada", searchIndex: "america/grenada|ast|utc-04:00|grenada|gd", value: "America/Grenada" },
1592
- {
1593
- label: "America/Guadeloupe",
1594
- searchIndex: "america/guadeloupe|ast|utc-04:00|guadeloupe|gp",
1595
- value: "America/Guadeloupe"
1596
- },
1597
- {
1598
- label: "America/Guatemala",
1599
- searchIndex: "america/guatemala|cst|utc-06:00|guatemala|gt",
1600
- value: "America/Guatemala"
1601
- },
1602
- {
1603
- label: "America/Guayaquil",
1604
- searchIndex: "america/guayaquil||utc-05:00|ecuador|ec",
1605
- value: "America/Guayaquil"
1606
- },
1607
- { label: "America/Guyana", searchIndex: "america/guyana||utc-04:00|guyana|gy", value: "America/Guyana" },
1608
- { label: "America/Halifax", searchIndex: "america/halifax|adt|utc-03:00|canada|ca", value: "America/Halifax" },
1609
- { label: "America/Havana", searchIndex: "america/havana|cdt|utc-04:00|cuba|cu", value: "America/Havana" },
1610
- {
1611
- label: "America/Hermosillo",
1612
- searchIndex: "america/hermosillo|mst|utc-07:00|mexico|mx",
1613
- value: "America/Hermosillo"
1614
- },
1615
- {
1616
- label: "America/Indiana/Indianapolis",
1617
- searchIndex: "america/indiana/indianapolis|edt|utc-04:00|united states|us",
1618
- value: "America/Indiana/Indianapolis"
1619
- },
1620
- {
1621
- label: "America/Indiana/Knox",
1622
- searchIndex: "america/indiana/knox|cdt|utc-05:00|united states|us",
1623
- value: "America/Indiana/Knox"
1624
- },
1625
- {
1626
- label: "America/Indiana/Marengo",
1627
- searchIndex: "america/indiana/marengo|edt|utc-04:00|united states|us",
1628
- value: "America/Indiana/Marengo"
1629
- },
1630
- {
1631
- label: "America/Indiana/Petersburg",
1632
- searchIndex: "america/indiana/petersburg|edt|utc-04:00|united states|us",
1633
- value: "America/Indiana/Petersburg"
1634
- },
1635
- {
1636
- label: "America/Indiana/Tell_City",
1637
- searchIndex: "america/indiana/tell_city|cdt|utc-05:00|united states|us",
1638
- value: "America/Indiana/Tell_City"
1639
- },
1640
- {
1641
- label: "America/Indiana/Vevay",
1642
- searchIndex: "america/indiana/vevay|edt|utc-04:00|united states|us",
1643
- value: "America/Indiana/Vevay"
1644
- },
1645
- {
1646
- label: "America/Indiana/Vincennes",
1647
- searchIndex: "america/indiana/vincennes|edt|utc-04:00|united states|us",
1648
- value: "America/Indiana/Vincennes"
1649
- },
1650
- {
1651
- label: "America/Indiana/Winamac",
1652
- searchIndex: "america/indiana/winamac|edt|utc-04:00|united states|us",
1653
- value: "America/Indiana/Winamac"
1654
- },
1655
- { label: "America/Inuvik", searchIndex: "america/inuvik|mdt|utc-06:00|canada|ca", value: "America/Inuvik" },
1656
- { label: "America/Iqaluit", searchIndex: "america/iqaluit|edt|utc-04:00|canada|ca", value: "America/Iqaluit" },
1657
- { label: "America/Jamaica", searchIndex: "america/jamaica|est|utc-05:00|jamaica|jm", value: "America/Jamaica" },
1658
- {
1659
- label: "America/Juneau",
1660
- searchIndex: "america/juneau|akdt|utc-08:00|united states|us",
1661
- value: "America/Juneau"
1662
- },
1663
- {
1664
- label: "America/Kentucky/Louisville",
1665
- searchIndex: "america/kentucky/louisville|edt|utc-04:00|united states|us",
1666
- value: "America/Kentucky/Louisville"
1667
- },
1668
- {
1669
- label: "America/Kentucky/Monticello",
1670
- searchIndex: "america/kentucky/monticello|edt|utc-04:00|united states|us",
1671
- value: "America/Kentucky/Monticello"
1672
- },
1673
- { label: "America/La_Paz", searchIndex: "america/la_paz||utc-04:00|bolivia|bo", value: "America/La_Paz" },
1674
- { label: "America/Lima", searchIndex: "america/lima||utc-05:00|peru|pe", value: "America/Lima" },
1675
- {
1676
- label: "America/Los_Angeles",
1677
- searchIndex: "america/los_angeles|pdt|utc-07:00|united states|us",
1678
- value: "America/Los_Angeles"
1679
- },
1680
- { label: "America/Maceio", searchIndex: "america/maceio||utc-03:00|brazil|br", value: "America/Maceio" },
1681
- { label: "America/Managua", searchIndex: "america/managua|cst|utc-06:00|nicaragua|ni", value: "America/Managua" },
1682
- { label: "America/Manaus", searchIndex: "america/manaus||utc-04:00|brazil|br", value: "America/Manaus" },
1683
- {
1684
- label: "America/Marigot",
1685
- searchIndex: "america/marigot|ast|utc-04:00|saint martin|mf",
1686
- value: "America/Marigot"
1687
- },
1688
- {
1689
- label: "America/Martinique",
1690
- searchIndex: "america/martinique|ast|utc-04:00|martinique|mq",
1691
- value: "America/Martinique"
1692
- },
1693
- {
1694
- label: "America/Matamoros",
1695
- searchIndex: "america/matamoros|cdt|utc-05:00|mexico|mx",
1696
- value: "America/Matamoros"
1697
- },
1698
- { label: "America/Mazatlan", searchIndex: "america/mazatlan|mst|utc-07:00|mexico|mx", value: "America/Mazatlan" },
1699
- {
1700
- label: "America/Menominee",
1701
- searchIndex: "america/menominee|cdt|utc-05:00|united states|us",
1702
- value: "America/Menominee"
1703
- },
1704
- { label: "America/Merida", searchIndex: "america/merida|cst|utc-06:00|mexico|mx", value: "America/Merida" },
1705
- {
1706
- label: "America/Metlakatla",
1707
- searchIndex: "america/metlakatla|akdt|utc-08:00|united states|us",
1708
- value: "America/Metlakatla"
1709
- },
1710
- {
1711
- label: "America/Mexico_City",
1712
- searchIndex: "america/mexico_city|cst|utc-06:00|mexico|mx",
1713
- value: "America/Mexico_City"
1714
- },
1715
- {
1716
- label: "America/Miquelon",
1717
- searchIndex: "america/miquelon||utc-02:00|saint pierre and miquelon|pm",
1718
- value: "America/Miquelon"
1719
- },
1720
- { label: "America/Moncton", searchIndex: "america/moncton|adt|utc-03:00|canada|ca", value: "America/Moncton" },
1721
- {
1722
- label: "America/Monterrey",
1723
- searchIndex: "america/monterrey|cst|utc-06:00|mexico|mx",
1724
- value: "America/Monterrey"
1725
- },
1726
- {
1727
- label: "America/Montevideo",
1728
- searchIndex: "america/montevideo||utc-03:00|uruguay|uy",
1729
- value: "America/Montevideo"
1730
- },
1731
- {
1732
- label: "America/Montserrat",
1733
- searchIndex: "america/montserrat|ast|utc-04:00|montserrat|ms",
1734
- value: "America/Montserrat"
1735
- },
1736
- { label: "America/Nassau", searchIndex: "america/nassau|edt|utc-04:00|bahamas|bs", value: "America/Nassau" },
1737
- {
1738
- label: "America/New_York",
1739
- searchIndex: "america/new_york|edt|utc-04:00|united states|us",
1740
- value: "America/New_York"
1741
- },
1742
- { label: "America/Nome", searchIndex: "america/nome|akdt|utc-08:00|united states|us", value: "America/Nome" },
1743
- { label: "America/Noronha", searchIndex: "america/noronha||utc-02:00|brazil|br", value: "America/Noronha" },
1744
- {
1745
- label: "America/North_Dakota/Beulah",
1746
- searchIndex: "america/north_dakota/beulah|cdt|utc-05:00|united states|us",
1747
- value: "America/North_Dakota/Beulah"
1748
- },
1749
- {
1750
- label: "America/North_Dakota/Center",
1751
- searchIndex: "america/north_dakota/center|cdt|utc-05:00|united states|us",
1752
- value: "America/North_Dakota/Center"
1753
- },
1754
- {
1755
- label: "America/North_Dakota/New_Salem",
1756
- searchIndex: "america/north_dakota/new_salem|cdt|utc-05:00|united states|us",
1757
- value: "America/North_Dakota/New_Salem"
1758
- },
1759
- { label: "America/Nuuk", searchIndex: "america/nuuk||utc-02:00|greenland|gl", value: "America/Nuuk" },
1760
- { label: "America/Ojinaga", searchIndex: "america/ojinaga|cdt|utc-05:00|mexico|mx", value: "America/Ojinaga" },
1761
- {
1762
- label: "America/Panama",
1763
- searchIndex: "america/panama|est|utc-05:00|canada|ca|cayman islands|ky|panama|pa",
1764
- value: "America/Panama"
1765
- },
1766
- {
1767
- label: "America/Paramaribo",
1768
- searchIndex: "america/paramaribo||utc-03:00|suriname|sr",
1769
- value: "America/Paramaribo"
1770
- },
1771
- {
1772
- label: "America/Phoenix",
1773
- searchIndex: "america/phoenix|mst|utc-07:00|canada|ca|united states|us",
1774
- value: "America/Phoenix"
1775
- },
1776
- {
1777
- label: "America/Port-au-Prince",
1778
- searchIndex: "america/port-au-prince|edt|utc-04:00|haiti|ht",
1779
- value: "America/Port-au-Prince"
1780
- },
1781
- {
1782
- label: "America/Port_of_Spain",
1783
- searchIndex: "america/port_of_spain|ast|utc-04:00|trinidad and tobago|tt",
1784
- value: "America/Port_of_Spain"
1785
- },
1786
- {
1787
- label: "America/Porto_Velho",
1788
- searchIndex: "america/porto_velho||utc-04:00|brazil|br",
1789
- value: "America/Porto_Velho"
1790
- },
1791
- {
1792
- label: "America/Puerto_Rico",
1793
- searchIndex: "america/puerto_rico|ast|utc-04:00|antigua and barbuda|ag|anguilla|ai|aruba|aw|saint barthelemy|bl|canada|ca|dominica|dm|grenada|gd|guadeloupe|gp|saint kitts and nevis|kn|saint lucia|lc|saint martin|mf|montserrat|ms|puerto rico|pr|trinidad and tobago|tt|saint vincent and grenadines|vc|virgin islands, british|vg|virgin islands, u.s.|vi",
1794
- value: "America/Puerto_Rico"
1795
- },
1796
- {
1797
- label: "America/Punta_Arenas",
1798
- searchIndex: "america/punta_arenas||utc-03:00|chile|cl",
1799
- value: "America/Punta_Arenas"
1800
- },
1801
- {
1802
- label: "America/Rankin_Inlet",
1803
- searchIndex: "america/rankin_inlet|cdt|utc-05:00|canada|ca",
1804
- value: "America/Rankin_Inlet"
1805
- },
1806
- { label: "America/Recife", searchIndex: "america/recife||utc-03:00|brazil|br", value: "America/Recife" },
1807
- { label: "America/Regina", searchIndex: "america/regina|cst|utc-06:00|canada|ca", value: "America/Regina" },
1808
- { label: "America/Resolute", searchIndex: "america/resolute|cdt|utc-05:00|canada|ca", value: "America/Resolute" },
1809
- {
1810
- label: "America/Rio_Branco",
1811
- searchIndex: "america/rio_branco||utc-05:00|brazil|br",
1812
- value: "America/Rio_Branco"
1813
- },
1814
- { label: "America/Santarem", searchIndex: "america/santarem||utc-03:00|brazil|br", value: "America/Santarem" },
1815
- { label: "America/Santiago", searchIndex: "america/santiago||utc-03:00|chile|cl", value: "America/Santiago" },
1816
- {
1817
- label: "America/Santo_Domingo",
1818
- searchIndex: "america/santo_domingo|ast|utc-04:00|dominican republic|do",
1819
- value: "America/Santo_Domingo"
1820
- },
1821
- { label: "America/Sao_Paulo", searchIndex: "america/sao_paulo||utc-03:00|brazil|br", value: "America/Sao_Paulo" },
1822
- {
1823
- label: "America/Scoresbysund",
1824
- searchIndex: "america/scoresbysund||utc|greenland|gl",
1825
- value: "America/Scoresbysund"
1826
- },
1827
- { label: "America/Sitka", searchIndex: "america/sitka|akdt|utc-08:00|united states|us", value: "America/Sitka" },
1828
- {
1829
- label: "America/St_Barthelemy",
1830
- searchIndex: "america/st_barthelemy|ast|utc-04:00|saint barthelemy|bl",
1831
- value: "America/St_Barthelemy"
1832
- },
1833
- { label: "America/St_Johns", searchIndex: "america/st_johns|ndt|utc-02:30|canada|ca", value: "America/St_Johns" },
1834
- {
1835
- label: "America/St_Kitts",
1836
- searchIndex: "america/st_kitts|ast|utc-04:00|saint kitts and nevis|kn",
1837
- value: "America/St_Kitts"
1838
- },
1839
- {
1840
- label: "America/St_Lucia",
1841
- searchIndex: "america/st_lucia|ast|utc-04:00|saint lucia|lc",
1842
- value: "America/St_Lucia"
1843
- },
1844
- {
1845
- label: "America/St_Thomas",
1846
- searchIndex: "america/st_thomas|ast|utc-04:00|virgin islands, u.s.|vi",
1847
- value: "America/St_Thomas"
1848
- },
1849
- {
1850
- label: "America/St_Vincent",
1851
- searchIndex: "america/st_vincent|ast|utc-04:00|saint vincent and grenadines|vc",
1852
- value: "America/St_Vincent"
1853
- },
1854
- {
1855
- label: "America/Swift_Current",
1856
- searchIndex: "america/swift_current|cst|utc-06:00|canada|ca",
1857
- value: "America/Swift_Current"
1858
- },
1859
- {
1860
- label: "America/Tegucigalpa",
1861
- searchIndex: "america/tegucigalpa|cst|utc-06:00|honduras|hn",
1862
- value: "America/Tegucigalpa"
1863
- },
1864
- { label: "America/Thule", searchIndex: "america/thule|adt|utc-03:00|greenland|gl", value: "America/Thule" },
1865
- { label: "America/Tijuana", searchIndex: "america/tijuana|pdt|utc-07:00|mexico|mx", value: "America/Tijuana" },
1866
- {
1867
- label: "America/Toronto",
1868
- searchIndex: "america/toronto|edt|utc-04:00|bahamas|bs|canada|ca",
1869
- value: "America/Toronto"
1870
- },
1871
- {
1872
- label: "America/Tortola",
1873
- searchIndex: "america/tortola|ast|utc-04:00|virgin islands, british|vg",
1874
- value: "America/Tortola"
1875
- },
1876
- {
1877
- label: "America/Vancouver",
1878
- searchIndex: "america/vancouver|pdt|utc-07:00|canada|ca",
1879
- value: "America/Vancouver"
1880
- },
1881
- {
1882
- label: "America/Whitehorse",
1883
- searchIndex: "america/whitehorse|mst|utc-07:00|canada|ca",
1884
- value: "America/Whitehorse"
1885
- },
1886
- { label: "America/Winnipeg", searchIndex: "america/winnipeg|cdt|utc-05:00|canada|ca", value: "America/Winnipeg" },
1887
- {
1888
- label: "America/Yakutat",
1889
- searchIndex: "america/yakutat|akdt|utc-08:00|united states|us",
1890
- value: "America/Yakutat"
1891
- }
1892
- ]
1893
- },
1894
- {
1895
- label: "Antarctica",
1896
- options: [
1897
- {
1898
- label: "Antarctica/Casey",
1899
- searchIndex: "antarctica/casey||utc+11:00|antarctica|aq",
1900
- value: "Antarctica/Casey"
1901
- },
1902
- {
1903
- label: "Antarctica/Davis",
1904
- searchIndex: "antarctica/davis||utc+07:00|antarctica|aq",
1905
- value: "Antarctica/Davis"
1906
- },
1907
- {
1908
- label: "Antarctica/DumontDUrville",
1909
- searchIndex: "antarctica/dumontdurville||utc+10:00|antarctica|aq",
1910
- value: "Antarctica/DumontDUrville"
1911
- },
1912
- {
1913
- label: "Antarctica/Macquarie",
1914
- searchIndex: "antarctica/macquarie|aedt|utc+11:00|australia|au",
1915
- value: "Antarctica/Macquarie"
1916
- },
1917
- {
1918
- label: "Antarctica/Mawson",
1919
- searchIndex: "antarctica/mawson||utc+05:00|antarctica|aq",
1920
- value: "Antarctica/Mawson"
1921
- },
1922
- {
1923
- label: "Antarctica/McMurdo",
1924
- searchIndex: "antarctica/mcmurdo|nzdt|utc+13:00|antarctica|aq",
1925
- value: "Antarctica/McMurdo"
1926
- },
1927
- {
1928
- label: "Antarctica/Palmer",
1929
- searchIndex: "antarctica/palmer||utc-03:00|antarctica|aq",
1930
- value: "Antarctica/Palmer"
1931
- },
1932
- {
1933
- label: "Antarctica/Rothera",
1934
- searchIndex: "antarctica/rothera||utc-03:00|antarctica|aq",
1935
- value: "Antarctica/Rothera"
1936
- },
1937
- {
1938
- label: "Antarctica/Syowa",
1939
- searchIndex: "antarctica/syowa||utc+03:00|antarctica|aq",
1940
- value: "Antarctica/Syowa"
1941
- },
1942
- {
1943
- label: "Antarctica/Troll",
1944
- searchIndex: "antarctica/troll||utc+02:00|antarctica|aq",
1945
- value: "Antarctica/Troll"
1946
- },
1947
- {
1948
- label: "Antarctica/Vostok",
1949
- searchIndex: "antarctica/vostok||utc+06:00|antarctica|aq",
1950
- value: "Antarctica/Vostok"
1951
- }
1952
- ]
1953
- },
1954
- {
1955
- label: "Arctic",
1956
- options: [
1957
- {
1958
- label: "Arctic/Longyearbyen",
1959
- searchIndex: "arctic/longyearbyen|cest|utc+02:00|svalbard and jan mayen|sj",
1960
- value: "Arctic/Longyearbyen"
1961
- }
1962
- ]
1963
- },
1964
- {
1965
- label: "Asia",
1966
- options: [
1967
- { label: "Asia/Aden", searchIndex: "asia/aden||utc+03:00|yemen|ye", value: "Asia/Aden" },
1968
- { label: "Asia/Almaty", searchIndex: "asia/almaty||utc+06:00|kazakhstan|kz", value: "Asia/Almaty" },
1969
- { label: "Asia/Amman", searchIndex: "asia/amman||utc+03:00|jordan|jo", value: "Asia/Amman" },
1970
- { label: "Asia/Anadyr", searchIndex: "asia/anadyr||utc+12:00|russian federation|ru", value: "Asia/Anadyr" },
1971
- { label: "Asia/Aqtau", searchIndex: "asia/aqtau||utc+05:00|kazakhstan|kz", value: "Asia/Aqtau" },
1972
- { label: "Asia/Aqtobe", searchIndex: "asia/aqtobe||utc+05:00|kazakhstan|kz", value: "Asia/Aqtobe" },
1973
- { label: "Asia/Ashgabat", searchIndex: "asia/ashgabat||utc+05:00|turkmenistan|tm", value: "Asia/Ashgabat" },
1974
- { label: "Asia/Atyrau", searchIndex: "asia/atyrau||utc+05:00|kazakhstan|kz", value: "Asia/Atyrau" },
1975
- { label: "Asia/Baghdad", searchIndex: "asia/baghdad||utc+03:00|iraq|iq", value: "Asia/Baghdad" },
1976
- { label: "Asia/Bahrain", searchIndex: "asia/bahrain||utc+03:00|bahrain|bh", value: "Asia/Bahrain" },
1977
- { label: "Asia/Baku", searchIndex: "asia/baku||utc+04:00|azerbaijan|az", value: "Asia/Baku" },
1978
- {
1979
- label: "Asia/Bangkok",
1980
- searchIndex: "asia/bangkok||utc+07:00|christmas island|cx|cambodia|kh|lao people's democratic republic|la|thailand|th|viet nam|vn",
1981
- value: "Asia/Bangkok"
1982
- },
1983
- { label: "Asia/Barnaul", searchIndex: "asia/barnaul||utc+07:00|russian federation|ru", value: "Asia/Barnaul" },
1984
- { label: "Asia/Beirut", searchIndex: "asia/beirut|eest|utc+03:00|lebanon|lb", value: "Asia/Beirut" },
1985
- { label: "Asia/Bishkek", searchIndex: "asia/bishkek||utc+06:00|kyrgyzstan|kg", value: "Asia/Bishkek" },
1986
- { label: "Asia/Brunei", searchIndex: "asia/brunei||utc+08:00|brunei darussalam|bn", value: "Asia/Brunei" },
1987
- { label: "Asia/Chita", searchIndex: "asia/chita||utc+09:00|russian federation|ru", value: "Asia/Chita" },
1988
- { label: "Asia/Choibalsan", searchIndex: "asia/choibalsan||utc+08:00|mongolia|mn", value: "Asia/Choibalsan" },
1989
- { label: "Asia/Colombo", searchIndex: "asia/colombo||utc+05:30|sri lanka|lk", value: "Asia/Colombo" },
1990
- {
1991
- label: "Asia/Damascus",
1992
- searchIndex: "asia/damascus||utc+03:00|syrian arab republic|sy",
1993
- value: "Asia/Damascus"
1994
- },
1995
- { label: "Asia/Dhaka", searchIndex: "asia/dhaka||utc+06:00|bangladesh|bd", value: "Asia/Dhaka" },
1996
- { label: "Asia/Dili", searchIndex: "asia/dili||utc+09:00|timor-leste|tl", value: "Asia/Dili" },
1997
- {
1998
- label: "Asia/Dubai",
1999
- searchIndex: "asia/dubai||utc+04:00|united arab emirates|ae|oman|om|reunion|re|seychelles|sc|french southern territories|tf",
2000
- value: "Asia/Dubai"
2001
- },
2002
- { label: "Asia/Dushanbe", searchIndex: "asia/dushanbe||utc+05:00|tajikistan|tj", value: "Asia/Dushanbe" },
2003
- { label: "Asia/Famagusta", searchIndex: "asia/famagusta|eest|utc+03:00|cyprus|cy", value: "Asia/Famagusta" },
2004
- { label: "Asia/Gaza", searchIndex: "asia/gaza|eest|utc+03:00|palestine, state of|ps", value: "Asia/Gaza" },
2005
- { label: "Asia/Hebron", searchIndex: "asia/hebron|eest|utc+03:00|palestine, state of|ps", value: "Asia/Hebron" },
2006
- { label: "Asia/Ho_Chi_Minh", searchIndex: "asia/ho_chi_minh||utc+07:00|viet nam|vn", value: "Asia/Ho_Chi_Minh" },
2007
- { label: "Asia/Hong_Kong", searchIndex: "asia/hong_kong|hkt|utc+08:00|hong kong|hk", value: "Asia/Hong_Kong" },
2008
- { label: "Asia/Hovd", searchIndex: "asia/hovd||utc+07:00|mongolia|mn", value: "Asia/Hovd" },
2009
- { label: "Asia/Irkutsk", searchIndex: "asia/irkutsk||utc+08:00|russian federation|ru", value: "Asia/Irkutsk" },
2010
- { label: "Asia/Jakarta", searchIndex: "asia/jakarta|wib|utc+07:00|indonesia|id", value: "Asia/Jakarta" },
2011
- { label: "Asia/Jayapura", searchIndex: "asia/jayapura|wit|utc+09:00|indonesia|id", value: "Asia/Jayapura" },
2012
- { label: "Asia/Jerusalem", searchIndex: "asia/jerusalem|idt|utc+03:00|israel|il", value: "Asia/Jerusalem" },
2013
- { label: "Asia/Kabul", searchIndex: "asia/kabul||utc+04:30|afghanistan|af", value: "Asia/Kabul" },
2014
- {
2015
- label: "Asia/Kamchatka",
2016
- searchIndex: "asia/kamchatka||utc+12:00|russian federation|ru",
2017
- value: "Asia/Kamchatka"
2018
- },
2019
- { label: "Asia/Karachi", searchIndex: "asia/karachi|pkt|utc+05:00|pakistan|pk", value: "Asia/Karachi" },
2020
- { label: "Asia/Kathmandu", searchIndex: "asia/kathmandu||utc+05:45|nepal|np", value: "Asia/Kathmandu" },
2021
- { label: "Asia/Khandyga", searchIndex: "asia/khandyga||utc+09:00|russian federation|ru", value: "Asia/Khandyga" },
2022
- { label: "Asia/Kolkata", searchIndex: "asia/kolkata|ist|utc+05:30|india|in", value: "Asia/Kolkata" },
2023
- {
2024
- label: "Asia/Krasnoyarsk",
2025
- searchIndex: "asia/krasnoyarsk||utc+07:00|russian federation|ru",
2026
- value: "Asia/Krasnoyarsk"
2027
- },
2028
- {
2029
- label: "Asia/Kuala_Lumpur",
2030
- searchIndex: "asia/kuala_lumpur||utc+08:00|malaysia|my",
2031
- value: "Asia/Kuala_Lumpur"
2032
- },
2033
- {
2034
- label: "Asia/Kuching",
2035
- searchIndex: "asia/kuching||utc+08:00|brunei darussalam|bn|malaysia|my",
2036
- value: "Asia/Kuching"
2037
- },
2038
- { label: "Asia/Kuwait", searchIndex: "asia/kuwait||utc+03:00|kuwait|kw", value: "Asia/Kuwait" },
2039
- { label: "Asia/Macau", searchIndex: "asia/macau|cst|utc+08:00|macao|mo", value: "Asia/Macau" },
2040
- { label: "Asia/Magadan", searchIndex: "asia/magadan||utc+11:00|russian federation|ru", value: "Asia/Magadan" },
2041
- { label: "Asia/Makassar", searchIndex: "asia/makassar|wita|utc+08:00|indonesia|id", value: "Asia/Makassar" },
2042
- { label: "Asia/Manila", searchIndex: "asia/manila|pst|utc+08:00|philippines|ph", value: "Asia/Manila" },
2043
- { label: "Asia/Muscat", searchIndex: "asia/muscat||utc+04:00|oman|om", value: "Asia/Muscat" },
2044
- { label: "Asia/Nicosia", searchIndex: "asia/nicosia|eest|utc+03:00|cyprus|cy", value: "Asia/Nicosia" },
2045
- {
2046
- label: "Asia/Novokuznetsk",
2047
- searchIndex: "asia/novokuznetsk||utc+07:00|russian federation|ru",
2048
- value: "Asia/Novokuznetsk"
2049
- },
2050
- {
2051
- label: "Asia/Novosibirsk",
2052
- searchIndex: "asia/novosibirsk||utc+07:00|russian federation|ru",
2053
- value: "Asia/Novosibirsk"
2054
- },
2055
- { label: "Asia/Omsk", searchIndex: "asia/omsk||utc+06:00|russian federation|ru", value: "Asia/Omsk" },
2056
- { label: "Asia/Oral", searchIndex: "asia/oral||utc+05:00|kazakhstan|kz", value: "Asia/Oral" },
2057
- { label: "Asia/Phnom_Penh", searchIndex: "asia/phnom_penh||utc+07:00|cambodia|kh", value: "Asia/Phnom_Penh" },
2058
- { label: "Asia/Pontianak", searchIndex: "asia/pontianak|wib|utc+07:00|indonesia|id", value: "Asia/Pontianak" },
2059
- { label: "Asia/Qatar", searchIndex: "asia/qatar||utc+03:00|bahrain|bh|qatar|qa", value: "Asia/Qatar" },
2060
- { label: "Asia/Qostanay", searchIndex: "asia/qostanay||utc+06:00|kazakhstan|kz", value: "Asia/Qostanay" },
2061
- { label: "Asia/Qyzylorda", searchIndex: "asia/qyzylorda||utc+05:00|kazakhstan|kz", value: "Asia/Qyzylorda" },
2062
- {
2063
- label: "Asia/Riyadh",
2064
- searchIndex: "asia/riyadh||utc+03:00|antarctica|aq|kuwait|kw|saudi arabia|sa|yemen|ye",
2065
- value: "Asia/Riyadh"
2066
- },
2067
- { label: "Asia/Sakhalin", searchIndex: "asia/sakhalin||utc+11:00|russian federation|ru", value: "Asia/Sakhalin" },
2068
- { label: "Asia/Samarkand", searchIndex: "asia/samarkand||utc+05:00|uzbekistan|uz", value: "Asia/Samarkand" },
2069
- { label: "Asia/Seoul", searchIndex: "asia/seoul|kst|utc+09:00|korea|kr", value: "Asia/Seoul" },
2070
- { label: "Asia/Shanghai", searchIndex: "asia/shanghai|cst|utc+08:00|china|cn", value: "Asia/Shanghai" },
2071
- {
2072
- label: "Asia/Singapore",
2073
- searchIndex: "asia/singapore||utc+08:00|malaysia|my|singapore|sg",
2074
- value: "Asia/Singapore"
2075
- },
2076
- {
2077
- label: "Asia/Srednekolymsk",
2078
- searchIndex: "asia/srednekolymsk||utc+11:00|russian federation|ru",
2079
- value: "Asia/Srednekolymsk"
2080
- },
2081
- { label: "Asia/Taipei", searchIndex: "asia/taipei|cst|utc+08:00|taiwan|tw", value: "Asia/Taipei" },
2082
- { label: "Asia/Tashkent", searchIndex: "asia/tashkent||utc+05:00|uzbekistan|uz", value: "Asia/Tashkent" },
2083
- { label: "Asia/Tbilisi", searchIndex: "asia/tbilisi||utc+04:00|georgia|ge", value: "Asia/Tbilisi" },
2084
- {
2085
- label: "Asia/Tehran",
2086
- searchIndex: "asia/tehran||utc+03:30|iran (islamic republic of)|ir",
2087
- value: "Asia/Tehran"
2088
- },
2089
- { label: "Asia/Thimphu", searchIndex: "asia/thimphu||utc+06:00|bhutan|bt", value: "Asia/Thimphu" },
2090
- { label: "Asia/Tokyo", searchIndex: "asia/tokyo|jst|utc+09:00|japan|jp", value: "Asia/Tokyo" },
2091
- { label: "Asia/Tomsk", searchIndex: "asia/tomsk||utc+07:00|russian federation|ru", value: "Asia/Tomsk" },
2092
- { label: "Asia/Ulaanbaatar", searchIndex: "asia/ulaanbaatar||utc+08:00|mongolia|mn", value: "Asia/Ulaanbaatar" },
2093
- { label: "Asia/Urumqi", searchIndex: "asia/urumqi||utc+06:00|antarctica|aq|china|cn", value: "Asia/Urumqi" },
2094
- { label: "Asia/Ust-Nera", searchIndex: "asia/ust-nera||utc+10:00|russian federation|ru", value: "Asia/Ust-Nera" },
2095
- {
2096
- label: "Asia/Vientiane",
2097
- searchIndex: "asia/vientiane||utc+07:00|lao people's democratic republic|la",
2098
- value: "Asia/Vientiane"
2099
- },
2100
- {
2101
- label: "Asia/Vladivostok",
2102
- searchIndex: "asia/vladivostok||utc+10:00|russian federation|ru",
2103
- value: "Asia/Vladivostok"
2104
- },
2105
- { label: "Asia/Yakutsk", searchIndex: "asia/yakutsk||utc+09:00|russian federation|ru", value: "Asia/Yakutsk" },
2106
- {
2107
- label: "Asia/Yangon",
2108
- searchIndex: "asia/yangon||utc+06:30|cocos (keeling) islands|cc|myanmar|mm",
2109
- value: "Asia/Yangon"
2110
- },
2111
- {
2112
- label: "Asia/Yekaterinburg",
2113
- searchIndex: "asia/yekaterinburg||utc+05:00|russian federation|ru",
2114
- value: "Asia/Yekaterinburg"
2115
- },
2116
- { label: "Asia/Yerevan", searchIndex: "asia/yerevan||utc+04:00|armenia|am", value: "Asia/Yerevan" }
2117
- ]
2118
- },
2119
- {
2120
- label: "Atlantic",
2121
- options: [
2122
- { label: "Atlantic/Azores", searchIndex: "atlantic/azores||utc|portugal|pt", value: "Atlantic/Azores" },
2123
- {
2124
- label: "Atlantic/Bermuda",
2125
- searchIndex: "atlantic/bermuda|adt|utc-03:00|bermuda|bm",
2126
- value: "Atlantic/Bermuda"
2127
- },
2128
- { label: "Atlantic/Canary", searchIndex: "atlantic/canary|west|utc+01:00|spain|es", value: "Atlantic/Canary" },
2129
- {
2130
- label: "Atlantic/Cape_Verde",
2131
- searchIndex: "atlantic/cape_verde||utc-01:00|cape verde|cv",
2132
- value: "Atlantic/Cape_Verde"
2133
- },
2134
- {
2135
- label: "Atlantic/Faroe",
2136
- searchIndex: "atlantic/faroe|west|utc+01:00|faroe islands|fo",
2137
- value: "Atlantic/Faroe"
2138
- },
2139
- {
2140
- label: "Atlantic/Madeira",
2141
- searchIndex: "atlantic/madeira|west|utc+01:00|portugal|pt",
2142
- value: "Atlantic/Madeira"
2143
- },
2144
- {
2145
- label: "Atlantic/Reykjavik",
2146
- searchIndex: "atlantic/reykjavik|gmt|utc|iceland|is",
2147
- value: "Atlantic/Reykjavik"
2148
- },
2149
- {
2150
- label: "Atlantic/South_Georgia",
2151
- searchIndex: "atlantic/south_georgia||utc-02:00|south georgia and sandwich isl.|gs",
2152
- value: "Atlantic/South_Georgia"
2153
- },
2154
- {
2155
- label: "Atlantic/St_Helena",
2156
- searchIndex: "atlantic/st_helena|gmt|utc|saint helena|sh",
2157
- value: "Atlantic/St_Helena"
2158
- },
2159
- {
2160
- label: "Atlantic/Stanley",
2161
- searchIndex: "atlantic/stanley||utc-03:00|falkland islands (malvinas)|fk",
2162
- value: "Atlantic/Stanley"
2163
- }
2164
- ]
2165
- },
2166
- {
2167
- label: "Australia",
2168
- options: [
2169
- {
2170
- label: "Australia/Adelaide",
2171
- searchIndex: "australia/adelaide|acdt|utc+10:30|australia|au",
2172
- value: "Australia/Adelaide"
2173
- },
2174
- {
2175
- label: "Australia/Brisbane",
2176
- searchIndex: "australia/brisbane|aest|utc+10:00|australia|au",
2177
- value: "Australia/Brisbane"
2178
- },
2179
- {
2180
- label: "Australia/Broken_Hill",
2181
- searchIndex: "australia/broken_hill|acdt|utc+10:30|australia|au",
2182
- value: "Australia/Broken_Hill"
2183
- },
2184
- {
2185
- label: "Australia/Darwin",
2186
- searchIndex: "australia/darwin|acst|utc+09:30|australia|au",
2187
- value: "Australia/Darwin"
2188
- },
2189
- { label: "Australia/Eucla", searchIndex: "australia/eucla||utc+08:45|australia|au", value: "Australia/Eucla" },
2190
- {
2191
- label: "Australia/Hobart",
2192
- searchIndex: "australia/hobart|aedt|utc+11:00|australia|au",
2193
- value: "Australia/Hobart"
2194
- },
2195
- {
2196
- label: "Australia/Lindeman",
2197
- searchIndex: "australia/lindeman|aest|utc+10:00|australia|au",
2198
- value: "Australia/Lindeman"
2199
- },
2200
- {
2201
- label: "Australia/Lord_Howe",
2202
- searchIndex: "australia/lord_howe||utc+11:00|australia|au",
2203
- value: "Australia/Lord_Howe"
2204
- },
2205
- {
2206
- label: "Australia/Melbourne",
2207
- searchIndex: "australia/melbourne|aedt|utc+11:00|australia|au",
2208
- value: "Australia/Melbourne"
2209
- },
2210
- {
2211
- label: "Australia/Perth",
2212
- searchIndex: "australia/perth|awst|utc+08:00|australia|au",
2213
- value: "Australia/Perth"
2214
- },
2215
- {
2216
- label: "Australia/Sydney",
2217
- searchIndex: "australia/sydney|aedt|utc+11:00|australia|au",
2218
- value: "Australia/Sydney"
2219
- }
2220
- ]
2221
- },
2222
- {
2223
- label: "Europe",
2224
- options: [
2225
- {
2226
- label: "Europe/Amsterdam",
2227
- searchIndex: "europe/amsterdam|cest|utc+02:00|netherlands|nl",
2228
- value: "Europe/Amsterdam"
2229
- },
2230
- { label: "Europe/Andorra", searchIndex: "europe/andorra|cest|utc+02:00|andorra|ad", value: "Europe/Andorra" },
2231
- {
2232
- label: "Europe/Astrakhan",
2233
- searchIndex: "europe/astrakhan||utc+04:00|russian federation|ru",
2234
- value: "Europe/Astrakhan"
2235
- },
2236
- { label: "Europe/Athens", searchIndex: "europe/athens|eest|utc+03:00|greece|gr", value: "Europe/Athens" },
2237
- {
2238
- label: "Europe/Belgrade",
2239
- searchIndex: "europe/belgrade|cest|utc+02:00|bosnia and herzegovina|ba|croatia|hr|montenegro|me|macedonia|mk|serbia|rs|slovenia|si",
2240
- value: "Europe/Belgrade"
2241
- },
2242
- {
2243
- label: "Europe/Berlin",
2244
- searchIndex: "europe/berlin|cest|utc+02:00|germany|de|denmark|dk|norway|no|sweden|se|svalbard and jan mayen|sj",
2245
- value: "Europe/Berlin"
2246
- },
2247
- {
2248
- label: "Europe/Bratislava",
2249
- searchIndex: "europe/bratislava|cest|utc+02:00|slovakia|sk",
2250
- value: "Europe/Bratislava"
2251
- },
2252
- {
2253
- label: "Europe/Brussels",
2254
- searchIndex: "europe/brussels|cest|utc+02:00|belgium|be|luxembourg|lu|netherlands|nl",
2255
- value: "Europe/Brussels"
2256
- },
2257
- {
2258
- label: "Europe/Bucharest",
2259
- searchIndex: "europe/bucharest|eest|utc+03:00|romania|ro",
2260
- value: "Europe/Bucharest"
2261
- },
2262
- { label: "Europe/Budapest", searchIndex: "europe/budapest|cest|utc+02:00|hungary|hu", value: "Europe/Budapest" },
2263
- { label: "Europe/Busingen", searchIndex: "europe/busingen|cest|utc+02:00|germany|de", value: "Europe/Busingen" },
2264
- { label: "Europe/Chisinau", searchIndex: "europe/chisinau|eest|utc+03:00|moldova|md", value: "Europe/Chisinau" },
2265
- {
2266
- label: "Europe/Copenhagen",
2267
- searchIndex: "europe/copenhagen|cest|utc+02:00|denmark|dk",
2268
- value: "Europe/Copenhagen"
2269
- },
2270
- { label: "Europe/Dublin", searchIndex: "europe/dublin|ist|utc+01:00|ireland|ie", value: "Europe/Dublin" },
2271
- {
2272
- label: "Europe/Gibraltar",
2273
- searchIndex: "europe/gibraltar|cest|utc+02:00|gibraltar|gi",
2274
- value: "Europe/Gibraltar"
2275
- },
2276
- { label: "Europe/Guernsey", searchIndex: "europe/guernsey|bst|utc+01:00|guernsey|gg", value: "Europe/Guernsey" },
2277
- {
2278
- label: "Europe/Helsinki",
2279
- searchIndex: "europe/helsinki|eest|utc+03:00|aland islands|ax|finland|fi",
2280
- value: "Europe/Helsinki"
2281
- },
2282
- {
2283
- label: "Europe/Isle_of_Man",
2284
- searchIndex: "europe/isle_of_man|bst|utc+01:00|isle of man|im",
2285
- value: "Europe/Isle_of_Man"
2286
- },
2287
- { label: "Europe/Istanbul", searchIndex: "europe/istanbul||utc+03:00|turkey|tr", value: "Europe/Istanbul" },
2288
- { label: "Europe/Jersey", searchIndex: "europe/jersey|bst|utc+01:00|jersey|je", value: "Europe/Jersey" },
2289
- {
2290
- label: "Europe/Kaliningrad",
2291
- searchIndex: "europe/kaliningrad|eet|utc+02:00|russian federation|ru",
2292
- value: "Europe/Kaliningrad"
2293
- },
2294
- { label: "Europe/Kirov", searchIndex: "europe/kirov|msk|utc+03:00|russian federation|ru", value: "Europe/Kirov" },
2295
- { label: "Europe/Kyiv", searchIndex: "europe/kyiv|eest|utc+03:00|ukraine|ua", value: "Europe/Kyiv" },
2296
- { label: "Europe/Lisbon", searchIndex: "europe/lisbon|west|utc+01:00|portugal|pt", value: "Europe/Lisbon" },
2297
- {
2298
- label: "Europe/Ljubljana",
2299
- searchIndex: "europe/ljubljana|cest|utc+02:00|slovenia|si",
2300
- value: "Europe/Ljubljana"
2301
- },
2302
- {
2303
- label: "Europe/London",
2304
- searchIndex: "europe/london|bst|utc+01:00|united kingdom|gb|guernsey|gg|isle of man|im|jersey|je",
2305
- value: "Europe/London"
2306
- },
2307
- {
2308
- label: "Europe/Luxembourg",
2309
- searchIndex: "europe/luxembourg|cest|utc+02:00|luxembourg|lu",
2310
- value: "Europe/Luxembourg"
2311
- },
2312
- { label: "Europe/Madrid", searchIndex: "europe/madrid|cest|utc+02:00|spain|es", value: "Europe/Madrid" },
2313
- { label: "Europe/Malta", searchIndex: "europe/malta|cest|utc+02:00|malta|mt", value: "Europe/Malta" },
2314
- {
2315
- label: "Europe/Mariehamn",
2316
- searchIndex: "europe/mariehamn|eest|utc+03:00|aland islands|ax",
2317
- value: "Europe/Mariehamn"
2318
- },
2319
- { label: "Europe/Minsk", searchIndex: "europe/minsk||utc+03:00|belarus|by", value: "Europe/Minsk" },
2320
- { label: "Europe/Monaco", searchIndex: "europe/monaco|cest|utc+02:00|monaco|mc", value: "Europe/Monaco" },
2321
- {
2322
- label: "Europe/Moscow",
2323
- searchIndex: "europe/moscow|msk|utc+03:00|russian federation|ru",
2324
- value: "Europe/Moscow"
2325
- },
2326
- { label: "Europe/Oslo", searchIndex: "europe/oslo|cest|utc+02:00|norway|no", value: "Europe/Oslo" },
2327
- { label: "Europe/Paris", searchIndex: "europe/paris|cest|utc+02:00|france|fr|monaco|mc", value: "Europe/Paris" },
2328
- {
2329
- label: "Europe/Podgorica",
2330
- searchIndex: "europe/podgorica|cest|utc+02:00|montenegro|me",
2331
- value: "Europe/Podgorica"
2332
- },
2333
- {
2334
- label: "Europe/Prague",
2335
- searchIndex: "europe/prague|cest|utc+02:00|czech republic|cz|slovakia|sk",
2336
- value: "Europe/Prague"
2337
- },
2338
- { label: "Europe/Riga", searchIndex: "europe/riga|eest|utc+03:00|latvia|lv", value: "Europe/Riga" },
2339
- {
2340
- label: "Europe/Rome",
2341
- searchIndex: "europe/rome|cest|utc+02:00|italy|it|san marino|sm|holy see (vatican city state)|va",
2342
- value: "Europe/Rome"
2343
- },
2344
- { label: "Europe/Samara", searchIndex: "europe/samara||utc+04:00|russian federation|ru", value: "Europe/Samara" },
2345
- {
2346
- label: "Europe/San_Marino",
2347
- searchIndex: "europe/san_marino|cest|utc+02:00|san marino|sm",
2348
- value: "Europe/San_Marino"
2349
- },
2350
- {
2351
- label: "Europe/Sarajevo",
2352
- searchIndex: "europe/sarajevo|cest|utc+02:00|bosnia and herzegovina|ba",
2353
- value: "Europe/Sarajevo"
2354
- },
2355
- {
2356
- label: "Europe/Saratov",
2357
- searchIndex: "europe/saratov||utc+04:00|russian federation|ru",
2358
- value: "Europe/Saratov"
2359
- },
2360
- {
2361
- label: "Europe/Simferopol",
2362
- searchIndex: "europe/simferopol|msk|utc+03:00|russian federation|ru|ukraine|ua",
2363
- value: "Europe/Simferopol"
2364
- },
2365
- { label: "Europe/Skopje", searchIndex: "europe/skopje|cest|utc+02:00|macedonia|mk", value: "Europe/Skopje" },
2366
- { label: "Europe/Sofia", searchIndex: "europe/sofia|eest|utc+03:00|bulgaria|bg", value: "Europe/Sofia" },
2367
- {
2368
- label: "Europe/Stockholm",
2369
- searchIndex: "europe/stockholm|cest|utc+02:00|sweden|se",
2370
- value: "Europe/Stockholm"
2371
- },
2372
- { label: "Europe/Tallinn", searchIndex: "europe/tallinn|eest|utc+03:00|estonia|ee", value: "Europe/Tallinn" },
2373
- { label: "Europe/Tirane", searchIndex: "europe/tirane|cest|utc+02:00|albania|al", value: "Europe/Tirane" },
2374
- {
2375
- label: "Europe/Ulyanovsk",
2376
- searchIndex: "europe/ulyanovsk||utc+04:00|russian federation|ru",
2377
- value: "Europe/Ulyanovsk"
2378
- },
2379
- { label: "Europe/Vaduz", searchIndex: "europe/vaduz|cest|utc+02:00|liechtenstein|li", value: "Europe/Vaduz" },
2380
- {
2381
- label: "Europe/Vatican",
2382
- searchIndex: "europe/vatican|cest|utc+02:00|holy see (vatican city state)|va",
2383
- value: "Europe/Vatican"
2384
- },
2385
- { label: "Europe/Vienna", searchIndex: "europe/vienna|cest|utc+02:00|austria|at", value: "Europe/Vienna" },
2386
- { label: "Europe/Vilnius", searchIndex: "europe/vilnius|eest|utc+03:00|lithuania|lt", value: "Europe/Vilnius" },
2387
- {
2388
- label: "Europe/Volgograd",
2389
- searchIndex: "europe/volgograd|msk|utc+03:00|russian federation|ru",
2390
- value: "Europe/Volgograd"
2391
- },
2392
- { label: "Europe/Warsaw", searchIndex: "europe/warsaw|cest|utc+02:00|poland|pl", value: "Europe/Warsaw" },
2393
- { label: "Europe/Zagreb", searchIndex: "europe/zagreb|cest|utc+02:00|croatia|hr", value: "Europe/Zagreb" },
2394
- {
2395
- label: "Europe/Zurich",
2396
- searchIndex: "europe/zurich|cest|utc+02:00|switzerland|ch|germany|de|liechtenstein|li",
2397
- value: "Europe/Zurich"
2398
- }
2399
- ]
2400
- },
2401
- {
2402
- label: "Indian",
2403
- options: [
2404
- {
2405
- label: "Indian/Antananarivo",
2406
- searchIndex: "indian/antananarivo|eat|utc+03:00|madagascar|mg",
2407
- value: "Indian/Antananarivo"
2408
- },
2409
- {
2410
- label: "Indian/Chagos",
2411
- searchIndex: "indian/chagos||utc+06:00|british indian ocean territory|io",
2412
- value: "Indian/Chagos"
2413
- },
2414
- {
2415
- label: "Indian/Christmas",
2416
- searchIndex: "indian/christmas||utc+07:00|christmas island|cx",
2417
- value: "Indian/Christmas"
2418
- },
2419
- {
2420
- label: "Indian/Cocos",
2421
- searchIndex: "indian/cocos||utc+06:30|cocos (keeling) islands|cc",
2422
- value: "Indian/Cocos"
2423
- },
2424
- { label: "Indian/Comoro", searchIndex: "indian/comoro|eat|utc+03:00|comoros|km", value: "Indian/Comoro" },
2425
- {
2426
- label: "Indian/Kerguelen",
2427
- searchIndex: "indian/kerguelen||utc+05:00|french southern territories|tf",
2428
- value: "Indian/Kerguelen"
2429
- },
2430
- { label: "Indian/Mahe", searchIndex: "indian/mahe||utc+04:00|seychelles|sc", value: "Indian/Mahe" },
2431
- {
2432
- label: "Indian/Maldives",
2433
- searchIndex: "indian/maldives||utc+05:00|maldives|mv|french southern territories|tf",
2434
- value: "Indian/Maldives"
2435
- },
2436
- { label: "Indian/Mauritius", searchIndex: "indian/mauritius||utc+04:00|mauritius|mu", value: "Indian/Mauritius" },
2437
- { label: "Indian/Mayotte", searchIndex: "indian/mayotte|eat|utc+03:00|mayotte|yt", value: "Indian/Mayotte" },
2438
- { label: "Indian/Reunion", searchIndex: "indian/reunion||utc+04:00|reunion|re", value: "Indian/Reunion" }
2439
- ]
2440
- },
2441
- {
2442
- label: "Pacific",
2443
- options: [
2444
- { label: "Pacific/Apia", searchIndex: "pacific/apia||utc+13:00|samoa|ws", value: "Pacific/Apia" },
2445
- {
2446
- label: "Pacific/Auckland",
2447
- searchIndex: "pacific/auckland|nzdt|utc+13:00|antarctica|aq|new zealand|nz",
2448
- value: "Pacific/Auckland"
2449
- },
2450
- {
2451
- label: "Pacific/Bougainville",
2452
- searchIndex: "pacific/bougainville||utc+11:00|papua new guinea|pg",
2453
- value: "Pacific/Bougainville"
2454
- },
2455
- { label: "Pacific/Chatham", searchIndex: "pacific/chatham||utc+13:45|new zealand|nz", value: "Pacific/Chatham" },
2456
- {
2457
- label: "Pacific/Chuuk",
2458
- searchIndex: "pacific/chuuk||utc+10:00|micronesia (federated states of)|fm",
2459
- value: "Pacific/Chuuk"
2460
- },
2461
- { label: "Pacific/Easter", searchIndex: "pacific/easter||utc-05:00|chile|cl", value: "Pacific/Easter" },
2462
- { label: "Pacific/Efate", searchIndex: "pacific/efate||utc+11:00|vanuatu|vu", value: "Pacific/Efate" },
2463
- { label: "Pacific/Fakaofo", searchIndex: "pacific/fakaofo||utc+13:00|tokelau|tk", value: "Pacific/Fakaofo" },
2464
- { label: "Pacific/Fiji", searchIndex: "pacific/fiji||utc+12:00|fiji|fj", value: "Pacific/Fiji" },
2465
- { label: "Pacific/Funafuti", searchIndex: "pacific/funafuti||utc+12:00|tuvalu|tv", value: "Pacific/Funafuti" },
2466
- {
2467
- label: "Pacific/Galapagos",
2468
- searchIndex: "pacific/galapagos||utc-06:00|ecuador|ec",
2469
- value: "Pacific/Galapagos"
2470
- },
2471
- {
2472
- label: "Pacific/Gambier",
2473
- searchIndex: "pacific/gambier||utc-09:00|french polynesia|pf",
2474
- value: "Pacific/Gambier"
2475
- },
2476
- {
2477
- label: "Pacific/Guadalcanal",
2478
- searchIndex: "pacific/guadalcanal||utc+11:00|micronesia (federated states of)|fm|solomon islands|sb",
2479
- value: "Pacific/Guadalcanal"
2480
- },
2481
- {
2482
- label: "Pacific/Guam",
2483
- searchIndex: "pacific/guam|chst|utc+10:00|guam|gu|northern mariana islands|mp",
2484
- value: "Pacific/Guam"
2485
- },
2486
- {
2487
- label: "Pacific/Honolulu",
2488
- searchIndex: "pacific/honolulu|hst|utc-10:00|united states|us",
2489
- value: "Pacific/Honolulu"
2490
- },
2491
- { label: "Pacific/Kanton", searchIndex: "pacific/kanton||utc+13:00|kiribati|ki", value: "Pacific/Kanton" },
2492
- {
2493
- label: "Pacific/Kiritimati",
2494
- searchIndex: "pacific/kiritimati||utc+14:00|kiribati|ki",
2495
- value: "Pacific/Kiritimati"
2496
- },
2497
- {
2498
- label: "Pacific/Kosrae",
2499
- searchIndex: "pacific/kosrae||utc+11:00|micronesia (federated states of)|fm",
2500
- value: "Pacific/Kosrae"
2501
- },
2502
- {
2503
- label: "Pacific/Kwajalein",
2504
- searchIndex: "pacific/kwajalein||utc+12:00|marshall islands|mh",
2505
- value: "Pacific/Kwajalein"
2506
- },
2507
- {
2508
- label: "Pacific/Majuro",
2509
- searchIndex: "pacific/majuro||utc+12:00|marshall islands|mh",
2510
- value: "Pacific/Majuro"
2511
- },
2512
- {
2513
- label: "Pacific/Marquesas",
2514
- searchIndex: "pacific/marquesas||utc-09:30|french polynesia|pf",
2515
- value: "Pacific/Marquesas"
2516
- },
2517
- {
2518
- label: "Pacific/Midway",
2519
- searchIndex: "pacific/midway|sst|utc-11:00|united states outlying islands|um",
2520
- value: "Pacific/Midway"
2521
- },
2522
- { label: "Pacific/Nauru", searchIndex: "pacific/nauru||utc+12:00|nauru|nr", value: "Pacific/Nauru" },
2523
- { label: "Pacific/Niue", searchIndex: "pacific/niue||utc-11:00|niue|nu", value: "Pacific/Niue" },
2524
- {
2525
- label: "Pacific/Norfolk",
2526
- searchIndex: "pacific/norfolk||utc+12:00|norfolk island|nf",
2527
- value: "Pacific/Norfolk"
2528
- },
2529
- { label: "Pacific/Noumea", searchIndex: "pacific/noumea||utc+11:00|new caledonia|nc", value: "Pacific/Noumea" },
2530
- {
2531
- label: "Pacific/Pago_Pago",
2532
- searchIndex: "pacific/pago_pago|sst|utc-11:00|american samoa|as|united states outlying islands|um",
2533
- value: "Pacific/Pago_Pago"
2534
- },
2535
- { label: "Pacific/Palau", searchIndex: "pacific/palau||utc+09:00|palau|pw", value: "Pacific/Palau" },
2536
- { label: "Pacific/Pitcairn", searchIndex: "pacific/pitcairn||utc-08:00|pitcairn|pn", value: "Pacific/Pitcairn" },
2537
- {
2538
- label: "Pacific/Pohnpei",
2539
- searchIndex: "pacific/pohnpei||utc+11:00|micronesia (federated states of)|fm",
2540
- value: "Pacific/Pohnpei"
2541
- },
2542
- {
2543
- label: "Pacific/Port_Moresby",
2544
- searchIndex: "pacific/port_moresby||utc+10:00|antarctica|aq|micronesia (federated states of)|fm|papua new guinea|pg",
2545
- value: "Pacific/Port_Moresby"
2546
- },
2547
- {
2548
- label: "Pacific/Rarotonga",
2549
- searchIndex: "pacific/rarotonga||utc-10:00|cook islands|ck",
2550
- value: "Pacific/Rarotonga"
2551
- },
2552
- {
2553
- label: "Pacific/Saipan",
2554
- searchIndex: "pacific/saipan|chst|utc+10:00|northern mariana islands|mp",
2555
- value: "Pacific/Saipan"
2556
- },
2557
- {
2558
- label: "Pacific/Tahiti",
2559
- searchIndex: "pacific/tahiti||utc-10:00|french polynesia|pf",
2560
- value: "Pacific/Tahiti"
2561
- },
2562
- {
2563
- label: "Pacific/Tarawa",
2564
- searchIndex: "pacific/tarawa||utc+12:00|kiribati|ki|marshall islands|mh|tuvalu|tv|united states outlying islands|um|wallis and futuna|wf",
2565
- value: "Pacific/Tarawa"
2566
- },
2567
- { label: "Pacific/Tongatapu", searchIndex: "pacific/tongatapu||utc+13:00|tonga|to", value: "Pacific/Tongatapu" },
2568
- {
2569
- label: "Pacific/Wake",
2570
- searchIndex: "pacific/wake||utc+12:00|united states outlying islands|um",
2571
- value: "Pacific/Wake"
2572
- },
2573
- {
2574
- label: "Pacific/Wallis",
2575
- searchIndex: "pacific/wallis||utc+12:00|wallis and futuna|wf",
2576
- value: "Pacific/Wallis"
2577
- }
2578
- ]
2579
- }
2580
- ];
2581
- const getTimezoneDetails = () => {
2582
- const browserTimeZone = dayjs.tz.guess();
2583
- const defaultTimezoneList = [];
2584
- const list = timezoneData.map((group) => {
2585
- return {
2586
- label: group.label,
2587
- options: group.options.map((option) => {
2588
- const info = {
2589
- ...option,
2590
- ...getTimezoneInfo(option.searchIndex)
2591
- };
2592
- if (option.value === browserTimeZone) {
2593
- defaultTimezoneList.push({
2594
- ...option,
2595
- ...info,
2596
- label: info.label
2597
- });
2598
- }
2599
- return info;
2600
- })
2601
- };
2602
- });
2603
- list.unshift({
2604
- label: "",
2605
- options: defaultTimezoneList
2606
- });
2607
- return list;
2608
- };
2609
- const getTimezoneInfo = (searchIndex) => {
2610
- const list = searchIndex.split("|");
2611
- return {
2612
- abbreviation: list[1].toLocaleUpperCase(),
2613
- country: (list[3] || "").replace(/(\b\w)/g, (v) => v.toLocaleUpperCase()),
2614
- countryCode: list[4] || "",
2615
- utc: list[2].toLocaleUpperCase()
2616
- };
2617
- };
2618
- const timezoneDetails = getTimezoneDetails();
2619
- const getTimezoneInfoByValue = (value) => {
2620
- return timezoneDetails.reduce((pre, group) => {
2621
- if ((pre == null ? void 0 : pre.label) === value)
2622
- return pre;
2623
- return group.options.find((option) => option.label === value);
2624
- }, {});
2625
- };
2626
- const _hoisted_1$2 = { class: "option-name" };
2627
- const _hoisted_2$2 = { class: "option-country" };
2628
- const _hoisted_3$2 = { class: "option-utc" };
2629
- const _hoisted_4$1 = { class: "option-name" };
2630
- const _hoisted_5$1 = { class: "option-country" };
2631
- const _hoisted_6$1 = { class: "option-utc" };
2632
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2633
- __name: "timezone-picker",
2634
- props: {
2635
- value: {}
2636
- },
2637
- emits: ["change"],
2638
- setup(__props, { emit: __emit }) {
2639
- const emits = __emit;
2640
- const timezoneData2 = shallowRef(timezoneDetails);
2641
- const handleChange = (val) => {
2642
- const info = getTimezoneInfoByValue(val);
2643
- emits("change", val, info);
2644
- };
2645
- return (_ctx, _cache) => {
2646
- return openBlock(), createBlock(unref(Select), {
2647
- "model-value": _ctx.value,
2648
- class: "timezone-picker",
2649
- filterable: "",
2650
- "input-search": "",
2651
- clearable: false,
2652
- placeholder: unref(t)("请输入搜索(国家,城市,简称)"),
2653
- "no-match-text": unref(t)("无匹配数据"),
2654
- "popover-options": { "ext-cls": "__bk-date-picker-popover__" },
2655
- onChange: handleChange
2656
- }, {
2657
- default: withCtx(() => [
2658
- (openBlock(true), createElementBlock(Fragment, null, renderList(timezoneData2.value, (group) => {
2659
- return openBlock(), createElementBlock(Fragment, null, [
2660
- group.label.length < 1 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(group.options, (item) => {
2661
- return openBlock(), createBlock(unref(Select).Option, {
2662
- id: item.label,
2663
- name: item.label,
2664
- key: item.label
2665
- }, {
2666
- default: withCtx(() => [
2667
- createElementVNode("div", {
2668
- class: normalizeClass({
2669
- "timezone-picker-option": true,
2670
- "is-selected": item.label === _ctx.value
2671
- })
2672
- }, [
2673
- createElementVNode("span", _hoisted_1$2, toDisplayString(unref(t)("浏览器时间")) + " " + toDisplayString(item.label), 1),
2674
- createElementVNode("span", _hoisted_2$2, toDisplayString(item.country) + ", " + toDisplayString(item.abbreviation), 1),
2675
- createElementVNode("span", _hoisted_3$2, toDisplayString(item.utc), 1)
2676
- ], 2)
2677
- ]),
2678
- _: 2
2679
- }, 1032, ["id", "name"]);
2680
- }), 128)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2681
- group.options.length ? (openBlock(), createBlock(unref(Select).Group, {
2682
- key: group.label,
2683
- label: group.label
2684
- }, {
2685
- default: withCtx(() => [
2686
- (openBlock(true), createElementBlock(Fragment, null, renderList(group.options, (item) => {
2687
- return openBlock(), createBlock(unref(Select).Option, {
2688
- id: item.label,
2689
- name: item.label,
2690
- key: item.label
2691
- }, {
2692
- default: withCtx(() => [
2693
- createElementVNode("div", {
2694
- class: normalizeClass({
2695
- "timezone-picker-option": true,
2696
- "is-selected": item.label === _ctx.value
2697
- })
2698
- }, [
2699
- createElementVNode("span", _hoisted_4$1, toDisplayString(item.label), 1),
2700
- createElementVNode("span", _hoisted_5$1, toDisplayString(item.country) + ", " + toDisplayString(item.abbreviation), 1),
2701
- createElementVNode("span", _hoisted_6$1, toDisplayString(item.utc), 1)
2702
- ], 2)
2703
- ]),
2704
- _: 2
2705
- }, 1032, ["id", "name"]);
2706
- }), 128))
2707
- ]),
2708
- _: 2
2709
- }, 1032, ["label"])) : createCommentVNode("", true)
2710
- ], 64))
2711
- ], 64);
2712
- }), 256))
2713
- ]),
2714
- _: 1
2715
- }, 8, ["model-value", "placeholder", "no-match-text"]);
2716
- };
2717
- }
2718
- });
2719
- const timezonePicker_vue_vue_type_style_index_0_lang = "";
2720
- const _hoisted_1$1 = { class: "panel-wrapper" };
2721
- const _hoisted_2$1 = { class: "common-date-list" };
2722
- const _hoisted_3$1 = ["onClick"];
2723
- const _hoisted_4 = { class: "common-wrapper" };
2724
- const _hoisted_5 = { class: "empty-tips" };
2725
- const _hoisted_6 = { class: "time-zone-panel" };
2726
- const _hoisted_7 = { class: "time-zone" };
2727
- const _hoisted_8 = { class: "time-zone-area" };
2728
- const _hoisted_9 = { class: "time-zone-tag" };
2729
- const _hoisted_10 = { class: "time-zone-picker" };
2730
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2731
- __name: "panel-wrapper",
2732
- props: {
2733
- defaultValue: {},
2734
- timezone: {}
2735
- },
2736
- emits: ["change", "update:timezone"],
2737
- setup(__props, { emit: __emit }) {
2738
- const props = __props;
2739
- const { format, storeKey: storeKey2, timezoneInfo } = useDatePickertInject();
2740
- const emits = __emit;
2741
- const timezoneSet = ref(false);
2742
- const commonDateList = [
2743
- ["now-5m", "now"],
2744
- ["now-15m", "now"],
2745
- ["now-30m", "now"],
2746
- ["now-1h", "now"],
2747
- ["now-3h", "now"],
2748
- ["now-6h", "now"],
2749
- ["now-12h", "now"],
2750
- ["now-24h", "now"],
2751
- ["now-2d", "now"],
2752
- ["now-7d", "now"],
2753
- ["now-30d", "now"],
2754
- ["now/d", "now/d"],
2755
- ["now-1d/d", "now-1d/d"],
2756
- ["now-2d/d", "now-2d/d"],
2757
- ["now-3d/d", "now-1d/d"],
2758
- ["now-1w/w", "now-1w/w"],
2759
- ["now/d", "now"],
2760
- ["now/w", "now/w"],
2761
- ["now/w", "now"],
2762
- ["now/M", "now/M"],
2763
- ["now/M", "now"],
2764
- ["now-1M/M", "now-1M/M"],
2765
- ["now-1M/M", "now"]
2766
- ];
2767
- const activePanel = ref("common");
2768
- const activeDatePickTab = ref(getDateValueMode(props.defaultValue));
2769
- const localDateValue = ref(props.defaultValue);
2770
- const browserTimezone = dayjs.tz.guess();
2771
- const recentUseList = computed(() => getStoreDateList(storeKey2.value));
2772
- const dateList = computed(() => activePanel.value === "common" ? commonDateList : recentUseList.value);
2773
- const handleChange = (value) => {
2774
- localDateValue.value = value;
2775
- emits("change", value);
2776
- };
2777
- const getComponent = () => {
2778
- switch (activeDatePickTab.value) {
2779
- case DateMode.RECENT:
2780
- case DateMode.FUTURE:
2781
- return _sfc_main$3;
2782
- case DateMode.NATURAL:
2783
- return _sfc_main$4;
2784
- case DateMode.Date:
2785
- default:
2786
- return _sfc_main$5;
2787
- }
2788
- };
2789
- const handleToggleTimezoneSet = () => {
2790
- timezoneSet.value = !timezoneSet.value;
2791
- };
2792
- const handleTimezoneChange = (v, info) => {
2793
- emits("update:timezone", v, info);
2794
- };
2795
- return (_ctx, _cache) => {
2796
- return openBlock(), createElementBlock("div", _hoisted_1$1, [
2797
- createVNode(_sfc_main$8, {
2798
- modelValue: activePanel.value,
2799
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activePanel.value = $event),
2800
- panels: unref(panels)
2801
- }, null, 8, ["modelValue", "panels"]),
2802
- createElementVNode("div", null, [
2803
- createElementVNode("ul", _hoisted_2$1, [
2804
- (openBlock(true), createElementBlock(Fragment, null, renderList(dateList.value, (date, index) => {
2805
- return openBlock(), createElementBlock("li", {
2806
- class: normalizeClass({
2807
- "list-item": true,
2808
- "is-recent-item": activePanel.value === "recent"
2809
- }),
2810
- key: index,
2811
- onClick: ($event) => handleChange(date)
2812
- }, toDisplayString(unref(getDateValueToString)(date, unref(format))), 11, _hoisted_3$1);
2813
- }), 128))
2814
- ])
2815
- ]),
2816
- withDirectives(createElementVNode("div", _hoisted_4, [
2817
- createVNode(unref(Exception), {
2818
- type: "empty",
2819
- scene: "part",
2820
- class: "empty-content"
2821
- }),
2822
- createElementVNode("div", _hoisted_5, toDisplayString(unref(t)("暂无最近使用记录")), 1)
2823
- ], 512), [
2824
- [vShow, dateList.value.length < 1]
2825
- ]),
2826
- createVNode(_sfc_main$8, {
2827
- class: "date-pick-tab",
2828
- modelValue: activeDatePickTab.value,
2829
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => activeDatePickTab.value = $event),
2830
- panels: unref(datePickTabList)
2831
- }, null, 8, ["modelValue", "panels"]),
2832
- (openBlock(), createBlock(KeepAlive, null, [
2833
- (openBlock(), createBlock(resolveDynamicComponent(getComponent()), {
2834
- key: activeDatePickTab.value,
2835
- type: activeDatePickTab.value,
2836
- value: localDateValue.value,
2837
- onChange: handleChange
2838
- }, null, 40, ["type", "value"]))
2839
- ], 1024)),
2840
- createElementVNode("div", _hoisted_6, [
2841
- createTextVNode(toDisplayString(unref(timezoneInfo).label === unref(browserTimezone) ? unref(t)("浏览器时间") : "") + " ", 1),
2842
- createElementVNode("span", _hoisted_7, [
2843
- createTextVNode(toDisplayString(unref(timezoneInfo).label) + " ", 1),
2844
- createElementVNode("span", _hoisted_8, toDisplayString(unref(timezoneInfo).country) + ", " + toDisplayString(unref(timezoneInfo).abbreviation), 1)
2845
- ]),
2846
- createElementVNode("span", _hoisted_9, toDisplayString(unref(timezoneInfo).utc), 1),
2847
- createVNode(unref(Button), {
2848
- theme: "primary",
2849
- size: "small",
2850
- text: true,
2851
- onClick: handleToggleTimezoneSet
2852
- }, {
2853
- default: withCtx(() => [
2854
- createTextVNode(toDisplayString(unref(t)("时区设置")), 1)
2855
- ]),
2856
- _: 1
2857
- })
2858
- ]),
2859
- withDirectives(createElementVNode("div", _hoisted_10, [
2860
- createVNode(_sfc_main$2, {
2861
- value: _ctx.timezone || unref(browserTimezone),
2862
- onChange: handleTimezoneChange
2863
- }, null, 8, ["value"])
2864
- ], 512), [
2865
- [vShow, timezoneSet.value]
2866
- ])
2867
- ]);
2868
- };
2869
- }
2870
- });
2871
- const panelWrapper_vue_vue_type_style_index_0_lang = "";
2872
- const _hoisted_1 = /* @__PURE__ */ createElementVNode("svg", {
2873
- class: "date-content-icon",
2874
- viewBox: "0 0 1024 1024",
2875
- version: "1.1",
2876
- xmlns: "http://www.w3.org/2000/svg",
2877
- "xmlns:xlink": "http://www.w3.org/1999/xlink",
2878
- width: "14",
2879
- height: "14"
2880
- }, [
2881
- /* @__PURE__ */ createElementVNode("path", {
2882
- d: "M486.656 997.312c-268.288 0-486.656-218.304-486.656-486.656 0-268.288 218.304-486.656 486.656-486.656 268.352 0 486.656 218.304 486.656 486.656C973.376 779.008 755.008 997.312 486.656 997.312zM486.656 88c-233.088 0-422.656 189.568-422.656 422.656 0 233.088 189.568 422.656 422.656 422.656s422.656-189.632 422.656-422.656C909.376 277.568 719.744 88 486.656 88z",
2883
- fill: "#979BA5"
2884
- }),
2885
- /* @__PURE__ */ createElementVNode("path", {
2886
- d: "M816.064 544 432.064 544 432.064 160 496.064 160 496.064 480 816.064 480Z",
2887
- fill: "#979BA5"
2888
- })
2889
- ], -1);
2890
- const _hoisted_2 = { class: "date-content-utc" };
2891
- const _hoisted_3 = { class: "date-tooltips-timezone" };
2892
- const _sfc_main = /* @__PURE__ */ defineComponent({
2893
- ...{
2894
- name: "DatePicker"
2895
- },
2896
- __name: "date-picker",
2897
- props: {
2898
- behavior: { default: "normal" },
2899
- disabled: { type: Boolean },
2900
- format: { default: "YYYY-MM-DD HH:mm:ss" },
2901
- modelValue: {},
2902
- timezone: {},
2903
- version: { default: "1.0" }
2904
- },
2905
- emits: ["update:modelValue", "update:timezone"],
2906
- setup(__props, { expose: __expose, emit: __emit }) {
2907
- dayjs.locale({
2908
- ...lang === "en" ? en : cn,
2909
- weekStart: 1
2910
- });
2911
- provideGlobalConfig({
2912
- prefix: "bk"
2913
- });
2914
- const props = __props;
2915
- const emits = __emit;
2916
- const dateTooltipsRef = ref();
2917
- const dateContentRef = ref();
2918
- const format = computed(() => props.format);
2919
- const timezoneInfo = computed(() => getTimezoneInfoByValue(props.timezone || dayjs.tz.guess()));
2920
- const dateDetail = shallowRef(transformDateValueToDayjs(props.modelValue));
2921
- const storeKey2 = computed(() => getStoreKey(props.version));
2922
- const datePanelShow = ref(false);
2923
- const tooltipsShow = ref(false);
2924
- useDatePickerProvider({
2925
- format,
2926
- storeKey: storeKey2,
2927
- t,
2928
- timezoneInfo
2929
- });
2930
- onBeforeUnmount(() => {
2931
- tooltipsShow.value = false;
2932
- datePanelShow.value = false;
2933
- });
2934
- const handleDateMouseenter = () => {
2935
- tooltipsShow.value = true;
2936
- };
2937
- const handleDateMouseleave = () => {
2938
- setTimeout(() => {
2939
- tooltipsShow.value = false;
2940
- }, 100);
2941
- };
2942
- const handleChange = (val) => {
2943
- var _a;
2944
- datePanelShow.value = false;
2945
- dateDetail.value = transformDateValueToDayjs(val);
2946
- emits("update:modelValue", val, (_a = dateDetail.value) == null ? void 0 : _a.map((item) => ({
2947
- dayjs: item,
2948
- formatText: item.format(format.value),
2949
- unix: item.unix()
2950
- })));
2951
- val && setStoreDateList(val, storeKey2.value);
2952
- };
2953
- const handleTimezoneChange = (val, info) => {
2954
- emits("update:timezone", val, { ...info });
2955
- handleHidden();
2956
- };
2957
- const handleHidden = () => {
2958
- datePanelShow.value = false;
2959
- };
2960
- const diffDateDuration = (type) => {
2961
- var _a;
2962
- if (((_a = dateDetail.value) == null ? void 0 : _a.length) < 2)
2963
- return;
2964
- const [start, end] = dateDetail.value;
2965
- let durations = end.diff(start);
2966
- const dayDuration = 24 * 60 * 60 * 1e3;
2967
- if (durations % dayDuration === dayDuration - 1e3) {
2968
- durations += 1e3;
2969
- }
2970
- dateDetail.value = type === "left" ? [start.subtract(durations), end.subtract(durations)] : [start.add(durations), end.add(durations)];
2971
- handleChange(dateDetail.value.map((item) => item.format(format.value)));
2972
- };
2973
- const handleClickLeft = () => {
2974
- diffDateDuration("left");
2975
- };
2976
- const handleClickRight = () => {
2977
- diffDateDuration("right");
2978
- };
2979
- const handleClickoutside = (e) => {
2980
- if (!datePanelShow.value)
2981
- return;
2982
- if (!Array.from(document.querySelectorAll(".__bk-date-picker-popover__")).some((item) => item.contains(e.target))) {
2983
- handleHidden();
2984
- }
2985
- };
2986
- __expose({
2987
- handleHidePanel: () => {
2988
- datePanelShow.value = false;
2989
- },
2990
- handleShowPanel: () => {
2991
- datePanelShow.value = true;
2992
- }
2993
- });
2994
- return (_ctx, _cache) => {
2995
- return openBlock(), createElementBlock("div", {
2996
- class: normalizeClass({
2997
- "__bk_date_picker__": true,
2998
- "is-simplicity": _ctx.behavior === "simplicity",
2999
- "is-disabled": _ctx.disabled
3000
- })
3001
- }, [
3002
- createElementVNode("span", {
3003
- class: "date-icon",
3004
- onClick: handleClickLeft
3005
- }, [
3006
- createVNode(unref(AngleLeft), { class: "date-icon-left" })
3007
- ]),
3008
- createVNode(unref(Popover), {
3009
- trigger: "manual",
3010
- "is-show": datePanelShow.value,
3011
- placement: "bottom-start",
3012
- theme: "light",
3013
- arrow: false,
3014
- "ext-cls": "bk-date-picker-popover __bk-date-picker-popover__",
3015
- offset: { mainAxis: 10, crossAxis: 10, alignmentAxis: -32 },
3016
- onAfterHidden: handleHidden
3017
- }, {
3018
- content: withCtx(() => [
3019
- createVNode(_sfc_main$1, {
3020
- "default-value": _ctx.modelValue,
3021
- timezone: _ctx.timezone,
3022
- onChange: handleChange,
3023
- "onUpdate:timezone": handleTimezoneChange
3024
- }, null, 8, ["default-value", "timezone"])
3025
- ]),
3026
- default: withCtx(() => {
3027
- var _a;
3028
- return [
3029
- withDirectives((openBlock(), createElementBlock("span", {
3030
- class: "date-content",
3031
- onClick: _cache[0] || (_cache[0] = ($event) => datePanelShow.value = !datePanelShow.value),
3032
- ref_key: "dateContentRef",
3033
- ref: dateContentRef,
3034
- onMouseenter: handleDateMouseenter,
3035
- onMouseleave: handleDateMouseleave
3036
- }, [
3037
- _hoisted_1,
3038
- createElementVNode("span", null, toDisplayString(unref(getDateValueToString)(_ctx.modelValue, format.value)), 1),
3039
- createElementVNode("span", _hoisted_2, toDisplayString(timezoneInfo.value.abbreviation || ((_a = timezoneInfo.value.utc) == null ? void 0 : _a.replace("UTC", "").replace(":00", ""))), 1)
3040
- ], 32)), [
3041
- [unref(clickoutside), handleClickoutside]
3042
- ])
3043
- ];
3044
- }),
3045
- _: 1
3046
- }, 8, ["is-show"]),
3047
- createElementVNode("span", {
3048
- class: "date-icon",
3049
- style: { "margin-left": "auto" },
3050
- onClick: handleClickRight
3051
- }, [
3052
- createVNode(unref(AngleRight), { class: "date-icon-right" })
3053
- ]),
3054
- createVNode(unref(Popover), {
3055
- "is-show": tooltipsShow.value,
3056
- trigger: "manual",
3057
- target: dateContentRef.value,
3058
- offset: 12,
3059
- placement: "top"
3060
- }, {
3061
- content: withCtx(() => {
3062
- var _a, _b, _c, _d;
3063
- return [
3064
- createElementVNode("div", {
3065
- ref_key: "dateTooltipsRef",
3066
- ref: dateTooltipsRef,
3067
- class: "__date-tooltips__",
3068
- style: normalizeStyle({ maxWidth: unref(lang) === "en" ? "180px" : "156px" })
3069
- }, [
3070
- createElementVNode("div", null, toDisplayString((_b = (_a = dateDetail.value) == null ? void 0 : _a[0]) == null ? void 0 : _b.format(format.value)), 1),
3071
- createTextVNode(" to "),
3072
- createElementVNode("div", null, toDisplayString((_d = (_c = dateDetail.value) == null ? void 0 : _c[1]) == null ? void 0 : _d.format(format.value)), 1),
3073
- createElementVNode("div", _hoisted_3, toDisplayString(timezoneInfo.value.label === unref(dayjs).tz.guess() ? `${unref(t)("浏览器时间")} (${timezoneInfo.value.label})` : timezoneInfo.value.label), 1)
3074
- ], 4)
3075
- ];
3076
- }),
3077
- _: 1
3078
- }, 8, ["is-show", "target"])
3079
- ], 2);
3080
- };
3081
- }
3082
- });
3083
- const datePicker_vue_vue_type_style_index_0_lang = "";
3084
- dayjs.extend(customParseFormat);
3085
- dayjs.extend(localizedFormat);
3086
- dayjs.extend(tz);
3087
- dayjs.extend(utc);
3088
- export {
3089
- DATE_PICKER_PROVIDER_KEY,
3090
- _sfc_main as DatePicker,
3091
- Dayjs,
3092
- default2 as dayjs,
3093
- _sfc_main as default,
3094
- getDateValueMode,
3095
- getDateValueToString,
3096
- isValidDateValue,
3097
- naturalDateRegexp,
3098
- recentDateRegexp,
3099
- transformDateValueToDayjs,
3100
- useDatePickerProvider,
3101
- useDatePickertInject
3102
- };