@ancon/wildcat-utils 1.43.4 → 1.44.0-timezone-refactor.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_baseIsEqual-12d01a44.mjs +169 -0
- package/_baseIsEqual-bcac9024.js +1 -0
- package/_baseIteratee-075c204c.js +1 -0
- package/_baseIteratee-4c4d0995.mjs +97 -0
- package/_baseSlice-4d543985.mjs +10 -0
- package/_baseSlice-e1b41ceb.js +1 -0
- package/_getTag-4e44633b.mjs +382 -0
- package/_getTag-b8923c48.js +1 -0
- package/card/index.d.ts +2 -0
- package/card/index.js +1 -1
- package/card/index.mjs +5 -3
- package/card/isWalletDebitTransaction.d.ts +2 -0
- package/card/isWalletDebitTransaction.js +1 -0
- package/card/isWalletDebitTransaction.mjs +13 -0
- package/checkout/getCheckoutOrderStatusTexts.js +1 -1
- package/checkout/getCheckoutOrderStatusTexts.mjs +7 -5
- package/checkout/index.js +1 -1
- package/checkout/index.mjs +49 -47
- package/checkout/isCheckoutItemsAreEqual.js +1 -1
- package/checkout/isCheckoutItemsAreEqual.mjs +14 -13
- package/date/createLocalTimezoneDate.d.ts +8 -0
- package/date/createLocalTimezoneDate.js +1 -0
- package/date/createLocalTimezoneDate.mjs +8 -0
- package/date/createLocalTimezoneMoment.d.ts +9 -0
- package/date/createLocalTimezoneMoment.js +1 -0
- package/date/createLocalTimezoneMoment.mjs +8 -0
- package/date/getFormattedUTCDateTime.d.ts +10 -0
- package/date/getFormattedUTCDateTime.js +1 -0
- package/date/getFormattedUTCDateTime.mjs +8 -0
- package/date/index.d.ts +4 -0
- package/date/index.js +1 -0
- package/date/index.mjs +9 -0
- package/identity-1bae7cf8.js +1 -0
- package/identity-6eafe87b.mjs +64 -0
- package/index.d.ts +2 -0
- package/index.js +1 -1
- package/index.mjs +96 -74
- package/logger/index.js +1 -1
- package/logger/index.mjs +8 -7
- package/logger/pascalCaseFormatter.js +1 -1
- package/logger/pascalCaseFormatter.mjs +21 -27
- package/order/getCheckOrderItemsMappedByTicketItemStatus.js +1 -1
- package/order/getCheckOrderItemsMappedByTicketItemStatus.mjs +15 -13
- package/order/getCheckOrderMinimumStatusTicketItem.js +1 -1
- package/order/getCheckOrderMinimumStatusTicketItem.mjs +19 -17
- package/order/index.js +1 -1
- package/order/index.mjs +11 -9
- package/outlet/getExpressAvailableOrderFormats.js +1 -1
- package/outlet/getExpressAvailableOrderFormats.mjs +27 -26
- package/outlet/getExpressNextAvailabilityShiftTime.d.ts +2 -2
- package/outlet/getExpressNextAvailabilityShiftTime.js +1 -1
- package/outlet/getExpressNextAvailabilityShiftTime.mjs +19 -18
- package/outlet/getExpressServiceIntervalEnd.d.ts +2 -2
- package/outlet/getExpressServiceIntervalEnd.js +1 -1
- package/outlet/getExpressServiceIntervalEnd.mjs +7 -9
- package/outlet/getExpressServiceIntervalStart.d.ts +2 -2
- package/outlet/getExpressServiceIntervalStart.js +1 -1
- package/outlet/getExpressServiceIntervalStart.mjs +7 -9
- package/outlet/getListOutletOpeningHoursTable.d.ts +1 -1
- package/outlet/getListOutletOpeningHoursTable.js +1 -1
- package/outlet/getListOutletOpeningHoursTable.mjs +135 -150
- package/outlet/getMomentFromDateAndTimeString.js +1 -1
- package/outlet/getMomentFromDateAndTimeString.mjs +1 -1
- package/outlet/getOutletActiveOpeningInterval.d.ts +2 -2
- package/outlet/getOutletActiveOpeningInterval.js +1 -1
- package/outlet/getOutletActiveOpeningInterval.mjs +15 -12
- package/outlet/getOutletAvailabilityInfo.js +1 -1
- package/outlet/getOutletAvailabilityInfo.mjs +23 -25
- package/outlet/getOutletCurrentActiveOperatingHour.js +1 -1
- package/outlet/getOutletCurrentActiveOperatingHour.mjs +16 -15
- package/outlet/getOutletCurrentAvailabilityInfo.js +1 -1
- package/outlet/getOutletCurrentAvailabilityInfo.mjs +27 -26
- package/outlet/getOutletCurrentClosingTimeText.js +1 -1
- package/outlet/getOutletCurrentClosingTimeText.mjs +14 -10
- package/outlet/getOutletDeliveryFee.js +1 -1
- package/outlet/getOutletDeliveryFee.mjs +5 -5
- package/outlet/getOutletFormattedAddress.d.ts +9 -1
- package/outlet/getOutletFormattedAddress.js +1 -1
- package/outlet/getOutletFormattedAddress.mjs +9 -4
- package/outlet/getOutletNextOpeningTagInformation.js +1 -1
- package/outlet/getOutletNextOpeningTagInformation.mjs +8 -7
- package/outlet/getOutletNextOpeningTimeText.js +1 -1
- package/outlet/getOutletNextOpeningTimeText.mjs +10 -8
- package/outlet/getOutletNextReadyToOrderTime.js +1 -1
- package/outlet/getOutletNextReadyToOrderTime.mjs +11 -11
- package/outlet/getOutletPickerTimesForDay.js +1 -1
- package/outlet/getOutletPickerTimesForDay.mjs +33 -34
- package/outlet/getOutletPickerTimesForWeek.js +1 -1
- package/outlet/getOutletPickerTimesForWeek.mjs +4 -3
- package/outlet/getOutletTagInformation.d.ts +1 -1
- package/outlet/getOutletTagInformation.js +1 -1
- package/outlet/getOutletTagInformation.mjs +69 -70
- package/outlet/getOutletTodayOpeningTimes.js +1 -1
- package/outlet/getOutletTodayOpeningTimes.mjs +43 -39
- package/outlet/getPartitionedOutletsList.js +1 -1
- package/outlet/getPartitionedOutletsList.mjs +4 -4
- package/outlet/getPickerIntervalsForDay.js +1 -1
- package/outlet/getPickerIntervalsForDay.mjs +20 -12
- package/outlet/getServiceIntervalEnd.d.ts +1 -1
- package/outlet/getServiceIntervalEnd.js +1 -1
- package/outlet/getServiceIntervalEnd.mjs +12 -10
- package/outlet/getServiceIntervalRange.d.ts +1 -2
- package/outlet/getServiceIntervalRange.js +1 -1
- package/outlet/getServiceIntervalRange.mjs +8 -12
- package/outlet/getServiceIntervalStart.d.ts +1 -1
- package/outlet/getServiceIntervalStart.js +1 -1
- package/outlet/getServiceIntervalStart.mjs +6 -7
- package/outlet/getServiceIntervalsForOrderFormat.d.ts +7 -8
- package/outlet/getStructuredOutletAddress.js +1 -1
- package/outlet/getStructuredOutletAddress.mjs +7 -7
- package/outlet/index.js +1 -1
- package/outlet/index.mjs +73 -68
- package/outlet/searchNextOpeningMoment.d.ts +1 -1
- package/outlet/searchNextOpeningMoment.js +1 -1
- package/outlet/searchNextOpeningMoment.mjs +49 -56
- package/outlet/serviceDateTimesFromOpeningHours.d.ts +3 -5
- package/outlet/serviceDateTimesFromOpeningHours.js +1 -1
- package/outlet/serviceDateTimesFromOpeningHours.mjs +342 -27
- package/outlet/types.d.ts +0 -2
- package/package.json +26 -1
- package/time/getEndTimeSpanOfTimePeriod.js +1 -1
- package/time/getEndTimeSpanOfTimePeriod.mjs +5 -9
- package/{toString-e631a957.mjs → toString-3b91b335.mjs} +12 -11
- package/toString-9eae9442.js +1 -0
- package/_baseIsEqual-39cef2eb.mjs +0 -530
- package/_baseIsEqual-b3df9240.js +0 -1
- package/_baseIteratee-13e892b8.mjs +0 -151
- package/_baseIteratee-be26bb18.js +0 -1
- package/toString-425512fc.js +0 -1
package/outlet/index.mjs
CHANGED
|
@@ -1,52 +1,58 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as
|
|
27
|
-
import { default as
|
|
28
|
-
import { default as
|
|
29
|
-
import { default as
|
|
30
|
-
import { default as
|
|
31
|
-
import { default as
|
|
32
|
-
import { default as
|
|
1
|
+
import { default as L } from "./getListOutletOpeningHoursTable.mjs";
|
|
2
|
+
import { default as R } from "./getOutletTagInformation.mjs";
|
|
3
|
+
import { default as j } from "./getOutletAvailabilityInfo.mjs";
|
|
4
|
+
import { default as w } from "./getOutletOfflineOrderFormats.mjs";
|
|
5
|
+
import { default as B } from "./getOutletAvailableOrderFormats.mjs";
|
|
6
|
+
import { default as J } from "./getOutletFormattedDistance.mjs";
|
|
7
|
+
import { default as Q } from "./isOutletAcceptingPreOrders.mjs";
|
|
8
|
+
import { default as V } from "./getOutletDeliveryFee.mjs";
|
|
9
|
+
import { default as Y } from "./getOutletTodayOpeningTimes.mjs";
|
|
10
|
+
import { default as _ } from "./getOutletOrderFormats.mjs";
|
|
11
|
+
import { default as tt } from "./serviceDateTimesFromOpeningHours.mjs";
|
|
12
|
+
import { default as rt } from "./getPickerIntervalsForDay.mjs";
|
|
13
|
+
import { default as at } from "./getServiceIntervalRange.mjs";
|
|
14
|
+
import { default as mt } from "./getServiceIntervalsForOrderFormat.mjs";
|
|
15
|
+
import { default as lt } from "./getOutletFormattedAddress.mjs";
|
|
16
|
+
import { default as st } from "./getPartitionedOutletsList.mjs";
|
|
17
|
+
import { default as dt } from "./getOutletPickerTimesForWeek.mjs";
|
|
18
|
+
import { default as xt } from "./getOutletPickerTimesForDay.mjs";
|
|
19
|
+
import { default as nt } from "./getOutletOrderPrepTime.mjs";
|
|
20
|
+
import { default as Ft } from "./getStructuredOutletAddress.mjs";
|
|
21
|
+
import { default as vt } from "./getOutletNextOpeningTimeText.mjs";
|
|
22
|
+
import { default as yt } from "./getOutletCurrentClosingTimeText.mjs";
|
|
23
|
+
import { default as Pt } from "./getOutletNextReadyToOrderTime.mjs";
|
|
24
|
+
import { default as St } from "./getOutletNextOpeningTagInformation.mjs";
|
|
25
|
+
import { default as Nt } from "./getOutletCurrentAvailabilityInfo.mjs";
|
|
26
|
+
import { default as Ct } from "./getExpressAvailableOrderFormats.mjs";
|
|
27
|
+
import { default as Ht } from "./getExpressNextAvailabilityShiftTime.mjs";
|
|
28
|
+
import { default as Lt } from "./getOrderFormatAOTipSettings.mjs";
|
|
29
|
+
import { default as Rt } from "./isAOTippingEnabledForOrderFormat.mjs";
|
|
30
|
+
import { default as jt } from "./isMenuTreeHierarchyProductAvailable.mjs";
|
|
31
|
+
import { default as wt } from "./getOutletMenuProductsSortCriteria.mjs";
|
|
32
|
+
import { default as Bt } from "./getOutletNextServiceTimeOffset.mjs";
|
|
33
33
|
import "moment";
|
|
34
34
|
import "@ancon/wildcat-types";
|
|
35
35
|
import "../shared/isWithinFlag.mjs";
|
|
36
36
|
import "../shared/generateId.mjs";
|
|
37
37
|
import "react";
|
|
38
|
+
import "../time/getTimeSpanParts.mjs";
|
|
39
|
+
import "../date/createLocalTimezoneMoment.mjs";
|
|
38
40
|
import "./constants.mjs";
|
|
39
41
|
import "./getOutletCurrentActiveOperatingHour.mjs";
|
|
40
42
|
import "./getMomentFromDateAndTimeString.mjs";
|
|
41
43
|
import "./searchNextOpeningMoment.mjs";
|
|
42
|
-
import "../_baseIteratee-
|
|
43
|
-
import "../
|
|
44
|
+
import "../_baseIteratee-4c4d0995.mjs";
|
|
45
|
+
import "../_getTag-4e44633b.mjs";
|
|
44
46
|
import "../isArray-0d9c7aaa.mjs";
|
|
45
|
-
import "../
|
|
47
|
+
import "../_baseIsEqual-12d01a44.mjs";
|
|
48
|
+
import "../identity-6eafe87b.mjs";
|
|
49
|
+
import "../toString-3b91b335.mjs";
|
|
46
50
|
import "../noop-378485d5.mjs";
|
|
51
|
+
import "../_baseSlice-4d543985.mjs";
|
|
47
52
|
import "../shared/constants.mjs";
|
|
48
53
|
import "../time/toMinutes.mjs";
|
|
49
54
|
import "../time/getNextTenthMinute.mjs";
|
|
55
|
+
import "../string/truncate.mjs";
|
|
50
56
|
import "./types.mjs";
|
|
51
57
|
import "./getSettingsForOrderFormat.mjs";
|
|
52
58
|
import "./getServiceIntervalStart.mjs";
|
|
@@ -55,39 +61,38 @@ import "./generatePickerTimesForDay.mjs";
|
|
|
55
61
|
import "./getServiceIntervalEnd.mjs";
|
|
56
62
|
import "./hoursAndMinutesToMinutes.mjs";
|
|
57
63
|
import "./getExpressServiceIntervalStart.mjs";
|
|
58
|
-
import "../time/getTimeSpanParts.mjs";
|
|
59
64
|
import "./getExpressServiceIntervalEnd.mjs";
|
|
60
65
|
export {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
66
|
+
Ct as getExpressAvailableOrderFormats,
|
|
67
|
+
Ht as getExpressNextAvailabilityShiftTime,
|
|
68
|
+
L as getListOutletOpeningHoursTable,
|
|
69
|
+
Lt as getOrderFormatAOTipSettings,
|
|
70
|
+
j as getOutletAvailabilityInfo,
|
|
71
|
+
B as getOutletAvailableOrderFormats,
|
|
72
|
+
Nt as getOutletCurrentAvailabilityInfo,
|
|
73
|
+
yt as getOutletCurrentClosingTimeText,
|
|
74
|
+
V as getOutletDeliveryFee,
|
|
75
|
+
lt as getOutletFormattedAddress,
|
|
76
|
+
J as getOutletFormattedDistance,
|
|
77
|
+
wt as getOutletMenuProductsSortCriteria,
|
|
78
|
+
St as getOutletNextOpeningTagInformation,
|
|
79
|
+
vt as getOutletNextOpeningTimeText,
|
|
80
|
+
Pt as getOutletNextReadyToOrderTime,
|
|
81
|
+
Bt as getOutletNextServiceTimeOffset,
|
|
82
|
+
w as getOutletOfflineOrderFormats,
|
|
83
|
+
_ as getOutletOrderFormats,
|
|
84
|
+
nt as getOutletOrderPreparationTime,
|
|
85
|
+
xt as getOutletPickerTimesForDay,
|
|
86
|
+
dt as getOutletPickerTimesForWeek,
|
|
87
|
+
R as getOutletTagInformation,
|
|
88
|
+
Y as getOutletTodayOpeningTimes,
|
|
89
|
+
st as getPartitionedOutletsList,
|
|
90
|
+
rt as getPickerIntervalsForDay,
|
|
91
|
+
at as getServiceIntervalRange,
|
|
92
|
+
mt as getServiceIntervalsForOrderFormat,
|
|
93
|
+
Ft as getStructuredOutletAddress,
|
|
94
|
+
Rt as isAOTippingEnabledForOrderFormat,
|
|
95
|
+
jt as isMenuTreeHierarchyProductAvailable,
|
|
96
|
+
Q as isOutletAcceptingPreOrders,
|
|
97
|
+
tt as serviceDateTimesFromOpeningHours
|
|
93
98
|
};
|
|
@@ -10,5 +10,5 @@ import { OperatingHourFormattedMap } from './types';
|
|
|
10
10
|
*
|
|
11
11
|
* @return {Moment}
|
|
12
12
|
*/
|
|
13
|
-
declare function searchNextOpeningMoment(operatingHourMap: OperatingHourFormattedMap, relevantMoment: Moment
|
|
13
|
+
declare function searchNextOpeningMoment(operatingHourMap: OperatingHourFormattedMap, relevantMoment: Moment): Moment | null;
|
|
14
14
|
export default searchNextOpeningMoment;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const m=require("moment"),y=require("@ancon/wildcat-types"),c=require("./constants.js"),a=require("./getMomentFromDateAndTimeString.js");function
|
|
1
|
+
"use strict";const m=require("moment"),y=require("@ancon/wildcat-types"),O=require("../time/getTimeSpanParts.js"),c=require("./constants.js"),a=require("./getMomentFromDateAndTimeString.js");function d(i,e){const t=i.clone().date()-e.date();return t!==0?i.subtract(t,"day"):i}function g(i){let e=null;const{intervals:n,exception:t}=i;if(t){const{state:r}=t;r||(e=t)}else{const r=n.sort((o,s)=>O(o.from).hours-O(s.from).hours),[l]=r;return l}return e}function h(i,e,n){var r,l;const t=[];if(e.exception){if(e.exception.state===y.IntervalState.Opened){const o=a(i,e.exception.from);n.isBefore(o)&&t.push({interval:e.exception,moment:o})}}else for(let o=0;o<e.intervals.length;o+=1){const s=e.intervals[o],u=a(i,s.from);n.isBefore(u)&&t.push({interval:s,moment:u})}return t.length<2?((r=t[0])==null?void 0:r.interval)??null:((l=t.sort((o,s)=>o.moment-n-(s.moment-n))[0])==null?void 0:l.interval)??null}function p(i,e){let n=null;const t=m(e).format(c.OutletMapKeyFormatter),r=h(t,i[t],e);if(r&&(n=a(t,r.from)),!n)for(let l=1;l<c.OutletTimelineDayCount;l+=1){const o=m(e).add(l,"d"),s=o.format(c.OutletMapKeyFormatter),u=i[s],f=g(u);if(f){n=a(s,f.from),n=d(n,o);break}}return n}module.exports=p;
|
|
@@ -1,83 +1,76 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { IntervalState as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import u from "moment";
|
|
2
|
+
import { IntervalState as p } from "@ancon/wildcat-types";
|
|
3
|
+
import c from "../time/getTimeSpanParts.mjs";
|
|
4
|
+
import { OutletMapKeyFormatter as O, OutletTimelineDayCount as y } from "./constants.mjs";
|
|
5
|
+
import a from "./getMomentFromDateAndTimeString.mjs";
|
|
6
|
+
function d(i, e) {
|
|
7
|
+
const t = i.clone().date() - e.date();
|
|
8
|
+
return t !== 0 ? i.subtract(t, "day") : i;
|
|
8
9
|
}
|
|
9
|
-
function g(
|
|
10
|
-
const [t, i] = r.split(":"), n = o.clone().add(t, "hour").add(i, "minute").date() - e.date();
|
|
11
|
-
return n !== 0 ? o.subtract(n, "day") : o;
|
|
12
|
-
}
|
|
13
|
-
function h(o) {
|
|
10
|
+
function g(i) {
|
|
14
11
|
let e = null;
|
|
15
|
-
const { intervals:
|
|
12
|
+
const { intervals: n, exception: t } = i;
|
|
16
13
|
if (t) {
|
|
17
|
-
const { state:
|
|
18
|
-
|
|
14
|
+
const { state: r } = t;
|
|
15
|
+
r || (e = t);
|
|
19
16
|
} else {
|
|
20
|
-
const
|
|
21
|
-
(
|
|
22
|
-
), [
|
|
23
|
-
return
|
|
17
|
+
const r = n.sort(
|
|
18
|
+
(o, s) => c(o.from).hours - c(s.from).hours
|
|
19
|
+
), [f] = r;
|
|
20
|
+
return f;
|
|
24
21
|
}
|
|
25
22
|
return e;
|
|
26
23
|
}
|
|
27
|
-
function
|
|
28
|
-
var
|
|
24
|
+
function h(i, e, n) {
|
|
25
|
+
var r, f;
|
|
29
26
|
const t = [];
|
|
30
27
|
if (e.exception) {
|
|
31
|
-
if (e.exception.state ===
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
e.exception.
|
|
28
|
+
if (e.exception.state === p.Opened) {
|
|
29
|
+
const o = a(
|
|
30
|
+
i,
|
|
31
|
+
e.exception.from
|
|
35
32
|
);
|
|
36
|
-
|
|
33
|
+
n.isBefore(o) && t.push({
|
|
37
34
|
interval: e.exception,
|
|
38
|
-
moment:
|
|
35
|
+
moment: o
|
|
39
36
|
});
|
|
40
37
|
}
|
|
41
38
|
} else
|
|
42
|
-
for (let
|
|
43
|
-
const s = e.intervals[
|
|
44
|
-
|
|
45
|
-
s.
|
|
39
|
+
for (let o = 0; o < e.intervals.length; o += 1) {
|
|
40
|
+
const s = e.intervals[o], l = a(
|
|
41
|
+
i,
|
|
42
|
+
s.from
|
|
46
43
|
);
|
|
47
|
-
|
|
44
|
+
n.isBefore(l) && t.push({ interval: s, moment: l });
|
|
48
45
|
}
|
|
49
|
-
return t.length < 2 ? ((
|
|
46
|
+
return t.length < 2 ? ((r = t[0]) == null ? void 0 : r.interval) ?? null : ((f = t.sort(
|
|
50
47
|
// @ts-ignore TODO
|
|
51
|
-
(
|
|
52
|
-
)[0]) == null ? void 0 :
|
|
48
|
+
(o, s) => o.moment - n - (s.moment - n)
|
|
49
|
+
)[0]) == null ? void 0 : f.interval) ?? null;
|
|
53
50
|
}
|
|
54
|
-
function
|
|
55
|
-
let
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
function S(i, e) {
|
|
52
|
+
let n = null;
|
|
53
|
+
const t = u(e).format(O), r = h(
|
|
54
|
+
t,
|
|
55
|
+
i[t],
|
|
59
56
|
e
|
|
60
57
|
);
|
|
61
|
-
if (
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
)), !
|
|
65
|
-
for (let
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
68
|
-
|
|
69
|
-
a,
|
|
70
|
-
f.start
|
|
71
|
-
), t = g(
|
|
72
|
-
t,
|
|
58
|
+
if (r && (n = a(
|
|
59
|
+
t,
|
|
60
|
+
r.from
|
|
61
|
+
)), !n)
|
|
62
|
+
for (let f = 1; f < y; f += 1) {
|
|
63
|
+
const o = u(e).add(f, "d"), s = o.format(O), l = i[s], m = g(l);
|
|
64
|
+
if (m) {
|
|
65
|
+
n = a(
|
|
73
66
|
s,
|
|
74
|
-
|
|
75
|
-
);
|
|
67
|
+
m.from
|
|
68
|
+
), n = d(n, o);
|
|
76
69
|
break;
|
|
77
70
|
}
|
|
78
71
|
}
|
|
79
|
-
return
|
|
72
|
+
return n;
|
|
80
73
|
}
|
|
81
74
|
export {
|
|
82
|
-
|
|
75
|
+
S as default
|
|
83
76
|
};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { ServiceDateTime } from '@ancon/wildcat-types';
|
|
1
|
+
import { IntervalState, IntervalType, ServiceDateTime } from '@ancon/wildcat-types';
|
|
2
2
|
export declare type OutletDetailsOpeningHour = {
|
|
3
|
-
type:
|
|
4
|
-
state:
|
|
3
|
+
type: IntervalType.Normal;
|
|
4
|
+
state: IntervalState.Opened;
|
|
5
5
|
orderFormat: 8;
|
|
6
6
|
dayOfWeek: 8;
|
|
7
|
-
unformattedPeriodFrom: '1900-01-01T00:00:00Z';
|
|
8
7
|
periodFrom: '1900-01-01T00:00:00';
|
|
9
|
-
unformattedPeriodTo: '2200-01-01T00:00:00Z';
|
|
10
8
|
periodTo: '2200-01-01T00:00:00';
|
|
11
9
|
from: '23:00:00';
|
|
12
10
|
duration: '06:00:00';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const Q=require("../toString-9eae9442.js"),o=require("../_getTag-b8923c48.js"),f=require("../isArray-640f9811.js"),T=require("../identity-1bae7cf8.js"),X=require("../_baseSlice-e1b41ceb.js");function Z(e,n){for(var r=-1,t=e==null?0:e.length;++r<t&&n(e[r],r,e)!==!1;);return e}var V=function(){try{var e=o.getNative(Object,"defineProperty");return e({},"",{}),e}catch{}}();const v=V;function M(e,n,r){n=="__proto__"&&v?v(e,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[n]=r}var z=Object.prototype,k=z.hasOwnProperty;function N(e,n,r){var t=e[n];(!(k.call(e,n)&&o.eq(t,r))||r===void 0&&!(n in e))&&M(e,n,r)}function d(e,n,r,t){var a=!r;r||(r={});for(var c=-1,u=n.length;++c<u;){var s=n[c],l=t?t(r[s],e[s],s,r,e):void 0;l===void 0&&(l=e[s]),a?M(r,s,l):N(r,s,l)}return r}function ee(e,n){return e&&d(n,o.keys(n),e)}function ne(e){var n=[];if(e!=null)for(var r in Object(e))n.push(r);return n}var re=Object.prototype,te=re.hasOwnProperty;function oe(e){if(!o.isObject(e))return ne(e);var n=o.isPrototype(e),r=[];for(var t in e)t=="constructor"&&(n||!te.call(e,t))||r.push(t);return r}function O(e){return o.isArrayLike(e)?o.arrayLikeKeys(e,!0):oe(e)}function ae(e,n){return e&&d(n,O(n),e)}var B=typeof exports=="object"&&exports&&!exports.nodeType&&exports,w=B&&typeof module=="object"&&module&&!module.nodeType&&module,ie=w&&w.exports===B,P=ie?f.root.Buffer:void 0,F=P?P.allocUnsafe:void 0;function ce(e,n){if(n)return e.slice();var r=e.length,t=F?F(r):new e.constructor(r);return e.copy(t),t}function ue(e,n){var r=-1,t=e.length;for(n||(n=Array(t));++r<t;)n[r]=e[r];return n}function se(e,n){return d(e,o.getSymbols(e),n)}var fe=o.overArg(Object.getPrototypeOf,Object);const A=fe;var le=Object.getOwnPropertySymbols,ge=le?function(e){for(var n=[];e;)o.arrayPush(n,o.getSymbols(e)),e=A(e);return n}:o.stubArray;const D=ge;function be(e,n){return d(e,D(e),n)}function G(e){return o.baseGetAllKeys(e,O,D)}var ye=Object.prototype,Te=ye.hasOwnProperty;function de(e){var n=e.length,r=new e.constructor(n);return n&&typeof e[0]=="string"&&Te.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function h(e){var n=new e.constructor(e.byteLength);return new o.Uint8Array(n).set(new o.Uint8Array(e)),n}function pe(e,n){var r=n?h(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var ve=/\w*$/;function Oe(e){var n=new e.constructor(e.source,ve.exec(e));return n.lastIndex=e.lastIndex,n}var C=f.Symbol?f.Symbol.prototype:void 0,L=C?C.valueOf:void 0;function Ae(e){return L?Object(L.call(e)):{}}function he(e,n){var r=n?h(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Se="[object Boolean]",je="[object Date]",$e="[object Map]",me="[object Number]",we="[object RegExp]",Pe="[object Set]",Fe="[object String]",Ce="[object Symbol]",Le="[object ArrayBuffer]",Ie="[object DataView]",Ue="[object Float32Array]",_e="[object Float64Array]",xe="[object Int8Array]",Ee="[object Int16Array]",Me="[object Int32Array]",Ne="[object Uint8Array]",Be="[object Uint8ClampedArray]",De="[object Uint16Array]",Ge="[object Uint32Array]";function Ke(e,n,r){var t=e.constructor;switch(n){case Le:return h(e);case Se:case je:return new t(+e);case Ie:return pe(e,r);case Ue:case _e:case xe:case Ee:case Me:case Ne:case Be:case De:case Ge:return he(e,r);case $e:return new t;case me:case Fe:return new t(e);case we:return Oe(e);case Pe:return new t;case Ce:return Ae(e)}}var I=Object.create,qe=function(){function e(){}return function(n){if(!o.isObject(n))return{};if(I)return I(n);e.prototype=n;var r=new e;return e.prototype=void 0,r}}();const Re=qe;function He(e){return typeof e.constructor=="function"&&!o.isPrototype(e)?Re(A(e)):{}}var Ye="[object Map]";function We(e){return f.isObjectLike(e)&&o.getTag(e)==Ye}var U=o.nodeUtil&&o.nodeUtil.isMap,Je=U?o.baseUnary(U):We;const Qe=Je;var Xe="[object Set]";function Ze(e){return f.isObjectLike(e)&&o.getTag(e)==Xe}var _=o.nodeUtil&&o.nodeUtil.isSet,Ve=_?o.baseUnary(_):Ze;const ze=Ve;var ke=1,en=2,nn=4,K="[object Arguments]",rn="[object Array]",tn="[object Boolean]",on="[object Date]",an="[object Error]",q="[object Function]",cn="[object GeneratorFunction]",un="[object Map]",sn="[object Number]",R="[object Object]",fn="[object RegExp]",ln="[object Set]",gn="[object String]",bn="[object Symbol]",yn="[object WeakMap]",Tn="[object ArrayBuffer]",dn="[object DataView]",pn="[object Float32Array]",vn="[object Float64Array]",On="[object Int8Array]",An="[object Int16Array]",hn="[object Int32Array]",Sn="[object Uint8Array]",jn="[object Uint8ClampedArray]",$n="[object Uint16Array]",mn="[object Uint32Array]",i={};i[K]=i[rn]=i[Tn]=i[dn]=i[tn]=i[on]=i[pn]=i[vn]=i[On]=i[An]=i[hn]=i[un]=i[sn]=i[R]=i[fn]=i[ln]=i[gn]=i[bn]=i[Sn]=i[jn]=i[$n]=i[mn]=!0;i[an]=i[q]=i[yn]=!1;function p(e,n,r,t,a,c){var u,s=n&ke,l=n&en,W=n&nn;if(r&&(u=a?r(e,t,a,c):r(e)),u!==void 0)return u;if(!o.isObject(e))return e;var S=f.isArray(e);if(S){if(u=de(e),!s)return ue(e,u)}else{var y=o.getTag(e),j=y==q||y==cn;if(o.isBuffer(e))return ce(e,s);if(y==R||y==K||j&&!a){if(u=l||j?{}:He(e),!s)return l?be(e,ae(u,e)):se(e,ee(u,e))}else{if(!i[y])return a?e:{};u=Ke(e,y,s)}}c||(c=new o.Stack);var $=c.get(e);if($)return $;c.set(e,u),ze(e)?e.forEach(function(g){u.add(p(g,n,r,g,e,c))}):Qe(e)&&e.forEach(function(g,b){u.set(b,p(g,n,r,b,e,c))});var J=W?l?G:o.getAllKeys:l?O:o.keys,m=S?void 0:J(e);return Z(m||e,function(g,b){m&&(b=g,g=e[b]),N(u,b,p(g,n,r,b,e,c))}),u}function wn(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}function Pn(e,n){return n.length<2?e:T.baseGet(e,X.baseSlice(n,0,-1))}function Fn(e,n){return n=T.castPath(n,e),e=Pn(e,n),e==null||delete e[T.toKey(wn(n))]}var Cn="[object Object]",Ln=Function.prototype,In=Object.prototype,H=Ln.toString,Un=In.hasOwnProperty,_n=H.call(Object);function xn(e){if(!f.isObjectLike(e)||f.baseGetTag(e)!=Cn)return!1;var n=A(e);if(n===null)return!0;var r=Un.call(n,"constructor")&&n.constructor;return typeof r=="function"&&r instanceof r&&H.call(r)==_n}function En(e){return xn(e)?void 0:e}var x=f.Symbol?f.Symbol.isConcatSpreadable:void 0;function Mn(e){return f.isArray(e)||o.isArguments(e)||!!(x&&e&&e[x])}function Y(e,n,r,t,a){var c=-1,u=e.length;for(r||(r=Mn),a||(a=[]);++c<u;){var s=e[c];n>0&&r(s)?n>1?Y(s,n-1,r,t,a):o.arrayPush(a,s):t||(a[a.length]=s)}return a}function Nn(e){var n=e==null?0:e.length;return n?Y(e,1):[]}function Bn(e,n,r){switch(r.length){case 0:return e.call(n);case 1:return e.call(n,r[0]);case 2:return e.call(n,r[0],r[1]);case 3:return e.call(n,r[0],r[1],r[2])}return e.apply(n,r)}var E=Math.max;function Dn(e,n,r){return n=E(n===void 0?e.length-1:n,0),function(){for(var t=arguments,a=-1,c=E(t.length-n,0),u=Array(c);++a<c;)u[a]=t[n+a];a=-1;for(var s=Array(n+1);++a<n;)s[a]=t[a];return s[n]=r(u),Bn(e,this,s)}}function Gn(e){return function(){return e}}var Kn=v?function(e,n){return v(e,"toString",{configurable:!0,enumerable:!1,value:Gn(n),writable:!0})}:T.identity;const qn=Kn;var Rn=800,Hn=16,Yn=Date.now;function Wn(e){var n=0,r=0;return function(){var t=Yn(),a=Hn-(t-r);if(r=t,a>0){if(++n>=Rn)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}var Jn=Wn(qn);const Qn=Jn;function Xn(e){return Qn(Dn(e,void 0,Nn),e+"")}var Zn=1,Vn=2,zn=4,kn=Xn(function(e,n){var r={};if(e==null)return r;var t=!1;n=Q.arrayMap(n,function(c){return c=T.castPath(c,e),t||(t=c.length>1),c}),d(e,G(e),r),t&&(r=p(r,Zn|Vn|zn,En));for(var a=n.length;a--;)Fn(r,n[a]);return r});const er=kn;function nr({openingHours:e}){const n=e.reduce((r,t)=>(r[t.orderFormat]||(r[t.orderFormat]={orderFormats:t.orderFormat,intervals:[],isDefault:t.isDefault}),r[t.orderFormat].intervals.push(er(t,"orderFormat")),r),{});return Object.values(n)}module.exports=nr;
|