aesirx-analytics 2.2.4 → 2.2.6

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.
@@ -1,208 +1,8 @@
1
1
  import {
2
2
  AnalyticsContext,
3
+ getConsents,
3
4
  useTranslation
4
- } from "./chunk-FKCTTU52.js";
5
-
6
- // src/utils/consent.ts
7
- import { stringMessage } from "@concordium/react-components";
8
- import axios from "axios";
9
- var agreeConsents = async (endpoint, level, uuid, consent, wallet, signature, web3id, jwt, network = "concordium") => {
10
- const url = `${endpoint}/consent/v1/level${level}/${uuid}`;
11
- const urlV2 = `${endpoint}/consent/v2/level${level}/${uuid}`;
12
- try {
13
- switch (level) {
14
- case 1:
15
- await axios.post(`${url}/${consent}`);
16
- break;
17
- case 2:
18
- await axios.post(
19
- `${url}`,
20
- { consent: [1, 2] },
21
- {
22
- headers: {
23
- "Content-Type": "application/json",
24
- Authorization: "Bearer " + jwt
25
- }
26
- }
27
- );
28
- break;
29
- case 3:
30
- await axios.post(`${url}/${network}/${wallet}`, {
31
- signature,
32
- consent
33
- });
34
- break;
35
- case 4:
36
- await axios.post(
37
- `${urlV2}/${network}/${wallet}`,
38
- {
39
- signature,
40
- consent
41
- },
42
- {
43
- headers: {
44
- "Content-Type": "application/json",
45
- Authorization: "Bearer " + jwt
46
- }
47
- }
48
- );
49
- break;
50
- default:
51
- break;
52
- }
53
- } catch (error) {
54
- throw error;
55
- }
56
- };
57
- var getConsents = async (endpoint, uuid) => {
58
- try {
59
- const response = (await axios.get(`${endpoint}/visitor/v1/${uuid}`))?.data?.visitor_consents;
60
- return response;
61
- } catch (error) {
62
- throw error;
63
- }
64
- };
65
- var getSignature = async (endpoint, address, provider, text, network = "concordium") => {
66
- try {
67
- const nonce = await getNonce(endpoint, address, text, network);
68
- return getSignedNonce(nonce, address, provider);
69
- } catch (error) {
70
- throw error;
71
- }
72
- };
73
- var getNonce = async (endpoint, address, text, network = "concordium") => {
74
- try {
75
- const nonce = (await axios.post(`${endpoint}/wallet/v1/${network}/${address}/nonce`, { text }))?.data.nonce;
76
- return nonce;
77
- } catch (error) {
78
- throw error;
79
- }
80
- };
81
- var getSignedNonce = async (nonce, address, provider) => {
82
- const signature = await provider.signMessage(address, stringMessage(`${nonce}`));
83
- return Buffer.from(
84
- typeof signature === "object" && signature !== null ? JSON.stringify(signature) : signature,
85
- "utf-8"
86
- ).toString("base64");
87
- };
88
- var revokeConsents = async (endpoint, level, uuid, wallet, signature, web3id, jwt, network = "concordium") => {
89
- const url = `${endpoint}/consent/v1/level${level}/revoke/${uuid}`;
90
- const urlV2 = `${endpoint}/consent/v2/level${level}/revoke/${uuid}`;
91
- try {
92
- switch (level) {
93
- case "2":
94
- await axios.put(`${url}`, null, {
95
- headers: {
96
- "Content-Type": "application/json",
97
- Authorization: "Bearer " + jwt
98
- }
99
- });
100
- break;
101
- case "3":
102
- await axios.put(`${url}/${network}/${wallet}`, {
103
- signature
104
- });
105
- break;
106
- case "4":
107
- await axios.put(
108
- `${urlV2}/${network}/${wallet}`,
109
- {
110
- signature
111
- },
112
- {
113
- headers: {
114
- "Content-Type": "application/json",
115
- Authorization: "Bearer " + jwt
116
- }
117
- }
118
- );
119
- break;
120
- default:
121
- break;
122
- }
123
- } catch (error) {
124
- throw error;
125
- }
126
- };
127
- var getMember = async (endpoint, accessToken) => {
128
- try {
129
- const member = await axios.get(
130
- `${endpoint}/index.php?webserviceClient=site&webserviceVersion=1.0.0&option=persona&api=hal&task=getTokenByUser`,
131
- {
132
- headers: {
133
- "Content-Type": "application/json",
134
- Authorization: "Bearer " + accessToken
135
- }
136
- }
137
- );
138
- if (member?.data?.result?.member_id) {
139
- const data = await axios.get(
140
- `${endpoint}/index.php?webserviceClient=site&webserviceVersion=1.0.0&option=member&api=hal&id=${member?.data?.result?.member_id}`,
141
- {
142
- headers: {
143
- "Content-Type": "application/json",
144
- Authorization: "Bearer " + accessToken
145
- }
146
- }
147
- );
148
- return data?.data;
149
- }
150
- } catch (error) {
151
- console.log("getMember", error);
152
- throw error;
153
- }
154
- };
155
- var getWalletNonce = async (endpoint, wallet, publicAddress) => {
156
- try {
157
- const reqAuthFormData = {
158
- publicAddress,
159
- wallet,
160
- text: `Login with nonce: {}`
161
- };
162
- const config = {
163
- method: "post",
164
- url: `${endpoint}/index.php?webserviceClient=site&webserviceVersion=1.0.0&option=member&task=getWalletNonce&api=hal`,
165
- headers: {
166
- "Content-Type": "application/json"
167
- },
168
- data: reqAuthFormData
169
- };
170
- const { data } = await axios(config);
171
- if (data.result) {
172
- return data.result;
173
- }
174
- throw false;
175
- } catch (error) {
176
- throw error;
177
- }
178
- };
179
- var verifySignature = async (endpoint, wallet, publicAddress, signature) => {
180
- try {
181
- const returnParams = new URLSearchParams(window.location.search)?.get("return");
182
- const reqAuthFormData = {
183
- wallet,
184
- publicAddress,
185
- signature
186
- };
187
- const config = {
188
- method: "post",
189
- url: `${endpoint}/index.php?webserviceClient=site&webserviceVersion=1.0.0&option=member&task=walletLogin&api=hal&return=${returnParams ?? null}`,
190
- headers: {
191
- "Content-Type": "application/json"
192
- },
193
- data: reqAuthFormData
194
- };
195
- const { data } = await axios(config);
196
- if (data?.result) {
197
- return data?.result;
198
- } else {
199
- throw false;
200
- }
201
- } catch (error) {
202
- console.log(error);
203
- throw error;
204
- }
205
- };
5
+ } from "./chunk-N36VEWSG.js";
206
6
 
