@revolugo/elements 5.5.1-beta.1 → 5.5.1-beta.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (244) hide show
  1. package/dist/css/fonts.css +1 -0
  2. package/dist/css/revolugo.bdaterangepicker.DEh20utH.css +1 -0
  3. package/dist/css/revolugo.bhotelroomsdetails.4XsxkvH7.css +1 -0
  4. package/dist/css/revolugo.bhotelsearchbar.dwYB1gUC.css +1 -0
  5. package/dist/css/revolugo.bookingdetailssidebar.tDtXpaIj.css +1 -0
  6. package/dist/css/revolugo.bphoneinput.Kq_-XiGI.css +1 -0
  7. package/dist/css/revolugo.bstarrating.nzH7iii4.css +1 -0
  8. package/dist/css/revolugo.btag.Bdbqb_8a.css +1 -0
  9. package/dist/css/revolugo.common.BSIsYREh.css +1 -0
  10. package/dist/css/revolugo.creditcardform.BGPUxkRC.css +1 -0
  11. package/dist/css/revolugo.creditcardpayment.CGjlL8Fn.css +1 -0
  12. package/dist/css/revolugo.currencypicker.BRYsKdMu.css +1 -0
  13. package/dist/css/revolugo.fullbookingflow.BHV7_MhK.css +1 -0
  14. package/dist/css/revolugo.hotel-offer.Di9LJKMP.css +1 -0
  15. package/dist/css/revolugo.hoteldescriptionview.9ofE1uWG.css +1 -0
  16. package/dist/css/revolugo.hoteloffersmap.-ZhDcfsj.css +1 -0
  17. package/dist/css/revolugo.hoteloffersview.MWOmwEwv.css +1 -0
  18. package/dist/css/revolugo.hotelroomofferlist.DrGyKJ-m.css +1 -0
  19. package/dist/css/revolugo.hotelroomoffersbookingflow.DGFt0C9n.css +1 -0
  20. package/dist/css/revolugo.hotelroomoffersview.B8Y-2QYc.css +1 -0
  21. package/dist/css/revolugo.index.BMkl7a3p.css +1 -0
  22. package/dist/css/revolugo.index.CFW4Oklv.css +1 -0
  23. package/dist/css/revolugo.index.DXv5c7NS.css +1 -0
  24. package/dist/css/revolugo.langpicker.B3TsOwUq.css +1 -0
  25. package/dist/css/revolugo.parsed-height.B92--uJb.css +1 -0
  26. package/dist/css/revolugo.parsed-props.C3kOvm7T.css +1 -0
  27. package/dist/css/revolugo.prebookform.CDnZmw8F.css +1 -0
  28. package/dist/css/revolugo.revolugo-config.Dg8v1l3c.css +5 -0
  29. package/dist/css/revolugo.storybooktoolbar.CVnww0dZ.css +1 -0
  30. package/dist/css/revolugo.termsandconditions.DV2YnGzG.css +1 -0
  31. package/dist/css/revolugo.valert.BzcMswjJ.css +1 -0
  32. package/dist/css/revolugo.vautocomplete.OMX_yAge.css +1 -0
  33. package/dist/css/revolugo.vbadge.CiK_DSkI.css +1 -0
  34. package/dist/css/revolugo.vbtn.By46MJOU.css +1 -0
  35. package/dist/css/revolugo.vcard.DmB53ZNL.css +1 -0
  36. package/dist/css/revolugo.vchip.BdAdP6lC.css +1 -0
  37. package/dist/css/revolugo.vdialog.C02Cvwul.css +1 -0
  38. package/dist/css/revolugo.vexpansionpanelheader.B2eKo8Lo.css +1 -0
  39. package/dist/css/revolugo.vinput.SfhpXNi0.css +1 -0
  40. package/dist/css/revolugo.vitemgroup.EbHsz8Rr.css +1 -0
  41. package/dist/css/revolugo.vlistitem.BzwNE1YK.css +1 -0
  42. package/dist/css/revolugo.vmenu.BKE0IO4q.css +1 -0
  43. package/dist/css/revolugo.vselect.DljSkk6y.css +1 -0
  44. package/dist/css/revolugo.vsheet.Dtdo2Rps.css +1 -0
  45. package/dist/css/revolugo.vskeletonloader.BpGoaAbZ.css +1 -0
  46. package/dist/css/revolugo.vslidegroup.D5TIbmaw.css +1 -0
  47. package/dist/css/revolugo.vsnackbar.DTAXPYkr.css +1 -0
  48. package/dist/css/revolugo.vtextfield.BliJY6uv.css +1 -0
  49. package/dist/css/revolugo.vtoolbar.DQsezjcM.css +1 -0
  50. package/dist/css/revolugo.vtooltip.B_oOB9pj.css +1 -0
  51. package/dist/css/revolugo.vuetify.BpIoHlAi.css +1 -0
  52. package/dist/css/revolugo.webcomponentwrapper.BRZRuwZ0.css +1 -0
  53. package/dist/index.min.js +1 -1
  54. package/dist/revolugo.banktransferdetails.CDDLgiqZ.min.js +105 -0
  55. package/dist/revolugo.bbreakfastoptionbadge.BXp8jiFF.min.js +62 -0
  56. package/dist/revolugo.bdaterangepicker.D7vKynZO.min.js +1351 -0
  57. package/dist/revolugo.bformattedamount.DZ4lP0D2.min.js +82 -0
  58. package/dist/revolugo.bhotelroomsdetails._OEOxEfQ.min.js +213 -0
  59. package/dist/revolugo.bhotelsearchbar.D29hl2MS.min.js +446 -0
  60. package/dist/revolugo.booking-api-client.Drh0cRTW.min.js +7443 -0
  61. package/dist/revolugo.bookingdetailssidebar.Cf_orLaJ.min.js +28 -0
  62. package/dist/revolugo.bookingdetailssidebar.lDNB7oXF.min.js +242 -0
  63. package/dist/revolugo.bookingmanager.BptiDiuZ.min.js +405 -0
  64. package/dist/revolugo.bphoneinput.DEA12thE.min.js +1935 -0
  65. package/dist/revolugo.bpricesummaryskeleton.A4azxZPx.min.js +47 -0
  66. package/dist/revolugo.breakpoint-service.ulonvHwK.min.js +65 -0
  67. package/dist/revolugo.bstarrating.qzeMb2Ot.min.js +173 -0
  68. package/dist/revolugo.btag.fqocL5RV.min.js +68 -0
  69. package/dist/revolugo.cancellationpoliciesbadge.BzjXjeXq.min.js +28 -0
  70. package/dist/revolugo.cancellationpoliciesbadge.nq63QKAU.min.js +92 -0
  71. package/dist/revolugo.cancellationpolicieslist.BfiF9DHI.min.js +28 -0
  72. package/dist/revolugo.cancellationpolicieslist.DvAdsbLe.min.js +317 -0
  73. package/dist/revolugo.common.BavAKcPL.min.js +34 -0
  74. package/dist/revolugo.creditcardform.P3Lo1eeg.min.js +2049 -0
  75. package/dist/revolugo.creditcardform.i3DpOTAl.min.js +28 -0
  76. package/dist/revolugo.creditcardpayment.80nyDUq9.min.js +288 -0
  77. package/dist/revolugo.creditcardpayment.CieGjOTr.min.js +28 -0
  78. package/dist/revolugo.currencypicker.qFd6-iwV.min.js +122 -0
  79. package/dist/revolugo.currencypickerbtn.DXqfDYzb.min.js +121 -0
  80. package/dist/revolugo.currencypickerbtn.SL9IbI6O.min.js +28 -0
  81. package/dist/revolugo.dialog-attach.BQO5FkC9.min.js +27 -0
  82. package/dist/revolugo.en-us.BwPQZpD-.min.js +1171 -0
  83. package/dist/revolugo.event-bus.CYLYgD3Y.min.js +37 -0
  84. package/dist/revolugo.fr-fr.CV4yETNm.min.js +1177 -0
  85. package/dist/revolugo.fullbookingflow.BH9WYZQU.min.js +239 -0
  86. package/dist/revolugo.hotel-offer.DkBY7KF0.min.js +605 -0
  87. package/dist/revolugo.hoteldescriptionview.COEl20Dq.min.js +2174 -0
  88. package/dist/revolugo.hoteldescriptionview.XJOl3Oeh.min.js +28 -0
  89. package/dist/revolugo.hotelofferitemlayout.DxWzoHRv.min.js +64 -0
  90. package/dist/revolugo.hotelofferlist.C1B_9NAn.min.js +3779 -0
  91. package/dist/revolugo.hotelofferlist.I8kF8p6L.min.js +28 -0
  92. package/dist/revolugo.hotelofferrequestcreator.B9mGU5bB.min.js +225 -0
  93. package/dist/revolugo.hoteloffersearchmenu.DExCTnYT.min.js +54 -0
  94. package/dist/revolugo.hoteloffersmap.Cd0-GO8Q.min.js +8737 -0
  95. package/dist/revolugo.hoteloffersmap.FqqtiR5R.min.js +28 -0
  96. package/dist/revolugo.hoteloffersview.C9lYrm2i.min.js +157 -0
  97. package/dist/revolugo.hoteloffersview.CLcQG9wK.min.js +28 -0
  98. package/dist/revolugo.hotelroomofferlist.B436VThb.min.js +1332 -0
  99. package/dist/revolugo.hotelroomofferlist.uS6bGKaQ.min.js +28 -0
  100. package/dist/revolugo.hotelroomofferrequestcreator.Cqzw_aE0.min.js +225 -0
  101. package/dist/revolugo.hotelroomoffersbookingflow.CMJgMAtO.min.js +679 -0
  102. package/dist/revolugo.hotelroomoffersearchmenu.Dws8MLf0.min.js +38 -0
  103. package/dist/revolugo.hotelroomoffersearchmenu.UHKtopiD.min.js +29 -0
  104. package/dist/revolugo.hotelroomoffersview.-1JOr1jD.min.js +28 -0
  105. package/dist/revolugo.hotelroomoffersview.217ygoUj.min.js +124 -0
  106. package/dist/revolugo.i18n.BIDah4Hr.min.js +10901 -0
  107. package/dist/revolugo.index.B8RjdKfF.min.js +281 -0
  108. package/dist/revolugo.index.BOFNqiKi.min.js +128 -0
  109. package/dist/revolugo.index.BafzMKRk.min.js +13 -0
  110. package/dist/revolugo.index.ByALJ4Cg.min.js +270 -0
  111. package/dist/revolugo.index.CMpCToBI.min.js +390 -0
  112. package/dist/revolugo.index.CVaQfmC0.min.js +15 -0
  113. package/dist/revolugo.index.Ce2wa-yh.min.js +142 -0
  114. package/dist/revolugo.index.CfwKNM8Q.min.js +9 -0
  115. package/dist/revolugo.index.D7ohfZ-O.min.js +68 -0
  116. package/dist/revolugo.index.DKK0H_cv.min.js +161 -0
  117. package/dist/revolugo.index.DSbeMte7.min.js +322 -0
  118. package/dist/revolugo.index.Dudg2j1-.min.js +9 -0
  119. package/dist/revolugo.index.G0QSOBn3.min.js +42 -0
  120. package/dist/revolugo.index.mq4mKuqN.min.js +43 -0
  121. package/dist/revolugo.langpicker.DtWztNg3.min.js +103 -0
  122. package/dist/revolugo.langpickerbtn.CPZtzdTJ.min.js +111 -0
  123. package/dist/revolugo.langpickerbtn.D3ff3yft.min.js +28 -0
  124. package/dist/revolugo.localizedformat.C4ez1VLt.min.js +47 -0
  125. package/dist/revolugo.min.js +257 -7
  126. package/dist/revolugo.parsed-height.Bd1t0mHH.min.js +2338 -0
  127. package/dist/revolugo.parsed-props.B6q7Ax-9.min.js +95 -0
  128. package/dist/revolugo.prebookform.Bvkp_jkU.min.js +28 -0
  129. package/dist/revolugo.prebookform.QT7QI1LP.min.js +484 -0
  130. package/dist/revolugo.revolugo-config.B9n_CElG.min.js +1707 -0
  131. package/dist/revolugo.roominglisteditor.BCpebY3B.min.js +201 -0
  132. package/dist/revolugo.roominglisteditor.C4AtDc7A.min.js +28 -0
  133. package/dist/revolugo.sentry.CuQ4Sj_P.min.js +10989 -0
  134. package/dist/revolugo.store.TBV-eqIE.min.js +2497 -0
  135. package/dist/revolugo.storybooktoolbar.K8FrycZc.min.js +300 -0
  136. package/dist/revolugo.termsandconditions.DCoLgJzC.min.js +27 -0
  137. package/dist/revolugo.termsandconditions.DkzQmMDI.min.js +162 -0
  138. package/dist/revolugo.typed-mixins.CArk-fZ7.min.js +8 -0
  139. package/dist/revolugo.valert.tamLbGMZ.min.js +194 -0
  140. package/dist/revolugo.vautocomplete.BbvrGxVz.min.js +255 -0
  141. package/dist/revolugo.vbadge.B3P90j3E.min.js +172 -0
  142. package/dist/revolugo.vbtn.BNPhP-XR.min.js +286 -0
  143. package/dist/revolugo.vcard.ndQpNewl.min.js +80 -0
  144. package/dist/revolugo.vchip.DTZZJRt5.min.js +157 -0
  145. package/dist/revolugo.vdialog.C-Jh0Eq7.min.js +341 -0
  146. package/dist/revolugo.vexpansionpanelheader.DJijrIj9.min.js +263 -0
  147. package/dist/revolugo.vform.D7XJ7bEy.min.js +98 -0
  148. package/dist/revolugo.vinput.BeSsXYg9.min.js +509 -0
  149. package/dist/revolugo.vitemgroup.DjZ_N7Ml.min.js +168 -0
  150. package/dist/revolugo.vlistitem.ChmT4RKD.min.js +204 -0
  151. package/dist/revolugo.vmenu.CThLxAWt.min.js +349 -0
  152. package/dist/revolugo.vselect.BXEzrczG.min.js +859 -0
  153. package/dist/revolugo.vsheet.BWJwctvS.min.js +120 -0
  154. package/dist/revolugo.vskeletonloader.CCW1cQtD.min.js +172 -0
  155. package/dist/revolugo.vslidegroup.Dlwmh4Oi.min.js +650 -0
  156. package/dist/revolugo.vsnackbar.BGJVdHRT.min.js +178 -0
  157. package/dist/revolugo.vtextfield.D-kB2BBk.min.js +438 -0
  158. package/dist/revolugo.vtoolbar.C98lEGDc.min.js +364 -0
  159. package/dist/revolugo.vtooltip.M9ln6byG.min.js +168 -0
  160. package/dist/revolugo.vuetify.BEdap6Ni.min.js +865 -0
  161. package/dist/revolugo.watch-list.Bb06Iz6D.min.js +44 -0
  162. package/dist/revolugo.webcomponentwrapper.Dhr34jp1.min.js +783 -0
  163. package/package.json +3 -5
  164. package/dist/css/revolugo.0.min.css +0 -5
  165. package/dist/css/revolugo.1.min.css +0 -1
  166. package/dist/css/revolugo.11.min.css +0 -1
  167. package/dist/css/revolugo.12.min.css +0 -1
  168. package/dist/css/revolugo.13.min.css +0 -1
  169. package/dist/css/revolugo.14.min.css +0 -1
  170. package/dist/css/revolugo.15.min.css +0 -1
  171. package/dist/css/revolugo.16.min.css +0 -1
  172. package/dist/css/revolugo.17.min.css +0 -1
  173. package/dist/css/revolugo.18.min.css +0 -1
  174. package/dist/css/revolugo.19.min.css +0 -1
  175. package/dist/css/revolugo.2.min.css +0 -1
  176. package/dist/css/revolugo.20.min.css +0 -1
  177. package/dist/css/revolugo.21.min.css +0 -1
  178. package/dist/css/revolugo.22.min.css +0 -1
  179. package/dist/css/revolugo.23.min.css +0 -1
  180. package/dist/css/revolugo.24.min.css +0 -1
  181. package/dist/css/revolugo.25.min.css +0 -1
  182. package/dist/css/revolugo.26.min.css +0 -1
  183. package/dist/css/revolugo.27.min.css +0 -1
  184. package/dist/css/revolugo.28.min.css +0 -1
  185. package/dist/css/revolugo.29.min.css +0 -1
  186. package/dist/css/revolugo.30.min.css +0 -1
  187. package/dist/css/revolugo.31.min.css +0 -1
  188. package/dist/css/revolugo.32.min.css +0 -1
  189. package/dist/css/revolugo.33.min.css +0 -1
  190. package/dist/css/revolugo.34.min.css +0 -1
  191. package/dist/css/revolugo.4.min.css +0 -1
  192. package/dist/css/revolugo.5.min.css +0 -1
  193. package/dist/css/revolugo.6.min.css +0 -1
  194. package/dist/css/revolugo.7.min.css +0 -1
  195. package/dist/css/revolugo.fonts.min.css +0 -1
  196. package/dist/fonts/amenities.2aad1d12.woff +0 -0
  197. package/dist/fonts/amenities.9adae269.ttf +0 -0
  198. package/dist/fonts/amenities.a9bf50f8.svg +0 -42
  199. package/dist/fonts/amenities.bd6b3a4a.eot +0 -0
  200. package/dist/fonts/beds.2b8e38c8.svg +0 -12
  201. package/dist/img/apst.c1092975.png +0 -0
  202. package/dist/img/apst.ec7669f2.png +0 -0
  203. package/dist/img/atout-france.72107e30.png +0 -0
  204. package/dist/img/atout-france.df038f22.png +0 -0
  205. package/dist/img/revolugo.179c459d.png +0 -0
  206. package/dist/img/revolugo.e0879dcc.png +0 -0
  207. package/dist/img/stripe.405543e2.png +0 -0
  208. package/dist/img/stripe.c3e16f9f.png +0 -0
  209. package/dist/revolugo.0.min.js +0 -18
  210. package/dist/revolugo.1.min.js +0 -1
  211. package/dist/revolugo.11.min.js +0 -134
  212. package/dist/revolugo.12.min.js +0 -19
  213. package/dist/revolugo.13.min.js +0 -14
  214. package/dist/revolugo.14.min.js +0 -19
  215. package/dist/revolugo.15.min.js +0 -139
  216. package/dist/revolugo.16.min.js +0 -14
  217. package/dist/revolugo.17.min.js +0 -14
  218. package/dist/revolugo.18.min.js +0 -1
  219. package/dist/revolugo.19.min.js +0 -1
  220. package/dist/revolugo.2.min.js +0 -1
  221. package/dist/revolugo.20.min.js +0 -1
  222. package/dist/revolugo.21.min.js +0 -116
  223. package/dist/revolugo.22.min.js +0 -1
  224. package/dist/revolugo.23.min.js +0 -1
  225. package/dist/revolugo.24.min.js +0 -1
  226. package/dist/revolugo.25.min.js +0 -1
  227. package/dist/revolugo.26.min.js +0 -1
  228. package/dist/revolugo.27.min.js +0 -1
  229. package/dist/revolugo.28.min.js +0 -116
  230. package/dist/revolugo.29.min.js +0 -1
  231. package/dist/revolugo.30.min.js +0 -1
  232. package/dist/revolugo.31.min.js +0 -1
  233. package/dist/revolugo.32.min.js +0 -1
  234. package/dist/revolugo.33.min.js +0 -1
  235. package/dist/revolugo.34.min.js +0 -1
  236. package/dist/revolugo.35.min.js +0 -1
  237. package/dist/revolugo.36.min.js +0 -1
  238. package/dist/revolugo.4.min.js +0 -1
  239. package/dist/revolugo.5.min.js +0 -1
  240. package/dist/revolugo.6.min.js +0 -1
  241. package/dist/revolugo.7.min.js +0 -1
  242. package/dist/revolugo.en-US.min.js +0 -1
  243. package/dist/revolugo.fonts.min.js +0 -1
  244. package/dist/revolugo.fr-FR.min.js +0 -1
