@c15t/dev-tools 1.8.3 → 2.0.0-rc.0

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/CHANGELOG.md +12 -0
  2. package/README.md +155 -71
  3. package/dist/__tests__/components/ui.test.d.ts +2 -0
  4. package/dist/__tests__/components/ui.test.d.ts.map +1 -0
  5. package/dist/__tests__/core/renderer.test.d.ts +2 -0
  6. package/dist/__tests__/core/renderer.test.d.ts.map +1 -0
  7. package/dist/__tests__/core/reset-consents.test.d.ts +2 -0
  8. package/dist/__tests__/core/reset-consents.test.d.ts.map +1 -0
  9. package/dist/__tests__/core/state-manager.test.d.ts +2 -0
  10. package/dist/__tests__/core/state-manager.test.d.ts.map +1 -0
  11. package/dist/__tests__/panels/dom-scanner.test.d.ts +2 -0
  12. package/dist/__tests__/panels/dom-scanner.test.d.ts.map +1 -0
  13. package/dist/components/dropdown-menu.d.ts +46 -0
  14. package/dist/components/dropdown-menu.d.ts.map +1 -0
  15. package/dist/components/index.d.ts +7 -0
  16. package/dist/components/index.d.ts.map +1 -0
  17. package/dist/components/panel.d.ts +28 -0
  18. package/dist/components/panel.d.ts.map +1 -0
  19. package/dist/components/tabs.d.ts +21 -0
  20. package/dist/components/tabs.d.ts.map +1 -0
  21. package/dist/components/ui.d.ts +65 -0
  22. package/dist/components/ui.d.ts.map +1 -0
  23. package/dist/core/devtools.d.ts +60 -0
  24. package/dist/core/devtools.d.ts.map +1 -0
  25. package/dist/core/draggable.d.ts +81 -0
  26. package/dist/core/draggable.d.ts.map +1 -0
  27. package/dist/core/index.d.ts +10 -0
  28. package/dist/core/index.d.ts.map +1 -0
  29. package/dist/core/panel-renderer.d.ts +41 -0
  30. package/dist/core/panel-renderer.d.ts.map +1 -0
  31. package/dist/core/renderer.d.ts +126 -0
  32. package/dist/core/renderer.d.ts.map +1 -0
  33. package/dist/core/reset-consents.d.ts +24 -0
  34. package/dist/core/reset-consents.d.ts.map +1 -0
  35. package/dist/core/state-manager.d.ts +73 -0
  36. package/dist/core/state-manager.d.ts.map +1 -0
  37. package/dist/core/store-connector.d.ts +69 -0
  38. package/dist/core/store-connector.d.ts.map +1 -0
  39. package/dist/index.cjs +4813 -10
  40. package/dist/index.d.ts +10 -1
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +4803 -2
  43. package/dist/panels/actions.d.ts +18 -0
  44. package/dist/panels/actions.d.ts.map +1 -0
  45. package/dist/panels/consents.d.ts +18 -0
  46. package/dist/panels/consents.d.ts.map +1 -0
  47. package/dist/panels/dom-scanner.d.ts +29 -0
  48. package/dist/panels/dom-scanner.d.ts.map +1 -0
  49. package/dist/panels/events.d.ts +14 -0
  50. package/dist/panels/events.d.ts.map +1 -0
  51. package/dist/panels/iab.d.ts +14 -0
  52. package/dist/panels/iab.d.ts.map +1 -0
  53. package/dist/panels/index.d.ts +11 -0
  54. package/dist/panels/index.d.ts.map +1 -0
  55. package/dist/panels/location.d.ts +19 -0
  56. package/dist/panels/location.d.ts.map +1 -0
  57. package/dist/panels/scripts.d.ts +13 -0
  58. package/dist/panels/scripts.d.ts.map +1 -0
  59. package/dist/react.cjs +4696 -0
  60. package/dist/react.d.ts +76 -0
  61. package/dist/react.d.ts.map +1 -0
  62. package/dist/react.js +4672 -0
  63. package/dist/styles/index.d.ts +7 -0
  64. package/dist/styles/index.d.ts.map +1 -0
  65. package/dist/tanstack.cjs +3819 -0
  66. package/dist/tanstack.d.ts +46 -0
  67. package/dist/tanstack.d.ts.map +1 -0
  68. package/dist/tanstack.js +3795 -0
  69. package/dist/utils/index.d.ts +6 -0
  70. package/dist/utils/index.d.ts.map +1 -0
  71. package/dist/utils/preference-trigger.d.ts +27 -0
  72. package/dist/utils/preference-trigger.d.ts.map +1 -0
  73. package/package.json +74 -57
  74. package/tsconfig.json +1 -1
  75. package/LICENSE.md +0 -595
  76. package/dist/components/error-state.cjs +0 -98
  77. package/dist/components/error-state.css +0 -51
  78. package/dist/components/error-state.d.ts +0 -5
  79. package/dist/components/error-state.d.ts.map +0 -1
  80. package/dist/components/error-state.js +0 -64
  81. package/dist/components/header.cjs +0 -65
  82. package/dist/components/header.css +0 -29
  83. package/dist/components/header.d.ts +0 -7
  84. package/dist/components/header.d.ts.map +0 -1
  85. package/dist/components/header.js +0 -31
  86. package/dist/components/ui/accordion.cjs +0 -82
  87. package/dist/components/ui/accordion.css +0 -72
  88. package/dist/components/ui/accordion.d.ts +0 -8
  89. package/dist/components/ui/accordion.d.ts.map +0 -1
  90. package/dist/components/ui/accordion.js +0 -39
  91. package/dist/components/ui/alert.cjs +0 -77
  92. package/dist/components/ui/alert.css +0 -59
  93. package/dist/components/ui/alert.d.ts +0 -10
  94. package/dist/components/ui/alert.d.ts.map +0 -1
  95. package/dist/components/ui/alert.js +0 -37
  96. package/dist/components/ui/badge.cjs +0 -63
  97. package/dist/components/ui/badge.css +0 -52
  98. package/dist/components/ui/badge.d.ts +0 -11
  99. package/dist/components/ui/badge.d.ts.map +0 -1
  100. package/dist/components/ui/badge.js +0 -26
  101. package/dist/components/ui/button.cjs +0 -77
  102. package/dist/components/ui/button.css +0 -87
  103. package/dist/components/ui/button.d.ts +0 -13
  104. package/dist/components/ui/button.d.ts.map +0 -1
  105. package/dist/components/ui/button.js +0 -40
  106. package/dist/components/ui/card.cjs +0 -89
  107. package/dist/components/ui/card.css +0 -41
  108. package/dist/components/ui/card.d.ts +0 -10
  109. package/dist/components/ui/card.d.ts.map +0 -1
  110. package/dist/components/ui/card.js +0 -40
  111. package/dist/components/ui/error-state.css +0 -34
  112. package/dist/components/ui/expandable-tabs.cjs +0 -136
  113. package/dist/components/ui/expandable-tabs.css +0 -57
  114. package/dist/components/ui/expandable-tabs.d.ts +0 -23
  115. package/dist/components/ui/expandable-tabs.d.ts.map +0 -1
  116. package/dist/components/ui/expandable-tabs.js +0 -102
  117. package/dist/components/ui/logo.cjs +0 -101
  118. package/dist/components/ui/logo.d.ts +0 -8
  119. package/dist/components/ui/logo.d.ts.map +0 -1
  120. package/dist/components/ui/logo.js +0 -67
  121. package/dist/components/ui/scroll-area.cjs +0 -67
  122. package/dist/components/ui/scroll-area.css +0 -41
  123. package/dist/components/ui/scroll-area.d.ts +0 -6
  124. package/dist/components/ui/scroll-area.d.ts.map +0 -1
  125. package/dist/components/ui/scroll-area.js +0 -30
  126. package/dist/components/ui/switch.cjs +0 -49
  127. package/dist/components/ui/switch.css +0 -49
  128. package/dist/components/ui/switch.d.ts +0 -5
  129. package/dist/components/ui/switch.d.ts.map +0 -1
  130. package/dist/components/ui/switch.js +0 -15
  131. package/dist/components/ui/tooltip.cjs +0 -61
  132. package/dist/components/ui/tooltip.css +0 -101
  133. package/dist/components/ui/tooltip.d.ts +0 -8
  134. package/dist/components/ui/tooltip.d.ts.map +0 -1
  135. package/dist/components/ui/tooltip.js +0 -18
  136. package/dist/components/wrapper.cjs +0 -158
  137. package/dist/components/wrapper.css +0 -90
  138. package/dist/components/wrapper.d.ts +0 -20
  139. package/dist/components/wrapper.d.ts.map +0 -1
  140. package/dist/components/wrapper.js +0 -121
  141. package/dist/dev-tool.cjs +0 -124
  142. package/dist/dev-tool.d.ts +0 -15
  143. package/dist/dev-tool.d.ts.map +0 -1
  144. package/dist/dev-tool.js +0 -74
  145. package/dist/libs/utils.cjs +0 -50
  146. package/dist/libs/utils.d.ts +0 -3
  147. package/dist/libs/utils.d.ts.map +0 -1
  148. package/dist/libs/utils.js +0 -6
  149. package/dist/router/router.cjs +0 -158
  150. package/dist/router/router.d.ts +0 -6
  151. package/dist/router/router.d.ts.map +0 -1
  152. package/dist/router/router.js +0 -124
  153. package/dist/styles/theme.css +0 -42