207
7
  // src/utils/Concordium.ts
208
8
  import {
@@ -315,7 +115,7 @@ import {
315
115
  import { isDesktop } from "react-device-detect";
316
116
  import { useAccount } from "wagmi";
317
117
  import { BlockHash } from "@concordium/web-sdk";
318
- var useConsentStatus = (endpoint, props) => {
118
+ var useConsentStatus = (endpoint, layout, props) => {
319
119
  const [show, setShow] = useState(false);
320
120
  const [showRevoke, setShowRevoke] = useState(false);
321
121
  const [level, setLevel] = useState();
@@ -389,7 +189,7 @@ var useConsentStatus = (endpoint, props) => {
389
189
  }, [rpc]);
390
190
  useEffect(() => {
391
191
  const initConnector = async () => {
392
- if (isDesktop && sessionStorage.getItem("aesirx-analytics-revoke") !== "1" && sessionStorage.getItem("aesirx-analytics-revoke") !== "2") {
192
+ if (isDesktop && sessionStorage.getItem("aesirx-analytics-revoke") !== "1" && sessionStorage.getItem("aesirx-analytics-revoke") !== "2" && sessionStorage.getItem("aesirx-analytics-rejected") !== "true" && layout !== "simple-consent-mode" && layout !== "simple-web-2") {
393
193
  if (window["concordium"]) {
394
194
  const address2 = await window["concordium"]?.requestAccounts() ?? [];
395
195
  if (window["concordium"] && address2?.length) {
@@ -406,7 +206,7 @@ var useConsentStatus = (endpoint, props) => {
406
206
  }
407
207
  };
408
208
  initConnector();
409
- }, []);
209
+ }, [window["concordium"]]);
410
210
  useEffect(() => {
411
211
  if (activeConnector) {
412
212
  connect();
@@ -426,7 +226,6 @@ var useConsentStatus = (endpoint, props) => {
426
226
  setLevel(null);
427
227
  l = 3;
428
228
  let web3ID2 = false;
429
- console.log("test", account);
430
229
  if (account && sessionStorage.getItem("aesirx-analytics-consent-type") !== "metamask") {
431
230
  web3ID2 = await getWeb3ID(account, rpc, network?.name);
432
231
  if (web3ID2 === true) {
@@ -434,38 +233,50 @@ var useConsentStatus = (endpoint, props) => {
434
233
  }
435
234
  }
436
235
  setWeb3ID(web3ID2);
437
- setLevel(l);
236
+ if (layout !== "simple-consent-mode" && layout !== "simple-web-2") {
237
+ setLevel(l);
238
+ } else {
239
+ setLevel(1);
240
+ }
438
241
  }
439
242
  } else if (connector) {
440
- if (l < 3) {
441
- l = 3;
442
- const web3ID2 = false;
443
- setWeb3ID(web3ID2);
444
- setLevel(l);
445
- } else {
446
- if (l === 4) {
447
- setLevel(4);
243
+ if (layout !== "simple-consent-mode" && layout !== "simple-web-2") {
244
+ if (l < 3) {
245
+ l = 3;
246
+ const web3ID2 = false;
247
+ setWeb3ID(web3ID2);
248
+ setLevel(l);
448
249
  } else {
449
- setLevel(3);
250
+ if (l === 4) {
251
+ setLevel(4);
252
+ } else {
253
+ setLevel(3);
254
+ }
450
255
  }
256
+ } else {
257
+ setLevel(1);
451
258
  }
452
259
  } else {
453
- setLevel(level ?? 1);
260
+ setLevel(level ?? layout === "advance-consent-mode" ? 2 : 1);
454
261
  }
455
262
  } catch (error) {
456
- setLevel(level ?? 1);
263
+ setLevel(level ?? layout === "advance-consent-mode" ? 2 : 1);
457
264
  console.error(error);
458
265
  }
459
266
  })();
460
- }, [account, address, connector]);
267
+ }, [account, address, connector, layout]);
461
268
  const handleLevel = useCallback(
462
269
  async (_level) => {
463
- setLevel(_level);
464
- if (_level > 3 && isDesktop && !connection && window["concordium"]) {
465
- setActiveConnectorType(BROWSER_WALLET);
270
+ if (layout !== "simple-consent-mode" && layout !== "simple-web-2") {
271
+ setLevel(_level);
272
+ if (_level > 3 && isDesktop && !connection && window["concordium"]) {
273
+ setActiveConnectorType(BROWSER_WALLET);
274
+ }
275
+ } else {
276
+ setLevel(1);
466
277
  }
467
278
  },
468
- [level]
279
+ [level, layout]
469
280
  );
470
281
  const handleRevoke = (status, level2) => {
471
282
  sessionStorage.setItem("aesirx-analytics-revoke", level2 ? level2 : "0");
@@ -9328,6 +9139,11 @@ var css = `:root {
9328
9139
  .aesirxconsent .btn-success:hover {
9329
9140
  color: var(--aesirxconsent-white);
9330
9141
  }
9142
+ @media (max-width: 991.98px) {
9143
+ .aesirxconsent .nav {
9144
+ --aesirxconsent-nav-link-padding-y: 5px;
9145
+ }
9146
+ }
9331
9147
  .aesirxconsent .toast {
9332
9148
  --aesirxconsent-toast-zindex: 1049;
9333
9149
  --aesirxconsent-toast-font-size: 16px;
@@ -9338,6 +9154,13 @@ var css = `:root {
9338
9154
  border: var(--aesirxconsent-toast-border-width) solid var(--aesirxconsent-toast-border-color);
9339
9155
  box-shadow: var(--aesirxconsent-toast-box-shadow);
9340
9156
  border-radius: var(--aesirxconsent-toast-border-radius);
9157
+ max-height: 100vh;
9158
+ overflow-y: auto;
9159
+ }
9160
+ @media (max-width: 991.98px) {
9161
+ .aesirxconsent .toast .toast-body {
9162
+ font-size: 14px;
9163
+ }
9341
9164
  }
9342
9165
  @media (max-width: 991.98px) {
9343
9166
  .aesirxconsent .toast .toast-body button {
@@ -9355,16 +9178,19 @@ var css = `:root {
9355
9178
  font-weight: 600;
9356
9179
  color: #a5a4b5;
9357
9180
  border: 0;
9181
+ cursor: pointer;
9358
9182
  }
9359
9183
  .aesirxconsent .toast.custom .consent_info_tab .nav-item button.active {
9360
9184
  color: #132342;
9361
9185
  border-bottom: 2px solid #1ab394;
9362
9186
  }
9363
9187
  .aesirxconsent .toast.custom .about_section {
9364
- height: 373px;
9365
9188
  overflow: auto;
9366
9189
  padding: 0 10px;
9367
9190
  }
9191
+ .aesirxconsent .toast.custom .about_section.fix_height {
9192
+ height: 373px;
9193
+ }
9368
9194
  @media (max-width: 991.98px) {
9369
9195
  .aesirxconsent .toast.custom .about_section {
9370
9196
  padding: 0;
@@ -9383,16 +9209,16 @@ var css = `:root {
9383
9209
  background-color: #222328;
9384
9210
  }
9385
9211
  .aesirxconsent .toast.custom .status-tier.tier-1 {
9386
- background-color: #c8192e;
9212
+ background-color: #f1c40f;
9387
9213
  }
9388
9214
  .aesirxconsent .toast.custom .status-tier.tier-2 {
9389
9215
  background-color: #e67e22;
9390
9216
  }
9391
9217
  .aesirxconsent .toast.custom .status-tier.tier-3 {
9392
- background-color: #ffc700;
9218
+ background-color: #9b59b6;
9393
9219
  }
9394
9220
  .aesirxconsent .toast.custom .status-tier.tier-4 {
9395
- background-color: #1c9678;
9221
+ background-color: #c8192e;
9396
9222
  }
9397
9223
  .aesirxconsent .toast-container {
9398
9224
  box-sizing: border-box;
@@ -9617,6 +9443,9 @@ var css = `:root {
9617
9443
  opacity: 0;
9618
9444
  }
9619
9445
  }
9446
+ .aesirxconsent .header-consent-bg {
9447
+ background-color: #f8f9fd;
9448
+ }
9620
9449
 
9621
9450
  body.modal-open .aesirxconsent .offcanvas-backdrop,
9622
9451
  body.modal-sso-open .aesirxconsent .offcanvas-backdrop {
@@ -9689,7 +9518,7 @@ body.modal-sso-open .aesirxconsent .toast-container {
9689
9518
  background-color: var(--aesirxconsent-dark-bg-subtle);
9690
9519
  }
9691
9520
  [data-bs-theme=dark] .aesirxconsent .bg-white {
9692
- background-color: var(--aesirxconsent-light-bg-subtle);
9521
+ background-color: var(--aesirxconsent-dark) !important;
9693
9522
  }
9694
9523
  [data-bs-theme=dark] .aesirxconsent .bg-light {
9695
9524
  background-color: var(--aesirxconsent-light-bg-subtle);
@@ -9702,6 +9531,17 @@ body.modal-sso-open .aesirxconsent .toast-container {
9702
9531
  }
9703
9532
  [data-bs-theme=dark] .aesirxconsent .minimize-shield-wrapper .text {
9704
9533
  color: #fff;
9534
+ }
9535
+ [data-bs-theme=dark] .aesirxconsent .header-consent-bg {
9536
+ background-color: var(--aesirxconsent-light-bg-subtle);
9537
+ }
9538
+ [data-bs-theme=dark] .aesirxconsent .toast.custom .consent_info_tab .nav-item button.active {
9539
+ color: #fff;
9540
+ background-color: #1B233F;
9541
+ }
9542
+ [data-bs-theme=dark] .aesirxconsent .item_compliant {
9543
+ background-color: #F0F3FB;
9544
+ color: #222328;
9705
9545
  }`;
9706
9546
  document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css));
9707
9547
 
@@ -9787,7 +9627,7 @@ var terms = [
9787
9627
  logos: [shield_of_privacy_default, concordium_default]
9788
9628
  }
9789
9629
  ];
9790
- var TermsComponent = ({ children, level, handleLevel, isCustom = false }) => {
9630
+ var TermsComponent = ({ children, level, handleLevel, isCustom = false, layout }) => {
9791
9631
  const { t } = useTranslation();
9792
9632
  const handleReadmore = (status) => {
9793
9633
  setShowReadmore(status);
@@ -9798,11 +9638,8 @@ var TermsComponent = ({ children, level, handleLevel, isCustom = false }) => {
9798
9638
  (term, key) => term.level === level && /* @__PURE__ */ React.createElement(Fragment, { key }, /* @__PURE__ */ React.createElement(
9799
9639
  "div",
9800
9640
  {
9801
- className: `rounded-top d-flex align-items-center justify-content-between p-3 fw-medium flex-wrap ${isCustom ? "py-3 px-4" : "p-3 border-bottom bg-white"}`,
9641
+ className: `rounded-top d-flex align-items-center justify-content-between p-2 p-lg-3 fw-medium flex-wrap ${isCustom ? "py-2 py-lg-3 px-4 header-consent-bg" : "p-2 p-lg-3 border-bottom bg-white"}`,
9802
9642
  style: {
9803
- ...isCustom && {
9804
- backgroundColor: "#F8F9FD"
9805
- },
9806
9643
  ...isCustom && {
9807
9644
  borderBottom: "1px solid #DEDEDE"
9808
9645
  }
@@ -9816,15 +9653,24 @@ var TermsComponent = ({ children, level, handleLevel, isCustom = false }) => {
9816
9653
  src: bg_default
9817
9654
  }
9818
9655
  ), /* @__PURE__ */ React.createElement("div", { className: "minimize-shield position-relative z-2 py-2" }, /* @__PURE__ */ React.createElement("img", { src: privacy_default, alt: "Shield of Privacy" }), t("txt_shield_of_privacy")))) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: `status-tier tier-${term.level} rounded-circle` }), /* @__PURE__ */ React.createElement("div", { className: "status-tier-text" }, t(term.tier), " - ", t(term.levelname))))
9819
- ), /* @__PURE__ */ React.createElement("div", { className: `p-3 ${isCustom ? "pt-0" : ""} bg-white` }, isCustom ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
9656
+ ), /* @__PURE__ */ React.createElement("div", { className: `pb-3 ${isCustom ? "pt-0" : "p-3"} bg-white` }, isCustom ? /* @__PURE__ */ React.createElement(React.Fragment, null, layout === "simple-web-2" ? /* @__PURE__ */ React.createElement("div", { className: "px-3" }, /* @__PURE__ */ React.createElement(
9657
+ ConsentLevel,
9658
+ {
9659
+ level: 1,
9660
+ tier: t("txt_tier_1_tier"),
9661
+ levelname: t("txt_tier_1_levelname"),
9662
+ term_custom: t("txt_tier_1_term_custom"),
9663
+ content_custom: t("txt_tier_1_content_custom")
9664
+ }
9665
+ )) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
9820
9666
  Tabs,
9821
9667
  {
9822
9668
  id: "consent_info_tab",
9823
9669
  activeKey: activeTab,
9824
9670
  onSelect: (k) => setActiveTab(k),
9825
- className: "mb-3 w-100 flex-nowrap consent_info_tab"
9671
+ className: "mb-2 mb-lg-3 w-100 flex-nowrap consent_info_tab"
9826
9672
  },
9827
- /* @__PURE__ */ React.createElement(Tab, { eventKey: "consent", title: "Consent", className: "w-100" }, /* @__PURE__ */ React.createElement("p", { className: "mb-3" }, t("txt_consent_to_data")), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center flex-wrap" }, /* @__PURE__ */ React.createElement("div", { className: "me-10px" }, t("txt_ethical_compliant")), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center" }, /* @__PURE__ */ React.createElement("div", { className: "item_compliant fw-semibold d-flex align-items-center text-dark" }, /* @__PURE__ */ React.createElement("img", { src: check_line_default, width: 24, height: 24 }), "GDPR"), /* @__PURE__ */ React.createElement("div", { className: "item_compliant fw-semibold d-flex align-items-center text-dark ms-10px" }, /* @__PURE__ */ React.createElement("img", { src: check_line_default, width: 24, height: 24 }), "CCPA"))), /* @__PURE__ */ React.createElement("div", { className: "fw-semibold mt-3 mb-0 text-dark" }, t("txt_your_current_level")), /* @__PURE__ */ React.createElement(
9673
+ /* @__PURE__ */ React.createElement(Tab, { eventKey: "consent", title: "Consent", className: "w-auto px-3" }, /* @__PURE__ */ React.createElement("p", { className: "mb-2 mb-lg-3" }, t("txt_consent_to_data")), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center flex-wrap" }, /* @__PURE__ */ React.createElement("div", { className: "me-10px" }, t("txt_ethical_compliant")), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center" }, /* @__PURE__ */ React.createElement("div", { className: "item_compliant fw-semibold d-flex align-items-center" }, /* @__PURE__ */ React.createElement("img", { src: check_line_default, width: 24, height: 24 }), "GDPR"), /* @__PURE__ */ React.createElement("div", { className: "item_compliant fw-semibold d-flex align-items-center ms-10px" }, /* @__PURE__ */ React.createElement("img", { src: check_line_default, width: 24, height: 24 }), "CCPA"))), /* @__PURE__ */ React.createElement("div", { className: "fw-semibold mt-2 mt-lg-3 mb-0 text-dark" }, t("txt_your_current_level")), /* @__PURE__ */ React.createElement(
9828
9674
  ConsentLevel,
9829
9675
  {
9830
9676
  level: term.level,
@@ -9834,71 +9680,83 @@ var TermsComponent = ({ children, level, handleLevel, isCustom = false }) => {
9834
9680
  content_custom: t(term.content_custom)
9835
9681
  }
9836
9682
  )),
9837
- /* @__PURE__ */ React.createElement(Tab, { eventKey: "detail", title: "Detail" }, /* @__PURE__ */ React.createElement("div", { className: "about_section" }, /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-start" }, /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("img", { src: check_circle_default, width: "14px", height: "15px" })), /* @__PURE__ */ React.createElement("div", { className: "ms-10px" }, /* @__PURE__ */ React.createElement(
9683
+ /* @__PURE__ */ React.createElement(Tab, { eventKey: "detail", title: "Detail", className: "px-3" }, /* @__PURE__ */ React.createElement(
9838
9684
  "div",
9839
9685
  {
9840
- dangerouslySetInnerHTML: {
9841
- __html: t("txt_detail_1", {
9842
- interpolation: { escapeValue: false }
9843
- })
9686
+ className: `about_section ${layout !== "simple-consent-mode" && layout !== "simple-web-2" ? "fix_height" : ""}`
9687
+ },
9688
+ /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-start" }, /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("img", { src: check_circle_default, width: "14px", height: "15px" })), /* @__PURE__ */ React.createElement("div", { className: "ms-10px" }, /* @__PURE__ */ React.createElement(
9689
+ "div",
9690
+ {
9691
+ dangerouslySetInnerHTML: {
9692
+ __html: t("txt_detail_1", {
9693
+ interpolation: { escapeValue: false }
9694
+ })
9695
+ }
9844
9696
  }
9845
- }
9846
- ))), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-start" }, /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("img", { src: check_circle_default, width: "14px", height: "15px" })), /* @__PURE__ */ React.createElement("div", { className: "ms-10px" }, /* @__PURE__ */ React.createElement(
9847
- "div",
9848
- {
9849
- dangerouslySetInnerHTML: {
9850
- __html: t("txt_detail_2", {
9851
- interpolation: { escapeValue: false }
9852
- })
9697
+ ))),
9698
+ /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-start" }, /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("img", { src: check_circle_default, width: "14px", height: "15px" })), /* @__PURE__ */ React.createElement("div", { className: "ms-10px" }, /* @__PURE__ */ React.createElement(
9699
+ "div",
9700
+ {
9701
+ dangerouslySetInnerHTML: {
9702
+ __html: t("txt_detail_2", {
9703
+ interpolation: { escapeValue: false }
9704
+ })
9705
+ }
9853
9706
  }
9854
- }
9855
- ))), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-start" }, /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("img", { src: check_circle_default, width: "14px", height: "15px" })), /* @__PURE__ */ React.createElement("div", { className: "ms-10px" }, /* @__PURE__ */ React.createElement(
9856
- "div",
9857
- {
9858
- dangerouslySetInnerHTML: {
9859
- __html: t("txt_detail_3", {
9860
- interpolation: { escapeValue: false }
9861
- })
9707
+ ))),
9708
+ /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-start" }, /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("img", { src: check_circle_default, width: "14px", height: "15px" })), /* @__PURE__ */ React.createElement("div", { className: "ms-10px" }, /* @__PURE__ */ React.createElement(
9709
+ "div",
9710
+ {
9711
+ dangerouslySetInnerHTML: {
9712
+ __html: t("txt_detail_3", {
9713
+ interpolation: { escapeValue: false }
9714
+ })
9715
+ }
9862
9716
  }
