@directcryptopay/sdk 0.2.2 → 0.2.4

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 (228) hide show
  1. package/dist/ExchangeController-CbO41bcH.js +217 -0
  2. package/dist/HelpersUtil-DHm6EVSE.js +120 -0
  3. package/dist/NavigationUtil-kj9LEOOd.js +8 -0
  4. package/dist/PhArrowCircleDown-lsK25DCk.js +73 -0
  5. package/dist/PhArrowClockwise-NeKHZ1co.js +73 -0
  6. package/dist/PhArrowDown-C9AkNvLs.js +73 -0
  7. package/dist/PhArrowLeft-RNfIQP1X.js +73 -0
  8. package/dist/PhArrowRight-DM1tna0G.js +73 -0
  9. package/dist/PhArrowSquareOut-S5XYbAZj.js +73 -0
  10. package/dist/PhArrowUp-DmktzOWy.js +73 -0
  11. package/dist/PhArrowUpRight-BkNeW_5i.js +73 -0
  12. package/dist/PhArrowsClockwise-CQ4pG76b.js +73 -0
  13. package/dist/PhArrowsDownUp-H6gxaNM6.js +73 -0
  14. package/dist/PhArrowsLeftRight-DZSsfMR6.js +73 -0
  15. package/dist/PhBank-4_9QzqIB.js +73 -0
  16. package/dist/PhBrowser-B-JSznId.js +73 -0
  17. package/dist/PhCaretDown-vV5oHMNi.js +73 -0
  18. package/dist/PhCaretLeft-BLo6Y_f4.js +73 -0
  19. package/dist/PhCaretRight-CqQN4TT3.js +73 -0
  20. package/dist/PhCaretUp-Df7UCAHy.js +73 -0
  21. package/dist/PhCheck-gtpfK4ed.js +73 -0
  22. package/dist/PhCircleHalf-Uq7dwDYw.js +73 -0
  23. package/dist/PhClock-SDCW-NmF.js +73 -0
  24. package/dist/PhCompass-B7hgtdx-.js +73 -0
  25. package/dist/PhCopy-BcnhyXCy.js +73 -0
  26. package/dist/PhCreditCard-BJjByVgu.js +73 -0
  27. package/dist/PhCurrencyDollar-B7ZXqXBy.js +73 -0
  28. package/dist/PhDesktop-B3VKPuJx.js +73 -0
  29. package/dist/PhDeviceMobile-Bnd0TYEH.js +73 -0
  30. package/dist/PhDotsThree-yyMWyZ-R.js +73 -0
  31. package/dist/PhEnvelope-67uzHbI9.js +73 -0
  32. package/dist/PhFunnelSimple-B-DCsloI.js +73 -0
  33. package/dist/PhGlobe-TMm_6qGk.js +73 -0
  34. package/dist/PhIdentificationCard-CePPD2xc.js +73 -0
  35. package/dist/PhImage-gY96WtHR.js +73 -0
  36. package/dist/PhInfo-DRQM_ZDP.js +73 -0
  37. package/dist/PhLightbulb-B0TxPfZ1.js +73 -0
  38. package/dist/PhMagnifyingGlass-B8si5_6W.js +73 -0
  39. package/dist/PhPaperPlaneRight-DVu5PLYd.js +73 -0
  40. package/dist/PhPlus-BfTsQnUz.js +73 -0
  41. package/dist/PhPower-CxYUGOWn.js +73 -0
  42. package/dist/PhPuzzlePiece-CQ4wh0gV.js +73 -0
  43. package/dist/PhQrCode-BuJ97NYJ.js +73 -0
  44. package/dist/PhQuestion-kJoP8Mja.js +73 -0
  45. package/dist/PhQuestionMark-C46ZkFpu.js +73 -0
  46. package/dist/PhSealCheck-Eh8jVqSN.js +73 -0
  47. package/dist/PhSignOut-jk97OSVt.js +73 -0
  48. package/dist/PhSpinner-CiYOhwMg.js +73 -0
  49. package/dist/PhTrash-pxerMqzd.js +73 -0
  50. package/dist/PhUser-BMg0VV4A.js +73 -0
  51. package/dist/PhVault-DYQvx5A-.js +73 -0
  52. package/dist/PhWarning-NLC5Mj87.js +73 -0
  53. package/dist/PhWarningCircle-Ch2jU9fA.js +73 -0
  54. package/dist/PhX-Bx4wpwm3.js +73 -0
  55. package/dist/SwapController-Ch0FFTEt.js +457 -0
  56. package/dist/{ccip-BIGqktC1.js → ccip-BrGhNXIM.js} +4 -4
  57. package/dist/data-capture-CpafmuCb.js +490 -0
  58. package/dist/dcp-sdk.umd.js +7400 -6589
  59. package/dist/email-Dcg4jlai.js +344 -0
  60. package/dist/embedded-wallet-DeoRdAPw.js +820 -0
  61. package/dist/features-B9Nde43h.js +274 -0
  62. package/dist/{hashTypedData-ZH9ZnWu3.js → hashTypedData-a7b8tdkO.js} +6 -6
  63. package/dist/if-defined-k21LutCn.js +10 -0
  64. package/dist/index-9vLw53Xl.js +228 -0
  65. package/dist/index-B5wUyynz.js +107 -0
  66. package/dist/index-B8LkUrww.js +86 -0
  67. package/dist/{index-CPTcEPbD.js → index-BA0VwKg0.js} +296 -298
  68. package/dist/index-BB9JJ24N.js +125 -0
  69. package/dist/index-BCkEvPQ6.js +172 -0
  70. package/dist/index-BDeO_csr.js +171 -0
  71. package/dist/index-Bb7babLF.js +1281 -0
  72. package/dist/index-BjOhprVS.js +199 -0
  73. package/dist/{index-Dy4NyE6l.js → index-BjyMgZsf.js} +7 -7
  74. package/dist/index-BkThIDLX.js +159 -0
  75. package/dist/index-BmFs6nb7.js +209 -0
  76. package/dist/{index-5mp7WkhV.js → index-C4qc4PdD.js} +2 -2
  77. package/dist/{index-BdSIrl-R.js → index-CAPvUh14.js} +578 -570
  78. package/dist/index-CBMU3PTE.js +65 -0
  79. package/dist/index-CGwPkJLF.js +355 -0
  80. package/dist/index-CNGEqX3D.js +153 -0
  81. package/dist/index-CRlCq6IB.js +7981 -0
  82. package/dist/index-Cg_o-i9X.js +118 -0
  83. package/dist/index-D1BvhCbI.js +62 -0
  84. package/dist/index-DFi8TiHc.js +128 -0
  85. package/dist/index-DLwuveL9.js +555 -0
  86. package/dist/index-DMn7ktUQ.js +56 -0
  87. package/dist/index-DOXwtuwa.js +117 -0
  88. package/dist/index-DPPOW_Tp.js +118 -0
  89. package/dist/{index-f3LXSfM5.js → index-DQpzHpW-.js} +56 -142
  90. package/dist/{index-D6h-qfpt.js → index-DXHg5C-W.js} +5 -5
  91. package/dist/index-DcYjZV4H.js +110 -0
  92. package/dist/{index-BJ7cbG3N.js → index-DeL88Lwc.js} +36769 -40177
  93. package/dist/index-DrWVlf8b.js +46 -0
  94. package/dist/index-Dsfuc4rB.js +123 -0
  95. package/dist/index-DuTny38n.js +1175 -0
  96. package/dist/{index-D5r0iSq4.js → index-Nfjb6bV0.js} +1 -1
  97. package/dist/index-WwwdQSN2.js +85 -0
  98. package/dist/index-Yha9Afch.js +174 -0
  99. package/dist/index-cbQHN7GC.js +100 -0
  100. package/dist/{index-DobBVPe4.js → index-hyG3cYsv.js} +481 -236
  101. package/dist/index-qLxmmPaL.js +257 -0
  102. package/dist/index.js +1 -1
  103. package/dist/{localBatchGatewayRequest-CjGcn5nM.js → localBatchGatewayRequest-vfcvRH0G.js} +1 -1
  104. package/dist/onramp-BSiyOX4L.js +855 -0
  105. package/dist/{parseSignature-S8VEpRHC.js → parseSignature-CdCMAPZN.js} +2312 -2313
  106. package/dist/pay-with-exchange-CduNoMEz.js +525 -0
  107. package/dist/property-Bd8U3_QP.js +618 -0
  108. package/dist/receive-CrmptJlq.js +232 -0
  109. package/dist/ref-SOwYtCZb.js +107 -0
  110. package/dist/send-oMcHMEr6.js +1166 -0
  111. package/dist/socials-C0A4-FbY.js +620 -0
  112. package/dist/swaps-CbJJ9Ciu.js +1760 -0
  113. package/dist/{transactions-DujFkB-M.js → transactions-BDfCoBS5.js} +10 -10
  114. package/dist/w3m-modal-BjsTkny7.js +1706 -0
  115. package/package.json +3 -3
  116. package/dist/ConstantsUtil-B-_-u8aQ.js +0 -6
  117. package/dist/add-sji6scSD.js +0 -19
  118. package/dist/all-wallets-B4H-890E.js +0 -10
  119. package/dist/app-store-Z433s97G.js +0 -21
  120. package/dist/apple-b8Lxj7nb.js +0 -22
  121. package/dist/arrow-bottom-M9oWWo_9.js +0 -12
  122. package/dist/arrow-bottom-circle-N9c4CXY1.js +0 -15
  123. package/dist/arrow-left-Dw8AKfwf.js +0 -12
  124. package/dist/arrow-right-DwLQZSC_.js +0 -12
  125. package/dist/arrow-top-zhUjkBe1.js +0 -12
  126. package/dist/bank-CbQdnILK.js +0 -18
  127. package/dist/browser-xAqNwt7z.js +0 -18
  128. package/dist/card-Dr1QBmWp.js +0 -18
  129. package/dist/checkmark-BhT1dTgG.js +0 -15
  130. package/dist/checkmark-bold-CPB29wqQ.js +0 -12
  131. package/dist/chevron-bottom-BhNyx2II.js +0 -12
  132. package/dist/chevron-left-CGuEjQlY.js +0 -12
  133. package/dist/chevron-right-CvIRRsqZ.js +0 -12
  134. package/dist/chevron-top-RSzCqjBd.js +0 -12
  135. package/dist/chrome-store-Cs8dAgs0.js +0 -65
  136. package/dist/clock-fhZO5otC.js +0 -12
  137. package/dist/close-BPuztrdR.js +0 -12
  138. package/dist/coinPlaceholder-C8X2i7Kh.js +0 -12
  139. package/dist/compass-WMc5huk0.js +0 -12
  140. package/dist/copy-DVAeT17y.js +0 -19
  141. package/dist/cursor-BJ4YLXfy.js +0 -7
  142. package/dist/cursor-transparent-DN2fLQN4.js +0 -16
  143. package/dist/desktop-6avxisBw.js +0 -13
  144. package/dist/disconnect-AReVI8Gk.js +0 -12
  145. package/dist/discord-CxrI30BZ.js +0 -21
  146. package/dist/email-B8dIIaay.js +0 -696
  147. package/dist/embedded-wallet-C_5hF7rM.js +0 -468
  148. package/dist/etherscan-BnAy8cIF.js +0 -10
  149. package/dist/exclamation-triangle-Bu7nHwx9.js +0 -8
  150. package/dist/extension-F0LIhvcf.js +0 -12
  151. package/dist/external-link-CP6phyaM.js +0 -12
  152. package/dist/facebook-BtQ-Io2y.js +0 -30
  153. package/dist/farcaster-BmaN1ugd.js +0 -16
  154. package/dist/filters-DpEwoOmy.js +0 -12
  155. package/dist/github-q7qO9V-b.js +0 -22
  156. package/dist/google-DH_ZE8bW.js +0 -22
  157. package/dist/help-circle-BAQVmKas.js +0 -16
  158. package/dist/id-Cj68Zwgo.js +0 -16
  159. package/dist/if-defined-CNte9B3N.js +0 -744
  160. package/dist/image-BKJDw6N-.js +0 -8
  161. package/dist/index-7toZMdtG.js +0 -573
  162. package/dist/index-B1uKzdvN.js +0 -170
  163. package/dist/index-BHFZVF-b.js +0 -257
  164. package/dist/index-BKwa5JSA.js +0 -559
  165. package/dist/index-BP4B9VUt.js +0 -54
  166. package/dist/index-BVdzXHpO.js +0 -181
  167. package/dist/index-BYND0GJ9.js +0 -146
  168. package/dist/index-BaJ0zEbh.js +0 -97
  169. package/dist/index-Bh0MPFwP.js +0 -58
  170. package/dist/index-Bsh7_qTp.js +0 -511
  171. package/dist/index-BwnXTNNg.js +0 -199
  172. package/dist/index-C0kPDbg_.js +0 -77
  173. package/dist/index-CKikVKe2.js +0 -75
  174. package/dist/index-ChVh0Hkp.js +0 -243
  175. package/dist/index-Cle_NnnS.js +0 -305
  176. package/dist/index-CmWdvIFT.js +0 -51
  177. package/dist/index-D2AMA8Bu.js +0 -65
  178. package/dist/index-DAUM8CO4.js +0 -65
  179. package/dist/index-DGjZW6uR.js +0 -78
  180. package/dist/index-DQe94z7X.js +0 -265
  181. package/dist/index-DTo6w99t.js +0 -7864
  182. package/dist/index-DYdXjap2.js +0 -320
  183. package/dist/index-DceCxNV5.js +0 -181
  184. package/dist/index-Uw9cSw0q.js +0 -294
  185. package/dist/index-qiuyrukh.js +0 -45
  186. package/dist/index-zddvaohA.js +0 -78
  187. package/dist/info-RfPsmroW.js +0 -7
  188. package/dist/info-circle-DFKHB_ZN.js +0 -16
  189. package/dist/lightbulb-B-Bykj9X.js +0 -7
  190. package/dist/mail-mBAgGuw5.js +0 -12
  191. package/dist/mobile-Dhh3ndkf.js +0 -13
  192. package/dist/more-D1h7UTvg.js +0 -15
  193. package/dist/network-placeholder-Dqynvc-t.js +0 -18
  194. package/dist/nftPlaceholder-Df7MW4MM.js +0 -12
  195. package/dist/off-BmG3cHTX.js +0 -12
  196. package/dist/onramp-C401Aenb.js +0 -1279
  197. package/dist/play-store-4q1fzL_P.js +0 -36
  198. package/dist/plus-603Gs3yG.js +0 -17
  199. package/dist/qr-code-Dgwhf6M1.js +0 -10
  200. package/dist/receive-CYXbbEUR.js +0 -186
  201. package/dist/recycle-horizontal-Bu8zZ563.js +0 -13
  202. package/dist/ref-DpmKRWBK.js +0 -41
  203. package/dist/refresh-BMZFu0mu.js +0 -12
  204. package/dist/reown-logo-BXph7ThY.js +0 -16
  205. package/dist/search-Cm_V42Y_.js +0 -12
  206. package/dist/secp256k1-C0iX1TUr.js +0 -1510
  207. package/dist/secp256k1-DOQBqE4Z.js +0 -1302
  208. package/dist/send-BSMYxDuP.js +0 -19
  209. package/dist/send-C8EeIzRB.js +0 -1038
  210. package/dist/socials-DQrHQajs.js +0 -574
  211. package/dist/swapHorizontal-98rnJewS.js +0 -12
  212. package/dist/swapHorizontalBold-C299FjEt.js +0 -12
  213. package/dist/swapHorizontalMedium-Cqm6i4WJ.js +0 -20
  214. package/dist/swapHorizontalRoundedBold-De7hFfqZ.js +0 -12
  215. package/dist/swapVertical-DSL75l8L.js +0 -12
  216. package/dist/swaps-BuTNp65Y.js +0 -1637
  217. package/dist/telegram-cJP7hgUb.js +0 -20
  218. package/dist/three-dots-DHnEh28O.js +0 -9
  219. package/dist/twitch-CR2iGcBo.js +0 -22
  220. package/dist/twitterIcon-E5TAQjOn.js +0 -10
  221. package/dist/verify-DEukUJp0.js +0 -12
  222. package/dist/verify-filled-BXsx1i_p.js +0 -12
  223. package/dist/w3m-modal-Bm7BqVng.js +0 -1037
  224. package/dist/wallet-CzyyvdrT.js +0 -12
  225. package/dist/wallet-placeholder-BrcmyGEe.js +0 -18
  226. package/dist/walletconnect-BSYogWiE.js +0 -36
  227. package/dist/warning-circle-Cgp2BW3m.js +0 -16
  228. package/dist/x-BJinLpTw.js +0 -16
