@sentropic/h2a 0.85.16 → 0.85.18

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 (193) hide show
  1. package/.claude-plugin/plugin.json +29 -0
  2. package/.codex-plugin/plugin.json +35 -0
  3. package/.mcp.json +19 -0
  4. package/README.md +3 -0
  5. package/dist/bin-routing.d.ts +14 -3
  6. package/dist/bin-routing.d.ts.map +1 -1
  7. package/dist/bin-routing.js +31 -6
  8. package/dist/bin-routing.js.map +1 -1
  9. package/dist/bin.js +45 -14
  10. package/dist/bin.js.map +1 -1
  11. package/dist/cli-contract.d.ts.map +1 -1
  12. package/dist/cli-contract.js +41 -1
  13. package/dist/cli-contract.js.map +1 -1
  14. package/dist/cli.d.ts +4 -0
  15. package/dist/cli.d.ts.map +1 -1
  16. package/dist/cli.js +146 -18
  17. package/dist/cli.js.map +1 -1
  18. package/dist/index.d.ts +4 -3
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +3 -2
  21. package/dist/index.js.map +1 -1
  22. package/dist/mcp.d.ts +1 -1
  23. package/dist/mcp.d.ts.map +1 -1
  24. package/dist/mcp.js +1 -0
  25. package/dist/mcp.js.map +1 -1
  26. package/dist/runtime/focus/serve.d.ts +42 -0
  27. package/dist/runtime/focus/serve.d.ts.map +1 -0
  28. package/dist/runtime/focus/serve.js +366 -0
  29. package/dist/runtime/focus/serve.js.map +1 -0
  30. package/dist/runtime/loop/engine/adapters.d.ts +62 -6
  31. package/dist/runtime/loop/engine/adapters.d.ts.map +1 -1
  32. package/dist/runtime/loop/engine/adapters.js +272 -36
  33. package/dist/runtime/loop/engine/adapters.js.map +1 -1
  34. package/dist/runtime/loop/engine/decision.d.ts.map +1 -1
  35. package/dist/runtime/loop/engine/decision.js +20 -2
  36. package/dist/runtime/loop/engine/decision.js.map +1 -1
  37. package/dist/runtime/loop/engine/execute.d.ts +13 -4
  38. package/dist/runtime/loop/engine/execute.d.ts.map +1 -1
  39. package/dist/runtime/loop/engine/execute.js +17 -7
  40. package/dist/runtime/loop/engine/execute.js.map +1 -1
  41. package/dist/runtime/loop/index.d.ts +16 -0
  42. package/dist/runtime/loop/index.d.ts.map +1 -1
  43. package/dist/runtime/loop/index.js +146 -13
  44. package/dist/runtime/loop/index.js.map +1 -1
  45. package/dist/runtime/mcp/agent-launch.d.ts +33 -0
  46. package/dist/runtime/mcp/agent-launch.d.ts.map +1 -0
  47. package/dist/runtime/mcp/agent-launch.js +250 -0
  48. package/dist/runtime/mcp/agent-launch.js.map +1 -0
  49. package/dist/runtime/mcp/handlers.d.ts +8 -0
  50. package/dist/runtime/mcp/handlers.d.ts.map +1 -1
  51. package/dist/runtime/mcp/handlers.js +34 -4
  52. package/dist/runtime/mcp/handlers.js.map +1 -1
  53. package/dist/runtime/mcp/index.d.ts +2 -1
  54. package/dist/runtime/mcp/index.d.ts.map +1 -1
  55. package/dist/runtime/mcp/index.js +2 -1
  56. package/dist/runtime/mcp/index.js.map +1 -1
  57. package/dist/runtime/mcp/server.d.ts +5 -0
  58. package/dist/runtime/mcp/server.d.ts.map +1 -1
  59. package/dist/runtime/mcp/server.js +3 -0
  60. package/dist/runtime/mcp/server.js.map +1 -1
  61. package/dist/runtime/mcp/stdio.d.ts +17 -0
  62. package/dist/runtime/mcp/stdio.d.ts.map +1 -1
  63. package/dist/runtime/mcp/stdio.js +65 -13
  64. package/dist/runtime/mcp/stdio.js.map +1 -1
  65. package/dist/runtime/mcp/tools.d.ts.map +1 -1
  66. package/dist/runtime/mcp/tools.js +96 -5
  67. package/dist/runtime/mcp/tools.js.map +1 -1
  68. package/dist/runtime/path-safety.d.ts +3 -0
  69. package/dist/runtime/path-safety.d.ts.map +1 -0
  70. package/dist/runtime/path-safety.js +12 -0
  71. package/dist/runtime/path-safety.js.map +1 -0
  72. package/dist/runtime/reporting/config.d.ts +21 -0
  73. package/dist/runtime/reporting/config.d.ts.map +1 -0
  74. package/dist/runtime/reporting/config.js +76 -0
  75. package/dist/runtime/reporting/config.js.map +1 -0
  76. package/dist/runtime/reporting/context.d.ts +27 -0
  77. package/dist/runtime/reporting/context.d.ts.map +1 -0
  78. package/dist/runtime/reporting/context.js +265 -0
  79. package/dist/runtime/reporting/context.js.map +1 -0
  80. package/dist/runtime/reporting/index.d.ts +4 -0
  81. package/dist/runtime/reporting/index.d.ts.map +1 -0
  82. package/dist/runtime/reporting/index.js +4 -0
  83. package/dist/runtime/reporting/index.js.map +1 -0
  84. package/dist/runtime/reporting/report-ai.d.ts +49 -0
  85. package/dist/runtime/reporting/report-ai.d.ts.map +1 -0
  86. package/dist/runtime/reporting/report-ai.js +325 -0
  87. package/dist/runtime/reporting/report-ai.js.map +1 -0
  88. package/focus-app/client/_app/immutable/assets/0.BdzHFb9q.css +1 -0
  89. package/focus-app/client/_app/immutable/assets/0.BdzHFb9q.css.br +2 -0
  90. package/focus-app/client/_app/immutable/assets/0.BdzHFb9q.css.gz +0 -0
  91. package/focus-app/client/_app/immutable/assets/2.Ddxq02y4.css +1 -0
  92. package/focus-app/client/_app/immutable/assets/2.Ddxq02y4.css.br +0 -0
  93. package/focus-app/client/_app/immutable/assets/2.Ddxq02y4.css.gz +0 -0
  94. package/focus-app/client/_app/immutable/chunks/Bs3f1UbD.js +2 -0
  95. package/focus-app/client/_app/immutable/chunks/Bs3f1UbD.js.br +0 -0
  96. package/focus-app/client/_app/immutable/chunks/Bs3f1UbD.js.gz +0 -0
  97. package/focus-app/client/_app/immutable/chunks/Bv8OL8ib.js +1 -0
  98. package/focus-app/client/_app/immutable/chunks/Bv8OL8ib.js.br +0 -0
  99. package/focus-app/client/_app/immutable/chunks/Bv8OL8ib.js.gz +0 -0
  100. package/focus-app/client/_app/immutable/chunks/CVq_IFFr.js +2 -0
  101. package/focus-app/client/_app/immutable/chunks/CVq_IFFr.js.br +0 -0
  102. package/focus-app/client/_app/immutable/chunks/CVq_IFFr.js.gz +0 -0
  103. package/focus-app/client/_app/immutable/chunks/Cj6wo28J.js +1 -0
  104. package/focus-app/client/_app/immutable/chunks/Cj6wo28J.js.br +0 -0
  105. package/focus-app/client/_app/immutable/chunks/Cj6wo28J.js.gz +0 -0
  106. package/focus-app/client/_app/immutable/chunks/DEmooz0s.js +1 -0
  107. package/focus-app/client/_app/immutable/chunks/DEmooz0s.js.br +0 -0
  108. package/focus-app/client/_app/immutable/chunks/DEmooz0s.js.gz +0 -0
  109. package/focus-app/client/_app/immutable/chunks/DQIRXgdC.js +2 -0
  110. package/focus-app/client/_app/immutable/chunks/DQIRXgdC.js.br +0 -0
  111. package/focus-app/client/_app/immutable/chunks/DQIRXgdC.js.gz +0 -0
  112. package/focus-app/client/_app/immutable/chunks/ZxFklh9T.js +1 -0
  113. package/focus-app/client/_app/immutable/chunks/ZxFklh9T.js.br +0 -0
  114. package/focus-app/client/_app/immutable/chunks/ZxFklh9T.js.gz +0 -0
  115. package/focus-app/client/_app/immutable/chunks/_wRuVGPs.js +1 -0
  116. package/focus-app/client/_app/immutable/chunks/_wRuVGPs.js.br +0 -0
  117. package/focus-app/client/_app/immutable/chunks/_wRuVGPs.js.gz +0 -0
  118. package/focus-app/client/_app/immutable/chunks/wbPk3Yxo.js +81 -0
  119. package/focus-app/client/_app/immutable/chunks/wbPk3Yxo.js.br +0 -0
  120. package/focus-app/client/_app/immutable/chunks/wbPk3Yxo.js.gz +0 -0
  121. package/focus-app/client/_app/immutable/entry/app.6DKouWRt.js +2 -0
  122. package/focus-app/client/_app/immutable/entry/app.6DKouWRt.js.br +0 -0
  123. package/focus-app/client/_app/immutable/entry/app.6DKouWRt.js.gz +0 -0
  124. package/focus-app/client/_app/immutable/entry/start.DlLmkUb7.js +1 -0
  125. package/focus-app/client/_app/immutable/entry/start.DlLmkUb7.js.br +2 -0
  126. package/focus-app/client/_app/immutable/entry/start.DlLmkUb7.js.gz +0 -0
  127. package/focus-app/client/_app/immutable/nodes/0.CuSOF0Of.js +5 -0
  128. package/focus-app/client/_app/immutable/nodes/0.CuSOF0Of.js.br +0 -0
  129. package/focus-app/client/_app/immutable/nodes/0.CuSOF0Of.js.gz +0 -0
  130. package/focus-app/client/_app/immutable/nodes/1.D39jdnqm.js +1 -0
  131. package/focus-app/client/_app/immutable/nodes/1.D39jdnqm.js.br +0 -0
  132. package/focus-app/client/_app/immutable/nodes/1.D39jdnqm.js.gz +0 -0
  133. package/focus-app/client/_app/immutable/nodes/2.CnU8ifRl.js +1 -0
  134. package/focus-app/client/_app/immutable/nodes/2.CnU8ifRl.js.br +0 -0
  135. package/focus-app/client/_app/immutable/nodes/2.CnU8ifRl.js.gz +0 -0
  136. package/focus-app/client/_app/version.json +1 -0
  137. package/focus-app/client/_app/version.json.br +0 -0
  138. package/focus-app/client/_app/version.json.gz +0 -0
  139. package/focus-app/env.js +70 -0
  140. package/focus-app/env.js.map +1 -0
  141. package/focus-app/h2a-focus.json +114 -0
  142. package/focus-app/handler.js +24 -0
  143. package/focus-app/handler.js.map +1 -0
  144. package/focus-app/index.js +147 -0
  145. package/focus-app/index.js.map +1 -0
  146. package/focus-app/server/chunks/chunks/exports.js-DUTkELZq.js +217 -0
  147. package/focus-app/server/chunks/chunks/exports.js-DUTkELZq.js.map +1 -0
  148. package/focus-app/server/chunks/chunks/false.js-B2gHlHjM.js +4 -0
  149. package/focus-app/server/chunks/chunks/false.js-B2gHlHjM.js.map +1 -0
  150. package/focus-app/server/chunks/chunks/friendly.js-D4fjovnZ.js +246 -0
  151. package/focus-app/server/chunks/chunks/friendly.js-D4fjovnZ.js.map +1 -0
  152. package/focus-app/server/chunks/chunks/index.js-Di21TltP.js +1315 -0
  153. package/focus-app/server/chunks/chunks/index.js-Di21TltP.js.map +1 -0
  154. package/focus-app/server/chunks/chunks/internal.js-33vbd70h.js +126 -0
  155. package/focus-app/server/chunks/chunks/internal.js-33vbd70h.js.map +1 -0
  156. package/focus-app/server/chunks/chunks/root.js-DO1m-gJA.js +2967 -0
  157. package/focus-app/server/chunks/chunks/root.js-DO1m-gJA.js.map +1 -0
  158. package/focus-app/server/chunks/chunks/server.js-Bf8x1V_n.js +16 -0
  159. package/focus-app/server/chunks/chunks/server.js-Bf8x1V_n.js.map +1 -0
  160. package/focus-app/server/chunks/chunks/utils.js-C_3_iViC.js +2545 -0
  161. package/focus-app/server/chunks/chunks/utils.js-C_3_iViC.js.map +1 -0
  162. package/focus-app/server/chunks/chunks/utils2.js-BQzn9ikS.js +38 -0
  163. package/focus-app/server/chunks/chunks/utils2.js-BQzn9ikS.js.map +1 -0
  164. package/focus-app/server/chunks/entries/endpoints/api/actions/launch/_server.ts.js-DUQcf9xd.js +63 -0
  165. package/focus-app/server/chunks/entries/endpoints/api/actions/launch/_server.ts.js-DUQcf9xd.js.map +1 -0
  166. package/focus-app/server/chunks/entries/endpoints/api/decisions/inject/_server.ts.js-j0NNcOSZ.js +100 -0
  167. package/focus-app/server/chunks/entries/endpoints/api/decisions/inject/_server.ts.js-j0NNcOSZ.js.map +1 -0
  168. package/focus-app/server/chunks/entries/fallbacks/error.svelte.js-Dj3sETSX.js +50 -0
  169. package/focus-app/server/chunks/entries/fallbacks/error.svelte.js-Dj3sETSX.js.map +1 -0
  170. package/focus-app/server/chunks/entries/pages/_layout.svelte.js-BoLsbuC2.js +1420 -0
  171. package/focus-app/server/chunks/entries/pages/_layout.svelte.js-BoLsbuC2.js.map +1 -0
  172. package/focus-app/server/chunks/entries/pages/_page.server.ts.js-ChRBj_xK.js +246 -0
  173. package/focus-app/server/chunks/entries/pages/_page.server.ts.js-ChRBj_xK.js.map +1 -0
  174. package/focus-app/server/chunks/entries/pages/_page.svelte.js-QDldMYhk.js +2725 -0
  175. package/focus-app/server/chunks/entries/pages/_page.svelte.js-QDldMYhk.js.map +1 -0
  176. package/focus-app/server/chunks/handler-Cp_5hLyY.js +1474 -0
  177. package/focus-app/server/chunks/handler-Cp_5hLyY.js.map +1 -0
  178. package/focus-app/server/chunks/index.js-CBh7Wjqp.js +4242 -0
  179. package/focus-app/server/chunks/index.js-CBh7Wjqp.js.map +1 -0
  180. package/focus-app/server/chunks/manifest.js-Cm6cC7mC.js +56 -0
  181. package/focus-app/server/chunks/manifest.js-Cm6cC7mC.js.map +1 -0
  182. package/focus-app/server/chunks/nodes/0.js-4wlmdsk8.js +9 -0
  183. package/focus-app/server/chunks/nodes/0.js-4wlmdsk8.js.map +1 -0
  184. package/focus-app/server/chunks/nodes/1.js-B-LpY-lC.js +9 -0
  185. package/focus-app/server/chunks/nodes/1.js-B-LpY-lC.js.map +1 -0
  186. package/focus-app/server/chunks/nodes/2.js-F6jp5eD9.js +19 -0
  187. package/focus-app/server/chunks/nodes/2.js-F6jp5eD9.js.map +1 -0
  188. package/focus-app/shims.js +33 -0
  189. package/focus-app/shims.js.map +1 -0
  190. package/package.json +8 -4
  191. package/skills/h2a/SKILL.md +7 -5
  192. package/skills/harness/SKILL.md +17 -0
  193. package/skills/harness/using-harness/SKILL.md +26 -0
