@mirai/core 0.3.385 → 0.3.386

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/build/Core.constants.js +29 -9
  2. package/build/Core.constants.js.map +1 -1
  3. package/build/components/BannerLoyalty/BannerLoyalty.js +2 -1
  4. package/build/components/BannerLoyalty/BannerLoyalty.js.map +1 -1
  5. package/build/components/BannerLoyalty/BannerLoyalty.module.css +0 -5
  6. package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Modal.test.js.snap +4 -4
  7. package/build/components/BookingQuery/__tests__/__snapshots__/BookingQuery.test.js.snap +6 -6
  8. package/build/components/ButtonFinder/__tests__/__snapshots__/ButtonFinder.test.js.snap +5 -5
  9. package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Confirmation.test.js.snap +6 -6
  10. package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Form.test.js.snap +4 -4
  11. package/build/components/Session/Session.Login.js +1 -0
  12. package/build/components/Session/Session.Login.js.map +1 -1
  13. package/build/components/Session/__tests__/__snapshots__/Session.test.js.snap +9 -9
  14. package/build/components/__shared__/BookingTerms/__tests__/__snapshots__/BookingTerms.test.js.snap +4 -4
  15. package/build/components/__shared__/ButtonPayment/__tests__/__snapshots__/ButtonPayment.test.js.snap +4 -4
  16. package/build/components/__shared__/ButtonPayment/components/FormAddon/FormAddon.js +5 -4
  17. package/build/components/__shared__/ButtonPayment/components/FormAddon/FormAddon.js.map +1 -1
  18. package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.js +8 -7
  19. package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.js.map +1 -1
  20. package/build/components/__shared__/ButtonPayment/helpers/index.js +0 -11
  21. package/build/components/__shared__/ButtonPayment/helpers/index.js.map +1 -1
  22. package/build/components/__shared__/Field/__tests__/__snapshots__/Field.test.js.snap +46 -61
  23. package/build/components/helpers/constants.js +8 -1
  24. package/build/components/helpers/constants.js.map +1 -1
  25. package/build/contexts/EventManager/EventManager.constants.js.map +1 -0
  26. package/build/{components → contexts}/EventManager/EventManager.js +1 -1
  27. package/build/contexts/EventManager/EventManager.js.map +1 -0
  28. package/build/contexts/EventManager/index.js.map +1 -0
  29. package/build/contexts/PerfomanceManager/PerfomanceManager.events.js +57 -0
  30. package/build/contexts/PerfomanceManager/PerfomanceManager.events.js.map +1 -0
  31. package/build/contexts/PerfomanceManager/PerfomanceManager.js +84 -0
  32. package/build/contexts/PerfomanceManager/PerfomanceManager.js.map +1 -0
  33. package/build/contexts/PerfomanceManager/PerfomanceManager.scripts.js +111 -0
  34. package/build/contexts/PerfomanceManager/PerfomanceManager.scripts.js.map +1 -0
  35. package/build/contexts/PerfomanceManager/helpers/dataLayerPush.js +19 -0
  36. package/build/contexts/PerfomanceManager/helpers/dataLayerPush.js.map +1 -0
  37. package/build/contexts/PerfomanceManager/helpers/getPerfomanceLabel.js +16 -0
  38. package/build/contexts/PerfomanceManager/helpers/getPerfomanceLabel.js.map +1 -0
  39. package/build/contexts/PerfomanceManager/helpers/googleTagManager.js +23 -0
  40. package/build/contexts/PerfomanceManager/helpers/googleTagManager.js.map +1 -0
  41. package/build/contexts/PerfomanceManager/helpers/index.js +39 -0
  42. package/build/contexts/PerfomanceManager/helpers/index.js.map +1 -0
  43. package/build/contexts/PerfomanceManager/index.js +17 -0
  44. package/build/contexts/PerfomanceManager/index.js.map +1 -0
  45. package/build/contexts/PerfomanceManager/providers/affilired/bookingResponse.js +14 -0
  46. package/build/contexts/PerfomanceManager/providers/affilired/bookingResponse.js.map +1 -0
  47. package/build/contexts/PerfomanceManager/providers/affilired/index.js +11 -0
  48. package/build/contexts/PerfomanceManager/providers/affilired/index.js.map +1 -0
  49. package/build/contexts/PerfomanceManager/providers/analytics/bookingCancel.js +14 -0
  50. package/build/contexts/PerfomanceManager/providers/analytics/bookingCancel.js.map +1 -0
  51. package/build/contexts/PerfomanceManager/providers/analytics/bookingResponse.js +14 -0
  52. package/build/contexts/PerfomanceManager/providers/analytics/bookingResponse.js.map +1 -0
  53. package/build/contexts/PerfomanceManager/providers/analytics/checkoutForm.js +14 -0
  54. package/build/contexts/PerfomanceManager/providers/analytics/checkoutForm.js.map +1 -0
  55. package/build/contexts/PerfomanceManager/providers/analytics/checkoutResponse.js +14 -0
  56. package/build/contexts/PerfomanceManager/providers/analytics/checkoutResponse.js.map +1 -0
  57. package/build/contexts/PerfomanceManager/providers/analytics/finderReady.js +14 -0
  58. package/build/contexts/PerfomanceManager/providers/analytics/finderReady.js.map +1 -0
  59. package/build/contexts/PerfomanceManager/providers/analytics/index.js +25 -0
  60. package/build/contexts/PerfomanceManager/providers/analytics/index.js.map +1 -0
  61. package/build/contexts/PerfomanceManager/providers/analytics/login.js +14 -0
  62. package/build/contexts/PerfomanceManager/providers/analytics/login.js.map +1 -0
  63. package/build/contexts/PerfomanceManager/providers/analytics/ratesAddToCart.js +14 -0
  64. package/build/contexts/PerfomanceManager/providers/analytics/ratesAddToCart.js.map +1 -0
  65. package/build/contexts/PerfomanceManager/providers/analytics/ratesResponse.js +14 -0
  66. package/build/contexts/PerfomanceManager/providers/analytics/ratesResponse.js.map +1 -0
  67. package/build/contexts/PerfomanceManager/providers/bing/bookingResponse.js +14 -0
  68. package/build/contexts/PerfomanceManager/providers/bing/bookingResponse.js.map +1 -0
  69. package/build/contexts/PerfomanceManager/providers/bing/index.js +11 -0
  70. package/build/contexts/PerfomanceManager/providers/bing/index.js.map +1 -0
  71. package/build/contexts/PerfomanceManager/providers/facebook/bookingResponse.js +14 -0
  72. package/build/contexts/PerfomanceManager/providers/facebook/bookingResponse.js.map +1 -0
  73. package/build/contexts/PerfomanceManager/providers/facebook/checkoutResponse.js +14 -0
  74. package/build/contexts/PerfomanceManager/providers/facebook/checkoutResponse.js.map +1 -0
  75. package/build/contexts/PerfomanceManager/providers/facebook/index.js +17 -0
  76. package/build/contexts/PerfomanceManager/providers/facebook/index.js.map +1 -0
  77. package/build/contexts/PerfomanceManager/providers/facebook/ratesAddToCart.js +14 -0
  78. package/build/contexts/PerfomanceManager/providers/facebook/ratesAddToCart.js.map +1 -0
  79. package/build/contexts/PerfomanceManager/providers/facebook/ratesResponse.js +14 -0
  80. package/build/contexts/PerfomanceManager/providers/facebook/ratesResponse.js.map +1 -0
  81. package/build/contexts/PerfomanceManager/providers/googleAds/bookingResponse.js +14 -0
  82. package/build/contexts/PerfomanceManager/providers/googleAds/bookingResponse.js.map +1 -0
  83. package/build/contexts/PerfomanceManager/providers/googleAds/index.js +11 -0
  84. package/build/contexts/PerfomanceManager/providers/googleAds/index.js.map +1 -0
  85. package/build/contexts/PerfomanceManager/providers/gtm/bookingCancel.js +14 -0
  86. package/build/contexts/PerfomanceManager/providers/gtm/bookingCancel.js.map +1 -0
  87. package/build/contexts/PerfomanceManager/providers/gtm/bookingResponse.js +14 -0
  88. package/build/contexts/PerfomanceManager/providers/gtm/bookingResponse.js.map +1 -0
  89. package/build/contexts/PerfomanceManager/providers/gtm/checkoutResponse.js +14 -0
  90. package/build/contexts/PerfomanceManager/providers/gtm/checkoutResponse.js.map +1 -0
  91. package/build/contexts/PerfomanceManager/providers/gtm/finderReady.js +14 -0
  92. package/build/contexts/PerfomanceManager/providers/gtm/finderReady.js.map +1 -0
  93. package/build/contexts/PerfomanceManager/providers/gtm/index.js +19 -0
  94. package/build/contexts/PerfomanceManager/providers/gtm/index.js.map +1 -0
  95. package/build/contexts/PerfomanceManager/providers/gtm/ratesResponse.js +206 -0
  96. package/build/contexts/PerfomanceManager/providers/gtm/ratesResponse.js.map +1 -0
  97. package/build/contexts/PerfomanceManager/providers/index.js +83 -0
  98. package/build/contexts/PerfomanceManager/providers/index.js.map +1 -0
  99. package/build/contexts/PerfomanceManager/providers/mirai/bookingResponse.js +14 -0
  100. package/build/contexts/PerfomanceManager/providers/mirai/bookingResponse.js.map +1 -0
  101. package/build/contexts/PerfomanceManager/providers/mirai/checkoutResponse.js +14 -0
  102. package/build/contexts/PerfomanceManager/providers/mirai/checkoutResponse.js.map +1 -0
  103. package/build/contexts/PerfomanceManager/providers/mirai/finderReady.js +14 -0
  104. package/build/contexts/PerfomanceManager/providers/mirai/finderReady.js.map +1 -0
  105. package/build/contexts/PerfomanceManager/providers/mirai/index.js +17 -0
  106. package/build/contexts/PerfomanceManager/providers/mirai/index.js.map +1 -0
  107. package/build/contexts/PerfomanceManager/providers/mirai/ratesResponse.js +14 -0
  108. package/build/contexts/PerfomanceManager/providers/mirai/ratesResponse.js.map +1 -0
  109. package/build/contexts/index.js +28 -0
  110. package/build/contexts/index.js.map +1 -0
  111. package/build/helpers/consolidateStore.js +26 -3
  112. package/build/helpers/consolidateStore.js.map +1 -1
  113. package/build/helpers/index.js +11 -0
  114. package/build/helpers/index.js.map +1 -1
  115. package/build/helpers/loadScript.js +43 -0
  116. package/build/helpers/loadScript.js.map +1 -0
  117. package/build/index.js +21 -18
  118. package/build/index.js.map +1 -1
  119. package/package.json +1 -1
  120. package/public/App.Container.jsx +1 -1
  121. package/public/index.html +2 -30
  122. package/public/routes/Deals.jsx +1 -1
  123. package/public/routes/Home.constants.js +52 -0
  124. package/public/routes/Home.jsx +12 -14
  125. package/public/routes/Step1-Rates.jsx +2 -2
  126. package/public/routes/routes.module.css +5 -0
  127. package/public/themes/monalisa.theme.css +18 -18
  128. package/build/components/EventManager/EventManager.constants.js.map +0 -1
  129. package/build/components/EventManager/EventManager.js.map +0 -1
  130. package/build/components/EventManager/index.js.map +0 -1
  131. package/build/components/__shared__/ButtonPayment/helpers/loadScript.js +0 -27
  132. package/build/components/__shared__/ButtonPayment/helpers/loadScript.js.map +0 -1
  133. /package/build/{components → contexts}/EventManager/EventManager.constants.js +0 -0
  134. /package/build/{components → contexts}/EventManager/index.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["_bookingCancel","require","_bookingResponse","_checkoutForm","_checkoutResponse","_finderReady","_login","_ratesAddToCart","_ratesResponse","ProviderAnalytics","exports","bookingCancel","bookingResponse","checkoutForm","checkoutResponse","finderReady","login","ratesAddToCart","ratesResponse"],"sources":["../../../../../src/contexts/PerfomanceManager/providers/analytics/index.js"],"sourcesContent":["import { bookingCancel } from './bookingCancel';\nimport { bookingResponse } from './bookingResponse';\nimport { checkoutForm } from './checkoutForm';\nimport { checkoutResponse } from './checkoutResponse';\nimport { finderReady } from './finderReady';\nimport { login } from './login';\nimport { ratesAddToCart } from './ratesAddToCart';\nimport { ratesResponse } from './ratesResponse';\n\nexport const ProviderAnalytics = {\n bookingCancel,\n bookingResponse,\n checkoutForm,\n checkoutResponse,\n finderReady,\n login,\n ratesAddToCart,\n ratesResponse,\n};\n"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AACA,IAAAO,cAAA,GAAAP,OAAA;AAEO,MAAMQ,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG;EAC/BE,aAAa,EAAbA,4BAAa;EACbC,eAAe,EAAfA,gCAAe;EACfC,YAAY,EAAZA,0BAAY;EACZC,gBAAgB,EAAhBA,kCAAgB;EAChBC,WAAW,EAAXA,wBAAW;EACXC,KAAK,EAALA,YAAK;EACLC,cAAc,EAAdA,8BAAc;EACdC,aAAa,EAAbA;AACF,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.login = void 0;
7
+ const login = function () {
8
+ for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
9
+ props[_key] = arguments[_key];
10
+ }
11
+ console.info('analytics.login', ...props);
12
+ };
13
+ exports.login = login;
14
+ //# sourceMappingURL=login.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login.js","names":["login","_len","arguments","length","props","Array","_key","console","info","exports"],"sources":["../../../../../src/contexts/PerfomanceManager/providers/analytics/login.js"],"sourcesContent":["export const login = (...props) => {\n console.info('analytics.login', ...props);\n};\n"],"mappings":";;;;;;AAAO,MAAMA,KAAK,GAAG,SAAAA,CAAA,EAAc;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAVC,KAAK,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAALF,KAAK,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;EAAA;EAC5BC,OAAO,CAACC,IAAI,CAAC,iBAAiB,EAAE,GAAGJ,KAAK,CAAC;AAC3C,CAAC;AAACK,OAAA,CAAAT,KAAA,GAAAA,KAAA"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ratesAddToCart = void 0;
7
+ const ratesAddToCart = function () {
8
+ for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
9
+ props[_key] = arguments[_key];
10
+ }
11
+ console.info('analytics.ratesResponse', ...props);
12
+ };
13
+ exports.ratesAddToCart = ratesAddToCart;
14
+ //# sourceMappingURL=ratesAddToCart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ratesAddToCart.js","names":["ratesAddToCart","_len","arguments","length","props","Array","_key","console","info","exports"],"sources":["../../../../../src/contexts/PerfomanceManager/providers/analytics/ratesAddToCart.js"],"sourcesContent":["export const ratesAddToCart = (...props) => {\n console.info('analytics.ratesResponse', ...props);\n};\n"],"mappings":";;;;;;AAAO,MAAMA,cAAc,GAAG,SAAAA,CAAA,EAAc;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAVC,KAAK,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAALF,KAAK,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;EAAA;EACrCC,OAAO,CAACC,IAAI,CAAC,yBAAyB,EAAE,GAAGJ,KAAK,CAAC;AACnD,CAAC;AAACK,OAAA,CAAAT,cAAA,GAAAA,cAAA"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ratesResponse = void 0;
7
+ const ratesResponse = function () {
8
+ for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
9
+ props[_key] = arguments[_key];
10
+ }
11
+ console.info('analytics.ratesResponse', ...props);
12
+ };
13
+ exports.ratesResponse = ratesResponse;
14
+ //# sourceMappingURL=ratesResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ratesResponse.js","names":["ratesResponse","_len","arguments","length","props","Array","_key","console","info","exports"],"sources":["../../../../../src/contexts/PerfomanceManager/providers/analytics/ratesResponse.js"],"sourcesContent":["export const ratesResponse = (...props) => {\n console.info('analytics.ratesResponse', ...props);\n};\n"],"mappings":";;;;;;AAAO,MAAMA,aAAa,GAAG,SAAAA,CAAA,EAAc;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAVC,KAAK,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAALF,KAAK,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;EAAA;EACpCC,OAAO,CAACC,IAAI,CAAC,yBAAyB,EAAE,GAAGJ,KAAK,CAAC;AACnD,CAAC;AAACK,OAAA,CAAAT,aAAA,GAAAA,aAAA"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.bookingResponse = void 0;
7
+ const bookingResponse = function () {
8
+ for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
9
+ props[_key] = arguments[_key];
10
+ }
11
+ console.log('bing.bookingResponse', ...props);
12
+ };
13
+ exports.bookingResponse = bookingResponse;
14
+ //# sourceMappingURL=bookingResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookingResponse.js","names":["bookingResponse","_len","arguments","length","props","Array","_key","console","log","exports"],"sources":["../../../../../src/contexts/PerfomanceManager/providers/bing/bookingResponse.js"],"sourcesContent":["export const bookingResponse = (...props) => {\n console.log('bing.bookingResponse', ...props);\n};\n"],"mappings":";;;;;;AAAO,MAAMA,eAAe,GAAG,SAAAA,CAAA,EAAc;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAVC,KAAK,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAALF,KAAK,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;EAAA;EACtCC,OAAO,CAACC,GAAG,CAAC,sBAAsB,EAAE,GAAGJ,KAAK,CAAC;AAC/C,CAAC;AAACK,OAAA,CAAAT,eAAA,GAAAA,eAAA"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ProviderBing = void 0;
7
+ var _bookingResponse = require("./bookingResponse");
8
+ const ProviderBing = exports.ProviderBing = {
9
+ bookingResponse: _bookingResponse.bookingResponse
10
+ };
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["_bookingResponse","require","ProviderBing","exports","bookingResponse"],"sources":["../../../../../src/contexts/PerfomanceManager/providers/bing/index.js"],"sourcesContent":["import { bookingResponse } from './bookingResponse';\n\nexport const ProviderBing = {\n bookingResponse,\n};\n"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAEO,MAAMC,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG;EAC1BE,eAAe,EAAfA;AACF,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.bookingResponse = void 0;
7
+ const bookingResponse = function () {
8
+ for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
9
+ props[_key] = arguments[_key];
10
+ }
11
+ console.info('facebook.bookingResponse', ...props);
12
+ };
13
+ exports.bookingResponse = bookingResponse;
14
+ //# sourceMappingURL=bookingResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookingResponse.js","names":["bookingResponse","_len","arguments","length","props","Array","_key","console","info","exports"],"sources":["../../../../../src/contexts/PerfomanceManager/providers/facebook/bookingResponse.js"],"sourcesContent":["export const bookingResponse = (...props) => {\n console.info('facebook.bookingResponse', ...props);\n};\n"],"mappings":";;;;;;AAAO,MAAMA,eAAe,GAAG,SAAAA,CAAA,EAAc;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAVC,KAAK,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAALF,KAAK,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;EAAA;EACtCC,OAAO,CAACC,IAAI,CAAC,0BAA0B,EAAE,GAAGJ,KAAK,CAAC;AACpD,CAAC;AAACK,OAAA,CAAAT,eAAA,GAAAA,eAAA"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.checkoutResponse = void 0;
7
+ const checkoutResponse = function () {
8
+ for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
9
+ props[_key] = arguments[_key];
10
+ }
11
+ console.info('facebook.checkoutResponse', ...props);
12
+ };
13
+ exports.checkoutResponse = checkoutResponse;
14
+ //# sourceMappingURL=checkoutResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkoutResponse.js","names":["checkoutResponse","_len","arguments","length","props","Array","_key","console","info","exports"],"sources":["../../../../../src/contexts/PerfomanceManager/providers/facebook/checkoutResponse.js"],"sourcesContent":["export const checkoutResponse = (...props) => {\n console.info('facebook.checkoutResponse', ...props);\n};\n"],"mappings":";;;;;;AAAO,MAAMA,gBAAgB,GAAG,SAAAA,CAAA,EAAc;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAVC,KAAK,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAALF,KAAK,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;EAAA;EACvCC,OAAO,CAACC,IAAI,CAAC,2BAA2B,EAAE,GAAGJ,KAAK,CAAC;AACrD,CAAC;AAACK,OAAA,CAAAT,gBAAA,GAAAA,gBAAA"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ProviderFacebook = void 0;
7
+ var _bookingResponse = require("./bookingResponse");
8
+ var _checkoutResponse = require("./checkoutResponse");
9
+ var _ratesAddToCart = require("./ratesAddToCart");
10
+ var _ratesResponse = require("./ratesResponse");
11
+ const ProviderFacebook = exports.ProviderFacebook = {
12
+ bookingResponse: _bookingResponse.bookingResponse,
13
+ checkoutResponse: _checkoutResponse.checkoutResponse,
14
+ ratesAddToCart: _ratesAddToCart.ratesAddToCart,
15
+ ratesResponse: _ratesResponse.ratesResponse
16
+ };
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["_bookingResponse","require","_checkoutResponse","_ratesAddToCart","_ratesResponse","ProviderFacebook","exports","bookingResponse","checkoutResponse","ratesAddToCart","ratesResponse"],"sources":["../../../../../src/contexts/PerfomanceManager/providers/facebook/index.js"],"sourcesContent":["import { bookingResponse } from './bookingResponse';\nimport { checkoutResponse } from './checkoutResponse';\nimport { ratesAddToCart } from './ratesAddToCart';\nimport { ratesResponse } from './ratesResponse';\n\nexport const ProviderFacebook = {\n bookingResponse,\n checkoutResponse,\n ratesAddToCart,\n ratesResponse,\n};\n"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAEO,MAAMI,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG;EAC9BE,eAAe,EAAfA,gCAAe;EACfC,gBAAgB,EAAhBA,kCAAgB;EAChBC,cAAc,EAAdA,8BAAc;EACdC,aAAa,EAAbA;AACF,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ratesAddToCart = void 0;
7
+ const ratesAddToCart = function () {
8
+ for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
9
+ props[_key] = arguments[_key];
10
+ }
11
+ console.info('analytics.ratesResponse', ...props);
12
+ };
13
+ exports.ratesAddToCart = ratesAddToCart;
14
+ //# sourceMappingURL=ratesAddToCart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ratesAddToCart.js","names":["ratesAddToCart","_len","arguments","length","props","Array","_key","console","info","exports"],"sources":["../../../../../src/contexts/PerfomanceManager/providers/facebook/ratesAddToCart.js"],"sourcesContent":["export const ratesAddToCart = (...props) => {\n console.info('analytics.ratesResponse', ...props);\n};\n"],"mappings":";;;;;;AAAO,MAAMA,cAAc,GAAG,SAAAA,CAAA,EAAc;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAVC,KAAK,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAALF,KAAK,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;EAAA;EACrCC,OAAO,CAACC,IAAI,CAAC,yBAAyB,EAAE,GAAGJ,KAAK,CAAC;AACnD,CAAC;AAACK,OAAA,CAAAT,cAAA,GAAAA,cAAA"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ratesResponse = void 0;
7
+ const ratesResponse = function () {
8
+ for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
9
+ props[_key] = arguments[_key];
10
+ }
11
+ console.info('facebook.ratesResponse', ...props);
12
+ };
13
+ exports.ratesResponse = ratesResponse;
14
+ //# sourceMappingURL=ratesResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ratesResponse.js","names":["ratesResponse","_len","arguments","length","props","Array","_key","console","info","exports"],"sources":["../../../../../src/contexts/PerfomanceManager/providers/facebook/ratesResponse.js"],"sourcesContent":["export const ratesResponse = (...props) => {\n console.info('facebook.ratesResponse', ...props);\n};\n"],"mappings":";;;;;;AAAO,MAAMA,aAAa,GAAG,SAAAA,CAAA,EAAc;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAVC,KAAK,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAALF,KAAK,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;EAAA;EACpCC,OAAO,CAACC,IAAI,CAAC,wBAAwB,EAAE,GAAGJ,KAAK,CAAC;AAClD,CAAC;AAACK,OAAA,CAAAT,aAAA,GAAAA,aAAA"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.bookingResponse = void 0;
7
+ const bookingResponse = function () {
8
+ for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
9
+ props[_key] = arguments[_key];
10
+ }
11
+ console.info('googleAds.bookingResponse', ...props);
12
+ };
13
+ exports.bookingResponse = bookingResponse;
14
+ //# sourceMappingURL=bookingResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookingResponse.js","names":["bookingResponse","_len","arguments","length","props","Array","_key","console","info","exports"],"sources":["../../../../../src/contexts/PerfomanceManager/providers/googleAds/bookingResponse.js"],"sourcesContent":["export const bookingResponse = (...props) => {\n console.info('googleAds.bookingResponse', ...props);\n};\n"],"mappings":";;;;;;AAAO,MAAMA,eAAe,GAAG,SAAAA,CAAA,EAAc;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAVC,KAAK,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAALF,KAAK,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;EAAA;EACtCC,OAAO,CAACC,IAAI,CAAC,2BAA2B,EAAE,GAAGJ,KAAK,CAAC;AACrD,CAAC;AAACK,OAAA,CAAAT,eAAA,GAAAA,eAAA"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ProviderGoogleAds = void 0;
7
+ var _bookingResponse = require("./bookingResponse");
8
+ const ProviderGoogleAds = exports.ProviderGoogleAds = {
9
+ bookingResponse: _bookingResponse.bookingResponse
10
+ };
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["_bookingResponse","require","ProviderGoogleAds","exports","bookingResponse"],"sources":["../../../../../src/contexts/PerfomanceManager/providers/googleAds/index.js"],"sourcesContent":["import { bookingResponse } from './bookingResponse';\n\nexport const ProviderGoogleAds = {\n bookingResponse,\n};\n"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAEO,MAAMC,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG;EAC/BE,eAAe,EAAfA;AACF,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.bookingCancel = void 0;
7
+ const bookingCancel = function () {
8
+ for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
9
+ props[_key] = arguments[_key];
10
+ }
11
+ console.info('gtm.bookingCancel', ...props);
12
+ };
13
+ exports.bookingCancel = bookingCancel;
14
+ //# sourceMappingURL=bookingCancel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookingCancel.js","names":["bookingCancel","_len","arguments","length","props","Array","_key","console","info","exports"],"sources":["../../../../../src/contexts/PerfomanceManager/providers/gtm/bookingCancel.js"],"sourcesContent":["export const bookingCancel = (...props) => {\n console.info('gtm.bookingCancel', ...props);\n};\n"],"mappings":";;;;;;AAAO,MAAMA,aAAa,GAAG,SAAAA,CAAA,EAAc;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAVC,KAAK,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAALF,KAAK,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;EAAA;EACpCC,OAAO,CAACC,IAAI,CAAC,mBAAmB,EAAE,GAAGJ,KAAK,CAAC;AAC7C,CAAC;AAACK,OAAA,CAAAT,aAAA,GAAAA,aAAA"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.bookingResponse = void 0;
7
+ const bookingResponse = function () {
8
+ for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
9
+ props[_key] = arguments[_key];
10
+ }
11
+ console.info('gtm.bookingResponse', ...props);
12
+ };
13
+ exports.bookingResponse = bookingResponse;
14
+ //# sourceMappingURL=bookingResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookingResponse.js","names":["bookingResponse","_len","arguments","length","props","Array","_key","console","info","exports"],"sources":["../../../../../src/contexts/PerfomanceManager/providers/gtm/bookingResponse.js"],"sourcesContent":["export const bookingResponse = (...props) => {\n console.info('gtm.bookingResponse', ...props);\n};\n"],"mappings":";;;;;;AAAO,MAAMA,eAAe,GAAG,SAAAA,CAAA,EAAc;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAVC,KAAK,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAALF,KAAK,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;EAAA;EACtCC,OAAO,CAACC,IAAI,CAAC,qBAAqB,EAAE,GAAGJ,KAAK,CAAC;AAC/C,CAAC;AAACK,OAAA,CAAAT,eAAA,GAAAA,eAAA"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.checkoutResponse = void 0;
7
+ const checkoutResponse = function () {
8
+ for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
9
+ props[_key] = arguments[_key];
10
+ }
11
+ console.info('gtm.checkoutResponse', ...props);
12
+ };
13
+ exports.checkoutResponse = checkoutResponse;
14
+ //# sourceMappingURL=checkoutResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkoutResponse.js","names":["checkoutResponse","_len","arguments","length","props","Array","_key","console","info","exports"],"sources":["../../../../../src/contexts/PerfomanceManager/providers/gtm/checkoutResponse.js"],"sourcesContent":["export const checkoutResponse = (...props) => {\n console.info('gtm.checkoutResponse', ...props);\n};\n"],"mappings":";;;;;;AAAO,MAAMA,gBAAgB,GAAG,SAAAA,CAAA,EAAc;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAVC,KAAK,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAALF,KAAK,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;EAAA;EACvCC,OAAO,CAACC,IAAI,CAAC,sBAAsB,EAAE,GAAGJ,KAAK,CAAC;AAChD,CAAC;AAACK,OAAA,CAAAT,gBAAA,GAAAA,gBAAA"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.finderReady = void 0;
7
+ const finderReady = function () {
8
+ for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
9
+ props[_key] = arguments[_key];
10
+ }
11
+ console.info('gtm.finderReady', ...props);
12
+ };
13
+ exports.finderReady = finderReady;
14
+ //# sourceMappingURL=finderReady.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"finderReady.js","names":["finderReady","_len","arguments","length","props","Array","_key","console","info","exports"],"sources":["../../../../../src/contexts/PerfomanceManager/providers/gtm/finderReady.js"],"sourcesContent":["export const finderReady = (...props) => {\n console.info('gtm.finderReady', ...props);\n};\n"],"mappings":";;;;;;AAAO,MAAMA,WAAW,GAAG,SAAAA,CAAA,EAAc;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAVC,KAAK,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAALF,KAAK,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;EAAA;EAClCC,OAAO,CAACC,IAAI,CAAC,iBAAiB,EAAE,GAAGJ,KAAK,CAAC;AAC3C,CAAC;AAACK,OAAA,CAAAT,WAAA,GAAAA,WAAA"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ProviderGTM = void 0;
7
+ var _bookingCancel = require("./bookingCancel");
8
+ var _bookingResponse = require("./bookingResponse");
9
+ var _checkoutResponse = require("./checkoutResponse");
10
+ var _finderReady = require("./finderReady");
11
+ var _ratesResponse = require("./ratesResponse");
12
+ const ProviderGTM = exports.ProviderGTM = {
13
+ bookingCancel: _bookingCancel.bookingCancel,
14
+ bookingResponse: _bookingResponse.bookingResponse,
15
+ checkoutResponse: _checkoutResponse.checkoutResponse,
16
+ finderReady: _finderReady.finderReady,
17
+ ratesResponse: _ratesResponse.ratesResponse
18
+ };
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["_bookingCancel","require","_bookingResponse","_checkoutResponse","_finderReady","_ratesResponse","ProviderGTM","exports","bookingCancel","bookingResponse","checkoutResponse","finderReady","ratesResponse"],"sources":["../../../../../src/contexts/PerfomanceManager/providers/gtm/index.js"],"sourcesContent":["import { bookingCancel } from './bookingCancel';\nimport { bookingResponse } from './bookingResponse';\nimport { checkoutResponse } from './checkoutResponse';\nimport { finderReady } from './finderReady';\nimport { ratesResponse } from './ratesResponse';\n\nexport const ProviderGTM = {\n bookingCancel,\n bookingResponse,\n checkoutResponse,\n finderReady,\n ratesResponse,\n};\n"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AAEO,MAAMK,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG;EACzBE,aAAa,EAAbA,4BAAa;EACbC,eAAe,EAAfA,gCAAe;EACfC,gBAAgB,EAAhBA,kCAAgB;EAChBC,WAAW,EAAXA,wBAAW;EACXC,aAAa,EAAbA;AACF,CAAC"}
@@ -0,0 +1,206 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ratesResponse = void 0;
7
+ var _locale = require("@mirai/locale");
8
+ var _helpers = require("../../../../components/helpers");
9
+ var _helpers2 = require("../../../../helpers");
10
+ var _helpers3 = require("../../helpers");
11
+ // ! TODO
12
+ const formatPrice = function () {
13
+ let price = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
14
+ let {
15
+ numDecimals
16
+ } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
17
+ return parseFloat(price / Math.pow(10, numDecimals));
18
+ };
19
+ const ratesResponse = _ref => {
20
+ var _variants$hotelId, _Object$values;
21
+ let {
22
+ device: {
23
+ mobile
24
+ } = {},
25
+ response: {
26
+ hotels,
27
+ tracking = {}
28
+ } = {},
29
+ store: {
30
+ finder: {
31
+ occupation = [],
32
+ place: {
33
+ title: searchCategory
34
+ } = {}
35
+ } = {},
36
+ hotel: {
37
+ accommodationType: hotelAccommodationType,
38
+ variants = {}
39
+ } = {}
40
+ } = {}
41
+ } = _ref;
42
+ const {
43
+ checkin,
44
+ clientCode,
45
+ idchain: chainId,
46
+ idoffers,
47
+ // ! TODO
48
+ idtokenprovider: hotelId,
49
+ lang: language,
50
+ nights,
51
+ roomTypeId
52
+ } = (0, _helpers2.fetchUrlParams)(location.search);
53
+ const {
54
+ adults: numAdults,
55
+ children: numChildren = 0
56
+ } = (0, _helpers.getOccupationTotals)({
57
+ occupation
58
+ });
59
+ const device = mobile ? 'MOBILE' : 'DESKTOP_TABLET';
60
+
61
+ // ! -- TODO: Should not exists --------------------------------------------------------------------------------------
62
+ const {
63
+ country,
64
+ hotelInfo: {
65
+ currency: hotelCurrencyInfo = {},
66
+ ...hotelInfo
67
+ } = {},
68
+ localTaxesIncluded,
69
+ multiroom,
70
+ rates = {},
71
+ taxesIncluded,
72
+ userCurrency: userCurrencyInfo = {},
73
+ userLogged
74
+ } = tracking;
75
+ // ! -----------------------------------------------------------------------------------------------------------------
76
+
77
+ // ! TODO
78
+ // eslint-disable-next-line no-undef
79
+ const {
80
+ minRate = {},
81
+ maxRate = {}
82
+ } = {} || util.getMinAndMaxPriceInHotelAvailability(rates, hotelCurrencyInfo);
83
+ let minUnitaryPriceWithoutTaxes = (minRate.totalPriceWithoutTaxes / nights).toFixed(0);
84
+ let maxUnitaryPriceWithoutTaxes = (maxRate.totalPriceWithoutTaxes / nights).toFixed(0);
85
+ const dataLayer = {
86
+ chainId,
87
+ checkin,
88
+ checkout: (0, _locale.dateFormat)((0, _locale.dateCalc)((0, _locale.parseDate)(checkin), parseInt(nights), 'days'), {
89
+ format: 'DD/MM/YYYY'
90
+ }),
91
+ coupon: clientCode || '',
92
+ currency: hotelCurrencyInfo.code,
93
+ device,
94
+ exchangeRate: userCurrencyInfo.value && hotelCurrencyInfo.value && userCurrencyInfo.value / hotelCurrencyInfo.value,
95
+ highestRate: {
96
+ averagePrice: maxRate.price,
97
+ boardName: maxRate.boardName,
98
+ occupation: {
99
+ numAdults: maxRate.adults,
100
+ numChildren: maxRate.childrenFirtsRange + maxRate.childrenSecondRange,
101
+ numBabies: maxRate.babies
102
+ },
103
+ priceWithoutTaxes: formatPrice(maxRate.totalPriceWithoutTaxes, hotelCurrencyInfo),
104
+ priceWithTaxes: formatPrice(maxRate.totalPriceWithTaxes, hotelCurrencyInfo),
105
+ rateName: maxRate.rateName,
106
+ roomTypeName: maxRate.roomTypeName,
107
+ unitaryPriceWithoutTaxes: formatPrice(maxUnitaryPriceWithoutTaxes, hotelCurrencyInfo)
108
+ },
109
+ home: document.location.hostname,
110
+ hotelId,
111
+ idOffer: parseInt(idoffers),
112
+ idRoom: parseInt(roomTypeId),
113
+ language,
114
+ localTaxesIncluded,
115
+ // ! Parse to string
116
+ lodgingDenomination: ((_variants$hotelId = variants[hotelId]) === null || _variants$hotelId === void 0 ? void 0 : _variants$hotelId.accommodationType) || hotelAccommodationType,
117
+ lowestRate: {
118
+ averagePrice: minRate.price,
119
+ boardName: minRate.boardName,
120
+ occupation: {
121
+ numAdults: minRate.adults,
122
+ numChildren: minRate.childrenFirtsRange + minRate.childrenSecondRange,
123
+ numBabies: minRate.babies
124
+ },
125
+ priceWithoutTaxes: formatPrice(minRate.totalPriceWithoutTaxes, hotelCurrencyInfo),
126
+ priceWithTaxes: formatPrice(minRate.totalPriceWithTaxes, hotelCurrencyInfo),
127
+ rateName: minRate.rateName,
128
+ roomTypeName: minRate.roomTypeName,
129
+ unitaryPriceWithoutTaxes: formatPrice(minUnitaryPriceWithoutTaxes, hotelCurrencyInfo)
130
+ },
131
+ multiroom,
132
+ nights: nights,
133
+ numAdults,
134
+ numChildren,
135
+ numRooms: occupation.length,
136
+ propertyName: hotelInfo.propertyName,
137
+ propertyType: hotelInfo.propertyType,
138
+ ratesByRoom: (_Object$values = Object.values(rates)) === null || _Object$values === void 0 ? void 0 : _Object$values.map(function () {
139
+ var _Object$values2;
140
+ let {
141
+ id,
142
+ name,
143
+ occupationOptions = {}
144
+ } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
145
+ return {
146
+ id,
147
+ name,
148
+ occupations: (_Object$values2 = Object.values(occupationOptions)) === null || _Object$values2 === void 0 ? void 0 : _Object$values2.map(_ref2 => {
149
+ var _Object$values3;
150
+ let {
151
+ numAdults,
152
+ numFirstRangeChildren,
153
+ numSecondRangeChildren,
154
+ id,
155
+ rates = {}
156
+ } = _ref2;
157
+ return {
158
+ adults: numAdults,
159
+ children: numFirstRangeChildren + numSecondRangeChildren,
160
+ id,
161
+ rates: (_Object$values3 = Object.values(rates)) === null || _Object$values3 === void 0 ? void 0 : _Object$values3.map(_ref3 => {
162
+ var _Object$values4;
163
+ let {
164
+ boardOptions = {},
165
+ id,
166
+ name
167
+ } = _ref3;
168
+ return {
169
+ boards: (_Object$values4 = Object.values(boardOptions)) === null || _Object$values4 === void 0 ? void 0 : _Object$values4.map(_ref4 => {
170
+ let {
171
+ id,
172
+ name,
173
+ totalBasePrice,
174
+ totalLocalTaxes = 0,
175
+ totalPriceWithTaxes
176
+ } = _ref4;
177
+ return {
178
+ id,
179
+ localTaxes: formatPrice(totalLocalTaxes, hotelCurrencyInfo),
180
+ name,
181
+ netPrice: formatPrice(totalBasePrice, hotelCurrencyInfo),
182
+ taxes: formatPrice(totalPriceWithTaxes - totalBasePrice, hotelCurrencyInfo)
183
+ };
184
+ }),
185
+ id,
186
+ name
187
+ };
188
+ })
189
+ };
190
+ })
191
+ };
192
+ }),
193
+ step: hotels && searchCategory ? _helpers.STEP.HOTELS : _helpers.STEP.RATES,
194
+ taxesIncluded,
195
+ userCountry: country,
196
+ userCurrency: userCurrencyInfo.code,
197
+ userLogged
198
+ };
199
+ console.log('>>>>>>>', dataLayer);
200
+ (0, _helpers3.dataLayerPush)({
201
+ event: 'mirai.Availability',
202
+ ['mirai.data']: dataLayer
203
+ });
204
+ };
205
+ exports.ratesResponse = ratesResponse;
206
+ //# sourceMappingURL=ratesResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ratesResponse.js","names":["_locale","require","_helpers","_helpers2","_helpers3","formatPrice","price","arguments","length","undefined","numDecimals","parseFloat","Math","pow","ratesResponse","_ref","_variants$hotelId","_Object$values","device","mobile","response","hotels","tracking","store","finder","occupation","place","title","searchCategory","hotel","accommodationType","hotelAccommodationType","variants","checkin","clientCode","idchain","chainId","idoffers","idtokenprovider","hotelId","lang","language","nights","roomTypeId","fetchUrlParams","location","search","adults","numAdults","children","numChildren","getOccupationTotals","country","hotelInfo","currency","hotelCurrencyInfo","localTaxesIncluded","multiroom","rates","taxesIncluded","userCurrency","userCurrencyInfo","userLogged","minRate","maxRate","util","getMinAndMaxPriceInHotelAvailability","minUnitaryPriceWithoutTaxes","totalPriceWithoutTaxes","toFixed","maxUnitaryPriceWithoutTaxes","dataLayer","checkout","dateFormat","dateCalc","parseDate","parseInt","format","coupon","code","exchangeRate","value","highestRate","averagePrice","boardName","childrenFirtsRange","childrenSecondRange","numBabies","babies","priceWithoutTaxes","priceWithTaxes","totalPriceWithTaxes","rateName","roomTypeName","unitaryPriceWithoutTaxes","home","document","hostname","idOffer","idRoom","lodgingDenomination","lowestRate","numRooms","propertyName","propertyType","ratesByRoom","Object","values","map","_Object$values2","id","name","occupationOptions","occupations","_ref2","_Object$values3","numFirstRangeChildren","numSecondRangeChildren","_ref3","_Object$values4","boardOptions","boards","_ref4","totalBasePrice","totalLocalTaxes","localTaxes","netPrice","taxes","step","STEP","HOTELS","RATES","userCountry","console","log","dataLayerPush","event","exports"],"sources":["../../../../../src/contexts/PerfomanceManager/providers/gtm/ratesResponse.js"],"sourcesContent":["import { dateCalc, parseDate, dateFormat } from '@mirai/locale';\n\nimport { getOccupationTotals, STEP } from '../../../../components/helpers';\nimport { fetchUrlParams } from '../../../../helpers';\nimport { dataLayerPush } from '../../helpers';\n\n// ! TODO\nconst formatPrice = (price = 0, { numDecimals } = {}) => parseFloat(price / Math.pow(10, numDecimals));\n\nexport const ratesResponse = ({\n device: { mobile } = {},\n response: { hotels, tracking = {} } = {},\n store: {\n finder: { occupation = [], place: { title: searchCategory } = {} } = {},\n hotel: { accommodationType: hotelAccommodationType, variants = {} } = {},\n } = {},\n}) => {\n const {\n checkin,\n clientCode,\n idchain: chainId,\n idoffers,\n // ! TODO\n idtokenprovider: hotelId,\n lang: language,\n nights,\n roomTypeId,\n } = fetchUrlParams(location.search);\n\n const { adults: numAdults, children: numChildren = 0 } = getOccupationTotals({ occupation });\n\n const device = mobile ? 'MOBILE' : 'DESKTOP_TABLET';\n\n // ! -- TODO: Should not exists --------------------------------------------------------------------------------------\n const {\n country,\n hotelInfo: { currency: hotelCurrencyInfo = {}, ...hotelInfo } = {},\n localTaxesIncluded,\n multiroom,\n rates = {},\n taxesIncluded,\n userCurrency: userCurrencyInfo = {},\n userLogged,\n } = tracking;\n // ! -----------------------------------------------------------------------------------------------------------------\n\n // ! TODO\n // eslint-disable-next-line no-undef\n const { minRate = {}, maxRate = {} } = {} || util.getMinAndMaxPriceInHotelAvailability(rates, hotelCurrencyInfo);\n\n let minUnitaryPriceWithoutTaxes = (minRate.totalPriceWithoutTaxes / nights).toFixed(0);\n let maxUnitaryPriceWithoutTaxes = (maxRate.totalPriceWithoutTaxes / nights).toFixed(0);\n\n const dataLayer = {\n chainId,\n checkin,\n checkout: dateFormat(dateCalc(parseDate(checkin), parseInt(nights), 'days'), { format: 'DD/MM/YYYY' }),\n coupon: clientCode || '',\n currency: hotelCurrencyInfo.code,\n device,\n exchangeRate: userCurrencyInfo.value && hotelCurrencyInfo.value && userCurrencyInfo.value / hotelCurrencyInfo.value,\n highestRate: {\n averagePrice: maxRate.price,\n boardName: maxRate.boardName,\n occupation: {\n numAdults: maxRate.adults,\n numChildren: maxRate.childrenFirtsRange + maxRate.childrenSecondRange,\n numBabies: maxRate.babies,\n },\n priceWithoutTaxes: formatPrice(maxRate.totalPriceWithoutTaxes, hotelCurrencyInfo),\n priceWithTaxes: formatPrice(maxRate.totalPriceWithTaxes, hotelCurrencyInfo),\n rateName: maxRate.rateName,\n roomTypeName: maxRate.roomTypeName,\n unitaryPriceWithoutTaxes: formatPrice(maxUnitaryPriceWithoutTaxes, hotelCurrencyInfo),\n },\n home: document.location.hostname,\n hotelId,\n idOffer: parseInt(idoffers),\n idRoom: parseInt(roomTypeId),\n language,\n localTaxesIncluded,\n // ! Parse to string\n lodgingDenomination: variants[hotelId]?.accommodationType || hotelAccommodationType,\n lowestRate: {\n averagePrice: minRate.price,\n boardName: minRate.boardName,\n occupation: {\n numAdults: minRate.adults,\n numChildren: minRate.childrenFirtsRange + minRate.childrenSecondRange,\n numBabies: minRate.babies,\n },\n priceWithoutTaxes: formatPrice(minRate.totalPriceWithoutTaxes, hotelCurrencyInfo),\n priceWithTaxes: formatPrice(minRate.totalPriceWithTaxes, hotelCurrencyInfo),\n rateName: minRate.rateName,\n roomTypeName: minRate.roomTypeName,\n unitaryPriceWithoutTaxes: formatPrice(minUnitaryPriceWithoutTaxes, hotelCurrencyInfo),\n },\n multiroom,\n nights: nights,\n numAdults,\n numChildren,\n numRooms: occupation.length,\n propertyName: hotelInfo.propertyName,\n propertyType: hotelInfo.propertyType,\n ratesByRoom: Object.values(rates)?.map(({ id, name, occupationOptions = {} } = {}) => ({\n id,\n name,\n occupations: Object.values(occupationOptions)?.map(\n ({ numAdults, numFirstRangeChildren, numSecondRangeChildren, id, rates = {} }) => ({\n adults: numAdults,\n children: numFirstRangeChildren + numSecondRangeChildren,\n id,\n rates: Object.values(rates)?.map(({ boardOptions = {}, id, name }) => ({\n boards: Object.values(boardOptions)?.map(\n ({ id, name, totalBasePrice, totalLocalTaxes = 0, totalPriceWithTaxes }) => ({\n id,\n localTaxes: formatPrice(totalLocalTaxes, hotelCurrencyInfo),\n name,\n netPrice: formatPrice(totalBasePrice, hotelCurrencyInfo),\n taxes: formatPrice(totalPriceWithTaxes - totalBasePrice, hotelCurrencyInfo),\n }),\n ),\n id,\n name,\n })),\n }),\n ),\n })),\n step: hotels && searchCategory ? STEP.HOTELS : STEP.RATES,\n taxesIncluded,\n userCountry: country,\n userCurrency: userCurrencyInfo.code,\n userLogged,\n };\n\n console.log('>>>>>>>', dataLayer);\n\n dataLayerPush({ event: 'mirai.Availability', ['mirai.data']: dataLayer });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAEA;AACA,MAAMI,WAAW,GAAG,SAAAA,CAAA;EAAA,IAACC,KAAK,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC;EAAA,IAAE;IAAEG;EAAY,CAAC,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAAA,OAAKI,UAAU,CAACL,KAAK,GAAGM,IAAI,CAACC,GAAG,CAAC,EAAE,EAAEH,WAAW,CAAC,CAAC;AAAA;AAE/F,MAAMI,aAAa,GAAGC,IAAA,IAOvB;EAAA,IAAAC,iBAAA,EAAAC,cAAA;EAAA,IAPwB;IAC5BC,MAAM,EAAE;MAAEC;IAAO,CAAC,GAAG,CAAC,CAAC;IACvBC,QAAQ,E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