9863
- }
9864
- ))), /* @__PURE__ */ React.createElement("div", { className: "fw-semibold mt-3 mb-2 text-dark" }, t("txt_understanding_your_consent")), /* @__PURE__ */ React.createElement("div", { className: "mb-0" }, t("txt_this_website_uses")), /* @__PURE__ */ React.createElement(
9865
- ConsentLevel,
9866
- {
9867
- level: 1,
9868
- tier: t("txt_tier_1_tier"),
9869
- levelname: t("txt_tier_1_levelname"),
9870
- term_custom: t("txt_tier_1_term_custom"),
9871
- content_custom: t("txt_tier_1_content_custom")
9872
- }
9873
- ), /* @__PURE__ */ React.createElement(
9874
- ConsentLevel,
9875
- {
9876
- level: 2,
9877
- tier: t("txt_tier_2_tier"),
9878
- levelname: t("txt_tier_2_levelname"),
9879
- term_custom: t("txt_tier_2_term_custom"),
9880
- content_custom: t("txt_tier_2_content_custom")
9881
- }
9882
- ), /* @__PURE__ */ React.createElement(
9883
- ConsentLevel,
9884
- {
9885
- level: 3,
9886
- tier: t("txt_tier_3_tier"),
9887
- levelname: t("txt_tier_3_levelname"),
9888
- term_custom: t("txt_tier_3_term_custom"),
9889
- content_custom: t("txt_tier_3_content_custom")
9890
- }
9891
- ), /* @__PURE__ */ React.createElement(
9892
- ConsentLevel,
9893
- {
9894
- level: 4,
9895
- tier: t("txt_tier_4_tier"),
9896
- levelname: t("txt_tier_4_levelname"),
9897
- term_custom: t("txt_tier_4_term_custom"),
9898
- content_custom: t("txt_tier_4_content_custom")
9899
- }
9900
- ))),
9901
- /* @__PURE__ */ React.createElement(Tab, { eventKey: "about", title: "About" }, /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-start" }, /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("img", { src: check_circle_default, width: "14px", height: "15px" })), /* @__PURE__ */ React.createElement("div", { className: "ms-10px" }, /* @__PURE__ */ React.createElement(
9717
+ ))),
9718
+ /* @__PURE__ */ React.createElement("div", { className: "fw-semibold mt-3 mb-2 text-dark" }, t("txt_understanding_your_consent")),
9719
+ layout !== "simple-consent-mode" && layout !== "advance-consent-mode" ? /* @__PURE__ */ React.createElement("div", { className: "mb-0" }, t("txt_this_website_uses")) : /* @__PURE__ */ React.createElement(React.Fragment, null),
9720
+ layout === "advance-consent-mode" ? /* @__PURE__ */ React.createElement(React.Fragment, null) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
9721
+ ConsentLevel,
9722
+ {
9723
+ level: 1,
9724
+ tier: t("txt_tier_1_tier"),
9725
+ levelname: t("txt_tier_1_levelname"),
9726
+ term_custom: t("txt_tier_1_term_custom"),
9727
+ content_custom: t("txt_tier_1_content_custom")
9728
+ }
9729
+ )),
9730
+ layout !== "simple-consent-mode" && layout !== "simple-web-2" ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
9731
+ ConsentLevel,
9732
+ {
9733
+ level: 2,
9734
+ tier: t("txt_tier_2_tier"),
9735
+ levelname: t("txt_tier_2_levelname"),
9736
+ term_custom: t("txt_tier_2_term_custom"),
9737
+ content_custom: t("txt_tier_2_content_custom")
9738
+ }
9739
+ ), /* @__PURE__ */ React.createElement(
9740
+ ConsentLevel,
9741
+ {
9742
+ level: 3,
9743
+ tier: t("txt_tier_3_tier"),
9744
+ levelname: t("txt_tier_3_levelname"),
9745
+ term_custom: t("txt_tier_3_term_custom"),
9746
+ content_custom: t("txt_tier_3_content_custom")
9747
+ }
9748
+ ), /* @__PURE__ */ React.createElement(
9749
+ ConsentLevel,
9750
+ {
9751
+ level: 4,
9752
+ tier: t("txt_tier_4_tier"),
9753
+ levelname: t("txt_tier_4_levelname"),
9754
+ term_custom: t("txt_tier_4_term_custom"),
9755
+ content_custom: t("txt_tier_4_content_custom")
9756
+ }
9757
+ )) : /* @__PURE__ */ React.createElement(React.Fragment, null)
9758
+ )),
9759
+ /* @__PURE__ */ React.createElement(Tab, { eventKey: "about", title: "About", className: "px-3" }, /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-start" }, /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("img", { src: check_circle_default, width: "14px", height: "15px" })), /* @__PURE__ */ React.createElement("div", { className: "ms-10px" }, /* @__PURE__ */ React.createElement(
9902
9760
  "div",
9903
9761
  {
9904
9762
  dangerouslySetInnerHTML: {
@@ -9934,8 +9792,8 @@ var TermsComponent = ({ children, level, handleLevel, isCustom = false }) => {
9934
9792
  })
9935
9793
  }
9936
9794
  }
