@adanami/kaleido 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +104 -0
- package/dist/cli/index.js +1489 -0
- package/dist/client/assets/abap-08VXUWAP.js +1 -0
- package/dist/client/assets/abnfDiagram-N423BO3Z-BNC_bOwN.js +1 -0
- package/dist/client/assets/apex-BWPQTe0t.js +1 -0
- package/dist/client/assets/arc-BQjVBT7z.js +1 -0
- package/dist/client/assets/architecture-TIHT7OUA-rtiyad39.js +1 -0
- package/dist/client/assets/architectureDiagram-T3A2C74G-NbyTzj4B.js +36 -0
- package/dist/client/assets/array-BifhSqXX.js +1 -0
- package/dist/client/assets/azcli-Bc_sGQ0U.js +1 -0
- package/dist/client/assets/bat-i0X4ZdIN.js +1 -0
- package/dist/client/assets/bicep-B5-_aFwp.js +2 -0
- package/dist/client/assets/blockDiagram-VBNYF7ZC-D7RFrUDl.js +132 -0
- package/dist/client/assets/c4Diagram-5PPSVZJV-CVtHbZ8m.js +10 -0
- package/dist/client/assets/cameligo-DMUM7wLl.js +1 -0
- package/dist/client/assets/channel-Cg-CR3Kv.js +1 -0
- package/dist/client/assets/chunk-2GRJ4B5K-vymlEdvz.js +1 -0
- package/dist/client/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
- package/dist/client/assets/chunk-4I5QYGJK-Dru7MVd5.js +1 -0
- package/dist/client/assets/chunk-5RXB4S5H-_mW4jXZD.js +231 -0
- package/dist/client/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
- package/dist/client/assets/chunk-6Q2QTUOP-C-Jr6Q1u.js +88 -0
- package/dist/client/assets/chunk-7BUUIJ7U-Bb538aSH.js +1 -0
- package/dist/client/assets/chunk-7Z6QIM7H-CH0etl6L.js +10 -0
- package/dist/client/assets/chunk-GF5L2VYU-l0ZYrFWn.js +206 -0
- package/dist/client/assets/chunk-I66GZJ75-CKcp5S17.js +127 -0
- package/dist/client/assets/chunk-JQJVKLGR-BXKeK8Yn.js +156 -0
- package/dist/client/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
- package/dist/client/assets/chunk-KBJHAD2P-DPP8q1jj.js +1 -0
- package/dist/client/assets/chunk-KEIR6QF5-BICK3FdT.js +161 -0
- package/dist/client/assets/chunk-NSK5VX7P-CJvQSFjo.js +2 -0
- package/dist/client/assets/chunk-QR6OTTB3-DAmoW-jk.js +62 -0
- package/dist/client/assets/chunk-RYQCIY6F-mEV_z1Vs.js +1 -0
- package/dist/client/assets/chunk-UBXNYLIW-B9FQ3EVs.js +1 -0
- package/dist/client/assets/chunk-W5SLKNZC-B7q4L6_i.js +1 -0
- package/dist/client/assets/chunk-WRU74C26-DwPGHVIY.js +70 -0
- package/dist/client/assets/chunk-XXDRQBXY-B_1m3XyG.js +1 -0
- package/dist/client/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
- package/dist/client/assets/classDiagram-JCYQIIEL-DN-cM4gO.js +1 -0
- package/dist/client/assets/classDiagram-v2-OCEON4UE-DN-cM4gO.js +1 -0
- package/dist/client/assets/clojure-Cm7r79vr.js +1 -0
- package/dist/client/assets/codicon-Brq4_Ui5.ttf +0 -0
- package/dist/client/assets/coffee-Ba7i2nA0.js +1 -0
- package/dist/client/assets/cose-bilkent-JH36ORCC-_wSiGHW9.js +1 -0
- package/dist/client/assets/cpp-C7h46wYY.js +1 -0
- package/dist/client/assets/csharp-BKxtCVv1.js +1 -0
- package/dist/client/assets/csp-bTuwJoIa.js +1 -0
- package/dist/client/assets/css-DIMkf-bt.js +3 -0
- package/dist/client/assets/cynefin-VYW2F7L2-BSXkfF6B.js +1 -0
- package/dist/client/assets/cynefinDiagram-MW4NZA55-DWqP9pCq.js +62 -0
- package/dist/client/assets/cypher-CVaqCwHa.js +1 -0
- package/dist/client/assets/cytoscape.esm-C2x7inlt.js +321 -0
- package/dist/client/assets/dagre-Buvkdvvj.js +1 -0
- package/dist/client/assets/dagre-VZM6K2ZE-D-6mKeP4.js +4 -0
- package/dist/client/assets/dart-onAF5SnQ.js +1 -0
- package/dist/client/assets/defaultLocale-BFoDCU3G.js +1 -0
- package/dist/client/assets/diagram-7IWD3JNH-DwifWIOM.js +30 -0
- package/dist/client/assets/diagram-B4RE2ZJO-CZy5Cter.js +3 -0
- package/dist/client/assets/diagram-LBJQPF4R-D64OHGQ1.js +24 -0
- package/dist/client/assets/diagram-Q27KOJAE-CYJYm3MT.js +24 -0
- package/dist/client/assets/diagram-UB23O5K3-D9XqDFWB.js +41 -0
- package/dist/client/assets/dist-D9557-UX.js +1 -0
- package/dist/client/assets/dockerfile-DZFCIeNp.js +1 -0
- package/dist/client/assets/ebnfDiagram-BXEA7PRR-DXv0laGY.js +1 -0
- package/dist/client/assets/ecl-D05T4iGw.js +1 -0
- package/dist/client/assets/editor.worker-D9zwrD0f.js +30 -0
- package/dist/client/assets/elixir-6RTg0lbw.js +1 -0
- package/dist/client/assets/erDiagram-JOGREHBK-DtgpDnFq.js +85 -0
- package/dist/client/assets/eventmodeling-45OFAUF4-CIrFy3PN.js +1 -0
- package/dist/client/assets/flow9-C5_-GSwl.js +1 -0
- package/dist/client/assets/flowDiagram-UKHOOZJN-CsaPoqV0.js +1 -0
- package/dist/client/assets/freemarker2-C0K9bJg3.js +3 -0
- package/dist/client/assets/fsharp-C8Ef5oNN.js +1 -0
- package/dist/client/assets/ganttDiagram-PKOTCBZU-DbPT_9cm.js +292 -0
- package/dist/client/assets/gitGraph-TEB2WS4Q-BSzJ-zot.js +1 -0
- package/dist/client/assets/gitGraphDiagram-DS77QQ5N-Dv47ST8y.js +106 -0
- package/dist/client/assets/go-C-y9NEjX.js +1 -0
- package/dist/client/assets/graphlib-DS17s2tU.js +1 -0
- package/dist/client/assets/graphql-fmXr3nnJ.js +1 -0
- package/dist/client/assets/handlebars-C5Uh7yG8.js +1 -0
- package/dist/client/assets/hcl-CpzslTdj.js +1 -0
- package/dist/client/assets/html-CVq09h_T.js +1 -0
- package/dist/client/assets/index-BdNjwiL_.css +1 -0
- package/dist/client/assets/index-C-Az4wQZ.js +1288 -0
- package/dist/client/assets/info-DKCQHKI2-DrnuTwtV.js +1 -0
- package/dist/client/assets/infoDiagram-6WML65LV-BbOLkXMO.js +2 -0
- package/dist/client/assets/ini-sBoK_t0W.js +1 -0
- package/dist/client/assets/init-C-OQMol4.js +1 -0
- package/dist/client/assets/ishikawaDiagram-WSZJBQD7-BU0Xf4Jv.js +70 -0
- package/dist/client/assets/java-BEtHBSE6.js +1 -0
- package/dist/client/assets/javascript-BLNuR3ma.js +1 -0
- package/dist/client/assets/journeyDiagram-NVQOT4AX-Be02AxgF.js +139 -0
- package/dist/client/assets/julia-Bri6UV-V.js +1 -0
- package/dist/client/assets/kanban-definition-27J2QSJJ-DAJOmq0i.js +89 -0
- package/dist/client/assets/katex-CXMH3UgJ.js +257 -0
- package/dist/client/assets/kotlin-BOotOW0E.js +1 -0
- package/dist/client/assets/less-B9JPFI3C.js +2 -0
- package/dist/client/assets/lexon-CfSJPG6W.js +1 -0
- package/dist/client/assets/line-CY8MZqA_.js +1 -0
- package/dist/client/assets/linear-VmQ0cgWf.js +1 -0
- package/dist/client/assets/liquid-CqxeTiTR.js +1 -0
- package/dist/client/assets/lua-CsQS60Ue.js +1 -0
- package/dist/client/assets/m3-D-oSqn_W.js +1 -0
- package/dist/client/assets/map-BaFkSB1l.js +1 -0
- package/dist/client/assets/markdown-Cimd5fb3.js +1 -0
- package/dist/client/assets/mdx-CZgnrcpZ.js +1 -0
- package/dist/client/assets/mermaid-parser.core-BNyH4fWd.js +7 -0
- package/dist/client/assets/mermaid.core-D6SqRXfj.js +42 -0
- package/dist/client/assets/mindmap-definition-FAOFIHXS-Cb4njDU8.js +96 -0
- package/dist/client/assets/mips-CIPQ_RoX.js +1 -0
- package/dist/client/assets/msdax-DauUninz.js +1 -0
- package/dist/client/assets/mysql-SOo6toE5.js +1 -0
- package/dist/client/assets/objective-c-FvmIjYaQ.js +1 -0
- package/dist/client/assets/ordinal-BDEzSJ7C.js +1 -0
- package/dist/client/assets/packet-7NZHBO7P-C0OLtmrN.js +1 -0
- package/dist/client/assets/pascal-DrH0SRf2.js +1 -0
- package/dist/client/assets/pascaligo-D-ptJ9y-.js +1 -0
- package/dist/client/assets/path-fybaL0A-.js +1 -0
- package/dist/client/assets/pegDiagram-VL7TDLO6-CUlmavTd.js +1 -0
- package/dist/client/assets/perl-oz_6vUea.js +1 -0
- package/dist/client/assets/pgsql-DTj74zXo.js +1 -0
- package/dist/client/assets/php-nr791fC2.js +1 -0
- package/dist/client/assets/pie-RZYD4A2V-BOaXF8wo.js +1 -0
- package/dist/client/assets/pieDiagram-7S7Q4E2Y-DAuLOXyl.js +39 -0
- package/dist/client/assets/pla-CopQ2nXW.js +1 -0
- package/dist/client/assets/postiats-43DmfD33.js +1 -0
- package/dist/client/assets/powerquery-D3hlyOfw.js +1 -0
- package/dist/client/assets/powershell-DmHpPYUd.js +1 -0
- package/dist/client/assets/protobuf-C531GsRP.js +2 -0
- package/dist/client/assets/pug-Z5eAx3Zn.js +1 -0
- package/dist/client/assets/python-BKTOsIAC.js +1 -0
- package/dist/client/assets/qsharp-DkqhCAOL.js +1 -0
- package/dist/client/assets/quadrantDiagram-CIZ2JOQS-6T2tUzKE.js +7 -0
- package/dist/client/assets/r-BwWrilGY.js +1 -0
- package/dist/client/assets/radar-I7S5WNFK-84ZPjfzV.js +1 -0
- package/dist/client/assets/railroad-3IZDKUUU-BIancogu.js +1 -0
- package/dist/client/assets/railroad-abnf-AHOZXSZD-DY5Umeyq.js +1 -0
- package/dist/client/assets/railroad-ebnf-EBAXGLYW-BvHqcDCh.js +1 -0
- package/dist/client/assets/railroad-peg-LSFZ7HO6-Bcfw7tSJ.js +1 -0
- package/dist/client/assets/railroadDiagram-AXF67PYL-CG4n3oVN.js +1 -0
- package/dist/client/assets/razor-D3D2-y9K.js +1 -0
- package/dist/client/assets/redis-ClamHrr6.js +1 -0
- package/dist/client/assets/redshift-DT7zqm-g.js +1 -0
- package/dist/client/assets/requirementDiagram-LRYGKXZP-mZX3Srsb.js +84 -0
- package/dist/client/assets/restructuredtext-BYgofb2h.js +1 -0
- package/dist/client/assets/rough.esm-Dy-Kn_BL.js +1 -0
- package/dist/client/assets/ruby-DezsRK8O.js +1 -0
- package/dist/client/assets/rust-DdL9SqIa.js +1 -0
- package/dist/client/assets/sankeyDiagram-W5VNT64P-yPa5u_0L.js +40 -0
- package/dist/client/assets/sb-CcwsVR0C.js +1 -0
- package/dist/client/assets/scala-DHpiXF5c.js +1 -0
- package/dist/client/assets/scheme-BeGwcela.js +1 -0
- package/dist/client/assets/scss-gp-XZpBa.js +3 -0
- package/dist/client/assets/sequenceDiagram-SI44F4Z6-CyNIlTWm.js +162 -0
- package/dist/client/assets/shell-CC2rA5mh.js +1 -0
- package/dist/client/assets/sizeCapture-X5ZJPWSS-B0uUizjq.js +1 -0
- package/dist/client/assets/solidity-BEEn4gHE.js +1 -0
- package/dist/client/assets/sophia-CRfGWb83.js +1 -0
- package/dist/client/assets/sparql-D_Lu-MrJ.js +1 -0
- package/dist/client/assets/sql-NEE52Syq.js +1 -0
- package/dist/client/assets/src-CUuFImQF.js +1 -0
- package/dist/client/assets/st-DbInun42.js +1 -0
- package/dist/client/assets/stateDiagram-OKZ733FA-CPylCUxu.js +1 -0
- package/dist/client/assets/stateDiagram-v2-UEYNNEHI-87clA1Da.js +1 -0
- package/dist/client/assets/swift-Bxkupp3x.js +1 -0
- package/dist/client/assets/swimlanes-SLNWSIFB-DBNGs0gR.js +2 -0
- package/dist/client/assets/swimlanesDiagram-ULZ7WXOC-DrshQU12.js +8 -0
- package/dist/client/assets/systemverilog-Bz4Y3fRF.js +1 -0
- package/dist/client/assets/tcl-DISqw1ZD.js +1 -0
- package/dist/client/assets/timeline-definition-Z64GVDOM-BAUrOlpT.js +120 -0
- package/dist/client/assets/treeView-QDETBFTQ-DWU_Tu3e.js +1 -0
- package/dist/client/assets/treemap-6X3UGDF4-C0VSsv4b.js +1 -0
- package/dist/client/assets/twig-De2hgUGE.js +1 -0
- package/dist/client/assets/typescript-DHaWXPl5.js +1 -0
- package/dist/client/assets/typespec-B8J7ngcE.js +1 -0
- package/dist/client/assets/vb-DV3o63ZY.js +1 -0
- package/dist/client/assets/vennDiagram-T6HMQDX7-DMDrxVrh.js +34 -0
- package/dist/client/assets/wardley-OPB4EBWU-2FXuD4eH.js +1 -0
- package/dist/client/assets/wardleyDiagram-T6FBY63Y-B6MdwST-.js +78 -0
- package/dist/client/assets/wgsl-DpFanUEy.js +298 -0
- package/dist/client/assets/xml-UOCAZ6xX.js +1 -0
- package/dist/client/assets/xychartDiagram-ELKLHX3M-4m0lgQEp.js +7 -0
- package/dist/client/assets/yaml-c5v3wojq.js +1 -0
- package/dist/client/index.html +22 -0
- package/dist/eslint-WWJOZ2KR.js +140 -0
- package/dist/server/ts/worker.js +360 -0
- package/package.json +85 -0
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
var e={comments:{lineComment:`//`,blockComment:[`/*`,`*/`]},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`[`,close:`]`},{open:`{`,close:`}`},{open:`(`,close:`)`}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`}]};function t(e){let t=[],n=e.split(/\t+|\r+|\n+| +/);for(let e=0;e<n.length;++e)n[e].length>0&&t.push(n[e]);return t}var n=t(`true false`),r=t(`
|
|
2
|
+
alias
|
|
3
|
+
break
|
|
4
|
+
case
|
|
5
|
+
const
|
|
6
|
+
const_assert
|
|
7
|
+
continue
|
|
8
|
+
continuing
|
|
9
|
+
default
|
|
10
|
+
diagnostic
|
|
11
|
+
discard
|
|
12
|
+
else
|
|
13
|
+
enable
|
|
14
|
+
fn
|
|
15
|
+
for
|
|
16
|
+
if
|
|
17
|
+
let
|
|
18
|
+
loop
|
|
19
|
+
override
|
|
20
|
+
requires
|
|
21
|
+
return
|
|
22
|
+
struct
|
|
23
|
+
switch
|
|
24
|
+
var
|
|
25
|
+
while
|
|
26
|
+
`),i=t(`
|
|
27
|
+
NULL
|
|
28
|
+
Self
|
|
29
|
+
abstract
|
|
30
|
+
active
|
|
31
|
+
alignas
|
|
32
|
+
alignof
|
|
33
|
+
as
|
|
34
|
+
asm
|
|
35
|
+
asm_fragment
|
|
36
|
+
async
|
|
37
|
+
attribute
|
|
38
|
+
auto
|
|
39
|
+
await
|
|
40
|
+
become
|
|
41
|
+
binding_array
|
|
42
|
+
cast
|
|
43
|
+
catch
|
|
44
|
+
class
|
|
45
|
+
co_await
|
|
46
|
+
co_return
|
|
47
|
+
co_yield
|
|
48
|
+
coherent
|
|
49
|
+
column_major
|
|
50
|
+
common
|
|
51
|
+
compile
|
|
52
|
+
compile_fragment
|
|
53
|
+
concept
|
|
54
|
+
const_cast
|
|
55
|
+
consteval
|
|
56
|
+
constexpr
|
|
57
|
+
constinit
|
|
58
|
+
crate
|
|
59
|
+
debugger
|
|
60
|
+
decltype
|
|
61
|
+
delete
|
|
62
|
+
demote
|
|
63
|
+
demote_to_helper
|
|
64
|
+
do
|
|
65
|
+
dynamic_cast
|
|
66
|
+
enum
|
|
67
|
+
explicit
|
|
68
|
+
export
|
|
69
|
+
extends
|
|
70
|
+
extern
|
|
71
|
+
external
|
|
72
|
+
fallthrough
|
|
73
|
+
filter
|
|
74
|
+
final
|
|
75
|
+
finally
|
|
76
|
+
friend
|
|
77
|
+
from
|
|
78
|
+
fxgroup
|
|
79
|
+
get
|
|
80
|
+
goto
|
|
81
|
+
groupshared
|
|
82
|
+
highp
|
|
83
|
+
impl
|
|
84
|
+
implements
|
|
85
|
+
import
|
|
86
|
+
inline
|
|
87
|
+
instanceof
|
|
88
|
+
interface
|
|
89
|
+
layout
|
|
90
|
+
lowp
|
|
91
|
+
macro
|
|
92
|
+
macro_rules
|
|
93
|
+
match
|
|
94
|
+
mediump
|
|
95
|
+
meta
|
|
96
|
+
mod
|
|
97
|
+
module
|
|
98
|
+
move
|
|
99
|
+
mut
|
|
100
|
+
mutable
|
|
101
|
+
namespace
|
|
102
|
+
new
|
|
103
|
+
nil
|
|
104
|
+
noexcept
|
|
105
|
+
noinline
|
|
106
|
+
nointerpolation
|
|
107
|
+
noperspective
|
|
108
|
+
null
|
|
109
|
+
nullptr
|
|
110
|
+
of
|
|
111
|
+
operator
|
|
112
|
+
package
|
|
113
|
+
packoffset
|
|
114
|
+
partition
|
|
115
|
+
pass
|
|
116
|
+
patch
|
|
117
|
+
pixelfragment
|
|
118
|
+
precise
|
|
119
|
+
precision
|
|
120
|
+
premerge
|
|
121
|
+
priv
|
|
122
|
+
protected
|
|
123
|
+
pub
|
|
124
|
+
public
|
|
125
|
+
readonly
|
|
126
|
+
ref
|
|
127
|
+
regardless
|
|
128
|
+
register
|
|
129
|
+
reinterpret_cast
|
|
130
|
+
require
|
|
131
|
+
resource
|
|
132
|
+
restrict
|
|
133
|
+
self
|
|
134
|
+
set
|
|
135
|
+
shared
|
|
136
|
+
sizeof
|
|
137
|
+
smooth
|
|
138
|
+
snorm
|
|
139
|
+
static
|
|
140
|
+
static_assert
|
|
141
|
+
static_cast
|
|
142
|
+
std
|
|
143
|
+
subroutine
|
|
144
|
+
super
|
|
145
|
+
target
|
|
146
|
+
template
|
|
147
|
+
this
|
|
148
|
+
thread_local
|
|
149
|
+
throw
|
|
150
|
+
trait
|
|
151
|
+
try
|
|
152
|
+
type
|
|
153
|
+
typedef
|
|
154
|
+
typeid
|
|
155
|
+
typename
|
|
156
|
+
typeof
|
|
157
|
+
union
|
|
158
|
+
unless
|
|
159
|
+
unorm
|
|
160
|
+
unsafe
|
|
161
|
+
unsized
|
|
162
|
+
use
|
|
163
|
+
using
|
|
164
|
+
varying
|
|
165
|
+
virtual
|
|
166
|
+
volatile
|
|
167
|
+
wgsl
|
|
168
|
+
where
|
|
169
|
+
with
|
|
170
|
+
writeonly
|
|
171
|
+
yield
|
|
172
|
+
`),a=t(`
|
|
173
|
+
read write read_write
|
|
174
|
+
function private workgroup uniform storage
|
|
175
|
+
perspective linear flat
|
|
176
|
+
center centroid sample
|
|
177
|
+
vertex_index instance_index position front_facing frag_depth
|
|
178
|
+
local_invocation_id local_invocation_index
|
|
179
|
+
global_invocation_id workgroup_id num_workgroups
|
|
180
|
+
sample_index sample_mask
|
|
181
|
+
rgba8unorm
|
|
182
|
+
rgba8snorm
|
|
183
|
+
rgba8uint
|
|
184
|
+
rgba8sint
|
|
185
|
+
rgba16uint
|
|
186
|
+
rgba16sint
|
|
187
|
+
rgba16float
|
|
188
|
+
r32uint
|
|
189
|
+
r32sint
|
|
190
|
+
r32float
|
|
191
|
+
rg32uint
|
|
192
|
+
rg32sint
|
|
193
|
+
rg32float
|
|
194
|
+
rgba32uint
|
|
195
|
+
rgba32sint
|
|
196
|
+
rgba32float
|
|
197
|
+
bgra8unorm
|
|
198
|
+
`),o=t(`
|
|
199
|
+
bool
|
|
200
|
+
f16
|
|
201
|
+
f32
|
|
202
|
+
i32
|
|
203
|
+
sampler sampler_comparison
|
|
204
|
+
texture_depth_2d
|
|
205
|
+
texture_depth_2d_array
|
|
206
|
+
texture_depth_cube
|
|
207
|
+
texture_depth_cube_array
|
|
208
|
+
texture_depth_multisampled_2d
|
|
209
|
+
texture_external
|
|
210
|
+
texture_external
|
|
211
|
+
u32
|
|
212
|
+
`),s=t(`
|
|
213
|
+
array
|
|
214
|
+
atomic
|
|
215
|
+
mat2x2
|
|
216
|
+
mat2x3
|
|
217
|
+
mat2x4
|
|
218
|
+
mat3x2
|
|
219
|
+
mat3x3
|
|
220
|
+
mat3x4
|
|
221
|
+
mat4x2
|
|
222
|
+
mat4x3
|
|
223
|
+
mat4x4
|
|
224
|
+
ptr
|
|
225
|
+
texture_1d
|
|
226
|
+
texture_2d
|
|
227
|
+
texture_2d_array
|
|
228
|
+
texture_3d
|
|
229
|
+
texture_cube
|
|
230
|
+
texture_cube_array
|
|
231
|
+
texture_multisampled_2d
|
|
232
|
+
texture_storage_1d
|
|
233
|
+
texture_storage_2d
|
|
234
|
+
texture_storage_2d_array
|
|
235
|
+
texture_storage_3d
|
|
236
|
+
vec2
|
|
237
|
+
vec3
|
|
238
|
+
vec4
|
|
239
|
+
`),c=t(`
|
|
240
|
+
vec2i vec3i vec4i
|
|
241
|
+
vec2u vec3u vec4u
|
|
242
|
+
vec2f vec3f vec4f
|
|
243
|
+
vec2h vec3h vec4h
|
|
244
|
+
mat2x2f mat2x3f mat2x4f
|
|
245
|
+
mat3x2f mat3x3f mat3x4f
|
|
246
|
+
mat4x2f mat4x3f mat4x4f
|
|
247
|
+
mat2x2h mat2x3h mat2x4h
|
|
248
|
+
mat3x2h mat3x3h mat3x4h
|
|
249
|
+
mat4x2h mat4x3h mat4x4h
|
|
250
|
+
`),l=t(`
|
|
251
|
+
bitcast all any select arrayLength abs acos acosh asin asinh atan atanh atan2
|
|
252
|
+
ceil clamp cos cosh countLeadingZeros countOneBits countTrailingZeros cross
|
|
253
|
+
degrees determinant distance dot exp exp2 extractBits faceForward firstLeadingBit
|
|
254
|
+
firstTrailingBit floor fma fract frexp inverseBits inverseSqrt ldexp length
|
|
255
|
+
log log2 max min mix modf normalize pow quantizeToF16 radians reflect refract
|
|
256
|
+
reverseBits round saturate sign sin sinh smoothstep sqrt step tan tanh transpose
|
|
257
|
+
trunc dpdx dpdxCoarse dpdxFine dpdy dpdyCoarse dpdyFine fwidth fwidthCoarse fwidthFine
|
|
258
|
+
textureDimensions textureGather textureGatherCompare textureLoad textureNumLayers
|
|
259
|
+
textureNumLevels textureNumSamples textureSample textureSampleBias textureSampleCompare
|
|
260
|
+
textureSampleCompareLevel textureSampleGrad textureSampleLevel textureSampleBaseClampToEdge
|
|
261
|
+
textureStore atomicLoad atomicStore atomicAdd atomicSub atomicMax atomicMin
|
|
262
|
+
atomicAnd atomicOr atomicXor atomicExchange atomicCompareExchangeWeak pack4x8snorm
|
|
263
|
+
pack4x8unorm pack2x16snorm pack2x16unorm pack2x16float unpack4x8snorm unpack4x8unorm
|
|
264
|
+
unpack2x16snorm unpack2x16unorm unpack2x16float storageBarrier workgroupBarrier
|
|
265
|
+
workgroupUniformLoad
|
|
266
|
+
`),u=t(`
|
|
267
|
+
&
|
|
268
|
+
&&
|
|
269
|
+
->
|
|
270
|
+
/
|
|
271
|
+
=
|
|
272
|
+
==
|
|
273
|
+
!=
|
|
274
|
+
>
|
|
275
|
+
>=
|
|
276
|
+
<
|
|
277
|
+
<=
|
|
278
|
+
%
|
|
279
|
+
-
|
|
280
|
+
--
|
|
281
|
+
+
|
|
282
|
+
++
|
|
283
|
+
|
|
|
284
|
+
||
|
|
285
|
+
*
|
|
286
|
+
<<
|
|
287
|
+
>>
|
|
288
|
+
+=
|
|
289
|
+
-=
|
|
290
|
+
*=
|
|
291
|
+
/=
|
|
292
|
+
%=
|
|
293
|
+
&=
|
|
294
|
+
|=
|
|
295
|
+
^=
|
|
296
|
+
>>=
|
|
297
|
+
<<=
|
|
298
|
+
`),d=/enable|requires|diagnostic/,f=/[_\p{XID_Start}]\p{XID_Continue}*/u,p=`variable.predefined`,m={tokenPostfix:`.wgsl`,defaultToken:`invalid`,unicode:!0,atoms:n,keywords:r,reserved:i,predeclared_enums:a,predeclared_types:o,predeclared_type_generators:s,predeclared_type_aliases:c,predeclared_intrinsics:l,operators:u,symbols:/[!%&*+\-\.\/:;<=>^|_~,]+/,tokenizer:{root:[[d,`keyword`,`@directive`],[f,{cases:{"@atoms":p,"@keywords":`keyword`,"@reserved":`invalid`,"@predeclared_enums":p,"@predeclared_types":p,"@predeclared_type_generators":p,"@predeclared_type_aliases":p,"@predeclared_intrinsics":p,"@default":`identifier`}}],{include:`@commentOrSpace`},{include:`@numbers`},[/[{}()\[\]]/,`@brackets`],[`@`,`annotation`,`@attribute`],[/@symbols/,{cases:{"@operators":`operator`,"@default":`delimiter`}}],[/./,`invalid`]],commentOrSpace:[[/\s+/,`white`],[/\/\*/,`comment`,`@blockComment`],[/\/\/.*$/,`comment`]],blockComment:[[/[^\/*]+/,`comment`],[/\/\*/,`comment`,`@push`],[/\*\//,`comment`,`@pop`],[/[\/*]/,`comment`]],attribute:[{include:`@commentOrSpace`},[/\w+/,`annotation`,`@pop`]],directive:[{include:`@commentOrSpace`},[/[()]/,`@brackets`],[/,/,`delimiter`],[f,`meta.content`],[/;/,`delimiter`,`@pop`]],numbers:[[/0[fh]/,`number.float`],[/[1-9][0-9]*[fh]/,`number.float`],[/[0-9]*\.[0-9]+([eE][+-]?[0-9]+)?[fh]?/,`number.float`],[/[0-9]+\.[0-9]*([eE][+-]?[0-9]+)?[fh]?/,`number.float`],[/[0-9]+[eE][+-]?[0-9]+[fh]?/,`number.float`],[/0[xX][0-9a-fA-F]*\.[0-9a-fA-F]+(?:[pP][+-]?[0-9]+[fh]?)?/,`number.hex`],[/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*(?:[pP][+-]?[0-9]+[fh]?)?/,`number.hex`],[/0[xX][0-9a-fA-F]+[pP][+-]?[0-9]+[fh]?/,`number.hex`],[/0[xX][0-9a-fA-F]+[iu]?/,`number.hex`],[/[1-9][0-9]*[iu]?/,`number`],[/0[iu]?/,`number`]]}};export{e as conf,m as language};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./index-C-Az4wQZ.js";var t={comments:{blockComment:[`<!--`,`-->`]},brackets:[[`<`,`>`]],autoClosingPairs:[{open:`<`,close:`>`},{open:`'`,close:`'`},{open:`"`,close:`"`}],surroundingPairs:[{open:`<`,close:`>`},{open:`'`,close:`'`},{open:`"`,close:`"`}],onEnterRules:[{beforeText:RegExp(`<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}]},n={defaultToken:``,tokenPostfix:`.xml`,ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,``],{include:`@whitespace`},[/(<)(@qualifiedName)/,[{token:`delimiter`},{token:`tag`,next:`@tag`}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:`delimiter`},{token:`tag`},``,{token:`delimiter`}]],[/(<\?)(@qualifiedName)/,[{token:`delimiter`},{token:`metatag`,next:`@tag`}]],[/(<\!)(@qualifiedName)/,[{token:`delimiter`},{token:`metatag`,next:`@tag`}]],[/<\!\[CDATA\[/,{token:`delimiter.cdata`,next:`@cdata`}],[/&\w+;/,`string.escape`]],cdata:[[/[^\]]+/,``],[/\]\]>/,{token:`delimiter.cdata`,next:`@pop`}],[/\]/,``]],tag:[[/[ \t\r\n]+/,``],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,[`attribute.name`,``,`attribute.value`]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,[`attribute.name`,``,`attribute.value`]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,[`attribute.name`,``,`attribute.value`]],[/@qualifiedName/,`attribute.name`],[/\?>/,{token:`delimiter`,next:`@pop`}],[/(\/)(>)/,[{token:`tag`},{token:`delimiter`,next:`@pop`}]],[/>/,{token:`delimiter`,next:`@pop`}]],whitespace:[[/[ \t\r\n]+/,``],[/<!--/,{token:`comment`,next:`@comment`}]],comment:[[/[^<\-]+/,`comment.content`],[/-->/,{token:`comment`,next:`@pop`}],[/<!--/,`comment.content.invalid`],[/[<\-]/,`comment.content`]]}};export{t as conf,n as language};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-CUuFImQF.js";import{D as n,H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f,z as p}from"./chunk-I66GZJ75-CKcp5S17.js";import{t as m}from"./linear-VmQ0cgWf.js";import{t as h}from"./ordinal-BDEzSJ7C.js";import{t as g}from"./init-C-OQMol4.js";import{i as _}from"./chunk-NSK5VX7P-CJvQSFjo.js";import{t as v}from"./line-CY8MZqA_.js";import"./chunk-4I5QYGJK-Dru7MVd5.js";import{t as y}from"./chunk-WRU74C26-DwPGHVIY.js";import{a as b}from"./mermaid.core-D6SqRXfj.js";function x(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function S(){var e=h().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=x(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return S(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},g.apply(d(),arguments)}var C=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,10,12,14,16,18,19,21,23],r=[2,6],i=[1,3],a=[1,5],o=[1,6],s=[1,7],c=[1,5,10,12,14,16,18,19,21,23,36,37,38],l=[1,25],u=[1,26],d=[1,28],f=[1,29],p=[1,30],m=[1,31],h=[1,32],g=[1,33],_=[1,34],v=[1,35],y=[1,36],b=[1,37],x=[1,43],S=[1,42],C=[1,47],w=[1,50],T=[1,10,12,14,16,18,19,21,23,36,37,38],E=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],D=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],O=[1,65],k=[26,28],A={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:`error`,5:`XYCHART`,8:`CHART_ORIENTATION`,10:`title`,12:`X_AXIS`,14:`Y_AXIS`,16:`LINE`,18:`BAR`,19:`acc_title`,20:`acc_title_value`,21:`acc_descr`,22:`acc_descr_value`,23:`acc_descr_multiline_value`,24:`SQUARE_BRACES_START`,26:`SQUARE_BRACES_END`,28:`COMMA`,29:`NUMBER_WITH_DECIMAL`,30:`STR`,33:`ARROW_DELIMITER`,36:`NEWLINE`,37:`SEMI`,38:`EOF`,40:`MD_STR`,42:`AMP`,43:`NUM`,44:`ALPHA`,45:`PLUS`,46:`EQUALS`,47:`MULT`,48:`DOT`,49:`BRKT`,50:`MINUS`,51:`UNDERSCORE`},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.setOrientation(a[s]);break;case 9:r.setDiagramTitle(a[s].text.trim());break;case 12:r.setLineData({text:``,type:`text`},a[s]);break;case 13:r.setLineData(a[s-1],a[s]);break;case 14:r.setBarData({text:``,type:`text`},a[s]);break;case 15:r.setBarData(a[s-1],a[s]);break;case 16:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 19:this.$=a[s-1];break;case 20:case 30:this.$=[a[s-2],...a[s]];break;case 21:case 31:this.$=[a[s]];break;case 22:this.$={value:Number(a[s-1]),label:a[s]};break;case 23:this.$={value:Number(a[s]),label:``};break;case 24:r.setXAxisTitle(a[s]);break;case 25:r.setXAxisTitle(a[s-1]);break;case 26:r.setXAxisTitle({type:`text`,text:``});break;case 27:r.setXAxisBand(a[s]);break;case 28:r.setXAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 29:this.$=a[s-1];break;case 32:r.setYAxisTitle(a[s]);break;case 33:r.setYAxisTitle(a[s-1]);break;case 34:r.setYAxisTitle({type:`text`,text:``});break;case 35:r.setYAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 39:this.$={text:a[s],type:`text`};break;case 40:this.$={text:a[s],type:`text`};break;case 41:this.$={text:a[s],type:`markdown`};break;case 42:this.$=a[s];break;case 43:this.$=a[s-1]+``+a[s]}},`anonymous`),table:[t(n,r,{3:1,4:2,7:4,5:i,36:a,37:o,38:s}),{1:[3]},t(n,r,{4:2,7:4,3:8,5:i,36:a,37:o,38:s}),t(n,r,{4:2,7:4,6:9,3:10,5:i,8:[1,11],36:a,37:o,38:s}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(c,[2,36]),t(c,[2,37]),t(c,[2,38]),{1:[2,1]},t(n,r,{4:2,7:4,3:21,5:i,36:a,37:o,38:s}),{1:[2,3]},t(c,[2,5]),t(n,[2,7],{4:22,36:a,37:o,38:s}),{11:23,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:39,13:38,24:x,29:S,30:l,31:40,32:41,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:45,15:44,29:C,30:l,35:46,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:49,17:48,24:w,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:52,17:51,24:w,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{20:[1,53]},{22:[1,54]},t(T,[2,18]),{1:[2,2]},t(T,[2,8]),t(T,[2,9]),t(E,[2,39],{41:55,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b}),t(E,[2,40]),t(E,[2,41]),t(D,[2,42]),t(D,[2,44]),t(D,[2,45]),t(D,[2,46]),t(D,[2,47]),t(D,[2,48]),t(D,[2,49]),t(D,[2,50]),t(D,[2,51]),t(D,[2,52]),t(D,[2,53]),t(T,[2,10]),t(T,[2,24],{32:41,31:56,24:x,29:S}),t(T,[2,26]),t(T,[2,27]),{33:[1,57]},{11:59,30:l,34:58,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},t(T,[2,11]),t(T,[2,32],{35:60,29:C}),t(T,[2,34]),{33:[1,61]},t(T,[2,12]),{17:62,24:w},{25:63,27:64,29:O},t(T,[2,14]),{17:66,24:w},t(T,[2,16]),t(T,[2,17]),t(D,[2,43]),t(T,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(T,[2,33]),{29:[1,70]},t(T,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(k,[2,23],{30:[1,73]}),t(T,[2,15]),t(T,[2,28]),t(T,[2,29]),{11:59,30:l,34:74,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},t(T,[2,35]),t(T,[2,19]),{25:75,27:64,29:O},t(k,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
|
+
`+h.showPosition()+`
|
|
3
|
+
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};A.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
+
`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return this.popState(),36;case 3:return this.popState(),36;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState(`acc_title`),19;case 8:return this.popState(),`acc_title_value`;case 9:return this.pushState(`acc_descr`),21;case 10:return this.popState(),`acc_descr_value`;case 11:this.pushState(`acc_descr_multiline`);break;case 12:this.popState();break;case 13:return`acc_descr_multiline_value`;case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState(`axis_data`),`X_AXIS`;case 18:return this.pushState(`axis_data`),`Y_AXIS`;case 19:return this.pushState(`axis_band_data`),24;case 20:return 33;case 21:return this.pushState(`data`),16;case 22:return this.pushState(`data`),18;case 23:return this.pushState(`data_inner`),24;case 24:return 29;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState(`string`);break;case 28:this.popState();break;case 29:return`STR`;case 30:return 24;case 31:return 26;case 32:return 44;case 33:return`COLON`;case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}})();function j(){this.yy={}}return e(j,`Parser`),j.prototype=A,A.Parser=j,new j})();C.parser=C;var w=C;function T(e){return e.type===`bar`}e(T,`isBarPlot`);function E(e){return e.type===`band`}e(E,`isBandAxisData`);function D(e){return e.type===`linear`}e(D,`isLinearAxisData`);var O=class{constructor(e){this.parentGroup=e}static{e(this,`TextDimensionCalculatorWithFont`)}getMaxDimension(e,t){if(!this.parentGroup)return{width:e.reduce((e,t)=>Math.max(t.length,e),0)*t,height:t};let n={width:0,height:0},r=this.parentGroup.append(`g`).attr(`visibility`,`hidden`).attr(`font-size`,t);for(let i of e){let e=y(r,1,i),a=e?e.width:i.length*t,o=e?e.height:t;n.width=Math.max(n.width,a),n.height=Math.max(n.height,o)}return r.remove(),n}},k=.7,A=.2,j=class{constructor(e,t,n,r){this.axisConfig=e,this.title=t,this.textDimensionCalculator=n,this.axisThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`,this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`,this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{e(this,`BaseAxis`)}setRange(e){this.range=e,this.axisPosition===`left`||this.axisPosition===`right`?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){k*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(k*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let t=e.height;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=A*e.width;this.outerPadding=Math.min(n.width/2,r);let i=n.height;this.axisPosition===`bottom`&&this.normalizedLabelRotationInRad!==0&&(i=Math.max(i,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*n.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*n.height))),i+=this.axisConfig.labelPadding*2,this.labelTextHeight=n.height,i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width,this.boundingRect.height=e.height-t}calculateSpaceIfDrawnVertical(e){let t=e.width;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=A*e.height;this.outerPadding=Math.min(n.height/2,r);let i=n.width+this.axisConfig.labelPadding*2;i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width-t,this.boundingRect.height=e.height}calculateSpace(e){return this.axisPosition===`left`||this.axisPosition===`right`?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){let t=this.normalizedLabelRotationInRad;return t===0?0:Math.sin(t)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`left-axis`,`axisl-line`],data:[{path:`M ${t},${this.boundingRect.y} L ${t},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`left-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`middle`,horizontalPos:`right`}))}),this.showTick){let t=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`left-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${t},${this.getScaleValue(e)} L ${t-this.axisConfig.tickLength},${this.getScaleValue(e)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`left-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`bottom-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`bottom-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e)+this.calculateOffsetByRotation(`height`),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation(`width`)),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`bottom-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t} L ${this.getScaleValue(e)},${t+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`bottom-axis`,`title`],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`top-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`top-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y;e.push({type:`path`,groupTexts:[`top-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},${t+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`top-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElements(){if(this.axisPosition===`left`)return this.getDrawableElementsForLeftAxis();if(this.axisPosition===`right`)throw Error(`Drawing of right axis is not implemented`);return this.axisPosition===`bottom`?this.getDrawableElementsForBottomAxis():this.axisPosition===`top`?this.getDrawableElementsForTopAxis():[]}},M=class extends j{static{e(this,`BandAxis`)}constructor(e,t,n,r,i){super(e,r,i,t),this.categories=n,this.scale=S().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=S().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),t.trace(`BandAxis axis final categories, range: `,this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},ee=class extends j{static{e(this,`LinearAxis`)}constructor(e,t,n,r,i){super(e,r,i,t),this.domain=n,this.scale=m().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];this.axisPosition===`left`&&e.reverse(),this.scale=m().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function N(e,t,n,r){let i=new O(r);return E(e)?new M(t,n,e.categories,e.title,i):new ee(t,n,[e.min,e.max],e.title,i)}e(N,`getAxis`);var te=class{constructor(e,t,n,r){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=n,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{e(this,`ChartTitle`)}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let t=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(t.width,e.width),r=t.height+2*this.chartConfig.titlePadding;return t.width<=n&&t.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];return this.showChartTitle&&e.push({groupTexts:[`chart-title`],type:`text`,data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:`middle`,horizontalPos:`center`,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),e}};function ne(e,t,n,r){return new te(new O(r),e,t,n)}e(ne,`getChartTitleComponent`);var re=class{constructor(e,t,n,r,i){this.plotData=e,this.xAxis=t,this.yAxis=n,this.orientation=r,this.plotIndex=i}static{e(this,`LinePlot`)}getDrawableElement(){let e=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t;if(t=this.orientation===`horizontal`?v().y(e=>e[0]).x(e=>e[1])(e):v().x(e=>e[0]).y(e=>e[1])(e),!t)return[];let n=[{groupTexts:[`plot`,`line-plot-${this.plotIndex}`],type:`path`,data:[{path:t,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let t=[];for(let[n,[r,i]]of e.entries()){let e=this.plotData.pointLabels[n];e&&(this.orientation===`horizontal`?t.push({x:i+10,y:r,text:e,fill:this.plotData.strokeFill,verticalPos:`middle`,horizontalPos:`left`,fontSize:12,rotation:0}):t.push({x:r,y:i-10,text:e,fill:this.plotData.strokeFill,verticalPos:`middle`,horizontalPos:`center`,fontSize:12,rotation:0}))}t.length>0&&n.push({groupTexts:[`plot`,`line-plot-${this.plotIndex}`,`labels`],type:`text`,data:t})}return n}},ie=class{constructor(e,t,n,r,i,a){this.barData=e,this.boundingRect=t,this.xAxis=n,this.yAxis=r,this.orientation=i,this.plotIndex=a}static{e(this,`BarPlot`)}getDrawableElement(){let e=this.barData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*.95,n=t/2;return this.orientation===`horizontal`?[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:this.boundingRect.x,y:e[0]-n,height:t,width:e[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:e[0]-n,y:e[1],width:t,height:this.boundingRect.y+this.boundingRect.height-e[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},ae=class{constructor(e,t,n){this.chartConfig=e,this.chartData=t,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0}}static{e(this,`BasePlot`)}setAxes(e,t){this.xAxis=e,this.yAxis=t}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error(`Axes must be passed to render Plots`);let e=[];for(let[t,n]of this.chartData.plots.entries())switch(n.type){case`line`:{let r=new re(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}break;case`bar`:{let r=new ie(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}}return e}};function P(e,t,n){return new ae(e,t,n)}e(P,`getPlotComponent`);var oe=class{constructor(e,t,n,r){this.chartConfig=e,this.chartData=t,this.componentStore={title:ne(e,t,n,r),plot:P(e,t,n),xAxis:N(t.xAxis,e.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},r),yAxis:N(t.yAxis,e.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},r)}}static{e(this,`Orchestrator`)}calculateVerticalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:i,height:a});e-=o.width,t-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),r=o.height,t-=o.height,this.componentStore.xAxis.setAxisPosition(`bottom`),o=this.componentStore.xAxis.calculateSpace({width:e,height:t}),t-=o.height,this.componentStore.yAxis.setAxisPosition(`left`),o=this.componentStore.yAxis.calculateSpace({width:e,height:t}),n=o.width,e-=o.width,e>0&&(i+=e,e=0),t>0&&(a+=t,t=0),this.componentStore.plot.calculateSpace({width:i,height:a}),this.componentStore.plot.setBoundingBoxXY({x:n,y:r}),this.componentStore.xAxis.setRange([n,n+i]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:r+a}),this.componentStore.yAxis.setRange([r,r+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:r}),this.chartData.plots.some(e=>T(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i=0,a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:a,height:o});e-=s.width,t-=s.height,s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),n=s.height,t-=s.height,this.componentStore.xAxis.setAxisPosition(`left`),s=this.componentStore.xAxis.calculateSpace({width:e,height:t}),e-=s.width,r=s.width,this.componentStore.yAxis.setAxisPosition(`top`),s=this.componentStore.yAxis.calculateSpace({width:e,height:t}),t-=s.height,i=n+s.height,e>0&&(a+=e,e=0),t>0&&(o+=t,t=0),this.componentStore.plot.calculateSpace({width:a,height:o}),this.componentStore.plot.setBoundingBoxXY({x:r,y:i}),this.componentStore.yAxis.setRange([r,r+a]),this.componentStore.yAxis.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([i,i+o]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(e=>T(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation===`horizontal`?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let t of Object.values(this.componentStore))e.push(...t.getDrawableElements());return e}},se=class{static{e(this,`XYChartBuilder`)}static build(e,t,n,r){return new oe(e,t,n,r).getDrawableElement()}},F=0,I,L=W(),R=U(),z=G(),B=R.plotColorPalette.split(`,`).map(e=>e.trim()),V=!1,H=!1;function U(){let e=n(),t=s();return _(e.xyChart,t.themeVariables.xyChart)}e(U,`getChartDefaultThemeConfig`);function W(){let e=s();return _(l.xyChart,e.xyChart)}e(W,`getChartDefaultConfig`);function G(){return{yAxis:{type:`linear`,title:``,min:1/0,max:-1/0},xAxis:{type:`band`,title:``,categories:[]},title:``,plots:[]}}e(G,`getChartDefaultData`);function K(e){let t=s();return p(e.trim(),t)}e(K,`textSanitizer`);function q(e){I=e}e(q,`setTmpSVGG`);function J(e){e===`horizontal`?L.chartOrientation=`horizontal`:L.chartOrientation=`vertical`}e(J,`setOrientation`);function Y(e){z.xAxis.title=K(e.text)}e(Y,`setXAxisTitle`);function X(e,t){z.xAxis={type:`linear`,title:z.xAxis.title,min:e,max:t},V=!0}e(X,`setXAxisRangeData`);function ce(e){z.xAxis={type:`band`,title:z.xAxis.title,categories:e.map(e=>K(e.text))},V=!0}e(ce,`setXAxisBand`);function le(e){z.yAxis.title=K(e.text)}e(le,`setYAxisTitle`);function ue(e,t){z.yAxis={type:`linear`,title:z.yAxis.title,min:e,max:t},H=!0}e(ue,`setYAxisRangeData`);function de(e){let t=Math.min(...e),n=Math.max(...e),r=D(z.yAxis)?z.yAxis.min:1/0,i=D(z.yAxis)?z.yAxis.max:-1/0;z.yAxis={type:`linear`,title:z.yAxis.title,min:Math.min(r,t),max:Math.max(i,n)}}e(de,`setYAxisRangeFromPlotData`);function Z(e){let t=[];if(e.length===0)return t;if(!V){let t=D(z.xAxis)?z.xAxis.min:1/0,n=D(z.xAxis)?z.xAxis.max:-1/0;X(Math.min(t,1),Math.max(n,e.length))}if(E(z.xAxis)&&e.length>z.xAxis.categories.length&&(e=e.slice(0,z.xAxis.categories.length)),H||de(e),E(z.xAxis)&&(t=z.xAxis.categories.map((t,n)=>[t,e[n]])),D(z.xAxis)){let n=z.xAxis.min,r=z.xAxis.max;if(e.length===1)t=[[`${n}`,e[0]]];else{let i=(r-n)/(e.length-1);t=e.map((e,t)=>[`${n+t*i}`,e])}}return t}e(Z,`transformDataWithoutCategory`);function Q(e){return B[e===0?0:e%B.length]}e(Q,`getPlotColorFromPalette`);function fe(e,t){let n=t.map(e=>e.value),r=t.map(e=>e.label?K(e.label):``),i=Z(n),a=r.some(e=>e!==``);z.plots.push({type:`line`,strokeFill:Q(F),strokeWidth:2,data:i,...a?{pointLabels:r}:{}}),F++}e(fe,`setLineData`);function pe(e,t){let n=Z(t.map(e=>e.value));z.plots.push({type:`bar`,fill:Q(F),data:n}),F++}e(pe,`setBarData`);function me(){if(z.plots.length===0)throw Error(`No Plot to render, please provide a plot with some data`);return z.title=d(),se.build(L,z,R,I)}e(me,`getDrawableElem`);function he(){return R}e(he,`getChartThemeConfig`);function ge(){return L}e(ge,`getChartConfig`);function $(){return z}e($,`getXYChartData`);var _e={parser:w,db:{getDrawableElem:me,clear:e(function(){o(),F=0,L=W(),z=G(),R=U(),B=R.plotColorPalette.split(`,`).map(e=>e.trim()),V=!1,H=!1},`clear`),setAccTitle:a,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:d,getAccDescription:u,setAccDescription:r,setOrientation:J,setXAxisTitle:Y,setXAxisRangeData:X,setXAxisBand:ce,setYAxisTitle:le,setYAxisRangeData:ue,setLineData:fe,setBarData:pe,setTmpSVGG:q,getChartThemeConfig:he,getChartConfig:ge,getXYChartData:$},renderer:{draw:e((n,r,i,a)=>{let o=a.db,s=o.getChartThemeConfig(),l=o.getChartConfig(),u=o.getXYChartData().plots[0].data.map(e=>e[1]);function d(e){return e===`top`?`text-before-edge`:`middle`}e(d,`getDominantBaseLine`);function f(e){return e===`left`?`start`:e===`right`?`end`:`middle`}e(f,`getTextAnchor`);function p(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}e(p,`getTextTransformation`),t.debug(`Rendering xychart chart
|
|
7
|
+
`+n);let m=b(r),h=m.append(`g`).attr(`class`,`main`),g=h.append(`rect`).attr(`width`,l.width).attr(`height`,l.height).attr(`class`,`background`);c(m,l.height,l.width,!0),m.attr(`viewBox`,`0 0 ${l.width} ${l.height}`),g.attr(`fill`,s.backgroundColor),o.setTmpSVGG(m.append(`g`).attr(`class`,`mermaid-tmp-group`));let _=o.getDrawableElem(),v={};function y(e){let t=h,n=``;for(let[r]of e.entries()){let i=h;r>0&&v[n]&&(i=v[n]),n+=e[r],t=v[n],t||=v[n]=i.append(`g`).attr(`class`,e[r])}return t}e(y,`getGroup`);for(let t of _){if(t.data.length===0)continue;let n=y(t.groupTexts);switch(t.type){case`rect`:if(n.selectAll(`rect`).data(t.data).enter().append(`rect`).attr(`x`,e=>e.x).attr(`y`,e=>e.y).attr(`width`,e=>e.width).attr(`height`,e=>e.height).attr(`fill`,e=>e.fill).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth),l.showDataLabel){let r=l.showDataLabelOutsideBar;if(l.chartOrientation===`horizontal`){let i=function(e,t){let{data:n,label:r}=e;return t*r.length*a<=n.width-o};e(i,`fitsHorizontally`);let a=.7,o=10,c=t.data.map((e,t)=>({data:e,label:u[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),l=c.map(e=>{let{data:t}=e,n=t.height*.7;for(;!i(e,n)&&n>0;)--n;return n}),d=Math.floor(Math.min(...l)),f=e(e=>r?e.data.x+e.data.width+10:e.data.x+e.data.width-10,`determineLabelXPosition`);n.selectAll(`text`).data(c).enter().append(`text`).attr(`x`,f).attr(`y`,e=>e.data.y+e.data.height/2).attr(`text-anchor`,r?`start`:`end`).attr(`dominant-baseline`,`middle`).attr(`fill`,s.dataLabelColor).attr(`font-size`,`${d}px`).text(e=>e.label)}else{let i=function(e,t,n){let{data:r,label:i}=e,a=t*i.length*.7,o=r.x+r.width/2,s=o-a/2,c=o+a/2,l=s>=r.x&&c<=r.x+r.width,u=r.y+n+t<=r.y+r.height;return l&&u};e(i,`fitsInBar`);let a=t.data.map((e,t)=>({data:e,label:u[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),o=a.map(e=>{let{data:t,label:n}=e,r=t.width/(n.length*.7);for(;!i(e,r,10)&&r>0;)--r;return r}),c=Math.floor(Math.min(...o)),l=e(e=>r?e.data.y-10:e.data.y+10,`determineLabelYPosition`);n.selectAll(`text`).data(a).enter().append(`text`).attr(`x`,e=>e.data.x+e.data.width/2).attr(`y`,l).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,r?`auto`:`hanging`).attr(`fill`,s.dataLabelColor).attr(`font-size`,`${c}px`).text(e=>e.label)}}break;case`text`:n.selectAll(`text`).data(t.data).enter().append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,e=>e.fill).attr(`font-size`,e=>e.fontSize).attr(`dominant-baseline`,e=>d(e.verticalPos)).attr(`text-anchor`,e=>f(e.horizontalPos)).attr(`transform`,e=>p(e)).text(e=>e.text);break;case`path`:n.selectAll(`path`).data(t.data).enter().append(`path`).attr(`d`,e=>e.path).attr(`fill`,e=>e.fill?e.fill:`none`).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth)}}},`draw`)}};export{_e as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./index-C-Az4wQZ.js";var t={comments:{lineComment:`#`},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.IndentAction.Indent}}]},n={tokenPostfix:`.yaml`,brackets:[{token:`delimiter.bracket`,open:`{`,close:`}`},{token:`delimiter.square`,open:`[`,close:`]`}],keywords:[`true`,`True`,`TRUE`,`false`,`False`,`FALSE`,`null`,`Null`,`Null`,`~`],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:`@whitespace`},{include:`@comment`},[/%[^ ]+.*$/,`meta.directive`],[/---/,`operators.directivesEnd`],[/\.{3}/,`operators.documentEnd`],[/[-?:](?= )/,`operators`],{include:`@anchor`},{include:`@tagHandle`},{include:`@flowCollections`},{include:`@blockStyle`},[/@numberInteger(?![ \t]*\S+)/,`number`],[/@numberFloat(?![ \t]*\S+)/,`number.float`],[/@numberOctal(?![ \t]*\S+)/,`number.octal`],[/@numberHex(?![ \t]*\S+)/,`number.hex`],[/@numberInfinity(?![ \t]*\S+)/,`number.infinity`],[/@numberNaN(?![ \t]*\S+)/,`number.nan`],[/@numberDate(?![ \t]*\S+)/,`number.date`],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,[`type`,`white`,`operators`,`white`]],{include:`@flowScalars`},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],object:[{include:`@whitespace`},{include:`@comment`},[/\}/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],[/:(?= )/,`operators`],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,`type`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\},]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],array:[{include:`@whitespace`},{include:`@comment`},[/\]/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\],]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],multiString:[[/^( +).+$/,`string`,`@multiStringContinued.$1`]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":`string`,"@default":{token:`@rematch`,next:`@popall`}}}]],whitespace:[[/[ \t\r\n]+/,`white`]],comment:[[/#.*$/,`comment`]],flowCollections:[[/\[/,`@brackets`,`@array`],[/\{/,`@brackets`,`@object`]],flowScalars:[[/"([^"\\]|\\.)*$/,`string.invalid`],[/'([^'\\]|\\.)*$/,`string.invalid`],[/'[^']*'/,`string`],[/"/,`string`,`@doubleQuotedString`]],doubleQuotedString:[[/[^\\"]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/"/,`string`,`@pop`]],blockStyle:[[/[>|][0-9]*[+-]?$/,`operators`,`@multiString`]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,`number`],[/@numberFloat(?=[ \t]*[,\]\}])/,`number.float`],[/@numberOctal(?=[ \t]*[,\]\}])/,`number.octal`],[/@numberHex(?=[ \t]*[,\]\}])/,`number.hex`],[/@numberInfinity(?=[ \t]*[,\]\}])/,`number.infinity`],[/@numberNaN(?=[ \t]*[,\]\}])/,`number.nan`],[/@numberDate(?=[ \t]*[,\]\}])/,`number.date`]],tagHandle:[[/\![^ ]*/,`tag`]],anchor:[[/[&*][^ ]+/,`namespace`]]}};export{t as conf,n as language};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>kaleido</title>
|
|
7
|
+
<script>
|
|
8
|
+
// FOUC 防止: React 起動前にテーマクラスを適用する。
|
|
9
|
+
// 未設定と 'system' はどちらも OS の設定に従う
|
|
10
|
+
const pref = localStorage.getItem('kaleido-theme');
|
|
11
|
+
const isDark =
|
|
12
|
+
pref === 'dark' ||
|
|
13
|
+
(pref !== 'light' && matchMedia('(prefers-color-scheme: dark)').matches);
|
|
14
|
+
if (isDark) document.documentElement.classList.add('dark');
|
|
15
|
+
</script>
|
|
16
|
+
<script type="module" crossorigin src="/assets/index-C-Az4wQZ.js"></script>
|
|
17
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BdNjwiL_.css">
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
<div id="root"></div>
|
|
21
|
+
</body>
|
|
22
|
+
</html>
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/server/eslint.ts
|
|
4
|
+
import { execFile } from "child_process";
|
|
5
|
+
import { existsSync, statSync } from "fs";
|
|
6
|
+
import { dirname, isAbsolute, join, relative, resolve, sep } from "path";
|
|
7
|
+
import { promisify } from "util";
|
|
8
|
+
var execFileAsync = promisify(execFile);
|
|
9
|
+
var ESLINT_BIN_RELATIVE = join("node_modules", ".bin", "eslint");
|
|
10
|
+
var MAX_BUFFER = 32 * 1024 * 1024;
|
|
11
|
+
var ESLINT_TIMEOUT_MS = 6e4;
|
|
12
|
+
var ESLINT_PROBE_TIMEOUT_MS = 1e4;
|
|
13
|
+
var capabilitiesCache = /* @__PURE__ */ new Map();
|
|
14
|
+
function detectCapabilities(eslintBin) {
|
|
15
|
+
let cached = capabilitiesCache.get(eslintBin);
|
|
16
|
+
if (!cached) {
|
|
17
|
+
cached = execFileAsync(eslintBin, ["--no-warn-ignored", "--help"], {
|
|
18
|
+
timeout: ESLINT_PROBE_TIMEOUT_MS,
|
|
19
|
+
maxBuffer: MAX_BUFFER
|
|
20
|
+
}).then(() => ({ supportsNoWarnIgnored: true })).catch(() => ({ supportsNoWarnIgnored: false }));
|
|
21
|
+
capabilitiesCache.set(eslintBin, cached);
|
|
22
|
+
}
|
|
23
|
+
return cached;
|
|
24
|
+
}
|
|
25
|
+
function isWithin(child, parent) {
|
|
26
|
+
if (child === parent) return true;
|
|
27
|
+
const parentWithSep = parent.endsWith(sep) ? parent : parent + sep;
|
|
28
|
+
return child.startsWith(parentWithSep);
|
|
29
|
+
}
|
|
30
|
+
function findPackageRoot(absoluteFile, repoRoot) {
|
|
31
|
+
let dir = dirname(absoluteFile);
|
|
32
|
+
while (isWithin(dir, repoRoot)) {
|
|
33
|
+
if (existsSync(join(dir, "package.json"))) return dir;
|
|
34
|
+
const parent = dirname(dir);
|
|
35
|
+
if (parent === dir) break;
|
|
36
|
+
dir = parent;
|
|
37
|
+
}
|
|
38
|
+
return repoRoot;
|
|
39
|
+
}
|
|
40
|
+
function findEslintBin(startDir, repoRoot) {
|
|
41
|
+
let dir = startDir;
|
|
42
|
+
while (isWithin(dir, repoRoot)) {
|
|
43
|
+
const candidate = join(dir, ESLINT_BIN_RELATIVE);
|
|
44
|
+
if (existsSync(candidate)) return candidate;
|
|
45
|
+
const parent = dirname(dir);
|
|
46
|
+
if (parent === dir) break;
|
|
47
|
+
dir = parent;
|
|
48
|
+
}
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
async function runEslintGroup(eslintBin, cwd, absoluteFiles) {
|
|
52
|
+
const capabilities = await detectCapabilities(eslintBin);
|
|
53
|
+
const args = [
|
|
54
|
+
"--format",
|
|
55
|
+
"json",
|
|
56
|
+
...capabilities.supportsNoWarnIgnored ? ["--no-warn-ignored"] : [],
|
|
57
|
+
"--no-error-on-unmatched-pattern",
|
|
58
|
+
...absoluteFiles.map((file) => relative(cwd, file))
|
|
59
|
+
];
|
|
60
|
+
try {
|
|
61
|
+
const { stdout } = await execFileAsync(eslintBin, args, {
|
|
62
|
+
cwd,
|
|
63
|
+
maxBuffer: MAX_BUFFER,
|
|
64
|
+
timeout: ESLINT_TIMEOUT_MS
|
|
65
|
+
});
|
|
66
|
+
return parseStdout(stdout);
|
|
67
|
+
} catch (error) {
|
|
68
|
+
const stdout = error.stdout;
|
|
69
|
+
if (typeof stdout === "string" && stdout.length > 0) {
|
|
70
|
+
try {
|
|
71
|
+
return parseStdout(stdout);
|
|
72
|
+
} catch {
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
console.warn(
|
|
76
|
+
`[kaleido] ESLint failed in ${cwd}: ${error instanceof Error ? error.message : "Unknown error"}`
|
|
77
|
+
);
|
|
78
|
+
return [];
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function parseStdout(stdout) {
|
|
82
|
+
const trimmed = stdout.trim();
|
|
83
|
+
if (!trimmed) return [];
|
|
84
|
+
const parsed = JSON.parse(trimmed);
|
|
85
|
+
if (!Array.isArray(parsed)) return [];
|
|
86
|
+
return parsed.filter(
|
|
87
|
+
(entry) => typeof entry === "object" && entry !== null && typeof entry.filePath === "string" && Array.isArray(entry.messages)
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
function convertMessage(message) {
|
|
91
|
+
if (typeof message.line !== "number" || message.line <= 0) return null;
|
|
92
|
+
const column = typeof message.column === "number" && message.column > 0 ? message.column : 1;
|
|
93
|
+
return {
|
|
94
|
+
source: "eslint",
|
|
95
|
+
severity: message.severity === 2 ? "error" : "warning",
|
|
96
|
+
message: message.message,
|
|
97
|
+
code: message.ruleId ?? void 0,
|
|
98
|
+
startLine: message.line,
|
|
99
|
+
startColumn: column,
|
|
100
|
+
endLine: typeof message.endLine === "number" ? message.endLine : message.line,
|
|
101
|
+
endColumn: typeof message.endColumn === "number" ? message.endColumn : column + 1
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
async function runEslintForFiles(repoRoot, files) {
|
|
105
|
+
if (files.length === 0) return { available: false, results: {} };
|
|
106
|
+
const repoRootAbsolute = resolve(repoRoot);
|
|
107
|
+
const groups = /* @__PURE__ */ new Map();
|
|
108
|
+
for (const file of files) {
|
|
109
|
+
const absolute = isAbsolute(file) ? file : resolve(repoRootAbsolute, file);
|
|
110
|
+
if (!isWithin(absolute, repoRootAbsolute)) continue;
|
|
111
|
+
try {
|
|
112
|
+
if (!statSync(absolute).isFile()) continue;
|
|
113
|
+
} catch {
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
const root = findPackageRoot(absolute, repoRootAbsolute);
|
|
117
|
+
groups.set(root, [...groups.get(root) ?? [], absolute]);
|
|
118
|
+
}
|
|
119
|
+
if (groups.size === 0) return { available: false, results: {} };
|
|
120
|
+
const results = {};
|
|
121
|
+
let anyBinFound = false;
|
|
122
|
+
for (const [groupRoot, groupFiles] of groups) {
|
|
123
|
+
const eslintBin = findEslintBin(groupRoot, repoRootAbsolute);
|
|
124
|
+
if (!eslintBin) continue;
|
|
125
|
+
anyBinFound = true;
|
|
126
|
+
const groupResults = await runEslintGroup(eslintBin, groupRoot, groupFiles);
|
|
127
|
+
for (const fileResult of groupResults) {
|
|
128
|
+
const filePath = isAbsolute(fileResult.filePath) ? fileResult.filePath : resolve(groupRoot, fileResult.filePath);
|
|
129
|
+
const repoRelative = relative(repoRootAbsolute, filePath).split(sep).join("/");
|
|
130
|
+
const diagnostics = fileResult.messages.map(convertMessage).filter((d) => d !== null);
|
|
131
|
+
if (diagnostics.length > 0) {
|
|
132
|
+
results[repoRelative] = diagnostics;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return { available: anyBinFound, results };
|
|
137
|
+
}
|
|
138
|
+
export {
|
|
139
|
+
runEslintForFiles
|
|
140
|
+
};
|