PluginProbe
Timetics – Appointment Booking Calendar & Scheduling / 1.0.2
Timetics – Appointment Booking Calendar & Scheduling v1.0.2
1.0.64 1.0.62 1.0.63 1.0.61 1.0.60 1.0.59 1.0.58 1.0.57 1.0.56 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 All 65 releases
timetics / assets / js / frontend.js

frontend.js in Timetics – Appointment Booking Calendar & Scheduling 1.0.2, at assets/js/frontend.js

9,256 lines 521.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /******/ (() => { // webpackBootstrap
2 /******/ var __webpack_modules__ = ({
3
4 /***/ 664:
5 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
6
7 (function (global, factory) {
8 true ? factory(exports, __webpack_require__(363)) :
9 0;
10 }(this, (function (exports, React) { 'use strict';
11
12 React = React && Object.prototype.hasOwnProperty.call(React, 'default') ? React['default'] : React;
13
14 function createCommonjsModule(fn, module) {
15 return module = { exports: {} }, fn(module, module.exports), module.exports;
16 }
17
18 /**
19 * Copyright (c) 2013-present, Facebook, Inc.
20 *
21 * This source code is licensed under the MIT license found in the
22 * LICENSE file in the root directory of this source tree.
23 */
24
25 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
26 var ReactPropTypesSecret_1 = ReactPropTypesSecret;
27
28 function emptyFunction() {}
29
30 function emptyFunctionWithReset() {}
31
32 emptyFunctionWithReset.resetWarningCache = emptyFunction;
33
34 var factoryWithThrowingShims = function () {
35 function shim(props, propName, componentName, location, propFullName, secret) {
36 if (secret === ReactPropTypesSecret_1) {
37 // It is still safe when called from React.
38 return;
39 }
40
41 var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
42 err.name = 'Invariant Violation';
43 throw err;
44 }
45 shim.isRequired = shim;
46
47 function getShim() {
48 return shim;
49 }
50 // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
51
52 var ReactPropTypes = {
53 array: shim,
54 bool: shim,
55 func: shim,
56 number: shim,
57 object: shim,
58 string: shim,
59 symbol: shim,
60 any: shim,
61 arrayOf: getShim,
62 element: shim,
63 elementType: shim,
64 instanceOf: getShim,
65 node: shim,
66 objectOf: getShim,
67 oneOf: getShim,
68 oneOfType: getShim,
69 shape: getShim,
70 exact: getShim,
71 checkPropTypes: emptyFunctionWithReset,
72 resetWarningCache: emptyFunction
73 };
74 ReactPropTypes.PropTypes = ReactPropTypes;
75 return ReactPropTypes;
76 };
77
78 var propTypes = createCommonjsModule(function (module) {
79 /**
80 * Copyright (c) 2013-present, Facebook, Inc.
81 *
82 * This source code is licensed under the MIT license found in the
83 * LICENSE file in the root directory of this source tree.
84 */
85 {
86 // By explicitly using `prop-types` you are opting into new production behavior.
87 // http://fb.me/prop-types-in-prod
88 module.exports = factoryWithThrowingShims();
89 }
90 });
91
92 function ownKeys(object, enumerableOnly) {
93 var keys = Object.keys(object);
94
95 if (Object.getOwnPropertySymbols) {
96 var symbols = Object.getOwnPropertySymbols(object);
97
98 if (enumerableOnly) {
99 symbols = symbols.filter(function (sym) {
100 return Object.getOwnPropertyDescriptor(object, sym).enumerable;
101 });
102 }
103
104 keys.push.apply(keys, symbols);
105 }
106
107 return keys;
108 }
109
110 function _objectSpread2(target) {
111 for (var i = 1; i < arguments.length; i++) {
112 var source = arguments[i] != null ? arguments[i] : {};
113
114 if (i % 2) {
115 ownKeys(Object(source), true).forEach(function (key) {
116 _defineProperty(target, key, source[key]);
117 });
118 } else if (Object.getOwnPropertyDescriptors) {
119 Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
120 } else {
121 ownKeys(Object(source)).forEach(function (key) {
122 Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
123 });
124 }
125 }
126
127 return target;
128 }
129
130 function _typeof(obj) {
131 "@babel/helpers - typeof";
132
133 if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
134 _typeof = function (obj) {
135 return typeof obj;
136 };
137 } else {
138 _typeof = function (obj) {
139 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
140 };
141 }
142
143 return _typeof(obj);
144 }
145
146 function _defineProperty(obj, key, value) {
147 if (key in obj) {
148 Object.defineProperty(obj, key, {
149 value: value,
150 enumerable: true,
151 configurable: true,
152 writable: true
153 });
154 } else {
155 obj[key] = value;
156 }
157
158 return obj;
159 }
160
161 function _slicedToArray(arr, i) {
162 return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
163 }
164
165 function _arrayWithHoles(arr) {
166 if (Array.isArray(arr)) return arr;
167 }
168
169 function _iterableToArrayLimit(arr, i) {
170 var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]);
171
172 if (_i == null) return;
173 var _arr = [];
174 var _n = true;
175 var _d = false;
176
177 var _s, _e;
178
179 try {
180 for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
181 _arr.push(_s.value);
182
183 if (i && _arr.length === i) break;
184 }
185 } catch (err) {
186 _d = true;
187 _e = err;
188 } finally {
189 try {
190 if (!_n && _i["return"] != null) _i["return"]();
191 } finally {
192 if (_d) throw _e;
193 }
194 }
195
196 return _arr;
197 }
198
199 function _unsupportedIterableToArray(o, minLen) {
200 if (!o) return;
201 if (typeof o === "string") return _arrayLikeToArray(o, minLen);
202 var n = Object.prototype.toString.call(o).slice(8, -1);
203 if (n === "Object" && o.constructor) n = o.constructor.name;
204 if (n === "Map" || n === "Set") return Array.from(o);
205 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
206 }
207
208 function _arrayLikeToArray(arr, len) {
209 if (len == null || len > arr.length) len = arr.length;
210
211 for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
212
213 return arr2;
214 }
215
216 function _nonIterableRest() {
217 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
218 }
219
220 var usePrevious = function usePrevious(value) {
221 var ref = React.useRef(value);
222 React.useEffect(function () {
223 ref.current = value;
224 }, [value]);
225 return ref.current;
226 };
227
228 var isUnknownObject = function isUnknownObject(raw) {
229 return raw !== null && _typeof(raw) === 'object';
230 };
231 var isPromise = function isPromise(raw) {
232 return isUnknownObject(raw) && typeof raw.then === 'function';
233 }; // We are using types to enforce the `stripe` prop in this lib,
234 // but in an untyped integration `stripe` could be anything, so we need
235 // to do some sanity validation to prevent type errors.
236
237 var isStripe = function isStripe(raw) {
238 return isUnknownObject(raw) && typeof raw.elements === 'function' && typeof raw.createToken === 'function' && typeof raw.createPaymentMethod === 'function' && typeof raw.confirmCardPayment === 'function';
239 };
240
241 var PLAIN_OBJECT_STR = '[object Object]';
242 var isEqual = function isEqual(left, right) {
243 if (!isUnknownObject(left) || !isUnknownObject(right)) {
244 return left === right;
245 }
246
247 var leftArray = Array.isArray(left);
248 var rightArray = Array.isArray(right);
249 if (leftArray !== rightArray) return false;
250 var leftPlainObject = Object.prototype.toString.call(left) === PLAIN_OBJECT_STR;
251 var rightPlainObject = Object.prototype.toString.call(right) === PLAIN_OBJECT_STR;
252 if (leftPlainObject !== rightPlainObject) return false; // not sure what sort of special object this is (regexp is one option), so
253 // fallback to reference check.
254
255 if (!leftPlainObject && !leftArray) return left === right;
256 var leftKeys = Object.keys(left);
257 var rightKeys = Object.keys(right);
258 if (leftKeys.length !== rightKeys.length) return false;
259 var keySet = {};
260
261 for (var i = 0; i < leftKeys.length; i += 1) {
262 keySet[leftKeys[i]] = true;
263 }
264
265 for (var _i = 0; _i < rightKeys.length; _i += 1) {
266 keySet[rightKeys[_i]] = true;
267 }
268
269 var allKeys = Object.keys(keySet);
270
271 if (allKeys.length !== leftKeys.length) {
272 return false;
273 }
274
275 var l = left;
276 var r = right;
277
278 var pred = function pred(key) {
279 return isEqual(l[key], r[key]);
280 };
281
282 return allKeys.every(pred);
283 };
284
285 var extractAllowedOptionsUpdates = function extractAllowedOptionsUpdates(options, prevOptions, immutableKeys) {
286 if (!isUnknownObject(options)) {
287 return null;
288 }
289
290 return Object.keys(options).reduce(function (newOptions, key) {
291 var isUpdated = !isUnknownObject(prevOptions) || !isEqual(options[key], prevOptions[key]);
292
293 if (immutableKeys.includes(key)) {
294 if (isUpdated) {
295 console.warn("Unsupported prop change: options.".concat(key, " is not a mutable property."));
296 }
297
298 return newOptions;
299 }
300
301 if (!isUpdated) {
302 return newOptions;
303 }
304
305 return _objectSpread2(_objectSpread2({}, newOptions || {}), {}, _defineProperty({}, key, options[key]));
306 }, null);
307 };
308
309 var INVALID_STRIPE_ERROR = 'Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.'; // We are using types to enforce the `stripe` prop in this lib, but in a real
310 // integration `stripe` could be anything, so we need to do some sanity
311 // validation to prevent type errors.
312
313 var validateStripe = function validateStripe(maybeStripe) {
314 if (maybeStripe === null || isStripe(maybeStripe)) {
315 return maybeStripe;
316 }
317
318 throw new Error(INVALID_STRIPE_ERROR);
319 };
320
321 var parseStripeProp = function parseStripeProp(raw) {
322 if (isPromise(raw)) {
323 return {
324 tag: 'async',
325 stripePromise: Promise.resolve(raw).then(validateStripe)
326 };
327 }
328
329 var stripe = validateStripe(raw);
330
331 if (stripe === null) {
332 return {
333 tag: 'empty'
334 };
335 }
336
337 return {
338 tag: 'sync',
339 stripe: stripe
340 };
341 };
342
343 var ElementsContext = /*#__PURE__*/React.createContext(null);
344 ElementsContext.displayName = 'ElementsContext';
345 var parseElementsContext = function parseElementsContext(ctx, useCase) {
346 if (!ctx) {
347 throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(useCase, " in an <Elements> provider."));
348 }
349
350 return ctx;
351 };
352 var CartElementContext = /*#__PURE__*/React.createContext(null);
353 CartElementContext.displayName = 'CartElementContext';
354 var parseCartElementContext = function parseCartElementContext(ctx, useCase) {
355 if (!ctx) {
356 throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(useCase, " in an <Elements> provider."));
357 }
358
359 return ctx;
360 };
361 /**
362 * The `Elements` provider allows you to use [Element components](https://stripe.com/docs/stripe-js/react#element-components) and access the [Stripe object](https://stripe.com/docs/js/initializing) in any nested component.
363 * Render an `Elements` provider at the root of your React app so that it is available everywhere you need it.
364 *
365 * To use the `Elements` provider, call `loadStripe` from `@stripe/stripe-js` with your publishable key.
366 * The `loadStripe` function will asynchronously load the Stripe.js script and initialize a `Stripe` object.
367 * Pass the returned `Promise` to `Elements`.
368 *
369 * @docs https://stripe.com/docs/stripe-js/react#elements-provider
370 */
371
372 var Elements = function Elements(_ref) {
373 var rawStripeProp = _ref.stripe,
374 options = _ref.options,
375 children = _ref.children;
376 var parsed = React.useMemo(function () {
377 return parseStripeProp(rawStripeProp);
378 }, [rawStripeProp]);
379
380 var _React$useState = React.useState(null),
381 _React$useState2 = _slicedToArray(_React$useState, 2),
382 cart = _React$useState2[0],
383 setCart = _React$useState2[1];
384
385 var _React$useState3 = React.useState(null),
386 _React$useState4 = _slicedToArray(_React$useState3, 2),
387 cartState = _React$useState4[0],
388 setCartState = _React$useState4[1]; // For a sync stripe instance, initialize into context
389
390
391 var _React$useState5 = React.useState(function () {
392 return {
393 stripe: parsed.tag === 'sync' ? parsed.stripe : null,
394 elements: parsed.tag === 'sync' ? parsed.stripe.elements(options) : null
395 };
396 }),
397 _React$useState6 = _slicedToArray(_React$useState5, 2),
398 ctx = _React$useState6[0],
399 setContext = _React$useState6[1];
400
401 React.useEffect(function () {
402 var isMounted = true;
403
404 var safeSetContext = function safeSetContext(stripe) {
405 setContext(function (ctx) {
406 // no-op if we already have a stripe instance (https://github.com/stripe/react-stripe-js/issues/296)
407 if (ctx.stripe) return ctx;
408 return {
409 stripe: stripe,
410 elements: stripe.elements(options)
411 };
412 });
413 }; // For an async stripePromise, store it in context once resolved
414
415
416 if (parsed.tag === 'async' && !ctx.stripe) {
417 parsed.stripePromise.then(function (stripe) {
418 if (stripe && isMounted) {
419 // Only update Elements context if the component is still mounted
420 // and stripe is not null. We allow stripe to be null to make
421 // handling SSR easier.
422 safeSetContext(stripe);
423 }
424 });
425 } else if (parsed.tag === 'sync' && !ctx.stripe) {
426 // Or, handle a sync stripe instance going from null -> populated
427 safeSetContext(parsed.stripe);
428 }
429
430 return function () {
431 isMounted = false;
432 };
433 }, [parsed, ctx, options]); // Warn on changes to stripe prop
434
435 var prevStripe = usePrevious(rawStripeProp);
436 React.useEffect(function () {
437 if (prevStripe !== null && prevStripe !== rawStripeProp) {
438 console.warn('Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.');
439 }
440 }, [prevStripe, rawStripeProp]); // Apply updates to elements when options prop has relevant changes
441
442 var prevOptions = usePrevious(options);
443 React.useEffect(function () {
444 if (!ctx.elements) {
445 return;
446 }
447
448 var updates = extractAllowedOptionsUpdates(options, prevOptions, ['clientSecret', 'fonts']);
449
450 if (updates) {
451 ctx.elements.update(updates);
452 }
453 }, [options, prevOptions, ctx.elements]); // Attach react-stripe-js version to stripe.js instance
454
455 React.useEffect(function () {
456 var anyStripe = ctx.stripe;
457
458 if (!anyStripe || !anyStripe._registerWrapper || !anyStripe.registerAppInfo) {
459 return;
460 }
461
462 anyStripe._registerWrapper({
463 name: 'react-stripe-js',
464 version: "1.16.1"
465 });
466
467 anyStripe.registerAppInfo({
468 name: 'react-stripe-js',
469 version: "1.16.1",
470 url: 'https://stripe.com/docs/stripe-js/react'
471 });
472 }, [ctx.stripe]);
473 return /*#__PURE__*/React.createElement(ElementsContext.Provider, {
474 value: ctx
475 }, /*#__PURE__*/React.createElement(CartElementContext.Provider, {
476 value: {
477 cart: cart,
478 setCart: setCart,
479 cartState: cartState,
480 setCartState: setCartState
481 }
482 }, children));
483 };
484 Elements.propTypes = {
485 stripe: propTypes.any,
486 options: propTypes.object
487 };
488 var useElementsContextWithUseCase = function useElementsContextWithUseCase(useCaseMessage) {
489 var ctx = React.useContext(ElementsContext);
490 return parseElementsContext(ctx, useCaseMessage);
491 };
492 var useCartElementContextWithUseCase = function useCartElementContextWithUseCase(useCaseMessage) {
493 var ctx = React.useContext(CartElementContext);
494 return parseCartElementContext(ctx, useCaseMessage);
495 };
496 /**
497 * @docs https://stripe.com/docs/stripe-js/react#useelements-hook
498 */
499
500 var useElements = function useElements() {
501 var _useElementsContextWi = useElementsContextWithUseCase('calls useElements()'),
502 elements = _useElementsContextWi.elements;
503
504 return elements;
505 };
506 /**
507 * @docs https://stripe.com/docs/stripe-js/react#usestripe-hook
508 */
509
510 var useStripe = function useStripe() {
511 var _useElementsContextWi2 = useElementsContextWithUseCase('calls useStripe()'),
512 stripe = _useElementsContextWi2.stripe;
513
514 return stripe;
515 };
516 /**
517 * @docs https://stripe.com/docs/payments/checkout/cart-element
518 */
519
520 var useCartElement = function useCartElement() {
521 var _useCartElementContex = useCartElementContextWithUseCase('calls useCartElement()'),
522 cart = _useCartElementContex.cart;
523
524 return cart;
525 };
526 /**
527 * @docs https://stripe.com/docs/payments/checkout/cart-element
528 */
529
530 var useCartElementState = function useCartElementState() {
531 var _useCartElementContex2 = useCartElementContextWithUseCase('calls useCartElementState()'),
532 cartState = _useCartElementContex2.cartState;
533
534 return cartState;
535 };
536 /**
537 * @docs https://stripe.com/docs/stripe-js/react#elements-consumer
538 */
539
540 var ElementsConsumer = function ElementsConsumer(_ref2) {
541 var children = _ref2.children;
542 var ctx = useElementsContextWithUseCase('mounts <ElementsConsumer>'); // Assert to satisfy the busted React.FC return type (it should be ReactNode)
543
544 return children(ctx);
545 };
546 ElementsConsumer.propTypes = {
547 children: propTypes.func.isRequired
548 };
549
550 var useAttachEvent = function useAttachEvent(elementRef, event, cb) {
551 React.useEffect(function () {
552 if (!cb || !elementRef.current) {
553 return function () {};
554 }
555
556 var element = elementRef.current;
557 element.on(event, cb);
558 return function () {
559 return element.off(event, cb);
560 };
561 }, [cb, event, elementRef]);
562 };
563
564 var capitalized = function capitalized(str) {
565 return str.charAt(0).toUpperCase() + str.slice(1);
566 };
567
568 var createElementComponent = function createElementComponent(type, isServer) {
569 var displayName = "".concat(capitalized(type), "Element");
570
571 var ClientElement = function ClientElement(_ref) {
572 var id = _ref.id,
573 className = _ref.className,
574 _ref$options = _ref.options,
575 options = _ref$options === void 0 ? {} : _ref$options,
576 onBlur = _ref.onBlur,
577 onFocus = _ref.onFocus,
578 onReady = _ref.onReady,
579 onChange = _ref.onChange,
580 onEscape = _ref.onEscape,
581 onClick = _ref.onClick,
582 onLoadError = _ref.onLoadError,
583 onLoaderStart = _ref.onLoaderStart,
584 onNetworksChange = _ref.onNetworksChange,
585 onCheckout = _ref.onCheckout,
586 onLineItemClick = _ref.onLineItemClick,
587 onConfirm = _ref.onConfirm,
588 onCancel = _ref.onCancel,
589 onShippingAddressChange = _ref.onShippingAddressChange,
590 onShippingRateChange = _ref.onShippingRateChange;
591
592 var _useElementsContextWi = useElementsContextWithUseCase("mounts <".concat(displayName, ">")),
593 elements = _useElementsContextWi.elements;
594
595 var elementRef = React.useRef(null);
596 var domNode = React.useRef(null);
597
598 var _useCartElementContex = useCartElementContextWithUseCase("mounts <".concat(displayName, ">")),
599 setCart = _useCartElementContex.setCart,
600 setCartState = _useCartElementContex.setCartState; // For every event where the merchant provides a callback, call element.on
601 // with that callback. If the merchant ever changes the callback, removes
602 // the old callback with element.off and then call element.on with the new one.
603
604
605 useAttachEvent(elementRef, 'blur', onBlur);
606 useAttachEvent(elementRef, 'focus', onFocus);
607 useAttachEvent(elementRef, 'escape', onEscape);
608 useAttachEvent(elementRef, 'click', onClick);
609 useAttachEvent(elementRef, 'loaderror', onLoadError);
610 useAttachEvent(elementRef, 'loaderstart', onLoaderStart);
611 useAttachEvent(elementRef, 'networkschange', onNetworksChange);
612 useAttachEvent(elementRef, 'lineitemclick', onLineItemClick);
613 useAttachEvent(elementRef, 'confirm', onConfirm);
614 useAttachEvent(elementRef, 'cancel', onCancel);
615 useAttachEvent(elementRef, 'shippingaddresschange', onShippingAddressChange);
616 useAttachEvent(elementRef, 'shippingratechange', onShippingRateChange);
617 var readyCallback;
618
619 if (type === 'cart') {
620 readyCallback = function readyCallback(event) {
621 setCartState(event);
622 onReady && onReady(event);
623 };
624 } else if (onReady) {
625 if (type === 'payButton') {
626 // Passes through the event, which includes visible PM types
627 readyCallback = onReady;
628 } else {
629 // For other Elements, pass through the Element itself.
630 readyCallback = function readyCallback() {
631 onReady(elementRef.current);
632 };
633 }
634 }
635
636 useAttachEvent(elementRef, 'ready', readyCallback);
637 var changeCallback = type === 'cart' ? function (event) {
638 setCartState(event);
639 onChange && onChange(event);
640 } : onChange;
641 useAttachEvent(elementRef, 'change', changeCallback);
642 var checkoutCallback = type === 'cart' ? function (event) {
643 setCartState(event);
644 onCheckout && onCheckout(event);
645 } : onCheckout;
646 useAttachEvent(elementRef, 'checkout', checkoutCallback);
647 React.useLayoutEffect(function () {
648 if (elementRef.current == null && elements && domNode.current != null) {
649 var element = elements.create(type, options);
650
651 if (type === 'cart' && setCart) {
652 // we know that elements.create return value must be of type StripeCartElement if type is 'cart',
653 // we need to cast because typescript is not able to infer which overloaded method is used based off param type
654 setCart(element);
655 }
656
657 elementRef.current = element;
658 element.mount(domNode.current);
659 }
660 });
661 var prevOptions = usePrevious(options);
662 React.useEffect(function () {
663 if (!elementRef.current) {
664 return;
665 }
666
667 var updates = extractAllowedOptionsUpdates(options, prevOptions, ['paymentRequest']);
668
669 if (updates) {
670 elementRef.current.update(updates);
671 }
672 }, [options, prevOptions]);
673 React.useLayoutEffect(function () {
674 return function () {
675 if (elementRef.current) {
676 elementRef.current.destroy();
677 elementRef.current = null;
678 }
679 };
680 }, []);
681 return /*#__PURE__*/React.createElement("div", {
682 id: id,
683 className: className,
684 ref: domNode
685 });
686 }; // Only render the Element wrapper in a server environment.
687
688
689 var ServerElement = function ServerElement(props) {
690 // Validate that we are in the right context by calling useElementsContextWithUseCase.
691 useElementsContextWithUseCase("mounts <".concat(displayName, ">"));
692 useCartElementContextWithUseCase("mounts <".concat(displayName, ">"));
693 var id = props.id,
694 className = props.className;
695 return /*#__PURE__*/React.createElement("div", {
696 id: id,
697 className: className
698 });
699 };
700
701 var Element = isServer ? ServerElement : ClientElement;
702 Element.propTypes = {
703 id: propTypes.string,
704 className: propTypes.string,
705 onChange: propTypes.func,
706 onBlur: propTypes.func,
707 onFocus: propTypes.func,
708 onReady: propTypes.func,
709 onEscape: propTypes.func,
710 onClick: propTypes.func,
711 onLoadError: propTypes.func,
712 onLoaderStart: propTypes.func,
713 onNetworksChange: propTypes.func,
714 onCheckout: propTypes.func,
715 onLineItemClick: propTypes.func,
716 onConfirm: propTypes.func,
717 onCancel: propTypes.func,
718 onShippingAddressChange: propTypes.func,
719 onShippingRateChange: propTypes.func,
720 options: propTypes.object
721 };
722 Element.displayName = displayName;
723 Element.__elementType = type;
724 return Element;
725 };
726
727 var isServer = typeof window === 'undefined';
728 /**
729 * Requires beta access:
730 * Contact [Stripe support](https://support.stripe.com/) for more information.
731 *
732 * @docs https://stripe.com/docs/stripe-js/react#element-components
733 */
734
735 var AuBankAccountElement = createElementComponent('auBankAccount', isServer);
736 /**
737 * @docs https://stripe.com/docs/stripe-js/react#element-components
738 */
739
740 var CardElement = createElementComponent('card', isServer);
741 /**
742 * @docs https://stripe.com/docs/stripe-js/react#element-components
743 */
744
745 var CardNumberElement = createElementComponent('cardNumber', isServer);
746 /**
747 * @docs https://stripe.com/docs/stripe-js/react#element-components
748 */
749
750 var CardExpiryElement = createElementComponent('cardExpiry', isServer);
751 /**
752 * @docs https://stripe.com/docs/stripe-js/react#element-components
753 */
754
755 var CardCvcElement = createElementComponent('cardCvc', isServer);
756 /**
757 * @docs https://stripe.com/docs/stripe-js/react#element-components
758 */
759
760 var FpxBankElement = createElementComponent('fpxBank', isServer);
761 /**
762 * @docs https://stripe.com/docs/stripe-js/react#element-components
763 */
764
765 var IbanElement = createElementComponent('iban', isServer);
766 /**
767 * @docs https://stripe.com/docs/stripe-js/react#element-components
768 */
769
770 var IdealBankElement = createElementComponent('idealBank', isServer);
771 /**
772 * @docs https://stripe.com/docs/stripe-js/react#element-components
773 */
774
775 var P24BankElement = createElementComponent('p24Bank', isServer);
776 /**
777 * @docs https://stripe.com/docs/stripe-js/react#element-components
778 */
779
780 var EpsBankElement = createElementComponent('epsBank', isServer);
781 var PaymentElement = createElementComponent('payment', isServer);
782 /**
783 * Requires beta access:
784 * Contact [Stripe support](https://support.stripe.com/) for more information.
785 *
786 * @docs https://stripe.com/docs/stripe-js/react#element-components
787 */
788
789 var PayButtonElement = createElementComponent('payButton', isServer);
790 /**
791 * @docs https://stripe.com/docs/stripe-js/react#element-components
792 */
793
794 var PaymentRequestButtonElement = createElementComponent('paymentRequestButton', isServer);
795 /**
796 * Requires beta access:
797 * Contact [Stripe support](https://support.stripe.com/) for more information.
798 *
799 * @docs https://stripe.com/docs/stripe-js/react#element-components
800 */
801
802 var LinkAuthenticationElement = createElementComponent('linkAuthentication', isServer);
803 /**
804 * @docs https://stripe.com/docs/stripe-js/react#element-components
805 */
806
807 var AddressElement = createElementComponent('address', isServer);
808 /**
809 * @deprecated
810 * Use `AddressElement` instead.
811 *
812 * @docs https://stripe.com/docs/stripe-js/react#element-components
813 */
814
815 var ShippingAddressElement = createElementComponent('shippingAddress', isServer);
816 /**
817 * Requires beta access:
818 * Contact [Stripe support](https://support.stripe.com/) for more information.
819 *
820 * @docs https://stripe.com/docs/elements/cart-element
821 */
822
823 var CartElement = createElementComponent('cart', isServer);
824 /**
825 * @docs https://stripe.com/docs/stripe-js/react#element-components
826 */
827
828 var PaymentMethodMessagingElement = createElementComponent('paymentMethodMessaging', isServer);
829 /**
830 * @docs https://stripe.com/docs/stripe-js/react#element-components
831 */
832
833 var AffirmMessageElement = createElementComponent('affirmMessage', isServer);
834 /**
835 * @docs https://stripe.com/docs/stripe-js/react#element-components
836 */
837
838 var AfterpayClearpayMessageElement = createElementComponent('afterpayClearpayMessage', isServer);
839
840 exports.AddressElement = AddressElement;
841 exports.AffirmMessageElement = AffirmMessageElement;
842 exports.AfterpayClearpayMessageElement = AfterpayClearpayMessageElement;
843 exports.AuBankAccountElement = AuBankAccountElement;
844 exports.CardCvcElement = CardCvcElement;
845 exports.CardElement = CardElement;
846 exports.CardExpiryElement = CardExpiryElement;
847 exports.CardNumberElement = CardNumberElement;
848 exports.CartElement = CartElement;
849 exports.Elements = Elements;
850 exports.ElementsConsumer = ElementsConsumer;
851 exports.EpsBankElement = EpsBankElement;
852 exports.FpxBankElement = FpxBankElement;
853 exports.IbanElement = IbanElement;
854 exports.IdealBankElement = IdealBankElement;
855 exports.LinkAuthenticationElement = LinkAuthenticationElement;
856 exports.P24BankElement = P24BankElement;
857 exports.PayButtonElement = PayButtonElement;
858 exports.PaymentElement = PaymentElement;
859 exports.PaymentMethodMessagingElement = PaymentMethodMessagingElement;
860 exports.PaymentRequestButtonElement = PaymentRequestButtonElement;
861 exports.ShippingAddressElement = ShippingAddressElement;
862 exports.useCartElement = useCartElement;
863 exports.useCartElementState = useCartElementState;
864 exports.useElements = useElements;
865 exports.useStripe = useStripe;
866
867 Object.defineProperty(exports, '__esModule', { value: true });
868
869 })));
870
871
872 /***/ }),
873
874 /***/ 71:
875 /***/ (() => {
876
877 jQuery(document).ready(function ($) {
878 $(".tt-meeting-list-item .ant-btn").on("click", function () {
879 var id = $(this).data("id");
880 var getSelectedId = new CustomEvent("getSelectedId", {
881 detail: {
882 id: id,
883 modal: true
884 }
885 });
886 // To trigger the Event
887 document.dispatchEvent(getSelectedId);
888 });
889 });
890
891 /***/ }),
892
893 /***/ 484:
894 /***/ (function(module) {
895
896 !function(t,e){ true?module.exports=e():0}(this,(function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p=function(t){return t instanceof _},S=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),l=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(h){case c:return r?l(1,0):l(31,11);case f:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),l=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,l=this;r=Number(r);var $=O.p(h),y=function(t){var e=w(l);return O.w(e.date(e.date()+Math.round(t*r)),l)};if($===f)return this.set(f,this.$M+r);if($===c)return this.set(c,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},$={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||$[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,v=this-M,g=O.m(this,M);return g=($={},$[c]=g/12,$[f]=g,$[h]=g/3,$[o]=(v-m)/6048e5,$[a]=(v-m)/864e5,$[u]=v/n,$[s]=v/e,$[i]=v/t,$)[y]||v,l?g:O.a(g)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),T=_.prototype;return w.prototype=T,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[g],w.Ls=D,w.p={},w}));
897
898 /***/ }),
899
900 /***/ 230:
901 /***/ ((module) => {
902
903 /* eslint-env browser */
904 module.exports = typeof self == 'object' ? self.FormData : window.FormData;
905
906
907 /***/ }),
908
909 /***/ 363:
910 /***/ ((module) => {
911
912 "use strict";
913 module.exports = React;
914
915 /***/ })
916
917 /******/ });
918 /************************************************************************/
919 /******/ // The module cache
920 /******/ var __webpack_module_cache__ = {};
921 /******/
922 /******/ // The require function
923 /******/ function __webpack_require__(moduleId) {
924 /******/ // Check if module is in cache
925 /******/ var cachedModule = __webpack_module_cache__[moduleId];
926 /******/ if (cachedModule !== undefined) {
927 /******/ return cachedModule.exports;
928 /******/ }
929 /******/ // Create a new module (and put it into the cache)
930 /******/ var module = __webpack_module_cache__[moduleId] = {
931 /******/ // no module.id needed
932 /******/ // no module.loaded needed
933 /******/ exports: {}
934 /******/ };
935 /******/
936 /******/ // Execute the module function
937 /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
938 /******/
939 /******/ // Return the exports of the module
940 /******/ return module.exports;
941 /******/ }
942 /******/
943 /************************************************************************/
944 /******/ /* webpack/runtime/compat get default export */
945 /******/ (() => {
946 /******/ // getDefaultExport function for compatibility with non-harmony modules
947 /******/ __webpack_require__.n = (module) => {
948 /******/ var getter = module && module.__esModule ?
949 /******/ () => (module['default']) :
950 /******/ () => (module);
951 /******/ __webpack_require__.d(getter, { a: getter });
952 /******/ return getter;
953 /******/ };
954 /******/ })();
955 /******/
956 /******/ /* webpack/runtime/define property getters */
957 /******/ (() => {
958 /******/ // define getter functions for harmony exports
959 /******/ __webpack_require__.d = (exports, definition) => {
960 /******/ for(var key in definition) {
961 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
962 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
963 /******/ }
964 /******/ }
965 /******/ };
966 /******/ })();
967 /******/
968 /******/ /* webpack/runtime/hasOwnProperty shorthand */
969 /******/ (() => {
970 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
971 /******/ })();
972 /******/
973 /************************************************************************/
974 var __webpack_exports__ = {};
975 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
976 (() => {
977 "use strict";
978
979 ;// CONCATENATED MODULE: ./assets/src/common/Spinner.js
980 var _antd = antd,
981 Alert = _antd.Alert,
982 Spin = _antd.Spin;
983 var Spinner_React = window.React;
984 function Spinner(_ref) {
985 var tip = _ref.tip,
986 msg = _ref.msg,
987 desc = _ref.desc,
988 type = _ref.type,
989 wrapperClassName = _ref.wrapperClassName;
990 return /*#__PURE__*/Spinner_React.createElement(Spin, {
991 tip: tip,
992 wrapperClassName: wrapperClassName
993 }, /*#__PURE__*/Spinner_React.createElement(Alert, {
994 message: msg,
995 description: desc,
996 type: type
997 }));
998 }
999 /* harmony default export */ const common_Spinner = (Spinner);
1000 ;// CONCATENATED MODULE: ./assets/src/frontend/actionCreators/actions.js
1001 var actions_actions = {
1002 SET_LOADING: "SET_LOADING",
1003 SET_DATA_CONTROLS: "SET_DATA_CONTROLS",
1004 SET_SINGLE_MEETING_DATA: "SET_SINGLE_MEETING_DATA",
1005 SET_STATE: "SET_STATE",
1006 SET_MEETING_SLOTS: "SET_MEETING_SLOTS",
1007 CLEAR_BOOKING_RELATED_DATA: "CLEAR_BOOKING_RELATED_DATA",
1008 BOOKING_STATUS_CANCEL: "BOOKING_STATUS_CANCEL"
1009 };
1010 ;// CONCATENATED MODULE: ./assets/src/frontend/reducers/meetingReducer.js
1011 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1012 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1013 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1014
1015 var demo = "demo";
1016 var meetingReducer = function meetingReducer(state, action) {
1017 switch (action.type) {
1018 case actions_actions.SET_STATE:
1019 {
1020 var payload = action.payload;
1021 return _objectSpread(_objectSpread({}, state), payload);
1022 }
1023 case actions_actions.SET_LOADING:
1024 {
1025 var _payload = action.payload;
1026 return _objectSpread(_objectSpread({}, state), {}, {
1027 loading: _payload
1028 });
1029 }
1030 case actions_actions.SET_DATA_CONTROLS:
1031 {
1032 var _payload2 = action.payload;
1033 return _objectSpread(_objectSpread({}, state), {}, {
1034 dataControls: _payload2
1035 });
1036 }
1037 case actions_actions.SET_SINGLE_MEETING_DATA:
1038 {
1039 var _payload3 = action.payload;
1040 return _objectSpread(_objectSpread({}, state), _payload3);
1041 }
1042 case actions_actions.SET_MEETING_SLOTS:
1043 {
1044 var _payload4 = action.payload;
1045 return _objectSpread(_objectSpread({}, state), _payload4);
1046 }
1047 case actions_actions.CLEAR_BOOKING_RELATED_DATA:
1048 {
1049 var _payload5 = action.payload;
1050 return _objectSpread(_objectSpread({}, state), {}, {
1051 step: 1,
1052 paymentStatus: null,
1053 response: null,
1054 contactInfo: null,
1055 bookingTime: "",
1056 selectedDate: null,
1057 selectedDaysSlots: [],
1058 selectedDay: null,
1059 unavailableDays: [],
1060 unavailableDayNumber: [],
1061 selectedStaff: null
1062 }, _payload5);
1063 }
1064 default:
1065 return state;
1066 }
1067 };
1068 ;// CONCATENATED MODULE: ./assets/src/frontend/reducers/index.js
1069
1070 var mainReducer = function mainReducer(_ref, action) {
1071 var meeting = _ref.meeting;
1072 return {
1073 meeting: meetingReducer(meeting, action)
1074 };
1075 };
1076 /* harmony default export */ const reducers = (mainReducer);
1077 ;// CONCATENATED MODULE: ./assets/src/frontend/context/createContext.js
1078 var createContext_React = window.React;
1079 var createContext = createContext_React.createContext;
1080 var TimeTicsContext = createContext();
1081 ;// CONCATENATED MODULE: ./assets/src/frontend/context/state.js
1082 var initialState = {
1083 staff: {
1084 staff: {}
1085 },
1086 meeting: {
1087 step: 1
1088 },
1089 booking: {},
1090 customers: {},
1091 settings: {}
1092 };
1093
1094 ;// CONCATENATED MODULE: ./assets/src/frontend/context/provider.js
1095 var provider_React = window.React;
1096 var useContext = provider_React.useContext,
1097 useReducer = provider_React.useReducer;
1098
1099
1100
1101 var TimeTicsProvider = function TimeTicsProvider(_ref) {
1102 var children = _ref.children;
1103 return /*#__PURE__*/provider_React.createElement(TimeTicsContext.Provider, {
1104 value: useReducer(reducers, initialState)
1105 }, children);
1106 };
1107 var provider_useStateValue = function useStateValue() {
1108 return useContext(TimeTicsContext);
1109 };
1110 TimeTicsProvider = wp.hooks.applyFilters("timetics_ctx", TimeTicsProvider, provider_useStateValue);
1111 /* harmony default export */ const provider = (TimeTicsProvider);
1112 ;// CONCATENATED MODULE: ./assets/src/common/icons/Icons.js
1113 // Optimized icon component
1114 var EditIcon = function EditIcon(_ref) {
1115 var _ref$color = _ref.color,
1116 color = _ref$color === void 0 ? "#0A1018" : _ref$color,
1117 _ref$width = _ref.width,
1118 width = _ref$width === void 0 ? "18" : _ref$width,
1119 _ref$height = _ref.height,
1120 height = _ref$height === void 0 ? "18" : _ref$height;
1121 return /*#__PURE__*/React.createElement("span", {
1122 className: "anticon"
1123 }, /*#__PURE__*/React.createElement("svg", {
1124 width: width,
1125 height: height,
1126 viewBox: "0 0 18 18",
1127 fill: color,
1128 xmlns: "http://www.w3.org/2000/svg"
1129 }, /*#__PURE__*/React.createElement("path", {
1130 d: "M15.75 16.5H2.25C1.9425 16.5 1.6875 16.245 1.6875 15.9375C1.6875 15.63 1.9425 15.375 2.25 15.375H15.75C16.0575 15.375 16.3125 15.63 16.3125 15.9375C16.3125 16.245 16.0575 16.5 15.75 16.5Z"
1131 }), /*#__PURE__*/React.createElement("path", {
1132 d: "M14.2649 2.61C12.8099 1.155 11.3849 1.1175 9.89243 2.61L8.98493 3.5175C8.90993 3.5925 8.87993 3.7125 8.90993 3.8175C9.47993 5.805 11.0699 7.395 13.0574 7.965C13.0874 7.9725 13.1174 7.98 13.1474 7.98C13.2299 7.98 13.3049 7.95 13.3649 7.89L14.2649 6.9825C15.0074 6.2475 15.3674 5.535 15.3674 4.815C15.3749 4.0725 15.0149 3.3525 14.2649 2.61Z"
1133 }), /*#__PURE__*/React.createElement("path", {
1134 fillRule: "evenodd",
1135 clipRule: "evenodd",
1136 d: "M11.0775 8.31747C11.28 8.43748 11.49 8.54249 11.7075 8.64748C11.7367 8.66013 11.7655 8.67254 11.794 8.68469C12.0472 8.79272 12.1206 9.12682 11.926 9.32149L7.63497 13.6125C7.54497 13.71 7.35747 13.8 7.22248 13.8225L4.34251 14.2275C4.25251 14.2425 4.16247 14.25 4.07247 14.25C3.66749 14.25 3.29249 14.1075 3.0225 13.845C2.70746 13.5225 2.56501 13.0425 2.63999 12.5325L3.04497 9.65998C3.0675 9.53247 3.15749 9.34497 3.255 9.24749L7.55134 4.95113C7.74465 4.75781 8.07062 4.83089 8.18131 5.08088C8.19623 5.11457 8.21162 5.14844 8.2275 5.18248C8.33247 5.39248 8.43748 5.59497 8.5575 5.79749C8.65501 5.96249 8.75997 6.12749 8.84997 6.23998C8.95516 6.4013 9.07349 6.54288 9.14976 6.63421L9.165 6.65247C9.21751 6.71997 9.255 6.77248 9.27747 6.78749C9.52499 7.08749 9.80248 7.35747 10.05 7.56747C10.0827 7.6002 10.1132 7.62847 10.1366 7.64861C10.1561 7.66541 10.1707 7.67656 10.1775 7.67997C10.32 7.79997 10.47 7.91997 10.5975 8.00249C10.755 8.11498 10.9125 8.21997 11.0775 8.31747Z"
1137 })));
1138 };
1139 var DeleteIcon = function DeleteIcon(_ref2) {
1140 var _ref2$color = _ref2.color,
1141 color = _ref2$color === void 0 ? "#FF3B30" : _ref2$color,
1142 _ref2$width = _ref2.width,
1143 width = _ref2$width === void 0 ? "18" : _ref2$width,
1144 _ref2$height = _ref2.height,
1145 height = _ref2$height === void 0 ? "18" : _ref2$height;
1146 return /*#__PURE__*/React.createElement("span", {
1147 className: "anticon"
1148 }, /*#__PURE__*/React.createElement("svg", {
1149 width: width,
1150 height: height,
1151 viewBox: "0 0 18 18",
1152 xmlns: "http://www.w3.org/2000/svg",
1153 fill: color
1154 }, /*#__PURE__*/React.createElement("path", {
1155 d: "M15.3031 4.46471C14.2251 4.35759 13.1472 4.27725 12.0626 4.21699V4.21029L11.9153 3.33991C11.8148 2.72395 11.6675 1.8 10.1009 1.8H8.3467C6.7867 1.8 6.6394 2.68377 6.53228 3.33321L6.39168 4.19021C5.76902 4.23038 5.14636 4.27055 4.5237 4.33081L3.15787 4.46471C2.87667 4.4915 2.67581 4.73922 2.70259 5.01373C2.72937 5.28823 2.9704 5.48909 3.2516 5.46231L4.61743 5.3284C8.12575 4.98025 11.6609 5.11416 15.2093 5.469C15.2294 5.469 15.2428 5.469 15.2629 5.469C15.5173 5.469 15.7383 5.27484 15.765 5.01373C15.7851 4.73922 15.5843 4.4915 15.3031 4.46471Z"
1156 }), /*#__PURE__*/React.createElement("path", {
1157 d: "M14.0712 6.41152C13.9105 6.24414 13.6896 6.15041 13.462 6.15041H4.99915C4.77151 6.15041 4.54387 6.24414 4.38988 6.41152C4.23589 6.5789 4.14885 6.80654 4.16224 7.04088L4.57734 13.9102C4.65099 14.9279 4.74473 16.2 7.08137 16.2H11.3797C13.7164 16.2 13.8101 14.9346 13.8838 13.9102L14.2989 7.04757C14.3123 6.80654 14.2252 6.5789 14.0712 6.41152ZM10.342 12.8457H8.11244C7.83794 12.8457 7.6103 12.618 7.6103 12.3435C7.6103 12.069 7.83794 11.8414 8.11244 11.8414H10.342C10.6165 11.8414 10.8441 12.069 10.8441 12.3435C10.8441 12.618 10.6165 12.8457 10.342 12.8457ZM10.9044 10.1676H7.55674C7.28223 10.1676 7.05459 9.93993 7.05459 9.66542C7.05459 9.39091 7.28223 9.16328 7.55674 9.16328H10.9044C11.1789 9.16328 11.4065 9.39091 11.4065 9.66542C11.4065 9.93993 11.1789 10.1676 10.9044 10.1676Z"
1158 })));
1159 };
1160 var CloneIcon = function CloneIcon(_ref3) {
1161 var _ref3$color = _ref3.color,
1162 color = _ref3$color === void 0 ? "#0A1018" : _ref3$color,
1163 _ref3$width = _ref3.width,
1164 width = _ref3$width === void 0 ? "18" : _ref3$width,
1165 _ref3$height = _ref3.height,
1166 height = _ref3$height === void 0 ? "18" : _ref3$height;
1167 return /*#__PURE__*/React.createElement("span", {
1168 className: "anticon"
1169 }, /*#__PURE__*/React.createElement("svg", {
1170 width: width,
1171 height: height,
1172 viewBox: "0 0 18 18",
1173 fill: color,
1174 xmlns: "http://www.w3.org/2000/svg"
1175 }, /*#__PURE__*/React.createElement("path", {
1176 d: "M10.0297 4.2696V5.2344C8.14325 5.3856 7.07045 6.5952 7.07045 8.5896V11.88H4.26965C2.62085 11.88 1.80005 11.0592 1.80005 9.4104V4.2696C1.80005 2.6208 2.62085 1.8 4.26965 1.8H7.56005C9.20885 1.8 10.0297 2.6208 10.0297 4.2696Z"
1177 }), /*#__PURE__*/React.createElement("path", {
1178 d: "M13.7302 6.11999H10.4398C8.79102 6.11999 7.97021 6.94079 7.97021 8.5896V13.7304C7.97021 15.3792 8.79102 16.2 10.4398 16.2H13.7302C15.379 16.2 16.1998 15.3792 16.1998 13.7304V8.5896C16.1998 6.94079 15.379 6.11999 13.7302 6.11999ZM13.4134 11.7H12.7798V12.3336C12.7798 12.6288 12.535 12.8736 12.2398 12.8736C11.9446 12.8736 11.6998 12.6288 11.6998 12.3336V11.7H11.0662C10.771 11.7 10.5262 11.4552 10.5262 11.16C10.5262 10.8648 10.771 10.62 11.0662 10.62H11.6998V9.9864C11.6998 9.6912 11.9446 9.4464 12.2398 9.4464C12.535 9.4464 12.7798 9.6912 12.7798 9.9864V10.62H13.4134C13.7086 10.62 13.9534 10.8648 13.9534 11.16C13.9534 11.4552 13.7086 11.7 13.4134 11.7Z"
1179 })));
1180 };
1181 var CardViewIcon = function CardViewIcon(_ref4) {
1182 var _ref4$color = _ref4.color,
1183 color = _ref4$color === void 0 ? "#0A1018" : _ref4$color,
1184 _ref4$width = _ref4.width,
1185 width = _ref4$width === void 0 ? "18" : _ref4$width,
1186 _ref4$height = _ref4.height,
1187 height = _ref4$height === void 0 ? "18" : _ref4$height;
1188 return /*#__PURE__*/React.createElement("span", {
1189 className: "anticon"
1190 }, /*#__PURE__*/React.createElement("svg", {
1191 width: width,
1192 height: height,
1193 viewBox: "0 0 18 18",
1194 fill: color,
1195 xmlns: "http://www.w3.org/2000/svg"
1196 }, /*#__PURE__*/React.createElement("path", {
1197 d: "M15.3001 6.8076V3.9474C15.3001 3.0591 14.8969 2.7 13.8952 2.7H11.35C10.3483 2.7 9.94507 3.0591 9.94507 3.9474V6.8013C9.94507 7.6959 10.3483 8.0487 11.35 8.0487H13.8952C14.8969 8.055 15.3001 7.6959 15.3001 6.8076Z"
1198 }), /*#__PURE__*/React.createElement("path", {
1199 d: "M15.3001 13.8951V11.3499C15.3001 10.3482 14.8969 9.945 13.8952 9.945H11.35C10.3483 9.945 9.94507 10.3482 9.94507 11.3499V13.8951C9.94507 14.8968 10.3483 15.3 11.35 15.3H13.8952C14.8969 15.3 15.3001 14.8968 15.3001 13.8951Z"
1200 }), /*#__PURE__*/React.createElement("path", {
1201 d: "M8.05495 6.8076V3.9474C8.05495 3.0591 7.65175 2.7 6.65005 2.7H4.10485C3.10315 2.7 2.69995 3.0591 2.69995 3.9474V6.8013C2.69995 7.6959 3.10315 8.0487 4.10485 8.0487H6.65005C7.65175 8.055 8.05495 7.6959 8.05495 6.8076Z"
1202 }), /*#__PURE__*/React.createElement("path", {
1203 d: "M8.05495 13.8951V11.3499C8.05495 10.3482 7.65175 9.945 6.65005 9.945H4.10485C3.10315 9.945 2.69995 10.3482 2.69995 11.3499V13.8951C2.69995 14.8968 3.10315 15.3 4.10485 15.3H6.65005C7.65175 15.3 8.05495 14.8968 8.05495 13.8951Z"
1204 })));
1205 };
1206 var XIcon = function XIcon(_ref5) {
1207 var _ref5$color = _ref5.color,
1208 color = _ref5$color === void 0 ? "#0A1018" : _ref5$color,
1209 _ref5$width = _ref5.width,
1210 width = _ref5$width === void 0 ? "18" : _ref5$width,
1211 _ref5$height = _ref5.height,
1212 height = _ref5$height === void 0 ? "18" : _ref5$height;
1213 return /*#__PURE__*/React.createElement("span", {
1214 className: "anticon"
1215 }, /*#__PURE__*/React.createElement("svg", {
1216 width: width,
1217 height: height,
1218 viewBox: "0 0 18 18",
1219 fill: color,
1220 xmlns: "http://www.w3.org/2000/svg"
1221 }, /*#__PURE__*/React.createElement("path", {
1222 d: "M14.1365 5.1364C14.488 4.78492 14.488 4.21508 14.1365 3.8636C13.785 3.51213 13.2152 3.51213 12.8637 3.8636L9.0001 7.72721L5.13649 3.8636C4.78502 3.51213 4.21517 3.51213 3.8637 3.8636C3.51223 4.21508 3.51223 4.78492 3.8637 5.1364L7.72731 9L3.8637 12.8636C3.51223 13.2151 3.51223 13.7849 3.8637 14.1364C4.21517 14.4879 4.78502 14.4879 5.13649 14.1364L9.0001 10.2728L12.8637 14.1364C13.2152 14.4879 13.785 14.4879 14.1365 14.1364C14.488 13.7849 14.488 13.2151 14.1365 12.8636L10.2729 9L14.1365 5.1364Z"
1223 })));
1224 };
1225 var CloseFillIcon = function CloseFillIcon(_ref6) {
1226 var _ref6$color = _ref6.color,
1227 color = _ref6$color === void 0 ? "#0A1018" : _ref6$color,
1228 _ref6$width = _ref6.width,
1229 width = _ref6$width === void 0 ? "18" : _ref6$width,
1230 _ref6$height = _ref6.height,
1231 height = _ref6$height === void 0 ? "18" : _ref6$height;
1232 return /*#__PURE__*/React.createElement("span", {
1233 className: "anticon"
1234 }, /*#__PURE__*/React.createElement("svg", {
1235 width: width,
1236 height: height,
1237 viewBox: "0 0 18 18",
1238 fill: color,
1239 xmlns: "http://www.w3.org/2000/svg"
1240 }, /*#__PURE__*/React.createElement("path", {
1241 d: "M8.9998 1.8C5.0326 1.8 1.7998 5.0328 1.7998 9C1.7998 12.9672 5.0326 16.2 8.9998 16.2C12.967 16.2 16.1998 12.9672 16.1998 9C16.1998 5.0328 12.967 1.8 8.9998 1.8ZM11.419 10.656C11.6278 10.8648 11.6278 11.2104 11.419 11.4192C11.311 11.5272 11.1742 11.5776 11.0374 11.5776C10.9006 11.5776 10.7638 11.5272 10.6558 11.4192L8.9998 9.7632L7.3438 11.4192C7.2358 11.5272 7.099 11.5776 6.9622 11.5776C6.8254 11.5776 6.6886 11.5272 6.5806 11.4192C6.3718 11.2104 6.3718 10.8648 6.5806 10.656L8.2366 9L6.5806 7.344C6.3718 7.1352 6.3718 6.7896 6.5806 6.5808C6.7894 6.372 7.135 6.372 7.3438 6.5808L8.9998 8.2368L10.6558 6.5808C10.8646 6.372 11.2102 6.372 11.419 6.5808C11.6278 6.7896 11.6278 7.1352 11.419 7.344L9.763 9L11.419 10.656Z"
1242 })));
1243 };
1244 var DotIcon = function DotIcon(_ref7) {
1245 var color = _ref7.color,
1246 _ref7$width = _ref7.width,
1247 width = _ref7$width === void 0 ? "18" : _ref7$width,
1248 _ref7$height = _ref7.height,
1249 height = _ref7$height === void 0 ? "18" : _ref7$height;
1250 return /*#__PURE__*/React.createElement("span", {
1251 className: "anticon"
1252 }, /*#__PURE__*/React.createElement("svg", {
1253 width: width,
1254 height: height,
1255 viewBox: "0 0 20 20",
1256 fill: color,
1257 xmlns: "http://www.w3.org/2000/svg"
1258 }, /*#__PURE__*/React.createElement("ellipse", {
1259 cx: "16.5882",
1260 cy: "10.4118",
1261 rx: "1.41178",
1262 ry: "1.41176",
1263 transform: "rotate(90 16.5882 10.4118)"
1264 }), /*#__PURE__*/React.createElement("ellipse", {
1265 cx: "9.99986",
1266 cy: "10.4118",
1267 rx: "1.41178",
1268 ry: "1.41176",
1269 transform: "rotate(90 9.99986 10.4118)"
1270 }), /*#__PURE__*/React.createElement("ellipse", {
1271 cx: "3.41148",
1272 cy: "10.4118",
1273 rx: "1.41178",
1274 ry: "1.41176",
1275 transform: "rotate(90 3.41148 10.4118)"
1276 })));
1277 };
1278 var AddIcon = function AddIcon(_ref8) {
1279 var _ref8$color = _ref8.color,
1280 color = _ref8$color === void 0 ? "#0A1018" : _ref8$color,
1281 _ref8$width = _ref8.width,
1282 width = _ref8$width === void 0 ? "18" : _ref8$width,
1283 _ref8$height = _ref8.height,
1284 height = _ref8$height === void 0 ? "18" : _ref8$height;
1285 return /*#__PURE__*/React.createElement("span", {
1286 className: "anticon"
1287 }, /*#__PURE__*/React.createElement("svg", {
1288 width: width,
1289 height: height,
1290 viewBox: "0 0 18 18",
1291 fill: color,
1292 xmlns: "http://www.w3.org/2000/svg"
1293 }, /*#__PURE__*/React.createElement("path", {
1294 fillRule: "evenodd",
1295 clipRule: "evenodd",
1296 d: "M9.89995 3.6C9.89995 3.10294 9.49701 2.7 8.99995 2.7C8.50289 2.7 8.09995 3.10294 8.09995 3.6V8.1H3.59995C3.10289 8.1 2.69995 8.50294 2.69995 9C2.69995 9.49706 3.10289 9.9 3.59995 9.9H8.09995V14.4C8.09995 14.8971 8.50289 15.3 8.99995 15.3C9.49701 15.3 9.89995 14.8971 9.89995 14.4V9.9H14.4C14.897 9.9 15.3 9.49706 15.3 9C15.3 8.50294 14.897 8.1 14.4 8.1H9.89995V3.6Z"
1297 })));
1298 };
1299 var SearchIcon = function SearchIcon(_ref9) {
1300 var _ref9$color = _ref9.color,
1301 color = _ref9$color === void 0 ? "#0A1018" : _ref9$color,
1302 _ref9$width = _ref9.width,
1303 width = _ref9$width === void 0 ? "18" : _ref9$width,
1304 _ref9$height = _ref9.height,
1305 height = _ref9$height === void 0 ? "18" : _ref9$height;
1306 return /*#__PURE__*/React.createElement("span", {
1307 className: "anticon"
1308 }, /*#__PURE__*/React.createElement("svg", {
1309 width: width,
1310 height: height,
1311 viewBox: "0 0 20 20",
1312 fill: color,
1313 xmlns: "http://www.w3.org/2000/svg"
1314 }, /*#__PURE__*/React.createElement("path", {
1315 fillRule: "evenodd",
1316 clipRule: "evenodd",
1317 d: "M9.2 3.6C6.10721 3.6 3.6 6.10721 3.6 9.2C3.6 12.2928 6.10721 14.8 9.2 14.8C10.7086 14.8 12.0779 14.2035 13.0848 13.2334C13.1059 13.2059 13.1291 13.1795 13.1542 13.1543C13.1794 13.1291 13.2059 13.106 13.2333 13.0849C14.2034 12.0779 14.8 10.7086 14.8 9.2C14.8 6.10721 12.2928 3.6 9.2 3.6ZM14.8255 13.6942C15.8108 12.4624 16.4 10.9 16.4 9.2C16.4 5.22355 13.1765 2 9.2 2C5.22355 2 2 5.22355 2 9.2C2 13.1765 5.22355 16.4 9.2 16.4C10.9 16.4 12.4624 15.8108 13.6941 14.8256L16.6342 17.7657C16.9467 18.0781 17.4532 18.0781 17.7656 17.7657C18.078 17.4533 18.078 16.9467 17.7656 16.6343L14.8255 13.6942Z"
1318 })));
1319 };
1320 var FilterIcon = function FilterIcon(_ref10) {
1321 var _ref10$color = _ref10.color,
1322 color = _ref10$color === void 0 ? "#0A1018" : _ref10$color,
1323 _ref10$width = _ref10.width,
1324 width = _ref10$width === void 0 ? "18" : _ref10$width,
1325 _ref10$height = _ref10.height,
1326 height = _ref10$height === void 0 ? "18" : _ref10$height;
1327 return /*#__PURE__*/React.createElement("span", {
1328 className: "anticon"
1329 }, /*#__PURE__*/React.createElement("svg", {
1330 width: width,
1331 height: height,
1332 viewBox: "0 0 20 20",
1333 fill: color,
1334 xmlns: "http://www.w3.org/2000/svg"
1335 }, /*#__PURE__*/React.createElement("path", {
1336 d: "M11.6667 6.66667C11.6667 7.03486 11.9651 7.33333 12.3333 7.33333C12.7015 7.33333 13 7.03486 13 6.66667V5.33333H15.6667C16.0349 5.33333 16.3333 5.03486 16.3333 4.66667C16.3333 4.29848 16.0349 4 15.6667 4H13V2.66667C13 2.29848 12.7015 2 12.3333 2C11.9651 2 11.6667 2.29848 11.6667 2.66667V6.66667Z"
1337 }), /*#__PURE__*/React.createElement("path", {
1338 d: "M9.66667 9.33333C9.29848 9.33333 9 9.63181 9 10C9 10.3682 9.29848 10.6667 9.66667 10.6667H15.6667C16.0349 10.6667 16.3333 10.3682 16.3333 10C16.3333 9.63181 16.0349 9.33333 15.6667 9.33333H9.66667Z"
1339 }), /*#__PURE__*/React.createElement("path", {
1340 d: "M3 15.3333C3 14.9651 3.29848 14.6667 3.66667 14.6667H8.33333C8.70152 14.6667 9 14.9651 9 15.3333C9 15.7015 8.70152 16 8.33333 16H3.66667C3.29848 16 3 15.7015 3 15.3333Z"
1341 }), /*#__PURE__*/React.createElement("path", {
1342 d: "M11.6667 14.6667V13.3333C11.6667 12.9651 11.3682 12.6667 11 12.6667C10.6318 12.6667 10.3333 12.9651 10.3333 13.3333V17.3333C10.3333 17.7015 10.6318 18 11 18C11.3682 18 11.6667 17.7015 11.6667 17.3333V16H15.6667C16.0349 16 16.3333 15.7015 16.3333 15.3333C16.3333 14.9651 16.0349 14.6667 15.6667 14.6667H11.6667Z"
1343 }), /*#__PURE__*/React.createElement("path", {
1344 d: "M3 10C3 9.63181 3.29848 9.33333 3.66667 9.33333H6.33333V8C6.33333 7.63181 6.63181 7.33333 7 7.33333C7.36819 7.33333 7.66667 7.63181 7.66667 8V12C7.66667 12.3682 7.36819 12.6667 7 12.6667C6.63181 12.6667 6.33333 12.3682 6.33333 12V10.6667H3.66667C3.29848 10.6667 3 10.3682 3 10Z"
1345 }), /*#__PURE__*/React.createElement("path", {
1346 d: "M3 4.66667C3 4.29848 3.29848 4 3.66667 4H9.66667C10.0349 4 10.3333 4.29848 10.3333 4.66667C10.3333 5.03486 10.0349 5.33333 9.66667 5.33333H3.66667C3.29848 5.33333 3 5.03486 3 4.66667Z"
1347 })));
1348 };
1349 var GroupPeopleIcon = function GroupPeopleIcon(_ref11) {
1350 var _ref11$color = _ref11.color,
1351 color = _ref11$color === void 0 ? "#0A1018" : _ref11$color,
1352 _ref11$width = _ref11.width,
1353 width = _ref11$width === void 0 ? "18" : _ref11$width,
1354 _ref11$height = _ref11.height,
1355 height = _ref11$height === void 0 ? "18" : _ref11$height;
1356 return /*#__PURE__*/React.createElement("span", {
1357 className: "anticon"
1358 }, /*#__PURE__*/React.createElement("svg", {
1359 width: width,
1360 height: height,
1361 viewBox: "0 0 18 18",
1362 fill: color,
1363 xmlns: "http://www.w3.org/2000/svg"
1364 }, /*#__PURE__*/React.createElement("path", {
1365 fillRule: "evenodd",
1366 clipRule: "evenodd",
1367 d: "M8.90217 9.07826C7.38923 9.07826 6.16304 7.85207 6.16304 6.33913C6.16304 4.82619 7.38923 3.6 8.90217 3.6C8.93492 3.6 8.96753 3.60057 9 3.60171C9.03247 3.60057 9.06508 3.6 9.09783 3.6C10.6108 3.6 11.837 4.82619 11.837 6.33913C11.837 7.85207 10.6108 9.07826 9.09783 9.07826C9.06508 9.07826 9.03247 9.07769 9 9.07655C8.96753 9.07769 8.93492 9.07826 8.90217 9.07826ZM13.0601 14.5565H13.2557C13.6067 14.5565 13.8913 14.2719 13.8913 13.921C13.8913 11.8131 12.1836 10.1054 10.0758 10.1054H9.88013H8.11987H7.92422C5.81637 10.1054 4.1087 11.8131 4.1087 13.921C4.1087 14.2719 4.39331 14.5565 4.74426 14.5565H4.93991H13.0601ZM3.60795 14.5565H0.656965C0.295314 14.5565 0 14.2633 0 13.8996C0 11.9929 1.54504 10.4478 3.45173 10.4478H4.76566C4.81504 10.4478 4.86244 10.4498 4.91167 10.4519L4.91759 10.4521C4.00384 11.2353 3.42391 12.4016 3.42391 13.7005V13.8717C3.42391 14.1221 3.49239 14.3554 3.60795 14.5565ZM6.14806 8.37422C5.71365 8.80863 5.11447 9.07826 4.45109 9.07826C3.12646 9.07826 2.05435 8.00615 2.05435 6.68152C2.05435 5.3569 3.12646 4.28478 4.45109 4.28478C4.98179 4.28478 5.47184 4.45812 5.86987 4.74915C5.6195 5.22422 5.47826 5.76563 5.47826 6.33913C5.47826 7.10095 5.72649 7.80499 6.14806 8.37422ZM14.3921 14.5565H17.343C17.7047 14.5565 18 14.2633 18 13.8996C18 11.9929 16.455 10.4478 14.5483 10.4478H13.2343C13.185 10.4478 13.1376 10.4498 13.0883 10.4519L13.0824 10.4521C13.9962 11.2353 14.5761 12.4016 14.5761 13.7005V13.8717C14.5761 14.1221 14.5076 14.3554 14.3921 14.5565ZM11.8519 8.37422C12.2863 8.80863 12.8855 9.07826 13.5489 9.07826C14.8735 9.07826 15.9457 8.00615 15.9457 6.68152C15.9457 5.3569 14.8735 4.28478 13.5489 4.28478C13.0182 4.28478 12.5282 4.45812 12.1301 4.74915C12.3805 5.22422 12.5217 5.76563 12.5217 6.33913C12.5217 7.10095 12.2735 7.80499 11.8519 8.37422Z"
1368 })));
1369 };
1370 var TwoPeopleIcon = function TwoPeopleIcon(_ref12) {
1371 var _ref12$color = _ref12.color,
1372 color = _ref12$color === void 0 ? "#0A1018" : _ref12$color,
1373 _ref12$width = _ref12.width,
1374 width = _ref12$width === void 0 ? "18" : _ref12$width,
1375 _ref12$height = _ref12.height,
1376 height = _ref12$height === void 0 ? "18" : _ref12$height;
1377 return /*#__PURE__*/React.createElement("span", {
1378 className: "anticon"
1379 }, /*#__PURE__*/React.createElement("svg", {
1380 width: width,
1381 height: height,
1382 viewBox: "0 0 18 18",
1383 fill: color,
1384 xmlns: "http://www.w3.org/2000/svg"
1385 }, /*#__PURE__*/React.createElement("path", {
1386 d: "M9.9 5.4C9.9 7.38844 8.28844 9 6.3 9C4.31156 9 2.7 7.38844 2.7 5.4C2.7 3.41156 4.31156 1.8 6.3 1.8C8.28844 1.8 9.9 3.41156 9.9 5.4ZM0 15.3647C0 12.5944 2.24438 10.35 5.01469 10.35H7.58531C10.3556 10.35 12.6 12.5944 12.6 15.3647C12.6 15.8259 12.2259 16.2 11.7647 16.2H0.835313C0.374063 16.2 0 15.8259 0 15.3647ZM17.1366 16.2H13.2581C13.41 15.9356 13.5 15.6291 13.5 15.3V15.075C13.5 13.3678 12.7378 11.835 11.5369 10.8056C11.6044 10.8028 11.6691 10.8 11.7366 10.8H13.4634C15.9694 10.8 18 12.8306 18 15.3366C18 15.8147 17.6119 16.2 17.1366 16.2ZM12.15 9C11.2781 9 10.4906 8.64562 9.91969 8.07469C10.4738 7.32656 10.8 6.40125 10.8 5.4C10.8 4.64625 10.6144 3.93469 10.2853 3.31031C10.8084 2.92781 11.4525 2.7 12.15 2.7C13.8909 2.7 15.3 4.10906 15.3 5.85C15.3 7.59094 13.8909 9 12.15 9Z"
1387 })));
1388 };
1389 var ClockIcon = function ClockIcon(_ref13) {
1390 var _ref13$color = _ref13.color,
1391 color = _ref13$color === void 0 ? "#0A1018" : _ref13$color,
1392 _ref13$width = _ref13.width,
1393 width = _ref13$width === void 0 ? "18" : _ref13$width,
1394 _ref13$height = _ref13.height,
1395 height = _ref13$height === void 0 ? "18" : _ref13$height;
1396 return /*#__PURE__*/React.createElement("span", {
1397 className: "anticon"
1398 }, /*#__PURE__*/React.createElement("svg", {
1399 width: width,
1400 height: height,
1401 viewBox: "0 0 512 512",
1402 fill: color,
1403 xmlns: "http://www.w3.org/2000/svg"
1404 }, /*#__PURE__*/React.createElement("path", {
1405 d: "M256 512C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256s-114.6 256-256 256zM232 120V256c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"
1406 })));
1407 };
1408 var ArrowRightIcon = function ArrowRightIcon(_ref14) {
1409 var _ref14$color = _ref14.color,
1410 color = _ref14$color === void 0 ? "#0A1018" : _ref14$color,
1411 _ref14$width = _ref14.width,
1412 width = _ref14$width === void 0 ? "18" : _ref14$width,
1413 _ref14$height = _ref14.height,
1414 height = _ref14$height === void 0 ? "18" : _ref14$height;
1415 return /*#__PURE__*/React.createElement("span", {
1416 className: "anticon"
1417 }, /*#__PURE__*/React.createElement("svg", {
1418 width: width,
1419 height: height,
1420 fill: color,
1421 viewBox: "0 0 18 18",
1422 xmlns: "http://www.w3.org/2000/svg"
1423 }, /*#__PURE__*/React.createElement("path", {
1424 fillRule: "evenodd",
1425 clipRule: "evenodd",
1426 d: "M5.39644 15.9806C5.00536 15.5907 5.00446 14.9575 5.39443 14.5664L10.8603 9.085L5.39443 3.60358C5.00446 3.2125 5.00536 2.57934 5.39644 2.18937C5.78751 1.7994 6.42068 1.80029 6.81065 2.19137L12.9806 8.3789C13.3698 8.76919 13.3698 9.40081 12.9806 9.79111L6.81065 15.9786C6.42068 16.3697 5.78751 16.3706 5.39644 15.9806Z"
1427 })));
1428 };
1429 var ArrowRightIcon2 = function ArrowRightIcon2(_ref15) {
1430 var _ref15$color = _ref15.color,
1431 color = _ref15$color === void 0 ? "#0A1018" : _ref15$color,
1432 _ref15$width = _ref15.width,
1433 width = _ref15$width === void 0 ? "18" : _ref15$width,
1434 _ref15$height = _ref15.height,
1435 height = _ref15$height === void 0 ? "18" : _ref15$height;
1436 return /*#__PURE__*/React.createElement("span", {
1437 className: "anticon"
1438 }, /*#__PURE__*/React.createElement("svg", {
1439 width: width,
1440 height: height,
1441 viewBox: "0 0 20 20",
1442 fill: color,
1443 xmlns: "http://www.w3.org/2000/svg"
1444 }, /*#__PURE__*/React.createElement("path", {
1445 d: "M2 9.85698H15.714M11.1428 16.714L17.9998 9.85698L11.1428 3",
1446 stroke: "#0A1018",
1447 "stroke-width": "2",
1448 "stroke-linecap": "round",
1449 "stroke-linejoin": "round"
1450 })));
1451 };
1452 var ArrowLefttIcon = function ArrowLefttIcon(_ref16) {
1453 var _ref16$color = _ref16.color,
1454 color = _ref16$color === void 0 ? "#0A1018" : _ref16$color,
1455 _ref16$width = _ref16.width,
1456 width = _ref16$width === void 0 ? "18" : _ref16$width,
1457 _ref16$height = _ref16.height,
1458 height = _ref16$height === void 0 ? "18" : _ref16$height;
1459 return /*#__PURE__*/React.createElement("span", {
1460 className: "anticon"
1461 }, /*#__PURE__*/React.createElement("svg", {
1462 width: width,
1463 height: height,
1464 viewBox: "0 0 20 20",
1465 fill: color,
1466 xmlns: "http://www.w3.org/2000/svg"
1467 }, /*#__PURE__*/React.createElement("path", {
1468 d: "M18 9.85698H4.28603M8.8572 16.714L2.00021 9.85698L8.8572 3",
1469 stroke: "#0A1018",
1470 "stroke-width": "2",
1471 "stroke-linecap": "round",
1472 "stroke-linejoin": "round"
1473 })));
1474 };
1475 var HelpIcon = function HelpIcon(_ref17) {
1476 var _ref17$color = _ref17.color,
1477 color = _ref17$color === void 0 ? "#1890ff" : _ref17$color,
1478 _ref17$width = _ref17.width,
1479 width = _ref17$width === void 0 ? "20" : _ref17$width,
1480 _ref17$height = _ref17.height,
1481 height = _ref17$height === void 0 ? "20" : _ref17$height;
1482 return /*#__PURE__*/React.createElement("span", {
1483 className: "anticon"
1484 }, /*#__PURE__*/React.createElement("svg", {
1485 width: width,
1486 height: height,
1487 fill: color,
1488 viewBox: "0 0 20 20",
1489 xmlns: "http://www.w3.org/2000/svg"
1490 }, /*#__PURE__*/React.createElement("path", {
1491 d: "M11.0482 4.59418H5.30125C5.06778 4.59418 4.84329 4.60316 4.62778 4.63012C2.21225 4.83678 1 6.26546 1 8.89818V12.4923C1 16.0865 2.43674 16.7963 5.30125 16.7963H5.66044C5.85799 16.7963 6.1184 16.9311 6.23513 17.0839L7.31269 18.5215C7.78861 19.1595 8.56086 19.1595 9.03678 18.5215L10.1143 17.0839C10.249 16.9042 10.4645 16.7963 10.689 16.7963H11.0482C13.6793 16.7963 15.107 15.5923 15.3136 13.1662C15.3405 12.9506 15.3495 12.726 15.3495 12.4923V8.89818C15.3495 6.03184 13.9127 4.59418 11.0482 4.59418ZM5.04084 11.7825C4.53798 11.7825 4.14288 11.3781 4.14288 10.884C4.14288 10.3898 4.54696 9.98541 5.04084 9.98541C5.53472 9.98541 5.9388 10.3898 5.9388 10.884C5.9388 11.3781 5.53472 11.7825 5.04084 11.7825ZM8.17474 11.7825C7.67188 11.7825 7.27677 11.3781 7.27677 10.884C7.27677 10.3898 7.68086 9.98541 8.17474 9.98541C8.66862 9.98541 9.0727 10.3898 9.0727 10.884C9.0727 11.3781 8.6776 11.7825 8.17474 11.7825ZM11.3176 11.7825C10.8148 11.7825 10.4196 11.3781 10.4196 10.884C10.4196 10.3898 10.8237 9.98541 11.3176 9.98541C11.8115 9.98541 12.2156 10.3898 12.2156 10.884C12.2156 11.3781 11.8115 11.7825 11.3176 11.7825Z",
1492 fill: color
1493 }), /*#__PURE__*/React.createElement("path", {
1494 d: "M18.9422 5.304V8.89816C18.9422 10.6952 18.3855 11.9172 17.272 12.5912C17.0026 12.7529 16.6883 12.5372 16.6883 12.2227L16.6973 8.89816C16.6973 5.304 14.641 3.24635 11.0491 3.24635L5.58047 3.25533C5.26619 3.25533 5.05067 2.94084 5.21231 2.67128C5.88578 1.55709 7.10702 1 8.89398 1H14.641C17.5055 1 18.9422 2.43766 18.9422 5.304Z",
1495 fill: color
1496 })));
1497 };
1498 var DocumentIcon = function DocumentIcon(_ref18) {
1499 var _ref18$color = _ref18.color,
1500 color = _ref18$color === void 0 ? "#1890ff" : _ref18$color,
1501 _ref18$width = _ref18.width,
1502 width = _ref18$width === void 0 ? "18" : _ref18$width,
1503 _ref18$height = _ref18.height,
1504 height = _ref18$height === void 0 ? "18" : _ref18$height;
1505 return /*#__PURE__*/React.createElement("span", {
1506 className: "anticon"
1507 }, /*#__PURE__*/React.createElement("svg", {
1508 width: width,
1509 height: height,
1510 fill: color,
1511 viewBox: "0 0 18 18",
1512 xmlns: "http://www.w3.org/2000/svg"
1513 }, /*#__PURE__*/React.createElement("path", {
1514 d: "M12.4115 0.188982C12.0428 -0.180018 11.4042 0.0719816 11.4042 0.584982V3.72598C11.4042 5.03998 12.5194 6.12898 13.8776 6.12898C14.732 6.13798 15.9192 6.13798 16.9356 6.13798C17.4482 6.13798 17.7181 5.53498 17.3583 5.17498C16.0631 3.86998 13.7427 1.52098 12.4115 0.188982Z",
1515 fill: color
1516 }), /*#__PURE__*/React.createElement("path", {
1517 d: "M16.6398 7.371H14.0404C11.9088 7.371 10.1729 5.634 10.1729 3.501V0.9C10.1729 0.405 9.76819 0 9.27351 0H5.45997C2.68975 0 0.450195 1.8 0.450195 5.013V12.987C0.450195 16.2 2.68975 18 5.45997 18H12.5294C15.2996 18 17.5392 16.2 17.5392 12.987V8.271C17.5392 7.776 17.1344 7.371 16.6398 7.371ZM8.54498 14.175H4.9473C4.57854 14.175 4.27273 13.869 4.27273 13.5C4.27273 13.131 4.57854 12.825 4.9473 12.825H8.54498C8.91374 12.825 9.21955 13.131 9.21955 13.5C9.21955 13.869 8.91374 14.175 8.54498 14.175ZM10.3438 10.575H4.9473C4.57854 10.575 4.27273 10.269 4.27273 9.9C4.27273 9.531 4.57854 9.225 4.9473 9.225H10.3438C10.7126 9.225 11.0184 9.531 11.0184 9.9C11.0184 10.269 10.7126 10.575 10.3438 10.575Z",
1518 fill: color
1519 })));
1520 };
1521 var FeatureIcon = function FeatureIcon(_ref19) {
1522 var _ref19$color = _ref19.color,
1523 color = _ref19$color === void 0 ? "#1890ff" : _ref19$color,
1524 _ref19$width = _ref19.width,
1525 width = _ref19$width === void 0 ? "18" : _ref19$width,
1526 _ref19$height = _ref19.height,
1527 height = _ref19$height === void 0 ? "18" : _ref19$height;
1528 return /*#__PURE__*/React.createElement("span", {
1529 className: "anticon"
1530 }, /*#__PURE__*/React.createElement("svg", {
1531 width: width,
1532 height: height,
1533 fill: color,
1534 viewBox: "0 0 18 19",
1535 xmlns: "http://www.w3.org/2000/svg"
1536 }, /*#__PURE__*/React.createElement("path", {
1537 fillRule: "evenodd",
1538 clipRule: "evenodd",
1539 d: "M13.5902 7.57803H16.1896C16.6843 7.57803 17.089 7.98303 17.089 8.47803V13.194C17.089 16.407 14.8494 18.207 12.0792 18.207H5.00977C2.23956 18.207 0 16.407 0 13.194V5.22003C0 2.00703 2.23956 0.207031 5.00977 0.207031H8.82332C9.318 0.207031 9.72274 0.612031 9.72274 1.10703V3.70803C9.72274 5.84103 11.4586 7.57803 13.5902 7.57803ZM11.9613 0.396012C11.5926 0.0270125 10.954 0.279013 10.954 0.792013V3.93301C10.954 5.24701 12.0693 6.33601 13.4274 6.33601C14.2818 6.34501 15.4689 6.34501 16.4852 6.34501H16.4854C16.998 6.34501 17.2679 5.74201 16.9081 5.38201C16.4894 4.96018 15.9637 4.42927 15.3988 3.85888L15.3932 3.85325L15.3913 3.85133L15.3905 3.8505L15.3902 3.85016C14.2096 2.65803 12.86 1.29526 11.9613 0.396012ZM3.0145 12.0732C3.0145 11.7456 3.28007 11.48 3.60768 11.48H5.32132V9.76639C5.32132 9.43879 5.58689 9.17321 5.9145 9.17321C6.2421 9.17321 6.50768 9.43879 6.50768 9.76639V11.48H8.22131C8.54892 11.48 8.8145 11.7456 8.8145 12.0732C8.8145 12.4008 8.54892 12.6664 8.22131 12.6664H6.50768V14.38C6.50768 14.7076 6.2421 14.9732 5.9145 14.9732C5.58689 14.9732 5.32132 14.7076 5.32132 14.38V12.6664H3.60768C3.28007 12.6664 3.0145 12.4008 3.0145 12.0732Z"
1540 })));
1541 };
1542 var UserIcon = function UserIcon(_ref20) {
1543 var _ref20$color = _ref20.color,
1544 color = _ref20$color === void 0 ? "#0A1018" : _ref20$color,
1545 _ref20$width = _ref20.width,
1546 width = _ref20$width === void 0 ? "18" : _ref20$width,
1547 _ref20$height = _ref20.height,
1548 height = _ref20$height === void 0 ? "18" : _ref20$height;
1549 return /*#__PURE__*/React.createElement("span", {
1550 className: "anticon"
1551 }, /*#__PURE__*/React.createElement("svg", {
1552 width: width,
1553 height: height,
1554 viewBox: "0 0 18 18",
1555 fill: color,
1556 xmlns: "http://www.w3.org/2000/svg"
1557 }, /*#__PURE__*/React.createElement("path", {
1558 d: "M12.6 5.4C12.6 7.38844 10.9884 9 8.99995 9C7.01151 9 5.39995 7.38844 5.39995 5.4C5.39995 3.41156 7.01151 1.8 8.99995 1.8C10.9884 1.8 12.6 3.41156 12.6 5.4ZM2.69995 15.3647C2.69995 12.5944 4.94433 10.35 7.71464 10.35H10.2853C13.0556 10.35 15.3 12.5944 15.3 15.3647C15.3 15.8259 14.9259 16.2 14.4646 16.2H3.53526C3.07401 16.2 2.69995 15.8259 2.69995 15.3647Z"
1559 })));
1560 };
1561 var StarIcon = function StarIcon(_ref21) {
1562 var _ref21$color = _ref21.color,
1563 color = _ref21$color === void 0 ? "#0A1018" : _ref21$color,
1564 _ref21$width = _ref21.width,
1565 width = _ref21$width === void 0 ? "18" : _ref21$width,
1566 _ref21$height = _ref21.height,
1567 height = _ref21$height === void 0 ? "18" : _ref21$height;
1568 return /*#__PURE__*/React.createElement("span", {
1569 className: "anticon"
1570 }, /*#__PURE__*/React.createElement("svg", {
1571 width: width,
1572 height: height,
1573 viewBox: "0 0 16 16",
1574 fill: color,
1575 xmlns: "http://www.w3.org/2000/svg"
1576 }, /*#__PURE__*/React.createElement("path", {
1577 fillRule: "evenodd",
1578 clipRule: "evenodd",
1579 d: "M7.31171 2.02343C7.31162 2.0236 7.31179 2.02326 7.31171 2.02343L6.02201 4.62263C5.87468 4.92425 5.63147 5.17748 5.3861 5.36081C5.13993 5.54473 4.83023 5.70415 4.50625 5.75958L4.50393 5.75998L2.16361 6.15179C2.1635 6.15181 2.16372 6.15177 2.16361 6.15179C1.53002 6.25828 1.36693 6.50183 1.33587 6.59987C1.30459 6.69855 1.29782 6.9928 1.75157 7.45002L3.57126 9.28367C3.82431 9.53866 3.99034 9.8757 4.08129 10.1958C4.17232 10.5163 4.20784 10.8891 4.13024 11.238L4.12926 11.2424L3.60828 13.5123C3.41655 14.3472 3.6249 14.5927 3.66782 14.6243C3.71125 14.6562 4.00801 14.7812 4.74106 14.3428L6.93988 13.0312C7.26577 12.8401 7.65149 12.7635 8.00114 12.7635C8.35019 12.7635 8.7366 12.8399 9.06146 13.0339L11.2546 14.3421C11.9945 14.7825 12.2905 14.6574 12.3319 14.6269C12.3723 14.5972 12.581 14.354 12.3884 13.5118L11.8665 11.238C11.7889 10.8891 11.8245 10.5163 11.9155 10.1958C12.0064 9.8757 12.1725 9.53866 12.4255 9.28367L14.2452 7.45002L14.2468 7.44842C14.7035 6.99134 14.695 6.69818 14.6641 6.60108C14.6326 6.50249 14.4678 6.25844 13.8335 6.15185C13.8334 6.15183 13.8336 6.15187 13.8335 6.15185L11.4929 5.75998C11.1659 5.70506 10.8538 5.54633 10.6055 5.36173C10.3584 5.17799 10.1149 4.92449 9.96747 4.62268L8.6765 2.02094C8.3757 1.41153 8.09125 1.33088 7.99747 1.33088C7.90253 1.33088 7.61609 1.41346 7.31171 2.02343ZM9.85875 1.42766C9.46248 0.625148 8.82618 0 7.99747 0C7.16976 0 6.53156 0.623978 6.13164 1.42576L4.83963 4.0296L4.83722 4.03449C4.80832 4.09396 4.72941 4.19465 4.59946 4.29174C4.47014 4.38837 4.35107 4.43598 4.28597 4.44735C4.28625 4.4473 4.28569 4.4474 4.28597 4.44735L1.94681 4.83897C1.08384 4.9839 0.325465 5.41322 0.0777134 6.19502C-0.169838 6.9762 0.200137 7.76883 0.817662 8.39109L2.63735 10.2247C2.69248 10.2803 2.76491 10.398 2.81154 10.5621C2.85778 10.7249 2.85924 10.8651 2.84182 10.9454L2.32152 13.2123C2.32153 13.2123 2.32152 13.2124 2.32152 13.2123C2.10238 14.1667 2.1655 15.1672 2.88932 15.6994C3.61265 16.2312 4.57794 15.9879 5.4151 15.4873L7.60408 14.1815C7.60462 14.1812 7.60516 14.1809 7.6057 14.1806C7.68372 14.1354 7.82555 14.0943 8.00114 14.0943C8.17856 14.0943 8.31677 14.1362 8.38814 14.1788L10.5823 15.4877C11.4199 15.9863 12.3865 16.2338 13.11 15.7023C13.8346 15.17 13.8937 14.1674 13.6754 13.2129L13.155 10.9453C13.1375 10.8651 13.139 10.7249 13.1852 10.5621C13.2319 10.398 13.3043 10.2803 13.3594 10.2247L15.1775 8.3927C15.1777 8.39248 15.1779 8.39227 15.1782 8.39206C15.7997 7.76975 16.171 6.9763 15.9214 6.19382C15.6722 5.41256 14.9126 4.98385 14.0503 4.83902L11.7096 4.44716C11.6403 4.43543 11.5191 4.38703 11.3897 4.29082C11.2597 4.19416 11.181 4.09375 11.1522 4.03449L9.85875 1.42766C9.85885 1.42786 9.85866 1.42746 9.85875 1.42766Z"
1580 })));
1581 };
1582 var EyeFileIcon = function EyeFileIcon(_ref22) {
1583 var _ref22$color = _ref22.color,
1584 color = _ref22$color === void 0 ? "#0A1018" : _ref22$color,
1585 _ref22$width = _ref22.width,
1586 width = _ref22$width === void 0 ? "18" : _ref22$width,
1587 _ref22$height = _ref22.height,
1588 height = _ref22$height === void 0 ? "18" : _ref22$height;
1589 return /*#__PURE__*/React.createElement("span", {
1590 className: "anticon"
1591 }, /*#__PURE__*/React.createElement("svg", {
1592 width: width,
1593 height: height,
1594 viewBox: "0 0 18 18",
1595 fill: color,
1596 xmlns: "http://www.w3.org/2000/svg"
1597 }, /*#__PURE__*/React.createElement("path", {
1598 d: "M16.4924 6.4332C14.6213 3.4929 11.8835 1.8 8.9999 1.8C7.5581 1.8 6.1568 2.2212 4.877 3.0069C3.5972 3.8007 2.447 4.959 1.5074 6.4332C0.697402 7.7049 0.697402 9.7704 1.5074 11.0421C3.3785 13.9905 6.1163 15.6753 8.9999 15.6753C10.4417 15.6753 11.843 15.2541 13.1228 14.4684C14.4026 13.6746 15.5528 12.5163 16.4924 11.0421C17.3024 9.7785 17.3024 7.7049 16.4924 6.4332ZM8.9999 12.0141C7.1855 12.0141 5.7275 10.548 5.7275 8.7417C5.7275 6.9354 7.1855 5.4693 8.9999 5.4693C10.8143 5.4693 12.2723 6.9354 12.2723 8.7417C12.2723 10.548 10.8143 12.0141 8.9999 12.0141Z"
1599 }), /*#__PURE__*/React.createElement("path", {
1600 d: "M9.00015 6.42507C7.72845 6.42507 6.69165 7.46186 6.69165 8.74167C6.69165 10.0134 7.72845 11.0502 9.00015 11.0502C10.2719 11.0502 11.3168 10.0134 11.3168 8.74167C11.3168 7.46996 10.2719 6.42507 9.00015 6.42507Z"
1601 })));
1602 };
1603 var EyeStrokeIcon = function EyeStrokeIcon(_ref23) {
1604 var _ref23$color = _ref23.color,
1605 color = _ref23$color === void 0 ? "#0A1018" : _ref23$color,
1606 _ref23$width = _ref23.width,
1607 width = _ref23$width === void 0 ? "18" : _ref23$width,
1608 _ref23$height = _ref23.height,
1609 height = _ref23$height === void 0 ? "18" : _ref23$height;
1610 return /*#__PURE__*/React.createElement("span", {
1611 className: "anticon"
1612 }, /*#__PURE__*/React.createElement("svg", {
1613 width: width,
1614 height: height,
1615 viewBox: "0 0 18 18",
1616 fill: color,
1617 xmlns: "http://www.w3.org/2000/svg"
1618 }, /*#__PURE__*/React.createElement("path", {
1619 fillRule: "evenodd",
1620 clipRule: "evenodd",
1621 d: "M8.99965 10.2677C9.8931 10.2677 10.6132 9.54762 10.6132 8.65417C10.6132 7.76071 9.8931 7.04065 8.99965 7.04065C8.10619 7.04065 7.38613 7.76071 7.38613 8.65417C7.38613 9.54762 8.10619 10.2677 8.99965 10.2677ZM8.99965 11.6177C10.6387 11.6177 11.9632 10.2932 11.9632 8.65417C11.9632 7.01513 10.6387 5.69065 8.99965 5.69065C7.36061 5.69065 6.03613 7.01513 6.03613 8.65417C6.03613 10.2932 7.36061 11.6177 8.99965 11.6177Z"
1622 }), /*#__PURE__*/React.createElement("path", {
1623 fillRule: "evenodd",
1624 clipRule: "evenodd",
1625 d: "M15.4021 10.0736L15.4032 10.0718C15.604 9.75728 15.7499 9.24465 15.7499 8.65002C15.7499 8.0554 15.604 7.54276 15.4032 7.22824L15.4021 7.22647C13.6881 4.53198 11.3494 3.15 8.9999 3.15C6.65044 3.15 4.31173 4.53198 2.59774 7.22647L2.59661 7.22824C2.39585 7.54276 2.2499 8.0554 2.2499 8.65002C2.2499 9.24465 2.39585 9.75728 2.59661 10.0718L2.59774 10.0736C4.31173 12.7681 6.65044 14.1501 8.9999 14.1501C11.3494 14.1501 13.6881 12.7681 15.4021 10.0736ZM1.45867 10.7982C0.713648 9.63097 0.713648 7.66908 1.45867 6.50189C3.35432 3.52182 6.07778 1.8 8.9999 1.8C11.922 1.8 14.6455 3.52182 16.5411 6.50189C17.2862 7.66908 17.2862 9.63097 16.5411 10.7982C14.6455 13.7782 11.922 15.5001 8.9999 15.5001C6.07778 15.5001 3.35432 13.7782 1.45867 10.7982Z"
1626 })));
1627 };
1628 var GoogleMeet = function GoogleMeet() {
1629 return /*#__PURE__*/React.createElement("svg", {
1630 width: "20",
1631 height: "20",
1632 viewBox: "0 0 20 20",
1633 fill: "none",
1634 xmlns: "http://www.w3.org/2000/svg"
1635 }, /*#__PURE__*/React.createElement("path", {
1636 d: "M11.1816 10.4049L12.9362 12.4103L15.2955 13.9181L15.7068 10.4172L15.2955 6.99451L12.8909 8.31916L11.1816 10.4049Z",
1637 fill: "#00832D"
1638 }), /*#__PURE__*/React.createElement("path", {
1639 d: "M1 13.5931V16.5756C1 17.2575 1.55228 17.8097 2.23414 17.8097H5.21666L5.83373 15.5554L5.21666 13.5931L3.17004 12.976L1 13.5931Z",
1640 fill: "#0066DA"
1641 }), /*#__PURE__*/React.createElement("path", {
1642 d: "M5.21666 3L1 7.21666L3.17004 7.83373L5.21666 7.21666L5.82345 5.28111L5.21666 3Z",
1643 fill: "#E94235"
1644 }), /*#__PURE__*/React.createElement("path", {
1645 d: "M5.21666 7.21666H1V13.5931H5.21666V7.21666Z",
1646 fill: "#2684FC"
1647 }), /*#__PURE__*/React.createElement("path", {
1648 d: "M17.9902 4.78541L15.2956 6.99453V13.9181L18.0025 16.1375C18.4077 16.4542 19.0001 16.1652 19.0001 15.65V5.26261C19.0001 4.74118 18.3944 4.45527 17.9902 4.78541ZM11.1818 10.4049V13.5931H5.2168V17.8097H14.0615C14.7434 17.8097 15.2956 17.2575 15.2956 16.5756V13.9181L11.1818 10.4049Z",
1649 fill: "#00AC47"
1650 }), /*#__PURE__*/React.createElement("path", {
1651 d: "M14.0615 3H5.2168V7.21666H11.1818V10.4049L15.2956 6.99657V4.23414C15.2956 3.55228 14.7434 3 14.0615 3Z",
1652 fill: "#FFBA00"
1653 }));
1654 };
1655 var Location = function Location(_ref24) {
1656 var _ref24$color = _ref24.color,
1657 color = _ref24$color === void 0 ? "#0A1018" : _ref24$color,
1658 _ref24$width = _ref24.width,
1659 width = _ref24$width === void 0 ? "20" : _ref24$width,
1660 _ref24$height = _ref24.height,
1661 height = _ref24$height === void 0 ? "20" : _ref24$height;
1662 return /*#__PURE__*/React.createElement("span", {
1663 className: "anticon"
1664 }, /*#__PURE__*/React.createElement("svg", {
1665 width: width,
1666 height: height,
1667 viewBox: "0 0 20 20",
1668 fill: color,
1669 xmlns: "http://www.w3.org/2000/svg"
1670 }, /*#__PURE__*/React.createElement("path", {
1671 d: "M9.98574 1C8.0012 1.00218 6.09855 1.79146 4.6952 3.19467C3.29184 4.59788 2.50238 6.50045 2.5 8.48499C2.5 10.4125 3.9925 13.429 6.93624 17.4505C7.28669 17.9306 7.74553 18.3211 8.27544 18.5904C8.80535 18.8597 9.39135 19 9.98574 19C10.5801 19 11.1661 18.8597 11.696 18.5904C12.2259 18.3211 12.6848 17.9306 13.0352 17.4505C15.979 13.429 17.4715 10.4125 17.4715 8.48499C17.4691 6.50045 16.6796 4.59788 15.2763 3.19467C13.8729 1.79146 11.9703 1.00218 9.98574 1ZM9.98574 11.4685C9.3924 11.4685 8.81238 11.2925 8.31903 10.9629C7.82568 10.6332 7.44117 10.1647 7.2141 9.61654C6.98704 9.06836 6.92763 8.46516 7.04339 7.88322C7.15914 7.30128 7.44486 6.76673 7.86442 6.34717C8.28398 5.92761 8.81853 5.64189 9.40047 5.52614C9.98241 5.41038 10.5856 5.46979 11.1338 5.69685C11.682 5.92392 12.1505 6.30843 12.4801 6.80178C12.8098 7.29513 12.9857 7.87515 12.9857 8.46849C12.9857 9.26414 12.6697 10.0272 12.1071 10.5898C11.5444 11.1524 10.7814 11.4685 9.98574 11.4685Z"
1672 })));
1673 };
1674 var Phone = function Phone(_ref25) {
1675 var _ref25$color = _ref25.color,
1676 color = _ref25$color === void 0 ? "#0A1018" : _ref25$color,
1677 _ref25$width = _ref25.width,
1678 width = _ref25$width === void 0 ? "20" : _ref25$width,
1679 _ref25$height = _ref25.height,
1680 height = _ref25$height === void 0 ? "20" : _ref25$height;
1681 return /*#__PURE__*/React.createElement("span", {
1682 className: "anticon"
1683 }, /*#__PURE__*/React.createElement("svg", {
1684 width: width,
1685 height: height,
1686 viewBox: "0 0 20 20",
1687 fill: color,
1688 xmlns: "http://www.w3.org/2000/svg"
1689 }, /*#__PURE__*/React.createElement("path", {
1690 d: "M18.2201 9.24952C18.0212 9.24952 17.8305 9.17052 17.6899 9.0299C17.5493 8.88928 17.4703 8.69855 17.4703 8.49968C17.4687 6.90922 16.8362 5.38435 15.7115 4.25972C14.5869 3.13509 13.062 2.50258 11.4716 2.50099C11.2727 2.50099 11.082 2.42199 10.9414 2.28137C10.8007 2.14075 10.7217 1.95003 10.7217 1.75116C10.7217 1.55229 10.8007 1.36156 10.9414 1.22094C11.082 1.08032 11.2727 1.00132 11.4716 1.00132C13.4596 1.0035 15.3656 1.79421 16.7713 3.19995C18.177 4.60569 18.9678 6.51166 18.9699 8.49968C18.9699 8.69855 18.8909 8.88928 18.7503 9.0299C18.6097 9.17052 18.419 9.24952 18.2201 9.24952ZM15.9706 8.49968C15.9706 7.30647 15.4966 6.16213 14.6529 5.3184C13.8091 4.47467 12.6648 4.00067 11.4716 4.00067C11.2727 4.00067 11.082 4.07967 10.9414 4.22029C10.8007 4.36091 10.7217 4.55163 10.7217 4.7505C10.7217 4.94937 10.8007 5.14009 10.9414 5.28072C11.082 5.42134 11.2727 5.50034 11.4716 5.50034C12.267 5.50034 13.0299 5.81634 13.5924 6.37883C14.1549 6.94131 14.4709 7.70421 14.4709 8.49968C14.4709 8.69855 14.5499 8.88928 14.6905 9.0299C14.8312 9.17052 15.0219 9.24952 15.2208 9.24952C15.4196 9.24952 15.6103 9.17052 15.751 9.0299C15.8916 8.88928 15.9706 8.69855 15.9706 8.49968ZM17.6075 17.6207L18.2898 16.8341C18.7241 16.3984 18.968 15.8083 18.968 15.1931C18.968 14.5779 18.7241 13.9878 18.2898 13.5521C18.2666 13.5288 16.4625 12.1409 16.4625 12.1409C16.0295 11.7287 15.4544 11.4992 14.8566 11.5001C14.2588 11.5009 13.6843 11.732 13.2524 12.1454L11.8232 13.3496C10.6566 12.8668 9.59689 12.1583 8.70489 11.2647C7.81288 10.3712 7.10618 9.31021 6.62538 8.14276L7.82512 6.71807C8.23881 6.2863 8.4702 5.7117 8.47118 5.11373C8.47215 4.51575 8.24265 3.9404 7.83037 3.50727C7.83037 3.50727 6.44092 1.70542 6.41767 1.68217C5.98986 1.25158 5.4098 1.00658 4.80285 1.00013C4.19589 0.993677 3.61076 1.22628 3.17388 1.64768L2.31157 2.39752C-2.78282 8.30773 8.18729 19.1931 14.2925 18.9974C14.909 19.001 15.5199 18.881 16.0893 18.6445C16.6587 18.4081 17.1749 18.06 17.6075 17.6207Z"
1691 })));
1692 };
1693 var GoogleCalendar = function GoogleCalendar() {
1694 return /*#__PURE__*/React.createElement("svg", {
1695 width: "20",
1696 height: "20",
1697 viewBox: "0 0 20 20",
1698 fill: "none",
1699 xmlns: "http://www.w3.org/2000/svg"
1700 }, /*#__PURE__*/React.createElement("path", {
1701 d: "M14.7388 5.26241L10.4758 4.78874L5.26526 5.26241L4.7915 9.99925L5.26517 14.7361L10.002 15.3282L14.7388 14.7361L15.2125 9.8809L14.7388 5.26241Z",
1702 fill: "white"
1703 }), /*#__PURE__*/React.createElement("path", {
1704 d: "M7.21058 12.6124C6.85653 12.3732 6.61137 12.0239 6.47754 11.562L7.29941 11.2233C7.37402 11.5075 7.50425 11.7278 7.69019 11.8841C7.87496 12.0404 8.09995 12.1174 8.36284 12.1174C8.63167 12.1174 8.86261 12.0357 9.05557 11.8722C9.24852 11.7088 9.34572 11.5003 9.34572 11.2482C9.34572 10.99 9.24384 10.7792 9.04018 10.6158C8.83651 10.4525 8.58073 10.3707 8.27518 10.3707H7.80035V9.55717H8.22658C8.48947 9.55717 8.71096 9.48616 8.89096 9.34405C9.07096 9.20194 9.16096 9.00772 9.16096 8.76022C9.16096 8.54 9.08041 8.36468 8.9194 8.23328C8.75839 8.10188 8.55463 8.03555 8.30713 8.03555C8.06557 8.03555 7.8737 8.09954 7.73159 8.2286C7.58948 8.35766 7.48643 8.51633 7.42136 8.70344L6.60786 8.36477C6.71559 8.05922 6.91341 7.78922 7.20347 7.55595C7.49363 7.32267 7.86425 7.2054 8.31424 7.2054C8.64697 7.2054 8.94658 7.26939 9.21189 7.39845C9.47712 7.52751 9.68556 7.70633 9.83595 7.93367C9.98634 8.16218 10.0609 8.41805 10.0609 8.70218C10.0609 8.99233 9.99111 9.2374 9.85134 9.43873C9.71157 9.64006 9.53985 9.79396 9.33618 9.90177V9.95028C9.60501 10.0628 9.82407 10.2345 9.99696 10.4654C10.1687 10.6964 10.2551 10.9723 10.2551 11.2944C10.2551 11.6165 10.1734 11.9043 10.0099 12.1565C9.84648 12.4088 9.62031 12.6077 9.33375 12.7521C9.04603 12.8966 8.72275 12.97 8.36392 12.97C7.94831 12.9712 7.56464 12.8516 7.21058 12.6124Z",
1705 fill: "#1A73E8"
1706 }), /*#__PURE__*/React.createElement("path", {
1707 d: "M12.2531 8.5348L11.3555 9.1873L10.9043 8.50285L12.5231 7.33521H13.1437V12.8429H12.2531V8.5348Z",
1708 fill: "#1A73E8"
1709 }), /*#__PURE__*/React.createElement("path", {
1710 d: "M14.7388 18.9995L19.0019 14.7364L16.8704 13.7891L14.7388 14.7364L13.7915 16.8679L14.7388 18.9995Z",
1711 fill: "#EA4335"
1712 }), /*#__PURE__*/React.createElement("path", {
1713 d: "M4.3125 16.8685L5.25983 19H14.7334V14.7369H5.25983L4.3125 16.8685Z",
1714 fill: "#34A853"
1715 }), /*#__PURE__*/React.createElement("path", {
1716 d: "M2.421 1C1.63593 1 1 1.63593 1 2.421V14.7367L3.13154 15.684L5.26308 14.7367V5.26308H14.7367L15.684 3.13154L14.7368 1H2.421Z",
1717 fill: "#4285F4"
1718 }), /*#__PURE__*/React.createElement("path", {
1719 d: "M1 14.7369V17.579C1 18.3641 1.63593 19 2.421 19H5.26308V14.7369H1Z",
1720 fill: "#188038"
1721 }), /*#__PURE__*/React.createElement("path", {
1722 d: "M14.7393 5.26249V14.7361H19.0023V5.26249L16.8708 4.31516L14.7393 5.26249Z",
1723 fill: "#FBBC04"
1724 }), /*#__PURE__*/React.createElement("path", {
1725 d: "M19.0023 5.26308V2.421C19.0023 1.63584 18.3664 1 17.5813 1H14.7393V5.26308H19.0023Z",
1726 fill: "#1967D2"
1727 }));
1728 };
1729 var Zoom = function Zoom() {
1730 return /*#__PURE__*/React.createElement("svg", {
1731 width: "20",
1732 height: "20",
1733 viewBox: "0 0 20 20",
1734 fill: "none",
1735 xmlns: "http://www.w3.org/2000/svg"
1736 }, /*#__PURE__*/React.createElement("path", {
1737 d: "M17.2165 18H4.30818C3.45491 18 2.64541 17.5519 2.2516 16.7869C1.80309 15.9126 1.96718 14.8634 2.65635 14.1748L11.6375 5.20219H5.20519C3.43304 5.20219 2 3.7705 2 2H13.8909C14.7442 2 15.5537 2.44809 15.9475 3.21311C16.396 4.08743 16.2319 5.13661 15.5428 5.82514L6.56165 14.7978H14.0113C15.7834 14.7978 17.2165 16.2295 17.2165 18Z",
1738 fill: "#0B5CFF"
1739 }));
1740 };
1741 var OverviewMoneyIcon = function OverviewMoneyIcon() {
1742 return /*#__PURE__*/React.createElement("svg", {
1743 width: "70",
1744 height: "70",
1745 viewBox: "0 0 70 70",
1746 fill: "none",
1747 xmlns: "http://www.w3.org/2000/svg"
1748 }, /*#__PURE__*/React.createElement("circle", {
1749 opacity: "0.15",
1750 cx: "35",
1751 cy: "35",
1752 r: "35",
1753 fill: "#F07B27"
1754 }), /*#__PURE__*/React.createElement("path", {
1755 d: "M33.9497 29.5122V33.5162L32.5357 33.0262C31.8217 32.7742 31.3877 32.5362 31.3877 31.3182C31.3877 30.3242 32.1297 29.5122 33.0397 29.5122H33.9497V29.5122Z",
1756 fill: "#F07B27"
1757 }), /*#__PURE__*/React.createElement("path", {
1758 d: "M38.6118 38.6821C38.6118 39.6761 37.8698 40.4881 36.9598 40.4881H36.0498V36.4841L37.4638 36.9741C38.1778 37.2261 38.6118 37.4641 38.6118 38.6821Z",
1759 fill: "#F07B27"
1760 }), /*#__PURE__*/React.createElement("path", {
1761 d: "M40.866 21H29.134C24.038 21 21 24.038 21 29.134V40.866C21 45.962 24.038 49 29.134 49H40.866C45.962 49 49 45.962 49 40.866V29.134C49 24.038 45.962 21 40.866 21ZM38.164 35C39.256 35.378 40.712 36.176 40.712 38.682C40.712 40.838 39.032 42.588 36.96 42.588H36.05V43.4C36.05 43.974 35.574 44.45 35 44.45C34.426 44.45 33.95 43.974 33.95 43.4V42.588H33.446C31.15 42.588 29.288 40.642 29.288 38.262C29.288 37.688 29.75 37.212 30.338 37.212C30.912 37.212 31.388 37.688 31.388 38.262C31.388 39.494 32.312 40.488 33.446 40.488H33.95V35.742L31.836 35C30.744 34.622 29.288 33.824 29.288 31.318C29.288 29.162 30.968 27.412 33.04 27.412H33.95V26.6C33.95 26.026 34.426 25.55 35 25.55C35.574 25.55 36.05 26.026 36.05 26.6V27.412H36.554C38.85 27.412 40.712 29.358 40.712 31.738C40.712 32.312 40.25 32.788 39.662 32.788C39.088 32.788 38.612 32.312 38.612 31.738C38.612 30.506 37.688 29.512 36.554 29.512H36.05V34.258L38.164 35Z",
1762 fill: "#F07B27"
1763 }));
1764 };
1765 var OverviewPersonIcon = function OverviewPersonIcon() {
1766 return /*#__PURE__*/React.createElement("svg", {
1767 width: "70",
1768 height: "70",
1769 viewBox: "0 0 70 70",
1770 fill: "none",
1771 xmlns: "http://www.w3.org/2000/svg"
1772 }, /*#__PURE__*/React.createElement("circle", {
1773 opacity: "0.15",
1774 cx: "35",
1775 cy: "35",
1776 r: "35",
1777 fill: "#01AF28"
1778 }), /*#__PURE__*/React.createElement("path", {
1779 d: "M36.4 29.4C36.4 32.4931 33.8931 35 30.8 35C27.7069 35 25.2 32.4931 25.2 29.4C25.2 26.3069 27.7069 23.8 30.8 23.8C33.8931 23.8 36.4 26.3069 36.4 29.4ZM21 44.9006C21 40.5913 24.4913 37.1 28.8006 37.1H32.7994C37.1088 37.1 40.6 40.5913 40.6 44.9006C40.6 45.6181 40.0181 46.2 39.3006 46.2H22.2994C21.5819 46.2 21 45.6181 21 44.9006ZM47.6569 46.2H41.6238C41.86 45.7888 42 45.3119 42 44.8V44.45C42 41.7944 40.8144 39.41 38.9463 37.8088C39.0513 37.8044 39.1519 37.8 39.2569 37.8H41.9431C45.8413 37.8 49 40.9588 49 44.8569C49 45.6006 48.3962 46.2 47.6569 46.2ZM39.9 35C38.5437 35 37.3188 34.4488 36.4306 33.5606C37.2925 32.3969 37.8 30.9575 37.8 29.4C37.8 28.2275 37.5113 27.1206 36.9994 26.1494C37.8131 25.5544 38.815 25.2 39.9 25.2C42.6081 25.2 44.8 27.3919 44.8 30.1C44.8 32.8081 42.6081 35 39.9 35Z",
1780 fill: "#01AF28"
1781 }));
1782 };
1783 var OverviewUserIcon = function OverviewUserIcon() {
1784 return /*#__PURE__*/React.createElement("svg", {
1785 width: "70",
1786 height: "70",
1787 viewBox: "0 0 70 70",
1788 fill: "none",
1789 xmlns: "http://www.w3.org/2000/svg"
1790 }, /*#__PURE__*/React.createElement("circle", {
1791 opacity: "0.17",
1792 cx: "35",
1793 cy: "35",
1794 r: "35",
1795 fill: "#AB2BE7"
1796 }), /*#__PURE__*/React.createElement("path", {
1797 d: "M40.0604 23.2728H29.3947C24.7619 23.2728 22 26.0346 22 30.6675V41.3332C22 44.9096 23.6419 47.366 26.531 48.2951C27.371 48.5879 28.3383 48.7279 29.3947 48.7279H40.0604C41.1168 48.7279 42.0841 48.5879 42.9241 48.2951C45.8133 47.366 47.4551 44.9096 47.4551 41.3332V30.6675C47.4551 26.0346 44.6932 23.2728 40.0604 23.2728ZM45.546 41.3332C45.546 44.0568 44.4769 45.7751 42.3259 46.4878C41.0913 44.0568 38.164 42.3259 34.7276 42.3259C31.2911 42.3259 28.3765 44.0441 27.1292 46.4878H27.1165C24.991 45.8005 23.9091 44.0696 23.9091 41.3459V30.6675C23.9091 27.0783 25.8055 25.1819 29.3947 25.1819H40.0604C43.6496 25.1819 45.546 27.0783 45.546 30.6675V41.3332Z",
1798 fill: "#AB2BE7"
1799 }), /*#__PURE__*/React.createElement("path", {
1800 d: "M34.7298 30.9093C32.2097 30.9093 30.1733 32.9457 30.1733 35.4658C30.1733 37.9858 32.2097 40.0349 34.7298 40.0349C37.2499 40.0349 39.2863 37.9858 39.2863 35.4658C39.2863 32.9457 37.2499 30.9093 34.7298 30.9093Z",
1801 fill: "#AB2BE7"
1802 }), /*#__PURE__*/React.createElement("circle", {
1803 cx: "44.9096",
1804 cy: "27.091",
1805 r: "3.81827",
1806 fill: "white"
1807 }), /*#__PURE__*/React.createElement("path", {
1808 fillRule: "evenodd",
1809 clipRule: "evenodd",
1810 d: "M44.9089 32.182C47.7206 32.182 49.9999 29.9027 49.9999 27.091C49.9999 24.2793 47.7206 22 44.9089 22C42.0972 22 39.8179 24.2793 39.8179 27.091C39.8179 29.9027 42.0972 32.182 44.9089 32.182ZM43.9644 25.1923C43.9644 24.6651 44.3917 24.2377 44.9189 24.2377C45.4461 24.2377 45.8735 24.6651 45.8735 25.1923V26.1469H46.8281C47.3552 26.1469 47.7826 26.5742 47.7826 27.1014C47.7826 27.6286 47.3552 28.056 46.8281 28.056H45.8735V29.0106C45.8735 29.5378 45.4461 29.9651 44.9189 29.9651C44.3917 29.9651 43.9644 29.5378 43.9644 29.0106V28.056H43.0098C42.4826 28.056 42.0552 27.6286 42.0552 27.1014C42.0552 26.5742 42.4826 26.1469 43.0098 26.1469H43.9644V25.1923Z",
1811 fill: "#AB2BE7"
1812 }));
1813 };
1814 var OverviewCalendarIcon = function OverviewCalendarIcon() {
1815 return /*#__PURE__*/React.createElement("svg", {
1816 width: "70",
1817 height: "70",
1818 viewBox: "0 0 70 70",
1819 fill: "none",
1820 xmlns: "http://www.w3.org/2000/svg"
1821 }, /*#__PURE__*/React.createElement("circle", {
1822 opacity: "0.15",
1823 cx: "35",
1824 cy: "35",
1825 r: "35",
1826 fill: "#24A4EC"
1827 }), /*#__PURE__*/React.createElement("path", {
1828 d: "M41.5614 24.1171V22.0121C41.5614 21.4588 41.1024 21 40.5489 21C39.9954 21 39.5365 21.4588 39.5365 22.0121V24.0362H30.7619V22.0121C30.7619 21.4588 30.3029 21 29.7495 21C29.196 21 28.737 21.4588 28.737 22.0121V24.1171C25.0922 24.4545 23.3238 26.627 23.0538 29.8521C23.0268 30.2435 23.3508 30.5673 23.7288 30.5673H46.5696C46.9611 30.5673 47.2851 30.23 47.2446 29.8521C46.9746 26.627 45.2062 24.4545 41.5614 24.1171Z",
1829 fill: "#24A4EC"
1830 }), /*#__PURE__*/React.createElement("path", {
1831 d: "M45.9489 32.5911H24.3499C23.6075 32.5911 23 33.1984 23 33.9405V42.2529C23 46.3012 25.0249 49 29.7497 49H40.5491C45.2739 49 47.2988 46.3012 47.2988 42.2529V33.9405C47.2988 33.1984 46.6913 32.5911 45.9489 32.5911ZM31.3831 43.8857C31.2481 44.0072 31.0996 44.1016 30.9376 44.1691C30.7756 44.2366 30.6001 44.2771 30.4246 44.2771C30.2491 44.2771 30.0737 44.2366 29.9117 44.1691C29.7497 44.1016 29.6012 44.0072 29.4662 43.8857C29.2232 43.6293 29.0747 43.2785 29.0747 42.9276C29.0747 42.5768 29.2232 42.2259 29.4662 41.9696C29.6012 41.8481 29.7497 41.7536 29.9117 41.6862C30.2356 41.5512 30.6136 41.5512 30.9376 41.6862C31.0996 41.7536 31.2481 41.8481 31.3831 41.9696C31.6261 42.2259 31.7746 42.5768 31.7746 42.9276C31.7746 43.2785 31.6261 43.6293 31.3831 43.8857ZM31.6666 38.7175C31.5991 38.8794 31.5046 39.0278 31.3831 39.1628C31.2481 39.2842 31.0996 39.3787 30.9376 39.4461C30.7756 39.5136 30.6001 39.5541 30.4246 39.5541C30.2491 39.5541 30.0737 39.5136 29.9117 39.4461C29.7497 39.3787 29.6012 39.2842 29.4662 39.1628C29.3447 39.0278 29.2502 38.8794 29.1827 38.7175C29.1152 38.5555 29.0747 38.3801 29.0747 38.2047C29.0747 38.0293 29.1152 37.8538 29.1827 37.6919C29.2502 37.53 29.3447 37.3815 29.4662 37.2466C29.6012 37.1252 29.7497 37.0307 29.9117 36.9632C30.2356 36.8283 30.6136 36.8283 30.9376 36.9632C31.0996 37.0307 31.2481 37.1252 31.3831 37.2466C31.5046 37.3815 31.5991 37.53 31.6666 37.6919C31.7341 37.8538 31.7746 38.0293 31.7746 38.2047C31.7746 38.3801 31.7341 38.5555 31.6666 38.7175ZM36.1079 39.1628C35.9729 39.2842 35.8244 39.3787 35.6624 39.4461C35.5004 39.5136 35.3249 39.5541 35.1494 39.5541C34.9739 39.5541 34.7984 39.5136 34.6364 39.4461C34.4744 39.3787 34.326 39.2842 34.191 39.1628C33.948 38.9064 33.7995 38.5555 33.7995 38.2047C33.7995 37.8538 33.948 37.503 34.191 37.2466C34.326 37.1252 34.4744 37.0307 34.6364 36.9632C34.9604 36.8148 35.3384 36.8148 35.6624 36.9632C35.8244 37.0307 35.9729 37.1252 36.1079 37.2466C36.3509 37.503 36.4993 37.8538 36.4993 38.2047C36.4993 38.5555 36.3509 38.9064 36.1079 39.1628Z",
1832 fill: "#24A4EC"
1833 }));
1834 };
1835 var DocIcon = function DocIcon(_ref26) {
1836 var _ref26$color = _ref26.color,
1837 color = _ref26$color === void 0 ? "#3161F1" : _ref26$color,
1838 _ref26$width = _ref26.width,
1839 width = _ref26$width === void 0 ? "25" : _ref26$width,
1840 _ref26$height = _ref26.height,
1841 height = _ref26$height === void 0 ? "25" : _ref26$height;
1842 return /*#__PURE__*/React.createElement("svg", {
1843 width: width,
1844 height: height,
1845 fill: color,
1846 xmlns: "http://www.w3.org/2000/svg"
1847 }, /*#__PURE__*/React.createElement("path", {
1848 d: "M19.2106 0H6.57897C2.7895 0 0.263184 2.52632 0.263184 6.31579V13.8947C0.263184 17.6842 2.7895 20.2105 6.57897 20.2105V22.9011C6.57897 23.9116 7.70318 24.5179 8.53687 23.9495L14.1579 20.2105H19.2106C23 20.2105 25.5263 17.6842 25.5263 13.8947V6.31579C25.5263 2.52632 23 0 19.2106 0ZM12.8948 15.3726C12.3642 15.3726 11.9474 14.9432 11.9474 14.4253C11.9474 13.9074 12.3642 13.4779 12.8948 13.4779C13.4253 13.4779 13.8421 13.9074 13.8421 14.4253C13.8421 14.9432 13.4253 15.3726 12.8948 15.3726ZM14.4863 10.1305C13.9937 10.4589 13.8421 10.6737 13.8421 11.0274V11.2926C13.8421 11.8105 13.4127 12.24 12.8948 12.24C12.3769 12.24 11.9474 11.8105 11.9474 11.2926V11.0274C11.9474 9.5621 13.0211 8.8421 13.4253 8.56421C13.8927 8.24842 14.0442 8.03368 14.0442 7.70526C14.0442 7.07368 13.5263 6.55579 12.8948 6.55579C12.2632 6.55579 11.7453 7.07368 11.7453 7.70526C11.7453 8.22316 11.3158 8.65263 10.7979 8.65263C10.28 8.65263 9.85055 8.22316 9.85055 7.70526C9.85055 6.02526 11.2148 4.66105 12.8948 4.66105C14.5748 4.66105 15.939 6.02526 15.939 7.70526C15.939 9.14526 14.8779 9.86526 14.4863 10.1305Z"
1849 }));
1850 };
1851 var StripeIcon = function StripeIcon(_ref27) {
1852 var _ref27$color = _ref27.color,
1853 color = _ref27$color === void 0 ? "#3161F1" : _ref27$color,
1854 _ref27$width = _ref27.width,
1855 width = _ref27$width === void 0 ? "25" : _ref27$width,
1856 _ref27$height = _ref27.height,
1857 height = _ref27$height === void 0 ? "25" : _ref27$height;
1858 return /*#__PURE__*/React.createElement("svg", {
1859 width: width,
1860 height: height,
1861 fill: color,
1862 viewBox: "0 0 14 20",
1863 xmlns: "http://www.w3.org/2000/svg"
1864 }, /*#__PURE__*/React.createElement("path", {
1865 d: "M5.56044 5.95604C5.56044 5.0989 6.26374 4.76923 7.42857 4.76923C9.0989 4.76923 11.2088 5.27472 12.8791 6.17582V1.01099C11.0549 0.285714 9.25275 0 7.42857 0C2.96703 0 0 2.32967 0 6.21978C0 12.2857 8.35165 11.3187 8.35165 13.9341C8.35165 14.9451 7.47253 15.2747 6.24176 15.2747C4.41758 15.2747 2.08791 14.5275 0.241758 13.5165V18.7473C2.28571 19.6264 4.35165 20 6.24176 20C10.8132 20 13.956 17.7363 13.956 13.8022C13.9341 7.25275 5.56044 8.41758 5.56044 5.95604Z"
1866 }));
1867 };
1868 var calendarIcon = function calendarIcon() {
1869 return /*#__PURE__*/React.createElement("svg", {
1870 width: "18",
1871 height: "18",
1872 viewBox: "0 0 18 18",
1873 fill: "#0A1018",
1874 xmlns: "http://www.w3.org/2000/svg"
1875 }, /*#__PURE__*/React.createElement("path", {
1876 d: "M12.242 3.40308V2.32048C12.242 2.03595 12.0061 1.8 11.7215 1.8C11.437 1.8 11.2011 2.03595 11.2011 2.32048V3.36145H6.69022V2.32048C6.69022 2.03595 6.45427 1.8 6.16974 1.8C5.88521 1.8 5.64926 2.03595 5.64926 2.32048V3.40308C3.77552 3.57658 2.86641 4.69388 2.72762 6.35248C2.71374 6.55374 2.88029 6.72029 3.0746 6.72029H14.8167C15.0179 6.72029 15.1845 6.5468 15.1637 6.35248C15.0249 4.69388 14.1158 3.57658 12.242 3.40308Z"
1877 }), /*#__PURE__*/React.createElement("path", {
1878 d: "M14.4978 7.76126H3.39417C3.01248 7.76126 2.7002 8.07355 2.7002 8.45524V12.7301C2.7002 14.8121 3.74116 16.2 6.17008 16.2H11.7219C14.1508 16.2 15.1918 14.8121 15.1918 12.7301V8.45524C15.1918 8.07355 14.8795 7.76126 14.4978 7.76126ZM7.00979 13.5698C6.94039 13.6323 6.86405 13.6809 6.78077 13.7156C6.6975 13.7503 6.60728 13.7711 6.51706 13.7711C6.42685 13.7711 6.33663 13.7503 6.25335 13.7156C6.17008 13.6809 6.09374 13.6323 6.02434 13.5698C5.89942 13.438 5.82309 13.2575 5.82309 13.0771C5.82309 12.8967 5.89942 12.7162 6.02434 12.5844C6.09374 12.5219 6.17008 12.4734 6.25335 12.4387C6.41991 12.3693 6.61422 12.3693 6.78077 12.4387C6.86405 12.4734 6.94039 12.5219 7.00979 12.5844C7.1347 12.7162 7.21104 12.8967 7.21104 13.0771C7.21104 13.2575 7.1347 13.438 7.00979 13.5698ZM7.15552 10.9119C7.12082 10.9952 7.07224 11.0715 7.00979 11.1409C6.94039 11.2034 6.86405 11.252 6.78077 11.2867C6.6975 11.3214 6.60728 11.3422 6.51706 11.3422C6.42685 11.3422 6.33663 11.3214 6.25335 11.2867C6.17008 11.252 6.09374 11.2034 6.02434 11.1409C5.96188 11.0715 5.9133 10.9952 5.87861 10.9119C5.84391 10.8286 5.82309 10.7384 5.82309 10.6482C5.82309 10.558 5.84391 10.4678 5.87861 10.3845C5.9133 10.3012 5.96188 10.2249 6.02434 10.1555C6.09374 10.093 6.17008 10.0444 6.25335 10.0097C6.41991 9.94034 6.61422 9.94034 6.78077 10.0097C6.86405 10.0444 6.94039 10.093 7.00979 10.1555C7.07224 10.2249 7.12082 10.3012 7.15552 10.3845C7.19022 10.4678 7.21104 10.558 7.21104 10.6482C7.21104 10.7384 7.19022 10.8286 7.15552 10.9119ZM9.4387 11.1409C9.3693 11.2034 9.29297 11.252 9.20969 11.2867C9.12641 11.3214 9.0362 11.3422 8.94598 11.3422C8.85576 11.3422 8.76555 11.3214 8.68227 11.2867C8.59899 11.252 8.52265 11.2034 8.45326 11.1409C8.32834 11.0091 8.252 10.8286 8.252 10.6482C8.252 10.4678 8.32834 10.2873 8.45326 10.1555C8.52265 10.093 8.59899 10.0444 8.68227 10.0097C8.84882 9.9334 9.04314 9.9334 9.20969 10.0097C9.29297 10.0444 9.3693 10.093 9.4387 10.1555C9.56362 10.2873 9.63996 10.4678 9.63996 10.6482C9.63996 10.8286 9.56362 11.0091 9.4387 11.1409Z"
1879 }));
1880 };
1881 var CalendarIcon2 = function CalendarIcon2(_ref28) {
1882 var _ref28$color = _ref28.color,
1883 color = _ref28$color === void 0 ? "#3161F1" : _ref28$color,
1884 _ref28$width = _ref28.width,
1885 width = _ref28$width === void 0 ? "20" : _ref28$width,
1886 _ref28$height = _ref28.height,
1887 height = _ref28$height === void 0 ? "20" : _ref28$height;
1888 return /*#__PURE__*/React.createElement("svg", {
1889 width: width,
1890 height: height,
1891 fill: color,
1892 viewBox: "0 0 20 20",
1893 xmlns: "http://www.w3.org/2000/svg"
1894 }, /*#__PURE__*/React.createElement("path", {
1895 d: "M14.1279 3.00386V1.6506C14.1279 1.29494 13.833 1 13.4773 1C13.1216 1 12.8267 1.29494 12.8267 1.6506V2.95181H7.18815V1.6506C7.18815 1.29494 6.89321 1 6.53755 1C6.18189 1 5.88695 1.29494 5.88695 1.6506V3.00386C3.54478 3.22072 2.40839 4.61735 2.2349 6.6906C2.21755 6.94217 2.42574 7.15036 2.66863 7.15036H17.3462C17.5978 7.15036 17.806 6.93349 17.78 6.6906C17.6065 4.61735 16.4701 3.22072 14.1279 3.00386Z"
1896 }), /*#__PURE__*/React.createElement("path", {
1897 d: "M16.9472 8.45158H3.06767C2.59056 8.45158 2.2002 8.84194 2.2002 9.31905V14.6627C2.2002 17.2651 3.5014 19 6.53755 19H13.4773C16.5135 19 17.8147 17.2651 17.8147 14.6627V9.31905C17.8147 8.84194 17.4243 8.45158 16.9472 8.45158ZM7.58718 15.7123C7.50044 15.7904 7.40502 15.8511 7.30092 15.8945C7.19682 15.9378 7.08405 15.9639 6.97128 15.9639C6.85851 15.9639 6.74574 15.9378 6.64164 15.8945C6.53755 15.8511 6.44212 15.7904 6.35538 15.7123C6.19923 15.5475 6.10381 15.3219 6.10381 15.0964C6.10381 14.8709 6.19923 14.6453 6.35538 14.4805C6.44212 14.4024 6.53755 14.3417 6.64164 14.2983C6.84983 14.2116 7.09273 14.2116 7.30092 14.2983C7.40502 14.3417 7.50044 14.4024 7.58718 14.4805C7.74333 14.6453 7.83875 14.8709 7.83875 15.0964C7.83875 15.3219 7.74333 15.5475 7.58718 15.7123ZM7.76935 12.3899C7.72598 12.494 7.66526 12.5894 7.58718 12.6762C7.50044 12.7542 7.40502 12.815 7.30092 12.8583C7.19682 12.9017 7.08405 12.9277 6.97128 12.9277C6.85851 12.9277 6.74574 12.9017 6.64164 12.8583C6.53755 12.815 6.44212 12.7542 6.35538 12.6762C6.2773 12.5894 6.21658 12.494 6.17321 12.3899C6.12983 12.2858 6.10381 12.173 6.10381 12.0603C6.10381 11.9475 6.12983 11.8347 6.17321 11.7306C6.21658 11.6265 6.2773 11.5311 6.35538 11.4443C6.44212 11.3663 6.53755 11.3056 6.64164 11.2622C6.84983 11.1754 7.09273 11.1754 7.30092 11.2622C7.40502 11.3056 7.50044 11.3663 7.58718 11.4443C7.66526 11.5311 7.72598 11.6265 7.76935 11.7306C7.81273 11.8347 7.83875 11.9475 7.83875 12.0603C7.83875 12.173 7.81273 12.2858 7.76935 12.3899ZM10.6233 12.6762C10.5366 12.7542 10.4412 12.815 10.3371 12.8583C10.233 12.9017 10.1202 12.9277 10.0074 12.9277C9.89465 12.9277 9.78188 12.9017 9.67779 12.8583C9.57369 12.815 9.47827 12.7542 9.39152 12.6762C9.23538 12.5113 9.13996 12.2858 9.13996 12.0603C9.13996 11.8347 9.23538 11.6092 9.39152 11.4443C9.47827 11.3663 9.57369 11.3056 9.67779 11.2622C9.88598 11.1668 10.1289 11.1668 10.3371 11.2622C10.4412 11.3056 10.5366 11.3663 10.6233 11.4443C10.7795 11.6092 10.8749 11.8347 10.8749 12.0603C10.8749 12.2858 10.7795 12.5113 10.6233 12.6762Z"
1898 }));
1899 };
1900 var MoneyIcon = function MoneyIcon(_ref29) {
1901 var _ref29$color = _ref29.color,
1902 color = _ref29$color === void 0 ? "#3161F1" : _ref29$color,
1903 _ref29$width = _ref29.width,
1904 width = _ref29$width === void 0 ? "20" : _ref29$width,
1905 _ref29$height = _ref29.height,
1906 height = _ref29$height === void 0 ? "20" : _ref29$height;
1907 return /*#__PURE__*/React.createElement("svg", {
1908 width: width,
1909 height: height,
1910 fill: color,
1911 viewBox: "0 0 24 24",
1912 xmlns: "http://www.w3.org/2000/svg"
1913 }, /*#__PURE__*/React.createElement("path", {
1914 d: "M17 3.5H7C4 3.5 2 5 2 8.5V15.5C2 19 4 20.5 7 20.5H17C20 20.5 22 19 22 15.5V8.5C22 5 20 3.5 17 3.5ZM6.25 14.5C6.25 14.91 5.91 15.25 5.5 15.25C5.09 15.25 4.75 14.91 4.75 14.5V9.5C4.75 9.09 5.09 8.75 5.5 8.75C5.91 8.75 6.25 9.09 6.25 9.5V14.5ZM12 15C10.34 15 9 13.66 9 12C9 10.34 10.34 9 12 9C13.66 9 15 10.34 15 12C15 13.66 13.66 15 12 15ZM19.25 14.5C19.25 14.91 18.91 15.25 18.5 15.25C18.09 15.25 17.75 14.91 17.75 14.5V9.5C17.75 9.09 18.09 8.75 18.5 8.75C18.91 8.75 19.25 9.09 19.25 9.5V14.5Z"
1915 }));
1916 };
1917 var TicketIcon = function TicketIcon(_ref30) {
1918 var _ref30$color = _ref30.color,
1919 color = _ref30$color === void 0 ? "#3161F1" : _ref30$color,
1920 _ref30$width = _ref30.width,
1921 width = _ref30$width === void 0 ? "20" : _ref30$width,
1922 _ref30$height = _ref30.height,
1923 height = _ref30$height === void 0 ? "20" : _ref30$height;
1924 return /*#__PURE__*/React.createElement("svg", {
1925 width: width,
1926 height: height,
1927 viewBox: "0 0 18 18",
1928 fill: color,
1929 xmlns: "http://www.w3.org/2000/svg"
1930 }, /*#__PURE__*/React.createElement("path", {
1931 d: "M16.4961 8.06247C16.8036 8.06247 17.0586 7.80747 17.0586 7.49997V6.74997C17.0586 3.44247 16.0536 2.43747 12.7461 2.43747H8.05859V4.12497C8.05859 4.43247 7.80359 4.68747 7.49609 4.68747C7.18859 4.68747 6.93359 4.43247 6.93359 4.12497V2.43747H5.24609C1.93859 2.43747 0.933594 3.44247 0.933594 6.74997V7.12497C0.933594 7.43247 1.18859 7.68747 1.49609 7.68747C2.21609 7.68747 2.80859 8.27997 2.80859 8.99997C2.80859 9.71997 2.21609 10.3125 1.49609 10.3125C1.18859 10.3125 0.933594 10.5675 0.933594 10.875V11.25C0.933594 14.5575 1.93859 15.5625 5.24609 15.5625H6.93359V13.875C6.93359 13.5675 7.18859 13.3125 7.49609 13.3125C7.80359 13.3125 8.05859 13.5675 8.05859 13.875V15.5625H12.7461C16.0536 15.5625 17.0586 14.5575 17.0586 11.25C17.0586 10.9425 16.8036 10.6875 16.4961 10.6875C15.7761 10.6875 15.1836 10.095 15.1836 9.37497C15.1836 8.65497 15.7761 8.06247 16.4961 8.06247ZM8.05859 10.6275C8.05859 10.935 7.80359 11.19 7.49609 11.19C7.18859 11.19 6.93359 10.935 6.93359 10.6275V7.37247C6.93359 7.06497 7.18859 6.80997 7.49609 6.80997C7.80359 6.80997 8.05859 7.06497 8.05859 7.37247V10.6275Z"
1932 }));
1933 };
1934 var DollarIcon = function DollarIcon(_ref31) {
1935 var _ref31$color = _ref31.color,
1936 color = _ref31$color === void 0 ? "#3161F1" : _ref31$color,
1937 _ref31$width = _ref31.width,
1938 width = _ref31$width === void 0 ? "20" : _ref31$width,
1939 _ref31$height = _ref31.height,
1940 height = _ref31$height === void 0 ? "20" : _ref31$height;
1941 return /*#__PURE__*/React.createElement("svg", {
1942 width: width,
1943 height: height,
1944 viewBox: "0 0 18 18",
1945 fill: color,
1946 xmlns: "http://www.w3.org/2000/svg"
1947 }, /*#__PURE__*/React.createElement("path", {
1948 d: "M12.4891 0.666504H5.50573C2.4724 0.666504 0.664062 2.47484 0.664062 5.50817V12.4915C0.664062 15.5248 2.4724 17.3332 5.50573 17.3332H12.4891C15.5224 17.3332 17.3307 15.5248 17.3307 12.4915V5.50817C17.3307 2.47484 15.5224 0.666504 12.4891 0.666504ZM10.8807 8.99984C11.5307 9.22484 12.3974 9.69984 12.3974 11.1915C12.3974 12.4748 11.3974 13.5165 10.1641 13.5165H9.62239V13.9998C9.62239 14.3415 9.33906 14.6248 8.99739 14.6248C8.65573 14.6248 8.37239 14.3415 8.37239 13.9998V13.5165H8.07239C6.70573 13.5165 5.59739 12.3582 5.59739 10.9415C5.59739 10.5998 5.8724 10.3165 6.22239 10.3165C6.56406 10.3165 6.84739 10.5998 6.84739 10.9415C6.84739 11.6748 7.3974 12.2665 8.07239 12.2665H8.37239V9.4415L7.11406 8.99984C6.46406 8.77484 5.59739 8.29984 5.59739 6.80817C5.59739 5.52484 6.59739 4.48317 7.83073 4.48317H8.37239V3.99984C8.37239 3.65817 8.65573 3.37484 8.99739 3.37484C9.33906 3.37484 9.62239 3.65817 9.62239 3.99984V4.48317H9.92239C11.2891 4.48317 12.3974 5.6415 12.3974 7.05817C12.3974 7.39984 12.1224 7.68317 11.7724 7.68317C11.4307 7.68317 11.1474 7.39984 11.1474 7.05817C11.1474 6.32484 10.5974 5.73317 9.92239 5.73317H9.62239V8.55817L10.8807 8.99984Z"
1949 }));
1950 };
1951 var ChairIcon = function ChairIcon(_ref32) {
1952 var _ref32$color = _ref32.color,
1953 color = _ref32$color === void 0 ? "#3161F1" : _ref32$color,
1954 _ref32$width = _ref32.width,
1955 width = _ref32$width === void 0 ? "20" : _ref32$width,
1956 _ref32$height = _ref32.height,
1957 height = _ref32$height === void 0 ? "20" : _ref32$height;
1958 return /*#__PURE__*/React.createElement("svg", {
1959 width: width,
1960 height: height,
1961 viewBox: "0 0 17 18",
1962 fill: color,
1963 xmlns: "http://www.w3.org/2000/svg"
1964 }, /*#__PURE__*/React.createElement("path", {
1965 d: "M16.5 8.25C16.5 6.5955 15.1545 5.25 13.5 5.25V3.75C13.5 1.68225 11.8178 0 9.75 0L6.75 0C4.68225 0 3 1.68225 3 3.75V5.25C1.3455 5.25 0 6.5955 0 8.25L0 12C0 12.0127 3.50119e-08 12.0262 0.000750035 12.039C0.02175 13.2615 1.02225 14.25 2.25 14.25L7.5 14.25V16.5H4.5C4.086 16.5 3.75 16.8353 3.75 17.25C3.75 17.6647 4.086 18 4.5 18H12C12.414 18 12.75 17.6647 12.75 17.25C12.75 16.8353 12.414 16.5 12 16.5H9V14.25H14.25C15.4778 14.25 16.4783 13.2615 16.4993 12.039C16.4993 12.0262 16.5 12.0135 16.5 12V8.25ZM15 8.25V9.879C14.7653 9.79575 14.5133 9.75 14.25 9.75H13.5L13.5 6.75C14.3273 6.75 15 7.42275 15 8.25ZM4.5 3.75C4.5 2.5095 5.5095 1.5 6.75 1.5L9.75 1.5C10.9905 1.5 12 2.5095 12 3.75L12 9.75L4.5 9.75V3.75ZM3 6.75L3 9.75H2.25C1.98675 9.75 1.73475 9.79575 1.5 9.879V8.25C1.5 7.42275 2.17275 6.75 3 6.75ZM14.25 12.75L2.25 12.75C1.83675 12.75 1.5 12.414 1.5 12C1.5 11.586 1.83675 11.25 2.25 11.25L14.25 11.25C14.6633 11.25 15 11.586 15 12C15 12.414 14.6633 12.75 14.25 12.75Z"
1966 }));
1967 };
1968
1969 ;// CONCATENATED MODULE: ./assets/src/common/TextAreaInput.js
1970 var _excluded = ["className", "name", "label", "required", "rules", "labelCol", "wrapperCol"];
1971 function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
1972 function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
1973 var _window$antd = window.antd,
1974 Input = _window$antd.Input,
1975 Form = _window$antd.Form;
1976 var TextArea = Input.TextArea;
1977 function TextAreaInput(_ref) {
1978 var _ref$className = _ref.className,
1979 className = _ref$className === void 0 ? "" : _ref$className,
1980 name = _ref.name,
1981 _ref$label = _ref.label,
1982 label = _ref$label === void 0 ? "" : _ref$label,
1983 _ref$required = _ref.required,
1984 required = _ref$required === void 0 ? false : _ref$required,
1985 _ref$rules = _ref.rules,
1986 rules = _ref$rules === void 0 ? [] : _ref$rules,
1987 _ref$labelCol = _ref.labelCol,
1988 labelCol = _ref$labelCol === void 0 ? {} : _ref$labelCol,
1989 _ref$wrapperCol = _ref.wrapperCol,
1990 wrapperCol = _ref$wrapperCol === void 0 ? {} : _ref$wrapperCol,
1991 props = _objectWithoutProperties(_ref, _excluded);
1992 return /*#__PURE__*/React.createElement(Form.Item, {
1993 className: "timetics-input ".concat(className),
1994 label: label,
1995 labelCol: labelCol,
1996 wrapperCol: wrapperCol,
1997 name: name,
1998 rules: rules
1999 }, /*#__PURE__*/React.createElement(TextArea, props));
2000 }
2001 /* harmony default export */ const common_TextAreaInput = (TextAreaInput);
2002 ;// CONCATENATED MODULE: ./assets/src/common/TextInput.js
2003 var TextInput_excluded = ["className", "name", "label", "required", "rules", "labelCol", "wrapperCol", "tooltip"];
2004 function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2005 function TextInput_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = TextInput_objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
2006 function TextInput_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
2007 var TextInput_window$antd = window.antd,
2008 TextInput_Input = TextInput_window$antd.Input,
2009 TextInput_Form = TextInput_window$antd.Form;
2010 function TextInput(_ref) {
2011 var _ref$className = _ref.className,
2012 className = _ref$className === void 0 ? "" : _ref$className,
2013 name = _ref.name,
2014 _ref$label = _ref.label,
2015 label = _ref$label === void 0 ? "" : _ref$label,
2016 _ref$required = _ref.required,
2017 required = _ref$required === void 0 ? false : _ref$required,
2018 _ref$rules = _ref.rules,
2019 rules = _ref$rules === void 0 ? [] : _ref$rules,
2020 _ref$labelCol = _ref.labelCol,
2021 labelCol = _ref$labelCol === void 0 ? {} : _ref$labelCol,
2022 _ref$wrapperCol = _ref.wrapperCol,
2023 wrapperCol = _ref$wrapperCol === void 0 ? {} : _ref$wrapperCol,
2024 _ref$tooltip = _ref.tooltip,
2025 tooltip = _ref$tooltip === void 0 ? "" : _ref$tooltip,
2026 props = TextInput_objectWithoutProperties(_ref, TextInput_excluded);
2027 return /*#__PURE__*/React.createElement(TextInput_Form.Item, {
2028 className: "timetics-input ".concat(className),
2029 label: label,
2030 labelCol: labelCol,
2031 wrapperCol: wrapperCol,
2032 name: name,
2033 tooltip: tooltip,
2034 rules: rules
2035 }, /*#__PURE__*/React.createElement(TextInput_Input, _extends({}, props, {
2036 size: "large"
2037 })));
2038 }
2039 /* harmony default export */ const common_TextInput = (TextInput);
2040 ;// CONCATENATED MODULE: ./assets/src/frontend/pages/bookings/Header.js
2041 var __ = wp.i18n.__;
2042 var Typography = window.antd.Typography;
2043 var Title = Typography.Title;
2044 function Header(_ref) {
2045 var stepTitle = _ref.stepTitle,
2046 componentTitle = _ref.componentTitle;
2047 return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Title, {
2048 className: "tt-section-title tt-mb-20",
2049 level: 2
2050 }, componentTitle));
2051 }
2052 /* harmony default export */ const bookings_Header = (Header);
2053 ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/bind.js
2054
2055
2056 function bind(fn, thisArg) {
2057 return function wrap() {
2058 return fn.apply(thisArg, arguments);
2059 };
2060 }
2061
2062 ;// CONCATENATED MODULE: ./node_modules/axios/lib/utils.js
2063
2064
2065
2066
2067 // utils is a library of generic helper functions non-specific to axios
2068
2069 const {toString: utils_toString} = Object.prototype;
2070 const {getPrototypeOf} = Object;
2071
2072 const kindOf = (cache => thing => {
2073 const str = utils_toString.call(thing);
2074 return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
2075 })(Object.create(null));
2076
2077 const kindOfTest = (type) => {
2078 type = type.toLowerCase();
2079 return (thing) => kindOf(thing) === type
2080 }
2081
2082 const typeOfTest = type => thing => typeof thing === type;
2083
2084 /**
2085 * Determine if a value is an Array
2086 *
2087 * @param {Object} val The value to test
2088 *
2089 * @returns {boolean} True if value is an Array, otherwise false
2090 */
2091 const {isArray} = Array;
2092
2093 /**
2094 * Determine if a value is undefined
2095 *
2096 * @param {*} val The value to test
2097 *
2098 * @returns {boolean} True if the value is undefined, otherwise false
2099 */
2100 const isUndefined = typeOfTest('undefined');
2101
2102 /**
2103 * Determine if a value is a Buffer
2104 *
2105 * @param {*} val The value to test
2106 *
2107 * @returns {boolean} True if value is a Buffer, otherwise false
2108 */
2109 function isBuffer(val) {
2110 return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
2111 && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
2112 }
2113
2114 /**
2115 * Determine if a value is an ArrayBuffer
2116 *
2117 * @param {*} val The value to test
2118 *
2119 * @returns {boolean} True if value is an ArrayBuffer, otherwise false
2120 */
2121 const isArrayBuffer = kindOfTest('ArrayBuffer');
2122
2123
2124 /**
2125 * Determine if a value is a view on an ArrayBuffer
2126 *
2127 * @param {*} val The value to test
2128 *
2129 * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
2130 */
2131 function isArrayBufferView(val) {
2132 let result;
2133 if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
2134 result = ArrayBuffer.isView(val);
2135 } else {
2136 result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
2137 }
2138 return result;
2139 }
2140
2141 /**
2142 * Determine if a value is a String
2143 *
2144 * @param {*} val The value to test
2145 *
2146 * @returns {boolean} True if value is a String, otherwise false
2147 */
2148 const isString = typeOfTest('string');
2149
2150 /**
2151 * Determine if a value is a Function
2152 *
2153 * @param {*} val The value to test
2154 * @returns {boolean} True if value is a Function, otherwise false
2155 */
2156 const isFunction = typeOfTest('function');
2157
2158 /**
2159 * Determine if a value is a Number
2160 *
2161 * @param {*} val The value to test
2162 *
2163 * @returns {boolean} True if value is a Number, otherwise false
2164 */
2165 const isNumber = typeOfTest('number');
2166
2167 /**
2168 * Determine if a value is an Object
2169 *
2170 * @param {*} thing The value to test
2171 *
2172 * @returns {boolean} True if value is an Object, otherwise false
2173 */
2174 const isObject = (thing) => thing !== null && typeof thing === 'object';
2175
2176 /**
2177 * Determine if a value is a Boolean
2178 *
2179 * @param {*} thing The value to test
2180 * @returns {boolean} True if value is a Boolean, otherwise false
2181 */
2182 const isBoolean = thing => thing === true || thing === false;
2183
2184 /**
2185 * Determine if a value is a plain Object
2186 *
2187 * @param {*} val The value to test
2188 *
2189 * @returns {boolean} True if value is a plain Object, otherwise false
2190 */
2191 const isPlainObject = (val) => {
2192 if (kindOf(val) !== 'object') {
2193 return false;
2194 }
2195
2196 const prototype = getPrototypeOf(val);
2197 return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
2198 }
2199
2200 /**
2201 * Determine if a value is a Date
2202 *
2203 * @param {*} val The value to test
2204 *
2205 * @returns {boolean} True if value is a Date, otherwise false
2206 */
2207 const isDate = kindOfTest('Date');
2208
2209 /**
2210 * Determine if a value is a File
2211 *
2212 * @param {*} val The value to test
2213 *
2214 * @returns {boolean} True if value is a File, otherwise false
2215 */
2216 const isFile = kindOfTest('File');
2217
2218 /**
2219 * Determine if a value is a Blob
2220 *
2221 * @param {*} val The value to test
2222 *
2223 * @returns {boolean} True if value is a Blob, otherwise false
2224 */
2225 const isBlob = kindOfTest('Blob');
2226
2227 /**
2228 * Determine if a value is a FileList
2229 *
2230 * @param {*} val The value to test
2231 *
2232 * @returns {boolean} True if value is a File, otherwise false
2233 */
2234 const isFileList = kindOfTest('FileList');
2235
2236 /**
2237 * Determine if a value is a Stream
2238 *
2239 * @param {*} val The value to test
2240 *
2241 * @returns {boolean} True if value is a Stream, otherwise false
2242 */
2243 const isStream = (val) => isObject(val) && isFunction(val.pipe);
2244
2245 /**
2246 * Determine if a value is a FormData
2247 *
2248 * @param {*} thing The value to test
2249 *
2250 * @returns {boolean} True if value is an FormData, otherwise false
2251 */
2252 const isFormData = (thing) => {
2253 const pattern = '[object FormData]';
2254 return thing && (
2255 (typeof FormData === 'function' && thing instanceof FormData) ||
2256 utils_toString.call(thing) === pattern ||
2257 (isFunction(thing.toString) && thing.toString() === pattern)
2258 );
2259 }
2260
2261 /**
2262 * Determine if a value is a URLSearchParams object
2263 *
2264 * @param {*} val The value to test
2265 *
2266 * @returns {boolean} True if value is a URLSearchParams object, otherwise false
2267 */
2268 const isURLSearchParams = kindOfTest('URLSearchParams');
2269
2270 /**
2271 * Trim excess whitespace off the beginning and end of a string
2272 *
2273 * @param {String} str The String to trim
2274 *
2275 * @returns {String} The String freed of excess whitespace
2276 */
2277 const trim = (str) => str.trim ?
2278 str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
2279
2280 /**
2281 * Iterate over an Array or an Object invoking a function for each item.
2282 *
2283 * If `obj` is an Array callback will be called passing
2284 * the value, index, and complete array for each item.
2285 *
2286 * If 'obj' is an Object callback will be called passing
2287 * the value, key, and complete object for each property.
2288 *
2289 * @param {Object|Array} obj The object to iterate
2290 * @param {Function} fn The callback to invoke for each item
2291 *
2292 * @param {Boolean} [allOwnKeys = false]
2293 * @returns {void}
2294 */
2295 function forEach(obj, fn, {allOwnKeys = false} = {}) {
2296 // Don't bother if no value provided
2297 if (obj === null || typeof obj === 'undefined') {
2298 return;
2299 }
2300
2301 let i;
2302 let l;
2303
2304 // Force an array if not already something iterable
2305 if (typeof obj !== 'object') {
2306 /*eslint no-param-reassign:0*/
2307 obj = [obj];
2308 }
2309
2310 if (isArray(obj)) {
2311 // Iterate over array values
2312 for (i = 0, l = obj.length; i < l; i++) {
2313 fn.call(null, obj[i], i, obj);
2314 }
2315 } else {
2316 // Iterate over object keys
2317 const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
2318 const len = keys.length;
2319 let key;
2320
2321 for (i = 0; i < len; i++) {
2322 key = keys[i];
2323 fn.call(null, obj[key], key, obj);
2324 }
2325 }
2326 }
2327
2328 /**
2329 * Accepts varargs expecting each argument to be an object, then
2330 * immutably merges the properties of each object and returns result.
2331 *
2332 * When multiple objects contain the same key the later object in
2333 * the arguments list will take precedence.
2334 *
2335 * Example:
2336 *
2337 * ```js
2338 * var result = merge({foo: 123}, {foo: 456});
2339 * console.log(result.foo); // outputs 456
2340 * ```
2341 *
2342 * @param {Object} obj1 Object to merge
2343 *
2344 * @returns {Object} Result of all merge properties
2345 */
2346 function merge(/* obj1, obj2, obj3, ... */) {
2347 const result = {};
2348 const assignValue = (val, key) => {
2349 if (isPlainObject(result[key]) && isPlainObject(val)) {
2350 result[key] = merge(result[key], val);
2351 } else if (isPlainObject(val)) {
2352 result[key] = merge({}, val);
2353 } else if (isArray(val)) {
2354 result[key] = val.slice();
2355 } else {
2356 result[key] = val;
2357 }
2358 }
2359
2360 for (let i = 0, l = arguments.length; i < l; i++) {
2361 arguments[i] && forEach(arguments[i], assignValue);
2362 }
2363 return result;
2364 }
2365
2366 /**
2367 * Extends object a by mutably adding to it the properties of object b.
2368 *
2369 * @param {Object} a The object to be extended
2370 * @param {Object} b The object to copy properties from
2371 * @param {Object} thisArg The object to bind function to
2372 *
2373 * @param {Boolean} [allOwnKeys]
2374 * @returns {Object} The resulting value of object a
2375 */
2376 const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
2377 forEach(b, (val, key) => {
2378 if (thisArg && isFunction(val)) {
2379 a[key] = bind(val, thisArg);
2380 } else {
2381 a[key] = val;
2382 }
2383 }, {allOwnKeys});
2384 return a;
2385 }
2386
2387 /**
2388 * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
2389 *
2390 * @param {string} content with BOM
2391 *
2392 * @returns {string} content value without BOM
2393 */
2394 const stripBOM = (content) => {
2395 if (content.charCodeAt(0) === 0xFEFF) {
2396 content = content.slice(1);
2397 }
2398 return content;
2399 }
2400
2401 /**
2402 * Inherit the prototype methods from one constructor into another
2403 * @param {function} constructor
2404 * @param {function} superConstructor
2405 * @param {object} [props]
2406 * @param {object} [descriptors]
2407 *
2408 * @returns {void}
2409 */
2410 const inherits = (constructor, superConstructor, props, descriptors) => {
2411 constructor.prototype = Object.create(superConstructor.prototype, descriptors);
2412 constructor.prototype.constructor = constructor;
2413 Object.defineProperty(constructor, 'super', {
2414 value: superConstructor.prototype
2415 });
2416 props && Object.assign(constructor.prototype, props);
2417 }
2418
2419 /**
2420 * Resolve object with deep prototype chain to a flat object
2421 * @param {Object} sourceObj source object
2422 * @param {Object} [destObj]
2423 * @param {Function|Boolean} [filter]
2424 * @param {Function} [propFilter]
2425 *
2426 * @returns {Object}
2427 */
2428 const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
2429 let props;
2430 let i;
2431 let prop;
2432 const merged = {};
2433
2434 destObj = destObj || {};
2435 // eslint-disable-next-line no-eq-null,eqeqeq
2436 if (sourceObj == null) return destObj;
2437
2438 do {
2439 props = Object.getOwnPropertyNames(sourceObj);
2440 i = props.length;
2441 while (i-- > 0) {
2442 prop = props[i];
2443 if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
2444 destObj[prop] = sourceObj[prop];
2445 merged[prop] = true;
2446 }
2447 }
2448 sourceObj = filter !== false && getPrototypeOf(sourceObj);
2449 } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
2450
2451 return destObj;
2452 }
2453
2454 /**
2455 * Determines whether a string ends with the characters of a specified string
2456 *
2457 * @param {String} str
2458 * @param {String} searchString
2459 * @param {Number} [position= 0]
2460 *
2461 * @returns {boolean}
2462 */
2463 const endsWith = (str, searchString, position) => {
2464 str = String(str);
2465 if (position === undefined || position > str.length) {
2466 position = str.length;
2467 }
2468 position -= searchString.length;
2469 const lastIndex = str.indexOf(searchString, position);
2470 return lastIndex !== -1 && lastIndex === position;
2471 }
2472
2473
2474 /**
2475 * Returns new array from array like object or null if failed
2476 *
2477 * @param {*} [thing]
2478 *
2479 * @returns {?Array}
2480 */
2481 const toArray = (thing) => {
2482 if (!thing) return null;
2483 if (isArray(thing)) return thing;
2484 let i = thing.length;
2485 if (!isNumber(i)) return null;
2486 const arr = new Array(i);
2487 while (i-- > 0) {
2488 arr[i] = thing[i];
2489 }
2490 return arr;
2491 }
2492
2493 /**
2494 * Checking if the Uint8Array exists and if it does, it returns a function that checks if the
2495 * thing passed in is an instance of Uint8Array
2496 *
2497 * @param {TypedArray}
2498 *
2499 * @returns {Array}
2500 */
2501 // eslint-disable-next-line func-names
2502 const isTypedArray = (TypedArray => {
2503 // eslint-disable-next-line func-names
2504 return thing => {
2505 return TypedArray && thing instanceof TypedArray;
2506 };
2507 })(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
2508
2509 /**
2510 * For each entry in the object, call the function with the key and value.
2511 *
2512 * @param {Object<any, any>} obj - The object to iterate over.
2513 * @param {Function} fn - The function to call for each entry.
2514 *
2515 * @returns {void}
2516 */
2517 const forEachEntry = (obj, fn) => {
2518 const generator = obj && obj[Symbol.iterator];
2519
2520 const iterator = generator.call(obj);
2521
2522 let result;
2523
2524 while ((result = iterator.next()) && !result.done) {
2525 const pair = result.value;
2526 fn.call(obj, pair[0], pair[1]);
2527 }
2528 }
2529
2530 /**
2531 * It takes a regular expression and a string, and returns an array of all the matches
2532 *
2533 * @param {string} regExp - The regular expression to match against.
2534 * @param {string} str - The string to search.
2535 *
2536 * @returns {Array<boolean>}
2537 */
2538 const matchAll = (regExp, str) => {
2539 let matches;
2540 const arr = [];
2541
2542 while ((matches = regExp.exec(str)) !== null) {
2543 arr.push(matches);
2544 }
2545
2546 return arr;
2547 }
2548
2549 /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
2550 const isHTMLForm = kindOfTest('HTMLFormElement');
2551
2552 const toCamelCase = str => {
2553 return str.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,
2554 function replacer(m, p1, p2) {
2555 return p1.toUpperCase() + p2;
2556 }
2557 );
2558 };
2559
2560 /* Creating a function that will check if an object has a property. */
2561 const utils_hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
2562
2563 /**
2564 * Determine if a value is a RegExp object
2565 *
2566 * @param {*} val The value to test
2567 *
2568 * @returns {boolean} True if value is a RegExp object, otherwise false
2569 */
2570 const isRegExp = kindOfTest('RegExp');
2571
2572 const reduceDescriptors = (obj, reducer) => {
2573 const descriptors = Object.getOwnPropertyDescriptors(obj);
2574 const reducedDescriptors = {};
2575
2576 forEach(descriptors, (descriptor, name) => {
2577 if (reducer(descriptor, name, obj) !== false) {
2578 reducedDescriptors[name] = descriptor;
2579 }
2580 });
2581
2582 Object.defineProperties(obj, reducedDescriptors);
2583 }
2584
2585 /**
2586 * Makes all methods read-only
2587 * @param {Object} obj
2588 */
2589
2590 const freezeMethods = (obj) => {
2591 reduceDescriptors(obj, (descriptor, name) => {
2592 const value = obj[name];
2593
2594 if (!isFunction(value)) return;
2595
2596 descriptor.enumerable = false;
2597
2598 if ('writable' in descriptor) {
2599 descriptor.writable = false;
2600 return;
2601 }
2602
2603 if (!descriptor.set) {
2604 descriptor.set = () => {
2605 throw Error('Can not read-only method \'' + name + '\'');
2606 };
2607 }
2608 });
2609 }
2610
2611 const toObjectSet = (arrayOrString, delimiter) => {
2612 const obj = {};
2613
2614 const define = (arr) => {
2615 arr.forEach(value => {
2616 obj[value] = true;
2617 });
2618 }
2619
2620 isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
2621
2622 return obj;
2623 }
2624
2625 const noop = () => {}
2626
2627 const toFiniteNumber = (value, defaultValue) => {
2628 value = +value;
2629 return Number.isFinite(value) ? value : defaultValue;
2630 }
2631
2632 /* harmony default export */ const utils = ({
2633 isArray,
2634 isArrayBuffer,
2635 isBuffer,
2636 isFormData,
2637 isArrayBufferView,
2638 isString,
2639 isNumber,
2640 isBoolean,
2641 isObject,
2642 isPlainObject,
2643 isUndefined,
2644 isDate,
2645 isFile,
2646 isBlob,
2647 isRegExp,
2648 isFunction,
2649 isStream,
2650 isURLSearchParams,
2651 isTypedArray,
2652 isFileList,
2653 forEach,
2654 merge,
2655 extend,
2656 trim,
2657 stripBOM,
2658 inherits,
2659 toFlatObject,
2660 kindOf,
2661 kindOfTest,
2662 endsWith,
2663 toArray,
2664 forEachEntry,
2665 matchAll,
2666 isHTMLForm,
2667 hasOwnProperty: utils_hasOwnProperty,
2668 hasOwnProp: utils_hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
2669 reduceDescriptors,
2670 freezeMethods,
2671 toObjectSet,
2672 toCamelCase,
2673 noop,
2674 toFiniteNumber
2675 });
2676
2677 ;// CONCATENATED MODULE: ./node_modules/axios/lib/core/AxiosError.js
2678
2679
2680
2681
2682 /**
2683 * Create an Error with the specified message, config, error code, request and response.
2684 *
2685 * @param {string} message The error message.
2686 * @param {string} [code] The error code (for example, 'ECONNABORTED').
2687 * @param {Object} [config] The config.
2688 * @param {Object} [request] The request.
2689 * @param {Object} [response] The response.
2690 *
2691 * @returns {Error} The created error.
2692 */
2693 function AxiosError(message, code, config, request, response) {
2694 Error.call(this);
2695
2696 if (Error.captureStackTrace) {
2697 Error.captureStackTrace(this, this.constructor);
2698 } else {
2699 this.stack = (new Error()).stack;
2700 }
2701
2702 this.message = message;
2703 this.name = 'AxiosError';
2704 code && (this.code = code);
2705 config && (this.config = config);
2706 request && (this.request = request);
2707 response && (this.response = response);
2708 }
2709
2710 utils.inherits(AxiosError, Error, {
2711 toJSON: function toJSON() {
2712 return {
2713 // Standard
2714 message: this.message,
2715 name: this.name,
2716 // Microsoft
2717 description: this.description,
2718 number: this.number,
2719 // Mozilla
2720 fileName: this.fileName,
2721 lineNumber: this.lineNumber,
2722 columnNumber: this.columnNumber,
2723 stack: this.stack,
2724 // Axios
2725 config: this.config,
2726 code: this.code,
2727 status: this.response && this.response.status ? this.response.status : null
2728 };
2729 }
2730 });
2731
2732 const AxiosError_prototype = AxiosError.prototype;
2733 const descriptors = {};
2734
2735 [
2736 'ERR_BAD_OPTION_VALUE',
2737 'ERR_BAD_OPTION',
2738 'ECONNABORTED',
2739 'ETIMEDOUT',
2740 'ERR_NETWORK',
2741 'ERR_FR_TOO_MANY_REDIRECTS',
2742 'ERR_DEPRECATED',
2743 'ERR_BAD_RESPONSE',
2744 'ERR_BAD_REQUEST',
2745 'ERR_CANCELED',
2746 'ERR_NOT_SUPPORT',
2747 'ERR_INVALID_URL'
2748 // eslint-disable-next-line func-names
2749 ].forEach(code => {
2750 descriptors[code] = {value: code};
2751 });
2752
2753 Object.defineProperties(AxiosError, descriptors);
2754 Object.defineProperty(AxiosError_prototype, 'isAxiosError', {value: true});
2755
2756 // eslint-disable-next-line func-names
2757 AxiosError.from = (error, code, config, request, response, customProps) => {
2758 const axiosError = Object.create(AxiosError_prototype);
2759
2760 utils.toFlatObject(error, axiosError, function filter(obj) {
2761 return obj !== Error.prototype;
2762 }, prop => {
2763 return prop !== 'isAxiosError';
2764 });
2765
2766 AxiosError.call(axiosError, error.message, code, config, request, response);
2767
2768 axiosError.cause = error;
2769
2770 axiosError.name = error.name;
2771
2772 customProps && Object.assign(axiosError, customProps);
2773
2774 return axiosError;
2775 };
2776
2777 /* harmony default export */ const core_AxiosError = (AxiosError);
2778
2779 // EXTERNAL MODULE: ./node_modules/form-data/lib/browser.js
2780 var browser = __webpack_require__(230);
2781 ;// CONCATENATED MODULE: ./node_modules/axios/lib/env/classes/FormData.js
2782
2783 /* harmony default export */ const classes_FormData = (browser);
2784
2785 ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/toFormData.js
2786
2787
2788
2789
2790
2791
2792 /**
2793 * Determines if the given thing is a array or js object.
2794 *
2795 * @param {string} thing - The object or array to be visited.
2796 *
2797 * @returns {boolean}
2798 */
2799 function isVisitable(thing) {
2800 return utils.isPlainObject(thing) || utils.isArray(thing);
2801 }
2802
2803 /**
2804 * It removes the brackets from the end of a string
2805 *
2806 * @param {string} key - The key of the parameter.
2807 *
2808 * @returns {string} the key without the brackets.
2809 */
2810 function removeBrackets(key) {
2811 return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
2812 }
2813
2814 /**
2815 * It takes a path, a key, and a boolean, and returns a string
2816 *
2817 * @param {string} path - The path to the current key.
2818 * @param {string} key - The key of the current object being iterated over.
2819 * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
2820 *
2821 * @returns {string} The path to the current key.
2822 */
2823 function renderKey(path, key, dots) {
2824 if (!path) return key;
2825 return path.concat(key).map(function each(token, i) {
2826 // eslint-disable-next-line no-param-reassign
2827 token = removeBrackets(token);
2828 return !dots && i ? '[' + token + ']' : token;
2829 }).join(dots ? '.' : '');
2830 }
2831
2832 /**
2833 * If the array is an array and none of its elements are visitable, then it's a flat array.
2834 *
2835 * @param {Array<any>} arr - The array to check
2836 *
2837 * @returns {boolean}
2838 */
2839 function isFlatArray(arr) {
2840 return utils.isArray(arr) && !arr.some(isVisitable);
2841 }
2842
2843 const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
2844 return /^is[A-Z]/.test(prop);
2845 });
2846
2847 /**
2848 * If the thing is a FormData object, return true, otherwise return false.
2849 *
2850 * @param {unknown} thing - The thing to check.
2851 *
2852 * @returns {boolean}
2853 */
2854 function isSpecCompliant(thing) {
2855 return thing && utils.isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator];
2856 }
2857
2858 /**
2859 * Convert a data object to FormData
2860 *
2861 * @param {Object} obj
2862 * @param {?Object} [formData]
2863 * @param {?Object} [options]
2864 * @param {Function} [options.visitor]
2865 * @param {Boolean} [options.metaTokens = true]
2866 * @param {Boolean} [options.dots = false]
2867 * @param {?Boolean} [options.indexes = false]
2868 *
2869 * @returns {Object}
2870 **/
2871
2872 /**
2873 * It converts an object into a FormData object
2874 *
2875 * @param {Object<any, any>} obj - The object to convert to form data.
2876 * @param {string} formData - The FormData object to append to.
2877 * @param {Object<string, any>} options
2878 *
2879 * @returns
2880 */
2881 function toFormData(obj, formData, options) {
2882 if (!utils.isObject(obj)) {
2883 throw new TypeError('target must be an object');
2884 }
2885
2886 // eslint-disable-next-line no-param-reassign
2887 formData = formData || new (classes_FormData || FormData)();
2888
2889 // eslint-disable-next-line no-param-reassign
2890 options = utils.toFlatObject(options, {
2891 metaTokens: true,
2892 dots: false,
2893 indexes: false
2894 }, false, function defined(option, source) {
2895 // eslint-disable-next-line no-eq-null,eqeqeq
2896 return !utils.isUndefined(source[option]);
2897 });
2898
2899 const metaTokens = options.metaTokens;
2900 // eslint-disable-next-line no-use-before-define
2901 const visitor = options.visitor || defaultVisitor;
2902 const dots = options.dots;
2903 const indexes = options.indexes;
2904 const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
2905 const useBlob = _Blob && isSpecCompliant(formData);
2906
2907 if (!utils.isFunction(visitor)) {
2908 throw new TypeError('visitor must be a function');
2909 }
2910
2911 function convertValue(value) {
2912 if (value === null) return '';
2913
2914 if (utils.isDate(value)) {
2915 return value.toISOString();
2916 }
2917
2918 if (!useBlob && utils.isBlob(value)) {
2919 throw new core_AxiosError('Blob is not supported. Use a Buffer instead.');
2920 }
2921
2922 if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
2923 return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
2924 }
2925
2926 return value;
2927 }
2928
2929 /**
2930 * Default visitor.
2931 *
2932 * @param {*} value
2933 * @param {String|Number} key
2934 * @param {Array<String|Number>} path
2935 * @this {FormData}
2936 *
2937 * @returns {boolean} return true to visit the each prop of the value recursively
2938 */
2939 function defaultVisitor(value, key, path) {
2940 let arr = value;
2941
2942 if (value && !path && typeof value === 'object') {
2943 if (utils.endsWith(key, '{}')) {
2944 // eslint-disable-next-line no-param-reassign
2945 key = metaTokens ? key : key.slice(0, -2);
2946 // eslint-disable-next-line no-param-reassign
2947 value = JSON.stringify(value);
2948 } else if (
2949 (utils.isArray(value) && isFlatArray(value)) ||
2950 (utils.isFileList(value) || utils.endsWith(key, '[]') && (arr = utils.toArray(value))
2951 )) {
2952 // eslint-disable-next-line no-param-reassign
2953 key = removeBrackets(key);
2954
2955 arr.forEach(function each(el, index) {
2956 !(utils.isUndefined(el) || el === null) && formData.append(
2957 // eslint-disable-next-line no-nested-ternary
2958 indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
2959 convertValue(el)
2960 );
2961 });
2962 return false;
2963 }
2964 }
2965
2966 if (isVisitable(value)) {
2967 return true;
2968 }
2969
2970 formData.append(renderKey(path, key, dots), convertValue(value));
2971
2972 return false;
2973 }
2974
2975 const stack = [];
2976
2977 const exposedHelpers = Object.assign(predicates, {
2978 defaultVisitor,
2979 convertValue,
2980 isVisitable
2981 });
2982
2983 function build(value, path) {
2984 if (utils.isUndefined(value)) return;
2985
2986 if (stack.indexOf(value) !== -1) {
2987 throw Error('Circular reference detected in ' + path.join('.'));
2988 }
2989
2990 stack.push(value);
2991
2992 utils.forEach(value, function each(el, key) {
2993 const result = !(utils.isUndefined(el) || el === null) && visitor.call(
2994 formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers
2995 );
2996
2997 if (result === true) {
2998 build(el, path ? path.concat(key) : [key]);
2999 }
3000 });
3001
3002 stack.pop();
3003 }
3004
3005 if (!utils.isObject(obj)) {
3006 throw new TypeError('data must be an object');
3007 }
3008
3009 build(obj);
3010
3011 return formData;
3012 }
3013
3014 /* harmony default export */ const helpers_toFormData = (toFormData);
3015
3016 ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/AxiosURLSearchParams.js
3017
3018
3019
3020
3021 /**
3022 * It encodes a string by replacing all characters that are not in the unreserved set with
3023 * their percent-encoded equivalents
3024 *
3025 * @param {string} str - The string to encode.
3026 *
3027 * @returns {string} The encoded string.
3028 */
3029 function encode(str) {
3030 const charMap = {
3031 '!': '%21',
3032 "'": '%27',
3033 '(': '%28',
3034 ')': '%29',
3035 '~': '%7E',
3036 '%20': '+',
3037 '%00': '\x00'
3038 };
3039 return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
3040 return charMap[match];
3041 });
3042 }
3043
3044 /**
3045 * It takes a params object and converts it to a FormData object
3046 *
3047 * @param {Object<string, any>} params - The parameters to be converted to a FormData object.
3048 * @param {Object<string, any>} options - The options object passed to the Axios constructor.
3049 *
3050 * @returns {void}
3051 */
3052 function AxiosURLSearchParams(params, options) {
3053 this._pairs = [];
3054
3055 params && helpers_toFormData(params, this, options);
3056 }
3057
3058 const AxiosURLSearchParams_prototype = AxiosURLSearchParams.prototype;
3059
3060 AxiosURLSearchParams_prototype.append = function append(name, value) {
3061 this._pairs.push([name, value]);
3062 };
3063
3064 AxiosURLSearchParams_prototype.toString = function toString(encoder) {
3065 const _encode = encoder ? function(value) {
3066 return encoder.call(this, value, encode);
3067 } : encode;
3068
3069 return this._pairs.map(function each(pair) {
3070 return _encode(pair[0]) + '=' + _encode(pair[1]);
3071 }, '').join('&');
3072 };
3073
3074 /* harmony default export */ const helpers_AxiosURLSearchParams = (AxiosURLSearchParams);
3075
3076 ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/buildURL.js
3077
3078
3079
3080
3081
3082 /**
3083 * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
3084 * URI encoded counterparts
3085 *
3086 * @param {string} val The value to be encoded.
3087 *
3088 * @returns {string} The encoded value.
3089 */
3090 function buildURL_encode(val) {
3091 return encodeURIComponent(val).
3092 replace(/%3A/gi, ':').
3093 replace(/%24/g, '$').
3094 replace(/%2C/gi, ',').
3095 replace(/%20/g, '+').
3096 replace(/%5B/gi, '[').
3097 replace(/%5D/gi, ']');
3098 }
3099
3100 /**
3101 * Build a URL by appending params to the end
3102 *
3103 * @param {string} url The base of the url (e.g., http://www.google.com)
3104 * @param {object} [params] The params to be appended
3105 * @param {?object} options
3106 *
3107 * @returns {string} The formatted url
3108 */
3109 function buildURL(url, params, options) {
3110 /*eslint no-param-reassign:0*/
3111 if (!params) {
3112 return url;
3113 }
3114
3115 const _encode = options && options.encode || buildURL_encode;
3116
3117 const serializeFn = options && options.serialize;
3118
3119 let serializedParams;
3120
3121 if (serializeFn) {
3122 serializedParams = serializeFn(params, options);
3123 } else {
3124 serializedParams = utils.isURLSearchParams(params) ?
3125 params.toString() :
3126 new helpers_AxiosURLSearchParams(params, options).toString(_encode);
3127 }
3128
3129 if (serializedParams) {
3130 const hashmarkIndex = url.indexOf("#");
3131
3132 if (hashmarkIndex !== -1) {
3133 url = url.slice(0, hashmarkIndex);
3134 }
3135 url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
3136 }
3137
3138 return url;
3139 }
3140
3141 ;// CONCATENATED MODULE: ./node_modules/axios/lib/core/InterceptorManager.js
3142
3143
3144
3145
3146 class InterceptorManager {
3147 constructor() {
3148 this.handlers = [];
3149 }
3150
3151 /**
3152 * Add a new interceptor to the stack
3153 *
3154 * @param {Function} fulfilled The function to handle `then` for a `Promise`
3155 * @param {Function} rejected The function to handle `reject` for a `Promise`
3156 *
3157 * @return {Number} An ID used to remove interceptor later
3158 */
3159 use(fulfilled, rejected, options) {
3160 this.handlers.push({
3161 fulfilled,
3162 rejected,
3163 synchronous: options ? options.synchronous : false,
3164 runWhen: options ? options.runWhen : null
3165 });
3166 return this.handlers.length - 1;
3167 }
3168
3169 /**
3170 * Remove an interceptor from the stack
3171 *
3172 * @param {Number} id The ID that was returned by `use`
3173 *
3174 * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
3175 */
3176 eject(id) {
3177 if (this.handlers[id]) {
3178 this.handlers[id] = null;
3179 }
3180 }
3181
3182 /**
3183 * Clear all interceptors from the stack
3184 *
3185 * @returns {void}
3186 */
3187 clear() {
3188 if (this.handlers) {
3189 this.handlers = [];
3190 }
3191 }
3192
3193 /**
3194 * Iterate over all the registered interceptors
3195 *
3196 * This method is particularly useful for skipping over any
3197 * interceptors that may have become `null` calling `eject`.
3198 *
3199 * @param {Function} fn The function to call for each interceptor
3200 *
3201 * @returns {void}
3202 */
3203 forEach(fn) {
3204 utils.forEach(this.handlers, function forEachHandler(h) {
3205 if (h !== null) {
3206 fn(h);
3207 }
3208 });
3209 }
3210 }
3211
3212 /* harmony default export */ const core_InterceptorManager = (InterceptorManager);
3213
3214 ;// CONCATENATED MODULE: ./node_modules/axios/lib/defaults/transitional.js
3215
3216
3217 /* harmony default export */ const defaults_transitional = ({
3218 silentJSONParsing: true,
3219 forcedJSONParsing: true,
3220 clarifyTimeoutError: false
3221 });
3222
3223 ;// CONCATENATED MODULE: ./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js
3224
3225
3226
3227 /* harmony default export */ const classes_URLSearchParams = (typeof URLSearchParams !== 'undefined' ? URLSearchParams : helpers_AxiosURLSearchParams);
3228
3229 ;// CONCATENATED MODULE: ./node_modules/axios/lib/platform/browser/classes/FormData.js
3230
3231
3232 /* harmony default export */ const browser_classes_FormData = (FormData);
3233
3234 ;// CONCATENATED MODULE: ./node_modules/axios/lib/platform/browser/index.js
3235
3236
3237
3238 /**
3239 * Determine if we're running in a standard browser environment
3240 *
3241 * This allows axios to run in a web worker, and react-native.
3242 * Both environments support XMLHttpRequest, but not fully standard globals.
3243 *
3244 * web workers:
3245 * typeof window -> undefined
3246 * typeof document -> undefined
3247 *
3248 * react-native:
3249 * navigator.product -> 'ReactNative'
3250 * nativescript
3251 * navigator.product -> 'NativeScript' or 'NS'
3252 *
3253 * @returns {boolean}
3254 */
3255 const isStandardBrowserEnv = (() => {
3256 let product;
3257 if (typeof navigator !== 'undefined' && (
3258 (product = navigator.product) === 'ReactNative' ||
3259 product === 'NativeScript' ||
3260 product === 'NS')
3261 ) {
3262 return false;
3263 }
3264
3265 return typeof window !== 'undefined' && typeof document !== 'undefined';
3266 })();
3267
3268 /* harmony default export */ const platform_browser = ({
3269 isBrowser: true,
3270 classes: {
3271 URLSearchParams: classes_URLSearchParams,
3272 FormData: browser_classes_FormData,
3273 Blob
3274 },
3275 isStandardBrowserEnv,
3276 protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
3277 });
3278
3279 ;// CONCATENATED MODULE: ./node_modules/axios/lib/platform/index.js
3280
3281
3282
3283
3284 ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/toURLEncodedForm.js
3285
3286
3287
3288
3289
3290
3291 function toURLEncodedForm(data, options) {
3292 return helpers_toFormData(data, new platform_browser.classes.URLSearchParams(), Object.assign({
3293 visitor: function(value, key, path, helpers) {
3294 if (platform_browser.isNode && utils.isBuffer(value)) {
3295 this.append(key, value.toString('base64'));
3296 return false;
3297 }
3298
3299 return helpers.defaultVisitor.apply(this, arguments);
3300 }
3301 }, options));
3302 }
3303
3304 ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/formDataToJSON.js
3305
3306
3307
3308
3309 /**
3310 * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
3311 *
3312 * @param {string} name - The name of the property to get.
3313 *
3314 * @returns An array of strings.
3315 */
3316 function parsePropPath(name) {
3317 // foo[x][y][z]
3318 // foo.x.y.z
3319 // foo-x-y-z
3320 // foo x y z
3321 return utils.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
3322 return match[0] === '[]' ? '' : match[1] || match[0];
3323 });
3324 }
3325
3326 /**
3327 * Convert an array to an object.
3328 *
3329 * @param {Array<any>} arr - The array to convert to an object.
3330 *
3331 * @returns An object with the same keys and values as the array.
3332 */
3333 function arrayToObject(arr) {
3334 const obj = {};
3335 const keys = Object.keys(arr);
3336 let i;
3337 const len = keys.length;
3338 let key;
3339 for (i = 0; i < len; i++) {
3340 key = keys[i];
3341 obj[key] = arr[key];
3342 }
3343 return obj;
3344 }
3345
3346 /**
3347 * It takes a FormData object and returns a JavaScript object
3348 *
3349 * @param {string} formData The FormData object to convert to JSON.
3350 *
3351 * @returns {Object<string, any> | null} The converted object.
3352 */
3353 function formDataToJSON(formData) {
3354 function buildPath(path, value, target, index) {
3355 let name = path[index++];
3356 const isNumericKey = Number.isFinite(+name);
3357 const isLast = index >= path.length;
3358 name = !name && utils.isArray(target) ? target.length : name;
3359
3360 if (isLast) {
3361 if (utils.hasOwnProp(target, name)) {
3362 target[name] = [target[name], value];
3363 } else {
3364 target[name] = value;
3365 }
3366
3367 return !isNumericKey;
3368 }
3369
3370 if (!target[name] || !utils.isObject(target[name])) {
3371 target[name] = [];
3372 }
3373
3374 const result = buildPath(path, value, target[name], index);
3375
3376 if (result && utils.isArray(target[name])) {
3377 target[name] = arrayToObject(target[name]);
3378 }
3379
3380 return !isNumericKey;
3381 }
3382
3383 if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
3384 const obj = {};
3385
3386 utils.forEachEntry(formData, (name, value) => {
3387 buildPath(parsePropPath(name), value, obj, 0);
3388 });
3389
3390 return obj;
3391 }
3392
3393 return null;
3394 }
3395
3396 /* harmony default export */ const helpers_formDataToJSON = (formDataToJSON);
3397
3398 ;// CONCATENATED MODULE: ./node_modules/axios/lib/core/settle.js
3399
3400
3401
3402
3403 /**
3404 * Resolve or reject a Promise based on response status.
3405 *
3406 * @param {Function} resolve A function that resolves the promise.
3407 * @param {Function} reject A function that rejects the promise.
3408 * @param {object} response The response.
3409 *
3410 * @returns {object} The response.
3411 */
3412 function settle(resolve, reject, response) {
3413 const validateStatus = response.config.validateStatus;
3414 if (!response.status || !validateStatus || validateStatus(response.status)) {
3415 resolve(response);
3416 } else {
3417 reject(new core_AxiosError(
3418 'Request failed with status code ' + response.status,
3419 [core_AxiosError.ERR_BAD_REQUEST, core_AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
3420 response.config,
3421 response.request,
3422 response
3423 ));
3424 }
3425 }
3426
3427 ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/cookies.js
3428
3429
3430
3431
3432
3433 /* harmony default export */ const cookies = (platform_browser.isStandardBrowserEnv ?
3434
3435 // Standard browser envs support document.cookie
3436 (function standardBrowserEnv() {
3437 return {
3438 write: function write(name, value, expires, path, domain, secure) {
3439 const cookie = [];
3440 cookie.push(name + '=' + encodeURIComponent(value));
3441
3442 if (utils.isNumber(expires)) {
3443 cookie.push('expires=' + new Date(expires).toGMTString());
3444 }
3445
3446 if (utils.isString(path)) {
3447 cookie.push('path=' + path);
3448 }
3449
3450 if (utils.isString(domain)) {
3451 cookie.push('domain=' + domain);
3452 }
3453
3454 if (secure === true) {
3455 cookie.push('secure');
3456 }
3457
3458 document.cookie = cookie.join('; ');
3459 },
3460
3461 read: function read(name) {
3462 const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
3463 return (match ? decodeURIComponent(match[3]) : null);
3464 },
3465
3466 remove: function remove(name) {
3467 this.write(name, '', Date.now() - 86400000);
3468 }
3469 };
3470 })() :
3471
3472 // Non standard browser env (web workers, react-native) lack needed support.
3473 (function nonStandardBrowserEnv() {
3474 return {
3475 write: function write() {},
3476 read: function read() { return null; },
3477 remove: function remove() {}
3478 };
3479 })());
3480
3481 ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/isAbsoluteURL.js
3482
3483
3484 /**
3485 * Determines whether the specified URL is absolute
3486 *
3487 * @param {string} url The URL to test
3488 *
3489 * @returns {boolean} True if the specified URL is absolute, otherwise false
3490 */
3491 function isAbsoluteURL(url) {
3492 // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
3493 // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
3494 // by any combination of letters, digits, plus, period, or hyphen.
3495 return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
3496 }
3497
3498 ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/combineURLs.js
3499
3500
3501 /**
3502 * Creates a new URL by combining the specified URLs
3503 *
3504 * @param {string} baseURL The base URL
3505 * @param {string} relativeURL The relative URL
3506 *
3507 * @returns {string} The combined URL
3508 */
3509 function combineURLs(baseURL, relativeURL) {
3510 return relativeURL
3511 ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
3512 : baseURL;
3513 }
3514
3515 ;// CONCATENATED MODULE: ./node_modules/axios/lib/core/buildFullPath.js
3516
3517
3518
3519
3520
3521 /**
3522 * Creates a new URL by combining the baseURL with the requestedURL,
3523 * only when the requestedURL is not already an absolute URL.
3524 * If the requestURL is absolute, this function returns the requestedURL untouched.
3525 *
3526 * @param {string} baseURL The base URL
3527 * @param {string} requestedURL Absolute or relative URL to combine
3528 *
3529 * @returns {string} The combined full path
3530 */
3531 function buildFullPath(baseURL, requestedURL) {
3532 if (baseURL && !isAbsoluteURL(requestedURL)) {
3533 return combineURLs(baseURL, requestedURL);
3534 }
3535 return requestedURL;
3536 }
3537
3538 ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/isURLSameOrigin.js
3539
3540
3541
3542
3543
3544 /* harmony default export */ const isURLSameOrigin = (platform_browser.isStandardBrowserEnv ?
3545
3546 // Standard browser envs have full support of the APIs needed to test
3547 // whether the request URL is of the same origin as current location.
3548 (function standardBrowserEnv() {
3549 const msie = /(msie|trident)/i.test(navigator.userAgent);
3550 const urlParsingNode = document.createElement('a');
3551 let originURL;
3552
3553 /**
3554 * Parse a URL to discover it's components
3555 *
3556 * @param {String} url The URL to be parsed
3557 * @returns {Object}
3558 */
3559 function resolveURL(url) {
3560 let href = url;
3561
3562 if (msie) {
3563 // IE needs attribute set twice to normalize properties
3564 urlParsingNode.setAttribute('href', href);
3565 href = urlParsingNode.href;
3566 }
3567
3568 urlParsingNode.setAttribute('href', href);
3569
3570 // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
3571 return {
3572 href: urlParsingNode.href,
3573 protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
3574 host: urlParsingNode.host,
3575 search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
3576 hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
3577 hostname: urlParsingNode.hostname,
3578 port: urlParsingNode.port,
3579 pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
3580 urlParsingNode.pathname :
3581 '/' + urlParsingNode.pathname
3582 };
3583 }
3584
3585 originURL = resolveURL(window.location.href);
3586
3587 /**
3588 * Determine if a URL shares the same origin as the current location
3589 *
3590 * @param {String} requestURL The URL to test
3591 * @returns {boolean} True if URL shares the same origin, otherwise false
3592 */
3593 return function isURLSameOrigin(requestURL) {
3594 const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
3595 return (parsed.protocol === originURL.protocol &&
3596 parsed.host === originURL.host);
3597 };
3598 })() :
3599
3600 // Non standard browser envs (web workers, react-native) lack needed support.
3601 (function nonStandardBrowserEnv() {
3602 return function isURLSameOrigin() {
3603 return true;
3604 };
3605 })());
3606
3607 ;// CONCATENATED MODULE: ./node_modules/axios/lib/cancel/CanceledError.js
3608
3609
3610
3611
3612
3613 /**
3614 * A `CanceledError` is an object that is thrown when an operation is canceled.
3615 *
3616 * @param {string=} message The message.
3617 * @param {Object=} config The config.
3618 * @param {Object=} request The request.
3619 *
3620 * @returns {CanceledError} The created error.
3621 */
3622 function CanceledError(message, config, request) {
3623 // eslint-disable-next-line no-eq-null,eqeqeq
3624 core_AxiosError.call(this, message == null ? 'canceled' : message, core_AxiosError.ERR_CANCELED, config, request);
3625 this.name = 'CanceledError';
3626 }
3627
3628 utils.inherits(CanceledError, core_AxiosError, {
3629 __CANCEL__: true
3630 });
3631
3632 /* harmony default export */ const cancel_CanceledError = (CanceledError);
3633
3634 ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/parseProtocol.js
3635
3636
3637 function parseProtocol(url) {
3638 const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
3639 return match && match[1] || '';
3640 }
3641
3642 ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/parseHeaders.js
3643
3644
3645
3646
3647 // RawAxiosHeaders whose duplicates are ignored by node
3648 // c.f. https://nodejs.org/api/http.html#http_message_headers
3649 const ignoreDuplicateOf = utils.toObjectSet([
3650 'age', 'authorization', 'content-length', 'content-type', 'etag',
3651 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
3652 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
3653 'referer', 'retry-after', 'user-agent'
3654 ]);
3655
3656 /**
3657 * Parse headers into an object
3658 *
3659 * ```
3660 * Date: Wed, 27 Aug 2014 08:58:49 GMT
3661 * Content-Type: application/json
3662 * Connection: keep-alive
3663 * Transfer-Encoding: chunked
3664 * ```
3665 *
3666 * @param {String} rawHeaders Headers needing to be parsed
3667 *
3668 * @returns {Object} Headers parsed into an object
3669 */
3670 /* harmony default export */ const parseHeaders = (rawHeaders => {
3671 const parsed = {};
3672 let key;
3673 let val;
3674 let i;
3675
3676 rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
3677 i = line.indexOf(':');
3678 key = line.substring(0, i).trim().toLowerCase();
3679 val = line.substring(i + 1).trim();
3680
3681 if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
3682 return;
3683 }
3684
3685 if (key === 'set-cookie') {
3686 if (parsed[key]) {
3687 parsed[key].push(val);
3688 } else {
3689 parsed[key] = [val];
3690 }
3691 } else {
3692 parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
3693 }
3694 });
3695
3696 return parsed;
3697 });
3698
3699 ;// CONCATENATED MODULE: ./node_modules/axios/lib/core/AxiosHeaders.js
3700
3701
3702
3703
3704
3705 const $internals = Symbol('internals');
3706 const $defaults = Symbol('defaults');
3707
3708 function normalizeHeader(header) {
3709 return header && String(header).trim().toLowerCase();
3710 }
3711
3712 function normalizeValue(value) {
3713 if (value === false || value == null) {
3714 return value;
3715 }
3716
3717 return utils.isArray(value) ? value.map(normalizeValue) : String(value);
3718 }
3719
3720 function parseTokens(str) {
3721 const tokens = Object.create(null);
3722 const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
3723 let match;
3724
3725 while ((match = tokensRE.exec(str))) {
3726 tokens[match[1]] = match[2];
3727 }
3728
3729 return tokens;
3730 }
3731
3732 function matchHeaderValue(context, value, header, filter) {
3733 if (utils.isFunction(filter)) {
3734 return filter.call(this, value, header);
3735 }
3736
3737 if (!utils.isString(value)) return;
3738
3739 if (utils.isString(filter)) {
3740 return value.indexOf(filter) !== -1;
3741 }
3742
3743 if (utils.isRegExp(filter)) {
3744 return filter.test(value);
3745 }
3746 }
3747
3748 function formatHeader(header) {
3749 return header.trim()
3750 .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
3751 return char.toUpperCase() + str;
3752 });
3753 }
3754
3755 function buildAccessors(obj, header) {
3756 const accessorName = utils.toCamelCase(' ' + header);
3757
3758 ['get', 'set', 'has'].forEach(methodName => {
3759 Object.defineProperty(obj, methodName + accessorName, {
3760 value: function(arg1, arg2, arg3) {
3761 return this[methodName].call(this, header, arg1, arg2, arg3);
3762 },
3763 configurable: true
3764 });
3765 });
3766 }
3767
3768 function findKey(obj, key) {
3769 key = key.toLowerCase();
3770 const keys = Object.keys(obj);
3771 let i = keys.length;
3772 let _key;
3773 while (i-- > 0) {
3774 _key = keys[i];
3775 if (key === _key.toLowerCase()) {
3776 return _key;
3777 }
3778 }
3779 return null;
3780 }
3781
3782 function AxiosHeaders(headers, defaults) {
3783 headers && this.set(headers);
3784 this[$defaults] = defaults || null;
3785 }
3786
3787 Object.assign(AxiosHeaders.prototype, {
3788 set: function(header, valueOrRewrite, rewrite) {
3789 const self = this;
3790
3791 function setHeader(_value, _header, _rewrite) {
3792 const lHeader = normalizeHeader(_header);
3793
3794 if (!lHeader) {
3795 throw new Error('header name must be a non-empty string');
3796 }
3797
3798 const key = findKey(self, lHeader);
3799
3800 if (key && _rewrite !== true && (self[key] === false || _rewrite === false)) {
3801 return;
3802 }
3803
3804 self[key || _header] = normalizeValue(_value);
3805 }
3806
3807 if (utils.isPlainObject(header)) {
3808 utils.forEach(header, (_value, _header) => {
3809 setHeader(_value, _header, valueOrRewrite);
3810 });
3811 } else {
3812 setHeader(valueOrRewrite, header, rewrite);
3813 }
3814
3815 return this;
3816 },
3817
3818 get: function(header, parser) {
3819 header = normalizeHeader(header);
3820
3821 if (!header) return undefined;
3822
3823 const key = findKey(this, header);
3824
3825 if (key) {
3826 const value = this[key];
3827
3828 if (!parser) {
3829 return value;
3830 }
3831
3832 if (parser === true) {
3833 return parseTokens(value);
3834 }
3835
3836 if (utils.isFunction(parser)) {
3837 return parser.call(this, value, key);
3838 }
3839
3840 if (utils.isRegExp(parser)) {
3841 return parser.exec(value);
3842 }
3843
3844 throw new TypeError('parser must be boolean|regexp|function');
3845 }
3846 },
3847
3848 has: function(header, matcher) {
3849 header = normalizeHeader(header);
3850
3851 if (header) {
3852 const key = findKey(this, header);
3853
3854 return !!(key && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
3855 }
3856
3857 return false;
3858 },
3859
3860 delete: function(header, matcher) {
3861 const self = this;
3862 let deleted = false;
3863
3864 function deleteHeader(_header) {
3865 _header = normalizeHeader(_header);
3866
3867 if (_header) {
3868 const key = findKey(self, _header);
3869
3870 if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
3871 delete self[key];
3872
3873 deleted = true;
3874 }
3875 }
3876 }
3877
3878 if (utils.isArray(header)) {
3879 header.forEach(deleteHeader);
3880 } else {
3881 deleteHeader(header);
3882 }
3883
3884 return deleted;
3885 },
3886
3887 clear: function() {
3888 return Object.keys(this).forEach(this.delete.bind(this));
3889 },
3890
3891 normalize: function(format) {
3892 const self = this;
3893 const headers = {};
3894
3895 utils.forEach(this, (value, header) => {
3896 const key = findKey(headers, header);
3897
3898 if (key) {
3899 self[key] = normalizeValue(value);
3900 delete self[header];
3901 return;
3902 }
3903
3904 const normalized = format ? formatHeader(header) : String(header).trim();
3905
3906 if (normalized !== header) {
3907 delete self[header];
3908 }
3909
3910 self[normalized] = normalizeValue(value);
3911
3912 headers[normalized] = true;
3913 });
3914
3915 return this;
3916 },
3917
3918 toJSON: function(asStrings) {
3919 const obj = Object.create(null);
3920
3921 utils.forEach(Object.assign({}, this[$defaults] || null, this),
3922 (value, header) => {
3923 if (value == null || value === false) return;
3924 obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value;
3925 });
3926
3927 return obj;
3928 }
3929 });
3930
3931 Object.assign(AxiosHeaders, {
3932 from: function(thing) {
3933 if (utils.isString(thing)) {
3934 return new this(parseHeaders(thing));
3935 }
3936 return thing instanceof this ? thing : new this(thing);
3937 },
3938
3939 accessor: function(header) {
3940 const internals = this[$internals] = (this[$internals] = {
3941 accessors: {}
3942 });
3943
3944 const accessors = internals.accessors;
3945 const prototype = this.prototype;
3946
3947 function defineAccessor(_header) {
3948 const lHeader = normalizeHeader(_header);
3949
3950 if (!accessors[lHeader]) {
3951 buildAccessors(prototype, _header);
3952 accessors[lHeader] = true;
3953 }
3954 }
3955
3956 utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
3957
3958 return this;
3959 }
3960 });
3961
3962 AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent']);
3963
3964 utils.freezeMethods(AxiosHeaders.prototype);
3965 utils.freezeMethods(AxiosHeaders);
3966
3967 /* harmony default export */ const core_AxiosHeaders = (AxiosHeaders);
3968
3969 ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/speedometer.js
3970
3971
3972 /**
3973 * Calculate data maxRate
3974 * @param {Number} [samplesCount= 10]
3975 * @param {Number} [min= 1000]
3976 * @returns {Function}
3977 */
3978 function speedometer(samplesCount, min) {
3979 samplesCount = samplesCount || 10;
3980 const bytes = new Array(samplesCount);
3981 const timestamps = new Array(samplesCount);
3982 let head = 0;
3983 let tail = 0;
3984 let firstSampleTS;
3985
3986 min = min !== undefined ? min : 1000;
3987
3988 return function push(chunkLength) {
3989 const now = Date.now();
3990
3991 const startedAt = timestamps[tail];
3992
3993 if (!firstSampleTS) {
3994 firstSampleTS = now;
3995 }
3996
3997 bytes[head] = chunkLength;
3998 timestamps[head] = now;
3999
4000 let i = tail;
4001 let bytesCount = 0;
4002
4003 while (i !== head) {
4004 bytesCount += bytes[i++];
4005 i = i % samplesCount;
4006 }
4007
4008 head = (head + 1) % samplesCount;
4009
4010 if (head === tail) {
4011 tail = (tail + 1) % samplesCount;
4012 }
4013
4014 if (now - firstSampleTS < min) {
4015 return;
4016 }
4017
4018 const passed = startedAt && now - startedAt;
4019
4020 return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
4021 };
4022 }
4023
4024 /* harmony default export */ const helpers_speedometer = (speedometer);
4025
4026 ;// CONCATENATED MODULE: ./node_modules/axios/lib/adapters/xhr.js
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043 function progressEventReducer(listener, isDownloadStream) {
4044 let bytesNotified = 0;
4045 const _speedometer = helpers_speedometer(50, 250);
4046
4047 return e => {
4048 const loaded = e.loaded;
4049 const total = e.lengthComputable ? e.total : undefined;
4050 const progressBytes = loaded - bytesNotified;
4051 const rate = _speedometer(progressBytes);
4052 const inRange = loaded <= total;
4053
4054 bytesNotified = loaded;
4055
4056 const data = {
4057 loaded,
4058 total,
4059 progress: total ? (loaded / total) : undefined,
4060 bytes: progressBytes,
4061 rate: rate ? rate : undefined,
4062 estimated: rate && total && inRange ? (total - loaded) / rate : undefined
4063 };
4064
4065 data[isDownloadStream ? 'download' : 'upload'] = true;
4066
4067 listener(data);
4068 };
4069 }
4070
4071 function xhrAdapter(config) {
4072 return new Promise(function dispatchXhrRequest(resolve, reject) {
4073 let requestData = config.data;
4074 const requestHeaders = core_AxiosHeaders.from(config.headers).normalize();
4075 const responseType = config.responseType;
4076 let onCanceled;
4077 function done() {
4078 if (config.cancelToken) {
4079 config.cancelToken.unsubscribe(onCanceled);
4080 }
4081
4082 if (config.signal) {
4083 config.signal.removeEventListener('abort', onCanceled);
4084 }
4085 }
4086
4087 if (utils.isFormData(requestData) && platform_browser.isStandardBrowserEnv) {
4088 requestHeaders.setContentType(false); // Let the browser set it
4089 }
4090
4091 let request = new XMLHttpRequest();
4092
4093 // HTTP basic authentication
4094 if (config.auth) {
4095 const username = config.auth.username || '';
4096 const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
4097 requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));
4098 }
4099
4100 const fullPath = buildFullPath(config.baseURL, config.url);
4101
4102 request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
4103
4104 // Set the request timeout in MS
4105 request.timeout = config.timeout;
4106
4107 function onloadend() {
4108 if (!request) {
4109 return;
4110 }
4111 // Prepare the response
4112 const responseHeaders = core_AxiosHeaders.from(
4113 'getAllResponseHeaders' in request && request.getAllResponseHeaders()
4114 );
4115 const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
4116 request.responseText : request.response;
4117 const response = {
4118 data: responseData,
4119 status: request.status,
4120 statusText: request.statusText,
4121 headers: responseHeaders,
4122 config,
4123 request
4124 };
4125
4126 settle(function _resolve(value) {
4127 resolve(value);
4128 done();
4129 }, function _reject(err) {
4130 reject(err);
4131 done();
4132 }, response);
4133
4134 // Clean up request
4135 request = null;
4136 }
4137
4138 if ('onloadend' in request) {
4139 // Use onloadend if available
4140 request.onloadend = onloadend;
4141 } else {
4142 // Listen for ready state to emulate onloadend
4143 request.onreadystatechange = function handleLoad() {
4144 if (!request || request.readyState !== 4) {
4145 return;
4146 }
4147
4148 // The request errored out and we didn't get a response, this will be
4149 // handled by onerror instead
4150 // With one exception: request that using file: protocol, most browsers
4151 // will return status as 0 even though it's a successful request
4152 if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
4153 return;
4154 }
4155 // readystate handler is calling before onerror or ontimeout handlers,
4156 // so we should call onloadend on the next 'tick'
4157 setTimeout(onloadend);
4158 };
4159 }
4160
4161 // Handle browser request cancellation (as opposed to a manual cancellation)
4162 request.onabort = function handleAbort() {
4163 if (!request) {
4164 return;
4165 }
4166
4167 reject(new core_AxiosError('Request aborted', core_AxiosError.ECONNABORTED, config, request));
4168
4169 // Clean up request
4170 request = null;
4171 };
4172
4173 // Handle low level network errors
4174 request.onerror = function handleError() {
4175 // Real errors are hidden from us by the browser
4176 // onerror should only fire if it's a network error
4177 reject(new core_AxiosError('Network Error', core_AxiosError.ERR_NETWORK, config, request));
4178
4179 // Clean up request
4180 request = null;
4181 };
4182
4183 // Handle timeout
4184 request.ontimeout = function handleTimeout() {
4185 let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
4186 const transitional = config.transitional || defaults_transitional;
4187 if (config.timeoutErrorMessage) {
4188 timeoutErrorMessage = config.timeoutErrorMessage;
4189 }
4190 reject(new core_AxiosError(
4191 timeoutErrorMessage,
4192 transitional.clarifyTimeoutError ? core_AxiosError.ETIMEDOUT : core_AxiosError.ECONNABORTED,
4193 config,
4194 request));
4195
4196 // Clean up request
4197 request = null;
4198 };
4199
4200 // Add xsrf header
4201 // This is only done if running in a standard browser environment.
4202 // Specifically not if we're in a web worker, or react-native.
4203 if (platform_browser.isStandardBrowserEnv) {
4204 // Add xsrf header
4205 const xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath))
4206 && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
4207
4208 if (xsrfValue) {
4209 requestHeaders.set(config.xsrfHeaderName, xsrfValue);
4210 }
4211 }
4212
4213 // Remove Content-Type if data is undefined
4214 requestData === undefined && requestHeaders.setContentType(null);
4215
4216 // Add headers to the request
4217 if ('setRequestHeader' in request) {
4218 utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
4219 request.setRequestHeader(key, val);
4220 });
4221 }
4222
4223 // Add withCredentials to request if needed
4224 if (!utils.isUndefined(config.withCredentials)) {
4225 request.withCredentials = !!config.withCredentials;
4226 }
4227
4228 // Add responseType to request if needed
4229 if (responseType && responseType !== 'json') {
4230 request.responseType = config.responseType;
4231 }
4232
4233 // Handle progress if needed
4234 if (typeof config.onDownloadProgress === 'function') {
4235 request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));
4236 }
4237
4238 // Not all browsers support upload events
4239 if (typeof config.onUploadProgress === 'function' && request.upload) {
4240 request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));
4241 }
4242
4243 if (config.cancelToken || config.signal) {
4244 // Handle cancellation
4245 // eslint-disable-next-line func-names
4246 onCanceled = cancel => {
4247 if (!request) {
4248 return;
4249 }
4250 reject(!cancel || cancel.type ? new cancel_CanceledError(null, config, request) : cancel);
4251 request.abort();
4252 request = null;
4253 };
4254
4255 config.cancelToken && config.cancelToken.subscribe(onCanceled);
4256 if (config.signal) {
4257 config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
4258 }
4259 }
4260
4261 const protocol = parseProtocol(fullPath);
4262
4263 if (protocol && platform_browser.protocols.indexOf(protocol) === -1) {
4264 reject(new core_AxiosError('Unsupported protocol ' + protocol + ':', core_AxiosError.ERR_BAD_REQUEST, config));
4265 return;
4266 }
4267
4268
4269 // Send the request
4270 request.send(requestData || null);
4271 });
4272 }
4273
4274 ;// CONCATENATED MODULE: ./node_modules/axios/lib/adapters/index.js
4275
4276
4277
4278
4279 const adapters = {
4280 http: xhrAdapter,
4281 xhr: xhrAdapter
4282 }
4283
4284 /* harmony default export */ const lib_adapters = ({
4285 getAdapter: (nameOrAdapter) => {
4286 if(utils.isString(nameOrAdapter)){
4287 const adapter = adapters[nameOrAdapter];
4288
4289 if (!nameOrAdapter) {
4290 throw Error(
4291 utils.hasOwnProp(nameOrAdapter) ?
4292 `Adapter '${nameOrAdapter}' is not available in the build` :
4293 `Can not resolve adapter '${nameOrAdapter}'`
4294 );
4295 }
4296
4297 return adapter
4298 }
4299
4300 if (!utils.isFunction(nameOrAdapter)) {
4301 throw new TypeError('adapter is not a function');
4302 }
4303
4304 return nameOrAdapter;
4305 },
4306 adapters
4307 });
4308
4309 ;// CONCATENATED MODULE: ./node_modules/axios/lib/defaults/index.js
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321 const DEFAULT_CONTENT_TYPE = {
4322 'Content-Type': 'application/x-www-form-urlencoded'
4323 };
4324
4325 /**
4326 * If the browser has an XMLHttpRequest object, use the XHR adapter, otherwise use the HTTP
4327 * adapter
4328 *
4329 * @returns {Function}
4330 */
4331 function getDefaultAdapter() {
4332 let adapter;
4333 if (typeof XMLHttpRequest !== 'undefined') {
4334 // For browsers use XHR adapter
4335 adapter = lib_adapters.getAdapter('xhr');
4336 } else if (typeof process !== 'undefined' && utils.kindOf(process) === 'process') {
4337 // For node use HTTP adapter
4338 adapter = lib_adapters.getAdapter('http');
4339 }
4340 return adapter;
4341 }
4342
4343 /**
4344 * It takes a string, tries to parse it, and if it fails, it returns the stringified version
4345 * of the input
4346 *
4347 * @param {any} rawValue - The value to be stringified.
4348 * @param {Function} parser - A function that parses a string into a JavaScript object.
4349 * @param {Function} encoder - A function that takes a value and returns a string.
4350 *
4351 * @returns {string} A stringified version of the rawValue.
4352 */
4353 function stringifySafely(rawValue, parser, encoder) {
4354 if (utils.isString(rawValue)) {
4355 try {
4356 (parser || JSON.parse)(rawValue);
4357 return utils.trim(rawValue);
4358 } catch (e) {
4359 if (e.name !== 'SyntaxError') {
4360 throw e;
4361 }
4362 }
4363 }
4364
4365 return (encoder || JSON.stringify)(rawValue);
4366 }
4367
4368 const defaults = {
4369
4370 transitional: defaults_transitional,
4371
4372 adapter: getDefaultAdapter(),
4373
4374 transformRequest: [function transformRequest(data, headers) {
4375 const contentType = headers.getContentType() || '';
4376 const hasJSONContentType = contentType.indexOf('application/json') > -1;
4377 const isObjectPayload = utils.isObject(data);
4378
4379 if (isObjectPayload && utils.isHTMLForm(data)) {
4380 data = new FormData(data);
4381 }
4382
4383 const isFormData = utils.isFormData(data);
4384
4385 if (isFormData) {
4386 if (!hasJSONContentType) {
4387 return data;
4388 }
4389 return hasJSONContentType ? JSON.stringify(helpers_formDataToJSON(data)) : data;
4390 }
4391
4392 if (utils.isArrayBuffer(data) ||
4393 utils.isBuffer(data) ||
4394 utils.isStream(data) ||
4395 utils.isFile(data) ||
4396 utils.isBlob(data)
4397 ) {
4398 return data;
4399 }
4400 if (utils.isArrayBufferView(data)) {
4401 return data.buffer;
4402 }
4403 if (utils.isURLSearchParams(data)) {
4404 headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
4405 return data.toString();
4406 }
4407
4408 let isFileList;
4409
4410 if (isObjectPayload) {
4411 if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
4412 return toURLEncodedForm(data, this.formSerializer).toString();
4413 }
4414
4415 if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
4416 const _FormData = this.env && this.env.FormData;
4417
4418 return helpers_toFormData(
4419 isFileList ? {'files[]': data} : data,
4420 _FormData && new _FormData(),
4421 this.formSerializer
4422 );
4423 }
4424 }
4425
4426 if (isObjectPayload || hasJSONContentType ) {
4427 headers.setContentType('application/json', false);
4428 return stringifySafely(data);
4429 }
4430
4431 return data;
4432 }],
4433
4434 transformResponse: [function transformResponse(data) {
4435 const transitional = this.transitional || defaults.transitional;
4436 const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
4437 const JSONRequested = this.responseType === 'json';
4438
4439 if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
4440 const silentJSONParsing = transitional && transitional.silentJSONParsing;
4441 const strictJSONParsing = !silentJSONParsing && JSONRequested;
4442
4443 try {
4444 return JSON.parse(data);
4445 } catch (e) {
4446 if (strictJSONParsing) {
4447 if (e.name === 'SyntaxError') {
4448 throw core_AxiosError.from(e, core_AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
4449 }
4450 throw e;
4451 }
4452 }
4453 }
4454
4455 return data;
4456 }],
4457
4458 /**
4459 * A timeout in milliseconds to abort a request. If set to 0 (default) a
4460 * timeout is not created.
4461 */
4462 timeout: 0,
4463
4464 xsrfCookieName: 'XSRF-TOKEN',
4465 xsrfHeaderName: 'X-XSRF-TOKEN',
4466
4467 maxContentLength: -1,
4468 maxBodyLength: -1,
4469
4470 env: {
4471 FormData: platform_browser.classes.FormData,
4472 Blob: platform_browser.classes.Blob
4473 },
4474
4475 validateStatus: function validateStatus(status) {
4476 return status >= 200 && status < 300;
4477 },
4478
4479 headers: {
4480 common: {
4481 'Accept': 'application/json, text/plain, */*'
4482 }
4483 }
4484 };
4485
4486 utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
4487 defaults.headers[method] = {};
4488 });
4489
4490 utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
4491 defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
4492 });
4493
4494 /* harmony default export */ const lib_defaults = (defaults);
4495
4496 ;// CONCATENATED MODULE: ./node_modules/axios/lib/core/transformData.js
4497
4498
4499
4500
4501
4502
4503 /**
4504 * Transform the data for a request or a response
4505 *
4506 * @param {Array|Function} fns A single function or Array of functions
4507 * @param {?Object} response The response object
4508 *
4509 * @returns {*} The resulting transformed data
4510 */
4511 function transformData(fns, response) {
4512 const config = this || lib_defaults;
4513 const context = response || config;
4514 const headers = core_AxiosHeaders.from(context.headers);
4515 let data = context.data;
4516
4517 utils.forEach(fns, function transform(fn) {
4518 data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
4519 });
4520
4521 headers.normalize();
4522
4523 return data;
4524 }
4525
4526 ;// CONCATENATED MODULE: ./node_modules/axios/lib/cancel/isCancel.js
4527
4528
4529 function isCancel(value) {
4530 return !!(value && value.__CANCEL__);
4531 }
4532
4533 ;// CONCATENATED MODULE: ./node_modules/axios/lib/core/dispatchRequest.js
4534
4535
4536
4537
4538
4539
4540
4541
4542 /**
4543 * Throws a `CanceledError` if cancellation has been requested.
4544 *
4545 * @param {Object} config The config that is to be used for the request
4546 *
4547 * @returns {void}
4548 */
4549 function throwIfCancellationRequested(config) {
4550 if (config.cancelToken) {
4551 config.cancelToken.throwIfRequested();
4552 }
4553
4554 if (config.signal && config.signal.aborted) {
4555 throw new cancel_CanceledError();
4556 }
4557 }
4558
4559 /**
4560 * Dispatch a request to the server using the configured adapter.
4561 *
4562 * @param {object} config The config that is to be used for the request
4563 *
4564 * @returns {Promise} The Promise to be fulfilled
4565 */
4566 function dispatchRequest(config) {
4567 throwIfCancellationRequested(config);
4568
4569 config.headers = core_AxiosHeaders.from(config.headers);
4570
4571 // Transform request data
4572 config.data = transformData.call(
4573 config,
4574 config.transformRequest
4575 );
4576
4577 const adapter = config.adapter || lib_defaults.adapter;
4578
4579 return adapter(config).then(function onAdapterResolution(response) {
4580 throwIfCancellationRequested(config);
4581
4582 // Transform response data
4583 response.data = transformData.call(
4584 config,
4585 config.transformResponse,
4586 response
4587 );
4588
4589 response.headers = core_AxiosHeaders.from(response.headers);
4590
4591 return response;
4592 }, function onAdapterRejection(reason) {
4593 if (!isCancel(reason)) {
4594 throwIfCancellationRequested(config);
4595
4596 // Transform response data
4597 if (reason && reason.response) {
4598 reason.response.data = transformData.call(
4599 config,
4600 config.transformResponse,
4601 reason.response
4602 );
4603 reason.response.headers = core_AxiosHeaders.from(reason.response.headers);
4604 }
4605 }
4606
4607 return Promise.reject(reason);
4608 });
4609 }
4610
4611 ;// CONCATENATED MODULE: ./node_modules/axios/lib/core/mergeConfig.js
4612
4613
4614
4615
4616 /**
4617 * Config-specific merge-function which creates a new config-object
4618 * by merging two configuration objects together.
4619 *
4620 * @param {Object} config1
4621 * @param {Object} config2
4622 *
4623 * @returns {Object} New object resulting from merging config2 to config1
4624 */
4625 function mergeConfig(config1, config2) {
4626 // eslint-disable-next-line no-param-reassign
4627 config2 = config2 || {};
4628 const config = {};
4629
4630 function getMergedValue(target, source) {
4631 if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
4632 return utils.merge(target, source);
4633 } else if (utils.isPlainObject(source)) {
4634 return utils.merge({}, source);
4635 } else if (utils.isArray(source)) {
4636 return source.slice();
4637 }
4638 return source;
4639 }
4640
4641 // eslint-disable-next-line consistent-return
4642 function mergeDeepProperties(prop) {
4643 if (!utils.isUndefined(config2[prop])) {
4644 return getMergedValue(config1[prop], config2[prop]);
4645 } else if (!utils.isUndefined(config1[prop])) {
4646 return getMergedValue(undefined, config1[prop]);
4647 }
4648 }
4649
4650 // eslint-disable-next-line consistent-return
4651 function valueFromConfig2(prop) {
4652 if (!utils.isUndefined(config2[prop])) {
4653 return getMergedValue(undefined, config2[prop]);
4654 }
4655 }
4656
4657 // eslint-disable-next-line consistent-return
4658 function defaultToConfig2(prop) {
4659 if (!utils.isUndefined(config2[prop])) {
4660 return getMergedValue(undefined, config2[prop]);
4661 } else if (!utils.isUndefined(config1[prop])) {
4662 return getMergedValue(undefined, config1[prop]);
4663 }
4664 }
4665
4666 // eslint-disable-next-line consistent-return
4667 function mergeDirectKeys(prop) {
4668 if (prop in config2) {
4669 return getMergedValue(config1[prop], config2[prop]);
4670 } else if (prop in config1) {
4671 return getMergedValue(undefined, config1[prop]);
4672 }
4673 }
4674
4675 const mergeMap = {
4676 'url': valueFromConfig2,
4677 'method': valueFromConfig2,
4678 'data': valueFromConfig2,
4679 'baseURL': defaultToConfig2,
4680 'transformRequest': defaultToConfig2,
4681 'transformResponse': defaultToConfig2,
4682 'paramsSerializer': defaultToConfig2,
4683 'timeout': defaultToConfig2,
4684 'timeoutMessage': defaultToConfig2,
4685 'withCredentials': defaultToConfig2,
4686 'adapter': defaultToConfig2,
4687 'responseType': defaultToConfig2,
4688 'xsrfCookieName': defaultToConfig2,
4689 'xsrfHeaderName': defaultToConfig2,
4690 'onUploadProgress': defaultToConfig2,
4691 'onDownloadProgress': defaultToConfig2,
4692 'decompress': defaultToConfig2,
4693 'maxContentLength': defaultToConfig2,
4694 'maxBodyLength': defaultToConfig2,
4695 'beforeRedirect': defaultToConfig2,
4696 'transport': defaultToConfig2,
4697 'httpAgent': defaultToConfig2,
4698 'httpsAgent': defaultToConfig2,
4699 'cancelToken': defaultToConfig2,
4700 'socketPath': defaultToConfig2,
4701 'responseEncoding': defaultToConfig2,
4702 'validateStatus': mergeDirectKeys
4703 };
4704
4705 utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
4706 const merge = mergeMap[prop] || mergeDeepProperties;
4707 const configValue = merge(prop);
4708 (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
4709 });
4710
4711 return config;
4712 }
4713
4714 ;// CONCATENATED MODULE: ./node_modules/axios/lib/env/data.js
4715 const VERSION = "1.1.3";
4716 ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/validator.js
4717
4718
4719
4720
4721
4722 const validators = {};
4723
4724 // eslint-disable-next-line func-names
4725 ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {
4726 validators[type] = function validator(thing) {
4727 return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
4728 };
4729 });
4730
4731 const deprecatedWarnings = {};
4732
4733 /**
4734 * Transitional option validator
4735 *
4736 * @param {function|boolean?} validator - set to false if the transitional option has been removed
4737 * @param {string?} version - deprecated version / removed since version
4738 * @param {string?} message - some message with additional info
4739 *
4740 * @returns {function}
4741 */
4742 validators.transitional = function transitional(validator, version, message) {
4743 function formatMessage(opt, desc) {
4744 return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
4745 }
4746
4747 // eslint-disable-next-line func-names
4748 return (value, opt, opts) => {
4749 if (validator === false) {
4750 throw new core_AxiosError(
4751 formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
4752 core_AxiosError.ERR_DEPRECATED
4753 );
4754 }
4755
4756 if (version && !deprecatedWarnings[opt]) {
4757 deprecatedWarnings[opt] = true;
4758 // eslint-disable-next-line no-console
4759 console.warn(
4760 formatMessage(
4761 opt,
4762 ' has been deprecated since v' + version + ' and will be removed in the near future'
4763 )
4764 );
4765 }
4766
4767 return validator ? validator(value, opt, opts) : true;
4768 };
4769 };
4770
4771 /**
4772 * Assert object's properties type
4773 *
4774 * @param {object} options
4775 * @param {object} schema
4776 * @param {boolean?} allowUnknown
4777 *
4778 * @returns {object}
4779 */
4780
4781 function assertOptions(options, schema, allowUnknown) {
4782 if (typeof options !== 'object') {
4783 throw new core_AxiosError('options must be an object', core_AxiosError.ERR_BAD_OPTION_VALUE);
4784 }
4785 const keys = Object.keys(options);
4786 let i = keys.length;
4787 while (i-- > 0) {
4788 const opt = keys[i];
4789 const validator = schema[opt];
4790 if (validator) {
4791 const value = options[opt];
4792 const result = value === undefined || validator(value, opt, options);
4793 if (result !== true) {
4794 throw new core_AxiosError('option ' + opt + ' must be ' + result, core_AxiosError.ERR_BAD_OPTION_VALUE);
4795 }
4796 continue;
4797 }
4798 if (allowUnknown !== true) {
4799 throw new core_AxiosError('Unknown option ' + opt, core_AxiosError.ERR_BAD_OPTION);
4800 }
4801 }
4802 }
4803
4804 /* harmony default export */ const validator = ({
4805 assertOptions,
4806 validators
4807 });
4808
4809 ;// CONCATENATED MODULE: ./node_modules/axios/lib/core/Axios.js
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821 const Axios_validators = validator.validators;
4822
4823 /**
4824 * Create a new instance of Axios
4825 *
4826 * @param {Object} instanceConfig The default config for the instance
4827 *
4828 * @return {Axios} A new instance of Axios
4829 */
4830 class Axios {
4831 constructor(instanceConfig) {
4832 this.defaults = instanceConfig;
4833 this.interceptors = {
4834 request: new core_InterceptorManager(),
4835 response: new core_InterceptorManager()
4836 };
4837 }
4838
4839 /**
4840 * Dispatch a request
4841 *
4842 * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
4843 * @param {?Object} config
4844 *
4845 * @returns {Promise} The Promise to be fulfilled
4846 */
4847 request(configOrUrl, config) {
4848 /*eslint no-param-reassign:0*/
4849 // Allow for axios('example/url'[, config]) a la fetch API
4850 if (typeof configOrUrl === 'string') {
4851 config = config || {};
4852 config.url = configOrUrl;
4853 } else {
4854 config = configOrUrl || {};
4855 }
4856
4857 config = mergeConfig(this.defaults, config);
4858
4859 const {transitional, paramsSerializer} = config;
4860
4861 if (transitional !== undefined) {
4862 validator.assertOptions(transitional, {
4863 silentJSONParsing: Axios_validators.transitional(Axios_validators.boolean),
4864 forcedJSONParsing: Axios_validators.transitional(Axios_validators.boolean),
4865 clarifyTimeoutError: Axios_validators.transitional(Axios_validators.boolean)
4866 }, false);
4867 }
4868
4869 if (paramsSerializer !== undefined) {
4870 validator.assertOptions(paramsSerializer, {
4871 encode: Axios_validators.function,
4872 serialize: Axios_validators.function
4873 }, true);
4874 }
4875
4876 // Set config.method
4877 config.method = (config.method || this.defaults.method || 'get').toLowerCase();
4878
4879 // Flatten headers
4880 const defaultHeaders = config.headers && utils.merge(
4881 config.headers.common,
4882 config.headers[config.method]
4883 );
4884
4885 defaultHeaders && utils.forEach(
4886 ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
4887 function cleanHeaderConfig(method) {
4888 delete config.headers[method];
4889 }
4890 );
4891
4892 config.headers = new core_AxiosHeaders(config.headers, defaultHeaders);
4893
4894 // filter out skipped interceptors
4895 const requestInterceptorChain = [];
4896 let synchronousRequestInterceptors = true;
4897 this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
4898 if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
4899 return;
4900 }
4901
4902 synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
4903
4904 requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
4905 });
4906
4907 const responseInterceptorChain = [];
4908 this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
4909 responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
4910 });
4911
4912 let promise;
4913 let i = 0;
4914 let len;
4915
4916 if (!synchronousRequestInterceptors) {
4917 const chain = [dispatchRequest.bind(this), undefined];
4918 chain.unshift.apply(chain, requestInterceptorChain);
4919 chain.push.apply(chain, responseInterceptorChain);
4920 len = chain.length;
4921
4922 promise = Promise.resolve(config);
4923
4924 while (i < len) {
4925 promise = promise.then(chain[i++], chain[i++]);
4926 }
4927
4928 return promise;
4929 }
4930
4931 len = requestInterceptorChain.length;
4932
4933 let newConfig = config;
4934
4935 i = 0;
4936
4937 while (i < len) {
4938 const onFulfilled = requestInterceptorChain[i++];
4939 const onRejected = requestInterceptorChain[i++];
4940 try {
4941 newConfig = onFulfilled(newConfig);
4942 } catch (error) {
4943 onRejected.call(this, error);
4944 break;
4945 }
4946 }
4947
4948 try {
4949 promise = dispatchRequest.call(this, newConfig);
4950 } catch (error) {
4951 return Promise.reject(error);
4952 }
4953
4954 i = 0;
4955 len = responseInterceptorChain.length;
4956
4957 while (i < len) {
4958 promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
4959 }
4960
4961 return promise;
4962 }
4963
4964 getUri(config) {
4965 config = mergeConfig(this.defaults, config);
4966 const fullPath = buildFullPath(config.baseURL, config.url);
4967 return buildURL(fullPath, config.params, config.paramsSerializer);
4968 }
4969 }
4970
4971 // Provide aliases for supported request methods
4972 utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
4973 /*eslint func-names:0*/
4974 Axios.prototype[method] = function(url, config) {
4975 return this.request(mergeConfig(config || {}, {
4976 method,
4977 url,
4978 data: (config || {}).data
4979 }));
4980 };
4981 });
4982
4983 utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
4984 /*eslint func-names:0*/
4985
4986 function generateHTTPMethod(isForm) {
4987 return function httpMethod(url, data, config) {
4988 return this.request(mergeConfig(config || {}, {
4989 method,
4990 headers: isForm ? {
4991 'Content-Type': 'multipart/form-data'
4992 } : {},
4993 url,
4994 data
4995 }));
4996 };
4997 }
4998
4999 Axios.prototype[method] = generateHTTPMethod();
5000
5001 Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
5002 });
5003
5004 /* harmony default export */ const core_Axios = (Axios);
5005
5006 ;// CONCATENATED MODULE: ./node_modules/axios/lib/cancel/CancelToken.js
5007
5008
5009
5010
5011 /**
5012 * A `CancelToken` is an object that can be used to request cancellation of an operation.
5013 *
5014 * @param {Function} executor The executor function.
5015 *
5016 * @returns {CancelToken}
5017 */
5018 class CancelToken {
5019 constructor(executor) {
5020 if (typeof executor !== 'function') {
5021 throw new TypeError('executor must be a function.');
5022 }
5023
5024 let resolvePromise;
5025
5026 this.promise = new Promise(function promiseExecutor(resolve) {
5027 resolvePromise = resolve;
5028 });
5029
5030 const token = this;
5031
5032 // eslint-disable-next-line func-names
5033 this.promise.then(cancel => {
5034 if (!token._listeners) return;
5035
5036 let i = token._listeners.length;
5037
5038 while (i-- > 0) {
5039 token._listeners[i](cancel);
5040 }
5041 token._listeners = null;
5042 });
5043
5044 // eslint-disable-next-line func-names
5045 this.promise.then = onfulfilled => {
5046 let _resolve;
5047 // eslint-disable-next-line func-names
5048 const promise = new Promise(resolve => {
5049 token.subscribe(resolve);
5050 _resolve = resolve;
5051 }).then(onfulfilled);
5052
5053 promise.cancel = function reject() {
5054 token.unsubscribe(_resolve);
5055 };
5056
5057 return promise;
5058 };
5059
5060 executor(function cancel(message, config, request) {
5061 if (token.reason) {
5062 // Cancellation has already been requested
5063 return;
5064 }
5065
5066 token.reason = new cancel_CanceledError(message, config, request);
5067 resolvePromise(token.reason);
5068 });
5069 }
5070
5071 /**
5072 * Throws a `CanceledError` if cancellation has been requested.
5073 */
5074 throwIfRequested() {
5075 if (this.reason) {
5076 throw this.reason;
5077 }
5078 }
5079
5080 /**
5081 * Subscribe to the cancel signal
5082 */
5083
5084 subscribe(listener) {
5085 if (this.reason) {
5086 listener(this.reason);
5087 return;
5088 }
5089
5090 if (this._listeners) {
5091 this._listeners.push(listener);
5092 } else {
5093 this._listeners = [listener];
5094 }
5095 }
5096
5097 /**
5098 * Unsubscribe from the cancel signal
5099 */
5100
5101 unsubscribe(listener) {
5102 if (!this._listeners) {
5103 return;
5104 }
5105 const index = this._listeners.indexOf(listener);
5106 if (index !== -1) {
5107 this._listeners.splice(index, 1);
5108 }
5109 }
5110
5111 /**
5112 * Returns an object that contains a new `CancelToken` and a function that, when called,
5113 * cancels the `CancelToken`.
5114 */
5115 static source() {
5116 let cancel;
5117 const token = new CancelToken(function executor(c) {
5118 cancel = c;
5119 });
5120 return {
5121 token,
5122 cancel
5123 };
5124 }
5125 }
5126
5127 /* harmony default export */ const cancel_CancelToken = (CancelToken);
5128
5129 ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/spread.js
5130
5131
5132 /**
5133 * Syntactic sugar for invoking a function and expanding an array for arguments.
5134 *
5135 * Common use case would be to use `Function.prototype.apply`.
5136 *
5137 * ```js
5138 * function f(x, y, z) {}
5139 * var args = [1, 2, 3];
5140 * f.apply(null, args);
5141 * ```
5142 *
5143 * With `spread` this example can be re-written.
5144 *
5145 * ```js
5146 * spread(function(x, y, z) {})([1, 2, 3]);
5147 * ```
5148 *
5149 * @param {Function} callback
5150 *
5151 * @returns {Function}
5152 */
5153 function spread(callback) {
5154 return function wrap(arr) {
5155 return callback.apply(null, arr);
5156 };
5157 }
5158
5159 ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/isAxiosError.js
5160
5161
5162
5163
5164 /**
5165 * Determines whether the payload is an error thrown by Axios
5166 *
5167 * @param {*} payload The value to test
5168 *
5169 * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
5170 */
5171 function isAxiosError(payload) {
5172 return utils.isObject(payload) && (payload.isAxiosError === true);
5173 }
5174
5175 ;// CONCATENATED MODULE: ./node_modules/axios/lib/axios.js
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193 /**
5194 * Create an instance of Axios
5195 *
5196 * @param {Object} defaultConfig The default config for the instance
5197 *
5198 * @returns {Axios} A new instance of Axios
5199 */
5200 function createInstance(defaultConfig) {
5201 const context = new core_Axios(defaultConfig);
5202 const instance = bind(core_Axios.prototype.request, context);
5203
5204 // Copy axios.prototype to instance
5205 utils.extend(instance, core_Axios.prototype, context, {allOwnKeys: true});
5206
5207 // Copy context to instance
5208 utils.extend(instance, context, null, {allOwnKeys: true});
5209
5210 // Factory for creating new instances
5211 instance.create = function create(instanceConfig) {
5212 return createInstance(mergeConfig(defaultConfig, instanceConfig));
5213 };
5214
5215 return instance;
5216 }
5217
5218 // Create the default instance to be exported
5219 const axios = createInstance(lib_defaults);
5220
5221 // Expose Axios class to allow class inheritance
5222 axios.Axios = core_Axios;
5223
5224 // Expose Cancel & CancelToken
5225 axios.CanceledError = cancel_CanceledError;
5226 axios.CancelToken = cancel_CancelToken;
5227 axios.isCancel = isCancel;
5228 axios.VERSION = VERSION;
5229 axios.toFormData = helpers_toFormData;
5230
5231 // Expose AxiosError class
5232 axios.AxiosError = core_AxiosError;
5233
5234 // alias for CanceledError for backward compatibility
5235 axios.Cancel = axios.CanceledError;
5236
5237 // Expose all/spread
5238 axios.all = function all(promises) {
5239 return Promise.all(promises);
5240 };
5241
5242 axios.spread = spread;
5243
5244 // Expose isAxiosError
5245 axios.isAxiosError = isAxiosError;
5246
5247 axios.formToJSON = thing => {
5248 return helpers_formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
5249 };
5250
5251 /* harmony default export */ const lib_axios = (axios);
5252
5253 ;// CONCATENATED MODULE: ./node_modules/axios/index.js
5254
5255
5256 // Keep top-level export same with static properties
5257 // so that it can keep same with es module or cjs
5258 const {
5259 Axios: axios_Axios,
5260 AxiosError: axios_AxiosError,
5261 CanceledError: axios_CanceledError,
5262 isCancel: axios_isCancel,
5263 CancelToken: axios_CancelToken,
5264 VERSION: axios_VERSION,
5265 all: axios_all,
5266 Cancel,
5267 isAxiosError: axios_isAxiosError,
5268 spread: axios_spread,
5269 toFormData: axios_toFormData
5270 } = lib_axios;
5271
5272 /* harmony default export */ const node_modules_axios = (lib_axios);
5273
5274
5275 ;// CONCATENATED MODULE: ./assets/src/axios/requestConfig.js
5276 function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
5277 var _timetics, _timetics2;
5278 function requestConfig_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5279 function requestConfig_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? requestConfig_ownKeys(Object(source), !0).forEach(function (key) { requestConfig_defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : requestConfig_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5280 function requestConfig_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5281 function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
5282 function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
5283 function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5284
5285 var notification = window.antd.notification;
5286 node_modules_axios.defaults.baseURL = (_timetics = timetics) === null || _timetics === void 0 ? void 0 : _timetics.site_url;
5287 node_modules_axios.defaults.headers = {
5288 "X-WP-Nonce": (_timetics2 = timetics) === null || _timetics2 === void 0 ? void 0 : _timetics2.nonce
5289 };
5290 var CANCEL_TOKEN_SOURCE = node_modules_axios.CancelToken.source();
5291 function generateNewCancelTokenSource() {
5292 CANCEL_TOKEN_SOURCE = node_modules_axios.CancelToken.source();
5293 }
5294 node_modules_axios.interceptors.response.use(function (res) {
5295 var _res$config, _res$data;
5296 if ((res === null || res === void 0 ? void 0 : (_res$config = res.config) === null || _res$config === void 0 ? void 0 : _res$config.method) !== "get" && res !== null && res !== void 0 && (_res$data = res.data) !== null && _res$data !== void 0 && _res$data.message) {
5297 var _res$config2, _res$config2$params, _res$data2;
5298 //To stop toast for any post or put request, add stopToast: true in params of request
5299 if (res !== null && res !== void 0 && (_res$config2 = res.config) !== null && _res$config2 !== void 0 && (_res$config2$params = _res$config2.params) !== null && _res$config2$params !== void 0 && _res$config2$params.stopToast) return res;
5300 notification.success({
5301 message: res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.message,
5302 // description: "Something went wrong! please try again.",
5303 placement: "topRight"
5304 });
5305 }
5306 return res;
5307 }, /*#__PURE__*/function () {
5308 var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(err) {
5309 var _err$response, _err$response$data;
5310 return _regeneratorRuntime().wrap(function _callee$(_context) {
5311 while (1) {
5312 switch (_context.prev = _context.next) {
5313 case 0:
5314 if (err.name && err.name == "AxiosError") {
5315 //Error alet err?.response?.data?.message
5316 notification.error({
5317 message: err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.message,
5318 // description: "Something went wrong! please try again.",
5319 placement: "topRight"
5320 });
5321 }
5322 return _context.abrupt("return", Promise.reject(err));
5323 case 2:
5324 case "end":
5325 return _context.stop();
5326 }
5327 }
5328 }, _callee);
5329 }));
5330 return function (_x) {
5331 return _ref.apply(this, arguments);
5332 };
5333 }());
5334 var requestConfig_request = function request(url, config) {
5335 return node_modules_axios.request(requestConfig_objectSpread({
5336 url: url
5337 }, config));
5338 };
5339 var finishPendingRequests = function finishPendingRequests(cancellationReason) {
5340 CANCEL_TOKEN_SOURCE.cancel(cancellationReason);
5341 generateNewCancelTokenSource();
5342 };
5343
5344 ;// CONCATENATED MODULE: ./assets/src/admin/services/apiEndPoints.js
5345 var apiEndPoints_apiEndpoint = {
5346 meetings: {
5347 meetingsList: "/wp-json/timetics/v1/appointments",
5348 meeting: "/wp-json/timetics/v1/appointments",
5349 createMeeting: "/wp-json/timetics/v1/appointments",
5350 deleteMeeting: "/wp-json/timetics/v1/appointments",
5351 duplicateMeeting: "/wp-json/timetics/v1/appointments/:id/duplicate",
5352 search: "wp-json/timetics/v1/appointments/search",
5353 filterMeeting: "wp-json/timetics/v1/appointments/filter"
5354 },
5355 staffs: {
5356 staff: "/wp-json/timetics/v1/staffs",
5357 search: "/wp-json/timetics/v1/staffs/search"
5358 },
5359 bookings: {
5360 booking: "/wp-json/timetics/v1/bookings",
5361 search: "/wp-json/timetics/v1/bookings/search",
5362 slots: "wp-json/timetics/v1/bookings/entries",
5363 updatePaymentStatus: "/wp-json/timetics/v1/bookings/:bookingId/payment",
5364 paymentOptions: "/wp-json/timetics/v1/bookings/payment_methods"
5365 },
5366 customers: {
5367 customers: "/wp-json/timetics/v1/customers",
5368 search: "/wp-json/timetics/v1/customers/search"
5369 },
5370 overview: {
5371 overview: "/wp-json/timetics/v1/reports/overview"
5372 },
5373 payment: {
5374 stripe: "/wp-json/timetics/v1/stripe/payment"
5375 },
5376 settings: {
5377 settings: "/wp-json/timetics/v1/settings"
5378 }
5379 };
5380 ;// CONCATENATED MODULE: ./assets/src/admin/services/bookings.js
5381 function bookings_typeof(obj) { "@babel/helpers - typeof"; return bookings_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, bookings_typeof(obj); }
5382 function bookings_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ bookings_regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == bookings_typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
5383 function bookings_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
5384 function bookings_asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { bookings_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { bookings_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5385
5386
5387 var createBooking = /*#__PURE__*/function () {
5388 var _ref = bookings_asyncToGenerator( /*#__PURE__*/bookings_regeneratorRuntime().mark(function _callee(config) {
5389 return bookings_regeneratorRuntime().wrap(function _callee$(_context) {
5390 while (1) {
5391 switch (_context.prev = _context.next) {
5392 case 0:
5393 return _context.abrupt("return", requestConfig_request(apiEndPoints_apiEndpoint.bookings.booking, config));
5394 case 1:
5395 case "end":
5396 return _context.stop();
5397 }
5398 }
5399 }, _callee);
5400 }));
5401 return function createBooking(_x) {
5402 return _ref.apply(this, arguments);
5403 };
5404 }();
5405 var getAllBooking = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
5406 var _ref2 = bookings_asyncToGenerator( /*#__PURE__*/bookings_regeneratorRuntime().mark(function _callee2(config) {
5407 return bookings_regeneratorRuntime().wrap(function _callee2$(_context2) {
5408 while (1) {
5409 switch (_context2.prev = _context2.next) {
5410 case 0:
5411 return _context2.abrupt("return", request(apiEndpoint.bookings.booking, config));
5412 case 1:
5413 case "end":
5414 return _context2.stop();
5415 }
5416 }
5417 }, _callee2);
5418 }));
5419 return function getAllBooking(_x2) {
5420 return _ref2.apply(this, arguments);
5421 };
5422 }()));
5423 var deleteBooking = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
5424 var _ref3 = bookings_asyncToGenerator( /*#__PURE__*/bookings_regeneratorRuntime().mark(function _callee3(config, id) {
5425 return bookings_regeneratorRuntime().wrap(function _callee3$(_context3) {
5426 while (1) {
5427 switch (_context3.prev = _context3.next) {
5428 case 0:
5429 return _context3.abrupt("return", request("".concat(apiEndpoint.bookings.booking, "/").concat(id), config));
5430 case 1:
5431 case "end":
5432 return _context3.stop();
5433 }
5434 }
5435 }, _callee3);
5436 }));
5437 return function deleteBooking(_x3, _x4) {
5438 return _ref3.apply(this, arguments);
5439 };
5440 }()));
5441 var bookings_getSingleBooking = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
5442 var _ref4 = bookings_asyncToGenerator( /*#__PURE__*/bookings_regeneratorRuntime().mark(function _callee4(config, id) {
5443 return bookings_regeneratorRuntime().wrap(function _callee4$(_context4) {
5444 while (1) {
5445 switch (_context4.prev = _context4.next) {
5446 case 0:
5447 return _context4.abrupt("return", request("".concat(apiEndpoint.bookings.booking, "/").concat(id), config));
5448 case 1:
5449 case "end":
5450 return _context4.stop();
5451 }
5452 }
5453 }, _callee4);
5454 }));
5455 return function getSingleBooking(_x5, _x6) {
5456 return _ref4.apply(this, arguments);
5457 };
5458 }()));
5459 var deleteAllBookings = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
5460 var _ref5 = bookings_asyncToGenerator( /*#__PURE__*/bookings_regeneratorRuntime().mark(function _callee5(config) {
5461 return bookings_regeneratorRuntime().wrap(function _callee5$(_context5) {
5462 while (1) {
5463 switch (_context5.prev = _context5.next) {
5464 case 0:
5465 return _context5.abrupt("return", request(apiEndpoint.bookings.booking, config));
5466 case 1:
5467 case "end":
5468 return _context5.stop();
5469 }
5470 }
5471 }, _callee5);
5472 }));
5473 return function deleteAllBookings(_x7) {
5474 return _ref5.apply(this, arguments);
5475 };
5476 }()));
5477 var bookings_updateBooking = /*#__PURE__*/function () {
5478 var _ref6 = bookings_asyncToGenerator( /*#__PURE__*/bookings_regeneratorRuntime().mark(function _callee6(config, id) {
5479 return bookings_regeneratorRuntime().wrap(function _callee6$(_context6) {
5480 while (1) {
5481 switch (_context6.prev = _context6.next) {
5482 case 0:
5483 return _context6.abrupt("return", requestConfig_request("".concat(apiEndPoints_apiEndpoint.bookings.booking, "/").concat(id), config));
5484 case 1:
5485 case "end":
5486 return _context6.stop();
5487 }
5488 }
5489 }, _callee6);
5490 }));
5491 return function updateBooking(_x8, _x9) {
5492 return _ref6.apply(this, arguments);
5493 };
5494 }();
5495 var updatePaymentStatus = /*#__PURE__*/function () {
5496 var _ref7 = bookings_asyncToGenerator( /*#__PURE__*/bookings_regeneratorRuntime().mark(function _callee7(config, id) {
5497 var url;
5498 return bookings_regeneratorRuntime().wrap(function _callee7$(_context7) {
5499 while (1) {
5500 switch (_context7.prev = _context7.next) {
5501 case 0:
5502 url = apiEndPoints_apiEndpoint.bookings.updatePaymentStatus.replace(":bookingId", id);
5503 return _context7.abrupt("return", requestConfig_request(url, config));
5504 case 2:
5505 case "end":
5506 return _context7.stop();
5507 }
5508 }
5509 }, _callee7);
5510 }));
5511 return function updatePaymentStatus(_x10, _x11) {
5512 return _ref7.apply(this, arguments);
5513 };
5514 }();
5515 var getBookingByMeetingId = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
5516 var _ref8 = bookings_asyncToGenerator( /*#__PURE__*/bookings_regeneratorRuntime().mark(function _callee8(config, id) {
5517 return bookings_regeneratorRuntime().wrap(function _callee8$(_context8) {
5518 while (1) {
5519 switch (_context8.prev = _context8.next) {
5520 case 0:
5521 return _context8.abrupt("return", request("".concat(apiEndpoint.bookings.booking, "/?meeting_id=").concat(id), config));
5522 case 1:
5523 case "end":
5524 return _context8.stop();
5525 }
5526 }
5527 }, _callee8);
5528 }));
5529 return function getBookingByMeetingId(_x12, _x13) {
5530 return _ref8.apply(this, arguments);
5531 };
5532 }()));
5533 var BookingSearch = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
5534 var _ref9 = bookings_asyncToGenerator( /*#__PURE__*/bookings_regeneratorRuntime().mark(function _callee9(config) {
5535 return bookings_regeneratorRuntime().wrap(function _callee9$(_context9) {
5536 while (1) {
5537 switch (_context9.prev = _context9.next) {
5538 case 0:
5539 return _context9.abrupt("return", request(apiEndpoint.bookings.search, config));
5540 case 1:
5541 case "end":
5542 return _context9.stop();
5543 }
5544 }
5545 }, _callee9);
5546 }));
5547 return function BookingSearch(_x14) {
5548 return _ref9.apply(this, arguments);
5549 };
5550 }()));
5551
5552 ;// CONCATENATED MODULE: ./assets/src/admin/libs/bookingLib.js
5553 function bookingLib_typeof(obj) { "@babel/helpers - typeof"; return bookingLib_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, bookingLib_typeof(obj); }
5554 function bookingLib_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ bookingLib_regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == bookingLib_typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
5555 function bookingLib_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5556 function bookingLib_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? bookingLib_ownKeys(Object(source), !0).forEach(function (key) { bookingLib_defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : bookingLib_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5557 function bookingLib_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5558 function bookingLib_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
5559 function bookingLib_asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { bookingLib_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { bookingLib_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5560
5561 var createBookingApi = /*#__PURE__*/function () {
5562 var _ref2 = bookingLib_asyncToGenerator( /*#__PURE__*/bookingLib_regeneratorRuntime().mark(function _callee(_ref) {
5563 var values, stopToast, res, _values$payment_metho;
5564 return bookingLib_regeneratorRuntime().wrap(function _callee$(_context) {
5565 while (1) {
5566 switch (_context.prev = _context.next) {
5567 case 0:
5568 values = _ref.values, stopToast = _ref.stopToast;
5569 _context.prev = 1;
5570 _context.next = 4;
5571 return createBooking({
5572 method: "POST",
5573 data: bookingLib_objectSpread(bookingLib_objectSpread({}, values), {}, {
5574 payment_method: (_values$payment_metho = values === null || values === void 0 ? void 0 : values.payment_method) !== null && _values$payment_metho !== void 0 ? _values$payment_metho : "cash"
5575 }),
5576 params: {
5577 stopToast: stopToast
5578 }
5579 });
5580 case 4:
5581 res = _context.sent;
5582 _context.next = 10;
5583 break;
5584 case 7:
5585 _context.prev = 7;
5586 _context.t0 = _context["catch"](1);
5587 res = _context.t0;
5588 case 10:
5589 return _context.abrupt("return", res);
5590 case 11:
5591 case "end":
5592 return _context.stop();
5593 }
5594 }
5595 }, _callee, null, [[1, 7]]);
5596 }));
5597 return function createBookingApi(_x) {
5598 return _ref2.apply(this, arguments);
5599 };
5600 }();
5601 var updateBookingApi = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
5602 var _ref4 = bookingLib_asyncToGenerator( /*#__PURE__*/bookingLib_regeneratorRuntime().mark(function _callee2(_ref3) {
5603 var id, values, res, _values$payment_metho2;
5604 return bookingLib_regeneratorRuntime().wrap(function _callee2$(_context2) {
5605 while (1) {
5606 switch (_context2.prev = _context2.next) {
5607 case 0:
5608 id = _ref3.id, values = _ref3.values;
5609 _context2.prev = 1;
5610 _context2.next = 4;
5611 return updateBooking({
5612 method: "PUT",
5613 data: bookingLib_objectSpread(bookingLib_objectSpread({}, values), {}, {
5614 payment_method: (_values$payment_metho2 = values === null || values === void 0 ? void 0 : values.payment_method) !== null && _values$payment_metho2 !== void 0 ? _values$payment_metho2 : "cash"
5615 })
5616 }, id);
5617 case 4:
5618 res = _context2.sent;
5619 _context2.next = 10;
5620 break;
5621 case 7:
5622 _context2.prev = 7;
5623 _context2.t0 = _context2["catch"](1);
5624 res = _context2.t0;
5625 case 10:
5626 return _context2.abrupt("return", res);
5627 case 11:
5628 case "end":
5629 return _context2.stop();
5630 }
5631 }
5632 }, _callee2, null, [[1, 7]]);
5633 }));
5634 return function updateBookingApi(_x2) {
5635 return _ref4.apply(this, arguments);
5636 };
5637 }()));
5638 var updateBookingPayment = /*#__PURE__*/function () {
5639 var _ref6 = bookingLib_asyncToGenerator( /*#__PURE__*/bookingLib_regeneratorRuntime().mark(function _callee3(_ref5) {
5640 var id, values, _ref5$stopToast, stopToast, res;
5641 return bookingLib_regeneratorRuntime().wrap(function _callee3$(_context3) {
5642 while (1) {
5643 switch (_context3.prev = _context3.next) {
5644 case 0:
5645 id = _ref5.id, values = _ref5.values, _ref5$stopToast = _ref5.stopToast, stopToast = _ref5$stopToast === void 0 ? false : _ref5$stopToast;
5646 _context3.prev = 1;
5647 _context3.next = 4;
5648 return updatePaymentStatus({
5649 method: "PUT",
5650 data: bookingLib_objectSpread({}, values),
5651 params: {
5652 stopToast: stopToast
5653 }
5654 }, id);
5655 case 4:
5656 res = _context3.sent;
5657 _context3.next = 10;
5658 break;
5659 case 7:
5660 _context3.prev = 7;
5661 _context3.t0 = _context3["catch"](1);
5662 res = _context3.t0;
5663 case 10:
5664 return _context3.abrupt("return", res);
5665 case 11:
5666 case "end":
5667 return _context3.stop();
5668 }
5669 }
5670 }, _callee3, null, [[1, 7]]);
5671 }));
5672 return function updateBookingPayment(_x3) {
5673 return _ref6.apply(this, arguments);
5674 };
5675 }();
5676 var getSingleBookingApi = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
5677 var _ref7 = bookingLib_asyncToGenerator( /*#__PURE__*/bookingLib_regeneratorRuntime().mark(function _callee4(id) {
5678 var res;
5679 return bookingLib_regeneratorRuntime().wrap(function _callee4$(_context4) {
5680 while (1) {
5681 switch (_context4.prev = _context4.next) {
5682 case 0:
5683 _context4.prev = 0;
5684 _context4.next = 3;
5685 return getSingleBooking({
5686 method: "GET"
5687 }, id);
5688 case 3:
5689 res = _context4.sent;
5690 _context4.next = 9;
5691 break;
5692 case 6:
5693 _context4.prev = 6;
5694 _context4.t0 = _context4["catch"](0);
5695 res = _context4.t0;
5696 case 9:
5697 return _context4.abrupt("return", res);
5698 case 10:
5699 case "end":
5700 return _context4.stop();
5701 }
5702 }
5703 }, _callee4, null, [[0, 6]]);
5704 }));
5705 return function getSingleBookingApi(_x4) {
5706 return _ref7.apply(this, arguments);
5707 };
5708 }()));
5709 // EXTERNAL MODULE: ./node_modules/dayjs/dayjs.min.js
5710 var dayjs_min = __webpack_require__(484);
5711 var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
5712 ;// CONCATENATED MODULE: ./assets/src/admin/actionCreators/actions.js
5713 var actionCreators_actions_actions = {
5714 SET_LOADING: "SET_LOADING",
5715 SET_STATE: "SET_STATE",
5716 SET_MEETINGS: "SET_MEETINGS",
5717 SET_MEETINGS_PAGINATION_DATA: "SET_MEETINGS_PAGINATION_DATA",
5718 SET_MEETINGS_AFTER_DELETE: "SET_MEETINGS_AFTER_DELETE",
5719 SET_MEETINGS_AFTER_DUPLICATE: "SET_MEETINGS_AFTER_DUPLICATE",
5720 SET_STAFFS: "SET_STAFFS",
5721 SET_STAFF: "SET_STAFF",
5722 SET_PAGINGATE_DATA: "SET_PAGINGATE_DATA",
5723 SET_BOOKINGS: "SETBOOKINGS",
5724 SET_CUSTOMERS: "SET_CUSTOMERS",
5725 SET_META_DATA_WITH_MEETING: "SET_META_DATA_WITH_MEETING",
5726 SET_STAFF_SCHEDULE: "SET_STAFF_SCHEDULE",
5727 CLEAR_MEETING_DATA_FOR_UPDATE: "CLEAR_MEETING_DATA_FOR_UPDATE",
5728 SET_EMAIL_CUSTOMIZE_DATA: "SET_EMAIL_CUSTOMIZE_DATA",
5729 SET_SETTINGS: "SET_SETTINGS",
5730 SET_SETTINGS_LOADING: "SET_SETTINGS_LOADING",
5731 SET_SETTINGS_SCHEDULE: "SET_SETTINGS_SCHEDULE",
5732 SET_SELECTED_DATE: "SET_SELECTED_DATE",
5733 SET_MEETING_TO_BOOK: "SET_MEETING_TO_BOOK",
5734 SET_SELECTED_STAFF_ID_TO_BOOK: "SET_SELECTED_STAFF_ID_TO_BOOK",
5735 SET_MEETING_SLOTS: "SET_MEETING_SLOTS",
5736 SET_BOOKING_STATE: "SET_BOOKING_STATE",
5737 SET_SETTINGS_CURRENCY: "SET_SETTINGS_CURRENCY",
5738 CLEAR_BOOKING_RELATED_DATA: "CLEAR_BOOKING_RELATED_DATA",
5739 SET_SETTINGS_COLOR: "SET_SETTINGS_COLOR",
5740 SET_SEATS: "SET_SEATS",
5741 SET_SEAT_REDUCER_STATE: "SET_SEAT_REDUCER_STATE"
5742 };
5743 ;// CONCATENATED MODULE: ./assets/src/admin/actionCreators/common.js
5744
5745 var common_setState = function setState(_ref) {
5746 var dispatch = _ref.dispatch,
5747 name = _ref.name,
5748 value = _ref.value;
5749 dispatch({
5750 type: actions.SET_STATE,
5751 field: name,
5752 payload: value
5753 });
5754 };
5755 ;// CONCATENATED MODULE: ./assets/src/admin/utils/dummyData.js
5756 function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
5757 function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5758 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5759 function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5760 function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
5761 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
5762
5763
5764 /**
5765 *
5766 * @param {Object} param0
5767 * @returns time-options for availability of staff
5768 */
5769 var getTimeOptions = function getTimeOptions(_ref) {
5770 var _ref$duration = _ref.duration,
5771 duration = _ref$duration === void 0 ? 10 : _ref$duration,
5772 startTime = _ref.startTime,
5773 endTime = _ref.endTime;
5774 var timeOptions = [];
5775 var _startTime = new Date(dummyData_createDateObject(startTime)).getTime();
5776 var _endTime = new Date(dummyData_createDateObject(endTime)).getTime();
5777 var addMins = duration * 1000 * 60;
5778 timeOptions.push({
5779 value: _startTime,
5780 label: dummyData_getTimeStringFromDateObject(new Date(_startTime).toString())
5781 });
5782 while (_startTime < _endTime) {
5783 _startTime += addMins;
5784 timeOptions.push({
5785 value: _startTime,
5786 label: dummyData_getTimeStringFromDateObject(new Date(_startTime).toString())
5787 });
5788 }
5789 return timeOptions;
5790 };
5791 var timeOptions = [{
5792 value: dummyData_createDateObject("10:00 AM"),
5793 label: "10:00 AM"
5794 }, {
5795 value: dummyData_createDateObject("10:30 AM"),
5796 label: "10:30 AM"
5797 }, {
5798 value: dummyData_createDateObject("11:00 AM"),
5799 label: "11:00 AM"
5800 }, {
5801 value: dummyData_createDateObject("12:00 PM"),
5802 label: "12:00 PM"
5803 }, {
5804 value: dummyData_createDateObject("01:00 PM"),
5805 label: "01:00 PM"
5806 }, {
5807 value: dummyData_createDateObject("02:00 PM"),
5808 label: "02:00 PM"
5809 }, {
5810 value: dummyData_createDateObject("03:45 PM"),
5811 label: "03:45 PM"
5812 }, {
5813 value: dummyData_createDateObject("06:00 PM"),
5814 label: "06:00 PM"
5815 }];
5816 var getOneScheduleObj = function getOneScheduleObj(timeSloteIndex) {
5817 var startTime = timeOptions[timeSloteIndex + 1];
5818 var endTime = timeOptions[timeSloteIndex + 2];
5819 return {
5820 start: startTime,
5821 end: endTime
5822 };
5823 };
5824 var dummyData_getOneScheduleObj = function _getOneScheduleObj(_ref2) {
5825 var _start, _end;
5826 var schedules = _ref2.schedules,
5827 duration = _ref2.duration,
5828 bufferTime = _ref2.bufferTime,
5829 dayEnd = _ref2.dayEnd;
5830 var startTime = (_start = _toConsumableArray(schedules)[_toConsumableArray(schedules).length - 1].start) === null || _start === void 0 ? void 0 : _start.label;
5831 var endTime = (_end = _toConsumableArray(schedules)[_toConsumableArray(schedules).length - 1].end) === null || _end === void 0 ? void 0 : _end.label;
5832 //added buffer time here... endTime(09:40 ) + bufferTime(120) = new start time
5833 if (bufferTime) {
5834 var _startTime = new Date(dummyData_createDateObject(endTime, 24)).getTime();
5835 var addMins = duration * 1000 * 60; //bufferTime * 1000 * 60;
5836 endTime = dummyData_getTimeStringFromDateObject(new Date(_startTime + addMins));
5837 }
5838 return {
5839 startTime: endTime,
5840 duration: duration,
5841 dayEnd: dayEnd
5842 };
5843 };
5844 var getSlotTime = function getSlotTime(_ref3) {
5845 var startTime = _ref3.startTime,
5846 _ref3$duration = _ref3.duration,
5847 duration = _ref3$duration === void 0 ? 10 : _ref3$duration,
5848 _ref3$dayEnd = _ref3.dayEnd,
5849 dayEnd = _ref3$dayEnd === void 0 ? "05:00 PM" : _ref3$dayEnd;
5850 var _startTime = new Date(dummyData_createDateObject(startTime, 24)).getTime();
5851 var _dayEndInMs = new Date(dummyData_createDateObject(dayEnd)).getTime();
5852 var addMins = duration * 1000 * 60;
5853 var _endTime = _startTime + addMins;
5854 // if (_startTime >= _dayEndInMs || _endTime > _dayEndInMs) {
5855 // return false;
5856 // }
5857 return {
5858 start: {
5859 value: _startTime,
5860 label: dummyData_getTimeStringFromDateObject(new Date(_startTime).toString())
5861 },
5862 end: {
5863 value: _endTime,
5864 label: dummyData_getTimeStringFromDateObject(new Date(_endTime).toString())
5865 }
5866 };
5867 };
5868 var dummyData_getSlotStartAndEndTime = function getSlotStartAndEndTime(_ref4) {
5869 var startTime = _ref4.startTime,
5870 _ref4$duration = _ref4.duration,
5871 duration = _ref4$duration === void 0 ? 10 : _ref4$duration,
5872 _ref4$dayEnd = _ref4.dayEnd,
5873 dayEnd = _ref4$dayEnd === void 0 ? "05:00 PM" : _ref4$dayEnd;
5874 var _startTime = new Date(dummyData_createDateObject(startTime, 24)).getTime();
5875 var _dayEndInMs = new Date(dummyData_createDateObject(dayEnd)).getTime();
5876 var addMins = duration * 1000 * 60;
5877 var _endTime = _startTime + addMins;
5878 // if (_startTime >= _dayEndInMs || _endTime > _dayEndInMs) {
5879 // return false;
5880 // }
5881 return {
5882 start: _startTime,
5883 end: _endTime
5884 };
5885 };
5886 var dummySchedules = function dummySchedules(_ref5) {
5887 var startTime = _ref5.startTime,
5888 duration = _ref5.duration;
5889 return [{
5890 key: "Fri",
5891 name: "Friday",
5892 status: false,
5893 schedules: [getSlotTime({
5894 startTime: startTime,
5895 duration: duration
5896 })],
5897 actions: ["AddIcon", "DeleteIcon"]
5898 }, {
5899 key: "Sat",
5900 name: "Saturday",
5901 status: false,
5902 schedules: [getSlotTime({
5903 startTime: startTime,
5904 duration: duration
5905 })],
5906 actions: ["AddIcon", "DeleteIcon"]
5907 }, {
5908 key: "Sun",
5909 name: "Sunday",
5910 status: true,
5911 schedules: [getSlotTime({
5912 startTime: startTime,
5913 duration: duration
5914 })],
5915 actions: ["AddIcon", "DeleteIcon"]
5916 }, {
5917 key: "Mon",
5918 name: "Monday",
5919 status: true,
5920 schedules: [getSlotTime({
5921 startTime: startTime,
5922 duration: duration
5923 })],
5924 actions: ["AddIcon", "DeleteIcon"]
5925 }, {
5926 key: "Tue",
5927 name: "Tuesday",
5928 status: true,
5929 schedules: [getSlotTime({
5930 startTime: startTime,
5931 duration: duration
5932 })],
5933 actions: ["AddIcon", "DeleteIcon"]
5934 }, {
5935 key: "Wed",
5936 name: "Wednesday",
5937 status: true,
5938 schedules: [getSlotTime({
5939 startTime: startTime,
5940 duration: duration
5941 })],
5942 actions: ["AddIcon", "DeleteIcon"]
5943 }, {
5944 key: "Thu",
5945 name: "Thursday",
5946 status: true,
5947 schedules: [getSlotTime({
5948 startTime: startTime,
5949 duration: duration
5950 })],
5951 actions: ["AddIcon", "DeleteIcon"]
5952 }];
5953 };
5954 function dummyData_createDateObject(time) {
5955 var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 12;
5956 var startTime = new Date();
5957 var parts = time === null || time === void 0 ? void 0 : time.match(/(\d+):(\d+) (AM|PM)/);
5958 if (parts) {
5959 var hours = parseInt(parts[1]),
5960 minutes = parseInt(parts[2]),
5961 tt = parts[3];
5962 if (tt == "PM" && hours < 12) hours += 12;
5963 startTime.setHours(hours, minutes, 0, 0);
5964 } else {
5965 var _parts = time === null || time === void 0 ? void 0 : time.split(":");
5966 var _hours = parseInt(_parts[0]),
5967 _minutes = parseInt(_parts[1]);
5968 startTime.setHours(_hours, _minutes, 0, 0);
5969 }
5970 return startTime.toString();
5971 }
5972
5973 /**
5974 *
5975 * @param {*} dateObj new Date() object of javascript.
5976 * @returns time in string format like: 09:20
5977 */
5978 function dummyData_getTimeStringFromDateObject(dateObj) {
5979 //TODO should be added in the localStorage and get from there...
5980 var timeFormat = 24;
5981 var time = dayjs_min_default()(dateObj).format(timeFormat == 24 ? "HH:mm" : "hh:mm A");
5982 return time;
5983 }
5984 ;// CONCATENATED MODULE: ./assets/src/helper/availabilityModel.js
5985 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || availabilityModel_unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
5986 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5987 function availabilityModel_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return availabilityModel_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return availabilityModel_arrayLikeToArray(o, minLen); }
5988 function availabilityModel_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
5989 function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
5990 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
5991 function availabilityModel_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5992 function availabilityModel_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? availabilityModel_ownKeys(Object(source), !0).forEach(function (key) { availabilityModel_defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : availabilityModel_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5993 function availabilityModel_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5994
5995
5996 /**
5997 * Handler for converting schedule object to api format
5998 * @param {Object} schedule single schedule object of a day
5999 * @returns schedule object with start and end time in milliseconds
6000 */
6001 var convertScheduleForApi = function convertScheduleForApi(schedule) {
6002 var _schedule = availabilityModel_objectSpread({}, schedule);
6003 if (_schedule.schedules) {
6004 _schedule = _schedule.schedules.map(function (item) {
6005 return {
6006 start: getTimeStringFromMilliseconds(item.start.value),
6007 end: getTimeStringFromMilliseconds(item.end.value)
6008 };
6009 });
6010 }
6011 return _schedule;
6012 };
6013 /**
6014 * Handler for converting schedules array to api format
6015 * @param {Array} schedules Array of schedule objects
6016 * @returns Converted schedules for api format
6017 */
6018 var convertSchedulesForApi = function convertSchedulesForApi(schedules) {
6019 var _schedules = {};
6020 schedules.map(function (item) {
6021 if (item.status === false) {
6022 _schedules[item.key] = [];
6023 } else {
6024 _schedules[item.key] = convertScheduleForApi(item);
6025 }
6026 });
6027 return _schedules;
6028 };
6029
6030 //currently not in use
6031 /**
6032 *
6033 * @param {Objec} schedule single schedule object of a day
6034 * @returns converted schedule object as per ui format
6035 */
6036 var convertScheduleForUi = function convertScheduleForUi(schedule) {
6037 var _schedule = availabilityModel_objectSpread({}, schedule);
6038 if (_schedule.schedules) {
6039 _schedule = _schedule.schedules.map(function (item) {
6040 return {
6041 start: {
6042 value: new Date(createDateObject(item.start, 24)).getTime(),
6043 label: item.start
6044 },
6045 end: {
6046 value: new Date(createDateObject(item.end, 24)).getTime(),
6047 label: item.end
6048 }
6049 };
6050 });
6051 }
6052 return _schedule;
6053 };
6054
6055 /**
6056 *
6057 * @param {Array} schedules Array of schedule objects
6058 * @returns converted schedules as per ui format
6059 */
6060 var availabilityModel_convertSchedulesForUi = function convertSchedulesForUi(schedules) {
6061 var _schedules = [];
6062 for (var _i = 0, _Object$entries = Object.entries(schedules); _i < _Object$entries.length; _i++) {
6063 var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
6064 key = _Object$entries$_i[0],
6065 value = _Object$entries$_i[1];
6066 var _schedule = {
6067 key: key,
6068 name: getDayFullname(key),
6069 status: value.length > 0 ? true : false,
6070 schedules: value !== null && value !== void 0 && value.length ? value.map(function (item) {
6071 return {
6072 start: {
6073 value: new Date(dummyData_createDateObject(item.start, 24)).getTime(),
6074 label: getTimeStringFromTimeStringBasedOnFormat(item.start)
6075 },
6076 end: {
6077 value: new Date(dummyData_createDateObject(item.end, 24)).getTime(),
6078 label: getTimeStringFromTimeStringBasedOnFormat(item.end)
6079 }
6080 };
6081 }) : [getSlotTime({
6082 startTime: "09:00 AM",
6083 duration: 10
6084 })]
6085 };
6086 _schedules.push(_schedule);
6087 }
6088 return _schedules;
6089 };
6090 var getTimeStringFromTimeStringBasedOnFormat = function getTimeStringFromTimeStringBasedOnFormat() {
6091 var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "5:00 PM";
6092 var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 24;
6093 //convert time string to 12 hour format or 24 hour format based on format
6094 var _time$split = time.split(":"),
6095 _time$split2 = _slicedToArray(_time$split, 2),
6096 hours = _time$split2[0],
6097 minutes = _time$split2[1];
6098 var _minutes$split = minutes.split(" "),
6099 _minutes$split2 = _slicedToArray(_minutes$split, 2),
6100 min = _minutes$split2[0],
6101 ampm2 = _minutes$split2[1];
6102 var _hours = ampm2 === "pm" ? parseInt(hours) + 12 : hours;
6103 var _minutes = min;
6104 if (format === 24) {
6105 return _hours + ":" + _minutes;
6106 } else {
6107 return _hours + ":" + _minutes + " " + ampm;
6108 }
6109 };
6110 var getTimeStringFromMilliseconds = function getTimeStringFromMilliseconds(time) {
6111 var date = new Date(time);
6112 var _time = getTimeStringFromDateObject(date);
6113 return _time;
6114 };
6115 var getMilliseconsFromTimeString = function getMilliseconsFromTimeString() {
6116 var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "9:00 am";
6117 var _time$split3 = time.split(":"),
6118 _time$split4 = _slicedToArray(_time$split3, 3),
6119 hours = _time$split4[0],
6120 minutes = _time$split4[1],
6121 ampm = _time$split4[2];
6122 var _minutes$split3 = minutes.split(" "),
6123 _minutes$split4 = _slicedToArray(_minutes$split3, 2),
6124 min = _minutes$split4[0],
6125 ampm2 = _minutes$split4[1];
6126 var _hours = ampm == "pm" ? parseInt(hours) + 12 : parseInt(hours);
6127 var _minutes = parseInt(min);
6128 var _time = new Date();
6129 _time.setHours(_hours);
6130 _time.setMinutes(_minutes);
6131 return _time.getTime();
6132 };
6133 var getDayFullname = function getDayFullname(day) {
6134 var days = {
6135 Mon: "Monday",
6136 Tue: "Tuesday",
6137 Wed: "Wednesday",
6138 Thu: "Thursday",
6139 Fri: "Friday",
6140 Sat: "Saturday",
6141 Sun: "Sunday"
6142 };
6143 return days[day];
6144 };
6145 ;// CONCATENATED MODULE: ./assets/src/helper/helpers.js
6146 function helpers_toConsumableArray(arr) { return helpers_arrayWithoutHoles(arr) || helpers_iterableToArray(arr) || helpers_unsupportedIterableToArray(arr) || helpers_nonIterableSpread(); }
6147 function helpers_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6148 function helpers_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return helpers_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return helpers_arrayLikeToArray(o, minLen); }
6149 function helpers_iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
6150 function helpers_arrayWithoutHoles(arr) { if (Array.isArray(arr)) return helpers_arrayLikeToArray(arr); }
6151 function helpers_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
6152 function helpers_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6153 function helpers_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? helpers_ownKeys(Object(source), !0).forEach(function (key) { helpers_defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : helpers_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6154 function helpers_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6155
6156
6157
6158
6159 var ttFetch = function ttFetch(slug, callback, options) {
6160 return fetch(slug, options).then(function (res) {
6161 return res.json();
6162 }).then(function (data) {
6163 if (callback) {
6164 callback(data);
6165 }
6166 });
6167 };
6168 var getNextTimeSlot = function getNextTimeSlot(timeSlotes) {
6169 var lastSlot = timeSlotes[timeSlotes.length - 1];
6170 var newSlot = {
6171 start: incrementTime({
6172 prevTime: lastSlot.end,
6173 add: 1,
6174 spec: "hr"
6175 }),
6176 end: incrementTime({
6177 prevTime: lastSlot.end,
6178 add: 2,
6179 spec: "hr"
6180 })
6181 };
6182 return newSlot;
6183 };
6184 var _getNextTimeSlot = function _getNextTimeSlot(_ref) {
6185 var schedules = _ref.schedules,
6186 duration = _ref.duration,
6187 bufferTime = _ref.bufferTime,
6188 dayEnd = _ref.dayEnd;
6189 var _getOneScheduleObj2 = _getOneScheduleObj({
6190 schedules: schedules,
6191 duration: duration,
6192 bufferTime: bufferTime,
6193 dayEnd: dayEnd
6194 }),
6195 startTime = _getOneScheduleObj2.startTime,
6196 _duration = _getOneScheduleObj2.duration,
6197 _dayEnd = _getOneScheduleObj2.dayEnd;
6198 var _getSlotStartAndEndTi = getSlotStartAndEndTime({
6199 startTime: startTime,
6200 duration: _duration,
6201 dayEnd: _dayEnd
6202 }),
6203 start = _getSlotStartAndEndTi.start,
6204 end = _getSlotStartAndEndTi.end;
6205 var startLabel = getTimeStringFromDateObject(new Date(start).toString());
6206 var endLabel = getTimeStringFromDateObject(new Date(end).toString());
6207 return {
6208 start: {
6209 value: start,
6210 label: getTimeStringFromDateObject(new Date(start).toString())
6211 },
6212 end: {
6213 value: end,
6214 label: getTimeStringFromDateObject(new Date(end).toString())
6215 }
6216 };
6217 };
6218 var incrementTime = function incrementTime(_ref2) {
6219 var prevTime = _ref2.prevTime,
6220 _ref2$add = _ref2.add,
6221 add = _ref2$add === void 0 ? 1 : _ref2$add,
6222 _ref2$spec = _ref2.spec,
6223 spec = _ref2$spec === void 0 ? "hr" : _ref2$spec;
6224 var hour = prevTime.split(":")[0];
6225 var minutes = prevTime.split(":")[1];
6226 if (spec == "hr") {
6227 if (hour == "00") {
6228 hour = 1;
6229 } else if (+hour + 1 > 23) {
6230 hour = "00";
6231 } else {
6232 hour = +hour + add;
6233 }
6234 // hour = +hour + 1 > 23 ? "00" : hour == "00" ? 1 : +hour + add;
6235 }
6236
6237 if (spec == "min") {
6238 minutes = minutes >= 59 ? "00" : +minutes + add;
6239 }
6240 return "".concat(hour, ":").concat(minutes);
6241 };
6242 var _compareTime = function _compareTime(_ref3) {
6243 var _schedule$schedules;
6244 var key = _ref3.key,
6245 value = _ref3.value,
6246 timeSlotIndex = _ref3.timeSlotIndex,
6247 scheduleIndex = _ref3.scheduleIndex,
6248 schedule = _ref3.schedule;
6249 var status = {
6250 hasError: false,
6251 "with": []
6252 };
6253 var _value = value.value;
6254 var timeInMs = new Date(_value).getTime();
6255 var startArr = [];
6256 schedule === null || schedule === void 0 ? void 0 : (_schedule$schedules = schedule.schedules) === null || _schedule$schedules === void 0 ? void 0 : _schedule$schedules.map(function (item) {
6257 startArr.push({
6258 start: new Date(item.start.value).getTime(),
6259 end: new Date(item.end.value).getTime(),
6260 time: timeInMs
6261 });
6262 });
6263 for (var i = 0; i < startArr.length; i++) {
6264 for (var j = 0; j < startArr.length; j++) {
6265 if (startArr[j].start > startArr[i].start && startArr[j].end < startArr[i].end || startArr[j].end > startArr[i].start && startArr[j].end < startArr[i].end || startArr[j].start >= startArr[j].end) {
6266 status.hasError = true;
6267 status.scheduleIndex = scheduleIndex;
6268 status["with"].push(i);
6269 status["with"].push(j);
6270 }
6271 }
6272 }
6273 return status;
6274 };
6275 var compareTime = function compareTime(_ref4) {
6276 var _schedule$schedules2, _status$scheduleIndex;
6277 var key = _ref4.key,
6278 value = _ref4.value,
6279 timeSlotIndex = _ref4.timeSlotIndex,
6280 scheduleIndex = _ref4.scheduleIndex,
6281 schedule = _ref4.schedule,
6282 timeCompareError = _ref4.timeCompareError;
6283 var status = helpers_objectSpread({}, timeCompareError);
6284 var _value = value.value;
6285 var timeInMs = new Date(_value).getTime();
6286 var startArr = [];
6287 schedule === null || schedule === void 0 ? void 0 : (_schedule$schedules2 = schedule.schedules) === null || _schedule$schedules2 === void 0 ? void 0 : _schedule$schedules2.map(function (item) {
6288 startArr.push(convertMillisecondsToTodaysDateObject(item.start.value), convertMillisecondsToTodaysDateObject(item.end.value));
6289 });
6290 var _conflictWith = [];
6291 var scIndexStatus = [];
6292
6293 // check if any possible time conflicts and set error in timeCompareError
6294 for (var i = 0; i < startArr.length; i++) {
6295 var _checkIfHave = status["with"][scheduleIndex] ? status["with"][scheduleIndex] : [];
6296 var conflict = Math.floor(i / 2);
6297 var conflictWith = Math.floor(i / 2);
6298 if (startArr[i] > startArr[i + 1]) {
6299 scIndexStatus[i] = false;
6300 status.hasError = true;
6301 status.scheduleIndex = helpers_toConsumableArray(new Set([].concat(helpers_toConsumableArray(status.scheduleIndex), [scheduleIndex])));
6302 _conflictWith.push(conflict, conflictWith + 1);
6303 status["with"][scheduleIndex] = helpers_toConsumableArray(new Set([].concat(helpers_toConsumableArray(_checkIfHave), helpers_toConsumableArray(_conflictWith))));
6304 }
6305 if (i % 2 == 0 && startArr[i] == startArr[i + 1]) {
6306 _conflictWith = [];
6307 scIndexStatus[i] = false;
6308 status.hasError = true;
6309 status.scheduleIndex = helpers_toConsumableArray(new Set([].concat(helpers_toConsumableArray(status.scheduleIndex), [scheduleIndex])));
6310 _conflictWith.push(conflict);
6311 status["with"][scheduleIndex] = helpers_toConsumableArray(new Set([].concat(helpers_toConsumableArray(_checkIfHave), helpers_toConsumableArray(_conflictWith))));
6312 }
6313 _conflictWith = [];
6314 if (startArr[i] <= startArr[i + 1]) {
6315 scIndexStatus[i] = true;
6316 }
6317 }
6318
6319 //clear error base on scheduleIndex
6320
6321 if (scIndexStatus.every(function (item) {
6322 return item == true;
6323 })) {
6324 status.scheduleIndex = helpers_toConsumableArray(status.scheduleIndex).filter(function (item) {
6325 return item != scheduleIndex;
6326 });
6327 status["with"][scheduleIndex] = [];
6328 }
6329
6330 // No error if status object's scheduleIndex array length is 0 Or status object's with object property count is 0
6331 if (((_status$scheduleIndex = status.scheduleIndex) === null || _status$scheduleIndex === void 0 ? void 0 : _status$scheduleIndex.length) == 0 || Object.keys(status["with"]).length == 0) {
6332 status.hasError = false;
6333 }
6334 return status;
6335 };
6336
6337 /**
6338 *
6339 * @param {*} errorObj Error object returned from compareTime function.
6340 * @returns structured error data
6341 */
6342 var prepareTimeSlotConflict = function prepareTimeSlotConflict(_ref5) {
6343 var prevErrorObj = _ref5.prevErrorObj,
6344 newError = _ref5.newError;
6345 // const validTimeError = {
6346 // ..._status,
6347 // errros: { [_status.scheduleIndex]: [..._status.with] },
6348 // };
6349
6350 return "";
6351 };
6352
6353 /**
6354 * Upload image form wordpress media
6355 * @param {*} event
6356 * @param {*} setImageUrl
6357 * @returns media
6358 */
6359
6360 var UploadImageFromMedia = function UploadImageFromMedia(event, getImgURL, getImgID) {
6361 event.preventDefault();
6362 var mediaUploader;
6363 if (mediaUploader) {
6364 mediaUploader.open();
6365 return;
6366 }
6367 mediaUploader = wp.media.frames.file_frame = wp.media({
6368 title: "Choose Image",
6369 button: {
6370 text: "Choose Image"
6371 },
6372 multiple: false
6373 });
6374
6375 // When a file is selected, grab the URL and set it as the text field's value
6376 mediaUploader.on("select", function () {
6377 var attachmentURL = mediaUploader.state().get("selection").first().toJSON();
6378 getImgURL(attachmentURL.url);
6379 getImgID(attachmentURL.id);
6380 });
6381
6382 // Open the uploader dialog
6383 var media = mediaUploader.open();
6384 return media;
6385 };
6386 var setScheduleDataToContex = function setScheduleDataToContex(_ref6) {
6387 var dispatch = _ref6.dispatch,
6388 meeting = _ref6.meeting,
6389 staffs = _ref6.staffs;
6390 var _staffs = staffs === null || staffs === void 0 ? void 0 : staffs.filter(function (staff) {
6391 return helpers_toConsumableArray(meeting === null || meeting === void 0 ? void 0 : meeting.staff).includes(staff.id);
6392 });
6393 var _staffsIds = meeting.staff;
6394 var _schedules = {};
6395 Object.keys(meeting === null || meeting === void 0 ? void 0 : meeting.schedule).map(function (item) {
6396 _schedules[item] = convertSchedulesForUi(meeting === null || meeting === void 0 ? void 0 : meeting.schedule[item]);
6397 });
6398 setState({
6399 dispatch: dispatch,
6400 name: "selectedStaff",
6401 value: _staffs
6402 });
6403 setState({
6404 dispatch: dispatch,
6405 name: "selectedStaffIds",
6406 value: _staffsIds
6407 });
6408 setState({
6409 dispatch: dispatch,
6410 name: "schedules",
6411 value: helpers_objectSpread({}, _schedules)
6412 });
6413 };
6414 var convertMillisecondsToTodaysDateObject = function convertMillisecondsToTodaysDateObject(milliseconds) {
6415 var date = new Date(milliseconds);
6416 var dateObject = {
6417 day: date.getDate(),
6418 month: date.getMonth() + 1,
6419 year: date.getFullYear(),
6420 hour: date.getHours(),
6421 minute: date.getMinutes(),
6422 second: date.getSeconds()
6423 };
6424
6425 //convert dateObject to js date object
6426 var dateObjectToMilliseconds = new Date(dateObject.year, dateObject.month - 1, dateObject.day, dateObject.hour, dateObject.minute, dateObject.second).getTime();
6427 return dateObjectToMilliseconds;
6428 };
6429
6430 //convert wordpress date format to dayjs date format
6431 var convertWordpressDateFormatToDayjs = function convertWordpressDateFormatToDayjs(_ref7) {
6432 var _window, _window$timetics;
6433 var _ref7$format = _ref7.format,
6434 format = _ref7$format === void 0 ? (_window = window) === null || _window === void 0 ? void 0 : (_window$timetics = _window.timetics) === null || _window$timetics === void 0 ? void 0 : _window$timetics.date_format : _ref7$format,
6435 date = _ref7.date;
6436 if (!date) return;
6437 var jsFormat = format.replace("d", "DD").replace("D", "D").replace("j", "D").replace("l", "DD").replace("m", "MM").replace("n", "M").replace("F", "MMMM").replace("Y", "YYYY");
6438 return dayjs_min_default()(date).format(jsFormat);
6439 };
6440 var convertWordpressTimeFormatToDayjs = function convertWordpressTimeFormatToDayjs(_ref8) {
6441 var _window2, _window2$timetics;
6442 var _ref8$format = _ref8.format,
6443 format = _ref8$format === void 0 ? (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$timetics = _window2.timetics) === null || _window2$timetics === void 0 ? void 0 : _window2$timetics.time_format : _ref8$format,
6444 time = _ref8.time;
6445 if (!time) return;
6446 var jsFormat = format.replace("g", "h").replace("G", "H").replace("h", "hh").replace("H", "HH").replace("i", "mm").replace("s", "ss").replace("a", "a").replace("A", "A");
6447 var hour = parseInt(time === null || time === void 0 ? void 0 : time.split(":")[0]);
6448 var minute = parseInt(time.split(":")[1].slice(0, 2));
6449 // const ampm = minute.slice(1, 3);
6450
6451 var date = dayjs_min_default()();
6452 //add am or pm with dayjs
6453 if (time.endsWith("pm")) {
6454 // date = date.add(12, "hour");
6455 hour += 12;
6456 }
6457 return date.hour(hour).minute(minute).format(jsFormat);
6458 };
6459 var convertWeekDayToNumber = function convertWeekDayToNumber(day) {
6460 var weekDays = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
6461 return weekDays.indexOf(day.toLowerCase());
6462 };
6463 ;// CONCATENATED MODULE: ./assets/src/frontend/pages/bookings/SidebarInfo.js
6464 function SidebarInfo_slicedToArray(arr, i) { return SidebarInfo_arrayWithHoles(arr) || SidebarInfo_iterableToArrayLimit(arr, i) || SidebarInfo_unsupportedIterableToArray(arr, i) || SidebarInfo_nonIterableRest(); }
6465 function SidebarInfo_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6466 function SidebarInfo_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return SidebarInfo_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return SidebarInfo_arrayLikeToArray(o, minLen); }
6467 function SidebarInfo_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
6468 function SidebarInfo_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
6469 function SidebarInfo_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
6470
6471
6472
6473 var SidebarInfo_ = wp.i18n.__;
6474 var SidebarInfo_window$antd = window.antd,
6475 SidebarInfo_Typography = SidebarInfo_window$antd.Typography,
6476 Space = SidebarInfo_window$antd.Space,
6477 List = SidebarInfo_window$antd.List;
6478 var Text = SidebarInfo_Typography.Text;
6479 function SidebarInfo() {
6480 var _meeting$price, _window, _window$timetics, _window2, _window2$timetics, _timetics, _meeting$price2, _timetics3, _meeting$locations, _meeting$locations2;
6481 var _useStateValue = provider_useStateValue(),
6482 _useStateValue2 = SidebarInfo_slicedToArray(_useStateValue, 2),
6483 meetingReducer = _useStateValue2[0].meeting,
6484 dispatch = _useStateValue2[1];
6485 var meeting = meetingReducer.meeting,
6486 selectedDate = meetingReducer.selectedDate,
6487 bookingTime = meetingReducer.bookingTime,
6488 slots = meetingReducer.slots,
6489 _meetingReducer$selec = meetingReducer.selectedSeats,
6490 selectedSeats = _meetingReducer$selec === void 0 ? [] : _meetingReducer$selec,
6491 _meetingReducer$selec2 = meetingReducer.selectedSeat,
6492 selectedSeat = _meetingReducer$selec2 === void 0 ? [] : _meetingReducer$selec2;
6493
6494 // Total left book
6495 var bookedMeeting = 0;
6496 slots === null || slots === void 0 ? void 0 : slots.days.map(function (item) {
6497 item === null || item === void 0 ? void 0 : item.slots.map(function (b) {
6498 if (b.booked == 1) {
6499 bookedMeeting++;
6500 }
6501 });
6502 });
6503 var totalQuantity = meeting === null || meeting === void 0 ? void 0 : (_meeting$price = meeting.price) === null || _meeting$price === void 0 ? void 0 : _meeting$price.map(function (item, index) {
6504 return item["ticket_quantity"];
6505 });
6506 var leftQuantity = totalQuantity - bookedMeeting;
6507 return /*#__PURE__*/React.createElement(List, {
6508 className: "tt-meeting-location-list"
6509 }, selectedDate && /*#__PURE__*/React.createElement(List.Item, null, /*#__PURE__*/React.createElement(Space, {
6510 wrap: true
6511 }, /*#__PURE__*/React.createElement(CalendarIcon2, null), convertWordpressDateFormatToDayjs({
6512 date: selectedDate,
6513 format: (_window = window) === null || _window === void 0 ? void 0 : (_window$timetics = _window.timetics) === null || _window$timetics === void 0 ? void 0 : _window$timetics.date_format
6514 }), convertWordpressTimeFormatToDayjs({
6515 time: bookingTime,
6516 format: (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$timetics = _window2.timetics) === null || _window2$timetics === void 0 ? void 0 : _window2$timetics.time_format
6517 }))), (meeting === null || meeting === void 0 ? void 0 : meeting.type) === "seat" ? /*#__PURE__*/React.createElement(React.Fragment, null, selectedSeats !== null && selectedSeats !== void 0 && selectedSeats.length ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
6518 className: "tt-booking-side-info tt-mt-10"
6519 }, /*#__PURE__*/React.createElement("div", {
6520 className: "tt-booking-info-icon-chair"
6521 }, /*#__PURE__*/React.createElement(ChairIcon, null), /*#__PURE__*/React.createElement("span", null, SidebarInfo_("Selected seats: ", "timetics"))), /*#__PURE__*/React.createElement("div", {
6522 className: "tt-booking-info-content"
6523 }, /*#__PURE__*/React.createElement("div", {
6524 className: "tt-seat-selected-number"
6525 }, selectedSeat === null || selectedSeat === void 0 ? void 0 : selectedSeat.map(function (item, index) {
6526 return /*#__PURE__*/React.createElement(Text, {
6527 key: index,
6528 className: "tt-selected-seat"
6529 }, item, ",");
6530 })))), /*#__PURE__*/React.createElement(List.Item, null, /*#__PURE__*/React.createElement(Space, {
6531 wrap: true
6532 }, /*#__PURE__*/React.createElement(TicketIcon, null), SidebarInfo_("Ticket quantity: ", "timetics"), selectedSeats === null || selectedSeats === void 0 ? void 0 : selectedSeats.length)), /*#__PURE__*/React.createElement(List.Item, null, /*#__PURE__*/React.createElement(Space, {
6533 wrap: true
6534 }, /*#__PURE__*/React.createElement(DollarIcon, null), SidebarInfo_("Total Price: ", "timetics"), (_timetics = timetics) === null || _timetics === void 0 ? void 0 : _timetics.currency, selectedSeats === null || selectedSeats === void 0 ? void 0 : selectedSeats.reduce(function (accumulator, currentValue) {
6535 return accumulator + +(currentValue === null || currentValue === void 0 ? void 0 : currentValue.price);
6536 }, 0).toFixed(2)))) : null) : null, (meeting === null || meeting === void 0 ? void 0 : meeting.type) !== "seat" ? Array.isArray(meeting === null || meeting === void 0 ? void 0 : meeting.price) ? meeting === null || meeting === void 0 ? void 0 : (_meeting$price2 = meeting.price) === null || _meeting$price2 === void 0 ? void 0 : _meeting$price2.map(function (item, index) {
6537 var _timetics2;
6538 return /*#__PURE__*/React.createElement(List.Item, {
6539 key: index
6540 }, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(MoneyIcon, null), /*#__PURE__*/React.createElement(Space, {
6541 size: 3,
6542 wrap: true
6543 }, (_timetics2 = timetics) === null || _timetics2 === void 0 ? void 0 : _timetics2.currency, (item === null || item === void 0 ? void 0 : item.ticket_price) || 0)));
6544 }) : /*#__PURE__*/React.createElement(List.Item, null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(MoneyIcon, null), /*#__PURE__*/React.createElement(Space, {
6545 size: 3
6546 }, (_timetics3 = timetics) === null || _timetics3 === void 0 ? void 0 : _timetics3.currency, meeting === null || meeting === void 0 ? void 0 : meeting.price))) : null, (meeting === null || meeting === void 0 ? void 0 : meeting.type) !== "seat" && /*#__PURE__*/React.createElement(List.Item, null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(ClockIcon, null), meeting === null || meeting === void 0 ? void 0 : meeting.duration)), (meeting === null || meeting === void 0 ? void 0 : (_meeting$locations = meeting.locations) === null || _meeting$locations === void 0 ? void 0 : _meeting$locations.length) == 1 && (meeting === null || meeting === void 0 ? void 0 : (_meeting$locations2 = meeting.locations) === null || _meeting$locations2 === void 0 ? void 0 : _meeting$locations2.map(function (item, index) {
6547 return /*#__PURE__*/React.createElement(List.Item, {
6548 key: index
6549 }, (item === null || item === void 0 ? void 0 : item.location_type) == "google-meet" ? /*#__PURE__*/React.createElement(Space, {
6550 wrap: true
6551 }, /*#__PURE__*/React.createElement(GoogleMeet, null), SidebarInfo_("Google Meet", "timetics")) : (item === null || item === void 0 ? void 0 : item.location_type) == "phone-call" ? /*#__PURE__*/React.createElement(Space, {
6552 wrap: true
6553 }, /*#__PURE__*/React.createElement(Phone, null), SidebarInfo_("Phone Call", "timetics")) : /*#__PURE__*/React.createElement(Space, {
6554 wrap: true
6555 }, /*#__PURE__*/React.createElement(Location, null), item === null || item === void 0 ? void 0 : item.location));
6556 })), (meeting === null || meeting === void 0 ? void 0 : meeting.type) === "One-to-Many" && bookingTime && /*#__PURE__*/React.createElement(List.Item, null, SidebarInfo_("".concat(leftQuantity, " seats are left of ").concat(totalQuantity), "timetics")), /*#__PURE__*/React.createElement(List.Item, {
6557 className: "tt-mt-30"
6558 }, /*#__PURE__*/React.createElement(Space, {
6559 wrap: true
6560 }, SidebarInfo_("Timezone : ", "timetics"), /*#__PURE__*/React.createElement(Text, {
6561 strong: true
6562 }, " ", meeting === null || meeting === void 0 ? void 0 : meeting.timezone))));
6563 }
6564 ;// CONCATENATED MODULE: ./assets/src/frontend/utils/helper.js
6565
6566
6567 /**
6568 *Handler for getting the day of the week from a date.
6569 * @param {Object} date Js Date object
6570 * @returns {String} Day of the week
6571 */
6572 function getWeekDay(date) {
6573 var days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
6574 return days[date.getDay()];
6575 }
6576
6577 /**
6578 *Handler for getting the day count of a month.
6579 * @param {Object} date Js Date object
6580 * @returns {Number} Day count of the month
6581 */
6582 var getDayCountOfMonth = function getDayCountOfMonth() {
6583 var date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Date();
6584 date.setDate(1); // Set date to the first of the month
6585 date.setMonth(date.getMonth() + 1); // Set date to the first of the next month
6586 date.setDate(date.getDate() - 1); // Set date to the last day of the current month
6587 var dayCount = date.getDate();
6588 return dayCount;
6589 };
6590 var getDaysThatNotAvailable = function getDaysThatNotAvailable(schedules) {
6591 if (!schedules) return [];
6592 var days = schedules.filter(function (day) {
6593 return !day.status;
6594 });
6595 return days.map(function (day) {
6596 return day.name.toLocaleLowerCase();
6597 });
6598 };
6599 var getDateListFromDayStrings = function getDateListFromDayStrings(_ref) {
6600 var _ref$days = _ref.days,
6601 days = _ref$days === void 0 ? [] : _ref$days,
6602 _ref$currentMonth = _ref.currentMonth,
6603 currentMonth = _ref$currentMonth === void 0 ? new Date().getMonth() : _ref$currentMonth;
6604 var unavailableDates = [];
6605 var date = new Date();
6606 var dateForCurrentMonth = new Date(date.setMonth(currentMonth));
6607 // get currentMonth day count
6608 var dayCount = getDayCountOfMonth(new Date(dateForCurrentMonth));
6609 for (var i = 1; i <= dayCount; i++) {
6610 var _date = new Date(dateForCurrentMonth);
6611 _date.setDate(i);
6612 var day = _date.toLocaleDateString("en", {
6613 weekday: "long"
6614 }).toLocaleLowerCase();
6615 if (days.includes(day)) {
6616 unavailableDates.push(dayjs_min_default()(_date).format("YYYY-MM-DD"));
6617 }
6618 }
6619 return unavailableDates;
6620 };
6621 var getTimeSlot = function getTimeSlot(_ref2) {
6622 var schedule = _ref2.schedule,
6623 selectedDate = _ref2.selectedDate,
6624 selectedDay = _ref2.selectedDay,
6625 duration = _ref2.duration;
6626 //get number from du
6627 var num = parseInt(duration);
6628 //get unit from du
6629 var splittedDuration = duration.split(" ");
6630 //convert unit to seconds
6631 var multiplier = splittedDuration[1] == "min" ? 60 * 1000 : 60 * 60 * 1000;
6632 var durationInMilliseconds = multiplier * splittedDuration[0];
6633 var day = schedule.find(function (day) {
6634 return day.name === selectedDay;
6635 });
6636
6637 // divide the time slots into 30 minutes intervals and return the time slots
6638
6639 var timeSlots = [];
6640 var startTime = convertMilisecondsToCurrentDateAsMiliseconds(day.schedules[0].start.value, selectedDate);
6641 var endTime = convertMilisecondsToCurrentDateAsMiliseconds(day.schedules[0].end.value, selectedDate);
6642 for (var i = startTime; endTime - i >= durationInMilliseconds; i += durationInMilliseconds) {
6643 var date = new Date(selectedDate);
6644 date.setHours(0, 0, 0, 0);
6645 date.setHours(new Date(i).getHours(), new Date(i).getMinutes(), new Date(i).getSeconds(), new Date(i).getMilliseconds());
6646 timeSlots.push(date.getTime());
6647 }
6648 return timeSlots;
6649 };
6650 var convertMilisecondsToCurrentDateAsMiliseconds = function convertMilisecondsToCurrentDateAsMiliseconds(miliseconds, selectedDate) {
6651 var date = new Date(miliseconds);
6652 // date.setHours(0, 0, 0, 0);
6653 date.setDate(new Date(selectedDate).getDate());
6654 date.setHours(new Date(date).getHours(), new Date(date).getMinutes(), new Date(date).getSeconds(), new Date(date).getMilliseconds());
6655 return date.getTime();
6656 };
6657 var getDayNumber = function getDayNumber(_ref3) {
6658 var days = _ref3.days;
6659 var _days = {
6660 sunday: 0,
6661 monday: 1,
6662 tuesday: 2,
6663 wednesday: 3,
6664 thursday: 4,
6665 friday: 5,
6666 saturday: 6
6667 };
6668
6669 //convert days to numbers based on _days object
6670 var dayNumbers = days.map(function (day) {
6671 return _days[day];
6672 });
6673 return dayNumbers;
6674 };
6675 var getDateRangeOfStartDateAndEndOfTheMonth = function getDateRangeOfStartDateAndEndOfTheMonth(date) {
6676 //get date range of the month based on start date
6677 var startDate = dayjs_min_default()(date).toDate();
6678 var endDate = new Date(date);
6679 endDate.setDate(getDayCountOfMonth(startDate));
6680 return {
6681 startDate: dayjs_min_default()(dayjs_min_default()(date).toDate()).format("YYYY-MM-DD"),
6682 endDate: dayjs_min_default()(endDate).format("YYYY-MM-DD")
6683 };
6684 };
6685 var getDayNumbers = function getDayNumbers(schedule) {
6686 var _days = {
6687 sun: 0,
6688 mon: 1,
6689 tue: 2,
6690 wed: 3,
6691 thu: 4,
6692 fri: 5,
6693 sat: 6
6694 };
6695
6696 //convert days to numbers based on _days object
6697 var dayNumbers = Object.keys(schedule).map(function (day) {
6698 if (schedule[day].length < 1) {
6699 return _days["".concat(String(day).toLocaleLowerCase())];
6700 }
6701 });
6702 //remove undefined values
6703 var _dayNumbers = dayNumbers.filter(function (day) {
6704 return day !== undefined;
6705 });
6706 return _dayNumbers;
6707 };
6708 var isNoPayment = function isNoPayment(paymentMethods) {
6709 var noPayment = paymentMethods === null || paymentMethods === void 0 ? void 0 : paymentMethods.every(function (method) {
6710 return !method.status;
6711 });
6712 return noPayment;
6713 };
6714 var isLocalPayment = function isLocalPayment(paymentMethods) {
6715 var localPayment = paymentMethods.some(function (method) {
6716 return method.name == "Local Pay" && method.status;
6717 });
6718 return localPayment;
6719 };
6720 var isFreeMeeting = function isFreeMeeting(_ref4) {
6721 var meeting = _ref4.meeting;
6722 var freeMeeting = meeting.price == 0 || !!meeting.price == false;
6723 return freeMeeting;
6724 };
6725 var getPaymentMethods = function getPaymentMethods(paymentMethods) {
6726 var methods = paymentMethods.filter(function (method) {
6727 return method.status;
6728 });
6729 return methods;
6730 };
6731 var getStepNo = function getStepNo(_ref5) {
6732 var isFree = _ref5.isFree,
6733 noPayment = _ref5.noPayment,
6734 isLocalPaymentActive = _ref5.isLocalPaymentActive,
6735 selectedPaymentMethod = _ref5.selectedPaymentMethod,
6736 meetingType = _ref5.meetingType;
6737 var status = 3;
6738 if (isFree) {
6739 status = 1;
6740 return status;
6741 }
6742 if (noPayment) {
6743 status = 1;
6744 return status;
6745 }
6746 if (isLocalPaymentActive && selectedPaymentMethod == "Local Pay") {
6747 status = 1;
6748 return status;
6749 }
6750 if (selectedPaymentMethod == "Paypal" || selectedPaymentMethod == "Stripe") {
6751 status = meetingType == "seat" ? 4 : 3;
6752 }
6753 return status;
6754 };
6755
6756 // demo/test for seat generation
6757 var genrateSeats = function genrateSeats(_ref6) {
6758 var _ref6$row = _ref6.row,
6759 row = _ref6$row === void 0 ? 4 : _ref6$row,
6760 _ref6$column = _ref6.column,
6761 column = _ref6$column === void 0 ? 12 : _ref6$column,
6762 _ref6$label = _ref6.label,
6763 label = _ref6$label === void 0 ? "a,Z|0,100" : _ref6$label,
6764 _ref6$ticketType = _ref6.ticketType,
6765 ticketType = _ref6$ticketType === void 0 ? "vip" : _ref6$ticketType;
6766 var seats = [];
6767 var labels = label.split("|");
6768 var rowLabels = labels[0].split(",");
6769 var columnLabels = labels[1].split(",");
6770 var rowLabelStart = rowLabels[0];
6771 var rowLabelEnd = rowLabels[1];
6772 var columnLabelStart = columnLabels[0];
6773 var columnLabelEnd = columnLabels[1];
6774 for (var i = 0; i < row; i++) {
6775 var _row = [];
6776 for (var j = 0; j < column; j++) {
6777 var seat = {
6778 row: String.fromCharCode(rowLabelStart.charCodeAt(0) + i),
6779 column: +(columnLabelStart + j),
6780 status: "available",
6781 type: ticketType
6782 };
6783 _row.push(seat);
6784 }
6785 seats.push(_row);
6786 }
6787 console.log("seats", seats);
6788 };
6789 genrateSeats({
6790 row: 4,
6791 column: 12,
6792 label: "a,Z|0,100",
6793 ticketType: "vip"
6794 });
6795 ;// CONCATENATED MODULE: ./assets/src/frontend/pages/bookings/ContactInfo.js
6796 function ContactInfo_typeof(obj) { "@babel/helpers - typeof"; return ContactInfo_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, ContactInfo_typeof(obj); }
6797 function ContactInfo_toConsumableArray(arr) { return ContactInfo_arrayWithoutHoles(arr) || ContactInfo_iterableToArray(arr) || ContactInfo_unsupportedIterableToArray(arr) || ContactInfo_nonIterableSpread(); }
6798 function ContactInfo_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6799 function ContactInfo_iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
6800 function ContactInfo_arrayWithoutHoles(arr) { if (Array.isArray(arr)) return ContactInfo_arrayLikeToArray(arr); }
6801 function ContactInfo_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ ContactInfo_regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == ContactInfo_typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
6802 function ContactInfo_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6803 function ContactInfo_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ContactInfo_ownKeys(Object(source), !0).forEach(function (key) { ContactInfo_defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ContactInfo_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6804 function ContactInfo_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6805 function ContactInfo_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
6806 function ContactInfo_asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { ContactInfo_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { ContactInfo_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
6807 function ContactInfo_slicedToArray(arr, i) { return ContactInfo_arrayWithHoles(arr) || ContactInfo_iterableToArrayLimit(arr, i) || ContactInfo_unsupportedIterableToArray(arr, i) || ContactInfo_nonIterableRest(); }
6808 function ContactInfo_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6809 function ContactInfo_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return ContactInfo_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ContactInfo_arrayLikeToArray(o, minLen); }
6810 function ContactInfo_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
6811 function ContactInfo_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
6812 function ContactInfo_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
6813
6814
6815
6816
6817
6818
6819 var ContactInfo_ = wp.i18n.__;
6820 var ContactInfo_window$antd = window.antd,
6821 Button = ContactInfo_window$antd.Button,
6822 ContactInfo_Typography = ContactInfo_window$antd.Typography,
6823 ContactInfo_Space = ContactInfo_window$antd.Space,
6824 ContactInfo_List = ContactInfo_window$antd.List,
6825 Row = ContactInfo_window$antd.Row,
6826 Col = ContactInfo_window$antd.Col,
6827 ContactInfo_Form = ContactInfo_window$antd.Form,
6828 Radio = ContactInfo_window$antd.Radio,
6829 Select = ContactInfo_window$antd.Select;
6830 var ContactInfo_Text = ContactInfo_Typography.Text,
6831 ContactInfo_Title = ContactInfo_Typography.Title;
6832
6833
6834
6835
6836 function ContactInfo() {
6837 var _meeting$locations2, _meeting$locations3;
6838 var _useStateValue = provider_useStateValue(),
6839 _useStateValue2 = ContactInfo_slicedToArray(_useStateValue, 2),
6840 meetingReducer = _useStateValue2[0].meeting,
6841 dispatch = _useStateValue2[1];
6842 var meeting = meetingReducer.meeting,
6843 selectedDate = meetingReducer.selectedDate,
6844 bookingTime = meetingReducer.bookingTime,
6845 selectedDay = meetingReducer.selectedDay,
6846 contactInfo = meetingReducer.contactInfo,
6847 selectedStaff = meetingReducer.selectedStaff,
6848 loading = meetingReducer.loading,
6849 paymentOptions = meetingReducer.paymentOptions,
6850 _meetingReducer$selec = meetingReducer.selectedSeats,
6851 selectedSeats = _meetingReducer$selec === void 0 ? [] : _meetingReducer$selec;
6852 var stepValue = (meeting === null || meeting === void 0 ? void 0 : meeting.type) == "seat" ? 2 : 1;
6853 /**
6854 *
6855 * @param {Object} values contains contact info of a user who wants to book a meeting
6856 */
6857 var onFinishContactForm = /*#__PURE__*/function () {
6858 var _ref = ContactInfo_asyncToGenerator( /*#__PURE__*/ContactInfo_regeneratorRuntime().mark(function _callee(values) {
6859 var _meeting$locations;
6860 var location, payload, res, noPayment, isLocalPaymentActive, isFree, step, total, _meeting$price$;
6861 return ContactInfo_regeneratorRuntime().wrap(function _callee$(_context) {
6862 while (1) {
6863 switch (_context.prev = _context.next) {
6864 case 0:
6865 console.log("values", values);
6866 dispatch({
6867 type: actions_actions.SET_STATE,
6868 payload: {
6869 loading: true
6870 }
6871 });
6872 if ((meeting === null || meeting === void 0 ? void 0 : (_meeting$locations = meeting.locations) === null || _meeting$locations === void 0 ? void 0 : _meeting$locations.length) > 1) {
6873 location = Object.keys(JSON.parse(values.location_type)).length < 2 ? {
6874 location: "Google meet",
6875 location_type: "google-meet"
6876 } : JSON.parse(values.location_type);
6877 } else {
6878 location = meeting === null || meeting === void 0 ? void 0 : meeting.locations[0];
6879 }
6880 payload = ContactInfo_objectSpread(ContactInfo_objectSpread({}, values), {}, {
6881 staff: selectedStaff === null || selectedStaff === void 0 ? void 0 : selectedStaff.id,
6882 appointment: meeting === null || meeting === void 0 ? void 0 : meeting.id,
6883 date: selectedDate,
6884 start_date: selectedDate,
6885 start_time: bookingTime,
6886 end_time: bookingTime,
6887 attendees: values.attendees,
6888 seats: selectedSeats === null || selectedSeats === void 0 ? void 0 : selectedSeats.map(function (item) {
6889 return item === null || item === void 0 ? void 0 : item.id;
6890 })
6891 }, location);
6892 _context.next = 6;
6893 return createBookingApi({
6894 values: payload,
6895 stopToast: true
6896 });
6897 case 6:
6898 res = _context.sent;
6899 // if noPayment is true then create booking and then redirect to success page
6900 noPayment = isNoPayment(paymentOptions); //if isLocalPayment is true then create booking and then redirect to success page
6901 isLocalPaymentActive = isLocalPayment(paymentOptions);
6902 isFree = isFreeMeeting({
6903 meeting: meeting
6904 });
6905 step = getStepNo({
6906 isFree: isFree,
6907 noPayment: noPayment,
6908 isLocalPaymentActive: isLocalPaymentActive,
6909 selectedPaymentMethod: values.payment_method,
6910 meetingType: meeting === null || meeting === void 0 ? void 0 : meeting.type
6911 }); //if meeting is free then create booking and then redirect to success page
6912 total = 0;
6913 if ((meeting === null || meeting === void 0 ? void 0 : meeting.type) == "seat") {
6914 selectedSeats === null || selectedSeats === void 0 ? void 0 : selectedSeats.map(function (item) {
6915 total += +(item === null || item === void 0 ? void 0 : item.price);
6916 });
6917 } else {
6918 total = meeting === null || meeting === void 0 ? void 0 : (_meeting$price$ = meeting.price[0]) === null || _meeting$price$ === void 0 ? void 0 : _meeting$price$.ticket_price;
6919 }
6920 dispatch({
6921 type: actions_actions.SET_STATE,
6922 payload: {
6923 contactInfo: payload,
6924 response: res === null || res === void 0 ? void 0 : res.data,
6925 step: step,
6926 loading: false,
6927 payment_method: values.payment_method,
6928 selectedSeats: [],
6929 selectedSeat: [],
6930 totalOrderPrice: total
6931 }
6932 });
6933 if (step == 1) {
6934 // here step is 1 means that meeting is booked and payment is done, redirect to success page.
6935 dispatch({
6936 type: actions_actions.SET_STATE,
6937 payload: {
6938 paymentStatus: {
6939 status: "succeeded"
6940 }
6941 }
6942 });
6943 }
6944 case 15:
6945 case "end":
6946 return _context.stop();
6947 }
6948 }
6949 }, _callee);
6950 }));
6951 return function onFinishContactForm(_x) {
6952 return _ref.apply(this, arguments);
6953 };
6954 }();
6955 if (loading) {
6956 return /*#__PURE__*/React.createElement(common_Spinner, {
6957 tip: ContactInfo_("Loading...", "timetics"),
6958 msg: ContactInfo_("Please Wait.", "timetics"),
6959 desc: ContactInfo_("Loader will vanish after the page load.", "timetics"),
6960 type: "info",
6961 size: "large",
6962 wrapperClassName: "tt-spinner-wrapper"
6963 });
6964 }
6965 return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(bookings_Header, {
6966 stepTitle: "Step 2",
6967 componentTitle: ContactInfo_("Give your information", "timetics")
6968 }), /*#__PURE__*/React.createElement(Row, {
6969 gutter: [24, 24]
6970 }, /*#__PURE__*/React.createElement(Col, {
6971 sm: 24,
6972 md: 8,
6973 lg: 8
6974 }, /*#__PURE__*/React.createElement("div", {
6975 className: "tt-form-left-sidebar"
6976 }, /*#__PURE__*/React.createElement(ContactInfo_Title, {
6977 className: "tt-meeting-name tt-mb-10",
6978 level: 3
6979 }, meeting === null || meeting === void 0 ? void 0 : meeting.name), /*#__PURE__*/React.createElement("div", {
6980 className: "selected-author tt-mb-10"
6981 }, /*#__PURE__*/React.createElement(ContactInfo_Text, null, ContactInfo_("with", "timetics")), /*#__PURE__*/React.createElement(ContactInfo_Text, {
6982 strong: true
6983 }, " ", selectedStaff === null || selectedStaff === void 0 ? void 0 : selectedStaff.full_name)), /*#__PURE__*/React.createElement(SidebarInfo, null))), /*#__PURE__*/React.createElement(Col, {
6984 sm: 24,
6985 md: 16,
6986 lg: 16
6987 }, /*#__PURE__*/React.createElement(ContactInfo_Form, {
6988 name: "booking-contact-form",
6989 layout: "vertical",
6990 className: "tt-booking-body-wrap",
6991 autoComplete: "on",
6992 onFinish: onFinishContactForm,
6993 onFinishFailed: function onFinishFailed(errors) {
6994 console.log(errors);
6995 },
6996 initialValues: ContactInfo_objectSpread({}, contactInfo)
6997 }, /*#__PURE__*/React.createElement(common_TextInput, {
6998 label: ContactInfo_("Name", "timetics"),
6999 name: "first_name",
7000 required: true,
7001 rules: [{
7002 required: true,
7003 message: ContactInfo_("Enter your name!", "timetics")
7004 }],
7005 type: "text",
7006 size: "small",
7007 placeholder: ContactInfo_("Enter your name", "timetics")
7008 }), /*#__PURE__*/React.createElement(common_TextInput, {
7009 label: ContactInfo_("E-mail", "timetics"),
7010 name: "email",
7011 rules: [{
7012 type: "email",
7013 message: "The input is not valid E-mail!"
7014 }, {
7015 required: true,
7016 message: ContactInfo_("Enter your e-mail!", "timetics")
7017 }],
7018 type: "email",
7019 size: "small",
7020 placeholder: ContactInfo_("Enter your e-mail", "timetics")
7021 }), /*#__PURE__*/React.createElement(common_TextInput, {
7022 label: ContactInfo_("Phone", "timetics"),
7023 name: "phone",
7024 type: "number",
7025 size: "small",
7026 placeholder: ContactInfo_("Enter your phone number", "timetics")
7027 }), (meeting === null || meeting === void 0 ? void 0 : (_meeting$locations2 = meeting.locations) === null || _meeting$locations2 === void 0 ? void 0 : _meeting$locations2.length) > 1 && /*#__PURE__*/React.createElement(ContactInfo_Form.Item, {
7028 className: "timetics-input",
7029 label: ContactInfo_("Location", "timetics"),
7030 required: true,
7031 name: "location_type",
7032 rules: [{
7033 required: true,
7034 message: ContactInfo_("Location is required!", "timetics")
7035 }]
7036 }, /*#__PURE__*/React.createElement(Select, {
7037 placeholder: ContactInfo_("Enter your location", "timetics")
7038 }, meeting === null || meeting === void 0 ? void 0 : (_meeting$locations3 = meeting.locations) === null || _meeting$locations3 === void 0 ? void 0 : _meeting$locations3.map(function (item, index) {
7039 return /*#__PURE__*/React.createElement(Select.Option, {
7040 key: index,
7041 value: JSON.stringify(item)
7042 }, /*#__PURE__*/React.createElement(ContactInfo_Space, {
7043 align: "center",
7044 className: "tt-meeting-location-type"
7045 }, locationIcons[item.location_type], locationMeeting[item.location_type]));
7046 }))), (selectedSeats === null || selectedSeats === void 0 ? void 0 : selectedSeats.length) > 1 ? wp.hooks.applyFilters("inviteeFields") : null, /*#__PURE__*/React.createElement(common_TextAreaInput, {
7047 label: ContactInfo_("Additional notes", "timetics"),
7048 labelCol: 24,
7049 wrapperCol: 24,
7050 name: "description",
7051 placeholder: ContactInfo_("Please share anything that will help prepare for our meeting", "timetics"),
7052 autoSize: {
7053 minRows: 5,
7054 maxRows: 5
7055 }
7056 }), !isNoPayment(paymentOptions) && /*#__PURE__*/React.createElement(ContactInfo_Form.Item, {
7057 name: "payment_method",
7058 className: "timetics-input",
7059 label: ContactInfo_("Payment type", "timetics"),
7060 labelCol: 24,
7061 wrapperCol: 24,
7062 rules: [{
7063 required: true,
7064 message: ContactInfo_("Payment type is required!", "timetics")
7065 }]
7066 }, /*#__PURE__*/React.createElement(Radio.Group, {
7067 size: "large ",
7068 className: "tt-payment-radio-btn"
7069 }, ContactInfo_toConsumableArray(paymentOptions).filter(function (item) {
7070 return !!(item !== null && item !== void 0 && item.status);
7071 }).map(function (item, index) {
7072 return /*#__PURE__*/React.createElement(Radio.Button, {
7073 key: index,
7074 value: item.name,
7075 style: {
7076 marginRight: 20,
7077 borderRadius: 6
7078 }
7079 }, /*#__PURE__*/React.createElement(ContactInfo_Space, {
7080 align: "center"
7081 }, /*#__PURE__*/React.createElement("span", {
7082 className: "tt-payment-radio-btn-icon"
7083 }, item.name == "Stripe" && /*#__PURE__*/React.createElement(StripeIcon, {
7084 width: "16",
7085 height: "16"
7086 }), item.name == "Local Pay" && /*#__PURE__*/React.createElement(MoneyIcon, null)), item.name));
7087 }))), /*#__PURE__*/React.createElement(Row, {
7088 align: "end"
7089 }, /*#__PURE__*/React.createElement(ContactInfo_Space, {
7090 wrap: true
7091 }, /*#__PURE__*/React.createElement(Button, {
7092 className: "backbtn",
7093 size: "large",
7094 htmlType: "button",
7095 ghost: true
7096 // icon={}
7097 ,
7098 onClick: function onClick() {
7099 dispatch({
7100 type: actions_actions.SET_STATE,
7101 payload: {
7102 step: stepValue
7103 }
7104 });
7105 }
7106 }, /*#__PURE__*/React.createElement(ArrowLefttIcon, null), ContactInfo_("Go back", "timetics")), /*#__PURE__*/React.createElement(Button, {
7107 className: "submit-btn",
7108 size: "large",
7109 type: "primary",
7110 htmlType: "submit"
7111 // icon={}
7112 }, ContactInfo_("Confirm Appointment", "timetics"), /*#__PURE__*/React.createElement(ArrowRightIcon2, null))))))));
7113 }
7114 /* harmony default export */ const bookings_ContactInfo = (ContactInfo);
7115 var locationIcons = {
7116 "google-meet": /*#__PURE__*/React.createElement(GoogleMeet, null),
7117 "phone-call": /*#__PURE__*/React.createElement(Phone, {
7118 color: "#3161F1"
7119 }),
7120 "in-person-meeting": /*#__PURE__*/React.createElement(Location, {
7121 color: "#3161F1"
7122 })
7123 };
7124 var locationMeeting = {
7125 "google-meet": ContactInfo_("Google Meet", "timetics"),
7126 "phone-call": ContactInfo_("Phone Call", "timetics"),
7127 "in-person-meeting": ContactInfo_("In Person Meeting", "timetics")
7128 };
7129 ;// CONCATENATED MODULE: ./node_modules/@stripe/stripe-js/dist/stripe.esm.js
7130 var V3_URL = 'https://js.stripe.com/v3';
7131 var V3_URL_REGEX = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;
7132 var EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';
7133 var findScript = function findScript() {
7134 var scripts = document.querySelectorAll("script[src^=\"".concat(V3_URL, "\"]"));
7135
7136 for (var i = 0; i < scripts.length; i++) {
7137 var script = scripts[i];
7138
7139 if (!V3_URL_REGEX.test(script.src)) {
7140 continue;
7141 }
7142
7143 return script;
7144 }
7145
7146 return null;
7147 };
7148
7149 var injectScript = function injectScript(params) {
7150 var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';
7151 var script = document.createElement('script');
7152 script.src = "".concat(V3_URL).concat(queryString);
7153 var headOrBody = document.head || document.body;
7154
7155 if (!headOrBody) {
7156 throw new Error('Expected document.body not to be null. Stripe.js requires a <body> element.');
7157 }
7158
7159 headOrBody.appendChild(script);
7160 return script;
7161 };
7162
7163 var registerWrapper = function registerWrapper(stripe, startTime) {
7164 if (!stripe || !stripe._registerWrapper) {
7165 return;
7166 }
7167
7168 stripe._registerWrapper({
7169 name: 'stripe-js',
7170 version: "1.46.0",
7171 startTime: startTime
7172 });
7173 };
7174
7175 var stripePromise = null;
7176 var loadScript = function loadScript(params) {
7177 // Ensure that we only attempt to load Stripe.js at most once
7178 if (stripePromise !== null) {
7179 return stripePromise;
7180 }
7181
7182 stripePromise = new Promise(function (resolve, reject) {
7183 if (typeof window === 'undefined') {
7184 // Resolve to null when imported server side. This makes the module
7185 // safe to import in an isomorphic code base.
7186 resolve(null);
7187 return;
7188 }
7189
7190 if (window.Stripe && params) {
7191 console.warn(EXISTING_SCRIPT_MESSAGE);
7192 }
7193
7194 if (window.Stripe) {
7195 resolve(window.Stripe);
7196 return;
7197 }
7198
7199 try {
7200 var script = findScript();
7201
7202 if (script && params) {
7203 console.warn(EXISTING_SCRIPT_MESSAGE);
7204 } else if (!script) {
7205 script = injectScript(params);
7206 }
7207
7208 script.addEventListener('load', function () {
7209 if (window.Stripe) {
7210 resolve(window.Stripe);
7211 } else {
7212 reject(new Error('Stripe.js not available'));
7213 }
7214 });
7215 script.addEventListener('error', function () {
7216 reject(new Error('Failed to load Stripe.js'));
7217 });
7218 } catch (error) {
7219 reject(error);
7220 return;
7221 }
7222 });
7223 return stripePromise;
7224 };
7225 var initStripe = function initStripe(maybeStripe, args, startTime) {
7226 if (maybeStripe === null) {
7227 return null;
7228 }
7229
7230 var stripe = maybeStripe.apply(undefined, args);
7231 registerWrapper(stripe, startTime);
7232 return stripe;
7233 }; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
7234
7235 // own script injection.
7236
7237 var stripePromise$1 = Promise.resolve().then(function () {
7238 return loadScript(null);
7239 });
7240 var loadCalled = false;
7241 stripePromise$1["catch"](function (err) {
7242 if (!loadCalled) {
7243 console.warn(err);
7244 }
7245 });
7246 var loadStripe = function loadStripe() {
7247 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
7248 args[_key] = arguments[_key];
7249 }
7250
7251 loadCalled = true;
7252 var startTime = Date.now();
7253 return stripePromise$1.then(function (maybeStripe) {
7254 return initStripe(maybeStripe, args, startTime);
7255 });
7256 };
7257
7258
7259
7260 // EXTERNAL MODULE: ./node_modules/@stripe/react-stripe-js/dist/react-stripe.umd.js
7261 var react_stripe_umd = __webpack_require__(664);
7262 ;// CONCATENATED MODULE: ./assets/src/frontend/stripe/CheckoutForm.js
7263 function CheckoutForm_typeof(obj) { "@babel/helpers - typeof"; return CheckoutForm_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, CheckoutForm_typeof(obj); }
7264 function CheckoutForm_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ CheckoutForm_regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == CheckoutForm_typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
7265 function CheckoutForm_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
7266 function CheckoutForm_asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { CheckoutForm_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { CheckoutForm_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
7267 function CheckoutForm_slicedToArray(arr, i) { return CheckoutForm_arrayWithHoles(arr) || CheckoutForm_iterableToArrayLimit(arr, i) || CheckoutForm_unsupportedIterableToArray(arr, i) || CheckoutForm_nonIterableRest(); }
7268 function CheckoutForm_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7269 function CheckoutForm_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return CheckoutForm_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return CheckoutForm_arrayLikeToArray(o, minLen); }
7270 function CheckoutForm_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
7271 function CheckoutForm_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
7272 function CheckoutForm_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7273 var CheckoutForm_React = window.React;
7274 var useState = CheckoutForm_React.useState,
7275 useEffect = CheckoutForm_React.useEffect;
7276 var CheckoutForm_antd = antd,
7277 CheckoutForm_Button = CheckoutForm_antd.Button,
7278 CheckoutForm_Space = CheckoutForm_antd.Space,
7279 CheckoutForm_Row = CheckoutForm_antd.Row;
7280 var CheckoutForm_ = wp.i18n.__;
7281
7282
7283
7284 var CheckoutForm = function CheckoutForm() {
7285 var _useStateValue = provider_useStateValue(),
7286 _useStateValue2 = CheckoutForm_slicedToArray(_useStateValue, 2),
7287 meetingReducer = _useStateValue2[0].meeting,
7288 dispatch = _useStateValue2[1];
7289 var contactInfo = meetingReducer.contactInfo;
7290 var _useState = useState(false),
7291 _useState2 = CheckoutForm_slicedToArray(_useState, 2),
7292 isLoading = _useState2[0],
7293 setIsLoading = _useState2[1];
7294 var _useState3 = useState(null),
7295 _useState4 = CheckoutForm_slicedToArray(_useState3, 2),
7296 message = _useState4[0],
7297 setMessage = _useState4[1];
7298 var _useState5 = useState(contactInfo === null || contactInfo === void 0 ? void 0 : contactInfo.email),
7299 _useState6 = CheckoutForm_slicedToArray(_useState5, 2),
7300 email = _useState6[0],
7301 setEmail = _useState6[1];
7302 var stripe = (0,react_stripe_umd.useStripe)();
7303 var elements = (0,react_stripe_umd.useElements)();
7304 var paymentElementOptions = {
7305 layout: "tabs"
7306 };
7307 var handleSubmit = /*#__PURE__*/function () {
7308 var _ref = CheckoutForm_asyncToGenerator( /*#__PURE__*/CheckoutForm_regeneratorRuntime().mark(function _callee(e) {
7309 var _yield$stripe$confirm, paymentIntent, error;
7310 return CheckoutForm_regeneratorRuntime().wrap(function _callee$(_context) {
7311 while (1) {
7312 switch (_context.prev = _context.next) {
7313 case 0:
7314 e.preventDefault();
7315 if (!(!stripe || !elements)) {
7316 _context.next = 3;
7317 break;
7318 }
7319 return _context.abrupt("return");
7320 case 3:
7321 setIsLoading(true);
7322 _context.next = 6;
7323 return stripe.confirmPayment({
7324 elements: elements,
7325 confirmParams: {
7326 // Make sure to change this to your payment completion page
7327 return_url: timetics.site_url
7328 },
7329 redirect: "if_required"
7330 });
7331 case 6:
7332 _yield$stripe$confirm = _context.sent;
7333 paymentIntent = _yield$stripe$confirm.paymentIntent;
7334 error = _yield$stripe$confirm.error;
7335 if ("succeeded" == (paymentIntent === null || paymentIntent === void 0 ? void 0 : paymentIntent.status)) {
7336 // Redirect to payment success component
7337 } else if ("failed" == (paymentIntent === null || paymentIntent === void 0 ? void 0 : paymentIntent.status)) {
7338 // Redirect to payment failed component
7339 }
7340 dispatch({
7341 type: actions_actions.SET_STATE,
7342 payload: {
7343 paymentStatus: paymentIntent
7344 }
7345 });
7346
7347 // This point will only be reached if there is an immediate error when
7348 // confirming the payment. Otherwise, your customer will be redirected to
7349 // your `return_url`. For some payment methods like iDEAL, your customer will
7350 // be redirected to an intermediate site first to authorize the payment, then
7351 // redirected to the `return_url`.
7352 if ((error === null || error === void 0 ? void 0 : error.type) === "card_error" || (error === null || error === void 0 ? void 0 : error.type) === "validation_error") {
7353 setMessage(error === null || error === void 0 ? void 0 : error.message);
7354 }
7355 setIsLoading(false);
7356 case 13:
7357 case "end":
7358 return _context.stop();
7359 }
7360 }
7361 }, _callee);
7362 }));
7363 return function handleSubmit(_x) {
7364 return _ref.apply(this, arguments);
7365 };
7366 }();
7367 return /*#__PURE__*/CheckoutForm_React.createElement("form", {
7368 id: "payment-form",
7369 onSubmit: handleSubmit
7370 }, /*#__PURE__*/CheckoutForm_React.createElement(react_stripe_umd.LinkAuthenticationElement, {
7371 id: "link-authentication-element",
7372 onChange: function onChange(e) {
7373 return setEmail(e.value.email);
7374 },
7375 value: email
7376 }), /*#__PURE__*/CheckoutForm_React.createElement(react_stripe_umd.PaymentElement, {
7377 id: "payment-element",
7378 options: paymentElementOptions
7379 }), /*#__PURE__*/CheckoutForm_React.createElement(CheckoutForm_Row, {
7380 justify: "end"
7381 }, /*#__PURE__*/CheckoutForm_React.createElement(CheckoutForm_Space, {
7382 wrap: true
7383 }, /*#__PURE__*/CheckoutForm_React.createElement(CheckoutForm_Button, {
7384 onClick: function onClick() {
7385 dispatch({
7386 type: actions_actions.SET_STATE,
7387 payload: {
7388 step: 2
7389 }
7390 });
7391 },
7392 size: "large"
7393 }, CheckoutForm_("Back", "timetics")), /*#__PURE__*/CheckoutForm_React.createElement("button", {
7394 disabled: isLoading || !stripe || !elements,
7395 id: "submit",
7396 className: "ant-btn ant-btn-primary ant-btn-lg"
7397 }, /*#__PURE__*/CheckoutForm_React.createElement("span", {
7398 id: "button-text"
7399 }, isLoading ? /*#__PURE__*/CheckoutForm_React.createElement("div", {
7400 className: "spinner",
7401 id: "spinner"
7402 }) : CheckoutForm_("Pay now", "timetics"))))), message && /*#__PURE__*/CheckoutForm_React.createElement("div", {
7403 id: "payment-message"
7404 }, message));
7405 };
7406 /* harmony default export */ const stripe_CheckoutForm = (CheckoutForm);
7407 ;// CONCATENATED MODULE: ./assets/src/frontend/stripe/StripePayment.js
7408 function StripePayment_slicedToArray(arr, i) { return StripePayment_arrayWithHoles(arr) || StripePayment_iterableToArrayLimit(arr, i) || StripePayment_unsupportedIterableToArray(arr, i) || StripePayment_nonIterableRest(); }
7409 function StripePayment_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7410 function StripePayment_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return StripePayment_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return StripePayment_arrayLikeToArray(o, minLen); }
7411 function StripePayment_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
7412 function StripePayment_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
7413 function StripePayment_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7414 var StripePayment_React = window.React;
7415 var StripePayment_useState = StripePayment_React.useState,
7416 StripePayment_useEffect = StripePayment_React.useEffect;
7417
7418
7419
7420
7421
7422 var StripePayment_Typography = window.antd.Typography;
7423 var StripePayment_ = wp.i18n.__;
7424 var StripePayment_Text = StripePayment_Typography.Text;
7425 var stripPubKey = timetics.stripe_pub_key;
7426 var StripePayment_stripePromise = loadStripe(stripPubKey);
7427 var StripePayment_antd = antd,
7428 Skeleton = StripePayment_antd.Skeleton;
7429
7430 /**
7431 * Stripe Payment Compoment
7432 *
7433 * @return jsx
7434 */
7435 var StripePayment = function StripePayment(item) {
7436 var _useState = StripePayment_useState(),
7437 _useState2 = StripePayment_slicedToArray(_useState, 2),
7438 clientSecret = _useState2[0],
7439 setClientSecret = _useState2[1];
7440 var amount = item.amount,
7441 currency = item.currency;
7442 var _useState3 = StripePayment_useState(null),
7443 _useState4 = StripePayment_slicedToArray(_useState3, 2),
7444 error = _useState4[0],
7445 setError = _useState4[1];
7446 var _useState5 = StripePayment_useState(false),
7447 _useState6 = StripePayment_slicedToArray(_useState5, 2),
7448 loading = _useState6[0],
7449 setLoading = _useState6[1];
7450 StripePayment_useEffect(function () {
7451 //TODO need to calculate the price here...
7452 setLoading(true);
7453 var r = requestConfig_request(apiEndPoints_apiEndpoint.payment.stripe, {
7454 method: "post",
7455 data: {
7456 amount: amount,
7457 currency: currency
7458 }
7459 }).then(function (res) {
7460 //TODO need to handle error for stripe api key and secret key
7461 setClientSecret(res.data.client_secret);
7462 if (res.data.error) {
7463 setError(res.data.error);
7464 }
7465 setLoading(false);
7466 });
7467
7468 //cancel axios request on unmount
7469 return function () {
7470 finishPendingRequests();
7471 };
7472 }, [amount]);
7473 var appearance = {
7474 theme: "stripe"
7475 };
7476 var options = {
7477 clientSecret: clientSecret,
7478 appearance: appearance
7479 };
7480 if (loading) {
7481 return /*#__PURE__*/StripePayment_React.createElement(Skeleton, {
7482 active: true
7483 });
7484 }
7485 return /*#__PURE__*/StripePayment_React.createElement("div", {
7486 className: "timetics-stripe tt-booking-body-wrap"
7487 }, clientSecret && /*#__PURE__*/StripePayment_React.createElement(react_stripe_umd.Elements, {
7488 options: options,
7489 stripe: StripePayment_stripePromise
7490 }, /*#__PURE__*/StripePayment_React.createElement(stripe_CheckoutForm, null)), error && /*#__PURE__*/StripePayment_React.createElement(StripePayment_Text, {
7491 style: {
7492 color: "#E42D23"
7493 }
7494 }, StripePayment_("Error: ".concat(error === null || error === void 0 ? void 0 : error.message, " "), "timetics")));
7495 };
7496 /* harmony default export */ const stripe_StripePayment = (StripePayment);
7497 ;// CONCATENATED MODULE: ./assets/src/frontend/pages/bookings/PaymentForm.js
7498 function PaymentForm_slicedToArray(arr, i) { return PaymentForm_arrayWithHoles(arr) || PaymentForm_iterableToArrayLimit(arr, i) || PaymentForm_unsupportedIterableToArray(arr, i) || PaymentForm_nonIterableRest(); }
7499 function PaymentForm_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7500 function PaymentForm_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return PaymentForm_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return PaymentForm_arrayLikeToArray(o, minLen); }
7501 function PaymentForm_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
7502 function PaymentForm_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
7503 function PaymentForm_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7504
7505
7506
7507
7508 var PaymentForm_ = wp.i18n.__;
7509
7510 var PaymentForm_window$antd = window.antd,
7511 PaymentForm_Button = PaymentForm_window$antd.Button,
7512 PaymentForm_Typography = PaymentForm_window$antd.Typography,
7513 PaymentForm_Space = PaymentForm_window$antd.Space,
7514 PaymentForm_List = PaymentForm_window$antd.List,
7515 PaymentForm_Row = PaymentForm_window$antd.Row,
7516 PaymentForm_Col = PaymentForm_window$antd.Col,
7517 PaymentForm_Form = PaymentForm_window$antd.Form;
7518 var PaymentForm_Text = PaymentForm_Typography.Text,
7519 PaymentForm_Title = PaymentForm_Typography.Title;
7520 function PaymentForm() {
7521 var _timetics, _timetics2;
7522 var _useStateValue = provider_useStateValue(),
7523 _useStateValue2 = PaymentForm_slicedToArray(_useStateValue, 2),
7524 meetingReducer = _useStateValue2[0].meeting,
7525 dispatch = _useStateValue2[1];
7526 var meeting = meetingReducer.meeting,
7527 selectedDate = meetingReducer.selectedDate,
7528 bookingTime = meetingReducer.bookingTime,
7529 selectedDay = meetingReducer.selectedDay,
7530 contactInfo = meetingReducer.contactInfo,
7531 selectedStaff = meetingReducer.selectedStaff,
7532 payment_method = meetingReducer.payment_method,
7533 _meetingReducer$selec = meetingReducer.selectedSeats,
7534 selectedSeats = _meetingReducer$selec === void 0 ? [] : _meetingReducer$selec,
7535 totalOrderPrice = meetingReducer.totalOrderPrice;
7536 return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(bookings_Header, {
7537 stepTitle: "Step 2",
7538 componentTitle: "Payment"
7539 }), /*#__PURE__*/React.createElement(PaymentForm_Row, {
7540 gutter: [24, 24]
7541 }, /*#__PURE__*/React.createElement(PaymentForm_Col, {
7542 sm: 24,
7543 md: 8,
7544 lg: 8
7545 }, /*#__PURE__*/React.createElement("div", {
7546 className: "tt-form-left-sidebar"
7547 }, /*#__PURE__*/React.createElement(PaymentForm_Title, {
7548 className: "tt-meeting-name tt-mb-10",
7549 level: 3
7550 }, meeting === null || meeting === void 0 ? void 0 : meeting.name), /*#__PURE__*/React.createElement("div", {
7551 className: "selected-author tt-mb-10"
7552 }, /*#__PURE__*/React.createElement(PaymentForm_Text, null, PaymentForm_("with", "timetics")), /*#__PURE__*/React.createElement(PaymentForm_Text, {
7553 strong: true
7554 }, " ", selectedStaff === null || selectedStaff === void 0 ? void 0 : selectedStaff.full_name)), /*#__PURE__*/React.createElement(SidebarInfo, null))), /*#__PURE__*/React.createElement(PaymentForm_Col, {
7555 sm: 24,
7556 md: 16,
7557 lg: 16
7558 }, (_timetics = timetics) !== null && _timetics !== void 0 && _timetics.currency && meeting !== null && meeting !== void 0 && meeting.price && payment_method == "Stripe" ?
7559 /*#__PURE__*/
7560 // TODO - need to calculate price here...
7561 React.createElement(stripe_StripePayment, {
7562 amount: totalOrderPrice,
7563 currency: (_timetics2 = timetics) === null || _timetics2 === void 0 ? void 0 : _timetics2.currency
7564 }) : null)));
7565 }
7566 /* harmony default export */ const bookings_PaymentForm = (PaymentForm);
7567 ;// CONCATENATED MODULE: ./assets/src/admin/services/meetings.js
7568 function meetings_typeof(obj) { "@babel/helpers - typeof"; return meetings_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, meetings_typeof(obj); }
7569 function meetings_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ meetings_regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == meetings_typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
7570 function meetings_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
7571 function meetings_asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { meetings_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { meetings_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
7572
7573
7574 var getAllMeetings = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
7575 var _ref = meetings_asyncToGenerator( /*#__PURE__*/meetings_regeneratorRuntime().mark(function _callee(config) {
7576 return meetings_regeneratorRuntime().wrap(function _callee$(_context) {
7577 while (1) {
7578 switch (_context.prev = _context.next) {
7579 case 0:
7580 return _context.abrupt("return", request(apiEndpoint.meetings.meetingsList, config));
7581 case 1:
7582 case "end":
7583 return _context.stop();
7584 }
7585 }
7586 }, _callee);
7587 }));
7588 return function getAllMeetings(_x) {
7589 return _ref.apply(this, arguments);
7590 };
7591 }()));
7592 var getSingleMeeting = /*#__PURE__*/function () {
7593 var _ref2 = meetings_asyncToGenerator( /*#__PURE__*/meetings_regeneratorRuntime().mark(function _callee2(config, id) {
7594 return meetings_regeneratorRuntime().wrap(function _callee2$(_context2) {
7595 while (1) {
7596 switch (_context2.prev = _context2.next) {
7597 case 0:
7598 return _context2.abrupt("return", requestConfig_request("".concat(apiEndPoints_apiEndpoint.meetings.meeting, "/").concat(id), config));
7599 case 1:
7600 case "end":
7601 return _context2.stop();
7602 }
7603 }
7604 }, _callee2);
7605 }));
7606 return function getSingleMeeting(_x2, _x3) {
7607 return _ref2.apply(this, arguments);
7608 };
7609 }();
7610 var createMeeting = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
7611 var _ref3 = meetings_asyncToGenerator( /*#__PURE__*/meetings_regeneratorRuntime().mark(function _callee3(config) {
7612 return meetings_regeneratorRuntime().wrap(function _callee3$(_context3) {
7613 while (1) {
7614 switch (_context3.prev = _context3.next) {
7615 case 0:
7616 return _context3.abrupt("return", request(apiEndpoint.meetings.createMeeting, config));
7617 case 1:
7618 case "end":
7619 return _context3.stop();
7620 }
7621 }
7622 }, _callee3);
7623 }));
7624 return function createMeeting(_x4) {
7625 return _ref3.apply(this, arguments);
7626 };
7627 }()));
7628 var updateMeeting = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
7629 var _ref4 = meetings_asyncToGenerator( /*#__PURE__*/meetings_regeneratorRuntime().mark(function _callee4(config, id) {
7630 return meetings_regeneratorRuntime().wrap(function _callee4$(_context4) {
7631 while (1) {
7632 switch (_context4.prev = _context4.next) {
7633 case 0:
7634 return _context4.abrupt("return", request("".concat(apiEndpoint.meetings.createMeeting, "/").concat(id), config));
7635 case 1:
7636 case "end":
7637 return _context4.stop();
7638 }
7639 }
7640 }, _callee4);
7641 }));
7642 return function updateMeeting(_x5, _x6) {
7643 return _ref4.apply(this, arguments);
7644 };
7645 }()));
7646 var deleteMeeting = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
7647 var _ref5 = meetings_asyncToGenerator( /*#__PURE__*/meetings_regeneratorRuntime().mark(function _callee5(config, id) {
7648 return meetings_regeneratorRuntime().wrap(function _callee5$(_context5) {
7649 while (1) {
7650 switch (_context5.prev = _context5.next) {
7651 case 0:
7652 return _context5.abrupt("return", request("".concat(apiEndpoint.meetings.deleteMeeting, "/").concat(id), config));
7653 case 1:
7654 case "end":
7655 return _context5.stop();
7656 }
7657 }
7658 }, _callee5);
7659 }));
7660 return function deleteMeeting(_x7, _x8) {
7661 return _ref5.apply(this, arguments);
7662 };
7663 }()));
7664 var buldDeleteMeeting = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
7665 var _ref6 = meetings_asyncToGenerator( /*#__PURE__*/meetings_regeneratorRuntime().mark(function _callee6(config) {
7666 return meetings_regeneratorRuntime().wrap(function _callee6$(_context6) {
7667 while (1) {
7668 switch (_context6.prev = _context6.next) {
7669 case 0:
7670 return _context6.abrupt("return", request("".concat(apiEndpoint.meetings.deleteMeeting), config));
7671 case 1:
7672 case "end":
7673 return _context6.stop();
7674 }
7675 }
7676 }, _callee6);
7677 }));
7678 return function buldDeleteMeeting(_x9) {
7679 return _ref6.apply(this, arguments);
7680 };
7681 }()));
7682 var duplicateMeeting = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
7683 var _ref7 = meetings_asyncToGenerator( /*#__PURE__*/meetings_regeneratorRuntime().mark(function _callee7(config, id) {
7684 return meetings_regeneratorRuntime().wrap(function _callee7$(_context7) {
7685 while (1) {
7686 switch (_context7.prev = _context7.next) {
7687 case 0:
7688 return _context7.abrupt("return", request("".concat(apiEndpoint.meetings.duplicateMeeting.replace(":id", id)), config));
7689 case 1:
7690 case "end":
7691 return _context7.stop();
7692 }
7693 }
7694 }, _callee7);
7695 }));
7696 return function duplicateMeeting(_x10, _x11) {
7697 return _ref7.apply(this, arguments);
7698 };
7699 }()));
7700 var searchMeeting = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
7701 var _ref8 = meetings_asyncToGenerator( /*#__PURE__*/meetings_regeneratorRuntime().mark(function _callee8(config) {
7702 return meetings_regeneratorRuntime().wrap(function _callee8$(_context8) {
7703 while (1) {
7704 switch (_context8.prev = _context8.next) {
7705 case 0:
7706 return _context8.abrupt("return", request("".concat(apiEndpoint.meetings.search), config));
7707 case 1:
7708 case "end":
7709 return _context8.stop();
7710 }
7711 }
7712 }, _callee8);
7713 }));
7714 return function searchMeeting(_x12) {
7715 return _ref8.apply(this, arguments);
7716 };
7717 }()));
7718 var filterMeeting = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
7719 var _ref9 = meetings_asyncToGenerator( /*#__PURE__*/meetings_regeneratorRuntime().mark(function _callee9(config) {
7720 return meetings_regeneratorRuntime().wrap(function _callee9$(_context9) {
7721 while (1) {
7722 switch (_context9.prev = _context9.next) {
7723 case 0:
7724 return _context9.abrupt("return", request("".concat(apiEndpoint.meetings.filterMeeting), config));
7725 case 1:
7726 case "end":
7727 return _context9.stop();
7728 }
7729 }
7730 }, _callee9);
7731 }));
7732 return function filterMeeting(_x13) {
7733 return _ref9.apply(this, arguments);
7734 };
7735 }()));
7736 var getSlots = /*#__PURE__*/function () {
7737 var _ref11 = meetings_asyncToGenerator( /*#__PURE__*/meetings_regeneratorRuntime().mark(function _callee10(config, _ref10) {
7738 var staffId, meetingId, startDate, endDate;
7739 return meetings_regeneratorRuntime().wrap(function _callee10$(_context10) {
7740 while (1) {
7741 switch (_context10.prev = _context10.next) {
7742 case 0:
7743 staffId = _ref10.staffId, meetingId = _ref10.meetingId, startDate = _ref10.startDate, endDate = _ref10.endDate;
7744 return _context10.abrupt("return", requestConfig_request("".concat(apiEndPoints_apiEndpoint.bookings.slots, "?staff_id=").concat(staffId, "&meeting_id=").concat(meetingId, "&start_date=").concat(startDate, "&end_date=").concat(endDate), config));
7745 case 2:
7746 case "end":
7747 return _context10.stop();
7748 }
7749 }
7750 }, _callee10);
7751 }));
7752 return function getSlots(_x14, _x15) {
7753 return _ref11.apply(this, arguments);
7754 };
7755 }();
7756
7757 ;// CONCATENATED MODULE: ./assets/src/frontend/pages/bookings/hooks/useBooking.js
7758 function useBooking_slicedToArray(arr, i) { return useBooking_arrayWithHoles(arr) || useBooking_iterableToArrayLimit(arr, i) || useBooking_unsupportedIterableToArray(arr, i) || useBooking_nonIterableRest(); }
7759 function useBooking_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7760 function useBooking_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return useBooking_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return useBooking_arrayLikeToArray(o, minLen); }
7761 function useBooking_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
7762 function useBooking_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
7763 function useBooking_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7764
7765
7766
7767 function useBooking() {
7768 var _useStateValue = provider_useStateValue(),
7769 _useStateValue2 = useBooking_slicedToArray(_useStateValue, 2),
7770 meetingReducer = _useStateValue2[0].meeting,
7771 dispatch = _useStateValue2[1];
7772 var slots = meetingReducer.slots;
7773 var covertedSchedules = function covertedSchedules(schedules) {
7774 var _schedules = {};
7775 Object.keys(schedules).map(function (item) {
7776 _schedules[item] = availabilityModel_convertSchedulesForUi(schedules[item]);
7777 });
7778 return _schedules;
7779 };
7780 var getSlotsForSelectedDay = function getSlotsForSelectedDay(_ref) {
7781 var _slots$days, _data$, _data$$slots;
7782 var selectedDate = _ref.selectedDate;
7783 var data = slots === null || slots === void 0 ? void 0 : (_slots$days = slots.days) === null || _slots$days === void 0 ? void 0 : _slots$days.filter(function (item) {
7784 return dayjs_min_default()(item === null || item === void 0 ? void 0 : item.date).format("YYYY-MM-DD") === dayjs_min_default()(selectedDate).format("YYYY-MM-DD");
7785 });
7786 var _singleDaySlots = data === null || data === void 0 ? void 0 : (_data$ = data[0]) === null || _data$ === void 0 ? void 0 : (_data$$slots = _data$.slots) === null || _data$$slots === void 0 ? void 0 : _data$$slots.filter(function (item) {
7787 return item.status == "available";
7788 });
7789 return _singleDaySlots;
7790 };
7791 return {
7792 getSlotsForSelectedDay: getSlotsForSelectedDay
7793 };
7794 }
7795 /* harmony default export */ const hooks_useBooking = (useBooking);
7796 ;// CONCATENATED MODULE: ./assets/src/frontend/pages/bookings/BookingCalendar.js
7797 function BookingCalendar_typeof(obj) { "@babel/helpers - typeof"; return BookingCalendar_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, BookingCalendar_typeof(obj); }
7798 function BookingCalendar_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ BookingCalendar_regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == BookingCalendar_typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
7799 function BookingCalendar_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
7800 function BookingCalendar_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? BookingCalendar_ownKeys(Object(source), !0).forEach(function (key) { BookingCalendar_defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : BookingCalendar_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
7801 function BookingCalendar_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
7802 function BookingCalendar_asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { BookingCalendar_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { BookingCalendar_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
7803 function BookingCalendar_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7804 function BookingCalendar_toConsumableArray(arr) { return BookingCalendar_arrayWithoutHoles(arr) || BookingCalendar_iterableToArray(arr) || BookingCalendar_unsupportedIterableToArray(arr) || BookingCalendar_nonIterableSpread(); }
7805 function BookingCalendar_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7806 function BookingCalendar_iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
7807 function BookingCalendar_arrayWithoutHoles(arr) { if (Array.isArray(arr)) return BookingCalendar_arrayLikeToArray(arr); }
7808 function BookingCalendar_slicedToArray(arr, i) { return BookingCalendar_arrayWithHoles(arr) || BookingCalendar_iterableToArrayLimit(arr, i) || BookingCalendar_unsupportedIterableToArray(arr, i) || BookingCalendar_nonIterableRest(); }
7809 function BookingCalendar_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7810 function BookingCalendar_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return BookingCalendar_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return BookingCalendar_arrayLikeToArray(o, minLen); }
7811 function BookingCalendar_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
7812 function BookingCalendar_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
7813 function BookingCalendar_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7814
7815
7816
7817
7818
7819
7820
7821 var _window$React = window.React,
7822 useRef = _window$React.useRef,
7823 BookingCalendar_useEffect = _window$React.useEffect;
7824 function BookingCalendar() {
7825 var _useStateValue = provider_useStateValue(),
7826 _useStateValue2 = BookingCalendar_slicedToArray(_useStateValue, 2),
7827 meetingReducer = _useStateValue2[0].meeting,
7828 dispatch = _useStateValue2[1];
7829 var fp = useRef(null);
7830 var _useBooking = hooks_useBooking(),
7831 getSlotsForSelectedDay = _useBooking.getSlotsForSelectedDay;
7832 var meeting = meetingReducer.meeting,
7833 unavailableDates = meetingReducer.unavailableDates,
7834 unavailableDays = meetingReducer.unavailableDays,
7835 _meetingReducer$selec = meetingReducer.selectedDate,
7836 selectedDate = _meetingReducer$selec === void 0 ? dayjs_min_default()(new Date()).format("YYYY-MM-DD") : _meetingReducer$selec,
7837 currentMonth = meetingReducer.currentMonth,
7838 _meetingReducer$unava = meetingReducer.unavailableDayNumber,
7839 unavailableDayNumber = _meetingReducer$unava === void 0 ? [] : _meetingReducer$unava,
7840 selectedStaff = meetingReducer.selectedStaff,
7841 startDateForSlots = meetingReducer.startDateForSlots,
7842 slots = meetingReducer.slots,
7843 bookingTime = meetingReducer.bookingTime;
7844
7845 // const { id: selectedStaffIdToBook } = selectedStaff;
7846
7847 BookingCalendar_useEffect(function () {
7848 if (typeof window !== "undefined" && window.flatpickr) {
7849 var _meeting$availability, _window, _window$timetics;
7850 var inputEl = fp.current;
7851 var flatpickrInstance = window.flatpickr(inputEl, {
7852 //intially selected date is today, but don't fetch slots initially, that's defaultDate is commented
7853 // defaultDate: selectedDate,
7854 inline: true,
7855 altFormat: "F j, Y",
7856 dateFormat: "Y-m-d",
7857 minDate: "today",
7858 monthSelectorType: "static",
7859 maxDate: meeting !== null && meeting !== void 0 && meeting.availability ? meeting === null || meeting === void 0 ? void 0 : (_meeting$availability = meeting.availability) === null || _meeting$availability === void 0 ? void 0 : _meeting$availability.end : new Date().fp_incr(30),
7860 disable: [function (date) {
7861 return BookingCalendar_toConsumableArray(unavailableDayNumber).includes(date.getDay());
7862 }],
7863 locale: {
7864 firstDayOfWeek: convertWeekDayToNumber((_window = window) === null || _window === void 0 ? void 0 : (_window$timetics = _window.timetics) === null || _window$timetics === void 0 ? void 0 : _window$timetics.start_of_week) // start week on Monday
7865 },
7866
7867 onChange: function onChange(selectedDates, dateStr, instance) {
7868 var day = getWeekDay(new Date(dateStr));
7869 dispatch({
7870 type: actions_actions.SET_STATE,
7871 payload: {
7872 selectedDate: dateStr,
7873 selectedDay: day
7874 }
7875 });
7876 },
7877 onMonthChange: function onMonthChange(selectedDates, dateStr, instance) {
7878 var _payload;
7879 var newDateStr = dayjs_min_default()().month(instance.currentMonth).startOf("month").toDate();
7880
7881 //TODO newDateStr is the date for the first day of the month
7882 //but when we set it to the context it has the value of the last day of the month
7883
7884 var unavailableDates = getDateListFromDayStrings({
7885 days: unavailableDays,
7886 currentMonth: instance === null || instance === void 0 ? void 0 : instance.currentMonth
7887 });
7888 dispatch({
7889 type: actions_actions.SET_STATE,
7890 payload: (_payload = {
7891 currentMonth: instance === null || instance === void 0 ? void 0 : instance.currentMonth,
7892 unavailableDates: unavailableDates
7893 }, BookingCalendar_defineProperty(_payload, "currentMonth", instance === null || instance === void 0 ? void 0 : instance.currentMonth), BookingCalendar_defineProperty(_payload, "startDateForSlots", dayjs_min_default()(newDateStr).format("YYYY-MM-DD")), BookingCalendar_defineProperty(_payload, "selectedDate", null), _payload)
7894 });
7895 }
7896 });
7897 return function () {
7898 flatpickrInstance.destroy();
7899 };
7900 }
7901 }, [unavailableDayNumber]);
7902 BookingCalendar_useEffect(function () {
7903 var loadData = /*#__PURE__*/function () {
7904 var _ref = BookingCalendar_asyncToGenerator( /*#__PURE__*/BookingCalendar_regeneratorRuntime().mark(function _callee() {
7905 var _yield$getSlots, data, selectedDaysSlots, day;
7906 return BookingCalendar_regeneratorRuntime().wrap(function _callee$(_context) {
7907 while (1) {
7908 switch (_context.prev = _context.next) {
7909 case 0:
7910 _context.next = 2;
7911 return getSlots({
7912 method: "GET"
7913 }, BookingCalendar_objectSpread({
7914 staffId: selectedStaff === null || selectedStaff === void 0 ? void 0 : selectedStaff.id,
7915 meetingId: meeting === null || meeting === void 0 ? void 0 : meeting.id
7916 }, getDateRangeOfStartDateAndEndOfTheMonth(startDateForSlots || dayjs_min_default()().format("YYYY-MM-DD"))));
7917 case 2:
7918 _yield$getSlots = _context.sent;
7919 data = _yield$getSlots.data;
7920 selectedDaysSlots = getSlotsForSelectedDay({
7921 slots: data === null || data === void 0 ? void 0 : data.data,
7922 selectedDate: dayjs_min_default()(new Date()).format("YYYY-MM-DD")
7923 });
7924 day = getWeekDay(new Date());
7925 dispatch({
7926 type: actions_actions.SET_MEETING_SLOTS,
7927 payload: {
7928 slots: data === null || data === void 0 ? void 0 : data.data,
7929 selectedDay: day,
7930 //commented out to hide the slot component on load by default
7931 // selectedDate: dayjs(new Date()).format("YYYY-MM-DD"),
7932 selectedDaysSlots: selectedDaysSlots
7933 }
7934 });
7935 case 7:
7936 case "end":
7937 return _context.stop();
7938 }
7939 }
7940 }, _callee);
7941 }));
7942 return function loadData() {
7943 return _ref.apply(this, arguments);
7944 };
7945 }();
7946 loadData();
7947 }, [selectedStaff === null || selectedStaff === void 0 ? void 0 : selectedStaff.id, startDateForSlots]);
7948
7949 /**
7950 *Called On change of selected date
7951 */
7952 BookingCalendar_useEffect(function () {
7953 var selectedDaysSlots = getSlotsForSelectedDay({
7954 selectedDate: dayjs_min_default()(selectedDate).format("YYYY-MM-DD")
7955 });
7956 var currentDateSlot = slots === null || slots === void 0 ? void 0 : slots.days.filter(function (day) {
7957 return (day === null || day === void 0 ? void 0 : day.date) === selectedDate;
7958 });
7959 dispatch({
7960 type: actions_actions.SET_SELECTED_DATE,
7961 payload: {
7962 selectedDaysSlots: selectedDaysSlots
7963 }
7964 });
7965
7966 // hand picking data for current selected date
7967 if (currentDateSlot) {
7968 dispatch({
7969 type: actions_actions.SET_STATE,
7970 payload: {
7971 currentDateSlot: currentDateSlot[0]
7972 }
7973 });
7974 }
7975 }, [selectedDate]);
7976 return /*#__PURE__*/React.createElement("div", {
7977 className: "tt-flatpickr-calendar"
7978 }, /*#__PURE__*/React.createElement("input", {
7979 ref: fp,
7980 type: "text",
7981 className: "flatpickr-input"
7982 }));
7983 }
7984 /* harmony default export */ const bookings_BookingCalendar = (BookingCalendar);
7985 ;// CONCATENATED MODULE: ./assets/src/frontend/pages/bookings/BookingSlot.js
7986 function BookingSlot_slicedToArray(arr, i) { return BookingSlot_arrayWithHoles(arr) || BookingSlot_iterableToArrayLimit(arr, i) || BookingSlot_unsupportedIterableToArray(arr, i) || BookingSlot_nonIterableRest(); }
7987 function BookingSlot_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7988 function BookingSlot_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return BookingSlot_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return BookingSlot_arrayLikeToArray(o, minLen); }
7989 function BookingSlot_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
7990 function BookingSlot_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
7991 function BookingSlot_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7992
7993
7994
7995
7996 var BookingSlot_ = wp.i18n.__;
7997 var BookingSlot_window$antd = window.antd,
7998 BookingSlot_Typography = BookingSlot_window$antd.Typography,
7999 BookingSlot_Button = BookingSlot_window$antd.Button,
8000 BookingSlot_List = BookingSlot_window$antd.List,
8001 Tooltip = BookingSlot_window$antd.Tooltip;
8002 var BookingSlot_Title = BookingSlot_Typography.Title,
8003 BookingSlot_Text = BookingSlot_Typography.Text;
8004 var BookingSlot_window$React = window.React,
8005 BookingSlot_useEffect = BookingSlot_window$React.useEffect,
8006 BookingSlot_useState = BookingSlot_window$React.useState;
8007 function BookingSlot() {
8008 var _window, _window$timetics, _currentSlot$2, _currentSlot$4, _currentSlot$4$slots;
8009 var _useStateValue = provider_useStateValue(),
8010 _useStateValue2 = BookingSlot_slicedToArray(_useStateValue, 2),
8011 meetingReducer = _useStateValue2[0].meeting,
8012 dispatch = _useStateValue2[1];
8013 var _useState = BookingSlot_useState([]),
8014 _useState2 = BookingSlot_slicedToArray(_useState, 2),
8015 currentSlot = _useState2[0],
8016 setCurrentSlot = _useState2[1];
8017 var meeting = meetingReducer.meeting,
8018 selectedDate = meetingReducer.selectedDate,
8019 selectedDay = meetingReducer.selectedDay,
8020 _meetingReducer$timeS = meetingReducer.timeSlots,
8021 timeSlots = _meetingReducer$timeS === void 0 ? [] : _meetingReducer$timeS,
8022 selectedStaff = meetingReducer.selectedStaff,
8023 bookingTime = meetingReducer.bookingTime,
8024 slots = meetingReducer.slots,
8025 _meetingReducer$meeti = meetingReducer.meetingQuantity,
8026 meetingQuantity = _meetingReducer$meeti === void 0 ? 0 : _meetingReducer$meeti,
8027 currentDateSlot = meetingReducer.currentDateSlot;
8028 BookingSlot_useEffect(function () {
8029 if (selectedDate) {
8030 setCurrentSlot(slots === null || slots === void 0 ? void 0 : slots.days.filter(function (day) {
8031 return (day === null || day === void 0 ? void 0 : day.date) === selectedDate;
8032 }));
8033 }
8034 }, [selectedDate]);
8035 BookingSlot_useEffect(function () {
8036 var quantity = 0;
8037 if ((meeting === null || meeting === void 0 ? void 0 : meeting.type) == "seat") {
8038 var _meeting$seat_plan;
8039 quantity = meeting === null || meeting === void 0 ? void 0 : (_meeting$seat_plan = meeting.seat_plan) === null || _meeting$seat_plan === void 0 ? void 0 : _meeting$seat_plan.length;
8040 } else {
8041 var _meeting$price;
8042 meeting === null || meeting === void 0 ? void 0 : (_meeting$price = meeting.price) === null || _meeting$price === void 0 ? void 0 : _meeting$price.map(function (p) {
8043 quantity += +p.ticket_quantity;
8044 });
8045 }
8046 dispatch({
8047 type: actions_actions.SET_STATE,
8048 payload: {
8049 meetingQuantity: quantity
8050 }
8051 });
8052 }, [meeting]);
8053 BookingSlot_useEffect(function () {
8054 var _currentDateSlot$;
8055 var _currentSlot = bookingTime && (currentDateSlot === null || currentDateSlot === void 0 ? void 0 : (_currentDateSlot$ = currentDateSlot[0]) === null || _currentDateSlot$ === void 0 ? void 0 : _currentDateSlot$.slots.filter(function (slot) {
8056 return (slot === null || slot === void 0 ? void 0 : slot.start_time) == bookingTime;
8057 }));
8058 if (_currentSlot) {
8059 var _currentSlot$;
8060 dispatch({
8061 type: actions_actions.SET_STATE,
8062 payload: {
8063 currentSlot: _currentSlot === null || _currentSlot === void 0 ? void 0 : (_currentSlot$ = _currentSlot[0]) === null || _currentSlot$ === void 0 ? void 0 : _currentSlot$.seats
8064 }
8065 });
8066 }
8067 }, [bookingTime]);
8068 return /*#__PURE__*/React.createElement("div", {
8069 className: "tt-slot-list-wrap"
8070 }, /*#__PURE__*/React.createElement(BookingSlot_Text, {
8071 className: "tt-selected-date"
8072 }, BookingSlot_(selectedDay, "timetics"), " -", " ", convertWordpressDateFormatToDayjs({
8073 date: selectedDate,
8074 format: (_window = window) === null || _window === void 0 ? void 0 : (_window$timetics = _window.timetics) === null || _window$timetics === void 0 ? void 0 : _window$timetics.date_format
8075 })), /*#__PURE__*/React.createElement(BookingSlot_List, {
8076 dataSource: currentSlot === null || currentSlot === void 0 ? void 0 : (_currentSlot$2 = currentSlot[0]) === null || _currentSlot$2 === void 0 ? void 0 : _currentSlot$2.slots,
8077 className: "tt-slot-list",
8078 split: false,
8079 renderItem: function renderItem(item, index) {
8080 var _item$seats, _item$seats2;
8081 var booked = item !== null && item !== void 0 && (_item$seats = item.seats) !== null && _item$seats !== void 0 && _item$seats.length ? item === null || item === void 0 ? void 0 : (_item$seats2 = item.seats) === null || _item$seats2 === void 0 ? void 0 : _item$seats2.length : item === null || item === void 0 ? void 0 : item.booked;
8082 // if (item.status == "available") {
8083 //TODO need hasinur vai fix this baseed on seat capacity
8084 if (booked < meetingQuantity) {
8085 var _window2, _window2$timetics;
8086 return /*#__PURE__*/React.createElement(BookingSlot_List.Item, {
8087 key: index
8088 }, /*#__PURE__*/React.createElement(Tooltip, {
8089 title: meeting.type !== "One-to-One" && BookingSlot_("".concat(meetingQuantity - booked, " seats are left of ").concat(meetingQuantity), "timetics-pro")
8090 }, /*#__PURE__*/React.createElement(BookingSlot_Button, {
8091 type: "primary",
8092 ghost: true,
8093 block: true,
8094 key: index,
8095 onClick: function onClick(e) {
8096 var _currentSlot$3;
8097 var _currentSlot = currentDateSlot === null || currentDateSlot === void 0 ? void 0 : currentDateSlot.slots.filter(function (slot) {
8098 return (slot === null || slot === void 0 ? void 0 : slot.start_time) == (item === null || item === void 0 ? void 0 : item.start_time);
8099 });
8100 dispatch({
8101 type: actions_actions.SET_STATE,
8102 payload: {
8103 step: 2,
8104 bookingTime: item === null || item === void 0 ? void 0 : item.start_time,
8105 currentSlot: _currentSlot === null || _currentSlot === void 0 ? void 0 : (_currentSlot$3 = _currentSlot[0]) === null || _currentSlot$3 === void 0 ? void 0 : _currentSlot$3.seats
8106 }
8107 });
8108 }
8109 }, convertWordpressTimeFormatToDayjs({
8110 time: item === null || item === void 0 ? void 0 : item.start_time,
8111 format: (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$timetics = _window2.timetics) === null || _window2$timetics === void 0 ? void 0 : _window2$timetics.time_format
8112 }))));
8113 }
8114 }
8115 }), (currentSlot === null || currentSlot === void 0 ? void 0 : (_currentSlot$4 = currentSlot[0]) === null || _currentSlot$4 === void 0 ? void 0 : (_currentSlot$4$slots = _currentSlot$4.slots) === null || _currentSlot$4$slots === void 0 ? void 0 : _currentSlot$4$slots.every(function (slot) {
8116 return (slot === null || slot === void 0 ? void 0 : slot.status) == "unavailable";
8117 })) && /*#__PURE__*/React.createElement(BookingSlot_Text, {
8118 type: "danger",
8119 className: "tt-selected-date"
8120 }, BookingSlot_("No available slot.", "timetics")));
8121 }
8122 /* harmony default export */ const bookings_BookingSlot = (BookingSlot);
8123 ;// CONCATENATED MODULE: ./assets/src/frontend/pages/bookings/BookingDate.js
8124 function BookingDate_slicedToArray(arr, i) { return BookingDate_arrayWithHoles(arr) || BookingDate_iterableToArrayLimit(arr, i) || BookingDate_unsupportedIterableToArray(arr, i) || BookingDate_nonIterableRest(); }
8125 function BookingDate_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
8126 function BookingDate_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return BookingDate_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return BookingDate_arrayLikeToArray(o, minLen); }
8127 function BookingDate_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8128 function BookingDate_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
8129 function BookingDate_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8130
8131
8132
8133
8134 var BookingDate_useEffect = window.React.useEffect;
8135 var BookingDate_window$antd = window.antd,
8136 BookingDate_Row = BookingDate_window$antd.Row,
8137 BookingDate_Col = BookingDate_window$antd.Col;
8138 function BookingDate() {
8139 var _useStateValue = provider_useStateValue(),
8140 _useStateValue2 = BookingDate_slicedToArray(_useStateValue, 2),
8141 meetingReducer = _useStateValue2[0].meeting,
8142 dispatch = _useStateValue2[1];
8143 var dataControls = meetingReducer.dataControls,
8144 selectedDay = meetingReducer.selectedDay,
8145 selectedDate = meetingReducer.selectedDate,
8146 selectedStaff = meetingReducer.selectedStaff,
8147 meeting = meetingReducer.meeting,
8148 slots = meetingReducer.slots;
8149
8150 // get total meeting quantity
8151 var totalQuantity = meeting === null || meeting === void 0 ? void 0 : meeting.price.reduce(function (acc, current) {
8152 return +acc + +current.ticket_quantity;
8153 }, 0);
8154
8155 // one to many booked meeting count
8156 var bookedMeeting = 0;
8157 slots === null || slots === void 0 ? void 0 : slots.days.map(function (item) {
8158 item === null || item === void 0 ? void 0 : item.slots.map(function (b) {
8159 if (b.booked == 1 && bookedMeeting < totalQuantity) {
8160 bookedMeeting++;
8161 }
8162 });
8163 });
8164 var leftQuantity = totalQuantity - bookedMeeting;
8165 BookingDate_useEffect(function () {
8166 dispatch({
8167 type: actions_actions.SET_STATE,
8168 payload: {
8169 totalQuantity: totalQuantity,
8170 leftQuantity: leftQuantity
8171 }
8172 });
8173 return function () {};
8174 }, [selectedDate]);
8175 var colSpan = selectedDate ? 16 : 24;
8176 return /*#__PURE__*/React.createElement("div", {
8177 className: "tt-booking-body-wrap"
8178 }, /*#__PURE__*/React.createElement(BookingDate_Row, {
8179 gutter: [16, 16]
8180 }, /*#__PURE__*/React.createElement(BookingDate_Col, {
8181 xs: 24,
8182 sm: 24,
8183 md: colSpan,
8184 lg: colSpan
8185 }, /*#__PURE__*/React.createElement(bookings_BookingCalendar, null)), selectedDate ? /*#__PURE__*/React.createElement(BookingDate_Col, {
8186 xs: 24,
8187 sm: 24,
8188 md: 8,
8189 lg: 8
8190 }, /*#__PURE__*/React.createElement(bookings_BookingSlot, null)) : null));
8191 }
8192 /* harmony default export */ const bookings_BookingDate = (BookingDate);
8193 ;// CONCATENATED MODULE: ./assets/src/frontend/pages/bookings/MeetingDetails.js
8194 function MeetingDetails_slicedToArray(arr, i) { return MeetingDetails_arrayWithHoles(arr) || MeetingDetails_iterableToArrayLimit(arr, i) || MeetingDetails_unsupportedIterableToArray(arr, i) || MeetingDetails_nonIterableRest(); }
8195 function MeetingDetails_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
8196 function MeetingDetails_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return MeetingDetails_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return MeetingDetails_arrayLikeToArray(o, minLen); }
8197 function MeetingDetails_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8198 function MeetingDetails_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
8199 function MeetingDetails_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8200
8201
8202
8203 var MeetingDetails_window$antd = window.antd,
8204 MeetingDetails_Typography = MeetingDetails_window$antd.Typography,
8205 MeetingDetails_List = MeetingDetails_window$antd.List,
8206 Avatar = MeetingDetails_window$antd.Avatar,
8207 MeetingDetails_Select = MeetingDetails_window$antd.Select,
8208 MeetingDetails_Space = MeetingDetails_window$antd.Space,
8209 MeetingDetails_notification = MeetingDetails_window$antd.notification;
8210 var MeetingDetails_useEffect = window.React.useEffect;
8211 var MeetingDetails_Title = MeetingDetails_Typography.Title,
8212 MeetingDetails_Text = MeetingDetails_Typography.Text;
8213 var MeetingDetails_ = wp.i18n.__;
8214 function MeetingDetails() {
8215 var _useStateValue = provider_useStateValue(),
8216 _useStateValue2 = MeetingDetails_slicedToArray(_useStateValue, 2),
8217 meetingRedcuer = _useStateValue2[0].meeting,
8218 dispatch = _useStateValue2[1];
8219 var meeting = meetingRedcuer.meeting,
8220 selectedStaff = meetingRedcuer.selectedStaff;
8221 MeetingDetails_useEffect(function () {
8222 dispatch({
8223 type: actions_actions.SET_STATE,
8224 payload: {
8225 selectedStaff: selectedStaff ? selectedStaff : meeting === null || meeting === void 0 ? void 0 : meeting.staff[0]
8226 }
8227 });
8228
8229 // if (
8230 // !!window.timetics.stripe_configure == false &&
8231 // !!meeting?.price == true
8232 // ) {
8233 // notification.info({
8234 // message: __("Stripe is not configured", "timetics"),
8235 // description: "Please configure Stripe to book a meeting",
8236 // placement: "topRight",
8237 // duration: 0,
8238 // });
8239 // }
8240
8241 return function () {};
8242 }, []);
8243 return /*#__PURE__*/React.createElement("div", {
8244 className: "tt-form-left-sidebar"
8245 }, (meeting === null || meeting === void 0 ? void 0 : meeting.type) == "Many-to-One" ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MeetingDetails_Text, {
8246 strong: true
8247 }, MeetingDetails_("select host", "timetics")), /*#__PURE__*/React.createElement(MeetingDetails_Select, {
8248 style: {
8249 width: "100%"
8250 },
8251 className: "tt-host-input timetics-input",
8252 key: "staff",
8253 options: meeting === null || meeting === void 0 ? void 0 : meeting.staff,
8254 value: selectedStaff === null || selectedStaff === void 0 ? void 0 : selectedStaff.id,
8255 fieldNames: {
8256 label: "full_name",
8257 value: "id"
8258 },
8259 placeholder: MeetingDetails_("Select your meeting host", "timetics"),
8260 onChange: function onChange(value) {
8261 var _meeting$staff;
8262 dispatch({
8263 type: actions_actions.SET_STATE,
8264 payload: {
8265 selectedStaff: meeting === null || meeting === void 0 ? void 0 : (_meeting$staff = meeting.staff) === null || _meeting$staff === void 0 ? void 0 : _meeting$staff.filter(function (item) {
8266 return item.id == value;
8267 })[0]
8268 }
8269 });
8270 }
8271 })) : /*#__PURE__*/React.createElement(MeetingDetails_Space, {
8272 className: "tt-host-item tt-mb-20"
8273 }, /*#__PURE__*/React.createElement(Avatar, {
8274 size: 40,
8275 src: selectedStaff === null || selectedStaff === void 0 ? void 0 : selectedStaff.image
8276 }), /*#__PURE__*/React.createElement(MeetingDetails_Text, null, selectedStaff === null || selectedStaff === void 0 ? void 0 : selectedStaff.full_name)), /*#__PURE__*/React.createElement(MeetingDetails_Title, {
8277 className: "fff tt-meeting-name",
8278 level: 3
8279 }, meeting === null || meeting === void 0 ? void 0 : meeting.name), /*#__PURE__*/React.createElement(MeetingDetails_Text, {
8280 className: "tt-meeting-description tt-mb-30",
8281 type: "secondary"
8282 }, meeting === null || meeting === void 0 ? void 0 : meeting.description), /*#__PURE__*/React.createElement(SidebarInfo, null));
8283 }
8284 /* harmony default export */ const bookings_MeetingDetails = (MeetingDetails);
8285 ;// CONCATENATED MODULE: ./assets/src/admin/services/generalSettings.js
8286 function generalSettings_typeof(obj) { "@babel/helpers - typeof"; return generalSettings_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, generalSettings_typeof(obj); }
8287 function generalSettings_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ generalSettings_regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == generalSettings_typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
8288 function generalSettings_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
8289 function generalSettings_asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { generalSettings_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { generalSettings_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
8290
8291
8292 var generalSettings = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
8293 var _ref = generalSettings_asyncToGenerator( /*#__PURE__*/generalSettings_regeneratorRuntime().mark(function _callee(config) {
8294 return generalSettings_regeneratorRuntime().wrap(function _callee$(_context) {
8295 while (1) {
8296 switch (_context.prev = _context.next) {
8297 case 0:
8298 return _context.abrupt("return", request(apiEndpoint.settings.settings, config));
8299 case 1:
8300 case "end":
8301 return _context.stop();
8302 }
8303 }
8304 }, _callee);
8305 }));
8306 return function generalSettings(_x) {
8307 return _ref.apply(this, arguments);
8308 };
8309 }()));
8310 var paymentOptions = /*#__PURE__*/function () {
8311 var _ref2 = generalSettings_asyncToGenerator( /*#__PURE__*/generalSettings_regeneratorRuntime().mark(function _callee2(config) {
8312 return generalSettings_regeneratorRuntime().wrap(function _callee2$(_context2) {
8313 while (1) {
8314 switch (_context2.prev = _context2.next) {
8315 case 0:
8316 return _context2.abrupt("return", requestConfig_request(apiEndPoints_apiEndpoint.bookings.paymentOptions, config));
8317 case 1:
8318 case "end":
8319 return _context2.stop();
8320 }
8321 }
8322 }, _callee2);
8323 }));
8324 return function paymentOptions(_x2) {
8325 return _ref2.apply(this, arguments);
8326 };
8327 }();
8328
8329 ;// CONCATENATED MODULE: ./assets/src/frontend/pages/bookings/BookingSchedule.js
8330 function BookingSchedule_typeof(obj) { "@babel/helpers - typeof"; return BookingSchedule_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, BookingSchedule_typeof(obj); }
8331 function BookingSchedule_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ BookingSchedule_regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == BookingSchedule_typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
8332 function BookingSchedule_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
8333 function BookingSchedule_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? BookingSchedule_ownKeys(Object(source), !0).forEach(function (key) { BookingSchedule_defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : BookingSchedule_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8334 function BookingSchedule_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8335 function BookingSchedule_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
8336 function BookingSchedule_asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { BookingSchedule_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { BookingSchedule_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
8337 function BookingSchedule_slicedToArray(arr, i) { return BookingSchedule_arrayWithHoles(arr) || BookingSchedule_iterableToArrayLimit(arr, i) || BookingSchedule_unsupportedIterableToArray(arr, i) || BookingSchedule_nonIterableRest(); }
8338 function BookingSchedule_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
8339 function BookingSchedule_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return BookingSchedule_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return BookingSchedule_arrayLikeToArray(o, minLen); }
8340 function BookingSchedule_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8341 function BookingSchedule_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
8342 function BookingSchedule_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354 var BookingSchedule_window$antd = window.antd,
8355 BookingSchedule_Row = BookingSchedule_window$antd.Row,
8356 BookingSchedule_Col = BookingSchedule_window$antd.Col;
8357 var BookingSchedule_useEffect = window.React.useEffect;
8358 var BookingSchedule_ = wp.i18n.__;
8359 function BookingSchedule() {
8360 var _useStateValue = provider_useStateValue(),
8361 _useStateValue2 = BookingSchedule_slicedToArray(_useStateValue, 2),
8362 meetingReducer = _useStateValue2[0].meeting,
8363 dispatch = _useStateValue2[1];
8364 var dataControls = meetingReducer.dataControls,
8365 loading = meetingReducer.loading,
8366 meeting = meetingReducer.meeting,
8367 selectedStaff = meetingReducer.selectedStaff;
8368
8369 /**
8370 * Handler to get single meeting data and set it to the context.
8371 * @param {*} param0 Object of data controls.
8372 * @returns false is dataControls is not set.
8373 */
8374 var getSingleMeetingData = /*#__PURE__*/function () {
8375 var _ref2 = BookingSchedule_asyncToGenerator( /*#__PURE__*/BookingSchedule_regeneratorRuntime().mark(function _callee(_ref) {
8376 var _meeting, _meeting3, _meeting4;
8377 var dataControls, _yield$getSingleMeeti, data, _yield$paymentOptions, _paymentOptions, meeting, _schedules, unavailableDays, unavailableDayNumber;
8378 return BookingSchedule_regeneratorRuntime().wrap(function _callee$(_context) {
8379 while (1) {
8380 switch (_context.prev = _context.next) {
8381 case 0:
8382 dataControls = _ref.dataControls;
8383 if (dataControls !== null && dataControls !== void 0 && dataControls.id) {
8384 _context.next = 4;
8385 break;
8386 }
8387 dispatch({
8388 type: actions_actions.SET_LOADING,
8389 payload: false
8390 });
8391 return _context.abrupt("return", false);
8392 case 4:
8393 _context.next = 6;
8394 return getSingleMeeting({
8395 method: "GET"
8396 }, dataControls === null || dataControls === void 0 ? void 0 : dataControls.id);
8397 case 6:
8398 _yield$getSingleMeeti = _context.sent;
8399 data = _yield$getSingleMeeti.data;
8400 _context.next = 10;
8401 return paymentOptions({
8402 method: "GET"
8403 });
8404 case 10:
8405 _yield$paymentOptions = _context.sent;
8406 _paymentOptions = _yield$paymentOptions.data;
8407 meeting = data === null || data === void 0 ? void 0 : data.data;
8408 _schedules = {};
8409 Object.keys((_meeting = meeting) === null || _meeting === void 0 ? void 0 : _meeting.schedule).map(function (item) {
8410 var _meeting2;
8411 _schedules[item] = availabilityModel_convertSchedulesForUi((_meeting2 = meeting) === null || _meeting2 === void 0 ? void 0 : _meeting2.schedule[item]);
8412 });
8413 meeting = BookingSchedule_objectSpread(BookingSchedule_objectSpread({}, meeting), {}, {
8414 schedule: _schedules
8415 });
8416 unavailableDays = getDaysThatNotAvailable(_schedules[selectedStaff ? selectedStaff.id : (_meeting3 = meeting) === null || _meeting3 === void 0 ? void 0 : _meeting3.staff[0].id]);
8417 unavailableDayNumber = getDayNumber({
8418 days: unavailableDays
8419 });
8420 dispatch({
8421 type: actions_actions.SET_SINGLE_MEETING_DATA,
8422 payload: {
8423 meeting: meeting,
8424 selectedStaff: selectedStaff ? selectedStaff : (_meeting4 = meeting) === null || _meeting4 === void 0 ? void 0 : _meeting4.staff[0],
8425 unavailableDayNumber: unavailableDayNumber,
8426 unavailableDays: unavailableDays,
8427 loading: false,
8428 paymentOptions: _paymentOptions === null || _paymentOptions === void 0 ? void 0 : _paymentOptions.data
8429 }
8430 });
8431 case 19:
8432 case "end":
8433 return _context.stop();
8434 }
8435 }
8436 }, _callee);
8437 }));
8438 return function getSingleMeetingData(_x) {
8439 return _ref2.apply(this, arguments);
8440 };
8441 }();
8442 var getSlotsOfAMeeting = /*#__PURE__*/function () {
8443 var _ref4 = BookingSchedule_asyncToGenerator( /*#__PURE__*/BookingSchedule_regeneratorRuntime().mark(function _callee2(_ref3) {
8444 var dataControls, staffId, _ref3$startDate, startDate, _ref3$endDate, endDate, _yield$getSlots, data;
8445 return BookingSchedule_regeneratorRuntime().wrap(function _callee2$(_context2) {
8446 while (1) {
8447 switch (_context2.prev = _context2.next) {
8448 case 0:
8449 dataControls = _ref3.dataControls, staffId = _ref3.staffId, _ref3$startDate = _ref3.startDate, startDate = _ref3$startDate === void 0 ? new Date() : _ref3$startDate, _ref3$endDate = _ref3.endDate, endDate = _ref3$endDate === void 0 ? new Date() : _ref3$endDate;
8450 _context2.next = 3;
8451 return getSlots({
8452 method: "GET"
8453 }, {
8454 staffId: staffId,
8455 meetingId: dataControls === null || dataControls === void 0 ? void 0 : dataControls.id,
8456 startDate: dayjs_min_default()(startDate).format("YYYY-MM-DD"),
8457 endDate: dayjs_min_default()(endDate).format("YYYY-MM-DD")
8458 });
8459 case 3:
8460 _yield$getSlots = _context2.sent;
8461 data = _yield$getSlots.data;
8462 dispatch({
8463 type: actions_actions.SET_MEETING_SLOTS,
8464 payload: {
8465 slots: data === null || data === void 0 ? void 0 : data.data
8466 }
8467 });
8468 case 6:
8469 case "end":
8470 return _context2.stop();
8471 }
8472 }
8473 }, _callee2);
8474 }));
8475 return function getSlotsOfAMeeting(_x2) {
8476 return _ref4.apply(this, arguments);
8477 };
8478 }();
8479 BookingSchedule_useEffect(function () {
8480 dispatch({
8481 type: actions_actions.SET_LOADING,
8482 payload: true
8483 });
8484 getSingleMeetingData({
8485 dataControls: dataControls
8486 });
8487 return function () {
8488 dispatch({
8489 type: actions_actions.SET_LOADING,
8490 payload: false
8491 });
8492 };
8493 }, [dataControls]);
8494 BookingSchedule_useEffect(function () {
8495 if (dataControls !== null && dataControls !== void 0 && dataControls.id) {
8496 getSlotsOfAMeeting(BookingSchedule_objectSpread({
8497 dataControls: dataControls,
8498 staffId: selectedStaff === null || selectedStaff === void 0 ? void 0 : selectedStaff.id
8499 }, getDateRangeOfStartDateAndEndOfTheMonth(new Date())));
8500 }
8501 }, [selectedStaff]);
8502 if (!dataControls || loading) {
8503 return /*#__PURE__*/React.createElement(common_Spinner, {
8504 tip: BookingSchedule_("Loading...", "timetics"),
8505 msg: BookingSchedule_("Please Wait.", "timetics"),
8506 desc: BookingSchedule_("Loader will vanish after the page load.", "timetics"),
8507 type: "info",
8508 size: "large",
8509 wrapperClassName: "tt-spinner-wrapper"
8510 });
8511 }
8512 return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(bookings_Header, {
8513 stepTitle: "Step 1",
8514 componentTitle: BookingSchedule_("Choose a time that works for you.", "timetics")
8515 }), /*#__PURE__*/React.createElement(BookingSchedule_Row, {
8516 gutter: [24, 24]
8517 }, /*#__PURE__*/React.createElement(BookingSchedule_Col, {
8518 xs: 24,
8519 sm: 24,
8520 md: 8
8521 }, /*#__PURE__*/React.createElement(bookings_MeetingDetails, null)), /*#__PURE__*/React.createElement(BookingSchedule_Col, {
8522 xs: 24,
8523 sm: 24,
8524 md: 16
8525 }, /*#__PURE__*/React.createElement(bookings_BookingDate, null))));
8526 }
8527 /* harmony default export */ const bookings_BookingSchedule = (BookingSchedule);
8528 ;// CONCATENATED MODULE: ./assets/src/frontend/pages/bookings/SeatMap.js
8529 function SeatMap_toConsumableArray(arr) { return SeatMap_arrayWithoutHoles(arr) || SeatMap_iterableToArray(arr) || SeatMap_unsupportedIterableToArray(arr) || SeatMap_nonIterableSpread(); }
8530 function SeatMap_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
8531 function SeatMap_iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
8532 function SeatMap_arrayWithoutHoles(arr) { if (Array.isArray(arr)) return SeatMap_arrayLikeToArray(arr); }
8533 function SeatMap_slicedToArray(arr, i) { return SeatMap_arrayWithHoles(arr) || SeatMap_iterableToArrayLimit(arr, i) || SeatMap_unsupportedIterableToArray(arr, i) || SeatMap_nonIterableRest(); }
8534 function SeatMap_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
8535 function SeatMap_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return SeatMap_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return SeatMap_arrayLikeToArray(o, minLen); }
8536 function SeatMap_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8537 function SeatMap_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
8538 function SeatMap_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8539
8540
8541
8542
8543 var SeatMap_ = wp.i18n.__;
8544 var SeatMap_window$antd = window.antd,
8545 SeatMap_Row = SeatMap_window$antd.Row,
8546 SeatMap_Col = SeatMap_window$antd.Col,
8547 SeatMap_Typography = SeatMap_window$antd.Typography,
8548 SeatMap_Space = SeatMap_window$antd.Space,
8549 SeatMap_Button = SeatMap_window$antd.Button;
8550 var SeatMap_Title = SeatMap_Typography.Title,
8551 SeatMap_Text = SeatMap_Typography.Text;
8552 function SeatMap() {
8553 var _wp, _wp$hooks;
8554 var _useStateValue = provider_useStateValue(),
8555 _useStateValue2 = SeatMap_slicedToArray(_useStateValue, 2),
8556 meetingRedcuer = _useStateValue2[0].meeting,
8557 dispatch = _useStateValue2[1];
8558 var meeting = meetingRedcuer.meeting,
8559 currentSlot = meetingRedcuer.currentSlot,
8560 _meetingRedcuer$selec = meetingRedcuer.selectedSeats,
8561 selectedSeats = _meetingRedcuer$selec === void 0 ? [] : _meetingRedcuer$selec,
8562 _meetingRedcuer$selec2 = meetingRedcuer.selectedSeat,
8563 selectedSeat = _meetingRedcuer$selec2 === void 0 ? [] : _meetingRedcuer$selec2;
8564 var onSelectHandler = function onSelectHandler(data) {
8565 var _selectedSeat = "".concat(data === null || data === void 0 ? void 0 : data.ticketType, " - ").concat(data === null || data === void 0 ? void 0 : data.number);
8566 dispatch({
8567 type: actions_actions.SET_STATE,
8568 payload: {
8569 selectedSeats: [].concat(SeatMap_toConsumableArray(selectedSeats), [data]),
8570 selectedSeat: [].concat(SeatMap_toConsumableArray(selectedSeat), [_selectedSeat])
8571 }
8572 });
8573 };
8574 var onUnselectHandler = function onUnselectHandler(data) {
8575 var _selectedSeat = "".concat(data === null || data === void 0 ? void 0 : data.ticketType, " - ").concat(data === null || data === void 0 ? void 0 : data.number);
8576 dispatch({
8577 type: actions_actions.SET_STATE,
8578 payload: {
8579 selectedSeats: selectedSeats.filter(function (seat) {
8580 return (seat === null || seat === void 0 ? void 0 : seat.id) !== (data === null || data === void 0 ? void 0 : data.id);
8581 }),
8582 selectedSeat: selectedSeat.filter(function (seat) {
8583 return seat !== _selectedSeat;
8584 })
8585 }
8586 });
8587 };
8588 return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SeatMap_Row, {
8589 gutter: [24, 24]
8590 }, /*#__PURE__*/React.createElement(SeatMap_Col, {
8591 sm: 24,
8592 md: 8,
8593 lg: 6
8594 }, /*#__PURE__*/React.createElement("div", {
8595 className: "tt-form-left-sidebar"
8596 }, /*#__PURE__*/React.createElement(SeatMap_Title, {
8597 className: "tt-meeting-name",
8598 level: 3
8599 }, meeting === null || meeting === void 0 ? void 0 : meeting.name), /*#__PURE__*/React.createElement(SeatMap_Text, {
8600 className: "tt-meeting-description tt-mb-30",
8601 type: "secondary"
8602 }, meeting === null || meeting === void 0 ? void 0 : meeting.description), /*#__PURE__*/React.createElement(SidebarInfo, null))), /*#__PURE__*/React.createElement(SeatMap_Col, {
8603 sm: 24,
8604 md: 16,
8605 lg: 18
8606 }, /*#__PURE__*/React.createElement("div", {
8607 className: "tt-seat-map-area"
8608 }, (_wp = wp) === null || _wp === void 0 ? void 0 : (_wp$hooks = _wp.hooks) === null || _wp$hooks === void 0 ? void 0 : _wp$hooks.applyFilters("seatMap", meeting === null || meeting === void 0 ? void 0 : meeting.seat_plan, // an array of individual seat data
8609 meeting === null || meeting === void 0 ? void 0 : meeting.seat_plan_settings,
8610 // object regarding the canvas settings
8611 currentSlot,
8612 // an array of number id
8613 onSelectHandler, onUnselectHandler)), /*#__PURE__*/React.createElement(SeatMap_Row, {
8614 align: "end",
8615 className: "tt-mt-10"
8616 }, /*#__PURE__*/React.createElement(SeatMap_Space, null, /*#__PURE__*/React.createElement(SeatMap_Button, {
8617 size: "large",
8618 type: "primary",
8619 htmlType: "button",
8620 ghost: true,
8621 onClick: function onClick() {
8622 dispatch({
8623 type: actions_actions.SET_STATE,
8624 payload: {
8625 step: 1,
8626 selectedSeats: [],
8627 selectedSeat: []
8628 }
8629 });
8630 }
8631 }, SeatMap_("Go back", "timetics-pro")), /*#__PURE__*/React.createElement(SeatMap_Button, {
8632 size: "large",
8633 type: "primary",
8634 htmlType: "button",
8635 disabled: (selectedSeats === null || selectedSeats === void 0 ? void 0 : selectedSeats.length) === 0,
8636 onClick: function onClick(e) {
8637 e.preventDefault();
8638 if ((selectedSeats === null || selectedSeats === void 0 ? void 0 : selectedSeats.length) === 0) return;
8639 dispatch({
8640 type: actions_actions.SET_STATE,
8641 payload: {
8642 step: 3
8643 // bookingSeat:
8644 }
8645 });
8646 }
8647 }, SeatMap_("Next", "timetics-pro")))))));
8648 }
8649 /* harmony default export */ const bookings_SeatMap = (SeatMap);
8650 ;// CONCATENATED MODULE: ./assets/src/frontend/frontendSteps/FrontendSteps.js
8651 function FrontendSteps_slicedToArray(arr, i) { return FrontendSteps_arrayWithHoles(arr) || FrontendSteps_iterableToArrayLimit(arr, i) || FrontendSteps_unsupportedIterableToArray(arr, i) || FrontendSteps_nonIterableRest(); }
8652 function FrontendSteps_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
8653 function FrontendSteps_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return FrontendSteps_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return FrontendSteps_arrayLikeToArray(o, minLen); }
8654 function FrontendSteps_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8655 function FrontendSteps_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
8656 function FrontendSteps_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8657
8658
8659
8660
8661
8662 var FrontendSteps_window$antd = window.antd,
8663 FrontendSteps_Button = FrontendSteps_window$antd.Button,
8664 message = FrontendSteps_window$antd.message,
8665 Steps = FrontendSteps_window$antd.Steps;
8666 var FrontendSteps_useState = window.React.useState;
8667 var FrontendSteps = function FrontendSteps() {
8668 var _useStateValue = provider_useStateValue(),
8669 _useStateValue2 = FrontendSteps_slicedToArray(_useStateValue, 2),
8670 meetingReducer = _useStateValue2[0].meeting,
8671 dispatch = _useStateValue2[1];
8672 var meeting = meetingReducer.meeting,
8673 step = meetingReducer.step;
8674 var _useState = FrontendSteps_useState(0),
8675 _useState2 = FrontendSteps_slicedToArray(_useState, 2),
8676 current = _useState2[0],
8677 setCurrent = _useState2[1];
8678 var next = function next() {
8679 setCurrent(current + 1);
8680 };
8681 var prev = function prev() {
8682 setCurrent(current - 1);
8683 };
8684 var steps = [{
8685 title: "1",
8686 content: /*#__PURE__*/React.createElement(bookings_BookingSchedule, null)
8687 }, {
8688 title: "2",
8689 content: /*#__PURE__*/React.createElement(bookings_ContactInfo, null)
8690 }, {
8691 title: "3",
8692 content: /*#__PURE__*/React.createElement(bookings_PaymentForm, null)
8693 }];
8694 var steps2 = [{
8695 title: "1",
8696 content: /*#__PURE__*/React.createElement(bookings_BookingSchedule, null)
8697 }, {
8698 title: "2",
8699 content: /*#__PURE__*/React.createElement(bookings_SeatMap, null)
8700 }, {
8701 title: "3",
8702 content: /*#__PURE__*/React.createElement(bookings_ContactInfo, null)
8703 }, {
8704 title: "4",
8705 content: /*#__PURE__*/React.createElement(bookings_PaymentForm, null)
8706 }];
8707 var items = steps.map(function (item) {
8708 return {
8709 key: item.title,
8710 title: item.title
8711 };
8712 });
8713 return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, (meeting === null || meeting === void 0 ? void 0 : meeting.type) == "seat" ? steps2[step - 1].content : steps[step - 1].content));
8714 };
8715 /* harmony default export */ const frontendSteps_FrontendSteps = (FrontendSteps);
8716 ;// CONCATENATED MODULE: ./assets/src/frontend/pages/bookings/index.js
8717 function bookings_slicedToArray(arr, i) { return bookings_arrayWithHoles(arr) || bookings_iterableToArrayLimit(arr, i) || bookings_unsupportedIterableToArray(arr, i) || bookings_nonIterableRest(); }
8718 function bookings_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
8719 function bookings_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return bookings_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return bookings_arrayLikeToArray(o, minLen); }
8720 function bookings_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8721 function bookings_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
8722 function bookings_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8723
8724
8725
8726
8727
8728 function Bookings() {
8729 var _useStateValue = provider_useStateValue(),
8730 _useStateValue2 = bookings_slicedToArray(_useStateValue, 2),
8731 meetingReducer = _useStateValue2[0].meeting,
8732 dispatch = _useStateValue2[1];
8733 var step = meetingReducer.step;
8734 return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(frontendSteps_FrontendSteps, null));
8735 }
8736 /* harmony default export */ const bookings = (Bookings);
8737 ;// CONCATENATED MODULE: ./assets/src/frontend/pages/bookings/BookingResult.js
8738 function BookingResult_slicedToArray(arr, i) { return BookingResult_arrayWithHoles(arr) || BookingResult_iterableToArrayLimit(arr, i) || BookingResult_unsupportedIterableToArray(arr, i) || BookingResult_nonIterableRest(); }
8739 function BookingResult_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
8740 function BookingResult_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return BookingResult_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return BookingResult_arrayLikeToArray(o, minLen); }
8741 function BookingResult_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8742 function BookingResult_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
8743 function BookingResult_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8744 var BookingResult_window$antd = window.antd,
8745 BookingResult_Button = BookingResult_window$antd.Button,
8746 Result = BookingResult_window$antd.Result,
8747 BookingResult_Typography = BookingResult_window$antd.Typography,
8748 Divider = BookingResult_window$antd.Divider,
8749 BookingResult_Space = BookingResult_window$antd.Space;
8750 var BookingResult_Text = BookingResult_Typography.Text,
8751 Link = BookingResult_Typography.Link;
8752
8753
8754
8755 var BookingResult_ = wp.i18n.__;
8756 function BookingResult(_ref) {
8757 var status = _ref.status,
8758 title = _ref.title,
8759 subTitle = _ref.subTitle,
8760 extra = _ref.extra;
8761 var _useStateValue = provider_useStateValue(),
8762 _useStateValue2 = BookingResult_slicedToArray(_useStateValue, 2),
8763 meetingReducer = _useStateValue2[0].meeting,
8764 dispatch = _useStateValue2[1];
8765 var meeting = meetingReducer.meeting,
8766 selectedDate = meetingReducer.selectedDate,
8767 bookingTime = meetingReducer.bookingTime,
8768 selectedDay = meetingReducer.selectedDay,
8769 contactInfo = meetingReducer.contactInfo,
8770 selectedStaff = meetingReducer.selectedStaff;
8771 //TODO need to make error page for booking error
8772 return /*#__PURE__*/React.createElement("div", {
8773 className: "tt-meeting-booking-result-wrapper"
8774 }, /*#__PURE__*/React.createElement(Result, {
8775 status: status,
8776 title: title,
8777 subTitle: subTitle,
8778 extra: extra
8779 }));
8780 }
8781 // EXTERNAL MODULE: external "React"
8782 var external_React_ = __webpack_require__(363);
8783 ;// CONCATENATED MODULE: ./assets/src/frontend/pages/bookings/CancelBooking.js
8784 function CancelBooking_slicedToArray(arr, i) { return CancelBooking_arrayWithHoles(arr) || CancelBooking_iterableToArrayLimit(arr, i) || CancelBooking_unsupportedIterableToArray(arr, i) || CancelBooking_nonIterableRest(); }
8785 function CancelBooking_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
8786 function CancelBooking_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return CancelBooking_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return CancelBooking_arrayLikeToArray(o, minLen); }
8787 function CancelBooking_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8788 function CancelBooking_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
8789 function CancelBooking_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8790 var CancelBooking_window$antd = window.antd,
8791 CancelBooking_Button = CancelBooking_window$antd.Button,
8792 CancelBooking_Result = CancelBooking_window$antd.Result,
8793 CancelBooking_Typography = CancelBooking_window$antd.Typography,
8794 CancelBooking_Divider = CancelBooking_window$antd.Divider,
8795 CancelBooking_Space = CancelBooking_window$antd.Space;
8796 var CancelBooking_Text = CancelBooking_Typography.Text,
8797 CancelBooking_Link = CancelBooking_Typography.Link;
8798
8799
8800 var CancelBooking_ = wp.i18n.__;
8801
8802 function CancelBooking() {
8803 var _useStateValue = useStateValue(),
8804 _useStateValue2 = CancelBooking_slicedToArray(_useStateValue, 2),
8805 meetingReducer = _useStateValue2[0].meeting,
8806 dispatch = _useStateValue2[1];
8807 return /*#__PURE__*/React.createElement("div", {
8808 className: "tt-meeting-booking-success-wrapper"
8809 }, /*#__PURE__*/React.createElement(CancelBooking_Result, {
8810 status: "info",
8811 title: CancelBooking_("Your booking schedule is canceled", "timetics"),
8812 subTitle: CancelBooking_("Your booking schedule is canceled, please schedule book aging.", "timetics"),
8813 extra: /*#__PURE__*/React.createElement("div", {
8814 className: "tt-booking-schedule-cancel"
8815 }, /*#__PURE__*/React.createElement(CancelBooking_Button, {
8816 className: "tt-mb-30",
8817 size: "large",
8818 onClick: function onClick() {
8819 dispatch({
8820 type: actions.CLEAR_BOOKING_RELATED_DATA,
8821 payload: {}
8822 });
8823 }
8824 }, CancelBooking_("Book again", "timetics")))
8825 }));
8826 }
8827 /* harmony default export */ const bookings_CancelBooking = ((/* unused pure expression or super */ null && (CancelBooking)));
8828 ;// CONCATENATED MODULE: ./assets/src/frontend/pages/bookings/BookingSuccess.js
8829 function BookingSuccess_typeof(obj) { "@babel/helpers - typeof"; return BookingSuccess_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, BookingSuccess_typeof(obj); }
8830 function BookingSuccess_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ BookingSuccess_regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == BookingSuccess_typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
8831 function BookingSuccess_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
8832 function BookingSuccess_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? BookingSuccess_ownKeys(Object(source), !0).forEach(function (key) { BookingSuccess_defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : BookingSuccess_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8833 function BookingSuccess_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8834 function BookingSuccess_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
8835 function BookingSuccess_asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { BookingSuccess_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { BookingSuccess_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
8836 function BookingSuccess_slicedToArray(arr, i) { return BookingSuccess_arrayWithHoles(arr) || BookingSuccess_iterableToArrayLimit(arr, i) || BookingSuccess_unsupportedIterableToArray(arr, i) || BookingSuccess_nonIterableRest(); }
8837 function BookingSuccess_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
8838 function BookingSuccess_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return BookingSuccess_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return BookingSuccess_arrayLikeToArray(o, minLen); }
8839 function BookingSuccess_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8840 function BookingSuccess_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
8841 function BookingSuccess_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8842 var BookingSuccess_window$antd = window.antd,
8843 BookingSuccess_Button = BookingSuccess_window$antd.Button,
8844 BookingSuccess_Result = BookingSuccess_window$antd.Result,
8845 BookingSuccess_Typography = BookingSuccess_window$antd.Typography,
8846 BookingSuccess_Divider = BookingSuccess_window$antd.Divider,
8847 BookingSuccess_Space = BookingSuccess_window$antd.Space;
8848 var BookingSuccess_Text = BookingSuccess_Typography.Text,
8849 BookingSuccess_Link = BookingSuccess_Typography.Link;
8850
8851
8852
8853
8854
8855 var BookingSuccess_ = wp.i18n.__;
8856
8857
8858 function BookingSuccess() {
8859 var _window, _window$timetics, _window2, _window2$timetics;
8860 var _useStateValue = provider_useStateValue(),
8861 _useStateValue2 = BookingSuccess_slicedToArray(_useStateValue, 2),
8862 meetingReducer = _useStateValue2[0].meeting,
8863 dispatch = _useStateValue2[1];
8864 var meeting = meetingReducer.meeting,
8865 selectedDate = meetingReducer.selectedDate,
8866 bookingTime = meetingReducer.bookingTime,
8867 selectedDay = meetingReducer.selectedDay,
8868 contactInfo = meetingReducer.contactInfo,
8869 selectedStaff = meetingReducer.selectedStaff,
8870 response = meetingReducer.response,
8871 payment_method = meetingReducer.payment_method;
8872 var bookingStatusUpdate = /*#__PURE__*/function () {
8873 var _ref = BookingSuccess_asyncToGenerator( /*#__PURE__*/BookingSuccess_regeneratorRuntime().mark(function _callee(bookingData) {
8874 var _bookingData$appointm, _res$data, _res$data$data;
8875 var bookingId, _bookingData$customer, email, first_name, full_name, res;
8876 return BookingSuccess_regeneratorRuntime().wrap(function _callee$(_context) {
8877 while (1) {
8878 switch (_context.prev = _context.next) {
8879 case 0:
8880 bookingId = bookingData === null || bookingData === void 0 ? void 0 : bookingData.id;
8881 _bookingData$customer = bookingData === null || bookingData === void 0 ? void 0 : bookingData.customer, email = _bookingData$customer.email, first_name = _bookingData$customer.first_name, full_name = _bookingData$customer.full_name;
8882 _context.next = 4;
8883 return bookings_updateBooking({
8884 method: "PUT",
8885 data: BookingSuccess_objectSpread(BookingSuccess_objectSpread({}, bookingData), {}, {
8886 appointment: bookingData === null || bookingData === void 0 ? void 0 : (_bookingData$appointm = bookingData.appointment) === null || _bookingData$appointm === void 0 ? void 0 : _bookingData$appointm.id,
8887 email: email,
8888 first_name: first_name,
8889 full_name: full_name,
8890 status: "cancel",
8891 payment_method: payment_method !== null && payment_method !== void 0 ? payment_method : "cash"
8892 }),
8893 params: {
8894 stopToast: true
8895 }
8896 }, bookingId);
8897 case 4:
8898 res = _context.sent;
8899 if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$data = _res$data.data) === null || _res$data$data === void 0 ? void 0 : _res$data$data.status) == "cancel") {
8900 dispatch({
8901 type: actions_actions.SET_STATE,
8902 payload: {
8903 paymentStatus: {
8904 status: "canceled"
8905 },
8906 step: 1
8907 }
8908 });
8909 }
8910 case 6:
8911 case "end":
8912 return _context.stop();
8913 }
8914 }
8915 }, _callee);
8916 }));
8917 return function bookingStatusUpdate(_x) {
8918 return _ref.apply(this, arguments);
8919 };
8920 }();
8921 return /*#__PURE__*/React.createElement("div", {
8922 className: "tt-meeting-booking-result-wrapper"
8923 }, /*#__PURE__*/React.createElement(BookingSuccess_Result, {
8924 status: "success",
8925 title: BookingSuccess_("This meeting is scheduled", "timetics"),
8926 subTitle: BookingSuccess_("We sent an email to you and the other attendees a calendar invitation with all the details.", "timetics"),
8927 extra: /*#__PURE__*/React.createElement("div", {
8928 className: "tt-meeting-booking-info-wrapper"
8929 }, /*#__PURE__*/React.createElement("div", {
8930 className: "tt-meeting-booking-info"
8931 }, /*#__PURE__*/React.createElement(BookingSuccess_Divider, null), /*#__PURE__*/React.createElement("div", {
8932 className: "tt-single-meeting-booking-info tt-mb-20"
8933 }, /*#__PURE__*/React.createElement("div", {
8934 className: "tt-meeting-booking-WQ"
8935 }, /*#__PURE__*/React.createElement(BookingSuccess_Text, null, " ", BookingSuccess_("What", "timetics"))), /*#__PURE__*/React.createElement("div", {
8936 className: "tt-meeting-booking-details"
8937 }, /*#__PURE__*/React.createElement(BookingSuccess_Text, null, meeting === null || meeting === void 0 ? void 0 : meeting.name))), /*#__PURE__*/React.createElement("div", {
8938 className: "tt-single-meeting-booking-info tt-mb-20"
8939 }, /*#__PURE__*/React.createElement("div", {
8940 className: "tt-meeting-booking-WQ"
8941 }, /*#__PURE__*/React.createElement(BookingSuccess_Text, null, " ", BookingSuccess_("When", "timetics"))), /*#__PURE__*/React.createElement("div", {
8942 className: "tt-meeting-booking-details"
8943 }, /*#__PURE__*/React.createElement(BookingSuccess_Text, null, convertWordpressDateFormatToDayjs({
8944 date: selectedDate,
8945 format: (_window = window) === null || _window === void 0 ? void 0 : (_window$timetics = _window.timetics) === null || _window$timetics === void 0 ? void 0 : _window$timetics.date_format
8946 }), " , ", " ", convertWordpressTimeFormatToDayjs({
8947 time: bookingTime,
8948 format: (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$timetics = _window2.timetics) === null || _window2$timetics === void 0 ? void 0 : _window2$timetics.time_format
8949 })))), /*#__PURE__*/React.createElement("div", {
8950 className: "tt-single-meeting-booking-info tt-mb-20"
8951 }, /*#__PURE__*/React.createElement("div", {
8952 className: "tt-meeting-booking-WQ"
8953 }, /*#__PURE__*/React.createElement(BookingSuccess_Text, null, " ", BookingSuccess_("With", "timetics"))), /*#__PURE__*/React.createElement("div", {
8954 className: "tt-meeting-booking-details"
8955 }, /*#__PURE__*/React.createElement(BookingSuccess_Text, {
8956 strong: true
8957 }, selectedStaff === null || selectedStaff === void 0 ? void 0 : selectedStaff.full_name))), /*#__PURE__*/React.createElement("div", {
8958 className: "tt-single-meeting-booking-info tt-mb-20"
8959 }, /*#__PURE__*/React.createElement("div", {
8960 className: "tt-meeting-booking-WQ"
8961 }, /*#__PURE__*/React.createElement(BookingSuccess_Text, null, " ", BookingSuccess_("Where", "timetics"))), /*#__PURE__*/React.createElement("div", {
8962 className: "tt-meeting-booking-details"
8963 }, (contactInfo === null || contactInfo === void 0 ? void 0 : contactInfo.location_type) == "google-meet" ? /*#__PURE__*/React.createElement(BookingSuccess_Space, {
8964 wrap: true,
8965 style: {
8966 lineHeight: "1"
8967 }
8968 }, /*#__PURE__*/React.createElement(GoogleMeet, null), BookingSuccess_("Google Meet", "timetics")) : (contactInfo === null || contactInfo === void 0 ? void 0 : contactInfo.location_type) == "phone-call" ? /*#__PURE__*/React.createElement(BookingSuccess_Space, {
8969 wrap: true
8970 }, /*#__PURE__*/React.createElement(Phone, null), contactInfo === null || contactInfo === void 0 ? void 0 : contactInfo.location) : /*#__PURE__*/React.createElement(BookingSuccess_Space, {
8971 wrap: true
8972 }, /*#__PURE__*/React.createElement(Location, null), contactInfo === null || contactInfo === void 0 ? void 0 : contactInfo.location))), /*#__PURE__*/React.createElement(BookingSuccess_Divider, null), /*#__PURE__*/React.createElement(BookingSuccess_Space, null, /*#__PURE__*/React.createElement(BookingSuccess_Button, {
8973 className: "tt-mb-30",
8974 size: "large",
8975 type: "primary",
8976 onClick: function onClick() {
8977 dispatch({
8978 type: actions_actions.CLEAR_BOOKING_RELATED_DATA,
8979 payload: {}
8980 });
8981 }
8982 }, BookingSuccess_("Book again", "timetics")), /*#__PURE__*/React.createElement(BookingSuccess_Button, {
8983 className: "tt-mb-30",
8984 size: "large",
8985 onClick: function onClick() {
8986 bookingStatusUpdate(response === null || response === void 0 ? void 0 : response.data);
8987 }
8988 }, BookingSuccess_("Cancel booking", "timetics")))))
8989 }));
8990 }
8991 /* harmony default export */ const bookings_BookingSuccess = (BookingSuccess);
8992 ;// CONCATENATED MODULE: ./assets/src/frontend/pages/bookings/BookingStatus.js
8993 function BookingStatus_slicedToArray(arr, i) { return BookingStatus_arrayWithHoles(arr) || BookingStatus_iterableToArrayLimit(arr, i) || BookingStatus_unsupportedIterableToArray(arr, i) || BookingStatus_nonIterableRest(); }
8994 function BookingStatus_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
8995 function BookingStatus_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return BookingStatus_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return BookingStatus_arrayLikeToArray(o, minLen); }
8996 function BookingStatus_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8997 function BookingStatus_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
8998 function BookingStatus_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8999 var BookingStatus_window$antd = window.antd,
9000 BookingStatus_Button = BookingStatus_window$antd.Button,
9001 BookingStatus_Result = BookingStatus_window$antd.Result,
9002 BookingStatus_Typography = BookingStatus_window$antd.Typography,
9003 BookingStatus_Divider = BookingStatus_window$antd.Divider,
9004 BookingStatus_Space = BookingStatus_window$antd.Space;
9005 var BookingStatus_Text = BookingStatus_Typography.Text,
9006 BookingStatus_Link = BookingStatus_Typography.Link;
9007
9008
9009
9010
9011
9012 var BookingStatus_useEffect = window.React.useEffect;
9013 var BookingStatus_ = wp.i18n.__;
9014 function BookingStatus() {
9015 var _useStateValue = provider_useStateValue(),
9016 _useStateValue2 = BookingStatus_slicedToArray(_useStateValue, 2),
9017 meetingReducer = _useStateValue2[0].meeting,
9018 dispatch = _useStateValue2[1];
9019 var paymentStatus = meetingReducer.paymentStatus,
9020 response = meetingReducer.response,
9021 meeting = meetingReducer.meeting,
9022 payment_method = meetingReducer.payment_method;
9023 BookingStatus_useEffect(function () {
9024 //TODO payment method should be dynamic, now it is hardcoded because we only support stripe and don't have any other payment method to select.
9025 if (!!(meeting !== null && meeting !== void 0 && meeting.price)) {
9026 var _response$data;
9027 var payload = {
9028 payment_method: payment_method !== null && payment_method !== void 0 ? payment_method : "cash",
9029 status: paymentStatus === null || paymentStatus === void 0 ? void 0 : paymentStatus.status,
9030 payment_details: paymentStatus
9031 };
9032 updateBookingPayment({
9033 id: response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.id,
9034 values: payload,
9035 stopToast: true
9036 });
9037 }
9038 return function () {};
9039 }, []);
9040 if ((paymentStatus === null || paymentStatus === void 0 ? void 0 : paymentStatus.status) == "canceled") {
9041 return /*#__PURE__*/React.createElement(BookingResult, {
9042 status: "info",
9043 title: BookingStatus_("Booking canceled.", "timetics"),
9044 subTitle: BookingStatus_("Booking was canceled.", "timetics"),
9045 extra: /*#__PURE__*/React.createElement("div", {
9046 className: "tt-booking-schedule-cancel"
9047 }, /*#__PURE__*/React.createElement(BookingStatus_Button, {
9048 className: "tt-mb-30",
9049 size: "large",
9050 onClick: function onClick() {
9051 dispatch({
9052 type: actions_actions.CLEAR_BOOKING_RELATED_DATA,
9053 payload: {}
9054 });
9055 }
9056 }, BookingStatus_("Book again", "timetics")))
9057 });
9058 }
9059 if ((paymentStatus === null || paymentStatus === void 0 ? void 0 : paymentStatus.status) == "succeeded") {
9060 return /*#__PURE__*/React.createElement(bookings_BookingSuccess, null);
9061 }
9062 return /*#__PURE__*/React.createElement(BookingResult, {
9063 status: "error",
9064 title: BookingStatus_("Couldn't schedule this booking", "timetics"),
9065 subTitle: BookingStatus_("Something went wrong, Please try again.", "timetics"),
9066 extra: /*#__PURE__*/React.createElement("div", {
9067 className: "tt-booking-schedule-cancel"
9068 }, /*#__PURE__*/React.createElement(BookingStatus_Button, {
9069 className: "tt-mb-30",
9070 size: "large",
9071 onClick: function onClick() {
9072 dispatch({
9073 type: actions_actions.CLEAR_BOOKING_RELATED_DATA,
9074 payload: {}
9075 });
9076 }
9077 }, BookingStatus_("Book again", "timetics")))
9078 });
9079 }
9080 /* harmony default export */ const bookings_BookingStatus = (BookingStatus);
9081 ;// CONCATENATED MODULE: ./assets/src/frontend/pages/BookingPage.js
9082 function BookingPage_slicedToArray(arr, i) { return BookingPage_arrayWithHoles(arr) || BookingPage_iterableToArrayLimit(arr, i) || BookingPage_unsupportedIterableToArray(arr, i) || BookingPage_nonIterableRest(); }
9083 function BookingPage_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9084 function BookingPage_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return BookingPage_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return BookingPage_arrayLikeToArray(o, minLen); }
9085 function BookingPage_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
9086 function BookingPage_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
9087 function BookingPage_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
9088
9089
9090
9091
9092
9093 var BookingPage_useEffect = window.React.useEffect;
9094 function BookingPage(_ref) {
9095 var dataControls = _ref.dataControls;
9096 var _useStateValue = provider_useStateValue(),
9097 _useStateValue2 = BookingPage_slicedToArray(_useStateValue, 2),
9098 meetingReducer = _useStateValue2[0].meeting,
9099 dispatch = _useStateValue2[1];
9100 var paymentStatus = meetingReducer.paymentStatus,
9101 response = meetingReducer.response;
9102 BookingPage_useEffect(function () {
9103 dispatch({
9104 type: actions_actions.SET_DATA_CONTROLS,
9105 payload: dataControls
9106 });
9107 return function () {};
9108 }, []);
9109
9110 // return <BookingError />;
9111
9112 return /*#__PURE__*/React.createElement(React.Fragment, null, paymentStatus !== null && paymentStatus !== void 0 && paymentStatus.status ? /*#__PURE__*/React.createElement(bookings_BookingStatus, null) : /*#__PURE__*/React.createElement(bookings, null));
9113 }
9114 /* harmony default export */ const pages_BookingPage = (BookingPage);
9115 ;// CONCATENATED MODULE: ./assets/src/frontend/app.js
9116
9117
9118
9119 var app_ = wp.i18n.__;
9120 var app_React = window.React;
9121 var Suspense = app_React.Suspense,
9122 app_useEffect = app_React.useEffect;
9123 function App(_ref) {
9124 var dataControls = _ref.dataControls;
9125 return /*#__PURE__*/app_React.createElement(provider, null, /*#__PURE__*/app_React.createElement(Suspense, {
9126 fallback: /*#__PURE__*/app_React.createElement(common_Spinner, {
9127 tip: app_("Loading...", "timetics"),
9128 msg: app_("Please Wait.", "timetics"),
9129 desc: app_("Loader will vanish after the page load.", "timetics"),
9130 type: "info",
9131 size: "large",
9132 wrapperClassName: "tt-spinner-wrapper"
9133 })
9134 }, /*#__PURE__*/app_React.createElement(pages_BookingPage, {
9135 dataControls: dataControls
9136 })));
9137 }
9138 ;// CONCATENATED MODULE: ./assets/src/frontend/bookingListModal.js
9139 function bookingListModal_slicedToArray(arr, i) { return bookingListModal_arrayWithHoles(arr) || bookingListModal_iterableToArrayLimit(arr, i) || bookingListModal_unsupportedIterableToArray(arr, i) || bookingListModal_nonIterableRest(); }
9140 function bookingListModal_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9141 function bookingListModal_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return bookingListModal_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return bookingListModal_arrayLikeToArray(o, minLen); }
9142 function bookingListModal_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
9143 function bookingListModal_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
9144 function bookingListModal_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
9145 var bookingListModal_React = window.React;
9146 var Modal = window.antd.Modal;
9147 var bookingListModal_useState = bookingListModal_React.useState,
9148 bookingListModal_useEffect = bookingListModal_React.useEffect;
9149
9150 function BookingListModal() {
9151 var _useState = bookingListModal_useState(false),
9152 _useState2 = bookingListModal_slicedToArray(_useState, 2),
9153 isModalOpen = _useState2[0],
9154 setIsModalOpen = _useState2[1];
9155 var _useState3 = bookingListModal_useState(""),
9156 _useState4 = bookingListModal_slicedToArray(_useState3, 2),
9157 id = _useState4[0],
9158 setId = _useState4[1];
9159 bookingListModal_useEffect(function () {
9160 document.addEventListener("getSelectedId", function (event) {
9161 setId(event.detail.id);
9162 setIsModalOpen(event.detail.modal);
9163 });
9164 }, []);
9165 var handleOk = function handleOk() {
9166 setIsModalOpen(false);
9167 };
9168 var handleCancel = function handleCancel() {
9169 setIsModalOpen(false);
9170 };
9171 return /*#__PURE__*/bookingListModal_React.createElement("div", null, /*#__PURE__*/bookingListModal_React.createElement(Modal, {
9172 open: isModalOpen,
9173 onOk: handleOk,
9174 onCancel: handleCancel,
9175 destroyOnClose: true,
9176 footer: null,
9177 maskClosable: false,
9178 width: 1000,
9179 wrapClassName: "tt-booking-list-modal"
9180 }, /*#__PURE__*/bookingListModal_React.createElement(App, {
9181 dataControls: {
9182 id: id
9183 }
9184 })));
9185 }
9186 ;// CONCATENATED MODULE: ./assets/src/frontend/index.js
9187 function frontend_slicedToArray(arr, i) { return frontend_arrayWithHoles(arr) || frontend_iterableToArrayLimit(arr, i) || frontend_unsupportedIterableToArray(arr, i) || frontend_nonIterableRest(); }
9188 function frontend_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9189 function frontend_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return frontend_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return frontend_arrayLikeToArray(o, minLen); }
9190 function frontend_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
9191 function frontend_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
9192 function frontend_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
9193 var frontend_React = window.React;
9194 var ReactDOM = window.ReactDOM;
9195
9196
9197 var init = function init($scope) {
9198 var _$scope$find = $scope.find(".timetics-single-booking-wrapper"),
9199 _$scope$find2 = frontend_slicedToArray(_$scope$find, 1),
9200 root = _$scope$find2[0];
9201 var _$scope$find3 = $scope.find(".timetics-booking-modal"),
9202 _$scope$find4 = frontend_slicedToArray(_$scope$find3, 1),
9203 modalRoot = _$scope$find4[0];
9204 var dataControls = root === null || root === void 0 ? void 0 : root.getAttribute("data-controls");
9205
9206 /**
9207 * Renders the main component
9208 */
9209
9210 if (root) {
9211 var rootEl = ReactDOM.createRoot(root);
9212 rootEl.render( /*#__PURE__*/frontend_React.createElement(App, {
9213 dataControls: JSON.parse(dataControls)
9214 }));
9215 }
9216
9217 /**
9218 * Renders booking list modal
9219 */
9220 if (modalRoot) {
9221 var modalEl = ReactDOM.createRoot(modalRoot);
9222 modalEl.render( /*#__PURE__*/frontend_React.createElement(BookingListModal, null));
9223 }
9224 };
9225 jQuery(window)
9226 // .on("elementor/frontend/init", () => {
9227 // let widgetsList = [
9228 // "etn-event-calendar",
9229 // ];
9230 // init(elementorFrontend.elements.$body);
9231
9232 // widgetsList.forEach((event) => {
9233 // elementorFrontend.hooks.addAction(
9234 // "frontend/element_ready/" + event + ".default",
9235 // init
9236 // );
9237 // });
9238 // })
9239
9240 /*
9241 * Load all the shortcodes elements here.
9242 */.on("load", function () {
9243 var shortcodeEls = document.querySelectorAll(".timetics-shortcode-wrapper");
9244 shortcodeEls.forEach(function (el) {
9245 init(jQuery(el));
9246 });
9247 });
9248 // EXTERNAL MODULE: ./assets/src/meetingListModal.js
9249 var meetingListModal = __webpack_require__(71);
9250 ;// CONCATENATED MODULE: ./assets/src/frontend.js
9251
9252
9253 })();
9254
9255 /******/ })()
9256 ;