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

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