@@ -0,0 +1,2497 @@
1
+ import { E as lt, D as mn } from "./revolugo.revolugo-config.B9n_CElG.min.js";
2
+ import { d as qt, c as Ye, o as Ve, r as _n, u as On, e as En, a as Ie, f as ke, n as yn, V as Nt, s as jt } from "./revolugo.i18n.BIDah4Hr.min.js";
3
+ import { n as Rn, z as Qe } from "./revolugo.booking-api-client.Drh0cRTW.min.js";
4
+ import { a as Gt } from "./revolugo.event-bus.CYLYgD3Y.min.js";
5
+ /*!
6
+ * vuex v3.6.2
7
+ * (c) 2021 Evan You
8
+ * @license MIT
9
+ */
10
+ function Tn(t) {
11
+ var e = Number(t.version.split(".")[0]);
12
+ if (e >= 2)
13
+ t.mixin({ beforeCreate: n });
14
+ else {
15
+ var r = t.prototype._init;
16
+ t.prototype._init = function(s) {
17
+ s === void 0 && (s = {}), s.init = s.init ? [n].concat(s.init) : n, r.call(this, s);
18
+ };
19
+ }
20
+ function n() {
21
+ var s = this.$options;
22
+ s.store ? this.$store = typeof s.store == "function" ? s.store() : s.store : s.parent && s.parent.$store && (this.$store = s.parent.$store);
23
+ }
24
+ }
25
+ var Sn = typeof window < "u" ? window : typeof global < "u" ? global : {}, $t = Sn.__VUE_DEVTOOLS_GLOBAL_HOOK__;
26
+ function $n(t) {
27
+ $t && (t._devtoolHook = $t, $t.emit("vuex:init", t), $t.on("vuex:travel-to-state", function(e) {
28
+ t.replaceState(e);
29
+ }), t.subscribe(function(e, r) {
30
+ $t.emit("vuex:mutation", e, r);
31
+ }, { prepend: !0 }), t.subscribeAction(function(e, r) {
32
+ $t.emit("vuex:action", e, r);
33
+ }, { prepend: !0 }));
34
+ }
35
+ function bn(t, e) {
36
+ return t.filter(e)[0];
37
+ }
38
+ function ce(t, e) {
39
+ if (e === void 0 && (e = []), t === null || typeof t != "object")
40
+ return t;
41
+ var r = bn(e, function(s) {
42
+ return s.original === t;
43
+ });
44
+ if (r)
45
+ return r.copy;
46
+ var n = Array.isArray(t) ? [] : {};
47
+ return e.push({
48
+ original: t,
49
+ copy: n
50
+ }), Object.keys(t).forEach(function(s) {
51
+ n[s] = ce(t[s], e);
52
+ }), n;
53
+ }
54
+ function wt(t, e) {
55
+ Object.keys(t).forEach(function(r) {
56
+ return e(t[r], r);
57
+ });
58
+ }
59
+ function We(t) {
60
+ return t !== null && typeof t == "object";
61
+ }
62
+ function wn(t) {
63
+ return t && typeof t.then == "function";
64
+ }
65
+ function Mn(t, e) {
66
+ return function() {
67
+ return t(e);
68
+ };
69
+ }
70
+ var it = function(e, r) {
71
+ this.runtime = r, this._children = /* @__PURE__ */ Object.create(null), this._rawModule = e;
72
+ var n = e.state;
73
+ this.state = (typeof n == "function" ? n() : n) || {};
74
+ }, Ze = { namespaced: { configurable: !0 } };
75
+ Ze.namespaced.get = function() {
76
+ return !!this._rawModule.namespaced;
77
+ };
78
+ it.prototype.addChild = function(e, r) {
79
+ this._children[e] = r;
80
+ };
81
+ it.prototype.removeChild = function(e) {
82
+ delete this._children[e];
83
+ };
84
+ it.prototype.getChild = function(e) {
85
+ return this._children[e];
86
+ };
87
+ it.prototype.hasChild = function(e) {
88
+ return e in this._children;
89
+ };
90
+ it.prototype.update = function(e) {
91
+ this._rawModule.namespaced = e.namespaced, e.actions && (this._rawModule.actions = e.actions), e.mutations && (this._rawModule.mutations = e.mutations), e.getters && (this._rawModule.getters = e.getters);
92
+ };
93
+ it.prototype.forEachChild = function(e) {
94
+ wt(this._children, e);
95
+ };
96
+ it.prototype.forEachGetter = function(e) {
97
+ this._rawModule.getters && wt(this._rawModule.getters, e);
98
+ };
99
+ it.prototype.forEachAction = function(e) {
100
+ this._rawModule.actions && wt(this._rawModule.actions, e);
101
+ };
102
+ it.prototype.forEachMutation = function(e) {
103
+ this._rawModule.mutations && wt(this._rawModule.mutations, e);
104
+ };
105
+ Object.defineProperties(it.prototype, Ze);
106
+ var Ot = function(e) {
107
+ this.register([], e, !1);
108
+ };
109
+ Ot.prototype.get = function(e) {
110
+ return e.reduce(function(r, n) {
111
+ return r.getChild(n);
112
+ }, this.root);
113
+ };
114
+ Ot.prototype.getNamespace = function(e) {
115
+ var r = this.root;
116
+ return e.reduce(function(n, s) {
117
+ return r = r.getChild(s), n + (r.namespaced ? s + "/" : "");
118
+ }, "");
119
+ };
120
+ Ot.prototype.update = function(e) {
121
+ Ke([], this.root, e);
122
+ };
123
+ Ot.prototype.register = function(e, r, n) {
124
+ var s = this;
125
+ n === void 0 && (n = !0);
126
+ var i = new it(r, n);
127
+ if (e.length === 0)
128
+ this.root = i;
129
+ else {
130
+ var c = this.get(e.slice(0, -1));
131
+ c.addChild(e[e.length - 1], i);
132
+ }
133
+ r.modules && wt(r.modules, function(u, d) {
134
+ s.register(e.concat(d), u, n);
135
+ });
136
+ };
137
+ Ot.prototype.unregister = function(e) {
138
+ var r = this.get(e.slice(0, -1)), n = e[e.length - 1], s = r.getChild(n);
139
+ s && s.runtime && r.removeChild(n);
140
+ };
141
+ Ot.prototype.isRegistered = function(e) {
142
+ var r = this.get(e.slice(0, -1)), n = e[e.length - 1];
143
+ return r ? r.hasChild(n) : !1;
144
+ };
145
+ function Ke(t, e, r) {
146
+ if (e.update(r), r.modules)
147
+ for (var n in r.modules) {
148
+ if (!e.getChild(n))
149
+ return;
150
+ Ke(
151
+ t.concat(n),
152
+ e.getChild(n),
153
+ r.modules[n]
154
+ );
155
+ }
156
+ }
157
+ var K, J = function(e) {
158
+ var r = this;
159
+ e === void 0 && (e = {}), !K && typeof window < "u" && window.Vue && tr(window.Vue);
160
+ var n = e.plugins;
161
+ n === void 0 && (n = []);
162
+ var s = e.strict;
163
+ s === void 0 && (s = !1), this._committing = !1, this._actions = /* @__PURE__ */ Object.create(null), this._actionSubscribers = [], this._mutations = /* @__PURE__ */ Object.create(null), this._wrappedGetters = /* @__PURE__ */ Object.create(null), this._modules = new Ot(e), this._modulesNamespaceMap = /* @__PURE__ */ Object.create(null), this._subscribers = [], this._watcherVM = new K(), this._makeLocalGettersCache = /* @__PURE__ */ Object.create(null);
164
+ var i = this, c = this, u = c.dispatch, d = c.commit;
165
+ this.dispatch = function(p, y) {
166
+ return u.call(i, p, y);
167
+ }, this.commit = function(p, y, h) {
168
+ return d.call(i, p, y, h);
169
+ }, this.strict = s;
170
+ var _ = this._modules.root.state;
171
+ Qt(this, _, [], this._modules.root), he(this, _), n.forEach(function(g) {
172
+ return g(r);
173
+ });
174
+ var l = e.devtools !== void 0 ? e.devtools : K.config.devtools;
175
+ l && $n(this);
176
+ }, le = { state: { configurable: !0 } };
177
+ le.state.get = function() {
178
+ return this._vm._data.$$state;
179
+ };
180
+ le.state.set = function(t) {
181
+ };
182
+ J.prototype.commit = function(e, r, n) {
183
+ var s = this, i = Yt(e, r, n), c = i.type, u = i.payload, d = { type: c, payload: u }, _ = this._mutations[c];
184
+ _ && (this._withCommit(function() {
185
+ _.forEach(function(g) {
186
+ g(u);
187
+ });
188
+ }), this._subscribers.slice().forEach(function(l) {
189
+ return l(d, s.state);
190
+ }));
191
+ };
192
+ J.prototype.dispatch = function(e, r) {
193
+ var n = this, s = Yt(e, r), i = s.type, c = s.payload, u = { type: i, payload: c }, d = this._actions[i];
194
+ if (d) {
195
+ try {
196
+ this._actionSubscribers.slice().filter(function(l) {
197
+ return l.before;
198
+ }).forEach(function(l) {
199
+ return l.before(u, n.state);
200
+ });
201
+ } catch {
202
+ }
203
+ var _ = d.length > 1 ? Promise.all(d.map(function(l) {
204
+ return l(c);
205
+ })) : d[0](c);
206
+ return new Promise(function(l, g) {
207
+ _.then(function(p) {
208
+ try {
209
+ n._actionSubscribers.filter(function(y) {
210
+ return y.after;
211
+ }).forEach(function(y) {
212
+ return y.after(u, n.state);
213
+ });
214
+ } catch {
215
+ }
216
+ l(p);
217
+ }, function(p) {
218
+ try {
219
+ n._actionSubscribers.filter(function(y) {
220
+ return y.error;
221
+ }).forEach(function(y) {
222
+ return y.error(u, n.state, p);
223
+ });
224
+ } catch {
225
+ }
226
+ g(p);
227
+ });
228
+ });
229
+ }
230
+ };
231
+ J.prototype.subscribe = function(e, r) {
232
+ return Je(e, this._subscribers, r);
233
+ };
234
+ J.prototype.subscribeAction = function(e, r) {
235
+ var n = typeof e == "function" ? { before: e } : e;
236
+ return Je(n, this._actionSubscribers, r);
237
+ };
238
+ J.prototype.watch = function(e, r, n) {
239
+ var s = this;
240
+ return this._watcherVM.$watch(function() {
241
+ return e(s.state, s.getters);
242
+ }, r, n);
243
+ };
244
+ J.prototype.replaceState = function(e) {
245
+ var r = this;
246
+ this._withCommit(function() {
247
+ r._vm._data.$$state = e;
248
+ });
249
+ };
250
+ J.prototype.registerModule = function(e, r, n) {
251
+ n === void 0 && (n = {}), typeof e == "string" && (e = [e]), this._modules.register(e, r), Qt(this, this.state, e, this._modules.get(e), n.preserveState), he(this, this.state);
252
+ };
253
+ J.prototype.unregisterModule = function(e) {
254
+ var r = this;
255
+ typeof e == "string" && (e = [e]), this._modules.unregister(e), this._withCommit(function() {
256
+ var n = de(r.state, e.slice(0, -1));
257
+ K.delete(n, e[e.length - 1]);
258
+ }), Xe(this);
259
+ };
260
+ J.prototype.hasModule = function(e) {
261
+ return typeof e == "string" && (e = [e]), this._modules.isRegistered(e);
262
+ };
263
+ J.prototype.hotUpdate = function(e) {
264
+ this._modules.update(e), Xe(this, !0);
265
+ };
266
+ J.prototype._withCommit = function(e) {
267
+ var r = this._committing;
268
+ this._committing = !0, e(), this._committing = r;
269
+ };
270
+ Object.defineProperties(J.prototype, le);
271
+ function Je(t, e, r) {
272
+ return e.indexOf(t) < 0 && (r && r.prepend ? e.unshift(t) : e.push(t)), function() {
273
+ var n = e.indexOf(t);
274
+ n > -1 && e.splice(n, 1);
275
+ };
276
+ }
277
+ function Xe(t, e) {
278
+ t._actions = /* @__PURE__ */ Object.create(null), t._mutations = /* @__PURE__ */ Object.create(null), t._wrappedGetters = /* @__PURE__ */ Object.create(null), t._modulesNamespaceMap = /* @__PURE__ */ Object.create(null);
279
+ var r = t.state;
280
+ Qt(t, r, [], t._modules.root, !0), he(t, r, e);
281
+ }
282
+ function he(t, e, r) {
283
+ var n = t._vm;
284
+ t.getters = {}, t._makeLocalGettersCache = /* @__PURE__ */ Object.create(null);
285
+ var s = t._wrappedGetters, i = {};
286
+ wt(s, function(u, d) {
287
+ i[d] = Mn(u, t), Object.defineProperty(t.getters, d, {
288
+ get: function() {
289
+ return t._vm[d];
290
+ },
291
+ enumerable: !0
292
+ // for local getters
293
+ });
294
+ });
295
+ var c = K.config.silent;
296
+ K.config.silent = !0, t._vm = new K({
297
+ data: {
298
+ $$state: e
299
+ },
300
+ computed: i
301
+ }), K.config.silent = c, t.strict && Hn(t), n && (r && t._withCommit(function() {
302
+ n._data.$$state = null;
303
+ }), K.nextTick(function() {
304
+ return n.$destroy();
305
+ }));
306
+ }
307
+ function Qt(t, e, r, n, s) {
308
+ var i = !r.length, c = t._modules.getNamespace(r);
309
+ if (n.namespaced && (t._modulesNamespaceMap[c], t._modulesNamespaceMap[c] = n), !i && !s) {
310
+ var u = de(e, r.slice(0, -1)), d = r[r.length - 1];
311
+ t._withCommit(function() {
312
+ K.set(u, d, n.state);
313
+ });
314
+ }
315
+ var _ = n.context = Dn(t, c, r);
316
+ n.forEachMutation(function(l, g) {
317
+ var p = c + g;
318
+ Cn(t, p, l, _);
319
+ }), n.forEachAction(function(l, g) {
320
+ var p = l.root ? g : c + g, y = l.handler || l;
321
+ Pn(t, p, y, _);
322
+ }), n.forEachGetter(function(l, g) {
323
+ var p = c + g;
324
+ An(t, p, l, _);
325
+ }), n.forEachChild(function(l, g) {
326
+ Qt(t, e, r.concat(g), l, s);
327
+ });
328
+ }
329
+ function Dn(t, e, r) {
330
+ var n = e === "", s = {
331
+ dispatch: n ? t.dispatch : function(i, c, u) {
332
+ var d = Yt(i, c, u), _ = d.payload, l = d.options, g = d.type;
333
+ return (!l || !l.root) && (g = e + g), t.dispatch(g, _);
334
+ },
335
+ commit: n ? t.commit : function(i, c, u) {
336
+ var d = Yt(i, c, u), _ = d.payload, l = d.options, g = d.type;
337
+ (!l || !l.root) && (g = e + g), t.commit(g, _, l);
338
+ }
339
+ };
340
+ return Object.defineProperties(s, {
341
+ getters: {
342
+ get: n ? function() {
343
+ return t.getters;
344
+ } : function() {
345
+ return Fn(t, e);
346
+ }
347
+ },
348
+ state: {
349
+ get: function() {
350
+ return de(t.state, r);
351
+ }
352
+ }
353
+ }), s;
354
+ }
355
+ function Fn(t, e) {
356
+ if (!t._makeLocalGettersCache[e]) {
357
+ var r = {}, n = e.length;
358
+ Object.keys(t.getters).forEach(function(s) {
359
+ if (s.slice(0, n) === e) {
360
+ var i = s.slice(n);
361
+ Object.defineProperty(r, i, {
362
+ get: function() {
363
+ return t.getters[s];
364
+ },
365
+ enumerable: !0
366
+ });
367
+ }
368
+ }), t._makeLocalGettersCache[e] = r;
369
+ }
370
+ return t._makeLocalGettersCache[e];
371
+ }
372
+ function Cn(t, e, r, n) {
373
+ var s = t._mutations[e] || (t._mutations[e] = []);
374
+ s.push(function(c) {
375
+ r.call(t, n.state, c);
376
+ });
377
+ }
378
+ function Pn(t, e, r, n) {
379
+ var s = t._actions[e] || (t._actions[e] = []);
380
+ s.push(function(c) {
381
+ var u = r.call(t, {
382
+ dispatch: n.dispatch,
383
+ commit: n.commit,
384
+ getters: n.getters,
385
+ state: n.state,
386
+ rootGetters: t.getters,
387
+ rootState: t.state
388
+ }, c);
389
+ return wn(u) || (u = Promise.resolve(u)), t._devtoolHook ? u.catch(function(d) {
390
+ throw t._devtoolHook.emit("vuex:error", d), d;
391
+ }) : u;
392
+ });
393
+ }
394
+ function An(t, e, r, n) {
395
+ t._wrappedGetters[e] || (t._wrappedGetters[e] = function(i) {
396
+ return r(
397
+ n.state,
398
+ // local state
399
+ n.getters,
400
+ // local getters
401
+ i.state,
402
+ // root state
403
+ i.getters
404
+ // root getters
405
+ );
406
+ });
407
+ }
408
+ function Hn(t) {
409
+ t._vm.$watch(function() {
410
+ return this._data.$$state;
411
+ }, function() {
412
+ }, { deep: !0, sync: !0 });
413
+ }
414
+ function de(t, e) {
415
+ return e.reduce(function(r, n) {
416
+ return r[n];
417
+ }, t);
418
+ }
419
+ function Yt(t, e, r) {
420
+ return We(t) && t.type && (r = e, e = t, t = t.type), { type: t, payload: e, options: r };
421
+ }
422
+ function tr(t) {
423
+ K && t === K || (K = t, Tn(K));
424
+ }
425
+ var er = Zt(function(t, e) {
426
+ var r = {};
427
+ return Wt(e).forEach(function(n) {
428
+ var s = n.key, i = n.val;
429
+ r[s] = function() {
430
+ var u = this.$store.state, d = this.$store.getters;
431
+ if (t) {
432
+ var _ = Kt(this.$store, "mapState", t);
433
+ if (!_)
434
+ return;
435
+ u = _.context.state, d = _.context.getters;
436
+ }
437
+ return typeof i == "function" ? i.call(this, u, d) : u[i];
438
+ }, r[s].vuex = !0;
439
+ }), r;
440
+ }), rr = Zt(function(t, e) {
441
+ var r = {};
442
+ return Wt(e).forEach(function(n) {
443
+ var s = n.key, i = n.val;
444
+ r[s] = function() {
445
+ for (var u = [], d = arguments.length; d--; )
446
+ u[d] = arguments[d];
447
+ var _ = this.$store.commit;
448
+ if (t) {
449
+ var l = Kt(this.$store, "mapMutations", t);
450
+ if (!l)
451
+ return;
452
+ _ = l.context.commit;
453
+ }
454
+ return typeof i == "function" ? i.apply(this, [_].concat(u)) : _.apply(this.$store, [i].concat(u));
455
+ };
456
+ }), r;
457
+ }), nr = Zt(function(t, e) {
458
+ var r = {};
459
+ return Wt(e).forEach(function(n) {
460
+ var s = n.key, i = n.val;
461
+ i = t + i, r[s] = function() {
462
+ if (!(t && !Kt(this.$store, "mapGetters", t)))
463
+ return this.$store.getters[i];
464
+ }, r[s].vuex = !0;
465
+ }), r;
466
+ }), or = Zt(function(t, e) {
467
+ var r = {};
468
+ return Wt(e).forEach(function(n) {
469
+ var s = n.key, i = n.val;
470
+ r[s] = function() {
471
+ for (var u = [], d = arguments.length; d--; )
472
+ u[d] = arguments[d];
473
+ var _ = this.$store.dispatch;
474
+ if (t) {
475
+ var l = Kt(this.$store, "mapActions", t);
476
+ if (!l)
477
+ return;
478
+ _ = l.context.dispatch;
479
+ }
480
+ return typeof i == "function" ? i.apply(this, [_].concat(u)) : _.apply(this.$store, [i].concat(u));
481
+ };
482
+ }), r;
483
+ }), In = function(t) {
484
+ return {
485
+ mapState: er.bind(null, t),
486
+ mapGetters: nr.bind(null, t),
487
+ mapMutations: rr.bind(null, t),
488
+ mapActions: or.bind(null, t)
489
+ };
490
+ };
491
+ function Wt(t) {
492
+ return kn(t) ? Array.isArray(t) ? t.map(function(e) {
493
+ return { key: e, val: e };
494
+ }) : Object.keys(t).map(function(e) {
495
+ return { key: e, val: t[e] };
496
+ }) : [];
497
+ }
498
+ function kn(t) {
499
+ return Array.isArray(t) || We(t);
500
+ }
501
+ function Zt(t) {
502
+ return function(e, r) {
503
+ return typeof e != "string" ? (r = e, e = "") : e.charAt(e.length - 1) !== "/" && (e += "/"), t(e, r);
504
+ };
505
+ }
506
+ function Kt(t, e, r) {
507
+ var n = t._modulesNamespaceMap[r];
508
+ return n;
509
+ }
510
+ function xn(t) {
511
+ t === void 0 && (t = {});
512
+ var e = t.collapsed;
513
+ e === void 0 && (e = !0);
514
+ var r = t.filter;
515
+ r === void 0 && (r = function(l, g, p) {
516
+ return !0;
517
+ });
518
+ var n = t.transformer;
519
+ n === void 0 && (n = function(l) {
520
+ return l;
521
+ });
522
+ var s = t.mutationTransformer;
523
+ s === void 0 && (s = function(l) {
524
+ return l;
525
+ });
526
+ var i = t.actionFilter;
527
+ i === void 0 && (i = function(l, g) {
528
+ return !0;
529
+ });
530
+ var c = t.actionTransformer;
531
+ c === void 0 && (c = function(l) {
532
+ return l;
533
+ });
534
+ var u = t.logMutations;
535
+ u === void 0 && (u = !0);
536
+ var d = t.logActions;
537
+ d === void 0 && (d = !0);
538
+ var _ = t.logger;
539
+ return _ === void 0 && (_ = console), function(l) {
540
+ var g = ce(l.state);
541
+ typeof _ > "u" || (u && l.subscribe(function(p, y) {
542
+ var h = ce(y);
543
+ if (r(p, g, h)) {
544
+ var b = je(), A = s(p), F = "mutation " + p.type + b;
545
+ xe(_, F, e), _.log("%c prev state", "color: #9E9E9E; font-weight: bold", n(g)), _.log("%c mutation", "color: #03A9F4; font-weight: bold", A), _.log("%c next state", "color: #4CAF50; font-weight: bold", n(h)), Le(_);
546
+ }
547
+ g = h;
548
+ }), d && l.subscribeAction(function(p, y) {
549
+ if (i(p, y)) {
550
+ var h = je(), b = c(p), A = "action " + p.type + h;
551
+ xe(_, A, e), _.log("%c action", "color: #03A9F4; font-weight: bold", b), Le(_);
552
+ }
553
+ }));
554
+ };
555
+ }
556
+ function xe(t, e, r) {
557
+ var n = r ? t.groupCollapsed : t.group;
558
+ try {
559
+ n.call(t, e);
560
+ } catch {
561
+ t.log(e);
562
+ }
563
+ }
564
+ function Le(t) {
565
+ try {
566
+ t.groupEnd();
567
+ } catch {
568
+ t.log("—— log end ——");
569
+ }
570
+ }
571
+ function je() {
572
+ var t = /* @__PURE__ */ new Date();
573
+ return " @ " + Ut(t.getHours(), 2) + ":" + Ut(t.getMinutes(), 2) + ":" + Ut(t.getSeconds(), 2) + "." + Ut(t.getMilliseconds(), 3);
574
+ }
575
+ function Ln(t, e) {
576
+ return new Array(e + 1).join(t);
577
+ }
578
+ function Ut(t, e) {
579
+ return Ln("0", e - t.toString().length) + t;
580
+ }
581
+ var jn = {
582
+ Store: J,
583
+ install: tr,
584
+ version: "3.6.2",
585
+ mapState: er,
586
+ mapMutations: rr,
587
+ mapGetters: nr,
588
+ mapActions: or,
589
+ createNamespacedHelpers: In,
590
+ createLogger: xn
591
+ };
592
+ const Un = jn;
593
+ var Vt = {
594
+ /**
595
+ * THIS OBJECT IS REPLACED AT RUNTIME WITH THE ACTUAL VUEX STORE
596
+ */
597
+ store: {
598
+ state: null,
599
+ commit: function() {
600
+ },
601
+ dispatch: function() {
602
+ }
603
+ }
604
+ };
605
+ function zo() {
606
+ for (var t, e = [], r = arguments.length; r--; )
607
+ e[r] = arguments[r];
608
+ return (t = Vt.store).dispatch.apply(t, e);
609
+ }
610
+ function Bn(t) {
611
+ return pt(t) && !Array.isArray(t);
612
+ }
613
+ function pt(t) {
614
+ return !!t && typeof t == "object";
615
+ }
616
+ function Ue(t) {
617
+ return typeof t == "number" || /^\d+$/.test(t);
618
+ }
619
+ function Nn(t, e) {
620
+ return pt(t) && e in t;
621
+ }
622
+ function Jt(t) {
623
+ return t ? Array.isArray(t) ? t.map(function(e) {
624
+ return String(e);
625
+ }) : typeof t == "object" ? Object.keys(t) : typeof t == "string" ? t.match(/[-$\w]+/g) || [] : [] : [];
626
+ }
627
+ function ir(t, e) {
628
+ var r = t, n = Jt(e);
629
+ return n.every(function(s) {
630
+ var i = pt(r) && r.hasOwnProperty(s);
631
+ return r = i ? r[s] : void 0, i;
632
+ }), r;
633
+ }
634
+ function zn(t, e, r, n) {
635
+ n === void 0 && (n = !1);
636
+ var s = Jt(e);
637
+ return s.reduce(function(i, c, u) {
638
+ if (!i)
639
+ return !1;
640
+ if (Array.isArray(i) && Ue(c) && (c = parseInt(c)), u === s.length - 1)
641
+ return i[c] = r, !0;
642
+ if (!pt(i[c]) || !(c in i))
643
+ if (n)
644
+ i[c] = Ue(s[u + 1]) ? [] : {};
645
+ else
646
+ return !1;
647
+ return i[c];
648
+ }, t);
649
+ }
650
+ function qn(t, e) {
651
+ var r = Jt(e);
652
+ if (pt(t)) {
653
+ for (; r.length; ) {
654
+ var n = r.shift();
655
+ if (Nn(t, n))
656
+ t = t[n];
657
+ else
658
+ return !1;
659
+ }
660
+ return !0;
661
+ }
662
+ return !1;
663
+ }
664
+ function Gn(t) {
665
+ return JSON.parse(JSON.stringify(t));
666
+ }
667
+ var dt = {
668
+ mapping: "standard",
669
+ // map states to store members using the "standard" scheme
670
+ strict: !0,
671
+ // throw an error if the store member cannot be found
672
+ cache: !0,
673
+ // cache generated functions for faster re-use
674
+ deep: 1
675
+ // allow sub-property access, but not creation
676
+ }, Yn = {
677
+ camel: function() {
678
+ for (var t = [], e = arguments.length; e--; )
679
+ t[e] = arguments[e];
680
+ return t.shift() + t.map(function(r) {
681
+ return r.replace(/\w/, function(n) {
682
+ return n.toUpperCase();
683
+ });
684
+ }).join("");
685
+ },
686
+ snake: function() {
687
+ for (var t, e = [], r = arguments.length; r--; )
688
+ e[r] = arguments[r];
689
+ return (t = this).camel.apply(t, e).replace(/([a-z])([A-Z])/g, function(n, s, i) {
690
+ return s + "_" + i;
691
+ }).toLowerCase();
692
+ },
693
+ const: function() {
694
+ for (var t, e = [], r = arguments.length; r--; )
695
+ e[r] = arguments[r];
696
+ return (t = this).snake.apply(t, e).toUpperCase();
697
+ }
698
+ }, Vn = {
699
+ state: "state",
700
+ getters: "getters",
701
+ actions: "_actions",
702
+ mutations: "_mutations"
703
+ }, Be = {
704
+ /**
705
+ * Standard name mapping function
706
+ *
707
+ * Adheres to seemingly the most common Vuex naming pattern
708
+ *
709
+ * @param {string} type The member type, i.e state, getters, mutations, or actions
710
+ * @param {string} name The name of the property being targeted, i.e. value
711
+ * @param {object} formatters A formatters object with common format functions, camel, snake, const
712
+ * @returns {string}
713
+ */
714
+ standard: function(e, r, n) {
715
+ switch (e) {
716
+ case "mutations":
717
+ return n.const("set", r);
718
+ case "actions":
719
+ return n.camel("set", r);
720
+ }
721
+ return r;
722
+ },
723
+ /**
724
+ * Simple name mapping function
725
+ */
726
+ simple: function(e, r, n) {
727
+ return e === "actions" ? n.camel("set", r) : r;
728
+ }
729
+ }, se;
730
+ function bt(t, e) {
731
+ if (e.match(/!$/))
732
+ return e.substr(0, e.length - 1);
733
+ var r = se;
734
+ if (!r) {
735
+ if (r = Be[dt.mapping], !r)
736
+ throw new Error("[Vuex Pathify] Unknown mapping '" + dt.mapping + `' in options
737
+ - Choose one of '` + Object.keys(Be).join("', '") + `'
738
+ - Or, supply a custom function
739
+ `);
740
+ se = r;
741
+ }
742
+ return se(t, e, Yn);
743
+ }
744
+ function ue(t, e) {
745
+ var r = e.replace(/[/@!]+/g, "."), n = e.split("@"), s = n[0], i = n[1], c, u;
746
+ if (s.indexOf("/") > -1) {
747
+ var d = s.split("/");
748
+ u = d.pop(), c = d.join("/");
749
+ } else
750
+ u = s;
751
+ if (c && !t._modulesNamespaceMap[c + "/"])
752
+ throw new Error("[Vuex Pathify] Unknown module '" + c + "' via path '" + e + "'");
753
+ return {
754
+ absPath: r,
755
+ module: c,
756
+ target: s,
757
+ name: u.replace("!", ""),
758
+ isDynamic: e.indexOf(":") > -1,
759
+ /**
760
+ * Returns properties about the targeted member
761
+ *
762
+ * @param {string} type The member type, i.e state, getters, mutations, or actions
763
+ * @returns {{exists: boolean, member: object, type: string, path: string}}
764
+ */
765
+ get: function(_) {
766
+ var l = t[Vn[_]], g = bt(_, u), p = c ? c + "/" + g : g;
767
+ return {
768
+ exists: _ === "state" ? qn(l, p) : p in l,
769
+ member: l,
770
+ trgPath: p,
771
+ trgName: g,
772
+ objPath: i
773
+ };
774
+ }
775
+ };
776
+ }
777
+ var _t = function(e, r, n) {
778
+ this.expr = e, this.path = r, this.value = n;
779
+ };
780
+ _t.prototype.update = function(e) {
781
+ var r = zn(e, this.path, this.value, dt.deep > 1);
782
+ return Array.isArray(e) ? [].concat(e) : Object.assign({}, e);
783
+ };
784
+ _t.isSerialized = function(t) {
785
+ return Bn(t) && "expr" in t && "path" in t && "value" in t;
786
+ };
787
+ function Qn(t, e) {
788
+ var r = ue(t, e), n = r.get("actions");
789
+ if (n.exists)
790
+ return function(i) {
791
+ var c = n.objPath ? new _t(e, n.objPath, i) : i;
792
+ return t.dispatch(n.trgPath, c);
793
+ };
794
+ var s = r.get("mutations");
795
+ return s.exists || r.isDynamic ? function(i) {
796
+ if (r.isDynamic) {
797
+ var c = ar(e, this);
798
+ s = ue(t, c).get("mutations");
799
+ }
800
+ var u = s.objPath ? new _t(e, s.objPath, i) : i;
801
+ return t.commit(s.trgPath, u);
802
+ } : function(i) {
803
+ };
804
+ }
805
+ function sr(t, e, r) {
806
+ var n = ue(t, e), s;
807
+ if (!r && (s = n.get("getters"), s.exists))
808
+ return function() {
809
+ var c = s.member[s.trgPath];
810
+ return s.objPath ? Ne(e, c, s.objPath) : c;
811
+ };
812
+ var i = n.get("state");
813
+ return i.exists || n.isDynamic ? function() {
814
+ var c = n.isDynamic ? ar(n.absPath, this) : n.absPath;
815
+ return Ne(e, t.state, c);
816
+ } : function() {
817
+ };
818
+ }
819
+ function Ne(t, e, r) {
820
+ return ir(e, r);
821
+ }
822
+ function ar(t, e) {
823
+ return t.replace(/:(\w+)/g, function(n, s) {
824
+ return s in e || console.error('Error resolving dynamic store path: The property "' + s + '" does not exist on the scope', e), e[s];
825
+ });
826
+ }
827
+ function Wn(t) {
828
+ t.set = function(e, r) {
829
+ var n = Qn(t, e);
830
+ if (typeof n < "u")
831
+ return n(r);
832
+ }, t.get = function(e) {
833
+ for (var r = [], n = arguments.length - 1; n-- > 0; )
834
+ r[n] = arguments[n + 1];
835
+ var s = sr(t, e);
836
+ if (typeof s < "u") {
837
+ var i = s();
838
+ return typeof i == "function" ? i.apply(void 0, r) : i;
839
+ }
840
+ }, t.copy = function(e) {
841
+ for (var r = [], n = arguments.length - 1; n-- > 0; )
842
+ r[n] = arguments[n + 1];
843
+ var s = t.get.apply(t, [e].concat(r));
844
+ return pt(s) ? Gn(s) : s;
845
+ };
846
+ }
847
+ function Bt(t) {
848
+ return bt(t, "value");
849
+ }
850
+ function Zn() {
851
+ console.log(`
852
+ [Vuex Pathify] Options:
853
+
854
+ Mapping (` + dt.mapping + `)
855
+ -------------------------------
856
+ path : value
857
+ state : ` + Bt("state") + `
858
+ getters : ` + Bt("getters") + `
859
+ actions : ` + Bt("actions") + `
860
+ mutations : ` + Bt("mutations") + `
861
+
862
+ Settings
863
+ -------------------------------
864
+ strict : ` + dt.strict + `
865
+ cache : ` + dt.cache + `
866
+ deep : ` + dt.deep + `
867
+
868
+ `);
869
+ }
870
+ function Kn(t) {
871
+ Vt.store = t, Wn(t);
872
+ }
873
+ var Jn = {
874
+ options: dt,
875
+ plugin: Kn,
876
+ debug: Zn
877
+ };
878
+ function ve(t) {
879
+ return Jt(typeof t == "function" ? t() : t);
880
+ }
881
+ function Xn(t) {
882
+ return ve(t).reduce(function(e, r) {
883
+ var n = bt("getters", r);
884
+ return e[n] = function(s) {
885
+ return s[r];
886
+ }, e;
887
+ }, {});
888
+ }
889
+ function to(t) {
890
+ return ve(t).reduce(function(e, r) {
891
+ var n = bt("mutations", r);
892
+ return e[n] = function(s, i) {
893
+ i instanceof _t ? i = i.update(s[r]) : _t.isSerialized(i) && (i = _t.prototype.update.call(i, s[r])), s[r] = i;
894
+ }, e;
895
+ }, {});
896
+ }
897
+ function eo(t) {
898
+ return ve(t).reduce(function(e, r) {
899
+ var n = bt("actions", r), s = bt("mutations", r);
900
+ return e[n] = function(i, c) {
901
+ var u = i.commit;
902
+ u(s, c);
903
+ }, e;
904
+ }, {});
905
+ }
906
+ var At = {
907
+ getters: Xn,
908
+ mutations: to,
909
+ actions: eo
910
+ };
911
+ function ro(t, e, r) {
912
+ return io(t, e) ? no(t, e).concat(oo(t, r)) : "";
913
+ }
914
+ function no(t, e) {
915
+ var r = t.match(/([^/@\.]+)$/)[1], n = t.substring(0, t.length - r.length), s = n.replace(/\W+$/, "").split(/[/@.]/), i = n ? ir(e, s) : e;
916
+ if (!i)
917
+ return console.error("[Vuex Pathify] Unable to expand wildcard path '" + t + `':
918
+ - It looks like '` + n.replace(/\W+$/, "") + "' does not resolve to an existing state property"), [];
919
+ var c = new RegExp("^" + r.replace(/\*/g, "\\w+") + "$");
920
+ return Object.keys(i).filter(function(u) {
921
+ return c.test(u);
922
+ }).map(function(u) {
923
+ return n + u;
924
+ });
925
+ }
926
+ function oo(t, e) {
927
+ var r = new RegExp("^" + t.replace(/\*/g, "\\w+") + "$");
928
+ return Object.keys(e).filter(function(n) {
929
+ return r.test(n);
930
+ });
931
+ }
932
+ function io(t, e) {
933
+ return t.indexOf("*") > -1 && /\*.*[/@.]/.test(t) ? (console.error("[Vuex Pathify] Invalid wildcard placement for path '" + t + `':
934
+ - Wildcards may only be used in the last segment of a path`), !1) : e ? !0 : (console.error("[Vuex Pathify] Unable to expand wildcard path '" + t + `':
935
+ - The usual reason for this is that the router was set up before the store
936
+ - Make sure the store is imported before the router, then reload`), !1);
937
+ }
938
+ function so(t, e, r) {
939
+ if (typeof t == "string" && t.indexOf("*") > -1)
940
+ return ae(r(t));
941
+ if (Array.isArray(t))
942
+ return ae(t);
943
+ if (pt(t) && (e = t, t = ""), Array.isArray(e)) {
944
+ var n = e.map(function(s) {
945
+ return ze(t, s);
946
+ });
947
+ return ae(n);
948
+ }
949
+ return pt(e) ? Object.keys(e).reduce(function(s, i) {
950
+ return s[i] = ze(t, e[i]), s;
951
+ }, {}) : t;
952
+ }
953
+ function ze(t, e) {
954
+ e === void 0 && (e = ""), t = t.replace(/\/+$/, "");
955
+ var r = t.indexOf("@") > -1 ? t + "." + e : t + "/" + e;
956
+ return r.replace(/^\/|[.@/]+$/, "").replace(/\/@/, "@").replace(/@\./, "@");
957
+ }
958
+ function ae(t) {
959
+ return t.reduce(function(e, r) {
960
+ var n = r.match(/\w+$/);
961
+ return e[n] = r, e;
962
+ }, {});
963
+ }
964
+ function qo(t, e) {
965
+ return ao(t, e, co, function(r) {
966
+ return ro(r, Vt.store.state, Vt.store.getters);
967
+ });
968
+ }
969
+ function ao(t, e, r, n) {
970
+ var s = so(t, e, n);
971
+ return typeof s == "string" ? r(s) : (Object.keys(s).forEach(function(i) {
972
+ s[i] = r(s[i]);
973
+ }), s);
974
+ }
975
+ function co(t, e) {
976
+ var r, n;
977
+ return function() {
978
+ for (var s = [], i = arguments.length; i--; )
979
+ s[i] = arguments[i];
980
+ if (!this.$store)
981
+ throw new Error(`[Vuex Pathify] Unexpected condition: this.$store is undefined.
982
+
983
+ This is a known edge case with some setups and will cause future lookups to fail`);
984
+ return (!r || n !== this.$store) && (n = this.$store, r = sr(n, t, e)), r.call.apply(r, [this].concat(s));
985
+ };
986
+ }
987
+ const cr = {
988
+ breakpointObservers: {}
989
+ }, uo = {
990
+ getBreakpointService: (t) => (e) => t.breakpointObservers[e]
991
+ }, fo = At.mutations(cr), lo = {
992
+ getters: uo,
993
+ mutations: fo,
994
+ namespaced: !0,
995
+ state: cr
996
+ }, vt = () => window.RevolugoElements.bookingApiClient, ur = {
997
+ address: void 0,
998
+ adultCount: 0,
999
+ checkInDate: "",
1000
+ checkOutDate: "",
1001
+ children: null,
1002
+ hasError: !1,
1003
+ id: void 0,
1004
+ isFetching: !1,
1005
+ latitude: void 0,
1006
+ longitude: void 0,
1007
+ roomCount: 0,
1008
+ sourceMarket: Rn.Fr
1009
+ }, ho = {
1010
+ nightCount(t) {
1011
+ return qt(t.checkOutDate, "YYYY-MM-DD").diff(
1012
+ qt(t.checkInDate, "YYYY-MM-DD"),
1013
+ "day"
1014
+ );
1015
+ }
1016
+ }, vo = At.mutations(ur), po = {
1017
+ // eslint-disable-next-line max-statements
1018
+ createHotelOfferRequest: async ({ commit: t }, e) => {
1019
+ const r = vt();
1020
+ if (r)
1021
+ try {
1022
+ t("SET_HAS_ERROR", !1), t("SET_ID", void 0), t("SET_IS_FETCHING", !0);
1023
+ const n = {
1024
+ body: {
1025
+ address: e.address,
1026
+ adultCount: e.adultCount,
1027
+ checkInDate: e.checkInDate,
1028
+ checkOutDate: e.checkOutDate,
1029
+ children: e.children,
1030
+ latitude: e.latitude,
1031
+ longitude: e.longitude,
1032
+ roomCount: e.roomCount,
1033
+ sourceMarket: e.sourceMarket
1034
+ }
1035
+ }, { eventMetadata: s } = window.RevolugoElements.config;
1036
+ Ye(s) || (n.body.eventMetadata = {
1037
+ ...Ve(s, ["name", "slug"]),
1038
+ name: s.slug || s.name
1039
+ });
1040
+ const i = await (r == null ? void 0 : r.hotelOfferRequests.create(
1041
+ n
1042
+ ));
1043
+ (i.adultCount !== e.adultCount || i.checkInDate !== e.checkInDate || i.checkOutDate !== e.checkOutDate || i.children !== e.children || i.sourceMarket !== e.sourceMarket) && console.warn(
1044
+ `Hotel offer request params mismatch: adultCount: ${i.adultCount} : ${e.adultCount}, checkInDate: ${i.checkInDate} : ${e.checkInDate}, checkOutDate: ${i.checkOutDate} : ${e.checkOutDate}, children: ${i.children} : ${e.children}, roomCount: ${i.roomCount} : ${e.roomCount}, sourceMarket: ${i.sourceMarket} : ${e.sourceMarket}`
1045
+ ), t("SET_ADDRESS", i.address), t("SET_ADULT_COUNT", i.adultCount), t("SET_CHECK_OUT_DATE", i.checkOutDate), t("SET_CHECK_IN_DATE", i.checkInDate), t("SET_CHILDREN", i.children), t("SET_ID", i.id), t("SET_LATITUDE", i.latitude), t("SET_LONGITUDE", i.longitude), t("SET_ROOM_COUNT", i.roomCount), t("SET_SOURCE_MARKET", i.sourceMarket), window.RevolugoElements.eventBus.$emit(
1046
+ lt.HOTEL_OFFER_REQUEST_CREATED,
1047
+ i
1048
+ );
1049
+ } catch (n) {
1050
+ t("SET_HAS_ERROR", !0), console.error("Cannot create hotel offer request:", n);
1051
+ } finally {
1052
+ setTimeout(() => {
1053
+ t("SET_IS_FETCHING", !1);
1054
+ }, 500);
1055
+ }
1056
+ },
1057
+ resetId: ({ commit: t }) => {
1058
+ t("SET_ID", void 0);
1059
+ },
1060
+ retrieveHotelOfferRequest: async ({ commit: t }, e) => {
1061
+ try {
1062
+ const r = vt();
1063
+ if (!r)
1064
+ return;
1065
+ t("SET_HAS_ERROR", !1), t("SET_ID", void 0), t("SET_IS_FETCHING", !0);
1066
+ const n = await (r == null ? void 0 : r.hotelOfferRequests.retrieve({
1067
+ id: e
1068
+ }));
1069
+ if (n.id !== e)
1070
+ throw new Error(
1071
+ `Hotel offer request id mismatch: requested: ${e}, retrieved: ${n.id}`
1072
+ );
1073
+ t("SET_ADDRESS", n.address), t("SET_ADULT_COUNT", n.adultCount), t("SET_CHECK_OUT_DATE", n.checkOutDate), t("SET_CHECK_IN_DATE", n.checkInDate), t("SET_CHILDREN", n.children), t("SET_ID", n.id), t("SET_LATITUDE", n.latitude), t("SET_LONGITUDE", n.longitude), t("SET_ROOM_COUNT", n.roomCount), t("SET_SOURCE_MARKET", n.sourceMarket), window.RevolugoElements.eventBus.$emit(
1074
+ lt.HOTEL_OFFER_REQUEST_RETRIEVED,
1075
+ n
1076
+ );
1077
+ } catch (r) {
1078
+ t("SET_HAS_ERROR", !0), t("SET_ID", void 0), console.error("Cannot retrieve hotel offer request:", r);
1079
+ } finally {
1080
+ setTimeout(() => {
1081
+ t("SET_IS_FETCHING", !1);
1082
+ }, 500);
1083
+ }
1084
+ }
1085
+ }, go = {
1086
+ actions: po,
1087
+ getters: ho,
1088
+ mutations: vo,
1089
+ namespaced: !0,
1090
+ state: ur
1091
+ };
1092
+ Array.from({ length: 40 }).map(
1093
+ () => _n(0, 10)
1094
+ );
1095
+ const mo = 10;
1096
+ var _o = /* @__PURE__ */ ((t) => (t.PRICE = "price", t.RATING = "rating", t.REVIEW_RATING = "review_rating", t.SORT_BY = "sort_by", t))(_o || {});
1097
+ const Oo = "", Eo = 0, yo = [0, 0], Ro = Qe.TopPicks, To = "asc", fr = {
1098
+ rating: Oo,
1099
+ review_rating: Eo,
1100
+ price: yo,
1101
+ sort_by: {
1102
+ value: Ro,
1103
+ direction: To
1104
+ }
1105
+ }, lr = {
1106
+ isPolling: !1,
1107
+ pollingPayload: void 0,
1108
+ hasError: !1,
1109
+ hotelOffersCurrency: void 0,
1110
+ hotelOffers: [],
1111
+ priceHistogram: [],
1112
+ priceMax: 0,
1113
+ priceMin: 0,
1114
+ filters: fr,
1115
+ startingAfter: null
1116
+ }, zt = {
1117
+ priceHistogramStepCount(t) {
1118
+ return t.priceHistogram ? t.priceHistogram.length : 0;
1119
+ },
1120
+ // eslint-disable-next-line @typescript-eslint/max-params
1121
+ getPriceMin(t, e, r, n) {
1122
+ return !t.priceMin || !t.hotelOffersCurrency ? 0 : Math.round(
1123
+ ke({
1124
+ amount: t.priceMin,
1125
+ currency: t.hotelOffersCurrency
1126
+ }) / n["hotelOfferRequest/nightCount"] / r.hotelOfferRequest.roomCount
1127
+ );
1128
+ },
1129
+ // eslint-disable-next-line @typescript-eslint/max-params
1130
+ getPriceMax(t, e, r, n) {
1131
+ return !t.priceMax || !t.hotelOffersCurrency ? 0 : Math.round(
1132
+ ke({
1133
+ amount: t.priceMax,
1134
+ currency: t.hotelOffersCurrency
1135
+ }) / n["hotelOfferRequest/nightCount"] / r.hotelOfferRequest.roomCount
1136
+ );
1137
+ },
1138
+ isPriceFilterActive(t) {
1139
+ return t.filters.price[0] !== 0 || t.filters.price[1] !== 0;
1140
+ },
1141
+ isStarRatingFilterActive(t) {
1142
+ return t.filters.rating !== "";
1143
+ },
1144
+ isReviewRatingFilterActive(t) {
1145
+ return t.filters.review_rating !== 0;
1146
+ },
1147
+ // eslint-disable-next-line @typescript-eslint/no-shadow, @typescript-eslint/no-explicit-any
1148
+ activeFiltersNumber(t, e) {
1149
+ return [
1150
+ e.isPriceFilterActive,
1151
+ e.isStarRatingFilterActive,
1152
+ e.isReviewRatingFilterActive
1153
+ ].filter(Boolean).length;
1154
+ },
1155
+ // eslint-disable-next-line @typescript-eslint/max-params
1156
+ transformFilterPrices(t, e, r, n) {
1157
+ if (!(!t.filters.price || t.filters.price[0] === 0 && t.filters.price[1] === 0))
1158
+ return t.filters.price.map(
1159
+ (s) => yn({
1160
+ amount: s * n["hotelOfferRequest/nightCount"] * r.hotelOfferRequest.roomCount,
1161
+ currency: window.RevolugoElements.config.currency
1162
+ })
1163
+ );
1164
+ }
1165
+ }, So = {
1166
+ ...At.mutations(lr),
1167
+ ADD_HOTEL_OFFERS(t, e) {
1168
+ t.hotelOffers = On(
1169
+ [...t.hotelOffers ?? [], ...e],
1170
+ "id"
1171
+ );
1172
+ }
1173
+ }, $o = {
1174
+ saveFilters({ commit: t }, e) {
1175
+ t("SET_FILTERS", e);
1176
+ },
1177
+ resetFilters({ commit: t, state: e }) {
1178
+ t("SET_FILTERS", {
1179
+ ...fr,
1180
+ sort_by: e.filters.sort_by
1181
+ });
1182
+ },
1183
+ resetHotelOffers({ commit: t }) {
1184
+ t("SET_HOTEL_OFFERS", []);
1185
+ },
1186
+ retrieveHotelOffers: En(
1187
+ async ({ commit: t, state: e, rootState: r, rootGetters: n }, s) => {
1188
+ var c, u, d, _;
1189
+ if (!s.hotelOfferRequestId)
1190
+ return;
1191
+ const i = vt();
1192
+ if (i) {
1193
+ const l = {
1194
+ ...s,
1195
+ priceHistogramStepCount: mo,
1196
+ filterByReviewRating: e.filters.review_rating || void 0,
1197
+ filterByPrice: (c = zt.transformFilterPrices(e, void 0, r, n)) == null ? void 0 : c.join("-"),
1198
+ filterByStar: e.filters.rating || void 0,
1199
+ onlyRecommendedHotelOffers: ((u = e.filters.sort_by) == null ? void 0 : u.value) === Qe.TopPicks,
1200
+ sortBy: (d = e.filters.sort_by) == null ? void 0 : d.value,
1201
+ sortByOrder: (_ = e.filters.sort_by) == null ? void 0 : _.direction,
1202
+ currency: window.RevolugoElements.config.currency,
1203
+ lang: window.RevolugoElements.config.lang
1204
+ };
1205
+ if (e.isPolling && Ie(e.pollingPayload, l))
1206
+ return;
1207
+ Gt.$emit(lt.HOTEL_OFFERS_POLLING_STARTED), t("SET_IS_POLLING", !0), t("SET_POLLING_PAYLOAD", l), t("SET_HAS_ERROR", !1), s.startingAfter || t("SET_HOTEL_OFFERS", []), t("SET_HOTEL_OFFERS_CURRENCY", null), await (i == null ? void 0 : i.hotelOffers.list(
1208
+ l,
1209
+ (g, p) => {
1210
+ var A, F;
1211
+ if (!Ie(e.pollingPayload, l))
1212
+ return;
1213
+ if (g) {
1214
+ t("SET_IS_POLLING", !1), t("SET_HAS_ERROR", !0), console.error("Cannot retrieve hotel offers:", g);
1215
+ return;
1216
+ }
1217
+ if (t(
1218
+ "SET_IS_POLLING",
1219
+ (((A = p == null ? void 0 : p.meta) == null ? void 0 : A.status) ?? "").toLowerCase() !== "complete"
1220
+ ), !((F = p == null ? void 0 : p.data) != null && F.hotelOffers))
1221
+ return;
1222
+ s.startingAfter ? t("ADD_HOTEL_OFFERS", p.data.hotelOffers) : t("SET_HOTEL_OFFERS", p.data.hotelOffers), Gt.$emit(
1223
+ lt.HOTEL_OFFERS_RETRIEVED,
1224
+ p.data.hotelOffers
1225
+ ), t("SET_HOTEL_OFFERS_CURRENCY", p.data.currency), t("SET_PRICE_HISTOGRAM", p.data.priceHistogram), t("SET_PRICE_MIN", p.data.priceMin), t("SET_PRICE_MAX", p.data.priceMax), t("SET_STARTING_AFTER", p.meta.startingAfter);
1226
+ const y = (k) => {
1227
+ const L = zt.getPriceMin(
1228
+ e,
1229
+ void 0,
1230
+ r,
1231
+ n
1232
+ ), H = zt.getPriceMax(
1233
+ e,
1234
+ void 0,
1235
+ r,
1236
+ n
1237
+ );
1238
+ return L === H && L === 0 ? !0 : k >= L && k <= H;
1239
+ }, h = y(e.filters.price[0]) ? e.filters.price[0] : 0, b = y(e.filters.price[1]) ? e.filters.price[1] : 0;
1240
+ t("SET_FILTERS", {
1241
+ ...e.filters,
1242
+ price: [h, b]
1243
+ });
1244
+ },
1245
+ {
1246
+ maxCallCount: 10
1247
+ }
1248
+ ).catch((g) => {
1249
+ t("SET_IS_POLLING", !1), t("SET_HAS_ERROR", !0), console.error("Cannot retrieve hotel offers:", g);
1250
+ }));
1251
+ }
1252
+ },
1253
+ 100
1254
+ )
1255
+ }, bo = {
1256
+ actions: $o,
1257
+ namespaced: !0,
1258
+ getters: zt,
1259
+ mutations: So,
1260
+ state: lr
1261
+ }, fe = {
1262
+ hotelRoomOfferRequestByHotelId: {}
1263
+ }, wo = {
1264
+ hotelRoomOfferRequest(t) {
1265
+ return (e) => t.hotelRoomOfferRequestByHotelId[e];
1266
+ },
1267
+ nightCount(t) {
1268
+ return (e) => {
1269
+ if (t.hotelRoomOfferRequestByHotelId[e])
1270
+ return qt(
1271
+ t.hotelRoomOfferRequestByHotelId[e].checkOutDate,
1272
+ "YYYY-MM-DD"
1273
+ ).diff(
1274
+ qt(
1275
+ t.hotelRoomOfferRequestByHotelId[e].checkInDate,
1276
+ "YYYY-MM-DD"
1277
+ ),
1278
+ "day"
1279
+ );
1280
+ };
1281
+ }
1282
+ }, Mo = {
1283
+ ...At.mutations(fe),
1284
+ DELETE_HOTEL_ROOM_OFFER_REQUEST(t, e) {
1285
+ Nt.set(t.hotelRoomOfferRequestByHotelId, e, void 0);
1286
+ },
1287
+ RESET_HOTEL_ROOM_OFFER_REQUEST(t, e) {
1288
+ Nt.set(t.hotelRoomOfferRequestByHotelId, e, {
1289
+ ...t.hotelRoomOfferRequestByHotelId[e],
1290
+ hasError: !1,
1291
+ id: null
1292
+ });
1293
+ },
1294
+ RESET_HOTEL_ROOM_OFFER_REQUESTS() {
1295
+ fe.hotelRoomOfferRequestByHotelId = {};
1296
+ },
1297
+ SET_HOTEL_ROOM_OFFER_REQUEST(t, e) {
1298
+ Nt.set(t.hotelRoomOfferRequestByHotelId, e.hotelId, {
1299
+ ...t.hotelRoomOfferRequestByHotelId[e.hotelId],
1300
+ ...e
1301
+ });
1302
+ }
1303
+ }, Do = {
1304
+ createHotelRoomOfferRequest: async ({ commit: t }, e) => {
1305
+ const r = vt();
1306
+ if (r)
1307
+ try {
1308
+ t("SET_HOTEL_ROOM_OFFER_REQUEST", {
1309
+ hasError: !1,
1310
+ hotelId: e.hotelId,
1311
+ id: void 0,
1312
+ isFetching: !0
1313
+ });
1314
+ const n = {
1315
+ body: {
1316
+ adultCount: e.adultCount,
1317
+ checkInDate: e.checkInDate,
1318
+ checkOutDate: e.checkOutDate,
1319
+ children: e.children,
1320
+ hotelId: e.hotelId,
1321
+ roomCount: e.roomCount,
1322
+ sourceMarket: e.sourceMarket
1323
+ }
1324
+ }, { eventMetadata: s } = window.RevolugoElements.config;
1325
+ Ye(s) || (n.body.eventMetadata = {
1326
+ ...Ve(s, ["name", "slug"]),
1327
+ name: s.slug || s.name
1328
+ });
1329
+ const i = await r.hotelRoomOfferRequests.create(
1330
+ n
1331
+ );
1332
+ (i.adultCount !== e.adultCount || i.checkInDate !== e.checkInDate || i.checkOutDate !== e.checkOutDate || i.children !== e.children || i.sourceMarket !== e.sourceMarket) && console.warn(
1333
+ `Hotel offer request params mismatch: adultCount: ${i.adultCount} : ${e.adultCount}, checkInDate: ${i.checkInDate} : ${e.checkInDate}, checkOutDate: ${i.checkOutDate} : ${e.checkOutDate}, children: ${i.children} : ${e.children}, roomCount: ${i.roomCount} : ${e.roomCount}, sourceMarket: ${i.sourceMarket} : ${e.sourceMarket}`
1334
+ ), t("SET_HOTEL_ROOM_OFFER_REQUEST", {
1335
+ ...i,
1336
+ hasError: !1,
1337
+ isFetching: !1
1338
+ }), window.RevolugoElements.eventBus.$emit(
1339
+ lt.HOTEL_ROOM_OFFER_REQUEST_CREATED,
1340
+ i
1341
+ );
1342
+ } catch (n) {
1343
+ t("SET_HOTEL_ROOM_OFFER_REQUEST", {
1344
+ hasError: !0,
1345
+ hotelId: e.hotelId
1346
+ }), console.error("Cannot create hotel room offer request:", n);
1347
+ }
1348
+ },
1349
+ deleteHotelRoomOfferRequest({ commit: t }, e) {
1350
+ t("DELETE_HOTEL_ROOM_OFFER_REQUEST", e);
1351
+ },
1352
+ resetHotelRoomOfferRequest({ commit: t }, e) {
1353
+ t("RESET_HOTEL_ROOM_OFFER_REQUESTS", e);
1354
+ },
1355
+ resetHotelRoomOfferRequests({ commit: t }) {
1356
+ t("RESET_HOTEL_ROOM_OFFER_REQUESTS");
1357
+ },
1358
+ async retrieveHotelRoomOfferRequest({ commit: t }, {
1359
+ hotelId: e,
1360
+ hotelRoomOfferRequestId: r
1361
+ }) {
1362
+ try {
1363
+ const n = vt();
1364
+ if (!n)
1365
+ return;
1366
+ t("SET_HOTEL_ROOM_OFFER_REQUEST", {
1367
+ hasError: !1,
1368
+ hotelId: e,
1369
+ id: void 0,
1370
+ isFetching: !0
1371
+ });
1372
+ const s = await (n == null ? void 0 : n.hotelRoomOfferRequests.retrieve({
1373
+ id: r
1374
+ }));
1375
+ if (s.hotelId !== e)
1376
+ throw new Error(
1377
+ "Hotel room offer request does not match provided hotel id"
1378
+ );
1379
+ if (s.id !== r)
1380
+ throw new Error(
1381
+ `Hotel room offer request id mismatch: requested: ${r}, retrieved: ${s.id}`
1382
+ );
1383
+ t("SET_HOTEL_ROOM_OFFER_REQUEST", {
1384
+ ...s,
1385
+ isFetching: !1
1386
+ }), window.RevolugoElements.eventBus.$emit(
1387
+ lt.HOTEL_ROOM_OFFER_REQUEST_RETRIEVED,
1388
+ s
1389
+ );
1390
+ } catch (n) {
1391
+ t("DELETE_HOTEL_ROOM_OFFER_REQUEST", e), console.error("Cannot retrieve hotel offer request:", n);
1392
+ }
1393
+ }
1394
+ }, Fo = {
1395
+ actions: Do,
1396
+ getters: wo,
1397
+ mutations: Mo,
1398
+ namespaced: !0,
1399
+ state: fe
1400
+ };
1401
+ var Co = { 860: function(t) {
1402
+ t.exports = function() {
1403
+ var e = 1e3, r = 6e4, n = 36e5, s = "millisecond", i = "second", c = "minute", u = "hour", d = "day", _ = "week", l = "month", g = "quarter", p = "year", y = "date", h = "Invalid Date", b = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, A = /\[([^\]]+)]|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, F = { 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) {
1404
+ var O = ["th", "st", "nd", "rd"], v = T % 100;
1405
+ return "[" + T + (O[(v - 20) % 10] || O[v] || O[0]) + "]";
1406
+ } }, k = function(T, O, v) {
1407
+ var E = String(T);
1408
+ return !E || E.length >= O ? T : "" + Array(O + 1 - E.length).join(v) + T;
1409
+ }, L = { s: k, z: function(T) {
1410
+ var O = -T.utcOffset(), v = Math.abs(O), E = Math.floor(v / 60), m = v % 60;
1411
+ return (O <= 0 ? "+" : "-") + k(E, 2, "0") + ":" + k(m, 2, "0");
1412
+ }, m: function T(O, v) {
1413
+ if (O.date() < v.date())
1414
+ return -T(v, O);
1415
+ var E = 12 * (v.year() - O.year()) + (v.month() - O.month()), m = O.clone().add(E, l), S = v - m < 0, $ = O.clone().add(E + (S ? -1 : 1), l);
1416
+ return +(-(E + (v - m) / (S ? m - $ : $ - m)) || 0);
1417
+ }, a: function(T) {
1418
+ return T < 0 ? Math.ceil(T) || 0 : Math.floor(T);
1419
+ }, p: function(T) {
1420
+ return { M: l, y: p, w: _, d, D: y, h: u, m: c, s: i, ms: s, Q: g }[T] || String(T || "").toLowerCase().replace(/s$/, "");
1421
+ }, u: function(T) {
1422
+ return T === void 0;
1423
+ } }, H = "en", q = {};
1424
+ q[H] = F;
1425
+ var Q = "$isDayjsObject", X = function(T) {
1426
+ return T instanceof Et || !(!T || !T[Q]);
1427
+ }, z = function T(O, v, E) {
1428
+ var m;
1429
+ if (!O)
1430
+ return H;
1431
+ if (typeof O == "string") {
1432
+ var S = O.toLowerCase();
1433
+ q[S] && (m = S), v && (q[S] = v, m = S);
1434
+ var $ = O.split("-");
1435
+ if (!m && $.length > 1)
1436
+ return T($[0]);
1437
+ } else {
1438
+ var I = O.name;
1439
+ q[I] = O, m = I;
1440
+ }
1441
+ return !E && m && (H = m), m || !E && H;
1442
+ }, x = function(T, O) {
1443
+ if (X(T))
1444
+ return T.clone();
1445
+ var v = typeof O == "object" ? O : {};
1446
+ return v.date = T, v.args = arguments, new Et(v);
1447
+ }, w = L;
1448
+ w.l = z, w.i = X, w.w = function(T, O) {
1449
+ return x(T, { locale: O.$L, utc: O.$u, x: O.$x, $offset: O.$offset });
1450
+ };
1451
+ var Et = function() {
1452
+ function T(v) {
1453
+ this.$L = z(v.locale, null, !0), this.parse(v), this.$x = this.$x || v.x || {}, this[Q] = !0;
1454
+ }
1455
+ var O = T.prototype;
1456
+ return O.parse = function(v) {
1457
+ this.$d = function(E) {
1458
+ var m = E.date, S = E.utc;
1459
+ if (m === null)
1460
+ return /* @__PURE__ */ new Date(NaN);
1461
+ if (w.u(m))
1462
+ return /* @__PURE__ */ new Date();
1463
+ if (m instanceof Date)
1464
+ return new Date(m);
1465
+ if (typeof m == "string" && !/Z$/i.test(m)) {
1466
+ var $ = m.match(b);
1467
+ if ($) {
1468
+ var I = $[2] - 1 || 0, C = ($[7] || "0").substring(0, 3);
1469
+ return S ? new Date(Date.UTC($[1], I, $[3] || 1, $[4] || 0, $[5] || 0, $[6] || 0, C)) : new Date($[1], I, $[3] || 1, $[4] || 0, $[5] || 0, $[6] || 0, C);
1470
+ }
1471
+ }
1472
+ return new Date(m);
1473
+ }(v), this.init();
1474
+ }, O.init = function() {
1475
+ var v = this.$d;
1476
+ this.$y = v.getFullYear(), this.$M = v.getMonth(), this.$D = v.getDate(), this.$W = v.getDay(), this.$H = v.getHours(), this.$m = v.getMinutes(), this.$s = v.getSeconds(), this.$ms = v.getMilliseconds();
1477
+ }, O.$utils = function() {
1478
+ return w;
1479
+ }, O.isValid = function() {
1480
+ return this.$d.toString() !== h;
1481
+ }, O.isSame = function(v, E) {
1482
+ var m = x(v);
1483
+ return this.startOf(E) <= m && m <= this.endOf(E);
1484
+ }, O.isAfter = function(v, E) {
1485
+ return x(v) < this.startOf(E);
1486
+ }, O.isBefore = function(v, E) {
1487
+ return this.endOf(E) < x(v);
1488
+ }, O.$g = function(v, E, m) {
1489
+ return w.u(v) ? this[E] : this.set(m, v);
1490
+ }, O.unix = function() {
1491
+ return Math.floor(this.valueOf() / 1e3);
1492
+ }, O.valueOf = function() {
1493
+ return this.$d.getTime();
1494
+ }, O.startOf = function(v, E) {
1495
+ var m = this, S = !!w.u(E) || E, $ = w.p(v), I = function(at, V) {
1496
+ var W = w.w(m.$u ? Date.UTC(m.$y, V, at) : new Date(m.$y, V, at), m);
1497
+ return S ? W : W.endOf(d);
1498
+ }, C = function(at, V) {
1499
+ return w.w(m.toDate()[at].apply(m.toDate("s"), (S ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(V)), m);
1500
+ }, B = this.$W, G = this.$M, Z = this.$D, ht = "set" + (this.$u ? "UTC" : "");
1501
+ switch ($) {
1502
+ case p:
1503
+ return S ? I(1, 0) : I(31, 11);
1504
+ case l:
1505
+ return S ? I(1, G) : I(0, G + 1);
1506
+ case _:
1507
+ var st = this.$locale().weekStart || 0, gt = (B < st ? B + 7 : B) - st;
1508
+ return I(S ? Z - gt : Z + (6 - gt), G);
1509
+ case d:
1510
+ case y:
1511
+ return C(ht + "Hours", 0);
1512
+ case u:
1513
+ return C(ht + "Minutes", 1);
1514
+ case c:
1515
+ return C(ht + "Seconds", 2);
1516
+ case i:
1517
+ return C(ht + "Milliseconds", 3);
1518
+ default:
1519
+ return this.clone();
1520
+ }
1521
+ }, O.endOf = function(v) {
1522
+ return this.startOf(v, !1);
1523
+ }, O.$set = function(v, E) {
1524
+ var m, S = w.p(v), $ = "set" + (this.$u ? "UTC" : ""), I = (m = {}, m[d] = $ + "Date", m[y] = $ + "Date", m[l] = $ + "Month", m[p] = $ + "FullYear", m[u] = $ + "Hours", m[c] = $ + "Minutes", m[i] = $ + "Seconds", m[s] = $ + "Milliseconds", m)[S], C = S === d ? this.$D + (E - this.$W) : E;
1525
+ if (S === l || S === p) {
1526
+ var B = this.clone().set(y, 1);
1527
+ B.$d[I](C), B.init(), this.$d = B.set(y, Math.min(this.$D, B.daysInMonth())).$d;
1528
+ } else
1529
+ I && this.$d[I](C);
1530
+ return this.init(), this;
1531
+ }, O.set = function(v, E) {
1532
+ return this.clone().$set(v, E);
1533
+ }, O.get = function(v) {
1534
+ return this[w.p(v)]();
1535
+ }, O.add = function(v, E) {
1536
+ var m, S = this;
1537
+ v = Number(v);
1538
+ var $ = w.p(E), I = function(G) {
1539
+ var Z = x(S);
1540
+ return w.w(Z.date(Z.date() + Math.round(G * v)), S);
1541
+ };
1542
+ if ($ === l)
1543
+ return this.set(l, this.$M + v);
1544
+ if ($ === p)
1545
+ return this.set(p, this.$y + v);
1546
+ if ($ === d)
1547
+ return I(1);
1548
+ if ($ === _)
1549
+ return I(7);
1550
+ var C = (m = {}, m[c] = r, m[u] = n, m[i] = e, m)[$] || 1, B = this.$d.getTime() + v * C;
1551
+ return w.w(B, this);
1552
+ }, O.subtract = function(v, E) {
1553
+ return this.add(-1 * v, E);
1554
+ }, O.format = function(v) {
1555
+ var E = this, m = this.$locale();
1556
+ if (!this.isValid())
1557
+ return m.invalidDate || h;
1558
+ var S = v || "YYYY-MM-DDTHH:mm:ssZ", $ = w.z(this), I = this.$H, C = this.$m, B = this.$M, G = m.weekdays, Z = m.months, ht = m.meridiem, st = function(V, W, ct, ut) {
1559
+ return V && (V[W] || V(E, S)) || ct[W].slice(0, ut);
1560
+ }, gt = function(V) {
1561
+ return w.s(I % 12 || 12, V, "0");
1562
+ }, at = ht || function(V, W, ct) {
1563
+ var ut = V < 12 ? "AM" : "PM";
1564
+ return ct ? ut.toLowerCase() : ut;
1565
+ };
1566
+ return S.replace(A, function(V, W) {
1567
+ return W || function(ct) {
1568
+ switch (ct) {
1569
+ case "YY":
1570
+ return String(E.$y).slice(-2);
1571
+ case "YYYY":
1572
+ return w.s(E.$y, 4, "0");
1573
+ case "M":
1574
+ return B + 1;
1575
+ case "MM":
1576
+ return w.s(B + 1, 2, "0");
1577
+ case "MMM":
1578
+ return st(m.monthsShort, B, Z, 3);
1579
+ case "MMMM":
1580
+ return st(Z, B);
1581
+ case "D":
1582
+ return E.$D;
1583
+ case "DD":
1584
+ return w.s(E.$D, 2, "0");
1585
+ case "d":
1586
+ return String(E.$W);
1587
+ case "dd":
1588
+ return st(m.weekdaysMin, E.$W, G, 2);
1589
+ case "ddd":
1590
+ return st(m.weekdaysShort, E.$W, G, 3);
1591
+ case "dddd":
1592
+ return G[E.$W];
1593
+ case "H":
1594
+ return String(I);
1595
+ case "HH":
1596
+ return w.s(I, 2, "0");
1597
+ case "h":
1598
+ return gt(1);
1599
+ case "hh":
1600
+ return gt(2);
1601
+ case "a":
1602
+ return at(I, C, !0);
1603
+ case "A":
1604
+ return at(I, C, !1);
1605
+ case "m":
1606
+ return String(C);
1607
+ case "mm":
1608
+ return w.s(C, 2, "0");
1609
+ case "s":
1610
+ return String(E.$s);
1611
+ case "ss":
1612
+ return w.s(E.$s, 2, "0");
1613
+ case "SSS":
1614
+ return w.s(E.$ms, 3, "0");
1615
+ case "Z":
1616
+ return $;
1617
+ }
1618
+ return null;
1619
+ }(V) || $.replace(":", "");
1620
+ });
1621
+ }, O.utcOffset = function() {
1622
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
1623
+ }, O.diff = function(v, E, m) {
1624
+ var S, $ = this, I = w.p(E), C = x(v), B = (C.utcOffset() - this.utcOffset()) * r, G = this - C, Z = function() {
1625
+ return w.m($, C);
1626
+ };
1627
+ switch (I) {
1628
+ case p:
1629
+ S = Z() / 12;
1630
+ break;
1631
+ case l:
1632
+ S = Z();
1633
+ break;
1634
+ case g:
1635
+ S = Z() / 3;
1636
+ break;
1637
+ case _:
1638
+ S = (G - B) / 6048e5;
1639
+ break;
1640
+ case d:
1641
+ S = (G - B) / 864e5;
1642
+ break;
1643
+ case u:
1644
+ S = G / n;
1645
+ break;
1646
+ case c:
1647
+ S = G / r;
1648
+ break;
1649
+ case i:
1650
+ S = G / e;
1651
+ break;
1652
+ default:
1653
+ S = G;
1654
+ }
1655
+ return m ? S : w.a(S);
1656
+ }, O.daysInMonth = function() {
1657
+ return this.endOf(l).$D;
1658
+ }, O.$locale = function() {
1659
+ return q[this.$L];
1660
+ }, O.locale = function(v, E) {
1661
+ if (!v)
1662
+ return this.$L;
1663
+ var m = this.clone(), S = z(v, E, !0);
1664
+ return S && (m.$L = S), m;
1665
+ }, O.clone = function() {
1666
+ return w.w(this.$d, this);
1667
+ }, O.toDate = function() {
1668
+ return new Date(this.valueOf());
1669
+ }, O.toJSON = function() {
1670
+ return this.isValid() ? this.toISOString() : null;
1671
+ }, O.toISOString = function() {
1672
+ return this.$d.toISOString();
1673
+ }, O.toString = function() {
1674
+ return this.$d.toUTCString();
1675
+ }, T;
1676
+ }(), Mt = Et.prototype;
1677
+ return x.prototype = Mt, [["$ms", s], ["$s", i], ["$m", c], ["$H", u], ["$W", d], ["$M", l], ["$y", p], ["$D", y]].forEach(function(T) {
1678
+ Mt[T[1]] = function(O) {
1679
+ return this.$g(O, T[0], T[1]);
1680
+ };
1681
+ }), x.extend = function(T, O) {
1682
+ return T.$i || (T(O, Et, x), T.$i = !0), x;
1683
+ }, x.locale = z, x.isDayjs = X, x.unix = function(T) {
1684
+ return x(1e3 * T);
1685
+ }, x.en = q[H], x.Ls = q, x.p = {}, x;
1686
+ }();
1687
+ }, 84: function(t) {
1688
+ t.exports = function(e, r, n) {
1689
+ r.prototype.isBetween = function(s, i, c, u) {
1690
+ var d = n(s), _ = n(i), l = (u = u || "()")[0] === "(", g = u[1] === ")";
1691
+ return (l ? this.isAfter(d, c) : !this.isBefore(d, c)) && (g ? this.isBefore(_, c) : !this.isAfter(_, c)) || (l ? this.isBefore(d, c) : !this.isAfter(d, c)) && (g ? this.isAfter(_, c) : !this.isBefore(_, c));
1692
+ };
1693
+ };
1694
+ }, 183: function(t) {
1695
+ t.exports = function(e, r) {
1696
+ r.prototype.isSameOrAfter = function(n, s) {
1697
+ return this.isSame(n, s) || this.isAfter(n, s);
1698
+ };
1699
+ };
1700
+ }, 839: function(t) {
1701
+ t.exports = function(e, r) {
1702
+ r.prototype.isSameOrBefore = function(n, s) {
1703
+ return this.isSame(n, s) || this.isBefore(n, s);
1704
+ };
1705
+ };
1706
+ }, 710: function(t) {
1707
+ var e, r;
1708
+ t.exports = (e = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, r = {}, function(n, s, i) {
1709
+ var c, u = function(g, p, y) {
1710
+ y === void 0 && (y = {});
1711
+ var h = new Date(g), b = function(A, F) {
1712
+ F === void 0 && (F = {});
1713
+ var k = F.timeZoneName || "short", L = A + "|" + k, H = r[L];
1714
+ return H || (H = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: A, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: k }), r[L] = H), H;
1715
+ }(p, y);
1716
+ return b.formatToParts(h);
1717
+ }, d = function(g, p) {
1718
+ for (var y = u(g, p), h = [], b = 0; b < y.length; b += 1) {
1719
+ var A = y[b], F = A.type, k = A.value, L = e[F];
1720
+ L >= 0 && (h[L] = parseInt(k, 10));
1721
+ }
1722
+ var H = h[3], q = H === 24 ? 0 : H, Q = h[0] + "-" + h[1] + "-" + h[2] + " " + q + ":" + h[4] + ":" + h[5] + ":000", X = +g;
1723
+ return (i.utc(Q).valueOf() - (X -= X % 1e3)) / 6e4;
1724
+ }, _ = s.prototype;
1725
+ _.tz = function(g, p) {
1726
+ g === void 0 && (g = c);
1727
+ var y = this.utcOffset(), h = this.toDate(), b = h.toLocaleString("en-US", { timeZone: g }), A = Math.round((h - new Date(b)) / 1e3 / 60), F = i(b, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(15 * -Math.round(h.getTimezoneOffset() / 15) - A, !0);
1728
+ if (p) {
1729
+ var k = F.utcOffset();
1730
+ F = F.add(y - k, "minute");
1731
+ }
1732
+ return F.$x.$timezone = g, F;
1733
+ }, _.offsetName = function(g) {
1734
+ var p = this.$x.$timezone || i.tz.guess(), y = u(this.valueOf(), p, { timeZoneName: g }).find(function(h) {
1735
+ return h.type.toLowerCase() === "timezonename";
1736
+ });
1737
+ return y && y.value;
1738
+ };
1739
+ var l = _.startOf;
1740
+ _.startOf = function(g, p) {
1741
+ if (!this.$x || !this.$x.$timezone)
1742
+ return l.call(this, g, p);
1743
+ var y = i(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
1744
+ return l.call(y, g, p).tz(this.$x.$timezone, !0);
1745
+ }, i.tz = function(g, p, y) {
1746
+ var h = y && p, b = y || p || c, A = d(+i(), b);
1747
+ if (typeof g != "string")
1748
+ return i(g).tz(b);
1749
+ var F = function(q, Q, X) {
1750
+ var z = q - 60 * Q * 1e3, x = d(z, X);
1751
+ if (Q === x)
1752
+ return [z, Q];
1753
+ var w = d(z -= 60 * (x - Q) * 1e3, X);
1754
+ return x === w ? [z, x] : [q - 60 * Math.min(x, w) * 1e3, Math.max(x, w)];
1755
+ }(i.utc(g, h).valueOf(), A, b), k = F[0], L = F[1], H = i(k).utcOffset(L);
1756
+ return H.$x.$timezone = b, H;
1757
+ }, i.tz.guess = function() {
1758
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
1759
+ }, i.tz.setDefault = function(g) {
1760
+ c = g;
1761
+ };
1762
+ });
1763
+ }, 132: function(t) {
1764
+ var e, r, n;
1765
+ t.exports = (e = "minute", r = /[+-]\d\d(?::?\d\d)?/g, n = /([+-]|\d\d)/g, function(s, i, c) {
1766
+ var u = i.prototype;
1767
+ c.utc = function(h) {
1768
+ return new i({ date: h, utc: !0, args: arguments });
1769
+ }, u.utc = function(h) {
1770
+ var b = c(this.toDate(), { locale: this.$L, utc: !0 });
1771
+ return h ? b.add(this.utcOffset(), e) : b;
1772
+ }, u.local = function() {
1773
+ return c(this.toDate(), { locale: this.$L, utc: !1 });
1774
+ };
1775
+ var d = u.parse;
1776
+ u.parse = function(h) {
1777
+ h.utc && (this.$u = !0), this.$utils().u(h.$offset) || (this.$offset = h.$offset), d.call(this, h);
1778
+ };
1779
+ var _ = u.init;
1780
+ u.init = function() {
1781
+ if (this.$u) {
1782
+ var h = this.$d;
1783
+ this.$y = h.getUTCFullYear(), this.$M = h.getUTCMonth(), this.$D = h.getUTCDate(), this.$W = h.getUTCDay(), this.$H = h.getUTCHours(), this.$m = h.getUTCMinutes(), this.$s = h.getUTCSeconds(), this.$ms = h.getUTCMilliseconds();
1784
+ } else
1785
+ _.call(this);
1786
+ };
1787
+ var l = u.utcOffset;
1788
+ u.utcOffset = function(h, b) {
1789
+ var A = this.$utils().u;
1790
+ if (A(h))
1791
+ return this.$u ? 0 : A(this.$offset) ? l.call(this) : this.$offset;
1792
+ if (typeof h == "string" && (h = function(H) {
1793
+ H === void 0 && (H = "");
1794
+ var q = H.match(r);
1795
+ if (!q)
1796
+ return null;
1797
+ var Q = ("" + q[0]).match(n) || ["-", 0, 0], X = Q[0], z = 60 * +Q[1] + +Q[2];
1798
+ return z === 0 ? 0 : X === "+" ? z : -z;
1799
+ }(h), h === null))
1800
+ return this;
1801
+ var F = Math.abs(h) <= 16 ? 60 * h : h, k = this;
1802
+ if (b)
1803
+ return k.$offset = F, k.$u = h === 0, k;
1804
+ if (h !== 0) {
1805
+ var L = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
1806
+ (k = this.local().add(F + L, e)).$offset = F, k.$x.$localOffset = L;
1807
+ } else
1808
+ k = this.utc();
1809
+ return k;
1810
+ };
1811
+ var g = u.format;
1812
+ u.format = function(h) {
1813
+ var b = h || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
1814
+ return g.call(this, b);
1815
+ }, u.valueOf = function() {
1816
+ var h = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
1817
+ return this.$d.valueOf() - 6e4 * h;
1818
+ }, u.isUTC = function() {
1819
+ return !!this.$u;
1820
+ }, u.toISOString = function() {
1821
+ return this.toDate().toISOString();
1822
+ }, u.toString = function() {
1823
+ return this.toDate().toUTCString();
1824
+ };
1825
+ var p = u.toDate;
1826
+ u.toDate = function(h) {
1827
+ return h === "s" && this.$offset ? c(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : p.call(this);
1828
+ };
1829
+ var y = u.diff;
1830
+ u.diff = function(h, b, A) {
1831
+ if (h && this.$u === h.$u)
1832
+ return y.call(this, h, b, A);
1833
+ var F = this.local(), k = c(h).local();
1834
+ return y.call(F, k, b, A);
1835
+ };
1836
+ });
1837
+ } }, qe = {};
1838
+ function N(t) {
1839
+ var e = qe[t];
1840
+ if (e !== void 0)
1841
+ return e.exports;
1842
+ var r = qe[t] = { exports: {} };
1843
+ return Co[t].call(r.exports, r, r.exports, N), r.exports;
1844
+ }
1845
+ N.n = (t) => {
1846
+ var e = t && t.__esModule ? () => t.default : () => t;
1847
+ return N.d(e, { a: e }), e;
1848
+ }, N.d = (t, e) => {
1849
+ for (var r in e)
1850
+ N.o(e, r) && !N.o(t, r) && Object.defineProperty(t, r, { enumerable: !0, get: e[r] });
1851
+ }, N.o = (t, e) => Object.prototype.hasOwnProperty.call(t, e);
1852
+ var Xt = {};
1853
+ (() => {
1854
+ N.d(Xt, { b4: () => vn, eE: () => He, HO: () => pn, Ms: () => oe });
1855
+ var t = N(860), e = N.n(t), r = N(84), n = N.n(r), s = N(183), i = N.n(s), c = N(839), u = N.n(c), d = N(710), _ = N.n(d), l = N(132), g = N.n(l), p = Object.prototype;
1856
+ const y = function(o) {
1857
+ var a = o && o.constructor;
1858
+ return o === (typeof a == "function" && a.prototype || p);
1859
+ }, h = /* @__PURE__ */ function(o, a) {
1860
+ return function(f) {
1861
+ return o(a(f));
1862
+ };
1863
+ }(Object.keys, Object);
1864
+ var b = Object.prototype.hasOwnProperty;
1865
+ const A = function(o) {
1866
+ if (!y(o))
1867
+ return h(o);
1868
+ var a = [];
1869
+ for (var f in Object(o))
1870
+ b.call(o, f) && f != "constructor" && a.push(f);
1871
+ return a;
1872
+ }, F = typeof global == "object" && global && global.Object === Object && global;
1873
+ var k = typeof self == "object" && self && self.Object === Object && self;
1874
+ const L = F || k || Function("return this")(), H = L.Symbol;
1875
+ var q = Object.prototype, Q = q.hasOwnProperty, X = q.toString, z = H ? H.toStringTag : void 0;
1876
+ const x = function(o) {
1877
+ var a = Q.call(o, z), f = o[z];
1878
+ try {
1879
+ o[z] = void 0;
1880
+ var R = !0;
1881
+ } catch {
1882
+ }
1883
+ var D = X.call(o);
1884
+ return R && (a ? o[z] = f : delete o[z]), D;
1885
+ };
1886
+ var w = Object.prototype.toString;
1887
+ const Et = function(o) {
1888
+ return w.call(o);
1889
+ };
1890
+ var Mt = H ? H.toStringTag : void 0;
1891
+ const T = function(o) {
1892
+ return o == null ? o === void 0 ? "[object Undefined]" : "[object Null]" : Mt && Mt in Object(o) ? x(o) : Et(o);
1893
+ }, O = function(o) {
1894
+ var a = typeof o;
1895
+ return o != null && (a == "object" || a == "function");
1896
+ }, v = function(o) {
1897
+ if (!O(o))
1898
+ return !1;
1899
+ var a = T(o);
1900
+ return a == "[object Function]" || a == "[object GeneratorFunction]" || a == "[object AsyncFunction]" || a == "[object Proxy]";
1901
+ }, E = L["__core-js_shared__"];
1902
+ var m, S = (m = /[^.]+$/.exec(E && E.keys && E.keys.IE_PROTO || "")) ? "Symbol(src)_1." + m : "";
1903
+ const $ = function(o) {
1904
+ return !!S && S in o;
1905
+ };
1906
+ var I = Function.prototype.toString;
1907
+ const C = function(o) {
1908
+ if (o != null) {
1909
+ try {
1910
+ return I.call(o);
1911
+ } catch {
1912
+ }
1913
+ try {
1914
+ return o + "";
1915
+ } catch {
1916
+ }
1917
+ }
1918
+ return "";
1919
+ };
1920
+ var B = /^\[object .+?Constructor\]$/, G = Function.prototype, Z = Object.prototype, ht = G.toString, st = Z.hasOwnProperty, gt = RegExp("^" + ht.call(st).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
1921
+ const at = function(o) {
1922
+ return !(!O(o) || $(o)) && (v(o) ? gt : B).test(C(o));
1923
+ }, V = function(o, a) {
1924
+ return o == null ? void 0 : o[a];
1925
+ }, W = function(o, a) {
1926
+ var f = V(o, a);
1927
+ return at(f) ? f : void 0;
1928
+ }, ct = W(L, "DataView"), ut = W(L, "Map"), te = W(L, "Promise"), yt = W(L, "Set"), ee = W(L, "WeakMap");
1929
+ var pe = "[object Map]", ge = "[object Promise]", me = "[object Set]", _e = "[object WeakMap]", Oe = "[object DataView]", dr = C(ct), vr = C(ut), pr = C(te), gr = C(yt), mr = C(ee), mt = T;
1930
+ (ct && mt(new ct(new ArrayBuffer(1))) != Oe || ut && mt(new ut()) != pe || te && mt(te.resolve()) != ge || yt && mt(new yt()) != me || ee && mt(new ee()) != _e) && (mt = function(o) {
1931
+ var a = T(o), f = a == "[object Object]" ? o.constructor : void 0, R = f ? C(f) : "";
1932
+ if (R)
1933
+ switch (R) {
1934
+ case dr:
1935
+ return Oe;
1936
+ case vr:
1937
+ return pe;
1938
+ case pr:
1939
+ return ge;
1940
+ case gr:
1941
+ return me;
1942
+ case mr:
1943
+ return _e;
1944
+ }
1945
+ return a;
1946
+ });
1947
+ const _r = mt, re = function(o) {
1948
+ return o != null && typeof o == "object";
1949
+ }, Ee = function(o) {
1950
+ return re(o) && T(o) == "[object Arguments]";
1951
+ };
1952
+ var ye = Object.prototype, Or = ye.hasOwnProperty, Er = ye.propertyIsEnumerable;
1953
+ const yr = Ee(/* @__PURE__ */ function() {
1954
+ return arguments;
1955
+ }()) ? Ee : function(o) {
1956
+ return re(o) && Or.call(o, "callee") && !Er.call(o, "callee");
1957
+ }, Rr = Array.isArray, Re = function(o) {
1958
+ return typeof o == "number" && o > -1 && o % 1 == 0 && o <= 9007199254740991;
1959
+ }, Tr = function(o) {
1960
+ return o != null && Re(o.length) && !v(o);
1961
+ }, Sr = function() {
1962
+ return !1;
1963
+ };
1964
+ var Te = typeof exports == "object" && exports && !exports.nodeType && exports, Se = Te && typeof module == "object" && module && !module.nodeType && module, $e = Se && Se.exports === Te ? L.Buffer : void 0;
1965
+ const $r = ($e ? $e.isBuffer : void 0) || Sr;
1966
+ var j = {};
1967
+ j["[object Float32Array]"] = j["[object Float64Array]"] = j["[object Int8Array]"] = j["[object Int16Array]"] = j["[object Int32Array]"] = j["[object Uint8Array]"] = j["[object Uint8ClampedArray]"] = j["[object Uint16Array]"] = j["[object Uint32Array]"] = !0, j["[object Arguments]"] = j["[object Array]"] = j["[object ArrayBuffer]"] = j["[object Boolean]"] = j["[object DataView]"] = j["[object Date]"] = j["[object Error]"] = j["[object Function]"] = j["[object Map]"] = j["[object Number]"] = j["[object Object]"] = j["[object RegExp]"] = j["[object Set]"] = j["[object String]"] = j["[object WeakMap]"] = !1;
1968
+ const br = function(o) {
1969
+ return re(o) && Re(o.length) && !!j[T(o)];
1970
+ }, wr = function(o) {
1971
+ return function(a) {
1972
+ return o(a);
1973
+ };
1974
+ };
1975
+ var be = typeof exports == "object" && exports && !exports.nodeType && exports, Dt = be && typeof module == "object" && module && !module.nodeType && module, ne = Dt && Dt.exports === be && F.process, we = function() {
1976
+ try {
1977
+ var o = Dt && Dt.require && Dt.require("util").types;
1978
+ return o || ne && ne.binding && ne.binding("util");
1979
+ } catch {
1980
+ }
1981
+ }(), Me = we && we.isTypedArray;
1982
+ const Mr = Me ? wr(Me) : br;
1983
+ var Dr = Object.prototype.hasOwnProperty;
1984
+ const Ft = function(o) {
1985
+ if (o == null)
1986
+ return !0;
1987
+ if (Tr(o) && (Rr(o) || typeof o == "string" || typeof o.splice == "function" || $r(o) || Mr(o) || yr(o)))
1988
+ return !o.length;
1989
+ var a = _r(o);
1990
+ if (a == "[object Map]" || a == "[object Set]")
1991
+ return !o.size;
1992
+ if (y(o))
1993
+ return !A(o).length;
1994
+ for (var f in o)
1995
+ if (Dr.call(o, f))
1996
+ return !1;
1997
+ return !0;
1998
+ }, Fr = function(o) {
1999
+ for (var a = -1, f = o == null ? 0 : o.length, R = 0, D = []; ++a < f; ) {
2000
+ var M = o[a];
2001
+ M && (D[R++] = M);
2002
+ }
2003
+ return D;
2004
+ }, Ct = W(Object, "create"), Cr = function() {
2005
+ this.__data__ = Ct ? Ct(null) : {}, this.size = 0;
2006
+ }, Pr = function(o) {
2007
+ var a = this.has(o) && delete this.__data__[o];
2008
+ return this.size -= a ? 1 : 0, a;
2009
+ };
2010
+ var Ar = Object.prototype.hasOwnProperty;
2011
+ const Hr = function(o) {
2012
+ var a = this.__data__;
2013
+ if (Ct) {
2014
+ var f = a[o];
2015
+ return f === "__lodash_hash_undefined__" ? void 0 : f;
2016
+ }
2017
+ return Ar.call(a, o) ? a[o] : void 0;
2018
+ };
2019
+ var Ir = Object.prototype.hasOwnProperty;
2020
+ const kr = function(o) {
2021
+ var a = this.__data__;
2022
+ return Ct ? a[o] !== void 0 : Ir.call(a, o);
2023
+ }, xr = function(o, a) {
2024
+ var f = this.__data__;
2025
+ return this.size += this.has(o) ? 0 : 1, f[o] = Ct && a === void 0 ? "__lodash_hash_undefined__" : a, this;
2026
+ };
2027
+ function Rt(o) {
2028
+ var a = -1, f = o == null ? 0 : o.length;
2029
+ for (this.clear(); ++a < f; ) {
2030
+ var R = o[a];
2031
+ this.set(R[0], R[1]);
2032
+ }
2033
+ }
2034
+ Rt.prototype.clear = Cr, Rt.prototype.delete = Pr, Rt.prototype.get = Hr, Rt.prototype.has = kr, Rt.prototype.set = xr;
2035
+ const De = Rt, Lr = function() {
2036
+ this.__data__ = [], this.size = 0;
2037
+ }, jr = function(o, a) {
2038
+ return o === a || o != o && a != a;
2039
+ }, Ht = function(o, a) {
2040
+ for (var f = o.length; f--; )
2041
+ if (jr(o[f][0], a))
2042
+ return f;
2043
+ return -1;
2044
+ };
2045
+ var Ur = Array.prototype.splice;
2046
+ const Br = function(o) {
2047
+ var a = this.__data__, f = Ht(a, o);
2048
+ return !(f < 0) && (f == a.length - 1 ? a.pop() : Ur.call(a, f, 1), --this.size, !0);
2049
+ }, Nr = function(o) {
2050
+ var a = this.__data__, f = Ht(a, o);
2051
+ return f < 0 ? void 0 : a[f][1];
2052
+ }, zr = function(o) {
2053
+ return Ht(this.__data__, o) > -1;
2054
+ }, qr = function(o, a) {
2055
+ var f = this.__data__, R = Ht(f, o);
2056
+ return R < 0 ? (++this.size, f.push([o, a])) : f[R][1] = a, this;
2057
+ };
2058
+ function Tt(o) {
2059
+ var a = -1, f = o == null ? 0 : o.length;
2060
+ for (this.clear(); ++a < f; ) {
2061
+ var R = o[a];
2062
+ this.set(R[0], R[1]);
2063
+ }
2064
+ }
2065
+ Tt.prototype.clear = Lr, Tt.prototype.delete = Br, Tt.prototype.get = Nr, Tt.prototype.has = zr, Tt.prototype.set = qr;
2066
+ const Gr = Tt, Yr = function() {
2067
+ this.size = 0, this.__data__ = { hash: new De(), map: new (ut || Gr)(), string: new De() };
2068
+ }, Vr = function(o) {
2069
+ var a = typeof o;
2070
+ return a == "string" || a == "number" || a == "symbol" || a == "boolean" ? o !== "__proto__" : o === null;
2071
+ }, It = function(o, a) {
2072
+ var f = o.__data__;
2073
+ return Vr(a) ? f[typeof a == "string" ? "string" : "hash"] : f.map;
2074
+ }, Qr = function(o) {
2075
+ var a = It(this, o).delete(o);
2076
+ return this.size -= a ? 1 : 0, a;
2077
+ }, Wr = function(o) {
2078
+ return It(this, o).get(o);
2079
+ }, Zr = function(o) {
2080
+ return It(this, o).has(o);
2081
+ }, Kr = function(o, a) {
2082
+ var f = It(this, o), R = f.size;
2083
+ return f.set(o, a), this.size += f.size == R ? 0 : 1, this;
2084
+ };
2085
+ function St(o) {
2086
+ var a = -1, f = o == null ? 0 : o.length;
2087
+ for (this.clear(); ++a < f; ) {
2088
+ var R = o[a];
2089
+ this.set(R[0], R[1]);
2090
+ }
2091
+ }
2092
+ St.prototype.clear = Yr, St.prototype.delete = Qr, St.prototype.get = Wr, St.prototype.has = Zr, St.prototype.set = Kr;
2093
+ const Jr = St, Xr = function(o) {
2094
+ return this.__data__.set(o, "__lodash_hash_undefined__"), this;
2095
+ }, tn = function(o) {
2096
+ return this.__data__.has(o);
2097
+ };
2098
+ function kt(o) {
2099
+ var a = -1, f = o == null ? 0 : o.length;
2100
+ for (this.__data__ = new Jr(); ++a < f; )
2101
+ this.add(o[a]);
2102
+ }
2103
+ kt.prototype.add = kt.prototype.push = Xr, kt.prototype.has = tn;
2104
+ const en = kt, rn = function(o, a, f, R) {
2105
+ for (var D = o.length, M = f + (R ? 1 : -1); R ? M-- : ++M < D; )
2106
+ if (a(o[M], M, o))
2107
+ return M;
2108
+ return -1;
2109
+ }, nn = function(o) {
2110
+ return o != o;
2111
+ }, on = function(o, a, f) {
2112
+ for (var R = f - 1, D = o.length; ++R < D; )
2113
+ if (o[R] === a)
2114
+ return R;
2115
+ return -1;
2116
+ }, sn = function(o, a, f) {
2117
+ return a == a ? on(o, a, f) : rn(o, nn, f);
2118
+ }, an = function(o, a) {
2119
+ return !!(o != null && o.length) && sn(o, a, 0) > -1;
2120
+ }, cn = function(o, a, f) {
2121
+ for (var R = -1, D = o == null ? 0 : o.length; ++R < D; )
2122
+ if (f(a, o[R]))
2123
+ return !0;
2124
+ return !1;
2125
+ }, un = function(o, a) {
2126
+ return o.has(a);
2127
+ }, fn = function() {
2128
+ }, Fe = function(o) {
2129
+ var a = -1, f = Array(o.size);
2130
+ return o.forEach(function(R) {
2131
+ f[++a] = R;
2132
+ }), f;
2133
+ }, ln = yt && 1 / Fe(new yt([, -0]))[1] == 1 / 0 ? function(o) {
2134
+ return new yt(o);
2135
+ } : fn, hn = function(o, a, f) {
2136
+ var R = -1, D = an, M = o.length, et = !0, Y = [], U = Y;
2137
+ if (f)
2138
+ et = !1, D = cn;
2139
+ else if (M >= 200) {
2140
+ var tt = a ? null : ln(o);
2141
+ if (tt)
2142
+ return Fe(tt);
2143
+ et = !1, D = un, U = new en();
2144
+ } else
2145
+ U = a ? [] : Y;
2146
+ t:
2147
+ for (; ++R < M; ) {
2148
+ var nt = o[R], rt = a ? a(nt) : nt;
2149
+ if (nt = f || nt !== 0 ? nt : 0, et && rt == rt) {
2150
+ for (var ft = U.length; ft--; )
2151
+ if (U[ft] === rt)
2152
+ continue t;
2153
+ a && U.push(rt), Y.push(nt);
2154
+ } else
2155
+ D(U, rt, f) || (U !== Y && U.push(rt), Y.push(nt));
2156
+ }
2157
+ return Y;
2158
+ }, dn = function(o) {
2159
+ return o && o.length ? hn(o) : [];
2160
+ };
2161
+ e().extend(g()), e().extend(_()), e().extend(n()), e().extend(i()), e().extend(u());
2162
+ const Ce = (o) => e()(o).add(1, "day").utc().format();
2163
+ function Pe(o) {
2164
+ return /\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])T(?:[01]\d|2[0-3])(?::[0-5]\d){2}(?:\.\d+|)(?:Z|[+-]\d{2}:?\d{2})/u.test(o);
2165
+ }
2166
+ const Ae = ({ cancellationPolicies: o, date: a }) => o.filter((f) => e()(a).isBetween(f.dateFrom, f.dateTo, void 0, "[)")), oe = ({ bookingDatetime: o, cancellationPolicies: a, checkInDate: f, releaseDate: R, timezone: D }) => {
2167
+ if (!o)
2168
+ throw new Error('Missing "bookingDatetime" option');
2169
+ if (!f)
2170
+ throw new Error('Missing "checkInDate" option');
2171
+ if (!D)
2172
+ throw new Error('Missing "timezone" option');
2173
+ const M = e()(o).utc().format(), et = e().tz(f, D).startOf("day").utc().format(), Y = Ce(et), U = R && e().tz(R, D).startOf("day").utc().format();
2174
+ if (e()(M).isAfter(Y))
2175
+ return oe({ bookingDatetime: et, cancellationPolicies: a, checkInDate: f, releaseDate: R, timezone: D });
2176
+ if (Ft(a))
2177
+ return e()(M).isBefore(et) ? U ? e()(U).isBefore(M) ? [{ dateFrom: M, dateTo: Y, penaltyPercentage: 100 }] : [{ dateFrom: M, dateTo: U, penaltyPercentage: 0 }, { dateFrom: U, dateTo: Y, penaltyPercentage: 100 }] : [{ dateFrom: M, dateTo: et, penaltyPercentage: 0 }, { dateFrom: et, dateTo: Y, penaltyPercentage: 100 }] : [{ dateFrom: M, dateTo: Y, penaltyPercentage: 100 }];
2178
+ let tt = Fr(a == null ? void 0 : a.map((P) => ({ ...P })));
2179
+ if (!tt.every((P) => P.dateFrom && P.dateTo && e()(P.dateFrom).isBefore(P.dateTo)))
2180
+ return [{ dateFrom: M, dateTo: Y, penaltyPercentage: 100 }];
2181
+ tt = tt.filter((P) => e()(P.dateTo).diff(e()(P.dateFrom), "minutes") >= 20).sort((P, ot) => e()(P.dateFrom).isAfter(e()(ot.dateFrom)) ? 1 : -1).map((P) => (P.dateFrom = e().tz(P.dateFrom, D).utc(Pe(P.dateFrom)).utc().format(), P.dateTo = e().tz(P.dateTo, D).utc(Pe(P.dateTo)).utc().format(), P)), U && e()(U).isBetween(e()(M), e()(tt[0].dateFrom), void 0, "[)") && tt.push({ dateFrom: M, dateTo: U, penaltyPercentage: 0 }, { dateFrom: U, dateTo: tt[0].dateFrom, penaltyPercentage: 100 });
2182
+ const nt = tt.reduce((P, ot) => (P.push(e()(ot.dateFrom).utc().format(), e()(ot.dateTo).utc().format()), P), []).concat(M, Y), rt = dn(nt).sort((P, ot) => e()(P).isAfter(e()(ot)) ? 1 : -1);
2183
+ let ft = [], xt = 0, Lt = "";
2184
+ for (const [P, ot] of rt.entries()) {
2185
+ const ie = Ae({ cancellationPolicies: tt, date: ot });
2186
+ let Pt = null;
2187
+ Pt = Ft(ie) ? U && e()(U).isBefore(e()(M)) ? 100 : 0 : Math.max(...ie.map((gn) => gn.penaltyPercentage)), Lt ? (Ft(ie) && (Pt = 100), xt === Pt && P !== rt.length - 1 || (ft.push({ dateFrom: Lt, dateTo: ot, penaltyPercentage: xt }), Lt = ot, xt = Pt)) : (Lt = ot, xt = Pt);
2188
+ }
2189
+ return ft = ft.filter((P) => !e()(P.dateTo).isSameOrBefore(M) && !e()(P.dateFrom).isSameOrAfter(Y)), ft[0].dateFrom = M, ft.at(-1).dateTo = Y, ft;
2190
+ }, He = ({ bookingDatetime: o, cancellationPolicies: a, checkInDate: f, datetime: R, releaseDate: D, timezone: M }) => {
2191
+ if (!o)
2192
+ throw new Error('Missing "bookingDatetime" option');
2193
+ if (!f)
2194
+ throw new Error('Missing "checkInDate" option');
2195
+ if (!R)
2196
+ throw new Error('Missing "datetime" option');
2197
+ if (!M)
2198
+ throw new Error('Missing "timezone" option');
2199
+ const et = e()(R).utc().format(), Y = e()(o).utc().format(), U = e().tz(f, M).startOf("day").utc().format(), tt = Ce(U);
2200
+ if (e()(et).isSameOrAfter(e()(tt)))
2201
+ return 100;
2202
+ if (e()(et).isBefore(e()(Y)))
2203
+ return 0;
2204
+ const nt = oe({ bookingDatetime: o, cancellationPolicies: a, checkInDate: f, releaseDate: D, timezone: M }), rt = Ae({ cancellationPolicies: nt, date: R });
2205
+ return rt[0] && rt[0].penaltyPercentage;
2206
+ }, vn = ({ bookingDatetime: o, cancellationPolicies: a, checkInDate: f, releaseDate: R, timezone: D }) => {
2207
+ const M = e()().utc().format();
2208
+ return He({ bookingDatetime: o, cancellationPolicies: a, checkInDate: f, datetime: M, releaseDate: R, timezone: D });
2209
+ }, pn = (o, a) => !!Ft(o) || !Ft(a) && (o[0].dateTo ? a.every((f) => {
2210
+ const R = o.find((D) => e()(f.dateTo).isBetween(D.dateFrom, D.dateTo, null, "[]"));
2211
+ return !R || f.penaltyPercentage >= R.penaltyPercentage;
2212
+ }) : a.every((f) => {
2213
+ const R = o.find((D) => e()(f.dateTo).isBetween(D.dateFrom, D.dateTo, null, "[]"));
2214
+ return !R || f.penaltyPercentage >= R.penaltyPercentage;
2215
+ }));
2216
+ })();
2217
+ var Go = Xt.b4, Po = Xt.HO, Yo = Xt.Ms;
2218
+ const hr = {
2219
+ hotelRoomOffersByHotel: {}
2220
+ }, Ao = {
2221
+ hotelRoomOffers(t) {
2222
+ return (e) => t.hotelRoomOffersByHotel[e];
2223
+ },
2224
+ hotelTimezone(t) {
2225
+ return (e) => t.hotelRoomOffersByHotel[e].hotelTimezone;
2226
+ }
2227
+ }, Ho = {
2228
+ /* eslint-disable @typescript-eslint/no-shadow */
2229
+ RESET_HOTEL_ROOM_OFFERS(t) {
2230
+ t.hotelRoomOffersByHotel = {};
2231
+ },
2232
+ SET_HOTEL_ROOM_OFFERS(t, e) {
2233
+ jt(t.hotelRoomOffersByHotel, e.hotelId, e);
2234
+ },
2235
+ PUSH_IN_PROGRESS_HOTEL_ROOM_OFFER(t, {
2236
+ hotelId: e,
2237
+ hotelRoomOffer: r
2238
+ }) {
2239
+ const n = t.hotelRoomOffersByHotel[e];
2240
+ if (!n)
2241
+ return;
2242
+ const s = n.inProgressOffers;
2243
+ s && jt(t.hotelRoomOffersByHotel, e, {
2244
+ ...n,
2245
+ inProgressOffers: [...s, r]
2246
+ });
2247
+ },
2248
+ UPDATE_IN_PROGRESS_HOTEL_ROOM_OFFER(t, {
2249
+ hotelId: e,
2250
+ hotelRoomOffer: r
2251
+ }) {
2252
+ const n = t.hotelRoomOffersByHotel[e];
2253
+ if (!n)
2254
+ return;
2255
+ const s = n.inProgressOffers;
2256
+ if (!s)
2257
+ return;
2258
+ const i = s.findIndex(
2259
+ (c) => c.id === r.id
2260
+ );
2261
+ i !== void 0 && jt(t.hotelRoomOffersByHotel, e, {
2262
+ ...n,
2263
+ inProgressOffers: [
2264
+ ...s.slice(0, i),
2265
+ {
2266
+ ...s[i],
2267
+ ...r
2268
+ },
2269
+ ...s.slice(i + 1)
2270
+ ]
2271
+ });
2272
+ },
2273
+ // eslint-disable-next-line @typescript-eslint/consistent-return
2274
+ UPDATE_HOTEL_ROOM_OFFER(t, {
2275
+ hotelId: e,
2276
+ id: r,
2277
+ hotelRoomOffer: n
2278
+ }) {
2279
+ const s = t.hotelRoomOffersByHotel[e], i = s.offers;
2280
+ if (!i)
2281
+ return;
2282
+ const c = i.findIndex(
2283
+ (d) => d.id === r
2284
+ );
2285
+ if (c === void 0)
2286
+ return;
2287
+ const u = i[c];
2288
+ Po(
2289
+ n.cancellationPolicies,
2290
+ u.cancellationPolicies
2291
+ ) || Gt.$emit(
2292
+ lt.CANCELLATION_POLICIES_UPDATED,
2293
+ n.cancellationPolicies
2294
+ ), jt(t.hotelRoomOffersByHotel, e, {
2295
+ ...s,
2296
+ offers: [
2297
+ ...i.slice(0, c),
2298
+ {
2299
+ ...i[c],
2300
+ ...n,
2301
+ packageType: i[c].packageType
2302
+ },
2303
+ ...i.slice(c + 1)
2304
+ ]
2305
+ });
2306
+ }
2307
+ }, Io = {
2308
+ async createBookingPolicies({ commit: t }, {
2309
+ addBreakfast: e,
2310
+ hotelId: r,
2311
+ hotelRoomOfferId: n
2312
+ }) {
2313
+ var c;
2314
+ const s = vt();
2315
+ if (!s)
2316
+ return;
2317
+ const i = (c = hr.hotelRoomOffersByHotel[r].offers) == null ? void 0 : c.find(
2318
+ (u) => u.id === n
2319
+ );
2320
+ i && t("PUSH_IN_PROGRESS_HOTEL_ROOM_OFFER", {
2321
+ hotelId: r,
2322
+ hotelRoomOffer: {
2323
+ ...i,
2324
+ isLoading: !0
2325
+ }
2326
+ });
2327
+ try {
2328
+ const u = await s.bookingPolicies.create({
2329
+ body: {
2330
+ addBreakfast: e,
2331
+ hotelRoomOfferId: n,
2332
+ lang: window.RevolugoElements.config.lang
2333
+ }
2334
+ });
2335
+ return Gt.$emit(lt.BOOKING_POLICY_CREATED, u), t("UPDATE_IN_PROGRESS_HOTEL_ROOM_OFFER", {
2336
+ hotelId: r,
2337
+ hotelRoomOffer: {
2338
+ id: n,
2339
+ isLoading: !1
2340
+ }
2341
+ }), t("UPDATE_HOTEL_ROOM_OFFER", {
2342
+ hotelId: r,
2343
+ hotelRoomOffer: {
2344
+ ...u.hotelRoomOffer,
2345
+ isLoading: !1
2346
+ },
2347
+ id: n
2348
+ }), u;
2349
+ } catch (u) {
2350
+ throw t("UPDATE_IN_PROGRESS_HOTEL_ROOM_OFFER", {
2351
+ hotelId: r,
2352
+ hotelRoomOffer: {
2353
+ id: n,
2354
+ isLoading: !1
2355
+ }
2356
+ }), t("UPDATE_HOTEL_ROOM_OFFER", {
2357
+ hotelId: r,
2358
+ hotelRoomOffer: {
2359
+ isLoading: !1
2360
+ },
2361
+ id: n
2362
+ }), u;
2363
+ }
2364
+ },
2365
+ async reifyHotelRoomOffer({ commit: t }, {
2366
+ hotelId: e,
2367
+ id: r,
2368
+ addBreakfast: n
2369
+ }) {
2370
+ const s = vt();
2371
+ if (s) {
2372
+ t("UPDATE_HOTEL_ROOM_OFFER", {
2373
+ hotelId: e,
2374
+ hotelRoomOffer: {
2375
+ isLoading: !0
2376
+ },
2377
+ id: r
2378
+ });
2379
+ const i = await s.hotelRoomOffers.create({
2380
+ body: {
2381
+ addBreakfast: n,
2382
+ currency: window.RevolugoElements.config.currency,
2383
+ hotelRoomOffers: [
2384
+ {
2385
+ count: 1,
2386
+ hotelRoomOfferId: r
2387
+ }
2388
+ ],
2389
+ lang: window.RevolugoElements.config.lang
2390
+ }
2391
+ });
2392
+ t("UPDATE_HOTEL_ROOM_OFFER", {
2393
+ hotelId: e,
2394
+ hotelRoomOffer: {
2395
+ ...i.hotelRoomOffer,
2396
+ isLoading: !1
2397
+ },
2398
+ id: r
2399
+ });
2400
+ }
2401
+ },
2402
+ resetHotelRoomOffers({ commit: t }, e) {
2403
+ e != null && e.hotelId ? t("SET_HOTEL_ROOM_OFFERS", {
2404
+ hotelId: e.hotelId
2405
+ }) : t("RESET_HOTEL_ROOM_OFFERS");
2406
+ },
2407
+ async retrieveHotelRoomOffers({ commit: t, state: { hotelRoomOffersByHotel: e } }, r) {
2408
+ const n = vt();
2409
+ n && (t("SET_HOTEL_ROOM_OFFERS", {
2410
+ hasError: !1,
2411
+ hotelId: r.hotelId,
2412
+ isPolling: !0,
2413
+ offers: null,
2414
+ inProgressOffers: []
2415
+ }), await n.hotelRoomOffers.list(
2416
+ {
2417
+ currency: window.RevolugoElements.config.currency,
2418
+ hotelRoomOfferRequestId: r.hotelRoomOfferRequestId,
2419
+ lang: window.RevolugoElements.config.lang
2420
+ },
2421
+ (s, i) => {
2422
+ var c, u, d, _, l;
2423
+ if (s) {
2424
+ t("SET_HOTEL_ROOM_OFFERS", {
2425
+ hasError: !0,
2426
+ hotelId: r.hotelId,
2427
+ hotelTimezone: "",
2428
+ isPolling: !1,
2429
+ offers: [],
2430
+ inProgressOffers: []
2431
+ }), console.error("Cannot retrieve hotel room offers:", s);
2432
+ return;
2433
+ }
2434
+ if ((c = i == null ? void 0 : i.data) != null && c.hotelRoomOffers) {
2435
+ window.RevolugoElements.eventBus.$emit(
2436
+ lt.HOTEL_ROOM_OFFERS_RETRIEVED,
2437
+ i
2438
+ );
2439
+ const g = (u = i == null ? void 0 : i.data) == null ? void 0 : u.hotelTimezone, p = (d = i == null ? void 0 : i.data) != null && d.hotelRoomOffers ? [...i.data.hotelRoomOffers] : [], y = ((_ = e[r.hotelId]) == null ? void 0 : _.inProgressOffers) || [];
2440
+ for (const h of y)
2441
+ p.findIndex(
2442
+ (A) => A.id === h.id
2443
+ ) === -1 && p.push(h);
2444
+ t("SET_HOTEL_ROOM_OFFERS", {
2445
+ hasError: !1,
2446
+ hotelId: r.hotelId,
2447
+ hotelTimezone: g,
2448
+ isPolling: (((l = i == null ? void 0 : i.meta) == null ? void 0 : l.status) ?? "").toLowerCase() !== "complete",
2449
+ offers: p.sort((h, b) => h.price - b.price),
2450
+ inProgressOffers: y
2451
+ });
2452
+ }
2453
+ }
2454
+ ));
2455
+ }
2456
+ }, ko = {
2457
+ actions: Io,
2458
+ getters: Ao,
2459
+ mutations: Ho,
2460
+ namespaced: !0,
2461
+ state: hr
2462
+ };
2463
+ Nt.use(Un);
2464
+ const Ge = {}, xo = {}, Lo = new J({
2465
+ actions: xo,
2466
+ modules: {
2467
+ breakpointService: lo,
2468
+ hotelOfferRequest: go,
2469
+ hotelOffers: bo,
2470
+ hotelRoomOfferRequest: Fo,
2471
+ hotelRoomOffers: ko
2472
+ },
2473
+ mutations: At.mutations(Ge),
2474
+ plugins: [Jn.plugin],
2475
+ state: Ge,
2476
+ strict: mn
2477
+ }), Vo = {
2478
+ install(t) {
2479
+ t.mixin({
2480
+ store: Lo
2481
+ });
2482
+ }
2483
+ };
2484
+ export {
2485
+ fr as D,
2486
+ _o as F,
2487
+ yo as P,
2488
+ Eo as R,
2489
+ Yo as a,
2490
+ Lo as b,
2491
+ Oo as c,
2492
+ zo as d,
2493
+ qo as g,
2494
+ Go as o,
2495
+ Vo as s
2496
+ };
2497
+ //# sourceMappingURL=revolugo.store.TBV-eqIE.min.js.map