@ancon/wildcat-utils 1.43.7 → 1.44.0-r13-2.2

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.
Files changed (129) hide show
  1. package/_baseIsEqual-12d01a44.mjs +169 -0
  2. package/_baseIsEqual-bcac9024.js +1 -0
  3. package/_baseIteratee-075c204c.js +1 -0
  4. package/_baseIteratee-4c4d0995.mjs +97 -0
  5. package/_baseSlice-4d543985.mjs +10 -0
  6. package/_baseSlice-e1b41ceb.js +1 -0
  7. package/_getTag-4e44633b.mjs +382 -0
  8. package/_getTag-b8923c48.js +1 -0
  9. package/checkout/getCheckoutOrderStatusTexts.js +1 -1
  10. package/checkout/getCheckoutOrderStatusTexts.mjs +7 -5
  11. package/checkout/index.js +1 -1
  12. package/checkout/index.mjs +55 -53
  13. package/checkout/isCheckoutItemsAreEqual.js +1 -1
  14. package/checkout/isCheckoutItemsAreEqual.mjs +14 -13
  15. package/date/createLocalTimezoneDate.d.ts +8 -0
  16. package/date/createLocalTimezoneDate.js +1 -0
  17. package/date/createLocalTimezoneDate.mjs +8 -0
  18. package/date/createLocalTimezoneMoment.d.ts +9 -0
  19. package/date/createLocalTimezoneMoment.js +1 -0
  20. package/date/createLocalTimezoneMoment.mjs +8 -0
  21. package/date/getFormattedUTCDateTime.d.ts +10 -0
  22. package/date/getFormattedUTCDateTime.js +1 -0
  23. package/date/getFormattedUTCDateTime.mjs +8 -0
  24. package/date/index.d.ts +4 -0
  25. package/date/index.js +1 -0
  26. package/date/index.mjs +9 -0
  27. package/hangfire/createHangfirePoller.d.ts +8 -2
  28. package/hangfire/createHangfirePoller.js +1 -1
  29. package/hangfire/createHangfirePoller.mjs +72 -62
  30. package/hangfire/createMakeHangfireRequest.d.ts +10 -1
  31. package/hangfire/createMakeHangfireRequest.js +1 -1
  32. package/hangfire/createMakeHangfireRequest.mjs +16 -14
  33. package/identity-1bae7cf8.js +1 -0
  34. package/identity-6eafe87b.mjs +64 -0
  35. package/index.d.ts +2 -0
  36. package/index.js +1 -1
  37. package/index.mjs +80 -58
  38. package/logger/index.js +1 -1
  39. package/logger/index.mjs +8 -7
  40. package/logger/pascalCaseFormatter.js +1 -1
  41. package/logger/pascalCaseFormatter.mjs +21 -27
  42. package/order/getCheckOrderItemsMappedByTicketItemStatus.js +1 -1
  43. package/order/getCheckOrderItemsMappedByTicketItemStatus.mjs +15 -13
  44. package/order/getCheckOrderMinimumStatusTicketItem.js +1 -1
  45. package/order/getCheckOrderMinimumStatusTicketItem.mjs +19 -17
  46. package/order/index.js +1 -1
  47. package/order/index.mjs +11 -9
  48. package/outlet/getExpressAvailableOrderFormats.js +1 -1
  49. package/outlet/getExpressAvailableOrderFormats.mjs +27 -26
  50. package/outlet/getExpressNextAvailabilityShiftTime.d.ts +2 -2
  51. package/outlet/getExpressNextAvailabilityShiftTime.js +1 -1
  52. package/outlet/getExpressNextAvailabilityShiftTime.mjs +19 -18
  53. package/outlet/getExpressServiceIntervalEnd.d.ts +2 -2
  54. package/outlet/getExpressServiceIntervalEnd.js +1 -1
  55. package/outlet/getExpressServiceIntervalEnd.mjs +7 -9
  56. package/outlet/getExpressServiceIntervalStart.d.ts +2 -2
  57. package/outlet/getExpressServiceIntervalStart.js +1 -1
  58. package/outlet/getExpressServiceIntervalStart.mjs +7 -9
  59. package/outlet/getListOutletOpeningHoursTable.d.ts +1 -1
  60. package/outlet/getListOutletOpeningHoursTable.js +1 -1
  61. package/outlet/getListOutletOpeningHoursTable.mjs +135 -150
  62. package/outlet/getMomentFromDateAndTimeString.js +1 -1
  63. package/outlet/getMomentFromDateAndTimeString.mjs +1 -1
  64. package/outlet/getOutletActiveOpeningInterval.d.ts +2 -2
  65. package/outlet/getOutletActiveOpeningInterval.js +1 -1
  66. package/outlet/getOutletActiveOpeningInterval.mjs +15 -12
  67. package/outlet/getOutletAvailabilityInfo.js +1 -1
  68. package/outlet/getOutletAvailabilityInfo.mjs +23 -25
  69. package/outlet/getOutletCurrentActiveOperatingHour.js +1 -1
  70. package/outlet/getOutletCurrentActiveOperatingHour.mjs +16 -15
  71. package/outlet/getOutletCurrentAvailabilityInfo.js +1 -1
  72. package/outlet/getOutletCurrentAvailabilityInfo.mjs +27 -26
  73. package/outlet/getOutletCurrentClosingTimeText.js +1 -1
  74. package/outlet/getOutletCurrentClosingTimeText.mjs +14 -10
  75. package/outlet/getOutletDeliveryFee.js +1 -1
  76. package/outlet/getOutletDeliveryFee.mjs +5 -5
  77. package/outlet/getOutletFormattedAddress.d.ts +9 -1
  78. package/outlet/getOutletFormattedAddress.js +1 -1
  79. package/outlet/getOutletFormattedAddress.mjs +9 -4
  80. package/outlet/getOutletNextOpeningTagInformation.js +1 -1
  81. package/outlet/getOutletNextOpeningTagInformation.mjs +8 -7
  82. package/outlet/getOutletNextOpeningTimeText.js +1 -1
  83. package/outlet/getOutletNextOpeningTimeText.mjs +10 -8
  84. package/outlet/getOutletNextReadyToOrderTime.js +1 -1
  85. package/outlet/getOutletNextReadyToOrderTime.mjs +11 -11
  86. package/outlet/getOutletPickerTimesForDay.js +1 -1
  87. package/outlet/getOutletPickerTimesForDay.mjs +33 -34
  88. package/outlet/getOutletPickerTimesForWeek.js +1 -1
  89. package/outlet/getOutletPickerTimesForWeek.mjs +4 -3
  90. package/outlet/getOutletTagInformation.d.ts +1 -1
  91. package/outlet/getOutletTagInformation.js +1 -1
  92. package/outlet/getOutletTagInformation.mjs +69 -70
  93. package/outlet/getOutletTodayOpeningTimes.js +1 -1
  94. package/outlet/getOutletTodayOpeningTimes.mjs +43 -39
  95. package/outlet/getPartitionedOutletsList.js +1 -1
  96. package/outlet/getPartitionedOutletsList.mjs +4 -4
  97. package/outlet/getPickerIntervalsForDay.js +1 -1
  98. package/outlet/getPickerIntervalsForDay.mjs +20 -12
  99. package/outlet/getServiceIntervalEnd.d.ts +1 -1
  100. package/outlet/getServiceIntervalEnd.js +1 -1
  101. package/outlet/getServiceIntervalEnd.mjs +12 -10
  102. package/outlet/getServiceIntervalRange.d.ts +1 -2
  103. package/outlet/getServiceIntervalRange.js +1 -1
  104. package/outlet/getServiceIntervalRange.mjs +8 -12
  105. package/outlet/getServiceIntervalStart.d.ts +1 -1
  106. package/outlet/getServiceIntervalStart.js +1 -1
  107. package/outlet/getServiceIntervalStart.mjs +6 -7
  108. package/outlet/getServiceIntervalsForOrderFormat.d.ts +7 -8
  109. package/outlet/getStructuredOutletAddress.js +1 -1
  110. package/outlet/getStructuredOutletAddress.mjs +7 -7
  111. package/outlet/index.js +1 -1
  112. package/outlet/index.mjs +73 -68
  113. package/outlet/searchNextOpeningMoment.d.ts +1 -1
  114. package/outlet/searchNextOpeningMoment.js +1 -1
  115. package/outlet/searchNextOpeningMoment.mjs +49 -56
  116. package/outlet/serviceDateTimesFromOpeningHours.d.ts +3 -5
  117. package/outlet/serviceDateTimesFromOpeningHours.js +1 -1
  118. package/outlet/serviceDateTimesFromOpeningHours.mjs +342 -27
  119. package/outlet/types.d.ts +0 -2
  120. package/package.json +21 -1
  121. package/time/getEndTimeSpanOfTimePeriod.js +1 -1
  122. package/time/getEndTimeSpanOfTimePeriod.mjs +5 -9
  123. package/{toString-e631a957.mjs → toString-3b91b335.mjs} +12 -11
  124. package/toString-9eae9442.js +1 -0
  125. package/_baseIsEqual-39cef2eb.mjs +0 -530
  126. package/_baseIsEqual-b3df9240.js +0 -1
  127. package/_baseIteratee-13e892b8.mjs +0 -151
  128. package/_baseIteratee-be26bb18.js +0 -1
  129. package/toString-425512fc.js +0 -1