9937
- ))), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center mt-3 flex-wrap" }, /* @__PURE__ */ React.createElement("div", { className: "me-10px" }, t("txt_ethical_compliant")), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center" }, /* @__PURE__ */ React.createElement("div", { className: "item_compliant fw-semibold d-flex align-items-center text-dark" }, /* @__PURE__ */ React.createElement("img", { src: check_line_default, width: 24, height: 24 }), "GDPR"), /* @__PURE__ */ React.createElement("div", { className: "item_compliant fw-semibold d-flex align-items-center text-dark ms-10px" }, /* @__PURE__ */ React.createElement("img", { src: check_line_default, width: 24, height: 24 }), "CCPA"))))
9938
- )) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", { className: "text-dark fw-medium" }, t(term.content)), " ", /* @__PURE__ */ React.createElement("span", { className: "" }, t(term.term)), /* @__PURE__ */ React.createElement("div", { className: "read-more d-flex justify-content-between align-items-center flex-wrap" }, term.upgrade && /* @__PURE__ */ React.createElement(
9795
+ ))), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center mt-3 flex-wrap" }, /* @__PURE__ */ React.createElement("div", { className: "me-10px" }, t("txt_ethical_compliant")), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center" }, /* @__PURE__ */ React.createElement("div", { className: "item_compliant fw-semibold d-flex align-items-center" }, /* @__PURE__ */ React.createElement("img", { src: check_line_default, width: 24, height: 24 }), "GDPR"), /* @__PURE__ */ React.createElement("div", { className: "item_compliant fw-semibold d-flex align-items-center ms-10px" }, /* @__PURE__ */ React.createElement("img", { src: check_line_default, width: 24, height: 24 }), "CCPA"))))
9796
+ ))) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", { className: "text-dark fw-medium" }, t(term.content)), " ", /* @__PURE__ */ React.createElement("span", { className: "" }, t(term.term)), /* @__PURE__ */ React.createElement("div", { className: "read-more d-flex justify-content-between align-items-center flex-wrap" }, term.upgrade && /* @__PURE__ */ React.createElement(
9939
9797
  "a",
