@feedmepos/mf-connect 0.1.115-prod → 0.1.117-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/README.md +64 -1
  2. package/dist/{App-CvtSY8ZO.js → App-BpcsgH7K.js} +444 -427
  3. package/dist/AuditLogs-BNnUiVnD.js +2016 -0
  4. package/dist/{Bin-B3gS9QVZ.js → Bin-Cm0wjQeR.js} +8 -8
  5. package/dist/{Broadcast-DAeb-HaN.js → Broadcast-BoJaHqnO.js} +22 -21
  6. package/dist/{CampaignAnalytic-BfTaHVem.js → CampaignAnalytic-Eg4xZW0B.js} +7 -7
  7. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zsei4OfG.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BXylK6Ze.js} +9 -9
  8. package/dist/{Card-JFeVIwFs.js → Card-BfkMcFaG.js} +25 -24
  9. package/dist/{Collections-xcDpEhIm.js → Collections-RXmxQbII.js} +197 -185
  10. package/dist/{Credit-C9HJZjDS.js → Credit-CsRPM1jv.js} +21 -20
  11. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-DSqVY91w.js → DateRangeChip.vue_vue_type_script_setup_true_lang-D2tvK7pw.js} +1 -1
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BgPeHurN.js +4442 -0
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-C3J0rCTt.js → EffectSheet.vue_vue_type_style_index_0_lang-CUx8UIIq.js} +32 -32
  14. package/dist/{Experience-DszS8gto.js → Experience-BC8Pj-v9.js} +32 -31
  15. package/dist/{FileSaver.min-CFVQKaC-.js → FileSaver.min-DzmoQFA0.js} +1 -1
  16. package/dist/{Game-DhgeN7E2.js → Game-DJXNHFBs.js} +19 -18
  17. package/dist/{GiftCardSetup-CWm6IhrS.js → GiftCardSetup-_0n8lU-t.js} +75 -75
  18. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-BuKADvmK.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-C-AiJdui.js} +7 -7
  19. package/dist/{Goals-DtRVierH.js → Goals-DSZwKpds.js} +4 -4
  20. package/dist/Grab-DDc7e-AC.js +301 -0
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DlEFyu6h.js → ImageInput.vue_vue_type_script_setup_true_lang-BZb-H4fM.js} +1 -1
  22. package/dist/{Index-DFRcu_qE.js → Index-Cbi0bquE.js} +10 -10
  23. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-B3Br4Xvi.js → LocationPicker.vue_vue_type_script_setup_true_lang-GLhMtvzi.js} +1 -1
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CjNJj3qj.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Bt9CO_QR.js} +1 -1
  25. package/dist/{LoyaltyDashboard-BWHKDPzk.js → LoyaltyDashboard-fK90c27A.js} +15 -15
  26. package/dist/MainLayout-Bf-l9yL4.js +4 -0
  27. package/dist/{MainLayout-BmpNNAiE.js → MainLayout.vue_vue_type_script_setup_true_lang-COR6YYYI.js} +5 -4
  28. package/dist/Marketing-B7cZGsO-.js +269 -0
  29. package/dist/MarketingMaterialEdit-5IcV2ct6.js +1037 -0
  30. package/dist/{Member-xEzrBW_p.js → Member-BGTrRVdq.js} +7 -7
  31. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-DRoC-I0t.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-DJr2hV2W.js} +43 -50
  32. package/dist/{MemberImportHistory-CEQpBBF8.js → MemberImportHistory--FxkTJmu.js} +7 -7
  33. package/dist/{MemberList-CCvzkHv8.js → MemberList-EjY5dgwt.js} +103 -105
  34. package/dist/{MemberTransactions-Bmh39J2W.js → MemberTransactions-Oia7LIFK.js} +1 -1
  35. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-D3Pmk80l.js → MessageInput.vue_vue_type_script_setup_true_lang-CLOQZCYy.js} +14 -14
  36. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DIBKAwHP.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Ev3bB8cg.js} +1 -1
  37. package/dist/{Mission-CpUo2Bgw.js → Mission-BFHYb4aT.js} +22 -21
  38. package/dist/{Overview-DcDZmDXA.js → Overview-BVNyQxFL.js} +23 -22
  39. package/dist/{Overview-CwQqQ1Tn.js → Overview-d5U37aot.js} +145 -144
  40. package/dist/{Point-CUNQsQIx.js → Point-CXkqH02Z.js} +22 -21
  41. package/dist/{Promotion-Cqdim7aW.js → Promotion-DdxNvlOO.js} +137 -131
  42. package/dist/{Queue-CNBVh1UG.js → Queue-C96oNKyP.js} +46 -45
  43. package/dist/{Record-BYwz4l4o.js → Record-Bj2e2Y4i.js} +9 -9
  44. package/dist/{Review-CqLcZFj8.js → Review-CJK5S1oI.js} +2 -2
  45. package/dist/ReviewFacebookCallback-ChG7TRy5.js +225 -0
  46. package/dist/{ReviewGoogleCallback-Dg8R7QlO.js → ReviewGoogleCallback-Dmk4VyGA.js} +5 -5
  47. package/dist/{Reward-M8GZ8eHq.js → Reward-Dh2YI0Xb.js} +29 -29
  48. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BkM9-Sx-.js → RewardGroup.vue_vue_type_script_setup_true_lang-U47m3AAn.js} +16 -15
  49. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-2L6ZGMW7.js +1923 -0
  50. package/dist/{Segment-CrMi6xrp.js → Segment-FYvtCkqH.js} +304 -305
  51. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DKH5_9db.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DPZZz2e0.js} +31 -30
  52. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CyeAQ-hg.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-D8wBgLlS.js} +4 -4
  53. package/dist/Setting-CUAWjCqa.js +574 -0
  54. package/dist/{SettingAdvertisements-Dh7v4c1D.js → SettingAdvertisements-COIQwUD6.js} +12 -12
  55. package/dist/Settings-D2gFPvmW.js +286 -0
  56. package/dist/{Store-CV-BmK5b.js → Store-BAXwiyvx.js} +31 -30
  57. package/dist/{StoreRewards-DPhSLvSZ.js → StoreRewards-2mUavtUg.js} +15 -15
  58. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-5g3yIL1a.js +1319 -0
  59. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DHi4rdT1.js +7007 -0
  60. package/dist/{Tier-ChvYps23.js → Tier-BmAOzRHL.js} +2576 -687
  61. package/dist/{Title-v-Ivswr1.js → Title-DMxiUg30.js} +94 -92
  62. package/dist/{Transaction-CRqE1Ix0.js → Transaction-CF6hXEpN.js} +2 -2
  63. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-B0Uh9iuj.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BON_t0dL.js} +26 -26
  64. package/dist/{Voucher-Bg8FOuzD.js → Voucher-DrtITxq-.js} +19 -19
  65. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-HKxivQMF.js → VoucherEditor.vue_vue_type_script_setup_true_lang-1DZOzJKx.js} +16 -16
  66. package/dist/WhatsappAccount-Bb0Y7ikk.js +159 -0
  67. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-CPlyzkp4.js +39 -0
  68. package/dist/WhatsappBot-DNvvaPey.js +876 -0
  69. package/dist/WhatsappBotLogs-C8M-1pvv.js +372 -0
  70. package/dist/WhatsappBotSettings-D6egqUyU.js +705 -0
  71. package/dist/WhatsappLayout-DeQTPuF6.js +21 -0
  72. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DI0pcHcE.js +253 -0
  73. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-8d290Dcp.js → ZodTextField.vue_vue_type_script_setup_true_lang-CKZscSjU.js} +2 -2
  74. package/dist/{app-DdNKsn2Q.js → app-BjdLqYQq.js} +8879 -7107
  75. package/dist/app.js +4 -3
  76. package/dist/{base.export-R97FrSQL.js → base.export-B68z5BF6.js} +2 -2
  77. package/dist/browser-BSAOEeIM.js +1478 -0
  78. package/dist/{business-Ce8vq3wQ.js → business-D9fgkHxb.js} +1 -1
  79. package/dist/{campaign-C19If7bW.js → campaign-Dw_ujovr.js} +121 -94
  80. package/dist/{campaign-BTllt2LH.js → campaign-eMaPX8r6.js} +31 -25
  81. package/dist/{campaign.enum-9CCbalR4.js → campaign.enum-Dx-Zo68Q.js} +3 -2
  82. package/dist/{campaign.fn-B4g03h0A.js → campaign.fn-DFjGNvmN.js} +78 -78
  83. package/dist/{collectible.enum-MvqF7mSg.js → collectible.enum-Liy2wH3s.js} +1 -1
  84. package/dist/{collection.fn-CR0bD33S.js → collection.fn-CCOWtB-c.js} +2 -2
  85. package/dist/{currency-DmlguGIM.js → currency-CTLKReFC.js} +1 -1
  86. package/dist/duplicateCampaign-BcpBfUGL.js +51 -0
  87. package/dist/{effect-Dx3zfl28.js → effect-CTI1ZH57.js} +1 -1
  88. package/dist/{email-addresses-De5PGOY4.js → email-addresses-B74e3bnB.js} +2 -2
  89. package/dist/{feature-flag-CD9V1V0h.js → feature-flag-DVdEaChJ.js} +182 -166
  90. package/dist/google-BQK68wbe.js +5 -0
  91. package/dist/{helper-CEiv7SaO.js → helper-as9K-piK.js} +1 -1
  92. package/dist/{index-CBJy9bxB.js → index-3LjKJhQa.js} +1 -1
  93. package/dist/{index-BW6eb3n6.js → index-8mBfDn3M.js} +611 -252
  94. package/dist/{index-D4d3l0gw.js → index-B0h0iYWP.js} +8 -7
  95. package/dist/{index-BAXKd9Gg.js → index-BEKMTiFb.js} +198 -198
  96. package/dist/{index-B8yWVB8P.js → index-BW7FoVEA.js} +4 -3
  97. package/dist/{index-BVdYxi3l.js → index-B_wRpO02.js} +29 -15
  98. package/dist/{index-B8meeQoD.js → index-Ba719MYq.js} +1 -1
  99. package/dist/{index-BDPnyro2.js → index-BbVbqe4Y.js} +19 -6
  100. package/dist/{index-CqOCJTeR.js → index-BhTrG89b.js} +390 -232
  101. package/dist/index-C-iwb2Ln.js +109 -0
  102. package/dist/{index-CPODug8b.js → index-C5V6u2Qd.js} +2700 -2613
  103. package/dist/{index-CWUrODxL.js → index-CHU3UePP.js} +1 -1
  104. package/dist/{index-IZRfmmde.js → index-CQxkDpX0.js} +683 -581
  105. package/dist/{index-DT3S00_Y.js → index-CWLOcQ6j.js} +11 -10
  106. package/dist/index-C_H8jFYf.js +2743 -0
  107. package/dist/{index-__UT3_Ey.js → index-Ckz6u3ac.js} +2 -2
  108. package/dist/{index-BYI9ttxy.js → index-Czg-2Ni0.js} +8028 -10767
  109. package/dist/{index-xct3mnu8.js → index-DKI8401o.js} +7 -7
  110. package/dist/{index-649OZ_e1.js → index-DcZiikOH.js} +2 -2
  111. package/dist/{index-BquSqx6K.js → index-QHqcSN2q.js} +4 -4
  112. package/dist/{index-BR9h5DTI.js → index-TAoQpeLQ.js} +1 -1
  113. package/dist/index-wsCCqwdr.js +74 -0
  114. package/dist/{index.esm2017-AVbZ9btd.js → index.esm2017-DL6rTGDW.js} +177 -177
  115. package/dist/{loading-BvHm1m3K.js → loading-x6IScY4K.js} +1 -1
  116. package/dist/{lodash-Dvrceo7x.js → lodash-nwnDizYo.js} +1 -1
  117. package/dist/{member-import-c9avpiSS.js → member-import-C-b01Tyd.js} +6 -5
  118. package/dist/{membership-D-pZS634.js → membership-DfarOMtO.js} +3 -3
  119. package/dist/{money-D4skwMkD.js → money-CFn-jR4W.js} +1 -1
  120. package/dist/{number-DJ6ncfT6.js → number-CSlyDL2x.js} +1 -1
  121. package/dist/objectid-zcT6ESET.js +145 -0
  122. package/dist/{onboarding-t7R1d3h-.js → onboarding-DyaFaaF2.js} +25 -25
  123. package/dist/{onboardingSetup-lTaJc0oT.js → onboardingSetup-DQt91O9f.js} +2 -2
  124. package/dist/{plugins-DQNOWwRC.js → plugins-DEHr0UOe.js} +3 -3
  125. package/dist/{MarketingMaterialEdit-x3c_N7Gs.js → remy-icon-BhUGu2NI.js} +2 -1031
  126. package/dist/{reward-BK150pjm.js → reward-Du_Pv-4p.js} +1 -1
  127. package/dist/{rule-COcdAnUu.js → rule-DfqmQTVK.js} +572 -492
  128. package/dist/style.css +1 -1
  129. package/dist/template-CcbNF4PF.js +188 -0
  130. package/dist/{timezone-BP6UC4KL.js → timezone-_4tabIaK.js} +1 -1
  131. package/dist/{transaction.fn-BY0hzon0.js → transaction.fn-C46PHwCV.js} +2 -2
  132. package/dist/{trigger-DVBjVPbN.js → trigger-Dipr6btC.js} +8 -8
  133. package/dist/useMarketingMaterialActions-BAw2ZjeF.js +125 -0
  134. package/dist/{usePagination-QT552XyF.js → usePagination-D6RZ18zS.js} +1 -1
  135. package/dist/{user-CmAxNc7T.js → user-BCexQj3Q.js} +1 -1
  136. package/dist/vue-i18n-DXvyTCZf.js +2365 -0
  137. package/dist/{xlsx-DAczoc8y.js → xlsx-BTxt_Jg6.js} +224 -224
  138. package/dist/{zod-Aj-GuVQL.js → zod-T4wMYjWT.js} +1 -1
  139. package/package.json +6 -2
  140. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D_jXVE2I.js +0 -3494
  141. package/dist/Marketing-BKK45Eve.js +0 -236
  142. package/dist/ReviewFacebookCallback-DbSCILNN.js +0 -238
  143. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CnaL93TF.js +0 -1883
  144. package/dist/Setting-BnFRI0Se.js +0 -2037
  145. package/dist/Settings-BvT8_tkQ.js +0 -179
  146. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CDu1QySl.js +0 -1264
  147. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Dqz6jTlH.js +0 -142
  148. package/dist/google-C3S8u0mT.js +0 -4
  149. package/dist/objectid-DEMM_jdR.js +0 -145
  150. package/dist/rule-builder-Deufb6h_.js +0 -102
  151. package/dist/template-DeebIqJ_.js +0 -236
  152. package/dist/useMarketingMaterialActions-DpQCQHFI.js +0 -96
  153. package/dist/vue-i18n-Cze706-f.js +0 -2365