package/dist/react.js ADDED
@@ -0,0 +1,4672 @@
1
+ "use client";
2
+ import { useEffect, useRef } from "react";
3
+ var __webpack_modules__ = {
4
+ "../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].use[2]!./src/styles/animations.module.css" (module, __webpack_exports__, __webpack_require__) {
5
+ __webpack_require__.d(__webpack_exports__, {
6
+ A: ()=>__rspack_default_export
7
+ });
8
+ var _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0 = __webpack_require__("../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js");
9
+ var _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0);
10
+ var _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1 = __webpack_require__("../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/css-loader/api.js");
11
+ var _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1);
12
+ var ___CSS_LOADER_EXPORT___ = _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1_default()(_node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0_default());
13
+ ___CSS_LOADER_EXPORT___.push([
14
+ module.id,
15
+ `@keyframes devtoolsEnter-Jgl1Uz {
16
+ from {
17
+ opacity: 0;
18
+ transform: scale(.95)translateY(8px);
19
+ }
20
+
21
+ to {
22
+ opacity: 1;
23
+ transform: scale(1)translateY(0);
24
+ }
25
+ }
26
+
27
+ @keyframes devtoolsExit-GVem79 {
28
+ from {
29
+ opacity: 1;
30
+ transform: scale(1)translateY(0);
31
+ }
32
+
33
+ to {
34
+ opacity: 0;
35
+ transform: scale(.95)translateY(8px);
36
+ }
37
+ }
38
+
39
+ @keyframes buttonPulse-thl_xD {
40
+ 0%, 100% {
41
+ transform: scale(1);
42
+ }
43
+
44
+ 50% {
45
+ transform: scale(1.05);
46
+ }
47
+ }
48
+
49
+ @keyframes buttonEnter-nmbQm7 {
50
+ from {
51
+ opacity: 0;
52
+ transform: scale(.8);
53
+ }
54
+
55
+ to {
56
+ opacity: 1;
57
+ transform: scale(1);
58
+ }
59
+ }
60
+
61
+ @keyframes buttonExit-pxOnsy {
62
+ from {
63
+ opacity: 1;
64
+ transform: scale(1);
65
+ }
66
+
67
+ to {
68
+ opacity: 0;
69
+ transform: scale(.8);
70
+ }
71
+ }
72
+
73
+ @keyframes accordionDown-N6mY7b {
74
+ from {
75
+ opacity: 0;
76
+ height: 0;
77
+ }
78
+
79
+ to {
80
+ height: var(--accordion-content-height);
81
+ opacity: 1;
82
+ }
83
+ }
84
+
85
+ @keyframes accordionUp-NUVQrz {
86
+ from {
87
+ height: var(--accordion-content-height);
88
+ opacity: 1;
89
+ }
90
+
91
+ to {
92
+ opacity: 0;
93
+ height: 0;
94
+ }
95
+ }
96
+
97
+ @keyframes fadeIn-M9eDrv {
98
+ from {
99
+ opacity: 0;
100
+ }
101
+
102
+ to {
103
+ opacity: 1;
104
+ }
105
+ }
106
+
107
+ @keyframes fadeOut-feL7tl {
108
+ from {
109
+ opacity: 1;
110
+ }
111
+
112
+ to {
113
+ opacity: 0;
114
+ }
115
+ }
116
+
117
+ @keyframes slideInFromRight-F7lMwz {
118
+ from {
119
+ opacity: 0;
120
+ transform: translateX(16px);
121
+ }
122
+
123
+ to {
124
+ opacity: 1;
125
+ transform: translateX(0);
126
+ }
127
+ }
128
+
129
+ @keyframes slideInFromBottom-_z3hvX {
130
+ from {
131
+ opacity: 0;
132
+ transform: translateY(16px);
133
+ }
134
+
135
+ to {
136
+ opacity: 1;
137
+ transform: translateY(0);
138
+ }
139
+ }
140
+
141
+ .animateEnter-detbYr {
142
+ animation: devtoolsEnter-Jgl1Uz var(--c15t-duration-normal, .2s) var(--c15t-easing-out, cubic-bezier(.215, .61, .355, 1)) forwards;
143
+ transform-origin: 100% 100%;
144
+ }
145
+
146
+ .animateExit-qZjCsw {
147
+ animation: devtoolsExit-GVem79 var(--c15t-duration-fast, .1s) var(--c15t-easing-out, cubic-bezier(.215, .61, .355, 1)) forwards;
148
+ transform-origin: 100% 100%;
149
+ }
150
+
151
+ .animateButtonEnter-amkZhT {
152
+ animation: buttonEnter-nmbQm7 var(--c15t-duration-normal, .2s) var(--c15t-easing-spring, cubic-bezier(.34, 1.56, .64, 1)) forwards;
153
+ transform-origin: center;
154
+ }
155
+
156
+ .animateButtonExit-fMVAL4 {
157
+ animation: buttonExit-pxOnsy var(--c15t-duration-fast, .1s) var(--c15t-easing-out, cubic-bezier(.215, .61, .355, 1)) forwards;
158
+ transform-origin: center;
159
+ }
160
+
161
+ .animateFadeIn-TrkV7T {
162
+ animation: fadeIn-M9eDrv var(--c15t-duration-fast, .1s) var(--c15t-easing, cubic-bezier(.4, 0, .2, 1)) forwards;
163
+ }
164
+
165
+ .animateFadeOut-sS4sE4 {
166
+ animation: fadeOut-feL7tl var(--c15t-duration-fast, .1s) var(--c15t-easing, cubic-bezier(.4, 0, .2, 1)) forwards;
167
+ }
168
+
169
+ .animateSlideIn-ccDCyI {
170
+ animation: slideInFromBottom-_z3hvX var(--c15t-duration-normal, .2s) var(--c15t-easing-out, cubic-bezier(.215, .61, .355, 1)) forwards;
171
+ }
172
+
173
+ .staggerItem-tzBuCo {
174
+ opacity: 0;
175
+ animation: slideInFromRight-F7lMwz var(--c15t-duration-normal, .2s) var(--c15t-easing-out, cubic-bezier(.215, .61, .355, 1)) forwards;
176
+ }
177
+
178
+ .staggerItem-tzBuCo:first-child {
179
+ animation-delay: 0s;
180
+ }
181
+
182
+ .staggerItem-tzBuCo:nth-child(2) {
183
+ animation-delay: 30ms;
184
+ }
185
+
186
+ .staggerItem-tzBuCo:nth-child(3) {
187
+ animation-delay: 60ms;
188
+ }
189
+
190
+ .staggerItem-tzBuCo:nth-child(4) {
191
+ animation-delay: 90ms;
192
+ }
193
+
194
+ .staggerItem-tzBuCo:nth-child(5) {
195
+ animation-delay: .12s;
196
+ }
197
+
198
+ .staggerItem-tzBuCo:nth-child(6) {
199
+ animation-delay: .15s;
200
+ }
201
+
202
+ .staggerItem-tzBuCo:nth-child(7) {
203
+ animation-delay: .18s;
204
+ }
205
+
206
+ .staggerItem-tzBuCo:nth-child(8) {
207
+ animation-delay: .21s;
208
+ }
209
+
210
+ .staggerItem-tzBuCo:nth-child(9) {
211
+ animation-delay: .24s;
212
+ }
213
+
214
+ .staggerItem-tzBuCo:nth-child(10) {
215
+ animation-delay: .27s;
216
+ }
217
+
218
+ @media (prefers-reduced-motion: reduce) {
219
+ .animateEnter-detbYr, .animateExit-qZjCsw, .animateButtonEnter-amkZhT, .animateButtonExit-fMVAL4, .animateFadeIn-TrkV7T, .animateFadeOut-sS4sE4, .animateSlideIn-ccDCyI, .staggerItem-tzBuCo {
220
+ opacity: 1;
221
+ animation: none;
222
+ transform: none;
223
+ }
224
+ }
225
+ `,
226
+ ""
227
+ ]);
228
+ ___CSS_LOADER_EXPORT___.locals = {
229
+ animateEnter: "animateEnter-detbYr",
230
+ devtoolsEnter: "devtoolsEnter-Jgl1Uz",
231
+ animateExit: "animateExit-qZjCsw",
232
+ devtoolsExit: "devtoolsExit-GVem79",
233
+ animateButtonEnter: "animateButtonEnter-amkZhT",
234
+ buttonEnter: "buttonEnter-nmbQm7",
235
+ animateButtonExit: "animateButtonExit-fMVAL4",
236
+ buttonExit: "buttonExit-pxOnsy",
237
+ animateFadeIn: "animateFadeIn-TrkV7T",
238
+ fadeIn: "fadeIn-M9eDrv",
239
+ animateFadeOut: "animateFadeOut-sS4sE4",
240
+ fadeOut: "fadeOut-feL7tl",
241
+ animateSlideIn: "animateSlideIn-ccDCyI",
242
+ slideInFromBottom: "slideInFromBottom-_z3hvX",
243
+ staggerItem: "staggerItem-tzBuCo",
244
+ slideInFromRight: "slideInFromRight-F7lMwz",
245
+ buttonPulse: "buttonPulse-thl_xD",
246
+ accordionDown: "accordionDown-N6mY7b",
247
+ accordionUp: "accordionUp-NUVQrz"
248
+ };
249
+ const __rspack_default_export = ___CSS_LOADER_EXPORT___;
250
+ },
251
+ "../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].use[2]!./src/styles/components.module.css" (module, __webpack_exports__, __webpack_require__) {
252
+ __webpack_require__.d(__webpack_exports__, {
253
+ A: ()=>__rspack_default_export
254
+ });
255
+ var _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0 = __webpack_require__("../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js");
256
+ var _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0);
257
+ var _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1 = __webpack_require__("../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/css-loader/api.js");
258
+ var _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1);
259
+ var ___CSS_LOADER_EXPORT___ = _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1_default()(_node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0_default());
260
+ ___CSS_LOADER_EXPORT___.push([
261
+ module.id,
262
+ `.toggle-bPZtik {
263
+ border-radius: var(--c15t-radius-full, 9999px);
264
+ background-color: var(--c15t-switch-track, #ccc);
265
+ cursor: pointer;
266
+ width: 36px;
267
+ height: 20px;
268
+ transition: background-color var(--c15t-duration-fast, .1s) var(--c15t-easing, cubic-bezier(.4, 0, .2, 1));
269
+ border: none;
270
+ align-items: center;
271
+ padding: 0;
272
+ display: inline-flex;
273
+ position: relative;
274
+ }
275
+
276
+ .toggle-bPZtik:focus-visible {
277
+ outline: 2px solid var(--c15t-primary, #335cff);
278
+ outline-offset: 2px;
279
+ }
280
+
281
+ .toggleActive-Ldlasg {
282
+ background-color: var(--c15t-switch-track-active, #335cff);
283
+ }
284
+
285
+ .toggleThumb-hjGfoX {
286
+ border-radius: var(--c15t-radius-full, 9999px);
287
+ background-color: var(--c15t-switch-thumb, #fff);
288
+ width: 16px;
289
+ height: 16px;
290
+ transition: transform var(--c15t-duration-fast, .1s) var(--c15t-easing-spring, cubic-bezier(.34, 1.56, .64, 1));
291
+ position: absolute;
292
+ left: 2px;
293
+ box-shadow: 0 1px 2px #0003;
294
+ }
295
+
296
+ .toggleActive-Ldlasg .toggleThumb-hjGfoX {
297
+ transform: translateX(16px);
298
+ }
299
+
300
+ .toggle-bPZtik:disabled, .toggleDisabled-ZcD8nZ {
301
+ opacity: .5;
302
+ cursor: not-allowed;
303
+ }
304
+
305
+ .toggle-bPZtik:disabled .toggleThumb-hjGfoX, .toggleDisabled-ZcD8nZ .toggleThumb-hjGfoX {
306
+ box-shadow: none;
307
+ }
308
+
309
+ .badge-yA0giZ {
310
+ border-radius: var(--c15t-radius-sm, .25rem);
311
+ font-size: var(--c15t-devtools-font-size-xs, .75rem);
312
+ font-weight: var(--c15t-font-weight-medium, 500);
313
+ white-space: nowrap;
314
+ align-items: center;
315
+ padding: 2px 6px;
316
+ line-height: 1;
317
+ display: inline-flex;
318
+ }
319
+
320
+ .badgeSuccess-mA76a4 {
321
+ background-color: var(--c15t-devtools-badge-success-bg, #e4fbed);
322
+ color: var(--c15t-devtools-badge-success, #21c45d);
323
+ }
324
+
325
+ .badgeError-Agsq7I {
326
+ background-color: var(--c15t-devtools-badge-error-bg, #fde7e7);
327
+ color: var(--c15t-devtools-badge-error, #ef4343);
328
+ }
329
+
330
+ .badgeWarning-xpdwMQ {
331
+ background-color: var(--c15t-devtools-badge-warning-bg, #fef7dc);
332
+ color: var(--c15t-devtools-badge-warning, #f59f0a);
333
+ }
334
+
335
+ .badgeInfo-uWdPCK {
336
+ background-color: var(--c15t-devtools-badge-info-bg, #dcebfe);
337
+ color: var(--c15t-devtools-badge-info, #2463eb);
338
+ }
339
+
340
+ .badgeNeutral-j3EsE0 {
341
+ background-color: var(--c15t-devtools-badge-neutral-bg, #f0f0f0);
342
+ color: var(--c15t-devtools-badge-neutral, #737373);
343
+ }
344
+
345
+ .btn-evRVlh {
346
+ justify-content: center;
347
+ align-items: center;
348
+ gap: var(--c15t-space-xs, .25rem);
349
+ padding: var(--c15t-space-xs, .25rem) var(--c15t-space-sm, .5rem);
350
+ border: 1px solid var(--c15t-border, #e3e3e3);
351
+ border-radius: var(--c15t-radius-md, .5rem);
352
+ background-color: var(--c15t-surface, #fff);
353
+ color: var(--c15t-text, #171717);
354
+ font-family: inherit;
355
+ font-size: var(--c15t-devtools-font-size-xs, .75rem);
356
+ font-weight: var(--c15t-font-weight-medium, 500);
357
+ cursor: pointer;
358
+ transition: background-color var(--c15t-duration-fast, .1s) var(--c15t-easing, cubic-bezier(.4, 0, .2, 1)), border-color var(--c15t-duration-fast, .1s) var(--c15t-easing, cubic-bezier(.4, 0, .2, 1));
359
+ display: inline-flex;
360
+ }
361
+
362
+ .btn-evRVlh:hover {
363
+ background-color: var(--c15t-surface-hover, #f7f7f7);
364
+ border-color: var(--c15t-border-hover, #c9c9c9);
365
+ }
366
+
367
+ .btn-evRVlh:focus-visible {
368
+ outline: 2px solid var(--c15t-primary, #335cff);
369
+ outline-offset: 1px;
370
+ }
371
+
372
+ .btn-evRVlh:disabled {
373
+ opacity: .5;
374
+ cursor: not-allowed;
375
+ }
376
+
377
+ .btnPrimary-dA6nqY {
378
+ background-color: var(--c15t-primary, #335cff);
379
+ border-color: var(--c15t-primary, #335cff);
380
+ color: var(--c15t-text-on-primary, #fff);
381
+ }
382
+
383
+ .btnPrimary-dA6nqY:hover {
384
+ background-color: var(--c15t-primary-hover, #03f);
385
+ border-color: var(--c15t-primary-hover, #03f);
386
+ }
387
+
388
+ .btnDanger-eDnqOX {
389
+ background-color: var(--c15t-devtools-badge-error, #ef4343);
390
+ border-color: var(--c15t-devtools-badge-error, #ef4343);
391
+ color: var(--c15t-text-on-primary, #fff);
392
+ }
393
+
394
+ .btnDanger-eDnqOX:hover {
395
+ background-color: #eb1414;
396
+ border-color: #eb1414;
397
+ }
398
+
399
+ .btnSmall-TjXoqZ {
400
+ padding: 2px var(--c15t-space-xs, .25rem);
401
+ font-size: 10px;
402
+ }
403
+
404
+ .btnIcon-fiYQAh {
405
+ flex-shrink: 0;
406
+ width: 14px;
407
+ height: 14px;
408
+ }
409
+
410
+ .input-IeTcCs {
411
+ width: 100%;
412
+ padding: var(--c15t-space-xs, .25rem) var(--c15t-space-sm, .5rem);
413
+ border: 1px solid var(--c15t-border, #e3e3e3);
414
+ border-radius: var(--c15t-radius-md, .5rem);
415
+ background-color: var(--c15t-surface, #fff);
416
+ color: var(--c15t-text, #171717);
417
+ font-family: inherit;
418
+ font-size: var(--c15t-font-size-sm, .875rem);
419
+ transition: border-color var(--c15t-duration-fast, .1s) var(--c15t-easing, cubic-bezier(.4, 0, .2, 1));
420
+ }
421
+
422
+ .input-IeTcCs:focus {
423
+ border-color: var(--c15t-primary, #335cff);
424
+ outline: none;
425
+ }
426
+
427
+ .input-IeTcCs::placeholder {
428
+ color: var(--c15t-text-muted, #737373);
429
+ }
430
+
431
+ .inputSmall-pJyXcL {
432
+ padding: 2px var(--c15t-space-xs, .25rem);
433
+ font-size: var(--c15t-devtools-font-size-xs, .75rem);
434
+ }
435
+
436
+ .select-byJ1WM {
437
+ width: 100%;
438
+ padding: var(--c15t-space-xs, .25rem) var(--c15t-space-sm, .5rem);
439
+ border: 1px solid var(--c15t-border, #e3e3e3);
440
+ border-radius: var(--c15t-radius-md, .5rem);
441
+ background-color: var(--c15t-surface, #fff);
442
+ color: var(--c15t-text, #171717);
443
+ font-family: inherit;
444
+ font-size: var(--c15t-devtools-font-size-xs, .75rem);
445
+ cursor: pointer;
446
+ }
447
+
448
+ .select-byJ1WM:focus {
449
+ border-color: var(--c15t-primary, #335cff);
450
+ outline: none;
451
+ }
452
+
453
+ .grid-LlrmEz {
454
+ gap: var(--c15t-space-sm, .5rem);
455
+ padding: var(--c15t-space-sm, .5rem) var(--c15t-space-md, 1rem);
456
+ display: grid;
457
+ }
458
+
459
+ .gridCols2-UgcIqI {
460
+ grid-template-columns: repeat(2, 1fr);
461
+ }
462
+
463
+ .gridCols3-OmMIq6 {
464
+ grid-template-columns: repeat(3, 1fr);
465
+ }
466
+
467
+ .gridCard-Qm5xxI {
468
+ padding: var(--c15t-space-sm, .5rem) var(--c15t-space-md, .75rem);
469
+ border: 1px solid var(--c15t-border, #e3e3e3);
470
+ border-radius: var(--c15t-radius-md, .5rem);
471
+ background-color: var(--c15t-surface, #fff);
472
+ transition: border-color var(--c15t-duration-fast, .1s) var(--c15t-easing, cubic-bezier(.4, 0, .2, 1));
473
+ justify-content: space-between;
474
+ align-items: center;
475
+ display: flex;
476
+ }
477
+
478
+ .gridCard-Qm5xxI:hover {
479
+ border-color: var(--c15t-border-hover, #c9c9c9);
480
+ }
481
+
482
+ .gridCardTitle-HjXETp {
483
+ font-size: var(--c15t-devtools-font-size-xs, .75rem);
484
+ font-weight: var(--c15t-font-weight-medium, 500);
485
+ color: var(--c15t-text, #171717);
486
+ }
487
+
488
+ .listItem-XUKGIo {
489
+ padding: var(--c15t-space-xs, .25rem) var(--c15t-space-md, 1rem);
490
+ border-bottom: 1px solid var(--c15t-border, #e3e3e3);
491
+ justify-content: space-between;
492
+ align-items: center;
493
+ display: flex;
494
+ }
495
+
496
+ .listItem-XUKGIo:last-child {
497
+ border-bottom: none;
498
+ }
499
+
500
+ .listItemContent-WDBF1N {
501
+ flex-direction: column;
502
+ flex: 1;
503
+ gap: 2px;
504
+ min-width: 0;
505
+ display: flex;
506
+ }
507
+
508
+ .listItemTitle-N89OkC {
509
+ font-size: var(--c15t-font-size-sm, .875rem);
510
+ font-weight: var(--c15t-font-weight-medium, 500);
511
+ color: var(--c15t-text, #171717);
512
+ }
513
+
514
+ .listItemDescription-E6JHyZ {
515
+ font-size: var(--c15t-devtools-font-size-xs, .75rem);
516
+ color: var(--c15t-text-muted, #737373);
517
+ text-overflow: ellipsis;
518
+ white-space: nowrap;
519
+ overflow: hidden;
520
+ }
521
+
522
+ .listItemActions-F1BfOm {
523
+ align-items: center;
524
+ gap: var(--c15t-space-sm, .5rem);
525
+ flex-shrink: 0;
526
+ display: flex;
527
+ }
528
+
529
+ .section-a197cB {
530
+ padding: var(--c15t-space-sm, .5rem) var(--c15t-space-md, 1rem);
531
+ border-bottom: 1px solid var(--c15t-border, #e3e3e3);
532
+ }
533
+
534
+ .section-a197cB:last-child {
535
+ border-bottom: none;
536
+ }
537
+
538
+ .sectionHeader-Xcljcw {
539
+ margin-bottom: var(--c15t-space-sm, .5rem);
540
+ justify-content: space-between;
541
+ align-items: center;
542
+ display: flex;
543
+ }
544
+
545
+ .sectionTitle-RUiFld {
546
+ font-size: var(--c15t-devtools-font-size-xs, .75rem);
547
+ font-weight: var(--c15t-font-weight-semibold, 600);
548
+ color: var(--c15t-text-muted, #737373);
549
+ text-transform: uppercase;
550
+ letter-spacing: .5px;
551
+ }
552
+
553
+ .infoRow-RlB_0h {
554
+ padding: var(--c15t-space-xs, .25rem) 0;
555
+ justify-content: space-between;
556
+ align-items: center;
557
+ display: flex;
558
+ }
559
+
560
+ .infoLabel-_pbK33 {
561
+ font-size: var(--c15t-devtools-font-size-xs, .75rem);
562
+ color: var(--c15t-text-muted, #737373);
563
+ }
564
+
565
+ .infoValue-flMl_e {
566
+ font-size: var(--c15t-devtools-font-size-xs, .75rem);
567
+ font-weight: var(--c15t-font-weight-medium, 500);
568
+ color: var(--c15t-text, #171717);
569
+ font-family: ui-monospace, Cascadia Code, Source Code Pro, Menlo, Consolas, DejaVu Sans Mono, monospace;
570
+ }
571
+
572
+ .emptyState-QcmzTQ {
573
+ padding: var(--c15t-space-xl, 2rem);
574
+ text-align: center;
575
+ color: var(--c15t-text-muted, #737373);
576
+ flex-direction: column;
577
+ justify-content: center;
578
+ align-items: center;
579
+ display: flex;
580
+ }
581
+
582
+ .emptyStateIcon-WHFkX8 {
583
+ width: 32px;
584
+ height: 32px;
585
+ margin-bottom: var(--c15t-space-sm, .5rem);
586
+ opacity: .5;
587
+ }
588
+
589
+ .emptyStateText-TaLvAJ {
590
+ font-size: var(--c15t-font-size-sm, .875rem);
591
+ }
592
+
593
+ @media (prefers-reduced-motion: reduce) {
594
+ .toggle-bPZtik, .toggleThumb-hjGfoX, .btn-evRVlh, .input-IeTcCs, .select-byJ1WM {
595
+ transition: none;
596
+ }
597
+ }
598
+
599
+ @media (hover: none) {
600
+ .btn-evRVlh:hover {
601
+ background-color: var(--c15t-surface, #fff);
602
+ border-color: var(--c15t-border, #e3e3e3);
603
+ }
604
+
605
+ .btnPrimary-dA6nqY:hover {
606
+ background-color: var(--c15t-primary, #335cff);
607
+ border-color: var(--c15t-primary, #335cff);
608
+ }
609
+ }
610
+ `,
611
+ ""
612
+ ]);
613
+ ___CSS_LOADER_EXPORT___.locals = {
614
+ toggle: "toggle-bPZtik",
615
+ toggleActive: "toggleActive-Ldlasg",
616
+ toggleThumb: "toggleThumb-hjGfoX",
617
+ toggleDisabled: "toggleDisabled-ZcD8nZ",
618
+ badge: "badge-yA0giZ",
619
+ badgeSuccess: "badgeSuccess-mA76a4",
620
+ badgeError: "badgeError-Agsq7I",
621
+ badgeWarning: "badgeWarning-xpdwMQ",
622
+ badgeInfo: "badgeInfo-uWdPCK",
623
+ badgeNeutral: "badgeNeutral-j3EsE0",
624
+ btn: "btn-evRVlh",
625
+ btnPrimary: "btnPrimary-dA6nqY",
626
+ btnDanger: "btnDanger-eDnqOX",
627
+ btnSmall: "btnSmall-TjXoqZ",
628
+ btnIcon: "btnIcon-fiYQAh",
629
+ input: "input-IeTcCs",
630
+ inputSmall: "inputSmall-pJyXcL",
631
+ select: "select-byJ1WM",
632
+ grid: "grid-LlrmEz",
633
+ gridCols2: "gridCols2-UgcIqI",
634
+ gridCols3: "gridCols3-OmMIq6",
635
+ gridCard: "gridCard-Qm5xxI",
636
+ gridCardTitle: "gridCardTitle-HjXETp",
637
+ listItem: "listItem-XUKGIo",
638
+ listItemContent: "listItemContent-WDBF1N",
639
+ listItemTitle: "listItemTitle-N89OkC",
640
+ listItemDescription: "listItemDescription-E6JHyZ",
641
+ listItemActions: "listItemActions-F1BfOm",
642
+ section: "section-a197cB",
643
+ sectionHeader: "sectionHeader-Xcljcw",
644
+ sectionTitle: "sectionTitle-RUiFld",
645
+ infoRow: "infoRow-RlB_0h",
646
+ infoLabel: "infoLabel-_pbK33",
647
+ infoValue: "infoValue-flMl_e",
648
+ emptyState: "emptyState-QcmzTQ",
649
+ emptyStateIcon: "emptyStateIcon-WHFkX8",
650
+ emptyStateText: "emptyStateText-TaLvAJ"
651
+ };
652
+ const __rspack_default_export = ___CSS_LOADER_EXPORT___;
653
+ },
654
+ "../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].use[2]!./src/styles/panel.module.css" (module, __webpack_exports__, __webpack_require__) {
655
+ __webpack_require__.d(__webpack_exports__, {
656
+ A: ()=>__rspack_default_export
657
+ });
658
+ var _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0 = __webpack_require__("../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js");
659
+ var _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0);
660
+ var _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1 = __webpack_require__("../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/css-loader/api.js");
661
+ var _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1);
662
+ var ___CSS_LOADER_EXPORT___ = _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1_default()(_node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0_default());
663
+ ___CSS_LOADER_EXPORT___.push([
664
+ module.id,
665
+ `.container-XiXwoL {
666
+ z-index: var(--c15t-devtools-z-index, 99999);
667
+ font-family: var(--c15t-font-family, system-ui, -apple-system, sans-serif);
668
+ font-size: var(--c15t-font-size-sm, .875rem);
669
+ line-height: var(--c15t-line-height-normal, 1.5);
670
+ color: var(--c15t-text, #171717);
671
+ -webkit-font-smoothing: antialiased;
672
+ -moz-osx-font-smoothing: grayscale;
673
+ position: fixed;
674
+ }
675
+
676
+ .floatingButton-Gw8MtJ {
677
+ width: var(--c15t-devtools-button-size, 40px);
678
+ height: var(--c15t-devtools-button-size, 40px);
679
+ border: 1px solid var(--c15t-border, #e3e3e3);
680
+ border-radius: var(--c15t-radius-full, 9999px);
681
+ background-color: var(--c15t-surface, #fff);
682
+ box-shadow: var(--c15t-shadow-lg, 0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a);
683
+ cursor: grab;
684
+ z-index: var(--c15t-devtools-z-index, 99999);
685
+ transition: transform var(--c15t-duration-fast, .1s) var(--c15t-easing, cubic-bezier(.4, 0, .2, 1)), box-shadow var(--c15t-duration-fast, .1s) var(--c15t-easing, cubic-bezier(.4, 0, .2, 1)), background-color var(--c15t-duration-fast, .1s) var(--c15t-easing, cubic-bezier(.4, 0, .2, 1));
686
+ transform-origin: center;
687
+ touch-action: none;
688
+ user-select: none;
689
+ -webkit-tap-highlight-color: transparent;
690
+ justify-content: center;
691
+ align-items: center;
692
+ padding: 0;
693
+ display: flex;
694
+ position: fixed;
695
+ }
696
+
697
+ @media (hover: hover) and (pointer: fine) {
698
+ .floatingButton-Gw8MtJ:hover {
699
+ background-color: var(--c15t-surface-hover, #f2f2f2);
700
+ box-shadow: var(--c15t-shadow-xl, 0 20px 25px -5px #0000001a, 0 8px 10px -6px #0000001a);
701
+ }
702
+ }
703
+
704
+ .floatingButton-Gw8MtJ:focus {
705
+ outline: none;
706
+ }
707
+
708
+ .floatingButton-Gw8MtJ:focus-visible {
709
+ outline: 2px solid var(--c15t-primary, #335cff);
710
+ outline-offset: 2px;
711
+ }
712
+
713
+ .floatingButton-Gw8MtJ:active {
714
+ cursor: grabbing;
715
+ transform: scale(1.02);
716
+ }
717
+
718
+ .floatingButtonIcon-cHWefk {
719
+ width: 50%;
720
+ height: 50%;
721
+ color: var(--c15t-text, #171717);
722
+ pointer-events: none;
723
+ flex-shrink: 0;
724
+ justify-content: center;
725
+ align-items: center;
726
+ display: flex;
727
+ }
728
+
729
+ .floatingButtonIcon-cHWefk svg {
730
+ width: 100%;
731
+ height: 100%;
732
+ }
733
+
734
+ .positionBottomRight-ZPD58v {
735
+ bottom: 20px;
736
+ right: 20px;
737
+ }
738
+
739
+ .positionBottomLeft-MDd6AY {
740
+ bottom: 20px;
741
+ left: 20px;
742
+ }
743
+
744
+ .positionTopRight-L6yusU {
745
+ top: 20px;
746
+ right: 20px;
747
+ }
748
+
749
+ .positionTopLeft-C65boy {
750
+ top: 20px;
751
+ left: 20px;
752
+ }
753
+
754
+ .backdrop-LhVMB5 {
755
+ background-color: var(--c15t-overlay, #00000080);
756
+ z-index: calc(var(--c15t-devtools-z-index, 99999) + 1);
757
+ position: fixed;
758
+ inset: 0;
759
+ }
760
+
761
+ .panel-jtWove {
762
+ width: var(--c15t-devtools-panel-width, 480px);
763
+ max-height: var(--c15t-devtools-panel-max-height, 560px);
764
+ background-color: var(--c15t-surface, #fff);
765
+ border: 1px solid var(--c15t-border, #e3e3e3);
766
+ border-radius: var(--c15t-radius-lg, .75rem);
767
+ box-shadow: var(--c15t-shadow-lg, 0 8px 24px #0000001f);
768
+ z-index: calc(var(--c15t-devtools-z-index, 99999) + 2);
769
+ flex-direction: column;
770
+ display: flex;
771
+ position: fixed;
772
+ overflow: hidden;
773
+ }
774
+
775
+ .panel-jtWove.positionBottomRight-ZPD58v {
776
+ transform-origin: 100% 100%;
777
+ bottom: 80px;
778
+ right: 20px;
779
+ }
780
+
781
+ .panel-jtWove.positionBottomLeft-MDd6AY {
782
+ transform-origin: 0 100%;
783
+ bottom: 80px;
784
+ left: 20px;
785
+ }
786
+
787
+ .panel-jtWove.positionTopRight-L6yusU {
788
+ transform-origin: 100% 0;
789
+ top: 80px;
790
+ right: 20px;
791
+ }
792
+
793
+ .panel-jtWove.positionTopLeft-C65boy {
794
+ transform-origin: 0 0;
795
+ top: 80px;
796
+ left: 20px;
797
+ }
798
+
799
+ .header-xluoTr {
800
+ padding: var(--c15t-space-sm, .5rem) var(--c15t-space-md, 1rem);
801
+ border-bottom: 1px solid var(--c15t-border, #e3e3e3);
802
+ background-color: var(--c15t-devtools-surface-muted, #f5f5f5);
803
+ justify-content: space-between;
804
+ align-items: center;
805
+ display: flex;
806
+ }
807
+
808
+ .headerTitle-kJ9XjK {
809
+ align-items: center;
810
+ gap: var(--c15t-space-sm, .5rem);
811
+ font-size: var(--c15t-font-size-sm, .875rem);
812
+ font-weight: var(--c15t-font-weight-semibold, 600);
813
+ color: var(--c15t-text, #171717);
814
+ display: flex;
815
+ }
816
+
817
+ .headerLogo-PxJ_w1 {
818
+ width: 20px;
819
+ height: 20px;
820
+ color: var(--c15t-primary, #335cff);
821
+ }
822
+
823
+ .closeButton-Yto0Nb {
824
+ border-radius: var(--c15t-radius-sm, .25rem);
825
+ width: 28px;
826
+ height: 28px;
827
+ color: var(--c15t-text-muted, #737373);
828
+ cursor: pointer;
829
+ transition: background-color var(--c15t-duration-fast, .1s) var(--c15t-easing, cubic-bezier(.4, 0, .2, 1)), color var(--c15t-duration-fast, .1s) var(--c15t-easing, cubic-bezier(.4, 0, .2, 1));
830
+ background-color: #0000;
831
+ border: none;
832
+ justify-content: center;
833
+ align-items: center;
834
+ padding: 0;
835
+ display: flex;
836
+ }
837
+
838
+ .closeButton-Yto0Nb:hover {
839
+ background-color: var(--c15t-surface-hover, #f7f7f7);
840
+ color: var(--c15t-text, #171717);
841
+ }
842
+
843
+ .closeButton-Yto0Nb:focus-visible {
844
+ outline: 2px solid var(--c15t-primary, #335cff);
845
+ outline-offset: 1px;
846
+ }
847
+
848
+ .closeButtonIcon-fVlR1I {
849
+ width: 16px;
850
+ height: 16px;
851
+ }
852
+
853
+ .content-yDMYfG {
854
+ overscroll-behavior: contain;
855
+ -webkit-overflow-scrolling: touch;
856
+ flex: auto;
857
+ min-height: 200px;
858
+ overflow: hidden auto;
859
+ }
860
+
861
+ .footer-ESbmwQ {
862
+ padding: var(--c15t-space-xs, .25rem) var(--c15t-space-md, 1rem);
863
+ border-top: 1px solid var(--c15t-border, #e3e3e3);
864
+ background-color: var(--c15t-devtools-surface-muted, #f5f5f5);
865
+ font-size: var(--c15t-devtools-font-size-xs, .75rem);
866
+ color: var(--c15t-text-muted, #737373);
867
+ justify-content: space-between;
868
+ align-items: center;
869
+ display: flex;
870
+ }
871
+
872
+ .footerStatus-rlb99A {
873
+ align-items: center;
874
+ gap: var(--c15t-space-xs, .25rem);
875
+ display: flex;
876
+ }
877
+
878
+ .statusDot-hYJoej {
879
+ border-radius: var(--c15t-radius-full, 9999px);
880
+ width: 6px;
881
+ height: 6px;
882
+ }
883
+
884
+ .statusConnected-hPSUgS {
885
+ background-color: var(--c15t-devtools-badge-success, #21c45d);
886
+ }
887
+
888
+ .statusDisconnected-HIpcee {
889
+ background-color: var(--c15t-devtools-badge-error, #ef4343);
890
+ }
891
+
892
+ .errorState-DRtU3f {
893
+ padding: var(--c15t-space-xl, 2rem);
894
+ text-align: center;
895
+ justify-content: center;
896
+ align-items: center;
897
+ gap: var(--c15t-space-md, 1rem);
898
+ flex-direction: column;
899
+ display: flex;
900
+ }
901
+
902
+ .errorIcon-_o6Vta {
903
+ width: 48px;
904
+ height: 48px;
905
+ color: var(--c15t-devtools-badge-warning, #f59f0a);
906
+ }
907
+
908
+ .errorTitle-tkOy1H {
909
+ font-size: var(--c15t-font-size-base, 1rem);
910
+ font-weight: var(--c15t-font-weight-semibold, 600);
911
+ color: var(--c15t-text, #171717);
912
+ }
913
+
914
+ .errorMessage-MPRZNN {
915
+ font-size: var(--c15t-font-size-sm, .875rem);
916
+ color: var(--c15t-text-muted, #737373);
917
+ max-width: 280px;
918
+ }
919
+
920
+ @media (prefers-reduced-motion: reduce) {
921
+ .floatingButton-Gw8MtJ, .closeButton-Yto0Nb {
922
+ transition: none;
923
+ }
924
+ }
925
+
926
+ @media (hover: none) {
927
+ .floatingButton-Gw8MtJ:hover {
928
+ box-shadow: var(--c15t-shadow-md, 0 4px 12px #00000014);
929
+ transform: none;
930
+ }
931
+ }
932
+
933
+ .dropdownMenu-aKK18l {
934
+ min-width: 200px;
935
+ padding: var(--c15t-space-xs, .25rem);
936
+ border: 1px solid var(--c15t-border, #e3e3e3);
937
+ border-radius: var(--c15t-radius-lg, .75rem);
938
+ background-color: var(--c15t-surface, #fff);
939
+ box-shadow: var(--c15t-shadow-lg, 0 8px 24px #0000001f);
940
+ z-index: calc(var(--c15t-devtools-z-index, 99999) + 1);
941
+ opacity: 0;
942
+ transform-origin: 0 100%;
943
+ pointer-events: none;
944
+ transition: opacity var(--c15t-duration-fast, .1s) var(--c15t-easing-out, cubic-bezier(.215, .61, .355, 1)), transform var(--c15t-duration-fast, .1s) var(--c15t-easing-out, cubic-bezier(.215, .61, .355, 1));
945
+ position: fixed;
946
+ transform: scale(.95)translateY(8px);
947
+ }
948
+
949
+ .dropdownMenu-aKK18l[data-state="open"] {
950
+ opacity: 1;
951
+ pointer-events: auto;
952
+ transform: scale(1)translateY(0);
953
+ }
954
+
955
+ .dropdownMenuBottomLeft-MKUEpC {
956
+ transform-origin: 0 100%;
957
+ }
958
+
959
+ .dropdownMenuBottomRight-nXiRRF {
960
+ transform-origin: 100% 100%;
961
+ }
962
+
963
+ .dropdownMenuTopLeft-YlFVSe {
964
+ transform-origin: 0 0;
965
+ }
966
+
967
+ .dropdownMenuTopRight-OpvmUO {
968
+ transform-origin: 100% 0;
969
+ }
970
+
971
+ .menuItem-kBbHRP {
972
+ align-items: center;
973
+ gap: var(--c15t-space-sm, .5rem);
974
+ width: 100%;
975
+ padding: var(--c15t-space-sm, .5rem) var(--c15t-space-md, .75rem);
976
+ border-radius: var(--c15t-radius-md, .5rem);
977
+ color: var(--c15t-text, #171717);
978
+ font-size: var(--c15t-font-size-sm, .875rem);
979
+ font-weight: var(--c15t-font-weight-medium, 500);
980
+ text-align: left;
981
+ cursor: pointer;
982
+ transition: background-color var(--c15t-duration-fast, .1s) var(--c15t-easing, cubic-bezier(.4, 0, .2, 1));
983
+ background: none;
984
+ border: none;
985
+ display: flex;
986
+ }
987
+
988
+ .menuItem-kBbHRP:hover {
989
+ background-color: var(--c15t-surface-hover, #f2f2f2);
990
+ }
991
+
992
+ .menuItem-kBbHRP:focus-visible {
993
+ outline: 2px solid var(--c15t-primary, #335cff);
994
+ outline-offset: -2px;
995
+ }
996
+
997
+ .menuItemIcon-P3pP5K {
998
+ width: 20px;
999
+ height: 20px;
1000
+ color: var(--c15t-text-muted, #737373);
1001
+ flex-shrink: 0;
1002
+ }
1003
+
1004
+ .menuItemLabel-d_d7sD {
1005
+ flex: 1;
1006
+ }
1007
+
1008
+ .menuItemDescription-hqdfJA {
1009
+ font-size: var(--c15t-devtools-font-size-xs, .75rem);
1010
+ color: var(--c15t-text-muted, #737373);
1011
+ font-weight: var(--c15t-font-weight-normal, 400);
1012
+ }
1013
+
1014
+ .menuItemContent-hBlruV {
1015
+ flex: 1;
1016
+ min-width: 0;
1017
+ }
1018
+
1019
+ .menuItemToggle-RHrCAX {
1020
+ flex-shrink: 0;
1021
+ margin-left: auto;
1022
+ }
1023
+
1024
+ .menuItemToggleTrack-gDp_f3 {
1025
+ background-color: var(--c15t-switch-track, #d9d9d9);
1026
+ border-radius: var(--c15t-radius-full, 9999px);
1027
+ width: 36px;
1028
+ height: 20px;
1029
+ transition: background-color var(--c15t-duration-fast, .1s) var(--c15t-easing, cubic-bezier(.4, 0, .2, 1));
1030
+ position: relative;
1031
+ }
1032
+
1033
+ .menuItemToggleThumb-ioqqyc {
1034
+ background-color: var(--c15t-switch-thumb, #fff);
1035
+ border-radius: var(--c15t-radius-full, 9999px);
1036
+ width: 16px;
1037
+ height: 16px;
1038
+ box-shadow: var(--c15t-shadow-sm, 0 1px 2px #0000001a);
1039
+ transition: transform var(--c15t-duration-fast, .1s) var(--c15t-easing, cubic-bezier(.4, 0, .2, 1));
1040
+ position: absolute;
1041
+ top: 2px;
1042
+ left: 2px;
1043
+ }
1044
+
1045
+ .menuItemToggleChecked-K3BPtk .menuItemToggleTrack-gDp_f3 {
1046
+ background-color: var(--c15t-switch-track-checked, #335cff);
1047
+ }
1048
+
1049
+ .menuItemToggleChecked-K3BPtk .menuItemToggleThumb-ioqqyc {
1050
+ transform: translateX(16px);
1051
+ }
1052
+
1053
+ .menuDivider-JIBdhU {
1054
+ height: 1px;
1055
+ margin: var(--c15t-space-xs, .25rem) 0;
1056
+ background-color: var(--c15t-border, #e3e3e3);
1057
+ }
1058
+
1059
+ .unifiedButtonWrapper-d3Frwt {
1060
+ display: contents;
1061
+ }
1062
+
1063
+ @media (prefers-reduced-motion: reduce) {
1064
+ .dropdownMenu-aKK18l {
1065
+ transition: none;
1066
+ }
1067
+ }
1068
+ `,
1069
+ ""
1070
+ ]);
1071
+ ___CSS_LOADER_EXPORT___.locals = {
1072
+ container: "container-XiXwoL",
1073
+ floatingButton: "floatingButton-Gw8MtJ",
1074
+ floatingButtonIcon: "floatingButtonIcon-cHWefk",
1075
+ positionBottomRight: "positionBottomRight-ZPD58v",
1076
+ positionBottomLeft: "positionBottomLeft-MDd6AY",
1077
+ positionTopRight: "positionTopRight-L6yusU",
1078
+ positionTopLeft: "positionTopLeft-C65boy",
1079
+ backdrop: "backdrop-LhVMB5",
1080
+ panel: "panel-jtWove",
1081
+ header: "header-xluoTr",
1082
+ headerTitle: "headerTitle-kJ9XjK",
1083
+ headerLogo: "headerLogo-PxJ_w1",
1084
+ closeButton: "closeButton-Yto0Nb",
1085
+ closeButtonIcon: "closeButtonIcon-fVlR1I",
1086
+ content: "content-yDMYfG",
1087
+ footer: "footer-ESbmwQ",
1088
+ footerStatus: "footerStatus-rlb99A",
1089
+ statusDot: "statusDot-hYJoej",
1090
+ statusConnected: "statusConnected-hPSUgS",
1091
+ statusDisconnected: "statusDisconnected-HIpcee",
1092
+ errorState: "errorState-DRtU3f",
1093
+ errorIcon: "errorIcon-_o6Vta",
1094
+ errorTitle: "errorTitle-tkOy1H",
1095
+ errorMessage: "errorMessage-MPRZNN",
1096
+ dropdownMenu: "dropdownMenu-aKK18l",
1097
+ dropdownMenuBottomLeft: "dropdownMenuBottomLeft-MKUEpC",
1098
+ dropdownMenuBottomRight: "dropdownMenuBottomRight-nXiRRF",
1099
+ dropdownMenuTopLeft: "dropdownMenuTopLeft-YlFVSe",
1100
+ dropdownMenuTopRight: "dropdownMenuTopRight-OpvmUO",
1101
+ menuItem: "menuItem-kBbHRP",
1102
+ menuItemIcon: "menuItemIcon-P3pP5K",
1103
+ menuItemLabel: "menuItemLabel-d_d7sD",
1104
+ menuItemDescription: "menuItemDescription-hqdfJA",
1105
+ menuItemContent: "menuItemContent-hBlruV",
1106
+ menuItemToggle: "menuItemToggle-RHrCAX",
1107
+ menuItemToggleTrack: "menuItemToggleTrack-gDp_f3",
1108
+ menuItemToggleThumb: "menuItemToggleThumb-ioqqyc",
1109
+ menuItemToggleChecked: "menuItemToggleChecked-K3BPtk",
1110
+ menuDivider: "menuDivider-JIBdhU",
1111
+ unifiedButtonWrapper: "unifiedButtonWrapper-d3Frwt"
1112
+ };
1113
+ const __rspack_default_export = ___CSS_LOADER_EXPORT___;
1114
+ },
1115
+ "../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].use[2]!./src/styles/tabs.module.css" (module, __webpack_exports__, __webpack_require__) {
1116
+ __webpack_require__.d(__webpack_exports__, {
1117
+ A: ()=>__rspack_default_export
1118
+ });
1119
+ var _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0 = __webpack_require__("../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js");
1120
+ var _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0);
1121
+ var _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1 = __webpack_require__("../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/css-loader/api.js");
1122
+ var _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1);
1123
+ var ___CSS_LOADER_EXPORT___ = _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1_default()(_node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0_default());
1124
+ ___CSS_LOADER_EXPORT___.push([
1125
+ module.id,
1126
+ `.tabList-IyuiBE {
1127
+ gap: var(--c15t-space-xs, .25rem);
1128
+ padding: var(--c15t-space-sm, .5rem) var(--c15t-space-md, 1rem);
1129
+ border-bottom: 1px solid var(--c15t-border, #e3e3e3);
1130
+ background-color: var(--c15t-surface, #fff);
1131
+ scrollbar-width: none;
1132
+ -ms-overflow-style: none;
1133
+ display: flex;
1134
+ overflow-x: auto;
1135
+ }
1136
+
1137
+ .tabList-IyuiBE::-webkit-scrollbar {
1138
+ display: none;
1139
+ }
1140
+
1141
+ .tab-yfDEqg {
1142
+ align-items: center;
1143
+ gap: var(--c15t-space-xs, .25rem);
1144
+ padding: var(--c15t-space-xs, .25rem) var(--c15t-space-sm, .5rem);
1145
+ border-radius: var(--c15t-radius-md, .5rem);
1146
+ color: var(--c15t-text-muted, #737373);
1147
+ font-family: inherit;
1148
+ font-size: var(--c15t-devtools-font-size-xs, .75rem);
1149
+ font-weight: var(--c15t-font-weight-medium, 500);
1150
+ cursor: pointer;
1151
+ white-space: nowrap;
1152
+ transition: background-color var(--c15t-duration-fast, .1s) var(--c15t-easing, cubic-bezier(.4, 0, .2, 1)), color var(--c15t-duration-fast, .1s) var(--c15t-easing, cubic-bezier(.4, 0, .2, 1));
1153
+ background-color: #0000;
1154
+ border: none;
1155
+ display: flex;
1156
+ }
1157
+
1158
+ .tab-yfDEqg:hover {
1159
+ background-color: var(--c15t-surface-hover, #f7f7f7);
1160
+ color: var(--c15t-text, #171717);
1161
+ }
1162
+
1163
+ .tab-yfDEqg:focus-visible {
1164
+ outline: 2px solid var(--c15t-primary, #335cff);
1165
+ outline-offset: 1px;
1166
+ }
1167
+
1168
+ .tabActive-r4hing {
1169
+ background-color: var(--c15t-primary, #335cff);
1170
+ color: var(--c15t-text-on-primary, #fff);
1171
+ }
1172
+
1173
+ .tabActive-r4hing:hover {
1174
+ background-color: var(--c15t-primary-hover, #03f);
1175
+ color: var(--c15t-text-on-primary, #fff);
1176
+ }
1177
+
1178
+ .tabIcon-U9tnu0 {
1179
+ flex-shrink: 0;
1180
+ width: 14px;
1181
+ height: 14px;
1182
+ }
1183
+
1184
+ .tabDisabled-lDuv5l {
1185
+ opacity: .5;
1186
+ cursor: not-allowed;
1187
+ pointer-events: none;
1188
+ }
1189
+
1190
+ .tabDisabled-lDuv5l:hover {
1191
+ color: var(--c15t-text-muted, #737373);
1192
+ background-color: #0000;
1193
+ }
1194
+
1195
+ .tabPanel-QKO8FX {
1196
+ display: none;
1197
+ }
1198
+
1199
+ .tabPanelActive-mrNlGE {
1200
+ display: block;
1201
+ }
1202
+
1203
+ @media (prefers-reduced-motion: reduce) {
1204
+ .tab-yfDEqg {
1205
+ transition: none;
1206
+ }
1207
+ }
1208
+
1209
+ @media (hover: none) {
1210
+ .tab-yfDEqg:hover:not(.tabActive-r4hing) {
1211
+ color: var(--c15t-text-muted, #737373);
1212
+ background-color: #0000;
1213
+ }
1214
+ }
1215
+ `,
1216
+ ""
1217
+ ]);
1218
+ ___CSS_LOADER_EXPORT___.locals = {
1219
+ tabList: "tabList-IyuiBE",
1220
+ tab: "tab-yfDEqg",
1221
+ tabActive: "tabActive-r4hing",
1222
+ tabIcon: "tabIcon-U9tnu0",
1223
+ tabDisabled: "tabDisabled-lDuv5l",
1224
+ tabPanel: "tabPanel-QKO8FX",
1225
+ tabPanelActive: "tabPanelActive-mrNlGE"
1226
+ };
1227
+ const __rspack_default_export = ___CSS_LOADER_EXPORT___;
1228
+ },
1229
+ "../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].use[2]!./src/styles/tokens.css" (module, __webpack_exports__, __webpack_require__) {
1230
+ __webpack_require__.d(__webpack_exports__, {
1231
+ A: ()=>__rspack_default_export
1232
+ });
1233
+ var _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0 = __webpack_require__("../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js");
1234
+ var _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0);
1235
+ var _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1 = __webpack_require__("../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/css-loader/api.js");
1236
+ var _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1);
1237
+ var ___CSS_LOADER_EXPORT___ = _node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1_default()(_node_modules_bun_rsbuild_core_1_6_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0_default());
1238
+ ___CSS_LOADER_EXPORT___.push([
1239
+ module.id,
1240
+ `:root {
1241
+ --c15t-devtools-panel-width: 480px;
1242
+ --c15t-devtools-panel-max-height: 560px;
1243
+ --c15t-devtools-button-size: 40px;
1244
+ --c15t-devtools-z-index: 99999;
1245
+ --c15t-devtools-surface-muted: var(--c15t-surface-hover, #f7f7f7);
1246
+ --c15t-devtools-font-size-xs: .75rem;
1247
+ --c15t-devtools-badge-success: #21c45d;
1248
+ --c15t-devtools-badge-success-bg: #e4fbed;
1249
+ --c15t-devtools-badge-error: #ef4343;
1250
+ --c15t-devtools-badge-error-bg: #fde7e7;
1251
+ --c15t-devtools-badge-warning: #f59f0a;
1252
+ --c15t-devtools-badge-warning-bg: #fef7dc;
1253
+ --c15t-devtools-badge-info: #2463eb;
1254
+ --c15t-devtools-badge-info-bg: #dcebfe;
1255
+ --c15t-devtools-badge-neutral: #737373;
1256
+ --c15t-devtools-badge-neutral-bg: #f0f0f0;
1257
+ }
1258
+
1259
+ :is(:global(.c15t-dark), :global(.dark)) {
1260
+ --c15t-devtools-surface-muted: var(--c15t-surface-hover, #292929);
1261
+ --c15t-devtools-badge-success-bg: #21c45d33;
1262
+ --c15t-devtools-badge-error-bg: #ef434333;
1263
+ --c15t-devtools-badge-warning-bg: #f59f0a33;
1264
+ --c15t-devtools-badge-info-bg: #2463eb33;
1265
+ --c15t-devtools-badge-neutral-bg: #383838;
1266
+ }
1267
+
1268
+ @media (prefers-color-scheme: dark) {
1269
+ :root {
1270
+ --c15t-devtools-surface-muted: var(--c15t-surface-hover, #292929);
1271
+ --c15t-devtools-badge-success-bg: #21c45d33;
1272
+ --c15t-devtools-badge-error-bg: #ef434333;
1273
+ --c15t-devtools-badge-warning-bg: #f59f0a33;
1274
+ --c15t-devtools-badge-info-bg: #2463eb33;
1275
+ --c15t-devtools-badge-neutral-bg: #383838;
1276
+ }
1277
+ }
1278
+ `,
1279
+ ""
1280
+ ]);
1281
+ const __rspack_default_export = ___CSS_LOADER_EXPORT___;
1282
+ },
1283
+ "../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/css-loader/api.js" (module) {
1284
+ module.exports = function(cssWithMappingToString) {
1285
+ var list = [];
1286
+ list.toString = function() {
1287
+ return this.map(function(item) {
1288
+ var content = "";
1289
+ var needLayer = void 0 !== item[5];
1290
+ if (item[4]) content += "@supports (".concat(item[4], ") {");
1291
+ if (item[2]) content += "@media ".concat(item[2], " {");
1292
+ if (needLayer) content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
1293
+ content += cssWithMappingToString(item);
1294
+ if (needLayer) content += "}";
1295
+ if (item[2]) content += "}";
1296
+ if (item[4]) content += "}";
1297
+ return content;
1298
+ }).join("");
1299
+ };
1300
+ list.i = function(modules, media, dedupe, supports, layer) {
1301
+ if ("string" == typeof modules) modules = [
1302
+ [
1303
+ null,
1304
+ modules,
1305
+ void 0
1306
+ ]
1307
+ ];
1308
+ var alreadyImportedModules = {};
1309
+ if (dedupe) for(var k = 0; k < this.length; k++){
1310
+ var id = this[k][0];
1311
+ if (null != id) alreadyImportedModules[id] = true;
1312
+ }
1313
+ for(var _k = 0; _k < modules.length; _k++){
1314
+ var item = [].concat(modules[_k]);
1315
+ if (!dedupe || !alreadyImportedModules[item[0]]) {
1316
+ if (void 0 !== layer) if (void 0 === item[5]) item[5] = layer;
1317
+ else {
1318
+ item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
1319
+ item[5] = layer;
1320
+ }
1321
+ if (media) if (item[2]) {
1322
+ item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
1323
+ item[2] = media;
1324
+ } else item[2] = media;
1325
+ if (supports) if (item[4]) {
1326
+ item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
1327
+ item[4] = supports;
1328
+ } else item[4] = "".concat(supports);
1329
+ list.push(item);
1330
+ }
1331
+ }
1332
+ };
1333
+ return list;
1334
+ };
1335
+ },
1336
+ "../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js" (module) {
1337
+ module.exports = function(i) {
1338
+ return i[1];
1339
+ };
1340
+ },
1341
+ "../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/style-loader/runtime/injectStylesIntoStyleTag.js" (module) {
1342
+ var stylesInDOM = [];
1343
+ function getIndexByIdentifier(identifier) {
1344
+ var result = -1;
1345
+ for(var i = 0; i < stylesInDOM.length; i++)if (stylesInDOM[i].identifier === identifier) {
1346
+ result = i;
1347
+ break;
1348
+ }
1349
+ return result;
1350
+ }
1351
+ function modulesToDom(list, options) {
1352
+ var idCountMap = {};
1353
+ var identifiers = [];
1354
+ for(var i = 0; i < list.length; i++){
1355
+ var item = list[i];
1356
+ var id = options.base ? item[0] + options.base : item[0];
1357
+ var count = idCountMap[id] || 0;
1358
+ var identifier = "".concat(id, " ").concat(count);
1359
+ idCountMap[id] = count + 1;
1360
+ var indexByIdentifier = getIndexByIdentifier(identifier);
1361
+ var obj = {
1362
+ css: item[1],
1363
+ media: item[2],
1364
+ sourceMap: item[3],
1365
+ supports: item[4],
1366
+ layer: item[5]
1367
+ };
1368
+ if (-1 !== indexByIdentifier) {
1369
+ stylesInDOM[indexByIdentifier].references++;
1370
+ stylesInDOM[indexByIdentifier].updater(obj);
1371
+ } else {
1372
+ var updater = addElementStyle(obj, options);
1373
+ options.byIndex = i;
1374
+ stylesInDOM.splice(i, 0, {
1375
+ identifier: identifier,
1376
+ updater: updater,
1377
+ references: 1
1378
+ });
1379
+ }
1380
+ identifiers.push(identifier);
1381
+ }
1382
+ return identifiers;
1383
+ }
1384
+ function addElementStyle(obj, options) {
1385
+ var api = options.domAPI(options);
1386
+ api.update(obj);
1387
+ var updater = function(newObj) {
1388
+ if (newObj) {
1389
+ if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) return;
1390
+ api.update(obj = newObj);
1391
+ } else api.remove();
1392
+ };
1393
+ return updater;
1394
+ }
1395
+ module.exports = function(list, options) {
1396
+ options = options || {};
1397
+ list = list || [];
1398
+ var lastIdentifiers = modulesToDom(list, options);
1399
+ return function(newList) {
1400
+ newList = newList || [];
1401
+ for(var i = 0; i < lastIdentifiers.length; i++){
1402
+ var identifier = lastIdentifiers[i];
1403
+ var index = getIndexByIdentifier(identifier);
1404
+ stylesInDOM[index].references--;
1405
+ }
1406
+ var newLastIdentifiers = modulesToDom(newList, options);
1407
+ for(var _i = 0; _i < lastIdentifiers.length; _i++){
1408
+ var _identifier = lastIdentifiers[_i];
1409
+ var _index = getIndexByIdentifier(_identifier);
1410
+ if (0 === stylesInDOM[_index].references) {
1411
+ stylesInDOM[_index].updater();
1412
+ stylesInDOM.splice(_index, 1);
1413
+ }
1414
+ }
1415
+ lastIdentifiers = newLastIdentifiers;
1416
+ };
1417
+ };
1418
+ },
1419
+ "../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertBySelector.js" (module) {
1420
+ var memo = {};
1421
+ function getTarget(target) {
1422
+ if (void 0 === memo[target]) {
1423
+ var styleTarget = document.querySelector(target);
1424
+ if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) try {
1425
+ styleTarget = styleTarget.contentDocument.head;
1426
+ } catch (e) {
1427
+ styleTarget = null;
1428
+ }
1429
+ memo[target] = styleTarget;
1430
+ }
1431
+ return memo[target];
1432
+ }
1433
+ function insertBySelector(insert, style) {
1434
+ var target = getTarget(insert);
1435
+ if (!target) throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
1436
+ target.appendChild(style);
1437
+ }
1438
+ module.exports = insertBySelector;
1439
+ },
1440
+ "../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertStyleElement.js" (module) {
1441
+ function insertStyleElement(options) {
1442
+ var element = document.createElement("style");
1443
+ options.setAttributes(element, options.attributes);
1444
+ options.insert(element, options.options);
1445
+ return element;
1446
+ }
1447
+ module.exports = insertStyleElement;
1448
+ },
1449
+ "../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/style-loader/runtime/setAttributesWithoutAttributes.js" (module, __unused_webpack_exports, __webpack_require__) {
1450
+ function setAttributesWithoutAttributes(styleElement) {
1451
+ var nonce = __webpack_require__.nc;
1452
+ if (nonce) styleElement.setAttribute("nonce", nonce);
1453
+ }
1454
+ module.exports = setAttributesWithoutAttributes;
1455
+ },
1456
+ "../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleDomAPI.js" (module) {
1457
+ function apply(styleElement, options, obj) {
1458
+ var css = "";
1459
+ if (obj.supports) css += "@supports (".concat(obj.supports, ") {");
1460
+ if (obj.media) css += "@media ".concat(obj.media, " {");
1461
+ var needLayer = void 0 !== obj.layer;
1462
+ if (needLayer) css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {");
1463
+ css += obj.css;
1464
+ if (needLayer) css += "}";
1465
+ if (obj.media) css += "}";
1466
+ if (obj.supports) css += "}";
1467
+ var sourceMap = obj.sourceMap;
1468
+ if (sourceMap && "undefined" != typeof btoa) css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
1469
+ options.styleTagTransform(css, styleElement, options.options);
1470
+ }
1471
+ function removeStyleElement(styleElement) {
1472
+ if (null === styleElement.parentNode) return false;
1473
+ styleElement.parentNode.removeChild(styleElement);
1474
+ }
1475
+ function domAPI(options) {
1476
+ if ("undefined" == typeof document) return {
1477
+ update: function() {},
1478
+ remove: function() {}
1479
+ };
1480
+ var styleElement = options.insertStyleElement(options);
1481
+ return {
1482
+ update: function(obj) {
1483
+ apply(styleElement, options, obj);
1484
+ },
1485
+ remove: function() {
1486
+ removeStyleElement(styleElement);
1487
+ }
1488
+ };
1489
+ }
1490
+ module.exports = domAPI;
1491
+ },
1492
+ "../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleTagTransform.js" (module) {
1493
+ function styleTagTransform(css, styleElement) {
1494
+ if (styleElement.styleSheet) styleElement.styleSheet.cssText = css;
1495
+ else {
1496
+ while(styleElement.firstChild)styleElement.removeChild(styleElement.firstChild);
1497
+ styleElement.appendChild(document.createTextNode(css));
1498
+ }
1499
+ }
1500
+ module.exports = styleTagTransform;
1501
+ }
1502
+ };
1503
+ var __webpack_module_cache__ = {};
1504
+ function __webpack_require__(moduleId) {
1505
+ var cachedModule = __webpack_module_cache__[moduleId];
1506
+ if (void 0 !== cachedModule) return cachedModule.exports;
1507
+ var module = __webpack_module_cache__[moduleId] = {
1508
+ id: moduleId,
1509
+ exports: {}
1510
+ };
1511
+ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
1512
+ return module.exports;
1513
+ }
1514
+ (()=>{
1515
+ __webpack_require__.n = (module)=>{
1516
+ var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
1517
+ __webpack_require__.d(getter, {
1518
+ a: getter
1519
+ });
1520
+ return getter;
1521
+ };
1522
+ })();
1523
+ (()=>{
1524
+ __webpack_require__.d = (exports, definition)=>{
1525
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
1526
+ enumerable: true,
1527
+ get: definition[key]
1528
+ });
1529
+ };
1530
+ })();
1531
+ (()=>{
1532
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
1533
+ })();
1534
+ (()=>{
1535
+ __webpack_require__.nc = void 0;
1536
+ })();
1537
+ const DEVTOOLS_STORAGE_KEY = 'c15t-devtools-position';
1538
+ const DRAG_THRESHOLD = 30;
1539
+ const VELOCITY_THRESHOLD = 0.15;
1540
+ function createInitialDragState() {
1541
+ return {
1542
+ isDragging: false,
1543
+ startX: 0,
1544
+ startY: 0,
1545
+ currentX: 0,
1546
+ currentY: 0
1547
+ };
1548
+ }
1549
+ function calculateCornerFromDrag(currentCorner, dragX, dragY, options = {}) {
1550
+ const { threshold = DRAG_THRESHOLD, velocityX = 0, velocityY = 0 } = options;
1551
+ const absDragX = Math.abs(dragX);
1552
+ const absDragY = Math.abs(dragY);
1553
+ const absVelocityX = Math.abs(velocityX);
1554
+ const absVelocityY = Math.abs(velocityY);
1555
+ const hasVelocityX = absVelocityX >= VELOCITY_THRESHOLD;
1556
+ const hasVelocityY = absVelocityY >= VELOCITY_THRESHOLD;
1557
+ const velocityDistanceThreshold = 10;
1558
+ const shouldMoveX = absDragX >= threshold || hasVelocityX && absDragX >= velocityDistanceThreshold;
1559
+ const shouldMoveY = absDragY >= threshold || hasVelocityY && absDragY >= velocityDistanceThreshold;
1560
+ if (!shouldMoveX && !shouldMoveY) return currentCorner;
1561
+ const isCurrentlyBottom = currentCorner.includes('bottom');
1562
+ const isCurrentlyRight = currentCorner.includes('right');
1563
+ let isBottom = isCurrentlyBottom;
1564
+ let isRight = isCurrentlyRight;
1565
+ if (shouldMoveX) isRight = dragX > 0;
1566
+ if (shouldMoveY) isBottom = dragY > 0;
1567
+ if (isBottom && isRight) return 'bottom-right';
1568
+ if (isBottom && !isRight) return 'bottom-left';
1569
+ if (!isBottom && isRight) return 'top-right';
1570
+ return 'top-left';
1571
+ }
1572
+ function getCornerStyles(corner, offset = 20) {
1573
+ const styles = {};
1574
+ if (corner.includes('bottom')) styles.bottom = `${offset}px`;
1575
+ else styles.top = `${offset}px`;
1576
+ if (corner.includes('right')) styles.right = `${offset}px`;
1577
+ else styles.left = `${offset}px`;
1578
+ return styles;
1579
+ }
1580
+ function persistPosition(corner, storageKey = DEVTOOLS_STORAGE_KEY) {
1581
+ try {
1582
+ if ('undefined' != typeof localStorage) localStorage.setItem(storageKey, corner);
1583
+ } catch {}
1584
+ }
1585
+ function getPersistedPosition(storageKey = DEVTOOLS_STORAGE_KEY) {
1586
+ try {
1587
+ if ('undefined' != typeof localStorage) {
1588
+ const stored = localStorage.getItem(storageKey);
1589
+ if ('bottom-right' === stored || 'top-right' === stored || 'bottom-left' === stored || 'top-left' === stored) return stored;
1590
+ }
1591
+ } catch {}
1592
+ return null;
1593
+ }
1594
+ function calculateDragOffset(dragState) {
1595
+ if (!dragState.isDragging) return {
1596
+ x: 0,
1597
+ y: 0
1598
+ };
1599
+ return {
1600
+ x: dragState.currentX - dragState.startX,
1601
+ y: dragState.currentY - dragState.startY
1602
+ };
1603
+ }
1604
+ function createDraggable(options = {}) {
1605
+ const { defaultPosition = 'bottom-right', persistPosition: shouldPersist = true, onPositionChange, onDragStart, onDragEnd } = options;
1606
+ let corner = defaultPosition;
1607
+ if (shouldPersist && 'undefined' != typeof window) {
1608
+ const persisted = getPersistedPosition(DEVTOOLS_STORAGE_KEY);
1609
+ if (persisted) corner = persisted;
1610
+ }
1611
+ let dragState = createInitialDragState();
1612
+ let hasDragged = false;
1613
+ let dragStartTime = 0;
1614
+ let attachedElement = null;
1615
+ let boundPointerDown = null;
1616
+ let boundPointerMove = null;
1617
+ let boundPointerUp = null;
1618
+ let boundPointerCancel = null;
1619
+ function updateCorner(newCorner) {
1620
+ corner = newCorner;
1621
+ if (shouldPersist) persistPosition(newCorner, DEVTOOLS_STORAGE_KEY);
1622
+ onPositionChange?.(newCorner);
1623
+ }
1624
+ function handlePointerDown(e) {
1625
+ if (0 !== e.button) return;
1626
+ e.target.setPointerCapture(e.pointerId);
1627
+ hasDragged = false;
1628
+ dragStartTime = Date.now();
1629
+ dragState = {
1630
+ isDragging: true,
1631
+ startX: e.clientX,
1632
+ startY: e.clientY,
1633
+ currentX: e.clientX,
1634
+ currentY: e.clientY
1635
+ };
1636
+ onDragStart?.();
1637
+ }
1638
+ function handlePointerMove(e) {
1639
+ if (!dragState.isDragging) return;
1640
+ const dx = Math.abs(e.clientX - dragState.startX);
1641
+ const dy = Math.abs(e.clientY - dragState.startY);
1642
+ if (dx > 5 || dy > 5) hasDragged = true;
1643
+ dragState = {
1644
+ ...dragState,
1645
+ currentX: e.clientX,
1646
+ currentY: e.clientY
1647
+ };
1648
+ if (attachedElement && hasDragged) {
1649
+ const offset = calculateDragOffset(dragState);
1650
+ attachedElement.style.transform = `translate(${offset.x}px, ${offset.y}px)`;
1651
+ attachedElement.style.transition = 'none';
1652
+ }
1653
+ }
1654
+ function handlePointerUp(e) {
1655
+ if (!dragState.isDragging) return;
1656
+ e.target.releasePointerCapture(e.pointerId);
1657
+ if (hasDragged) {
1658
+ const dragX = e.clientX - dragState.startX;
1659
+ const dragY = e.clientY - dragState.startY;
1660
+ const dragDuration = Date.now() - dragStartTime;
1661
+ const velocityX = dragDuration > 0 ? dragX / dragDuration : 0;
1662
+ const velocityY = dragDuration > 0 ? dragY / dragDuration : 0;
1663
+ const newCorner = calculateCornerFromDrag(corner, dragX, dragY, {
1664
+ velocityX,
1665
+ velocityY
1666
+ });
1667
+ if (newCorner !== corner) updateCorner(newCorner);
1668
+ if (attachedElement) {
1669
+ applyPositionStyles(attachedElement);
1670
+ attachedElement.style.transform = '';
1671
+ attachedElement.style.transition = '';
1672
+ }
1673
+ }
1674
+ dragState = createInitialDragState();
1675
+ onDragEnd?.(hasDragged);
1676
+ }
1677
+ function handlePointerCancel(e) {
1678
+ e.target.releasePointerCapture(e.pointerId);
1679
+ dragState = createInitialDragState();
1680
+ if (attachedElement) {
1681
+ attachedElement.style.transform = '';
1682
+ attachedElement.style.transition = '';
1683
+ }
1684
+ onDragEnd?.(false);
1685
+ }
1686
+ function applyPositionStyles(element) {
1687
+ const styles = getCornerStyles(corner, 20);
1688
+ element.style.top = '';
1689
+ element.style.bottom = '';
1690
+ element.style.left = '';
1691
+ element.style.right = '';
1692
+ for (const [key, value] of Object.entries(styles))if (void 0 !== value) element.style.setProperty(key, value);
1693
+ }
1694
+ function attach(element) {
1695
+ detach();
1696
+ attachedElement = element;
1697
+ boundPointerDown = handlePointerDown;
1698
+ boundPointerMove = handlePointerMove;
1699
+ boundPointerUp = handlePointerUp;
1700
+ boundPointerCancel = handlePointerCancel;
1701
+ element.addEventListener('pointerdown', boundPointerDown);
1702
+ element.addEventListener('pointermove', boundPointerMove);
1703
+ element.addEventListener('pointerup', boundPointerUp);
1704
+ element.addEventListener('pointercancel', boundPointerCancel);
1705
+ applyPositionStyles(element);
1706
+ element.style.touchAction = 'none';
1707
+ }
1708
+ function detach() {
1709
+ if (attachedElement) {
1710
+ if (boundPointerDown) attachedElement.removeEventListener('pointerdown', boundPointerDown);
1711
+ if (boundPointerMove) attachedElement.removeEventListener('pointermove', boundPointerMove);
1712
+ if (boundPointerUp) attachedElement.removeEventListener('pointerup', boundPointerUp);
1713
+ if (boundPointerCancel) attachedElement.removeEventListener('pointercancel', boundPointerCancel);
1714
+ attachedElement = null;
1715
+ }
1716
+ }
1717
+ return {
1718
+ getCorner: ()=>corner,
1719
+ setCorner: updateCorner,
1720
+ isDragging: ()=>dragState.isDragging,
1721
+ wasDragged: ()=>hasDragged,
1722
+ attach,
1723
+ detach,
1724
+ applyPositionStyles,
1725
+ destroy: detach
1726
+ };
1727
+ }
1728
+ function createElement(options = {}) {
1729
+ const { tag = 'div', text, html, children, className, id, style, dataset, onClick, onMouseEnter, onMouseLeave, onKeyDown, onKeyUp, onFocus, onBlur, onChange, onInput, onAnimationEnd, onTransitionEnd, ...attrs } = options;
1730
+ const element = document.createElement(tag);
1731
+ if (className) element.className = className;
1732
+ if (id) element.id = id;
1733
+ if (style) {
1734
+ for (const [key, value] of Object.entries(style))if (void 0 !== value) element.style.setProperty(key.replace(/([A-Z])/g, '-$1').toLowerCase(), String(value));
1735
+ }
1736
+ if (dataset) for (const [key, value] of Object.entries(dataset))element.dataset[key] = value;
1737
+ if (text) element.textContent = text;
1738
+ if (html) element.innerHTML = html;
1739
+ if (children) {
1740
+ for (const child of children)if (null != child) if ('string' == typeof child) element.appendChild(document.createTextNode(child));
1741
+ else element.appendChild(child);
1742
+ }
1743
+ if (void 0 !== attrs.ariaLabel) element.setAttribute('aria-label', attrs.ariaLabel);
1744
+ if (void 0 !== attrs.ariaExpanded) element.setAttribute('aria-expanded', attrs.ariaExpanded);
1745
+ if (void 0 !== attrs.ariaHidden) element.setAttribute('aria-hidden', attrs.ariaHidden);
1746
+ if (void 0 !== attrs.ariaSelected) element.setAttribute('aria-selected', attrs.ariaSelected);
1747
+ if (void 0 !== attrs.ariaControls) element.setAttribute('aria-controls', attrs.ariaControls);
1748
+ if (void 0 !== attrs.ariaChecked) element.setAttribute('aria-checked', attrs.ariaChecked);
1749
+ for (const [key, value] of Object.entries(attrs))if (void 0 !== value && !key.startsWith('aria')) if ('boolean' == typeof value) {
1750
+ if (value) element.setAttribute(key, '');
1751
+ } else element.setAttribute(key, String(value));
1752
+ if (onClick) element.addEventListener('click', onClick);
1753
+ if (onMouseEnter) element.addEventListener('mouseenter', onMouseEnter);
1754
+ if (onMouseLeave) element.addEventListener('mouseleave', onMouseLeave);
1755
+ if (onKeyDown) element.addEventListener('keydown', onKeyDown);
1756
+ if (onKeyUp) element.addEventListener('keyup', onKeyUp);
1757
+ if (onFocus) element.addEventListener('focus', onFocus);
1758
+ if (onBlur) element.addEventListener('blur', onBlur);
1759
+ if (onChange) element.addEventListener('change', onChange);
1760
+ if (onInput) element.addEventListener('input', onInput);
1761
+ if (onAnimationEnd) element.addEventListener('animationend', onAnimationEnd);
1762
+ if (onTransitionEnd) element.addEventListener('transitionend', onTransitionEnd);
1763
+ return element;
1764
+ }
1765
+ function renderer_div(options = {}) {
1766
+ return createElement({
1767
+ ...options,
1768
+ tag: 'div'
1769
+ });
1770
+ }
1771
+ function renderer_button(options = {}) {
1772
+ return createElement({
1773
+ ...options,
1774
+ tag: 'button',
1775
+ type: options.type ?? 'button'
1776
+ });
1777
+ }
1778
+ function span(options = {}) {
1779
+ return createElement({
1780
+ ...options,
1781
+ tag: 'span'
1782
+ });
1783
+ }
1784
+ function input(options = {}) {
1785
+ return createElement({
1786
+ ...options,
1787
+ tag: 'input'
1788
+ });
1789
+ }
1790
+ function renderer_select(options = {}) {
1791
+ const { options: selectOptions, selectedValue, ...rest } = options;
1792
+ const selectElement = createElement({
1793
+ ...rest,
1794
+ tag: 'select'
1795
+ });
1796
+ if (selectOptions) for (const opt of selectOptions){
1797
+ const optionElement = document.createElement('option');
1798
+ optionElement.value = opt.value;
1799
+ optionElement.textContent = opt.label;
1800
+ if (selectedValue === opt.value) optionElement.selected = true;
1801
+ selectElement.appendChild(optionElement);
1802
+ }
1803
+ return selectElement;
1804
+ }
1805
+ function createSvgElement(svgContent, options = {}) {
1806
+ const { className, ariaHidden = true, width = 24, height = 24 } = options;
1807
+ const wrapper = document.createElement('div');
1808
+ wrapper.innerHTML = svgContent.trim();
1809
+ const svg = wrapper.firstElementChild;
1810
+ if (svg) {
1811
+ if (className) svg.setAttribute('class', className);
1812
+ if (ariaHidden) svg.setAttribute('aria-hidden', 'true');
1813
+ svg.setAttribute('width', String(width));
1814
+ svg.setAttribute('height', String(height));
1815
+ }
1816
+ return svg;
1817
+ }
1818
+ function clearElement(element) {
1819
+ while(element.firstChild)element.removeChild(element.firstChild);
1820
+ }
1821
+ function createPortal(element) {
1822
+ document.body.appendChild(element);
1823
+ return ()=>{
1824
+ if (element.parentNode) element.parentNode.removeChild(element);
1825
+ };
1826
+ }
1827
+ var injectStylesIntoStyleTag = __webpack_require__("../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/style-loader/runtime/injectStylesIntoStyleTag.js");
1828
+ var injectStylesIntoStyleTag_default = /*#__PURE__*/ __webpack_require__.n(injectStylesIntoStyleTag);
1829
+ var styleDomAPI = __webpack_require__("../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleDomAPI.js");
1830
+ var styleDomAPI_default = /*#__PURE__*/ __webpack_require__.n(styleDomAPI);
1831
+ var insertBySelector = __webpack_require__("../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertBySelector.js");
1832
+ var insertBySelector_default = /*#__PURE__*/ __webpack_require__.n(insertBySelector);
1833
+ var setAttributesWithoutAttributes = __webpack_require__("../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/style-loader/runtime/setAttributesWithoutAttributes.js");
1834
+ var setAttributesWithoutAttributes_default = /*#__PURE__*/ __webpack_require__.n(setAttributesWithoutAttributes);
1835
+ var insertStyleElement = __webpack_require__("../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertStyleElement.js");
1836
+ var insertStyleElement_default = /*#__PURE__*/ __webpack_require__.n(insertStyleElement);
1837
+ var styleTagTransform = __webpack_require__("../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleTagTransform.js");
1838
+ var styleTagTransform_default = /*#__PURE__*/ __webpack_require__.n(styleTagTransform);
1839
+ var animations_module = __webpack_require__("../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].use[2]!./src/styles/animations.module.css");
1840
+ var animations_module_options = {};
1841
+ animations_module_options.styleTagTransform = styleTagTransform_default();
1842
+ animations_module_options.setAttributes = setAttributesWithoutAttributes_default();
1843
+ animations_module_options.insert = insertBySelector_default().bind(null, "head");
1844
+ animations_module_options.domAPI = styleDomAPI_default();
1845
+ animations_module_options.insertStyleElement = insertStyleElement_default();
1846
+ injectStylesIntoStyleTag_default()(animations_module.A, animations_module_options);
1847
+ const styles_animations_module = animations_module.A && animations_module.A.locals ? animations_module.A.locals : void 0;
1848
+ var panel_module = __webpack_require__("../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].use[2]!./src/styles/panel.module.css");
1849
+ var panel_module_options = {};
1850
+ panel_module_options.styleTagTransform = styleTagTransform_default();
1851
+ panel_module_options.setAttributes = setAttributesWithoutAttributes_default();
1852
+ panel_module_options.insert = insertBySelector_default().bind(null, "head");
1853
+ panel_module_options.domAPI = styleDomAPI_default();
1854
+ panel_module_options.insertStyleElement = insertStyleElement_default();
1855
+ injectStylesIntoStyleTag_default()(panel_module.A, panel_module_options);
1856
+ const styles_panel_module = panel_module.A && panel_module.A.locals ? panel_module.A.locals : void 0;
1857
+ const PREFERENCE_TRIGGER_SELECTORS = '[data-c15t-trigger], [aria-label*="privacy settings"], [aria-label*="preference"]';
1858
+ function detectPreferenceTrigger() {
1859
+ const triggers = document.querySelectorAll(PREFERENCE_TRIGGER_SELECTORS);
1860
+ return triggers.length > 0;
1861
+ }
1862
+ function getPreferenceTriggerElements() {
1863
+ return document.querySelectorAll(PREFERENCE_TRIGGER_SELECTORS);
1864
+ }
1865
+ function setPreferenceTriggerVisibility(visible) {
1866
+ const elements = getPreferenceTriggerElements();
1867
+ for (const el of elements)el.style.display = visible ? '' : 'none';
1868
+ }
1869
+ function getPreferenceCenterOpener() {
1870
+ const win = window;
1871
+ const store = win.c15tStore;
1872
+ if (store && 'function' == typeof store.getState) {
1873
+ const state = store.getState();
1874
+ if ('function' == typeof state.setActiveUI) return ()=>{
1875
+ state.setActiveUI('dialog');
1876
+ };
1877
+ }
1878
+ return null;
1879
+ }
1880
+ const DEVTOOLS_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 446 445" aria-label="c15t">
1881
+ <path fill="currentColor" d="M223.178.313c39.064 0 70.732 31.668 70.732 70.732-.001 39.064-31.668 70.731-70.732 70.731-12.181 0-23.642-3.079-33.649-8.502l-55.689 55.689a70.267 70.267 0 0 1 5.574 13.441h167.531c8.695-29.217 35.762-50.523 67.804-50.523 39.064 0 70.731 31.668 70.731 70.732s-31.668 70.732-70.731 70.732c-32.042 0-59.108-21.306-67.803-50.523H139.413a70.417 70.417 0 0 1-7.888 17.396l54.046 54.046c10.893-6.851 23.786-10.815 37.605-10.815 39.064 0 70.732 31.669 70.732 70.733 0 39.064-31.668 70.731-70.732 70.731s-70.732-31.667-70.732-70.731c0-10.518 2.296-20.499 6.414-29.471l-57.78-57.78c-8.972 4.117-18.952 6.414-29.47 6.414-39.063 0-70.731-31.668-70.732-70.732 0-39.064 31.669-70.732 70.733-70.732 12.18 0 23.642 3.079 33.649 8.502l55.688-55.688c-5.423-10.007-8.502-21.469-8.502-33.65 0-39.064 31.668-70.733 70.732-70.733Zm0 343.555c-16.742 0-30.314 13.572-30.314 30.314 0 16.741 13.572 30.313 30.314 30.313s30.314-13.572 30.314-30.313c0-16.742-13.572-30.314-30.314-30.314ZM71.611 192.299c-16.742 0-30.315 13.572-30.315 30.314s13.573 30.314 30.315 30.314c16.741 0 30.313-13.572 30.313-30.314 0-16.741-13.572-30.314-30.313-30.314Zm303.138 0c-16.729 0-30.294 13.551-30.315 30.275l.001.039-.001.038c.021 16.725 13.586 30.276 30.315 30.276 16.741 0 30.313-13.572 30.313-30.314 0-16.741-13.572-30.314-30.313-30.314ZM223.178 40.73c-16.742 0-30.314 13.573-30.314 30.315s13.573 30.313 30.314 30.313c16.742 0 30.313-13.572 30.314-30.313 0-16.742-13.572-30.314-30.314-30.315Z"/>
1882
+ </svg>`;
1883
+ const PREFERENCES_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1884
+ <path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/>
1885
+ <circle cx="12" cy="12" r="3"/>
1886
+ </svg>`;
1887
+ const EYE_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1888
+ <path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/>
1889
+ <circle cx="12" cy="12" r="3"/>
1890
+ </svg>`;
1891
+ function getMenuPositionClass(position) {
1892
+ switch(position){
1893
+ case 'bottom-left':
1894
+ return styles_panel_module.dropdownMenuBottomLeft ?? '';
1895
+ case 'bottom-right':
1896
+ return styles_panel_module.dropdownMenuBottomRight ?? '';
1897
+ case 'top-left':
1898
+ return styles_panel_module.dropdownMenuTopLeft ?? '';
1899
+ case 'top-right':
1900
+ return styles_panel_module.dropdownMenuTopRight ?? '';
1901
+ }
1902
+ }
1903
+ function createDropdownMenu(options) {
1904
+ const { items, onOpen, onClose } = options;
1905
+ let isMenuOpen = false;
1906
+ let currentPosition = options.position;
1907
+ let referenceElement = options.referenceElement;
1908
+ const menu = renderer_div({
1909
+ className: `${styles_panel_module.dropdownMenu ?? ''} ${getMenuPositionClass(currentPosition)}`,
1910
+ role: 'menu',
1911
+ ariaLabel: 'c15t Options'
1912
+ });
1913
+ menu.dataset.state = 'closed';
1914
+ function positionMenu() {
1915
+ if (!referenceElement) return;
1916
+ const rect = referenceElement.getBoundingClientRect();
1917
+ menu.getBoundingClientRect();
1918
+ const gap = 8;
1919
+ if (currentPosition.includes('bottom')) {
1920
+ menu.style.bottom = `${window.innerHeight - rect.top + gap}px`;
1921
+ menu.style.top = '';
1922
+ } else {
1923
+ menu.style.top = `${rect.bottom + gap}px`;
1924
+ menu.style.bottom = '';
1925
+ }
1926
+ if (currentPosition.includes('left')) {
1927
+ menu.style.left = `${rect.left}px`;
1928
+ menu.style.right = '';
1929
+ } else {
1930
+ menu.style.right = `${window.innerWidth - rect.right}px`;
1931
+ menu.style.left = '';
1932
+ }
1933
+ }
1934
+ const menuItemElements = new Map();
1935
+ for (const item of items){
1936
+ const isToggle = 'toggle' === item.type;
1937
+ const menuItem = renderer_button({
1938
+ className: styles_panel_module.menuItem ?? '',
1939
+ role: isToggle ? 'menuitemcheckbox' : 'menuitem',
1940
+ onClick: ()=>{
1941
+ item.onClick();
1942
+ if (!isToggle) close();
1943
+ }
1944
+ });
1945
+ if (isToggle) menuItem.setAttribute('aria-checked', item.checked ? 'true' : 'false');
1946
+ if (item.icon) {
1947
+ const iconWrapper = renderer_div({
1948
+ className: styles_panel_module.menuItemIcon ?? ''
1949
+ });
1950
+ const iconSvg = createSvgElement(item.icon, {
1951
+ width: 20,
1952
+ height: 20
1953
+ });
1954
+ iconWrapper.appendChild(iconSvg);
1955
+ menuItem.appendChild(iconWrapper);
1956
+ }
1957
+ const labelContainer = renderer_div({
1958
+ className: styles_panel_module.menuItemContent ?? ''
1959
+ });
1960
+ const label = span({
1961
+ className: styles_panel_module.menuItemLabel ?? '',
1962
+ text: item.label
1963
+ });
1964
+ labelContainer.appendChild(label);
1965
+ if (item.description) {
1966
+ const description = renderer_div({
1967
+ className: styles_panel_module.menuItemDescription ?? '',
1968
+ text: item.description
1969
+ });
1970
+ labelContainer.appendChild(description);
1971
+ }
1972
+ menuItem.appendChild(labelContainer);
1973
+ let toggleIndicator;
1974
+ if (isToggle) {
1975
+ toggleIndicator = renderer_div({
1976
+ className: [
1977
+ styles_panel_module.menuItemToggle ?? '',
1978
+ item.checked ? styles_panel_module.menuItemToggleChecked ?? '' : ''
1979
+ ].filter(Boolean).join(' ')
1980
+ });
1981
+ const toggleTrack = renderer_div({
1982
+ className: styles_panel_module.menuItemToggleTrack ?? ''
1983
+ });
1984
+ const toggleThumb = renderer_div({
1985
+ className: styles_panel_module.menuItemToggleThumb ?? ''
1986
+ });
1987
+ toggleTrack.appendChild(toggleThumb);
1988
+ toggleIndicator.appendChild(toggleTrack);
1989
+ menuItem.appendChild(toggleIndicator);
1990
+ }
1991
+ menu.appendChild(menuItem);
1992
+ menuItemElements.set(item.id, {
1993
+ element: menuItem,
1994
+ toggleIndicator
1995
+ });
1996
+ }
1997
+ function handleClickOutside(e) {
1998
+ if (!menu.contains(e.target)) close();
1999
+ }
2000
+ function handleKeydown(e) {
2001
+ if ('Escape' === e.key) close();
2002
+ }
2003
+ function open() {
2004
+ if (isMenuOpen) return;
2005
+ isMenuOpen = true;
2006
+ positionMenu();
2007
+ menu.dataset.state = 'open';
2008
+ onOpen?.();
2009
+ setTimeout(()=>{
2010
+ document.addEventListener('click', handleClickOutside);
2011
+ document.addEventListener('keydown', handleKeydown);
2012
+ }, 10);
2013
+ }
2014
+ function close() {
2015
+ if (!isMenuOpen) return;
2016
+ isMenuOpen = false;
2017
+ menu.dataset.state = 'closed';
2018
+ onClose?.();
2019
+ document.removeEventListener('click', handleClickOutside);
2020
+ document.removeEventListener('keydown', handleKeydown);
2021
+ }
2022
+ function toggle() {
2023
+ if (isMenuOpen) close();
2024
+ else open();
2025
+ }
2026
+ function updatePosition(position) {
2027
+ menu.classList.remove(styles_panel_module.dropdownMenuBottomLeft ?? '', styles_panel_module.dropdownMenuBottomRight ?? '', styles_panel_module.dropdownMenuTopLeft ?? '', styles_panel_module.dropdownMenuTopRight ?? '');
2028
+ menu.classList.add(getMenuPositionClass(position));
2029
+ currentPosition = position;
2030
+ if (isMenuOpen) positionMenu();
2031
+ }
2032
+ function setReferenceElement(element) {
2033
+ referenceElement = element;
2034
+ }
2035
+ function destroy() {
2036
+ close();
2037
+ }
2038
+ function updateItemChecked(itemId, checked) {
2039
+ const itemData = menuItemElements.get(itemId);
2040
+ if (!itemData) return;
2041
+ const { element, toggleIndicator } = itemData;
2042
+ element.setAttribute('aria-checked', checked ? 'true' : 'false');
2043
+ if (toggleIndicator) if (checked) toggleIndicator.classList.add(styles_panel_module.menuItemToggleChecked ?? '');
2044
+ else toggleIndicator.classList.remove(styles_panel_module.menuItemToggleChecked ?? '');
2045
+ }
2046
+ return {
2047
+ element: menu,
2048
+ isOpen: ()=>isMenuOpen,
2049
+ open,
2050
+ close,
2051
+ toggle,
2052
+ updatePosition,
2053
+ setReferenceElement,
2054
+ updateItemChecked,
2055
+ destroy
2056
+ };
2057
+ }
2058
+ const LOGO_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 446 445" aria-label="c15t">
2059
+ <path fill="currentColor" d="M223.178.313c39.064 0 70.732 31.668 70.732 70.732-.001 39.064-31.668 70.731-70.732 70.731-12.181 0-23.642-3.079-33.649-8.502l-55.689 55.689a70.267 70.267 0 0 1 5.574 13.441h167.531c8.695-29.217 35.762-50.523 67.804-50.523 39.064 0 70.731 31.668 70.731 70.732s-31.668 70.732-70.731 70.732c-32.042 0-59.108-21.306-67.803-50.523H139.413a70.417 70.417 0 0 1-7.888 17.396l54.046 54.046c10.893-6.851 23.786-10.815 37.605-10.815 39.064 0 70.732 31.669 70.732 70.733 0 39.064-31.668 70.731-70.732 70.731s-70.732-31.667-70.732-70.731c0-10.518 2.296-20.499 6.414-29.471l-57.78-57.78c-8.972 4.117-18.952 6.414-29.47 6.414-39.063 0-70.731-31.668-70.732-70.732 0-39.064 31.669-70.732 70.733-70.732 12.18 0 23.642 3.079 33.649 8.502l55.688-55.688c-5.423-10.007-8.502-21.469-8.502-33.65 0-39.064 31.668-70.733 70.732-70.733Zm0 343.555c-16.742 0-30.314 13.572-30.314 30.314 0 16.741 13.572 30.313 30.314 30.313s30.314-13.572 30.314-30.313c0-16.742-13.572-30.314-30.314-30.314ZM71.611 192.299c-16.742 0-30.315 13.572-30.315 30.314s13.573 30.314 30.315 30.314c16.741 0 30.313-13.572 30.313-30.314 0-16.741-13.572-30.314-30.313-30.314Zm303.138 0c-16.729 0-30.294 13.551-30.315 30.275l.001.039-.001.038c.021 16.725 13.586 30.276 30.315 30.276 16.741 0 30.313-13.572 30.313-30.314 0-16.741-13.572-30.314-30.313-30.314ZM223.178 40.73c-16.742 0-30.314 13.573-30.314 30.315s13.573 30.313 30.314 30.313c16.742 0 30.313-13.572 30.314-30.313 0-16.742-13.572-30.314-30.314-30.315Z"/>
2060
+ </svg>`;
2061
+ const CLOSE_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2062
+ <line x1="18" y1="6" x2="6" y2="18"></line>
2063
+ <line x1="6" y1="6" x2="18" y2="18"></line>
2064
+ </svg>`;
2065
+ const WARNING_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2066
+ <path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"></path>
2067
+ <line x1="12" y1="9" x2="12" y2="13"></line>
2068
+ <line x1="12" y1="17" x2="12.01" y2="17"></line>
2069
+ </svg>`;
2070
+ function getPositionClass(position) {
2071
+ switch(position){
2072
+ case 'bottom-right':
2073
+ return styles_panel_module.positionBottomRight ?? '';
2074
+ case 'bottom-left':
2075
+ return styles_panel_module.positionBottomLeft ?? '';
2076
+ case 'top-right':
2077
+ return styles_panel_module.positionTopRight ?? '';
2078
+ case 'top-left':
2079
+ return styles_panel_module.positionTopLeft ?? '';
2080
+ }
2081
+ }
2082
+ function createPanel(options) {
2083
+ const { stateManager, storeConnector, onRenderContent, enableUnifiedMode = true } = options;
2084
+ let removePortal = null;
2085
+ let isAnimatingOut = false;
2086
+ let draggable = null;
2087
+ let dropdownMenu = null;
2088
+ let hasPreferenceTrigger = false;
2089
+ let useUnifiedMode = false;
2090
+ let preferenceTriggerVisible = false;
2091
+ function updatePreferenceTriggerVisibility(visible) {
2092
+ preferenceTriggerVisible = visible;
2093
+ setPreferenceTriggerVisibility(visible);
2094
+ if (dropdownMenu) dropdownMenu.updateItemChecked('toggle-trigger', visible);
2095
+ }
2096
+ const container = renderer_div({
2097
+ className: styles_panel_module.container,
2098
+ dataset: {
2099
+ c15tDevtools: 'true'
2100
+ }
2101
+ });
2102
+ const floatingButton = renderer_button({
2103
+ className: styles_panel_module.floatingButton ?? '',
2104
+ ariaLabel: 'Open c15t Options'
2105
+ });
2106
+ function checkUnifiedMode() {
2107
+ if (!enableUnifiedMode) {
2108
+ useUnifiedMode = false;
2109
+ return;
2110
+ }
2111
+ hasPreferenceTrigger = detectPreferenceTrigger();
2112
+ const preferenceCenterOpener = getPreferenceCenterOpener();
2113
+ useUnifiedMode = hasPreferenceTrigger && null !== preferenceCenterOpener;
2114
+ if (useUnifiedMode && !dropdownMenu) {
2115
+ dropdownMenu = createDropdownMenu({
2116
+ items: [
2117
+ {
2118
+ id: 'devtools',
2119
+ label: 'DevTools',
2120
+ description: 'View and manage consents',
2121
+ icon: DEVTOOLS_ICON,
2122
+ onClick: ()=>{
2123
+ stateManager.setOpen(true);
2124
+ }
2125
+ },
2126
+ {
2127
+ id: 'preferences',
2128
+ label: 'Preferences',
2129
+ description: 'Open privacy settings',
2130
+ icon: PREFERENCES_ICON,
2131
+ onClick: ()=>{
2132
+ const opener = getPreferenceCenterOpener();
2133
+ if (opener) opener();
2134
+ }
2135
+ },
2136
+ {
2137
+ id: 'toggle-trigger',
2138
+ label: 'Show Trigger',
2139
+ description: 'Show preference button',
2140
+ icon: EYE_ICON,
2141
+ type: 'toggle',
2142
+ checked: preferenceTriggerVisible,
2143
+ onClick: ()=>{
2144
+ updatePreferenceTriggerVisibility(!preferenceTriggerVisible);
2145
+ }
2146
+ }
2147
+ ],
2148
+ position: draggable?.getCorner() ?? stateManager.getState().position,
2149
+ referenceElement: floatingButton,
2150
+ onOpen: ()=>{
2151
+ floatingButton.ariaLabel = 'Close c15t Options';
2152
+ },
2153
+ onClose: ()=>{
2154
+ floatingButton.ariaLabel = 'Open c15t Options';
2155
+ }
2156
+ });
2157
+ container.appendChild(dropdownMenu.element);
2158
+ updatePreferenceTriggerVisibility(false);
2159
+ }
2160
+ floatingButton.ariaLabel = useUnifiedMode ? 'Open c15t Options' : 'Open c15t DevTools';
2161
+ }
2162
+ draggable = createDraggable({
2163
+ defaultPosition: stateManager.getState().position,
2164
+ persistPosition: true,
2165
+ onPositionChange: (position)=>{
2166
+ stateManager.setPosition(position);
2167
+ if (dropdownMenu) dropdownMenu.updatePosition(position);
2168
+ },
2169
+ onDragEnd: (wasDragged)=>{
2170
+ if (!wasDragged) if (useUnifiedMode && dropdownMenu) dropdownMenu.toggle();
2171
+ else stateManager.toggle();
2172
+ }
2173
+ });
2174
+ const iconWrapper = renderer_div({
2175
+ className: styles_panel_module.floatingButtonIcon
2176
+ });
2177
+ const logoSvg = createSvgElement(LOGO_ICON, {
2178
+ width: 24,
2179
+ height: 24
2180
+ });
2181
+ iconWrapper.appendChild(logoSvg);
2182
+ floatingButton.appendChild(iconWrapper);
2183
+ draggable.attach(floatingButton);
2184
+ setTimeout(checkUnifiedMode, 100);
2185
+ let panelElement = null;
2186
+ let backdropElement = null;
2187
+ let contentContainer = null;
2188
+ function createPanelElement() {
2189
+ const corner = draggable?.getCorner() ?? stateManager.getState().position;
2190
+ const positionClass = getPositionClass(corner);
2191
+ const panel = renderer_div({
2192
+ className: `${styles_panel_module.panel} ${positionClass} ${styles_animations_module.animateEnter}`,
2193
+ role: 'dialog',
2194
+ ariaLabel: 'c15t DevTools'
2195
+ });
2196
+ const header = renderer_div({
2197
+ className: styles_panel_module.header,
2198
+ children: [
2199
+ renderer_div({
2200
+ className: styles_panel_module.headerTitle,
2201
+ children: [
2202
+ (()=>{
2203
+ const logoWrapper = renderer_div({
2204
+ className: styles_panel_module.headerLogo
2205
+ });
2206
+ logoWrapper.appendChild(createSvgElement(LOGO_ICON, {
2207
+ width: 20,
2208
+ height: 20
2209
+ }));
2210
+ return logoWrapper;
2211
+ })(),
2212
+ span({
2213
+ text: 'c15t DevTools'
2214
+ })
2215
+ ]
2216
+ }),
2217
+ renderer_button({
2218
+ className: styles_panel_module.closeButton,
2219
+ ariaLabel: 'Close DevTools',
2220
+ onClick: ()=>closePanel(),
2221
+ children: [
2222
+ (()=>{
2223
+ const iconWrap = renderer_div({
2224
+ className: styles_panel_module.closeButtonIcon
2225
+ });
2226
+ iconWrap.appendChild(createSvgElement(CLOSE_ICON, {
2227
+ width: 16,
2228
+ height: 16
2229
+ }));
2230
+ return iconWrap;
2231
+ })()
2232
+ ]
2233
+ })
2234
+ ]
2235
+ });
2236
+ contentContainer = renderer_div({
2237
+ className: styles_panel_module.content
2238
+ });
2239
+ const isConnected = storeConnector.isConnected();
2240
+ const footer = renderer_div({
2241
+ className: styles_panel_module.footer,
2242
+ children: [
2243
+ renderer_div({
2244
+ className: styles_panel_module.footerStatus,
2245
+ children: [
2246
+ span({
2247
+ className: `${styles_panel_module.statusDot} ${isConnected ? styles_panel_module.statusConnected : styles_panel_module.statusDisconnected}`
2248
+ }),
2249
+ span({
2250
+ text: isConnected ? 'Connected' : 'Disconnected'
2251
+ })
2252
+ ]
2253
+ }),
2254
+ span({
2255
+ text: 'v1.8.3'
2256
+ })
2257
+ ]
2258
+ });
2259
+ panel.appendChild(header);
2260
+ panel.appendChild(contentContainer);
2261
+ panel.appendChild(footer);
2262
+ if (isConnected) onRenderContent(contentContainer);
2263
+ else renderErrorState(contentContainer);
2264
+ return panel;
2265
+ }
2266
+ function renderErrorState(container) {
2267
+ clearElement(container);
2268
+ const errorState = renderer_div({
2269
+ className: styles_panel_module.errorState,
2270
+ children: [
2271
+ (()=>{
2272
+ const iconWrap = renderer_div({
2273
+ className: styles_panel_module.errorIcon
2274
+ });
2275
+ iconWrap.appendChild(createSvgElement(WARNING_ICON, {
2276
+ width: 48,
2277
+ height: 48
2278
+ }));
2279
+ return iconWrap;
2280
+ })(),
2281
+ renderer_div({
2282
+ className: styles_panel_module.errorTitle,
2283
+ text: 'Store Not Found'
2284
+ }),
2285
+ renderer_div({
2286
+ className: styles_panel_module.errorMessage,
2287
+ text: 'c15t consent manager is not initialized. Make sure you have set up the ConsentManagerProvider in your app.'
2288
+ })
2289
+ ]
2290
+ });
2291
+ container.appendChild(errorState);
2292
+ }
2293
+ function openPanel() {
2294
+ if (panelElement || isAnimatingOut) return;
2295
+ floatingButton.style.display = 'none';
2296
+ backdropElement = renderer_div({
2297
+ className: `${styles_panel_module.backdrop} ${styles_animations_module.animateFadeIn}`,
2298
+ onClick: ()=>closePanel()
2299
+ });
2300
+ panelElement = createPanelElement();
2301
+ container.appendChild(backdropElement);
2302
+ container.appendChild(panelElement);
2303
+ }
2304
+ function closePanel() {
2305
+ if (!panelElement || isAnimatingOut) return;
2306
+ isAnimatingOut = true;
2307
+ if (backdropElement) {
2308
+ if (styles_animations_module.animateFadeIn) backdropElement.classList.remove(styles_animations_module.animateFadeIn);
2309
+ if (styles_animations_module.animateFadeOut) backdropElement.classList.add(styles_animations_module.animateFadeOut);
2310
+ }
2311
+ if (styles_animations_module.animateEnter) panelElement.classList.remove(styles_animations_module.animateEnter);
2312
+ if (styles_animations_module.animateExit) panelElement.classList.add(styles_animations_module.animateExit);
2313
+ panelElement.addEventListener('animationend', ()=>{
2314
+ if (backdropElement) {
2315
+ backdropElement.remove();
2316
+ backdropElement = null;
2317
+ }
2318
+ if (panelElement) {
2319
+ panelElement.remove();
2320
+ panelElement = null;
2321
+ }
2322
+ contentContainer = null;
2323
+ isAnimatingOut = false;
2324
+ floatingButton.style.display = '';
2325
+ stateManager.setOpen(false);
2326
+ }, {
2327
+ once: true
2328
+ });
2329
+ }
2330
+ function update() {
2331
+ const state = stateManager.getState();
2332
+ if (!state.isOpen || panelElement || isAnimatingOut) {
2333
+ if (!state.isOpen && panelElement && !isAnimatingOut) closePanel();
2334
+ } else openPanel();
2335
+ if (contentContainer && storeConnector.isConnected()) onRenderContent(contentContainer);
2336
+ }
2337
+ const unsubscribeState = stateManager.subscribe(()=>{
2338
+ update();
2339
+ });
2340
+ const unsubscribeStore = storeConnector.subscribe(()=>{
2341
+ if (contentContainer) if (storeConnector.isConnected()) onRenderContent(contentContainer);
2342
+ else renderErrorState(contentContainer);
2343
+ });
2344
+ container.appendChild(floatingButton);
2345
+ removePortal = createPortal(container);
2346
+ return {
2347
+ element: container,
2348
+ floatingButton,
2349
+ update,
2350
+ destroy: ()=>{
2351
+ unsubscribeState();
2352
+ unsubscribeStore();
2353
+ if (dropdownMenu) {
2354
+ dropdownMenu.destroy();
2355
+ dropdownMenu = null;
2356
+ }
2357
+ if (draggable) {
2358
+ draggable.destroy();
2359
+ draggable = null;
2360
+ }
2361
+ if (removePortal) {
2362
+ removePortal();
2363
+ removePortal = null;
2364
+ }
2365
+ }
2366
+ };
2367
+ }
2368
+ var tabs_module = __webpack_require__("../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].use[2]!./src/styles/tabs.module.css");
2369
+ var tabs_module_options = {};
2370
+ tabs_module_options.styleTagTransform = styleTagTransform_default();
2371
+ tabs_module_options.setAttributes = setAttributesWithoutAttributes_default();
2372
+ tabs_module_options.insert = insertBySelector_default().bind(null, "head");
2373
+ tabs_module_options.domAPI = styleDomAPI_default();
2374
+ tabs_module_options.insertStyleElement = insertStyleElement_default();
2375
+ injectStylesIntoStyleTag_default()(tabs_module.A, tabs_module_options);
2376
+ const styles_tabs_module = tabs_module.A && tabs_module.A.locals ? tabs_module.A.locals : void 0;
2377
+ const CONSENTS_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2378
+ <rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect>
2379
+ <path d="M7 11V7a5 5 0 0 1 10 0v4"></path>
2380
+ </svg>`;
2381
+ const LOCATION_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2382
+ <circle cx="12" cy="12" r="10"></circle>
2383
+ <line x1="2" y1="12" x2="22" y2="12"></line>
2384
+ <path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path>
2385
+ </svg>`;
2386
+ const SCRIPTS_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2387
+ <polyline points="16 18 22 12 16 6"></polyline>
2388
+ <polyline points="8 6 2 12 8 18"></polyline>
2389
+ </svg>`;
2390
+ const ACTIONS_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2391
+ <path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"></path>
2392
+ <circle cx="12" cy="12" r="3"></circle>
2393
+ </svg>`;
2394
+ const IAB_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2395
+ <path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path>
2396
+ <path d="m9 12 2 2 4-4"></path>
2397
+ </svg>`;
2398
+ const EVENTS_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2399
+ <path d="M12 20h9"></path>
2400
+ <path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z"></path>
2401
+ </svg>`;
2402
+ const TABS = [
2403
+ {
2404
+ id: 'location',
2405
+ label: 'Location',
2406
+ icon: LOCATION_ICON
2407
+ },
2408
+ {
2409
+ id: 'consents',
2410
+ label: 'Consents',
2411
+ icon: CONSENTS_ICON
2412
+ },
2413
+ {
2414
+ id: "scripts",
2415
+ label: 'Scripts',
2416
+ icon: SCRIPTS_ICON
2417
+ },
2418
+ {
2419
+ id: 'iab',
2420
+ label: 'IAB',
2421
+ icon: IAB_ICON
2422
+ },
2423
+ {
2424
+ id: 'actions',
2425
+ label: 'Actions',
2426
+ icon: ACTIONS_ICON
2427
+ },
2428
+ {
2429
+ id: 'events',
2430
+ label: 'Events',
2431
+ icon: EVENTS_ICON
2432
+ }
2433
+ ];
2434
+ function tabs_createTabs(options) {
2435
+ const { onTabChange, disabledTabs = [] } = options;
2436
+ let activeTab = options.activeTab;
2437
+ const tabButtons = new Map();
2438
+ const tabList = renderer_div({
2439
+ className: styles_tabs_module.tabList,
2440
+ role: 'tablist',
2441
+ ariaLabel: 'DevTools tabs'
2442
+ });
2443
+ for (const tab of TABS){
2444
+ const isActive = tab.id === activeTab;
2445
+ const isDisabled = disabledTabs.includes(tab.id);
2446
+ const tabButton = renderer_button({
2447
+ className: `${styles_tabs_module.tab} ${isActive ? styles_tabs_module.tabActive : ''} ${isDisabled ? styles_tabs_module.tabDisabled : ''}`,
2448
+ role: 'tab',
2449
+ ariaSelected: isActive ? 'true' : 'false',
2450
+ ariaControls: `panel-${tab.id}`,
2451
+ ariaDisabled: isDisabled ? 'true' : void 0,
2452
+ tabIndex: isActive ? 0 : -1,
2453
+ disabled: isDisabled,
2454
+ onClick: ()=>{
2455
+ if (!isDisabled) {
2456
+ setActiveTab(tab.id);
2457
+ onTabChange(tab.id);
2458
+ }
2459
+ },
2460
+ onKeyDown: (e)=>handleKeyDown(e, tab.id)
2461
+ });
2462
+ const iconWrapper = renderer_div({
2463
+ className: styles_tabs_module.tabIcon
2464
+ });
2465
+ iconWrapper.appendChild(createSvgElement(tab.icon, {
2466
+ width: 14,
2467
+ height: 14
2468
+ }));
2469
+ tabButton.appendChild(iconWrapper);
2470
+ tabButton.appendChild(document.createTextNode(tab.label));
2471
+ tabButtons.set(tab.id, tabButton);
2472
+ tabList.appendChild(tabButton);
2473
+ }
2474
+ function handleKeyDown(e, currentTab) {
2475
+ const tabIds = TABS.map((t)=>t.id);
2476
+ const enabledTabIds = tabIds.filter((id)=>!disabledTabs.includes(id));
2477
+ const currentIndex = enabledTabIds.indexOf(currentTab);
2478
+ let newIndex = currentIndex;
2479
+ switch(e.key){
2480
+ case 'ArrowLeft':
2481
+ newIndex = currentIndex > 0 ? currentIndex - 1 : enabledTabIds.length - 1;
2482
+ break;
2483
+ case 'ArrowRight':
2484
+ newIndex = currentIndex < enabledTabIds.length - 1 ? currentIndex + 1 : 0;
2485
+ break;
2486
+ case 'Home':
2487
+ newIndex = 0;
2488
+ break;
2489
+ case 'End':
2490
+ newIndex = enabledTabIds.length - 1;
2491
+ break;
2492
+ default:
2493
+ return;
2494
+ }
2495
+ e.preventDefault();
2496
+ const newTab = enabledTabIds[newIndex];
2497
+ if (newTab) {
2498
+ setActiveTab(newTab);
2499
+ onTabChange(newTab);
2500
+ tabButtons.get(newTab)?.focus();
2501
+ }
2502
+ }
2503
+ function setActiveTab(tab) {
2504
+ activeTab = tab;
2505
+ for (const [tabId, tabButton] of tabButtons){
2506
+ const isActive = tabId === tab;
2507
+ if (styles_tabs_module.tabActive) tabButton.classList.toggle(styles_tabs_module.tabActive, isActive);
2508
+ tabButton.setAttribute('aria-selected', isActive ? 'true' : 'false');
2509
+ tabButton.tabIndex = isActive ? 0 : -1;
2510
+ }
2511
+ }
2512
+ return {
2513
+ element: tabList,
2514
+ setActiveTab,
2515
+ destroy: ()=>{
2516
+ tabButtons.clear();
2517
+ }
2518
+ };
2519
+ }
2520
+ var components_module = __webpack_require__("../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].use[2]!./src/styles/components.module.css");
2521
+ var components_module_options = {};
2522
+ components_module_options.styleTagTransform = styleTagTransform_default();
2523
+ components_module_options.setAttributes = setAttributesWithoutAttributes_default();
2524
+ components_module_options.insert = insertBySelector_default().bind(null, "head");
2525
+ components_module_options.domAPI = styleDomAPI_default();
2526
+ components_module_options.insertStyleElement = insertStyleElement_default();
2527
+ injectStylesIntoStyleTag_default()(components_module.A, components_module_options);
2528
+ const styles_components_module = components_module.A && components_module.A.locals ? components_module.A.locals : void 0;
2529
+ function createToggle(options) {
2530
+ const { checked, onChange, ariaLabel, disabled = false } = options;
2531
+ const toggle = renderer_button({
2532
+ className: `${styles_components_module.toggle} ${checked ? styles_components_module.toggleActive : ''}`,
2533
+ role: 'switch',
2534
+ ariaLabel,
2535
+ ariaChecked: checked ? 'true' : 'false',
2536
+ disabled,
2537
+ onClick: ()=>{
2538
+ if (!disabled) onChange(!checked);
2539
+ }
2540
+ });
2541
+ const thumb = renderer_div({
2542
+ className: styles_components_module.toggleThumb
2543
+ });
2544
+ toggle.appendChild(thumb);
2545
+ return toggle;
2546
+ }
2547
+ function createBadge(options) {
2548
+ const { text, variant = 'neutral' } = options;
2549
+ const variantClass = {
2550
+ success: styles_components_module.badgeSuccess,
2551
+ error: styles_components_module.badgeError,
2552
+ warning: styles_components_module.badgeWarning,
2553
+ info: styles_components_module.badgeInfo,
2554
+ neutral: styles_components_module.badgeNeutral
2555
+ }[variant];
2556
+ return span({
2557
+ className: `${styles_components_module.badge} ${variantClass}`,
2558
+ text
2559
+ });
2560
+ }
2561
+ function createButton(options) {
2562
+ const { text, variant = 'default', small = false, icon, disabled = false, onClick } = options;
2563
+ const variantClass = {
2564
+ default: '',
2565
+ primary: styles_components_module.btnPrimary,
2566
+ danger: styles_components_module.btnDanger
2567
+ }[variant];
2568
+ const sizeClass = small ? styles_components_module.btnSmall : '';
2569
+ const btn = renderer_button({
2570
+ className: `${styles_components_module.btn} ${variantClass} ${sizeClass}`.trim(),
2571
+ disabled,
2572
+ onClick
2573
+ });
2574
+ if (icon) {
2575
+ const iconWrapper = renderer_div({
2576
+ className: styles_components_module.btnIcon
2577
+ });
2578
+ iconWrapper.appendChild(createSvgElement(icon, {
2579
+ width: 14,
2580
+ height: 14
2581
+ }));
2582
+ btn.appendChild(iconWrapper);
2583
+ }
2584
+ btn.appendChild(document.createTextNode(text));
2585
+ return btn;
2586
+ }
2587
+ function createListItem(options) {
2588
+ const { title, description, actions = [] } = options;
2589
+ const content = renderer_div({
2590
+ className: styles_components_module.listItemContent,
2591
+ children: [
2592
+ span({
2593
+ className: styles_components_module.listItemTitle,
2594
+ text: title
2595
+ }),
2596
+ description ? span({
2597
+ className: styles_components_module.listItemDescription,
2598
+ text: description
2599
+ }) : null
2600
+ ]
2601
+ });
2602
+ const actionsContainer = renderer_div({
2603
+ className: styles_components_module.listItemActions,
2604
+ children: actions
2605
+ });
2606
+ return renderer_div({
2607
+ className: styles_components_module.listItem,
2608
+ children: [
2609
+ content,
2610
+ actionsContainer
2611
+ ]
2612
+ });
2613
+ }
2614
+ function createSection(options) {
2615
+ const { title, actions = [], children } = options;
2616
+ const header = renderer_div({
2617
+ className: styles_components_module.sectionHeader,
2618
+ children: [
2619
+ span({
2620
+ className: styles_components_module.sectionTitle,
2621
+ text: title
2622
+ }),
2623
+ ...actions
2624
+ ]
2625
+ });
2626
+ return renderer_div({
2627
+ className: styles_components_module.section,
2628
+ children: [
2629
+ header,
2630
+ ...children
2631
+ ]
2632
+ });
2633
+ }
2634
+ function createInfoRow(options) {
2635
+ const { label, value } = options;
2636
+ return renderer_div({
2637
+ className: styles_components_module.infoRow,
2638
+ children: [
2639
+ span({
2640
+ className: styles_components_module.infoLabel,
2641
+ text: label
2642
+ }),
2643
+ span({
2644
+ className: styles_components_module.infoValue,
2645
+ text: value
2646
+ })
2647
+ ]
2648
+ });
2649
+ }
2650
+ function createEmptyState(options) {
2651
+ const { icon, text } = options;
2652
+ const children = [];
2653
+ if (icon) {
2654
+ const iconWrapper = renderer_div({
2655
+ className: styles_components_module.emptyStateIcon
2656
+ });
2657
+ iconWrapper.appendChild(createSvgElement(icon, {
2658
+ width: 32,
2659
+ height: 32
2660
+ }));
2661
+ children.push(iconWrapper);
2662
+ }
2663
+ children.push(span({
2664
+ className: styles_components_module.emptyStateText,
2665
+ text
2666
+ }));
2667
+ return renderer_div({
2668
+ className: styles_components_module.emptyState,
2669
+ children: children.filter(Boolean)
2670
+ });
2671
+ }
2672
+ function createGrid(options) {
2673
+ const { columns = 2, children } = options;
2674
+ const colsClass = 3 === columns ? styles_components_module.gridCols3 : styles_components_module.gridCols2;
2675
+ return renderer_div({
2676
+ className: `${styles_components_module.grid} ${colsClass}`,
2677
+ children
2678
+ });
2679
+ }
2680
+ function createGridCard(options) {
2681
+ const { title, action } = options;
2682
+ const children = [
2683
+ span({
2684
+ className: styles_components_module.gridCardTitle,
2685
+ text: title
2686
+ })
2687
+ ];
2688
+ if (action) children.push(action);
2689
+ return renderer_div({
2690
+ className: styles_components_module.gridCard,
2691
+ children
2692
+ });
2693
+ }
2694
+ const REFRESH_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2695
+ <path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path>
2696
+ <path d="M21 3v5h-5"></path>
2697
+ <path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path>
2698
+ <path d="M8 16H3v5"></path>
2699
+ </svg>`;
2700
+ const TRASH_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2701
+ <path d="M3 6h18"></path>
2702
+ <path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path>
2703
+ <path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path>
2704
+ </svg>`;
2705
+ const COPY_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2706
+ <rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect>
2707
+ <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path>
2708
+ </svg>`;
2709
+ const actions_EYE_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2710
+ <path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"></path>
2711
+ <circle cx="12" cy="12" r="3"></circle>
2712
+ </svg>`;
2713
+ const SETTINGS_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2714
+ <path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"></path>
2715
+ <circle cx="12" cy="12" r="3"></circle>
2716
+ </svg>`;
2717
+ const TERMINAL_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2718
+ <polyline points="4 17 10 11 4 5"></polyline>
2719
+ <line x1="12" y1="19" x2="20" y2="19"></line>
2720
+ </svg>`;
2721
+ function actions_renderActionsPanel(container, options) {
2722
+ const { getState, onResetConsents, onRefetchBanner, onShowBanner, onOpenPreferences, onCopyState } = options;
2723
+ clearElement(container);
2724
+ const state = getState();
2725
+ if (!state) return void container.appendChild(renderer_div({
2726
+ style: {
2727
+ padding: '24px',
2728
+ textAlign: 'center',
2729
+ color: 'var(--c15t-text-muted)',
2730
+ fontSize: 'var(--c15t-devtools-font-size-sm)'
2731
+ },
2732
+ text: 'Store not connected'
2733
+ }));
2734
+ const actionCards = [
2735
+ createActionCard({
2736
+ icon: actions_EYE_ICON,
2737
+ label: 'Show Banner',
2738
+ onClick: onShowBanner
2739
+ }),
2740
+ createActionCard({
2741
+ icon: SETTINGS_ICON,
2742
+ label: 'Preferences',
2743
+ onClick: onOpenPreferences
2744
+ }),
2745
+ createActionCard({
2746
+ icon: REFRESH_ICON,
2747
+ label: 'Re-fetch',
2748
+ onClick: onRefetchBanner
2749
+ }),
2750
+ createActionCard({
2751
+ icon: COPY_ICON,
2752
+ label: 'Copy State',
2753
+ onClick: onCopyState
2754
+ })
2755
+ ];
2756
+ const grid = createGrid({
2757
+ columns: 2,
2758
+ children: actionCards
2759
+ });
2760
+ container.appendChild(grid);
2761
+ const dangerZone = renderer_div({
2762
+ style: {
2763
+ padding: '12px 16px',
2764
+ borderTop: '1px solid var(--c15t-border)'
2765
+ },
2766
+ children: [
2767
+ createButton({
2768
+ text: 'Reset All Consents',
2769
+ icon: TRASH_ICON,
2770
+ variant: 'danger',
2771
+ onClick: onResetConsents
2772
+ })
2773
+ ]
2774
+ });
2775
+ container.appendChild(dangerZone);
2776
+ const consoleSection = renderer_div({
2777
+ style: {
2778
+ padding: '12px 16px',
2779
+ borderTop: '1px solid var(--c15t-border)'
2780
+ },
2781
+ children: [
2782
+ renderer_div({
2783
+ style: {
2784
+ display: 'flex',
2785
+ alignItems: 'center',
2786
+ gap: '6px',
2787
+ marginBottom: '8px'
2788
+ },
2789
+ children: [
2790
+ createIconWrapper(TERMINAL_ICON, 14),
2791
+ span({
2792
+ style: {
2793
+ fontSize: 'var(--c15t-devtools-font-size-xs)',
2794
+ fontWeight: '600',
2795
+ color: 'var(--c15t-text)'
2796
+ },
2797
+ text: 'Console API'
2798
+ })
2799
+ ]
2800
+ }),
2801
+ renderer_div({
2802
+ style: {
2803
+ display: 'flex',
2804
+ flexDirection: 'column',
2805
+ gap: '4px',
2806
+ padding: '8px',
2807
+ borderRadius: 'var(--c15t-radius-md)',
2808
+ backgroundColor: 'var(--c15t-surface-muted)',
2809
+ fontFamily: 'ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',
2810
+ fontSize: '11px',
2811
+ color: 'var(--c15t-text-muted)'
2812
+ },
2813
+ children: [
2814
+ span({
2815
+ text: `window.${getNamespace(state)}.getState()`
2816
+ }),
2817
+ span({
2818
+ text: 'window.__c15tDevTools.open()'
2819
+ })
2820
+ ]
2821
+ })
2822
+ ]
2823
+ });
2824
+ container.appendChild(consoleSection);
2825
+ }
2826
+ function createActionCard(options) {
2827
+ const { icon, label, onClick } = options;
2828
+ const card = renderer_div({
2829
+ className: styles_components_module.gridCard ?? '',
2830
+ style: {
2831
+ display: 'flex',
2832
+ flexDirection: 'column',
2833
+ alignItems: 'center',
2834
+ justifyContent: 'center',
2835
+ gap: '6px',
2836
+ padding: '16px 8px',
2837
+ cursor: 'pointer',
2838
+ transition: 'background-color var(--c15t-duration-fast) var(--c15t-easing)'
2839
+ },
2840
+ children: [
2841
+ createIconWrapper(icon, 20),
2842
+ span({
2843
+ style: {
2844
+ fontSize: 'var(--c15t-devtools-font-size-xs)',
2845
+ fontWeight: '500',
2846
+ color: 'var(--c15t-text)',
2847
+ textAlign: 'center'
2848
+ },
2849
+ text: label
2850
+ })
2851
+ ]
2852
+ });
2853
+ card.addEventListener('click', onClick);
2854
+ card.addEventListener('mouseenter', ()=>{
2855
+ card.style.backgroundColor = 'var(--c15t-surface-hover)';
2856
+ });
2857
+ card.addEventListener('mouseleave', ()=>{
2858
+ card.style.backgroundColor = '';
2859
+ });
2860
+ return card;
2861
+ }
2862
+ function createIconWrapper(icon, size) {
2863
+ const wrapper = renderer_div({
2864
+ style: {
2865
+ display: 'flex',
2866
+ alignItems: 'center',
2867
+ justifyContent: 'center',
2868
+ color: 'var(--c15t-text-muted)'
2869
+ }
2870
+ });
2871
+ wrapper.appendChild(createSvgElement(icon, {
2872
+ width: size,
2873
+ height: size
2874
+ }));
2875
+ return wrapper;
2876
+ }
2877
+ function getNamespace(state) {
2878
+ return state.config?.meta?.namespace || 'c15tStore';
2879
+ }
2880
+ function consents_renderConsentsPanel(container, options) {
2881
+ const { getState, onConsentChange, onSave, onAcceptAll, onRejectAll, onReset } = options;
2882
+ clearElement(container);
2883
+ const state = getState();
2884
+ if (!state) return void container.appendChild(renderer_div({
2885
+ style: {
2886
+ padding: '24px',
2887
+ textAlign: 'center',
2888
+ color: 'var(--c15t-text-muted)',
2889
+ fontSize: 'var(--c15t-devtools-font-size-sm)'
2890
+ },
2891
+ text: 'Store not connected'
2892
+ }));
2893
+ const isIabMode = 'iab' === state.model;
2894
+ const savedConsents = state.consents || {};
2895
+ const selectedConsents = state.selectedConsents || {};
2896
+ const displayConsents = {
2897
+ ...savedConsents
2898
+ };
2899
+ for (const [key, value] of Object.entries(selectedConsents))displayConsents[key] = value;
2900
+ const hasUnsavedChanges = !isIabMode && Object.entries(displayConsents).some(([key, value])=>savedConsents[key] !== value);
2901
+ const consentTypes = state.consentTypes || [];
2902
+ const consentTypeMap = new Map(consentTypes.map((ct)=>[
2903
+ ct.name,
2904
+ ct
2905
+ ]));
2906
+ const consentEntries = Object.entries(displayConsents);
2907
+ if (0 === consentEntries.length) container.appendChild(renderer_div({
2908
+ style: {
2909
+ padding: '24px',
2910
+ textAlign: 'center',
2911
+ color: 'var(--c15t-devtools-text-muted)',
2912
+ fontSize: 'var(--c15t-devtools-font-size-sm)'
2913
+ },
2914
+ text: 'No consents configured'
2915
+ }));
2916
+ else {
2917
+ if (isIabMode) {
2918
+ const iabNotice = renderer_div({
2919
+ style: {
2920
+ padding: '8px 12px',
2921
+ margin: '0 0 8px',
2922
+ backgroundColor: 'var(--c15t-devtools-badge-info-bg)',
2923
+ borderRadius: '4px',
2924
+ fontSize: 'var(--c15t-devtools-font-size-xs)',
2925
+ color: 'var(--c15t-devtools-badge-info)'
2926
+ },
2927
+ text: 'IAB TCF mode: Consents are managed via the IAB framework'
2928
+ });
2929
+ container.appendChild(iabNotice);
2930
+ }
2931
+ const gridCards = [];
2932
+ for (const [name, value] of consentEntries){
2933
+ const consentType = consentTypeMap.get(name);
2934
+ const isNecessary = 'necessary' === name;
2935
+ const displayName = consentType?.name || name;
2936
+ const isSaved = savedConsents[name] === value;
2937
+ const toggle = createToggle({
2938
+ checked: Boolean(value),
2939
+ disabled: isNecessary || isIabMode,
2940
+ ariaLabel: `Toggle ${displayName} consent`,
2941
+ onChange: (newValue)=>onConsentChange(String(name), newValue)
2942
+ });
2943
+ const card = createGridCard({
2944
+ title: formatConsentName(displayName) + (isIabMode || isSaved ? '' : ' •'),
2945
+ action: toggle
2946
+ });
2947
+ gridCards.push(card);
2948
+ }
2949
+ const grid = createGrid({
2950
+ columns: 2,
2951
+ children: gridCards
2952
+ });
2953
+ container.appendChild(grid);
2954
+ }
2955
+ if (isIabMode) {
2956
+ const footer = renderer_div({
2957
+ style: {
2958
+ display: 'flex',
2959
+ alignItems: 'center',
2960
+ justifyContent: 'flex-end',
2961
+ padding: '12px 16px',
2962
+ marginTop: 'auto',
2963
+ borderTop: '1px solid var(--c15t-border)',
2964
+ backgroundColor: 'var(--c15t-surface)'
2965
+ },
2966
+ children: [
2967
+ createButton({
2968
+ text: 'Reset All',
2969
+ variant: 'danger',
2970
+ small: true,
2971
+ onClick: onReset
2972
+ })
2973
+ ]
2974
+ });
2975
+ container.appendChild(footer);
2976
+ return;
2977
+ }
2978
+ const footer = renderer_div({
2979
+ style: {
2980
+ display: 'flex',
2981
+ alignItems: 'center',
2982
+ justifyContent: 'space-between',
2983
+ padding: '12px 16px',
2984
+ marginTop: 'auto',
2985
+ borderTop: '1px solid var(--c15t-border)',
2986
+ backgroundColor: hasUnsavedChanges ? 'var(--c15t-devtools-badge-warning-bg)' : 'var(--c15t-surface)'
2987
+ },
2988
+ children: [
2989
+ renderer_div({
2990
+ style: {
2991
+ display: 'flex',
2992
+ gap: '6px'
2993
+ },
2994
+ children: [
2995
+ createButton({
2996
+ text: 'All',
2997
+ variant: 'primary',
2998
+ small: true,
2999
+ onClick: onAcceptAll
3000
+ }),
3001
+ createButton({
3002
+ text: 'None',
3003
+ variant: 'default',
3004
+ small: true,
3005
+ onClick: onRejectAll
3006
+ }),
3007
+ createButton({
3008
+ text: 'Reset',
3009
+ variant: 'danger',
3010
+ small: true,
3011
+ onClick: onReset
3012
+ })
3013
+ ]
3014
+ }),
3015
+ hasUnsavedChanges ? renderer_div({
3016
+ style: {
3017
+ display: 'flex',
3018
+ alignItems: 'center',
3019
+ gap: '8px'
3020
+ },
3021
+ children: [
3022
+ span({
3023
+ style: {
3024
+ fontSize: 'var(--c15t-devtools-font-size-xs)',
3025
+ color: 'var(--c15t-devtools-badge-warning)'
3026
+ },
3027
+ text: 'Unsaved'
3028
+ }),
3029
+ createButton({
3030
+ text: 'Save',
3031
+ variant: 'primary',
3032
+ small: true,
3033
+ onClick: onSave
3034
+ })
3035
+ ]
3036
+ }) : span({
3037
+ style: {
3038
+ fontSize: 'var(--c15t-devtools-font-size-xs)',
3039
+ color: 'var(--c15t-text-muted)'
3040
+ },
3041
+ text: 'No changes'
3042
+ })
3043
+ ]
3044
+ });
3045
+ container.appendChild(footer);
3046
+ }
3047
+ function formatConsentName(name) {
3048
+ return name.replace(/_/g, ' ').replace(/\b\w/g, (l)=>l.toUpperCase());
3049
+ }
3050
+ function events_renderEventsPanel(container, options) {
3051
+ const { getEvents, onClear } = options;
3052
+ clearElement(container);
3053
+ const events = getEvents();
3054
+ const header = renderer_div({
3055
+ style: {
3056
+ display: 'flex',
3057
+ alignItems: 'center',
3058
+ justifyContent: 'space-between',
3059
+ padding: '12px 16px 8px'
3060
+ },
3061
+ children: [
3062
+ span({
3063
+ style: {
3064
+ fontSize: 'var(--c15t-devtools-font-size-xs)',
3065
+ fontWeight: '600',
3066
+ color: 'var(--c15t-text-muted)',
3067
+ textTransform: 'uppercase',
3068
+ letterSpacing: '0.5px'
3069
+ },
3070
+ text: `Events (${events.length})`
3071
+ }),
3072
+ createButton({
3073
+ text: 'Clear',
3074
+ small: true,
3075
+ onClick: onClear
3076
+ })
3077
+ ]
3078
+ });
3079
+ container.appendChild(header);
3080
+ const eventList = renderer_div({
3081
+ style: {
3082
+ display: 'flex',
3083
+ flexDirection: 'column',
3084
+ gap: '4px',
3085
+ padding: '0 12px 12px',
3086
+ maxHeight: '400px',
3087
+ overflowY: 'auto'
3088
+ }
3089
+ });
3090
+ if (0 === events.length) {
3091
+ const emptyState = renderer_div({
3092
+ style: {
3093
+ padding: '32px 16px',
3094
+ textAlign: 'center',
3095
+ color: 'var(--c15t-text-muted)',
3096
+ fontSize: 'var(--c15t-devtools-font-size-sm)'
3097
+ },
3098
+ text: 'No events recorded yet'
3099
+ });
3100
+ eventList.appendChild(emptyState);
3101
+ } else for (const event of events){
3102
+ const eventItem = createEventItem(event);
3103
+ eventList.appendChild(eventItem);
3104
+ }
3105
+ container.appendChild(eventList);
3106
+ }
3107
+ function createEventItem(event) {
3108
+ const time = formatTime(event.timestamp);
3109
+ const icon = getEventIcon(event.type);
3110
+ const color = getEventColor(event.type);
3111
+ return renderer_div({
3112
+ className: styles_components_module.gridCard ?? '',
3113
+ style: {
3114
+ display: 'flex',
3115
+ alignItems: 'center',
3116
+ gap: '8px',
3117
+ padding: '6px 10px',
3118
+ fontSize: 'var(--c15t-devtools-font-size-xs)'
3119
+ },
3120
+ children: [
3121
+ span({
3122
+ style: {
3123
+ color,
3124
+ fontSize: '8px',
3125
+ lineHeight: '1'
3126
+ },
3127
+ text: icon
3128
+ }),
3129
+ span({
3130
+ style: {
3131
+ color: 'var(--c15t-text-muted)',
3132
+ fontFamily: 'monospace',
3133
+ fontSize: '10px',
3134
+ flexShrink: '0'
3135
+ },
3136
+ text: time
3137
+ }),
3138
+ span({
3139
+ style: {
3140
+ color: 'var(--c15t-text)',
3141
+ flex: '1'
3142
+ },
3143
+ text: event.message
3144
+ })
3145
+ ]
3146
+ });
3147
+ }
3148
+ function formatTime(timestamp) {
3149
+ const date = new Date(timestamp);
3150
+ return date.toLocaleTimeString('en-US', {
3151
+ hour12: false,
3152
+ hour: '2-digit',
3153
+ minute: '2-digit',
3154
+ second: '2-digit'
3155
+ });
3156
+ }
3157
+ function getEventIcon(type) {
3158
+ switch(type){
3159
+ case 'consent_set':
3160
+ case 'consent_save':
3161
+ return '●';
3162
+ case 'consent_reset':
3163
+ return '○';
3164
+ case 'error':
3165
+ return '✕';
3166
+ case 'info':
3167
+ default:
3168
+ return '○';
3169
+ }
3170
+ }
3171
+ function getEventColor(type) {
3172
+ switch(type){
3173
+ case 'consent_set':
3174
+ case 'consent_save':
3175
+ return 'var(--c15t-devtools-badge-success, #10b981)';
3176
+ case 'consent_reset':
3177
+ return 'var(--c15t-devtools-badge-warning, #f59e0b)';
3178
+ case 'error':
3179
+ return 'var(--c15t-devtools-badge-error, #ef4444)';
3180
+ case 'info':
3181
+ default:
3182
+ return 'var(--c15t-text-muted)';
3183
+ }
3184
+ }
3185
+ function iab_renderIabPanel(container, options) {
3186
+ const { getState, onReset } = options;
3187
+ clearElement(container);
3188
+ const state = getState();
3189
+ if (!state) return void container.appendChild(renderer_div({
3190
+ style: {
3191
+ padding: '24px',
3192
+ textAlign: 'center',
3193
+ color: 'var(--c15t-text-muted)',
3194
+ fontSize: 'var(--c15t-devtools-font-size-sm)'
3195
+ },
3196
+ text: 'Store not connected'
3197
+ }));
3198
+ if ('iab' !== state.model) return void container.appendChild(renderer_div({
3199
+ style: {
3200
+ padding: '24px',
3201
+ textAlign: 'center',
3202
+ color: 'var(--c15t-text-muted)',
3203
+ fontSize: 'var(--c15t-devtools-font-size-sm)'
3204
+ },
3205
+ text: 'IAB TCF mode is not configured'
3206
+ }));
3207
+ const iabState = state.iab;
3208
+ if (!iabState) return void container.appendChild(renderer_div({
3209
+ style: {
3210
+ padding: '24px',
3211
+ textAlign: 'center',
3212
+ color: 'var(--c15t-text-muted)',
3213
+ fontSize: 'var(--c15t-devtools-font-size-sm)'
3214
+ },
3215
+ text: 'IAB state not available'
3216
+ }));
3217
+ const tcString = iabState.tcString;
3218
+ const tcStringSection = createSection({
3219
+ title: 'TC String',
3220
+ actions: tcString ? [
3221
+ createButton({
3222
+ text: 'Copy',
3223
+ small: true,
3224
+ onClick: ()=>{
3225
+ navigator.clipboard.writeText(tcString);
3226
+ }
3227
+ })
3228
+ ] : [],
3229
+ children: [
3230
+ renderer_div({
3231
+ style: {
3232
+ padding: '8px',
3233
+ backgroundColor: 'var(--c15t-surface-muted)',
3234
+ borderRadius: '4px',
3235
+ fontSize: 'var(--c15t-devtools-font-size-xs)',
3236
+ fontFamily: 'monospace',
3237
+ wordBreak: 'break-all',
3238
+ maxHeight: '80px',
3239
+ overflowY: 'auto',
3240
+ color: tcString ? 'var(--c15t-text)' : 'var(--c15t-text-muted)'
3241
+ },
3242
+ text: tcString || 'No TC String generated yet'
3243
+ })
3244
+ ]
3245
+ });
3246
+ container.appendChild(tcStringSection);
3247
+ const gvl = iabState.gvl;
3248
+ const purposeConsents = iabState.purposeConsents || {};
3249
+ const purposes = gvl?.purposes || {};
3250
+ const purposeEntries = Object.entries(purposeConsents);
3251
+ if (purposeEntries.length > 0) {
3252
+ const purposeList = renderer_div({
3253
+ style: {
3254
+ display: 'flex',
3255
+ flexDirection: 'column',
3256
+ gap: '4px',
3257
+ maxHeight: '120px',
3258
+ overflowY: 'auto'
3259
+ }
3260
+ });
3261
+ for (const [purposeId, consent] of purposeEntries){
3262
+ const purposeInfo = purposes[purposeId];
3263
+ const purposeName = purposeInfo?.name || `Purpose ${purposeId}`;
3264
+ purposeList.appendChild(createPurposeRow(purposeId, purposeName, Boolean(consent)));
3265
+ }
3266
+ const purposesSection = createSection({
3267
+ title: `Purposes (${purposeEntries.length})`,
3268
+ children: [
3269
+ purposeList
3270
+ ]
3271
+ });
3272
+ container.appendChild(purposesSection);
3273
+ }
3274
+ const specialFeatureOptIns = iabState.specialFeatureOptIns || {};
3275
+ const specialFeatures = gvl?.specialFeatures || {};
3276
+ const specialFeatureEntries = Object.entries(specialFeatureOptIns);
3277
+ if (specialFeatureEntries.length > 0) {
3278
+ const specialFeatureList = renderer_div({
3279
+ style: {
3280
+ display: 'flex',
3281
+ flexDirection: 'column',
3282
+ gap: '4px',
3283
+ maxHeight: '100px',
3284
+ overflowY: 'auto'
3285
+ }
3286
+ });
3287
+ for (const [featureId, optIn] of specialFeatureEntries){
3288
+ const featureInfo = specialFeatures[featureId];
3289
+ const featureName = featureInfo?.name || `Special Feature ${featureId}`;
3290
+ specialFeatureList.appendChild(createPurposeRow(featureId, featureName, Boolean(optIn)));
3291
+ }
3292
+ const specialFeaturesSection = createSection({
3293
+ title: `Special Features (${specialFeatureEntries.length})`,
3294
+ children: [
3295
+ specialFeatureList
3296
+ ]
3297
+ });
3298
+ container.appendChild(specialFeaturesSection);
3299
+ }
3300
+ const vendorConsents = iabState.vendorConsents || {};
3301
+ const vendors = gvl?.vendors || {};
3302
+ const vendorEntries = Object.entries(vendorConsents);
3303
+ const iabVendors = [];
3304
+ const customVendors = [];
3305
+ for (const [vendorId, consent] of vendorEntries){
3306
+ const vendorInfo = vendors[vendorId];
3307
+ const vendorName = vendorInfo?.name || `Vendor ${vendorId}`;
3308
+ const isIabVendor = void 0 !== vendorInfo;
3309
+ if (isIabVendor) iabVendors.push([
3310
+ vendorId,
3311
+ Boolean(consent),
3312
+ vendorName
3313
+ ]);
3314
+ else customVendors.push([
3315
+ vendorId,
3316
+ Boolean(consent),
3317
+ vendorName
3318
+ ]);
3319
+ }
3320
+ if (iabVendors.length > 0) {
3321
+ const vendorList = renderer_div({
3322
+ style: {
3323
+ display: 'flex',
3324
+ flexDirection: 'column',
3325
+ gap: '4px',
3326
+ maxHeight: '120px',
3327
+ overflowY: 'auto'
3328
+ }
3329
+ });
3330
+ for (const [vendorId, consent, vendorName] of iabVendors)vendorList.appendChild(createVendorRow(vendorId, vendorName, consent, 'iab'));
3331
+ const vendorsSection = createSection({
3332
+ title: `IAB Vendors (${iabVendors.length})`,
3333
+ children: [
3334
+ vendorList
3335
+ ]
3336
+ });
3337
+ container.appendChild(vendorsSection);
3338
+ }
3339
+ if (customVendors.length > 0) {
3340
+ const customVendorList = renderer_div({
3341
+ style: {
3342
+ display: 'flex',
3343
+ flexDirection: 'column',
3344
+ gap: '4px',
3345
+ maxHeight: '100px',
3346
+ overflowY: 'auto'
3347
+ }
3348
+ });
3349
+ for (const [vendorId, consent, vendorName] of customVendors)customVendorList.appendChild(createVendorRow(vendorId, vendorName, consent, 'custom'));
3350
+ const customVendorsSection = createSection({
3351
+ title: `Custom Vendors (${customVendors.length})`,
3352
+ children: [
3353
+ customVendorList
3354
+ ]
3355
+ });
3356
+ container.appendChild(customVendorsSection);
3357
+ }
3358
+ if (0 === purposeEntries.length && 0 === specialFeatureEntries.length && 0 === vendorEntries.length) container.appendChild(renderer_div({
3359
+ style: {
3360
+ padding: '16px',
3361
+ textAlign: 'center',
3362
+ color: 'var(--c15t-text-muted)',
3363
+ fontSize: 'var(--c15t-devtools-font-size-sm)'
3364
+ },
3365
+ text: 'No purposes or vendors configured'
3366
+ }));
3367
+ const footer = renderer_div({
3368
+ style: {
3369
+ display: 'flex',
3370
+ alignItems: 'center',
3371
+ justifyContent: 'flex-end',
3372
+ padding: '12px 16px',
3373
+ marginTop: 'auto',
3374
+ borderTop: '1px solid var(--c15t-border)',
3375
+ backgroundColor: 'var(--c15t-surface)'
3376
+ },
3377
+ children: [
3378
+ createButton({
3379
+ text: 'Reset All',
3380
+ variant: 'danger',
3381
+ small: true,
3382
+ onClick: onReset
3383
+ })
3384
+ ]
3385
+ });
3386
+ container.appendChild(footer);
3387
+ }
3388
+ function createPurposeRow(id, name, consent) {
3389
+ return renderer_div({
3390
+ style: {
3391
+ display: 'flex',
3392
+ alignItems: 'center',
3393
+ justifyContent: 'space-between',
3394
+ padding: '4px 0',
3395
+ fontSize: 'var(--c15t-devtools-font-size-xs)',
3396
+ borderBottom: '1px solid var(--c15t-border)'
3397
+ },
3398
+ children: [
3399
+ span({
3400
+ style: {
3401
+ color: 'var(--c15t-text)',
3402
+ overflow: 'hidden',
3403
+ textOverflow: 'ellipsis',
3404
+ whiteSpace: 'nowrap',
3405
+ flex: '1',
3406
+ marginRight: '8px'
3407
+ },
3408
+ text: `${id}. ${name}`,
3409
+ title: name
3410
+ }),
3411
+ createBadge({
3412
+ text: consent ? '✓' : '✕',
3413
+ variant: consent ? 'success' : 'error'
3414
+ })
3415
+ ]
3416
+ });
3417
+ }
3418
+ function createVendorRow(id, name, consent, type) {
3419
+ return renderer_div({
3420
+ style: {
3421
+ display: 'flex',
3422
+ alignItems: 'center',
3423
+ justifyContent: 'space-between',
3424
+ padding: '4px 0',
3425
+ fontSize: 'var(--c15t-devtools-font-size-xs)',
3426
+ borderBottom: '1px solid var(--c15t-border)'
3427
+ },
3428
+ children: [
3429
+ renderer_div({
3430
+ style: {
3431
+ display: 'flex',
3432
+ alignItems: 'center',
3433
+ gap: '6px',
3434
+ overflow: 'hidden',
3435
+ flex: '1',
3436
+ marginRight: '8px'
3437
+ },
3438
+ children: [
3439
+ 'custom' === type ? span({
3440
+ style: {
3441
+ fontSize: '9px',
3442
+ padding: '1px 4px',
3443
+ backgroundColor: 'var(--c15t-devtools-badge-info-bg)',
3444
+ color: 'var(--c15t-devtools-badge-info)',
3445
+ borderRadius: '2px',
3446
+ flexShrink: '0'
3447
+ },
3448
+ text: 'CUSTOM'
3449
+ }) : null,
3450
+ span({
3451
+ style: {
3452
+ color: 'var(--c15t-text)',
3453
+ overflow: 'hidden',
3454
+ textOverflow: 'ellipsis',
3455
+ whiteSpace: 'nowrap'
3456
+ },
3457
+ text: `${id}. ${truncateText(name, 25)}`,
3458
+ title: name
3459
+ })
3460
+ ].filter(Boolean)
3461
+ }),
3462
+ createBadge({
3463
+ text: consent ? '✓' : '✕',
3464
+ variant: consent ? 'success' : 'error'
3465
+ })
3466
+ ]
3467
+ });
3468
+ }
3469
+ function truncateText(text, maxLength) {
3470
+ if (text.length <= maxLength) return text;
3471
+ return text.slice(0, maxLength - 3) + '...';
3472
+ }
3473
+ function location_renderLocationPanel(container, options) {
3474
+ const { getState, onSetOverrides, onClearOverrides } = options;
3475
+ clearElement(container);
3476
+ const state = getState();
3477
+ if (!state) return void container.appendChild(renderer_div({
3478
+ style: {
3479
+ padding: '24px',
3480
+ textAlign: 'center',
3481
+ color: 'var(--c15t-text-muted)',
3482
+ fontSize: 'var(--c15t-devtools-font-size-sm)'
3483
+ },
3484
+ text: 'Store not connected'
3485
+ }));
3486
+ const locationInfo = state.locationInfo;
3487
+ const overrides = state.overrides;
3488
+ const translationConfig = state.translationConfig;
3489
+ const gridItems = [
3490
+ createCompactInfoCard('Country', locationInfo?.countryCode || '—'),
3491
+ createCompactInfoCard('Region', locationInfo?.regionCode || '—'),
3492
+ createCompactInfoCard('Jurisdiction', locationInfo?.jurisdiction || '—'),
3493
+ createCompactInfoCard('Language', translationConfig?.defaultLanguage || '—')
3494
+ ];
3495
+ if (state.model) gridItems.push(createCompactInfoCard('Model', getModelLabel(state.model)));
3496
+ const locationGrid = createGrid({
3497
+ columns: 2,
3498
+ children: gridItems
3499
+ });
3500
+ container.appendChild(locationGrid);
3501
+ const overrideSection = createSection({
3502
+ title: 'Override Settings',
3503
+ actions: [
3504
+ createButton({
3505
+ text: 'Clear',
3506
+ small: true,
3507
+ onClick: onClearOverrides
3508
+ })
3509
+ ],
3510
+ children: [
3511
+ createOverrideSelect({
3512
+ label: 'Country',
3513
+ selectOptions: COUNTRY_OPTIONS,
3514
+ value: overrides?.country || '',
3515
+ onChange: (value)=>onSetOverrides({
3516
+ country: value || void 0
3517
+ })
3518
+ }),
3519
+ createOverrideInput({
3520
+ label: 'Region',
3521
+ placeholder: 'e.g., CA, NY, BE',
3522
+ value: overrides?.region || '',
3523
+ onChange: (value)=>onSetOverrides({
3524
+ region: value || void 0
3525
+ })
3526
+ }),
3527
+ createOverrideInput({
3528
+ label: 'Language',
3529
+ placeholder: 'e.g., de, fr, en',
3530
+ value: overrides?.language || '',
3531
+ onChange: (value)=>onSetOverrides({
3532
+ language: value || void 0
3533
+ })
3534
+ })
3535
+ ]
3536
+ });
3537
+ container.appendChild(overrideSection);
3538
+ const hasOverrides = overrides && (overrides.country || overrides.region || overrides.language);
3539
+ if (hasOverrides) {
3540
+ const overrideBanner = renderer_div({
3541
+ style: {
3542
+ padding: '8px 16px',
3543
+ backgroundColor: 'var(--c15t-devtools-badge-info-bg)',
3544
+ color: 'var(--c15t-devtools-badge-info)',
3545
+ fontSize: 'var(--c15t-devtools-font-size-xs)',
3546
+ borderTop: '1px solid var(--c15t-devtools-border)'
3547
+ },
3548
+ text: 'Overrides are active. This may affect consent behavior.'
3549
+ });
3550
+ container.appendChild(overrideBanner);
3551
+ }
3552
+ }
3553
+ function createOverrideInput(options) {
3554
+ const { label, placeholder, value, onChange } = options;
3555
+ let debounceTimer = null;
3556
+ const inputField = input({
3557
+ className: `${styles_components_module.input ?? ''} ${styles_components_module.inputSmall ?? ''}`.trim(),
3558
+ placeholder,
3559
+ value,
3560
+ onInput: (e)=>{
3561
+ const target = e.target;
3562
+ if (debounceTimer) clearTimeout(debounceTimer);
3563
+ debounceTimer = setTimeout(()=>{
3564
+ onChange(target.value);
3565
+ }, 500);
3566
+ }
3567
+ });
3568
+ return renderer_div({
3569
+ style: {
3570
+ display: 'flex',
3571
+ alignItems: 'center',
3572
+ justifyContent: 'space-between',
3573
+ gap: '8px',
3574
+ marginBottom: '8px'
3575
+ },
3576
+ children: [
3577
+ renderer_div({
3578
+ style: {
3579
+ fontSize: 'var(--c15t-devtools-font-size-xs)',
3580
+ color: 'var(--c15t-devtools-text-muted)',
3581
+ minWidth: '60px'
3582
+ },
3583
+ text: label
3584
+ }),
3585
+ renderer_div({
3586
+ style: {
3587
+ flex: '1'
3588
+ },
3589
+ children: [
3590
+ inputField
3591
+ ]
3592
+ })
3593
+ ]
3594
+ });
3595
+ }
3596
+ function createOverrideSelect(options) {
3597
+ const { label, selectOptions, value, onChange } = options;
3598
+ const selectField = renderer_select({
3599
+ className: `${styles_components_module.input ?? ''} ${styles_components_module.inputSmall ?? ''}`.trim(),
3600
+ options: selectOptions,
3601
+ selectedValue: value,
3602
+ onChange: (e)=>{
3603
+ const target = e.target;
3604
+ onChange(target.value);
3605
+ }
3606
+ });
3607
+ return renderer_div({
3608
+ style: {
3609
+ display: 'flex',
3610
+ alignItems: 'center',
3611
+ justifyContent: 'space-between',
3612
+ gap: '8px',
3613
+ marginBottom: '8px'
3614
+ },
3615
+ children: [
3616
+ renderer_div({
3617
+ style: {
3618
+ fontSize: 'var(--c15t-devtools-font-size-xs)',
3619
+ color: 'var(--c15t-devtools-text-muted)',
3620
+ minWidth: '60px'
3621
+ },
3622
+ text: label
3623
+ }),
3624
+ renderer_div({
3625
+ style: {
3626
+ flex: '1'
3627
+ },
3628
+ children: [
3629
+ selectField
3630
+ ]
3631
+ })
3632
+ ]
3633
+ });
3634
+ }
3635
+ const COUNTRY_OPTIONS = [
3636
+ {
3637
+ value: '',
3638
+ label: '-- Select --'
3639
+ },
3640
+ {
3641
+ value: 'US',
3642
+ label: 'US - United States'
3643
+ },
3644
+ {
3645
+ value: 'CA',
3646
+ label: 'CA - Canada'
3647
+ },
3648
+ {
3649
+ value: 'GB',
3650
+ label: 'GB - United Kingdom'
3651
+ },
3652
+ {
3653
+ value: 'DE',
3654
+ label: 'DE - Germany'
3655
+ },
3656
+ {
3657
+ value: 'FR',
3658
+ label: 'FR - France'
3659
+ },
3660
+ {
3661
+ value: 'IT',
3662
+ label: 'IT - Italy'
3663
+ },
3664
+ {
3665
+ value: 'ES',
3666
+ label: 'ES - Spain'
3667
+ },
3668
+ {
3669
+ value: 'NL',
3670
+ label: 'NL - Netherlands'
3671
+ },
3672
+ {
3673
+ value: 'BE',
3674
+ label: 'BE - Belgium'
3675
+ },
3676
+ {
3677
+ value: 'AT',
3678
+ label: 'AT - Austria'
3679
+ },
3680
+ {
3681
+ value: 'CH',
3682
+ label: 'CH - Switzerland'
3683
+ },
3684
+ {
3685
+ value: 'PL',
3686
+ label: 'PL - Poland'
3687
+ },
3688
+ {
3689
+ value: 'SE',
3690
+ label: 'SE - Sweden'
3691
+ },
3692
+ {
3693
+ value: 'NO',
3694
+ label: 'NO - Norway'
3695
+ },
3696
+ {
3697
+ value: 'DK',
3698
+ label: 'DK - Denmark'
3699
+ },
3700
+ {
3701
+ value: 'FI',
3702
+ label: 'FI - Finland'
3703
+ },
3704
+ {
3705
+ value: 'IE',
3706
+ label: 'IE - Ireland'
3707
+ },
3708
+ {
3709
+ value: 'PT',
3710
+ label: 'PT - Portugal'
3711
+ },
3712
+ {
3713
+ value: 'AU',
3714
+ label: 'AU - Australia'
3715
+ },
3716
+ {
3717
+ value: 'NZ',
3718
+ label: 'NZ - New Zealand'
3719
+ },
3720
+ {
3721
+ value: 'JP',
3722
+ label: 'JP - Japan'
3723
+ },
3724
+ {
3725
+ value: 'BR',
3726
+ label: 'BR - Brazil'
3727
+ },
3728
+ {
3729
+ value: 'MX',
3730
+ label: 'MX - Mexico'
3731
+ },
3732
+ {
3733
+ value: 'IN',
3734
+ label: 'IN - India'
3735
+ },
3736
+ {
3737
+ value: 'CN',
3738
+ label: 'CN - China'
3739
+ },
3740
+ {
3741
+ value: 'KR',
3742
+ label: 'KR - South Korea'
3743
+ },
3744
+ {
3745
+ value: 'SG',
3746
+ label: 'SG - Singapore'
3747
+ },
3748
+ {
3749
+ value: 'HK',
3750
+ label: 'HK - Hong Kong'
3751
+ },
3752
+ {
3753
+ value: 'ZA',
3754
+ label: 'ZA - South Africa'
3755
+ }
3756
+ ];
3757
+ function getModelLabel(model) {
3758
+ switch(model){
3759
+ case 'opt-in':
3760
+ return 'Opt-In';
3761
+ case 'opt-out':
3762
+ return 'Opt-Out';
3763
+ case 'iab':
3764
+ return 'IAB TCF';
3765
+ default:
3766
+ return 'None';
3767
+ }
3768
+ }
3769
+ function createCompactInfoCard(label, value) {
3770
+ return renderer_div({
3771
+ className: styles_components_module.gridCard ?? '',
3772
+ style: {
3773
+ flexDirection: 'column',
3774
+ alignItems: 'flex-start',
3775
+ gap: '2px'
3776
+ },
3777
+ children: [
3778
+ span({
3779
+ style: {
3780
+ fontSize: 'var(--c15t-devtools-font-size-xs)',
3781
+ color: 'var(--c15t-text-muted)'
3782
+ },
3783
+ text: label
3784
+ }),
3785
+ span({
3786
+ style: {
3787
+ fontSize: 'var(--c15t-font-size-sm)',
3788
+ fontWeight: '500',
3789
+ fontFamily: 'ui-monospace, monospace'
3790
+ },
3791
+ text: value
3792
+ })
3793
+ ]
3794
+ });
3795
+ }
3796
+ const dismissedResources = new Set();
3797
+ function scanDOM(state) {
3798
+ const results = [];
3799
+ const configuredScripts = state.scripts || [];
3800
+ const managedDomains = new Map();
3801
+ for (const script of configuredScripts)if (script.src) try {
3802
+ const url = new URL(script.src, window.location.origin);
3803
+ if (url.hostname !== window.location.hostname) managedDomains.set(url.hostname, script.id);
3804
+ } catch {}
3805
+ const scriptElements = document.querySelectorAll("script[src]");
3806
+ for (const el of scriptElements){
3807
+ const src = el.getAttribute('src');
3808
+ if (!src) continue;
3809
+ const resource = checkResource(src, "script", managedDomains);
3810
+ if (resource) results.push(resource);
3811
+ }
3812
+ const iframeElements = document.querySelectorAll('iframe[src]');
3813
+ for (const el of iframeElements){
3814
+ const src = el.getAttribute('src');
3815
+ if (!src) continue;
3816
+ const resource = checkResource(src, 'iframe', managedDomains);
3817
+ if (resource) results.push(resource);
3818
+ }
3819
+ return results;
3820
+ }
3821
+ function checkResource(src, type, managedDomains) {
3822
+ try {
3823
+ const url = new URL(src, window.location.origin);
3824
+ const domain = url.hostname;
3825
+ if (domain === window.location.hostname) return null;
3826
+ if ('data:' === url.protocol || 'blob:' === url.protocol) return null;
3827
+ const managedBy = managedDomains.get(domain);
3828
+ const isManaged = Boolean(managedBy);
3829
+ return {
3830
+ type,
3831
+ src,
3832
+ domain,
3833
+ status: isManaged ? 'managed' : 'unmanaged',
3834
+ managedBy
3835
+ };
3836
+ } catch {}
3837
+ return null;
3838
+ }
3839
+ function createDomScannerSection(state) {
3840
+ let resultsContainer = null;
3841
+ let lastScanResults = [];
3842
+ const doRender = ()=>{
3843
+ if (!resultsContainer) return;
3844
+ renderScanResults(resultsContainer, lastScanResults, (src)=>{
3845
+ dismissedResources.add(src);
3846
+ doRender();
3847
+ });
3848
+ };
3849
+ const handleScan = ()=>{
3850
+ if (!state || !resultsContainer) return;
3851
+ lastScanResults = scanDOM(state);
3852
+ doRender();
3853
+ };
3854
+ const section = createSection({
3855
+ title: 'DOM Scanner',
3856
+ actions: [
3857
+ createButton({
3858
+ text: 'Scan DOM',
3859
+ small: true,
3860
+ onClick: handleScan
3861
+ })
3862
+ ],
3863
+ children: []
3864
+ });
3865
+ resultsContainer = renderer_div({});
3866
+ const placeholder = renderer_div({
3867
+ style: {
3868
+ fontSize: 'var(--c15t-devtools-font-size-xs)',
3869
+ color: 'var(--c15t-text-muted)',
3870
+ textAlign: 'center',
3871
+ padding: '8px 0'
3872
+ },
3873
+ text: 'Click "Scan DOM" to check for external scripts and iframes'
3874
+ });
3875
+ resultsContainer.appendChild(placeholder);
3876
+ section.appendChild(resultsContainer);
3877
+ return section;
3878
+ }
3879
+ function renderScanResults(container, results, onDismiss) {
3880
+ while(container.firstChild)container.removeChild(container.firstChild);
3881
+ const activeResults = results.filter((r)=>!dismissedResources.has(r.src));
3882
+ if (0 === activeResults.length && 0 === results.length) return void container.appendChild(renderer_div({
3883
+ style: {
3884
+ fontSize: 'var(--c15t-devtools-font-size-xs)',
3885
+ color: 'var(--c15t-text-muted)',
3886
+ textAlign: 'center',
3887
+ padding: '8px 0'
3888
+ },
3889
+ text: "No external scripts or iframes found"
3890
+ }));
3891
+ if (0 === activeResults.length && results.length > 0) return void container.appendChild(renderer_div({
3892
+ style: {
3893
+ fontSize: 'var(--c15t-devtools-font-size-xs)',
3894
+ color: 'var(--c15t-text-muted)',
3895
+ textAlign: 'center',
3896
+ padding: '8px 0'
3897
+ },
3898
+ text: `All ${results.length} alerts dismissed`
3899
+ }));
3900
+ const unmanaged = activeResults.filter((r)=>'unmanaged' === r.status);
3901
+ const managed = activeResults.filter((r)=>'managed' === r.status);
3902
+ const dismissedCount = results.length - activeResults.length;
3903
+ const summaryText = dismissedCount > 0 ? `Found: ${managed.length} managed, ${unmanaged.length} unmanaged (${dismissedCount} dismissed)` : `Found: ${managed.length} managed, ${unmanaged.length} unmanaged`;
3904
+ const summary = renderer_div({
3905
+ style: {
3906
+ fontSize: 'var(--c15t-devtools-font-size-xs)',
3907
+ color: 'var(--c15t-text-muted)',
3908
+ marginBottom: '8px'
3909
+ },
3910
+ text: summaryText
3911
+ });
3912
+ container.appendChild(summary);
3913
+ if (unmanaged.length > 0) for (const resource of unmanaged)container.appendChild(createResourceRow(resource, 'warning', onDismiss));
3914
+ if (managed.length > 0) {
3915
+ const managedHeader = renderer_div({
3916
+ style: {
3917
+ fontSize: 'var(--c15t-devtools-font-size-xs)',
3918
+ fontWeight: '600',
3919
+ color: 'var(--c15t-devtools-badge-success)',
3920
+ marginBottom: '4px',
3921
+ marginTop: '8px'
3922
+ },
3923
+ text: 'MANAGED'
3924
+ });
3925
+ container.appendChild(managedHeader);
3926
+ for (const resource of managed)container.appendChild(createResourceRow(resource, 'success', onDismiss));
3927
+ }
3928
+ }
3929
+ function createResourceRow(resource, variant, onDismiss) {
3930
+ const icon = 'warning' === variant ? '⚠' : '✓';
3931
+ const iconColor = 'warning' === variant ? 'var(--c15t-devtools-badge-warning)' : 'var(--c15t-devtools-badge-success)';
3932
+ const row = renderer_div({
3933
+ style: {
3934
+ display: 'flex',
3935
+ alignItems: 'center',
3936
+ gap: '6px',
3937
+ padding: '4px 0',
3938
+ fontSize: 'var(--c15t-devtools-font-size-xs)',
3939
+ borderBottom: '1px solid var(--c15t-border)'
3940
+ },
3941
+ children: [
3942
+ span({
3943
+ style: {
3944
+ color: iconColor,
3945
+ flexShrink: '0'
3946
+ },
3947
+ text: icon
3948
+ }),
3949
+ span({
3950
+ style: {
3951
+ color: 'var(--c15t-text-muted)',
3952
+ flexShrink: '0'
3953
+ },
3954
+ text: `${resource.type}:`
3955
+ }),
3956
+ span({
3957
+ style: {
3958
+ fontWeight: '500',
3959
+ color: 'var(--c15t-text)',
3960
+ overflow: 'hidden',
3961
+ textOverflow: 'ellipsis',
3962
+ whiteSpace: 'nowrap',
3963
+ flex: '1'
3964
+ },
3965
+ text: resource.domain,
3966
+ title: resource.src
3967
+ }),
3968
+ 'warning' === variant ? (()=>{
3969
+ const dismissBtn = document.createElement('button');
3970
+ dismissBtn.textContent = '✕';
3971
+ dismissBtn.title = 'Dismiss this alert';
3972
+ dismissBtn.style.cssText = `
3973
+ background: none;
3974
+ border: none;
3975
+ color: var(--c15t-text-muted);
3976
+ cursor: pointer;
3977
+ padding: 2px 4px;
3978
+ font-size: 10px;
3979
+ opacity: 0.6;
3980
+ flex-shrink: 0;
3981
+ `;
3982
+ dismissBtn.onmouseenter = ()=>{
3983
+ dismissBtn.style.opacity = '1';
3984
+ };
3985
+ dismissBtn.onmouseleave = ()=>{
3986
+ dismissBtn.style.opacity = '0.6';
3987
+ };
3988
+ dismissBtn.onclick = (e)=>{
3989
+ e.stopPropagation();
3990
+ onDismiss(resource.src);
3991
+ };
3992
+ return dismissBtn;
3993
+ })() : null
3994
+ ].filter(Boolean)
3995
+ });
3996
+ return row;
3997
+ }
3998
+ const CODE_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
3999
+ <polyline points="16 18 22 12 16 6"></polyline>
4000
+ <polyline points="8 6 2 12 8 18"></polyline>
4001
+ </svg>`;
4002
+ function scripts_renderScriptsPanel(container, options) {
4003
+ const { getState } = options;
4004
+ clearElement(container);
4005
+ const state = getState();
4006
+ if (!state) return void container.appendChild(renderer_div({
4007
+ style: {
4008
+ padding: '24px',
4009
+ textAlign: 'center',
4010
+ color: 'var(--c15t-text-muted)',
4011
+ fontSize: 'var(--c15t-devtools-font-size-sm)'
4012
+ },
4013
+ text: 'Store not connected'
4014
+ }));
4015
+ const scripts = state.scripts || [];
4016
+ const loadedScripts = state.loadedScripts || {};
4017
+ const networkBlocker = state.networkBlocker;
4018
+ if (0 === scripts.length) {
4019
+ const scriptsSection = createSection({
4020
+ title: 'Configured Scripts',
4021
+ children: [
4022
+ createEmptyState({
4023
+ icon: CODE_ICON,
4024
+ text: "No scripts configured"
4025
+ })
4026
+ ]
4027
+ });
4028
+ container.appendChild(scriptsSection);
4029
+ } else {
4030
+ const scriptsList = renderer_div({
4031
+ style: {
4032
+ display: 'flex',
4033
+ flexDirection: 'column',
4034
+ gap: '4px'
4035
+ }
4036
+ });
4037
+ for (const script of scripts){
4038
+ const scriptId = script.id;
4039
+ const isLoaded = true === loadedScripts[scriptId];
4040
+ const category = script.category;
4041
+ const categoryDisplay = 'string' == typeof category ? category : JSON.stringify(category);
4042
+ let status = 'pending';
4043
+ let statusVariant = 'neutral';
4044
+ if (isLoaded) {
4045
+ status = 'loaded';
4046
+ statusVariant = 'success';
4047
+ } else {
4048
+ const hasConsent = checkScriptConsent(state, category);
4049
+ if (hasConsent) {
4050
+ status = 'pending';
4051
+ statusVariant = 'warning';
4052
+ } else {
4053
+ status = 'blocked';
4054
+ statusVariant = 'neutral';
4055
+ }
4056
+ }
4057
+ const badge = createBadge({
4058
+ text: status.charAt(0).toUpperCase() + status.slice(1),
4059
+ variant: statusVariant
4060
+ });
4061
+ const item = createListItem({
4062
+ title: scriptId,
4063
+ description: `Category: ${categoryDisplay}`,
4064
+ actions: [
4065
+ badge
4066
+ ]
4067
+ });
4068
+ scriptsList.appendChild(item);
4069
+ }
4070
+ const scriptsSection = createSection({
4071
+ title: `Configured Scripts (${scripts.length})`,
4072
+ children: [
4073
+ scriptsList
4074
+ ]
4075
+ });
4076
+ container.appendChild(scriptsSection);
4077
+ }
4078
+ const networkSection = createSection({
4079
+ title: 'Network Blocker',
4080
+ children: networkBlocker ? [
4081
+ createInfoRow({
4082
+ label: 'Status',
4083
+ value: 'Active'
4084
+ }),
4085
+ createInfoRow({
4086
+ label: 'Blocked Domains',
4087
+ value: String(networkBlocker.rules?.length || 0)
4088
+ })
4089
+ ] : [
4090
+ renderer_div({
4091
+ style: {
4092
+ fontSize: 'var(--c15t-devtools-font-size-xs)',
4093
+ color: 'var(--c15t-devtools-text-muted)'
4094
+ },
4095
+ text: 'Network blocker not configured'
4096
+ })
4097
+ ]
4098
+ });
4099
+ container.appendChild(networkSection);
4100
+ const loadedCount = Object.values(loadedScripts).filter(Boolean).length;
4101
+ const totalCount = scripts.length;
4102
+ const summarySection = createSection({
4103
+ title: 'Summary',
4104
+ children: [
4105
+ createInfoRow({
4106
+ label: 'Total Scripts',
4107
+ value: String(totalCount)
4108
+ }),
4109
+ createInfoRow({
4110
+ label: 'Loaded',
4111
+ value: String(loadedCount)
4112
+ }),
4113
+ createInfoRow({
4114
+ label: 'Pending/Blocked',
4115
+ value: String(totalCount - loadedCount)
4116
+ })
4117
+ ]
4118
+ });
4119
+ container.appendChild(summarySection);
4120
+ const scannerSection = createDomScannerSection(state);
4121
+ container.appendChild(scannerSection);
4122
+ }
4123
+ function checkScriptConsent(state, category) {
4124
+ if (!category) return true;
4125
+ if ('string' == typeof category) {
4126
+ const consents = state.consents || {};
4127
+ return true === consents[category];
4128
+ }
4129
+ return false;
4130
+ }
4131
+ const STORAGE_KEYS = {
4132
+ C15T: 'c15t',
4133
+ PENDING_SYNC: 'c15t:pending-consent-sync',
4134
+ PENDING_SUBMISSIONS: 'c15t-pending-consent-submissions',
4135
+ EUCONSENT: 'euconsent-v2'
4136
+ };
4137
+ const COOKIE_NAMES = {
4138
+ C15T: 'c15t',
4139
+ EUCONSENT: 'euconsent-v2'
4140
+ };
4141
+ function clearCookie(name) {
4142
+ document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`;
4143
+ }
4144
+ function clearAllCookies() {
4145
+ clearCookie(COOKIE_NAMES.C15T);
4146
+ clearCookie(COOKIE_NAMES.EUCONSENT);
4147
+ }
4148
+ function clearAllLocalStorage() {
4149
+ try {
4150
+ localStorage.removeItem(STORAGE_KEYS.C15T);
4151
+ localStorage.removeItem(STORAGE_KEYS.PENDING_SYNC);
4152
+ localStorage.removeItem(STORAGE_KEYS.PENDING_SUBMISSIONS);
4153
+ localStorage.removeItem(STORAGE_KEYS.EUCONSENT);
4154
+ } catch {}
4155
+ }
4156
+ async function reset_consents_resetAllConsents(store, stateManager) {
4157
+ const storeState = store.getState();
4158
+ storeState.resetConsents();
4159
+ clearAllCookies();
4160
+ clearAllLocalStorage();
4161
+ await storeState.initConsentManager();
4162
+ stateManager?.addEvent({
4163
+ type: 'consent_reset',
4164
+ message: 'All consents reset (storage cleared)'
4165
+ });
4166
+ }
4167
+ const STORAGE_KEY = 'c15t-devtools-events';
4168
+ function loadPersistedEvents() {
4169
+ if ('undefined' == typeof window) return [];
4170
+ try {
4171
+ const stored = sessionStorage.getItem(STORAGE_KEY);
4172
+ if (stored) return JSON.parse(stored);
4173
+ } catch {}
4174
+ return [];
4175
+ }
4176
+ function persistEvents(events) {
4177
+ if ('undefined' == typeof window) return;
4178
+ try {
4179
+ sessionStorage.setItem(STORAGE_KEY, JSON.stringify(events));
4180
+ } catch {}
4181
+ }
4182
+ function state_manager_createStateManager(initialState = {}) {
4183
+ const persistedEvents = loadPersistedEvents();
4184
+ let state = {
4185
+ isOpen: false,
4186
+ activeTab: 'location',
4187
+ position: 'bottom-right',
4188
+ isConnected: false,
4189
+ eventLog: persistedEvents,
4190
+ maxEventLogSize: 100,
4191
+ ...initialState
4192
+ };
4193
+ const listeners = new Set();
4194
+ function notify(prevState) {
4195
+ for (const listener of listeners)listener(state, prevState);
4196
+ }
4197
+ function setState(partial) {
4198
+ const prevState = state;
4199
+ state = {
4200
+ ...state,
4201
+ ...partial
4202
+ };
4203
+ notify(prevState);
4204
+ }
4205
+ return {
4206
+ getState: ()=>state,
4207
+ subscribe: (listener)=>{
4208
+ listeners.add(listener);
4209
+ return ()=>{
4210
+ listeners.delete(listener);
4211
+ };
4212
+ },
4213
+ setOpen: (isOpen)=>{
4214
+ setState({
4215
+ isOpen
4216
+ });
4217
+ },
4218
+ toggle: ()=>{
4219
+ setState({
4220
+ isOpen: !state.isOpen
4221
+ });
4222
+ },
4223
+ setActiveTab: (tab)=>{
4224
+ setState({
4225
+ activeTab: tab
4226
+ });
4227
+ },
4228
+ setPosition: (position)=>{
4229
+ setState({
4230
+ position
4231
+ });
4232
+ },
4233
+ setConnected: (isConnected)=>{
4234
+ setState({
4235
+ isConnected
4236
+ });
4237
+ },
4238
+ addEvent: (entry)=>{
4239
+ const newEvent = {
4240
+ ...entry,
4241
+ id: `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`,
4242
+ timestamp: Date.now()
4243
+ };
4244
+ const eventLog = [
4245
+ newEvent,
4246
+ ...state.eventLog
4247
+ ].slice(0, state.maxEventLogSize);
4248
+ setState({
4249
+ eventLog
4250
+ });
4251
+ persistEvents(eventLog);
4252
+ },
4253
+ clearEventLog: ()=>{
4254
+ setState({
4255
+ eventLog: []
4256
+ });
4257
+ persistEvents([]);
4258
+ },
4259
+ destroy: ()=>{
4260
+ listeners.clear();
4261
+ }
4262
+ };
4263
+ }
4264
+ function store_connector_createStoreConnector(options = {}) {
4265
+ const { namespace = 'c15tStore', onConnect, onStateChange, onDisconnect } = options;
4266
+ let store = null;
4267
+ let unsubscribe = null;
4268
+ let pollInterval = null;
4269
+ const listeners = new Set();
4270
+ function tryConnect() {
4271
+ if ('undefined' == typeof window) return false;
4272
+ const storeInstance = window[namespace];
4273
+ if (storeInstance && 'function' == typeof storeInstance.getState) {
4274
+ store = storeInstance;
4275
+ unsubscribe = store.subscribe((state)=>{
4276
+ onStateChange?.(state);
4277
+ for (const listener of listeners)listener(state);
4278
+ });
4279
+ const currentState = store.getState();
4280
+ onConnect?.(currentState, store);
4281
+ if (pollInterval) {
4282
+ clearInterval(pollInterval);
4283
+ pollInterval = null;
4284
+ }
4285
+ return true;
4286
+ }
4287
+ return false;
4288
+ }
4289
+ function startPolling() {
4290
+ if (pollInterval) return;
4291
+ if (tryConnect()) return;
4292
+ let attempts = 0;
4293
+ const maxAttempts = 50;
4294
+ pollInterval = setInterval(()=>{
4295
+ attempts++;
4296
+ if (tryConnect()) return;
4297
+ if (attempts >= maxAttempts) {
4298
+ if (pollInterval) {
4299
+ clearInterval(pollInterval);
4300
+ pollInterval = null;
4301
+ }
4302
+ onDisconnect?.();
4303
+ }
4304
+ }, 100);
4305
+ }
4306
+ startPolling();
4307
+ return {
4308
+ getState: ()=>store?.getState() ?? null,
4309
+ getStore: ()=>store,
4310
+ isConnected: ()=>null !== store,
4311
+ subscribe: (listener)=>{
4312
+ listeners.add(listener);
4313
+ if (store) listener(store.getState());
4314
+ return ()=>{
4315
+ listeners.delete(listener);
4316
+ };
4317
+ },
4318
+ destroy: ()=>{
4319
+ if (pollInterval) {
4320
+ clearInterval(pollInterval);
4321
+ pollInterval = null;
4322
+ }
4323
+ if (unsubscribe) {
4324
+ unsubscribe();
4325
+ unsubscribe = null;
4326
+ }
4327
+ store = null;
4328
+ listeners.clear();
4329
+ }
4330
+ };
4331
+ }
4332
+ var tokens = __webpack_require__("../../node_modules/.bun/@rsbuild+core@1.6.12/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].use[2]!./src/styles/tokens.css");
4333
+ var tokens_options = {};
4334
+ tokens_options.styleTagTransform = styleTagTransform_default();
4335
+ tokens_options.setAttributes = setAttributesWithoutAttributes_default();
4336
+ tokens_options.insert = insertBySelector_default().bind(null, "head");
4337
+ tokens_options.domAPI = styleDomAPI_default();
4338
+ tokens_options.insertStyleElement = insertStyleElement_default();
4339
+ injectStylesIntoStyleTag_default()(tokens.A, tokens_options);
4340
+ tokens.A && tokens.A.locals && tokens.A.locals;
4341
+ function createDevTools(options = {}) {
4342
+ const { namespace = 'c15tStore', position = 'bottom-right', defaultOpen = false } = options;
4343
+ const stateManager = state_manager_createStateManager({
4344
+ position,
4345
+ isOpen: defaultOpen
4346
+ });
4347
+ let originalCallbacks = {};
4348
+ const storeConnector = store_connector_createStoreConnector({
4349
+ namespace,
4350
+ onConnect: (state, store)=>{
4351
+ stateManager.setConnected(true);
4352
+ stateManager.addEvent({
4353
+ type: 'info',
4354
+ message: 'Connected to c15tStore'
4355
+ });
4356
+ originalCallbacks = {
4357
+ ...state.callbacks
4358
+ };
4359
+ store.getState().setCallback('onBannerFetched', (payload)=>{
4360
+ stateManager.addEvent({
4361
+ type: 'info',
4362
+ message: `Banner fetched: ${String(payload.jurisdiction)}`,
4363
+ data: payload
4364
+ });
4365
+ if ('function' == typeof originalCallbacks.onBannerFetched) originalCallbacks.onBannerFetched(payload);
4366
+ });
4367
+ store.getState().setCallback('onConsentSet', (payload)=>{
4368
+ stateManager.addEvent({
4369
+ type: 'consent_set',
4370
+ message: 'Consent preferences updated',
4371
+ data: payload
4372
+ });
4373
+ if ('function' == typeof originalCallbacks.onConsentSet) originalCallbacks.onConsentSet(payload);
4374
+ });
4375
+ store.getState().setCallback('onError', (payload)=>{
4376
+ stateManager.addEvent({
4377
+ type: 'error',
4378
+ message: `Error: ${payload.error}`,
4379
+ data: payload
4380
+ });
4381
+ if ('function' == typeof originalCallbacks.onError) originalCallbacks.onError(payload);
4382
+ });
4383
+ store.getState().setCallback('onBeforeConsentRevocationReload', (payload)=>{
4384
+ stateManager.addEvent({
4385
+ type: 'info',
4386
+ message: 'Consent revocation - page will reload',
4387
+ data: payload
4388
+ });
4389
+ if ('function' == typeof originalCallbacks.onBeforeConsentRevocationReload) originalCallbacks.onBeforeConsentRevocationReload(payload);
4390
+ });
4391
+ },
4392
+ onDisconnect: ()=>{
4393
+ stateManager.setConnected(false);
4394
+ stateManager.addEvent({
4395
+ type: 'error',
4396
+ message: 'Disconnected from c15tStore'
4397
+ });
4398
+ },
4399
+ onStateChange: ()=>{}
4400
+ });
4401
+ let tabsInstance = null;
4402
+ const panelInstance = createPanel({
4403
+ stateManager,
4404
+ storeConnector,
4405
+ onRenderContent: (container)=>{
4406
+ renderContent(container, stateManager, storeConnector);
4407
+ }
4408
+ });
4409
+ function renderContent(container, stateManager, storeConnector) {
4410
+ clearElement(container);
4411
+ const storeState = storeConnector.getState();
4412
+ const disabledTabs = [];
4413
+ if (!storeState || 'iab' !== storeState.model) disabledTabs.push('iab');
4414
+ if (tabsInstance) tabsInstance.destroy();
4415
+ tabsInstance = tabs_createTabs({
4416
+ activeTab: stateManager.getState().activeTab,
4417
+ onTabChange: (tab)=>{
4418
+ stateManager.setActiveTab(tab);
4419
+ },
4420
+ disabledTabs
4421
+ });
4422
+ container.appendChild(tabsInstance.element);
4423
+ const panelContent = renderer_div({
4424
+ style: {
4425
+ display: 'flex',
4426
+ flexDirection: 'column',
4427
+ gap: '0'
4428
+ }
4429
+ });
4430
+ container.appendChild(panelContent);
4431
+ const state = stateManager.getState();
4432
+ const getStoreState = ()=>storeConnector.getState();
4433
+ switch(state.activeTab){
4434
+ case 'consents':
4435
+ consents_renderConsentsPanel(panelContent, {
4436
+ getState: getStoreState,
4437
+ onConsentChange: (name, value)=>{
4438
+ const store = storeConnector.getStore();
4439
+ if (store) {
4440
+ const consentName = String(name);
4441
+ store.getState().setSelectedConsent(consentName, value);
4442
+ stateManager.addEvent({
4443
+ type: 'info',
4444
+ message: `${consentName} toggled to ${value} (not saved)`,
4445
+ data: {
4446
+ name: consentName,
4447
+ value
4448
+ }
4449
+ });
4450
+ }
4451
+ },
4452
+ onSave: ()=>{
4453
+ const store = storeConnector.getStore();
4454
+ if (store) {
4455
+ store.getState().saveConsents('custom');
4456
+ stateManager.addEvent({
4457
+ type: 'consent_save',
4458
+ message: 'Saved consent preferences'
4459
+ });
4460
+ }
4461
+ },
4462
+ onAcceptAll: ()=>{
4463
+ const store = storeConnector.getStore();
4464
+ if (store) {
4465
+ store.getState().saveConsents('all');
4466
+ stateManager.addEvent({
4467
+ type: 'consent_save',
4468
+ message: 'Accepted all consents'
4469
+ });
4470
+ }
4471
+ },
4472
+ onRejectAll: ()=>{
4473
+ const store = storeConnector.getStore();
4474
+ if (store) {
4475
+ store.getState().saveConsents('necessary');
4476
+ stateManager.addEvent({
4477
+ type: 'consent_save',
4478
+ message: 'Rejected all optional consents'
4479
+ });
4480
+ }
4481
+ },
4482
+ onReset: async ()=>{
4483
+ const store = storeConnector.getStore();
4484
+ if (store) await reset_consents_resetAllConsents(store, stateManager);
4485
+ }
4486
+ });
4487
+ break;
4488
+ case 'location':
4489
+ location_renderLocationPanel(panelContent, {
4490
+ getState: getStoreState,
4491
+ onSetOverrides: async (overrides)=>{
4492
+ const store = storeConnector.getStore();
4493
+ if (store) {
4494
+ const currentOverrides = store.getState().overrides || {};
4495
+ await store.getState().setOverrides({
4496
+ ...currentOverrides,
4497
+ ...overrides
4498
+ });
4499
+ stateManager.addEvent({
4500
+ type: 'info',
4501
+ message: 'Overrides updated',
4502
+ data: overrides
4503
+ });
4504
+ await store.getState().initConsentManager();
4505
+ stateManager.addEvent({
4506
+ type: 'info',
4507
+ message: 'Consent manager re-initialized with new overrides'
4508
+ });
4509
+ }
4510
+ },
4511
+ onClearOverrides: async ()=>{
4512
+ const store = storeConnector.getStore();
4513
+ if (store) {
4514
+ await store.getState().setOverrides(void 0);
4515
+ stateManager.addEvent({
4516
+ type: 'info',
4517
+ message: 'Overrides cleared'
4518
+ });
4519
+ await store.getState().initConsentManager();
4520
+ stateManager.addEvent({
4521
+ type: 'info',
4522
+ message: 'Consent manager re-initialized'
4523
+ });
4524
+ }
4525
+ }
4526
+ });
4527
+ break;
4528
+ case "scripts":
4529
+ scripts_renderScriptsPanel(panelContent, {
4530
+ getState: getStoreState
4531
+ });
4532
+ break;
4533
+ case 'iab':
4534
+ iab_renderIabPanel(panelContent, {
4535
+ getState: getStoreState,
4536
+ onReset: async ()=>{
4537
+ const store = storeConnector.getStore();
4538
+ if (store) await reset_consents_resetAllConsents(store, stateManager);
4539
+ }
4540
+ });
4541
+ break;
4542
+ case 'events':
4543
+ events_renderEventsPanel(panelContent, {
4544
+ getEvents: ()=>stateManager.getState().eventLog,
4545
+ onClear: ()=>{
4546
+ stateManager.clearEventLog();
4547
+ stateManager.addEvent({
4548
+ type: 'info',
4549
+ message: 'Event log cleared'
4550
+ });
4551
+ }
4552
+ });
4553
+ break;
4554
+ case 'actions':
4555
+ actions_renderActionsPanel(panelContent, {
4556
+ getState: getStoreState,
4557
+ onResetConsents: async ()=>{
4558
+ const store = storeConnector.getStore();
4559
+ if (store) await reset_consents_resetAllConsents(store, stateManager);
4560
+ },
4561
+ onRefetchBanner: async ()=>{
4562
+ const store = storeConnector.getStore();
4563
+ if (store) {
4564
+ await store.getState().initConsentManager();
4565
+ stateManager.addEvent({
4566
+ type: 'info',
4567
+ message: 'Banner data refetched'
4568
+ });
4569
+ }
4570
+ },
4571
+ onShowBanner: ()=>{
4572
+ const store = storeConnector.getStore();
4573
+ if (store) {
4574
+ store.getState().setActiveUI('banner', {
4575
+ force: true
4576
+ });
4577
+ stateManager.addEvent({
4578
+ type: 'info',
4579
+ message: 'Banner shown'
4580
+ });
4581
+ }
4582
+ },
4583
+ onOpenPreferences: ()=>{
4584
+ const store = storeConnector.getStore();
4585
+ if (store) {
4586
+ store.getState().setActiveUI('dialog');
4587
+ stateManager.addEvent({
4588
+ type: 'info',
4589
+ message: 'Preference center opened'
4590
+ });
4591
+ }
4592
+ },
4593
+ onCopyState: ()=>{
4594
+ const state = storeConnector.getState();
4595
+ if (state) {
4596
+ const stateCopy = {
4597
+ consents: state.consents,
4598
+ consentInfo: state.consentInfo,
4599
+ locationInfo: state.locationInfo,
4600
+ model: state.model,
4601
+ overrides: state.overrides,
4602
+ scripts: state.scripts?.map((s)=>({
4603
+ id: s.id
4604
+ })),
4605
+ loadedScripts: state.loadedScripts
4606
+ };
4607
+ navigator.clipboard.writeText(JSON.stringify(stateCopy, null, 2)).then(()=>{
4608
+ stateManager.addEvent({
4609
+ type: 'info',
4610
+ message: 'State copied to clipboard'
4611
+ });
4612
+ }).catch(()=>{
4613
+ stateManager.addEvent({
4614
+ type: 'error',
4615
+ message: 'Failed to copy state'
4616
+ });
4617
+ });
4618
+ }
4619
+ }
4620
+ });
4621
+ break;
4622
+ }
4623
+ }
4624
+ storeConnector.subscribe(()=>{
4625
+ panelInstance.update();
4626
+ });
4627
+ const instance = {
4628
+ open: ()=>stateManager.setOpen(true),
4629
+ close: ()=>stateManager.setOpen(false),
4630
+ toggle: ()=>stateManager.toggle(),
4631
+ getState: ()=>{
4632
+ const state = stateManager.getState();
4633
+ return {
4634
+ isOpen: state.isOpen,
4635
+ activeTab: state.activeTab,
4636
+ isConnected: state.isConnected
4637
+ };
4638
+ },
4639
+ destroy: ()=>{
4640
+ tabsInstance?.destroy();
4641
+ panelInstance.destroy();
4642
+ storeConnector.destroy();
4643
+ stateManager.destroy();
4644
+ if ('undefined' != typeof window) delete window.__c15tDevTools;
4645
+ }
4646
+ };
4647
+ if ('undefined' != typeof window) window.__c15tDevTools = instance;
4648
+ return instance;
4649
+ }
4650
+ function C15TDevTools({ namespace = 'c15tStore', position = 'bottom-right', defaultOpen = false, disabled = false }) {
4651
+ const devtoolsRef = useRef(null);
4652
+ useEffect(()=>{
4653
+ if (disabled) return;
4654
+ if ('undefined' == typeof window) return;
4655
+ devtoolsRef.current = createDevTools({
4656
+ namespace,
4657
+ position,
4658
+ defaultOpen
4659
+ });
4660
+ return ()=>{
4661
+ devtoolsRef.current?.destroy();
4662
+ devtoolsRef.current = null;
4663
+ };
4664
+ }, [
4665
+ namespace,
4666
+ position,
4667
+ defaultOpen,
4668
+ disabled
4669
+ ]);
4670
+ return null;
4671
+ }
4672
+ export { C15TDevTools };