9940
9798
  {
9941
9799
  className: "fs-14 text-success fw-bold mb-1",
@@ -9954,17 +9812,17 @@ var TermsComponent = ({ children, level, handleLevel, isCustom = false }) => {
9954
9812
  !showReadmore ? t("txt_show_details") : t("txt_hide_details"),
9955
9813
  " ",
9956
9814
  /* @__PURE__ */ React.createElement("img", { src: arrow_default, className: `ms-1 ${showReadmore ? "revert" : ""}` })
9957
- )))), isCustom ? /* @__PURE__ */ React.createElement("div", { className: "rounded-bottom position-relative overflow-hidden text-white bg-white" }, /* @__PURE__ */ React.createElement("div", { className: "position-relative p-3" }, /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center justify-content-between flex-wrap" }, children))) : /* @__PURE__ */ React.createElement("div", { className: "rounded-bottom position-relative overflow-hidden text-white" }, /* @__PURE__ */ React.createElement("img", { className: "position-absolute h-100 w-100 object-fit-cover", src: bg_default }), /* @__PURE__ */ React.createElement(
9815
+ )))), isCustom ? /* @__PURE__ */ React.createElement("div", { className: "rounded-bottom position-relative overflow-hidden text-white bg-white" }, /* @__PURE__ */ React.createElement("div", { className: "position-relative pt-2 pt-lg-3 p-3" }, /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center justify-content-between flex-wrap" }, children))) : /* @__PURE__ */ React.createElement("div", { className: "rounded-bottom position-relative overflow-hidden text-white" }, /* @__PURE__ */ React.createElement("img", { className: "position-absolute h-100 w-100 object-fit-cover", src: bg_default }), /* @__PURE__ */ React.createElement(
9958
9816
  "img",
9959
9817
  {
9960
9818
  className: "position-absolute h-100 w-100 object-fit-cover lightning flash-effect",
9961
9819
  src: bg_default
9962
9820
  }
9963
- ), /* @__PURE__ */ React.createElement("div", { className: "position-relative p-3" }, showReadmore && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "mb-3" }, term.upgrade && t(term.upgrade), t(term.upgradetext), /* @__PURE__ */ React.createElement("div", { className: "fs-14 fst-italic" }, "* ", t("txt_no_collect")))), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center justify-content-between flex-wrap" }, /* @__PURE__ */ React.createElement("div", { className: "me-2" }, /* @__PURE__ */ React.createElement("img", { src: privacy_default, alt: t(term.name) }), " ", t("txt_shield_of_privacy")), children))))
9821
+ ), /* @__PURE__ */ React.createElement("div", { className: "position-relative pt-2 pt-lg-3 p-3" }, showReadmore && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "mb-3" }, term.upgrade && t(term.upgrade), t(term.upgradetext), /* @__PURE__ */ React.createElement("div", { className: "fs-14 fst-italic" }, "* ", t("txt_no_collect")))), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center justify-content-between flex-wrap" }, /* @__PURE__ */ React.createElement("div", { className: "me-2" }, /* @__PURE__ */ React.createElement("img", { src: privacy_default, alt: t(term.name) }), " ", t("txt_shield_of_privacy")), children))))
9964
9822
  ));