@@ -0,0 +1,2725 @@
1
+ import { a6 as attr_class, a7 as clsx, a3 as attr, Z as derived, a8 as attributes, a4 as escape_html, a9 as ensure_array_like, aa as bind_props, ab as element, ac as run, ad as spread_props, ae as attr_style, af as props_id } from '../../chunks/index.js-Di21TltP.js';
2
+ import '../../chunks/utils.js-C_3_iViC.js';
3
+ import '../../chunks/utils2.js-BQzn9ikS.js';
4
+
5
+ const defaultAttributes = {
6
+ xmlns: "http://www.w3.org/2000/svg",
7
+ width: 24,
8
+ height: 24,
9
+ viewBox: "0 0 24 24",
10
+ fill: "none",
11
+ stroke: "currentColor",
12
+ "stroke-width": 2,
13
+ "stroke-linecap": "round",
14
+ "stroke-linejoin": "round"
15
+ };
16
+ function Icon($$renderer, $$props) {
17
+ $$renderer.component(($$renderer2) => {
18
+ const {
19
+ name,
20
+ color = "currentColor",
21
+ size = 24,
22
+ strokeWidth = 2,
23
+ absoluteStrokeWidth = false,
24
+ iconNode = [],
25
+ children,
26
+ $$slots,
27
+ $$events,
28
+ ...props
29
+ } = $$props;
30
+ $$renderer2.push(`<svg${attributes(
31
+ {
32
+ ...defaultAttributes,
33
+ ...props,
34
+ width: size,
35
+ height: size,
36
+ stroke: color,
37
+ "stroke-width": absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
38
+ class: clsx(["lucide-icon lucide", name && `lucide-${name}`, props.class])
39
+ },
40
+ void 0,
41
+ void 0,
42
+ void 0,
43
+ 3
44
+ )}><!--[-->`);
45
+ const each_array = ensure_array_like(iconNode);
46
+ for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
47
+ let [tag, attrs] = each_array[$$index];
48
+ element($$renderer2, tag, () => {
49
+ $$renderer2.push(`${attributes({ ...attrs }, void 0, void 0, void 0, 3)}`);
50
+ });
51
+ }
52
+ $$renderer2.push(`<!--]-->`);
53
+ children?.($$renderer2);
54
+ $$renderer2.push(`<!----></svg>`);
55
+ });
56
+ }
57
+ function Boxes($$renderer, $$props) {
58
+ $$renderer.component(($$renderer2) => {
59
+ let { $$slots, $$events, ...props } = $$props;
60
+ const iconNode = [
61
+ [
62
+ "path",
63
+ {
64
+ "d": "M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z"
65
+ }
66
+ ],
67
+ ["path", { "d": "m7 16.5-4.74-2.85" }],
68
+ ["path", { "d": "m7 16.5 5-3" }],
69
+ ["path", { "d": "M7 16.5v5.17" }],
70
+ [
71
+ "path",
72
+ {
73
+ "d": "M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z"
74
+ }
75
+ ],
76
+ ["path", { "d": "m17 16.5-5-3" }],
77
+ ["path", { "d": "m17 16.5 4.74-2.85" }],
78
+ ["path", { "d": "M17 16.5v5.17" }],
79
+ [
80
+ "path",
81
+ {
82
+ "d": "M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z"
83
+ }
84
+ ],
85
+ ["path", { "d": "M12 8 7.26 5.15" }],
86
+ ["path", { "d": "m12 8 4.74-2.85" }],
87
+ ["path", { "d": "M12 13.5V8" }]
88
+ ];
89
+ Icon($$renderer2, spread_props([
90
+ { name: "boxes" },
91
+ /**
92
+ * @component @name Boxes
93
+ * @description Lucide SVG icon component, renders SVG Element with children.
94
+ *
95
+ * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMi45NyAxMi45MkEyIDIgMCAwIDAgMiAxNC42M3YzLjI0YTIgMiAwIDAgMCAuOTcgMS43MWwzIDEuOGEyIDIgMCAwIDAgMi4wNiAwTDEyIDE5di01LjVsLTUtMy00LjAzIDIuNDJaIiAvPgogIDxwYXRoIGQ9Im03IDE2LjUtNC43NC0yLjg1IiAvPgogIDxwYXRoIGQ9Im03IDE2LjUgNS0zIiAvPgogIDxwYXRoIGQ9Ik03IDE2LjV2NS4xNyIgLz4KICA8cGF0aCBkPSJNMTIgMTMuNVYxOWwzLjk3IDIuMzhhMiAyIDAgMCAwIDIuMDYgMGwzLTEuOGEyIDIgMCAwIDAgLjk3LTEuNzF2LTMuMjRhMiAyIDAgMCAwLS45Ny0xLjcxTDE3IDEwLjVsLTUgM1oiIC8+CiAgPHBhdGggZD0ibTE3IDE2LjUtNS0zIiAvPgogIDxwYXRoIGQ9Im0xNyAxNi41IDQuNzQtMi44NSIgLz4KICA8cGF0aCBkPSJNMTcgMTYuNXY1LjE3IiAvPgogIDxwYXRoIGQ9Ik03Ljk3IDQuNDJBMiAyIDAgMCAwIDcgNi4xM3Y0LjM3bDUgMyA1LTNWNi4xM2EyIDIgMCAwIDAtLjk3LTEuNzFsLTMtMS44YTIgMiAwIDAgMC0yLjA2IDBsLTMgMS44WiIgLz4KICA8cGF0aCBkPSJNMTIgOCA3LjI2IDUuMTUiIC8+CiAgPHBhdGggZD0ibTEyIDggNC43NC0yLjg1IiAvPgogIDxwYXRoIGQ9Ik0xMiAxMy41VjgiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/boxes
96
+ * @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
97
+ *
98
+ * @param {Object} props - Lucide icons props and any valid SVG attribute
99
+ * @returns {FunctionalComponent} Svelte component
100
+ *
101
+ */
102
+ props,
103
+ {
104
+ iconNode,
105
+ children: ($$renderer3) => {
106
+ props.children?.($$renderer3);
107
+ $$renderer3.push(`<!---->`);
108
+ },
109
+ $$slots: { default: true }
110
+ }
111
+ ]));
112
+ });
113
+ }
114
+ function Chevron_down($$renderer, $$props) {
115
+ $$renderer.component(($$renderer2) => {
116
+ let { $$slots, $$events, ...props } = $$props;
117
+ const iconNode = [["path", { "d": "m6 9 6 6 6-6" }]];
118
+ Icon($$renderer2, spread_props([
119
+ { name: "chevron-down" },
120
+ /**
121
+ * @component @name ChevronDown
122
+ * @description Lucide SVG icon component, renders SVG Element with children.
123
+ *
124
+ * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtNiA5IDYgNiA2LTYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/chevron-down
125
+ * @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
126
+ *
127
+ * @param {Object} props - Lucide icons props and any valid SVG attribute
128
+ * @returns {FunctionalComponent} Svelte component
129
+ *
130
+ */
131
+ props,
132
+ {
133
+ iconNode,
134
+ children: ($$renderer3) => {
135
+ props.children?.($$renderer3);
136
+ $$renderer3.push(`<!---->`);
137
+ },
138
+ $$slots: { default: true }
139
+ }
140
+ ]));
141
+ });
142
+ }
143
+ function Globe($$renderer, $$props) {
144
+ $$renderer.component(($$renderer2) => {
145
+ let { $$slots, $$events, ...props } = $$props;
146
+ const iconNode = [
147
+ ["circle", { "cx": "12", "cy": "12", "r": "10" }],
148
+ [
149
+ "path",
150
+ { "d": "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" }
151
+ ],
152
+ ["path", { "d": "M2 12h20" }]
153
+ ];
154
+ Icon($$renderer2, spread_props([
155
+ { name: "globe" },
156
+ /**
157
+ * @component @name Globe
158
+ * @description Lucide SVG icon component, renders SVG Element with children.
159
+ *
160
+ * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJNMTIgMmExNC41IDE0LjUgMCAwIDAgMCAyMCAxNC41IDE0LjUgMCAwIDAgMC0yMCIgLz4KICA8cGF0aCBkPSJNMiAxMmgyMCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/globe
161
+ * @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
162
+ *
163
+ * @param {Object} props - Lucide icons props and any valid SVG attribute
164
+ * @returns {FunctionalComponent} Svelte component
165
+ *
166
+ */
167
+ props,
168
+ {
169
+ iconNode,
170
+ children: ($$renderer3) => {
171
+ props.children?.($$renderer3);
172
+ $$renderer3.push(`<!---->`);
173
+ },
174
+ $$slots: { default: true }
175
+ }
176
+ ]));
177
+ });
178
+ }
179
+ function Menu$1($$renderer, $$props) {
180
+ $$renderer.component(($$renderer2) => {
181
+ let { $$slots, $$events, ...props } = $$props;
182
+ const iconNode = [
183
+ ["path", { "d": "M4 5h16" }],
184
+ ["path", { "d": "M4 12h16" }],
185
+ ["path", { "d": "M4 19h16" }]
186
+ ];
187
+ Icon($$renderer2, spread_props([
188
+ { name: "menu" },
189
+ /**
190
+ * @component @name Menu
191
+ * @description Lucide SVG icon component, renders SVG Element with children.
192
+ *
193
+ * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCA1aDE2IiAvPgogIDxwYXRoIGQ9Ik00IDEyaDE2IiAvPgogIDxwYXRoIGQ9Ik00IDE5aDE2IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/menu
194
+ * @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
195
+ *
196
+ * @param {Object} props - Lucide icons props and any valid SVG attribute
197
+ * @returns {FunctionalComponent} Svelte component
198
+ *
199
+ */
200
+ props,
201
+ {
202
+ iconNode,
203
+ children: ($$renderer3) => {
204
+ props.children?.($$renderer3);
205
+ $$renderer3.push(`<!---->`);
206
+ },
207
+ $$slots: { default: true }
208
+ }
209
+ ]));
210
+ });
211
+ }
212
+ function Moon($$renderer, $$props) {
213
+ $$renderer.component(($$renderer2) => {
214
+ let { $$slots, $$events, ...props } = $$props;
215
+ const iconNode = [
216
+ [
217
+ "path",
218
+ {
219
+ "d": "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"
220
+ }
221
+ ]
222
+ ];
223
+ Icon($$renderer2, spread_props([
224
+ { name: "moon" },
225
+ /**
226
+ * @component @name Moon
227
+ * @description Lucide SVG icon component, renders SVG Element with children.
228
+ *
229
+ * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjAuOTg1IDEyLjQ4NmE5IDkgMCAxIDEtOS40NzMtOS40NzJjLjQwNS0uMDIyLjYxNy40Ni40MDIuODAzYTYgNiAwIDAgMCA4LjI2OCA4LjI2OGMuMzQ0LS4yMTUuODI1LS4wMDQuODAzLjQwMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/moon
230
+ * @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
231
+ *
232
+ * @param {Object} props - Lucide icons props and any valid SVG attribute
233
+ * @returns {FunctionalComponent} Svelte component
234
+ *
235
+ */
236
+ props,
237
+ {
238
+ iconNode,
239
+ children: ($$renderer3) => {
240
+ props.children?.($$renderer3);
241
+ $$renderer3.push(`<!---->`);
242
+ },
243
+ $$slots: { default: true }
244
+ }
245
+ ]));
246
+ });
247
+ }
248
+ function Palette($$renderer, $$props) {
249
+ $$renderer.component(($$renderer2) => {
250
+ let { $$slots, $$events, ...props } = $$props;
251
+ const iconNode = [
252
+ [
253
+ "path",
254
+ {
255
+ "d": "M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z"
256
+ }
257
+ ],
258
+ [
259
+ "circle",
260
+ { "cx": "13.5", "cy": "6.5", "r": ".5", "fill": "currentColor" }
261
+ ],
262
+ [
263
+ "circle",
264
+ {
265
+ "cx": "17.5",
266
+ "cy": "10.5",
267
+ "r": ".5",
268
+ "fill": "currentColor"
269
+ }
270
+ ],
271
+ [
272
+ "circle",
273
+ { "cx": "6.5", "cy": "12.5", "r": ".5", "fill": "currentColor" }
274
+ ],
275
+ [
276
+ "circle",
277
+ { "cx": "8.5", "cy": "7.5", "r": ".5", "fill": "currentColor" }
278
+ ]
279
+ ];
280
+ Icon($$renderer2, spread_props([
281
+ { name: "palette" },
282
+ /**
283
+ * @component @name Palette
284
+ * @description Lucide SVG icon component, renders SVG Element with children.
285
+ *
286
+ * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMjJhMSAxIDAgMCAxIDAtMjAgMTAgOSAwIDAgMSAxMCA5IDUgNSAwIDAgMS01IDVoLTIuMjVhMS43NSAxLjc1IDAgMCAwLTEuNCAyLjhsLjMuNGExLjc1IDEuNzUgMCAwIDEtMS40IDIuOHoiIC8+CiAgPGNpcmNsZSBjeD0iMTMuNSIgY3k9IjYuNSIgcj0iLjUiIGZpbGw9ImN1cnJlbnRDb2xvciIgLz4KICA8Y2lyY2xlIGN4PSIxNy41IiBjeT0iMTAuNSIgcj0iLjUiIGZpbGw9ImN1cnJlbnRDb2xvciIgLz4KICA8Y2lyY2xlIGN4PSI2LjUiIGN5PSIxMi41IiByPSIuNSIgZmlsbD0iY3VycmVudENvbG9yIiAvPgogIDxjaXJjbGUgY3g9IjguNSIgY3k9IjcuNSIgcj0iLjUiIGZpbGw9ImN1cnJlbnRDb2xvciIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/palette
287
+ * @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
288
+ *
289
+ * @param {Object} props - Lucide icons props and any valid SVG attribute
290
+ * @returns {FunctionalComponent} Svelte component
291
+ *
292
+ */
293
+ props,
294
+ {
295
+ iconNode,
296
+ children: ($$renderer3) => {
297
+ props.children?.($$renderer3);
298
+ $$renderer3.push(`<!---->`);
299
+ },
300
+ $$slots: { default: true }
301
+ }
302
+ ]));
303
+ });
304
+ }
305
+ function Search($$renderer, $$props) {
306
+ $$renderer.component(($$renderer2) => {
307
+ let { $$slots, $$events, ...props } = $$props;
308
+ const iconNode = [
309
+ ["path", { "d": "m21 21-4.34-4.34" }],
310
+ ["circle", { "cx": "11", "cy": "11", "r": "8" }]
311
+ ];
312
+ Icon($$renderer2, spread_props([
313
+ { name: "search" },
314
+ /**
315
+ * @component @name Search
316
+ * @description Lucide SVG icon component, renders SVG Element with children.
317
+ *
318
+ * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMjEgMjEtNC4zNC00LjM0IiAvPgogIDxjaXJjbGUgY3g9IjExIiBjeT0iMTEiIHI9IjgiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/search
319
+ * @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
320
+ *
321
+ * @param {Object} props - Lucide icons props and any valid SVG attribute
322
+ * @returns {FunctionalComponent} Svelte component
323
+ *
324
+ */
325
+ props,
326
+ {
327
+ iconNode,
328
+ children: ($$renderer3) => {
329
+ props.children?.($$renderer3);
330
+ $$renderer3.push(`<!---->`);
331
+ },
332
+ $$slots: { default: true }
333
+ }
334
+ ]));
335
+ });
336
+ }
337
+ function Sun($$renderer, $$props) {
338
+ $$renderer.component(($$renderer2) => {
339
+ let { $$slots, $$events, ...props } = $$props;
340
+ const iconNode = [
341
+ ["circle", { "cx": "12", "cy": "12", "r": "4" }],
342
+ ["path", { "d": "M12 2v2" }],
343
+ ["path", { "d": "M12 20v2" }],
344
+ ["path", { "d": "m4.93 4.93 1.41 1.41" }],
345
+ ["path", { "d": "m17.66 17.66 1.41 1.41" }],
346
+ ["path", { "d": "M2 12h2" }],
347
+ ["path", { "d": "M20 12h2" }],
348
+ ["path", { "d": "m6.34 17.66-1.41 1.41" }],
349
+ ["path", { "d": "m19.07 4.93-1.41 1.41" }]
350
+ ];
351
+ Icon($$renderer2, spread_props([
352
+ { name: "sun" },
353
+ /**
354
+ * @component @name Sun
355
+ * @description Lucide SVG icon component, renders SVG Element with children.
356
+ *
357
+ * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSI0IiAvPgogIDxwYXRoIGQ9Ik0xMiAydjIiIC8+CiAgPHBhdGggZD0iTTEyIDIwdjIiIC8+CiAgPHBhdGggZD0ibTQuOTMgNC45MyAxLjQxIDEuNDEiIC8+CiAgPHBhdGggZD0ibTE3LjY2IDE3LjY2IDEuNDEgMS40MSIgLz4KICA8cGF0aCBkPSJNMiAxMmgyIiAvPgogIDxwYXRoIGQ9Ik0yMCAxMmgyIiAvPgogIDxwYXRoIGQ9Im02LjM0IDE3LjY2LTEuNDEgMS40MSIgLz4KICA8cGF0aCBkPSJtMTkuMDcgNC45My0xLjQxIDEuNDEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/sun
358
+ * @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
359
+ *
360
+ * @param {Object} props - Lucide icons props and any valid SVG attribute
361
+ * @returns {FunctionalComponent} Svelte component
362
+ *
363
+ */
364
+ props,
365
+ {
366
+ iconNode,
367
+ children: ($$renderer3) => {
368
+ props.children?.($$renderer3);
369
+ $$renderer3.push(`<!---->`);
370
+ },
371
+ $$slots: { default: true }
372
+ }
373
+ ]));
374
+ });
375
+ }
376
+ function User($$renderer, $$props) {
377
+ $$renderer.component(($$renderer2) => {
378
+ let { $$slots, $$events, ...props } = $$props;
379
+ const iconNode = [
380
+ ["path", { "d": "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }],
381
+ ["circle", { "cx": "12", "cy": "7", "r": "4" }]
382
+ ];
383
+ Icon($$renderer2, spread_props([
384
+ { name: "user" },
385
+ /**
386
+ * @component @name User
387
+ * @description Lucide SVG icon component, renders SVG Element with children.
388
+ *
389
+ * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTkgMjF2LTJhNCA0IDAgMCAwLTQtNEg5YTQgNCAwIDAgMC00IDR2MiIgLz4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjciIHI9IjQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/user
390
+ * @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
391
+ *
392
+ * @param {Object} props - Lucide icons props and any valid SVG attribute
393
+ * @returns {FunctionalComponent} Svelte component
394
+ *
395
+ */
396
+ props,
397
+ {
398
+ iconNode,
399
+ children: ($$renderer3) => {
400
+ props.children?.($$renderer3);
401
+ $$renderer3.push(`<!---->`);
402
+ },
403
+ $$slots: { default: true }
404
+ }
405
+ ]));
406
+ });
407
+ }
408
+ function X($$renderer, $$props) {
409
+ $$renderer.component(($$renderer2) => {
410
+ let { $$slots, $$events, ...props } = $$props;
411
+ const iconNode = [
412
+ ["path", { "d": "M18 6 6 18" }],
413
+ ["path", { "d": "m6 6 12 12" }]
414
+ ];
415
+ Icon($$renderer2, spread_props([
416
+ { name: "x" },
417
+ /**
418
+ * @component @name X
419
+ * @description Lucide SVG icon component, renders SVG Element with children.
420
+ *
421
+ * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTggNiA2IDE4IiAvPgogIDxwYXRoIGQ9Im02IDYgMTIgMTIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/x
422
+ * @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
423
+ *
424
+ * @param {Object} props - Lucide icons props and any valid SVG attribute
425
+ * @returns {FunctionalComponent} Svelte component
426
+ *
427
+ */
428
+ props,
429
+ {
430
+ iconNode,
431
+ children: ($$renderer3) => {
432
+ props.children?.($$renderer3);
433
+ $$renderer3.push(`<!---->`);
434
+ },
435
+ $$slots: { default: true }
436
+ }
437
+ ]));
438
+ });
439
+ }
440
+ let appHeaderIdCounter = 0;
441
+ function nextAppHeaderId() {
442
+ return ++appHeaderIdCounter;
443
+ }
444
+ function AppHeader($$renderer, $$props) {
445
+ $$renderer.component(($$renderer2) => {
446
+ let {
447
+ compact = false,
448
+ menuOpen = false,
449
+ onMenuToggle,
450
+ menuLabel = "Menu",
451
+ drawerId,
452
+ brandName,
453
+ productName,
454
+ logoSrc,
455
+ logoAlt = "",
456
+ brandHref = "/",
457
+ brandLabel,
458
+ logo,
459
+ nav,
460
+ actions,
461
+ drawer,
462
+ navAlign = "start",
463
+ brandMode = "icon",
464
+ class: className
465
+ } = $$props;
466
+ const brandBigramme = derived(() => {
467
+ const src = (brandName || "").trim();
468
+ const words = src.split(/\s+/).filter(Boolean);
469
+ if (words.length >= 2) return (words[0][0] + words[1][0]).toUpperCase();
470
+ if (words.length === 1) return src.slice(0, 2).toUpperCase();
471
+ return "";
472
+ });
473
+ const hasDefaultBrand = derived(() => !logo && Boolean(brandName || productName || logoSrc));
474
+ const resolvedBrandLabel = derived(() => brandLabel ?? [brandName, productName].filter(Boolean).join(" "));
475
+ const resolvedDrawerId = run(() => drawerId ?? `st-appHeader-drawer-${nextAppHeaderId()}`);
476
+ const classes = () => ["st-appHeader", className].filter(Boolean).join(" ");
477
+ const barClasses = () => [
478
+ "st-appHeader__bar",
479
+ navAlign === "center" ? "st-appHeader__bar--navCenter" : null
480
+ ].filter(Boolean).join(" ");
481
+ const navClasses = () => [
482
+ "st-appHeader__nav",
483
+ navAlign === "center" ? "st-appHeader__nav--center" : null
484
+ ].filter(Boolean).join(" ");
485
+ $$renderer2.push(`<header${attr_class(clsx(classes()), "svelte-w3i4hh")}><div${attr_class(clsx(barClasses()), "svelte-w3i4hh")}>`);
486
+ if (logo) {
487
+ $$renderer2.push("<!--[0-->");
488
+ $$renderer2.push(`<div class="st-appHeader__logo svelte-w3i4hh">`);
489
+ logo($$renderer2);
490
+ $$renderer2.push(`<!----></div>`);
491
+ } else if (hasDefaultBrand()) {
492
+ $$renderer2.push("<!--[1-->");
493
+ $$renderer2.push(`<a class="st-appHeader__brand svelte-w3i4hh"${attr("href", brandHref)}${attr("aria-label", resolvedBrandLabel() || void 0)}>`);
494
+ if (brandMode === "full") {
495
+ $$renderer2.push("<!--[0-->");
496
+ if (logoSrc) {
497
+ $$renderer2.push("<!--[0-->");
498
+ $$renderer2.push(`<img class="st-appHeader__brandMark svelte-w3i4hh"${attr("src", logoSrc)}${attr("alt", logoAlt)}${attr("aria-hidden", logoAlt ? void 0 : "true")}/>`);
499
+ } else {
500
+ $$renderer2.push("<!--[-1-->");
501
+ }
502
+ $$renderer2.push(`<!--]--> `);
503
+ if (brandName || productName) {
504
+ $$renderer2.push("<!--[0-->");
505
+ $$renderer2.push(`<span class="st-appHeader__brandCopy svelte-w3i4hh">`);
506
+ if (brandName) {
507
+ $$renderer2.push("<!--[0-->");
508
+ $$renderer2.push(`<span class="st-appHeader__brandName svelte-w3i4hh">${escape_html(brandName)}</span>`);
509
+ } else {
510
+ $$renderer2.push("<!--[-1-->");
511
+ }
512
+ $$renderer2.push(`<!--]--> `);
513
+ if (productName) {
514
+ $$renderer2.push("<!--[0-->");
515
+ $$renderer2.push(`<span class="st-appHeader__brandProduct svelte-w3i4hh">${escape_html(productName)}</span>`);
516
+ } else {
517
+ $$renderer2.push("<!--[-1-->");
518
+ }
519
+ $$renderer2.push(`<!--]--></span>`);
520
+ } else {
521
+ $$renderer2.push("<!--[-1-->");
522
+ }
523
+ $$renderer2.push(`<!--]-->`);
524
+ } else {
525
+ $$renderer2.push("<!--[-1-->");
526
+ if (logoSrc) {
527
+ $$renderer2.push("<!--[0-->");
528
+ $$renderer2.push(`<img class="st-appHeader__brandMark svelte-w3i4hh"${attr("src", logoSrc)}${attr("alt", logoAlt)}${attr("aria-hidden", logoAlt ? void 0 : "true")}/>`);
529
+ } else if (brandBigramme()) {
530
+ $$renderer2.push("<!--[1-->");
531
+ $$renderer2.push(`<span class="st-appHeader__brandIconWrap svelte-w3i4hh"><span class="st-appHeader__brandIcon svelte-w3i4hh" aria-hidden="true">${escape_html(brandBigramme())}</span></span>`);
532
+ } else {
533
+ $$renderer2.push("<!--[-1-->");
534
+ }
535
+ $$renderer2.push(`<!--]-->`);
536
+ }
537
+ $$renderer2.push(`<!--]--></a>`);
538
+ } else {
539
+ $$renderer2.push("<!--[-1-->");
540
+ }
541
+ $$renderer2.push(`<!--]--> `);
542
+ if (!compact) {
543
+ $$renderer2.push("<!--[0-->");
544
+ $$renderer2.push(`<nav${attr_class(clsx(navClasses()), "svelte-w3i4hh")} aria-label="Primary">`);
545
+ if (nav) {
546
+ $$renderer2.push("<!--[0-->");
547
+ nav($$renderer2);
548
+ $$renderer2.push(`<!---->`);
549
+ } else {
550
+ $$renderer2.push("<!--[-1-->");
551
+ }
552
+ $$renderer2.push(`<!--]--></nav> <div class="st-appHeader__actions svelte-w3i4hh">`);
553
+ if (actions) {
554
+ $$renderer2.push("<!--[0-->");
555
+ actions($$renderer2);
556
+ $$renderer2.push(`<!---->`);
557
+ } else {
558
+ $$renderer2.push("<!--[-1-->");
559
+ }
560
+ $$renderer2.push(`<!--]--></div>`);
561
+ } else {
562
+ $$renderer2.push("<!--[-1-->");
563
+ $$renderer2.push(`<div class="st-appHeader__burger svelte-w3i4hh"><button type="button" class="st-appHeader__burgerButton svelte-w3i4hh"${attr("aria-label", menuLabel)}${attr("aria-expanded", menuOpen)}${attr("aria-controls", resolvedDrawerId)} aria-haspopup="menu">`);
564
+ if (menuOpen) {
565
+ $$renderer2.push("<!--[0-->");
566
+ X($$renderer2, {
567
+ class: "st-appHeader__burgerIcon",
568
+ size: 20,
569
+ "aria-hidden": "true"
570
+ });
571
+ } else {
572
+ $$renderer2.push("<!--[-1-->");
573
+ Menu$1($$renderer2, {
574
+ class: "st-appHeader__burgerIcon",
575
+ size: 20,
576
+ "aria-hidden": "true"
577
+ });
578
+ }
579
+ $$renderer2.push(`<!--]--></button></div>`);
580
+ }
581
+ $$renderer2.push(`<!--]--></div></header> `);
582
+ if (compact && menuOpen && drawer) {
583
+ $$renderer2.push("<!--[0-->");
584
+ $$renderer2.push(`<button type="button" class="st-appHeader__scrim svelte-w3i4hh"${attr("aria-label", menuLabel)}></button> <aside${attr("id", resolvedDrawerId)} class="st-appHeader__drawer svelte-w3i4hh">`);
585
+ drawer($$renderer2);
586
+ $$renderer2.push(`<!----></aside>`);
587
+ } else {
588
+ $$renderer2.push("<!--[-1-->");
589
+ }
590
+ $$renderer2.push(`<!--]-->`);
591
+ });
592
+ }
593
+ function Alert($$renderer, $$props) {
594
+ $$renderer.component(($$renderer2) => {
595
+ let {
596
+ tone = "info",
597
+ title,
598
+ message,
599
+ class: className,
600
+ actions,
601
+ children,
602
+ $$slots,
603
+ $$events,
604
+ ...rest
605
+ } = $$props;
606
+ const classes = () => ["st-alert", `st-alert--${tone}`, className].filter(Boolean).join(" ");
607
+ const role = () => tone === "error" || tone === "warning" ? "alert" : "status";
608
+ $$renderer2.push(`<section${attributes({ ...rest, class: clsx(classes()), role: role() }, "svelte-1vb1ni1")}><div class="st-alert__content svelte-1vb1ni1"><h2 class="st-alert__title svelte-1vb1ni1">${escape_html(title)}</h2> `);
609
+ if (message) {
610
+ $$renderer2.push("<!--[0-->");
611
+ $$renderer2.push(`<p class="st-alert__message svelte-1vb1ni1">${escape_html(message)}</p>`);
612
+ } else {
613
+ $$renderer2.push("<!--[-1-->");
614
+ }
615
+ $$renderer2.push(`<!--]--> `);
616
+ children?.($$renderer2);
617
+ $$renderer2.push(`<!----></div> `);
618
+ if (actions) {
619
+ $$renderer2.push("<!--[0-->");
620
+ $$renderer2.push(`<div class="st-alert__actions svelte-1vb1ni1">`);
621
+ actions($$renderer2);
622
+ $$renderer2.push(`<!----></div>`);
623
+ } else {
624
+ $$renderer2.push("<!--[-1-->");
625
+ }
626
+ $$renderer2.push(`<!--]--></section>`);
627
+ });
628
+ }
629
+ function deriveInitials(name) {
630
+ const parts = name.trim().split(/\s+/).filter(Boolean);
631
+ if (parts.length === 0) return "?";
632
+ if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase();
633
+ return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
634
+ }
635
+ function Header($$renderer, $$props) {
636
+ $$renderer.component(($$renderer2) => {
637
+ let {
638
+ title,
639
+ label = "Application header",
640
+ sticky = true,
641
+ class: className,
642
+ logo,
643
+ navigation,
644
+ actions,
645
+ children,
646
+ account,
647
+ signInLabel = "Se connecter",
648
+ accountMenu,
649
+ accountMenuOpen = false,
650
+ onAccountTriggerClick,
651
+ onSignIn,
652
+ $$slots,
653
+ $$events,
654
+ ...rest
655
+ } = $$props;
656
+ const classes = () => ["st-header", sticky ? "st-header--sticky" : null, className].filter(Boolean).join(" ");
657
+ const resolvedInitials = derived(() => account ? account.initials?.trim() || deriveInitials(account.name) : "");
658
+ const hasPhoto = derived(() => Boolean(account?.avatarUrl));
659
+ $$renderer2.push(`<header${attributes({ ...rest, class: clsx(classes()), "aria-label": label }, "svelte-1d3rqe2")}><div class="st-header__leading svelte-1d3rqe2">`);
660
+ if (logo) {
661
+ $$renderer2.push("<!--[0-->");
662
+ $$renderer2.push(`<span class="st-header__logo svelte-1d3rqe2">`);
663
+ logo($$renderer2);
664
+ $$renderer2.push(`<!----></span>`);
665
+ } else {
666
+ $$renderer2.push("<!--[-1-->");
667
+ }
668
+ $$renderer2.push(`<!--]--> `);
669
+ if (title) {
670
+ $$renderer2.push("<!--[0-->");
671
+ $$renderer2.push(`<span class="st-header__title svelte-1d3rqe2">${escape_html(title)}</span>`);
672
+ } else {
673
+ $$renderer2.push("<!--[-1-->");
674
+ }
675
+ $$renderer2.push(`<!--]--></div> `);
676
+ if (navigation) {
677
+ $$renderer2.push("<!--[0-->");
678
+ $$renderer2.push(`<nav class="st-header__navigation svelte-1d3rqe2" aria-label="Primary">`);
679
+ navigation($$renderer2);
680
+ $$renderer2.push(`<!----></nav>`);
681
+ } else {
682
+ $$renderer2.push("<!--[-1-->");
683
+ }
684
+ $$renderer2.push(`<!--]--> `);
685
+ if (actions || account || onSignIn) {
686
+ $$renderer2.push("<!--[0-->");
687
+ $$renderer2.push(`<div class="st-header__actions svelte-1d3rqe2">`);
688
+ if (actions) {
689
+ $$renderer2.push("<!--[0-->");
690
+ actions($$renderer2);
691
+ $$renderer2.push(`<!---->`);
692
+ } else {
693
+ $$renderer2.push("<!--[-1-->");
694
+ }
695
+ $$renderer2.push(`<!--]--> `);
696
+ if (account) {
697
+ $$renderer2.push("<!--[0-->");
698
+ $$renderer2.push(`<div class="st-header__account svelte-1d3rqe2"><button type="button" class="st-header__account-trigger svelte-1d3rqe2" aria-haspopup="menu"${attr("aria-expanded", accountMenuOpen)}${attr("aria-label", `Compte de ${account.name}`)}>`);
699
+ if (hasPhoto()) {
700
+ $$renderer2.push("<!--[0-->");
701
+ $$renderer2.push(`<span class="st-header__avatar st-header__avatar--photo svelte-1d3rqe2" aria-hidden="true"><img class="st-header__avatar-image svelte-1d3rqe2"${attr("src", account.avatarUrl)} alt=""/></span>`);
702
+ } else {
703
+ $$renderer2.push("<!--[-1-->");
704
+ $$renderer2.push(`<span class="st-header__avatar st-header__avatar--initials svelte-1d3rqe2" aria-hidden="true">${escape_html(resolvedInitials())}</span>`);
705
+ }
706
+ $$renderer2.push(`<!--]--> <span class="st-header__account-meta svelte-1d3rqe2"><span class="st-header__account-name svelte-1d3rqe2">${escape_html(account.name)}</span> `);
707
+ if (account.email) {
708
+ $$renderer2.push("<!--[0-->");
709
+ $$renderer2.push(`<span class="st-header__account-email svelte-1d3rqe2">${escape_html(account.email)}</span>`);
710
+ } else {
711
+ $$renderer2.push("<!--[-1-->");
712
+ }
713
+ $$renderer2.push(`<!--]--></span> <svg class="st-header__account-caret svelte-1d3rqe2" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="6 9 12 15 18 9"></polyline></svg></button> `);
714
+ if (accountMenu && accountMenuOpen) {
715
+ $$renderer2.push("<!--[0-->");
716
+ $$renderer2.push(`<div class="st-header__account-menu svelte-1d3rqe2" role="menu"${attr("aria-label", `Menu de ${account.name}`)}>`);
717
+ accountMenu($$renderer2);
718
+ $$renderer2.push(`<!----></div>`);
719
+ } else {
720
+ $$renderer2.push("<!--[-1-->");
721
+ }
722
+ $$renderer2.push(`<!--]--></div>`);
723
+ } else if (onSignIn) {
724
+ $$renderer2.push("<!--[1-->");
725
+ $$renderer2.push(`<button type="button" class="st-header__signin svelte-1d3rqe2">${escape_html(signInLabel)}</button>`);
726
+ } else {
727
+ $$renderer2.push("<!--[-1-->");
728
+ }
729
+ $$renderer2.push(`<!--]--></div>`);
730
+ } else {
731
+ $$renderer2.push("<!--[-1-->");
732
+ }
733
+ $$renderer2.push(`<!--]--> `);
734
+ if (children) {
735
+ $$renderer2.push("<!--[0-->");
736
+ children($$renderer2);
737
+ $$renderer2.push(`<!---->`);
738
+ } else {
739
+ $$renderer2.push("<!--[-1-->");
740
+ }
741
+ $$renderer2.push(`<!--]--></header>`);
742
+ });
743
+ }
744
+ function Badge($$renderer, $$props) {
745
+ $$renderer.component(($$renderer2) => {
746
+ let {
747
+ tone = "neutral",
748
+ shape = "pill",
749
+ size = "md",
750
+ class: className,
751
+ children,
752
+ $$slots,
753
+ $$events,
754
+ ...rest
755
+ } = $$props;
756
+ const classes = () => [
757
+ "st-badge",
758
+ `st-badge--${tone}`,
759
+ `st-badge--${shape}`,
760
+ `st-badge--${size}`,
761
+ className
762
+ ].filter(Boolean).join(" ");
763
+ $$renderer2.push(`<span${attributes({ ...rest, class: clsx(classes()) }, "svelte-pdgh8u")}>`);
764
+ children?.($$renderer2);
765
+ $$renderer2.push(`<!----></span>`);
766
+ });
767
+ }
768
+ function Button($$renderer, $$props) {
769
+ $$renderer.component(($$renderer2) => {
770
+ let {
771
+ variant = "primary",
772
+ size = "md",
773
+ disabled = false,
774
+ type = "button",
775
+ class: className,
776
+ children,
777
+ $$slots,
778
+ $$events,
779
+ ...rest
780
+ } = $$props;
781
+ const classes = () => [
782
+ "st-button",
783
+ `st-button--${variant}`,
784
+ `st-button--${size}`,
785
+ className
786
+ ].filter(Boolean).join(" ");
787
+ $$renderer2.push(`<button${attributes({ ...rest, class: clsx(classes()), type, disabled }, "svelte-121ausn")}>`);
788
+ children?.($$renderer2);
789
+ $$renderer2.push(`<!----></button>`);
790
+ });
791
+ }
792
+ function ButtonGroup($$renderer, $$props) {
793
+ $$renderer.component(($$renderer2) => {
794
+ let {
795
+ orientation = "horizontal",
796
+ attached = false,
797
+ gap,
798
+ size = "md",
799
+ label,
800
+ class: className,
801
+ children,
802
+ $$slots,
803
+ $$events,
804
+ ...rest
805
+ } = $$props;
806
+ const classes = derived(() => [
807
+ "st-buttonGroup",
808
+ `st-buttonGroup--${orientation}`,
809
+ attached ? "st-buttonGroup--attached" : null,
810
+ className
811
+ ].filter(Boolean).join(" "));
812
+ const gapValue = derived(() => attached || gap == null ? null : `var(--st-spacing-${gap}, ${gap * 0.25}rem)`);
813
+ $$renderer2.push(`<div${attributes(
814
+ {
815
+ ...rest,
816
+ class: clsx(classes()),
817
+ role: "group",
818
+ "aria-label": label,
819
+ "data-size": size
820
+ },
821
+ "svelte-1q19k9q",
822
+ void 0,
823
+ { gap: gapValue() }
824
+ )}>`);
825
+ children?.($$renderer2);
826
+ $$renderer2.push(`<!----></div>`);
827
+ });
828
+ }
829
+ function Card($$renderer, $$props) {
830
+ $$renderer.component(($$renderer2) => {
831
+ let {
832
+ interactive = false,
833
+ class: className,
834
+ children,
835
+ $$slots,
836
+ $$events,
837
+ ...rest
838
+ } = $$props;
839
+ const classes = () => ["st-card", interactive && "st-card--interactive", className].filter(Boolean).join(" ");
840
+ $$renderer2.push(`<section${attributes({ ...rest, class: clsx(classes()) }, "svelte-mt7xh")}>`);
841
+ children?.($$renderer2);
842
+ $$renderer2.push(`<!----></section>`);
843
+ });
844
+ }
845
+ function IconButton($$renderer, $$props) {
846
+ $$renderer.component(($$renderer2) => {
847
+ let {
848
+ "aria-label": ariaLabel,
849
+ size = "md",
850
+ variant = "ghost",
851
+ type = "button",
852
+ disabled = false,
853
+ class: className,
854
+ children,
855
+ $$slots,
856
+ $$events,
857
+ ...rest
858
+ } = $$props;
859
+ const classes = () => [
860
+ "st-iconButton",
861
+ `st-iconButton--${size}`,
862
+ `st-iconButton--${variant}`,
863
+ className
864
+ ].filter(Boolean).join(" ");
865
+ $$renderer2.push(`<button${attributes(
866
+ {
867
+ ...rest,
868
+ class: clsx(classes()),
869
+ type,
870
+ disabled,
871
+ "aria-label": ariaLabel
872
+ },
873
+ "svelte-iw4na2"
874
+ )}>`);
875
+ children($$renderer2);
876
+ $$renderer2.push(`<!----></button>`);
877
+ });
878
+ }
879
+ function Checkbox($$renderer, $$props) {
880
+ $$renderer.component(($$renderer2) => {
881
+ const uid = props_id($$renderer2);
882
+ let {
883
+ label,
884
+ helperText,
885
+ description,
886
+ trailing,
887
+ invalid = false,
888
+ class: className,
889
+ $$slots,
890
+ $$events,
891
+ ...rest
892
+ } = $$props;
893
+ const descriptionId = `${uid}-description`;
894
+ const describedBy = () => {
895
+ if (!description) return rest["aria-describedby"];
896
+ return [rest["aria-describedby"], descriptionId].filter(Boolean).join(" ");
897
+ };
898
+ const classes = () => [
899
+ "st-choice",
900
+ "st-choice--checkbox",
901
+ description ? "st-choice--described" : null,
902
+ className
903
+ ].filter(Boolean).join(" ");
904
+ $$renderer2.push(`<label${attr_class(clsx(classes()), "svelte-1fxiqve")}><input${attributes(
905
+ {
906
+ ...rest,
907
+ class: "st-choice__input",
908
+ type: "checkbox",
909
+ "aria-invalid": invalid ? "true" : void 0,
910
+ "aria-describedby": describedBy()
911
+ },
912
+ "svelte-1fxiqve",
913
+ void 0,
914
+ void 0,
915
+ 4
916
+ )}/> <span class="st-choice__content svelte-1fxiqve"><span class="st-choice__label svelte-1fxiqve">${escape_html(label)}</span> `);
917
+ if (description) {
918
+ $$renderer2.push("<!--[0-->");
919
+ $$renderer2.push(`<span class="st-choice__description svelte-1fxiqve"${attr("id", descriptionId)}>${escape_html(description)}</span>`);
920
+ } else {
921
+ $$renderer2.push("<!--[-1-->");
922
+ }
923
+ $$renderer2.push(`<!--]--> `);
924
+ if (helperText) {
925
+ $$renderer2.push("<!--[0-->");
926
+ $$renderer2.push(`<span class="st-choice__help svelte-1fxiqve">${escape_html(helperText)}</span>`);
927
+ } else {
928
+ $$renderer2.push("<!--[-1-->");
929
+ }
930
+ $$renderer2.push(`<!--]--></span> `);
931
+ if (trailing) {
932
+ $$renderer2.push("<!--[0-->");
933
+ $$renderer2.push(`<span class="st-choice__trailing svelte-1fxiqve">`);
934
+ trailing($$renderer2);
935
+ $$renderer2.push(`<!----></span>`);
936
+ } else {
937
+ $$renderer2.push("<!--[-1-->");
938
+ }
939
+ $$renderer2.push(`<!--]--></label>`);
940
+ });
941
+ }
942
+ function Container($$renderer, $$props) {
943
+ $$renderer.component(($$renderer2) => {
944
+ let {
945
+ size = "lg",
946
+ padding = true,
947
+ as = "div",
948
+ class: className,
949
+ children,
950
+ $$slots,
951
+ $$events,
952
+ ...rest
953
+ } = $$props;
954
+ const classes = derived(() => [
955
+ "st-container",
956
+ `st-container--${size}`,
957
+ padding && "st-container--padded",
958
+ className
959
+ ].filter(Boolean).join(" "));
960
+ element(
961
+ $$renderer2,
962
+ as,
963
+ () => {
964
+ $$renderer2.push(`${attributes({ ...rest, class: clsx(classes()) }, "svelte-lol6l6")}`);
965
+ },
966
+ () => {
967
+ children?.($$renderer2);
968
+ $$renderer2.push(`<!---->`);
969
+ }
970
+ );
971
+ });
972
+ }
973
+ function ContentSwitcher($$renderer, $$props) {
974
+ $$renderer.component(($$renderer2) => {
975
+ let {
976
+ items,
977
+ value = "",
978
+ label,
979
+ size = "md",
980
+ onchange,
981
+ class: className
982
+ } = $$props;
983
+ const groupClasses = () => [
984
+ "st-contentSwitcher",
985
+ `st-contentSwitcher--${size}`,
986
+ className
987
+ ].filter(Boolean).join(" ");
988
+ $$renderer2.push(`<div${attr_class(clsx(groupClasses()), "svelte-a920rh")} role="tablist"${attr("aria-label", label)}><!--[-->`);
989
+ const each_array = ensure_array_like(items);
990
+ for (let i = 0, $$length = each_array.length; i < $$length; i++) {
991
+ let item = each_array[i];
992
+ const selected = value === item.value;
993
+ $$renderer2.push(`<button type="button"${attr_class("st-contentSwitcher__option svelte-a920rh", void 0, { "st-contentSwitcher__option--selected": selected })} role="tab"${attr("aria-selected", selected ? "true" : "false")}${attr("aria-disabled", item.disabled ? "true" : void 0)}${attr("tabindex", selected ? 0 : -1)}${attr("disabled", item.disabled, true)}>${escape_html(item.label)}</button>`);
994
+ }
995
+ $$renderer2.push(`<!--]--></div>`);
996
+ bind_props($$props, { value });
997
+ });
998
+ }
999
+ const cellDecorationLabel = {
1000
+ positive: "tendance positive",
1001
+ negative: "tendance négative",
1002
+ warning: "avertissement",
1003
+ info: "information",
1004
+ neutral: "neutre"
1005
+ };
1006
+ function cellDecorationClass(intent) {
1007
+ return `st-cell--intent-${intent}`;
1008
+ }
1009
+ const cellDecorationIconNodes = {
1010
+ "trending-up": [
1011
+ ["path", { d: "M16 7h6v6" }],
1012
+ ["path", { d: "m22 7-8.5 8.5-5-5L2 17" }]
1013
+ ],
1014
+ "trending-down": [
1015
+ ["path", { d: "M16 17h6v-6" }],
1016
+ ["path", { d: "m22 17-8.5-8.5-5 5L2 7" }]
1017
+ ],
1018
+ "arrow-up": [
1019
+ ["path", { d: "m5 12 7-7 7 7" }],
1020
+ ["path", { d: "M12 19V5" }]
1021
+ ],
1022
+ "arrow-down": [
1023
+ ["path", { d: "M12 5v14" }],
1024
+ ["path", { d: "m19 12-7 7-7-7" }]
1025
+ ],
1026
+ "triangle-alert": [
1027
+ ["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-3" }],
1028
+ ["path", { d: "M12 9v4" }],
1029
+ ["path", { d: "M12 17h.01" }]
1030
+ ],
1031
+ info: [
1032
+ ["circle", { cx: 12, cy: 12, r: 10 }],
1033
+ ["path", { d: "M12 16v-4" }],
1034
+ ["path", { d: "M12 8h.01" }]
1035
+ ],
1036
+ check: [["path", { d: "M20 6 9 17l-5-5" }]],
1037
+ x: [
1038
+ ["path", { d: "M18 6 6 18" }],
1039
+ ["path", { d: "m6 6 12 12" }]
1040
+ ],
1041
+ minus: [["path", { d: "M5 12h14" }]],
1042
+ "circle-check": [
1043
+ ["path", { d: "M21.801 10A10 10 0 1 1 17 3.335" }],
1044
+ ["path", { d: "m9 11 3 3L22 4" }]
1045
+ ],
1046
+ "circle-alert": [
1047
+ ["circle", { cx: 12, cy: 12, r: 10 }],
1048
+ ["line", { x1: 12, x2: 12, y1: 8, y2: 12 }],
1049
+ ["line", { x1: 12, x2: 12.01, y1: 16, y2: 16 }]
1050
+ ],
1051
+ "circle-x": [
1052
+ ["circle", { cx: 12, cy: 12, r: 10 }],
1053
+ ["path", { d: "m15 9-6 6" }],
1054
+ ["path", { d: "m9 9 6 6" }]
1055
+ ],
1056
+ flame: [["path", { d: "M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4" }]]
1057
+ };
1058
+ function cellDecorationIcon(icon) {
1059
+ if (icon != null && Object.prototype.hasOwnProperty.call(cellDecorationIconNodes, icon)) {
1060
+ return cellDecorationIconNodes[icon];
1061
+ }
1062
+ return null;
1063
+ }
1064
+ function CellDecorationIcon($$renderer, $$props) {
1065
+ $$renderer.component(($$renderer2) => {
1066
+ let { icon } = $$props;
1067
+ const nodes = derived(() => cellDecorationIcon(icon));
1068
+ if (nodes()) {
1069
+ $$renderer2.push("<!--[0-->");
1070
+ $$renderer2.push(`<svg class="st-cell__icon svelte-rs3fow" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><!--[-->`);
1071
+ const each_array = ensure_array_like(nodes());
1072
+ for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
1073
+ let [tag, attrs] = each_array[$$index];
1074
+ if (tag === "path") {
1075
+ $$renderer2.push("<!--[0-->");
1076
+ $$renderer2.push(`<path${attributes({ ...attrs }, "svelte-rs3fow", void 0, void 0, 3)}></path>`);
1077
+ } else if (tag === "circle") {
1078
+ $$renderer2.push("<!--[1-->");
1079
+ $$renderer2.push(`<circle${attributes({ ...attrs }, "svelte-rs3fow", void 0, void 0, 3)}></circle>`);
1080
+ } else if (tag === "line") {
1081
+ $$renderer2.push("<!--[2-->");
1082
+ $$renderer2.push(`<line${attributes({ ...attrs }, "svelte-rs3fow", void 0, void 0, 3)}></line>`);
1083
+ } else {
1084
+ $$renderer2.push("<!--[-1-->");
1085
+ }
1086
+ $$renderer2.push(`<!--]-->`);
1087
+ }
1088
+ $$renderer2.push(`<!--]--></svg>`);
1089
+ } else {
1090
+ $$renderer2.push("<!--[-1-->");
1091
+ }
1092
+ $$renderer2.push(`<!--]-->`);
1093
+ });
1094
+ }
1095
+ function DataTable($$renderer, $$props) {
1096
+ $$renderer.component(($$renderer2) => {
1097
+ let {
1098
+ columns,
1099
+ rows,
1100
+ decorations,
1101
+ caption,
1102
+ size = "md",
1103
+ selectable = "none",
1104
+ selectedIds = [],
1105
+ sortable = true,
1106
+ sortBy = null,
1107
+ pageSize,
1108
+ page = 1,
1109
+ locale = "fr-FR",
1110
+ selectAllLabel = "Select all rows",
1111
+ selectRowLabel = "Select row",
1112
+ sortAscendingLabel = "Sorted ascending",
1113
+ sortDescendingLabel = "Sorted descending",
1114
+ sortNoneLabel = "Not sorted",
1115
+ previousLabel,
1116
+ nextLabel,
1117
+ paginationLabel = "Pagination",
1118
+ rangeLabel = ({ start, end, total }) => `${start}–${end} of ${total}`,
1119
+ emptyLabel = "No data",
1120
+ onRowClick,
1121
+ class: className,
1122
+ $$slots,
1123
+ $$events,
1124
+ ...rest
1125
+ } = $$props;
1126
+ const isFr = derived(() => locale.toLowerCase().startsWith("fr"));
1127
+ const resolvedPreviousLabel = derived(() => previousLabel ?? (isFr() ? "Précédent" : "Previous"));
1128
+ const resolvedNextLabel = derived(() => nextLabel ?? (isFr() ? "Suivant" : "Next"));
1129
+ const classes = () => ["st-dataTable", `st-dataTable--${size}`, className].filter(Boolean).join(" ");
1130
+ const isColumnSortable = (column) => sortable && column.sortable !== false;
1131
+ const sortedRows = derived(() => {
1132
+ if (!sortBy) return rows;
1133
+ const { key, direction } = sortBy;
1134
+ const factor = direction === "asc" ? 1 : -1;
1135
+ const copy = [...rows];
1136
+ copy.sort((a, b) => {
1137
+ const av = a[key];
1138
+ const bv = b[key];
1139
+ if (av == null && bv == null) return 0;
1140
+ if (av == null) return 1;
1141
+ if (bv == null) return -1;
1142
+ if (typeof av === "number" && typeof bv === "number") {
1143
+ return (av - bv) * factor;
1144
+ }
1145
+ const as = String(av);
1146
+ const bs = String(bv);
1147
+ return as.localeCompare(bs, void 0, { numeric: true, sensitivity: "base" }) * factor;
1148
+ });
1149
+ return copy;
1150
+ });
1151
+ const pageCount = derived(() => pageSize && pageSize > 0 ? Math.max(1, Math.ceil(sortedRows().length / pageSize)) : 1);
1152
+ const safePage = derived(() => Math.min(Math.max(1, page), pageCount()));
1153
+ const visibleRows = derived(() => {
1154
+ if (!pageSize || pageSize <= 0) return sortedRows();
1155
+ const start = (safePage() - 1) * pageSize;
1156
+ return sortedRows().slice(start, start + pageSize);
1157
+ });
1158
+ const range = derived(() => {
1159
+ if (!pageSize || pageSize <= 0) {
1160
+ return {
1161
+ start: sortedRows().length === 0 ? 0 : 1,
1162
+ end: sortedRows().length,
1163
+ total: sortedRows().length
1164
+ };
1165
+ }
1166
+ if (sortedRows().length === 0) return { start: 0, end: 0, total: 0 };
1167
+ const start = (safePage() - 1) * pageSize + 1;
1168
+ const end = Math.min(safePage() * pageSize, sortedRows().length);
1169
+ return { start, end, total: sortedRows().length };
1170
+ });
1171
+ const allVisibleSelected = derived(() => selectable === "multiple" && visibleRows().length > 0 && visibleRows().every((row) => selectedIds.includes(row.id)));
1172
+ const someVisibleSelected = derived(() => selectable === "multiple" && visibleRows().some((row) => selectedIds.includes(row.id)) && !allVisibleSelected());
1173
+ function ariaSortFor(column) {
1174
+ if (!isColumnSortable(column)) return void 0;
1175
+ if (sortBy?.key !== column.key) return "none";
1176
+ return sortBy.direction === "asc" ? "ascending" : "descending";
1177
+ }
1178
+ function alignClass(align) {
1179
+ if (align === "center") return "st-dataTable__cell--center";
1180
+ if (align === "end") return "st-dataTable__cell--end";
1181
+ return null;
1182
+ }
1183
+ function cellValue(row, key) {
1184
+ return String(row[key] ?? "");
1185
+ }
1186
+ function resolveDecoration(row, column) {
1187
+ const fromMap = decorations?.[row.id]?.[column.key];
1188
+ if (fromMap) return fromMap;
1189
+ if (column.cellDecoration) {
1190
+ return column.cellDecoration(row, row[column.key], column.key) ?? null;
1191
+ }
1192
+ return null;
1193
+ }
1194
+ function cellClass(column, decoration) {
1195
+ return [
1196
+ alignClass(column.align),
1197
+ decoration && "st-cell",
1198
+ decoration && cellDecorationClass(decoration.intent)
1199
+ ].filter(Boolean).join(" ") || void 0;
1200
+ }
1201
+ $$renderer2.push(`<div class="st-dataTable-wrap svelte-13369qn"><table${attributes({ ...rest, class: clsx(classes()) }, "svelte-13369qn")}>`);
1202
+ if (caption) {
1203
+ $$renderer2.push("<!--[0-->");
1204
+ $$renderer2.push(`<caption class="svelte-13369qn">${escape_html(caption)}</caption>`);
1205
+ } else {
1206
+ $$renderer2.push("<!--[-1-->");
1207
+ }
1208
+ $$renderer2.push(`<!--]--><thead><tr>`);
1209
+ if (selectable === "multiple") {
1210
+ $$renderer2.push("<!--[0-->");
1211
+ $$renderer2.push(`<th scope="col" class="st-dataTable__select svelte-13369qn"><label class="st-dataTable__selectLabel svelte-13369qn"><input type="checkbox"${attr("checked", allVisibleSelected(), true)}${attr("indeterminate", someVisibleSelected(), true)}${attr("aria-label", selectAllLabel)} class="svelte-13369qn"/> <span class="st-visually-hidden svelte-13369qn">${escape_html(selectAllLabel)}</span></label></th>`);
1212
+ } else if (selectable === "single") {
1213
+ $$renderer2.push("<!--[1-->");
1214
+ $$renderer2.push(`<th scope="col" class="st-dataTable__select svelte-13369qn"${attr("aria-label", selectRowLabel)}></th>`);
1215
+ } else {
1216
+ $$renderer2.push("<!--[-1-->");
1217
+ }
1218
+ $$renderer2.push(`<!--]--><!--[-->`);
1219
+ const each_array = ensure_array_like(columns);
1220
+ for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
1221
+ let column = each_array[$$index];
1222
+ const sortState = ariaSortFor(column);
1223
+ const sortableCol = isColumnSortable(column);
1224
+ $$renderer2.push(`<th scope="col"${attr_class(clsx([alignClass(column.align)].filter(Boolean).join(" ") || void 0), "svelte-13369qn")}${attr("aria-sort", sortState)}${attr_style(column.width ? `width: ${column.width}` : void 0)}>`);
1225
+ if (sortableCol) {
1226
+ $$renderer2.push("<!--[0-->");
1227
+ $$renderer2.push(`<button type="button" class="st-dataTable__sortBtn svelte-13369qn"><span>${escape_html(column.label)}</span> <span class="st-dataTable__sortIcon svelte-13369qn" aria-hidden="true">`);
1228
+ if (sortState === "ascending") {
1229
+ $$renderer2.push("<!--[0-->");
1230
+ $$renderer2.push(`↑`);
1231
+ } else if (sortState === "descending") {
1232
+ $$renderer2.push("<!--[1-->");
1233
+ $$renderer2.push(`↓`);
1234
+ } else {
1235
+ $$renderer2.push("<!--[-1-->");
1236
+ $$renderer2.push(`↕`);
1237
+ }
1238
+ $$renderer2.push(`<!--]--></span> <span class="st-visually-hidden svelte-13369qn">`);
1239
+ if (sortState === "ascending") {
1240
+ $$renderer2.push("<!--[0-->");
1241
+ $$renderer2.push(`${escape_html(sortAscendingLabel)}`);
1242
+ } else if (sortState === "descending") {
1243
+ $$renderer2.push("<!--[1-->");
1244
+ $$renderer2.push(`${escape_html(sortDescendingLabel)}`);
1245
+ } else {
1246
+ $$renderer2.push("<!--[-1-->");
1247
+ $$renderer2.push(`${escape_html(sortNoneLabel)}`);
1248
+ }
1249
+ $$renderer2.push(`<!--]--></span></button>`);
1250
+ } else {
1251
+ $$renderer2.push("<!--[-1-->");
1252
+ $$renderer2.push(`${escape_html(column.label)}`);
1253
+ }
1254
+ $$renderer2.push(`<!--]--></th>`);
1255
+ }
1256
+ $$renderer2.push(`<!--]--></tr></thead><tbody class="svelte-13369qn">`);
1257
+ if (visibleRows().length === 0) {
1258
+ $$renderer2.push("<!--[0-->");
1259
+ $$renderer2.push(`<tr class="svelte-13369qn"><td class="st-dataTable__empty svelte-13369qn"${attr("colspan", columns.length + (selectable !== "none" ? 1 : 0))}>${escape_html(emptyLabel)}</td></tr>`);
1260
+ } else {
1261
+ $$renderer2.push("<!--[-1-->");
1262
+ $$renderer2.push(`<!--[-->`);
1263
+ const each_array_1 = ensure_array_like(visibleRows());
1264
+ for (let $$index_2 = 0, $$length = each_array_1.length; $$index_2 < $$length; $$index_2++) {
1265
+ let row = each_array_1[$$index_2];
1266
+ const isSelected = selectedIds.includes(row.id);
1267
+ $$renderer2.push(`<tr${attr_class("svelte-13369qn", void 0, {
1268
+ "st-dataTable__row--selected": isSelected,
1269
+ "st-dataTable__row--clickable": Boolean(onRowClick)
1270
+ })}>`);
1271
+ if (selectable === "multiple") {
1272
+ $$renderer2.push("<!--[0-->");
1273
+ $$renderer2.push(`<td class="st-dataTable__select svelte-13369qn"><label class="st-dataTable__selectLabel svelte-13369qn"><input type="checkbox"${attr("checked", isSelected, true)}${attr("aria-label", `${selectRowLabel} ${row.id}`)} class="svelte-13369qn"/> <span class="st-visually-hidden svelte-13369qn">${escape_html(selectRowLabel)}</span></label></td>`);
1274
+ } else if (selectable === "single") {
1275
+ $$renderer2.push("<!--[1-->");
1276
+ $$renderer2.push(`<td class="st-dataTable__select svelte-13369qn"><label class="st-dataTable__selectLabel svelte-13369qn"><input type="radio" name="st-dataTable-select"${attr("checked", isSelected, true)}${attr("aria-label", `${selectRowLabel} ${row.id}`)} class="svelte-13369qn"/> <span class="st-visually-hidden svelte-13369qn">${escape_html(selectRowLabel)}</span></label></td>`);
1277
+ } else {
1278
+ $$renderer2.push("<!--[-1-->");
1279
+ }
1280
+ $$renderer2.push(`<!--]--><!--[-->`);
1281
+ const each_array_2 = ensure_array_like(columns);
1282
+ for (let $$index_1 = 0, $$length2 = each_array_2.length; $$index_1 < $$length2; $$index_1++) {
1283
+ let column = each_array_2[$$index_1];
1284
+ const decoration = resolveDecoration(row, column);
1285
+ $$renderer2.push(`<td${attr_class(clsx(cellClass(column, decoration)), "svelte-13369qn")}${attr("title", decoration ? cellDecorationLabel[decoration.intent] : void 0)}>`);
1286
+ if (decoration) {
1287
+ $$renderer2.push("<!--[0-->");
1288
+ $$renderer2.push(`<span class="st-cell__content svelte-13369qn">`);
1289
+ CellDecorationIcon($$renderer2, { icon: decoration.icon });
1290
+ $$renderer2.push(`<!----> <span>`);
1291
+ if (column.cell) {
1292
+ $$renderer2.push("<!--[0-->");
1293
+ column.cell($$renderer2, row, column);
1294
+ $$renderer2.push(`<!---->`);
1295
+ } else {
1296
+ $$renderer2.push("<!--[-1-->");
1297
+ $$renderer2.push(`${escape_html(cellValue(row, column.key))}`);
1298
+ }
1299
+ $$renderer2.push(`<!--]--></span> <span class="st-visually-hidden svelte-13369qn">${escape_html(cellDecorationLabel[decoration.intent])}</span></span>`);
1300
+ } else if (column.cell) {
1301
+ $$renderer2.push("<!--[1-->");
1302
+ column.cell($$renderer2, row, column);
1303
+ $$renderer2.push(`<!---->`);
1304
+ } else {
1305
+ $$renderer2.push("<!--[-1-->");
1306
+ $$renderer2.push(`${escape_html(cellValue(row, column.key))}`);
1307
+ }
1308
+ $$renderer2.push(`<!--]--></td>`);
1309
+ }
1310
+ $$renderer2.push(`<!--]--></tr>`);
1311
+ }
1312
+ $$renderer2.push(`<!--]-->`);
1313
+ }
1314
+ $$renderer2.push(`<!--]--></tbody></table> `);
1315
+ if (pageSize && pageSize > 0) {
1316
+ $$renderer2.push("<!--[0-->");
1317
+ $$renderer2.push(`<div class="st-dataTable__footer svelte-13369qn"><span class="st-dataTable__range svelte-13369qn" aria-live="polite">${escape_html(rangeLabel(range()))}</span> <nav class="st-dataTable__pager svelte-13369qn"${attr("aria-label", paginationLabel)}><button type="button" class="st-dataTable__pagerBtn svelte-13369qn"${attr("disabled", safePage() <= 1, true)}>${escape_html(resolvedPreviousLabel())}</button> <span class="st-dataTable__pagerStatus svelte-13369qn" aria-live="polite">${escape_html(safePage())} / ${escape_html(pageCount())}</span> <button type="button" class="st-dataTable__pagerBtn svelte-13369qn"${attr("disabled", safePage() >= pageCount(), true)}>${escape_html(resolvedNextLabel())}</button></nav></div>`);
1318
+ } else {
1319
+ $$renderer2.push("<!--[-1-->");
1320
+ }
1321
+ $$renderer2.push(`<!--]--></div>`);
1322
+ bind_props($$props, { selectedIds, sortBy, page });
1323
+ });
1324
+ }
1325
+ const SPACING_FALLBACK = {
1326
+ 0: "0",
1327
+ 1: "0.25rem",
1328
+ 2: "0.5rem",
1329
+ 3: "0.75rem",
1330
+ 4: "1rem",
1331
+ 5: "1.25rem",
1332
+ 6: "1.5rem",
1333
+ 7: "1.75rem",
1334
+ 8: "2rem",
1335
+ 9: "2.25rem",
1336
+ 10: "2.5rem",
1337
+ 11: "2.75rem",
1338
+ 12: "3rem"
1339
+ };
1340
+ function spacingToken(step) {
1341
+ if (step == null) return void 0;
1342
+ const clamped = Math.max(0, Math.min(12, Math.round(step)));
1343
+ if (clamped === 0) return "0";
1344
+ return `var(--st-spacing-${clamped}, ${SPACING_FALLBACK[clamped]})`;
1345
+ }
1346
+ const ALIGN = {
1347
+ start: "flex-start",
1348
+ center: "center",
1349
+ end: "flex-end",
1350
+ stretch: "stretch",
1351
+ baseline: "baseline"
1352
+ };
1353
+ const JUSTIFY = {
1354
+ start: "flex-start",
1355
+ center: "center",
1356
+ end: "flex-end",
1357
+ between: "space-between",
1358
+ around: "space-around",
1359
+ evenly: "space-evenly"
1360
+ };
1361
+ function alignValue(align) {
1362
+ return align ? ALIGN[align] : void 0;
1363
+ }
1364
+ function justifyValue(justify) {
1365
+ return justify ? JUSTIFY[justify] : void 0;
1366
+ }
1367
+ function Flex($$renderer, $$props) {
1368
+ $$renderer.component(($$renderer2) => {
1369
+ let {
1370
+ direction = "row",
1371
+ gap,
1372
+ align,
1373
+ justify,
1374
+ wrap = false,
1375
+ inline = false,
1376
+ as = "div",
1377
+ class: className,
1378
+ children,
1379
+ $$slots,
1380
+ $$events,
1381
+ ...rest
1382
+ } = $$props;
1383
+ const classes = derived(() => ["st-flex", className].filter(Boolean).join(" "));
1384
+ element(
1385
+ $$renderer2,
1386
+ as,
1387
+ () => {
1388
+ $$renderer2.push(`${attributes({ ...rest, class: clsx(classes()) }, "svelte-94sbko", void 0, {
1389
+ display: inline ? "inline-flex" : "flex",
1390
+ "flex-direction": direction,
1391
+ "flex-wrap": wrap ? "wrap" : "nowrap",
1392
+ "align-items": alignValue(align),
1393
+ "justify-content": justifyValue(justify),
1394
+ gap: spacingToken(gap)
1395
+ })}`);
1396
+ },
1397
+ () => {
1398
+ children?.($$renderer2);
1399
+ $$renderer2.push(`<!---->`);
1400
+ }
1401
+ );
1402
+ });
1403
+ }
1404
+ function EmptyState($$renderer, $$props) {
1405
+ $$renderer.component(($$renderer2) => {
1406
+ let {
1407
+ title,
1408
+ message,
1409
+ class: className,
1410
+ action,
1411
+ children,
1412
+ $$slots,
1413
+ $$events,
1414
+ ...rest
1415
+ } = $$props;
1416
+ const classes = () => ["st-empty-state", className].filter(Boolean).join(" ");
1417
+ $$renderer2.push(`<section${attributes({ ...rest, class: clsx(classes()) }, "svelte-1irw8xl")}><div class="st-empty-state__content svelte-1irw8xl"><h2 class="st-empty-state__title svelte-1irw8xl">${escape_html(title)}</h2> `);
1418
+ if (message) {
1419
+ $$renderer2.push("<!--[0-->");
1420
+ $$renderer2.push(`<p class="st-empty-state__message svelte-1irw8xl">${escape_html(message)}</p>`);
1421
+ } else {
1422
+ $$renderer2.push("<!--[-1-->");
1423
+ }
1424
+ $$renderer2.push(`<!--]--> `);
1425
+ children?.($$renderer2);
1426
+ $$renderer2.push(`<!----></div> `);
1427
+ if (action) {
1428
+ $$renderer2.push("<!--[0-->");
1429
+ $$renderer2.push(`<div class="st-empty-state__action svelte-1irw8xl">`);
1430
+ action($$renderer2);
1431
+ $$renderer2.push(`<!----></div>`);
1432
+ } else {
1433
+ $$renderer2.push("<!--[-1-->");
1434
+ }
1435
+ $$renderer2.push(`<!--]--></section>`);
1436
+ });
1437
+ }
1438
+ let groupIdCounter = 0;
1439
+ function nextGroupId() {
1440
+ groupIdCounter += 1;
1441
+ return `st-menu-group-${groupIdCounter}`;
1442
+ }
1443
+ function Menu($$renderer, $$props) {
1444
+ $$renderer.component(($$renderer2) => {
1445
+ let {
1446
+ label,
1447
+ items,
1448
+ open = true,
1449
+ dismissOnSelect = false,
1450
+ class: className,
1451
+ dense = false,
1452
+ onselect,
1453
+ $$slots,
1454
+ $$events,
1455
+ ...rest
1456
+ } = $$props;
1457
+ const classes = () => ["st-menu", dense ? "st-menu--dense" : null, className].filter(Boolean).join(" ");
1458
+ function isAction(item) {
1459
+ return item.kind === void 0 || item.kind === "item";
1460
+ }
1461
+ if (open) {
1462
+ $$renderer2.push("<!--[0-->");
1463
+ $$renderer2.push(`<div${attributes(
1464
+ {
1465
+ ...rest,
1466
+ class: clsx(classes()),
1467
+ role: "menu",
1468
+ "aria-label": label
1469
+ },
1470
+ "svelte-n7le8g"
1471
+ )}><!--[-->`);
1472
+ const each_array = ensure_array_like(items);
1473
+ for (let index = 0, $$length = each_array.length; index < $$length; index++) {
1474
+ let item = each_array[index];
1475
+ if (isAction(item)) {
1476
+ $$renderer2.push("<!--[0-->");
1477
+ const Icon2 = item.icon;
1478
+ $$renderer2.push(`<button${attr_class("st-menu__item svelte-n7le8g", void 0, { "st-menu__item--danger": item.danger })} type="button" role="menuitem"${attr("aria-disabled", item.disabled ? "true" : void 0)}${attr("disabled", item.disabled, true)}>`);
1479
+ if (Icon2) {
1480
+ $$renderer2.push("<!--[0-->");
1481
+ $$renderer2.push(`<span class="st-menu__itemIcon svelte-n7le8g" aria-hidden="true">`);
1482
+ if (typeof Icon2 === "string") {
1483
+ $$renderer2.push("<!--[0-->");
1484
+ $$renderer2.push(`${escape_html(Icon2)}`);
1485
+ } else {
1486
+ $$renderer2.push("<!--[-1-->");
1487
+ if (Icon2) {
1488
+ $$renderer2.push("<!--[-->");
1489
+ Icon2($$renderer2, { size: 16, strokeWidth: 2 });
1490
+ $$renderer2.push("<!--]-->");
1491
+ } else {
1492
+ $$renderer2.push("<!--[!-->");
1493
+ $$renderer2.push("<!--]-->");
1494
+ }
1495
+ }
1496
+ $$renderer2.push(`<!--]--></span>`);
1497
+ } else {
1498
+ $$renderer2.push("<!--[-1-->");
1499
+ }
1500
+ $$renderer2.push(`<!--]--> <span class="st-menu__itemLabel svelte-n7le8g">${escape_html(item.label)}</span></button>`);
1501
+ } else if (item.kind === "divider") {
1502
+ $$renderer2.push("<!--[1-->");
1503
+ $$renderer2.push(`<div class="st-menu__divider svelte-n7le8g" role="separator" aria-hidden="true"></div>`);
1504
+ } else {
1505
+ $$renderer2.push("<!--[-1-->");
1506
+ const groupId = nextGroupId();
1507
+ $$renderer2.push(`<div class="st-menu__group svelte-n7le8g"${attr("id", groupId)} role="presentation">${escape_html(item.label)}</div>`);
1508
+ }
1509
+ $$renderer2.push(`<!--]-->`);
1510
+ }
1511
+ $$renderer2.push(`<!--]--></div>`);
1512
+ } else {
1513
+ $$renderer2.push("<!--[-1-->");
1514
+ }
1515
+ $$renderer2.push(`<!--]-->`);
1516
+ bind_props($$props, { open });
1517
+ });
1518
+ }
1519
+ function MenuPopover($$renderer, $$props) {
1520
+ $$renderer.component(($$renderer2) => {
1521
+ let {
1522
+ open = false,
1523
+ trigger,
1524
+ placement = "bottom-start",
1525
+ align,
1526
+ label,
1527
+ class: className,
1528
+ closeOnOutside = true,
1529
+ closeOnEscape = true,
1530
+ children,
1531
+ $$slots,
1532
+ $$events,
1533
+ ...rest
1534
+ } = $$props;
1535
+ let top = 0;
1536
+ let left = 0;
1537
+ const classes = () => [
1538
+ "st-menuPopover",
1539
+ `st-menuPopover--${placement}`,
1540
+ null,
1541
+ null,
1542
+ className
1543
+ ].filter(Boolean).join(" ");
1544
+ if (open) {
1545
+ $$renderer2.push("<!--[0-->");
1546
+ $$renderer2.push(`<div${attributes(
1547
+ {
1548
+ ...rest,
1549
+ class: clsx(classes()),
1550
+ role: "dialog",
1551
+ "aria-label": label,
1552
+ style: `top: ${top}px; left: ${left}px;${""}`
1553
+ },
1554
+ "svelte-tp772b"
1555
+ )}>`);
1556
+ children?.($$renderer2);
1557
+ $$renderer2.push(`<!----></div>`);
1558
+ } else {
1559
+ $$renderer2.push("<!--[-1-->");
1560
+ }
1561
+ $$renderer2.push(`<!--]-->`);
1562
+ bind_props($$props, { open });
1563
+ });
1564
+ }
1565
+ function IdentityButton($$renderer, $$props) {
1566
+ $$renderer.component(($$renderer2) => {
1567
+ let {
1568
+ authState = "anonymous",
1569
+ user = null,
1570
+ mode = "icon",
1571
+ tone = "default",
1572
+ signInLabel = "Se connecter",
1573
+ accountLabel = "Compte",
1574
+ onSignIn,
1575
+ onSignOut,
1576
+ menu = []
1577
+ } = $$props;
1578
+ let triggerEl = null;
1579
+ let open = false;
1580
+ const initials = derived(() => user?.name ? user.name.trim().split(/\s+/).map((w) => w[0]).slice(0, 2).join("").toUpperCase() : "");
1581
+ const authed = derived(() => authState === "authenticated");
1582
+ const menuItems = derived(() => [
1583
+ ...menu.map((e) => ({ label: e.label, value: e.href ?? e.label })),
1584
+ ...onSignOut ? [{ label: "Se déconnecter", value: "__signout" }] : []
1585
+ ]);
1586
+ function onMenuSelect(value) {
1587
+ open = false;
1588
+ if (value === "__signout") return onSignOut?.();
1589
+ const entry = menu.find((e) => (e.href ?? e.label) === value);
1590
+ if (entry?.onClick) entry.onClick();
1591
+ else if (entry?.href) location.href = entry.href;
1592
+ }
1593
+ function face($$renderer3) {
1594
+ if (authed() && user?.avatarSrc) {
1595
+ $$renderer3.push("<!--[0-->");
1596
+ $$renderer3.push(`<img class="st-identityBtn__avatar svelte-tcpfp5"${attr("src", user.avatarSrc)} alt="" aria-hidden="true"/>`);
1597
+ } else if (authed() && initials()) {
1598
+ $$renderer3.push("<!--[1-->");
1599
+ $$renderer3.push(`<span class="st-identityBtn__initials svelte-tcpfp5" aria-hidden="true">${escape_html(initials())}</span>`);
1600
+ } else {
1601
+ $$renderer3.push("<!--[-1-->");
1602
+ User($$renderer3, { size: 16, strokeWidth: 2.1, "aria-hidden": "true" });
1603
+ }
1604
+ $$renderer3.push(`<!--]-->`);
1605
+ }
1606
+ let $$settled = true;
1607
+ let $$inner_renderer;
1608
+ function $$render_inner($$renderer3) {
1609
+ $$renderer3.push(`<span${attr_class("st-identityBtn svelte-tcpfp5", void 0, { "st-identityBtn--onColor": tone === "onColor" })}>`);
1610
+ if (mode === "button") {
1611
+ $$renderer3.push("<!--[0-->");
1612
+ Button($$renderer3, {
1613
+ variant: authed() ? "ghost" : "secondary",
1614
+ size: "sm",
1615
+ onclick: () => authed() ? open = !open : onSignIn?.(),
1616
+ children: ($$renderer4) => {
1617
+ face($$renderer4);
1618
+ $$renderer4.push(`<!----> <span>${escape_html(authed() ? user?.name ?? accountLabel : signInLabel)}</span>`);
1619
+ },
1620
+ $$slots: { default: true }
1621
+ });
1622
+ } else if (mode === "menu") {
1623
+ $$renderer3.push("<!--[1-->");
1624
+ $$renderer3.push(`<span class="st-identityBtn__wrap svelte-tcpfp5">`);
1625
+ IconButton($$renderer3, {
1626
+ size: "sm",
1627
+ variant: "ghost",
1628
+ "aria-label": authed() ? accountLabel : signInLabel,
1629
+ onclick: () => open = !open,
1630
+ children: ($$renderer4) => {
1631
+ face($$renderer4);
1632
+ },
1633
+ $$slots: { default: true }
1634
+ });
1635
+ $$renderer3.push(`<!----></span> `);
1636
+ if (menuItems().length) {
1637
+ $$renderer3.push("<!--[0-->");
1638
+ MenuPopover($$renderer3, {
1639
+ trigger: triggerEl,
1640
+ placement: "bottom-end",
1641
+ label: accountLabel,
1642
+ get open() {
1643
+ return open;
1644
+ },
1645
+ set open($$value) {
1646
+ open = $$value;
1647
+ $$settled = false;
1648
+ },
1649
+ children: ($$renderer4) => {
1650
+ Menu($$renderer4, {
1651
+ label: accountLabel,
1652
+ items: menuItems(),
1653
+ onselect: onMenuSelect
1654
+ });
1655
+ },
1656
+ $$slots: { default: true }
1657
+ });
1658
+ } else {
1659
+ $$renderer3.push("<!--[-1-->");
1660
+ }
1661
+ $$renderer3.push(`<!--]-->`);
1662
+ } else {
1663
+ $$renderer3.push("<!--[-1-->");
1664
+ IconButton($$renderer3, {
1665
+ size: "sm",
1666
+ variant: "ghost",
1667
+ "aria-label": authed() ? accountLabel : signInLabel,
1668
+ onclick: () => authed() ? menuItems().length ? open = !open : void 0 : onSignIn?.(),
1669
+ children: ($$renderer4) => {
1670
+ face($$renderer4);
1671
+ },
1672
+ $$slots: { default: true }
1673
+ });
1674
+ }
1675
+ $$renderer3.push(`<!--]--></span>`);
1676
+ }
1677
+ do {
1678
+ $$settled = true;
1679
+ $$inner_renderer = $$renderer2.copy();
1680
+ $$render_inner($$inner_renderer);
1681
+ } while (!$$settled);
1682
+ $$renderer2.subsume($$inner_renderer);
1683
+ });
1684
+ }
1685
+ function AppShell($$renderer, $$props) {
1686
+ $$renderer.component(($$renderer2) => {
1687
+ let {
1688
+ variant,
1689
+ config,
1690
+ topChrome,
1691
+ primaryRail,
1692
+ navigationPanel,
1693
+ main,
1694
+ contextPanel,
1695
+ utilityPanel,
1696
+ bottomPanel,
1697
+ children,
1698
+ mainId = "main",
1699
+ navigationLabel = "Workspace navigation",
1700
+ contextLabel = "Context panel",
1701
+ utilityLabel = "Utility panel",
1702
+ utilityMode = "reserve",
1703
+ utilitySide = "right",
1704
+ class: className
1705
+ } = $$props;
1706
+ const mode = derived(() => variant ?? (config ? "site" : "workspace"));
1707
+ const siteConfig = derived(() => config ?? {
1708
+ brand: { name: "Sentropic" },
1709
+ nav: [],
1710
+ theming: { themes: [], theme: "" }
1711
+ });
1712
+ const brand = derived(() => siteConfig().brand ?? { name: "Sentropic" });
1713
+ const nav = derived(() => Array.isArray(siteConfig().nav) ? siteConfig().nav : []);
1714
+ const t = derived(() => siteConfig().theming ?? { themes: [], theme: "" });
1715
+ const siteClasses = derived(() => ["st-shell", className].filter(Boolean).join(" "));
1716
+ const workspaceClasses = derived(() => ["st-appShell", "st-appShell--workspace", className].filter(Boolean).join(" "));
1717
+ const isActive = (item) => item.active != null ? item.active : siteConfig().activePath != null && (item.href === siteConfig().activePath || item.href !== "/" && (siteConfig().activePath ?? "").startsWith(item.href));
1718
+ const themeItems = derived(() => (t().themes ?? []).map((o) => ({ label: o.label, value: o.id })));
1719
+ const fwItems = derived(() => (siteConfig().frameworkSwitcher?.available ?? []).map((o) => ({ label: o.label, value: o.id })));
1720
+ const localeItems = derived(() => (siteConfig().locale?.available ?? []).map((o) => ({ label: o.label, value: o.code })));
1721
+ const fwLabel = derived(() => (siteConfig().frameworkSwitcher?.available ?? []).find((o) => o.id === siteConfig().frameworkSwitcher?.current)?.label ?? "");
1722
+ const themeLabel = derived(() => (t().themes ?? []).find((o) => o.id === t().theme)?.label ?? "");
1723
+ let themeEl = null;
1724
+ let fwEl = null;
1725
+ let localeEl = null;
1726
+ let themeOpen = false;
1727
+ let fwOpen = false;
1728
+ let localeOpen = false;
1729
+ function cycleColorMode() {
1730
+ const cur = t().colorMode;
1731
+ t().onColorModeChange?.(cur === "light" ? "dark" : cur === "dark" ? "auto" : "light");
1732
+ }
1733
+ function logo($$renderer3) {
1734
+ $$renderer3.push(`<a class="st-shell__brand svelte-do0njo"${attr("href", brand().href ?? "/")}${attr("aria-label", brand().label ?? [brand().name, brand().productName].filter(Boolean).join(" "))}>`);
1735
+ if (brand().logoSrc) {
1736
+ $$renderer3.push("<!--[0-->");
1737
+ $$renderer3.push(`<img class="st-shell__brandMark svelte-do0njo"${attr("src", brand().logoSrc)} alt="" aria-hidden="true"/>`);
1738
+ } else {
1739
+ $$renderer3.push("<!--[-1-->");
1740
+ }
1741
+ $$renderer3.push(`<!--]--> <span class="st-shell__brandCopy svelte-do0njo">`);
1742
+ if (brand().name) {
1743
+ $$renderer3.push("<!--[0-->");
1744
+ $$renderer3.push(`<span class="st-shell__brandName svelte-do0njo">${escape_html(brand().name)}</span>`);
1745
+ } else {
1746
+ $$renderer3.push("<!--[-1-->");
1747
+ }
1748
+ $$renderer3.push(`<!--]--> `);
1749
+ if (brand().productName) {
1750
+ $$renderer3.push("<!--[0-->");
1751
+ $$renderer3.push(`<span class="st-shell__brandProduct svelte-do0njo">${escape_html(brand().productName)}</span>`);
1752
+ } else {
1753
+ $$renderer3.push("<!--[-1-->");
1754
+ }
1755
+ $$renderer3.push(`<!--]--></span></a>`);
1756
+ }
1757
+ function navigation($$renderer3) {
1758
+ $$renderer3.push(`<nav class="st-shell__nav svelte-do0njo"${attr("aria-label", siteConfig().navLabel ?? "Navigation")}><!--[-->`);
1759
+ const each_array = ensure_array_like(nav());
1760
+ for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
1761
+ let item = each_array[$$index];
1762
+ $$renderer3.push(`<a class="st-shell__navLink svelte-do0njo"${attr("href", item.href)}${attr("aria-current", isActive(item) ? "page" : void 0)}>${escape_html(item.label)}</a>`);
1763
+ }
1764
+ $$renderer3.push(`<!--]--></nav>`);
1765
+ }
1766
+ function actions($$renderer3) {
1767
+ $$renderer3.push(`<div class="st-shell__actions svelte-do0njo">`);
1768
+ if (siteConfig().search?.enabled) {
1769
+ $$renderer3.push("<!--[0-->");
1770
+ Button($$renderer3, {
1771
+ variant: "secondary",
1772
+ size: "sm",
1773
+ class: "st-shell__search",
1774
+ onclick: () => siteConfig().search?.onSearch?.(""),
1775
+ children: ($$renderer4) => {
1776
+ Search($$renderer4, { size: 16, strokeWidth: 2.1, "aria-hidden": "true" });
1777
+ $$renderer4.push(`<!----> <span>${escape_html(siteConfig().search.placeholder ?? "Rechercher…")}</span> <kbd class="st-shell__kbd svelte-do0njo">/</kbd>`);
1778
+ },
1779
+ $$slots: { default: true }
1780
+ });
1781
+ } else {
1782
+ $$renderer3.push("<!--[-1-->");
1783
+ }
1784
+ $$renderer3.push(`<!--]--> `);
1785
+ if (siteConfig().frameworkSwitcher?.enabled) {
1786
+ $$renderer3.push("<!--[0-->");
1787
+ $$renderer3.push(`<span class="st-shell__menuWrap svelte-do0njo">`);
1788
+ Button($$renderer3, {
1789
+ variant: "secondary",
1790
+ size: "sm",
1791
+ class: "st-shell__switch",
1792
+ onclick: () => fwOpen = !fwOpen,
1793
+ "aria-haspopup": "menu",
1794
+ "aria-expanded": fwOpen,
1795
+ children: ($$renderer4) => {
1796
+ Boxes($$renderer4, { size: 14, "aria-hidden": "true" });
1797
+ $$renderer4.push(`<!----><span>${escape_html(fwLabel())}</span>`);
1798
+ Chevron_down($$renderer4, { size: 14, "aria-hidden": "true" });
1799
+ $$renderer4.push(`<!---->`);
1800
+ },
1801
+ $$slots: { default: true }
1802
+ });
1803
+ $$renderer3.push(`<!----></span> `);
1804
+ MenuPopover($$renderer3, {
1805
+ trigger: fwEl,
1806
+ placement: "bottom-end",
1807
+ label: "Framework",
1808
+ get open() {
1809
+ return fwOpen;
1810
+ },
1811
+ set open($$value) {
1812
+ fwOpen = $$value;
1813
+ $$settled = false;
1814
+ },
1815
+ children: ($$renderer4) => {
1816
+ Menu($$renderer4, {
1817
+ label: "Framework",
1818
+ items: fwItems(),
1819
+ onselect: (v) => {
1820
+ siteConfig().frameworkSwitcher?.onChange?.(v);
1821
+ fwOpen = false;
1822
+ }
1823
+ });
1824
+ },
1825
+ $$slots: { default: true }
1826
+ });
1827
+ $$renderer3.push(`<!---->`);
1828
+ } else {
1829
+ $$renderer3.push("<!--[-1-->");
1830
+ }
1831
+ $$renderer3.push(`<!--]--> `);
1832
+ if ((t().themes ?? []).length) {
1833
+ $$renderer3.push("<!--[0-->");
1834
+ $$renderer3.push(`<span class="st-shell__menuWrap svelte-do0njo">`);
1835
+ Button($$renderer3, {
1836
+ variant: "secondary",
1837
+ size: "sm",
1838
+ class: "st-shell__switch",
1839
+ onclick: () => themeOpen = !themeOpen,
1840
+ "aria-haspopup": "menu",
1841
+ "aria-expanded": themeOpen,
1842
+ children: ($$renderer4) => {
1843
+ Palette($$renderer4, { size: 14, "aria-hidden": "true" });
1844
+ $$renderer4.push(`<!----><span>${escape_html(themeLabel())}</span>`);
1845
+ Chevron_down($$renderer4, { size: 14, "aria-hidden": "true" });
1846
+ $$renderer4.push(`<!---->`);
1847
+ },
1848
+ $$slots: { default: true }
1849
+ });
1850
+ $$renderer3.push(`<!----></span> `);
1851
+ MenuPopover($$renderer3, {
1852
+ trigger: themeEl,
1853
+ placement: "bottom-end",
1854
+ label: t().themeLabel ?? "Thème",
1855
+ get open() {
1856
+ return themeOpen;
1857
+ },
1858
+ set open($$value) {
1859
+ themeOpen = $$value;
1860
+ $$settled = false;
1861
+ },
1862
+ children: ($$renderer4) => {
1863
+ Menu($$renderer4, {
1864
+ label: t().themeLabel ?? "Thème",
1865
+ items: themeItems(),
1866
+ onselect: (v) => {
1867
+ t().onThemeChange?.(v);
1868
+ themeOpen = false;
1869
+ }
1870
+ });
1871
+ },
1872
+ $$slots: { default: true }
1873
+ });
1874
+ $$renderer3.push(`<!---->`);
1875
+ } else {
1876
+ $$renderer3.push("<!--[-1-->");
1877
+ }
1878
+ $$renderer3.push(`<!--]--> `);
1879
+ if (t().colorMode) {
1880
+ $$renderer3.push("<!--[0-->");
1881
+ IconButton($$renderer3, {
1882
+ size: "sm",
1883
+ variant: "ghost",
1884
+ "aria-label": "Mode couleur",
1885
+ onclick: cycleColorMode,
1886
+ children: ($$renderer4) => {
1887
+ if (t().colorMode === "dark") {
1888
+ $$renderer4.push("<!--[0-->");
1889
+ Moon($$renderer4, { size: 16, "aria-hidden": "true" });
1890
+ } else {
1891
+ $$renderer4.push("<!--[-1-->");
1892
+ Sun($$renderer4, { size: 16, "aria-hidden": "true" });
1893
+ }
1894
+ $$renderer4.push(`<!--]-->`);
1895
+ },
1896
+ $$slots: { default: true }
1897
+ });
1898
+ } else {
1899
+ $$renderer3.push("<!--[-1-->");
1900
+ }
1901
+ $$renderer3.push(`<!--]--> `);
1902
+ if (siteConfig().locale) {
1903
+ $$renderer3.push("<!--[0-->");
1904
+ $$renderer3.push(`<span class="st-shell__menuWrap svelte-do0njo">`);
1905
+ Button($$renderer3, {
1906
+ variant: "secondary",
1907
+ size: "sm",
1908
+ class: "st-shell__switch",
1909
+ onclick: () => localeOpen = !localeOpen,
1910
+ "aria-haspopup": "menu",
1911
+ "aria-expanded": localeOpen,
1912
+ children: ($$renderer4) => {
1913
+ Globe($$renderer4, { size: 14, "aria-hidden": "true" });
1914
+ $$renderer4.push(`<!----><span>${escape_html((siteConfig().locale.current ?? "").toUpperCase())}</span>`);
1915
+ Chevron_down($$renderer4, { size: 14, "aria-hidden": "true" });
1916
+ $$renderer4.push(`<!---->`);
1917
+ },
1918
+ $$slots: { default: true }
1919
+ });
1920
+ $$renderer3.push(`<!----></span> `);
1921
+ MenuPopover($$renderer3, {
1922
+ trigger: localeEl,
1923
+ placement: "bottom-end",
1924
+ label: siteConfig().locale.label ?? "Langue",
1925
+ get open() {
1926
+ return localeOpen;
1927
+ },
1928
+ set open($$value) {
1929
+ localeOpen = $$value;
1930
+ $$settled = false;
1931
+ },
1932
+ children: ($$renderer4) => {
1933
+ Menu($$renderer4, {
1934
+ label: siteConfig().locale.label ?? "Langue",
1935
+ items: localeItems(),
1936
+ onselect: (v) => {
1937
+ siteConfig().locale?.onChange?.(v);
1938
+ localeOpen = false;
1939
+ }
1940
+ });
1941
+ },
1942
+ $$slots: { default: true }
1943
+ });
1944
+ $$renderer3.push(`<!---->`);
1945
+ } else {
1946
+ $$renderer3.push("<!--[-1-->");
1947
+ }
1948
+ $$renderer3.push(`<!--]--> `);
1949
+ if (siteConfig().identity) {
1950
+ $$renderer3.push("<!--[0-->");
1951
+ IdentityButton($$renderer3, {
1952
+ mode: "icon",
1953
+ authState: siteConfig().identity.state,
1954
+ user: siteConfig().identity.user ?? null,
1955
+ signInLabel: siteConfig().identity.label ?? "Se connecter",
1956
+ onSignIn: () => siteConfig().identity?.onSignIn?.(),
1957
+ onSignOut: () => siteConfig().identity?.onSignOut?.(),
1958
+ menu: siteConfig().identity.menu ?? []
1959
+ });
1960
+ } else {
1961
+ $$renderer3.push("<!--[-1-->");
1962
+ }
1963
+ $$renderer3.push(`<!--]--></div>`);
1964
+ }
1965
+ let $$settled = true;
1966
+ let $$inner_renderer;
1967
+ function $$render_inner($$renderer3) {
1968
+ if (mode() === "workspace") {
1969
+ $$renderer3.push("<!--[0-->");
1970
+ $$renderer3.push(`<div${attr_class(clsx(workspaceClasses()), "svelte-do0njo")} data-st-app-shell-variant="workspace"${attr("data-utility-mode", utilityMode)}${attr("data-utility-side", utilitySide)}>`);
1971
+ if (topChrome) {
1972
+ $$renderer3.push("<!--[0-->");
1973
+ $$renderer3.push(`<div class="st-appShell__topChrome svelte-do0njo">`);
1974
+ topChrome($$renderer3);
1975
+ $$renderer3.push(`<!----></div>`);
1976
+ } else {
1977
+ $$renderer3.push("<!--[-1-->");
1978
+ }
1979
+ $$renderer3.push(`<!--]--> <div class="st-appShell__body svelte-do0njo">`);
1980
+ if (primaryRail) {
1981
+ $$renderer3.push("<!--[0-->");
1982
+ $$renderer3.push(`<aside class="st-appShell__primaryRail svelte-do0njo" aria-label="Primary rail">`);
1983
+ primaryRail($$renderer3);
1984
+ $$renderer3.push(`<!----></aside>`);
1985
+ } else {
1986
+ $$renderer3.push("<!--[-1-->");
1987
+ }
1988
+ $$renderer3.push(`<!--]--> `);
1989
+ if (navigationPanel) {
1990
+ $$renderer3.push("<!--[0-->");
1991
+ $$renderer3.push(`<aside class="st-appShell__navigationPanel svelte-do0njo"${attr("aria-label", navigationLabel)}>`);
1992
+ navigationPanel($$renderer3);
1993
+ $$renderer3.push(`<!----></aside>`);
1994
+ } else {
1995
+ $$renderer3.push("<!--[-1-->");
1996
+ }
1997
+ $$renderer3.push(`<!--]--> <main class="st-appShell__main svelte-do0njo"${attr("id", mainId)}>`);
1998
+ if (main) {
1999
+ $$renderer3.push("<!--[0-->");
2000
+ main($$renderer3);
2001
+ $$renderer3.push(`<!---->`);
2002
+ } else if (children) {
2003
+ $$renderer3.push("<!--[1-->");
2004
+ children($$renderer3);
2005
+ $$renderer3.push(`<!---->`);
2006
+ } else {
2007
+ $$renderer3.push("<!--[-1-->");
2008
+ }
2009
+ $$renderer3.push(`<!--]--></main> `);
2010
+ if (contextPanel) {
2011
+ $$renderer3.push("<!--[0-->");
2012
+ $$renderer3.push(`<aside class="st-appShell__contextPanel svelte-do0njo"${attr("aria-label", contextLabel)}>`);
2013
+ contextPanel($$renderer3);
2014
+ $$renderer3.push(`<!----></aside>`);
2015
+ } else {
2016
+ $$renderer3.push("<!--[-1-->");
2017
+ }
2018
+ $$renderer3.push(`<!--]--> `);
2019
+ if (utilityPanel) {
2020
+ $$renderer3.push("<!--[0-->");
2021
+ $$renderer3.push(`<aside class="st-appShell__utilityPanel svelte-do0njo"${attr("aria-label", utilityLabel)}>`);
2022
+ utilityPanel($$renderer3);
2023
+ $$renderer3.push(`<!----></aside>`);
2024
+ } else {
2025
+ $$renderer3.push("<!--[-1-->");
2026
+ }
2027
+ $$renderer3.push(`<!--]--></div> `);
2028
+ if (bottomPanel) {
2029
+ $$renderer3.push("<!--[0-->");
2030
+ $$renderer3.push(`<section class="st-appShell__bottomPanel svelte-do0njo" aria-label="Workspace tools">`);
2031
+ bottomPanel($$renderer3);
2032
+ $$renderer3.push(`<!----></section>`);
2033
+ } else {
2034
+ $$renderer3.push("<!--[-1-->");
2035
+ }
2036
+ $$renderer3.push(`<!--]--></div>`);
2037
+ } else {
2038
+ $$renderer3.push("<!--[-1-->");
2039
+ Header($$renderer3, {
2040
+ class: siteClasses(),
2041
+ label: siteConfig().brand?.label ?? "Navigation",
2042
+ logo,
2043
+ navigation,
2044
+ actions
2045
+ });
2046
+ }
2047
+ $$renderer3.push(`<!--]-->`);
2048
+ }
2049
+ do {
2050
+ $$settled = true;
2051
+ $$inner_renderer = $$renderer2.copy();
2052
+ $$render_inner($$inner_renderer);
2053
+ } while (!$$settled);
2054
+ $$renderer2.subsume($$inner_renderer);
2055
+ });
2056
+ }
2057
+ function subjectCell($$renderer, row) {
2058
+ $$renderer.push(`<div><div style="font-weight:600; line-height:1.35">${escape_html(row.subject)}</div> `);
2059
+ if (row.gate) {
2060
+ $$renderer.push("<!--[0-->");
2061
+ $$renderer.push(`<div style="font-size:.82em; opacity:.72; margin-top:3px">${escape_html(row.gate)}</div>`);
2062
+ } else {
2063
+ $$renderer.push("<!--[-1-->");
2064
+ }
2065
+ $$renderer.push(`<!--]--> `);
2066
+ if (row.wp) {
2067
+ $$renderer.push("<!--[0-->");
2068
+ $$renderer.push(`<div style="font-size:.75em; opacity:.5; margin-top:3px">${escape_html(row.wp)}</div>`);
2069
+ } else {
2070
+ $$renderer.push("<!--[-1-->");
2071
+ }
2072
+ $$renderer.push(`<!--]--></div>`);
2073
+ }
2074
+ function actionCell($$renderer, row) {
2075
+ $$renderer.push(`<div><div>${escape_html(row.action)}</div> `);
2076
+ if (row.fanIn) {
2077
+ $$renderer.push("<!--[0-->");
2078
+ $$renderer.push(`<div style="font-size:.78em; opacity:.7; margin-top:3px">Débloque ${escape_html(row.fanIn)} autre(s)</div>`);
2079
+ } else {
2080
+ $$renderer.push("<!--[-1-->");
2081
+ }
2082
+ $$renderer.push(`<!--]--></div>`);
2083
+ }
2084
+ function actorCell($$renderer, row) {
2085
+ Flex($$renderer, {
2086
+ direction: "column",
2087
+ gap: 1,
2088
+ align: "start",
2089
+ children: ($$renderer2) => {
2090
+ $$renderer2.push(`<span>${escape_html(row.actor)}</span> `);
2091
+ Badge($$renderer2, {
2092
+ tone: row.nature === "Décision" ? "info" : "neutral",
2093
+ size: "sm",
2094
+ children: ($$renderer3) => {
2095
+ $$renderer3.push(`<!---->${escape_html(row.nature)}`);
2096
+ },
2097
+ $$slots: { default: true }
2098
+ });
2099
+ $$renderer2.push(`<!---->`);
2100
+ },
2101
+ $$slots: { default: true }
2102
+ });
2103
+ }
2104
+ function doneTitleCell($$renderer, row) {
2105
+ $$renderer.push(`<div><div style="line-height:1.35">${escape_html(row.title)}</div> `);
2106
+ if (row.summary) {
2107
+ $$renderer.push("<!--[0-->");
2108
+ $$renderer.push(`<div style="font-size:.8em; opacity:.72; margin-top:3px; line-height:1.35">${escape_html(row.summary)}</div>`);
2109
+ } else {
2110
+ $$renderer.push("<!--[-1-->");
2111
+ }
2112
+ $$renderer.push(`<!--]--> `);
2113
+ if (row.acceptance) {
2114
+ $$renderer.push("<!--[0-->");
2115
+ $$renderer.push(`<div${attr_style(`font-size:.76em; margin-top:3px; opacity:.7; color:${row.acceptance.includes("échec") ? "var(--st-color-danger-fg, #c0392b)" : "inherit"}`)}>${escape_html(row.acceptance)}</div>`);
2116
+ } else {
2117
+ $$renderer.push("<!--[-1-->");
2118
+ }
2119
+ $$renderer.push(`<!--]--></div>`);
2120
+ }
2121
+ function _page($$renderer, $$props) {
2122
+ $$renderer.component(($$renderer2) => {
2123
+ let { data } = $$props;
2124
+ const focus = data.focus;
2125
+ function badgeTone(t) {
2126
+ return {
2127
+ critical: "error",
2128
+ warning: "warning",
2129
+ info: "info",
2130
+ neutral: "neutral",
2131
+ positive: "success"
2132
+ }[t];
2133
+ }
2134
+ const todos = focus.ok ? focus.todos : [];
2135
+ const precos = focus.ok ? focus.precos : [];
2136
+ const decisions = focus.ok ? focus.decisions : [];
2137
+ const done = focus.ok ? focus.done : [];
2138
+ const counts = focus.ok ? focus.counts : { done: 0, todo: 0, decisions: 0 };
2139
+ const keystone = focus.ok ? focus.keystone : void 0;
2140
+ const repo = focus.ok ? focus.repo : "";
2141
+ const lastReleaseAt = focus.ok ? focus.lastReleaseAt : void 0;
2142
+ const allWps = [
2143
+ ...new Set([...todos, ...done].map((r) => r.wp).filter((w) => !!w))
2144
+ ].sort((a, b) => a.localeCompare(b, void 0, { numeric: true }));
2145
+ let wpFilter = "tous";
2146
+ const matchWp = (w) => wpFilter === "tous" || w === wpFilter;
2147
+ const todosShown = derived(() => todos.filter((t) => matchWp(t.wp)));
2148
+ const launchableIds = derived(() => todosShown().filter((t) => t.launchable).map((t) => t.id));
2149
+ let period = "mois";
2150
+ function withinPeriod(iso) {
2151
+ if (period === "tout") return true;
2152
+ if (!iso) return false;
2153
+ if (period === "dev") return lastReleaseAt ? Date.parse(iso) >= Date.parse(lastReleaseAt) : false;
2154
+ const days = (Date.now() - Date.parse(iso)) / 864e5;
2155
+ return period === "jour" ? days < 1 : period === "semaine" ? days < 7 : days < 31;
2156
+ }
2157
+ const periodItems = [
2158
+ { value: "jour", label: "Jour" },
2159
+ { value: "semaine", label: "Semaine" },
2160
+ { value: "mois", label: "Mois" },
2161
+ ...lastReleaseAt ? [{ value: "dev", label: "Depuis dev" }] : [],
2162
+ { value: "tout", label: "Tout" }
2163
+ ];
2164
+ const doneShown = derived(() => done.filter((d) => withinPeriod(d.doneAt) && matchWp(d.wp)));
2165
+ let selected = [];
2166
+ let launching = false;
2167
+ let launchResult = null;
2168
+ function toggle(id, on) {
2169
+ if (on) selected = selected.includes(id) ? selected : [...selected, id];
2170
+ else selected = selected.filter((x) => x !== id);
2171
+ }
2172
+ const selectAll = () => selected = [...launchableIds()];
2173
+ const clearSel = () => selected = [];
2174
+ async function launch() {
2175
+ if (selected.length === 0) return;
2176
+ launching = true;
2177
+ launchResult = null;
2178
+ try {
2179
+ const res = await fetch("/api/actions/launch", {
2180
+ method: "POST",
2181
+ headers: { "content-type": "application/json" },
2182
+ body: JSON.stringify({ ids: selected })
2183
+ });
2184
+ launchResult = await res.json();
2185
+ } catch (e) {
2186
+ launchResult = { ok: false, error: String(e) };
2187
+ } finally {
2188
+ launching = false;
2189
+ }
2190
+ }
2191
+ const todoColumns = derived(() => [
2192
+ {
2193
+ key: "sel",
2194
+ label: "",
2195
+ width: "3.25rem",
2196
+ sortable: false,
2197
+ cell: selCell
2198
+ },
2199
+ { key: "subject", label: "Sujet", cell: subjectCell },
2200
+ { key: "action", label: "Action concrète", cell: actionCell },
2201
+ {
2202
+ key: "actor",
2203
+ label: "Acteur",
2204
+ width: "11rem",
2205
+ cell: actorCell
2206
+ },
2207
+ {
2208
+ key: "badge",
2209
+ label: "Priorité",
2210
+ width: "8.5rem",
2211
+ sortable: false,
2212
+ cell: prioCell
2213
+ }
2214
+ ]);
2215
+ const doneColumns = [
2216
+ { key: "title", label: "Sujet", cell: doneTitleCell },
2217
+ { key: "wp", label: "WP", width: "6rem", sortable: true },
2218
+ { key: "kind", label: "Type", width: "7.5rem", sortable: true },
2219
+ { key: "ago", label: "Réalisé", width: "8rem" }
2220
+ ];
2221
+ let injecting = null;
2222
+ let injectResult = {};
2223
+ async function injectDecision(id) {
2224
+ injecting = id;
2225
+ try {
2226
+ const res = await fetch("/api/decisions/inject", {
2227
+ method: "POST",
2228
+ headers: { "content-type": "application/json" },
2229
+ body: JSON.stringify({ id })
2230
+ });
2231
+ injectResult = { ...injectResult, [id]: await res.json() };
2232
+ } catch (e) {
2233
+ injectResult = { ...injectResult, [id]: { ok: false, error: String(e) } };
2234
+ } finally {
2235
+ injecting = null;
2236
+ }
2237
+ }
2238
+ function selCell($$renderer3, row) {
2239
+ if (row.launchable) {
2240
+ $$renderer3.push("<!--[0-->");
2241
+ Checkbox($$renderer3, {
2242
+ label: `Sélectionner : ${row.subject}`,
2243
+ checked: selected.includes(row.id),
2244
+ onchange: (e) => toggle(row.id, e.currentTarget.checked)
2245
+ });
2246
+ } else {
2247
+ $$renderer3.push("<!--[-1-->");
2248
+ $$renderer3.push(`<span title="Non lançable par un sous-agent (requiert un humain ou un partenaire)" style="opacity:.4">—</span>`);
2249
+ }
2250
+ $$renderer3.push(`<!--]-->`);
2251
+ }
2252
+ function prioCell($$renderer3, row) {
2253
+ Badge($$renderer3, {
2254
+ tone: badgeTone(row.badge.tone),
2255
+ children: ($$renderer4) => {
2256
+ $$renderer4.push(`<!---->${escape_html(row.badge.label)}`);
2257
+ },
2258
+ $$slots: { default: true }
2259
+ });
2260
+ }
2261
+ let $$settled = true;
2262
+ let $$inner_renderer;
2263
+ function $$render_inner($$renderer3) {
2264
+ {
2265
+ let topChrome = function($$renderer4) {
2266
+ {
2267
+ let actions = function($$renderer5) {
2268
+ if (focus.ok) {
2269
+ $$renderer5.push("<!--[0-->");
2270
+ Flex($$renderer5, {
2271
+ gap: 2,
2272
+ align: "center",
2273
+ wrap: true,
2274
+ children: ($$renderer6) => {
2275
+ Badge($$renderer6, {
2276
+ tone: "neutral",
2277
+ size: "sm",
2278
+ children: ($$renderer7) => {
2279
+ $$renderer7.push(`<!---->Projet : ${escape_html(repo)}`);
2280
+ },
2281
+ $$slots: { default: true }
2282
+ });
2283
+ $$renderer6.push(`<!----> <span style="font-size:.78em; opacity:.6">commit ${escape_html(focus.baselineCommit.slice(0, 7))}</span>`);
2284
+ },
2285
+ $$slots: { default: true }
2286
+ });
2287
+ } else {
2288
+ $$renderer5.push("<!--[-1-->");
2289
+ }
2290
+ $$renderer5.push(`<!--]-->`);
2291
+ };
2292
+ AppHeader($$renderer4, {
2293
+ brandName: "Focus",
2294
+ productName: "Suivi & décision",
2295
+ brandMode: "full",
2296
+ actions
2297
+ });
2298
+ }
2299
+ }, main = function($$renderer4) {
2300
+ Container($$renderer4, {
2301
+ size: "xl",
2302
+ padding: true,
2303
+ children: ($$renderer5) => {
2304
+ $$renderer5.push(`<div class="page svelte-1uha8ag">`);
2305
+ if (!focus.ok) {
2306
+ $$renderer5.push("<!--[0-->");
2307
+ Alert($$renderer5, {
2308
+ tone: "error",
2309
+ title: "Impossible de charger le suivi",
2310
+ message: focus.error
2311
+ });
2312
+ } else {
2313
+ $$renderer5.push("<!--[-1-->");
2314
+ Flex($$renderer5, {
2315
+ gap: 3,
2316
+ wrap: true,
2317
+ children: ($$renderer6) => {
2318
+ Card($$renderer6, {
2319
+ children: ($$renderer7) => {
2320
+ $$renderer7.push(`<div class="stat svelte-1uha8ag"><div class="stat-n svelte-1uha8ag">${escape_html(counts.done)}</div><div class="stat-l svelte-1uha8ag">Faits</div></div>`);
2321
+ },
2322
+ $$slots: { default: true }
2323
+ });
2324
+ $$renderer6.push(`<!----> `);
2325
+ Card($$renderer6, {
2326
+ children: ($$renderer7) => {
2327
+ $$renderer7.push(`<div class="stat svelte-1uha8ag"><div class="stat-n svelte-1uha8ag">${escape_html(counts.todo)}</div><div class="stat-l svelte-1uha8ag">À faire</div></div>`);
2328
+ },
2329
+ $$slots: { default: true }
2330
+ });
2331
+ $$renderer6.push(`<!----> `);
2332
+ Card($$renderer6, {
2333
+ children: ($$renderer7) => {
2334
+ $$renderer7.push(`<div class="stat svelte-1uha8ag"><div class="stat-n svelte-1uha8ag">${escape_html(counts.decisions)}</div><div class="stat-l svelte-1uha8ag">Décisions</div></div>`);
2335
+ },
2336
+ $$slots: { default: true }
2337
+ });
2338
+ $$renderer6.push(`<!---->`);
2339
+ },
2340
+ $$slots: { default: true }
2341
+ });
2342
+ $$renderer5.push(`<!----> `);
2343
+ if (allWps.length) {
2344
+ $$renderer5.push("<!--[0-->");
2345
+ $$renderer5.push(`<div class="wpbar svelte-1uha8ag"><span class="wplbl svelte-1uha8ag">Workpackage :</span> `);
2346
+ Button($$renderer5, {
2347
+ size: "sm",
2348
+ variant: wpFilter === "tous" ? "primary" : "ghost",
2349
+ onclick: () => wpFilter = "tous",
2350
+ children: ($$renderer6) => {
2351
+ $$renderer6.push(`<!---->Tous`);
2352
+ },
2353
+ $$slots: { default: true }
2354
+ });
2355
+ $$renderer5.push(`<!----> <!--[-->`);
2356
+ const each_array = ensure_array_like(allWps);
2357
+ for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
2358
+ let wp = each_array[$$index];
2359
+ Button($$renderer5, {
2360
+ size: "sm",
2361
+ variant: wpFilter === wp ? "primary" : "ghost",
2362
+ onclick: () => wpFilter = wp,
2363
+ children: ($$renderer6) => {
2364
+ $$renderer6.push(`<!---->${escape_html(wp)}`);
2365
+ },
2366
+ $$slots: { default: true }
2367
+ });
2368
+ }
2369
+ $$renderer5.push(`<!--]--></div>`);
2370
+ } else {
2371
+ $$renderer5.push("<!--[-1-->");
2372
+ }
2373
+ $$renderer5.push(`<!--]--> <section class="svelte-1uha8ag">`);
2374
+ Flex($$renderer5, {
2375
+ align: "center",
2376
+ justify: "between",
2377
+ wrap: true,
2378
+ gap: 3,
2379
+ children: ($$renderer6) => {
2380
+ $$renderer6.push(`<h2 class="sec svelte-1uha8ag" style="margin:0">Fait <span class="sec-n svelte-1uha8ag">(${escape_html(doneShown().length)})</span></h2> `);
2381
+ ContentSwitcher($$renderer6, {
2382
+ items: periodItems,
2383
+ label: "Période des faits",
2384
+ get value() {
2385
+ return period;
2386
+ },
2387
+ set value($$value) {
2388
+ period = $$value;
2389
+ $$settled = false;
2390
+ }
2391
+ });
2392
+ $$renderer6.push(`<!---->`);
2393
+ },
2394
+ $$slots: { default: true }
2395
+ });
2396
+ $$renderer5.push(`<!----> <div class="sp svelte-1uha8ag"></div> `);
2397
+ if (doneShown().length) {
2398
+ $$renderer5.push("<!--[0-->");
2399
+ $$renderer5.push(`<div class="tscroll svelte-1uha8ag">`);
2400
+ DataTable($$renderer5, {
2401
+ columns: doneColumns,
2402
+ rows: doneShown(),
2403
+ pageSize: 8,
2404
+ emptyLabel: "Rien sur cette période"
2405
+ });
2406
+ $$renderer5.push(`<!----></div>`);
2407
+ } else {
2408
+ $$renderer5.push("<!--[-1-->");
2409
+ EmptyState($$renderer5, {
2410
+ title: "Rien de terminé sur cette période",
2411
+ message: "Élargis la période (Semaine / Mois / Tout)."
2412
+ });
2413
+ }
2414
+ $$renderer5.push(`<!--]--></section> <section class="svelte-1uha8ag"><h2 class="sec svelte-1uha8ag">À faire <span class="sec-n svelte-1uha8ag">(${escape_html(wpFilter === "tous" ? counts.todo : todosShown().length)})</span> `);
2415
+ if (wpFilter !== "tous") {
2416
+ $$renderer5.push("<!--[0-->");
2417
+ $$renderer5.push(`<span class="sec-n svelte-1uha8ag">· ${escape_html(wpFilter)}</span>`);
2418
+ } else {
2419
+ $$renderer5.push("<!--[-1-->");
2420
+ }
2421
+ $$renderer5.push(`<!--]--></h2> `);
2422
+ if (launchResult) {
2423
+ $$renderer5.push("<!--[0-->");
2424
+ if (launchResult.ok) {
2425
+ $$renderer5.push("<!--[0-->");
2426
+ {
2427
+ let actions = function($$renderer6) {
2428
+ Button($$renderer6, {
2429
+ size: "sm",
2430
+ variant: "ghost",
2431
+ onclick: () => launchResult = null,
2432
+ children: ($$renderer7) => {
2433
+ $$renderer7.push(`<!---->Fermer`);
2434
+ },
2435
+ $$slots: { default: true }
2436
+ });
2437
+ };
2438
+ Alert($$renderer5, {
2439
+ tone: launchResult.rejected?.length ? "warning" : "success",
2440
+ title: `${launchResult.accepted.length} action(s) acceptée(s)${launchResult.rejected?.length ? `, ${launchResult.rejected.length} refusée(s)` : ""}`,
2441
+ message: launchResult.note,
2442
+ actions,
2443
+ $$slots: { actions: true }
2444
+ });
2445
+ }
2446
+ $$renderer5.push(`<!----> <div class="sp svelte-1uha8ag"></div>`);
2447
+ } else {
2448
+ $$renderer5.push("<!--[-1-->");
2449
+ Alert($$renderer5, {
2450
+ tone: "error",
2451
+ title: "Échec du lancement",
2452
+ message: launchResult.error
2453
+ });
2454
+ $$renderer5.push(`<!----> <div class="sp svelte-1uha8ag"></div>`);
2455
+ }
2456
+ $$renderer5.push(`<!--]-->`);
2457
+ } else {
2458
+ $$renderer5.push("<!--[-1-->");
2459
+ }
2460
+ $$renderer5.push(`<!--]--> `);
2461
+ Flex($$renderer5, {
2462
+ align: "center",
2463
+ justify: "between",
2464
+ wrap: true,
2465
+ gap: 3,
2466
+ children: ($$renderer6) => {
2467
+ $$renderer6.push(`<div style="opacity:.8; font-size:.9em">${escape_html(selected.length)} sélectionnée(s) sur ${escape_html(launchableIds().length)} lançable(s)</div> `);
2468
+ ButtonGroup($$renderer6, {
2469
+ label: "Actions groupées",
2470
+ children: ($$renderer7) => {
2471
+ Button($$renderer7, {
2472
+ variant: "secondary",
2473
+ onclick: selectAll,
2474
+ disabled: launchableIds().length === 0,
2475
+ children: ($$renderer8) => {
2476
+ $$renderer8.push(`<!---->Tout sélectionner`);
2477
+ },
2478
+ $$slots: { default: true }
2479
+ });
2480
+ $$renderer7.push(`<!----> `);
2481
+ Button($$renderer7, {
2482
+ variant: "ghost",
2483
+ onclick: clearSel,
2484
+ disabled: selected.length === 0,
2485
+ children: ($$renderer8) => {
2486
+ $$renderer8.push(`<!---->Vider`);
2487
+ },
2488
+ $$slots: { default: true }
2489
+ });
2490
+ $$renderer7.push(`<!----> `);
2491
+ Button($$renderer7, {
2492
+ variant: "primary",
2493
+ onclick: launch,
2494
+ disabled: selected.length === 0 || launching,
2495
+ children: ($$renderer8) => {
2496
+ $$renderer8.push(`<!---->${escape_html(launching ? "Lancement…" : `Lancer la sélection (${selected.length})`)}`);
2497
+ },
2498
+ $$slots: { default: true }
2499
+ });
2500
+ $$renderer7.push(`<!---->`);
2501
+ },
2502
+ $$slots: { default: true }
2503
+ });
2504
+ $$renderer6.push(`<!---->`);
2505
+ },
2506
+ $$slots: { default: true }
2507
+ });
2508
+ $$renderer5.push(`<!----> <div class="sp svelte-1uha8ag"></div> <div class="tscroll svelte-1uha8ag">`);
2509
+ DataTable($$renderer5, {
2510
+ columns: todoColumns(),
2511
+ rows: todosShown(),
2512
+ caption: "Actions à faire",
2513
+ emptyLabel: "Aucune action ouverte"
2514
+ });
2515
+ $$renderer5.push(`<!----></div></section> <section class="svelte-1uha8ag"><h2 class="sec svelte-1uha8ag">Leviers — les coups à plus fort effet</h2> `);
2516
+ if (keystone) {
2517
+ $$renderer5.push("<!--[0-->");
2518
+ Alert($$renderer5, {
2519
+ tone: "warning",
2520
+ title: `Point de passage : ${keystone.title}`,
2521
+ message: `Bloque ${keystone.blocks} autre(s) tâche(s) — le traiter débloque le plus de travail.`
2522
+ });
2523
+ $$renderer5.push(`<!----> <div class="sp svelte-1uha8ag"></div>`);
2524
+ } else {
2525
+ $$renderer5.push("<!--[-1-->");
2526
+ }
2527
+ $$renderer5.push(`<!--]--> `);
2528
+ Card($$renderer5, {
2529
+ children: ($$renderer6) => {
2530
+ $$renderer6.push(`<div style="padding:1rem 1.25rem">`);
2531
+ Flex($$renderer6, {
2532
+ direction: "column",
2533
+ gap: 3,
2534
+ children: ($$renderer7) => {
2535
+ $$renderer7.push(`<!--[-->`);
2536
+ const each_array_1 = ensure_array_like(precos);
2537
+ for (let $$index_1 = 0, $$length = each_array_1.length; $$index_1 < $$length; $$index_1++) {
2538
+ let p = each_array_1[$$index_1];
2539
+ $$renderer7.push(`<div>`);
2540
+ Flex($$renderer7, {
2541
+ gap: 2,
2542
+ align: "center",
2543
+ wrap: true,
2544
+ children: ($$renderer8) => {
2545
+ Badge($$renderer8, {
2546
+ tone: badgeTone(p.badge.tone),
2547
+ children: ($$renderer9) => {
2548
+ $$renderer9.push(`<!---->${escape_html(p.badge.label)}`);
2549
+ },
2550
+ $$slots: { default: true }
2551
+ });
2552
+ $$renderer8.push(`<!----> <strong>${escape_html(p.title)}</strong>`);
2553
+ },
2554
+ $$slots: { default: true }
2555
+ });
2556
+ $$renderer7.push(`<!----> <div style="opacity:.75; font-size:.9em; margin-top:3px">${escape_html(p.why)} · ${escape_html(p.action)} · ${escape_html(p.actor)}</div></div>`);
2557
+ }
2558
+ $$renderer7.push(`<!--]-->`);
2559
+ },
2560
+ $$slots: { default: true }
2561
+ });
2562
+ $$renderer6.push(`<!----></div>`);
2563
+ },
2564
+ $$slots: { default: true }
2565
+ });
2566
+ $$renderer5.push(`<!----></section> <section class="svelte-1uha8ag"><h2 class="sec svelte-1uha8ag">Décisions <span class="sec-n svelte-1uha8ag">(${escape_html(counts.decisions)})</span></h2> `);
2567
+ if (decisions.length === 0) {
2568
+ $$renderer5.push("<!--[0-->");
2569
+ EmptyState($$renderer5, {
2570
+ title: "Aucune décision en attente",
2571
+ message: "Rien à trancher pour le moment."
2572
+ });
2573
+ } else {
2574
+ $$renderer5.push("<!--[-1-->");
2575
+ Flex($$renderer5, {
2576
+ direction: "column",
2577
+ gap: 3,
2578
+ children: ($$renderer6) => {
2579
+ $$renderer6.push(`<!--[-->`);
2580
+ const each_array_2 = ensure_array_like(decisions);
2581
+ for (let $$index_2 = 0, $$length = each_array_2.length; $$index_2 < $$length; $$index_2++) {
2582
+ let d = each_array_2[$$index_2];
2583
+ Card($$renderer6, {
2584
+ children: ($$renderer7) => {
2585
+ $$renderer7.push(`<div style="padding:1.1rem 1.35rem">`);
2586
+ Flex($$renderer7, {
2587
+ gap: 2,
2588
+ align: "center",
2589
+ wrap: true,
2590
+ children: ($$renderer8) => {
2591
+ Badge($$renderer8, {
2592
+ tone: "info",
2593
+ children: ($$renderer9) => {
2594
+ $$renderer9.push(`<!---->Décision`);
2595
+ },
2596
+ $$slots: { default: true }
2597
+ });
2598
+ $$renderer8.push(`<!----> `);
2599
+ Badge($$renderer8, {
2600
+ tone: "neutral",
2601
+ size: "sm",
2602
+ children: ($$renderer9) => {
2603
+ $$renderer9.push(`<!---->${escape_html(d.project)}`);
2604
+ },
2605
+ $$slots: { default: true }
2606
+ });
2607
+ $$renderer8.push(`<!----> `);
2608
+ if (d.workspace) {
2609
+ $$renderer8.push("<!--[0-->");
2610
+ Badge($$renderer8, {
2611
+ tone: "neutral",
2612
+ size: "sm",
2613
+ children: ($$renderer9) => {
2614
+ $$renderer9.push(`<!---->${escape_html(d.workspace)}`);
2615
+ },
2616
+ $$slots: { default: true }
2617
+ });
2618
+ } else {
2619
+ $$renderer8.push("<!--[-1-->");
2620
+ }
2621
+ $$renderer8.push(`<!--]--> `);
2622
+ if (d.wp) {
2623
+ $$renderer8.push("<!--[0-->");
2624
+ Badge($$renderer8, {
2625
+ tone: "neutral",
2626
+ size: "sm",
2627
+ children: ($$renderer9) => {
2628
+ $$renderer9.push(`<!---->${escape_html(d.wp)}`);
2629
+ },
2630
+ $$slots: { default: true }
2631
+ });
2632
+ } else {
2633
+ $$renderer8.push("<!--[-1-->");
2634
+ }
2635
+ $$renderer8.push(`<!--]-->`);
2636
+ },
2637
+ $$slots: { default: true }
2638
+ });
2639
+ $$renderer7.push(`<!----> <h3 style="margin:.55rem 0 .3rem; font-size:1.05rem; line-height:1.3">${escape_html(d.question)}</h3> <p style="margin:0 0 .5rem; opacity:.72; font-size:.92em">${escape_html(d.summary)}</p> `);
2640
+ Flex($$renderer7, {
2641
+ align: "center",
2642
+ justify: "between",
2643
+ wrap: true,
2644
+ gap: 2,
2645
+ children: ($$renderer8) => {
2646
+ $$renderer8.push(`<div style="opacity:.85; font-size:.92em">${escape_html(d.action)} — ${escape_html(d.actor)}</div> `);
2647
+ Button($$renderer8, {
2648
+ size: "sm",
2649
+ variant: "primary",
2650
+ onclick: () => injectDecision(d.id),
2651
+ disabled: injecting === d.id,
2652
+ children: ($$renderer9) => {
2653
+ $$renderer9.push(`<!---->${escape_html(injecting === d.id ? "Injection…" : "Injecter dans la CLI")}`);
2654
+ },
2655
+ $$slots: { default: true }
2656
+ });
2657
+ $$renderer8.push(`<!---->`);
2658
+ },
2659
+ $$slots: { default: true }
2660
+ });
2661
+ $$renderer7.push(`<!----> `);
2662
+ if (injectResult[d.id]) {
2663
+ $$renderer7.push("<!--[0-->");
2664
+ $$renderer7.push(`<div style="margin-top:.6rem">`);
2665
+ if (injectResult[d.id].ok && injectResult[d.id].delivered) {
2666
+ $$renderer7.push("<!--[0-->");
2667
+ Alert($$renderer7, {
2668
+ tone: "success",
2669
+ title: `Injectée à ${injectResult[d.id].target}`,
2670
+ message: injectResult[d.id].note
2671
+ });
2672
+ } else if (injectResult[d.id].ok) {
2673
+ $$renderer7.push("<!--[1-->");
2674
+ Alert($$renderer7, {
2675
+ tone: "warning",
2676
+ title: "Aucune CLI live sur ce projet",
2677
+ message: injectResult[d.id].note
2678
+ });
2679
+ } else {
2680
+ $$renderer7.push("<!--[-1-->");
2681
+ Alert($$renderer7, {
2682
+ tone: "error",
2683
+ title: "Échec de l'injection",
2684
+ message: injectResult[d.id].error
2685
+ });
2686
+ }
2687
+ $$renderer7.push(`<!--]--></div>`);
2688
+ } else {
2689
+ $$renderer7.push("<!--[-1-->");
2690
+ }
2691
+ $$renderer7.push(`<!--]--></div>`);
2692
+ },
2693
+ $$slots: { default: true }
2694
+ });
2695
+ }
2696
+ $$renderer6.push(`<!--]-->`);
2697
+ },
2698
+ $$slots: { default: true }
2699
+ });
2700
+ }
2701
+ $$renderer5.push(`<!--]--></section> <div class="foot svelte-1uha8ag">Généré le ${escape_html(focus.ok ? focus.generatedAt : "")} · source : track (système de référence, lecture seule)</div>`);
2702
+ }
2703
+ $$renderer5.push(`<!--]--></div>`);
2704
+ },
2705
+ $$slots: { default: true }
2706
+ });
2707
+ };
2708
+ AppShell($$renderer3, {
2709
+ variant: "workspace",
2710
+ topChrome,
2711
+ main
2712
+ });
2713
+ }
2714
+ }
2715
+ do {
2716
+ $$settled = true;
2717
+ $$inner_renderer = $$renderer2.copy();
2718
+ $$render_inner($$inner_renderer);
2719
+ } while (!$$settled);
2720
+ $$renderer2.subsume($$inner_renderer);
2721
+ });
2722
+ }
2723
+
2724
+ export { _page as default };
2725
+ //# sourceMappingURL=_page.svelte.js-QDldMYhk.js.map