tf-checkout-react 1.3.51 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.d.ts +6 -1
- package/dist/components/common/Loader.d.ts +1 -1
- package/dist/components/idVerificationContainer/constants.d.ts +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/seatMapContainer/SeatMapComponent.d.ts +8 -0
- package/dist/components/seatMapContainer/TicketsSection.d.ts +9 -0
- package/dist/components/seatMapContainer/addToCart.d.ts +21 -0
- package/dist/components/seatMapContainer/index.d.ts +2 -0
- package/dist/components/seatMapContainer/utils.d.ts +14 -0
- package/dist/components/stripePayment/index.d.ts +2 -2
- package/dist/components/ticketsContainer/TicketRow.d.ts +3 -1
- package/dist/components/ticketsContainer/TicketsSection.d.ts +5 -1
- package/dist/components/ticketsContainer/index.d.ts +6 -2
- package/dist/index.d.ts +1 -0
- package/dist/tf-checkout-react.cjs.development.js +1435 -128
- package/dist/tf-checkout-react.cjs.development.js.map +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
- package/dist/tf-checkout-react.esm.js +1436 -130
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/tf-checkout-styles.css +1 -1
- package/dist/types/order-data.d.ts +3 -0
- package/dist/utils/createCheckoutDataBodyWithDefaultHolder.d.ts +9 -2
- package/package.json +12 -4
- package/src/.d.ts +4 -3
- package/src/api/index.ts +89 -6
- package/src/components/billing-info-container/index.tsx +111 -102
- package/src/components/common/Loader.tsx +6 -8
- package/src/components/common/dist/PhoneNumberField.js +96 -0
- package/src/components/confirmationContainer/index.tsx +11 -9
- package/src/components/idVerificationContainer/constants.ts +2 -0
- package/src/components/idVerificationContainer/index.tsx +54 -13
- package/src/components/index.ts +2 -1
- package/src/components/orderDetailsContainer/index.tsx +54 -23
- package/src/components/paymentContainer/index.tsx +167 -33
- package/src/components/seatMapContainer/SeatMapComponent.tsx +73 -0
- package/src/components/seatMapContainer/TicketsSection.tsx +254 -0
- package/src/components/seatMapContainer/addToCart.ts +82 -0
- package/src/components/seatMapContainer/index.tsx +408 -0
- package/src/components/seatMapContainer/utils.ts +138 -0
- package/src/components/stripePayment/index.tsx +23 -18
- package/src/components/ticketsContainer/TicketRow.tsx +28 -13
- package/src/components/ticketsContainer/TicketsSection.tsx +85 -2
- package/src/components/ticketsContainer/index.tsx +57 -12
- package/src/components/ticketsContainer/style.css +0 -3
- package/src/hooks/usePixel.ts +35 -1
- package/src/index.ts +2 -1
- package/src/types/order-data.ts +3 -0
- package/src/types/seatMap.d.ts +154 -0
- package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +6 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Snackbar, Alert, Modal as Modal$1, Box, CircularProgress, TextField as TextField$1, FormControl, FormHelperText, InputLabel, createTheme as createTheme$1 } from '@mui/material';
|
|
1
|
+
import { Snackbar, Alert, Modal as Modal$1, Box, CircularProgress, TextField as TextField$1, FormControl, FormHelperText, InputLabel, createTheme as createTheme$1, Select as Select$1 } from '@mui/material';
|
|
2
2
|
import Backdrop from '@mui/material/Backdrop';
|
|
3
3
|
import Button from '@mui/material/Button';
|
|
4
4
|
import { ThemeProvider, createTheme } from '@mui/material/styles';
|
|
@@ -51,6 +51,7 @@ import { loadStripe } from '@stripe/stripe-js';
|
|
|
51
51
|
import { FacebookShareButton, FacebookIcon, FacebookMessengerShareButton, FacebookMessengerIcon, TwitterShareButton, TwitterIcon, LinkedinShareButton, LinkedinIcon, PinterestShareButton, PinterestIcon, VKShareButton, VKIcon, OKShareButton, OKIcon, TelegramShareButton, TelegramIcon, WhatsappShareButton, WhatsappIcon, RedditShareButton, RedditIcon, TumblrShareButton, TumblrIcon, MailruShareButton, MailruIcon, EmailShareButton, EmailIcon, LivejournalShareButton, LivejournalIcon, ViberShareButton, ViberIcon, WorkplaceShareButton, WorkplaceIcon, LineShareButton, LineIcon, PocketShareButton, PocketIcon, InstapaperShareButton, InstapaperIcon, WeiboShareButton, WeiboIcon, HatenaShareButton, HatenaIcon } from 'react-share';
|
|
52
52
|
import { ThemeProvider as ThemeProvider$1 } from '@mui/private-theming';
|
|
53
53
|
import jwt_decode from 'jwt-decode';
|
|
54
|
+
import _filter from 'lodash-es/filter';
|
|
54
55
|
import _some from 'lodash-es/some';
|
|
55
56
|
import Button$1 from 'react-bootstrap/Button';
|
|
56
57
|
import moment from 'moment-timezone';
|
|
@@ -67,6 +68,15 @@ import TableRow from '@mui/material/TableRow';
|
|
|
67
68
|
import _has from 'lodash-es/has';
|
|
68
69
|
import _isNull from 'lodash-es/isNull';
|
|
69
70
|
import _reverse from 'lodash-es/reverse';
|
|
71
|
+
import { identity } from 'lodash-es';
|
|
72
|
+
import _keys from 'lodash-es/keys';
|
|
73
|
+
import _values from 'lodash-es/values';
|
|
74
|
+
import moment$1 from 'moment';
|
|
75
|
+
import 'tf-seat-map-view/dist/index.css';
|
|
76
|
+
import ReactDom from 'react-dom';
|
|
77
|
+
import SeatMapView from 'tf-seat-map-view';
|
|
78
|
+
import InputLabel$1 from '@mui/material/InputLabel';
|
|
79
|
+
import { Button as Button$2 } from 'react-bootstrap';
|
|
70
80
|
|
|
71
81
|
function _regeneratorRuntime() {
|
|
72
82
|
_regeneratorRuntime = function () {
|
|
@@ -727,6 +737,7 @@ publicRequest.interceptors.response.use(function (response) {
|
|
|
727
737
|
return Promise.reject(error);
|
|
728
738
|
});
|
|
729
739
|
publicRequest.interceptors.request.use(function (config) {
|
|
740
|
+
var _document$cookie;
|
|
730
741
|
var guestToken = isWindowDefined ? window.localStorage.getItem('auth_guest_token') : null;
|
|
731
742
|
var userData = isWindowDefined ? window.localStorage.getItem('user_data') : null;
|
|
732
743
|
var accessToken = isWindowDefined ? window.localStorage.getItem('access_token') : null;
|
|
@@ -749,6 +760,13 @@ publicRequest.interceptors.request.use(function (config) {
|
|
|
749
760
|
});
|
|
750
761
|
config.headers = _updatedHeaders2;
|
|
751
762
|
}
|
|
763
|
+
var additionalCookiesHeaderValue = (_document$cookie = document.cookie) != null ? _document$cookie : '';
|
|
764
|
+
if (additionalCookiesHeaderValue !== '') {
|
|
765
|
+
var _updatedHeaders3 = _extends({}, config.headers, {
|
|
766
|
+
'Additional-Cookies': additionalCookiesHeaderValue
|
|
767
|
+
});
|
|
768
|
+
config.headers = _updatedHeaders3;
|
|
769
|
+
}
|
|
752
770
|
if (CONFIGS.X_SOURCE_ORIGIN) {
|
|
753
771
|
var _updatedHeaders4 = _extends({}, config.headers, {
|
|
754
772
|
'X-Source-Origin': CONFIGS.X_SOURCE_ORIGIN
|
|
@@ -1039,6 +1057,121 @@ var getCheckoutPageConfigs = /*#__PURE__*/function () {
|
|
|
1039
1057
|
return _ref3.apply(this, arguments);
|
|
1040
1058
|
};
|
|
1041
1059
|
}();
|
|
1060
|
+
// seat map <--start-->
|
|
1061
|
+
// const makeId = (length = 20) => {
|
|
1062
|
+
// let result = ''
|
|
1063
|
+
// const characters =
|
|
1064
|
+
// 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
|
|
1065
|
+
// const charactersLength = characters.length
|
|
1066
|
+
// for (let i = 0; i < length; i++) {
|
|
1067
|
+
// result += characters.charAt(Math.floor(Math.random() * charactersLength))
|
|
1068
|
+
// }
|
|
1069
|
+
// return result
|
|
1070
|
+
// }
|
|
1071
|
+
var getSeatMapData = /*#__PURE__*/function () {
|
|
1072
|
+
var _ref4 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(eventId) {
|
|
1073
|
+
var reservedSeatsHash, params, response;
|
|
1074
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
1075
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
1076
|
+
case 0:
|
|
1077
|
+
localStorage.setItem('tierId', '');
|
|
1078
|
+
reservedSeatsHash = getQueryVariable('reserved_seats_hash');
|
|
1079
|
+
params = {};
|
|
1080
|
+
if (reservedSeatsHash) {
|
|
1081
|
+
params.reserved_seats_hash = reservedSeatsHash;
|
|
1082
|
+
}
|
|
1083
|
+
_context4.next = 6;
|
|
1084
|
+
return publicRequest.get("v1/event/" + eventId + "/seat-map-data", {
|
|
1085
|
+
params: params
|
|
1086
|
+
});
|
|
1087
|
+
case 6:
|
|
1088
|
+
response = _context4.sent;
|
|
1089
|
+
return _context4.abrupt("return", response.data);
|
|
1090
|
+
case 8:
|
|
1091
|
+
case "end":
|
|
1092
|
+
return _context4.stop();
|
|
1093
|
+
}
|
|
1094
|
+
}, _callee4);
|
|
1095
|
+
}));
|
|
1096
|
+
return function getSeatMapData(_x3) {
|
|
1097
|
+
return _ref4.apply(this, arguments);
|
|
1098
|
+
};
|
|
1099
|
+
}();
|
|
1100
|
+
var getSeatMapStatuses = /*#__PURE__*/function () {
|
|
1101
|
+
var _ref5 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(eventId) {
|
|
1102
|
+
var response;
|
|
1103
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
1104
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
1105
|
+
case 0:
|
|
1106
|
+
_context5.next = 2;
|
|
1107
|
+
return publicRequest.get("v1/event/" + eventId + "/seats/status");
|
|
1108
|
+
case 2:
|
|
1109
|
+
response = _context5.sent;
|
|
1110
|
+
return _context5.abrupt("return", response.data);
|
|
1111
|
+
case 4:
|
|
1112
|
+
case "end":
|
|
1113
|
+
return _context5.stop();
|
|
1114
|
+
}
|
|
1115
|
+
}, _callee5);
|
|
1116
|
+
}));
|
|
1117
|
+
return function getSeatMapStatuses(_x4) {
|
|
1118
|
+
return _ref5.apply(this, arguments);
|
|
1119
|
+
};
|
|
1120
|
+
}();
|
|
1121
|
+
var reserveSeat = /*#__PURE__*/function () {
|
|
1122
|
+
var _ref6 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(eventId, tierId, seatId) {
|
|
1123
|
+
var response;
|
|
1124
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
1125
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
1126
|
+
case 0:
|
|
1127
|
+
_context6.next = 2;
|
|
1128
|
+
return publicRequest.post("v1/event/" + eventId + "/seats/reserve", {
|
|
1129
|
+
data: {
|
|
1130
|
+
tierId: tierId,
|
|
1131
|
+
seatId: seatId,
|
|
1132
|
+
ttl: 10
|
|
1133
|
+
}
|
|
1134
|
+
});
|
|
1135
|
+
case 2:
|
|
1136
|
+
response = _context6.sent;
|
|
1137
|
+
return _context6.abrupt("return", response.data);
|
|
1138
|
+
case 4:
|
|
1139
|
+
case "end":
|
|
1140
|
+
return _context6.stop();
|
|
1141
|
+
}
|
|
1142
|
+
}, _callee6);
|
|
1143
|
+
}));
|
|
1144
|
+
return function reserveSeat(_x5, _x6, _x7) {
|
|
1145
|
+
return _ref6.apply(this, arguments);
|
|
1146
|
+
};
|
|
1147
|
+
}();
|
|
1148
|
+
var removeSeatReserve = /*#__PURE__*/function () {
|
|
1149
|
+
var _ref7 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(eventId, tierId, seatIds) {
|
|
1150
|
+
var response;
|
|
1151
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
1152
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
1153
|
+
case 0:
|
|
1154
|
+
_context7.next = 2;
|
|
1155
|
+
return publicRequest["delete"]("v1/event/" + eventId + "/seats/delete-reserved", {
|
|
1156
|
+
data: {
|
|
1157
|
+
tierId: tierId,
|
|
1158
|
+
seatIds: seatIds
|
|
1159
|
+
}
|
|
1160
|
+
});
|
|
1161
|
+
case 2:
|
|
1162
|
+
response = _context7.sent;
|
|
1163
|
+
return _context7.abrupt("return", response.data);
|
|
1164
|
+
case 4:
|
|
1165
|
+
case "end":
|
|
1166
|
+
return _context7.stop();
|
|
1167
|
+
}
|
|
1168
|
+
}, _callee7);
|
|
1169
|
+
}));
|
|
1170
|
+
return function removeSeatReserve(_x8, _x9, _x10) {
|
|
1171
|
+
return _ref7.apply(this, arguments);
|
|
1172
|
+
};
|
|
1173
|
+
}();
|
|
1174
|
+
// seat map <--end-->
|
|
1042
1175
|
function getPixelScript(id, pageOptions) {
|
|
1043
1176
|
var response = publicRequest.get("v1/event/" + id + "/track", {
|
|
1044
1177
|
params: {
|
|
@@ -1051,54 +1184,54 @@ function getPixelScript(id, pageOptions) {
|
|
|
1051
1184
|
}
|
|
1052
1185
|
// ID Verification
|
|
1053
1186
|
var getNetverifyUrl = /*#__PURE__*/function () {
|
|
1054
|
-
var
|
|
1187
|
+
var _ref8 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
1055
1188
|
var response;
|
|
1056
|
-
return _regeneratorRuntime().wrap(function
|
|
1057
|
-
while (1) switch (
|
|
1189
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
1190
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
1058
1191
|
case 0:
|
|
1059
|
-
|
|
1192
|
+
_context8.next = 2;
|
|
1060
1193
|
return publicRequest.get('v1/authenticate/verify');
|
|
1061
1194
|
case 2:
|
|
1062
|
-
response =
|
|
1063
|
-
return
|
|
1195
|
+
response = _context8.sent;
|
|
1196
|
+
return _context8.abrupt("return", response.data);
|
|
1064
1197
|
case 4:
|
|
1065
1198
|
case "end":
|
|
1066
|
-
return
|
|
1199
|
+
return _context8.stop();
|
|
1067
1200
|
}
|
|
1068
|
-
},
|
|
1201
|
+
}, _callee8);
|
|
1069
1202
|
}));
|
|
1070
1203
|
return function getNetverifyUrl() {
|
|
1071
|
-
return
|
|
1204
|
+
return _ref8.apply(this, arguments);
|
|
1072
1205
|
};
|
|
1073
1206
|
}();
|
|
1074
1207
|
var checkVerificationStatus = /*#__PURE__*/function () {
|
|
1075
|
-
var
|
|
1208
|
+
var _ref9 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
1076
1209
|
var response;
|
|
1077
|
-
return _regeneratorRuntime().wrap(function
|
|
1078
|
-
while (1) switch (
|
|
1210
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
1211
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
1079
1212
|
case 0:
|
|
1080
|
-
|
|
1213
|
+
_context9.next = 2;
|
|
1081
1214
|
return publicRequest.get('v1/authenticate/get-verification-info');
|
|
1082
1215
|
case 2:
|
|
1083
|
-
response =
|
|
1084
|
-
return
|
|
1216
|
+
response = _context9.sent;
|
|
1217
|
+
return _context9.abrupt("return", response.data);
|
|
1085
1218
|
case 4:
|
|
1086
1219
|
case "end":
|
|
1087
|
-
return
|
|
1220
|
+
return _context9.stop();
|
|
1088
1221
|
}
|
|
1089
|
-
},
|
|
1222
|
+
}, _callee9);
|
|
1090
1223
|
}));
|
|
1091
1224
|
return function checkVerificationStatus() {
|
|
1092
|
-
return
|
|
1225
|
+
return _ref9.apply(this, arguments);
|
|
1093
1226
|
};
|
|
1094
1227
|
}();
|
|
1095
1228
|
var updateVerificationStatus = /*#__PURE__*/function () {
|
|
1096
|
-
var
|
|
1229
|
+
var _ref10 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
|
|
1097
1230
|
var response;
|
|
1098
|
-
return _regeneratorRuntime().wrap(function
|
|
1099
|
-
while (1) switch (
|
|
1231
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
1232
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
1100
1233
|
case 0:
|
|
1101
|
-
|
|
1234
|
+
_context10.next = 2;
|
|
1102
1235
|
return publicRequest.patch('v1/authenticate/verify', {
|
|
1103
1236
|
data: {
|
|
1104
1237
|
verification: {
|
|
@@ -1107,16 +1240,37 @@ var updateVerificationStatus = /*#__PURE__*/function () {
|
|
|
1107
1240
|
}
|
|
1108
1241
|
});
|
|
1109
1242
|
case 2:
|
|
1110
|
-
response =
|
|
1111
|
-
return
|
|
1243
|
+
response = _context10.sent;
|
|
1244
|
+
return _context10.abrupt("return", response.data);
|
|
1112
1245
|
case 4:
|
|
1113
1246
|
case "end":
|
|
1114
|
-
return
|
|
1247
|
+
return _context10.stop();
|
|
1115
1248
|
}
|
|
1116
|
-
},
|
|
1249
|
+
}, _callee10);
|
|
1117
1250
|
}));
|
|
1118
1251
|
return function updateVerificationStatus() {
|
|
1119
|
-
return
|
|
1252
|
+
return _ref10.apply(this, arguments);
|
|
1253
|
+
};
|
|
1254
|
+
}();
|
|
1255
|
+
var checkCustomerOrder = /*#__PURE__*/function () {
|
|
1256
|
+
var _ref11 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(orderHash) {
|
|
1257
|
+
var response;
|
|
1258
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
1259
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
1260
|
+
case 0:
|
|
1261
|
+
_context11.next = 2;
|
|
1262
|
+
return publicRequest.get("v1/order/" + orderHash + "/verify-customer-order");
|
|
1263
|
+
case 2:
|
|
1264
|
+
response = _context11.sent;
|
|
1265
|
+
return _context11.abrupt("return", response.data);
|
|
1266
|
+
case 4:
|
|
1267
|
+
case "end":
|
|
1268
|
+
return _context11.stop();
|
|
1269
|
+
}
|
|
1270
|
+
}, _callee11);
|
|
1271
|
+
}));
|
|
1272
|
+
return function checkCustomerOrder(_x11) {
|
|
1273
|
+
return _ref11.apply(this, arguments);
|
|
1120
1274
|
};
|
|
1121
1275
|
}();
|
|
1122
1276
|
|
|
@@ -1137,6 +1291,32 @@ function appendScriptsToHeader(code) {
|
|
|
1137
1291
|
}
|
|
1138
1292
|
}
|
|
1139
1293
|
}
|
|
1294
|
+
var addGTagToHeader = function addGTagToHeader(tagId, links) {
|
|
1295
|
+
var _document, _document2;
|
|
1296
|
+
if ((_document = document) != null && _document.head && (_document2 = document) != null && _document2.body && tagId) {
|
|
1297
|
+
var script = document.createElement('script');
|
|
1298
|
+
script.innerHTML = ("(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':\n new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\n j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=\n 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);\n })(window,document,'script','dataLayer','" + tagId + "');").trim();
|
|
1299
|
+
document.head.append(script);
|
|
1300
|
+
var scriptBody = document.createElement('noscript');
|
|
1301
|
+
scriptBody.innerHTML = "<iframe src=\"https://www.googletagmanager.com/ns.html?id=" + tagId + "\"\n height=\"0\" width=\"0\" style=\"display:none;visibility:hidden\"></iframe>";
|
|
1302
|
+
document.body.append(scriptBody);
|
|
1303
|
+
window.dataLayer = window.dataLayer || [];
|
|
1304
|
+
window.gtag = function gtag() {
|
|
1305
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1306
|
+
args[_key] = arguments[_key];
|
|
1307
|
+
}
|
|
1308
|
+
window.dataLayer.push(args);
|
|
1309
|
+
};
|
|
1310
|
+
if (links) {
|
|
1311
|
+
var _window;
|
|
1312
|
+
(_window = window) == null ? void 0 : _window.gtag('set', 'linker', {
|
|
1313
|
+
'domains': links
|
|
1314
|
+
});
|
|
1315
|
+
}
|
|
1316
|
+
window.gtag('js', new Date());
|
|
1317
|
+
window.gtag('config', tagId);
|
|
1318
|
+
}
|
|
1319
|
+
};
|
|
1140
1320
|
var usePixel = /*#__PURE__*/function () {
|
|
1141
1321
|
var _ref = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(eventId, options) {
|
|
1142
1322
|
var getScript;
|
|
@@ -1145,7 +1325,7 @@ var usePixel = /*#__PURE__*/function () {
|
|
|
1145
1325
|
case 0:
|
|
1146
1326
|
getScript = /*#__PURE__*/function () {
|
|
1147
1327
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
1148
|
-
var response, pixels;
|
|
1328
|
+
var response, pixels, brandGoogleTagKey, eventGoogleTagKey, eventGoogleTagManagerLinkerDomains;
|
|
1149
1329
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1150
1330
|
while (1) switch (_context.prev = _context.next) {
|
|
1151
1331
|
case 0:
|
|
@@ -1162,17 +1342,24 @@ var usePixel = /*#__PURE__*/function () {
|
|
|
1162
1342
|
response = _context.sent;
|
|
1163
1343
|
pixels = _get(response, 'data.data.attributes.pixels', '');
|
|
1164
1344
|
appendScriptsToHeader(pixels);
|
|
1165
|
-
|
|
1345
|
+
brandGoogleTagKey = _get(response, 'data.data.attributes.brandGoogleTagKey', '');
|
|
1346
|
+
eventGoogleTagKey = _get(response, 'data.data.attributes.eventGoogleTagKey', '');
|
|
1347
|
+
eventGoogleTagManagerLinkerDomains = _get(response, 'data.data.attributes.eventGoogleTagManagerLinkerDomains', '');
|
|
1348
|
+
addGTagToHeader(brandGoogleTagKey, eventGoogleTagManagerLinkerDomains);
|
|
1349
|
+
if (eventGoogleTagKey) {
|
|
1350
|
+
addGTagToHeader(eventGoogleTagKey, eventGoogleTagManagerLinkerDomains);
|
|
1351
|
+
}
|
|
1352
|
+
_context.next = 18;
|
|
1166
1353
|
break;
|
|
1167
|
-
case
|
|
1168
|
-
_context.prev =
|
|
1354
|
+
case 15:
|
|
1355
|
+
_context.prev = 15;
|
|
1169
1356
|
_context.t0 = _context["catch"](2);
|
|
1170
1357
|
console.error(_context.t0);
|
|
1171
|
-
case
|
|
1358
|
+
case 18:
|
|
1172
1359
|
case "end":
|
|
1173
1360
|
return _context.stop();
|
|
1174
1361
|
}
|
|
1175
|
-
}, _callee, null, [[2,
|
|
1362
|
+
}, _callee, null, [[2, 15]]);
|
|
1176
1363
|
}));
|
|
1177
1364
|
return function getScript() {
|
|
1178
1365
|
return _ref2.apply(this, arguments);
|
|
@@ -2097,11 +2284,11 @@ var PhoneNumberField = function PhoneNumberField(_ref) {
|
|
|
2097
2284
|
}));
|
|
2098
2285
|
};
|
|
2099
2286
|
|
|
2100
|
-
function Loader() {
|
|
2287
|
+
var Loader = function Loader() {
|
|
2101
2288
|
return React.createElement("div", {
|
|
2102
2289
|
className: "loader-container"
|
|
2103
2290
|
}, React.createElement(CircularProgress$1, null));
|
|
2104
|
-
}
|
|
2291
|
+
};
|
|
2105
2292
|
|
|
2106
2293
|
var NativeSelectField = function NativeSelectField(_ref) {
|
|
2107
2294
|
var label = _ref.label,
|
|
@@ -2819,15 +3006,18 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
2819
3006
|
var _useState14 = useState(true),
|
|
2820
3007
|
loading = _useState14[0],
|
|
2821
3008
|
setLoading = _useState14[1];
|
|
2822
|
-
var _useState15 = useState(
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
var _useState16 = useState(
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
var _useState17 = useState(
|
|
2829
|
-
|
|
2830
|
-
|
|
3009
|
+
var _useState15 = useState(false),
|
|
3010
|
+
cardLoading = _useState15[0],
|
|
3011
|
+
setCardLoading = _useState15[1];
|
|
3012
|
+
var _useState16 = useState(true),
|
|
3013
|
+
isCountriesLoading = _useState16[0],
|
|
3014
|
+
setIsCountriesLoading = _useState16[1];
|
|
3015
|
+
var _useState17 = useState(null),
|
|
3016
|
+
error = _useState17[0],
|
|
3017
|
+
setError = _useState17[1];
|
|
3018
|
+
var _useState18 = useState(false),
|
|
3019
|
+
phoneValidationIsLoading = _useState18[0],
|
|
3020
|
+
setPhoneValidationIsLoading = _useState18[1];
|
|
2831
3021
|
var emailLogged = _get(userData, 'email', '') || _get(userValues, 'email', '');
|
|
2832
3022
|
var firstNameLogged = _get(userData, 'first_name', '') || _get(userValues, 'first_name', '');
|
|
2833
3023
|
var lastNameLogged = _get(userData, 'last_name', '') || _get(userValues, 'last_name', '');
|
|
@@ -2836,6 +3026,7 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
2836
3026
|
var eventId = getQueryVariable('event_id') || '';
|
|
2837
3027
|
var optedInFieldValue = brandOptIn ? brandOptIn : _get(cartInfoData, 'optedIn', false);
|
|
2838
3028
|
var ttfOptIn = Boolean(_get(cartInfoData, 'ttfOptIn', false));
|
|
3029
|
+
var isTable = Boolean(_get(cartInfoData, 'is_table', false));
|
|
2839
3030
|
var hideTtfOptIn = _get(cartInfoData, 'hide_ttf_opt_in', true);
|
|
2840
3031
|
var expirationTime = _get(cartInfoData, 'expiresAt');
|
|
2841
3032
|
var flagRequirePhone = getQueryVariable('phone_required') === 'true';
|
|
@@ -2844,9 +3035,9 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
2844
3035
|
var flagFreeTicket = getQueryVariable('free_ticket') === 'true';
|
|
2845
3036
|
var hidePhoneField = getQueryVariable('hide_phone_field') === 'true';
|
|
2846
3037
|
var hideWalletAddressField = !collectOptionalWalletAddress && !collectMandatoryWalletAddress;
|
|
2847
|
-
var
|
|
2848
|
-
pendingVerificationMessage =
|
|
2849
|
-
setPendingVerificationMessage =
|
|
3038
|
+
var _useState19 = useState(),
|
|
3039
|
+
pendingVerificationMessage = _useState19[0],
|
|
3040
|
+
setPendingVerificationMessage = _useState19[1];
|
|
2850
3041
|
// Get prevProps
|
|
2851
3042
|
var prevData = useRef(data);
|
|
2852
3043
|
var addAddOnsInAttributes = function addAddOnsInAttributes(checkoutBody) {
|
|
@@ -2926,9 +3117,10 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
2926
3117
|
while (1) switch (_context3.prev = _context3.next) {
|
|
2927
3118
|
case 0:
|
|
2928
3119
|
_context3.prev = 0;
|
|
2929
|
-
|
|
3120
|
+
setCardLoading(true);
|
|
3121
|
+
_context3.next = 4;
|
|
2930
3122
|
return getCart();
|
|
2931
|
-
case
|
|
3123
|
+
case 4:
|
|
2932
3124
|
res = _context3.sent;
|
|
2933
3125
|
setCustomHeader(res);
|
|
2934
3126
|
cartInfo = _get(res, 'data.data.attributes');
|
|
@@ -2938,19 +3130,23 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
2938
3130
|
return nanoid();
|
|
2939
3131
|
}));
|
|
2940
3132
|
onGetCartSuccess(res.data);
|
|
2941
|
-
_context3.next =
|
|
3133
|
+
_context3.next = 16;
|
|
2942
3134
|
break;
|
|
2943
|
-
case
|
|
2944
|
-
_context3.prev =
|
|
3135
|
+
case 13:
|
|
3136
|
+
_context3.prev = 13;
|
|
2945
3137
|
_context3.t0 = _context3["catch"](0);
|
|
2946
3138
|
if (axios.isAxiosError(_context3.t0)) {
|
|
2947
3139
|
onGetCartError(_context3.t0);
|
|
2948
3140
|
}
|
|
2949
|
-
case
|
|
3141
|
+
case 16:
|
|
3142
|
+
_context3.prev = 16;
|
|
3143
|
+
setCardLoading(false);
|
|
3144
|
+
return _context3.finish(16);
|
|
3145
|
+
case 19:
|
|
2950
3146
|
case "end":
|
|
2951
3147
|
return _context3.stop();
|
|
2952
3148
|
}
|
|
2953
|
-
}, _callee3, null, [[0,
|
|
3149
|
+
}, _callee3, null, [[0, 13, 16, 19]]);
|
|
2954
3150
|
}));
|
|
2955
3151
|
return function fetchCart() {
|
|
2956
3152
|
return _ref6.apply(this, arguments);
|
|
@@ -3089,9 +3285,12 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
3089
3285
|
page: 'billing',
|
|
3090
3286
|
pageUrl: pageUrl
|
|
3091
3287
|
});
|
|
3288
|
+
if (isTable) {
|
|
3289
|
+
dataWithUniqueIds[0].label = 'Get Your Tables';
|
|
3290
|
+
}
|
|
3092
3291
|
return React.createElement(ThemeProvider, {
|
|
3093
3292
|
theme: themeMui
|
|
3094
|
-
}, (loading || isCountriesLoading) && React.createElement(Backdrop, {
|
|
3293
|
+
}, (loading || cardLoading || isCountriesLoading) && React.createElement(Backdrop, {
|
|
3095
3294
|
sx: {
|
|
3096
3295
|
color: '#fff',
|
|
3097
3296
|
backgroundColor: '#000000bd',
|
|
@@ -3306,7 +3505,7 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
3306
3505
|
}, React.createElement("img", {
|
|
3307
3506
|
src: theme === 'dark' ? 'https://www.ticketfairy.com/resources/images/logo-ttf.svg' : 'https://www.ticketfairy.com/resources/images/logo-ttf-black.svg',
|
|
3308
3507
|
alt: "nodata"
|
|
3309
|
-
})))), _map(dataWithUniqueIds, function (item) {
|
|
3508
|
+
})))), !cardLoading && _map(dataWithUniqueIds, function (item) {
|
|
3310
3509
|
var label = item.label,
|
|
3311
3510
|
labelClassName = item.labelClassName,
|
|
3312
3511
|
fields = item.fields;
|
|
@@ -3786,12 +3985,15 @@ var getStripePromise = function getStripePromise(reviewData) {
|
|
|
3786
3985
|
return loadStripe(stripePublishableKey, options);
|
|
3787
3986
|
};
|
|
3788
3987
|
var initialOrderValues = {
|
|
3988
|
+
id: '',
|
|
3789
3989
|
product_name: '',
|
|
3790
3990
|
ticketType: '',
|
|
3791
3991
|
quantity: '',
|
|
3792
3992
|
price: '',
|
|
3793
3993
|
total: '',
|
|
3794
3994
|
currency: '',
|
|
3995
|
+
guest_count: '',
|
|
3996
|
+
pay_now: '',
|
|
3795
3997
|
add_ons: []
|
|
3796
3998
|
};
|
|
3797
3999
|
var initialReviewValues = {
|
|
@@ -3862,7 +4064,7 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
3862
4064
|
var eventId = getQueryVariable('event_id') || _get(reviewData, 'cart[0].product_id') || '';
|
|
3863
4065
|
var hash = checkoutData.hash,
|
|
3864
4066
|
total = checkoutData.total;
|
|
3865
|
-
var isFreeTickets = !Number(total) && !Number(orderData.total);
|
|
4067
|
+
var isFreeTickets = !Number(total) && !Number(orderData.total) || !Number(orderData.pay_now);
|
|
3866
4068
|
var pageUrl = isBrowser ? window.location.href.split('?')[0] : '';
|
|
3867
4069
|
usePixel(eventId, {
|
|
3868
4070
|
page: 'review',
|
|
@@ -3870,7 +4072,7 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
3870
4072
|
});
|
|
3871
4073
|
useEffect(function () {
|
|
3872
4074
|
_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
3873
|
-
var response, _cart
|
|
4075
|
+
var response, _cart$2, attributes, cart, order_details, _order_details$ticket, ticket, orderDataArray, _orderData;
|
|
3874
4076
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
3875
4077
|
while (1) switch (_context.prev = _context.next) {
|
|
3876
4078
|
case 0:
|
|
@@ -3884,14 +4086,30 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
3884
4086
|
setReviewData(attributes);
|
|
3885
4087
|
cart = attributes.cart, order_details = attributes.order_details;
|
|
3886
4088
|
_order_details$ticket = order_details.tickets, ticket = _order_details$ticket[0];
|
|
4089
|
+
orderDataArray = _map(order_details.tickets, function (item) {
|
|
4090
|
+
var _cart$;
|
|
4091
|
+
return {
|
|
4092
|
+
product_name: (_cart$ = cart[0]) == null ? void 0 : _cart$.product_name,
|
|
4093
|
+
ticketType: item == null ? void 0 : item.name,
|
|
4094
|
+
quantity: item == null ? void 0 : item.guest_count,
|
|
4095
|
+
price: item == null ? void 0 : item.price,
|
|
4096
|
+
id: item.id,
|
|
4097
|
+
count: item == null ? void 0 : item.quantity
|
|
4098
|
+
};
|
|
4099
|
+
});
|
|
3887
4100
|
_orderData = {
|
|
3888
|
-
|
|
4101
|
+
id: order_details == null ? void 0 : order_details.id,
|
|
4102
|
+
product_name: (_cart$2 = cart[0]) == null ? void 0 : _cart$2.product_name,
|
|
3889
4103
|
ticketType: ticket == null ? void 0 : ticket.name,
|
|
3890
4104
|
quantity: ticket == null ? void 0 : ticket.quantity,
|
|
3891
4105
|
price: ticket == null ? void 0 : ticket.price,
|
|
3892
4106
|
total: order_details == null ? void 0 : order_details.total,
|
|
3893
4107
|
currency: order_details == null ? void 0 : order_details.currency,
|
|
3894
|
-
add_ons: (order_details == null ? void 0 : order_details.add_ons) || []
|
|
4108
|
+
add_ons: (order_details == null ? void 0 : order_details.add_ons) || [],
|
|
4109
|
+
pay_now: (order_details == null ? void 0 : order_details.pay_now) || '',
|
|
4110
|
+
guest_count: (order_details == null ? void 0 : order_details.guest_count) || null,
|
|
4111
|
+
debt: (order_details == null ? void 0 : order_details.debt) || null,
|
|
4112
|
+
tableTypes: orderDataArray
|
|
3895
4113
|
};
|
|
3896
4114
|
setOrderData(_orderData);
|
|
3897
4115
|
onGetPaymentDataSuccess(response.data);
|
|
@@ -3956,7 +4174,7 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
3956
4174
|
// 3. redirect to confirmation page
|
|
3957
4175
|
var handlePaymentMiddleWare = /*#__PURE__*/function () {
|
|
3958
4176
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(error) {
|
|
3959
|
-
var order_hash, paymentSuccessResponse;
|
|
4177
|
+
var order_hash, paymentSuccessResponse, isWindowDefined, _window;
|
|
3960
4178
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
3961
4179
|
while (1) switch (_context3.prev = _context3.next) {
|
|
3962
4180
|
case 0:
|
|
@@ -3988,6 +4206,20 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
3988
4206
|
if (paymentSuccessResponse.status === 200) {
|
|
3989
4207
|
handlePayment(paymentSuccessResponse);
|
|
3990
4208
|
setPaymentIsLoading(false);
|
|
4209
|
+
// clear seat-map related data from localStorage
|
|
4210
|
+
localStorage.removeItem('reservationData');
|
|
4211
|
+
localStorage.removeItem("reservationStart-" + eventId);
|
|
4212
|
+
localStorage.removeItem('ownReservations');
|
|
4213
|
+
localStorage.removeItem('tierId');
|
|
4214
|
+
isWindowDefined = typeof window !== "undefined";
|
|
4215
|
+
if (isWindowDefined) {
|
|
4216
|
+
(_window = window) == null ? void 0 : _window.dataLayer.push({
|
|
4217
|
+
'event': 'Purchase',
|
|
4218
|
+
'orderValue': orderData.total,
|
|
4219
|
+
'orderCurrency': orderData.currency,
|
|
4220
|
+
'orderId': orderData.id
|
|
4221
|
+
});
|
|
4222
|
+
}
|
|
3991
4223
|
}
|
|
3992
4224
|
_context3.next = 22;
|
|
3993
4225
|
break;
|
|
@@ -4008,6 +4240,33 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
4008
4240
|
};
|
|
4009
4241
|
}();
|
|
4010
4242
|
var themeMui = createTheme(themeOptions);
|
|
4243
|
+
var hasTableTypes = Boolean(Number(orderData.guest_count));
|
|
4244
|
+
var paymentFieldsData = hasTableTypes ? [{
|
|
4245
|
+
label: 'Event',
|
|
4246
|
+
id: 'product_name'
|
|
4247
|
+
}, {
|
|
4248
|
+
label: '',
|
|
4249
|
+
id: 'tableTypes'
|
|
4250
|
+
}, {
|
|
4251
|
+
label: 'Total (incl. fees, card processing and taxes)',
|
|
4252
|
+
id: 'total',
|
|
4253
|
+
normalizer: function normalizer(value, currency) {
|
|
4254
|
+
return currencyNormalizerCreator(createFixedFloatNormalizer(2)(parseFloat(value)), currency);
|
|
4255
|
+
}
|
|
4256
|
+
}, {
|
|
4257
|
+
label: 'Pay Now',
|
|
4258
|
+
id: 'pay_now',
|
|
4259
|
+
normalizer: function normalizer(value, currency) {
|
|
4260
|
+
return currencyNormalizerCreator(createFixedFloatNormalizer(2)(parseFloat(value)), currency);
|
|
4261
|
+
}
|
|
4262
|
+
}, {
|
|
4263
|
+
label: 'Pay On Check-in',
|
|
4264
|
+
id: 'debt',
|
|
4265
|
+
normalizer: function normalizer(value, currency) {
|
|
4266
|
+
return currencyNormalizerCreator(createFixedFloatNormalizer(2)(parseFloat(value)), currency);
|
|
4267
|
+
}
|
|
4268
|
+
}] : paymentFields;
|
|
4269
|
+
var isTable = orderData == null ? void 0 : orderData.guest_count;
|
|
4011
4270
|
return React.createElement(ThemeProvider, {
|
|
4012
4271
|
theme: themeMui
|
|
4013
4272
|
}, React.createElement("div", {
|
|
@@ -4022,11 +4281,14 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
4022
4281
|
variant: "filled"
|
|
4023
4282
|
}, error), paymentDataIsLoading && React.createElement(Loader, null), !paymentDataIsLoading && React.createElement(Container, {
|
|
4024
4283
|
maxWidth: "md"
|
|
4025
|
-
}, showFormTitle && React.createElement("h1", null, formTitle), React.createElement("div", {
|
|
4284
|
+
}, showFormTitle && React.createElement("h1", null, isTable ? 'Get Your Tables' : formTitle), React.createElement("div", {
|
|
4026
4285
|
className: "order_info_text"
|
|
4027
4286
|
}, orderInfoLabel), React.createElement("div", {
|
|
4028
|
-
className: "order_info_section"
|
|
4029
|
-
|
|
4287
|
+
className: "order_info_section",
|
|
4288
|
+
style: {
|
|
4289
|
+
display: hasTableTypes ? 'block' : 'grid'
|
|
4290
|
+
}
|
|
4291
|
+
}, _map(paymentFieldsData, function (field) {
|
|
4030
4292
|
var id = field.id,
|
|
4031
4293
|
label = field.label,
|
|
4032
4294
|
_field$className = field.className,
|
|
@@ -4035,10 +4297,49 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
4035
4297
|
normalizer = _field$normalizer === void 0 ? _identity : _field$normalizer;
|
|
4036
4298
|
var currency = orderData.currency;
|
|
4037
4299
|
var value = orderData[id];
|
|
4300
|
+
var component = null;
|
|
4038
4301
|
if (field.id === 'add_ons' && _isEmpty(value)) {
|
|
4039
4302
|
return false;
|
|
4040
4303
|
}
|
|
4041
|
-
|
|
4304
|
+
if (field.id === 'tableTypes') {
|
|
4305
|
+
var valueArray = value;
|
|
4306
|
+
component = React.createElement("div", {
|
|
4307
|
+
key: id,
|
|
4308
|
+
className: "order_info_block",
|
|
4309
|
+
style: {
|
|
4310
|
+
display: 'flex',
|
|
4311
|
+
flexDirection: 'column'
|
|
4312
|
+
}
|
|
4313
|
+
}, _map(valueArray, function (tableTypeItem) {
|
|
4314
|
+
return React.createElement("div", {
|
|
4315
|
+
key: tableTypeItem.id,
|
|
4316
|
+
style: {
|
|
4317
|
+
display: 'grid',
|
|
4318
|
+
gridTemplateColumns: '33% 33% 33%',
|
|
4319
|
+
gridColumnGap: '10%'
|
|
4320
|
+
}
|
|
4321
|
+
}, React.createElement("div", {
|
|
4322
|
+
className: "order_info_block"
|
|
4323
|
+
}, React.createElement("div", {
|
|
4324
|
+
className: "order_info_title"
|
|
4325
|
+
}, "Table Type"), React.createElement("div", {
|
|
4326
|
+
className: className + " order_info_text"
|
|
4327
|
+
}, tableTypeItem.ticketType)), React.createElement("div", {
|
|
4328
|
+
className: "order_info_block"
|
|
4329
|
+
}, React.createElement("div", {
|
|
4330
|
+
className: "order_info_title"
|
|
4331
|
+
}, "Number of Tables"), React.createElement("div", {
|
|
4332
|
+
className: className + " order_info_text"
|
|
4333
|
+
}, tableTypeItem.count)), React.createElement("div", {
|
|
4334
|
+
className: "order_info_block"
|
|
4335
|
+
}, React.createElement("div", {
|
|
4336
|
+
className: "order_info_title"
|
|
4337
|
+
}, "Guest Count"), React.createElement("div", {
|
|
4338
|
+
className: className + " order_info_text"
|
|
4339
|
+
}, tableTypeItem.quantity)));
|
|
4340
|
+
}));
|
|
4341
|
+
}
|
|
4342
|
+
return component || React.createElement("div", {
|
|
4042
4343
|
key: id,
|
|
4043
4344
|
className: "order_info_block"
|
|
4044
4345
|
}, React.createElement("div", {
|
|
@@ -4088,7 +4389,7 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
4088
4389
|
options: elementsOptions
|
|
4089
4390
|
}, React.createElement(CheckoutForm, {
|
|
4090
4391
|
stripe_client_secret: _get(reviewData, 'payment_method.stripe_client_secret'),
|
|
4091
|
-
total: orderData.total,
|
|
4392
|
+
total: orderData.guest_count ? orderData.pay_now : orderData.total,
|
|
4092
4393
|
onSubmit: handlePaymentMiddleWare,
|
|
4093
4394
|
error: error,
|
|
4094
4395
|
currency: orderData.currency,
|
|
@@ -4288,12 +4589,12 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
|
|
|
4288
4589
|
_ref$shareButtons = _ref.shareButtons,
|
|
4289
4590
|
shareButtons = _ref$shareButtons === void 0 ? [] : _ref$shareButtons,
|
|
4290
4591
|
_ref$onGetConfirmatio = _ref.onGetConfirmationDataSuccess,
|
|
4291
|
-
onGetConfirmationDataSuccess = _ref$onGetConfirmatio === void 0 ?
|
|
4592
|
+
onGetConfirmationDataSuccess = _ref$onGetConfirmatio === void 0 ? _identity : _ref$onGetConfirmatio,
|
|
4292
4593
|
_ref$onGetConfirmatio2 = _ref.onGetConfirmationDataError,
|
|
4293
|
-
onGetConfirmationDataError = _ref$onGetConfirmatio2 === void 0 ?
|
|
4594
|
+
onGetConfirmationDataError = _ref$onGetConfirmatio2 === void 0 ? _identity : _ref$onGetConfirmatio2,
|
|
4294
4595
|
orderHash = _ref.orderHash,
|
|
4295
4596
|
_ref$onLinkCopied = _ref.onLinkCopied,
|
|
4296
|
-
onLinkCopied = _ref$onLinkCopied === void 0 ?
|
|
4597
|
+
onLinkCopied = _ref$onLinkCopied === void 0 ? _identity : _ref$onLinkCopied,
|
|
4297
4598
|
clientLabel = _ref.clientLabel,
|
|
4298
4599
|
_ref$showReferralsInf = _ref.showReferralsInfoText,
|
|
4299
4600
|
showReferralsInfoText = _ref$showReferralsInf === void 0 ? false : _ref$showReferralsInf,
|
|
@@ -4310,7 +4611,7 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
|
|
|
4310
4611
|
hash: orderHash
|
|
4311
4612
|
};
|
|
4312
4613
|
var hash = dataDecoded.hash;
|
|
4313
|
-
|
|
4614
|
+
var eventId = (data == null ? void 0 : data.product_id) || '';
|
|
4314
4615
|
useEffect(function () {
|
|
4315
4616
|
_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
4316
4617
|
var _data$product_price, response, _data;
|
|
@@ -4379,7 +4680,6 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
|
|
|
4379
4680
|
confirmationMain = _confirmationLabels$c2 === void 0 ? 'Your tickets are available in My Tickets section' : _confirmationLabels$c2,
|
|
4380
4681
|
_confirmationLabels$c3 = confirmationLabels.confirmationHelper,
|
|
4381
4682
|
confirmationHelper = _confirmationLabels$c3 === void 0 ? 'Please bring them with you to the event' : _confirmationLabels$c3;
|
|
4382
|
-
var eventId = (data == null ? void 0 : data.product_id) || '';
|
|
4383
4683
|
var pageUrl = isBrowser ? window.location.href.split('?')[0] : '';
|
|
4384
4684
|
usePixel(eventId, {
|
|
4385
4685
|
page: 'complete',
|
|
@@ -4470,6 +4770,7 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
|
|
|
4470
4770
|
value: data.personal_share_link,
|
|
4471
4771
|
onChange: onChangeShareLink
|
|
4472
4772
|
}), React.createElement("div", {
|
|
4773
|
+
"aria-hidden": true,
|
|
4473
4774
|
className: "share-by-link-copy-icon",
|
|
4474
4775
|
onClick: function onClick() {
|
|
4475
4776
|
navigator.clipboard.writeText(_get(inputRef, 'current.value'));
|
|
@@ -4973,14 +5274,21 @@ var TicketRow = function TicketRow(_ref) {
|
|
|
4973
5274
|
var ticketTier = _ref.ticketTier,
|
|
4974
5275
|
prevTicketTier = _ref.prevTicketTier,
|
|
4975
5276
|
selectedTickets = _ref.selectedTickets,
|
|
4976
|
-
handleTicketSelect = _ref.handleTicketSelect
|
|
5277
|
+
handleTicketSelect = _ref.handleTicketSelect,
|
|
5278
|
+
isSeatMapAllowed = _ref.isSeatMapAllowed,
|
|
5279
|
+
tableType = _ref.tableType;
|
|
4977
5280
|
var soldOutMessage = ticketTier.soldOutMessage ? ("" + ticketTier.soldOutMessage).toUpperCase() : 'SOLD OUT';
|
|
4978
5281
|
var isSalesClosed = !ticketTier.salesStarted || ticketTier.salesEnded;
|
|
4979
|
-
var
|
|
5282
|
+
var maxCount = tableType ? ticketTier.maxGuests : ticketTier.maxQuantity;
|
|
5283
|
+
var minCount = tableType ? ticketTier.minGuests : ticketTier.minQuantity;
|
|
5284
|
+
var multiplier = ticketTier.multiplier;
|
|
5285
|
+
var options = getTicketSelectOptions(maxCount, minCount, multiplier);
|
|
4980
5286
|
var ticketsClosedMessage = !ticketTier.salesStarted ? 'Sales not started' : 'Sales Ended';
|
|
5287
|
+
var canPurchaseTicket = ticketTier.displayTicket && ticketTier.maxQuantity;
|
|
5288
|
+
var isDirectPurchaseAllowed = _get(ticketTier, 'allowDirectPurchase', false);
|
|
4981
5289
|
var onSaleContent = React.createElement("div", {
|
|
4982
5290
|
className: "get-tickets"
|
|
4983
|
-
}, React.createElement(Box$1, {
|
|
5291
|
+
}, ticketTier.isTable && React.createElement("span", null, "GUESTS"), React.createElement(Box$1, {
|
|
4984
5292
|
className: "get-tickets__selectbox"
|
|
4985
5293
|
}, React.createElement(FormControl$1, {
|
|
4986
5294
|
fullWidth: true
|
|
@@ -5015,7 +5323,10 @@ var TicketRow = function TicketRow(_ref) {
|
|
|
5015
5323
|
returnValue = soldOutMessage;
|
|
5016
5324
|
} else if (isSalesClosed) {
|
|
5017
5325
|
returnValue = ticketsClosedMessage;
|
|
5018
|
-
} else if (
|
|
5326
|
+
} else if (canPurchaseTicket && isSeatMapAllowed && !isDirectPurchaseAllowed) {
|
|
5327
|
+
// Seat Map Tickets renderer logic
|
|
5328
|
+
returnValue = null;
|
|
5329
|
+
} else if (canPurchaseTicket) {
|
|
5019
5330
|
returnValue = onSaleContent;
|
|
5020
5331
|
} else if (_get(prevTicketTier, 'in_stock')) {
|
|
5021
5332
|
returnValue = 'SOON';
|
|
@@ -5033,9 +5344,13 @@ var TicketsSection = function TicketsSection(_ref) {
|
|
|
5033
5344
|
handleTicketSelect = _ref.handleTicketSelect,
|
|
5034
5345
|
sortBySoldOut = _ref.sortBySoldOut,
|
|
5035
5346
|
ticketsHeaderComponent = _ref.ticketsHeaderComponent,
|
|
5347
|
+
tableTicketsHeaderComponent = _ref.tableTicketsHeaderComponent,
|
|
5036
5348
|
hideTicketsHeader = _ref.hideTicketsHeader,
|
|
5349
|
+
hideTableTicketsHeader = _ref.hideTableTicketsHeader,
|
|
5037
5350
|
showGroupNameBlock = _ref.showGroupNameBlock,
|
|
5038
|
-
currencySybmol = _ref.currencySybmol
|
|
5351
|
+
currencySybmol = _ref.currencySybmol,
|
|
5352
|
+
isSeatMapAllowed = _ref.isSeatMapAllowed,
|
|
5353
|
+
tableTickets = _ref.tableTickets;
|
|
5039
5354
|
var symbol = event.currency.symbol;
|
|
5040
5355
|
var sortedTicketsList = sortBySoldOut ? _sortBy(_sortBy(ticketsList, 'sortOrder'), 'soldOut') : _sortBy(ticketsList, 'sortOrder');
|
|
5041
5356
|
var showGroup = !!sortedTicketsList.find(function (ticket) {
|
|
@@ -5087,6 +5402,55 @@ var TicketsSection = function TicketsSection(_ref) {
|
|
|
5087
5402
|
selectedTickets: selectedTickets,
|
|
5088
5403
|
handleTicketSelect: ticketSelect
|
|
5089
5404
|
})))));
|
|
5405
|
+
}), !hideTableTicketsHeader && tableTicketsHeaderComponent, tableTickets.map(function (ticket, i, arr) {
|
|
5406
|
+
var _arr2;
|
|
5407
|
+
var ticketPrice = priceSymbol + " " + (+ticket.price).toFixed(2);
|
|
5408
|
+
var ticketOldPrice = priceSymbol + " " + (+ticket.oldPrice).toFixed(2);
|
|
5409
|
+
var isSoldOut = ticket.sold_out || !ticket.displayTicket || ticket.soldOut;
|
|
5410
|
+
var ticketSelect = function ticketSelect(event) {
|
|
5411
|
+
var value = event.target.value;
|
|
5412
|
+
handleTicketSelect(ticket.id, value, true);
|
|
5413
|
+
};
|
|
5414
|
+
var ticketIsDiscounted = false;
|
|
5415
|
+
if (ticket.oldPrice && !isSoldOut && ticket.oldPrice !== ticket.price) {
|
|
5416
|
+
ticketIsDiscounted = true;
|
|
5417
|
+
}
|
|
5418
|
+
var ticketIsFree = +ticket.price === 0;
|
|
5419
|
+
var ticketPriceElem = isSoldOut ? 'SOLD OUT' : ticketIsFree ? 'FREE' : ticketPrice;
|
|
5420
|
+
var isNewGroupTicket = (ticket == null ? void 0 : ticket.groupName) !== ((_arr2 = arr[i - 1]) == null ? void 0 : _arr2.groupName);
|
|
5421
|
+
return React.createElement(React.Fragment, null, React.createElement(React.Fragment, {
|
|
5422
|
+
key: ticket.id || ticket.name
|
|
5423
|
+
}, showGroupNameBlock && showGroup && isNewGroupTicket ? React.createElement("div", {
|
|
5424
|
+
className: "event-detail__tier group-title"
|
|
5425
|
+
}, ticket.groupName || '') : null, React.createElement("div", {
|
|
5426
|
+
className: "event-detail__tier " + (isSoldOut ? 'disabled' : '')
|
|
5427
|
+
}, React.createElement("div", {
|
|
5428
|
+
className: "event-detail__tier-name"
|
|
5429
|
+
}, ticket.displayName || ticket.name), React.createElement("div", {
|
|
5430
|
+
className: "event-tickets-container"
|
|
5431
|
+
}, React.createElement("div", {
|
|
5432
|
+
className: "event-detail__tier-price"
|
|
5433
|
+
}, ticketIsDiscounted && React.createElement("p", {
|
|
5434
|
+
className: "old-price"
|
|
5435
|
+
}, ticketOldPrice), React.createElement("p", {
|
|
5436
|
+
className: isSoldOut ? 'sold-out' : ''
|
|
5437
|
+
}, ticketPriceElem), !isSoldOut && !ticketIsFree && React.createElement("p", {
|
|
5438
|
+
className: "fees"
|
|
5439
|
+
}, ticket.feeIncluded ? '(incl. Fees)' : '(excl. Fees)'), ticket.depositPercent && React.createElement("p", {
|
|
5440
|
+
className: "deposits"
|
|
5441
|
+
}, ticket.depositPercent + '% DEPOSIT')), React.createElement("div", {
|
|
5442
|
+
className: "event-detail__tier-state",
|
|
5443
|
+
style: {
|
|
5444
|
+
minWidth: 55
|
|
5445
|
+
}
|
|
5446
|
+
}, React.createElement(TicketRow, {
|
|
5447
|
+
tableType: true,
|
|
5448
|
+
ticketTier: ticket,
|
|
5449
|
+
prevTicketTier: arr[i - 1],
|
|
5450
|
+
selectedTickets: selectedTickets,
|
|
5451
|
+
handleTicketSelect: ticketSelect,
|
|
5452
|
+
isSeatMapAllowed: isSeatMapAllowed
|
|
5453
|
+
}))))));
|
|
5090
5454
|
}));
|
|
5091
5455
|
};
|
|
5092
5456
|
|
|
@@ -5138,6 +5502,9 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5138
5502
|
ticketsHeaderComponent = _ref.ticketsHeaderComponent,
|
|
5139
5503
|
_ref$hideTicketsHeade = _ref.hideTicketsHeader,
|
|
5140
5504
|
hideTicketsHeader = _ref$hideTicketsHeade === void 0 ? false : _ref$hideTicketsHeade,
|
|
5505
|
+
tableTicketsHeaderComponent = _ref.tableTicketsHeaderComponent,
|
|
5506
|
+
_ref$hideTableTickets = _ref.hideTableTicketsHeader,
|
|
5507
|
+
hideTableTicketsHeader = _ref$hideTableTickets === void 0 ? false : _ref$hideTableTickets,
|
|
5141
5508
|
_ref$enableInfluencer = _ref.enableInfluencersSection,
|
|
5142
5509
|
enableInfluencersSection = _ref$enableInfluencer === void 0 ? true : _ref$enableInfluencer,
|
|
5143
5510
|
_ref$enableAddOns = _ref.enableAddOns,
|
|
@@ -5154,6 +5521,8 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5154
5521
|
showGroupNameBlock = _ref$showGroupNameBlo === void 0 ? false : _ref$showGroupNameBlo,
|
|
5155
5522
|
_ref$currencySybmol = _ref.currencySybmol,
|
|
5156
5523
|
currencySybmol = _ref$currencySybmol === void 0 ? '' : _ref$currencySybmol,
|
|
5524
|
+
_ref$onReserveButtonC = _ref.onReserveButtonClick,
|
|
5525
|
+
onReserveButtonClick = _ref$onReserveButtonC === void 0 ? _identity : _ref$onReserveButtonC,
|
|
5157
5526
|
_ref$onPendingVerific = _ref.onPendingVerification,
|
|
5158
5527
|
onPendingVerification = _ref$onPendingVerific === void 0 ? _identity : _ref$onPendingVerific;
|
|
5159
5528
|
var _useState = useState({}),
|
|
@@ -5357,13 +5726,16 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5357
5726
|
}));
|
|
5358
5727
|
return _getTicketsApi.apply(this, arguments);
|
|
5359
5728
|
}
|
|
5360
|
-
var handleTicketSelect = function handleTicketSelect(key, value) {
|
|
5729
|
+
var handleTicketSelect = function handleTicketSelect(key, value, isTable) {
|
|
5730
|
+
if (isTable === void 0) {
|
|
5731
|
+
isTable = false;
|
|
5732
|
+
}
|
|
5361
5733
|
setSelectedTickets(function (prevState) {
|
|
5362
5734
|
var _ref3;
|
|
5363
5735
|
if (Object.keys(prevState)[0] !== key && !value) {
|
|
5364
5736
|
return prevState;
|
|
5365
5737
|
}
|
|
5366
|
-
return _ref3 = {}, _ref3[key] = value, _ref3;
|
|
5738
|
+
return _ref3 = {}, _ref3[key] = value, _ref3.isTable = isTable, _ref3;
|
|
5367
5739
|
});
|
|
5368
5740
|
};
|
|
5369
5741
|
var handleOrdersClick = function handleOrdersClick() {
|
|
@@ -5377,7 +5749,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5377
5749
|
var handleBook = /*#__PURE__*/function () {
|
|
5378
5750
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
5379
5751
|
var _product_options, _product_options2, _ticket_types;
|
|
5380
|
-
var ticket, optionName, ticketId, ticketQuantity, data, result, pageConfigsDataResponse, _pageConfigsData$skip, _pageConfigsData$name, _pageConfigsData$age_, _pageConfigsData$phon, _pageConfigsData$hide, _pageConfigsData$has_, _pageConfigsData$free, _pageConfigsData$coll, _pageConfigsData$coll2, pageConfigsData, skipBillingPage, nameIsRequired, ageIsRequired, phoneIsRequired, hidePhoneField, hasAddOn, freeTicket, collectOptionalWalletAddress, collectMandatoryWalletAddress, hash, total, _isWindowDefined, userData, access_token, checkoutBody, checkoutResult, _e$response, _e$response$data, _e$response$data$data, _e$response2, _e$response2$data, message, _isInvalidLinkError, _isNotInvitedError;
|
|
5752
|
+
var ticket, optionName, ticketId, isTableType, productCartQuantity, ticketQuantity, data, result, pageConfigsDataResponse, _pageConfigsData$skip, _pageConfigsData$name, _pageConfigsData$age_, _pageConfigsData$phon, _pageConfigsData$hide, _pageConfigsData$has_, _pageConfigsData$free, _pageConfigsData$coll, _pageConfigsData$coll2, pageConfigsData, skipBillingPage, nameIsRequired, ageIsRequired, phoneIsRequired, hidePhoneField, hasAddOn, freeTicket, collectOptionalWalletAddress, collectMandatoryWalletAddress, hash, total, _isWindowDefined, userData, access_token, checkoutBody, checkoutResult, _e$response, _e$response$data, _e$response$data$data, _e$response2, _e$response2$data, message, _isInvalidLinkError, _isNotInvitedError;
|
|
5381
5753
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
5382
5754
|
while (1) switch (_context2.prev = _context2.next) {
|
|
5383
5755
|
case 0:
|
|
@@ -5387,11 +5759,13 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5387
5759
|
}) || {};
|
|
5388
5760
|
optionName = _get(ticket, 'optionName');
|
|
5389
5761
|
ticketId = _get(ticket, 'id');
|
|
5390
|
-
|
|
5762
|
+
isTableType = _get(ticket, 'isTable', false);
|
|
5763
|
+
productCartQuantity = +selectedTickets[ticket.id];
|
|
5764
|
+
ticketQuantity = isTableType ? 1 : +selectedTickets[ticket.id];
|
|
5391
5765
|
data = {
|
|
5392
5766
|
attributes: {
|
|
5393
5767
|
alternative_view_id: null,
|
|
5394
|
-
product_cart_quantity:
|
|
5768
|
+
product_cart_quantity: productCartQuantity,
|
|
5395
5769
|
product_options: (_product_options = {}, _product_options[optionName] = ticketId, _product_options),
|
|
5396
5770
|
product_id: eventId,
|
|
5397
5771
|
ticket_types: (_ticket_types = {}, _ticket_types[ticketId] = {
|
|
@@ -5400,32 +5774,32 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5400
5774
|
}, _ticket_types)
|
|
5401
5775
|
}
|
|
5402
5776
|
};
|
|
5403
|
-
_context2.prev =
|
|
5404
|
-
_context2.next =
|
|
5777
|
+
_context2.prev = 8;
|
|
5778
|
+
_context2.next = 11;
|
|
5405
5779
|
return addToCart(eventId, data);
|
|
5406
|
-
case
|
|
5780
|
+
case 11:
|
|
5407
5781
|
result = _context2.sent;
|
|
5408
5782
|
if (!enableAddOns) {
|
|
5409
|
-
_context2.next =
|
|
5783
|
+
_context2.next = 18;
|
|
5410
5784
|
break;
|
|
5411
5785
|
}
|
|
5412
|
-
_context2.next =
|
|
5786
|
+
_context2.next = 15;
|
|
5413
5787
|
return getCheckoutPageConfigs();
|
|
5414
|
-
case
|
|
5788
|
+
case 15:
|
|
5415
5789
|
_context2.t0 = _context2.sent;
|
|
5416
|
-
_context2.next =
|
|
5790
|
+
_context2.next = 19;
|
|
5417
5791
|
break;
|
|
5418
|
-
case
|
|
5792
|
+
case 18:
|
|
5419
5793
|
_context2.t0 = {
|
|
5420
5794
|
status: 200,
|
|
5421
5795
|
data: {
|
|
5422
5796
|
attributes: _get(result, 'data.data.attributes')
|
|
5423
5797
|
}
|
|
5424
5798
|
};
|
|
5425
|
-
case
|
|
5799
|
+
case 19:
|
|
5426
5800
|
pageConfigsDataResponse = _context2.t0;
|
|
5427
5801
|
if (!(result.status === 200 && pageConfigsDataResponse.status === 200)) {
|
|
5428
|
-
_context2.next =
|
|
5802
|
+
_context2.next = 50;
|
|
5429
5803
|
break;
|
|
5430
5804
|
}
|
|
5431
5805
|
pageConfigsData = _get(pageConfigsDataResponse, 'data.attributes') || {};
|
|
@@ -5443,7 +5817,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5443
5817
|
_isWindowDefined = typeof window !== 'undefined';
|
|
5444
5818
|
_isWindowDefined && window.localStorage.removeItem('add_ons');
|
|
5445
5819
|
if (!(skipBillingPage && !hasAddOn)) {
|
|
5446
|
-
_context2.next =
|
|
5820
|
+
_context2.next = 49;
|
|
5447
5821
|
break;
|
|
5448
5822
|
}
|
|
5449
5823
|
// Get user data for checkout data
|
|
@@ -5451,22 +5825,22 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5451
5825
|
access_token = _isWindowDefined && window.localStorage.getItem('access_token') ? window.localStorage.getItem('access_token') || '' : '';
|
|
5452
5826
|
checkoutBody = createCheckoutDataBodyWithDefaultHolder(ticketQuantity, userData);
|
|
5453
5827
|
if (!enableBillingInfoAutoCreate) {
|
|
5454
|
-
_context2.next =
|
|
5828
|
+
_context2.next = 45;
|
|
5455
5829
|
break;
|
|
5456
5830
|
}
|
|
5457
|
-
_context2.next =
|
|
5831
|
+
_context2.next = 42;
|
|
5458
5832
|
return postOnCheckout(checkoutBody, access_token, freeTicket);
|
|
5459
|
-
case
|
|
5833
|
+
case 42:
|
|
5460
5834
|
_context2.t1 = _context2.sent;
|
|
5461
|
-
_context2.next =
|
|
5835
|
+
_context2.next = 46;
|
|
5462
5836
|
break;
|
|
5463
|
-
case
|
|
5837
|
+
case 45:
|
|
5464
5838
|
_context2.t1 = null;
|
|
5465
|
-
case
|
|
5839
|
+
case 46:
|
|
5466
5840
|
checkoutResult = _context2.t1;
|
|
5467
5841
|
hash = _get(checkoutResult, 'data.data.attributes.hash');
|
|
5468
5842
|
total = _get(checkoutResult, 'data.data.attributes.total');
|
|
5469
|
-
case
|
|
5843
|
+
case 49:
|
|
5470
5844
|
onAddToCartSuccess({
|
|
5471
5845
|
skip_billing_page: skipBillingPage,
|
|
5472
5846
|
names_required: nameIsRequired,
|
|
@@ -5481,12 +5855,12 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5481
5855
|
total: total,
|
|
5482
5856
|
hasAddOn: hasAddOn
|
|
5483
5857
|
});
|
|
5484
|
-
case 48:
|
|
5485
|
-
_context2.next = 53;
|
|
5486
|
-
break;
|
|
5487
5858
|
case 50:
|
|
5488
|
-
_context2.
|
|
5489
|
-
|
|
5859
|
+
_context2.next = 55;
|
|
5860
|
+
break;
|
|
5861
|
+
case 52:
|
|
5862
|
+
_context2.prev = 52;
|
|
5863
|
+
_context2.t2 = _context2["catch"](8);
|
|
5490
5864
|
if ((_e$response = _context2.t2.response) != null && (_e$response$data = _e$response.data) != null && (_e$response$data$data = _e$response$data.data) != null && _e$response$data$data.hasUnverifiedOrder) {
|
|
5491
5865
|
setPendingVerificationMessage((_e$response2 = _context2.t2.response) == null ? void 0 : (_e$response2$data = _e$response2.data) == null ? void 0 : _e$response2$data.message);
|
|
5492
5866
|
} else if (axios.isAxiosError(_context2.t2)) {
|
|
@@ -5502,15 +5876,15 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5502
5876
|
setError(message);
|
|
5503
5877
|
}
|
|
5504
5878
|
}
|
|
5505
|
-
case
|
|
5506
|
-
_context2.prev =
|
|
5879
|
+
case 55:
|
|
5880
|
+
_context2.prev = 55;
|
|
5507
5881
|
setHandleBookIsLoading(false);
|
|
5508
|
-
return _context2.finish(
|
|
5509
|
-
case
|
|
5882
|
+
return _context2.finish(55);
|
|
5883
|
+
case 58:
|
|
5510
5884
|
case "end":
|
|
5511
5885
|
return _context2.stop();
|
|
5512
5886
|
}
|
|
5513
|
-
}, _callee2, null, [[
|
|
5887
|
+
}, _callee2, null, [[8, 52, 55, 58]]);
|
|
5514
5888
|
}));
|
|
5515
5889
|
return function handleBook() {
|
|
5516
5890
|
return _ref4.apply(this, arguments);
|
|
@@ -5574,7 +5948,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5574
5948
|
}
|
|
5575
5949
|
}
|
|
5576
5950
|
};
|
|
5577
|
-
var bookButtonIsDisabled = handleBookIsLoading || _isEmpty(selectedTickets) || Object.values(selectedTickets)[0] === 0;
|
|
5951
|
+
var bookButtonIsDisabled = (handleBookIsLoading || _isEmpty(selectedTickets) || Object.values(selectedTickets)[0] === 0) && !(event != null && event.flagSeatMapAllowed);
|
|
5578
5952
|
var isTicketAvailable = _some(tickets, function (ticket) {
|
|
5579
5953
|
return ticket.displayTicket && !ticket.soldOut && ticket.salesStarted;
|
|
5580
5954
|
});
|
|
@@ -5602,6 +5976,17 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5602
5976
|
setIsInvalidLinkError('');
|
|
5603
5977
|
};
|
|
5604
5978
|
var hideTopInfluencers = event == null ? void 0 : event.hideTopInfluencers;
|
|
5979
|
+
var isSeatMapAllowed = _get(event, 'seatMapAllowed', false);
|
|
5980
|
+
var isTableMapEnabled = _get(event, 'tableMapEnabled', false);
|
|
5981
|
+
var tableTickets = _filter(tickets, function (ticket) {
|
|
5982
|
+
return ticket.isTable;
|
|
5983
|
+
});
|
|
5984
|
+
var ordinarTickets = {};
|
|
5985
|
+
_forEach(tickets, function (ticket, key) {
|
|
5986
|
+
if (!ticket.isTable) {
|
|
5987
|
+
ordinarTickets[key] = ticket;
|
|
5988
|
+
}
|
|
5989
|
+
});
|
|
5605
5990
|
return React.createElement(ThemeProvider$1, {
|
|
5606
5991
|
theme: themeMui
|
|
5607
5992
|
}, !isLoading && React.createElement(ReferralLogic, {
|
|
@@ -5638,14 +6023,18 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5638
6023
|
ref: ticketsContainerRef
|
|
5639
6024
|
}, !isSalesClosed && React.createElement(TicketsSection, {
|
|
5640
6025
|
event: event,
|
|
5641
|
-
ticketsList:
|
|
6026
|
+
ticketsList: ordinarTickets,
|
|
6027
|
+
tableTickets: tableTickets,
|
|
5642
6028
|
selectedTickets: selectedTickets,
|
|
5643
6029
|
handleTicketSelect: handleTicketSelect,
|
|
5644
6030
|
sortBySoldOut: sortBySoldOut,
|
|
5645
6031
|
ticketsHeaderComponent: ticketsHeaderComponent,
|
|
5646
|
-
|
|
6032
|
+
tableTicketsHeaderComponent: tableTicketsHeaderComponent,
|
|
6033
|
+
hideTableTicketsHeader: hideTableTicketsHeader || _isEmpty(tableTickets),
|
|
6034
|
+
hideTicketsHeader: hideTicketsHeader || _isEmpty(ordinarTickets),
|
|
5647
6035
|
showGroupNameBlock: showGroupNameBlock,
|
|
5648
|
-
currencySybmol: currencySybmol
|
|
6036
|
+
currencySybmol: currencySybmol,
|
|
6037
|
+
isSeatMapAllowed: isSeatMapAllowed
|
|
5649
6038
|
}), externalUrl ? null : isSalesClosed ? React.createElement("p", {
|
|
5650
6039
|
className: "event-closed-message " + (!isLoggedIn ? 'event-closed-on-bottom' : '')
|
|
5651
6040
|
}, "Sales for this event are closed.") : eventSaleIsNotStarted ? React.createElement(Countdown, {
|
|
@@ -5658,7 +6047,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5658
6047
|
disableLeadingZero: disableCountdownLeadingZero,
|
|
5659
6048
|
isLoggedIn: isLoggedIn
|
|
5660
6049
|
}) : null, showWaitingList && event.salesStarted && !hideWaitingList && React.createElement(WaitingList, {
|
|
5661
|
-
tickets:
|
|
6050
|
+
tickets: ordinarTickets,
|
|
5662
6051
|
eventId: eventId,
|
|
5663
6052
|
defaultMaxQuantity: event.waitingListMaxQuantity
|
|
5664
6053
|
}), codeIsLoading ? React.createElement(Loader, null) : isSalesClosed ? null : showAccessCodeSection ? React.createElement(AccessCodeSection, {
|
|
@@ -5680,7 +6069,11 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5680
6069
|
"aria-hidden": true,
|
|
5681
6070
|
className: "book-button \n " + (bookButtonIsDisabled ? 'disabled' : '') + " \n " + (isButtonScrollable ? 'is-scrollable' : '') + "\n " + (!isLoggedIn ? 'on-bottom' : '') + "\n ",
|
|
5682
6071
|
onClick: handleGetTicketClick
|
|
5683
|
-
}, getTicketsLabel || 'GET TICKETS'),
|
|
6072
|
+
}, selectedTickets.isTable ? 'RESERVE TABLES' : getTicketsLabel || 'GET TICKETS'), isSeatMapAllowed && !(event != null && event.salesEnded) && isTicketAvailable && React.createElement(Button$1, {
|
|
6073
|
+
className: "reserve-button",
|
|
6074
|
+
"aria-hidden": true,
|
|
6075
|
+
onClick: onReserveButtonClick
|
|
6076
|
+
}, isTableMapEnabled ? 'Select on map' : 'Select your seats'), isLogged && !hideSessionButtons ? React.createElement("div", {
|
|
5684
6077
|
className: "session-wrapper"
|
|
5685
6078
|
}, React.createElement("span", {
|
|
5686
6079
|
className: "session-container"
|
|
@@ -6483,6 +6876,17 @@ var OrderDetailsContainer = function OrderDetailsContainer(_ref) {
|
|
|
6483
6876
|
var date = moment.tz(data.date, data.timezone).format('dddd, DD MMMM YYYY');
|
|
6484
6877
|
orderSummery += " " + date;
|
|
6485
6878
|
}
|
|
6879
|
+
var columnsProps = data.tickets && data.tickets[0].is_table ? [{
|
|
6880
|
+
label: 'Items'
|
|
6881
|
+
}, {
|
|
6882
|
+
label: 'Price'
|
|
6883
|
+
}, {
|
|
6884
|
+
label: 'Guests count'
|
|
6885
|
+
}, {
|
|
6886
|
+
label: 'Deposit paid'
|
|
6887
|
+
}, {
|
|
6888
|
+
label: 'Remaining'
|
|
6889
|
+
}] : columns;
|
|
6486
6890
|
return React.createElement("div", {
|
|
6487
6891
|
className: "order-details"
|
|
6488
6892
|
}, loading ? React.createElement("div", {
|
|
@@ -6529,12 +6933,14 @@ var OrderDetailsContainer = function OrderDetailsContainer(_ref) {
|
|
|
6529
6933
|
}, React.createElement(Table, {
|
|
6530
6934
|
className: "tt-type",
|
|
6531
6935
|
"aria-label": "collapsible table"
|
|
6532
|
-
}, React.createElement(TableHead, null, React.createElement(TableRow, null, _map(
|
|
6936
|
+
}, React.createElement(TableHead, null, React.createElement(TableRow, null, _map(columnsProps, function (item) {
|
|
6533
6937
|
return React.createElement(TableCell, null, item.label || '');
|
|
6534
6938
|
}))), React.createElement(TableBody, null, data == null ? void 0 : (_data$items = data.items) == null ? void 0 : (_data$items$ticket_ty = _data$items.ticket_types) == null ? void 0 : _data$items$ticket_ty.map(function (ticket, index) {
|
|
6535
|
-
return React.createElement(TableRow, {
|
|
6939
|
+
return data != null && data.tickets && !(data != null && data.tickets[0].is_table) ? React.createElement(TableRow, {
|
|
6536
6940
|
key: index
|
|
6537
|
-
}, React.createElement(TableCell, null, React.createElement("b", null, "Ticket Type:"), " ", ticket.name), React.createElement(TableCell, null, ticket.currency + ticket.price), React.createElement(TableCell, null, ticket.quantity), React.createElement(TableCell, null, ticket.currency + ticket.total))
|
|
6941
|
+
}, React.createElement(TableCell, null, React.createElement("b", null, "Ticket Type:"), " ", ticket.name), React.createElement(TableCell, null, ticket.currency + ticket.price), React.createElement(TableCell, null, ticket.quantity), React.createElement(TableCell, null, ticket.currency + ticket.total)) : React.createElement(TableRow, {
|
|
6942
|
+
key: index
|
|
6943
|
+
}, React.createElement(TableCell, null, React.createElement("b", null, "Ticket Type:"), " ", ticket.name), React.createElement(TableCell, null, ticket.currency + ticket.price), React.createElement(TableCell, null, ticket.guests_count), React.createElement(TableCell, null, ticket.deposit_paid), React.createElement(TableCell, null, ticket.remaining));
|
|
6538
6944
|
}), data == null ? void 0 : (_data$items2 = data.items) == null ? void 0 : (_data$items2$add_ons = _data$items2.add_ons) == null ? void 0 : _data$items2$add_ons.map(function (ticket, index) {
|
|
6539
6945
|
return React.createElement(TableRow, {
|
|
6540
6946
|
key: index
|
|
@@ -7416,16 +7822,850 @@ var AddonsContainter = function AddonsContainter(_ref) {
|
|
|
7416
7822
|
}));
|
|
7417
7823
|
};
|
|
7418
7824
|
|
|
7825
|
+
var addToCartFunc = /*#__PURE__*/function () {
|
|
7826
|
+
var _ref2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
7827
|
+
var eventId, data, ticketQuantity, _ref$enableBillingInf, enableBillingInfoAutoCreate, isWindowDefined, result, pageConfigsDataResponse, pageConfigsData, _pageConfigsData$skip, skipBillingPage, _pageConfigsData$name, nameIsRequired, _pageConfigsData$age_, ageIsRequired, _pageConfigsData$phon, phoneIsRequired, _pageConfigsData$hide, hidePhoneField, _pageConfigsData$has_, hasAddOn, _pageConfigsData$free, freeTicket, _pageConfigsData$coll, collectOptionalWalletAddress, _pageConfigsData$coll2, collectMandatoryWalletAddress, hash, total, userData, checkoutBody, checkoutResult;
|
|
7828
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7829
|
+
while (1) switch (_context.prev = _context.next) {
|
|
7830
|
+
case 0:
|
|
7831
|
+
eventId = _ref.eventId, data = _ref.data, ticketQuantity = _ref.ticketQuantity, _ref$enableBillingInf = _ref.enableBillingInfoAutoCreate, enableBillingInfoAutoCreate = _ref$enableBillingInf === void 0 ? true : _ref$enableBillingInf;
|
|
7832
|
+
isWindowDefined = typeof window !== 'undefined';
|
|
7833
|
+
_context.next = 4;
|
|
7834
|
+
return addToCart(eventId, data);
|
|
7835
|
+
case 4:
|
|
7836
|
+
result = _context.sent;
|
|
7837
|
+
_context.next = 7;
|
|
7838
|
+
return getCheckoutPageConfigs();
|
|
7839
|
+
case 7:
|
|
7840
|
+
pageConfigsDataResponse = _context.sent;
|
|
7841
|
+
if (!(result.status === 200 && pageConfigsDataResponse.status === 200)) {
|
|
7842
|
+
_context.next = 28;
|
|
7843
|
+
break;
|
|
7844
|
+
}
|
|
7845
|
+
pageConfigsData = _get(pageConfigsDataResponse, 'data.attributes') || {};
|
|
7846
|
+
_pageConfigsData$skip = pageConfigsData.skip_billing_page, skipBillingPage = _pageConfigsData$skip === void 0 ? false : _pageConfigsData$skip, _pageConfigsData$name = pageConfigsData.names_required, nameIsRequired = _pageConfigsData$name === void 0 ? false : _pageConfigsData$name, _pageConfigsData$age_ = pageConfigsData.age_required, ageIsRequired = _pageConfigsData$age_ === void 0 ? false : _pageConfigsData$age_, _pageConfigsData$phon = pageConfigsData.phone_required, phoneIsRequired = _pageConfigsData$phon === void 0 ? false : _pageConfigsData$phon, _pageConfigsData$hide = pageConfigsData.hide_phone_field, hidePhoneField = _pageConfigsData$hide === void 0 ? false : _pageConfigsData$hide, _pageConfigsData$has_ = pageConfigsData.has_add_on, hasAddOn = _pageConfigsData$has_ === void 0 ? false : _pageConfigsData$has_, _pageConfigsData$free = pageConfigsData.free_ticket, freeTicket = _pageConfigsData$free === void 0 ? false : _pageConfigsData$free, _pageConfigsData$coll = pageConfigsData.collect_optional_wallet_address, collectOptionalWalletAddress = _pageConfigsData$coll === void 0 ? false : _pageConfigsData$coll, _pageConfigsData$coll2 = pageConfigsData.collect_mandatory_wallet_address, collectMandatoryWalletAddress = _pageConfigsData$coll2 === void 0 ? false : _pageConfigsData$coll2;
|
|
7847
|
+
hash = '';
|
|
7848
|
+
total = '';
|
|
7849
|
+
isWindowDefined && window.localStorage.removeItem('add_ons');
|
|
7850
|
+
if (!(skipBillingPage && !hasAddOn)) {
|
|
7851
|
+
_context.next = 27;
|
|
7852
|
+
break;
|
|
7853
|
+
}
|
|
7854
|
+
// Get user data for checkout data
|
|
7855
|
+
userData = isWindowDefined && window.localStorage.getItem('user_data') ? JSON.parse(window.localStorage.getItem('user_data') || '') : {};
|
|
7856
|
+
checkoutBody = createCheckoutDataBodyWithDefaultHolder(ticketQuantity, userData);
|
|
7857
|
+
if (!enableBillingInfoAutoCreate) {
|
|
7858
|
+
_context.next = 23;
|
|
7859
|
+
break;
|
|
7860
|
+
}
|
|
7861
|
+
_context.next = 20;
|
|
7862
|
+
return postOnCheckout(checkoutBody, undefined, freeTicket);
|
|
7863
|
+
case 20:
|
|
7864
|
+
_context.t0 = _context.sent;
|
|
7865
|
+
_context.next = 24;
|
|
7866
|
+
break;
|
|
7867
|
+
case 23:
|
|
7868
|
+
_context.t0 = null;
|
|
7869
|
+
case 24:
|
|
7870
|
+
checkoutResult = _context.t0;
|
|
7871
|
+
hash = _get(checkoutResult, 'data.data.attributes.hash') || '';
|
|
7872
|
+
total = _get(checkoutResult, 'data.data.attributes.total') || '';
|
|
7873
|
+
case 27:
|
|
7874
|
+
return _context.abrupt("return", {
|
|
7875
|
+
skip_billing_page: skipBillingPage,
|
|
7876
|
+
names_required: nameIsRequired,
|
|
7877
|
+
phone_required: phoneIsRequired,
|
|
7878
|
+
age_required: ageIsRequired,
|
|
7879
|
+
hide_phone_field: hidePhoneField,
|
|
7880
|
+
free_ticket: freeTicket,
|
|
7881
|
+
collect_optional_wallet_address: collectOptionalWalletAddress,
|
|
7882
|
+
collect_mandatory_wallet_address: collectMandatoryWalletAddress,
|
|
7883
|
+
event_id: String(eventId),
|
|
7884
|
+
hash: hash,
|
|
7885
|
+
total: total,
|
|
7886
|
+
hasAddOn: hasAddOn
|
|
7887
|
+
});
|
|
7888
|
+
case 28:
|
|
7889
|
+
return _context.abrupt("return", null);
|
|
7890
|
+
case 29:
|
|
7891
|
+
case "end":
|
|
7892
|
+
return _context.stop();
|
|
7893
|
+
}
|
|
7894
|
+
}, _callee);
|
|
7895
|
+
}));
|
|
7896
|
+
return function addToCartFunc(_x) {
|
|
7897
|
+
return _ref2.apply(this, arguments);
|
|
7898
|
+
};
|
|
7899
|
+
}();
|
|
7900
|
+
|
|
7901
|
+
var getTierIdBasedOnSeatId = function getTierIdBasedOnSeatId(seatId, eventSeats) {
|
|
7902
|
+
var tierId = '';
|
|
7903
|
+
_forEach(eventSeats, function (group) {
|
|
7904
|
+
_forEach(group.seats, function (seatsCount, rowId) {
|
|
7905
|
+
var _seatId$split = seatId.split(':'),
|
|
7906
|
+
row_id = _seatId$split[0],
|
|
7907
|
+
seat_id = _seatId$split[1];
|
|
7908
|
+
if (row_id === rowId && seat_id <= seatsCount) {
|
|
7909
|
+
tierId = Number(group.tier_id);
|
|
7910
|
+
return false;
|
|
7911
|
+
}
|
|
7912
|
+
return true;
|
|
7913
|
+
});
|
|
7914
|
+
});
|
|
7915
|
+
return tierId;
|
|
7916
|
+
};
|
|
7917
|
+
var getButtonLabel = function getButtonLabel(count, tableMapEnabled) {
|
|
7918
|
+
if (!count) {
|
|
7919
|
+
return tableMapEnabled ? "GET TABLES" : "GET TICKETS";
|
|
7920
|
+
} else if (count === 1) {
|
|
7921
|
+
return tableMapEnabled ? "GET " + count + " TABLE" : "GET " + count + " TICKET";
|
|
7922
|
+
}
|
|
7923
|
+
return tableMapEnabled ? "GET " + count + " TABLES" : "GET " + count + " TICKETS";
|
|
7924
|
+
};
|
|
7925
|
+
var getOwnReservationsBasedOnStatuses = function getOwnReservationsBasedOnStatuses(statuses) {
|
|
7926
|
+
var ownReservations = [];
|
|
7927
|
+
Object.keys(statuses).forEach(function (groupRowId) {
|
|
7928
|
+
return Object.keys(statuses[groupRowId]).forEach(function (seatIndex) {
|
|
7929
|
+
if (statuses[groupRowId][seatIndex] === 'OR') {
|
|
7930
|
+
ownReservations.push(groupRowId + ":" + seatIndex);
|
|
7931
|
+
} else if (statuses[groupRowId][seatIndex] === 'H') {
|
|
7932
|
+
statuses[groupRowId][seatIndex] = 'BLOCKED';
|
|
7933
|
+
}
|
|
7934
|
+
});
|
|
7935
|
+
});
|
|
7936
|
+
return ownReservations;
|
|
7937
|
+
};
|
|
7938
|
+
var getTicketDropdownData = function getTicketDropdownData(reservationData, tierReleations) {
|
|
7939
|
+
var ticketsDropdownsData = [];
|
|
7940
|
+
_forEach(reservationData, function (reservation) {
|
|
7941
|
+
if (tierReleations[reservation.tierId]) {
|
|
7942
|
+
var ticketsData = _values(tierReleations[reservation.tierId]);
|
|
7943
|
+
ticketsDropdownsData.push({
|
|
7944
|
+
seatId: reservation.seatId,
|
|
7945
|
+
tierId: reservation.tierId,
|
|
7946
|
+
ticketsData: ticketsData
|
|
7947
|
+
});
|
|
7948
|
+
} else {
|
|
7949
|
+
ticketsDropdownsData.push({
|
|
7950
|
+
seatId: reservation.seatId,
|
|
7951
|
+
tierId: reservation.tierId,
|
|
7952
|
+
ticketsData: [{
|
|
7953
|
+
ticket_type_tier_id: reservation.tierId,
|
|
7954
|
+
ticket_type_name: 'Please select Ticket Type',
|
|
7955
|
+
ticket_type_price: '',
|
|
7956
|
+
ticket_type_id: 'default'
|
|
7957
|
+
}]
|
|
7958
|
+
});
|
|
7959
|
+
}
|
|
7960
|
+
});
|
|
7961
|
+
return ticketsDropdownsData;
|
|
7962
|
+
};
|
|
7963
|
+
var getAddToCartRequestData = function getAddToCartRequestData(_ref) {
|
|
7964
|
+
var eventId = _ref.eventId,
|
|
7965
|
+
_ref$reservations = _ref.reservations,
|
|
7966
|
+
reservations = _ref$reservations === void 0 ? [] : _ref$reservations,
|
|
7967
|
+
_ref$selectedSeats = _ref.selectedSeats,
|
|
7968
|
+
selectedSeats = _ref$selectedSeats === void 0 ? [] : _ref$selectedSeats,
|
|
7969
|
+
_ref$selectedTickets = _ref.selectedTickets,
|
|
7970
|
+
selectedTickets = _ref$selectedTickets === void 0 ? [] : _ref$selectedTickets,
|
|
7971
|
+
_ref$guestCounts = _ref.guestCounts,
|
|
7972
|
+
guestCounts = _ref$guestCounts === void 0 ? {} : _ref$guestCounts;
|
|
7973
|
+
var hasGuests = !_isEmpty(guestCounts);
|
|
7974
|
+
var addToCartData = {
|
|
7975
|
+
attributes: {
|
|
7976
|
+
alternative_view_id: null,
|
|
7977
|
+
product_cart_quantity: reservations.length,
|
|
7978
|
+
product_options: {},
|
|
7979
|
+
product_id: eventId,
|
|
7980
|
+
ticket_types: {}
|
|
7981
|
+
}
|
|
7982
|
+
};
|
|
7983
|
+
var productOptions = {};
|
|
7984
|
+
var ticketTypes = {};
|
|
7985
|
+
_forEach(reservations, function (item, index) {
|
|
7986
|
+
var _ticketTypes$ticket$t, _product_options;
|
|
7987
|
+
var ticket = _find(selectedSeats[item], function (sitem) {
|
|
7988
|
+
return sitem.ticket_type_id === selectedTickets[item];
|
|
7989
|
+
});
|
|
7990
|
+
productOptions[ticket.ticket_type_option] = ticket.ticket_type_id;
|
|
7991
|
+
var ticketTypesKey = hasGuests ? index : ticket.ticket_type_id;
|
|
7992
|
+
var quantity = hasGuests ? guestCounts[item] : (((_ticketTypes$ticket$t = ticketTypes[ticket.ticket_type_id]) == null ? void 0 : _ticketTypes$ticket$t.quantity) || 0) + 1;
|
|
7993
|
+
ticketTypes[ticketTypesKey] = {
|
|
7994
|
+
quantity: quantity,
|
|
7995
|
+
product_options: (_product_options = {}, _product_options[ticket.ticket_type_option] = ticket.ticket_type_id, _product_options.ticket_price = ticket.ticket_type_price, _product_options)
|
|
7996
|
+
};
|
|
7997
|
+
});
|
|
7998
|
+
addToCartData.attributes.product_options = productOptions;
|
|
7999
|
+
addToCartData.attributes.ticket_types = ticketTypes;
|
|
8000
|
+
return addToCartData;
|
|
8001
|
+
};
|
|
8002
|
+
var getTierRelationsArray = function getTierRelationsArray(data) {
|
|
8003
|
+
var ticketTypeTireRelationsArray = [];
|
|
8004
|
+
_forEach(data, function (item) {
|
|
8005
|
+
ticketTypeTireRelationsArray.push.apply(ticketTypeTireRelationsArray, _values(item));
|
|
8006
|
+
});
|
|
8007
|
+
return ticketTypeTireRelationsArray;
|
|
8008
|
+
};
|
|
8009
|
+
|
|
8010
|
+
var CONTAINER_DEFAULT_ID = 'seat_map_default_container';
|
|
8011
|
+
var SeatMapComponent = function SeatMapComponent(props) {
|
|
8012
|
+
var seatMapProps = props.seatMapProps,
|
|
8013
|
+
mapContainerId = props.mapContainerId;
|
|
8014
|
+
var seatData = seatMapProps.seatData,
|
|
8015
|
+
statuses = seatMapProps.statuses,
|
|
8016
|
+
_seatMapProps$seatMap = seatMapProps.seatMapType,
|
|
8017
|
+
seatMapType = _seatMapProps$seatMap === void 0 ? null : _seatMapProps$seatMap,
|
|
8018
|
+
_seatMapProps$seatMap2 = seatMapProps.seatMapEvents,
|
|
8019
|
+
seatMapEvents = _seatMapProps$seatMap2 === void 0 ? {} : _seatMapProps$seatMap2,
|
|
8020
|
+
_seatMapProps$ticketT = seatMapProps.ticketTypeTierRelations,
|
|
8021
|
+
ticketTypeTierRelations = _seatMapProps$ticketT === void 0 ? {} : _seatMapProps$ticketT,
|
|
8022
|
+
tierPrices = seatMapProps.tierPrices,
|
|
8023
|
+
isReserving = seatMapProps.isReserving,
|
|
8024
|
+
predefinedSeats = seatMapProps.predefinedSeats;
|
|
8025
|
+
useEffect(function () {
|
|
8026
|
+
var parentElement = document.getElementById(mapContainerId || CONTAINER_DEFAULT_ID);
|
|
8027
|
+
// Temp solution
|
|
8028
|
+
window.tierPrices = tierPrices;
|
|
8029
|
+
if (Boolean(parentElement)) {
|
|
8030
|
+
var mapComponent = React.createElement(SeatMapView, {
|
|
8031
|
+
disabled: isReserving,
|
|
8032
|
+
loading: isReserving,
|
|
8033
|
+
events: seatMapEvents,
|
|
8034
|
+
isSelectionOn: false,
|
|
8035
|
+
seatData: seatData,
|
|
8036
|
+
statuses: statuses,
|
|
8037
|
+
ticketTypeTireRelationsArray: getTierRelationsArray(ticketTypeTierRelations),
|
|
8038
|
+
width: Math.min((parentElement == null ? void 0 : parentElement.clientWidth) || 800, 800),
|
|
8039
|
+
height: Math.min((parentElement == null ? void 0 : parentElement.clientWidth) || 800, 800),
|
|
8040
|
+
isBlockMap: seatMapType === 'block',
|
|
8041
|
+
isTableMap: seatMapType === 'table',
|
|
8042
|
+
predefinedSeats: predefinedSeats
|
|
8043
|
+
});
|
|
8044
|
+
ReactDom.render(mapComponent, parentElement);
|
|
8045
|
+
}
|
|
8046
|
+
}, [isReserving, mapContainerId, seatData, seatMapEvents, seatMapType, tierPrices, statuses, ticketTypeTierRelations]);
|
|
8047
|
+
return React.createElement("div", {
|
|
8048
|
+
id: CONTAINER_DEFAULT_ID
|
|
8049
|
+
});
|
|
8050
|
+
};
|
|
8051
|
+
|
|
8052
|
+
var TicketsSection$1 = function TicketsSection(props) {
|
|
8053
|
+
var ticketTypeTierRelations = props.ticketTypeTierRelations,
|
|
8054
|
+
reservedSeats = props.reservedSeats,
|
|
8055
|
+
_props$theme = props.theme,
|
|
8056
|
+
theme = _props$theme === void 0 ? 'light' : _props$theme,
|
|
8057
|
+
getTicketsBtnLabel = props.getTicketsBtnLabel,
|
|
8058
|
+
_props$contentStyle = props.contentStyle,
|
|
8059
|
+
contentStyle = _props$contentStyle === void 0 ? {} : _props$contentStyle,
|
|
8060
|
+
_props$isButtonScroll = props.isButtonScrollable,
|
|
8061
|
+
isButtonScrollable = _props$isButtonScroll === void 0 ? false : _props$isButtonScroll,
|
|
8062
|
+
themeOptions = props.themeOptions,
|
|
8063
|
+
handleGetTicketClick = props.handleGetTicketClick,
|
|
8064
|
+
handleCancelReservation = props.handleCancelReservation,
|
|
8065
|
+
_props$ticketDeleteBu = props.ticketDeleteButtonContent,
|
|
8066
|
+
ticketDeleteButtonContent = _props$ticketDeleteBu === void 0 ? 'Delete' : _props$ticketDeleteBu,
|
|
8067
|
+
selectedTickets = props.selectedTickets,
|
|
8068
|
+
handleTicketSelect = props.handleTicketSelect,
|
|
8069
|
+
currencySymbol = props.currencySymbol,
|
|
8070
|
+
_props$tableMapEnable = props.tableMapEnabled,
|
|
8071
|
+
tableMapEnabled = _props$tableMapEnable === void 0 ? false : _props$tableMapEnable,
|
|
8072
|
+
guestCounts = props.guestCounts,
|
|
8073
|
+
setGuestCounts = props.setGuestCounts,
|
|
8074
|
+
isAddingToCart = props.isAddingToCart;
|
|
8075
|
+
var bookButtonIsDisabled = _some(selectedTickets, function (item) {
|
|
8076
|
+
return !item;
|
|
8077
|
+
}) || _isEmpty(reservedSeats) || reservedSeats.length !== _keys(selectedTickets).length;
|
|
8078
|
+
var themeMui = createTheme$1(themeOptions);
|
|
8079
|
+
var ticketsDropdownsData = getTicketDropdownData(reservedSeats, ticketTypeTierRelations);
|
|
8080
|
+
var handleTicketChange = function handleTicketChange(event, seatId) {
|
|
8081
|
+
var value = event.target.value;
|
|
8082
|
+
if (value !== 'default') {
|
|
8083
|
+
handleTicketSelect(value, seatId);
|
|
8084
|
+
}
|
|
8085
|
+
};
|
|
8086
|
+
return React.createElement(ThemeProvider$1, {
|
|
8087
|
+
theme: themeMui
|
|
8088
|
+
}, React.createElement("div", {
|
|
8089
|
+
className: "get-tickets-page " + theme,
|
|
8090
|
+
style: contentStyle
|
|
8091
|
+
}, React.createElement("div", {
|
|
8092
|
+
className: "tickets-section"
|
|
8093
|
+
}, _map(selectedTickets, function (ticketItem, key) {
|
|
8094
|
+
var dropdownData = _find(ticketsDropdownsData, function (item) {
|
|
8095
|
+
return item.seatId === key;
|
|
8096
|
+
}) || {};
|
|
8097
|
+
var selectedTicketData = _find(dropdownData.ticketsData, function (ticket) {
|
|
8098
|
+
return ticket.ticket_type_id === ticketItem;
|
|
8099
|
+
});
|
|
8100
|
+
// guest count dropdown options
|
|
8101
|
+
var startNum = Number(selectedTicketData == null ? void 0 : selectedTicketData.ticket_type_min_number_of_guests);
|
|
8102
|
+
var endNum = Number(selectedTicketData == null ? void 0 : selectedTicketData.ticket_type_max_number_of_guests);
|
|
8103
|
+
var numLength = endNum - startNum + 1;
|
|
8104
|
+
var showGuestCountDropdown = Boolean(startNum && endNum);
|
|
8105
|
+
// prices
|
|
8106
|
+
var guestPrice = (guestCounts[dropdownData.seatId] - startNum) * Number(selectedTicketData == null ? void 0 : selectedTicketData.guest_price);
|
|
8107
|
+
var finalPrice = createFixedFloatNormalizer(2)((selectedTicketData == null ? void 0 : selectedTicketData.ticket_type_price) + guestPrice);
|
|
8108
|
+
return React.createElement("div", {
|
|
8109
|
+
className: "ticket",
|
|
8110
|
+
key: key
|
|
8111
|
+
}, React.createElement("div", {
|
|
8112
|
+
className: "ticketsDropdowns"
|
|
8113
|
+
}, React.createElement(Select$1, {
|
|
8114
|
+
value: ticketItem || 'default',
|
|
8115
|
+
onChange: function onChange(event) {
|
|
8116
|
+
return handleTicketChange(event, dropdownData.seatId);
|
|
8117
|
+
},
|
|
8118
|
+
inputProps: {
|
|
8119
|
+
'aria-label': 'Without label'
|
|
8120
|
+
},
|
|
8121
|
+
MenuProps: {
|
|
8122
|
+
PaperProps: {
|
|
8123
|
+
sx: {
|
|
8124
|
+
maxHeight: 150
|
|
8125
|
+
},
|
|
8126
|
+
className: 'get-tickets-paper'
|
|
8127
|
+
}
|
|
8128
|
+
},
|
|
8129
|
+
displayEmpty: true,
|
|
8130
|
+
sx: {
|
|
8131
|
+
borderRadius: 0
|
|
8132
|
+
}
|
|
8133
|
+
}, React.createElement(MenuItem, {
|
|
8134
|
+
value: 'default'
|
|
8135
|
+
}, "Please select " + (tableMapEnabled ? 'Table Type' : 'Ticket Type')), _map(dropdownData.ticketsData, function (option, index) {
|
|
8136
|
+
if (option.ticket_type_id !== 'default') {
|
|
8137
|
+
return React.createElement(MenuItem, {
|
|
8138
|
+
value: option.ticket_type_id,
|
|
8139
|
+
key: index
|
|
8140
|
+
}, option.ticket_type_name);
|
|
8141
|
+
}
|
|
8142
|
+
return null;
|
|
8143
|
+
})), React.createElement(Button$2, {
|
|
8144
|
+
className: "ticket-delete",
|
|
8145
|
+
onClick: function onClick() {
|
|
8146
|
+
handleCancelReservation(dropdownData.seatId, dropdownData.tierId);
|
|
8147
|
+
}
|
|
8148
|
+
}, ticketDeleteButtonContent)), selectedTicketData && React.createElement("div", {
|
|
8149
|
+
style: {
|
|
8150
|
+
display: 'flex',
|
|
8151
|
+
flexDirection: 'row'
|
|
8152
|
+
}
|
|
8153
|
+
}, React.createElement("div", {
|
|
8154
|
+
style: {
|
|
8155
|
+
width: '100%',
|
|
8156
|
+
display: 'flex',
|
|
8157
|
+
flexDirection: 'column',
|
|
8158
|
+
justifyContent: 'center'
|
|
8159
|
+
}
|
|
8160
|
+
}, React.createElement("div", {
|
|
8161
|
+
className: "ticketPrice"
|
|
8162
|
+
}, "Price:", React.createElement("span", {
|
|
8163
|
+
className: "ticketPrice-value"
|
|
8164
|
+
}, currencySymbol + " " + finalPrice)), !_isEmpty(selectedTicketData.ticket_type_deposit) && React.createElement("div", {
|
|
8165
|
+
className: "ticketDeposit"
|
|
8166
|
+
}, "Deposit:", React.createElement("span", {
|
|
8167
|
+
className: "ticketPrice-value"
|
|
8168
|
+
}, " " + (selectedTicketData == null ? void 0 : selectedTicketData.ticket_type_deposit) + "%"))), showGuestCountDropdown && React.createElement("div", {
|
|
8169
|
+
style: {
|
|
8170
|
+
width: '100%',
|
|
8171
|
+
display: 'flex',
|
|
8172
|
+
justifyContent: 'end',
|
|
8173
|
+
marginRight: 16
|
|
8174
|
+
}
|
|
8175
|
+
}, React.createElement(FormControl$1, {
|
|
8176
|
+
variant: "outlined",
|
|
8177
|
+
sx: {
|
|
8178
|
+
m: 1,
|
|
8179
|
+
minWidth: 80
|
|
8180
|
+
}
|
|
8181
|
+
}, React.createElement(InputLabel$1, {
|
|
8182
|
+
id: "demo-simple-select-standard-label",
|
|
8183
|
+
shrink: true
|
|
8184
|
+
}, "GUESTS"), React.createElement(Select$1, {
|
|
8185
|
+
label: "GUESTS",
|
|
8186
|
+
labelId: "demo-simple-select-standard-label",
|
|
8187
|
+
value: guestCounts[dropdownData.seatId] || startNum,
|
|
8188
|
+
onChange: function onChange(event) {
|
|
8189
|
+
var _extends2;
|
|
8190
|
+
setGuestCounts(_extends({}, guestCounts, (_extends2 = {}, _extends2[dropdownData.seatId] = Number(event.target.value), _extends2)));
|
|
8191
|
+
},
|
|
8192
|
+
inputProps: {
|
|
8193
|
+
'aria-label': 'Without label'
|
|
8194
|
+
},
|
|
8195
|
+
MenuProps: {
|
|
8196
|
+
PaperProps: {
|
|
8197
|
+
sx: {
|
|
8198
|
+
maxHeight: 150
|
|
8199
|
+
},
|
|
8200
|
+
className: 'get-tickets-paper'
|
|
8201
|
+
}
|
|
8202
|
+
},
|
|
8203
|
+
displayEmpty: true,
|
|
8204
|
+
sx: {
|
|
8205
|
+
borderRadius: 0
|
|
8206
|
+
}
|
|
8207
|
+
}, _map(Array.from({
|
|
8208
|
+
length: numLength
|
|
8209
|
+
}, function (_, i) {
|
|
8210
|
+
return startNum + i;
|
|
8211
|
+
}), function (option, index) {
|
|
8212
|
+
return React.createElement(MenuItem, {
|
|
8213
|
+
value: option,
|
|
8214
|
+
key: index
|
|
8215
|
+
}, option);
|
|
8216
|
+
}))))));
|
|
8217
|
+
})), React.createElement("div", null, React.createElement(Button$2, {
|
|
8218
|
+
className: "book-button\n " + (bookButtonIsDisabled ? 'disabled' : '') + "\n " + (isButtonScrollable ? 'is-scrollable' : '') + "\n ",
|
|
8219
|
+
onClick: !bookButtonIsDisabled ? handleGetTicketClick : _identity,
|
|
8220
|
+
disabled: isAddingToCart
|
|
8221
|
+
}, isAddingToCart ? React.createElement(CircularProgress$1, {
|
|
8222
|
+
size: 20,
|
|
8223
|
+
style: {
|
|
8224
|
+
marginLeft: 10
|
|
8225
|
+
}
|
|
8226
|
+
}) : getTicketsBtnLabel || getButtonLabel(reservedSeats.length, tableMapEnabled)))));
|
|
8227
|
+
};
|
|
8228
|
+
|
|
8229
|
+
var SeatMapContainer = function SeatMapContainer(props) {
|
|
8230
|
+
var _props$event = props.event,
|
|
8231
|
+
eventId = _props$event.id,
|
|
8232
|
+
symbol = _props$event.currency.symbol,
|
|
8233
|
+
tableMapEnabled = _props$event.tableMapEnabled,
|
|
8234
|
+
country = _props$event.country,
|
|
8235
|
+
mapContainerId = props.mapContainerId,
|
|
8236
|
+
_props$timerMessage = props.timerMessage,
|
|
8237
|
+
timerMessage = _props$timerMessage === void 0 ? '' : _props$timerMessage,
|
|
8238
|
+
_props$onAddToCartSuc = props.onAddToCartSuccess,
|
|
8239
|
+
onAddToCartSuccess = _props$onAddToCartSuc === void 0 ? identity : _props$onAddToCartSuc,
|
|
8240
|
+
_props$onCountdownFin = props.onCountdownFinish,
|
|
8241
|
+
onCountdownFinish = _props$onCountdownFin === void 0 ? identity : _props$onCountdownFin,
|
|
8242
|
+
ticketDeleteButtonContent = props.ticketDeleteButtonContent;
|
|
8243
|
+
var _useState = useState({
|
|
8244
|
+
seatMap: ''
|
|
8245
|
+
}),
|
|
8246
|
+
seatMapData = _useState[0],
|
|
8247
|
+
setSeatMapData = _useState[1];
|
|
8248
|
+
var eventSeatsRef = useRef([]);
|
|
8249
|
+
var ticketTypeTierRelationsRef = useRef({});
|
|
8250
|
+
var _useState2 = useState({}),
|
|
8251
|
+
selectedTickets = _useState2[0],
|
|
8252
|
+
setSelectedTickets = _useState2[1];
|
|
8253
|
+
var _useState3 = useState(''),
|
|
8254
|
+
seatMapStatuses = _useState3[0],
|
|
8255
|
+
setSeatMapStatuses = _useState3[1];
|
|
8256
|
+
var _useState4 = useState([]),
|
|
8257
|
+
reservedSeats = _useState4[0],
|
|
8258
|
+
setReservedSeats = _useState4[1];
|
|
8259
|
+
var _useState5 = useState(false),
|
|
8260
|
+
isReserving = _useState5[0],
|
|
8261
|
+
setIsReserving = _useState5[1];
|
|
8262
|
+
var _useState6 = useState(false),
|
|
8263
|
+
isAddingToCart = _useState6[0],
|
|
8264
|
+
setIsAddingToCart = _useState6[1];
|
|
8265
|
+
var _useState7 = useState(null),
|
|
8266
|
+
error = _useState7[0],
|
|
8267
|
+
setError = _useState7[1];
|
|
8268
|
+
var _useState8 = useState(Date.now() <= Number(localStorage.getItem("reservationStart-" + eventId))),
|
|
8269
|
+
showTimer = _useState8[0],
|
|
8270
|
+
setShowTimer = _useState8[1];
|
|
8271
|
+
var _useState9 = useState({}),
|
|
8272
|
+
guestCounts = _useState9[0],
|
|
8273
|
+
setGuestCounts = _useState9[1];
|
|
8274
|
+
var updateGuestCounts = function updateGuestCounts(data) {
|
|
8275
|
+
_forEach(data, function (item) {
|
|
8276
|
+
var tierTickets = ticketTypeTierRelationsRef.current[item.tierId];
|
|
8277
|
+
var seatTicketsArray = _values(tierTickets);
|
|
8278
|
+
setGuestCounts(function (prevState) {
|
|
8279
|
+
var _extends2;
|
|
8280
|
+
return _extends({}, prevState, (_extends2 = {}, _extends2[item.seatId] = Number(seatTicketsArray[0].ticket_type_min_number_of_guests), _extends2));
|
|
8281
|
+
});
|
|
8282
|
+
});
|
|
8283
|
+
};
|
|
8284
|
+
var fetchSeatMapData = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
8285
|
+
var seatMapDataResponse, _seatMapDataResponse$, seatData, ticketTypeTierRelations, eventSeats, seatReservationTime, seatMapType, tierPrices, predefinedSeats;
|
|
8286
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
8287
|
+
while (1) switch (_context.prev = _context.next) {
|
|
8288
|
+
case 0:
|
|
8289
|
+
_context.prev = 0;
|
|
8290
|
+
_context.next = 3;
|
|
8291
|
+
return getSeatMapData(eventId);
|
|
8292
|
+
case 3:
|
|
8293
|
+
seatMapDataResponse = _context.sent;
|
|
8294
|
+
_seatMapDataResponse$ = seatMapDataResponse.data.attributes, seatData = _seatMapDataResponse$.seatData, ticketTypeTierRelations = _seatMapDataResponse$.ticketTypeTierRelations, eventSeats = _seatMapDataResponse$.eventSeats, seatReservationTime = _seatMapDataResponse$.seatReservationTime, seatMapType = _seatMapDataResponse$.seatMapType, tierPrices = _seatMapDataResponse$.tierPrices, predefinedSeats = _seatMapDataResponse$.predefinedSeats;
|
|
8295
|
+
eventSeatsRef.current = eventSeats;
|
|
8296
|
+
ticketTypeTierRelationsRef.current = ticketTypeTierRelations;
|
|
8297
|
+
setSeatMapData({
|
|
8298
|
+
seatMap: JSON.parse(seatData),
|
|
8299
|
+
seatReservationTime: seatReservationTime,
|
|
8300
|
+
seatMapType: seatMapType,
|
|
8301
|
+
tierPrices: tierPrices,
|
|
8302
|
+
predefinedSeats: predefinedSeats
|
|
8303
|
+
});
|
|
8304
|
+
_context.next = 13;
|
|
8305
|
+
break;
|
|
8306
|
+
case 10:
|
|
8307
|
+
_context.prev = 10;
|
|
8308
|
+
_context.t0 = _context["catch"](0);
|
|
8309
|
+
setError('Something went wrong');
|
|
8310
|
+
case 13:
|
|
8311
|
+
case "end":
|
|
8312
|
+
return _context.stop();
|
|
8313
|
+
}
|
|
8314
|
+
}, _callee, null, [[0, 10]]);
|
|
8315
|
+
})), [eventId]);
|
|
8316
|
+
var fetchSeatMapReservations = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
8317
|
+
var statusesResponse, statuses, reservationData, ownReservations;
|
|
8318
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
8319
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
8320
|
+
case 0:
|
|
8321
|
+
_context2.prev = 0;
|
|
8322
|
+
_context2.next = 3;
|
|
8323
|
+
return getSeatMapStatuses(eventId);
|
|
8324
|
+
case 3:
|
|
8325
|
+
statusesResponse = _context2.sent;
|
|
8326
|
+
statuses = _get(statusesResponse, 'data.attributes') || {};
|
|
8327
|
+
reservationData = [];
|
|
8328
|
+
ownReservations = getOwnReservationsBasedOnStatuses(statuses);
|
|
8329
|
+
_forEach(ownReservations, function (reservation) {
|
|
8330
|
+
var tierIdOfReservation = getTierIdBasedOnSeatId(reservation, eventSeatsRef.current);
|
|
8331
|
+
reservationData.push({
|
|
8332
|
+
seatId: reservation,
|
|
8333
|
+
tierId: tierIdOfReservation,
|
|
8334
|
+
type: 'reserve'
|
|
8335
|
+
});
|
|
8336
|
+
});
|
|
8337
|
+
localStorage.setItem('reservationData', JSON.stringify(reservationData));
|
|
8338
|
+
setSeatMapStatuses(statusesResponse.data.attributes);
|
|
8339
|
+
setReservedSeats(reservationData);
|
|
8340
|
+
// automatically set ticket/table type if it's the only one
|
|
8341
|
+
if (ticketTypeTierRelationsRef.current) {
|
|
8342
|
+
_forEach(reservationData, function (item) {
|
|
8343
|
+
var tierTickets = ticketTypeTierRelationsRef.current[item.tierId];
|
|
8344
|
+
var seatTicketsArray = _values(tierTickets);
|
|
8345
|
+
setSelectedTickets(function (prevState) {
|
|
8346
|
+
var _extends3;
|
|
8347
|
+
return _extends({}, prevState, (_extends3 = {}, _extends3[item.seatId] = seatTicketsArray.length === 1 ? seatTicketsArray[0].ticket_type_id : '', _extends3));
|
|
8348
|
+
});
|
|
8349
|
+
});
|
|
8350
|
+
if (_isEmpty(reservationData)) {
|
|
8351
|
+
setGuestCounts({});
|
|
8352
|
+
setSelectedTickets({});
|
|
8353
|
+
}
|
|
8354
|
+
}
|
|
8355
|
+
_context2.next = 17;
|
|
8356
|
+
break;
|
|
8357
|
+
case 14:
|
|
8358
|
+
_context2.prev = 14;
|
|
8359
|
+
_context2.t0 = _context2["catch"](0);
|
|
8360
|
+
setError('Something went wrong');
|
|
8361
|
+
case 17:
|
|
8362
|
+
case "end":
|
|
8363
|
+
return _context2.stop();
|
|
8364
|
+
}
|
|
8365
|
+
}, _callee2, null, [[0, 14]]);
|
|
8366
|
+
})), [eventId]);
|
|
8367
|
+
var startTimer = useCallback(function (duration) {
|
|
8368
|
+
setShowTimer(true);
|
|
8369
|
+
if (!localStorage.getItem("reservationStart-" + eventId)) {
|
|
8370
|
+
localStorage.setItem("reservationStart-" + eventId, String(Date.now() + duration));
|
|
8371
|
+
}
|
|
8372
|
+
}, []);
|
|
8373
|
+
var endTimer = useCallback(function () {
|
|
8374
|
+
localStorage.removeItem("reservationStart-" + eventId);
|
|
8375
|
+
setShowTimer(false);
|
|
8376
|
+
}, []);
|
|
8377
|
+
var handleSeatReservation = /*#__PURE__*/function () {
|
|
8378
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(eventId, tierId, seatId) {
|
|
8379
|
+
var reservationData, relations, _keys2, firstItem;
|
|
8380
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
8381
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
8382
|
+
case 0:
|
|
8383
|
+
setIsReserving(true);
|
|
8384
|
+
_context3.prev = 1;
|
|
8385
|
+
_context3.next = 4;
|
|
8386
|
+
return reserveSeat(eventId, tierId, seatId);
|
|
8387
|
+
case 4:
|
|
8388
|
+
_context3.next = 6;
|
|
8389
|
+
return fetchSeatMapReservations();
|
|
8390
|
+
case 6:
|
|
8391
|
+
startTimer(seatMapData.seatReservationTime * 60000);
|
|
8392
|
+
reservationData = JSON.parse(localStorage.getItem('reservationData') || '');
|
|
8393
|
+
setReservedSeats(reservationData);
|
|
8394
|
+
updateGuestCounts(reservationData);
|
|
8395
|
+
// automatically set ticket/table type if it's the only one
|
|
8396
|
+
relations = _keys(ticketTypeTierRelationsRef.current[tierId]);
|
|
8397
|
+
_keys2 = _keys(ticketTypeTierRelationsRef.current[tierId]), firstItem = _keys2[0];
|
|
8398
|
+
handleTicketSelect(relations.length === 1 ? firstItem : '', seatId);
|
|
8399
|
+
_context3.next = 18;
|
|
8400
|
+
break;
|
|
8401
|
+
case 15:
|
|
8402
|
+
_context3.prev = 15;
|
|
8403
|
+
_context3.t0 = _context3["catch"](1);
|
|
8404
|
+
setError('Something went wrong');
|
|
8405
|
+
case 18:
|
|
8406
|
+
_context3.prev = 18;
|
|
8407
|
+
setIsReserving(false);
|
|
8408
|
+
return _context3.finish(18);
|
|
8409
|
+
case 21:
|
|
8410
|
+
case "end":
|
|
8411
|
+
return _context3.stop();
|
|
8412
|
+
}
|
|
8413
|
+
}, _callee3, null, [[1, 15, 18, 21]]);
|
|
8414
|
+
}));
|
|
8415
|
+
return function handleSeatReservation(_x, _x2, _x3) {
|
|
8416
|
+
return _ref3.apply(this, arguments);
|
|
8417
|
+
};
|
|
8418
|
+
}();
|
|
8419
|
+
var handleCancelSeatReservtion = /*#__PURE__*/function () {
|
|
8420
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(eventId, tierId, seatId) {
|
|
8421
|
+
var reservationData, currentSelectedTickets;
|
|
8422
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
8423
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
8424
|
+
case 0:
|
|
8425
|
+
setIsReserving(true);
|
|
8426
|
+
_context4.prev = 1;
|
|
8427
|
+
_context4.next = 4;
|
|
8428
|
+
return removeSeatReserve(eventId, tierId, [seatId]);
|
|
8429
|
+
case 4:
|
|
8430
|
+
_context4.next = 6;
|
|
8431
|
+
return fetchSeatMapReservations();
|
|
8432
|
+
case 6:
|
|
8433
|
+
if (_isEmpty(JSON.parse(localStorage.getItem('reservationData')))) {
|
|
8434
|
+
endTimer();
|
|
8435
|
+
}
|
|
8436
|
+
reservationData = JSON.parse(localStorage.getItem('reservationData') || '');
|
|
8437
|
+
currentSelectedTickets = _extends({}, selectedTickets);
|
|
8438
|
+
delete currentSelectedTickets[seatId];
|
|
8439
|
+
setReservedSeats(reservationData);
|
|
8440
|
+
setSelectedTickets(currentSelectedTickets);
|
|
8441
|
+
_context4.next = 17;
|
|
8442
|
+
break;
|
|
8443
|
+
case 14:
|
|
8444
|
+
_context4.prev = 14;
|
|
8445
|
+
_context4.t0 = _context4["catch"](1);
|
|
8446
|
+
setError('Something went wrong');
|
|
8447
|
+
case 17:
|
|
8448
|
+
_context4.prev = 17;
|
|
8449
|
+
setIsReserving(false);
|
|
8450
|
+
return _context4.finish(17);
|
|
8451
|
+
case 20:
|
|
8452
|
+
case "end":
|
|
8453
|
+
return _context4.stop();
|
|
8454
|
+
}
|
|
8455
|
+
}, _callee4, null, [[1, 14, 17, 20]]);
|
|
8456
|
+
}));
|
|
8457
|
+
return function handleCancelSeatReservtion(_x4, _x5, _x6) {
|
|
8458
|
+
return _ref4.apply(this, arguments);
|
|
8459
|
+
};
|
|
8460
|
+
}();
|
|
8461
|
+
var onSeatClick = /*#__PURE__*/function () {
|
|
8462
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(seatInfo) {
|
|
8463
|
+
var _seatInfo$seat, tierId, seatId, status, reservationData;
|
|
8464
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
8465
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
8466
|
+
case 0:
|
|
8467
|
+
_seatInfo$seat = seatInfo.seat, tierId = _seatInfo$seat.tierId, seatId = _seatInfo$seat.seatId, status = _seatInfo$seat.status;
|
|
8468
|
+
reservationData = JSON.parse(localStorage.getItem('reservationData') || '[]');
|
|
8469
|
+
if (!(status === 'B' || status === 'R' || status === 'BLOCKED' || status === 'RE')) {
|
|
8470
|
+
_context5.next = 4;
|
|
8471
|
+
break;
|
|
8472
|
+
}
|
|
8473
|
+
return _context5.abrupt("return");
|
|
8474
|
+
case 4:
|
|
8475
|
+
if (_find(reservationData, function (data) {
|
|
8476
|
+
return data.seatId === seatId;
|
|
8477
|
+
})) {
|
|
8478
|
+
handleCancelSeatReservtion(eventId, tierId, seatId);
|
|
8479
|
+
} else if (reservationData.length >= 10) {
|
|
8480
|
+
setError('Limit exceeded');
|
|
8481
|
+
} else {
|
|
8482
|
+
handleSeatReservation(eventId, tierId, seatId);
|
|
8483
|
+
}
|
|
8484
|
+
case 5:
|
|
8485
|
+
case "end":
|
|
8486
|
+
return _context5.stop();
|
|
8487
|
+
}
|
|
8488
|
+
}, _callee5);
|
|
8489
|
+
}));
|
|
8490
|
+
return function onSeatClick(_x7) {
|
|
8491
|
+
return _ref5.apply(this, arguments);
|
|
8492
|
+
};
|
|
8493
|
+
}();
|
|
8494
|
+
var handleTicketSelect = function handleTicketSelect(ticketId, seatId) {
|
|
8495
|
+
var currentSelectedTickets = _extends({}, selectedTickets);
|
|
8496
|
+
currentSelectedTickets[seatId] = ticketId;
|
|
8497
|
+
setSelectedTickets(currentSelectedTickets);
|
|
8498
|
+
};
|
|
8499
|
+
var handleGetTicketBtnClick = /*#__PURE__*/function () {
|
|
8500
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
8501
|
+
var ticketsDropdownsData, selectedSeats, addToCartData, _addToCartData$attrib, response, message;
|
|
8502
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
8503
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
8504
|
+
case 0:
|
|
8505
|
+
setIsAddingToCart(true);
|
|
8506
|
+
ticketsDropdownsData = getTicketDropdownData(reservedSeats, ticketTypeTierRelationsRef.current);
|
|
8507
|
+
selectedSeats = {};
|
|
8508
|
+
_forEach(ticketsDropdownsData, function (ticketData) {
|
|
8509
|
+
var _extends4;
|
|
8510
|
+
selectedSeats = _extends({}, selectedSeats, (_extends4 = {}, _extends4[ticketData.seatId] = ticketData.ticketsData, _extends4));
|
|
8511
|
+
});
|
|
8512
|
+
addToCartData = getAddToCartRequestData({
|
|
8513
|
+
eventId: eventId,
|
|
8514
|
+
reservations: _map(reservedSeats, function (seat) {
|
|
8515
|
+
return seat.seatId;
|
|
8516
|
+
}),
|
|
8517
|
+
selectedSeats: selectedSeats,
|
|
8518
|
+
selectedTickets: selectedTickets,
|
|
8519
|
+
guestCounts: guestCounts
|
|
8520
|
+
});
|
|
8521
|
+
_context6.prev = 5;
|
|
8522
|
+
_context6.next = 8;
|
|
8523
|
+
return addToCartFunc({
|
|
8524
|
+
eventId: eventId,
|
|
8525
|
+
data: addToCartData,
|
|
8526
|
+
ticketQuantity: addToCartData == null ? void 0 : (_addToCartData$attrib = addToCartData.attributes) == null ? void 0 : _addToCartData$attrib.product_cart_quantity
|
|
8527
|
+
});
|
|
8528
|
+
case 8:
|
|
8529
|
+
response = _context6.sent;
|
|
8530
|
+
localStorage.removeItem('reservationData');
|
|
8531
|
+
onAddToCartSuccess(response);
|
|
8532
|
+
_context6.next = 16;
|
|
8533
|
+
break;
|
|
8534
|
+
case 13:
|
|
8535
|
+
_context6.prev = 13;
|
|
8536
|
+
_context6.t0 = _context6["catch"](5);
|
|
8537
|
+
if (axios.isAxiosError(_context6.t0)) {
|
|
8538
|
+
message = _get(_context6.t0, 'response.data.message', '');
|
|
8539
|
+
setError(message);
|
|
8540
|
+
}
|
|
8541
|
+
case 16:
|
|
8542
|
+
_context6.prev = 16;
|
|
8543
|
+
setIsAddingToCart(false);
|
|
8544
|
+
return _context6.finish(16);
|
|
8545
|
+
case 19:
|
|
8546
|
+
case "end":
|
|
8547
|
+
return _context6.stop();
|
|
8548
|
+
}
|
|
8549
|
+
}, _callee6, null, [[5, 13, 16, 19]]);
|
|
8550
|
+
}));
|
|
8551
|
+
return function handleGetTicketBtnClick() {
|
|
8552
|
+
return _ref6.apply(this, arguments);
|
|
8553
|
+
};
|
|
8554
|
+
}();
|
|
8555
|
+
useEffect(function () {
|
|
8556
|
+
if (Date.now() > Number(localStorage.getItem("reservationStart-" + eventId))) {
|
|
8557
|
+
setSelectedTickets({});
|
|
8558
|
+
setReservedSeats([]);
|
|
8559
|
+
}
|
|
8560
|
+
var makeRequests = /*#__PURE__*/function () {
|
|
8561
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
8562
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
8563
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
8564
|
+
case 0:
|
|
8565
|
+
_context7.prev = 0;
|
|
8566
|
+
_context7.next = 3;
|
|
8567
|
+
return fetchSeatMapData();
|
|
8568
|
+
case 3:
|
|
8569
|
+
fetchSeatMapReservations();
|
|
8570
|
+
_context7.next = 9;
|
|
8571
|
+
break;
|
|
8572
|
+
case 6:
|
|
8573
|
+
_context7.prev = 6;
|
|
8574
|
+
_context7.t0 = _context7["catch"](0);
|
|
8575
|
+
setError('Something went wrong');
|
|
8576
|
+
case 9:
|
|
8577
|
+
case "end":
|
|
8578
|
+
return _context7.stop();
|
|
8579
|
+
}
|
|
8580
|
+
}, _callee7, null, [[0, 6]]);
|
|
8581
|
+
}));
|
|
8582
|
+
return function makeRequests() {
|
|
8583
|
+
return _ref7.apply(this, arguments);
|
|
8584
|
+
};
|
|
8585
|
+
}();
|
|
8586
|
+
makeRequests();
|
|
8587
|
+
if (country) {
|
|
8588
|
+
localStorage.setItem('eventCountry', country);
|
|
8589
|
+
}
|
|
8590
|
+
var intervalId = setInterval(function () {
|
|
8591
|
+
fetchSeatMapReservations();
|
|
8592
|
+
}, 3000);
|
|
8593
|
+
return function () {
|
|
8594
|
+
clearInterval(intervalId);
|
|
8595
|
+
};
|
|
8596
|
+
}, [fetchSeatMapData, fetchSeatMapReservations]);
|
|
8597
|
+
return React.createElement(React.Fragment, null, error && React.createElement(Alert, {
|
|
8598
|
+
severity: "error",
|
|
8599
|
+
onClose: function onClose() {
|
|
8600
|
+
setError(null);
|
|
8601
|
+
},
|
|
8602
|
+
variant: "filled",
|
|
8603
|
+
style: {
|
|
8604
|
+
width: '350px'
|
|
8605
|
+
}
|
|
8606
|
+
}, error), showTimer && React.createElement(Countdown$1, {
|
|
8607
|
+
date: moment$1(Number(localStorage.getItem("reservationStart-" + eventId))).valueOf(),
|
|
8608
|
+
renderer: function renderer(props) {
|
|
8609
|
+
return React.createElement("div", {
|
|
8610
|
+
className: "reservation-countdown"
|
|
8611
|
+
}, React.createElement("span", {
|
|
8612
|
+
className: "reservation-message"
|
|
8613
|
+
}, timerMessage), React.createElement("span", {
|
|
8614
|
+
className: "reservation-timer"
|
|
8615
|
+
}, showZero(props.minutes), ":", showZero(props.seconds)));
|
|
8616
|
+
},
|
|
8617
|
+
onComplete: function onComplete() {
|
|
8618
|
+
endTimer();
|
|
8619
|
+
setSelectedTickets({});
|
|
8620
|
+
setReservedSeats([]);
|
|
8621
|
+
if (onCountdownFinish) {
|
|
8622
|
+
onCountdownFinish();
|
|
8623
|
+
}
|
|
8624
|
+
}
|
|
8625
|
+
}), React.createElement(TicketsSection$1, {
|
|
8626
|
+
selectedTickets: selectedTickets,
|
|
8627
|
+
handleTicketSelect: handleTicketSelect,
|
|
8628
|
+
handleCancelReservation: function handleCancelReservation(seatId, tireId) {
|
|
8629
|
+
return handleCancelSeatReservtion(eventId, tireId, seatId);
|
|
8630
|
+
},
|
|
8631
|
+
handleGetTicketClick: handleGetTicketBtnClick,
|
|
8632
|
+
isAddingToCart: isAddingToCart,
|
|
8633
|
+
reservedSeats: reservedSeats,
|
|
8634
|
+
ticketDeleteButtonContent: ticketDeleteButtonContent,
|
|
8635
|
+
ticketTypeTierRelations: ticketTypeTierRelationsRef.current,
|
|
8636
|
+
currencySymbol: symbol,
|
|
8637
|
+
tableMapEnabled: Boolean(tableMapEnabled),
|
|
8638
|
+
guestCounts: guestCounts,
|
|
8639
|
+
setGuestCounts: setGuestCounts
|
|
8640
|
+
}), seatMapData.seatMap && seatMapStatuses && React.createElement(SeatMapComponent, {
|
|
8641
|
+
seatMapProps: {
|
|
8642
|
+
seatData: seatMapData.seatMap,
|
|
8643
|
+
statuses: seatMapStatuses,
|
|
8644
|
+
tierPrices: seatMapData.tierPrices,
|
|
8645
|
+
seatMapType: seatMapData.seatMapType,
|
|
8646
|
+
ticketTypeTierRelations: ticketTypeTierRelationsRef.current,
|
|
8647
|
+
seatMapEvents: {
|
|
8648
|
+
onSeatClick: onSeatClick
|
|
8649
|
+
},
|
|
8650
|
+
isReserving: isReserving,
|
|
8651
|
+
predefinedSeats: seatMapData.predefinedSeats
|
|
8652
|
+
},
|
|
8653
|
+
mapContainerId: mapContainerId
|
|
8654
|
+
}));
|
|
8655
|
+
};
|
|
8656
|
+
|
|
7419
8657
|
/* eslint-disable max-len */
|
|
7420
8658
|
var VERIFICATION_STATUSES = {
|
|
7421
8659
|
PENDING: 'PENDING',
|
|
7422
8660
|
APPROVED: 'APPROVED_VERIFIED',
|
|
7423
|
-
FAILED: 'FAILED'
|
|
8661
|
+
FAILED: 'FAILED',
|
|
8662
|
+
WRONG_CUSTOMER: 'WRONG_CUSTOMER'
|
|
7424
8663
|
};
|
|
7425
8664
|
var VERIFICATION_MESSAGES = {
|
|
7426
8665
|
PENDING: 'Your ID verification is currently being processed. We will notify you as soon as it is completed. Thank you for your patience.',
|
|
7427
8666
|
APPROVED: 'Your ID verification is approved!',
|
|
7428
|
-
FAILED: 'Unfortunately your ID verification has failed. Please try again.'
|
|
8667
|
+
FAILED: 'Unfortunately your ID verification has failed. Please try again.',
|
|
8668
|
+
WRONG_CUSTOMER: 'The order does not belong to the customer.'
|
|
7429
8669
|
};
|
|
7430
8670
|
|
|
7431
8671
|
var IDVerification = function IDVerification(props) {
|
|
@@ -7462,7 +8702,7 @@ var IDVerification = function IDVerification(props) {
|
|
|
7462
8702
|
}),
|
|
7463
8703
|
modalData = _useState5[0],
|
|
7464
8704
|
setModalData = _useState5[1];
|
|
7465
|
-
var isAccountVerifiedOrPending = verificationStatus === VERIFICATION_STATUSES.APPROVED || verificationStatus === VERIFICATION_STATUSES.PENDING;
|
|
8705
|
+
var isAccountVerifiedOrPending = (verificationStatus === VERIFICATION_STATUSES.APPROVED || verificationStatus === VERIFICATION_STATUSES.PENDING) && verificationStatus !== VERIFICATION_STATUSES.WRONG_CUSTOMER;
|
|
7466
8706
|
var handleClose = function handleClose() {
|
|
7467
8707
|
setModalData({
|
|
7468
8708
|
message: '',
|
|
@@ -7522,6 +8762,8 @@ var IDVerification = function IDVerification(props) {
|
|
|
7522
8762
|
};
|
|
7523
8763
|
}, []);
|
|
7524
8764
|
useEffect(function () {
|
|
8765
|
+
var intervalId = null;
|
|
8766
|
+
var orderHash = getQueryVariable('order_hash') || '';
|
|
7525
8767
|
var getUrl = /*#__PURE__*/function () {
|
|
7526
8768
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
7527
8769
|
var urlResponse;
|
|
@@ -7592,17 +8834,81 @@ var IDVerification = function IDVerification(props) {
|
|
|
7592
8834
|
return _ref3.apply(this, arguments);
|
|
7593
8835
|
};
|
|
7594
8836
|
}();
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
|
|
7598
|
-
|
|
7599
|
-
|
|
7600
|
-
|
|
8837
|
+
var getCustomerOrderStatus = /*#__PURE__*/function () {
|
|
8838
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
8839
|
+
var customerOrderResponse;
|
|
8840
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
8841
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
8842
|
+
case 0:
|
|
8843
|
+
_context4.prev = 0;
|
|
8844
|
+
_context4.next = 3;
|
|
8845
|
+
return checkCustomerOrder(orderHash);
|
|
8846
|
+
case 3:
|
|
8847
|
+
customerOrderResponse = _context4.sent;
|
|
8848
|
+
return _context4.abrupt("return", customerOrderResponse);
|
|
8849
|
+
case 7:
|
|
8850
|
+
_context4.prev = 7;
|
|
8851
|
+
_context4.t0 = _context4["catch"](0);
|
|
8852
|
+
throw _context4.t0;
|
|
8853
|
+
case 10:
|
|
8854
|
+
case "end":
|
|
8855
|
+
return _context4.stop();
|
|
8856
|
+
}
|
|
8857
|
+
}, _callee4, null, [[0, 7]]);
|
|
8858
|
+
}));
|
|
8859
|
+
return function getCustomerOrderStatus() {
|
|
8860
|
+
return _ref4.apply(this, arguments);
|
|
8861
|
+
};
|
|
8862
|
+
}();
|
|
8863
|
+
var makeRequests = /*#__PURE__*/function () {
|
|
8864
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
8865
|
+
var _error$response, _error$response$data;
|
|
8866
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
8867
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
8868
|
+
case 0:
|
|
8869
|
+
_context5.prev = 0;
|
|
8870
|
+
if (!orderHash) {
|
|
8871
|
+
_context5.next = 4;
|
|
8872
|
+
break;
|
|
8873
|
+
}
|
|
8874
|
+
_context5.next = 4;
|
|
8875
|
+
return getCustomerOrderStatus();
|
|
8876
|
+
case 4:
|
|
8877
|
+
getUrl();
|
|
8878
|
+
getVerificationStatus();
|
|
8879
|
+
// Check the verification status every 30 seconds
|
|
8880
|
+
intervalId = setInterval(function () {
|
|
8881
|
+
getVerificationStatus();
|
|
8882
|
+
}, 10000);
|
|
8883
|
+
_context5.next = 12;
|
|
8884
|
+
break;
|
|
8885
|
+
case 9:
|
|
8886
|
+
_context5.prev = 9;
|
|
8887
|
+
_context5.t0 = _context5["catch"](0);
|
|
8888
|
+
if (((_error$response = _context5.t0.response) == null ? void 0 : (_error$response$data = _error$response.data) == null ? void 0 : _error$response$data.message) === VERIFICATION_MESSAGES.WRONG_CUSTOMER) {
|
|
8889
|
+
setVerificationStatus(VERIFICATION_STATUSES.WRONG_CUSTOMER);
|
|
8890
|
+
setModalData({
|
|
8891
|
+
displaModal: true,
|
|
8892
|
+
hideCancelBtn: true,
|
|
8893
|
+
message: VERIFICATION_MESSAGES.WRONG_CUSTOMER
|
|
8894
|
+
});
|
|
8895
|
+
}
|
|
8896
|
+
case 12:
|
|
8897
|
+
case "end":
|
|
8898
|
+
return _context5.stop();
|
|
8899
|
+
}
|
|
8900
|
+
}, _callee5, null, [[0, 9]]);
|
|
8901
|
+
}));
|
|
8902
|
+
return function makeRequests() {
|
|
8903
|
+
return _ref5.apply(this, arguments);
|
|
8904
|
+
};
|
|
8905
|
+
}();
|
|
8906
|
+
makeRequests();
|
|
7601
8907
|
// Clear the interval when the component unmounts
|
|
7602
8908
|
return function () {
|
|
7603
8909
|
return clearInterval(intervalId);
|
|
7604
8910
|
};
|
|
7605
|
-
}, [
|
|
8911
|
+
}, []);
|
|
7606
8912
|
var iframe = function iframe(netverifyUrl) {
|
|
7607
8913
|
// eslint-disable-next-line max-len
|
|
7608
8914
|
var iframe = "<iframe allowFullScreen id=\"verificationIframe\" frameBorder=\"0\" width=\"100%\" height=\"570px\" allow=\"camera;fullscreen;accelerometer;gyroscope;magnetometer\" src=\"" + netverifyUrl + "\"></iframe>";
|
|
@@ -7824,5 +9130,5 @@ var RsvpContainer = function RsvpContainer(_ref) {
|
|
|
7824
9130
|
}, "RSVP"))))))));
|
|
7825
9131
|
};
|
|
7826
9132
|
|
|
7827
|
-
export { AddonsContainter, BillingInfoContainer, ConfirmationContainer, ForgotPasswordModal, IDVerification, LoginModal, MyTicketsContainer, OrderDetailsContainer, PaymentContainer, PoweredBy, RedirectModal, ResetPasswordContainer, RsvpContainer, TicketResaleContainer, TicketsContainer, VERIFICATION_STATUSES, createFixedFloatNormalizer, currencyNormalizerCreator, setConfigs };
|
|
9133
|
+
export { AddonsContainter, BillingInfoContainer, ConfirmationContainer, ForgotPasswordModal, IDVerification, LoginModal, MyTicketsContainer, OrderDetailsContainer, PaymentContainer, PoweredBy, RedirectModal, ResetPasswordContainer, RsvpContainer, SeatMapContainer, TicketResaleContainer, TicketsContainer, VERIFICATION_STATUSES, createFixedFloatNormalizer, currencyNormalizerCreator, setConfigs };
|
|
7828
9134
|
//# sourceMappingURL=tf-checkout-react.esm.js.map
|