@@ -1,7 +1,7 @@
1
1
  import o from "moment";
2
2
  function u(t) {
3
3
  const [e, r, n] = t.split(":");
4
- return o().utc(!1).startOf("day").set({
4
+ return o().startOf("day").set({
5
5
  hour: Number(e),
6
6
  minute: Number(r),
7
7
  second: Number(n),
@@ -1,4 +1,4 @@
1
- import { OpeningHours, OrderFormat } from '@ancon/wildcat-types';
1
+ import { OpeningHoursInterval, OrderFormat } from '@ancon/wildcat-types';
2
2
  import { Moment } from 'moment';
3
3
  /**
4
4
  * Get the active opening interval for the given outlet opening hours, date and order format
@@ -8,4 +8,4 @@ import { Moment } from 'moment';
8
8
  * @param orderFormat - The order format to check
9
9
  * @returns The active opening interval or undefined if no interval is active for the given date and order format
10
10
  */
11
- export default function getOutletActiveOpeningInterval(date: Moment, openingHours: OpeningHours[], orderFormat: OrderFormat): OpeningHours | undefined;
11
+ export default function getOutletActiveOpeningInterval(date: Moment, openingHours: OpeningHoursInterval[], orderFormat: OrderFormat): OpeningHoursInterval | undefined;
@@ -1 +1 @@
1
- "use strict";const n=require("@ancon/wildcat-types"),p=require("moment"),l=require("../shared/constants.js");function y(r,c,i){const a=c.reduce((t,e)=>{if((e.orderFormat&i)===i)switch(e.type){case n.IntervalType.Exception:{const s=p(e.periodFrom),f=p(e.periodTo);r.isBetween(s,f,"day","[]")&&(e.state===n.IntervalState.Closed?t.closedExceptions.push(e):t.openExceptions.push(e))}break;case n.IntervalType.Interval:default:(e.dayOfWeek===n.DayOfWeek.Everyday||e.dayOfWeek===l.DaysOfWeekMap[r.isoWeekday()])&&t.openIntervals.push(e);break}return t},{closedExceptions:[],openExceptions:[],openIntervals:[]}),{closedExceptions:d,openExceptions:o,openIntervals:u}=a;if(!d.length){if(o.length){if(o.length>1){const[t]=o.sort((e,s)=>e.position-s.position);return t}return o[0]}return u[0]}}module.exports=y;
1
+ "use strict";const n=require("@ancon/wildcat-types"),f=require("../shared/constants.js"),p=require("../date/createLocalTimezoneMoment.js");require("moment");function y(r,c,i){const a=c.reduce((t,e)=>{if((e.orderFormat&i)===i)switch(e.type){case n.IntervalType.Exception:{const s=p(e.periodFrom),l=p(e.periodTo);r.isBetween(s,l,"day","[]")&&(e.state===n.IntervalState.Closed?t.closedExceptions.push(e):t.openExceptions.push(e))}break;case n.IntervalType.Normal:default:(e.dayOfWeek===n.DayOfWeek.Everyday||e.dayOfWeek===f.DaysOfWeekMap[r.isoWeekday()])&&t.openIntervals.push(e);break}return t},{closedExceptions:[],openExceptions:[],openIntervals:[]}),{closedExceptions:d,openExceptions:o,openIntervals:u}=a;if(!d.length){if(o.length){if(o.length>1){const[t]=o.sort((e,s)=>e.position-s.position);return t}return o[0]}return u[0]}}module.exports=y;
@@ -1,21 +1,24 @@
1
- import { DayOfWeek as l, IntervalType as r, IntervalState as m } from "@ancon/wildcat-types";
2
- import i from "moment";
1
+ import { DayOfWeek as u, IntervalType as r, IntervalState as m } from "@ancon/wildcat-types";
3
2
  import { DaysOfWeekMap as y } from "../shared/constants.mjs";
4
- function k(s, f, p) {
5
- const c = f.reduce(
3
+ import i from "../date/createLocalTimezoneMoment.mjs";
4
+ import "moment";
5
+ function O(s, c, p) {
6
+ const f = c.reduce(
6
7
  (o, e) => {
7
8
  if ((e.orderFormat & p) === p)
8
9
  switch (e.type) {
9
10
  case r.Exception:
10
11
  {
11
- const n = i(e.periodFrom), u = i(e.periodTo);
12
- s.isBetween(n, u, "day", "[]") && (e.state === m.Closed ? o.closedExceptions.push(e) : o.openExceptions.push(e));
12
+ const n = i(
13
+ e.periodFrom
14
+ ), l = i(e.periodTo);
15
+ s.isBetween(n, l, "day", "[]") && (e.state === m.Closed ? o.closedExceptions.push(e) : o.openExceptions.push(e));
13
16
  }
14
17
  break;
15
- case r.Interval:
18
+ case r.Normal:
16
19
  default:
17
20
  // Every day in the week
18
- (e.dayOfWeek === l.Everyday || // Specific day in the week
21
+ (e.dayOfWeek === u.Everyday || // Specific day in the week
19
22
  e.dayOfWeek === y[s.isoWeekday()]) && o.openIntervals.push(e);
20
23
  break;
21
24
  }
@@ -26,8 +29,8 @@ function k(s, f, p) {
26
29
  openExceptions: [],
27
30
  openIntervals: []
28
31
  }
29
- ), { closedExceptions: d, openExceptions: t, openIntervals: a } = c;
30
- if (!d.length) {
32
+ ), { closedExceptions: a, openExceptions: t, openIntervals: d } = f;
33
+ if (!a.length) {
31
34
  if (t.length) {
32
35
  if (t.length > 1) {
33
36
  const [o] = t.sort(
@@ -37,9 +40,9 @@ function k(s, f, p) {
37
40
  }
38
41
  return t[0];
39
42
  }
40
- return a[0];
43
+ return d[0];
41
44
  }
42
45
  }
43
46
  export {
44
- k as default
47
+ O as default
45
48
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("moment"),l=require("@ancon/wildcat-types"),r=60;var c=(e=>(e[e.Today=0]="Today",e[e.Tomorrow=1]="Tomorrow",e))(c||{});function o(e,t,d=!1){let s=null;if(e.openNow&&e.closingTime!==null)(e.closingTime.diff(t,"minutes")<r||d)&&(s={time:e.closingTime.utcOffset(t.utcOffset()).format("LT"),state:l.OutletState.Closed});else if(!e.openNow&&e.openingTime)if(e.openingTime.isSame(t,"d"))s={time:f(e.openingTime).utcOffset(t.utcOffset()).calendar(),state:l.OutletState.Open};else{const u=f().add(1,"day").utcOffset(t.utcOffset()),i=f(e.openingTime).utcOffset(t.utcOffset());i.isSame(u,"d")?s={time:i.format("LT"),state:l.OutletState.Open,day:1}:i.isAfter(t.clone().add(1,"week"))?s={time:i.format("D MMMM LT"),state:l.OutletState.Open}:i&&(s={time:i.format("ddd LT"),state:l.OutletState.Open})}return s}exports.OutletAvailabilityDay=c;exports.default=o;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("moment"),s=require("@ancon/wildcat-types"),m=60;var u=(e=>(e[e.Today=0]="Today",e[e.Tomorrow=1]="Tomorrow",e))(u||{});function n(e,l,r=!1){let t=null;if(e.openNow&&e.closingTime!==null)(e.closingTime.diff(l,"minutes")<m||r)&&(t={time:e.closingTime.format("LT"),state:s.OutletState.Closed});else if(!e.openNow&&e.openingTime)if(e.openingTime.isSame(l,"d"))t={time:o(e.openingTime).calendar(),state:s.OutletState.Opened};else{const d=o().add(1,"day"),i=o(e.openingTime);i.isSame(d,"d")?t={time:i.format("LT"),state:s.OutletState.Opened,day:1}:i.isAfter(l.clone().add(1,"week"))?t={time:i.format("D MMMM LT"),state:s.OutletState.Opened}:i&&(t={time:i.format("ddd LT"),state:s.OutletState.Opened})}return t}exports.OutletAvailabilityDay=u;exports.default=n;
@@ -1,40 +1,38 @@
1
- import d from "moment";
2
- import { OutletState as i } from "@ancon/wildcat-types";
3
- const l = 60;
4
- var o = /* @__PURE__ */ ((e) => (e[e.Today = 0] = "Today", e[e.Tomorrow = 1] = "Tomorrow", e))(o || {});
5
- function T(e, t, m = !1) {
1
+ import m from "moment";
2
+ import { OutletState as t } from "@ancon/wildcat-types";
3
+ const r = 60;
4
+ var T = /* @__PURE__ */ ((e) => (e[e.Today = 0] = "Today", e[e.Tomorrow = 1] = "Tomorrow", e))(T || {});
5
+ function p(e, o, l = !1) {
6
6
  let s = null;
7
7
  if (e.openNow && e.closingTime !== null)
8
- (e.closingTime.diff(t, "minutes") < l || m) && (s = {
9
- time: e.closingTime.utcOffset(t.utcOffset()).format("LT"),
10
- state: i.Closed
8
+ (e.closingTime.diff(o, "minutes") < r || l) && (s = {
9
+ time: e.closingTime.format("LT"),
10
+ state: t.Closed
11
11
  });
12
12
  else if (!e.openNow && e.openingTime)
13
- if (e.openingTime.isSame(t, "d"))
13
+ if (e.openingTime.isSame(o, "d"))
14
14
  s = {
15
- time: d(e.openingTime).utcOffset(t.utcOffset()).calendar(),
16
- state: i.Open
15
+ time: m(e.openingTime).calendar(),
16
+ state: t.Opened
17
17
  };
18
18
  else {
19
- const c = d().add(1, "day").utcOffset(t.utcOffset()), f = d(e.openingTime).utcOffset(
20
- t.utcOffset()
21
- );
22
- f.isSame(c, "d") ? s = {
23
- time: f.format("LT"),
24
- state: i.Open,
19
+ const d = m().add(1, "day"), i = m(e.openingTime);
20
+ i.isSame(d, "d") ? s = {
21
+ time: i.format("LT"),
22
+ state: t.Opened,
25
23
  day: 1
26
24
  /* Tomorrow */
27
- } : f.isAfter(t.clone().add(1, "week")) ? s = {
28
- time: f.format("D MMMM LT"),
29
- state: i.Open
30
- } : f && (s = {
31
- time: f.format("ddd LT"),
32
- state: i.Open
25
+ } : i.isAfter(o.clone().add(1, "week")) ? s = {
26
+ time: i.format("D MMMM LT"),
27
+ state: t.Opened
28
+ } : i && (s = {
29
+ time: i.format("ddd LT"),
30
+ state: t.Opened
33
31
  });
34
32
  }
35
33
  return s;
36
34
  }
37
35
  export {
38
- o as OutletAvailabilityDay,
39
- T as default
36
+ T as OutletAvailabilityDay,
37
+ p as default
40
38
  };
@@ -1 +1 @@
1
- "use strict";const a=require("@ancon/wildcat-types"),u=require("./getMomentFromDateAndTimeString.js");require("moment");function m(s,e,l){if(e.exception){const{exception:t}=e;if(t.type===a.IntervalType.Interval){const[n,o]=t.duration.split(":").map(Number),i=u(s,t.start),r=i.clone().add(n,"hours").add(o,"minutes");if(l.isBetween(i,r))return e.exception}}else for(let t=0;t<e.intervals.length;t+=1){const n=e.intervals[t],[o,i]=n.duration.split(":").map(Number),r=u(s,n.start),c=r.clone().add(o,"hours").add(i,"minutes");if(l.isBetween(r,c))return n}return null}module.exports=m;
1
+ "use strict";const a=require("@ancon/wildcat-types"),l=require("../time/getTimeSpanParts.js"),s=require("./getMomentFromDateAndTimeString.js");require("moment");function f(r,e,c){if(e.exception){const{exception:t}=e;if(t.type===a.IntervalType.Normal){const n=l(t.duration),i=s(r,t.from),o=i.clone().add(n);if(c.isBetween(i,o))return e.exception}}else for(let t=0;t<e.intervals.length;t+=1){const n=e.intervals[t],i=l(n.duration),o=s(r,n.from),u=o.clone().add(i);if(c.isBetween(o,u))return n}return null}module.exports=f;
@@ -1,28 +1,29 @@
1
- import { IntervalType as m } from "@ancon/wildcat-types";
2
- import u from "./getMomentFromDateAndTimeString.mjs";
1
+ import { IntervalType as f } from "@ancon/wildcat-types";
2
+ import c from "../time/getTimeSpanParts.mjs";
3
+ import m from "./getMomentFromDateAndTimeString.mjs";
3
4
  import "moment";
4
- function d(s, n, l) {
5
+ function g(r, n, l) {
5
6
  if (n.exception) {
6
7
  const { exception: t } = n;
7
- if (t.type === m.Interval) {
8
- const [e, r] = t.duration.split(":").map(Number), i = u(
9
- s,
10
- t.start
11
- ), o = i.clone().add(e, "hours").add(r, "minutes");
12
- if (l.isBetween(i, o))
8
+ if (t.type === f.Normal) {
9
+ const e = c(t.duration), o = m(
10
+ r,
11
+ t.from
12
+ ), i = o.clone().add(e);
13
+ if (l.isBetween(o, i))
13
14
  return n.exception;
14
15
  }
15
16
  } else
16
17
  for (let t = 0; t < n.intervals.length; t += 1) {
17
- const e = n.intervals[t], [r, i] = e.duration.split(":").map(Number), o = u(
18
- s,
19
- e.start
20
- ), c = o.clone().add(r, "hours").add(i, "minutes");
21
- if (l.isBetween(o, c))
18
+ const e = n.intervals[t], o = c(e.duration), i = m(
19
+ r,
20
+ e.from
21
+ ), s = i.clone().add(o);
22
+ if (l.isBetween(i, s))
22
23
  return e;
23
24
  }
24
25
  return null;
25
26
  }
26
27
  export {
27
- d as default
28
+ g as default
28
29
  };
@@ -1 +1 @@
1
- "use strict";const T=require("@ancon/wildcat-types"),p=require("moment"),u=require("./getOutletTagInformation.js"),a=require("./getOutletAvailabilityInfo.js");require("./constants.js");require("./getOutletCurrentActiveOperatingHour.js");require("./getMomentFromDateAndTimeString.js");require("./searchNextOpeningMoment.js");function d(o,e){let{openingTime:i}=o,{closingTime:n}=o;return!!e.openingTime&&!!e.closingTime?(o.openingTime?o.openingTime.isBetween(e.openingTime,e.closingTime)&&(i=e.openingTime):i=e.openingTime,o.closingTime?o.closingTime.isBetween(e.openingTime,e.closingTime)&&(n=e.closingTime):n=e.closingTime):((!i&&e.openingTime||e.openingTime&&i&&e.openingTime.isBefore(i))&&(i=e.openingTime),!n&&e.closingTime?n=e.closingTime:e.closingTime&&n&&(e.closingTime.isBefore(n)||(n=e.closingTime))),{openingTime:i,closingTime:n}}function c(o){const{serviceDateTimes:e,state:i,timeZoneOffset:n}=o,l=p(),t=i===T.OutletState.Open,m=e.reduce((s,g)=>{const f=(g==null?void 0:g.intervals)||[],r=u.default(f,t,l,l,n);return s?s.openNow&&!r.openNow?s:{...d(s,r),openNow:s.openNow||r.openNow,openDuringSpecifiedTime:s.openDuringSpecifiedTime||r.openDuringSpecifiedTime}:r},void 0);return m?a.default(m,l,!1):null}module.exports=c;
1
+ "use strict";const f=require("@ancon/wildcat-types"),T=require("moment"),u=require("./getOutletTagInformation.js"),p=require("./getOutletAvailabilityInfo.js");require("../date/createLocalTimezoneMoment.js");require("../time/getTimeSpanParts.js");require("./constants.js");require("./getOutletCurrentActiveOperatingHour.js");require("./getMomentFromDateAndTimeString.js");require("./searchNextOpeningMoment.js");function a(o,e){let{openingTime:n}=o,{closingTime:i}=o;return!!e.openingTime&&!!e.closingTime?(o.openingTime?o.openingTime.isBetween(e.openingTime,e.closingTime)&&(n=e.openingTime):n=e.openingTime,o.closingTime?o.closingTime.isBetween(e.openingTime,e.closingTime)&&(i=e.closingTime):i=e.closingTime):((!n&&e.openingTime||e.openingTime&&n&&e.openingTime.isBefore(n))&&(n=e.openingTime),!i&&e.closingTime?i=e.closingTime:e.closingTime&&i&&(e.closingTime.isBefore(i)||(i=e.closingTime))),{openingTime:n,closingTime:i}}function d(o){const{serviceDateTimes:e,state:n}=o,i=T(),g=n===f.OutletState.Opened,r=e.reduce((s,l)=>{const m=(l==null?void 0:l.intervals)||[],t=u.default(m,g,i,i);return s?s.openNow&&!t.openNow?s:{...a(s,t),openNow:s.openNow||t.openNow,openDuringSpecifiedTime:s.openDuringSpecifiedTime||t.openDuringSpecifiedTime}:t},void 0);return r?p.default(r,i,!1):null}module.exports=d;
@@ -1,45 +1,46 @@
1
1
  import { OutletState as p } from "@ancon/wildcat-types";
2
- import T from "moment";
3
- import a from "./getOutletTagInformation.mjs";
4
- import d from "./getOutletAvailabilityInfo.mjs";
2
+ import f from "moment";
3
+ import T from "./getOutletTagInformation.mjs";
4
+ import a from "./getOutletAvailabilityInfo.mjs";
5
+ import "../date/createLocalTimezoneMoment.mjs";
6
+ import "../time/getTimeSpanParts.mjs";
5
7
  import "./constants.mjs";
6
8
  import "./getOutletCurrentActiveOperatingHour.mjs";
7
9
  import "./getMomentFromDateAndTimeString.mjs";
8
10
  import "./searchNextOpeningMoment.mjs";
9
- function u(o, i) {
10
- let { openingTime: e } = o, { closingTime: n } = o;
11
- return !!i.openingTime && !!i.closingTime ? (o.openingTime ? o.openingTime.isBetween(
11
+ function d(n, i) {
12
+ let { openingTime: o } = n, { closingTime: e } = n;
13
+ return !!i.openingTime && !!i.closingTime ? (n.openingTime ? n.openingTime.isBetween(
12
14
  i.openingTime,
13
15
  i.closingTime
14
- ) && (e = i.openingTime) : e = i.openingTime, o.closingTime ? o.closingTime.isBetween(
16
+ ) && (o = i.openingTime) : o = i.openingTime, n.closingTime ? n.closingTime.isBetween(
15
17
  i.openingTime,
16
18
  i.closingTime
17
- ) && (n = i.closingTime) : n = i.closingTime) : ((!e && i.openingTime || i.openingTime && e && i.openingTime.isBefore(e)) && (e = i.openingTime), !n && i.closingTime ? n = i.closingTime : i.closingTime && n && (i.closingTime.isBefore(n) || (n = i.closingTime))), {
18
- openingTime: e,
19
- closingTime: n
19
+ ) && (e = i.closingTime) : e = i.closingTime) : ((!o && i.openingTime || i.openingTime && o && i.openingTime.isBefore(o)) && (o = i.openingTime), !e && i.closingTime ? e = i.closingTime : i.closingTime && e && (i.closingTime.isBefore(e) || (e = i.closingTime))), {
20
+ openingTime: o,
21
+ closingTime: e
20
22
  };
21
23
  }
22
- function b(o) {
23
- const { serviceDateTimes: i, state: e, timeZoneOffset: n } = o, r = T(), m = e === p.Open, l = i.reduce((s, g) => {
24
- const f = (g == null ? void 0 : g.intervals) || [], t = a(
25
- f,
26
- m,
27
- r,
28
- r,
29
- n
24
+ function y(n) {
25
+ const { serviceDateTimes: i, state: o } = n, e = f(), g = o === p.Opened, s = i.reduce((m, r) => {
26
+ const l = (r == null ? void 0 : r.intervals) || [], t = T(
27
+ l,
28
+ g,
29
+ e,
30
+ e
30
31
  );
31
- return s ? s.openNow && !t.openNow ? s : {
32
- ...u(s, t),
33
- openNow: s.openNow || t.openNow,
34
- openDuringSpecifiedTime: s.openDuringSpecifiedTime || t.openDuringSpecifiedTime
32
+ return m ? m.openNow && !t.openNow ? m : {
33
+ ...d(m, t),
34
+ openNow: m.openNow || t.openNow,
35
+ openDuringSpecifiedTime: m.openDuringSpecifiedTime || t.openDuringSpecifiedTime
35
36
  } : t;
36
37
  }, void 0);
37
- return l ? d(
38
- l,
39
- r,
38
+ return s ? a(
39
+ s,
40
+ e,
40
41
  !1
41
42
  ) : null;
42
43
  }
43
44
  export {
44
- b as default
45
+ y as default
45
46
  };
@@ -1 +1 @@
1
- "use strict";const r=require("moment"),q=require("./getOutletTodayOpeningTimes.js");require("../_baseIteratee-be26bb18.js");require("../_baseIsEqual-b3df9240.js");require("../isArray-640f9811.js");require("../toString-425512fc.js");require("../noop-7ea3b37b.js");require("./getListOutletOpeningHoursTable.js");require("@ancon/wildcat-types");require("../shared/isWithinFlag.js");require("../shared/generateId.js");require("react");function m(c,d){const i=r(),s=q(c);if(s){const u=s.find(e=>{const t=r(e.start),n=r(e.end);return i.isBetween(t,n)});if(u){const{end:e}=u,t=r(e),n=i.isSame(t,"day"),o=t.format(n?"LT":"ddd LT");return d("untilTime",{time:o})||""}}}module.exports=m;
1
+ "use strict";const t=require("moment"),d=require("./getOutletTodayOpeningTimes.js");require("../_baseIteratee-075c204c.js");require("../_getTag-b8923c48.js");require("../isArray-640f9811.js");require("../_baseIsEqual-bcac9024.js");require("../identity-1bae7cf8.js");require("../toString-9eae9442.js");require("../noop-7ea3b37b.js");require("./getListOutletOpeningHoursTable.js");require("@ancon/wildcat-types");require("../shared/isWithinFlag.js");require("../shared/generateId.js");require("react");require("../time/getTimeSpanParts.js");require("../date/createLocalTimezoneMoment.js");function m(q,c){const n=t(),u=d(q);if(u){const s=u.find(e=>{const r=t(e.start),i=t(e.end);return n.isBetween(r,i)});if(s){const{end:e}=s,r=t(e),i=n.isSame(r,"day"),o=r.format(i?"LT":"ddd LT");return c("untilTime",{time:o})||""}}}module.exports=m;
@@ -1,28 +1,32 @@
1
- import n from "moment";
1
+ import e from "moment";
2
2
  import c from "./getOutletTodayOpeningTimes.mjs";
3
- import "../_baseIteratee-13e892b8.mjs";
4
- import "../_baseIsEqual-39cef2eb.mjs";
3
+ import "../_baseIteratee-4c4d0995.mjs";
4
+ import "../_getTag-4e44633b.mjs";
5
5
  import "../isArray-0d9c7aaa.mjs";
6
- import "../toString-e631a957.mjs";
6
+ import "../_baseIsEqual-12d01a44.mjs";
7
+ import "../identity-6eafe87b.mjs";
8
+ import "../toString-3b91b335.mjs";
7
9
  import "../noop-378485d5.mjs";
8
10
  import "./getListOutletOpeningHoursTable.mjs";
9
11
  import "@ancon/wildcat-types";
10
12
  import "../shared/isWithinFlag.mjs";
11
13
  import "../shared/generateId.mjs";
12
14
  import "react";
13
- function L(p, d) {
14
- const i = n(), r = c(p);
15
+ import "../time/getTimeSpanParts.mjs";
16
+ import "../date/createLocalTimezoneMoment.mjs";
17
+ function H(p, d) {
18
+ const n = e(), r = c(p);
15
19
  if (r) {
16
20
  const m = r.find((t) => {
17
- const e = n(t.start), o = n(t.end);
18
- return i.isBetween(e, o);
21
+ const o = e(t.start), i = e(t.end);
22
+ return n.isBetween(o, i);
19
23
  });
20
24
  if (m) {
21
- const { end: t } = m, e = n(t), o = i.isSame(e, "day"), s = e.format(o ? "LT" : "ddd LT");
25
+ const { end: t } = m, o = e(t), i = n.isSame(o, "day"), s = o.format(i ? "LT" : "ddd LT");
22
26
  return d("untilTime", { time: s }) || "";
23
27
  }
24
28
  }
25
29
  }
26
30
  export {
27
- L as default
31
+ H as default
28
32
  };
@@ -1 +1 @@
1
- "use strict";const r=require("@ancon/wildcat-types");function i(e){return e?e.find(t=>(t.type&r.OrderFormat.Delivery)===r.OrderFormat.Delivery):null}module.exports=i;
1
+ "use strict";const e=require("@ancon/wildcat-types");function i(r){return r?r.find(t=>(t.orderFormats&e.OrderFormat.Delivery)===e.OrderFormat.Delivery):null}module.exports=i;
@@ -1,9 +1,9 @@
1
- import { OrderFormat as r } from "@ancon/wildcat-types";
2
- function i(e) {
3
- return e ? e.find(
4
- (t) => (t.type & r.Delivery) === r.Delivery
1
+ import { OrderFormat as e } from "@ancon/wildcat-types";
2
+ function o(r) {
3
+ return r ? r.find(
4
+ (t) => (t.orderFormats & e.Delivery) === e.Delivery
5
5
  ) : null;
6
6
  }
7
7
  export {
8
- i as default
8
+ o as default
9
9
  };
@@ -1 +1,9 @@
1
- export default function getOutletFormattedAddress(street: string, city: string, maxCharCount?: number): string;
1
+ declare type StreetCity = {
2
+ street: string;
3
+ city: string;
4
+ };
5
+ declare type FormatOptions = {
6
+ streetMaxLength?: number;
7
+ };
8
+ export default function getOutletFormattedAddress<OutletAddress extends StreetCity>(address: OutletAddress | undefined, options?: FormatOptions): string;
9
+ export {};
@@ -1 +1 @@
1
- "use strict";function c(t,s,n=40){const e=t&&(t.length>n?`${t.substr(0,n-3)}...`:t),d=s||"",a=s?`${e},`:e;return`${e?a:""} ${d}`}module.exports=c;
1
+ "use strict";const u=require("../string/truncate.js"),s=40;function a(e,t){if(e){const{street:r,city:n}=e,c=(t==null?void 0:t.streetMaxLength)||s;return[r&&u(r,c),n].filter(Boolean).join(", ")||""}return""}module.exports=a;
@@ -1,7 +1,12 @@
1
- function c(t, d, n = 40) {
2
- const e = t && (t.length > n ? `${t.substr(0, n - 3)}...` : t), a = d || "", s = d ? `${e},` : e;
3
- return `${e ? s : ""} ${a}`;
1
+ import c from "../string/truncate.mjs";
2
+ const u = 40;
3
+ function d(e, t) {
4
+ if (e) {
5
+ const { street: r, city: n } = e, a = (t == null ? void 0 : t.streetMaxLength) || u;
6
+ return [r && c(r, a), n].filter(Boolean).join(", ") || "";
7
+ }
8
+ return "";
4
9
  }
5
10
  export {
6
- c as default
11
+ d as default
7
12
  };
@@ -1 +1 @@
1
- "use strict";const u=require("@ancon/wildcat-types"),f=require("moment"),g=require("./getOutletTagInformation.js");require("./constants.js");require("./getOutletCurrentActiveOperatingHour.js");require("./getMomentFromDateAndTimeString.js");require("./searchNextOpeningMoment.js");function m(o){const i=f();return o.serviceDateTimes.reduce((e,r)=>{const t=(r==null?void 0:r.intervals)||[],n=g.default(t,o.state===u.OutletState.Open,i,i,o==null?void 0:o.timeZoneOffset);if(!e&&!n.openNow)return n;const s=(e==null?void 0:e.openingTime)&&n.openingTime&&n.openingTime.isBefore(e.openingTime);return!n.openNow&&s?n:e},void 0)}module.exports=m;
1
+ "use strict";const s=require("@ancon/wildcat-types"),g=require("moment"),f=require("./getOutletTagInformation.js");require("../date/createLocalTimezoneMoment.js");require("../time/getTimeSpanParts.js");require("./constants.js");require("./getOutletCurrentActiveOperatingHour.js");require("./getMomentFromDateAndTimeString.js");require("./searchNextOpeningMoment.js");function m(o){const r=g();return o.serviceDateTimes.reduce((e,t)=>{const i=(t==null?void 0:t.intervals)||[],n=f.default(i,o.state===s.OutletState.Opened,r,r);if(!e&&!n.openNow)return n;const u=(e==null?void 0:e.openingTime)&&n.openingTime&&n.openingTime.isBefore(e.openingTime);return!n.openNow&&u?n:e},void 0)}module.exports=m;
@@ -1,19 +1,20 @@
1
1
  import { OutletState as p } from "@ancon/wildcat-types";
2
2
  import f from "moment";
3
3
  import g from "./getOutletTagInformation.mjs";
4
+ import "../date/createLocalTimezoneMoment.mjs";
5
+ import "../time/getTimeSpanParts.mjs";
4
6
  import "./constants.mjs";
5
7
  import "./getOutletCurrentActiveOperatingHour.mjs";
6
8
  import "./getMomentFromDateAndTimeString.mjs";
7
9
  import "./searchNextOpeningMoment.mjs";
8
10
  function N(e) {
9
- const t = f();
10
- return e.serviceDateTimes.reduce((n, i) => {
11
- const r = (i == null ? void 0 : i.intervals) || [], o = g(
11
+ const i = f();
12
+ return e.serviceDateTimes.reduce((n, t) => {
13
+ const r = (t == null ? void 0 : t.intervals) || [], o = g(
12
14
  r,
13
- e.state === p.Open,
14
- t,
15
- t,
16
- e == null ? void 0 : e.timeZoneOffset
15
+ e.state === p.Opened,
16
+ i,
17
+ i
17
18
  );
18
19
  if (!n && !o.openNow)
19
20
  return o;
@@ -1 +1 @@
1
- "use strict";const t=require("moment"),u=require("./getOutletNextOpeningTagInformation.js");require("@ancon/wildcat-types");require("./getOutletTagInformation.js");require("./constants.js");require("./getOutletCurrentActiveOperatingHour.js");require("./getMomentFromDateAndTimeString.js");require("./searchNextOpeningMoment.js");function a(n,r){const o=t(),e=u(n);if(e&&!e.openNow&&e.openingTime){const i=t(e.openingTime).utcOffset(o.utcOffset()).calendar({sameDay:"[Today] [at] LT",nextDay:"[Tomorrow] [at] LT",nextWeek:"ddd [at] LT"});return r("openingTime",{time:i})}return null}module.exports=a;
1
+ "use strict";const i=require("moment"),o=require("./getOutletNextOpeningTagInformation.js");require("@ancon/wildcat-types");require("./getOutletTagInformation.js");require("../date/createLocalTimezoneMoment.js");require("../time/getTimeSpanParts.js");require("./constants.js");require("./getOutletCurrentActiveOperatingHour.js");require("./getMomentFromDateAndTimeString.js");require("./searchNextOpeningMoment.js");function u(t,r){const e=o(t);if(e&&!e.openNow&&e.openingTime){const n=i(e.openingTime).calendar({sameDay:"[Today] [at] LT",nextDay:"[Tomorrow] [at] LT",nextWeek:"ddd [at] LT"});return r("openingTime",{time:n})}return null}module.exports=u;
@@ -1,25 +1,27 @@
1
- import e from "moment";
2
- import r from "./getOutletNextOpeningTagInformation.mjs";
1
+ import i from "moment";
2
+ import m from "./getOutletNextOpeningTagInformation.mjs";
3
3
  import "@ancon/wildcat-types";
4
4
  import "./getOutletTagInformation.mjs";
5
+ import "../date/createLocalTimezoneMoment.mjs";
6
+ import "../time/getTimeSpanParts.mjs";
5
7
  import "./constants.mjs";
6
8
  import "./getOutletCurrentActiveOperatingHour.mjs";
7
9
  import "./getMomentFromDateAndTimeString.mjs";
8
10
  import "./searchNextOpeningMoment.mjs";
9
- function s(o, n) {
10
- const i = e(), t = r(o);
11
+ function c(e, o) {
12
+ const t = m(e);
11
13
  if (t && !t.openNow && t.openingTime) {
12
- const m = e(t.openingTime).utcOffset(i.utcOffset()).calendar({
14
+ const n = i(t.openingTime).calendar({
13
15
  sameDay: "[Today] [at] LT",
14
16
  nextDay: "[Tomorrow] [at] LT",
15
17
  nextWeek: "ddd [at] LT"
16
18
  });
17
- return n("openingTime", {
18
- time: m
19
+ return o("openingTime", {
20
+ time: n
19
21
  });
20
22
  }
21
23
  return null;
22
24
  }
23
25
  export {
24
- s as default
26
+ c as default
25
27
  };
@@ -1 +1 @@
1
- "use strict";const f=require("@ancon/wildcat-types"),n=require("moment"),q=require("./getSettingsForOrderFormat.js"),T=require("./isOutletAcceptingPreOrders.js"),u=require("./getOutletTagInformation.js"),v=require("./getNextTenthMinute.js"),x=require("./getServiceIntervalsForOrderFormat.js"),_=require("./getOutletNextServiceTimeOffset.js");require("./constants.js");require("./getOutletCurrentActiveOperatingHour.js");require("./getMomentFromDateAndTimeString.js");require("./searchNextOpeningMoment.js");require("../time/getTimeSpanParts.js");function I(e,r){const t=(e==null?void 0:e.state)===f.OutletState.Open,i=q(r,e==null?void 0:e.orderFormatSettings),m=(i==null?void 0:i.preparationTime)??"00:00:00",O=T((e==null?void 0:e.orderFormatSettings)||[]),d=x(r,(e==null?void 0:e.serviceDateTimes)||[]),c=u.default(d,t,n(),n(),e==null?void 0:e.timeZoneOffset),p=!t&&O&&c.openingTime?c.openingTime:void 0,a=n(),o=n(p),s=(a>o?a:o).utc().second(0).millisecond(0),g=_(r,m,e==null?void 0:e.deliveryIntegrationEnabled);return g>0&&s.add(g,"minute"),s.minute(v(s))}module.exports=I;
1
+ "use strict";const q=require("@ancon/wildcat-types"),n=require("moment"),T=require("./getSettingsForOrderFormat.js"),u=require("./isOutletAcceptingPreOrders.js"),f=require("./getOutletTagInformation.js"),v=require("./getNextTenthMinute.js"),x=require("./getServiceIntervalsForOrderFormat.js"),_=require("./getOutletNextServiceTimeOffset.js");require("../date/createLocalTimezoneMoment.js");require("../time/getTimeSpanParts.js");require("./constants.js");require("./getOutletCurrentActiveOperatingHour.js");require("./getMomentFromDateAndTimeString.js");require("./searchNextOpeningMoment.js");function I(e,r){const s=(e==null?void 0:e.state)===q.OutletState.Opened,i=T(r,e==null?void 0:e.orderFormatSettings),d=(i==null?void 0:i.preparationTime)??"00:00:00",m=u((e==null?void 0:e.orderFormatSettings)||[]),O=x(r,(e==null?void 0:e.serviceDateTimes)||[]),c=f.default(O,s,n(),n()),p=!s&&m&&c.openingTime?c.openingTime:void 0,o=n(),a=n(p),t=(o>a?o:a).second(0).millisecond(0),g=_(r,d,e==null?void 0:e.deliveryIntegrationEnabled);return g>0&&t.add(g,"minute"),t.minute(v(t))}module.exports=I;
@@ -6,33 +6,33 @@ import x from "./getOutletTagInformation.mjs";
6
6
  import I from "./getNextTenthMinute.mjs";
7
7
  import S from "./getServiceIntervalsForOrderFormat.mjs";
8
8
  import y from "./getOutletNextServiceTimeOffset.mjs";
9
+ import "../date/createLocalTimezoneMoment.mjs";
10
+ import "../time/getTimeSpanParts.mjs";
9
11
  import "./constants.mjs";
10
12
  import "./getOutletCurrentActiveOperatingHour.mjs";
11
13
  import "./getMomentFromDateAndTimeString.mjs";
12
14
  import "./searchNextOpeningMoment.mjs";
13
- import "../time/getTimeSpanParts.mjs";
14
- function j(i, r) {
15
- const s = (i == null ? void 0 : i.state) === d.Open, e = T(
15
+ function q(i, r) {
16
+ const t = (i == null ? void 0 : i.state) === d.Opened, e = T(
16
17
  r,
17
18
  i == null ? void 0 : i.orderFormatSettings
18
- ), a = (e == null ? void 0 : e.preparationTime) ?? "00:00:00", f = v(
19
+ ), c = (e == null ? void 0 : e.preparationTime) ?? "00:00:00", f = v(
19
20
  (i == null ? void 0 : i.orderFormatSettings) || []
20
21
  ), g = S(
21
22
  r,
22
23
  (i == null ? void 0 : i.serviceDateTimes) || []
23
24
  ), o = x(
24
25
  g,
25
- s,
26
- n(),
26
+ t,
27
27
  n(),
28
- i == null ? void 0 : i.timeZoneOffset
29
- ), O = !s && f && o.openingTime ? o.openingTime : void 0, t = n(), p = n(O), m = (t > p ? t : p).utc().second(0).millisecond(0), c = y(
28
+ n()
29
+ ), O = !t && f && o.openingTime ? o.openingTime : void 0, s = n(), p = n(O), m = (s > p ? s : p).second(0).millisecond(0), a = y(
30
30
  r,
31
- a,
31
+ c,
32
32
  i == null ? void 0 : i.deliveryIntegrationEnabled
33
33
  );
34
- return c > 0 && m.add(c, "minute"), m.minute(I(m));
34
+ return a > 0 && m.add(a, "minute"), m.minute(I(m));
35
35
  }
36
36
  export {
37
- j as default
37
+ q as default
38
38
  };
@@ -1 +1 @@
1
- "use strict";const m=require("@ancon/wildcat-types"),O=require("moment"),l=require("./getPickerIntervalsForDay.js"),S=require("./getSettingsForOrderFormat.js"),h=require("./getServiceIntervalStart.js"),D=require("./generatePickerTimesForDay.js"),T=require("./getServiceIntervalEnd.js"),_=require("./getOutletNextReadyToOrderTime.js");require("../shared/constants.js");require("./getServiceIntervalsForOrderFormat.js");require("./getNextTenthMinute.js");require("./hoursAndMinutesToMinutes.js");require("./isOutletAcceptingPreOrders.js");require("./getOutletTagInformation.js");require("./constants.js");require("./getOutletCurrentActiveOperatingHour.js");require("./getMomentFromDateAndTimeString.js");require("./searchNextOpeningMoment.js");require("./getOutletNextServiceTimeOffset.js");require("../time/getTimeSpanParts.js");function k(e,f,u,p){const{preparationTime:o="00:00:00"}=S(f,e==null?void 0:e.orderFormatSettings)??{},i=_(e,f);let a=i.clone();const s=O(u).utc(!0);if(s>i)a=i.clone().set({year:s.year(),month:s.month(),date:s.date()});else if(i.diff(s,"day")>0)return[];let r=[];const y=l(a,e==null?void 0:e.serviceDateTimes,f);let q;return y.forEach(t=>{!q&&t.type&&(r=[]);const c=h(a,t,o,e==null?void 0:e.timeZoneOffset),g=T(a,t,o,e==null?void 0:e.timeZoneOffset);c<i&&c.add(i.valueOf()-c.valueOf(),"millisecond");const n=D(c,g,r,void 0,p);n.length>0&&t.state===m.IntervalState.Closed?r=r.filter(d=>d.timestamp<n[0].timestamp||d.timestamp>n[n.length-1].timestamp):n.length>0&&t.state===m.IntervalState.Open&&(r=r.concat(n)),q=t.type}),r}module.exports=k;
1
+ "use strict";const f=require("@ancon/wildcat-types"),g=require("moment"),O=require("./getPickerIntervalsForDay.js"),S=require("./getSettingsForOrderFormat.js"),h=require("./getServiceIntervalStart.js"),D=require("./generatePickerTimesForDay.js"),T=require("./getServiceIntervalEnd.js"),_=require("./getOutletNextReadyToOrderTime.js");require("../shared/constants.js");require("../date/createLocalTimezoneMoment.js");require("./getServiceIntervalsForOrderFormat.js");require("../time/getTimeSpanParts.js");require("./getNextTenthMinute.js");require("./hoursAndMinutesToMinutes.js");require("./isOutletAcceptingPreOrders.js");require("./getOutletTagInformation.js");require("./constants.js");require("./getOutletCurrentActiveOperatingHour.js");require("./getMomentFromDateAndTimeString.js");require("./searchNextOpeningMoment.js");require("./getOutletNextServiceTimeOffset.js");function k(e,o,l,m){const{preparationTime:u="00:00:00"}=S(o,e==null?void 0:e.orderFormatSettings)??{},i=_(e,o);let a=i.clone();const s=g(l);if(s>i)a=i.clone().set({year:s.year(),month:s.month(),date:s.date()});else if(i.diff(s,"day")>0)return[];let t=[];const p=O(a,e==null?void 0:e.serviceDateTimes,o);let q;return p.forEach(r=>{!q&&r.type&&(t=[]);const c=h(a,r,u),y=T(a,r,u);c<i&&c.add(i.valueOf()-c.valueOf(),"millisecond");const n=D(c,y,t,void 0,m);n.length>0&&r.state===f.IntervalState.Closed?t=t.filter(d=>d.timestamp<n[0].timestamp||d.timestamp>n[n.length-1].timestamp):n.length>0&&r.state===f.IntervalState.Opened&&(t=t.concat(n)),q=r.type}),t}module.exports=k;