9965
9823
  };
9966
9824
  var ConsentLevel = ({ level, tier, levelname, term_custom, content_custom }) => {
9967
- return /* @__PURE__ */ React.createElement("div", { className: "consent_level mt-3" }, /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center justify-content-between flex-wrap mb-2" }, /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center" }, /* @__PURE__ */ React.createElement("div", { className: `status-tier tier-${level} rounded-circle` }), /* @__PURE__ */ React.createElement("div", { className: "status-tier-text fw-semibold fs-14 text-primary" }, tier, " - ", levelname)), /* @__PURE__ */ React.createElement("div", { className: "fw-semibold fs-14 text-primary" }, term_custom)), /* @__PURE__ */ React.createElement("div", null, content_custom));
9825
+ return /* @__PURE__ */ React.createElement("div", { className: "consent_level mt-2 mt-lg-3" }, /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center justify-content-between flex-wrap mb-2" }, /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center" }, /* @__PURE__ */ React.createElement("div", { className: `status-tier tier-${level} rounded-circle` }), /* @__PURE__ */ React.createElement("div", { className: "status-tier-text fw-semibold fs-14 text-primary" }, tier, " - ", levelname)), /* @__PURE__ */ React.createElement("div", { className: "fw-semibold fs-14 text-primary" }, term_custom)), /* @__PURE__ */ React.createElement("div", null, content_custom));
9968
9826
  };
9969
9827
 
9970
9828
  // src/Assets/yes.svg
@@ -10275,14 +10133,6 @@ var SSOEthereumProvider = ({ children }) => {
10275
10133
  var Ethereum_default = SSOEthereumProvider;
10276
10134
 
10277
10135
  export {
10278
- agreeConsents,
10279
- getConsents,
10280
- getSignature,
10281
- getNonce,
10282
- revokeConsents,
10283
- getMember,
10284
- getWalletNonce,
10285
- verifySignature,
10286
10136
  getWeb3ID,
10287
10137
  BROWSER_WALLET,
10288
10138
  WALLET_CONNECT,