archsight 0.4.1 → 0.4.2
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.
- checksums.yaml +4 -4
- data/docs/modeling.md +31 -10
- data/lib/archsight/linter/structure.rb +4 -1
- data/lib/archsight/resources/application_component.rb +8 -0
- data/lib/archsight/resources/technology_device.rb +56 -4
- data/lib/archsight/resources/technology_service.rb +7 -0
- data/lib/archsight/version.rb +1 -1
- data/lib/archsight/web/public/vue/{DocPage-C2ubTXH7.js → DocPage-C8Ysway-.js} +1 -1
- data/lib/archsight/web/public/vue/{EditorPage-Dso6PLMn.js → EditorPage-pr2MR6_b.js} +1 -1
- data/lib/archsight/web/public/vue/{ErrorPage-DnZ6YJLi.js → ErrorPage-FAkpW-hn.js} +1 -1
- data/lib/archsight/web/public/vue/{GraphView-CTl03Yre.js → GraphView-liQJzFyo.js} +1 -1
- data/lib/archsight/web/public/vue/{HomePage-C339nihQ.js → HomePage-DYpzSXG8.js} +2 -2
- data/lib/archsight/web/public/vue/InstanceRouter-BdkBTmGO.js +1 -0
- data/lib/archsight/web/public/vue/{InstanceRouter-ZaCcjlIX.css → InstanceRouter-Ca_C8izS.css} +1 -1
- data/lib/archsight/web/public/vue/{KindList-C0oaM3CF.js → KindList-CrgI4qDb.js} +1 -1
- data/lib/archsight/web/public/vue/{PageView-OZB6G9Wu.js → PageView-BIxT_t49.js} +1 -1
- data/lib/archsight/web/public/vue/{QueryError-C2xLkCEm.js → QueryError-ChdyV8B1.js} +1 -1
- data/lib/archsight/web/public/vue/{ResourceList-DooWFwQP.js → ResourceList-DdtaHY4k.js} +1 -1
- data/lib/archsight/web/public/vue/{SearchResults-BK-HjFnv.js → SearchResults-BYRAcK_o.js} +1 -1
- data/lib/archsight/web/public/vue/{WikiPage-B2FYmeHL.js → WikiPage-CgvRN6R2.js} +1 -1
- data/lib/archsight/web/public/vue/{index-CLuLTE5I.js → index-yiZbbvAs.js} +2 -2
- data/lib/archsight/web/public/vue.html +1 -1
- metadata +15 -15
- data/lib/archsight/web/public/vue/InstanceRouter-DFW7tOrD.js +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c249926b6ff6855b19ace38f11b9f256340e4d77cd00fe4d5f981fcbb0fd12f1
|
|
4
|
+
data.tar.gz: a0d7267da0223f8faed9a478a2c5ca029cdc23205fdff4feb945adb4d2b78f2e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 18ae964be21eded1e7be2560cd70a0ea63cb714c76b2d5295b3ec4b1f2b1fc46f5ec418591f53c5856babe389696b96be1436e905ee5ee2bc4b922ecee43d816
|
|
7
|
+
data.tar.gz: c8c8fbcba5d1f9db3b9d22c9fb2b1182569354fd08e2fd2cf44ba0bfe4b787ffac0446d48db5bd802f01269ea9ff6746383b2887bdf0a0f4b8d9e97e2ee2f9f6
|
data/docs/modeling.md
CHANGED
|
@@ -36,7 +36,7 @@ There are two families of verbs:
|
|
|
36
36
|
|
|
37
37
|
| Family | Verbs | Written on | Points to |
|
|
38
38
|
|--------|-------|------------|-----------|
|
|
39
|
-
| Responsibility and provider (down) | `performedBy`, `ownedBy`, `executedBy`, `servedBy`, `guidedBy`, `maintainedBy`, `contributedBy`, `hasConcern`, `representedBy`, `realizedThrough`, `exposes`, `connects`, `mitigatedBy`, `influences`, `triggers`, `affects`, `assesses`, `contains`, `closedBy`, `compares` | the element that needs, uses or is concerned with something | what provides it or is responsible for it |
|
|
39
|
+
| Responsibility and provider (down) | `performedBy`, `ownedBy`, `executedBy`, `servedBy`, `guidedBy`, `maintainedBy`, `contributedBy`, `hasConcern`, `representedBy`, `realizedThrough`, `exposes`, `provisions`, `connects`, `mitigatedBy`, `influences`, `triggers`, `affects`, `assesses`, `contains`, `closedBy`, `compares` | the element that needs, uses or is concerned with something | what provides it or is responsible for it |
|
|
40
40
|
| Realization (up) | `realizes`, `partiallyRealizes`, `plans`, `satisfies`, `evidencedBy` (on the evidenced element), `provides` | the concrete element | the abstract element it answers to (requirement, goal, capability, plateau) |
|
|
41
41
|
|
|
42
42
|
Rules:
|
|
@@ -154,7 +154,7 @@ TechnologySystemSoftware, TechnologyService, TechnologyArtifact). The same princ
|
|
|
154
154
|
| Location | In which region or country is it? | A place on a map, not a building; holds facilities | the place ("Location:Germany:Frankfurt") |
|
|
155
155
|
| TechnologyFacility | In which building or site does hardware stand? | Has an address and can be visited; can be nested (campus, hall) | the site ("Facility:Frankfurt:HallA") |
|
|
156
156
|
| TechnologyEquipment | Which physical thing can you touch? | Racks, fabrics, fibre routes, carrier circuits; no software of its own | the thing and its place ("Equipment:Link:Frankfurt-Madrid") |
|
|
157
|
-
| TechnologyDevice | Which single machine stands in the room? | One server, switch, router, firewall or appliance with a serial number
|
|
157
|
+
| TechnologyDevice | Which single machine stands in the room? | One server, switch, router, firewall or appliance with a serial number (it is cabled), or one laptop, workstation or phone of a person or team | the host ("Device:Frankfurt:Server01") |
|
|
158
158
|
| TechnologyCommunicationNetwork | What carries data between nodes? | Has a network role (`network/type`); exists beyond any single link | role and scope ("Network:Management:Frankfurt") |
|
|
159
159
|
| TechnologyNode | On which machine does software run? | A VM, host role or logical group of machines with a lifecycle of its own | the host or host role ("Node:Frankfurt:Web01") |
|
|
160
160
|
| TechnologySystemSoftware | What software hosts other software or data? | An operating system, database cluster, routing stack, platform | the product and role ("Tech:Routing:EVPN") |
|
|
@@ -166,8 +166,8 @@ TechnologySystemSoftware, TechnologyService, TechnologyArtifact). The same princ
|
|
|
166
166
|
1. Is it a country, metro or region? Location.
|
|
167
167
|
2. Is it a building, campus, hall or site that can be visited? TechnologyFacility.
|
|
168
168
|
3. Is it a physical thing (rack, switch fabric, fibre, circuit) without software of its own? TechnologyEquipment.
|
|
169
|
-
4. Is it one physical machine (server, switch, router, firewall, appliance) whose room
|
|
170
|
-
TechnologyDevice.
|
|
169
|
+
4. Is it one physical machine (server, switch, router, firewall, appliance, laptop, workstation, phone) whose room,
|
|
170
|
+
cabling or operating system matters? TechnologyDevice.
|
|
171
171
|
5. Does it carry data between nodes, with a role such as underlay, overlay, management, public or VPN?
|
|
172
172
|
TechnologyCommunicationNetwork.
|
|
173
173
|
6. Is it a machine (virtual, or a host role) that software runs on? TechnologyNode.
|
|
@@ -201,7 +201,8 @@ TechnologySystemSoftware, TechnologyService, TechnologyArtifact). The same princ
|
|
|
201
201
|
10. One `TechnologyDevice` per physical machine, `locatedAt` its room (a TechnologyFacility of `facility/type: room`
|
|
202
202
|
the data center is `composedOf`). A group of machines with one role stays a logical `TechnologyNode` that is
|
|
203
203
|
`realizedBy` its devices; a rack or hardware block is TechnologyEquipment `composedOf` them; a virtual chassis or
|
|
204
|
-
stack is a device `composedOf` its members.
|
|
204
|
+
stack is a device `composedOf` its members. A client device (`device/type` laptop, desktop, workstation,
|
|
205
|
+
thin-client, tablet, mobile) moves and needs no room; it may be `locatedAt` an office.
|
|
205
206
|
11. A network is `realizedBy` the devices that build it (switches, routers) and `connects` the devices attached to it.
|
|
206
207
|
Both are written on the network, so a switch attached to the network it builds closes no cycle.
|
|
207
208
|
12. Cables are `connectedTo` between devices, declared once on one of the two ends. Cabling runs both ways by nature
|
|
@@ -213,6 +214,17 @@ TechnologySystemSoftware, TechnologyService, TechnologyArtifact). The same princ
|
|
|
213
214
|
`servedBy` its team and `composedOf` its devices, which then need no team of their own. Both relations point
|
|
214
215
|
down to the team, which points to nothing further. On a TechnologyFacility, `servedBy` stays the operator of
|
|
215
216
|
the site.
|
|
217
|
+
14. A client device (developer workstation, laptop, phone) is a `TechnologyDevice` with a client `device/type` and
|
|
218
|
+
`device/os`, `device/osVersion`, `device/arch`, `device/ownership`, `device/managed` and `device/encryption`; the
|
|
219
|
+
vendor and product are in `device/model` (also for a hardened workstation that runs the user's operating system
|
|
220
|
+
virtualized beside other isolated sessions, which is a `workstation`). Model the individual machine when it is
|
|
221
|
+
inventoried, otherwise one `TechnologyNode` per client platform `realizedBy` the devices. The operating system is
|
|
222
|
+
`TechnologySystemSoftware` `realizedBy` the node, the image it is installed from an artifact the node is
|
|
223
|
+
`assignedTo`; each isolated session of a hardened workstation can be a node of its own. Network access is written
|
|
224
|
+
on the node (`servedBy` the networks it uses: the office, the VPN) or, for a single named machine, on the network
|
|
225
|
+
(`connects`), never on the device, because a network is `realizedBy` its switches and the reverse arrow would
|
|
226
|
+
close a cycle. A machine that reaches no network (air-gapped) has neither relation. Who uses it is the team or role
|
|
227
|
+
(`servedBy`), not a person; groups of machines are tags and the end of support is `lifecycle/endOfLifeAt`.
|
|
216
228
|
|
|
217
229
|
**Checked by `archsight lint`**
|
|
218
230
|
|
|
@@ -224,7 +236,7 @@ As above, these are **warnings** in the "Modeling warnings" section and never fa
|
|
|
224
236
|
| `TechnologyCommunicationNetwork 'Network:Overlay:EVPN' is an overlay network served by no network` | 3 |
|
|
225
237
|
| `TechnologyFacility 'Facility:Madrid:DC' is located at no Location` | where |
|
|
226
238
|
| `TechnologyEquipment 'Equipment:Rack01' is located at no TechnologyFacility` | where |
|
|
227
|
-
| `TechnologyDevice 'Device:Server01' is located at no TechnologyFacility` | 10 |
|
|
239
|
+
| `TechnologyDevice 'Device:Server01' is located at no TechnologyFacility` (not for client device types) | 10 |
|
|
228
240
|
| `TechnologyDevice 'Device:Switch01' is connectedTo itself` | 12 |
|
|
229
241
|
| `TechnologyDevice 'Device:Router01' is a router that realizes no TechnologyCommunicationNetwork` | 11 |
|
|
230
242
|
| `TechnologyDevice 'Device:a:server-3' is servedBy 'Kernel:Team', not by the team of its equipment ('Compute:Team')` | 13 |
|
|
@@ -547,7 +559,7 @@ Which kind to pick is in [Choosing the Kind: Infrastructure](#choosing-the-kind-
|
|
|
547
559
|
| `TechnologyCommunicationNetwork` | `realizedBy` | `TechnologyEquipment` (the fabric), `TechnologySystemSoftware` (routing stack, VPN software) |
|
|
548
560
|
| `TechnologyCommunicationNetwork` | `realizedBy` | `ApplicationComponent`, `ApplicationService` (software that builds the network: an SDN agent, a network operator) |
|
|
549
561
|
| `TechnologyCommunicationNetwork` | `realizedBy` | `TechnologyDevice` (the switches and routers that build it) |
|
|
550
|
-
| `TechnologyCommunicationNetwork` | `connects` | `TechnologyDevice` (the devices attached to it) |
|
|
562
|
+
| `TechnologyCommunicationNetwork` | `connects` | `TechnologyDevice` (the devices attached to it, a named workstation behind a VPN) |
|
|
551
563
|
| `TechnologyNode` | `servedBy` | `TechnologyCommunicationNetwork` |
|
|
552
564
|
| `ApplicationInterface` | `servedBy` | `TechnologyCommunicationNetwork` (the networks on which it can be reached) |
|
|
553
565
|
|
|
@@ -593,7 +605,7 @@ center is not a computational resource.
|
|
|
593
605
|
| Location | For a country, metro or region |
|
|
594
606
|
| TechnologyFacility | For a data center, colocation, office or edge site (`facility/type`), also a campus or hall inside one |
|
|
595
607
|
| TechnologyEquipment | Optional: racks, network fabrics, physical clusters inside a facility (`equipment/type`) |
|
|
596
|
-
| TechnologyDevice | Optional: one physical machine, `locatedAt` its room (`facility/type: room`) |
|
|
608
|
+
| TechnologyDevice | Optional: one physical machine, `locatedAt` its room (`facility/type: room`); a client device (laptop, workstation, phone) needs no room |
|
|
597
609
|
|
|
598
610
|
Relations are written on the element that is placed (see [Direction of Relations](#direction-of-relations)):
|
|
599
611
|
|
|
@@ -688,13 +700,19 @@ depend on each other, so `dependsOn` is exempt from the cycle check. In `example
|
|
|
688
700
|
|
|
689
701
|
### Where a Component Runs
|
|
690
702
|
|
|
691
|
-
|
|
703
|
+
These relations say what something runs on or builds; each answers a different question:
|
|
692
704
|
|
|
693
705
|
| Relation | Means | Example |
|
|
694
706
|
|----------|-------|---------|
|
|
695
707
|
| ApplicationComponent `servedBy technologyServices` | the platform service the component is deployed on | `Payments:API` runs in `Payments:Cluster` |
|
|
696
708
|
| ApplicationComponent `servedBy technologySystemSoftware` | the runtime it runs on | a Kubernetes distribution, a JVM |
|
|
697
709
|
| ApplicationService `servedBy technologyServices` | a platform service the service as a whole uses | a managed database, the clusters of its own components |
|
|
710
|
+
| ApplicationComponent `provisions technologyServices` | the platform service the component creates and keeps in its desired state | an operator that builds the clusters of a product |
|
|
711
|
+
|
|
712
|
+
`provisions` is written on the component, like every relation, so it points down to what the component creates: the
|
|
713
|
+
service page lists its provisioner as incoming, and the impact of a provisioner is its outgoing relations (the
|
|
714
|
+
services it builds). It is not a runtime dependency: a provisioned service keeps running while its provisioner is
|
|
715
|
+
down, only changes stop. `suppliedBy` on the service stays for what it is made of (the system software).
|
|
698
716
|
|
|
699
717
|
Deployment importers (Argo CD, Helm, Cluster API) know every cluster a deployable runs in and write the relation per
|
|
700
718
|
component. Keep the service-level relation to the clusters of the service's own components: a sidecar or agent that
|
|
@@ -997,7 +1015,7 @@ is a sidebar filter and query term (`lifecycle/status == "deprecated"`).
|
|
|
997
1015
|
|------------|---------|
|
|
998
1016
|
| `lifecycle/status` | The state above |
|
|
999
1017
|
| `lifecycle/activeAt`, `lifecycle/deprecatedAt`, `lifecycle/sunsetAt`, `lifecycle/endOfLifeAt` | When it happened or will happen (ISO 8601 date or time, checked by `archsight lint`) |
|
|
1000
|
-
| `lifecycle/replacedBy` | The resource that replaces it: a name for a resource of the same kind, `Kind/Name` for another kind (a component replaced by an `ApplicationService/...`). Shown as a link, `archsight lint` checks that it exists |
|
|
1018
|
+
| `lifecycle/replacedBy` | The resource that replaces it: a name for a resource of the same kind, `Kind/Name` for another kind (a component replaced by an `ApplicationService/...`). Shown as a link behind the status, `archsight lint` checks that it exists |
|
|
1001
1019
|
| `lifecycle/reason` | Why, in markdown |
|
|
1002
1020
|
|
|
1003
1021
|
```yaml
|
|
@@ -1010,6 +1028,9 @@ metadata:
|
|
|
1010
1028
|
lifecycle/replacedBy: ApplicationService/ExportV2
|
|
1011
1029
|
```
|
|
1012
1030
|
|
|
1031
|
+
The detail page shows the status, the replacement as a link and, for a `deprecated`, `sunset` or `end-of-life`
|
|
1032
|
+
resource, the number of resources that still refer to it (a link to its Incoming relations) on one line.
|
|
1033
|
+
|
|
1013
1034
|
## Common Patterns
|
|
1014
1035
|
|
|
1015
1036
|
### Microservice
|
|
@@ -9,6 +9,8 @@ module Archsight
|
|
|
9
9
|
# Network types that run over another network and need one that serves them
|
|
10
10
|
OVERLAY_TYPES = %w[overlay vpn].freeze
|
|
11
11
|
NETWORK_DEVICE_TYPES = %w[switch router].freeze
|
|
12
|
+
# Client machines move: they need no room
|
|
13
|
+
CLIENT_DEVICE_TYPES = %w[laptop desktop workstation thin-client tablet mobile].freeze
|
|
12
14
|
|
|
13
15
|
def initialize(database)
|
|
14
16
|
@database = database
|
|
@@ -185,12 +187,13 @@ module Archsight
|
|
|
185
187
|
end
|
|
186
188
|
|
|
187
189
|
# A device that is part of equipment (a rack) or of another device (a virtual chassis) is placed through its
|
|
188
|
-
# whole, and a chassis through its members
|
|
190
|
+
# whole, and a chassis through its members. A client device (laptop, workstation, phone) is not placed.
|
|
189
191
|
def device_without_facility
|
|
190
192
|
parts = owners_by_target("TechnologyDevice", :composedOf, :technologyDevices)
|
|
191
193
|
racked = owners_by_target("TechnologyEquipment", :composedOf, :technologyDevices)
|
|
192
194
|
instances("TechnologyDevice").filter_map do |device|
|
|
193
195
|
next if parts.key?(device) || racked.key?(device) || targets(device, :composedOf, :technologyDevices).any?
|
|
196
|
+
next if CLIENT_DEVICE_TYPES.include?(device.annotations["device/type"])
|
|
194
197
|
next if targets(device, :locatedAt, :technologyFacilities).any?
|
|
195
198
|
|
|
196
199
|
warning(device, "is located at no TechnologyFacility")
|
|
@@ -62,6 +62,13 @@ class Archsight::Resources::ApplicationComponent < Archsight::Resources::Base
|
|
|
62
62
|
importers write the service per component, so a sidecar or agent deployed into many clusters shows where it runs
|
|
63
63
|
without making its own service look like it runs in all of them.
|
|
64
64
|
|
|
65
|
+
A component that creates technology services is `provisions` them: a controller, operator, pipeline or job that
|
|
66
|
+
builds and reconciles the clusters, database clusters or VM pools of a product (Crossplane, Cluster API, a
|
|
67
|
+
Terraform controller). It is written on the component, which points down to what it creates, like `servedBy`; the
|
|
68
|
+
service page lists the component as incoming "provisions". `servedBy` says where the component itself runs,
|
|
69
|
+
`provisions` what it builds, and a service that is built elsewhere keeps running while its provisioner is down,
|
|
70
|
+
only changes stop. The impact of a provisioner is what it reaches: its outgoing relations.
|
|
71
|
+
|
|
65
72
|
The computed `component/dependents` counts the components that depend on this one, which tells shared libraries
|
|
66
73
|
and modules from components nobody consumes.
|
|
67
74
|
|
|
@@ -418,6 +425,7 @@ class Archsight::Resources::ApplicationComponent < Archsight::Resources::Base
|
|
|
418
425
|
relation :realizedBy, :technologyComponents, :TechnologyNode
|
|
419
426
|
relation :servedBy, :technologyComponents, :TechnologySystemSoftware
|
|
420
427
|
relation :servedBy, :technologyServices, :TechnologyService
|
|
428
|
+
relation :provisions, :technologyServices, :TechnologyService
|
|
421
429
|
relation :exposes, :applicationInterfaces, :ApplicationInterface
|
|
422
430
|
relation :dependsOn, :applicationInterfaces, :ApplicationInterface
|
|
423
431
|
relation :dependsOn, :applicationComponents, :ApplicationComponent
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# TechnologyDevice represents one physical machine: a server, switch, router, firewall or
|
|
3
|
+
# TechnologyDevice represents one physical machine: a server, switch, router, firewall, appliance or client machine
|
|
4
4
|
class Archsight::Resources::TechnologyDevice < Archsight::Resources::Base
|
|
5
5
|
include_annotations :git, :architecture, :asset, :risk
|
|
6
6
|
|
|
7
7
|
description <<~MD
|
|
8
|
-
Represents one physical machine: a server, a switch, a router, a firewall, a terminal server
|
|
8
|
+
Represents one physical machine: a server, a switch, a router, a firewall, a terminal server, an appliance, or a
|
|
9
|
+
client machine (a laptop, a workstation, a phone).
|
|
9
10
|
|
|
10
11
|
## ArchiMate Definition
|
|
11
12
|
|
|
@@ -18,13 +19,34 @@ class Archsight::Resources::TechnologyDevice < Archsight::Resources::Base
|
|
|
18
19
|
## Usage
|
|
19
20
|
|
|
20
21
|
Use TechnologyDevice when the individual machine matters: which room it stands in, which switch it is cabled to,
|
|
21
|
-
which machines a failure domain loses.
|
|
22
|
+
which machines a failure domain loses, which operating system and owner a workstation has.
|
|
22
23
|
|
|
23
24
|
- One element per physical machine (name it after the host: "Device:Frankfurt:Server01")
|
|
24
25
|
- A group of machines with one role ("the hypervisors of the platform") stays a logical `TechnologyNode` that is
|
|
25
26
|
`realizedBy` its devices
|
|
26
27
|
- A virtual chassis, a stack or a cluster pair is a device `composedOf` its member devices
|
|
27
28
|
|
|
29
|
+
## Client devices
|
|
30
|
+
|
|
31
|
+
A developer workstation, a laptop, a thin client, a tablet or a phone is a device of the matching `device/type`;
|
|
32
|
+
`device/os`, `device/osVersion` and `device/arch` say what it runs on, `device/ownership` whether the company
|
|
33
|
+
owns it, `device/managed` whether it is centrally managed (MDM) and `device/encryption` whether the disk is
|
|
34
|
+
encrypted. The vendor and product go into `device/model`, also for a hardened workstation that runs the user's
|
|
35
|
+
operating system virtualized next to other isolated sessions: it is a `workstation`. The end of support is
|
|
36
|
+
`lifecycle/endOfLifeAt`, a group of machines is a tag (`architecture/tags`).
|
|
37
|
+
|
|
38
|
+
- Model the individual machine when it is inventoried (an MDM import can write them), otherwise one
|
|
39
|
+
`TechnologyNode` per client platform ("Node:Workstation:macOS") `realizedBy` the devices
|
|
40
|
+
- The operating system is `TechnologySystemSoftware` `realizedBy` that node; the image or packages it is
|
|
41
|
+
installed from are `TechnologyArtifact`s the node is `assignedTo`. Each isolated session of a hardened
|
|
42
|
+
workstation can be a node of its own, `realizedBy` the device
|
|
43
|
+
- Network access: the platform node is `servedBy` the networks it uses (the office, the VPN), a single named
|
|
44
|
+
machine is `connects`-ed by its network (the VPN it tunnels through, an isolated segment). A machine that
|
|
45
|
+
reaches no network (air-gapped) has neither relation. The device itself does not point to networks: a network
|
|
46
|
+
is `realizedBy` its switches, so the reverse arrow would close a cycle
|
|
47
|
+
- Who uses it is the team or role (`servedBy`), not a person; a client device needs no room, `locatedAt` an
|
|
48
|
+
office is optional
|
|
49
|
+
|
|
28
50
|
## Not this kind
|
|
29
51
|
|
|
30
52
|
- A VM, a Kubernetes node or a host role is a `TechnologyNode`
|
|
@@ -57,7 +79,7 @@ class Archsight::Resources::TechnologyDevice < Archsight::Resources::Base
|
|
|
57
79
|
annotation "device/type",
|
|
58
80
|
description: "Kind of device",
|
|
59
81
|
title: "Device Type",
|
|
60
|
-
enum: %w[server switch router firewall terminal-server appliance other],
|
|
82
|
+
enum: %w[server switch router firewall terminal-server appliance laptop desktop workstation thin-client tablet mobile other],
|
|
61
83
|
filter: :word,
|
|
62
84
|
summary: true
|
|
63
85
|
annotation "device/role",
|
|
@@ -79,6 +101,36 @@ class Archsight::Resources::TechnologyDevice < Archsight::Resources::Base
|
|
|
79
101
|
title: "Purpose",
|
|
80
102
|
filter: :word
|
|
81
103
|
|
|
104
|
+
annotation "device/os",
|
|
105
|
+
description: "Operating system family of a client device",
|
|
106
|
+
title: "Operating System",
|
|
107
|
+
enum: %w[windows macos linux freebsd openbsd netbsd android ios chromeos other],
|
|
108
|
+
filter: :word,
|
|
109
|
+
summary: true
|
|
110
|
+
annotation "device/osVersion",
|
|
111
|
+
description: "Operating system version, e.g. 15.1 or 24.04 LTS",
|
|
112
|
+
title: "OS Version"
|
|
113
|
+
annotation "device/arch",
|
|
114
|
+
description: "CPU architecture",
|
|
115
|
+
title: "Architecture",
|
|
116
|
+
enum: %w[x86_64 arm64 riscv64 other],
|
|
117
|
+
filter: :word
|
|
118
|
+
annotation "device/ownership",
|
|
119
|
+
description: "Who owns the device",
|
|
120
|
+
title: "Ownership",
|
|
121
|
+
enum: %w[company-owned leased byod],
|
|
122
|
+
filter: :word
|
|
123
|
+
annotation "device/managed",
|
|
124
|
+
description: "Whether the device is managed centrally (MDM, configuration management)",
|
|
125
|
+
title: "Managed",
|
|
126
|
+
enum: %w[managed unmanaged],
|
|
127
|
+
filter: :word
|
|
128
|
+
annotation "device/encryption",
|
|
129
|
+
description: "Whether the disk is encrypted",
|
|
130
|
+
title: "Disk Encryption",
|
|
131
|
+
enum: %w[enabled disabled],
|
|
132
|
+
filter: :word
|
|
133
|
+
|
|
82
134
|
relation :locatedAt, :technologyFacilities, :TechnologyFacility
|
|
83
135
|
relation :connectedTo, :technologyDevices, :TechnologyDevice
|
|
84
136
|
relation :composedOf, :technologyDevices, :TechnologyDevice
|
|
@@ -50,6 +50,13 @@ class Archsight::Resources::TechnologyService < Archsight::Resources::Base
|
|
|
50
50
|
"servedBy" from ApplicationComponent on its page. An ApplicationService that is `servedBy` the service uses it as a
|
|
51
51
|
whole; list a cluster there only when the service's own components run in it.
|
|
52
52
|
|
|
53
|
+
## Provisioning
|
|
54
|
+
|
|
55
|
+
A service that software creates (clusters built by an infrastructure-as-code operator, a database cluster
|
|
56
|
+
reconciled by a controller) is `provisions`-ed by that `ApplicationComponent`. The relation is written on the
|
|
57
|
+
component and points down to the service; the service page lists it as incoming "provisions". It says who builds
|
|
58
|
+
the service, `suppliedBy` says what the service is made of (the system software).
|
|
59
|
+
|
|
53
60
|
## Concept and implementation
|
|
54
61
|
|
|
55
62
|
A service can `specialize` another service (ArchiMate specialization): the general service is the concept, the
|
data/lib/archsight/version.rb
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as e,L as t,P as n,Q as r,d as i,q as a,t as o,tt as s}from"./index-
|
|
1
|
+
import{F as e,L as t,P as n,Q as r,d as i,q as a,t as o,tt as s}from"./index-yiZbbvAs.js";import{t as c}from"./WikiPage-CgvRN6R2.js";var l={key:1},u={__name:`DocPage`,props:{filename:String},setup(u){let d=u,f=s(null);function p(e,t){let n=new DOMParser().parseFromString(e,`text/html`).body,r=n.querySelector(`:scope > article`)||n,i=r.querySelector(`h1`),a=i?.textContent.trim()||t.split(`/`).pop().replace(/[-_]/g,` `);i?.remove();let o=[...r.querySelectorAll(`h2[id], h3[id], h4[id]`)].map(e=>({level:Number(e.tagName[1]),id:e.id,text:e.textContent.trim()})),s=[{title:`Documentation`}];return t.startsWith(`resources/`)&&s.push({title:`Resource types`}),{title:a,html:r.innerHTML,toc:o.length>=2?o:[],breadcrumb:s}}async function m(){let e=await i(d.filename);f.value=e?p(e,d.filename):{title:`Not found`,html:`<p>Documentation not found.</p>`,toc:[],breadcrumb:[{title:`Documentation`}]},o(f.value.title)}return r(()=>d.filename,m,{immediate:!0}),(r,i)=>f.value?(a(),e(c,{key:0,title:f.value.title,html:f.value.html,breadcrumb:f.value.breadcrumb,toc:f.value.toc},null,8,[`title`,`html`,`breadcrumb`,`toc`])):(a(),t(`article`,l,[...i[0]||=[n(`p`,null,`Loading...`,-1)]]))}};export{u as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e,t}from"./rolldown-runtime-COiEfhsA.js";import{$ as n,A as r,B as i,C as a,D as o,E as s,F as c,G as l,H as u,I as d,J as f,K as p,L as m,N as h,O as g,P as _,Q as v,S as y,U as b,W as x,X as S,a as C,at as w,et as ee,f as te,j as ne,l as re,nt as ie,p as ae,q as T,rt as E,tt as D,u as oe,z as O}from"./index-CLuLTE5I.js";import{t as se}from"./useHighlight-BH32C7yt.js";var ce=`archsight.diagramPreview.layout`,le=[`bottom`,`right`,`full`,`hidden`],ue=`(min-width: 1400px)`;function de(){try{let e=localStorage.getItem(ce);return le.includes(e)?e:null}catch{return null}}var fe=D(de()),pe=D(typeof matchMedia==`function`&&matchMedia(ue).matches);typeof matchMedia==`function`&&matchMedia(ue).addEventListener(`change`,e=>{pe.value=e.matches});var me=h(()=>fe.value||(pe.value?`right`:`bottom`));function he(e){if(le.includes(e)){fe.value=e;try{localStorage.setItem(ce,e)}catch{}}}function ge(){return{layout:me,setLayout:he}}var _e={class:`preview-head`},ve={class:`preview-tools`},ye={key:0,class:`preview-state`},be={class:`preview-layout`,role:`group`,"aria-label":`Preview layout`},xe=[`aria-pressed`,`title`,`aria-label`,`onClick`],Se={key:0,class:`preview-error`,role:`alert`},Ce=[`innerHTML`],we={key:2,class:`preview-empty`},Te=300,Ee=C({__name:`DiagramPreview`,props:{source:String},setup(e){let t=e,{layout:n,setLayout:r}=ge(),i=h(()=>n.value===`hidden`),a=[{value:`bottom`,icon:`iconoir-table-rows`,label:`Below the editor`},{value:`right`,icon:`iconoir-view-columns-2`,label:`Right of the editor`},{value:`full`,icon:`iconoir-expand`,label:`Preview only`},{value:`hidden`,icon:`iconoir-eye-closed`,label:`Hide preview`}],o=D(``),s=D(null),c=D(!1),l=null,u=null;function p(){clearTimeout(l),l=null,u?.abort(),u=null}async function g(e){u=new AbortController;let t=u;c.value=!0;try{let n=await y(e,{signal:t.signal});if(t!==u)return;n.html&&(o.value=n.html),s.value=n.error}catch(e){if(e.name===`AbortError`||t!==u)return;s.value=e.message}finally{t===u&&(c.value=!1)}}v([()=>t.source,i],([e,t],[,n])=>{p(),t?c.value=!1:!e||!e.trim()?(o.value=``,s.value=null,c.value=!1):(c.value=!0,l=setTimeout(()=>g(e),n?0:Te))},{immediate:!0}),x(p);function b(e){e.target.closest(`a`)&&e.preventDefault()}return(e,t)=>(T(),m(`div`,{class:E([`diagram-preview`,`layout-${ie(n)}`])},[_(`div`,_e,[_(`span`,null,[t[0]||=_(`i`,{class:`iconoir-eye`},null,-1),t[1]||=O(` Preview`,-1),i.value?(T(),m(ne,{key:0},[O(` hidden`)],64)):d(``,!0)]),_(`span`,ve,[c.value&&!i.value?(T(),m(`span`,ye,`Rendering…`)):d(``,!0),_(`span`,be,[(T(!0),m(ne,null,f(a.filter(e=>!i.value||e.value!==`hidden`),e=>(T(),m(`button`,{key:e.value,type:`button`,class:E({active:ie(n)===e.value}),"aria-pressed":ie(n)===e.value,title:e.label,"aria-label":e.label,onClick:t=>ie(r)(e.value)},[_(`i`,{class:E(e.icon)},null,2)],10,xe))),128))])])]),i.value?d(``,!0):(T(),m(ne,{key:0},[s.value?(T(),m(`div`,Se,[t[2]||=_(`i`,{class:`iconoir-warning-triangle`},null,-1),O(` `+w(s.value),1)])):d(``,!0),o.value?(T(),m(`div`,{key:1,class:E([`preview-body`,{stale:!!s.value}]),title:`Links are disabled in the preview`,onClick:b,innerHTML:o.value},null,10,Ce)):!s.value&&!c.value?(T(),m(`p`,we,`Nothing to preview yet.`)):d(``,!0)],64))],2))}},[[`__scopeId`,`data-v-11568657`]]),De={class:`label-row`},Oe=[`for`,`title`],ke={key:0,class:`required`},Ae=[`id`,`aria-invalid`],je=[`value`],Me=[`id`,`aria-invalid`,`placeholder`],Ne={key:0,class:`future-hint`},Pe={class:`code-source`},Fe=[`id`,`aria-invalid`,`placeholder`],Ie={class:`future-hint`},Le=[`id`,`step`,`aria-invalid`],Re=[`id`,`aria-invalid`],ze=[`id`,`aria-invalid`],Be=[`id`,`aria-invalid`],Ve={key:7,class:`field-description`},He={key:8,class:`field-error`},Ue=C({__name:`EditorField`,props:{field:Object,modelValue:[String,Number,null],error:[Array,null]},emits:[`update:modelValue`,`openMarkdown`],setup(e,{emit:t}){let n=e,r=t,i=h({get:()=>n.modelValue??``,set:e=>r(`update:modelValue`,e)}),a=h(()=>[`textarea`,`markdown`,`code`].includes(n.field.input_type)),s=h(()=>n.field.key===`page/content`),l=h(()=>n.field.code_language===`asd`),{layout:u}=ge(),p={asd:`Archsight Diagram`},v=h(()=>{let e=n.field.code_language||``;return p[e]||e.charAt(0).toUpperCase()+e.slice(1)}),y=h(()=>n.error&&n.error.length>0);return(t,n)=>(T(),m(`div`,{class:E([`field-group`,{"field-full-width":a.value}])},[_(`div`,De,[_(`label`,{for:e.field.key,title:e.field.description},[O(w(e.field.title)+` `,1),e.field.required?(T(),m(`span`,ke,`*`)):d(``,!0)],8,Oe),e.field.input_type===`markdown`?(T(),m(`button`,{key:0,type:`button`,class:`btn-edit-markdown`,title:`Open rich text editor`,onClick:n[0]||=n=>t.$emit(`openMarkdown`,e.field.key)},[...n[8]||=[_(`i`,{class:`iconoir-edit-pencil`},null,-1),O(` Edit `,-1)]])):d(``,!0)]),e.field.input_type===`select`?ee((T(),m(`select`,{key:0,id:e.field.key,"onUpdate:modelValue":n[1]||=e=>i.value=e,"aria-invalid":y.value?`true`:void 0},[n[9]||=_(`option`,{value:``},`Select...`,-1),(T(!0),m(ne,null,f(e.field.options,e=>(T(),m(`option`,{key:e,value:e},w(e),9,je))),128))],8,Ae)),[[o,i.value]]):e.field.input_type===`textarea`||e.field.input_type===`markdown`?(T(),m(`div`,{key:1,class:E([`markdown-field`,{"page-body":s.value}])},[ee(_(`textarea`,{id:e.field.key,"onUpdate:modelValue":n[2]||=e=>i.value=e,"aria-invalid":y.value?`true`:void 0,placeholder:e.field.input_type===`markdown`?`Enter markdown content...`:`One entry per line...`},null,8,Me),[[g,i.value]]),e.field.input_type===`markdown`?(T(),m(`small`,Ne,[...n[10]||=[_(`i`,{class:`iconoir-info-circle`},null,-1),O(` Markdown, `,-1),_(`code`,null,`[[links]]`,-1),O(` and `,-1),_(`code`,null,"```asd",-1),O(` diagrams. Use Edit for the rich text editor `,-1)]])):d(``,!0)],2)):e.field.input_type===`code`?(T(),m(`div`,{key:2,class:E([`code-field`,l.value&&[`with-preview`,`layout-${ie(u)}`]])},[_(`div`,Pe,[ee(_(`textarea`,{id:e.field.key,"onUpdate:modelValue":n[3]||=e=>i.value=e,"aria-invalid":y.value?`true`:void 0,placeholder:`Enter ${e.field.code_language||``} code...`,spellcheck:`false`},null,8,Fe),[[g,i.value]]),_(`small`,Ie,[n[11]||=_(`i`,{class:`iconoir-code`},null,-1),O(` `+w(v.value)+` code `,1)])]),l.value?(T(),c(Ee,{key:0,class:`field-diagram-preview`,source:String(i.value)},null,8,[`source`])):d(``,!0)],2)):e.field.input_type===`number`?ee((T(),m(`input`,{key:3,id:e.field.key,type:`number`,"onUpdate:modelValue":n[4]||=e=>i.value=e,step:e.field.step,"aria-invalid":y.value?`true`:void 0},null,8,Le)),[[g,i.value]]):e.field.input_type===`url`?ee((T(),m(`input`,{key:4,id:e.field.key,type:`url`,"onUpdate:modelValue":n[5]||=e=>i.value=e,placeholder:`https://...`,"aria-invalid":y.value?`true`:void 0},null,8,Re)),[[g,i.value]]):e.field.input_type===`list`?ee((T(),m(`input`,{key:5,id:e.field.key,type:`text`,"onUpdate:modelValue":n[6]||=e=>i.value=e,placeholder:`Comma-separated values`,"aria-invalid":y.value?`true`:void 0},null,8,ze)),[[g,i.value]]):ee((T(),m(`input`,{key:6,id:e.field.key,type:`text`,"onUpdate:modelValue":n[7]||=e=>i.value=e,"aria-invalid":y.value?`true`:void 0},null,8,Be)),[[g,i.value]]),e.field.description&&![`textarea`,`markdown`,`code`].includes(e.field.input_type)?(T(),m(`small`,Ve,w(e.field.description),1)):d(``,!0),y.value?(T(),m(`div`,He,w(e.error.join(`, `)),1)):d(``,!0)],2))}},[[`__scopeId`,`data-v-fe1221de`]]),We={class:`relations-editor`},Ge={key:0,class:`no-relations`},Ke={id:`relations-list`},qe={class:`relation-text`},Je=[`onClick`],Ye={class:`add-relation-row`},Xe=[`value`],Ze=[`value`],Qe=C({__name:`EditorRelations`,props:{relations:Array,relationOptions:Array,instancesByKind:Object},emits:[`update:relations`],setup(e,{emit:t}){let n=e,r=t,i=D(``),a=D(``),s=h(()=>[...n.relations].sort((e,t)=>(e.verb+e.kind+e.name).localeCompare(t.verb+t.kind+t.name))),c=h(()=>i.value?n.relationOptions.find(e=>e.combo===i.value)?.target_kind:null),l=h(()=>c.value&&n.instancesByKind[c.value]||[]);v(i,()=>{a.value=``});function u(){if(!i.value||!a.value)return;let e=n.relationOptions.find(e=>e.combo===i.value);if(!e||n.relations.some(t=>t.verb===e.verb&&t.kind===e.target_kind&&t.name===a.value))return;let t=[...n.relations,{verb:e.verb,kind:e.target_kind,name:a.value}];r(`update:relations`,t),i.value=``,a.value=``}function d(e){let t=n.relations.filter((t,n)=>n!==e);r(`update:relations`,t)}return(t,n)=>(T(),m(`div`,We,[!e.relationOptions||e.relationOptions.length===0?(T(),m(`p`,Ge,` This resource type has no defined relations. `)):(T(),m(ne,{key:1},[_(`div`,Ke,[(T(!0),m(ne,null,f(s.value,(e,t)=>(T(),m(`div`,{key:`${e.verb}:${e.kind}:${e.name}`,class:`relation-item`},[_(`span`,qe,[_(`strong`,null,w(e.verb),1),O(` → `+w(e.kind)+`: `,1),_(`em`,null,w(e.name),1)]),_(`button`,{class:`btn-remove`,type:`button`,title:`Remove`,onClick:e=>d(t)},[...n[2]||=[_(`i`,{class:`iconoir-xmark`},null,-1)]],8,Je)]))),128))]),_(`div`,Ye,[ee(_(`select`,{"onUpdate:modelValue":n[0]||=e=>i.value=e},[n[3]||=_(`option`,{value:``},`Select relation...`,-1),(T(!0),m(ne,null,f(e.relationOptions,e=>(T(),m(`option`,{key:e.combo,value:e.combo},w(e.verb)+` → `+w(e.target_kind),9,Xe))),128))],512),[[o,i.value]]),ee(_(`select`,{"onUpdate:modelValue":n[1]||=e=>a.value=e},[n[4]||=_(`option`,{value:``},`Select instance...`,-1),(T(!0),m(ne,null,f(l.value,e=>(T(),m(`option`,{key:e,value:e},w(e),9,Ze))),128))],512),[[o,a.value]]),_(`button`,{class:`secondary btn-add`,type:`button`,onClick:u},[...n[5]||=[_(`i`,{class:`iconoir-plus`},null,-1),O(` Add `,-1)]])])],64))]))}},[[`__scopeId`,`data-v-a987a6fe`]]),$e={class:`yaml-output-container`},et={key:0,class:`conflict-error`},tt={class:`yaml-success`},nt={id:`yaml-content`},rt={key:0,class:`yaml-file-info`},it={key:1,class:`yaml-instructions`},at={class:`yaml-actions`},ot=[`disabled`],st=C({__name:`EditorYamlOutput`,props:{yaml:String,format:{type:String,default:`yaml`},kind:String,name:String,contentHash:String,pathRef:String,inlineEditEnabled:Boolean},emits:[`editAgain`],setup(e,{emit:t}){let n=e,r=D(null),i=D(`idle`),o=D(`idle`),s=D(null),c=h(()=>n.format===`markdown`),u=h(()=>c.value?`Markdown`:`YAML`),f=h(()=>c.value?`.md`:`.yaml`);l(()=>{r.value&&se(r.value)}),v(()=>n.yaml,async()=>{await b(),r.value&&se(r.value)});async function p(){try{await navigator.clipboard.writeText(n.yaml),i.value=`copied`,setTimeout(()=>{i.value=`idle`},2e3)}catch{let e=document.createElement(`textarea`);e.value=n.yaml,e.style.position=`fixed`,e.style.opacity=`0`,document.body.appendChild(e),e.select(),document.execCommand(`copy`),document.body.removeChild(e),i.value=`copied`,setTimeout(()=>{i.value=`idle`},2e3)}}async function g(){o.value=`saving`,s.value=null;try{let e=await a(n.kind,n.name,n.yaml,n.contentHash);e.success?(o.value=`saved`,setTimeout(()=>{o.value=`idle`},2e3)):e.conflict?(s.value=e.error,o.value=`idle`):(alert(`Save failed: `+e.error),o.value=`idle`)}catch(e){alert(`Save failed: `+e.message),o.value=`idle`}}return(t,n)=>(T(),m(`div`,$e,[s.value?(T(),m(`div`,et,[n[1]||=_(`i`,{class:`iconoir-warning-triangle`},null,-1),_(`span`,null,w(s.value),1)])):d(``,!0),_(`p`,tt,[n[2]||=_(`i`,{class:`iconoir-check-circle`},null,-1),O(` Generated `+w(u.value),1)]),_(`div`,{ref_key:`codeEl`,ref:r},[_(`pre`,nt,[_(`code`,{class:E(`language-${e.format}`)},w(e.yaml),3)])],512),_(`footer`,null,[e.pathRef?(T(),m(`p`,rt,[n[3]||=_(`i`,{class:`iconoir-folder`},null,-1),_(`span`,null,`Source: `+w(e.pathRef),1)])):(T(),m(`p`,it,[n[10]||=_(`i`,{class:`iconoir-info-circle`},null,-1),_(`span`,null,[O(` Copy this `+w(u.value)+` and save it to a `,1),_(`code`,null,w(f.value),1),n[6]||=O(` file in your resources directory`,-1),c.value?(T(),m(ne,{key:0},[n[4]||=O(` (named `,-1),_(`code`,null,w(e.name)+`.md`,1),n[5]||=O(`)`,-1)],64)):d(``,!0),n[7]||=O(`, `,-1),n[8]||=_(`br`,null,null,-1),n[9]||=O(`then reload the application. `,-1)])])),_(`div`,at,[e.pathRef&&e.inlineEditEnabled?(T(),m(`button`,{key:0,type:`button`,onClick:g,disabled:o.value===`saving`,class:E({saved:o.value===`saved`})},[_(`i`,{class:E(o.value===`saving`?`iconoir-refresh`:o.value===`saved`?`iconoir-check`:`iconoir-check-circle`)},null,2),O(` `+w(o.value===`saving`?`Saving...`:o.value===`saved`?`Saved!`:`Save to File`),1)],10,ot)):d(``,!0),_(`button`,{type:`button`,onClick:p,class:E({copied:i.value===`copied`})},[_(`i`,{class:E(i.value===`copied`?`iconoir-check`:`iconoir-copy`)},null,2),O(` `+w(i.value===`copied`?`Copied!`:`Copy to Clipboard`),1)],2),_(`button`,{class:`secondary`,type:`button`,onClick:n[0]||=e=>t.$emit(`editAgain`)},[...n[11]||=[_(`i`,{class:`iconoir-edit-pencil`},null,-1),O(` Edit Again `,-1)]])])])]))}},[[`__scopeId`,`data-v-b5ea938f`]]);function k(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function ct(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var lt=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,ut=lt&&`documentMode`in document?document.documentMode:null,dt=lt&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ft=lt&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),pt=!(!lt||!(`InputEvent`in window)||ut)&&`getTargetRanges`in new window.InputEvent(`input`),mt=lt&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),ht=lt&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,gt=lt&&/Android/.test(navigator.userAgent),_t=lt&&/^(?=.*Chrome).*/i.test(navigator.userAgent),vt=lt&>&&_t,yt=lt&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&dt&&!_t,bt=0,xt=1,St=2,Ct=1,wt=2,Tt=3,Et=4,Dt=5,Ot=6,kt=mt||ht||yt?`\xA0`:``,At=`
|
|
1
|
+
import{i as e,t}from"./rolldown-runtime-COiEfhsA.js";import{$ as n,A as r,B as i,C as a,D as o,E as s,F as c,G as l,H as u,I as d,J as f,K as p,L as m,N as h,O as g,P as _,Q as v,S as y,U as b,W as x,X as S,a as C,at as w,et as ee,f as te,j as ne,l as re,nt as ie,p as ae,q as T,rt as E,tt as D,u as oe,z as O}from"./index-yiZbbvAs.js";import{t as se}from"./useHighlight-BH32C7yt.js";var ce=`archsight.diagramPreview.layout`,le=[`bottom`,`right`,`full`,`hidden`],ue=`(min-width: 1400px)`;function de(){try{let e=localStorage.getItem(ce);return le.includes(e)?e:null}catch{return null}}var fe=D(de()),pe=D(typeof matchMedia==`function`&&matchMedia(ue).matches);typeof matchMedia==`function`&&matchMedia(ue).addEventListener(`change`,e=>{pe.value=e.matches});var me=h(()=>fe.value||(pe.value?`right`:`bottom`));function he(e){if(le.includes(e)){fe.value=e;try{localStorage.setItem(ce,e)}catch{}}}function ge(){return{layout:me,setLayout:he}}var _e={class:`preview-head`},ve={class:`preview-tools`},ye={key:0,class:`preview-state`},be={class:`preview-layout`,role:`group`,"aria-label":`Preview layout`},xe=[`aria-pressed`,`title`,`aria-label`,`onClick`],Se={key:0,class:`preview-error`,role:`alert`},Ce=[`innerHTML`],we={key:2,class:`preview-empty`},Te=300,Ee=C({__name:`DiagramPreview`,props:{source:String},setup(e){let t=e,{layout:n,setLayout:r}=ge(),i=h(()=>n.value===`hidden`),a=[{value:`bottom`,icon:`iconoir-table-rows`,label:`Below the editor`},{value:`right`,icon:`iconoir-view-columns-2`,label:`Right of the editor`},{value:`full`,icon:`iconoir-expand`,label:`Preview only`},{value:`hidden`,icon:`iconoir-eye-closed`,label:`Hide preview`}],o=D(``),s=D(null),c=D(!1),l=null,u=null;function p(){clearTimeout(l),l=null,u?.abort(),u=null}async function g(e){u=new AbortController;let t=u;c.value=!0;try{let n=await y(e,{signal:t.signal});if(t!==u)return;n.html&&(o.value=n.html),s.value=n.error}catch(e){if(e.name===`AbortError`||t!==u)return;s.value=e.message}finally{t===u&&(c.value=!1)}}v([()=>t.source,i],([e,t],[,n])=>{p(),t?c.value=!1:!e||!e.trim()?(o.value=``,s.value=null,c.value=!1):(c.value=!0,l=setTimeout(()=>g(e),n?0:Te))},{immediate:!0}),x(p);function b(e){e.target.closest(`a`)&&e.preventDefault()}return(e,t)=>(T(),m(`div`,{class:E([`diagram-preview`,`layout-${ie(n)}`])},[_(`div`,_e,[_(`span`,null,[t[0]||=_(`i`,{class:`iconoir-eye`},null,-1),t[1]||=O(` Preview`,-1),i.value?(T(),m(ne,{key:0},[O(` hidden`)],64)):d(``,!0)]),_(`span`,ve,[c.value&&!i.value?(T(),m(`span`,ye,`Rendering…`)):d(``,!0),_(`span`,be,[(T(!0),m(ne,null,f(a.filter(e=>!i.value||e.value!==`hidden`),e=>(T(),m(`button`,{key:e.value,type:`button`,class:E({active:ie(n)===e.value}),"aria-pressed":ie(n)===e.value,title:e.label,"aria-label":e.label,onClick:t=>ie(r)(e.value)},[_(`i`,{class:E(e.icon)},null,2)],10,xe))),128))])])]),i.value?d(``,!0):(T(),m(ne,{key:0},[s.value?(T(),m(`div`,Se,[t[2]||=_(`i`,{class:`iconoir-warning-triangle`},null,-1),O(` `+w(s.value),1)])):d(``,!0),o.value?(T(),m(`div`,{key:1,class:E([`preview-body`,{stale:!!s.value}]),title:`Links are disabled in the preview`,onClick:b,innerHTML:o.value},null,10,Ce)):!s.value&&!c.value?(T(),m(`p`,we,`Nothing to preview yet.`)):d(``,!0)],64))],2))}},[[`__scopeId`,`data-v-11568657`]]),De={class:`label-row`},Oe=[`for`,`title`],ke={key:0,class:`required`},Ae=[`id`,`aria-invalid`],je=[`value`],Me=[`id`,`aria-invalid`,`placeholder`],Ne={key:0,class:`future-hint`},Pe={class:`code-source`},Fe=[`id`,`aria-invalid`,`placeholder`],Ie={class:`future-hint`},Le=[`id`,`step`,`aria-invalid`],Re=[`id`,`aria-invalid`],ze=[`id`,`aria-invalid`],Be=[`id`,`aria-invalid`],Ve={key:7,class:`field-description`},He={key:8,class:`field-error`},Ue=C({__name:`EditorField`,props:{field:Object,modelValue:[String,Number,null],error:[Array,null]},emits:[`update:modelValue`,`openMarkdown`],setup(e,{emit:t}){let n=e,r=t,i=h({get:()=>n.modelValue??``,set:e=>r(`update:modelValue`,e)}),a=h(()=>[`textarea`,`markdown`,`code`].includes(n.field.input_type)),s=h(()=>n.field.key===`page/content`),l=h(()=>n.field.code_language===`asd`),{layout:u}=ge(),p={asd:`Archsight Diagram`},v=h(()=>{let e=n.field.code_language||``;return p[e]||e.charAt(0).toUpperCase()+e.slice(1)}),y=h(()=>n.error&&n.error.length>0);return(t,n)=>(T(),m(`div`,{class:E([`field-group`,{"field-full-width":a.value}])},[_(`div`,De,[_(`label`,{for:e.field.key,title:e.field.description},[O(w(e.field.title)+` `,1),e.field.required?(T(),m(`span`,ke,`*`)):d(``,!0)],8,Oe),e.field.input_type===`markdown`?(T(),m(`button`,{key:0,type:`button`,class:`btn-edit-markdown`,title:`Open rich text editor`,onClick:n[0]||=n=>t.$emit(`openMarkdown`,e.field.key)},[...n[8]||=[_(`i`,{class:`iconoir-edit-pencil`},null,-1),O(` Edit `,-1)]])):d(``,!0)]),e.field.input_type===`select`?ee((T(),m(`select`,{key:0,id:e.field.key,"onUpdate:modelValue":n[1]||=e=>i.value=e,"aria-invalid":y.value?`true`:void 0},[n[9]||=_(`option`,{value:``},`Select...`,-1),(T(!0),m(ne,null,f(e.field.options,e=>(T(),m(`option`,{key:e,value:e},w(e),9,je))),128))],8,Ae)),[[o,i.value]]):e.field.input_type===`textarea`||e.field.input_type===`markdown`?(T(),m(`div`,{key:1,class:E([`markdown-field`,{"page-body":s.value}])},[ee(_(`textarea`,{id:e.field.key,"onUpdate:modelValue":n[2]||=e=>i.value=e,"aria-invalid":y.value?`true`:void 0,placeholder:e.field.input_type===`markdown`?`Enter markdown content...`:`One entry per line...`},null,8,Me),[[g,i.value]]),e.field.input_type===`markdown`?(T(),m(`small`,Ne,[...n[10]||=[_(`i`,{class:`iconoir-info-circle`},null,-1),O(` Markdown, `,-1),_(`code`,null,`[[links]]`,-1),O(` and `,-1),_(`code`,null,"```asd",-1),O(` diagrams. Use Edit for the rich text editor `,-1)]])):d(``,!0)],2)):e.field.input_type===`code`?(T(),m(`div`,{key:2,class:E([`code-field`,l.value&&[`with-preview`,`layout-${ie(u)}`]])},[_(`div`,Pe,[ee(_(`textarea`,{id:e.field.key,"onUpdate:modelValue":n[3]||=e=>i.value=e,"aria-invalid":y.value?`true`:void 0,placeholder:`Enter ${e.field.code_language||``} code...`,spellcheck:`false`},null,8,Fe),[[g,i.value]]),_(`small`,Ie,[n[11]||=_(`i`,{class:`iconoir-code`},null,-1),O(` `+w(v.value)+` code `,1)])]),l.value?(T(),c(Ee,{key:0,class:`field-diagram-preview`,source:String(i.value)},null,8,[`source`])):d(``,!0)],2)):e.field.input_type===`number`?ee((T(),m(`input`,{key:3,id:e.field.key,type:`number`,"onUpdate:modelValue":n[4]||=e=>i.value=e,step:e.field.step,"aria-invalid":y.value?`true`:void 0},null,8,Le)),[[g,i.value]]):e.field.input_type===`url`?ee((T(),m(`input`,{key:4,id:e.field.key,type:`url`,"onUpdate:modelValue":n[5]||=e=>i.value=e,placeholder:`https://...`,"aria-invalid":y.value?`true`:void 0},null,8,Re)),[[g,i.value]]):e.field.input_type===`list`?ee((T(),m(`input`,{key:5,id:e.field.key,type:`text`,"onUpdate:modelValue":n[6]||=e=>i.value=e,placeholder:`Comma-separated values`,"aria-invalid":y.value?`true`:void 0},null,8,ze)),[[g,i.value]]):ee((T(),m(`input`,{key:6,id:e.field.key,type:`text`,"onUpdate:modelValue":n[7]||=e=>i.value=e,"aria-invalid":y.value?`true`:void 0},null,8,Be)),[[g,i.value]]),e.field.description&&![`textarea`,`markdown`,`code`].includes(e.field.input_type)?(T(),m(`small`,Ve,w(e.field.description),1)):d(``,!0),y.value?(T(),m(`div`,He,w(e.error.join(`, `)),1)):d(``,!0)],2))}},[[`__scopeId`,`data-v-fe1221de`]]),We={class:`relations-editor`},Ge={key:0,class:`no-relations`},Ke={id:`relations-list`},qe={class:`relation-text`},Je=[`onClick`],Ye={class:`add-relation-row`},Xe=[`value`],Ze=[`value`],Qe=C({__name:`EditorRelations`,props:{relations:Array,relationOptions:Array,instancesByKind:Object},emits:[`update:relations`],setup(e,{emit:t}){let n=e,r=t,i=D(``),a=D(``),s=h(()=>[...n.relations].sort((e,t)=>(e.verb+e.kind+e.name).localeCompare(t.verb+t.kind+t.name))),c=h(()=>i.value?n.relationOptions.find(e=>e.combo===i.value)?.target_kind:null),l=h(()=>c.value&&n.instancesByKind[c.value]||[]);v(i,()=>{a.value=``});function u(){if(!i.value||!a.value)return;let e=n.relationOptions.find(e=>e.combo===i.value);if(!e||n.relations.some(t=>t.verb===e.verb&&t.kind===e.target_kind&&t.name===a.value))return;let t=[...n.relations,{verb:e.verb,kind:e.target_kind,name:a.value}];r(`update:relations`,t),i.value=``,a.value=``}function d(e){let t=n.relations.filter((t,n)=>n!==e);r(`update:relations`,t)}return(t,n)=>(T(),m(`div`,We,[!e.relationOptions||e.relationOptions.length===0?(T(),m(`p`,Ge,` This resource type has no defined relations. `)):(T(),m(ne,{key:1},[_(`div`,Ke,[(T(!0),m(ne,null,f(s.value,(e,t)=>(T(),m(`div`,{key:`${e.verb}:${e.kind}:${e.name}`,class:`relation-item`},[_(`span`,qe,[_(`strong`,null,w(e.verb),1),O(` → `+w(e.kind)+`: `,1),_(`em`,null,w(e.name),1)]),_(`button`,{class:`btn-remove`,type:`button`,title:`Remove`,onClick:e=>d(t)},[...n[2]||=[_(`i`,{class:`iconoir-xmark`},null,-1)]],8,Je)]))),128))]),_(`div`,Ye,[ee(_(`select`,{"onUpdate:modelValue":n[0]||=e=>i.value=e},[n[3]||=_(`option`,{value:``},`Select relation...`,-1),(T(!0),m(ne,null,f(e.relationOptions,e=>(T(),m(`option`,{key:e.combo,value:e.combo},w(e.verb)+` → `+w(e.target_kind),9,Xe))),128))],512),[[o,i.value]]),ee(_(`select`,{"onUpdate:modelValue":n[1]||=e=>a.value=e},[n[4]||=_(`option`,{value:``},`Select instance...`,-1),(T(!0),m(ne,null,f(l.value,e=>(T(),m(`option`,{key:e,value:e},w(e),9,Ze))),128))],512),[[o,a.value]]),_(`button`,{class:`secondary btn-add`,type:`button`,onClick:u},[...n[5]||=[_(`i`,{class:`iconoir-plus`},null,-1),O(` Add `,-1)]])])],64))]))}},[[`__scopeId`,`data-v-a987a6fe`]]),$e={class:`yaml-output-container`},et={key:0,class:`conflict-error`},tt={class:`yaml-success`},nt={id:`yaml-content`},rt={key:0,class:`yaml-file-info`},it={key:1,class:`yaml-instructions`},at={class:`yaml-actions`},ot=[`disabled`],st=C({__name:`EditorYamlOutput`,props:{yaml:String,format:{type:String,default:`yaml`},kind:String,name:String,contentHash:String,pathRef:String,inlineEditEnabled:Boolean},emits:[`editAgain`],setup(e,{emit:t}){let n=e,r=D(null),i=D(`idle`),o=D(`idle`),s=D(null),c=h(()=>n.format===`markdown`),u=h(()=>c.value?`Markdown`:`YAML`),f=h(()=>c.value?`.md`:`.yaml`);l(()=>{r.value&&se(r.value)}),v(()=>n.yaml,async()=>{await b(),r.value&&se(r.value)});async function p(){try{await navigator.clipboard.writeText(n.yaml),i.value=`copied`,setTimeout(()=>{i.value=`idle`},2e3)}catch{let e=document.createElement(`textarea`);e.value=n.yaml,e.style.position=`fixed`,e.style.opacity=`0`,document.body.appendChild(e),e.select(),document.execCommand(`copy`),document.body.removeChild(e),i.value=`copied`,setTimeout(()=>{i.value=`idle`},2e3)}}async function g(){o.value=`saving`,s.value=null;try{let e=await a(n.kind,n.name,n.yaml,n.contentHash);e.success?(o.value=`saved`,setTimeout(()=>{o.value=`idle`},2e3)):e.conflict?(s.value=e.error,o.value=`idle`):(alert(`Save failed: `+e.error),o.value=`idle`)}catch(e){alert(`Save failed: `+e.message),o.value=`idle`}}return(t,n)=>(T(),m(`div`,$e,[s.value?(T(),m(`div`,et,[n[1]||=_(`i`,{class:`iconoir-warning-triangle`},null,-1),_(`span`,null,w(s.value),1)])):d(``,!0),_(`p`,tt,[n[2]||=_(`i`,{class:`iconoir-check-circle`},null,-1),O(` Generated `+w(u.value),1)]),_(`div`,{ref_key:`codeEl`,ref:r},[_(`pre`,nt,[_(`code`,{class:E(`language-${e.format}`)},w(e.yaml),3)])],512),_(`footer`,null,[e.pathRef?(T(),m(`p`,rt,[n[3]||=_(`i`,{class:`iconoir-folder`},null,-1),_(`span`,null,`Source: `+w(e.pathRef),1)])):(T(),m(`p`,it,[n[10]||=_(`i`,{class:`iconoir-info-circle`},null,-1),_(`span`,null,[O(` Copy this `+w(u.value)+` and save it to a `,1),_(`code`,null,w(f.value),1),n[6]||=O(` file in your resources directory`,-1),c.value?(T(),m(ne,{key:0},[n[4]||=O(` (named `,-1),_(`code`,null,w(e.name)+`.md`,1),n[5]||=O(`)`,-1)],64)):d(``,!0),n[7]||=O(`, `,-1),n[8]||=_(`br`,null,null,-1),n[9]||=O(`then reload the application. `,-1)])])),_(`div`,at,[e.pathRef&&e.inlineEditEnabled?(T(),m(`button`,{key:0,type:`button`,onClick:g,disabled:o.value===`saving`,class:E({saved:o.value===`saved`})},[_(`i`,{class:E(o.value===`saving`?`iconoir-refresh`:o.value===`saved`?`iconoir-check`:`iconoir-check-circle`)},null,2),O(` `+w(o.value===`saving`?`Saving...`:o.value===`saved`?`Saved!`:`Save to File`),1)],10,ot)):d(``,!0),_(`button`,{type:`button`,onClick:p,class:E({copied:i.value===`copied`})},[_(`i`,{class:E(i.value===`copied`?`iconoir-check`:`iconoir-copy`)},null,2),O(` `+w(i.value===`copied`?`Copied!`:`Copy to Clipboard`),1)],2),_(`button`,{class:`secondary`,type:`button`,onClick:n[0]||=e=>t.$emit(`editAgain`)},[...n[11]||=[_(`i`,{class:`iconoir-edit-pencil`},null,-1),O(` Edit Again `,-1)]])])])]))}},[[`__scopeId`,`data-v-b5ea938f`]]);function k(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function ct(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var lt=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,ut=lt&&`documentMode`in document?document.documentMode:null,dt=lt&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ft=lt&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),pt=!(!lt||!(`InputEvent`in window)||ut)&&`getTargetRanges`in new window.InputEvent(`input`),mt=lt&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),ht=lt&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,gt=lt&&/Android/.test(navigator.userAgent),_t=lt&&/^(?=.*Chrome).*/i.test(navigator.userAgent),vt=lt&>&&_t,yt=lt&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&dt&&!_t,bt=0,xt=1,St=2,Ct=1,wt=2,Tt=3,Et=4,Dt=5,Ot=6,kt=mt||ht||yt?`\xA0`:``,At=`
|
|
2
2
|
|
|
3
3
|
`,jt=ft?`\xA0`:kt,Mt=`֑-߿יִ-﷽ﹰ-ﻼ`,Nt=`A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--`,Pt=RegExp(`^[^`+Nt+`]*[`+Mt+`]`),Ft=RegExp(`^[^`+Mt+`]*[`+Nt+`]`),It={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},Lt={directionless:1,unmergeable:2},Rt={center:2,end:6,justify:4,left:1,right:3,start:5},zt={[wt]:`center`,[Ot]:`end`,[Et]:`justify`,[Ct]:`left`,[Tt]:`right`,[Dt]:`start`},Bt={normal:0,segmented:2,token:1},Vt={[bt]:`normal`,[St]:`segmented`,[xt]:`token`},Ht=`$config`;function Ut(e,t,n,r,i,a){let o=e.getFirstChild();for(;o!==null;){let e=o.__key;o.__parent===t&&(V(o)&&Ut(o,e,n,r,i,a),n.has(e)||a.delete(e),i.push(e)),o=o.getNextSibling()}}var Wt=!1,Gt=0;function Kt(e){Gt=e.timeStamp}function qt(e,t,n){let r=e.nodeName===`BR`,i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&Yo(e,n)!==void 0}function Jt(e,t,n){let r=Is(Os(n)),i=null,a=null;r!==null&&r.anchorNode===e&&(i=r.anchorOffset,a=r.focusOffset);let o=e.nodeValue;o!==null&&ss(t,o,i,a,!1)}function Yt(e,t,n){if(F(e)){let t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return Ro(t)&&n.isAttached()}function Xt(e,t,n,r){for(let i=e;i&&!Zs(i);i=Ss(i)){let e=Yo(i,t);if(e!==void 0){let t=G(e,n);if(t)return H(t)||!Y(i)?void 0:[i,t]}else if(i===r)return[r,$o(n)]}}function Zt(e,t,n){Wt=!0;let r=performance.now()-Gt>100;try{ro(e,()=>{let i=I()||function(e){return e.getEditorState().read(()=>{let e=I();return e===null?null:e.clone()})}(e),a=new Map,o=e.getRootElement(),s=e._editorState,c=e._blockCursorElement,l=!1,u=``;for(let n=0;n<t.length;n++){let d=t[n],f=d.type,p=d.target,m=Xt(p,e,s,o);if(!m)continue;let[h,g]=m;if(f===`characterData`)r&&P(g)&&Ro(p)&&Yt(i,p,g)&&Jt(p,g,e);else if(f===`childList`){l=!0;let t=d.addedNodes;for(let n=0;n<t.length;n++){let r=t[n],i=Jo(r),a=r.parentNode;if(a!=null&&r!==c&&i===null&&!qt(r,a,e)){if(ft){let e=(Y(r)?r.innerText:null)||r.nodeValue;e&&(u+=e)}a.removeChild(r)}}let n=d.removedNodes,r=n.length;if(r>0){let t=0;for(let i=0;i<r;i++){let r=n[i];(qt(r,p,e)||c===r)&&(p.appendChild(r),t++)}r!==t&&a.set(h,g)}}}if(a.size>0)for(let[t,n]of a)n.reconcileObservedMutation(t,e);let d=n.takeRecords();if(d.length>0){for(let t=0;t<d.length;t++){let n=d[t],r=n.addedNodes,i=n.target;for(let t=0;t<r.length;t++){let n=r[t],a=n.parentNode;a==null||n.nodeName!==`BR`||qt(n,i,e)||a.removeChild(n)}}n.takeRecords()}i!==null&&(l&&es(i),ft&&bs(e)&&i.insertRawText(u))})}finally{Wt=!1}}function Qt(e){let t=e._observer;t!==null&&Zt(e,t.takeRecords(),t)}function $t(e){(function(e){Gt===0&&Os(e).addEventListener(`textInput`,Kt,!0)})(e),e._observer=new MutationObserver((t,n)=>{Zt(e,t,n)})}var en=class{key;parse;unparse;isEqual;defaultValue;constructor(e,t){this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||un).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0)}};function tn(e,t){return new en(e,t)}function nn(e,t,n=`latest`){let r=(n===`latest`?e.getLatest():e).__state;return r?r.getValue(t):t.defaultValue}function rn(e,t,n){let r;if(z(),typeof n==`function`){let i=e.getLatest(),a=nn(i,t);if(r=n(a),t.isEqual(a,r))return i}else r=n;let i=e.getWritable();return sn(i).updateFromKnown(t,r),i}function an(e){let t=new Map,n=new Set;for(let r=typeof e==`function`?e:e.replace;r.prototype&&r.prototype.getType!==void 0;r=Object.getPrototypeOf(r)){let{ownNodeConfig:e}=$s(r);if(e&&e.stateConfigs)for(let r of e.stateConfigs){let e;`stateConfig`in r?(e=r.stateConfig,r.flat&&n.add(e.key)):e=r,t.set(e.key,e)}}return{flatKeys:n,sharedConfigMap:t}}var on=class e{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,n=void 0,r=new Map,i=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=n,this.knownState=r;let{sharedConfigMap:a}=this.sharedNodeState,o=i===void 0?function(e,t,n){let r=n.size;if(t)for(let i in t){let t=e.get(i);t&&n.has(t)||r++}return r}(a,n,r):i;this.size=o}getValue(e){let t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let n=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){let t=this.unknownState[e.key];t!==void 0&&(n=e.parse(t)),this.updateFromKnown(e,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){let e={...this.unknownState},t={};for(let[t,n]of this.knownState)t.isEqual(n,t.defaultValue)?delete e[t.key]:e[t.key]=t.unparse(n);for(let n of this.sharedNodeState.flatKeys)n in e&&(t[n]=e[n],delete e[n]);return ln(e)&&(t.$=e),t}getWritable(t){if(this.node===t)return this;let{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new e(t,n,function(e,t,n){let r;if(n)for(let[i,a]of Object.entries(n)){let n=e.get(i);n?t.has(n)||t.set(n,n.parse(a)):(r||={},r[i]=a)}return r}(n.sharedConfigMap,i,r),i,this.size)}updateFromKnown(e,t){let n=e.key;this.sharedNodeState.sharedConfigMap.set(n,e);let{knownState:r,unknownState:i}=this;r.has(e)||i&&n in i||(i&&(delete i[n],this.unknownState=ln(i)),this.size++),r.set(e,t)}updateFromUnknown(e,t){let n=this.sharedNodeState.sharedConfigMap.get(e);n?this.updateFromKnown(n,n.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){let{knownState:t}=this;for(let e of t.keys())t.set(e,e.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(let[t,n]of Object.entries(e))this.updateFromUnknown(t,n)}};function sn(e){let t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new on(t,cn(t));return t.__state=n,n}function cn(e){return e.__state?e.__state.sharedNodeState:Eo(Ws(),e.getType()).sharedNodeState}function ln(e){if(e)for(let t in e)return e}function un(e){return e}function dn(e,t,n){for(let[r,i]of t.knownState){if(e.has(r.key))continue;e.add(r.key);let t=n?n.getValue(r):r.defaultValue;if(t!==i&&!r.isEqual(t,i))return!0}return!1}function fn(e,t,n){let{unknownState:r}=t,i=n?n.unknownState:void 0;if(r){for(let[t,n]of Object.entries(r))if(!e.has(t)&&(e.add(t),n!==(i?i[t]:void 0)))return!0}return!1}function pn(e,t){let n=e.__state;return n&&n.node===e?n.getWritable(t):n}function mn(e,t){let n=e.__mode,r=e.__format,i=e.__style,a=t.__mode,o=t.__format,s=t.__style,c=e.__state,l=t.__state;return(n===null||n===a)&&(r===null||r===o)&&(i===null||i===s)&&(e.__state===null||c===l||function(e,t){if(e===t)return!0;if(e&&t&&e.size!==t.size)return!1;let n=new Set;return!(e&&dn(n,e,t)||t&&dn(n,t,e)||e&&fn(n,e,t)||t&&fn(n,t,e))}(c,l))}function hn(e,t){let n=e.mergeWithSibling(t),r=B()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function gn(e){let t,n,r=e;if(r.__text!==``||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&P(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==``){if(mn(t,r)){r=hn(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&P(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==``){if(mn(r,n)){r=hn(r,n);break}break}n.remove()}}else r.remove()}function _n(e){return vn(e.anchor),vn(e.focus),e}function vn(e){for(;e.type===`element`;){let t=e.getNode(),n=e.offset,r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),P(r)){e.set(r.__key,i?r.getTextContentSize():0,`text`,!0);break}if(!V(r))break;e.set(r.__key,i?r.getChildrenSize():0,`element`,!0)}}var yn,bn,xn,Sn,Cn,wn,Tn,En,Dn,On,A=``,kn=null,An=null,jn=!1,Mn=!1;function Nn(e,t){let n=Tn.get(e);if(t!==null){let n=Zn(e);n.parentNode===t&&t.removeChild(n)}if(En.has(e)||bn._keyToDOMMap.delete(e),V(n)){let e=Gn(n,Tn);Pn(e,0,e.length-1,null)}n!==void 0&&_s(On,xn,Sn,n,`destroyed`)}function Pn(e,t,n,r){for(let i=t;i<=n;++i){let t=e[i];t!==void 0&&Nn(t,r)}}function Fn(e,t){e.setProperty(`text-align`,t)}var In=`40px`;function Ln(e,t){let n=yn.theme.indent;if(typeof n==`string`){let r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}if(t===0)return void e.style.setProperty(`padding-inline-start`,``);let r=getComputedStyle(bn._rootElement||e).getPropertyValue(`--lexical-indent-base-value`)||In;e.style.setProperty(`padding-inline-start`,`calc(${t} * ${r})`)}function Rn(e,t){let n=e.style;t===0?Fn(n,``):t===1?Fn(n,`left`):t===2?Fn(n,`center`):t===3?Fn(n,`right`):t===4?Fn(n,`justify`):t===5?Fn(n,`start`):t===6&&Fn(n,`end`)}function zn(e,t){let n=function(e){let t=e.__dir;if(t!==null)return t;if(U(e))return null;let n=e.getParentOrThrow();return U(n)&&n.__dir===null?`auto`:null}(t);n===null?e.removeAttribute(`dir`):e.dir=n}function Bn(e,t){let n=En.get(e);n===void 0&&k(60);let r=n.createDOM(yn,bn);if(function(e,t,n){let r=n._keyToDOMMap;(function(e,t,n){let r=`__lexicalKey_${t._key}`;e[r]=n})(t,n,e),r.set(e,t)}(e,r,bn),P(n)?r.setAttribute(`data-lexical-text`,`true`):H(n)&&r.setAttribute(`data-lexical-decorator`,`true`),V(n)){let e=n.__indent,t=n.__size;if(zn(r,n),e!==0&&Ln(r,e),t!==0){let e=t-1;Vn(Gn(n,En),n,0,e,n.getDOMSlot(r))}let i=n.__format;i!==0&&Rn(r,i),n.isInline()||Un(null,n,r)}else{let t=n.getTextContent();if(H(n)){let t=n.decorate(bn,yn);t!==null&&qn(e,t),r.contentEditable=`false`}A+=t}return t!==null&&t.insertChild(r),_s(On,xn,Sn,n,`created`),r}function Vn(e,t,n,r,i){let a=A;A=``;let o=n;for(;o<=r;++o){Bn(e[o],i);let t=En.get(e[o]);t!==null&&P(t)?kn===null&&(kn=t.getFormat(),An=t.getStyle()):V(t)&&o<r&&!t.isInline()&&(A+=At)}i.element.__lexicalTextContent=A,A=a+A}function Hn(e,t){if(e){let n=e.__last;if(n){let e=t.get(n);if(e)return M(e)?`line-break`:H(e)&&e.isInline()?`decorator`:null}return`empty`}return null}function Un(e,t,n){let r=Hn(e,Tn),i=Hn(t,En);r!==i&&t.getDOMSlot(n).setManagedLineBreak(i)}function Wn(e,t,n){var r;kn=null,An=null,function(e,t,n){let r=A,i=e.__size,a=t.__size;A=``;let o=n.element;if(i===1&&a===1){let n=e.__first,r=t.__first;if(n===r)Kn(n,o);else{let e=Zn(n),t=Bn(r,null);try{o.replaceChild(t,e)}catch(i){if(typeof i==`object`&&i){let a=`${i.toString()} Parent: ${o.tagName}, new child: {tag: ${t.tagName} key: ${r}}, old child: {tag: ${e.tagName}, key: ${n}}.`;throw Error(a)}throw i}Nn(n,null)}let i=En.get(r);P(i)&&kn===null&&(kn=i.getFormat(),An=i.getStyle())}else{let r=Gn(e,Tn),s=Gn(t,En);if(r.length!==i&&k(227),s.length!==a&&k(228),i===0)a!==0&&Vn(s,0,0,a-1,n);else if(a===0){if(i!==0){let e=n.after==null&&n.before==null&&n.element.__lexicalLineBreak==null;Pn(r,0,i-1,e?null:o),e&&(o.textContent=``)}}else(function(e,t,n,r,i,a){let o=r-1,s=i-1,c,l,u=a.getFirstChild(),d=0,f=0;for(;d<=o&&f<=s;){let e=t[d],r=n[f];if(e===r)u=Jn(Kn(r,a.element)),d++,f++;else{if(l===void 0&&(l=Yn(n,f)),c===void 0)c=Yn(t,d);else if(!c.has(e)){d++;continue}if(!l.has(e)){u=Jn(Zn(e)),Nn(e,a.element),d++,c.delete(e);continue}if(c.has(r)){let e=xs(bn,r);e!==u&&a.withBefore(u).insertChild(e),u=Jn(Kn(r,a.element)),d++,f++}else Bn(r,a.withBefore(u)),f++}let i=En.get(r);i!==null&&P(i)?kn===null&&(kn=i.getFormat(),An=i.getStyle()):V(i)&&f<=s&&!i.isInline()&&(A+=At)}let p=d>o,m=f>s;if(p&&!m){let e=n[s+1],t=e===void 0?null:bn.getElementByKey(e);Vn(n,0,f,s,a.withBefore(t))}else m&&!p&&Pn(t,d,o,a.element)})(0,r,s,i,a,n)}o.__lexicalTextContent=A,A=r+A}(e,t,t.getDOMSlot(n)),r=t,kn==null||kn===r.__textFormat||Mn||r.setTextFormat(kn),function(e){An==null||An===e.__textStyle||Mn||e.setTextStyle(An)}(t)}function Gn(e,t){let n=[],r=e.__first;for(;r!==null;){let e=t.get(r);e===void 0&&k(101),n.push(r),r=e.__next}return n}function Kn(e,t){let n=Tn.get(e),r=En.get(e);n!==void 0&&r!==void 0||k(61);let i=jn||wn.has(e)||Cn.has(e),a=xs(bn,e);if(n===r&&!i){let e;if(V(n)){let t=a.__lexicalTextContent;typeof t==`string`?e=t:(e=n.getTextContent(),a.__lexicalTextContent=e)}else e=n.getTextContent();return A+=e,a}if(n!==r&&i&&_s(On,xn,Sn,r,`updated`),r.updateDOM(n,a,yn)){let n=Bn(e,null);return t===null&&k(62),t.replaceChild(n,a),Nn(e,null),n}if(V(n)){V(r)||k(334,e);let t=r.__indent;(jn||t!==n.__indent)&&Ln(a,t);let o=r.__format;if((jn||o!==n.__format)&&Rn(a,o),i)Wn(n,r,a),U(r)||r.isInline()||Un(n,r,a);else{let e=a.__lexicalTextContent,t;typeof e==`string`?t=e:(t=n.getTextContent(),a.__lexicalTextContent=t),A+=t}if((jn||r.__dir!==n.__dir)&&(zn(a,r),U(r)&&!jn))for(let e of r.getChildren())V(e)&&zn(xs(bn,e.getKey()),e)}else{let t=r.getTextContent();if(H(r)){let t=r.decorate(bn,yn);t!==null&&qn(e,t)}A+=t}if(!Mn&&U(r)&&r.__cachedText!==A){let e=r.getWritable();e.__cachedText=A,r=e}return a}function qn(e,t){let n=bn._pendingDecorators,r=bn._decorators;if(n===null){if(r[e]===t)return;n=Zo(bn)}n[e]=t}function Jn(e){let t=e.nextSibling;return t!==null&&t===bn._blockCursorElement&&(t=t.nextSibling),t}function Yn(e,t){let n=new Set;for(let r=t;r<e.length;r++)n.add(e[r]);return n}function Xn(e,t,n,r,i,a){A=``,jn=r===2,bn=n,yn=n._config,xn=n._nodes,Sn=bn._listeners.mutation,Cn=i,wn=a,Tn=e._nodeMap,En=t._nodeMap,Mn=t._readOnly,Dn=new Map(n._keyToDOMMap);let o=new Map;return On=o,Kn(`root`,null),bn=void 0,xn=void 0,Cn=void 0,wn=void 0,Tn=void 0,En=void 0,yn=void 0,Dn=void 0,On=void 0,o}function Zn(e){let t=Dn.get(e);return t===void 0&&k(75,e),t}function j(e){return{type:e}}var Qn=j(`SELECTION_CHANGE_COMMAND`),$n=j(`SELECTION_INSERT_CLIPBOARD_NODES_COMMAND`),er=j(`CLICK_COMMAND`),tr=j(`BEFORE_INPUT_COMMAND`),nr=j(`INPUT_COMMAND`),rr=j(`COMPOSITION_START_COMMAND`),ir=j(`COMPOSITION_END_COMMAND`),ar=j(`DELETE_CHARACTER_COMMAND`),or=j(`INSERT_LINE_BREAK_COMMAND`),sr=j(`INSERT_PARAGRAPH_COMMAND`),cr=j(`CONTROLLED_TEXT_INSERTION_COMMAND`),lr=j(`PASTE_COMMAND`),ur=j(`REMOVE_TEXT_COMMAND`),dr=j(`DELETE_WORD_COMMAND`),fr=j(`DELETE_LINE_COMMAND`),pr=j(`FORMAT_TEXT_COMMAND`),mr=j(`UNDO_COMMAND`),hr=j(`REDO_COMMAND`),gr=j(`KEYDOWN_COMMAND`),_r=j(`KEY_ARROW_RIGHT_COMMAND`),vr=j(`MOVE_TO_END`),yr=j(`KEY_ARROW_LEFT_COMMAND`),br=j(`MOVE_TO_START`),xr=j(`KEY_ARROW_UP_COMMAND`),Sr=j(`KEY_ARROW_DOWN_COMMAND`),Cr=j(`KEY_ENTER_COMMAND`),wr=j(`KEY_SPACE_COMMAND`),Tr=j(`KEY_BACKSPACE_COMMAND`),Er=j(`KEY_ESCAPE_COMMAND`),Dr=j(`KEY_DELETE_COMMAND`),Or=j(`KEY_TAB_COMMAND`),kr=j(`INSERT_TAB_COMMAND`),Ar=j(`INDENT_CONTENT_COMMAND`),jr=j(`OUTDENT_CONTENT_COMMAND`),Mr=j(`DROP_COMMAND`),Nr=j(`FORMAT_ELEMENT_COMMAND`),Pr=j(`DRAGSTART_COMMAND`),Fr=j(`DRAGOVER_COMMAND`),Ir=j(`DRAGEND_COMMAND`),Lr=j(`COPY_COMMAND`),Rr=j(`CUT_COMMAND`),zr=j(`SELECT_ALL_COMMAND`),Br=j(`CLEAR_EDITOR_COMMAND`),Vr=j(`CLEAR_HISTORY_COMMAND`),Hr=j(`CAN_REDO_COMMAND`),Ur=j(`CAN_UNDO_COMMAND`),Wr=j(`FOCUS_COMMAND`),Gr=j(`BLUR_COMMAND`),Kr=j(`KEY_MODIFIER_COMMAND`),qr=Object.freeze({}),Jr=[[`keydown`,function(e,t){Yr=e.timeStamp,Xr=e.key,!t.isComposing()&&J(t,gr,e)}],[`pointerdown`,function(e,t){let n=e.target,r=e.pointerType;zs(n)&&r!==`touch`&&r!==`pen`&&e.button===0&&ro(t,()=>{ko(n)||(ni=!0)})}],[`compositionstart`,function(e,t){J(t,rr,e)}],[`compositionend`,function(e,t){ft?ii=!0:ht||!mt&&!yt?J(t,ir,e):(ai=!0,oi=e.data)}],[`input`,function(e,t){e.stopPropagation(),ro(t,()=>{t.dispatchCommand(nr,e)},{event:e}),Qr=null}],[`click`,function(e,t){ro(t,()=>{let n=I(),r=Is(Os(t)),i=Ea();if(r){if(F(n)){let t=n.anchor,a=t.getNode();if(t.type===`element`&&t.offset===0&&n.isCollapsed()&&!U(a)&&K().getChildrenSize()===1&&a.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i))r.removeAllRanges(),n.dirty=!0;else if(e.detail===3&&!n.isCollapsed()&&a!==n.focus.getNode()){let e=tc(a,e=>V(e)&&!e.isInline());V(e)&&e.select(0)}}else if(e.pointerType===`touch`||e.pointerType===`pen`){let n=r.anchorNode;(Y(n)||Ro(n))&&es(Ta(i,r,t,e))}}J(t,er,e)})}],[`cut`,qr],[`copy`,qr],[`dragstart`,qr],[`dragover`,qr],[`dragend`,qr],[`paste`,qr],[`focus`,qr],[`blur`,qr],[`drop`,qr]];pt&&Jr.push([`beforeinput`,(e,t)=>function(e,t){let n=e.inputType;n===`deleteCompositionText`||ft&&bs(t)||n!==`insertCompositionText`&&J(t,tr,e)}(e,t)]);var Yr=0,Xr=null,Zr=0,Qr=null,$r=new WeakMap,ei=new WeakMap,ti=!1,ni=!1,ri=!1,ii=!1,ai=!1,oi=``,si=null,ci=[0,``,0,`root`,0];function li(e,t,n,r,i){let a=e.anchor,o=e.focus,s=a.getNode(),c=B(),l=Is(Os(c)),u=l===null?null:l.anchorNode,d=a.key,f=c.getElementByKey(d),p=n.length;return d!==o.key||!P(s)||(!i&&(!pt||Zr<r+50)||s.isDirty()&&p<2||ns(n))&&a.offset!==o.offset&&!s.isComposing()||Lo(s)||s.isDirty()&&p>1||(i||!pt)&&f!==null&&!s.isComposing()&&u!==Bo(f)||l!==null&&t!==null&&(!t.collapsed||t.startContainer!==l.anchorNode||t.startOffset!==l.anchorOffset)||!s.isComposing()&&(s.getFormat()!==e.format||s.getStyle()!==e.style)||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;let n=e.anchor.offset,r=t.getParentOrThrow(),i=Io(t);return n===0?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||i||function(e){let t=e.getPreviousSibling();return(P(t)||V(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||i)}(e,s)}function ui(e,t){return Ro(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function di(e,t,n){let{anchorNode:r,anchorOffset:i,focusNode:a,focusOffset:o}=e;ti&&(ti=!1,ui(r,i)&&ui(a,o)&&!si)||ro(t,()=>{if(!n)return void es(null);if(!jo(t,r,a))return;let s=I();if(si&&F(s)&&s.isCollapsed()){let e=s.anchor,t=si.anchor;(e.key===t.key&&e.offset===t.offset+1||e.offset===1&&t.getNode().is(e.getNode().getPreviousSibling()))&&(s=si.clone(),es(s))}if(si=null,F(s)){let n=s.anchor,r=n.getNode();if(s.isCollapsed()){e.type===`Range`&&e.anchorNode===e.focusNode&&(s.dirty=!0);let i=Os(t).event,a=i?i.timeStamp:performance.now(),[o,c,l,u,d]=ci,f=K(),p=!1===t.isComposing()&&f.getTextContent()===``;if(a<d+200&&n.offset===l&&n.key===u)fi(s,o,c);else if(n.type===`text`)P(r)||k(141),pi(s,r);else if(n.type===`element`&&!p){V(r)||k(259);let e=n.getNode();e.isEmpty()?function(e,t){fi(e,t.getTextFormat(),t.getTextStyle())}(s,e):fi(s,0,``)}}else{let e=n.key,t=s.focus.key,r=s.getNodes(),a=r.length,c=s.isBackward(),l=c?o:i,u=c?i:o,d=c?t:e,f=c?e:t,p=2047,m=!1;for(let e=0;e<a;e++){let t=r[e],n=t.getTextContentSize();if(P(t)&&n!==0&&!(e===0&&t.__key===d&&l===n||e===a-1&&t.__key===f&&u===0)&&(m=!0,p&=t.getFormat(),p===0))break}s.format=m?p:0}}J(t,Qn,void 0)})}function fi(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function pi(e,t){fi(e,t.getFormat(),t.getStyle())}function mi(e){if(!e.getTargetRanges)return null;let t=e.getTargetRanges();return t.length===0?null:t[0]}function hi(e){let t=e.inputType,n=mi(e),r=B(),i=I();if(t===`deleteContentBackward`){if(i===null){let e=Ea();if(!F(e))return!0;es(e.clone())}if(F(i)){let t=i.anchor.key===i.focus.key;if(a=e.timeStamp,Xr===`MediaLast`&&a<Yr+30&&r.isComposing()&&t){if(Ko(null),Yr=0,setTimeout(()=>{ro(r,()=>{Ko(null)})},30),F(i)){let e=i.anchor.getNode();e.markDirty(),P(e)||k(142),pi(i,e)}}else{Ko(null),e.preventDefault();let n=i.anchor.getNode(),a=n.getTextContent(),o=n.canInsertTextAfter(),s=i.anchor.offset===0&&i.focus.offset===a.length,c=vt&&t&&!s&&o;if(c&&i.isCollapsed()&&(c=!H(ys(i.anchor,!0))),!c){J(r,ar,!0);let e=I();vt&&F(e)&&e.isCollapsed()&&(si=e,setTimeout(()=>si=null))}}return!0}}var a;if(!F(i))return!0;let o=e.data;Qr!==null&&os(!1,r,Qr),i.dirty&&Qr===null||!i.isCollapsed()||U(i.anchor.getNode())||n===null||i.applyDOMRange(n),Qr=null;let s=i.anchor,c=i.focus,l=s.getNode(),u=c.getNode();if(t===`insertText`||t===`insertTranspose`){if(o===`
|
|
4
4
|
`)e.preventDefault(),J(r,or,!1);else if(o===At)e.preventDefault(),J(r,sr,void 0);else if(o==null&&e.dataTransfer){let t=e.dataTransfer.getData(`text/plain`);e.preventDefault(),i.insertRawText(t)}else o!=null&&li(i,n,o,e.timeStamp,!0)?(e.preventDefault(),J(r,cr,o)):Qr=o;return Zr=e.timeStamp,!0}switch(e.preventDefault(),t){case`insertFromYank`:case`insertFromDrop`:case`insertReplacementText`:J(r,cr,e);break;case`insertFromComposition`:Ko(null),J(r,cr,e);break;case`insertLineBreak`:Ko(null),J(r,or,!1);break;case`insertParagraph`:Ko(null),ri&&!ht?(ri=!1,J(r,or,!1)):J(r,sr,void 0);break;case`insertFromPaste`:case`insertFromPasteAsQuotation`:J(r,lr,e);break;case`deleteByComposition`:(function(e,t){return e!==t||V(e)||V(t)||!Io(e)||!Io(t)})(l,u)&&J(r,ur,e);break;case`deleteByDrag`:case`deleteByCut`:J(r,ur,e);break;case`deleteContent`:J(r,ar,!1);break;case`deleteWordBackward`:J(r,dr,!0);break;case`deleteWordForward`:J(r,dr,!1);break;case`deleteHardLineBackward`:case`deleteSoftLineBackward`:J(r,fr,!0);break;case`deleteContentForward`:case`deleteHardLineForward`:case`deleteSoftLineForward`:J(r,fr,!1);break;case`formatStrikeThrough`:J(r,pr,`strikethrough`);break;case`formatBold`:J(r,pr,`bold`);break;case`formatItalic`:J(r,pr,`italic`);break;case`formatUnderline`:J(r,pr,`underline`);break;case`historyUndo`:J(r,mr,void 0);break;case`historyRedo`:J(r,hr,void 0)}return!0}function gi(e){if(Y(e.target)&&ko(e.target))return!0;let t=B(),n=I(),r=e.data,i=mi(e);if(r!=null&&F(n)&&li(n,i,r,e.timeStamp,!1)){ii&&=(yi(t,r),!1);let i=n.anchor.getNode(),a=Is(Os(t));if(a===null)return!0;let o=n.isBackward(),s=o?n.anchor.offset:n.focus.offset,c=o?n.focus.offset:n.anchor.offset;pt&&!n.isCollapsed()&&P(i)&&a.anchorNode!==null&&i.getTextContent().slice(0,s)+r+i.getTextContent().slice(s+c)===as(a.anchorNode)||J(t,cr,r);let l=r.length;ft&&l>1&&e.inputType===`insertCompositionText`&&!t.isComposing()&&(n.anchor.offset-=l),vt&&t.isComposing()&&(Yr=0,Ko(null))}else os(!1,t,r===null?void 0:r),ii&&=(yi(t,r||void 0),!1);return function(){z(),Qt(B())}(),!0}function _i(e){let t=B(),n=I();if(F(n)&&!t.isComposing()){let r=n.anchor,i=n.anchor.getNode();Ko(r.key),ws(Pi),(e.timeStamp<Yr+30||r.type===`element`||!n.isCollapsed()||i.getFormat()!==n.format||P(i)&&i.getStyle()!==n.style)&&J(t,cr,jt)}return!0}function vi(e){return yi(B(),e.data),ws(Fi),!0}function yi(e,t){let n=e._compositionKey;if(Ko(null),n!==null&&t!=null){if(t===``){let t=G(n),r=Bo(e.getElementByKey(n));if(r!==null&&r.nodeValue!==null&&P(t)){let n=Is(Os(e)),i=null,a=null;n!==null&&n.anchorNode===r&&(i=n.anchorOffset,a=n.focusOffset),ss(t,r.nodeValue,i,a,!0)}return}if(t[t.length-1]===`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as e,A as t,B as n,E as r,I as i,J as a,L as o,N as s,P as c,T as l,X as u,a as d,at as f,j as p,q as m,rt as h,x as g,z as _}from"./index-
|
|
1
|
+
import{$ as e,A as t,B as n,E as r,I as i,J as a,L as o,N as s,P as c,T as l,X as u,a as d,at as f,j as p,q as m,rt as h,x as g,z as _}from"./index-yiZbbvAs.js";var v={key:0},y={class:`error-header`},b={class:`error-message`},x={class:`error-location`},S={class:`error-line-badge`},C={key:0,class:`error-code-block`},w={class:`line-number`},T={key:1},E=d({__name:`ErrorPage`,setup(d){let E=l(),D=r(),O=s(()=>{try{return E.query.data?JSON.parse(E.query.data):null}catch{return null}});async function k(){let e=await g();e.error?D.replace({name:`error`,query:{data:JSON.stringify(e.error)}}):(D.push(`/`),window.location.reload())}return(r,s)=>{let l=u(`router-link`);return O.value?(m(),o(`div`,v,[c(`header`,null,[c(`article`,y,[s[1]||=c(`h3`,null,[c(`i`,{class:`iconoir-warning-triangle`}),_(` Error `)],-1),c(`p`,b,f(O.value.error),1),c(`p`,x,[s[0]||=c(`i`,{class:`iconoir-page`},null,-1),_(` `+f(O.value.path)+` `,1),c(`span`,S,`Line `+f(O.value.line_no),1)])]),c(`a`,{href:`#`,class:`reload-btn`,onClick:t(k,[`prevent`])},[...s[2]||=[c(`i`,{class:`iconoir-refresh`},null,-1),_(` Reload `,-1)]])]),O.value.context?(m(),o(`div`,C,[c(`pre`,null,[c(`code`,null,[(m(!0),o(p,null,a(O.value.context,e=>(m(),o(`span`,{key:e.line_no,class:h(e.selected?`error-line`:`code-line`)},[c(`span`,w,f(String(e.line_no).padStart(4,` `)),1),_(f(e.content)+`
|
|
2
2
|
`,1)],2))),128))])])])):i(``,!0)])):(m(),o(`div`,T,[s[4]||=c(`p`,null,`No error data available.`,-1),n(l,{to:`/`},{default:e(()=>[...s[3]||=[_(`Back to home`,-1)]]),_:1})]))}}},[[`__scopeId`,`data-v-cb96d9d5`]]);export{E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as e,K as t,L as n,P as r,U as i,a,m as o,q as s,tt as c}from"./index-
|
|
1
|
+
import{G as e,K as t,L as n,P as r,U as i,a,m as o,q as s,tt as c}from"./index-yiZbbvAs.js";import{t as l}from"./useGraphviz-Dnm2pkon.js";import{t as u}from"./usePanZoom-HxgEsqq2.js";var d={key:0},f={key:1,class:`graph-container graph-expand`},p=[`innerHTML`],m=a({__name:`GraphView`,setup(a){let m=c(``),h=c(!0),g=c(null),_=null;e(async()=>{let e=await o();m.value=e?await l(e):``,h.value=!1,await i(),v()}),t(()=>{_?.destroy()});function v(){if(!g.value)return;let e=g.value.querySelector(`svg`);e&&(_=u(e,g.value))}return(e,t)=>(s(),n(`article`,null,[t[1]||=r(`header`,null,[r(`h2`,null,`Architecture Overview`)],-1),h.value?(s(),n(`div`,d,[...t[0]||=[r(`p`,null,`Loading graph...`,-1)]])):(s(),n(`div`,f,[r(`div`,{id:`graphviz`,ref_key:`graphEl`,ref:g,class:`fullcanvas`,innerHTML:m.value},null,8,p)]))]))}},[[`__scopeId`,`data-v-dbc5bc1f`]]);export{m as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["vue/GraphView-
|
|
2
|
-
import{M as e}from"./mermaid-C3bOamfn.js";import{F as t,H as n,L as r,N as i,P as a,V as o,nt as s,q as c}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["vue/GraphView-liQJzFyo.js","vue/index-yiZbbvAs.js","vue/mermaid-C3bOamfn.js","vue/rolldown-runtime-COiEfhsA.js","vue/index-BLSE5DSv.css","vue/useGraphviz-Dnm2pkon.js","vue/usePanZoom-HxgEsqq2.js","vue/GraphView-BvWAbUAl.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{M as e}from"./mermaid-C3bOamfn.js";import{F as t,H as n,L as r,N as i,P as a,V as o,nt as s,q as c}from"./index-yiZbbvAs.js";import{n as l}from"./PageView-BIxT_t49.js";var u={key:2},d={__name:`HomePage`,setup(d){let f=o(()=>e(()=>import(`./GraphView-liQJzFyo.js`),__vite__mapDeps([0,1,2,3,4,5,6,7]))),p=n(`pages`,null),m=n(`pageHome`,null),h=i(()=>p?.value!=null),g=i(()=>m?.value);return(e,n)=>g.value?(c(),t(l,{key:0,name:g.value.name},null,8,[`name`])):h.value?(c(),t(s(f),{key:1})):(c(),r(`article`,u,[...n[0]||=[a(`p`,null,`Loading...`,-1)]]))}};export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,B as t,E as n,F as r,G as i,H as a,I as o,J as s,K as c,L as l,M as u,N as d,P as f,Q as p,U as m,X as h,Z as g,a as _,at as v,et as y,g as b,h as x,i as S,it as C,j as w,k as T,nt as E,q as D,r as O,rt as k,s as A,tt as j,z as M}from"./index-yiZbbvAs.js";import{t as N}from"./useGraphviz-Dnm2pkon.js";import{t as P}from"./usePanZoom-HxgEsqq2.js";import{a as F,d as I,l as L,n as R,r as z,s as ee,u as te}from"./ResourceList-DdtaHY4k.js";import{a as ne,c as re,i as B,l as ie,n as ae,o as oe,r as V,s as se,u as H}from"./WikiPage-CgvRN6R2.js";import{n as ce,r as U}from"./PageView-BIxT_t49.js";var le=[`title`],ue=_({__name:`EmbedButton`,props:{kind:String,name:String},setup(e){let t=e,n=j(!1),r=d(()=>`![[${t.kind}/${t.name}]]`),i=d(()=>({View:`the result of this view`,Analysis:`the result of this analysis`})[t.kind]||`this description`);async function a(){try{await navigator.clipboard.writeText(r.value)}catch{window.prompt(`Copy this into a page:`,r.value);return}n.value=!0,setTimeout(()=>{n.value=!1},2e3)}return(e,t)=>(D(),l(`button`,{type:`button`,class:`btn-embed`,title:`Copy ${r.value} to show ${i.value} inside a page`,onClick:a},[f(`i`,{class:k(n.value?`iconoir-check`:`iconoir-copy`)},null,2),M(` `+v(n.value?`Copied`:`Embed`),1)],8,le))}},[[`__scopeId`,`data-v-04c65c40`]]),de={key:0,class:`relations-section`},fe={class:`relations-grid`},W={class:`relations-column relations-outgoing`},G={class:`relation-kind`},pe={class:`relation-verb`},K={class:`instance-badges`},me={key:1,class:`relations-empty`},q={id:`incoming`,class:`relations-column relations-incoming`},J={class:`relation-kind`},Y={class:`relation-verb`},he={class:`instance-badges`},ge={key:1,class:`relations-empty`},X=_({__name:`RelationsGrid`,props:{data:Object},setup(t){let n=t,i=a(`kinds`),c=d(()=>n.data.relations||{}),u=d(()=>n.data.references||{}),p=d(()=>Object.keys(c.value).length>0||Object.keys(u.value).length>0);function m(e){return i?.value?.kinds?i.value.kinds.find(t=>t.kind===e):null}function g(e){return m(e)?.icon||`cube`}function _(e){return m(e)?.layer||`technology`}let y=d(()=>{let e=[];for(let[t,n]of Object.entries(c.value))for(let[r,i]of Object.entries(n))e.push({verb:t,kind:r,names:[...i].sort()});return e}),b=d(()=>{let e=[];for(let[t,n]of Object.entries(u.value))for(let[r,i]of Object.entries(n))e.push({verb:r||`references`,kind:t,names:[...i].sort()});return e});return(t,n)=>{let i=h(`router-link`);return p.value?(D(),l(`article`,de,[n[2]||=f(`header`,null,[f(`h2`,null,`Relations`)],-1),f(`div`,fe,[f(`div`,W,[n[0]||=f(`h3`,null,[M(`Outgoing `),f(`i`,{class:`iconoir-arrow-right`})],-1),y.value.length?(D(!0),l(w,{key:0},s(y.value,(t,n)=>(D(),l(`div`,{key:`out-`+n,class:`relation-group`},[f(`div`,G,[f(`i`,{class:k(`iconoir-${g(t.kind)} icon-${_(t.kind)}`)},null,2),f(`span`,null,v(t.kind)+` (`+v(t.names.length)+`)`,1)]),f(`div`,pe,v(t.verb)+` (`+v(t.names.length)+`)`,1),f(`div`,K,[(D(!0),l(w,null,s(t.names,n=>(D(),r(i,{key:n,class:`badge badge-info`,to:{name:`instance`,params:{kind:t.kind,instance:n}}},{default:e(()=>[M(v(n),1)]),_:2},1032,[`to`]))),128))])]))),128)):(D(),l(`div`,me,`None`))]),f(`div`,q,[n[1]||=f(`h3`,null,[f(`i`,{class:`iconoir-arrow-right`}),M(` Incoming`)],-1),b.value.length?(D(!0),l(w,{key:0},s(b.value,(t,n)=>(D(),l(`div`,{key:`in-`+n,class:`relation-group`},[f(`div`,J,[f(`i`,{class:k(`iconoir-${g(t.kind)} icon-${_(t.kind)}`)},null,2),f(`span`,null,v(t.kind)+` (`+v(t.names.length)+`)`,1)]),f(`div`,Y,v(t.verb)+` (`+v(t.names.length)+`)`,1),f(`div`,he,[(D(!0),l(w,null,s(t.names,n=>(D(),r(i,{key:n,class:`badge badge-info`,to:{name:`instance`,params:{kind:t.kind,instance:n}}},{default:e(()=>[M(v(n),1)]),_:2},1032,[`to`]))),128))])]))),128)):(D(),l(`div`,ge,`None`))])])])):o(``,!0)}}},[[`__scopeId`,`data-v-5b9a2621`]]),_e={key:0},ve={key:1,class:`graph-error`},ye={key:2,class:`graph-container`},be=[`innerHTML`],xe=_({__name:`ModuleGraph`,props:{dot:String,label:{type:String,default:`Module Structure`}},setup(e){let t=e,n=j(``),r=j(!0),a=j(null),s=j(null),u=null;async function d(e){if(!e)r.value=!1;else{u?.destroy(),u=null,r.value=!0,a.value=null;try{n.value=await N(e)}catch(e){a.value=e?.message||`Failed to render module graph`,n.value=``}finally{if(r.value=!1,await m(),s.value){let e=s.value.querySelector(`svg`);e&&(u=P(e,s.value))}}}}return i(()=>d(t.dot)),p(()=>t.dot,d),c(()=>{u?.destroy()}),(t,i)=>(D(),l(`article`,null,[f(`header`,null,[f(`h2`,null,v(e.label),1)]),r.value?(D(),l(`div`,_e,[...i[0]||=[f(`p`,null,`Loading graph...`,-1)]])):a.value?(D(),l(`p`,ve,[i[1]||=f(`i`,{class:`iconoir-warning-triangle`},null,-1),M(` `+v(a.value),1)])):n.value?(D(),l(`div`,ye,[f(`div`,{ref_key:`graphEl`,ref:s,class:`canvas`,innerHTML:n.value},null,8,be)])):o(``,!0)]))}},[[`__scopeId`,`data-v-c3280c1e`]]),Se={key:0,class:`requirements-section`},Ce={__name:`RequirementsSection`,props:{data:Object},setup(e){let n=e,r=d(()=>{let e=n.data.relations||{},t=[];for(let[n,r]of Object.entries({realizes:`implemented`,partiallyRealizes:`partial`,plans:`planned`})){let i=e[n]||{},a=i.MotivationRequirement||i.motivationRequirements||[];for(let e of a)t.push({name:e,status:r,verb:n})}return t}),i=j([]);p(r,async e=>{if(!e.length){i.value=[];return}let t=await Promise.all(e.map(async e=>{try{let t=(await x(`MotivationRequirement`,e.name)).metadata?.annotations||{};return{...e,priority:t[`requirement/priority`]||null,story:t[`requirement/story`]||null}}catch{return{...e,priority:null,story:null}}}));i.value=t},{immediate:!0});function a(e){let t=n.data.name;return`/search?q=${encodeURIComponent(`MotivationRequirement: <- "${t}" & requirement/priority == "${e}"`)}`}return(e,n)=>r.value.length?(D(),l(`article`,Se,[n[0]||=f(`header`,null,[f(`h2`,null,`Requirements`)],-1),t(V,{items:i.value,"priority-link":a},null,8,[`items`])])):o(``,!0)}},Z={key:0},we=[`title`],Te=[`href`],Ee={class:`git-info`},De={class:`git-item`},Oe={class:`git-clone-command`},ke=_({__name:`GitInfo`,props:{annotations:Object},setup(e){let t=e,n=d(()=>t.annotations[`repository/git`]),r=d(()=>n.value?ee(n.value):null);function i(){navigator.clipboard.writeText(`git clone ${n.value}`)}return(e,t)=>n.value?(D(),l(`tr`,Z,[f(`th`,{scope:`row`,title:E(R)(`repository/git`)},[f(`a`,{class:`git-link`,href:r.value,target:`_blank`},`Git Repo`,8,Te)],8,we),f(`td`,null,[f(`div`,Ee,[f(`div`,De,[t[0]||=f(`i`,{class:`iconoir-git-branch`},null,-1),f(`code`,Oe,`git clone `+v(n.value),1)]),f(`button`,{class:`copy-button`,onClick:i,title:`Copy to clipboard`},[...t[1]||=[f(`i`,{class:`iconoir-copy`},null,-1)]])])])])):o(``,!0)}},[[`__scopeId`,`data-v-808bbe74`]]),Ae={key:0},je=[`title`],Me={class:`language-distribution`},Ne={class:`language-total`},Pe={class:`language-count`},Fe={class:`language-bar`},Ie=[`title`],Le={class:`language-legend`},Re={class:`other-languages`},ze=_({__name:`LanguageStats`,props:{annotations:Object,kind:String},setup(n){let i=n,a=d(()=>{let e=i.annotations[`scc/languages`];if(!e)return null;let t=e.split(`,`).map(e=>{let t=`scc/language/${e.trim()}/loc`;return{name:e.trim(),loc:parseInt(i.annotations[t]||`0`,10)}}).sort((e,t)=>t.loc-e.loc),n=t.reduce((e,t)=>e+t.loc,0);if(n<=0)return null;let r=t.filter(e=>e.loc/n*100>=.1),a=r.slice(0,10),o=[...r.slice(10),...t.filter(e=>e.loc/n*100<.1)],s=o.reduce((e,t)=>e+t.loc,0),c=[...a];return s>0&&c.push({name:`Other`,loc:s,isOther:!0,otherNames:o.map(e=>e.name)}),{display:c,total:n}});function c(e){return(e/a.value.total*100).toFixed(1)}function u(e,t){return t.isOther?`lang-other`:`lang-${e}`}function p(e,t){return{name:`search`,query:{q:`${e} == "${t}"`}}}return(n,i)=>{let d=h(`router-link`);return a.value?(D(),l(`tr`,Ae,[f(`th`,{scope:`row`,title:E(R)(`scc/languages`,`scc/language/<Language>/loc`)},`Languages`,8,je),f(`td`,null,[f(`div`,Me,[f(`div`,Ne,[f(`span`,Pe,v(E(L)(a.value.total)),1),i[0]||=f(`span`,{class:`language-label`},`lines of code`,-1)]),f(`div`,Fe,[(D(!0),l(w,null,s(a.value.display,(e,t)=>(D(),l(`div`,{key:e.name,class:k([`language-bar-segment`,u(t,e)]),style:C({width:c(e.loc)+`%`}),title:`${e.name}: ${E(L)(e.loc)} (${c(e.loc)}%)`},null,14,Ie))),128))]),f(`div`,Le,[(D(!0),l(w,null,s(a.value.display,(n,a)=>(D(),l(`div`,{key:n.name,class:`language-legend-item`},[f(`div`,{class:k([`language-legend-dot`,u(a,n)])},null,2),n.isOther?(D(),l(w,{key:0},[f(`span`,null,`Other `+v(c(n.loc))+`%`,1),f(`span`,Re,[i[1]||=M(` (`,-1),(D(!0),l(w,null,s(n.otherNames,(r,i)=>(D(),l(w,{key:r},[t(d,{to:p(`scc/languages`,r)},{default:e(()=>[M(v(r),1)]),_:2},1032,[`to`]),i<n.otherNames.length-1?(D(),l(w,{key:0},[M(`, `)],64)):o(``,!0)],64))),128)),i[2]||=M(`) `,-1)])],64)):(D(),r(d,{key:1,to:p(`scc/languages`,n.name)},{default:e(()=>[M(v(n.name)+` `+v(c(n.loc))+`% `,1)]),_:2},1032,[`to`]))]))),128))])])])])):o(``,!0)}}},[[`__scopeId`,`data-v-c1202fdd`]]),Be={key:0},Ve=[`title`],He={class:`project-estimate`},Ue={key:0,class:`estimate-item`},We={class:`estimate-value`},Ge={key:1,class:`estimate-item`},Ke={class:`estimate-value`},qe={key:2,class:`estimate-item`},Je={class:`estimate-value`},Ye=_({__name:`ProjectEstimate`,props:{annotations:Object},setup(e){let t=e,n=d(()=>z(`cost`,t.annotations[`scc/estimatedCost`])),r=d(()=>z(`schedule`,t.annotations[`scc/estimatedScheduleMonths`])),i=d(()=>z(`team`,t.annotations[`scc/estimatedPeople`])),a=d(()=>n.value!=null||r.value!=null||i.value!=null);return(e,t)=>a.value?(D(),l(`tr`,Be,[f(`th`,{scope:`row`,title:E(R)(`scc/estimatedCost`,`scc/estimatedScheduleMonths`,`scc/estimatedPeople`)},[...t[0]||=[M(` Project Estimate `,-1),f(`span`,{class:`estimate-note`,title:`Estimates adjusted for €80k salary and AI-assisted development (3x productivity)`},[f(`i`,{class:`iconoir-info-circle`})],-1)]],8,Ve),f(`td`,null,[f(`div`,He,[n.value==null?o(``,!0):(D(),l(`div`,Ue,[t[1]||=f(`i`,{class:`iconoir-euro`},null,-1),t[2]||=f(`span`,{class:`estimate-label`},`Cost:`,-1),f(`span`,We,v(E(I)(n.value)),1)])),r.value==null?o(``,!0):(D(),l(`div`,Ge,[t[3]||=f(`i`,{class:`iconoir-calendar`},null,-1),t[4]||=f(`span`,{class:`estimate-label`},`Schedule:`,-1),f(`span`,Ke,v(r.value.toFixed(1))+` months`,1)])),i.value==null?o(``,!0):(D(),l(`div`,qe,[t[5]||=f(`i`,{class:`iconoir-group`},null,-1),t[6]||=f(`span`,{class:`estimate-label`},`Team:`,-1),f(`span`,Je,v(i.value)+` people`,1)]))])])])):o(``,!0)}},[[`__scopeId`,`data-v-d97600d8`]]),Xe={key:0},Ze=[`title`],Qe={class:`repository-distribution`},$e={class:`repository-total`},et={class:`repository-count`},tt={class:`repository-bar`},nt=[`title`],rt={class:`repository-legend`},it=_({__name:`RepositoriesBar`,props:{annotations:Object},setup(e){let t=e,n=d(()=>parseInt(t.annotations[`repository/artifacts/total`]||`0`,10)),r=d(()=>parseInt(t.annotations[`repository/artifacts/active`]||`0`,10)),i=d(()=>parseInt(t.annotations[`repository/artifacts/abandoned`]||`0`,10)),a=d(()=>parseInt(t.annotations[`repository/artifacts/archived`]||`0`,10)),c=d(()=>parseInt(t.annotations[`repository/artifacts/highBusFactor`]||`0`,10)),u=d(()=>n.value>0),p=d(()=>r.value-c.value),m=d(()=>n.value-r.value-i.value-a.value);function h(e){return(e/n.value*100).toFixed(1)}let g=d(()=>{let e=[];return p.value>0&&e.push({cls:`status-active`,value:p.value,label:`Active (healthy)`}),c.value>0&&e.push({cls:`status-high-bus-factor`,value:c.value,label:`Active (high bus factor)`}),a.value>0&&e.push({cls:`status-archived`,value:a.value,label:`Archived`}),m.value>0&&e.push({cls:`status-other`,value:m.value,label:`Other`}),i.value>0&&e.push({cls:`status-abandoned`,value:i.value,label:`Abandoned`}),e});return(e,t)=>u.value?(D(),l(`tr`,Xe,[f(`th`,{scope:`row`,title:E(R)(`repository/artifacts/total`,`repository/artifacts/active`,`repository/artifacts/abandoned`,`repository/artifacts/archived`,`repository/artifacts/highBusFactor`)},`Repositories`,8,Ze),f(`td`,null,[f(`div`,Qe,[f(`div`,$e,[f(`span`,et,v(n.value),1),t[0]||=f(`span`,{class:`repository-label`},`repositories`,-1)]),f(`div`,tt,[(D(!0),l(w,null,s(g.value,e=>(D(),l(`div`,{key:e.cls,class:k([`repository-bar-segment`,e.cls]),style:C({width:h(e.value)+`%`}),title:`${e.label}: ${e.value} (${h(e.value)}%)`},null,14,nt))),128))]),f(`div`,rt,[(D(!0),l(w,null,s(g.value,e=>(D(),l(`div`,{key:e.cls,class:`repository-legend-item`},[f(`div`,{class:k([`repository-legend-dot`,e.cls])},null,2),f(`span`,null,v(e.value)+` `+v(e.label.toLowerCase()),1)]))),128))])])])])):o(``,!0)}},[[`__scopeId`,`data-v-6c3e5f7d`]]),at=[`title`],Q=_({__name:`SparklineChart`,props:{values:{type:String,required:!0},type:{type:String,default:`commits`},maxHeight:{type:Number,default:16},colorClass:{type:String,default:null}},setup(e){let t=e,n=d(()=>!t.values||t.values.trim()===``?[]:t.values.split(`,`).map(e=>parseInt(e,10)||0)),r=d(()=>{let e=Math.max(...n.value);return e===0?1:e});function i(e){return e===0?0:Math.max(2,Math.round(e/r.value*t.maxHeight))}let a=d(()=>{switch(t.type){case`created`:return` issues created`;case`resolved`:return` issues resolved`;default:return` commits`}});return(t,r)=>(D(),l(`div`,{class:k([`activity-sparkline`,e.colorClass])},[(D(!0),l(w,null,s(n.value,(e,t)=>(D(),l(`div`,{key:t,class:k([`activity-sparkline-bar`,{empty:e===0}]),style:C({height:i(e)+`px`}),title:e+a.value},null,14,at))),128))],2))}},[[`__scopeId`,`data-v-33cc84bd`]]),ot={key:0},st=[`title`],ct={class:`activity-summary`},lt={key:0,class:`activity-item`},ut=[`title`],dt={class:`activity-value sparkline-total`},ft={key:1,class:`activity-item`},pt=[`title`],mt={key:0,class:`activity-value sparkline-total`},ht={key:1,class:`activity-value contributors-total`},gt={key:2,class:`activity-item`},_t=[`title`],vt={class:`activity-value`},yt={key:3,class:`activity-item`},bt=[`title`],xt={key:4,class:`activity-item`},St=[`title`],Ct=_({__name:`ActivityInfo`,props:{annotations:Object,kind:String},setup(n){let r=n,i=d(()=>r.annotations[`activity/commits`]),a=d(()=>r.annotations[`activity/contributors`]),s=d(()=>r.annotations[`activity/contributors/6m`]),c=d(()=>r.annotations[`activity/contributors/total`]),u=d(()=>r.annotations[`activity/status`]),p=d(()=>r.annotations[`activity/busFactor`]),m=d(()=>r.annotations[`activity/createdAt`]),g=d(()=>i.value||a.value||u.value||p.value||m.value),_=d(()=>i.value?i.value.split(`,`).map(Number).reduce((e,t)=>e+t,0):0),y=d(()=>m.value?new Date(m.value).toLocaleDateString(`en`,{month:`short`,year:`numeric`}):null),b=d(()=>{let e=p.value,t=``;switch(e){case`high`:t=`High risk: One contributor accounts for >75% of commits in the last 6 months`;break;case`medium`:t=`Medium risk: One contributor accounts for 50-75% of commits in the last 6 months`;break;case`low`:t=`Low risk: No single contributor dominates the codebase`;break;default:t=`Unknown: Not enough recent activity to assess`}return s.value&&(t+=` (${s.value} unique contributors)`),t});function x(e,t){return{name:`search`,query:{q:`${e} == "${t}"`}}}return(n,r)=>{let d=h(`router-link`);return g.value?(D(),l(`tr`,ot,[f(`th`,{scope:`row`,title:E(R)(`activity/commits`,`activity/contributors`,`activity/contributors/6m`,`activity/contributors/total`,`activity/status`,`activity/busFactor`,`activity/createdAt`)},`Activity`,8,st),f(`td`,null,[f(`div`,ct,[i.value?(D(),l(`div`,lt,[r[0]||=f(`i`,{class:`iconoir-git-commit`},null,-1),f(`span`,{class:`activity-label`,title:E(R)(`activity/commits`)},`Commits:`,8,ut),t(Q,{values:i.value},null,8,[`values`]),f(`span`,dt,v(_.value),1)])):o(``,!0),a.value?(D(),l(`div`,ft,[r[1]||=f(`i`,{class:`iconoir-community`},null,-1),f(`span`,{class:`activity-label`,title:E(R)(`activity/contributors`,`activity/contributors/6m`,`activity/contributors/total`)},`Contributors:`,8,pt),t(Q,{values:a.value,"color-class":`contributors-sparkline`},null,8,[`values`]),s.value?(D(),l(`span`,mt,v(s.value),1)):o(``,!0),c.value?(D(),l(`span`,ht,`(`+v(c.value)+` total)`,1)):o(``,!0)])):o(``,!0),m.value?(D(),l(`div`,gt,[r[2]||=f(`i`,{class:`iconoir-calendar`},null,-1),f(`span`,{class:`activity-label`,title:E(R)(`activity/createdAt`)},`Created:`,8,_t),f(`span`,vt,v(y.value),1)])):o(``,!0),u.value?(D(),l(`div`,yt,[r[3]||=f(`i`,{class:`iconoir-info-circle`},null,-1),f(`span`,{class:`activity-label`,title:E(R)(`activity/status`)},`Status:`,8,bt),t(d,{class:k(`activity-value status-${u.value}`),to:x(`activity/status`,u.value)},{default:e(()=>[M(v(u.value),1)]),_:1},8,[`class`,`to`])])):o(``,!0),p.value?(D(),l(`div`,xt,[r[4]||=f(`i`,{class:`iconoir-warning-triangle`},null,-1),f(`span`,{class:`activity-label`,title:E(R)(`activity/busFactor`)},`Bus Factor:`,8,St),t(d,{class:k(`activity-value bus-factor-${p.value}`),to:x(`activity/busFactor`,p.value),title:b.value},{default:e(()=>[M(v(p.value),1)]),_:1},8,[`class`,`to`,`title`])])):o(``,!0)])])])):o(``,!0)}}},[[`__scopeId`,`data-v-a2e60c62`]]),wt={key:0},Tt={key:1},Et=[`title`],Dt={class:`jira-info`},Ot=[`href`],kt={class:`jira-metric`},At={class:`jira-metric-total`},jt={class:`jira-metric`},Mt={class:`jira-metric-total`},Nt={key:0,class:`iconoir-arrow-down-circle`},Pt={key:1,class:`iconoir-arrow-up-circle`},Ft={key:2,class:`iconoir-minus-circle`},It={class:`jira-trend-text`},Lt={key:2},Rt=[`title`],zt=[`href`],Bt={key:1,class:`team-value`},Vt={key:3},Ht=[`title`],Ut={class:`team-stats`},Wt={key:0,class:`team-stat-item`},Gt={class:`team-stat-value`},Kt={key:1,class:`team-stat-item`},qt={class:`team-stat-value`},Jt={key:4},Yt=[`title`],Xt={class:`team-members`},Zt=[`href`],Qt={key:1,class:`team-member`},$t=_({__name:`TeamInfo`,props:{annotations:Object,instance:Object},setup(n){let r=n,i=d(()=>r.annotations[`team/lead`]),a=d(()=>r.annotations[`team/members`]),c=d(()=>r.annotations[`team/size`]),u=d(()=>r.annotations[`team/lead/size`]),p=d(()=>r.annotations[`team/jira`]),m=d(()=>r.annotations[`jira/projectUrl`]),g=d(()=>r.annotations[`jira/issues/created`]),_=d(()=>r.annotations[`jira/issues/resolved`]),y=d(()=>r.instance?.kind===`BusinessActor`),b=d(()=>`kind in ("ApplicationService", "ApplicationComponent") & ~> $(TechnologyArtifact: -{maintainedBy}> "${r.instance?.name||``}")`),x=d(()=>a.value?a.value.split(/,|\n/).map(e=>e.trim()).filter(Boolean):[]);function S(e){let t=e.match(/<([^>]+@[^>]+)>/);return t?t[1]:null}function C(e){return{name:`search`,query:{q:e}}}let T=d(()=>g.value?g.value.split(`,`).map(Number).reduce((e,t)=>e+t,0):0),O=d(()=>_.value?_.value.split(`,`).map(Number).reduce((e,t)=>e+t,0):0),A=d(()=>g.value?g.value.split(`,`).map(Number):[]),j=d(()=>_.value?_.value.split(`,`).map(Number):[]),N=d(()=>(A.value.length?T.value/A.value.length:0)-(j.value.length?O.value/j.value.length:0)),P=d(()=>{let e=N.value;return e<-1?`positive`:e>1?`negative`:`neutral`});return(n,r)=>{let d=h(`router-link`);return D(),l(w,null,[y.value?(D(),l(`tr`,wt,[r[1]||=f(`th`,{scope:`row`},`Owned Services`,-1),f(`td`,null,[t(d,{class:`badge badge-info`,to:C(b.value)},{default:e(()=>[...r[0]||=[M(` Show ApplicationServices & Components `,-1)]]),_:1},8,[`to`])])])):o(``,!0),p.value&&m.value?(D(),l(`tr`,Tt,[f(`th`,{scope:`row`,title:E(R)(`team/jira`,`jira/projectUrl`,`jira/issues/created`,`jira/issues/resolved`)},`Jira Project`,8,Et),f(`td`,null,[f(`div`,Dt,[f(`a`,{class:`badge badge-info`,href:m.value,target:`_blank`},v(p.value),9,Ot),g.value||_.value?(D(),l(w,{key:0},[f(`div`,kt,[r[2]||=f(`span`,{class:`jira-metric-label`},`Created (6m):`,-1),t(Q,{values:g.value,type:`created`,"color-class":`jira-created-sparkline`},null,8,[`values`]),f(`span`,At,v(T.value),1)]),f(`div`,jt,[r[3]||=f(`span`,{class:`jira-metric-label`},`Resolved (6m):`,-1),t(Q,{values:_.value,type:`resolved`,"color-class":`jira-resolved-sparkline`},null,8,[`values`]),f(`span`,Mt,v(O.value),1)]),f(`div`,{class:k([`jira-trend`,`jira-trend-${P.value}`])},[P.value===`positive`?(D(),l(`i`,Nt)):P.value===`negative`?(D(),l(`i`,Pt)):(D(),l(`i`,Ft)),f(`span`,It,v(N.value>0?`+`:``)+v(N.value.toFixed(1))+`/mo`,1)],2)],64)):o(``,!0)])])])):o(``,!0),i.value?(D(),l(`tr`,Lt,[f(`th`,{scope:`row`,title:E(R)(`team/lead`)},`Team Lead`,8,Rt),f(`td`,null,[S(i.value)?(D(),l(`a`,{key:0,class:`team-value`,href:`mailto:${S(i.value)}`},v(i.value),9,zt)):(D(),l(`span`,Bt,v(i.value),1))])])):o(``,!0),c.value||u.value?(D(),l(`tr`,Vt,[f(`th`,{scope:`row`,title:E(R)(`team/size`,`team/lead/size`)},`Team Stats`,8,Ht),f(`td`,null,[f(`div`,Ut,[u.value?(D(),l(`div`,Wt,[f(`span`,Gt,v(u.value),1),r[4]||=f(`span`,{class:`team-stat-label`},`leads`,-1)])):o(``,!0),c.value?(D(),l(`div`,Kt,[f(`span`,qt,v(c.value),1),r[5]||=f(`span`,{class:`team-stat-label`},`members`,-1)])):o(``,!0)])])])):o(``,!0),a.value?(D(),l(`tr`,Jt,[f(`th`,{scope:`row`,title:E(R)(`team/members`)},`Team Members`,8,Yt),f(`td`,null,[f(`div`,Xt,[(D(!0),l(w,null,s(x.value,e=>(D(),l(w,{key:e},[S(e)?(D(),l(`a`,{key:0,class:`team-member`,href:`mailto:${S(e)}`},v(e),9,Zt)):(D(),l(`span`,Qt,v(e),1))],64))),128))])])])):o(``,!0)],64)}}},[[`__scopeId`,`data-v-ddf2e61d`]]),en={key:0},tn=[`title`],nn={class:`deployment-types`},rn=_({__name:`DeploymentInfo`,props:{annotations:Object,kind:String},setup(t){let n=t,i=d(()=>(n.annotations[`repository/artifacts`]||`none`).split(`,`).map(e=>e.trim())),a=d(()=>i.value[0]!==`none`),c=[{key:`container`,icon:`iconoir-box`,label:`Container Image`},{key:`chart`,icon:`iconoir-packages`,label:`Helm Chart`},{key:`binary`,icon:`iconoir-terminal`,label:`Binary`},{key:`debian`,icon:`iconoir-package`,label:`Debian Package`},{key:`rpm`,icon:`iconoir-package`,label:`RPM Package`}];function u(e,t){return{name:`search`,query:{q:`${e} == "${t}"`}}}return(t,n)=>{let d=h(`router-link`);return a.value?(D(),l(`tr`,en,[f(`th`,{scope:`row`,title:E(R)(`repository/artifacts`)},`Deployment Artifacts`,8,tn),f(`td`,null,[f(`div`,nn,[(D(),l(w,null,s(c,t=>(D(),l(w,{key:t.key},[i.value.includes(t.key)?(D(),r(d,{key:0,class:`deployment-item`,to:u(`repository/artifacts`,t.key)},{default:e(()=>[f(`i`,{class:k(t.icon)},null,2),f(`strong`,null,v(t.label),1)]),_:2},1032,[`to`])):o(``,!0)],64))),64))])])])):o(``,!0)}}},[[`__scopeId`,`data-v-c57237c3`]]),an=[`title`],on={class:`workflow-platforms`},sn=[`checked`],cn=[`checked`],ln=[`checked`],un={class:`info-section-cell`,colspan:`2`},dn={open:``},fn=[`title`],pn={class:`workflow-types`},mn={class:`workflow-category`},hn=[`checked`],gn=[`checked`],_n={class:`workflow-category`},vn=[`checked`],yn=[`checked`],bn=[`checked`],xn=[`checked`],Sn={class:`workflow-category`},Cn=[`checked`],wn=[`checked`],Tn={class:`workflow-category`},En=[`checked`],Dn=[`checked`],On=_({__name:`WorkflowInfo`,props:{annotations:Object,kind:String},setup(n){let r=n,i=d(()=>(r.annotations[`workflow/platforms`]||`none`).split(`,`).map(e=>e.trim())),a=d(()=>(r.annotations[`workflow/types`]||`none`).split(`,`).map(e=>e.trim())),s=d(()=>i.value[0]!==`none`||a.value[0]!==`none`),c=d(()=>a.value.includes(`test`));function u(e,t){return{name:`search`,query:{q:`${e} == "${t}"`}}}function p(e,t){return e.includes(t)}return(n,r)=>{let d=h(`router-link`);return s.value?(D(),l(w,{key:0},[f(`tr`,null,[f(`th`,{scope:`row`,title:E(R)(`workflow/platforms`)},`CI/CD Platforms`,8,an),f(`td`,null,[f(`div`,on,[t(d,{class:`workflow-platform-item`,to:u(`workflow/platforms`,`github-actions`)},{default:e(()=>[f(`input`,{type:`checkbox`,disabled:``,checked:p(i.value,`github-actions`)},null,8,sn),r[0]||=f(`label`,null,`GitHub Actions`,-1)]),_:1},8,[`to`]),t(d,{class:`workflow-platform-item`,to:u(`workflow/platforms`,`gitlab-ci`)},{default:e(()=>[f(`input`,{type:`checkbox`,disabled:``,checked:p(i.value,`gitlab-ci`)},null,8,cn),r[1]||=f(`label`,null,`GitLab CI`,-1)]),_:1},8,[`to`]),t(d,{class:`workflow-platform-item`,to:u(`workflow/platforms`,`makefile`)},{default:e(()=>[f(`input`,{type:`checkbox`,disabled:``,checked:p(i.value,`makefile`)},null,8,ln),r[2]||=f(`label`,null,`Makefile`,-1)]),_:1},8,[`to`])])])]),f(`tr`,null,[f(`td`,un,[f(`details`,dn,[f(`summary`,{title:E(R)(`workflow/types`)},[...r[3]||=[f(`strong`,null,`Workflow Types`,-1)]],8,fn),f(`div`,pn,[f(`div`,null,[f(`div`,mn,[r[6]||=f(`strong`,null,`Build & Deploy`,-1),f(`ul`,null,[f(`li`,null,[f(`input`,{type:`checkbox`,disabled:``,checked:p(a.value,`build`)},null,8,hn),t(d,{to:u(`workflow/types`,`build`)},{default:e(()=>[...r[4]||=[M(`Build`,-1)]]),_:1},8,[`to`])]),f(`li`,null,[f(`input`,{type:`checkbox`,disabled:``,checked:p(a.value,`deploy`)},null,8,gn),t(d,{to:u(`workflow/types`,`deploy`)},{default:e(()=>[...r[5]||=[M(`Deploy`,-1)]]),_:1},8,[`to`])])])]),f(`div`,_n,[r[11]||=f(`strong`,null,`Testing`,-1),f(`ul`,null,[f(`li`,null,[f(`input`,{type:`checkbox`,disabled:``,checked:p(a.value,`test`)},null,8,vn),t(d,{to:u(`workflow/types`,`test`)},{default:e(()=>[...r[7]||=[M(`Test (generic)`,-1)]]),_:1},8,[`to`])]),f(`li`,{class:k({"grayed-out":c.value})},[f(`input`,{type:`checkbox`,disabled:``,checked:p(a.value,`unit-test`)},null,8,yn),t(d,{to:u(`workflow/types`,`unit-test`)},{default:e(()=>[...r[8]||=[M(`Unit Tests`,-1)]]),_:1},8,[`to`])],2),f(`li`,{class:k({"grayed-out":c.value})},[f(`input`,{type:`checkbox`,disabled:``,checked:p(a.value,`integration-test`)},null,8,bn),t(d,{to:u(`workflow/types`,`integration-test`)},{default:e(()=>[...r[9]||=[M(`Integration Tests`,-1)]]),_:1},8,[`to`])],2),f(`li`,{class:k({"grayed-out":c.value})},[f(`input`,{type:`checkbox`,disabled:``,checked:p(a.value,`smoke-test`)},null,8,xn),t(d,{to:u(`workflow/types`,`smoke-test`)},{default:e(()=>[...r[10]||=[M(`Smoke Tests`,-1)]]),_:1},8,[`to`])],2)])]),f(`div`,Sn,[r[14]||=f(`strong`,null,`Quality & Security`,-1),f(`ul`,null,[f(`li`,null,[f(`input`,{type:`checkbox`,disabled:``,checked:p(a.value,`lint`)},null,8,Cn),t(d,{to:u(`workflow/types`,`lint`)},{default:e(()=>[...r[12]||=[M(`Linting`,-1)]]),_:1},8,[`to`])]),f(`li`,null,[f(`input`,{type:`checkbox`,disabled:``,checked:p(a.value,`security-scan`)},null,8,wn),t(d,{to:u(`workflow/types`,`security-scan`)},{default:e(()=>[...r[13]||=[M(`Security Scan`,-1)]]),_:1},8,[`to`])])])]),f(`div`,Tn,[r[17]||=f(`strong`,null,`Automation`,-1),f(`ul`,null,[f(`li`,null,[f(`input`,{type:`checkbox`,disabled:``,checked:p(a.value,`dependency-update`)},null,8,En),t(d,{to:u(`workflow/types`,`dependency-update`)},{default:e(()=>[...r[15]||=[M(`Dependency Updates`,-1)]]),_:1},8,[`to`])]),f(`li`,null,[f(`input`,{type:`checkbox`,disabled:``,checked:p(a.value,`ticket-creation`)},null,8,Dn),t(d,{to:u(`workflow/types`,`ticket-creation`)},{default:e(()=>[...r[16]||=[M(`Ticket Creation`,-1)]]),_:1},8,[`to`])])])])])])])])])],64)):o(``,!0)}}},[[`__scopeId`,`data-v-5e906c49`]]),kn=[`title`],An={class:`info-section-cell`,colspan:`2`},jn={class:`agentic-tools`},Mn={class:`tool-item-header`},Nn=[`checked`],Pn={class:`tool-item-description`},Fn=_({__name:`AgenticTools`,props:{annotations:Object,kind:String},setup(n){let r=n,i=d(()=>(r.annotations[`agentic/tools`]||`none`).split(`,`).map(e=>e.trim())),a=d(()=>i.value[0]!==`none`),c=[{key:`claude`,icon:`iconoir-brain`,name:`Claude`,description:`Anthropic Claude API`},{key:`cursor`,icon:`iconoir-edit-pencil`,name:`Cursor`,description:`AI code editor`},{key:`aider`,icon:`iconoir-terminal`,name:`Aider`,description:`CLI pair programmer`},{key:`github-copilot`,icon:`iconoir-github`,name:`GitHub Copilot`,description:`GitHub AI assistant`},{key:`agents`,icon:`iconoir-cpu-warning`,name:`Custom Agents`,description:`Custom AI agents`}];function u(e,t){return{name:`search`,query:{q:`${e} == "${t}"`}}}return(n,r)=>{let d=h(`router-link`);return a.value?(D(),l(w,{key:0},[f(`tr`,null,[f(`th`,{scope:`row`,colspan:`2`,title:E(R)(`agentic/tools`)},[...r[0]||=[f(`i`,{class:`iconoir-cpu`},null,-1),M(` AI Coding Assistants `,-1)]],8,kn)]),f(`tr`,null,[f(`td`,An,[f(`div`,jn,[(D(),l(w,null,s(c,n=>t(d,{key:n.key,class:k([`tool-item`,{"not-implemented":!i.value.includes(n.key)}]),to:u(`agentic/tools`,n.key)},{default:e(()=>[f(`div`,Mn,[f(`input`,{type:`checkbox`,checked:i.value.includes(n.key),disabled:``},null,8,Nn),f(`i`,{class:k([n.icon,i.value.includes(n.key)?`implemented`:`not-implemented`])},null,2),f(`strong`,null,v(n.name),1)]),f(`div`,Pn,v(n.description),1)]),_:2},1032,[`class`,`to`])),64))])])])],64)):o(``,!0)}}},[[`__scopeId`,`data-v-52b7b17d`]]),In={key:0},Ln=[`title`],Rn={class:`activity-summary`},zn={class:`activity-item`},Bn={key:0,class:`activity-item`},Vn={class:`activity-value`},Hn={key:1,class:`activity-item`},Un={key:0,class:`license-details-inline`},Wn={class:`badge badge-secondary`},Gn={class:`license-overflow`},Kn=_({__name:`LicenseInfo`,props:{annotations:Object,kind:String},setup(n){let i=n,a=d(()=>i.annotations[`license/spdx`]),c=d(()=>i.annotations[`license/category`]||`unknown`),u=d(()=>i.annotations[`license/dependencies/count`]),p=d(()=>(i.annotations[`license/dependencies/ecosystems`]||``).split(`,`).map(e=>e.trim()).filter(Boolean)),m=d(()=>i.annotations[`license/dependencies/risk`]||`unknown`),g=d(()=>i.annotations[`license/dependencies/copyleft`]||`unknown`),_=d(()=>(i.annotations[`license/dependencies/licenses`]||``).split(`,`).map(e=>e.trim()).filter(Boolean)),y=d(()=>{switch(c.value){case`permissive`:return`badge-success`;case`weak-copyleft`:return`badge-warning`;case`source-available`:return`badge-warning`;case`copyleft`:return`badge-danger`;default:return`badge-secondary`}}),b=d(()=>{switch(m.value){case`low`:return`badge-success`;case`weak-copyleft`:return`badge-warning`;case`copyleft`:return`badge-danger`;default:return`badge-secondary`}}),x=d(()=>{switch(m.value){case`copyleft`:return`Copyleft dependencies (GPL, AGPL) or >50% unknown licenses`;case`weak-copyleft`:return`Weak-copyleft dependencies (LGPL, MPL) present`;case`low`:return`All dependencies have known permissive licenses`;default:return`No dependency license data available`}}),S=d(()=>_.value.filter(e=>e!==`unknown`).map(e=>({name:e,count:parseInt(i.annotations[`license/dependencies/${e}/count`]||`0`,10)})).sort((e,t)=>t.count-e.count));function C(e,t){return{name:`search`,query:{q:`${e} == "${t}"`}}}return(n,i)=>{let d=h(`router-link`);return a.value?(D(),l(`tr`,In,[f(`th`,{scope:`row`,title:E(R)(`license/spdx`,`license/category`,`license/dependencies/count`,`license/dependencies/ecosystems`,`license/dependencies/risk`,`license/dependencies/copyleft`,`license/dependencies/licenses`)},`License`,8,Ln),f(`td`,null,[f(`div`,Rn,[f(`div`,zn,[i[0]||=f(`i`,{class:`iconoir-shield-check`},null,-1),t(d,{class:k([`badge`,y.value]),to:C(`license/spdx`,a.value)},{default:e(()=>[M(v(a.value),1)]),_:1},8,[`class`,`to`]),c.value===`unknown`?o(``,!0):(D(),r(d,{key:0,class:`badge badge-outline`,to:C(`license/category`,c.value)},{default:e(()=>[M(v(c.value),1)]),_:1},8,[`to`]))]),u.value&&parseInt(u.value)>0?(D(),l(`div`,Bn,[i[2]||=f(`i`,{class:`iconoir-box`},null,-1),i[3]||=f(`span`,{class:`activity-label`},`Dependencies:`,-1),f(`span`,Vn,v(u.value),1),(D(!0),l(w,null,s(p.value,t=>(D(),r(d,{key:t,class:`badge badge-info`,to:C(`license/dependencies/ecosystems`,t)},{default:e(()=>[M(v(t),1)]),_:2},1032,[`to`]))),128)),t(d,{class:k([`badge`,b.value]),title:x.value,to:C(`license/dependencies/risk`,m.value)},{default:e(()=>[M(`Risk: `+v(m.value),1)]),_:1},8,[`class`,`title`,`to`]),g.value===`true`?(D(),r(d,{key:0,class:`badge badge-warning`,to:C(`license/dependencies/copyleft`,`true`)},{default:e(()=>[...i[1]||=[M(`Copyleft present`,-1)]]),_:1},8,[`to`])):o(``,!0)])):o(``,!0),S.value.length?(D(),l(`div`,Hn,[i[4]||=f(`i`,{class:`iconoir-list`},null,-1),i[5]||=f(`span`,{class:`activity-label`},`Types:`,-1),(D(!0),l(w,null,s(S.value.slice(0,5),t=>(D(),r(d,{key:t.name,class:`badge badge-outline`,to:C(`license/dependencies/licenses`,t.name)},{default:e(()=>[M(v(t.count>0?`${t.name} (${t.count})`:t.name),1)]),_:2},1032,[`to`]))),128)),S.value.length>5?(D(),l(`details`,Un,[f(`summary`,Wn,`+`+v(S.value.length-5)+` more`,1),f(`div`,Gn,[(D(!0),l(w,null,s(S.value.slice(5),t=>(D(),r(d,{key:t.name,class:`badge badge-outline`,to:C(`license/dependencies/licenses`,t.name)},{default:e(()=>[M(v(t.count>0?`${t.name} (${t.count})`:t.name),1)]),_:2},1032,[`to`]))),128))])])):o(``,!0)])):o(``,!0)])])])):o(``,!0)}}},[[`__scopeId`,`data-v-126f0fee`]]),qn={key:0},Jn=[`title`],Yn={__name:`ExternalLinks`,props:{annotations:Object},setup(e){let n=e,r=d(()=>Object.fromEntries(Object.entries(n.annotations).filter(([e])=>e.startsWith(`link/`)).map(([e,t])=>[e.slice(5),t])));return(e,n)=>Object.keys(r.value).length?(D(),l(`tr`,qn,[f(`th`,{scope:`row`,title:E(R)(`link/<name>`)},`Links`,8,Jn),f(`td`,null,[t(U,{links:r.value},null,8,[`links`])])])):o(``,!0)}},Xn={"component/type":{executable:`play`,library:`book-stack`,module:`box-3d-three-points`,plugin:`plug-type-a`,frontend:`web-window`,other:`code-brackets`},"component/role":{service:`cloud-sync`,cli:`terminal`,job:`timer`,operator:`settings`,agent:`cpu`}},Zn={"architecture/kind":`Architecture style`,"architecture/size":`Architecture size`},Qn=[`architecture/aliases`,`component/type`,`component/role`,`architecture/kind`,`architecture/size`,`architecture/tags`];function $n(e,t){return Xn[e]?.[t]||null}function er(e){return Zn[e]||null}var tr={class:`chip-group`},nr={key:1,class:`chip-namespace`},$={__name:`TagChips`,props:{kind:{type:String,required:!0},annotationKey:{type:String,required:!0},values:{type:Array,required:!0},linked:{type:Boolean,default:!0}},setup(t){let n=t,i={planned:`chip-info`,deprecated:`chip-warning`,sunset:`chip-danger`,"end-of-life":`chip-danger`},a=/^([a-z][a-z0-9-]*):(.+)$/i;function c(e){return String(e).replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}let u=d(()=>n.values.map(e=>{let t=a.exec(e);return{value:e,namespace:t?t[1]:null,label:t?t[2]:e,symbol:$n(n.annotationKey,e),tone:n.annotationKey===`lifecycle/status`&&i[e]||null,to:{name:`search`,query:A(`${n.kind}: ${n.annotationKey} == "${c(e)}"`)}}}));return(n,i)=>(D(),l(`span`,tr,[(D(!0),l(w,null,s(u.value,n=>(D(),r(g(t.linked?`router-link`:`span`),{key:n.value,class:k([`chip`,n.tone]),to:t.linked?n.to:void 0,title:t.linked?`Show ${t.kind} resources with ${t.annotationKey} = ${n.value}`:void 0},{default:e(()=>[n.symbol?(D(),l(`i`,{key:0,class:k(`iconoir-${n.symbol} icon-application chip-symbol`),"aria-hidden":`true`},null,2)):o(``,!0),n.namespace?(D(),l(`span`,nr,v(n.namespace),1)):o(``,!0),f(`span`,null,v(n.label),1)]),_:2},1032,[`class`,`to`,`title`]))),128))]))}},rr={key:0},ir=[`title`],ar={class:`lifecycle-info`},or=[`title`],sr=_({__name:`LifecycleInfo`,props:{annotations:Object,kind:String,links:{type:Object,default:()=>({})},incoming:{type:Number,default:0}},setup(t){let n=t,i=[`deprecated`,`sunset`,`end-of-life`],a=d(()=>n.annotations[`lifecycle/status`]),s=d(()=>n.annotations[`lifecycle/replacedBy`]),c=d(()=>n.links?.[`lifecycle/replacedBy`]||null),u=d(()=>i.includes(a.value)&&n.incoming>0);return(n,i)=>{let d=h(`router-link`);return a.value||s.value?(D(),l(`tr`,rr,[f(`th`,{scope:`row`,title:E(R)(`lifecycle/status`)},`Lifecycle`,8,ir),f(`td`,null,[f(`div`,ar,[a.value?(D(),r($,{key:0,kind:t.kind,"annotation-key":`lifecycle/status`,values:[a.value]},null,8,[`kind`,`values`])):o(``,!0),s.value?(D(),l(`span`,{key:1,class:`lifecycle-replaced`,title:E(R)(`lifecycle/replacedBy`)},[i[0]||=f(`i`,{class:`iconoir-arrow-right`,"aria-hidden":`true`},null,-1),i[1]||=M(` replaced by `,-1),c.value?(D(),r(d,{key:0,to:c.value},{default:e(()=>[M(v(s.value),1)]),_:1},8,[`to`])):(D(),l(w,{key:1},[M(v(s.value),1)],64))],8,or)):o(``,!0),u.value?(D(),r(d,{key:2,class:`lifecycle-incoming`,to:{hash:`#incoming`}},{default:e(()=>[M(v(t.incoming)+` incoming `,1)]),_:1})):o(``,!0)])])])):o(``,!0)}}},[[`__scopeId`,`data-v-6c14f599`]]),cr=[`title`],lr=[`innerHTML`],ur=[`href`],dr={__name:`AnnotationRow`,props:{annotationKey:String,value:[String,Number,Boolean],kind:String,format:{type:String,default:null}},setup(e){let t=e,n=j(null);H(n);let i=d(()=>{let e=er(t.annotationKey);if(e)return e;let n=t.annotationKey.split(`/`);return n[n.length-1].replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/^./,e=>e.toUpperCase())}),a=d(()=>typeof t.value==`string`&&/^https?:\/\//.test(t.value)),o=d(()=>t.format!==`identifier`||t.value==null?[]:String(t.value).split(`,`).map(e=>e.trim()).filter(Boolean)),s=d(()=>{if(![`tag_list`,`tag_word`].includes(t.format)||t.value==null)return[];let e=String(t.value);return t.format===`tag_list`?e.split(`,`).map(e=>e.trim()).filter(Boolean):[e]});return(t,c)=>(D(),l(`tr`,null,[f(`th`,{scope:`row`,title:E(R)(e.annotationKey)},v(i.value),9,cr),f(`td`,null,[e.format===`markdown`?(D(),l(`div`,{key:0,ref_key:`mdEl`,ref:n,innerHTML:e.value},null,8,lr)):o.value.length?(D(),r($,{key:1,kind:e.kind,"annotation-key":e.annotationKey,values:o.value,linked:!1},null,8,[`kind`,`annotation-key`,`values`])):s.value.length?(D(),r($,{key:2,kind:e.kind,"annotation-key":e.annotationKey,values:s.value},null,8,[`kind`,`annotation-key`,`values`])):(D(),l(w,{key:3},[a.value?(D(),l(`a`,{key:0,href:e.value,target:`_blank`},v(e.value),9,ur)):(D(),l(w,{key:1},[M(v(e.value),1)],64))],64))])]))}},fr={class:`instance-title-text`},pr={class:`instance-name`},mr={class:`instance-kind-subtitle`},hr={key:0,class:`generated-badge`},gr={class:`generated-script`},_r={key:0,class:`generated-time`},vr={class:`header-actions`},yr={key:0,class:`view-pager`,role:`group`,"aria-label":`Diagram view`},br=[`aria-pressed`],xr=[`aria-pressed`],Sr=[`innerHTML`],Cr={class:`graph-options`},wr={role:`group`,"aria-label":`Graph depth`},Tr=[`aria-pressed`,`title`,`onClick`],Er={role:`group`,"aria-label":`Graph layers`},Dr=[`aria-pressed`,`aria-label`,`disabled`,`title`,`onClick`],Or=[`innerHTML`],kr={key:3,class:`graph-too-large`},Ar=[`innerHTML`],jr={class:`documentation`},Mr=_({__name:`InstanceDetail`,props:{data:Object,kind:String,kindMeta:Object},setup(n){let a=n,g=j(``),_=j(null),x=j(null),A=!1,I=null,L=[1,2,3,null],R=S,z=e=>`${O.find(t=>t.id===e)?.title||e} layer`;function ee(e,t,n){try{let r=localStorage.getItem(e),i=r===null?t:JSON.parse(r);return n.includes(i)?i:t}catch{return t}}function ne(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}let B=j(ee(`archsight.graphDepth`,2,L)),V=j([...a.data.graph_layers||R]);async function se(e){B.value=e,ne(`archsight.graphDepth`,e),A=!1,await Z()}async function ce(e){let t=V.value.includes(e);t&&V.value.length===1||(V.value=t?V.value.filter(t=>t!==e):R.filter(t=>t===e||V.value.includes(t)),A=!1,await Z())}let U=j(null);H(U);let{embeds:le,scanEmbeds:de}=oe(),fe=j(null);H(fe);let W=d(()=>a.data.metadata?.annotations||{}),G=d(()=>Object.keys(a.data.relations||{}).length>0),pe=d(()=>{let e=a.data.references||{};return G.value||Object.keys(e).length>0}),K=d(()=>W.value[`generated/script`]),me=d(()=>W.value[`generated/at`]),q=d(()=>W.value[`architecture/description`]),J=d(()=>a.data.diagram||``),Y=j(a.data.diagram?`diagram`:`graph`),he=[[`go`,`Go`],[`python`,`Python`],[`java`,`Java`],[`typescript`,`TypeScript`],[`javascript`,`JavaScript`],[`rust`,`Rust`],[`ruby`,`Ruby`],[`crystal`,`Crystal`],[`cpp`,`C++`],[`csharp`,`C#`],[`zig`,`Zig`],[`elixir`,`Elixir`]],ge=d(()=>{let e=he.filter(([e])=>W.value[`architecture/${e}/modules`]).map(([e,t])=>({label:`${t} Module Structure`,dot:W.value[`architecture/${e}/modules`]}));return!e.length&&W.value[`architecture/modules`]&&e.push({label:`Module Structure`,dot:W.value[`architecture/modules`]}),e}),_e=[`scc/language/`,`repository/artifacts/`,`link/`,`team/`,`jira/`,`generated/`,`license/`],ve=new Set([`scc/languages`,`architecture/description`,`architecture/diagram`,`architecture/modules`,`workflow/platforms`,`workflow/types`,`agentic/tools`,`repository/artifacts`,`repository/git`,`repository/visibility`,`lifecycle/status`,`lifecycle/replacedBy`,`component/dependents`]),ye=[/^scc\/estimated(Cost|ScheduleMonths|People)$/,/^activity\/(commits|contributors(\/.*)?|status|busFactor|createdAt)$/,/^scc\/language\/.+\/loc$/,/^repository\/$/,/^architecture\/.+\/modules$/],be=d(()=>{let e=new Set;for(let[t,n]of Object.entries(a.data.references||{}))for(let r of Object.values(n))r.forEach(n=>e.add(`${t}/${n}`));return e.size}),Se=d(()=>{let e=e=>{let t=Qn.indexOf(e);return t===-1?Qn.length:t};return Object.entries(W.value).filter(([e])=>!(ve.has(e)||_e.some(t=>e.startsWith(t))||ye.some(t=>t.test(e)))).sort(([t],[n])=>e(t)-e(n))});async function Z(){if(A||!G.value)return;A=!0;let e=await b(a.kind,a.data.name,{depth:B.value,layers:V.value});I?.destroy(),I=null,g.value=e?await N(e):``,await m(),Te()}async function we(e){Y.value=e,e===`graph`&&await Z()}i(async()=>{Y.value===`graph`&&await Z(),await m(),U.value&&(ie(U.value),re(U.value),de(U.value))}),p(q,async()=>{await m(),U.value&&(ie(U.value),re(U.value),de(U.value))}),c(()=>{I?.destroy()});function Te(){if(!_.value)return;let e=_.value.querySelector(`svg`);e&&(I=P(e,_.value,{fullscreenTarget:x.value}))}return(i,a)=>{let c=h(`router-link`);return D(),l(w,null,[f(`article`,null,[f(`header`,null,[f(`h2`,null,[n.kindMeta?(D(),l(`i`,{key:0,class:k(`iconoir-${n.kindMeta.icon} icon-${n.kindMeta.layer}`)},null,2)):o(``,!0),f(`div`,fr,[f(`span`,pr,v(E(F)(n.data.name,n.kind)),1),f(`span`,mr,v(n.kind),1)])]),K.value?(D(),l(`div`,hr,[f(`span`,gr,[a[2]||=M(` by `,-1),t(c,{to:{name:`instance`,params:{kind:`Import`,instance:K.value}}},{default:e(()=>[M(v(K.value),1)]),_:1},8,[`to`])]),me.value?(D(),l(`span`,_r,` generated `+v(E(te)(me.value)),1)):o(``,!0)])):o(``,!0),f(`div`,vr,[t(ue,{kind:n.kind,name:n.data.name},null,8,[`kind`,`name`]),K.value?o(``,!0):(D(),r(c,{key:0,class:`btn-header`,to:`/kinds/${n.kind}/instances/${n.data.name}/edit`,title:`Edit this resource`},{default:e(()=>[...a[3]||=[f(`i`,{class:`iconoir-edit-pencil`},null,-1),M(` Edit `,-1)]]),_:1},8,[`to`]))])]),J.value&&G.value?(D(),l(`div`,yr,[f(`button`,{type:`button`,class:k([`outline`,{secondary:Y.value!==`diagram`}]),"aria-pressed":Y.value===`diagram`,onClick:a[0]||=e=>we(`diagram`)},[...a[4]||=[f(`i`,{class:`iconoir-developer`},null,-1),M(` Diagram `,-1)]],10,br),f(`button`,{type:`button`,class:k([`outline`,{secondary:Y.value!==`graph`}]),"aria-pressed":Y.value===`graph`,onClick:a[1]||=e=>we(`graph`)},[...a[5]||=[f(`i`,{class:`iconoir-graph-up`},null,-1),M(` Dependencies `,-1)]],10,xr)])):o(``,!0),J.value?y((D(),l(`div`,{key:1,ref_key:`diagramEl`,ref:fe,class:`asd-diagram-wrap`,innerHTML:J.value},null,8,Sr)),[[T,Y.value===`diagram`]]):o(``,!0),G.value&&g.value?y((D(),l(`div`,{key:2,ref_key:`graphBox`,ref:x,class:`graph-container`},[f(`div`,Cr,[a[6]||=f(`i`,{class:`iconoir-depth`,title:`Depth: how many steps the graph follows`},null,-1),f(`div`,wr,[(D(),l(w,null,s(L,e=>f(`button`,{key:String(e),type:`button`,class:k({outline:B.value!==e,secondary:B.value!==e}),"aria-pressed":B.value===e,title:e?`Depth ${e}: ${e} step${e>1?`s`:``} from here`:`Depth: all the way`,onClick:t=>se(e)},v(e??`All`),11,Tr)),64))]),a[7]||=f(`i`,{class:`iconoir-color-filter`,title:`Layers the graph follows`},null,-1),f(`div`,Er,[(D(!0),l(w,null,s(E(R),e=>(D(),l(`button`,{key:e,type:`button`,class:k([`layer-toggle`,{outline:!V.value.includes(e),secondary:!V.value.includes(e)}]),"aria-pressed":V.value.includes(e),"aria-label":z(e),disabled:V.value.length===1&&V.value.includes(e),title:`${z(e)}: ${V.value.includes(e)?`shown, click to hide`:`hidden, click to show`}`,onClick:t=>ce(e)},[f(`span`,{class:`layer-swatch`,style:C({background:`var(--layer-${e}-fill, var(--pico-muted-border-color))`})},null,4)],10,Dr))),128))])]),f(`div`,{id:`graphviz`,ref_key:`graphEl`,ref:_,class:`canvas`,innerHTML:g.value},null,8,Or)],512)),[[T,Y.value===`graph`]]):pe.value&&!G.value&&!J.value?(D(),l(`p`,kr,[...a[8]||=[f(`i`,{class:`iconoir-graph-up`},null,-1),M(` No outgoing dependencies — graph omitted `,-1)]])):o(``,!0),q.value?(D(),l(`div`,{key:4,ref_key:`descEl`,ref:U,innerHTML:q.value,class:k([`prose`,{footer:pe.value}])},null,10,Ar)):o(``,!0),(D(!0),l(w,null,s(E(le),e=>(D(),r(u,{key:e.key,to:e.el},[t(ae,{kind:e.kind,name:e.name,spec:e.spec},null,8,[`kind`,`name`,`spec`])],8,[`to`]))),128))]),(D(!0),l(w,null,s(ge.value,e=>(D(),r(xe,{key:e.label,dot:e.dot,label:e.label},null,8,[`dot`,`label`]))),128)),t(Ce,{data:n.data},null,8,[`data`]),f(`article`,jr,[a[9]||=f(`header`,null,[f(`h2`,null,`Details`)],-1),f(`table`,null,[f(`tbody`,null,[t(ke,{annotations:W.value},null,8,[`annotations`]),t(ze,{annotations:W.value,kind:n.kind},null,8,[`annotations`,`kind`]),t(Ye,{annotations:W.value},null,8,[`annotations`]),t(it,{annotations:W.value},null,8,[`annotations`]),t(Ct,{annotations:W.value,kind:n.kind},null,8,[`annotations`,`kind`]),t($t,{annotations:W.value,instance:n.data},null,8,[`annotations`,`instance`]),t(rn,{annotations:W.value,kind:n.kind},null,8,[`annotations`,`kind`]),t(On,{annotations:W.value,kind:n.kind},null,8,[`annotations`,`kind`]),t(Fn,{annotations:W.value,kind:n.kind},null,8,[`annotations`,`kind`]),t(Kn,{annotations:W.value,kind:n.kind},null,8,[`annotations`,`kind`]),t(Yn,{annotations:W.value},null,8,[`annotations`]),t(sr,{annotations:W.value,kind:n.kind,links:n.data.annotation_links,incoming:be.value},null,8,[`annotations`,`kind`,`links`,`incoming`]),(D(!0),l(w,null,s(Se.value,([e,t])=>(D(),r(dr,{key:e,"annotation-key":e,value:t,kind:n.kind,format:n.data.annotation_formats?.[e]||null},null,8,[`annotation-key`,`value`,`kind`,`format`]))),128))])])]),t(X,{data:n.data},null,8,[`data`])],64)}}},[[`__scopeId`,`data-v-fc508dab`]]),Nr={class:`view-header`},Pr={class:`instance-title-text`},Fr={class:`instance-name`},Ir={class:`header-actions`},Lr=[`innerHTML`],Rr={key:1,class:`view-query-display`},zr={class:`query-item`},Br={class:`query-value`},Vr={key:1},Hr=_({__name:`ViewDetail`,props:{data:Object,kindMeta:Object},setup(e){let n=e,i=d(()=>n.data.metadata?.annotations||{}),a=d(()=>se(i.value)),s=d(()=>a.value.query),c=d(()=>i.value[`architecture/description`]),u=d(()=>a.value.fields),p=d(()=>a.value.sort),m=d(()=>a.value.showKind),h=j(null);return H(h),(n,i)=>(D(),l(w,null,[f(`article`,Nr,[f(`header`,null,[f(`h2`,null,[e.kindMeta?(D(),l(`i`,{key:0,class:k(`iconoir-${e.kindMeta.icon} icon-${e.kindMeta.layer}`)},null,2)):o(``,!0),f(`div`,Pr,[f(`span`,Fr,v(E(F)(e.data.name,`View`)),1),i[0]||=f(`span`,{class:`instance-kind-subtitle`},`View`,-1)])]),f(`div`,Ir,[t(ue,{kind:`View`,name:e.data.name},null,8,[`name`])])]),c.value?(D(),l(`div`,{key:0,ref_key:`descEl`,ref:h,class:`description-box prose`,innerHTML:c.value},null,8,Lr)):o(``,!0),s.value?(D(),l(`div`,Rr,[f(`p`,zr,[i[1]||=f(`span`,{class:`label`},`Query:`,-1),f(`code`,Br,v(s.value),1)])])):o(``,!0)]),s.value?(D(),r(ne,{key:0,query:s.value,fields:u.value,sort:p.value,"show-kind":m.value},null,8,[`query`,`fields`,`sort`,`show-kind`])):o(``,!0),s.value?o(``,!0):(D(),l(`article`,Vr,[...i[2]||=[f(`p`,{class:`view-empty-state`},[f(`em`,null,`No query defined`)],-1)]]))],64))}},[[`__scopeId`,`data-v-1c2b385e`]]),Ur={components:{RelationsGrid:X,AnalysisResults:B,EmbedButton:ue},props:{data:Object,kindMeta:Object},setup(e){let t=d(()=>e.data.metadata?.annotations||{}),n=d(()=>t.value[`analysis/description`]),r=d(()=>t.value[`architecture/description`]),i=d(()=>t.value[`analysis/script`]),a=j(null);H(a);let o=j(null);return H(o),{annotations:t,summary:n,description:r,analysisScript:i,descEl:a,summaryEl:o,displayName:F}}},Wr={class:`analysis-header`},Gr={class:`instance-title-text`},Kr={class:`instance-name`},qr={class:`header-actions`},Jr=[`innerHTML`],Yr=[`innerHTML`],Xr={key:1};function Zr(n,i,a,s,c,u){let d=h(`EmbedButton`),p=h(`router-link`),m=h(`AnalysisResults`),g=h(`RelationsGrid`);return D(),l(w,null,[f(`article`,Wr,[f(`header`,null,[f(`h2`,null,[a.kindMeta?(D(),l(`i`,{key:0,class:k(`iconoir-${a.kindMeta.icon} icon-${a.kindMeta.layer}`)},null,2)):o(``,!0),f(`div`,Gr,[f(`span`,Kr,v(s.displayName(a.data.name,`Analysis`)),1),i[0]||=f(`span`,{class:`instance-kind-subtitle`},`Analysis`,-1)])]),f(`div`,qr,[t(d,{kind:`Analysis`,name:a.data.name},null,8,[`name`]),t(p,{class:`btn-header`,to:`/kinds/Analysis/instances/${a.data.name}/edit`,title:`Edit this resource`},{default:e(()=>[...i[1]||=[f(`i`,{class:`iconoir-edit-pencil`},null,-1),M(` Edit `,-1)]]),_:1},8,[`to`])])]),s.summary?(D(),l(`div`,{key:0,ref:`summaryEl`,class:`analysis-summary prose`,innerHTML:s.summary},null,8,Jr)):o(``,!0),s.description?(D(),l(`div`,{key:1,ref:`descEl`,class:`description-box prose`,innerHTML:s.description},null,8,Yr)):o(``,!0)]),s.analysisScript?(D(),r(m,{key:0,name:a.data.name},null,8,[`name`])):(D(),l(`article`,Xr,[...i[2]||=[f(`p`,{class:`analysis-empty-state`},[f(`i`,{class:`iconoir-warning-triangle`}),M(` No script defined for this analysis. `)],-1)]])),t(g,{data:a.data},null,8,[`data`])],64)}var Qr=_(Ur,[[`render`,Zr],[`__scopeId`,`data-v-a10d9499`]]),$r={class:`import-header`},ei={class:`instance-title-text`},ti={class:`instance-name`},ni={class:`header-actions`},ri={key:0,class:`badge badge-primary`},ii={key:1,class:`badge badge-warning`},ai=[`innerHTML`],oi={key:0,class:`graph-container`},si=[`innerHTML`],ci={key:1,class:`graph-too-large`},li={key:2,class:`graph-too-large`},ui={class:`import-configuration`},di={class:`import-metadata`},fi={key:0,class:`import-meta-item`},pi={key:1,class:`import-meta-item`},mi={key:2,class:`import-meta-item`},hi={key:3,class:`import-meta-item status-enabled`},gi={key:4,class:`import-meta-item status-disabled`},_i={key:0,class:`import-output-path`},vi={key:1,class:`import-config-section`,open:``},yi={class:`import-config-table`},bi={scope:`row`},xi={key:0},Si=_({__name:`ImportDetail`,props:{data:Object,kindMeta:Object},setup(n){let r=n,a=j(``),u=j(null),p=null,g=j(null);H(g);let _=d(()=>r.data.metadata?.annotations||{}),y=d(()=>_.value[`import/handler`]),x=d(()=>_.value[`import/enabled`]!==`false`),S=d(()=>_.value[`import/cacheTime`]),C=d(()=>_.value[`import/priority`]),T=d(()=>_.value[`import/outputPath`]),O=d(()=>_.value[`architecture/description`]),A=d(()=>Object.entries(_.value).filter(([e])=>e.startsWith(`import/config/`)).map(([e,t])=>[e.replace(`import/config/`,``),t])),I=d(()=>{let e=r.data.relations||{};return Object.values(e).reduce((e,t)=>typeof t==`object`?e+Object.values(t).reduce((e,t)=>e+(Array.isArray(t)?t.length:0),0):e,0)}),L=d(()=>Object.keys(r.data.relations||{}).length>0),R=d(()=>{let e=r.data.references||{};return L.value||Object.keys(e).length>0}),z=d(()=>I.value>=50);i(async()=>{if(L.value&&!z.value){let e=await b(`Import`,r.data.name);a.value=e?await N(e):``,await m(),ee()}}),c(()=>{p?.destroy()});function ee(){if(!u.value)return;let e=u.value.querySelector(`svg`);e&&(p=P(e,u.value))}function te(e){return typeof e==`string`?e.startsWith(`http`)||e.startsWith(`git@`)||e.startsWith(`file://`):!1}return(r,i)=>{let c=h(`router-link`);return D(),l(w,null,[f(`article`,$r,[f(`header`,null,[f(`h2`,null,[n.kindMeta?(D(),l(`i`,{key:0,class:k(`iconoir-${n.kindMeta.icon} icon-${n.kindMeta.layer}`)},null,2)):o(``,!0),f(`div`,ei,[f(`span`,ti,v(E(F)(n.data.name,`Import`)),1),i[0]||=f(`span`,{class:`instance-kind-subtitle`},`Import`,-1)])]),f(`div`,ni,[y.value?(D(),l(`span`,ri,v(y.value),1)):o(``,!0),x.value?o(``,!0):(D(),l(`span`,ii,`Disabled`)),t(c,{class:`btn-header`,to:`/kinds/Import/instances/${n.data.name}/edit`,title:`Edit this resource`},{default:e(()=>[...i[1]||=[f(`i`,{class:`iconoir-edit-pencil`},null,-1),M(` Edit `,-1)]]),_:1},8,[`to`])])]),O.value?(D(),l(`div`,{key:0,ref_key:`descEl`,ref:g,class:`description-box prose`,innerHTML:O.value},null,8,ai)):o(``,!0),R.value?(D(),l(w,{key:1},[L.value&&!z.value&&a.value?(D(),l(`div`,oi,[f(`div`,{id:`graphviz`,ref_key:`graphEl`,ref:u,class:`canvas`,innerHTML:a.value},null,8,si)])):z.value?(D(),l(`p`,ci,[i[2]||=f(`i`,{class:`iconoir-warning-triangle`},null,-1),M(` Graph too large to display (`+v(I.value)+` relations) `,1)])):L.value?o(``,!0):(D(),l(`p`,li,[...i[3]||=[f(`i`,{class:`iconoir-graph-up`},null,-1),M(` No outgoing dependencies — graph omitted `,-1)]]))],64)):o(``,!0)]),f(`article`,ui,[i[11]||=f(`header`,null,[f(`h3`,null,[f(`i`,{class:`iconoir-settings`}),M(` Configuration`)])],-1),f(`div`,di,[y.value?(D(),l(`span`,fi,[i[4]||=f(`i`,{class:`iconoir-code`},null,-1),M(` `+v(y.value),1)])):o(``,!0),S.value?(D(),l(`span`,pi,[i[5]||=f(`i`,{class:`iconoir-timer`},null,-1),M(` `+v(S.value),1)])):o(``,!0),C.value?(D(),l(`span`,mi,[i[6]||=f(`i`,{class:`iconoir-sort-down`},null,-1),M(` Priority: `+v(C.value),1)])):o(``,!0),x.value?(D(),l(`span`,hi,[...i[7]||=[f(`i`,{class:`iconoir-check-circle`},null,-1),M(` Enabled `,-1)]])):(D(),l(`span`,gi,[...i[8]||=[f(`i`,{class:`iconoir-xmark-circle`},null,-1),M(` Disabled `,-1)]]))]),T.value?(D(),l(`div`,_i,[i[9]||=f(`strong`,null,`Output:`,-1),f(`code`,null,v(T.value),1)])):o(``,!0),A.value.length?(D(),l(`details`,vi,[i[10]||=f(`summary`,null,[f(`i`,{class:`iconoir-list`}),M(` Handler Settings `)],-1),f(`table`,yi,[f(`tbody`,null,[(D(!0),l(w,null,s(A.value,([e,t])=>(D(),l(`tr`,{key:e},[f(`th`,bi,v(e),1),f(`td`,null,[te(t)?(D(),l(`code`,xi,v(t),1)):(D(),l(w,{key:1},[M(v(t),1)],64))])]))),128))])])])):o(``,!0)]),t(X,{data:n.data},null,8,[`data`])],64)}}},[[`__scopeId`,`data-v-f0340aef`]]),Ci={class:`page-actions`},wi={class:`page-resource`},Ti={__name:`PageDetail`,props:{data:Object,kindMeta:Object},setup(n){return(r,i)=>{let a=h(`router-link`);return D(),l(w,null,[t(ce,{name:n.data.name},{actions:e(()=>[f(`div`,Ci,[f(`span`,wi,[n.kindMeta?(D(),l(`i`,{key:0,class:k(`iconoir-${n.kindMeta.icon} icon-${n.kindMeta.layer}`)},null,2)):o(``,!0),i[0]||=M(` Page `,-1),f(`code`,null,v(E(F)(n.data.name,`Page`)),1)]),t(a,{class:`btn-header`,to:{name:`page`,params:{name:n.data.name}},title:`Open in the handbook tree`},{default:e(()=>[...i[1]||=[f(`i`,{class:`iconoir-book`},null,-1),M(` Open in handbook `,-1)]]),_:1},8,[`to`]),t(a,{class:`btn-header`,to:`/kinds/Page/instances/${encodeURIComponent(n.data.name)}/edit`,title:`Edit this page`},{default:e(()=>[...i[2]||=[f(`i`,{class:`iconoir-edit-pencil`},null,-1),M(` Edit `,-1)]]),_:1},8,[`to`])])]),_:1},8,[`name`]),t(X,{data:n.data},null,8,[`data`])],64)}}},Ei={key:0},Di={key:1},Oi={__name:`InstanceRouter`,props:{kind:String,instance:String},setup(e){let t=e,i=n(),s=a(`kinds`),c=j(null),u=j(!0),d=j(null);async function m(){u.value=!0,d.value=null;try{c.value=await x(t.kind,t.instance);let e=c.value.kind||t.kind,n=c.value.name||t.instance;(e!==t.kind||n!==t.instance)&&i.replace({name:`instance`,params:{kind:e,instance:n}})}catch(e){d.value=e.message}finally{u.value=!1}}p(()=>[t.kind,t.instance],m,{immediate:!0});function h(){return s.value?s.value.kinds.find(e=>e.kind===t.kind):null}return(t,n)=>u.value?(D(),l(`article`,Ei,[...n[0]||=[f(`p`,null,`Loading...`,-1)]])):d.value?(D(),l(`article`,Di,[n[4]||=f(`header`,null,[f(`h2`,null,`Not Found`)],-1),f(`p`,null,[n[1]||=M(`Instance `,-1),f(`strong`,null,v(e.instance),1),n[2]||=M(` of kind `,-1),f(`strong`,null,v(e.kind),1),n[3]||=M(` was not found.`,-1)])])):c.value?(D(),l(w,{key:2},[e.kind===`View`?(D(),r(Hr,{key:0,data:c.value,"kind-meta":h()},null,8,[`data`,`kind-meta`])):e.kind===`Analysis`?(D(),r(Qr,{key:1,data:c.value,"kind-meta":h()},null,8,[`data`,`kind-meta`])):e.kind===`Import`?(D(),r(Si,{key:2,data:c.value,"kind-meta":h()},null,8,[`data`,`kind-meta`])):e.kind===`Page`?(D(),r(Ti,{key:3,data:c.value,"kind-meta":h()},null,8,[`data`,`kind-meta`])):(D(),r(Mr,{key:4,data:c.value,kind:e.kind,"kind-meta":h()},null,8,[`data`,`kind`,`kind-meta`]))],64)):o(``,!0)}};export{Oi as default};
|