@nanas-home/hub-common 0.12.378 → 0.16.407

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.
@@ -2,6 +2,31 @@ import dayjs from 'dayjs';
2
2
  import { Token, Container } from '@freshgum/typedi';
3
3
  import { jwtDecode } from 'jwt-decode';
4
4
 
5
+ // src/constants/calendar.constants.ts
6
+ var weekdayTranslationKeyOrder = [
7
+ "sun",
8
+ "mon",
9
+ "tue",
10
+ "wed",
11
+ "thu",
12
+ "fri",
13
+ "sat"
14
+ ];
15
+ var monthTranslationKeyOrder = [
16
+ "jan",
17
+ "feb",
18
+ "mar",
19
+ "apr",
20
+ "may",
21
+ "jun",
22
+ "jul",
23
+ "aug",
24
+ "sep",
25
+ "oct",
26
+ "nov",
27
+ "dec"
28
+ ];
29
+
5
30
  // src/constants/mouseEvent.ts
6
31
  var MouseButton = {
7
32
  left: 0,
@@ -36,7 +61,9 @@ var apiRouteParam = {
36
61
  userUuid: ":userUuid",
37
62
  petUuid: ":petUuid",
38
63
  addressUuid: ":addressUuid",
39
- bookingUuid: ":bookingUuid"
64
+ bookingUuid: ":bookingUuid",
65
+ linkUuid: ":linkUuid",
66
+ linkType: ":linkType"
40
67
  };
41
68
  var apiRoute = {
42
69
  home: "/",
@@ -65,8 +92,8 @@ var apiRoute = {
65
92
  },
66
93
  address: {
67
94
  prefix: "/admin/address",
68
- byLink: "/link",
69
- lookup: "/lookup",
95
+ byLink: `/link/${apiRouteParam.linkUuid}/${apiRouteParam.linkType}`,
96
+ lookup: `/lookup/${apiRouteParam.addressUuid}`,
70
97
  swagger: { name: "Addresses", description: "Endpoints for managing addresses" }
71
98
  },
72
99
  answer: {
@@ -127,6 +154,7 @@ var apiRoute = {
127
154
  create: "",
128
155
  update: apiRouteParam.addressUuid,
129
156
  delete: apiRouteParam.addressUuid,
157
+ lookup: "/lookup",
130
158
  swagger: { name: "Answers", description: "Endpoints for User to manage their Addresses" }
131
159
  },
132
160
  answer: {
@@ -159,11 +187,11 @@ var apiRoute = {
159
187
  pet: {
160
188
  prefix: "/pet",
161
189
  getAll: "",
162
- getById: `${apiRouteParam.petUuid}`,
190
+ getById: `/${apiRouteParam.petUuid}`,
163
191
  create: "",
164
- update: apiRouteParam.petUuid,
165
- delete: apiRouteParam.petUuid,
166
- getProfileById: `${apiRouteParam.petUuid}/profile.png`,
192
+ update: `/${apiRouteParam.petUuid}`,
193
+ delete: `/${apiRouteParam.petUuid}`,
194
+ getProfileById: `/${apiRouteParam.petUuid}/profile.png`,
167
195
  swagger: { name: "Pets", description: "Endpoints for User to manage their Pets" }
168
196
  },
169
197
  profile: {
@@ -213,17 +241,20 @@ var AnswerLinkType = /* @__PURE__ */ ((AnswerLinkType2) => {
213
241
 
214
242
  // src/contracts/generated/enum/appType.ts
215
243
  var AppType = /* @__PURE__ */ ((AppType2) => {
216
- AppType2[AppType2["Admin"] = 0] = "Admin";
217
- AppType2[AppType2["Client"] = 1] = "Client";
218
- AppType2[AppType2["Api"] = 2] = "Api";
219
- AppType2[AppType2["Test"] = 3] = "Test";
220
- AppType2[AppType2["Interactive"] = 4] = "Interactive";
244
+ AppType2[AppType2["HubAdmin"] = 0] = "HubAdmin";
245
+ AppType2[AppType2["HubClient"] = 1] = "HubClient";
246
+ AppType2[AppType2["HubHost"] = 2] = "HubHost";
247
+ AppType2[AppType2["HubApi"] = 3] = "HubApi";
248
+ AppType2[AppType2["BookingManager"] = 4] = "BookingManager";
249
+ AppType2[AppType2["HostCalendar"] = 5] = "HostCalendar";
250
+ AppType2[AppType2["Test"] = 6] = "Test";
251
+ AppType2[AppType2["Interactive"] = 7] = "Interactive";
221
252
  return AppType2;
222
253
  })(AppType || {});
223
254
  var webAppTypes = [
224
- 0 /* Admin */,
255
+ 0 /* HubAdmin */,
225
256
  //
226
- 1 /* Client */
257
+ 1 /* HubClient */
227
258
  ];
228
259
  var isWebApp = (appType) => webAppTypes.includes(appType);
229
260
 
@@ -540,12 +571,11 @@ var dateDiffInDays = (date, secondDate) => {
540
571
  const diffDays = Math.floor(diffTime / (1e3 * 60 * 60 * 24));
541
572
  return diffDays;
542
573
  };
543
- var getAgeInYears = (birthDateOrStr) => {
544
- const now = /* @__PURE__ */ new Date();
574
+ var getAgeInYears = (birthDateOrStr, currentDate = /* @__PURE__ */ new Date()) => {
545
575
  const birthDate = new Date(birthDateOrStr);
546
- let months = (now.getFullYear() - birthDate.getFullYear()) * 12;
576
+ let months = (currentDate.getFullYear() - birthDate.getFullYear()) * 12;
547
577
  months -= birthDate.getMonth();
548
- months += now.getMonth();
578
+ months += currentDate.getMonth();
549
579
  return (months <= 0 ? 0 : months) / 12;
550
580
  };
551
581
  var getWeekNumber = (d) => {
@@ -618,7 +648,8 @@ var CommonConfigService = class {
618
648
 
619
649
  // src/services/internal/log/logService.ts
620
650
  var LogService = class {
621
- constructor(config, _onLogMessage, _numDaysToKeep = 100) {
651
+ constructor(config, _logToConsole = true, _onLogMessage, _numDaysToKeep = 100) {
652
+ this._logToConsole = _logToConsole;
622
653
  this._onLogMessage = _onLogMessage;
623
654
  this._numDaysToKeep = _numDaysToKeep;
624
655
  this._logLevels = config.getConsoleLogLevels();
@@ -655,7 +686,6 @@ ${(log.optionalParams ?? []).join("\n\r")}`;
655
686
  const dateString = formatForDateLocalDetailed(/* @__PURE__ */ new Date());
656
687
  const logFunc = console[log.type];
657
688
  logFunc(`${dateString}: ${messageString}`, logStyle);
658
- this._onLogMessage?.(log);
659
689
  };
660
690
  _track = (type, groups) => (message, ...optionalParams) => {
661
691
  const log = {
@@ -668,7 +698,8 @@ ${(log.optionalParams ?? []).join("\n\r")}`;
668
698
  this.logs = this.logs.filter((t) => t.date > this._latestLogDate);
669
699
  this.logs.push(log);
670
700
  if (this._logLevels.includes(log.type) === false) return;
671
- else this._logMessageToConsole(log);
701
+ if (this._onLogMessage != null) this._onLogMessage(log);
702
+ if (this._logToConsole) this._logMessageToConsole(log);
672
703
  };
673
704
  clearLogs = () => {
674
705
  this.logs = [];
@@ -680,12 +711,37 @@ ${(log.optionalParams ?? []).join("\n\r")}`;
680
711
  e: this._track("error", groups)
681
712
  });
682
713
  };
714
+
715
+ // src/services/internal/config/colour.config.ts
716
+ var colourPalette = {
717
+ nanasBackyard: "#97A571",
718
+ creamPaw: "#F7F2ED",
719
+ shadowCollar: "#393834",
720
+ pineCollar: "#263A38",
721
+ warmBiscuit: "#C88F65",
722
+ whiskerWhite: "#ffffff",
723
+ couchBreather: "#DCE5E3",
724
+ snoutClay: "#9D8478",
725
+ pawInk: "#000000",
726
+ //
727
+ pineCollar25PercentLighter: "#324644"
728
+ };
729
+ var defaultSiteColour = {
730
+ primary: "#97A571",
731
+ secondary: "#97A571"
732
+ };
683
733
  var dependencyInjectionSetup = (props) => {
684
734
  setContainerToken(APP_TYPE, props.appType);
685
735
  if (props.botPath != null) setContainerToken(BOT_PATH, props.botPath);
686
736
  if (props.siteConfig != null) setContainerToken(SITE_CONFIG, props.siteConfig);
737
+ const loggerOptions = props?.setupLoggerOptions?.();
687
738
  const configService = new CommonConfigService();
688
- const logService = new LogService(configService, props.onLogMessage, props.numDaysToKeepLogs);
739
+ const logService = new LogService(
740
+ configService,
741
+ loggerOptions?.logToConsole ?? true,
742
+ loggerOptions?.onLogMessage,
743
+ props.numDaysToKeepLogs
744
+ );
689
745
  setContainerToken(CommonConfigService, configService);
690
746
  setContainerToken(LogService, logService);
691
747
  return {
@@ -706,6 +762,16 @@ var getSiteConfig = () => {
706
762
  console.error("unable to get site config. Did you set the config on app startup?");
707
763
  }
708
764
  };
765
+ var SITE_COLOUR = new Token("SITE_COLOUR");
766
+ var setSiteColour = (value) => Container.set({ id: SITE_COLOUR, value });
767
+ var getSiteColour = () => {
768
+ try {
769
+ return Container.get(SITE_COLOUR);
770
+ } catch {
771
+ setSiteColour(defaultSiteColour);
772
+ return defaultSiteColour;
773
+ }
774
+ };
709
775
  var setContainerToken = (id, value) => Container.set({ id, value });
710
776
  var getCommonConfig = () => Container.get(CommonConfigService);
711
777
  var getLog = () => Container.get(LogService);
@@ -744,6 +810,185 @@ var addToParallelTasks = async (tasks, newTask, numTasksInParallel = 5) => {
744
810
  return tasks;
745
811
  };
746
812
 
813
+ // src/components/form/calendar/calendarPicker.functions.ts
814
+ var convertToFullDateSelection = (newDate) => {
815
+ return {
816
+ year: newDate.getFullYear(),
817
+ month: newDate.getMonth() + 1,
818
+ day: newDate.getDate()
819
+ };
820
+ };
821
+ var convertToDate = (fullDate) => new Date(fullDate.year, fullDate.month - 1, fullDate.day);
822
+ var getCalendarDropdownDisplayValue = (mode, value) => {
823
+ const resultArr = [];
824
+ if (value?.start != null) {
825
+ resultArr.push(formatDate(convertToDate(value.start), "DD MMM"));
826
+ if (mode == "date-range") {
827
+ resultArr.push(" \u21D2 ");
828
+ }
829
+ }
830
+ if (mode == "date-range") {
831
+ if (value?.end != null) {
832
+ resultArr.push(formatDate(convertToDate(value.end), "DD MMM"));
833
+ }
834
+ }
835
+ const result = resultArr.join("");
836
+ return result.length < 1 ? void 0 : result;
837
+ };
838
+ var getCalendarDropdownForDateOfBirthDisplayValue = (mode, value) => {
839
+ const resultArr = [];
840
+ if (value?.start != null) {
841
+ resultArr.push(formatForDateOfBirth(convertToDate(value.start)));
842
+ if (mode == "date-range") {
843
+ resultArr.push(" \u21D2 ");
844
+ }
845
+ }
846
+ if (mode == "date-range") {
847
+ if (value?.end != null) {
848
+ resultArr.push(formatForDateOfBirth(convertToDate(value.end)));
849
+ }
850
+ }
851
+ const result = resultArr.join("");
852
+ return result.length < 1 ? void 0 : result;
853
+ };
854
+ var isDateAfterStart = (nextDate, selectedStartDateValue) => {
855
+ let isDayAfterStart, isDayStart = false;
856
+ if (selectedStartDateValue != null) {
857
+ const selectedStartDateObject = convertToDate(selectedStartDateValue);
858
+ isDayAfterStart = isBefore(selectedStartDateObject, nextDate);
859
+ if (isDayAfterStart == false) {
860
+ isDayStart = isSameDay(selectedStartDateObject, nextDate);
861
+ }
862
+ }
863
+ return { isDayAfterStart, isDayStart };
864
+ };
865
+ var isDateBeforeEnd = (nextDate, selectedEndDateValue) => {
866
+ let isDayBeforeEnd, isDayEnd = false;
867
+ if (selectedEndDateValue != null) {
868
+ const selectedEndDateObject = convertToDate(selectedEndDateValue);
869
+ isDayBeforeEnd = isBefore(nextDate, selectedEndDateObject);
870
+ isDayEnd = isSameDay(selectedEndDateObject, nextDate);
871
+ if (isDayBeforeEnd == false) {
872
+ isDayEnd = isSameDay(selectedEndDateObject, nextDate);
873
+ }
874
+ }
875
+ return { isDayBeforeEnd, isDayEnd };
876
+ };
877
+ var isDateDisabledByDisabledDays = (nextDate, disabledDays, isDisabledDefault = false) => {
878
+ if (isDisabledDefault == true) return isDisabledDefault;
879
+ let isDisabled = isDisabledDefault;
880
+ for (const disabledRange of disabledDays) {
881
+ const disabledRangeStartObject = convertToDate(disabledRange.start);
882
+ const disabledRangeEndObject = convertToDate(disabledRange.end);
883
+ if (isSameDay(disabledRangeStartObject, nextDate) || isSameDay(nextDate, disabledRangeEndObject)) {
884
+ isDisabled = true;
885
+ continue;
886
+ }
887
+ if (isBefore(disabledRangeStartObject, nextDate) && isBefore(nextDate, disabledRangeEndObject)) {
888
+ isDisabled = true;
889
+ }
890
+ }
891
+ return isDisabled;
892
+ };
893
+ var isDateEnabledByEnabledDays = (nextDate, enabledDays, isDisabledDefault = false) => {
894
+ if (isDisabledDefault == false) return isDisabledDefault;
895
+ let isDisabled = isDisabledDefault;
896
+ for (const enabledRange of enabledDays) {
897
+ const enabledRangeStartObject = convertToDate(enabledRange.start);
898
+ const enabledRangeEndObject = convertToDate(enabledRange.end);
899
+ if (isSameDay(enabledRangeStartObject, nextDate) || isSameDay(nextDate, enabledRangeEndObject)) {
900
+ isDisabled = false;
901
+ continue;
902
+ }
903
+ if (isBefore(enabledRangeStartObject, nextDate) && isBefore(nextDate, enabledRangeEndObject)) {
904
+ isDisabled = false;
905
+ }
906
+ }
907
+ return isDisabled;
908
+ };
909
+ var changeMonth = (current, modifier) => {
910
+ let newMonth = current.month + modifier;
911
+ let newYear = current.year;
912
+ if (newMonth < 1) {
913
+ newMonth = 12;
914
+ newYear--;
915
+ } else if (newMonth > 12) {
916
+ newMonth = 1;
917
+ newYear++;
918
+ }
919
+ return { month: newMonth, year: newYear };
920
+ };
921
+
922
+ // src/helpers/calendarHelper.ts
923
+ var getDayClassObject = (nextDate, selectedStartDate, selectedEndDate, enabledDays, disabledDays) => {
924
+ const isToday = isSameDay(/* @__PURE__ */ new Date(), nextDate);
925
+ let isDisabled = enabledDays != null && disabledDays == null;
926
+ const { isDayStart, isDayAfterStart } = isDateAfterStart(nextDate, selectedStartDate);
927
+ const { isDayEnd, isDayBeforeEnd } = isDateBeforeEnd(nextDate, selectedEndDate);
928
+ isDisabled = isDateDisabledByDisabledDays(nextDate, disabledDays ?? [], isDisabled);
929
+ isDisabled = isDateEnabledByEnabledDays(nextDate, enabledDays ?? [], isDisabled);
930
+ return {
931
+ selected: isDayAfterStart && isDayBeforeEnd || isDayStart || isDayEnd,
932
+ disabled: isDisabled,
933
+ pointer: !isDisabled,
934
+ today: isToday,
935
+ "only-one-date": [selectedStartDate, selectedEndDate].filter((d) => d != null).length == 1,
936
+ "first-day": isDayStart,
937
+ "last-day": isDayEnd
938
+ };
939
+ };
940
+ var getDayHeadingElements = (props) => {
941
+ const daysToRender = [];
942
+ let startIndex = weekdayTranslationKeyOrder.findIndex((key) => key == props?.startWeekDay);
943
+ if (startIndex < 0) startIndex = 0;
944
+ const numItemsFromSelectedDay = weekdayTranslationKeyOrder.length - startIndex;
945
+ for (let index = 0; index < numItemsFromSelectedDay; index++) {
946
+ const key = weekdayTranslationKeyOrder[index + startIndex];
947
+ daysToRender.push(key);
948
+ }
949
+ const daysToAdd = weekdayTranslationKeyOrder.length - daysToRender.length;
950
+ for (let index = 0; index < daysToAdd; index++) {
951
+ const key = weekdayTranslationKeyOrder[index];
952
+ daysToRender.push(key);
953
+ }
954
+ return daysToRender.map((dayKey) => props.weekdayLookup[dayKey]());
955
+ };
956
+ var getDayElements = (props) => {
957
+ const days = [];
958
+ let weekDayStartIndex = weekdayTranslationKeyOrder.findIndex((key) => key == props?.startWeekDay);
959
+ if (weekDayStartIndex < 0) weekDayStartIndex = 0;
960
+ let firstDayOfTheMonth = new Date(props.year, props.month, 1).getDay();
961
+ let numDaysToGoBack = firstDayOfTheMonth - weekDayStartIndex;
962
+ if (numDaysToGoBack < 0) numDaysToGoBack = 7 + numDaysToGoBack;
963
+ for (let prevMonthDayIndex = 0; prevMonthDayIndex < numDaysToGoBack; prevMonthDayIndex++) {
964
+ const numDaysBack = prevMonthDayIndex - numDaysToGoBack;
965
+ const prevDate = addDays(new Date(props.year, props.month, 1), numDaysBack);
966
+ if (props.hidePrevMonthDays != true) {
967
+ days.push(props.renderCell({ date: prevDate, cellType: "prev" }));
968
+ } else {
969
+ days.push(props.renderCell({ date: prevDate, cellType: "empty" }));
970
+ }
971
+ }
972
+ let nextDate = new Date(props.year, props.month, 1);
973
+ for (let firstDaysIndex = 0; firstDaysIndex < 40; firstDaysIndex++) {
974
+ days.push(props.renderCell({ date: nextDate, cellType: "current" }));
975
+ nextDate = addDays(nextDate, 1);
976
+ if (nextDate.getMonth() != props.month) {
977
+ break;
978
+ }
979
+ }
980
+ if (!props.hideNextMonthDays) {
981
+ const lastDay = weekDayStartIndex % 7;
982
+ for (let nextMonthDaysIndex = 0; nextMonthDaysIndex < 6; nextMonthDaysIndex++) {
983
+ const nextDayNum = nextDate.getDay();
984
+ if (nextDayNum == lastDay) break;
985
+ days.push(props.renderCell({ date: nextDate, cellType: "next" }));
986
+ nextDate = addDays(nextDate, 1);
987
+ }
988
+ }
989
+ return days;
990
+ };
991
+
747
992
  // src/helpers/commonHelper.ts
748
993
  var getUsersName = (details) => `${details?.firstName} ${details?.lastName}`;
749
994
 
@@ -847,30 +1092,23 @@ var getPayloadFromJwt = (token) => {
847
1092
 
848
1093
  // src/assets/meta.json
849
1094
  var meta_default = {
850
- packageVersion: "0.12.1",
851
- date: "2026-01-06",
852
- gitCommitHash: "5786c5b332ec8d0e4553847f2043523b8e54f53f"
1095
+ packageVersion: "0.16.0",
1096
+ date: "2026-01-13",
1097
+ gitCommitHash: "98f87615f44e7d4d5625a0506fa405c59df1bbae"
853
1098
  };
854
1099
 
855
1100
  // src/assets/packagesUsed.json
856
1101
  var packagesUsed_default = {
857
- generatedDate: "2026-01-06T18:23:33.959Z",
858
- generatedDateFormat: "2026-01-06",
1102
+ generatedDate: "2026-01-13T15:36:32.076Z",
1103
+ generatedDateFormat: "2026-01-13",
859
1104
  list: [
860
1105
  {
861
1106
  name: "@chromatic-com/storybook",
862
- version: "4.1.3",
1107
+ version: "5.0.0",
863
1108
  licenseType: "MIT",
864
1109
  repoUrl: "https://github.com/chromaui/addon-visual-tests.git",
865
1110
  licenceUrl: "https://github.com/chromaui/addon-visual-tests/blob/master/LICENSE"
866
1111
  },
867
- {
868
- name: "@kachurun/storybook-solid-vite",
869
- version: "9.0.11",
870
- licenseType: "MIT",
871
- repoUrl: "https://github.com/solidjs-community/storybook.git",
872
- licenceUrl: "https://github.com/solidjs-community/storybook/blob/master/LICENSE"
873
- },
874
1112
  {
875
1113
  name: "@storybook/addon-a11y",
876
1114
  version: "10.1.11",
@@ -903,28 +1141,28 @@ var packagesUsed_default = {
903
1141
  },
904
1142
  {
905
1143
  name: "@types/node",
906
- version: "25.0.3",
1144
+ version: "25.0.8",
907
1145
  licenseType: "MIT",
908
1146
  repoUrl: "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
909
1147
  licenceUrl: "https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/LICENSE"
910
1148
  },
911
1149
  {
912
1150
  name: "@vitest/browser",
913
- version: "4.0.16",
1151
+ version: "4.0.17",
914
1152
  licenseType: "MIT",
915
1153
  repoUrl: "https://github.com/vitest-dev/vitest.git",
916
1154
  licenceUrl: "https://github.com/vitest-dev/vitest/blob/master/LICENSE"
917
1155
  },
918
1156
  {
919
1157
  name: "@vitest/coverage-v8",
920
- version: "4.0.16",
1158
+ version: "4.0.17",
921
1159
  licenseType: "MIT",
922
1160
  repoUrl: "https://github.com/vitest-dev/vitest.git",
923
1161
  licenceUrl: "https://github.com/vitest-dev/vitest/blob/master/LICENSE"
924
1162
  },
925
1163
  {
926
1164
  name: "@vitest/ui",
927
- version: "4.0.16",
1165
+ version: "4.0.17",
928
1166
  licenseType: "MIT",
929
1167
  repoUrl: "https://github.com/vitest-dev/vitest.git",
930
1168
  licenceUrl: "https://github.com/vitest-dev/vitest/blob/master/LICENSE"
@@ -954,6 +1192,13 @@ var packagesUsed_default = {
954
1192
  licenseType: "MIT",
955
1193
  repoUrl: "https://github.com/storybookjs/storybook.git"
956
1194
  },
1195
+ {
1196
+ name: "storybook-solidjs-vite",
1197
+ version: "10.0.9",
1198
+ licenseType: "MIT",
1199
+ repoUrl: "https://github.com/solidjs-community/storybook.git",
1200
+ licenceUrl: "https://github.com/solidjs-community/storybook/blob/master/LICENSE"
1201
+ },
957
1202
  {
958
1203
  name: "tsup",
959
1204
  version: "8.5.1",
@@ -976,7 +1221,7 @@ var packagesUsed_default = {
976
1221
  },
977
1222
  {
978
1223
  name: "vite",
979
- version: "7.3.0",
1224
+ version: "7.3.1",
980
1225
  licenseType: "MIT",
981
1226
  repoUrl: "https://github.com/vitejs/vite.git"
982
1227
  },
@@ -988,7 +1233,7 @@ var packagesUsed_default = {
988
1233
  },
989
1234
  {
990
1235
  name: "vitest",
991
- version: "4.0.16",
1236
+ version: "4.0.17",
992
1237
  licenseType: "MIT",
993
1238
  repoUrl: "https://github.com/vitest-dev/vitest.git"
994
1239
  }
@@ -1020,6 +1265,14 @@ var getMimeTypeFromExtension = (extension, logger) => {
1020
1265
  return "application/octet-stream";
1021
1266
  };
1022
1267
 
1268
+ // src/helpers/numberHelper.ts
1269
+ var tryParseNumber = (input, opts) => {
1270
+ if (input == null) return opts?.defaultValue ?? 0;
1271
+ const val = Number(input.toString());
1272
+ if (isNaN(val)) return opts?.defaultValue ?? 0;
1273
+ return val;
1274
+ };
1275
+
1023
1276
  // src/helpers/performanceHelper.ts
1024
1277
  var getPerformanceTimer = () => ({
1025
1278
  start: performance.now(),
@@ -1109,7 +1362,7 @@ var fakePromise = () => new Promise((res) => res({}));
1109
1362
 
1110
1363
  // src/helpers/urlHelper.ts
1111
1364
  var urlRef = (url) => {
1112
- const { ref } = getSiteConfig()?.ref ?? anyObject();
1365
+ const ref = getSiteConfig()?.ref;
1113
1366
  if (ref == null) return url;
1114
1367
  if (url.includes("?")) {
1115
1368
  return url + `&ref=${ref}`;
@@ -1312,4 +1565,4 @@ var shouldBeYoutubeUrl = (value) => {
1312
1565
  };
1313
1566
  };
1314
1567
 
1315
- export { APP_TYPE, ActivityRestriction, ActivityType, AddressLinkType, AddressRestriction, AnswerLinkType, AnswerRestriction, AppType, BOT_PATH, BookingAddonRestriction, BookingAddonType, BookingRestriction, BookingStatusType, CommentLinkType, CommentRestriction, CommonConfigService, DrivingRouteRestriction, LogService, MembershipStatus, MembershipType, MouseButton, NetworkState, OrderDirectionType, PermissionRestriction, PermissionType, PetRestriction, PetSexType, PetStatusType, PetType, QuestionForType, QuestionRestriction, QuestionType, SITE_CONFIG, SearchableColumnType, UnavailabilityRestriction, UploadLinkType, UploadRestriction, UploadType, UserAccountFlagType, UserRestriction, UserType, addDays, addMinutes, addMonths, addSeconds, addSpacesForEnum, addToParallelTasks, anyObject, apiRoute, apiRouteParam, arrayContains, arrayOfNLength, capitalizeFirstLetter, cyrb53, dateDiffInDays, debounceLeading, dependencyInjectionSetup, fakePromise, formatDate, formatFileSize, formatForBookingDate, formatForDateDropdown, formatForDateLocal, formatForDateLocalDetailed, formatForDateOfBirth, formatForDateWithTime, getAgeInYears, getAllPetQuestionForType, getAppType, getArrFromEnum, getBotPath, getCommonConfig, getImageParams, getLog, getMeta, getMimeTypeFromExtension, getPackagesUsed, getPayloadFromJwt, getPerformanceTimer, getPetAvatarUrl, getSiteConfig, getUserAvatarUrl, getUsersName, getWeekNumber, hasRequiredPermissions, isBefore, isNumber, isSameDay, isWebApp, lowercaseFirstLetter, makeArrayOrDefault, maxDate, maxItems, maxLength, mimeTypeLookup, minDate, minItems, minLength, minUrlLength, multiValidation, nameof, noValidation, notNull, onlyUnique, portalGlyphLength, promiseFromValue, randomIntFromRange, randomItemFromArray, searchColumns, selectedItemsExist, selectedOptionIsInEnum, separateValidation, setContainerToken, setSiteConfig, shouldBeUrl, shouldBeYoutubeUrl, showSecondCalendar, timeout, uploadsThatNeedEncryption, urlRef, uuidv4, validUuidChars, validateForEach, webAppTypes };
1568
+ export { APP_TYPE, ActivityRestriction, ActivityType, AddressLinkType, AddressRestriction, AnswerLinkType, AnswerRestriction, AppType, BOT_PATH, BookingAddonRestriction, BookingAddonType, BookingRestriction, BookingStatusType, CommentLinkType, CommentRestriction, CommonConfigService, DrivingRouteRestriction, LogService, MembershipStatus, MembershipType, MouseButton, NetworkState, OrderDirectionType, PermissionRestriction, PermissionType, PetRestriction, PetSexType, PetStatusType, PetType, QuestionForType, QuestionRestriction, QuestionType, SITE_COLOUR, SITE_CONFIG, SearchableColumnType, UnavailabilityRestriction, UploadLinkType, UploadRestriction, UploadType, UserAccountFlagType, UserRestriction, UserType, addDays, addMinutes, addMonths, addSeconds, addSpacesForEnum, addToParallelTasks, anyObject, apiRoute, apiRouteParam, arrayContains, arrayOfNLength, capitalizeFirstLetter, changeMonth, colourPalette, convertToDate, convertToFullDateSelection, cyrb53, dateDiffInDays, debounceLeading, defaultSiteColour, dependencyInjectionSetup, fakePromise, formatDate, formatFileSize, formatForBookingDate, formatForDateDropdown, formatForDateLocal, formatForDateLocalDetailed, formatForDateOfBirth, formatForDateWithTime, getAgeInYears, getAllPetQuestionForType, getAppType, getArrFromEnum, getBotPath, getCalendarDropdownDisplayValue, getCalendarDropdownForDateOfBirthDisplayValue, getCommonConfig, getDayClassObject, getDayElements, getDayHeadingElements, getImageParams, getLog, getMeta, getMimeTypeFromExtension, getPackagesUsed, getPayloadFromJwt, getPerformanceTimer, getPetAvatarUrl, getSiteColour, getSiteConfig, getUserAvatarUrl, getUsersName, getWeekNumber, hasRequiredPermissions, isBefore, isDateAfterStart, isDateBeforeEnd, isDateDisabledByDisabledDays, isDateEnabledByEnabledDays, isNumber, isSameDay, isWebApp, lowercaseFirstLetter, makeArrayOrDefault, maxDate, maxItems, maxLength, mimeTypeLookup, minDate, minItems, minLength, minUrlLength, monthTranslationKeyOrder, multiValidation, nameof, noValidation, notNull, onlyUnique, portalGlyphLength, promiseFromValue, randomIntFromRange, randomItemFromArray, searchColumns, selectedItemsExist, selectedOptionIsInEnum, separateValidation, setContainerToken, setSiteColour, setSiteConfig, shouldBeUrl, shouldBeYoutubeUrl, showSecondCalendar, timeout, tryParseNumber, uploadsThatNeedEncryption, urlRef, uuidv4, validUuidChars, validateForEach, webAppTypes, weekdayTranslationKeyOrder };