treetanix 0.0.0-stage → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,81 @@
1
- # Temporary Holding Version
1
+ # Treetanix – Projektutforskaren
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ En lokal React/TypeScript baserad hierarkisk projektutforskare som läser och skriver Excel-arbetsböcker direkt i webbläsaren – ingen backend, ingen databas, ingen installation av servertjänster.
4
+
5
+ ## Vad är Treetanix?
6
+
7
+ Treetanix är ett lokalt verktyg för att utforska och redigera hierarkiska projektstrukturer – i första hand spektrumfrågor i Excel-arbetsböcker. Verktyget läser en .xlsx-fil, visar sakfrågor som ett träd baserat på Förälders sekvensnummer, och låter dig redigera sakfrågor och lägga till uppdateringar.
8
+
9
+ Allt sker i webbläsaren. Ingen data skickas till någon server.
10
+
11
+ ### Funktioner
12
+
13
+ * Hierarkiskt träd – föräldrarelationer styr strukturen. Tomt värde = rotnod.
14
+ * Detaljpanel – visar hela underträdet, uppdateringar och relaterade sakfrågor.
15
+ * Sökning – omfattar arbetsobjektens fält och uppdateringstext.
16
+ * Redigering – ändra sakfrågor och lägg till uppdateringar/kommentarer.
17
+ * Excel-import och -export – öppna en befintlig .xlsx och spara en ny med ändringarna.
18
+ * Anpassningsbara fält – lägg till projektgemensamma fält som följer med vid export.
19
+ * Prioritetsgrupper – Kritisk, Hög, Medel, Låg och Vilande med färgmarkering.
20
+
21
+ ### Excelmodell
22
+
23
+ Tre blad används:
24
+
25
+ * 'Projektnamnet' – en rad per sakfråga. Kolumnen Förälders sekvensnummer kopplar barnet till föräldern. Taggar läggs till vid export om den saknas. Projektnamnet tas från första Excel-bladnamnet.
26
+ * Uppdateringar eller Kommentarer – Sek.nr, Datum, Typ, Information, Författare.
27
+ * Ansvariga – personlista.
28
+
29
+ Vid export skrivs de tre bladen om. Excel-formatering, formler och makron bevaras inte.
30
+ Använd därför den exporterade filen som datakälla, inte som en formateringsmässigt
31
+ identisk kopia av originalet.
32
+
33
+ ## Starta lokalt
34
+
35
+ Kräver Node.js 20 eller senare och npm. Från projektroten kan man skriva:
36
+ ```bash
37
+ npm install
38
+ npm run build
39
+ npx treetanix
40
+ ```
41
+ Öppna adressen som Vite skriver ut (normalt http://localhost:4173).
42
+
43
+ Du kan också ange en annan port:
44
+
45
+ ```bash
46
+ PORT=8080 npx treetanix
47
+ ```
48
+ Alternativt
49
+ ```bash
50
+ npx exec treetanix
51
+ ```
52
+
53
+ ## Användning
54
+
55
+ - Exempelarbetsboken läses automatiskt från `public/`.
56
+ - **Öppna Excel** läser in en annan `.xlsx`-fil.
57
+ - **Spara Excel** laddar ned en ny arbetsbok med ändringarna. Webbläsaren skriver inte direkt över originalfilen.
58
+ - Förälders sekvensnummer styr hierarkin. Tomt värde betyder rotnod.
59
+ - Kort visar titel, sekvensnummer, prioritet och status.
60
+ - Sökningen omfattar arbetsobjektens fält och uppdateringstext.
61
+ - Välj ett kort för att öppna detaljpanelen med hela underträdet och uppdateringar.
62
+
63
+ ## Excelmodell
64
+
65
+ Tre blad används:
66
+ 1. `Spektrumfrågor` – en rad per sakfråga. Kolumnen `Förälders sekvensnummer` kopplar barnet till föräldern. `Taggar` läggs till vid export om den saknas. Titeln till projektet tas från första arbetsbladet.
67
+ 2. `Uppdateringar eller Kommentarer` – `Sek.nr`, `Datum`, `Typ`, `Information`, `Författare`.
68
+ 3. `Ansvariga` – personlista.
69
+
70
+ Vid export skrivs de tre bladen om. Excel-formatering, formler och makron bevaras inte. Använd därför prototypens exporterade fil som datakälla, inte som en formateringsmässigt identisk kopia av originalet.
71
+
72
+
73
+ ## Treetanix-fält och relationer
74
+
75
+ Vid import normaliseras vissa rubriker och exporteras med generella namn
76
+
77
+ `Relaterat sekvensnummer` är en separat, icke-hierarkisk relation. Den ritas inte i trädet och används inte i sökning. En sakfråga kan länkas till en annan sakfråga, men inte till sig själv eller en förfader i den egna grenen. När sakfrågan öppnas visas även det relaterade projektträdet i detaljpanelen.
78
+
79
+
80
+ ## Treetanix - kommande uppdateringar
81
+ - Kommentarer i historiken kan redigeras och tas bort.
package/bin/info.txt ADDED
@@ -0,0 +1 @@
1
+ remark
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { spawn } from "node:child_process";
4
+ import { existsSync } from "node:fs";
5
+ import { fileURLToPath } from "node:url";
6
+ import { dirname, join } from "node:path";
7
+
8
+ const __dirname = dirname(fileURLToPath(import.meta.url));
9
+ const distDir = join(__dirname, "..", "dist");
10
+
11
+ if (!existsSync(distDir)) {
12
+ console.error(
13
+ "\n Fel: dist/ saknas. Kör 'npm run build' först, eller installera om paketet.\n"
14
+ );
15
+ process.exit(1);
16
+ }
17
+
18
+ const port = process.env.PORT || "4173";
19
+
20
+ console.log(`\n Treetanix startar på http://localhost:${port}\n`);
21
+ console.log(" Tryck Ctrl+C för att stoppa.\n");
22
+
23
+ const serve = spawn(
24
+ process.platform === "win32" ? "npx.cmd" : "npx",
25
+ ["serve", distDir, "-l", port, "-s"],
26
+ { stdio: "inherit" }
27
+ );
28
+
29
+ serve.on("error", (err) => {
30
+ console.error("\n Kunde inte starta servern:", err.message, "\n");
31
+ process.exit(1);
32
+ });
33
+
34
+ serve.on("exit", (code) => process.exit(code ?? 0));
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{r as t}from"./react-0uyfSn6C.js";var n=e(t()),r=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),i=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),a={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},o=(0,n.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:s=``,children:c,iconNode:l,...u},d)=>(0,n.createElement)(`svg`,{ref:d,...a,width:t,height:t,stroke:e,strokeWidth:o?Number(r)*24/Number(t):r,className:i(`lucide`,s),...u},[...l.map(([e,t])=>(0,n.createElement)(e,t)),...Array.isArray(c)?c:[c]])),s=(e,t)=>{let a=(0,n.forwardRef)(({className:a,...s},c)=>(0,n.createElement)(o,{ref:c,iconNode:t,className:i(`lucide-${r(e)}`,a),...s}));return a.displayName=`${e}`,a},c=s(`ArrowLeft`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),l=s(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),u=s(`ChevronRight`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),d=s(`FileSpreadsheet`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M8 13h2`,key:`yr2amv`}],[`path`,{d:`M14 13h2`,key:`un5t4a`}],[`path`,{d:`M8 17h2`,key:`2yhykz`}],[`path`,{d:`M14 17h2`,key:`10kma7`}]]),f=s(`FolderOpen`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),p=s(`GitBranch`,[[`line`,{x1:`6`,x2:`6`,y1:`3`,y2:`15`,key:`17qcm7`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M18 9a9 9 0 0 1-9 9`,key:`n2h4wq`}]]),m=s(`Pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),h=s(`Plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),g=s(`Save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),_=s(`Search`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}]]),v=s(`Trash2`,[[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6`,key:`4alrt4`}],[`path`,{d:`M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2`,key:`v07s0e`}],[`line`,{x1:`10`,x2:`10`,y1:`11`,y2:`17`,key:`1uufr5`}],[`line`,{x1:`14`,x2:`14`,y1:`11`,y2:`17`,key:`xtxkd`}]]),y=s(`TriangleAlert`,[[`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`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),b=s(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);export{g as a,p as c,u as d,l as f,_ as i,f as l,y as n,h as o,c as p,v as r,m as s,b as t,d as u};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{n as t,r as n,t as r}from"./react-0uyfSn6C.js";import{a as i,c as a,d as o,f as s,i as c,l,n as u,o as d,p as f,r as p,s as m,t as h,u as ee}from"./icons-DcL-5oaR.js";import{n as g,r as _,t as te}from"./xlsx-CXlonafO.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var v=e(n(),1),y=e(t(),1),b=`Träd projektet`,x=`Uppdateringar eller Kommentarer`,S=`Ansvariga`,C=e=>e==null?``:String(e).trim(),w=e=>e.toLocaleLowerCase(`sv`).replace(/[^a-zåäö0-9]/g,``),T=(e,...t)=>e.findIndex(e=>t.some(t=>w(e).includes(w(t)))),E=(e,t)=>e.findIndex(e=>w(e)===w(t)),D=(e,t)=>t>=0?C(e[t]):``,O=e=>{let t=w(e);return t.includes(`huvudansvarig`)&&t.includes(`pts`)?`Huvudansvarig`:t.includes(`svensk`)&&t.includes(`ståndpunkt`)&&t.includes(`inriktning`)?`Ståndpunkt/inriktning`:t.includes(`sakfråga`)&&t.includes(`wi`)?`Sakfråga`:t.includes(`cept`)&&t.includes(`wi`)&&t.includes(`ansvarig`)?`Ansvariga grupper`:t.includes(`frekvensband`)?`Värdeintervall`:e};function ne(e){let t=te(e,{type:`array`,cellDates:!0}),n=t.SheetNames[0]||b,r=t.Sheets[n];if(!r)throw Error(`Arbetsboken saknar ett första blad med projektdata.`);let i=g.sheet_to_json(r,{header:1,defval:``}),a=(i[0]||[]).map(e=>O(C(e).trim())),o=a.findIndex(e=>w(e)===`beskrivningsakfråga`),s=a.map((e,t)=>w(e)===`beskrivning`?t:-1).filter(e=>e>=0),c=o>=0?s[0]:s[1];c!==void 0&&!a.some((e,t)=>t!==c&&w(e)===`kommentar`)&&(a[c]=`Kommentar`);let l=T(a,`sekvensnummer`),u=T(a,`förälders sekvensnummer`),d=E(a,`sakfråga`),f=E(a,`beskrivning sakfråga`)>=0?E(a,`beskrivning sakfråga`):E(a,`beskrivning`),p=T(a,`prio`),m=T(a,`status`),h=T(a,`sakområde`),ee=T(a,`huvudansvarig`),_=T(a,`delansvariga`),v=T(a,`taggar`),y=T(a,`kommentar`),ne=T(a,`relaterat sekvensnummer`,`relaterad sakfråga`),re=i.slice(1).filter(e=>D(e,l)).map(e=>{let t={};return a.forEach((n,r)=>{n&&(t[n]=C(e[r]))}),{seq:D(e,l),parent:D(e,u),title:D(e,d)||`Sakfråga ${D(e,l)}`,description:D(e,f),priority:D(e,p)||`Medel`,status:D(e,m),area:D(e,h),owner:D(e,ee),deputyOwners:D(e,_),tags:D(e,v),comment:D(e,y),relatedSeq:D(e,ne),fields:t}}),k=t.Sheets[x],A=k?g.sheet_to_json(k,{header:1,defval:``}):[],j=(A[0]||[]).map(C),M=T(j,`sek.nr`,`sekvensnummer`),N=T(j,`datum`),P=T(j,`information`),F=T(j,`typ`),I=T(j,`författare`),L=A.slice(1).filter(e=>D(e,M)&&D(e,P)).map((e,t)=>({seq:D(e,M),date:D(e,N),type:D(e,F)||`Uppdatering`,information:D(e,P),author:D(e,I),id:`u${t+1}`})),R=t.Sheets[S],z=R?g.sheet_to_json(R,{header:1,defval:``}):[],B=(z[0]||[]).map(C),V=T(B,`huvudansvarig`,`namn`),ie=T(B,`område`),H=T(B,`e-post`,`email`);return{items:re,updates:L,people:z.slice(1).filter(e=>D(e,V)).map(e=>({name:D(e,V),area:D(e,ie),email:D(e,H)})),headers:a,extraHeaders:a,projectName:n}}function re(e){let t=g.book_new(),n=[...e.headers],r=e=>{n.some(t=>t.toLocaleLowerCase(`sv`)===e.toLocaleLowerCase(`sv`))||n.push(e)};r(`Förälders sekvensnummer`),r(`Kommentar`),r(`Taggar`),r(`Delansvariga`),r(`Relaterat sekvensnummer`);let i=T(n,`sekvensnummer`),a=T(n,`förälders sekvensnummer`),o=T(n,`sakfråga`),s=T(n,`beskrivning`),c=T(n,`prio`),l=T(n,`status`),u=T(n,`sakområde`),d=T(n,`huvudansvarig`),f=T(n,`delansvariga`),p=T(n,`taggar`),m=T(n,`relaterat sekvensnummer`,`relaterad sakfråga`),h=[n];e.items.forEach(e=>{let t=n.map(t=>e.fields[t]??``);i>=0&&(t[i]=e.seq),a>=0&&(t[a]=e.parent),o>=0&&(t[o]=e.title),s>=0&&(t[s]=e.description),c>=0&&(t[c]=e.priority),l>=0&&(t[l]=e.status),u>=0&&(t[u]=e.area),d>=0&&(t[d]=e.owner),f>=0&&(t[f]=e.deputyOwners),p>=0&&(t[p]=e.tags),m>=0&&(t[m]=e.relatedSeq),h.push(t)});let ee=(e.projectName||b).slice(0,31)||b;g.book_append_sheet(t,g.aoa_to_sheet(h),ee);let te=[[`Sek.nr`,`Datum`,`Typ`,`Information`,`Författare`],...e.updates.map(e=>[e.seq,e.date,e.type,e.information,e.author])];g.book_append_sheet(t,g.aoa_to_sheet(te),x);let v=[[`Huvudansvarig`,`Område`,`E-post`],...e.people.map(e=>[e.name,e.area,e.email])];return g.book_append_sheet(t,g.aoa_to_sheet(v),S),_(t,{bookType:`xlsx`,type:`array`})}var k=r(),A={items:[],updates:[],people:[],headers:[],extraHeaders:[],projectName:`Spektrumfrågor`},j=e=>e||`—`,M=e=>{let t=e.toLocaleLowerCase(`sv`);return t.includes(`kritisk`)?`critical`:t.includes(`hög`)?`high`:t.includes(`medel`)?`medium`:t.includes(`låg`)?`low`:t.includes(`vilande`)?`dormant`:``};function N(){let[e,t]=(0,v.useState)(A),[n,r]=(0,v.useState)(`spektrumf_omstrukturerad.xlsx`),[g,_]=(0,v.useState)(`Spektrumfrågor`),[te,y]=(0,v.useState)(!1),[b,x]=(0,v.useState)(!1),[S,C]=(0,v.useState)(``),[w,T]=(0,v.useState)(!1),[E,D]=(0,v.useState)(``),[O,N]=(0,v.useState)(!1),[P,F]=(0,v.useState)(``),[I,L]=(0,v.useState)(``),[R,z]=(0,v.useState)(null),[B,V]=(0,v.useState)(`tree`),[ie,H]=(0,v.useState)(!1),[U,W]=(0,v.useState)(null),[ae,G]=(0,v.useState)(!1),[K,oe]=(0,v.useState)(``),[se,ce]=(0,v.useState)(`Uppdatering`),[le,ue]=(0,v.useState)(new Date().toISOString().slice(0,10)),[de,fe]=(0,v.useState)(``),[pe,me]=(0,v.useState)(null),[q,J]=(0,v.useState)(null),[he,ge]=(0,v.useState)(new Set),[_e,Y]=(0,v.useState)(!1),ve=(0,v.useRef)(null);(0,v.useEffect)(()=>{fetch(`/spektrumf_omstrukturerad.xlsx`).then(e=>e.arrayBuffer()).then(e=>{let n=ne(e);t(n),_(n.projectName||`Spektrumfrågor`),N(!0)}).catch(()=>F(`Kunde inte läsa exempelarbetsboken. Använd Öppna Excel för att välja en fil.`))},[]);let X=(0,v.useMemo)(()=>new Map(e.items.map(e=>[e.seq,e])),[e.items]),Z=(0,v.useMemo)(()=>{let t=new Map;return e.items.forEach(e=>{let n=e.parent||``;t.set(n,[...t.get(n)||[],e])}),t},[e.items]),ye=Z.get(``)||[],be=(0,v.useMemo)(()=>{let t=new Map;return e.updates.forEach(e=>t.set(e.seq,[...t.get(e.seq)||[],e])),t},[e.updates]),xe=e=>{let t=[],n=new Set([e]),r=e=>{(Z.get(e)||[]).forEach(e=>{n.has(e.seq)||(n.add(e.seq),t.push(e),r(e.seq))})};return r(e),t},Se=(0,v.useMemo)(()=>{let t=I.trim().toLocaleLowerCase(`sv`);return t?e.items.filter(e=>[e.seq,e.title,e.description,e.priority,e.status,e.area,e.owner,e.deputyOwners,e.tags,e.comment,...Object.entries(e.fields).filter(([e])=>!e.toLocaleLowerCase(`sv`).includes(`relater`)).map(([,e])=>e),...(be.get(e.seq)||[]).map(e=>e.information)].join(` `).toLocaleLowerCase(`sv`).includes(t)):[]},[I,e.items,be]),Ce=e=>[...be.get(e)||[],...xe(e).flatMap(e=>be.get(e.seq)||[])],we=async e=>{try{let n=ne(await e.arrayBuffer());t(n),_(n.projectName||`Spektrumfrågor`),r(e.name),N(!0),Y(!1),F(``),z(null),V(`tree`),L(``)}catch(e){F(e instanceof Error?e.message:`Kunde inte läsa Excel-filen.`)}},Te=()=>{let t=re(e),r=new Blob([t],{type:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`}),i=URL.createObjectURL(r),a=document.createElement(`a`),o=new Date().toISOString().replace(/[-:]/g,``).replace(/\.\d{3}Z$/,`Z`).replace(`T`,`_`).replace(`Z`,``);a.href=i,a.download=`${n.replace(/\.xlsx?$/i,``)}_update_${o}.xlsx`,a.click(),window.setTimeout(()=>URL.revokeObjectURL(i),1e3),Y(!1)},Ee=()=>{t(A),r(``),_(``),N(!1),Y(!1),z(null),L(``),V(`tree`),F(``),y(!1)},De=()=>{O&&(_e?y(!0):Ee())},Oe=()=>{let e=S.trim();e&&(t({...A,projectName:e,headers:[`Sekvensnummer`,`Förälders sekvensnummer`,`Sakfråga`,`Beskrivning`,`Kommentar`,`Prio`,`Status`,`Sakområde`,`Huvudansvarig`,`Delansvariga`,`Värdeintervall`,`Ståndpunkt/inriktning`,`Ansvariga grupper`,`Taggar`,`Relaterat sekvensnummer`]}),_(e),r(e.replace(/[^a-z0-9åäö_-]+/gi,`_`)+`.xlsx`),N(!0),Y(!0),z(null),L(``),V(`tree`),ge(new Set),F(``),x(!1),C(``))},ke=n=>{let r={...n.fields},i=(t,n)=>{let i=e.headers.find(e=>e.toLocaleLowerCase(`sv`).replace(/[^a-zåäö0-9]/g,``)===t.replace(/[^a-zåäö0-9]/g,``));i&&(r[i]=n)};i(`sekvensnummer`,n.seq),i(`förälders sekvensnummer`,n.parent),i(`sakfråga`,n.title),i(`beskrivning sakfråga`,n.description),i(`prio`,n.priority),i(`status`,n.status),i(`sakområde`,n.area),i(`huvudansvarig`,n.owner),i(`delansvariga`,n.deputyOwners),i(`taggar`,n.tags),i(`relaterat sekvensnummer`,n.relatedSeq),i(`kommentar`,n.comment);let a={...n,fields:r};t(e=>({...e,items:e.items.some(e=>e.seq===a.seq)?e.items.map(e=>e.seq===a.seq?a:e):[...e.items,a]})),Y(!0),z(a.seq),H(!1),W(null)},Ae=()=>{R&&K.trim()&&(t(e=>({...e,updates:[...e.updates,{seq:R,date:le,type:se,information:K.trim(),author:de,id:`new-${Date.now()}`}]})),Y(!0),G(!1),oe(``))},je=()=>{q&&q.information.trim()&&(t(e=>({...e,updates:e.updates.map(e=>e.id===q.id?{...q,information:q.information.trim()}:e)})),Y(!0),me(null),J(null))},Me=e=>{window.confirm(`Ta bort kommentaren? Åtgärden kan inte ångras.`)&&(t(t=>({...t,updates:t.updates.filter(t=>t.id!==e.id)})),Y(!0))},Ne=e=>{let n=[e,...xe(e.seq)],r=new Set(n.map(e=>e.seq)),i=n.length>1?`Ta bort ”${e.title||e.seq}” och dess ${n.length-1} underliggande kort?\n\nAlla uppdateringar och kommentarer kopplade till dessa ${n.length} kort tas också bort. Åtgärden kan inte ångras.`:`Ta bort ”${e.title||e.seq}”?\n\nTillhörande uppdateringar och kommentarer tas också bort. Åtgärden kan inte ångras.`;window.confirm(i)&&(t(e=>({...e,items:e.items.filter(e=>!r.has(e.seq)).map(e=>r.has(e.relatedSeq)?{...e,relatedSeq:``,fields:{...e.fields,"Relaterat sekvensnummer":``}}:e),updates:e.updates.filter(e=>!r.has(e.seq))})),ge(e=>{let t=new Set(e);return r.forEach(e=>t.delete(e)),t}),z(null),H(!1),W(null),G(!1),Y(!0))},Pe=()=>{let n=E.trim();n&&(e.headers.some(e=>e.toLocaleLowerCase(`sv`)===n.toLocaleLowerCase(`sv`))?F(`Fältet ”${n}” finns redan.`):(t(e=>({...e,headers:[...e.headers,n],extraHeaders:[...e.extraHeaders,n],items:e.items.map(e=>({...e,fields:{...e.fields,[n]:``}}))})),W(e=>e&&{...e,fields:{...e.fields,[n]:``}}),Y(!0),T(!1),D(``),F(``)))},Fe=()=>{let n=String(Math.max(0,...e.items.map(e=>Number(e.seq)).filter(Number.isFinite))+1),r={seq:n,parent:``,title:`Ny sakfråga`,description:``,priority:`Medel`,status:`Ej påbörjad`,area:``,owner:``,deputyOwners:``,tags:``,comment:``,relatedSeq:``,fields:Object.fromEntries(e.headers.map(e=>[e,``]))};t(e=>({...e,items:[...e.items,r]})),W(r),z(n),H(!0),Y(!0)},Ie=e=>ge(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),Le=()=>{ie?(H(!1),W(null)):(z(null),B===`search`&&L(``),V(`tree`))},Re=e=>{W({...e}),H(!0)},ze=(e,t=!1)=>(0,k.jsxs)(`button`,{className:`node-card ${R===e.seq?`selected`:``}`,onClick:()=>{z(e.seq),V(I.trim()?`search`:`tree`)},title:e.title,children:[(0,k.jsx)(`span`,{className:`card-title`,children:e.title||`Sakfråga ${e.seq}`}),(0,k.jsxs)(`span`,{className:`card-meta`,children:[(0,k.jsx)(`span`,{className:`priority-dot ${M(e.priority)}`}),(0,k.jsx)(`span`,{children:e.seq}),e.status&&(0,k.jsx)(`span`,{className:`status`,children:e.status})]}),t&&(0,k.jsxs)(`span`,{className:`search-snippet`,children:[e.area,` · `,e.owner]})]},e.seq),Be=(e,t,n)=>{if(n.has(e.seq))return(0,k.jsxs)(`div`,{className:`tree-error`,children:[`Cirkulär relation: `,e.seq]});let r=new Set(n);r.add(e.seq);let i=Z.get(e.seq)||[];return(0,k.jsx)(`div`,{className:`tree-node`,children:(0,k.jsxs)(`div`,{className:`tree-node-row`,children:[(0,k.jsxs)(`div`,{className:`node-with-toggle`,children:[i.length>0?(0,k.jsx)(`button`,{className:`tiny-toggle`,onClick:()=>Ie(e.seq),"aria-label":`Visa/dölj barn`,children:he.has(e.seq)?(0,k.jsx)(o,{size:14}):(0,k.jsx)(s,{size:14})}):(0,k.jsx)(`span`,{className:`toggle-spacer`}),ze(e)]}),i.length>0&&!he.has(e.seq)&&(0,k.jsx)(`div`,{className:`children`,children:i.map(e=>Be(e,t+1,r))})]})},e.seq)},Ve=(e,t=new Set)=>{if(t.has(e.seq))return null;let n=new Set(t);return n.add(e.seq),(0,k.jsxs)(`div`,{className:`expanded-node`,children:[(0,k.jsxs)(`div`,{className:`expanded-node-card`,children:[ze(e,!0),(0,k.jsxs)(`div`,{className:`expanded-node-info`,children:[Object.entries(e.fields).filter(([e,t])=>e&&t&&!e.toLocaleLowerCase(`sv`).includes(`relater`)).map(([e,t])=>(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`b`,{children:e}),(0,k.jsx)(`span`,{children:t})]},e)),e.tags&&(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`b`,{children:`Taggar`}),(0,k.jsx)(`span`,{children:e.tags})]})]})]}),(Z.get(e.seq)||[]).length>0&&(0,k.jsx)(`div`,{className:`expanded-children`,children:(Z.get(e.seq)||[]).map(e=>Ve(e,n))})]},e.seq)},Q=R?X.get(R):void 0,He=e.headers.find(e=>e.toLocaleLowerCase(`sv`).includes(`värdeintervall`))||`Värdeintervall`,Ue=t=>{let n=new Set([t.seq]),r=t.parent;for(;r&&X.has(r)&&!n.has(r);)n.add(r),r=X.get(r).parent;return e.items.filter(e=>!n.has(e.seq))},We=e=>{let t=e,n=new Set([t.seq]);for(;t.parent&&X.has(t.parent)&&!n.has(t.parent);)n.add(t.parent),t=X.get(t.parent);return t},Ge=Q?.relatedSeq?X.get(Q.relatedSeq):void 0,Ke=Q?e.items.filter(e=>e.seq!==Q.seq&&e.relatedSeq===Q.seq):[],qe=[...Ge?[Ge]:[],...Ke.filter(e=>e.seq!==Ge?.seq)],Je=e.items.filter(e=>e.parent&&!X.has(e.parent)),Ye=e.items.filter(e=>e.parent===e.seq).length,$=(e,t)=>(0,k.jsxs)(`div`,{className:`detail-field`,children:[(0,k.jsx)(`label`,{children:e}),(0,k.jsx)(`div`,{children:t||`—`})]});return(0,k.jsxs)(`div`,{className:`app-shell`,children:[(0,k.jsxs)(`header`,{className:`topbar`,children:[(0,k.jsxs)(`div`,{className:`brand`,children:[(0,k.jsx)(`div`,{className:`brand-icon`,children:(0,k.jsx)(a,{size:20})}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`strong`,{children:`Treetanix`}),(0,k.jsx)(`span`,{children:`Projektutforskaren`})]})]}),(0,k.jsxs)(`div`,{className:`toolbar`,children:[(0,k.jsxs)(`button`,{className:`secondary`,onClick:()=>ve.current?.click(),children:[(0,k.jsx)(l,{size:16}),` Öppna Excel`]}),(0,k.jsx)(`input`,{ref:ve,type:`file`,accept:`.xlsx,.xls`,hidden:!0,onChange:e=>{let t=e.target.files?.[0];t&&we(t),e.currentTarget.value=``}}),(0,k.jsxs)(`button`,{className:`secondary`,onClick:()=>{C(``),x(!0)},children:[(0,k.jsx)(d,{size:16}),` Nytt projekt`]}),(0,k.jsxs)(`button`,{className:`secondary`,onClick:De,disabled:!O,children:[(0,k.jsx)(h,{size:15}),` Stäng projekt`]}),(0,k.jsxs)(`button`,{className:`primary`,onClick:Te,disabled:!O,children:[(0,k.jsx)(i,{size:16}),` Spara Excel`,_e?` *`:``]})]})]}),(0,k.jsxs)(`main`,{children:[(0,k.jsxs)(`section`,{className:`page-heading`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`div`,{className:`eyebrow`,children:`PROJEKTÖVERSIKT`}),(0,k.jsx)(`h1`,{children:g||`Inget projekt öppet`}),(0,k.jsx)(`p`,{children:`Projekt i Treetanix · Utforska sakfrågor, ansvar och uppdateringar.`})]}),(0,k.jsxs)(`div`,{className:`file-indicator`,children:[(0,k.jsx)(ee,{size:17}),(0,k.jsx)(`span`,{children:n}),(0,k.jsx)(`i`,{className:_e?`unsaved`:``})]})]}),P&&(0,k.jsxs)(`div`,{className:`alert`,children:[(0,k.jsx)(u,{size:17}),P]}),(0,k.jsxs)(`section`,{className:`project-actions`,children:[(0,k.jsxs)(`div`,{className:`project-label`,children:[(0,k.jsx)(`span`,{className:`eyebrow`,children:`AKTIVT PROJEKT`}),(0,k.jsx)(`strong`,{children:g||`Inget projekt öppet`})]}),(0,k.jsx)(`div`,{className:`project-buttons`,children:(0,k.jsxs)(`button`,{className:`secondary`,onClick:Fe,disabled:!O,children:[(0,k.jsx)(d,{size:16}),` Lägg till sakfråga`]})})]}),(0,k.jsxs)(`section`,{className:`controls`,children:[(0,k.jsxs)(`div`,{className:`searchbox`,children:[(0,k.jsx)(c,{size:18}),(0,k.jsx)(`input`,{value:I,onChange:e=>{L(e.target.value),e.target.value.trim()?V(`search`):V(`tree`),z(null)},placeholder:`Sök i titel, beskrivning, kommentarer, taggar och ansvariga…`}),I&&(0,k.jsx)(`button`,{onClick:()=>{L(``),V(`tree`)},children:(0,k.jsx)(h,{size:16})})]}),(0,k.jsxs)(`div`,{className:`counts`,children:[(0,k.jsx)(`b`,{children:e.items.length}),` sakfrågor `,(0,k.jsx)(`span`,{children:`·`}),` `,(0,k.jsx)(`b`,{children:e.updates.length}),` uppdateringar`]})]}),O?B===`search`&&I.trim()?(0,k.jsxs)(`section`,{className:`search-results`,children:[(0,k.jsxs)(`div`,{className:`section-title`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`h2`,{children:`Sökresultat`}),(0,k.jsxs)(`p`,{children:[Se.length,` träffar för ”`,I,`”`]})]}),(0,k.jsx)(`button`,{className:`text-button`,onClick:()=>{L(``),V(`tree`)},children:`Tillbaka till hierarkin`})]}),Se.length?(0,k.jsx)(`div`,{className:`result-grid`,children:Se.map(e=>ze(e,!0))}):(0,k.jsx)(`div`,{className:`empty-state`,children:`Inga sakfrågor matchade sökningen.`})]}):(0,k.jsxs)(`section`,{className:`workspace`,children:[(0,k.jsxs)(`div`,{className:`section-title`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`h2`,{children:`Hierarki`}),(0,k.jsx)(`p`,{children:`Djupet går från vänster till höger. Välj ett kort för att visa detaljer och underliggande arbete.`})]}),(0,k.jsxs)(`div`,{className:`legend`,children:[(0,k.jsxs)(`span`,{children:[(0,k.jsx)(`i`,{className:`priority-dot critical`}),` Kritisk`]}),(0,k.jsxs)(`span`,{children:[(0,k.jsx)(`i`,{className:`priority-dot high`}),` Hög`]}),(0,k.jsxs)(`span`,{children:[(0,k.jsx)(`i`,{className:`priority-dot medium`}),` Medel`]}),(0,k.jsxs)(`span`,{children:[(0,k.jsx)(`i`,{className:`priority-dot low`}),` Låg`]}),(0,k.jsxs)(`span`,{children:[(0,k.jsx)(`i`,{className:`priority-dot dormant`}),` Vilande`]})]})]}),(0,k.jsx)(`div`,{className:`tree-canvas`,children:ye.length?ye.map(e=>Be(e,0,new Set)):(0,k.jsx)(`div`,{className:`empty-state`,children:`Inga rotobjekt. Kontrollera förälders sekvensnummer eller skapa en ny sakfråga.`})}),(Je.length>0||Ye>0)&&(0,k.jsxs)(`div`,{className:`alert subtle`,children:[(0,k.jsx)(u,{size:16}),Je.length,` objekt har ett förälders sekvensnummer som inte finns i listan. `,Ye>0?`${Ye} självrefererande relationer hittades.`:``,` Dessa visas inte i trädet förrän relationerna rättats.`]})]}):(0,k.jsx)(`div`,{className:`empty-state`,children:`Läser in exempelarbetsboken…`})]}),Q&&(0,k.jsx)(`div`,{className:`overlay-backdrop`,onMouseDown:e=>{e.target===e.currentTarget&&Le()},children:(0,k.jsxs)(`section`,{className:`detail-panel`,children:[(0,k.jsxs)(`header`,{className:`panel-header`,children:[(0,k.jsxs)(`button`,{className:`back-button`,onClick:Le,children:[(0,k.jsx)(f,{size:18}),` Tillbaka`]}),(0,k.jsxs)(`div`,{className:`panel-actions`,children:[Q.parent&&X.has(Q.parent)&&(0,k.jsxs)(`button`,{className:`secondary compact`,onClick:()=>{z(Q.parent),H(!1),W(null),V(`tree`)},children:[(0,k.jsx)(f,{size:15}),` Gå till överliggande arbete`]}),(0,k.jsxs)(`button`,{className:`secondary compact`,onClick:()=>Re(Q),children:[(0,k.jsx)(m,{size:15}),` Redigera`]}),(0,k.jsxs)(`button`,{className:`danger compact`,onClick:()=>Ne(Q),children:[(0,k.jsx)(p,{size:15}),` Ta bort`]}),(0,k.jsx)(`button`,{className:`icon-button`,onClick:Le,children:(0,k.jsx)(h,{size:19})})]})]}),(0,k.jsxs)(`div`,{className:`panel-content`,children:[(0,k.jsxs)(`div`,{className:`eyebrow`,children:[`SAKFRÅGA · `,Q.seq]}),(0,k.jsx)(`h2`,{children:Q.title}),(0,k.jsxs)(`div`,{className:`detail-chips`,children:[(0,k.jsxs)(`span`,{className:`priority-pill ${M(Q.priority)}`,children:[j(Q.priority),` prioritet`]}),Q.status&&(0,k.jsx)(`span`,{className:`chip`,children:Q.status}),Q.area&&(0,k.jsx)(`span`,{className:`chip`,children:Q.area})]}),(0,k.jsxs)(`div`,{className:`detail-grid`,children:[Object.entries(Q.fields).filter(([e,t])=>e&&t&&!e.toLocaleLowerCase(`sv`).includes(`relater`)&&![`delansvariga`,`taggar`,`förälders sekvensnummer`].includes(e.toLocaleLowerCase(`sv`))).map(([e,t])=>$(e,t)),$(`Delansvariga`,Q.deputyOwners),$(`Taggar`,Q.tags),$(`Förälders sekvensnummer`,Q.parent),qe.length>0&&$(`Relaterade sakfrågor`,qe.map(e=>`${e.seq} · ${e.title}`).join(` | `))]}),(0,k.jsxs)(`div`,{className:`subtree-heading`,children:[(0,k.jsx)(`h3`,{children:`Underliggande arbete`}),(0,k.jsxs)(`span`,{children:[xe(Q.seq).length,` underobjekt`]})]}),(0,k.jsx)(`div`,{className:`expanded-tree`,children:Ve(Q)}),qe.map((e,t)=>(0,k.jsxs)(`div`,{className:`related-tree-block`,children:[(0,k.jsxs)(`div`,{className:`subtree-heading`,children:[(0,k.jsxs)(`h3`,{children:[e.seq===Q.relatedSeq?`Relaterat projektträd`:`Länkad från · projektträd`,` · `,e.seq]}),(0,k.jsx)(`span`,{children:e.title})]}),(0,k.jsx)(`div`,{className:`expanded-tree related-tree`,children:Ve(We(e))})]},e.seq)),(0,k.jsxs)(`div`,{className:`updates-heading`,children:[(0,k.jsx)(`h3`,{children:`Uppdateringar och kommentarer`}),(0,k.jsxs)(`div`,{className:`updates-tools`,children:[(0,k.jsxs)(`span`,{children:[Ce(Q.seq).length,` poster inklusive underobjekt`]}),(0,k.jsxs)(`button`,{className:`text-button`,onClick:()=>G(!0),children:[(0,k.jsx)(d,{size:14}),` Lägg till`]})]})]}),(0,k.jsx)(`div`,{className:`timeline`,children:Ce(Q.seq).length?Ce(Q.seq).map(e=>(0,k.jsxs)(`article`,{className:`timeline-item`,children:[(0,k.jsx)(`div`,{className:`timeline-mark`}),(0,k.jsxs)(`div`,{children:[(0,k.jsxs)(`div`,{className:`timeline-meta`,children:[(0,k.jsx)(`b`,{children:e.type}),(0,k.jsx)(`span`,{children:e.date||`Datum saknas`}),(0,k.jsxs)(`span`,{children:[`Sek.nr `,e.seq]}),e.type.toLocaleLowerCase(`sv`)===`kommentar`&&(0,k.jsxs)(`span`,{className:`comment-actions`,children:[(0,k.jsxs)(`button`,{className:`text-button`,onClick:()=>{me(e),J({...e})},children:[(0,k.jsx)(m,{size:13}),` Redigera`]}),(0,k.jsxs)(`button`,{className:`text-button danger-text`,onClick:()=>Me(e),children:[(0,k.jsx)(p,{size:13}),` Ta bort`]})]})]}),(0,k.jsx)(`p`,{children:e.information}),e.author&&(0,k.jsx)(`small`,{children:e.author})]})]},e.id)):(0,k.jsx)(`p`,{className:`muted`,children:`Inga registrerade uppdateringar.`})})]})]})}),ae&&Q&&(0,k.jsx)(`div`,{className:`overlay-backdrop editor-backdrop`,children:(0,k.jsxs)(`section`,{className:`edit-panel update-panel`,children:[(0,k.jsxs)(`header`,{className:`panel-header`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsxs)(`div`,{className:`eyebrow`,children:[`NY HISTORIKPOST · `,Q.seq]}),(0,k.jsx)(`h2`,{children:`Lägg till uppdatering eller kommentar`})]}),(0,k.jsx)(`button`,{className:`icon-button`,onClick:()=>G(!1),children:(0,k.jsx)(h,{size:19})})]}),(0,k.jsxs)(`div`,{className:`edit-form update-form`,children:[(0,k.jsxs)(`label`,{className:`form-field`,children:[`Typ`,(0,k.jsxs)(`select`,{value:se,onChange:e=>ce(e.target.value),children:[(0,k.jsx)(`option`,{children:`Uppdatering`}),(0,k.jsx)(`option`,{children:`Kommentar`})]})]}),(0,k.jsxs)(`label`,{className:`form-field`,children:[`Datum`,(0,k.jsx)(`input`,{type:`date`,value:le,onChange:e=>ue(e.target.value)})]}),(0,k.jsxs)(`label`,{className:`form-field`,children:[`Författare`,(0,k.jsx)(`input`,{value:de,onChange:e=>fe(e.target.value),placeholder:`Namn`})]}),(0,k.jsxs)(`label`,{className:`form-field update-wide`,children:[`Information`,(0,k.jsx)(`textarea`,{rows:6,value:K,onChange:e=>oe(e.target.value),placeholder:`Skriv uppdateringen eller kommentaren…`})]}),(0,k.jsxs)(`div`,{className:`form-actions`,children:[(0,k.jsx)(`button`,{className:`secondary`,onClick:()=>G(!1),children:`Avbryt`}),(0,k.jsx)(`button`,{className:`primary`,disabled:!K.trim(),onClick:Ae,children:`Lägg till post`})]})]})]})}),pe&&q&&(0,k.jsx)(`div`,{className:`overlay-backdrop editor-backdrop`,children:(0,k.jsxs)(`section`,{className:`edit-panel update-panel`,children:[(0,k.jsxs)(`header`,{className:`panel-header`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsxs)(`div`,{className:`eyebrow`,children:[`REDIGERA KOMMENTAR · `,q.seq]}),(0,k.jsx)(`h2`,{children:`Redigera kommentar`})]}),(0,k.jsx)(`button`,{className:`icon-button`,onClick:()=>{me(null),J(null)},children:(0,k.jsx)(h,{size:19})})]}),(0,k.jsxs)(`div`,{className:`edit-form update-form`,children:[(0,k.jsxs)(`label`,{className:`form-field`,children:[`Datum`,(0,k.jsx)(`input`,{type:`date`,value:q.date,onChange:e=>J(t=>t&&{...t,date:e.target.value})})]}),(0,k.jsxs)(`label`,{className:`form-field`,children:[`Författare`,(0,k.jsx)(`input`,{value:q.author,onChange:e=>J(t=>t&&{...t,author:e.target.value})})]}),(0,k.jsxs)(`label`,{className:`form-field update-wide`,children:[`Kommentar`,(0,k.jsx)(`textarea`,{rows:6,value:q.information,onChange:e=>J(t=>t&&{...t,information:e.target.value})})]}),(0,k.jsxs)(`div`,{className:`form-actions`,children:[(0,k.jsx)(`button`,{className:`secondary`,onClick:()=>{me(null),J(null)},children:`Avbryt`}),(0,k.jsx)(`button`,{className:`primary`,disabled:!q.information.trim(),onClick:je,children:`Spara ändringar`})]})]})]})}),ie&&U&&(0,k.jsx)(`div`,{className:`overlay-backdrop editor-backdrop`,children:(0,k.jsxs)(`section`,{className:`edit-panel`,children:[(0,k.jsxs)(`header`,{className:`panel-header`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`div`,{className:`eyebrow`,children:`REDIGERA SAKFRÅGA`}),(0,k.jsx)(`h2`,{children:U.seq===`0`?`Ny sakfråga`:`Sekvensnummer ${U.seq}`})]}),(0,k.jsx)(`button`,{className:`icon-button`,onClick:()=>{H(!1),W(null)},children:(0,k.jsx)(h,{size:19})})]}),(0,k.jsxs)(`div`,{className:`edit-form`,children:[(0,k.jsxs)(`label`,{className:`form-field`,children:[`Sakfråga`,(0,k.jsx)(`input`,{value:U.title,onChange:e=>W(t=>t&&{...t,title:e.target.value})})]}),(0,k.jsxs)(`label`,{className:`form-field`,children:[`Förälders sekvensnummer`,(0,k.jsx)(`input`,{value:U.parent,onChange:e=>W(t=>t&&{...t,parent:e.target.value}),placeholder:`Lämna tomt för rotobjekt`})]}),(0,k.jsxs)(`label`,{className:`form-field`,children:[`Sakområde`,(0,k.jsx)(`input`,{value:U.area,onChange:e=>W(t=>t&&{...t,area:e.target.value})})]}),(0,k.jsxs)(`label`,{className:`form-field`,children:[`Huvudansvarig`,(0,k.jsx)(`input`,{value:U.owner,onChange:e=>W(t=>t&&{...t,owner:e.target.value})})]}),(0,k.jsxs)(`label`,{className:`form-field`,children:[`Delansvariga`,(0,k.jsx)(`input`,{value:U.deputyOwners,onChange:e=>W(t=>t&&{...t,deputyOwners:e.target.value}),placeholder:`En eller flera personer/grupper`})]}),(0,k.jsxs)(`label`,{className:`form-field`,children:[`Värdeintervall`,(0,k.jsx)(`input`,{value:U.fields[He]||``,onChange:e=>W(t=>t&&{...t,fields:{...t.fields,[He]:e.target.value}})})]}),(0,k.jsxs)(`label`,{className:`form-field`,children:[`Prioritet`,(0,k.jsxs)(`select`,{value:U.priority||`Medel`,onChange:e=>W(t=>t&&{...t,priority:e.target.value}),children:[(0,k.jsx)(`option`,{children:`Kritisk`}),(0,k.jsx)(`option`,{children:`Hög`}),(0,k.jsx)(`option`,{children:`Medel`}),(0,k.jsx)(`option`,{children:`Låg`}),(0,k.jsx)(`option`,{children:`Vilande`})]})]}),(0,k.jsxs)(`label`,{className:`form-field`,children:[`Status`,(0,k.jsx)(`input`,{value:U.status,onChange:e=>W(t=>t&&{...t,status:e.target.value})})]}),(0,k.jsxs)(`label`,{className:`form-field`,children:[`Taggar (separera med semikolon)`,(0,k.jsx)(`input`,{value:U.tags,onChange:e=>W(t=>t&&{...t,tags:e.target.value})})]}),(0,k.jsxs)(`label`,{className:`form-field`,children:[`Relaterat sekvensnummer`,(0,k.jsxs)(`select`,{value:U.relatedSeq,onChange:e=>W(t=>t&&{...t,relatedSeq:e.target.value}),children:[(0,k.jsx)(`option`,{value:``,children:`Ingen koppling`}),U.relatedSeq&&!Ue(U).some(e=>e.seq===U.relatedSeq)&&X.has(U.relatedSeq)&&(0,k.jsxs)(`option`,{value:U.relatedSeq,disabled:!0,children:[U.relatedSeq,` · Ogiltig befintlig koppling (förfader)`]}),Ue(U).map(e=>(0,k.jsxs)(`option`,{value:e.seq,children:[e.seq,` · `,e.title]},e.seq))]}),(0,k.jsx)(`small`,{children:`Förfäder i samma gren kan inte väljas. Kopplingen visas endast i detaljvyn och påverkar inte hierarki eller sökning.`})]}),(0,k.jsxs)(`label`,{className:`form-field full-field`,children:[`Beskrivning`,(0,k.jsx)(`textarea`,{rows:4,value:U.description,onChange:e=>W(t=>t&&{...t,description:e.target.value})})]}),(0,k.jsxs)(`label`,{className:`form-field full-field`,children:[`Kommentar`,(0,k.jsx)(`textarea`,{rows:3,value:U.comment,onChange:e=>W(t=>t&&{...t,comment:e.target.value})})]}),e.headers.filter(e=>![`sekvensnummer`,`förälders sekvensnummer`,`sakfråga`,`beskrivning sakfråga`,`beskrivning`,`kommentar`,`prio`,`status`,`sakområde`,`huvudansvarig`,`delansvariga`,`taggar`,`relaterat sekvensnummer`,`värdeintervall`].includes(e.toLocaleLowerCase(`sv`))&&!e.toLocaleLowerCase(`sv`).includes(`relaterat sekvensnummer`)).map(e=>(0,k.jsxs)(`label`,{className:`form-field full-field`,children:[e,(0,k.jsx)(`textarea`,{rows:e.toLocaleLowerCase(`sv`).includes(`ståndpunkt`)?4:2,value:U.fields[e]||``,onChange:t=>W(n=>n&&{...n,fields:{...n.fields,[e]:t.target.value}})})]},e)),(0,k.jsxs)(`div`,{className:`custom-field-action`,children:[(0,k.jsxs)(`button`,{className:`secondary`,type:`button`,onClick:()=>T(!0),children:[(0,k.jsx)(d,{size:15}),` Lägg till sakfrågefält`]}),(0,k.jsx)(`small`,{children:`Nya fält läggs till för samtliga sakfrågor i projektet.`})]}),(0,k.jsxs)(`div`,{className:`form-actions`,children:[(0,k.jsx)(`button`,{className:`secondary`,onClick:()=>{H(!1),W(null)},children:`Avbryt`}),(0,k.jsx)(`button`,{className:`primary`,onClick:()=>ke(U),children:`Spara ändringar`})]})]})]})}),w&&(0,k.jsx)(`div`,{className:`overlay-backdrop editor-backdrop`,children:(0,k.jsxs)(`section`,{className:`edit-panel prompt-panel`,children:[(0,k.jsxs)(`header`,{className:`panel-header`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`div`,{className:`eyebrow`,children:`PROJEKTFÄLT`}),(0,k.jsx)(`h2`,{children:`Lägg till sakfrågefält`})]}),(0,k.jsx)(`button`,{className:`icon-button`,onClick:()=>T(!1),children:(0,k.jsx)(h,{size:19})})]}),(0,k.jsxs)(`div`,{className:`edit-form single-column`,children:[(0,k.jsxs)(`label`,{className:`form-field full-field`,children:[`Fältnamn`,(0,k.jsx)(`input`,{autoFocus:!0,value:E,onChange:e=>D(e.target.value),placeholder:`Exempelvis Berörd arbetsgrupp`,onKeyDown:e=>{e.key===`Enter`&&Pe()}})]}),(0,k.jsx)(`p`,{className:`muted`,children:`Fältet skapas i hela projektet och visas när du redigerar alla sakfrågor. Det följer med vid Excel-export.`}),(0,k.jsxs)(`div`,{className:`form-actions`,children:[(0,k.jsx)(`button`,{className:`secondary`,onClick:()=>T(!1),children:`Avbryt`}),(0,k.jsx)(`button`,{className:`primary`,disabled:!E.trim(),onClick:Pe,children:`Skapa fält`})]})]})]})}),b&&(0,k.jsx)(`div`,{className:`overlay-backdrop editor-backdrop`,children:(0,k.jsxs)(`section`,{className:`edit-panel prompt-panel`,children:[(0,k.jsxs)(`header`,{className:`panel-header`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`div`,{className:`eyebrow`,children:`NYTT PROJEKT`}),(0,k.jsx)(`h2`,{children:`Skapa projekt`})]}),(0,k.jsx)(`button`,{className:`icon-button`,onClick:()=>x(!1),children:(0,k.jsx)(h,{size:19})})]}),(0,k.jsxs)(`div`,{className:`edit-form single-column`,children:[(0,k.jsxs)(`label`,{className:`form-field full-field`,children:[`Projektnamn`,(0,k.jsx)(`input`,{autoFocus:!0,value:S,onChange:e=>C(e.target.value),placeholder:`Exempelvis Spektrumfrågor`})]}),(0,k.jsxs)(`div`,{className:`form-actions`,children:[(0,k.jsx)(`button`,{className:`secondary`,onClick:()=>x(!1),children:`Avbryt`}),(0,k.jsx)(`button`,{className:`primary`,disabled:!S.trim(),onClick:Oe,children:`Skapa projekt`})]})]})]})}),te&&(0,k.jsx)(`div`,{className:`overlay-backdrop editor-backdrop`,children:(0,k.jsxs)(`section`,{className:`edit-panel prompt-panel`,children:[(0,k.jsxs)(`header`,{className:`panel-header`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`div`,{className:`eyebrow`,children:`STÄNG PROJEKT`}),(0,k.jsx)(`h2`,{children:`Vill du spara innan projektet stängs?`})]}),(0,k.jsx)(`button`,{className:`icon-button`,onClick:()=>y(!1),children:(0,k.jsx)(h,{size:19})})]}),(0,k.jsxs)(`div`,{className:`close-project-content`,children:[(0,k.jsxs)(`p`,{children:[`Projektet `,(0,k.jsx)(`b`,{children:g}),` har osparade ändringar.`]}),(0,k.jsx)(`p`,{children:`Om du sparar laddas en uppdaterad Excel-arbetsbok ned innan projektet stängs.`}),(0,k.jsxs)(`div`,{className:`form-actions`,children:[(0,k.jsx)(`button`,{className:`secondary`,onClick:()=>y(!1),children:`Avbryt`}),(0,k.jsx)(`button`,{className:`danger`,onClick:Ee,children:`Stäng utan att spara`}),(0,k.jsx)(`button`,{className:`primary`,onClick:()=>{Te(),Ee()},children:`Spara och stäng`})]})]})]})}),(0,k.jsxs)(`footer`,{children:[(0,k.jsx)(`span`,{children:`Treetanix · Lokal Excel-hantering`}),(0,k.jsx)(`span`,{children:`Ändringar laddas ned som en ny Excel-fil när du väljer Spara Excel.`})]})]})}y.createRoot(document.getElementById(`root`)).render((0,k.jsx)(v.StrictMode,{children:(0,k.jsx)(N,{})}));
@@ -0,0 +1 @@
1
+ @import "https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap";:root{color:#202b3c;font-synthesis:none;text-rendering:optimizelegibility;background:#f4f6f9;font-family:DM Sans,sans-serif}*{box-sizing:border-box}body{min-width:320px;margin:0}button,input,textarea{font:inherit}button{cursor:pointer}.app-shell{flex-direction:column;min-height:100vh;display:flex}.topbar{z-index:5;background:#fff;border-bottom:1px solid #e6eaf0;justify-content:space-between;align-items:center;height:68px;padding:0 34px;display:flex;position:sticky;top:0}.brand{align-items:center;gap:11px;display:flex}.brand-icon{color:#2859a8;background:#eaf1ff;border-radius:10px;place-items:center;width:36px;height:36px;display:grid}.brand strong{font:700 16px Manrope;display:block}.brand span{color:#8490a2;margin-top:1px;font-size:11px;display:block}.toolbar{gap:9px;display:flex}.primary,.secondary,.text-button,.icon-button,.back-button{border:0;border-radius:8px;justify-content:center;align-items:center;gap:8px;padding:10px 13px;font-size:13px;font-weight:600;display:inline-flex}.primary{color:#fff;background:#2459a6;box-shadow:0 2px 4px #1b4c921c}.primary:hover{background:#194987}.primary:disabled{opacity:.45;cursor:not-allowed}.secondary{color:#344258;background:#f0f3f7}.secondary:hover{background:#e6ebf2}.compact{padding:8px 10px}.icon-button{color:#64748b;background:0 0;padding:8px}.icon-button:hover{background:#edf1f6}.main,main{flex:1;width:100%;max-width:1480px;margin:0 auto;padding:32px 34px 60px}.page-heading{justify-content:space-between;align-items:flex-end;margin-bottom:25px;display:flex}.eyebrow{letter-spacing:.13em;color:#6881a5;font-size:10px;font-weight:700}.page-heading h1{letter-spacing:-.04em;color:#1e2a3b;margin:6px 0 5px;font:800 30px Manrope}.page-heading p{color:#78869a;margin:0;font-size:13px}.file-indicator{color:#77859a;background:#fff;border:1px solid #e7ebf1;border-radius:8px;align-items:center;gap:9px;padding:9px 12px;font-size:11px;display:flex}.file-indicator i{background:#22a06b;border-radius:50%;width:7px;height:7px}.file-indicator i.unsaved{background:#e69b36}.controls{justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px;display:flex}.searchbox{color:#8995a6;background:#fff;border:1px solid #e3e8ef;border-radius:9px;flex:1;align-items:center;gap:10px;max-width:760px;height:44px;padding:0 13px;display:flex;box-shadow:0 1px 2px #1d2d4510}.searchbox:focus-within{border-color:#8daedb;box-shadow:0 0 0 3px #dbeafe}.searchbox input{color:#26364b;background:0 0;border:0;outline:0;flex:1;min-width:0;font-size:13px}.searchbox input::placeholder{color:#a0aaba}.searchbox button{color:#8290a3;background:0 0;border:0;padding:4px}.counts{color:#8591a2;white-space:nowrap;font-size:12px}.counts b{color:#42536b}.counts span{color:#c1c9d3;padding:0 6px}.workspace,.search-results{background:#fff;border:1px solid #e6eaf0;border-radius:12px;padding:22px 22px 25px;box-shadow:0 2px 8px #1c2c4210}.section-title{justify-content:space-between;align-items:center;gap:15px;margin-bottom:20px;display:flex}.section-title h2{color:#25344a;margin:0 0 4px;font:700 17px Manrope}.section-title p{color:#8793a4;margin:0;font-size:12px}.legend{color:#8591a2;gap:14px;font-size:11px;display:flex}.legend span{align-items:center;gap:5px;display:flex}.priority-dot{background:#c5cdd8;border-radius:50%;flex:none;width:7px;height:7px;display:inline-block}.priority-dot.critical{background:#f43f5e}.priority-dot.high{background:#fb923c}.priority-dot.medium{background:#facc15}.priority-dot.low{background:#94a3b8}.priority-dot.dormant{background:#fff;border:1px solid #94a3b8}.tree-canvas{background:linear-gradient(#f9fafc 1px,#0000 1px) 0 0/100% 44px;border-radius:8px;min-height:250px;padding:18px 12px 22px;overflow:auto}.tree-node{position:relative}.tree-node-row{align-items:flex-start;gap:0;min-height:54px;display:flex;position:relative}.node-with-toggle{z-index:1;flex:none;align-items:center;gap:5px;display:flex;position:relative}.tiny-toggle{color:#8996a8;background:0 0;border:0;place-items:center;width:20px;height:22px;padding:2px;display:grid}.toggle-spacer{flex:none;width:20px}.children{border-left:0;margin-left:28px;padding-left:23px;position:relative}.children:after{content:"";pointer-events:none;background:#d8e0ea;width:1px;position:absolute;top:26px;bottom:27px;left:0}.children>.tree-node:before{content:"";border-top:1px solid #d8e0ea;width:22px;position:absolute;top:26px;left:-23px}.node-card{text-align:left;color:#29384d;background:#fff;border:1px solid #e2e8f0;border-radius:8px;flex-direction:column;align-items:flex-start;gap:6px;width:260px;min-height:46px;padding:8px 11px;transition:border .12s,box-shadow .12s,transform .12s;display:flex;box-shadow:0 1px 3px #23334a0b}.node-card:hover{border-color:#9ab4d8;transform:translateY(-1px);box-shadow:0 3px 9px #23334a14}.node-card.selected{background:#f4f8ff;border-color:#4275bb;box-shadow:0 0 0 2px #dce9fb}.card-title{text-overflow:ellipsis;white-space:nowrap;max-width:100%;font-size:12px;font-weight:600;line-height:1.35;overflow:hidden}.card-meta{color:#8995a6;align-items:center;gap:7px;font-size:10px;display:flex}.status{white-space:nowrap;text-overflow:ellipsis;border-left:1px solid #e2e7ee;max-width:130px;padding-left:7px;overflow:hidden}.search-snippet{color:#8794a7;white-space:nowrap;text-overflow:ellipsis;max-width:100%;font-size:10px;overflow:hidden}.alert{color:#87611f;background:#fffaf0;border:1px solid #f2d8a9;border-radius:8px;align-items:flex-start;gap:9px;margin:12px 0;padding:12px 14px;font-size:12px;display:flex}.alert.subtle{background:#fbfaf6;margin-top:18px}.empty-state{text-align:center;color:#8995a6;padding:35px 20px;font-size:13px}.result-grid{grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px;display:grid}.result-grid .node-card{width:100%;min-height:65px}.text-button{color:#3264a6;background:0 0;padding:8px}.text-button:hover{background:#f1f5fb}.overlay-backdrop{z-index:10;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background:#17263a66;justify-content:flex-end;display:flex;position:fixed;inset:0}.detail-panel{background:#fff;flex-direction:column;width:min(820px,92vw);height:100%;animation:.18s ease-out slidein;display:flex;box-shadow:-12px 0 40px #15253b26}.panel-header{border-bottom:1px solid #e8edf2;justify-content:space-between;align-items:center;gap:10px;min-height:62px;padding:12px 22px;display:flex}.back-button{color:#51627a;background:0 0;padding:8px 6px}.back-button:hover{background:#f1f4f8}.panel-actions{align-items:center;gap:8px;display:flex}.panel-content{padding:27px 30px 45px;overflow:auto}.panel-content h2,.edit-panel h2{letter-spacing:-.035em;color:#223149;margin:7px 0 12px;font:800 25px Manrope}.detail-chips{flex-wrap:wrap;gap:7px;margin-bottom:24px;display:flex}.chip,.priority-pill{color:#637188;background:#f0f3f7;border-radius:20px;padding:5px 9px;font-size:10px}.priority-pill.critical{color:#be123c;background:#ffe4e9}.priority-pill.high{color:#c2410c;background:#ffedd5}.priority-pill.medium{color:#854d0e;background:#fef9c3}.priority-pill.low{color:#475569;background:#e2e8f0}.priority-pill.dormant{color:#64748b;background:#fff;border:1px solid #cbd5e1}.detail-grid{border-top:1px solid #edf0f4;grid-template-columns:1fr 1fr;gap:0 24px;display:grid}.detail-field{border-bottom:1px solid #edf0f4;min-width:0;padding:14px 0}.detail-field label{color:#8995a6;text-transform:uppercase;letter-spacing:.07em;margin-bottom:7px;font-size:10px;font-weight:700;display:block}.detail-field div{color:#3b4a60;white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.6}.subtree-heading,.updates-heading{justify-content:space-between;align-items:baseline;margin:26px 0 12px;display:flex}.subtree-heading h3,.updates-heading h3{color:#2d3b50;margin:0;font:700 14px Manrope}.subtree-heading span,.updates-heading span{color:#929eae;font-size:10px}.expanded-tree{background:#fafbfd;border:1px solid #e9edf2;border-radius:9px;padding:15px;overflow:auto}.expanded-node{align-items:flex-start;gap:0;display:flex}.expanded-node-card{flex:none}.expanded-node-card .node-card{width:230px}.expanded-children{border-left:1px solid #d8e0ea;margin-left:23px;padding-left:18px;position:relative}.expanded-children>.expanded-node{margin-bottom:5px;position:relative}.timeline{border-top:1px solid #edf0f4;padding-top:8px}.timeline-item{border-bottom:1px solid #f0f2f5;grid-template-columns:12px 1fr;gap:10px;padding:13px 0;display:grid}.timeline-mark{background:#6590c7;border-radius:50%;width:7px;height:7px;margin-top:5px;box-shadow:0 0 0 3px #e9f0fa}.timeline-meta{color:#8995a6;flex-wrap:wrap;align-items:center;gap:10px;font-size:10px;display:flex}.timeline-meta b{color:#3c5f91}.timeline-item p{white-space:pre-wrap;color:#48576b;margin:7px 0;font-size:12px;line-height:1.55}.timeline-item small{color:#929eae;font-size:10px}.muted{color:#929eae;font-size:12px}.editor-backdrop{justify-content:center;align-items:center;padding:20px}.edit-panel{background:#fff;border-radius:13px;flex-direction:column;width:min(620px,96vw);max-height:92vh;animation:.16s ease-out popin;display:flex;overflow:hidden;box-shadow:0 20px 60px #14243c44}.edit-panel .panel-header{padding:16px 22px}.edit-panel h2{margin:4px 0 0;font-size:18px}.edit-form{grid-template-columns:1fr 1fr;gap:13px;padding:18px 22px 22px;display:grid;overflow:auto}.form-field{color:#617087;flex-direction:column;gap:6px;font-size:11px;font-weight:600;display:flex}.form-field input,.form-field textarea,.form-field select{color:#29384d;resize:vertical;border:1px solid #dfe5ed;border-radius:7px;outline:0;padding:9px 10px;font-size:12px}.form-field input:focus,.form-field textarea:focus,.form-field select:focus{border-color:#83a5d3;box-shadow:0 0 0 3px #e7f0fc}:is(.form-field:has(textarea),.form-field:has(small)){grid-column:1/-1}.form-actions{border-top:1px solid #edf0f4;grid-column:1/-1;justify-content:flex-end;gap:8px;margin-top:6px;padding-top:13px;display:flex}footer{color:#9aa5b4;background:#fff;border-top:1px solid #e6eaf0;justify-content:space-between;padding:13px 34px;font-size:10px;display:flex}@keyframes slidein{0%{opacity:.6;transform:translate(20px)}to{opacity:1;transform:translate(0)}}@keyframes popin{0%{opacity:.5;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media (width<=760px){.topbar{flex-wrap:wrap;align-items:flex-start;gap:10px;height:auto;min-height:62px;padding:10px 14px}.toolbar{justify-content:flex-end;width:100%}.main,main{padding:22px 14px 40px}.page-heading{flex-direction:column;align-items:flex-start;gap:12px}.controls{flex-direction:column;align-items:stretch;gap:10px}.counts{align-self:flex-end}.workspace,.search-results{padding:15px 12px}.section-title{flex-direction:column;align-items:flex-start}.legend{flex-wrap:wrap}.detail-panel{width:100vw}.panel-content{padding:22px 17px}.detail-grid,.edit-form{grid-template-columns:1fr}:is(.form-field:has(textarea),.form-field:has(small)){grid-column:auto}footer{flex-direction:column;gap:8px;padding:12px 14px}.file-indicator{max-width:100%;overflow:hidden}.file-indicator span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}}.updates-tools{align-items:center;gap:10px;display:flex}.update-wide{grid-column:1/-1}.expanded-node-info{background:#fff;border:1px solid #edf0f4;border-radius:7px;gap:7px;width:230px;margin:7px 0 12px;padding:9px 10px;display:grid}.expanded-node-info>div{gap:2px;display:grid}.expanded-node-info b{color:#8b97a7;text-transform:uppercase;letter-spacing:.04em;font-size:9px}.expanded-node-info span{color:#536277;white-space:pre-wrap;overflow-wrap:anywhere;max-height:150px;font-size:10px;line-height:1.45;overflow:auto}.tree-node-row>.children:before{content:"";border-top:1px solid #d8e0ea;width:28px;position:absolute;top:23px;left:-28px}.danger{color:#b84945;cursor:pointer;background:#fff7f6;border:1px solid #f0c9c7;border-radius:7px;justify-content:center;align-items:center;gap:7px;padding:8px 11px;font-size:11px;font-weight:600;display:inline-flex}.danger:hover{background:#ffedeb;border-color:#e5a6a2}.danger.compact{padding:7px 10px}.form-field select{color:#29384d;background:#fff;border:1px solid #dfe5ed;border-radius:7px;outline:0;padding:9px 10px;font-size:12px}.form-field small{color:#8b97a7;font-size:10px;font-weight:400;line-height:1.45}.full-field{grid-column:1/-1}.related-tree{background:#f7faff;border-color:#dbe5f2}.project-actions{background:#fff;border:1px solid #e6eaf0;border-radius:10px;justify-content:space-between;align-items:center;gap:16px;margin:0 0 18px;padding:12px 15px;display:flex;box-shadow:0 1px 3px #1c2c4208}.project-label{flex-direction:column;gap:3px;min-width:0;display:flex}.project-label strong{color:#2b3a50;text-overflow:ellipsis;white-space:nowrap;font:700 14px Manrope;overflow:hidden}.project-buttons{flex:none;align-items:center;gap:8px;display:flex}.prompt-panel{width:min(540px,96vw)}.single-column{grid-template-columns:1fr}.close-project-content{padding:18px 22px 22px}.close-project-content p{color:#526176;margin:0 0 10px;font-size:13px;line-height:1.55}.close-project-content .form-actions{flex-wrap:wrap;margin-top:18px}.expanded-node>.expanded-children{border-left:0;margin-left:23px;padding-left:18px;position:relative}.expanded-node>.expanded-children:before{content:"";border-top:1px solid #d8e0ea;width:23px;position:absolute;top:23px;left:-23px}.expanded-node>.expanded-children:after{content:"";pointer-events:none;background:#d8e0ea;width:1px;position:absolute;top:23px;bottom:23px;left:0}.expanded-children>.expanded-node{position:relative}.expanded-children>.expanded-node:before{content:"";border-top:1px solid #d8e0ea;width:18px;position:absolute;top:23px;left:-19px}.expanded-children:has(>.expanded-node:only-child):after{display:none}.expanded-children:has(>.expanded-node:only-child)>.expanded-node:before{display:none}@media (width<=760px){.project-actions{flex-direction:column;align-items:flex-start}.project-buttons{justify-content:flex-end;width:100%}.close-project-content .form-actions{justify-content:stretch}.close-project-content .form-actions button{flex:1}}.custom-field-action{border-top:1px solid #e8edf3;grid-column:1/-1;align-items:center;gap:12px;padding:12px 0;display:flex}.custom-field-action small{color:#718096;font-size:12px}.comment-actions{align-items:center;gap:10px;margin-left:auto;display:inline-flex}.comment-actions .text-button{padding:2px 4px;font-size:12px}.danger-text{color:#dc2626}.timeline-meta{flex-wrap:wrap;align-items:center;gap:10px;display:flex}