@@ -1,14 +1,14 @@
1
- var le = Object.defineProperty;
2
- var ue = (m, u, d) => u in m ? le(m, u, { enumerable: !0, configurable: !0, writable: !0, value: d }) : m[u] = d;
3
- var ot = (m, u, d) => ue(m, typeof u != "symbol" ? u + "" : u, d);
4
- import { ref as ut, readonly as Pt } from "vue";
5
- import { c as st } from "./app-DdNKsn2Q.js";
6
- import { useCoreStore as ce } from "@feedmepos/mf-common";
7
- var Ut = { exports: {} };
1
+ var ce = Object.defineProperty;
2
+ var he = (m, u, d) => u in m ? ce(m, u, { enumerable: !0, configurable: !0, writable: !0, value: d }) : m[u] = d;
3
+ var st = (m, u, d) => he(m, typeof u != "symbol" ? u + "" : u, d);
4
+ import { ref as ct, readonly as Ut } from "vue";
5
+ import { c as lt } from "./app-BjdLqYQq.js";
6
+ import { useCoreStore as de } from "@feedmepos/mf-common";
7
+ var Kt = { exports: {} };
8
8
  (function(m, u) {
9
9
  (function(d, v) {
10
10
  v(u);
11
- })(st, function(d) {
11
+ })(lt, function(d) {
12
12
  var v = { getItemSync: function(a) {
13
13
  try {
14
14
  return localStorage.getItem(a) || null;
@@ -39,7 +39,7 @@ var Ut = { exports: {} };
39
39
  return a;
40
40
  }, s.apply(this, arguments);
41
41
  };
42
- function T(a, e, t, i) {
42
+ function w(a, e, t, i) {
43
43
  return new (t || (t = Promise))(function(n, r) {
44
44
  function o(f) {
45
45
  try {
@@ -64,7 +64,7 @@ var Ut = { exports: {} };
64
64
  h((i = i.apply(a, [])).next());
65
65
  });
66
66
  }
67
- function z(a, e) {
67
+ function H(a, e) {
68
68
  var t, i, n, r, o = { label: 0, sent: function() {
69
69
  if (1 & n[0]) throw n[1];
70
70
  return n[1];
@@ -127,7 +127,7 @@ var Ut = { exports: {} };
127
127
  for (var i, n = 0, r = e.length; n < r; n++) !i && n in e || (i || (i = Array.prototype.slice.call(e, 0, n)), i[n] = e[n]);
128
128
  return a.concat(i || Array.prototype.slice.call(e));
129
129
  }
130
- var nt = function a(e, t) {
130
+ var it = function a(e, t) {
131
131
  if (e === t) return !0;
132
132
  if (e && t && typeof e == "object" && typeof t == "object") {
133
133
  if (e.constructor !== t.constructor) return !1;
@@ -153,7 +153,7 @@ var Ut = { exports: {} };
153
153
  function _(a, e) {
154
154
  var t = Object.keys(e || {}).filter(function(i) {
155
155
  var n = a == null ? void 0 : a[i], r = e == null ? void 0 : e[i];
156
- return !nt(n, r);
156
+ return !it(n, r);
157
157
  });
158
158
  return Object.keys(a || {}).filter(function(i) {
159
159
  Object.keys(e || {}).includes(i) || t.push(i);
@@ -167,19 +167,19 @@ var Ut = { exports: {} };
167
167
  function G(a) {
168
168
  return !!a && typeof a == "object" && a.value !== void 0;
169
169
  }
170
- function it(a) {
170
+ function at(a) {
171
171
  return Object.fromEntries(Object.entries(a).map(function(e) {
172
172
  var t = e[0], i = e[1];
173
173
  return [t, G(i) ? i : { value: i }];
174
174
  }));
175
175
  }
176
- function ct(a) {
177
- return s(s({}, a), { identity: a.identity ? s(s({}, a.identity), { traits: it(a.identity.traits || {}) }) : void 0 });
176
+ function ht(a) {
177
+ return s(s({}, a), { identity: a.identity ? s(s({}, a.identity), { traits: at(a.identity.traits || {}) }) : void 0 });
178
178
  }
179
179
  (function(a) {
180
180
  a.NONE = "NONE", a.DEFAULT_FLAGS = "DEFAULT_FLAGS", a.CACHE = "CACHE", a.SERVER = "SERVER";
181
181
  })(g || (g = {}));
182
- var ht, O = null, ie = "FLAGSMITH_EVENT", at = ie, Dt = "https://edge.api.flagsmith.com/api/v1/", Gt = "flagsmith_value_", Jt = "flagsmith_enabled_", Ht = "flagsmith_trait_", ae = function() {
182
+ var dt, O = null, re = "FLAGSMITH_EVENT", rt = re, Dt = "https://edge.api.flagsmith.com/api/v1/", Gt = "flagsmith_value_", Jt = "flagsmith_enabled_", Vt = "flagsmith_trait_", oe = function() {
183
183
  function a(e) {
184
184
  var t = this;
185
185
  this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
@@ -188,20 +188,20 @@ var Ut = { exports: {} };
188
188
  var o = "".concat(t.getContext().identity), c = function(h) {
189
189
  var f, l, p, F;
190
190
  if (h && o === "".concat(t.getContext().identity)) {
191
- var k = h.flags, w = h.traits, j = h.identifier;
191
+ var P = h.flags, I = h.traits, N = h.identifier;
192
192
  t.isLoading = !1;
193
- var I = {}, A = {};
194
- w = w || [], (k = k || []).forEach(function(y) {
195
- I[y.feature.name.toLowerCase().replace(/ /g, "_")] = { id: y.feature.id, enabled: y.enabled, value: y.feature_state_value };
196
- }), w.forEach(function(y) {
197
- A[y.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: y.transient, value: y.trait_value };
193
+ var A = {}, L = {};
194
+ I = I || [], (P = P || []).forEach(function(y) {
195
+ A[y.feature.name.toLowerCase().replace(/ /g, "_")] = { id: y.feature.id, enabled: y.enabled, value: y.feature_state_value };
196
+ }), I.forEach(function(y) {
197
+ L[y.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: y.transient, value: y.trait_value };
198
198
  }), t.oldFlags = s({}, t.flags);
199
- var P = _(t.oldFlags, I), Z = _((f = t.evaluationContext.identity) === null || f === void 0 ? void 0 : f.traits, A);
200
- if ((j || Object.keys(A).length) && (t.evaluationContext.identity = s(s({}, t.evaluationContext.identity), { traits: A }), j && (t.evaluationContext.identity.identifier = j)), t.flags = I, t.updateStorage(), t._onChange(t.oldFlags, { isFromServer: !0, flagsChanged: P, traitsChanged: Z }, t._loadedState(null, g.SERVER)), t.datadogRum) try {
199
+ var k = _(t.oldFlags, A), Y = _((f = t.evaluationContext.identity) === null || f === void 0 ? void 0 : f.traits, L);
200
+ if ((N || Object.keys(L).length) && (t.evaluationContext.identity = s(s({}, t.evaluationContext.identity), { traits: L }), N && (t.evaluationContext.identity.identifier = N)), t.flags = A, t.updateStorage(), t._onChange(t.oldFlags, { isFromServer: !0, flagsChanged: k, traitsChanged: Y }, t._loadedState(null, g.SERVER)), t.datadogRum) try {
201
201
  if (t.datadogRum.trackTraits) {
202
202
  var Q = {};
203
203
  Object.keys(((l = t.evaluationContext.identity) === null || l === void 0 ? void 0 : l.traits) || {}).map(function(y) {
204
- Q[Ht + y] = t.getTrait(y);
204
+ Q[Vt + y] = t.getTrait(y);
205
205
  });
206
206
  var M = s(s(s({}, t.datadogRum.client.getUser()), { id: t.datadogRum.client.getUser().id || ((p = t.evaluationContext.identity) === null || p === void 0 ? void 0 : p.identifier) }), Q);
207
207
  t.log("Setting Datadog user", M), t.datadogRum.client.setUser(M);
@@ -214,7 +214,7 @@ var Ut = { exports: {} };
214
214
  Object.keys(t.flags).map(function(y) {
215
215
  b(E, Gt + y, t.getValue(y, { skipAnalytics: !0 })), b(E, Jt + y, t.hasFeature(y, { skipAnalytics: !0 }));
216
216
  }), Object.keys(((F = t.evaluationContext.identity) === null || F === void 0 ? void 0 : F.traits) || {}).map(function(y) {
217
- b(E, Ht + y, t.getTrait(y));
217
+ b(E, Vt + y, t.getTrait(y));
218
218
  }), t.log("Sending javaLongOrObject traits to dynatrace", E.javaLongOrObject), t.log("Sending date traits to dynatrace", E.date), t.log("Sending shortString traits to dynatrace", E.shortString), t.log("Sending javaDouble to dynatrace", E.javaDouble), t.dtrum.sendSessionProperties(E.javaLongOrObject, E.date, E.shortString, E.javaDouble);
219
219
  } catch (y) {
220
220
  console.error(y);
@@ -263,7 +263,7 @@ var Ut = { exports: {} };
263
263
  return [r, o == null ? void 0 : o.value];
264
264
  }));
265
265
  }, this.setContext = function(i) {
266
- var n = ct(i);
266
+ var n = ht(i);
267
267
  return t.evaluationContext = s(s({}, n), { environment: n.environment || t.evaluationContext.environment }), t.initialised ? t.getFlags() : Promise.resolve();
268
268
  }, this.getContext = function() {
269
269
  return t.evaluationContext;
@@ -271,7 +271,7 @@ var Ut = { exports: {} };
271
271
  return t.setContext(s(s({}, t.getContext()), i));
272
272
  }, this.setTrait = function(i, n) {
273
273
  var r;
274
- if (t.api) return t.setContext(s(s({}, t.evaluationContext), { identity: s(s({}, t.evaluationContext.identity), { traits: s(s({}, (r = t.evaluationContext.identity) === null || r === void 0 ? void 0 : r.traits), it(Object.fromEntries([[i, n]]))) }) }));
274
+ if (t.api) return t.setContext(s(s({}, t.evaluationContext), { identity: s(s({}, t.evaluationContext.identity), { traits: s(s({}, (r = t.evaluationContext.identity) === null || r === void 0 ? void 0 : r.traits), at(Object.fromEntries([[i, n]]))) }) }));
275
275
  }, this.setTraits = function(i) {
276
276
  var n;
277
277
  if (t.api) return t.setContext(s(s({}, t.evaluationContext), { identity: s(s({}, t.evaluationContext.identity), { traits: s(s({}, (n = t.evaluationContext.identity) === null || n === void 0 ? void 0 : n.traits), Object.fromEntries(Object.entries(i).map(function(r) {
@@ -292,26 +292,26 @@ var Ut = { exports: {} };
292
292
  t.evaluationContext.environment && (f.headers["X-Environment-Key"] = t.evaluationContext.environment.apiKey), n && n !== "GET" && (f.headers["Content-Type"] = "application/json; charset=utf-8"), h && Object.assign(f.headers, h), C || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
293
293
  var l = "".concat((o = t.evaluationContext.identity) === null || o === void 0 ? void 0 : o.identifier);
294
294
  return C(i, f).then(function(p) {
295
- var F, k, w = "".concat((F = t.evaluationContext.identity) === null || F === void 0 ? void 0 : F.identifier);
296
- if (l === w) {
297
- var j = (k = p.headers) === null || k === void 0 ? void 0 : k.get("x-flagsmith-document-updated-at");
298
- if (j) try {
299
- var I = parseFloat(j);
300
- if (isNaN(I)) return Promise.reject("Failed to parse x-flagsmith-document-updated-at");
301
- t.timestamp = I;
302
- } catch (A) {
303
- t.log(A, "Failed to parse x-flagsmith-document-updated-at", j);
295
+ var F, P, I = "".concat((F = t.evaluationContext.identity) === null || F === void 0 ? void 0 : F.identifier);
296
+ if (l === I) {
297
+ var N = (P = p.headers) === null || P === void 0 ? void 0 : P.get("x-flagsmith-document-updated-at");
298
+ if (N) try {
299
+ var A = parseFloat(N);
300
+ if (isNaN(A)) return Promise.reject("Failed to parse x-flagsmith-document-updated-at");
301
+ t.timestamp = A;
302
+ } catch (L) {
303
+ t.log(L, "Failed to parse x-flagsmith-document-updated-at", N);
304
304
  }
305
- return t.log("Fetch response: " + p.status + " " + (n || "GET") + 0 + i), p.text().then(function(A) {
306
- var P = A;
305
+ return t.log("Fetch response: " + p.status + " " + (n || "GET") + 0 + i), p.text().then(function(L) {
306
+ var k = L;
307
307
  try {
308
- P = JSON.parse(A);
308
+ k = JSON.parse(L);
309
309
  } catch {
310
310
  }
311
- return !P && p.status && (P = "API Response: ".concat(p.status)), p.status && p.status >= 200 && p.status < 300 ? P : Promise.reject(new Error(P));
311
+ return !k && p.status && (k = "API Response: ".concat(p.status)), p.status && p.status >= 200 && p.status < 300 ? k : Promise.reject(new Error(k));
312
312
  });
313
313
  }
314
- t.log("Received response with identity mismatch, ignoring response. Requested: ".concat(l, ", Current: ").concat(w));
314
+ t.log("Received response with identity mismatch, ignoring response. Requested: ".concat(l, ", Current: ").concat(I));
315
315
  });
316
316
  }, this.evaluateFlag = function(i, n) {
317
317
  if (t.datadogRum && (t.datadogRum.client.addFeatureFlagEvaluation ? n === "VALUE" ? t.datadogRum.client.addFeatureFlagEvaluation(Gt + i, t.getValue(i, {}, !0)) : t.datadogRum.client.addFeatureFlagEvaluation(Jt + i, t.hasFeature(i, !0)) : console.error("Flagsmith: Your datadog RUM client does not support the function addFeatureFlagEvaluation, please update it.")), t.enableAnalytics) {
@@ -322,36 +322,36 @@ var Ut = { exports: {} };
322
322
  }, this._onChange = function(i, n, r) {
323
323
  var o, c;
324
324
  t.setLoadingState(r), (o = t.onChange) === null || o === void 0 || o.call(t, i, n, t.loadingState), (c = t._trigger) === null || c === void 0 || c.call(t);
325
- }, C = e.fetch ? e.fetch : typeof fetch < "u" ? fetch : st === null || st === void 0 ? void 0 : st.fetch, this.canUseStorage = typeof window < "u" || !!e.browserlessStorage, this.log("Constructing flagsmith instance " + e), e.eventSource && (ht = e.eventSource), e.AsyncStorage && (O = e.AsyncStorage);
325
+ }, C = e.fetch ? e.fetch : typeof fetch < "u" ? fetch : lt === null || lt === void 0 ? void 0 : lt.fetch, this.canUseStorage = typeof window < "u" || !!e.browserlessStorage, this.log("Constructing flagsmith instance " + e), e.eventSource && (dt = e.eventSource), e.AsyncStorage && (O = e.AsyncStorage);
326
326
  }
327
327
  return a.prototype.init = function(e) {
328
328
  var t, i, n;
329
- return T(this, void 0, void 0, function() {
330
- var r, o, c, h, f, l, p, F, k, w, j, I, A, P, Z, Q, M, E, y, vt, W, qt, $, gt, Yt, Zt, ft, Qt, pt, tt, X, Wt, x = this;
331
- return z(this, function(N) {
332
- switch (N.label) {
329
+ return w(this, void 0, void 0, function() {
330
+ var r, o, c, h, f, l, p, F, P, I, N, A, L, k, Y, Q, M, E, y, gt, W, Xt, $, ft, Zt, Yt, pt, Qt, yt, tt, q, Wt, x = this;
331
+ return H(this, function(T) {
332
+ switch (T.label) {
333
333
  case 0:
334
- r = ct(e.evaluationContext || this.evaluationContext), N.label = 1;
334
+ r = ht(e.evaluationContext || this.evaluationContext), T.label = 1;
335
335
  case 1:
336
- if (N.trys.push([1, 13, , 14]), o = e.environmentID, c = e.api, h = c === void 0 ? Dt : c, f = e.headers, l = e.onChange, p = e.cacheFlags, F = e.datadogRum, k = e.onError, w = e.defaultFlags, j = e.fetch, I = e.preventFetch, A = e.enableLogs, P = e.enableDynatrace, Z = e.enableAnalytics, Q = e.realtime, M = e.eventSourceUrl, E = M === void 0 ? "https://realtime.flagsmith.com/" : M, y = e.AsyncStorage, vt = e.identity, W = e.traits, qt = e.state, $ = e.cacheOptions, gt = e.angularHttpClient, Yt = e._trigger, Zt = e._triggerLoadingState, r.environment = o ? { apiKey: o } : r.environment, !r.environment || !r.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
337
- if (r.identity = vt || W ? { identifier: vt, traits: W ? Object.fromEntries(Object.entries(W).map(function(L) {
338
- return [L[0], { value: L[1] }];
339
- })) : {} } : r.identity, this.evaluationContext = r, this.api = h, this.headers = f, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = l, ft = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Yt || this._trigger, this._triggerLoadingState = Zt || this._triggerLoadingState, this.onError = function(L) {
340
- x.setLoadingState(s(s({}, x.loadingState), { isFetching: !1, isLoading: !1, error: L })), k == null || k(L);
341
- }, this.enableLogs = A || !1, this.cacheOptions = $ ? { skipAPI: !!$.skipAPI, ttl: $.ttl || 0, storageKey: $.storageKey, loadStale: !!$.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), j && (C = j), this.enableAnalytics = Z || !1, this.flags = Object.assign({}, w) || {}, this.datadogRum = F || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = O !== void 0 && !!p, at = "FLAGSMITH_EVENT_" + r.environment.apiKey, y && (O = y), Q && typeof window < "u" && this.setupRealtime(E, r.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = s(s({}, this.loadingState), { isLoading: !1, source: g.DEFAULT_FLAGS })), this.setState(qt), this.log("Initialising with properties", e, this), P && (typeof dtrum > "u" ? console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed.") : this.dtrum = dtrum), gt && (C = /* @__PURE__ */ function(L) {
342
- return function(R, U) {
343
- var H = U.headers, S = U.method, q = U.body;
336
+ if (T.trys.push([1, 13, , 14]), o = e.environmentID, c = e.api, h = c === void 0 ? Dt : c, f = e.headers, l = e.onChange, p = e.cacheFlags, F = e.datadogRum, P = e.onError, I = e.defaultFlags, N = e.fetch, A = e.preventFetch, L = e.enableLogs, k = e.enableDynatrace, Y = e.enableAnalytics, Q = e.realtime, M = e.eventSourceUrl, E = M === void 0 ? "https://realtime.flagsmith.com/" : M, y = e.AsyncStorage, gt = e.identity, W = e.traits, Xt = e.state, $ = e.cacheOptions, ft = e.angularHttpClient, Zt = e._trigger, Yt = e._triggerLoadingState, r.environment = o ? { apiKey: o } : r.environment, !r.environment || !r.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
337
+ if (r.identity = gt || W ? { identifier: gt, traits: W ? Object.fromEntries(Object.entries(W).map(function(j) {
338
+ return [j[0], { value: j[1] }];
339
+ })) : {} } : r.identity, this.evaluationContext = r, this.api = h, this.headers = f, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = l, pt = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Zt || this._trigger, this._triggerLoadingState = Yt || this._triggerLoadingState, this.onError = function(j) {
340
+ x.setLoadingState(s(s({}, x.loadingState), { isFetching: !1, isLoading: !1, error: j })), P == null || P(j);
341
+ }, this.enableLogs = L || !1, this.cacheOptions = $ ? { skipAPI: !!$.skipAPI, ttl: $.ttl || 0, storageKey: $.storageKey, loadStale: !!$.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), N && (C = N), this.enableAnalytics = Y || !1, this.flags = Object.assign({}, I) || {}, this.datadogRum = F || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = O !== void 0 && !!p, rt = "FLAGSMITH_EVENT_" + r.environment.apiKey, y && (O = y), Q && typeof window < "u" && this.setupRealtime(E, r.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = s(s({}, this.loadingState), { isLoading: !1, source: g.DEFAULT_FLAGS })), this.setState(Xt), this.log("Initialising with properties", e, this), k && (typeof dtrum > "u" ? console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed.") : this.dtrum = dtrum), ft && (C = /* @__PURE__ */ function(j) {
342
+ return function(U, R) {
343
+ var V = R.headers, S = R.method, X = R.body;
344
344
  return new Promise(function(B) {
345
345
  switch (S) {
346
346
  case "GET":
347
- return L.get(R, { headers: H }).subscribe(function(J) {
347
+ return j.get(U, { headers: V }).subscribe(function(J) {
348
348
  B({ ok: !0, text: function() {
349
349
  return Promise.resolve(J);
350
350
  } });
351
351
  });
352
352
  case "POST":
353
353
  case "PUT":
354
- return L.post(R, q, { headers: H }).subscribe(function(J) {
354
+ return j.post(U, X, { headers: V }).subscribe(function(J) {
355
355
  B({ ok: !0, text: function() {
356
356
  return Promise.resolve(J);
357
357
  } });
@@ -359,88 +359,88 @@ var Ut = { exports: {} };
359
359
  }
360
360
  });
361
361
  };
362
- }(gt)), O && this.canUseStorage && O.getItem(at).then(function(L) {
362
+ }(ft)), O && this.canUseStorage && O.getItem(rt).then(function(j) {
363
363
  try {
364
- x.evaluationEvent = JSON.parse(L) || {};
364
+ x.evaluationEvent = JSON.parse(j) || {};
365
365
  } catch {
366
366
  x.evaluationEvent = {};
367
367
  }
368
368
  x.analyticsInterval = setInterval(x.analyticsFlags, x.ticks);
369
- }), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), O && this.canUseStorage && O.getItem(at, function(L, R) {
370
- if (R && x.evaluationContext.environment) {
371
- var U = JSON.parse(R);
372
- if (U[x.evaluationContext.environment.apiKey]) {
373
- var H = x.getState();
374
- x.log("Retrieved events from cache", R), x.setState(s(s({}, H), { evaluationEvent: U[x.evaluationContext.environment.apiKey] }));
369
+ }), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), O && this.canUseStorage && O.getItem(rt, function(j, U) {
370
+ if (U && x.evaluationContext.environment) {
371
+ var R = JSON.parse(U);
372
+ if (R[x.evaluationContext.environment.apiKey]) {
373
+ var V = x.getState();
374
+ x.log("Retrieved events from cache", U), x.setState(s(s({}, V), { evaluationEvent: R[x.evaluationContext.environment.apiKey] }));
375
375
  }
376
376
  }
377
377
  })), !p) return [3, 9];
378
378
  if (!O || !this.canUseStorage) return [3, 8];
379
- Qt = function(L, R) {
380
- return T(x, void 0, void 0, function() {
381
- var U, H, S, q, B, J, yt, te, mt, St, Ct, bt, _t, Ft, Et, xt, Ot, wt, It, At, Lt, jt, Nt, Tt, ee = this;
382
- return z(this, function(V) {
383
- switch (V.label) {
379
+ Qt = function(j, U) {
380
+ return w(x, void 0, void 0, function() {
381
+ var R, V, S, X, B, J, mt, te, St, Ct, bt, _t, Ft, Et, xt, Ot, wt, It, At, Lt, jt, Nt, Tt, Pt, ee = this;
382
+ return H(this, function(z) {
383
+ switch (z.label) {
384
384
  case 0:
385
- if (!R) return [3, 7];
386
- U = null, H = null, V.label = 1;
385
+ if (!U) return [3, 7];
386
+ R = null, V = null, z.label = 1;
387
387
  case 1:
388
- return V.trys.push([1, 5, , 6]), S = JSON.parse(R), q = !1, B = !1, S && S.api === this.api && ((St = (mt = S.evaluationContext) === null || mt === void 0 ? void 0 : mt.environment) === null || St === void 0 ? void 0 : St.apiKey) === ((Ct = this.evaluationContext.environment) === null || Ct === void 0 ? void 0 : Ct.apiKey) && (J = !0, this.evaluationContext.identity && ((_t = (bt = S.evaluationContext) === null || bt === void 0 ? void 0 : bt.identity) === null || _t === void 0 ? void 0 : _t.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((Et = (Ft = S.evaluationContext) === null || Ft === void 0 ? void 0 : Ft.identity) === null || Et === void 0 ? void 0 : Et.identifier) + " to " + this.evaluationContext.identity.identifier), J = !1), this.cacheOptions.ttl && (!S.ts || (/* @__PURE__ */ new Date()).valueOf() - S.ts > this.cacheOptions.ttl) && (S.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + S.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - S.ts) + "ms"), J = !1) : S.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + S.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - S.ts) + "ms"), B = !0, J = !0)), J && (q = !0, H = _((xt = this.evaluationContext.identity) === null || xt === void 0 ? void 0 : xt.traits, (wt = (Ot = S.evaluationContext) === null || Ot === void 0 ? void 0 : Ot.identity) === null || wt === void 0 ? void 0 : wt.traits), U = _(this.flags, S.flags), this.setState(s(s({}, S), { evaluationContext: ct(s(s({}, S.evaluationContext), { identity: !((It = S.evaluationContext) === null || It === void 0) && It.identity ? s(s({}, (At = S.evaluationContext) === null || At === void 0 ? void 0 : At.identity), { traits: s(s({}, ((jt = (Lt = S.evaluationContext) === null || Lt === void 0 ? void 0 : Lt.identity) === null || jt === void 0 ? void 0 : jt.traits) || {}), W || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", S))), q ? (yt = !I && (!this.cacheOptions.skipAPI || B), this._onChange(null, { isFromServer: !1, flagsChanged: U, traitsChanged: H }, this._loadedState(null, g.CACHE, yt)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && q && !B && this.log("Skipping API, using cache"), yt && this.getFlags().catch(function(se) {
388
+ return z.trys.push([1, 5, , 6]), S = JSON.parse(U), X = !1, B = !1, S && S.api === this.api && ((Ct = (St = S.evaluationContext) === null || St === void 0 ? void 0 : St.environment) === null || Ct === void 0 ? void 0 : Ct.apiKey) === ((bt = this.evaluationContext.environment) === null || bt === void 0 ? void 0 : bt.apiKey) && (J = !0, this.evaluationContext.identity && ((Ft = (_t = S.evaluationContext) === null || _t === void 0 ? void 0 : _t.identity) === null || Ft === void 0 ? void 0 : Ft.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((xt = (Et = S.evaluationContext) === null || Et === void 0 ? void 0 : Et.identity) === null || xt === void 0 ? void 0 : xt.identifier) + " to " + this.evaluationContext.identity.identifier), J = !1), this.cacheOptions.ttl && (!S.ts || (/* @__PURE__ */ new Date()).valueOf() - S.ts > this.cacheOptions.ttl) && (S.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + S.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - S.ts) + "ms"), J = !1) : S.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + S.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - S.ts) + "ms"), B = !0, J = !0)), J && (X = !0, V = _((Ot = this.evaluationContext.identity) === null || Ot === void 0 ? void 0 : Ot.traits, (It = (wt = S.evaluationContext) === null || wt === void 0 ? void 0 : wt.identity) === null || It === void 0 ? void 0 : It.traits), R = _(this.flags, S.flags), this.setState(s(s({}, S), { evaluationContext: ht(s(s({}, S.evaluationContext), { identity: !((At = S.evaluationContext) === null || At === void 0) && At.identity ? s(s({}, (Lt = S.evaluationContext) === null || Lt === void 0 ? void 0 : Lt.identity), { traits: s(s({}, ((Nt = (jt = S.evaluationContext) === null || jt === void 0 ? void 0 : jt.identity) === null || Nt === void 0 ? void 0 : Nt.traits) || {}), W || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", S))), X ? (mt = !A && (!this.cacheOptions.skipAPI || B), this._onChange(null, { isFromServer: !1, flagsChanged: R, traitsChanged: V }, this._loadedState(null, g.CACHE, mt)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && X && !B && this.log("Skipping API, using cache"), mt && this.getFlags().catch(function(ue) {
389
389
  var kt;
390
- (kt = ee.onError) === null || kt === void 0 || kt.call(ee, se);
390
+ (kt = ee.onError) === null || kt === void 0 || kt.call(ee, ue);
391
391
  }), [3, 4]) : [3, 2];
392
392
  case 2:
393
- return I ? [3, 4] : [4, this.getFlags()];
393
+ return A ? [3, 4] : [4, this.getFlags()];
394
394
  case 3:
395
- V.sent(), V.label = 4;
395
+ z.sent(), z.label = 4;
396
396
  case 4:
397
397
  return [3, 6];
398
398
  case 5:
399
- return te = V.sent(), this.log("Exception fetching cached logs", te), [3, 6];
399
+ return te = z.sent(), this.log("Exception fetching cached logs", te), [3, 6];
400
400
  case 6:
401
401
  return [3, 10];
402
402
  case 7:
403
- return I ? [3, 9] : [4, this.getFlags()];
403
+ return A ? [3, 9] : [4, this.getFlags()];
404
404
  case 8:
405
- return V.sent(), [3, 10];
405
+ return z.sent(), [3, 10];
406
406
  case 9:
407
- if (w) this._onChange(null, { isFromServer: !1, flagsChanged: _({}, this.flags), traitsChanged: _({}, (Nt = this.evaluationContext.identity) === null || Nt === void 0 ? void 0 : Nt.traits) }, this._loadedState(null, g.DEFAULT_FLAGS));
407
+ if (I) this._onChange(null, { isFromServer: !1, flagsChanged: _({}, this.flags), traitsChanged: _({}, (Tt = this.evaluationContext.identity) === null || Tt === void 0 ? void 0 : Tt.traits) }, this._loadedState(null, g.DEFAULT_FLAGS));
408
408
  else {
409
- if (!this.flags) throw new Error(ft);
410
- this._onChange(null, { isFromServer: !1, flagsChanged: _({}, this.flags), traitsChanged: _({}, (Tt = this.evaluationContext.identity) === null || Tt === void 0 ? void 0 : Tt.traits) }, this._loadedState(null, g.DEFAULT_FLAGS));
409
+ if (!this.flags) throw new Error(pt);
410
+ this._onChange(null, { isFromServer: !1, flagsChanged: _({}, this.flags), traitsChanged: _({}, (Pt = this.evaluationContext.identity) === null || Pt === void 0 ? void 0 : Pt.traits) }, this._loadedState(null, g.DEFAULT_FLAGS));
411
411
  }
412
- V.label = 10;
412
+ z.label = 10;
413
413
  case 10:
414
414
  return [2];
415
415
  }
416
416
  });
417
417
  });
418
- }, N.label = 2;
418
+ }, T.label = 2;
419
419
  case 2:
420
- return N.trys.push([2, 7, , 8]), O.getItemSync ? (pt = O.getItemSync(this.getStorageKey()), [3, 5]) : [3, 3];
420
+ return T.trys.push([2, 7, , 8]), O.getItemSync ? (yt = O.getItemSync(this.getStorageKey()), [3, 5]) : [3, 3];
421
421
  case 3:
422
422
  return [4, O.getItem(this.getStorageKey())];
423
423
  case 4:
424
- pt = N.sent(), N.label = 5;
424
+ yt = T.sent(), T.label = 5;
425
425
  case 5:
426
- return [4, Qt(null, pt)];
426
+ return [4, Qt(null, yt)];
427
427
  case 6:
428
428
  case 7:
429
- return N.sent(), [3, 8];
429
+ return T.sent(), [3, 8];
430
430
  case 8:
431
431
  return [3, 12];
432
432
  case 9:
433
- return I ? [3, 11] : [4, this.getFlags()];
433
+ return A ? [3, 11] : [4, this.getFlags()];
434
434
  case 10:
435
- return N.sent(), [3, 12];
435
+ return T.sent(), [3, 12];
436
436
  case 11:
437
- if (w) this._onChange(null, { isFromServer: !1, flagsChanged: _({}, w), traitsChanged: _({}, (t = r.identity) === null || t === void 0 ? void 0 : t.traits) }, this._loadedState(null, g.DEFAULT_FLAGS));
438
- else if (this.flags && (tt = null, Object.keys(this.flags).length === 0 && (tt = ft), this._onChange(null, { isFromServer: !1, flagsChanged: _({}, this.flags), traitsChanged: _({}, (i = r.identity) === null || i === void 0 ? void 0 : i.traits) }, this._loadedState(tt, g.DEFAULT_FLAGS)), tt)) throw new Error(tt);
439
- N.label = 12;
437
+ if (I) this._onChange(null, { isFromServer: !1, flagsChanged: _({}, I), traitsChanged: _({}, (t = r.identity) === null || t === void 0 ? void 0 : t.traits) }, this._loadedState(null, g.DEFAULT_FLAGS));
438
+ else if (this.flags && (tt = null, Object.keys(this.flags).length === 0 && (tt = pt), this._onChange(null, { isFromServer: !1, flagsChanged: _({}, this.flags), traitsChanged: _({}, (i = r.identity) === null || i === void 0 ? void 0 : i.traits) }, this._loadedState(tt, g.DEFAULT_FLAGS)), tt)) throw new Error(tt);
439
+ T.label = 12;
440
440
  case 12:
441
441
  return [3, 14];
442
442
  case 13:
443
- throw X = N.sent(), this.log("Error during initialisation ", X), Wt = X instanceof Error ? X : new Error("".concat(X)), (n = this.onError) === null || n === void 0 || n.call(this, Wt), X;
443
+ throw q = T.sent(), this.log("Error during initialisation ", q), Wt = q instanceof Error ? q : new Error("".concat(q)), (n = this.onError) === null || n === void 0 || n.call(this, Wt), q;
444
444
  case 14:
445
445
  return [2];
446
446
  }
@@ -477,16 +477,16 @@ var Ut = { exports: {} };
477
477
  }, a.prototype.updateEventStorage = function() {
478
478
  if (this.enableAnalytics) {
479
479
  var e = JSON.stringify(this.getState().evaluationEvent);
480
- O.setItem(at, e).catch(function(t) {
480
+ O.setItem(rt, e).catch(function(t) {
481
481
  return console.error("Flagsmith: Error setting item in async storage", t);
482
482
  });
483
483
  }
484
484
  }, a.prototype.setLoadingState = function(e) {
485
485
  var t;
486
- nt(e, this.loadingState) || (this.loadingState = s({}, e), this.log("Loading state changed", e), (t = this._triggerLoadingState) === null || t === void 0 || t.call(this));
486
+ it(e, this.loadingState) || (this.loadingState = s({}, e), this.log("Loading state changed", e), (t = this._triggerLoadingState) === null || t === void 0 || t.call(this));
487
487
  }, a.prototype.setupRealtime = function(e, t) {
488
488
  var i = this, n = e + "sse/environments/" + t + "/stream";
489
- ht ? this.eventSource || (this.log("Creating event source with url " + n), this.eventSource = new ht(n), this.eventSource.addEventListener("environment_updated", function(r) {
489
+ dt ? this.eventSource || (this.log("Creating event source with url " + n), this.eventSource = new dt(n), this.eventSource.addEventListener("environment_updated", function(r) {
490
490
  var o;
491
491
  try {
492
492
  o = JSON.parse(r.data).updated_at;
@@ -497,23 +497,23 @@ var Ut = { exports: {} };
497
497
  })) : this.log("Error, EventSource is undefined");
498
498
  }, a;
499
499
  }();
500
- function Vt(a) {
500
+ function zt(a) {
501
501
  var e = a.fetch, t = a.AsyncStorage, i = a.eventSource;
502
- return new ae({ fetch: e, AsyncStorage: t, eventSource: i });
502
+ return new oe({ fetch: e, AsyncStorage: t, eventSource: i });
503
503
  }
504
- var rt, re = (rt = function(a, e) {
505
- return rt = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) {
504
+ var ot, se = (ot = function(a, e) {
505
+ return ot = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) {
506
506
  t.__proto__ = i;
507
507
  } || function(t, i) {
508
508
  for (var n in i) Object.prototype.hasOwnProperty.call(i, n) && (t[n] = i[n]);
509
- }, rt(a, e);
509
+ }, ot(a, e);
510
510
  }, function(a, e) {
511
511
  if (typeof e != "function" && e !== null) throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
512
512
  function t() {
513
513
  this.constructor = a;
514
514
  }
515
- rt(a, e), a.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
516
- }), zt = function(a) {
515
+ ot(a, e), a.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
516
+ }), Ht = function(a) {
517
517
  var e = typeof Symbol == "function" && Symbol.iterator, t = e && a[e], i = 0;
518
518
  if (t) return t.call(a);
519
519
  if (a && typeof a.length == "number") return { next: function() {
@@ -536,19 +536,19 @@ var Ut = { exports: {} };
536
536
  }
537
537
  }
538
538
  return o;
539
- }, dt = function(a, e, t) {
539
+ }, vt = function(a, e, t) {
540
540
  if (arguments.length === 2) for (var i, n = 0, r = e.length; n < r; n++) !i && n in e || (i || (i = Array.prototype.slice.call(e, 0, n)), i[n] = e[n]);
541
541
  return a.concat(i || Array.prototype.slice.call(e));
542
- }, oe = function(a) {
542
+ }, le = function(a) {
543
543
  function e() {
544
544
  return a.call(this, `EventSource not available.
545
545
  Consider loading an EventSource polyfill and making it available globally as EventSource, or passing one in as eventSourceClass to the ReconnectingEventSource constructor.`) || this;
546
546
  }
547
- return re(e, a), e;
547
+ return se(e, a), e;
548
548
  }(Error), Mt = function() {
549
549
  function a(e, t) {
550
550
  var i = this;
551
- if (this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, this._configuration = t != null ? Object.assign({}, t) : void 0, this.withCredentials = !1, this._eventSource = null, this._lastEventId = null, this._timer = null, this._listeners = { open: [], error: [], message: [] }, this.url = e.toString(), this.readyState = this.CONNECTING, this.max_retry_time = 3e3, this.eventSourceClass = globalThis.FlagsmithEventSource, this._configuration != null && (this._configuration.lastEventId && (this._lastEventId = this._configuration.lastEventId, delete this._configuration.lastEventId), this._configuration.max_retry_time && (this.max_retry_time = this._configuration.max_retry_time, delete this._configuration.max_retry_time), this._configuration.eventSourceClass && (this.eventSourceClass = this._configuration.eventSourceClass, delete this._configuration.eventSourceClass)), this.eventSourceClass == null || typeof this.eventSourceClass != "function") throw new oe();
551
+ if (this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, this._configuration = t != null ? Object.assign({}, t) : void 0, this.withCredentials = !1, this._eventSource = null, this._lastEventId = null, this._timer = null, this._listeners = { open: [], error: [], message: [] }, this.url = e.toString(), this.readyState = this.CONNECTING, this.max_retry_time = 3e3, this.eventSourceClass = globalThis.FlagsmithEventSource, this._configuration != null && (this._configuration.lastEventId && (this._lastEventId = this._configuration.lastEventId, delete this._configuration.lastEventId), this._configuration.max_retry_time && (this.max_retry_time = this._configuration.max_retry_time, delete this._configuration.max_retry_time), this._configuration.eventSourceClass && (this.eventSourceClass = this._configuration.eventSourceClass, delete this._configuration.eventSourceClass)), this.eventSourceClass == null || typeof this.eventSourceClass != "function") throw new le();
552
552
  this._onevent_wrapped = function(n) {
553
553
  i._onevent(n);
554
554
  }, this._start();
@@ -565,7 +565,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
565
565
  i.onmessage(h);
566
566
  };
567
567
  try {
568
- for (var r = zt(Object.keys(this._listeners)), o = r.next(); !o.done; o = r.next()) {
568
+ for (var r = Ht(Object.keys(this._listeners)), o = r.next(); !o.done; o = r.next()) {
569
569
  var c = o.value;
570
570
  this._eventSource.addEventListener(c, this._onevent_wrapped);
571
571
  }
@@ -594,7 +594,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
594
594
  e && e.lastEventId && (this._lastEventId = e.lastEventId);
595
595
  var n = this._listeners[e.type];
596
596
  if (n != null) try {
597
- for (var r = zt(dt([], Bt(n), !1)), o = r.next(); !o.done; o = r.next())
597
+ for (var r = Ht(vt([], Bt(n), !1)), o = r.next(); !o.done; o = r.next())
598
598
  o.value.call(this, e);
599
599
  } catch (c) {
600
600
  t = { error: c };
@@ -614,7 +614,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
614
614
  }, a.prototype.addEventListener = function(e, t, i) {
615
615
  this._listeners[e] == null && (this._listeners[e] = [], this._eventSource != null && this._eventSource.addEventListener(e, this._onevent_wrapped));
616
616
  var n = this._listeners[e];
617
- n.includes(t) || (this._listeners[e] = dt(dt([], Bt(n), !1), [t], !1));
617
+ n.includes(t) || (this._listeners[e] = vt(vt([], Bt(n), !1), [t], !1));
618
618
  }, a.prototype.removeEventListener = function(e, t, i) {
619
619
  var n = this._listeners[e];
620
620
  this._listeners[e] = n.filter(function(r) {
@@ -649,35 +649,35 @@ Consider loading an EventSource polyfill and making it available globally as Eve
649
649
  }, n.onerror = i, n.withCredentials = e.credentials == "include", e.headers) n.setRequestHeader(f, e.headers[f]);
650
650
  n.send(e.body || null);
651
651
  });
652
- }, Xt = Vt({ AsyncStorage: v, fetch: $t, eventSource: Mt });
653
- typeof window < "u" && (window.flagsmith = Xt), d.createFlagsmithInstance = function() {
654
- return Vt({ AsyncStorage: v, fetch: $t, eventSource: Mt });
655
- }, d.default = Xt, Object.defineProperty(d, "__esModule", { value: !0 });
652
+ }, qt = zt({ AsyncStorage: v, fetch: $t, eventSource: Mt });
653
+ typeof window < "u" && (window.flagsmith = qt), d.createFlagsmithInstance = function() {
654
+ return zt({ AsyncStorage: v, fetch: $t, eventSource: Mt });
655
+ }, d.default = qt, Object.defineProperty(d, "__esModule", { value: !0 });
656
656
  });
657
- })(Ut, Ut.exports);
658
- var he = Ut.exports, de = {
657
+ })(Kt, Kt.exports);
658
+ var ve = Kt.exports, ge = {
659
659
  NOT_INITIALIZED: "FeatureFlag not initialized. Call init() first.",
660
660
  INVALID_CONFIG: "Invalid Flagsmith configuration",
661
661
  FETCH_FAILED: "Failed to fetch Flagsmith configuration",
662
662
  NO_USER_CONTEXT: "User context not set. Call setUser() first.",
663
663
  ALREADY_INITIALIZED: "FeatureFlag is already initialized."
664
- }, ne = "business", K, ve = (K = class {
664
+ }, ne = "business", K, fe = (K = class {
665
665
  constructor() {
666
- ot(this, "flagsmithClient", null);
667
- ot(this, "userContext", null);
666
+ st(this, "flagsmithClient", null);
667
+ st(this, "userContext", null);
668
668
  }
669
669
  static getInstance() {
670
670
  return K.instance || (K.instance = new K()), K.instance;
671
671
  }
672
672
  ensureInitialized() {
673
673
  if (!this.flagsmithClient)
674
- throw new Error(de.NOT_INITIALIZED);
674
+ throw new Error(ge.NOT_INITIALIZED);
675
675
  }
676
676
  async init(u, d = []) {
677
677
  if (!this.flagsmithClient)
678
678
  try {
679
- this.flagsmithClient = he.createFlagsmithInstance();
680
- const v = d.reduce((s, T) => (s[T.feature.name] = T, s), {});
679
+ this.flagsmithClient = ve.createFlagsmithInstance();
680
+ const v = d.reduce((s, w) => (s[w.feature.name] = w, s), {});
681
681
  await this.flagsmithClient.init({
682
682
  environmentID: u.apiKey,
683
683
  api: (u == null ? void 0 : u.url) ?? "https://feature-flag-proxy.feedme.farm/api/v1/",
@@ -746,15 +746,15 @@ var he = Ut.exports, de = {
746
746
  };
747
747
  }
748
748
  async getUserFlagValue(u, d, v = null, s) {
749
- var z;
750
- const T = this.userContext;
749
+ var H;
750
+ const w = this.userContext;
751
751
  try {
752
752
  return await this.setUser(u), this.getFlagValue(d, s) ?? v;
753
753
  } catch (D) {
754
754
  return console.error(`Error getting user flag value for ${d}:`, D), v;
755
755
  } finally {
756
756
  try {
757
- await ((z = this.flagsmithClient) == null ? void 0 : z.logout()), this.userContext = null, T && await this.setUser(T.identifier);
757
+ await ((H = this.flagsmithClient) == null ? void 0 : H.logout()), this.userContext = null, w && await this.setUser(w.identifier);
758
758
  } catch (D) {
759
759
  console.error("Error during cleanup:", D);
760
760
  }
@@ -763,33 +763,33 @@ var he = Ut.exports, de = {
763
763
  reset() {
764
764
  this.flagsmithClient = null, this.userContext = null;
765
765
  }
766
- }, ot(K, "instance"), K), ge = ve.getInstance(), et = ut(!1), lt = ut([]), Y = ut(null);
767
- function fe(m = ge) {
766
+ }, st(K, "instance"), K), pe = fe.getInstance(), et = ct(!1), ut = ct([]), Z = ct(null);
767
+ function ye(m = pe) {
768
768
  const u = () => et.value ? !0 : (console.warn("FeatureFlag is not initialized. Using default values."), !1), d = async (g, C = []) => {
769
769
  if (et.value) {
770
770
  console.warn("FeatureFlag is already initialized.");
771
771
  return;
772
772
  }
773
773
  try {
774
- await m.init(g, C), lt.value = await m.getFlags(), et.value = !0, Y.value = null;
774
+ await m.init(g, C), ut.value = await m.getFlags(), et.value = !0, Z.value = null;
775
775
  } catch (b) {
776
- console.error("Failed to initialize feature flags:", b), Y.value = b;
776
+ console.error("Failed to initialize feature flags:", b), Z.value = b;
777
777
  }
778
778
  }, v = async (g) => {
779
779
  if (u())
780
780
  try {
781
- await m.setUser(g), lt.value = await m.getFlags(), Y.value = null;
781
+ await m.setUser(g), ut.value = await m.getFlags(), Z.value = null;
782
782
  } catch (C) {
783
- console.error("Failed to set user:", C), Y.value = C;
783
+ console.error("Failed to set user:", C), Z.value = C;
784
784
  }
785
- }, s = async (g) => v(`${ne}-${g}`), T = (g, C, b = null) => {
785
+ }, s = async (g) => v(`${ne}-${g}`), w = (g, C, b = null) => {
786
786
  if (!u()) return b;
787
787
  try {
788
788
  return m.getFlagValue(g, C) ?? b;
789
789
  } catch (G) {
790
790
  return console.error(`Error getting flag value for ${g}:`, G), b;
791
791
  }
792
- }, z = (g, C) => {
792
+ }, H = (g, C) => {
793
793
  if (!u()) return C ?? null;
794
794
  try {
795
795
  return m.getFlag(g) ?? C ?? null;
@@ -800,69 +800,85 @@ function fe(m = ge) {
800
800
  if (!u()) return b;
801
801
  try {
802
802
  return await m.getUserFlagValue(g, C, b, G);
803
- } catch (it) {
804
- return console.error(`Error getting user flag value for ${C}:`, it), b;
803
+ } catch (at) {
804
+ return console.error(`Error getting user flag value for ${C}:`, at), b;
805
805
  }
806
- }, nt = async (g, C, b = null, G) => D(`${ne}-${g}`, C, b, G), _ = () => {
806
+ }, it = async (g, C, b = null, G) => D(`${ne}-${g}`, C, b, G), _ = () => {
807
807
  try {
808
808
  m.reset();
809
809
  } catch (g) {
810
810
  console.error("Error resetting feature flags:", g);
811
811
  } finally {
812
- lt.value = [], et.value = !1, Y.value = null;
812
+ ut.value = [], et.value = !1, Z.value = null;
813
813
  }
814
814
  };
815
815
  return {
816
- flags: Pt(lt),
817
- isInitialized: Pt(et),
818
- error: Pt(Y),
816
+ flags: Ut(ut),
817
+ isInitialized: Ut(et),
818
+ error: Ut(Z),
819
819
  init: d,
820
820
  setUser: v,
821
821
  setBusiness: s,
822
- getFlagValue: T,
823
- getFlag: z,
822
+ getFlagValue: w,
823
+ getFlag: H,
824
824
  getUserFlagValue: D,
825
- getBusinessFlagValue: nt,
825
+ getBusinessFlagValue: it,
826
826
  reset: _
827
827
  };
828
828
  }
829
- var pe = () => fe();
830
- function ye(m, u) {
829
+ var me = () => ye();
830
+ function Se(m, u) {
831
831
  if (!(m != null && m.enabled)) return !1;
832
832
  const d = (m.value ?? "").split(",").map((v) => v.trim().toUpperCase()).filter(Boolean);
833
833
  return !d.length || d.includes("*") ? !0 : !!u && d.includes(u.toUpperCase());
834
834
  }
835
- var me = { firebase: { apiKey: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", authDomain: "feedme-253402.firebaseapp.com", databaseURL: "https://feedme-253402.firebaseio.com", projectId: "feedme-253402", storageBucket: "image.feedme.cc", messagingSenderId: "128512026847", appId: "1:128512026847:web:7c5c8ab7e8b90502dc616a", measurementId: "G-LTKS7N2HQS" }, assetBucketUrl: "static.feedme.cc", importFilesBucketUrl: "feedme-253402.appspot.com", clientId: "d5f8840d63dbb758b6c4ee2a5e8b013d15dd25e242c457481326062b83962476", featureFlagApiKey: "6GhcttsJ9Rj9cTevcdrpin" };
835
+ var Ce = { firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, assetBucketUrl: "feedme-dev-4c3ef.appspot.com", importFilesBucketUrl: "feedme-dev-4c3ef.appspot.com", clientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4", featureFlagApiKey: "MaGoXrEWuEJNpWgKTqseee" };
836
836
  const Rt = {
837
837
  broadcastAppInbox: "connect_broadcast_app_inbox_countries",
838
838
  broadcastPush: "connect_broadcast_push_countries",
839
- broadcastWhatsapp: "connect_broadcast_whatsapp_countries"
840
- }, Se = {
839
+ broadcastWhatsapp: "connect_broadcast_whatsapp_countries",
840
+ whatsappBot: "connect_whatsapp_bot"
841
+ }, be = {
841
842
  APP_INBOX: Rt.broadcastAppInbox,
842
843
  PUSH: Rt.broadcastPush,
843
844
  WHATSAPP: Rt.broadcastWhatsapp
844
- }, { init: Ce, isInitialized: be, setBusiness: _e, flags: Fe } = pe(), Kt = ut(!1);
845
- async function Ie(m) {
846
- Kt.value = !1;
845
+ }, {
846
+ init: _e,
847
+ isInitialized: Fe,
848
+ setBusiness: Ee,
849
+ flags: ae,
850
+ error: ie
851
+ } = me(), nt = ct("loading");
852
+ async function Le(m) {
853
+ nt.value = "loading";
847
854
  try {
848
- be.value || await Ce({ apiKey: me.featureFlagApiKey }), await _e(m);
855
+ if (Fe.value || await _e({ apiKey: Ce.featureFlagApiKey }), await Ee(m), ie.value) throw ie.value;
856
+ nt.value = "ready";
849
857
  } catch (u) {
850
- console.warn("CONNECT: loadBusinessFlags failed", u);
851
- } finally {
852
- Kt.value = !0;
858
+ nt.value = "error", console.warn("CONNECT: loadBusinessFlags failed", u);
853
859
  }
854
860
  }
855
- function Ae() {
856
- const m = ce();
857
- return (u) => {
858
- const d = Se[u];
859
- return d ? Kt.value ? ye(
860
- Fe.value.find((v) => v.feature.name === d),
861
+ function xe() {
862
+ return (m) => {
863
+ var u;
864
+ return nt.value === "loading" ? "loading" : nt.value === "error" ? "off" : (u = ae.value.find((d) => d.feature.name === m)) != null && u.enabled ? "on" : "off";
865
+ };
866
+ }
867
+ function je() {
868
+ const m = de(), u = xe();
869
+ return (d) => {
870
+ const v = be[d];
871
+ if (!v) return "on";
872
+ const s = u(v);
873
+ return s !== "on" ? s : Se(
874
+ ae.value.find((w) => w.feature.name === v),
861
875
  m.currentCountry.value
862
- ) ? "on" : "off" : "loading" : "on";
876
+ ) ? "on" : "off";
863
877
  };
864
878
  }
865
879
  export {
866
- Ie as l,
867
- Ae as u
880
+ Rt as F,
881
+ je as a,
882
+ Le as l,
883
+ xe as u
868
884
  };