@@ -0,0 +1,257 @@
1
+ import { cC as g, cR as C, cS as w, cU as k, cV as $, cX as m, cY as d, cM as l } from "./index-DeL88Lwc.js";
2
+ import { n as x, c as f, r as v } from "./index-DuTny38n.js";
3
+ import { o as z } from "./if-defined-k21LutCn.js";
4
+ import { e as _, n as E } from "./ref-SOwYtCZb.js";
5
+ const h = g({
6
+ isLegalCheckboxChecked: !1
7
+ }), u = {
8
+ state: h,
9
+ subscribe(e) {
10
+ return w(h, () => e(h));
11
+ },
12
+ subscribeKey(e, t) {
13
+ return C(h, e, t);
14
+ },
15
+ setIsLegalCheckboxChecked(e) {
16
+ h.isLegalCheckboxChecked = e;
17
+ }
18
+ }, O = k`
19
+ label {
20
+ display: inline-flex;
21
+ align-items: center;
22
+ cursor: pointer;
23
+ user-select: none;
24
+ column-gap: ${({ spacing: e }) => e[2]};
25
+ }
26
+
27
+ label > input[type='checkbox'] {
28
+ height: 0;
29
+ width: 0;
30
+ opacity: 0;
31
+ position: absolute;
32
+ }
33
+
34
+ label > span {
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: center;
38
+ height: 100%;
39
+ width: 100%;
40
+ border: 1px solid ${({ colors: e }) => e.neutrals400};
41
+ color: ${({ colors: e }) => e.white};
42
+ background-color: transparent;
43
+ will-change: border-color, background-color;
44
+ }
45
+
46
+ label > span > wui-icon {
47
+ opacity: 0;
48
+ will-change: opacity;
49
+ }
50
+
51
+ label > input[type='checkbox']:checked + span > wui-icon {
52
+ color: ${({ colors: e }) => e.white};
53
+ }
54
+
55
+ label > input[type='checkbox']:not(:checked) > span > wui-icon {
56
+ color: ${({ colors: e }) => e.neutrals900};
57
+ }
58
+
59
+ label > input[type='checkbox']:checked + span > wui-icon {
60
+ opacity: 1;
61
+ }
62
+
63
+ /* -- Sizes --------------------------------------------------- */
64
+ label[data-size='lg'] > span {
65
+ width: 24px;
66
+ height: 24px;
67
+ min-width: 24px;
68
+ min-height: 24px;
69
+ border-radius: ${({ borderRadius: e }) => e[10]};
70
+ }
71
+
72
+ label[data-size='md'] > span {
73
+ width: 20px;
74
+ height: 20px;
75
+ min-width: 20px;
76
+ min-height: 20px;
77
+ border-radius: ${({ borderRadius: e }) => e[2]};
78
+ }
79
+
80
+ label[data-size='sm'] > span {
81
+ width: 16px;
82
+ height: 16px;
83
+ min-width: 16px;
84
+ min-height: 16px;
85
+ border-radius: ${({ borderRadius: e }) => e[1]};
86
+ }
87
+
88
+ /* -- Focus states --------------------------------------------------- */
89
+ label > input[type='checkbox']:focus-visible + span,
90
+ label > input[type='checkbox']:focus + span {
91
+ border: 1px solid ${({ tokens: e }) => e.core.borderAccentPrimary};
92
+ box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2);
93
+ }
94
+
95
+ /* -- Checked states --------------------------------------------------- */
96
+ label > input[type='checkbox']:checked + span {
97
+ background-color: ${({ tokens: e }) => e.core.iconAccentPrimary};
98
+ border: 1px solid transparent;
99
+ }
100
+
101
+ /* -- Hover states --------------------------------------------------- */
102
+ input[type='checkbox']:not(:checked):not(:disabled) + span:hover {
103
+ border: 1px solid ${({ colors: e }) => e.neutrals700};
104
+ background-color: ${({ colors: e }) => e.neutrals800};
105
+ box-shadow: none;
106
+ }
107
+
108
+ input[type='checkbox']:checked:not(:disabled) + span:hover {
109
+ border: 1px solid transparent;
110
+ background-color: ${({ colors: e }) => e.accent080};
111
+ box-shadow: none;
112
+ }
113
+
114
+ /* -- Disabled state --------------------------------------------------- */
115
+ label > input[type='checkbox']:checked:disabled + span {
116
+ border: 1px solid transparent;
117
+ opacity: 0.3;
118
+ }
119
+
120
+ label > input[type='checkbox']:not(:checked):disabled + span {
121
+ border: 1px solid ${({ colors: e }) => e.neutrals700};
122
+ }
123
+
124
+ label:has(input[type='checkbox']:disabled) {
125
+ cursor: auto;
126
+ }
127
+
128
+ label > input[type='checkbox']:disabled + span {
129
+ cursor: not-allowed;
130
+ }
131
+ `;
132
+ var b = function(e, t, o, s) {
133
+ var n = arguments.length, c = n < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, o) : s, i;
134
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function") c = Reflect.decorate(e, t, o, s);
135
+ else for (var r = e.length - 1; r >= 0; r--) (i = e[r]) && (c = (n < 3 ? i(c) : n > 3 ? i(t, o, c) : i(t, o)) || c);
136
+ return n > 3 && c && Object.defineProperty(t, o, c), c;
137
+ };
138
+ const R = {
139
+ lg: "md",
140
+ md: "sm",
141
+ sm: "sm"
142
+ };
143
+ let a = class extends m {
144
+ constructor() {
145
+ super(...arguments), this.inputElementRef = _(), this.checked = void 0, this.disabled = !1, this.size = "md";
146
+ }
147
+ render() {
148
+ const t = R[this.size];
149
+ return d`
150
+ <label data-size=${this.size}>
151
+ <input
152
+ ${E(this.inputElementRef)}
153
+ ?checked=${z(this.checked)}
154
+ ?disabled=${this.disabled}
155
+ type="checkbox"
156
+ @change=${this.dispatchChangeEvent}
157
+ />
158
+ <span>
159
+ <wui-icon name="checkmarkBold" size=${t}></wui-icon>
160
+ </span>
161
+ <slot></slot>
162
+ </label>
163
+ `;
164
+ }
165
+ dispatchChangeEvent() {
166
+ var t;
167
+ this.dispatchEvent(new CustomEvent("checkboxChange", {
168
+ detail: (t = this.inputElementRef.value) == null ? void 0 : t.checked,
169
+ bubbles: !0,
170
+ composed: !0
171
+ }));
172
+ }
173
+ };
174
+ a.styles = [$, O];
175
+ b([
176
+ x({ type: Boolean })
177
+ ], a.prototype, "checked", void 0);
178
+ b([
179
+ x({ type: Boolean })
180
+ ], a.prototype, "disabled", void 0);
181
+ b([
182
+ x()
183
+ ], a.prototype, "size", void 0);
184
+ a = b([
185
+ f("wui-checkbox")
186
+ ], a);
187
+ const P = k`
188
+ :host {
189
+ display: flex;
190
+ align-items: center;
191
+ justify-content: center;
192
+ }
193
+ wui-checkbox {
194
+ padding: ${({ spacing: e }) => e[3]};
195
+ }
196
+ a {
197
+ text-decoration: none;
198
+ color: ${({ tokens: e }) => e.theme.textSecondary};
199
+ font-weight: 500;
200
+ }
201
+ `;
202
+ var y = function(e, t, o, s) {
203
+ var n = arguments.length, c = n < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, o) : s, i;
204
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function") c = Reflect.decorate(e, t, o, s);
205
+ else for (var r = e.length - 1; r >= 0; r--) (i = e[r]) && (c = (n < 3 ? i(c) : n > 3 ? i(t, o, c) : i(t, o)) || c);
206
+ return n > 3 && c && Object.defineProperty(t, o, c), c;
207
+ };
208
+ let p = class extends m {
209
+ constructor() {
210
+ super(), this.unsubscribe = [], this.checked = u.state.isLegalCheckboxChecked, this.unsubscribe.push(u.subscribeKey("isLegalCheckboxChecked", (t) => {
211
+ this.checked = t;
212
+ }));
213
+ }
214
+ disconnectedCallback() {
215
+ this.unsubscribe.forEach((t) => t());
216
+ }
217
+ render() {
218
+ var n;
219
+ const { termsConditionsUrl: t, privacyPolicyUrl: o } = l.state, s = (n = l.state.features) == null ? void 0 : n.legalCheckbox;
220
+ return !t && !o || !s ? null : d`
221
+ <wui-checkbox
222
+ ?checked=${this.checked}
223
+ @checkboxChange=${this.onCheckboxChange.bind(this)}
224
+ data-testid="wui-checkbox"
225
+ >
226
+ <wui-text color="secondary" variant="sm-regular" align="left">
227
+ I agree to our ${this.termsTemplate()} ${this.andTemplate()} ${this.privacyTemplate()}
228
+ </wui-text>
229
+ </wui-checkbox>
230
+ `;
231
+ }
232
+ andTemplate() {
233
+ const { termsConditionsUrl: t, privacyPolicyUrl: o } = l.state;
234
+ return t && o ? "and" : "";
235
+ }
236
+ termsTemplate() {
237
+ const { termsConditionsUrl: t } = l.state;
238
+ return t ? d`<a rel="noreferrer" target="_blank" href=${t}>terms of service</a>` : null;
239
+ }
240
+ privacyTemplate() {
241
+ const { privacyPolicyUrl: t } = l.state;
242
+ return t ? d`<a rel="noreferrer" target="_blank" href=${t}>privacy policy</a>` : null;
243
+ }
244
+ onCheckboxChange() {
245
+ u.setIsLegalCheckboxChecked(!this.checked);
246
+ }
247
+ };
248
+ p.styles = [P];
249
+ y([
250
+ v()
251
+ ], p.prototype, "checked", void 0);
252
+ p = y([
253
+ f("w3m-legal-checkbox")
254
+ ], p);
255
+ export {
256
+ u as O
257
+ };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { fq as r } from "./index-BJ7cbG3N.js";
1
+ import { fx as r } from "./index-DeL88Lwc.js";
2
2
  export {
3
3
  r as DCP
4
4
  };
@@ -1,4 +1,4 @@
1
- import { bJ as l, ck as p, d2 as w, R as y, be as A, bl as g, K as b, J as F, bi as E, bD as N, P as h, Q as P, Z as R, d3 as f, d4 as I } from "./index-BJ7cbG3N.js";
1
+ import { bJ as l, ck as p, dj as w, R as y, be as A, bl as g, K as b, J as F, bi as E, bD as N, P as h, Q as P, Z as R, dk as f, dl as I } from "./index-DeL88Lwc.js";
2
2
  function q(n) {
3
3
  const { abi: r, data: a } = n, e = l(a, 0, 4), t = r.find((o) => o.type === "function" && e === p(w(o)));
4
4
  if (!t)