@tetrascience-npm/tetrascience-react-ui 0.4.0-beta.9.1 → 0.4.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/README.md +58 -4
- package/dist/athena.d.ts +167 -0
- package/dist/databricks.d.ts +129 -0
- package/dist/exceptions-DN25pCDi.cjs +2 -0
- package/dist/exceptions-DN25pCDi.cjs.map +1 -0
- package/dist/exceptions-jCQ6h5C8.js +33 -0
- package/dist/exceptions-jCQ6h5C8.js.map +1 -0
- package/dist/index.cjs +2021 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2165 -2020
- package/dist/index.js +9461 -2
- package/dist/index.js.map +1 -0
- package/dist/logo.png +0 -0
- package/dist/providers/athena.cjs +2 -0
- package/dist/providers/athena.cjs.map +1 -0
- package/dist/providers/athena.d.ts +7 -77
- package/dist/providers/athena.js +160 -0
- package/dist/providers/athena.js.map +1 -0
- package/dist/providers/databricks.cjs +2 -0
- package/dist/providers/databricks.cjs.map +1 -0
- package/dist/providers/databricks.d.ts +7 -41
- package/dist/providers/databricks.js +85 -0
- package/dist/providers/databricks.js.map +1 -0
- package/dist/providers/snowflake.cjs +2 -0
- package/dist/providers/snowflake.cjs.map +1 -0
- package/dist/providers/snowflake.d.ts +7 -38
- package/dist/providers/snowflake.js +122 -0
- package/dist/providers/snowflake.js.map +1 -0
- package/dist/server.cjs +2 -0
- package/dist/server.cjs.map +1 -0
- package/dist/server.d.ts +537 -522
- package/dist/server.js +266 -0
- package/dist/server.js.map +1 -0
- package/dist/{providers/types-Ck4uFaGp.d.ts → snowflake.d.ts} +125 -82
- package/dist/vite.svg +1 -0
- package/package.json +32 -52
- package/dist/cjs/index.js +0 -2001
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/providers/athena.js +0 -2
- package/dist/cjs/providers/athena.js.map +0 -1
- package/dist/cjs/providers/databricks.js +0 -2
- package/dist/cjs/providers/databricks.js.map +0 -1
- package/dist/cjs/providers/exceptions-CYktpdqW.js +0 -2
- package/dist/cjs/providers/exceptions-CYktpdqW.js.map +0 -1
- package/dist/cjs/providers/snowflake.js +0 -2
- package/dist/cjs/providers/snowflake.js.map +0 -1
- package/dist/cjs/server.js +0 -2
- package/dist/cjs/server.js.map +0 -1
- package/dist/esm/index.js +0 -2001
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/providers/athena.js +0 -2
- package/dist/esm/providers/athena.js.map +0 -1
- package/dist/esm/providers/databricks.js +0 -2
- package/dist/esm/providers/databricks.js.map +0 -1
- package/dist/esm/providers/exceptions-C3uFWZB2.js +0 -2
- package/dist/esm/providers/exceptions-C3uFWZB2.js.map +0 -1
- package/dist/esm/providers/snowflake.js +0 -2
- package/dist/esm/providers/snowflake.js.map +0 -1
- package/dist/esm/server.js +0 -2
- package/dist/esm/server.js.map +0 -1
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2021 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("styled-components"),d=require("react"),Do=require("@monaco-editor/react"),zo=require("monaco-themes/themes/themelist"),Go=require("react-markdown"),Uo=require("react-syntax-highlighter"),Vo=require("rehype-raw"),Fo=require("remark-gfm"),Yo=require("react-dom"),q=require("plotly.js-dist"),Zo={small:l.css`
|
|
2
|
+
height: 22px;
|
|
3
|
+
`,medium:l.css`
|
|
4
|
+
height: 26px;
|
|
5
|
+
`},Wo={default:l.css`
|
|
6
|
+
color: var(--black);
|
|
7
|
+
background-color: var(--white);
|
|
8
|
+
border: 1px solid var(--grey-300);
|
|
9
|
+
`,primary:l.css`
|
|
10
|
+
color: var(--blue-600);
|
|
11
|
+
background-color: var(--blue-50);
|
|
12
|
+
border: 1px solid var(--blue-600);
|
|
13
|
+
`},Ko=l.span`
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
gap: 6px;
|
|
18
|
+
font-family: "Inter", sans-serif;
|
|
19
|
+
font-size: 13px;
|
|
20
|
+
font-style: normal;
|
|
21
|
+
font-weight: 400;
|
|
22
|
+
line-height: 18px;
|
|
23
|
+
white-space: nowrap;
|
|
24
|
+
padding: 2px 8px;
|
|
25
|
+
border-radius: 6px;
|
|
26
|
+
user-select: none;
|
|
27
|
+
|
|
28
|
+
${({$size:e})=>Zo[e]}
|
|
29
|
+
${({$variant:e})=>Wo[e]}
|
|
30
|
+
|
|
31
|
+
${({$disabled:e})=>e&&l.css`
|
|
32
|
+
cursor: not-allowed;
|
|
33
|
+
background-color: var(--white);
|
|
34
|
+
border-color: var(--grey-300);
|
|
35
|
+
color: var(--grey-300);
|
|
36
|
+
`}
|
|
37
|
+
|
|
38
|
+
svg {
|
|
39
|
+
width: 16px;
|
|
40
|
+
height: 16px;
|
|
41
|
+
}
|
|
42
|
+
`,Xo=({children:e,size:o="medium",variant:n="default",disabled:r=!1,iconLeft:s,iconRight:i,className:a})=>t.jsxs(Ko,{$size:o,$variant:n,$disabled:r,className:a,children:[s&&s,e,i&&i]}),qo={small:l.css`
|
|
43
|
+
height: 34px;
|
|
44
|
+
`,medium:l.css`
|
|
45
|
+
height: 38px;
|
|
46
|
+
`},Qo={primary:l.css`
|
|
47
|
+
color: var(--white-900);
|
|
48
|
+
background-color: var(--theme-primary, var(--blue-900));
|
|
49
|
+
border: 1px solid var(--theme-primary, var(--blue-900));
|
|
50
|
+
|
|
51
|
+
&:hover:not(:disabled) {
|
|
52
|
+
background-color: var(--theme-primaryHover, var(--blue-800));
|
|
53
|
+
border-color: var(--theme-primaryHover, var(--blue-800));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:focus:not(:disabled) {
|
|
57
|
+
background-color: var(--theme-primaryHover, var(--blue-800));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&:active:not(:disabled) {
|
|
61
|
+
background-color: var(--theme-primaryActive, var(--blue-800));
|
|
62
|
+
border-color: var(--theme-primaryActive, var(--blue-800));
|
|
63
|
+
}
|
|
64
|
+
`,secondary:l.css`
|
|
65
|
+
color: var(--blue-600);
|
|
66
|
+
background-color: var(--white-900);
|
|
67
|
+
border: 1px solid var(--blue-600);
|
|
68
|
+
|
|
69
|
+
&:hover:not(:disabled) {
|
|
70
|
+
background-color: var(--blue-100);
|
|
71
|
+
border-color: var(--blue-600);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&:focus:not(:disabled) {
|
|
75
|
+
background-color: var(--blue-100);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&:active:not(:disabled) {
|
|
79
|
+
border-color: var(--blue-600);
|
|
80
|
+
background-color: var(--blue-100);
|
|
81
|
+
}
|
|
82
|
+
`,tertiary:l.css`
|
|
83
|
+
color: var(--black-900);
|
|
84
|
+
background-color: var(--white-900);
|
|
85
|
+
border: 1px solid var(--grey-300);
|
|
86
|
+
|
|
87
|
+
&:hover:not(:disabled) {
|
|
88
|
+
background-color: var(--grey-100);
|
|
89
|
+
border: 1px solid var(--grey-300);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&:focus:not(:disabled) {
|
|
93
|
+
background-color: var(--grey-100);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&:active:not(:disabled) {
|
|
97
|
+
background-color: var(--grey-100);
|
|
98
|
+
}
|
|
99
|
+
`},Jo=(e,o)=>o?"0":e==="small"?"7px 10px":"9px 12px",en=l.button`
|
|
100
|
+
display: inline-flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
justify-content: center;
|
|
103
|
+
gap: 8px;
|
|
104
|
+
border-radius: var(--theme-radius-medium, 8px);
|
|
105
|
+
font-family: "Inter", sans-serif;
|
|
106
|
+
font-weight: 600;
|
|
107
|
+
cursor: pointer;
|
|
108
|
+
transition: all 0.2s;
|
|
109
|
+
font-size: 14px;
|
|
110
|
+
min-height: 20px;
|
|
111
|
+
width: ${e=>e.$fullWidth?"100%":"auto"};
|
|
112
|
+
padding: ${e=>Jo(e.size||"medium",e.$noPadding)};
|
|
113
|
+
user-select: none;
|
|
114
|
+
|
|
115
|
+
${e=>qo[e.size||"medium"]}
|
|
116
|
+
${e=>Qo[e.variant||"primary"]}
|
|
117
|
+
|
|
118
|
+
&:disabled {
|
|
119
|
+
cursor: not-allowed;
|
|
120
|
+
user-select: none;
|
|
121
|
+
pointer-events: none;
|
|
122
|
+
background-color: var(--grey-300);
|
|
123
|
+
border-color: var(--grey-300);
|
|
124
|
+
color: var(--white-900);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&:focus {
|
|
128
|
+
outline: none;
|
|
129
|
+
box-shadow: 0px 0px 0px 1px var(--white-900),
|
|
130
|
+
0px 0px 0px 3px var(--blue-600);
|
|
131
|
+
}
|
|
132
|
+
`,ae=({children:e,variant:o="primary",size:n="medium",loading:r=!1,leftIcon:s,rightIcon:i,noPadding:a=!1,fullWidth:u=!1,disabled:c,ref:h,...f})=>t.jsxs(en,{ref:h,variant:o,size:n,$noPadding:a,$fullWidth:u,disabled:c||r,...f,children:[s,e,i]}),tn=l.button`
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
justify-content: center;
|
|
136
|
+
width: 40px;
|
|
137
|
+
height: 40px;
|
|
138
|
+
background-color: ${e=>e.selected?"var(--grey-100)":"var(--white-900)"};
|
|
139
|
+
border: none;
|
|
140
|
+
border-radius: 0;
|
|
141
|
+
cursor: ${e=>e.disabled?"not-allowed":"pointer"};
|
|
142
|
+
outline: none;
|
|
143
|
+
transition: all 0.2s ease;
|
|
144
|
+
padding: 0;
|
|
145
|
+
|
|
146
|
+
&:hover:not(:disabled) {
|
|
147
|
+
background-color: var(--grey-100);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&:active:not(:disabled) {
|
|
151
|
+
background-color: var(--grey-100);
|
|
152
|
+
outline: none;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&:focus,
|
|
156
|
+
&:focus-visible {
|
|
157
|
+
outline-color: var(--blue-600) !important;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&:disabled {
|
|
161
|
+
opacity: 0.5;
|
|
162
|
+
background-color: var(--grey-50);
|
|
163
|
+
border-color: var(--grey-200);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
svg {
|
|
167
|
+
width: 20px;
|
|
168
|
+
height: 20px;
|
|
169
|
+
color: ${e=>e.disabled?"var(--grey-400)":"var(--blue-900)"};
|
|
170
|
+
}
|
|
171
|
+
`,po=({icon:e,selected:o=!1,disabled:n=!1,onClick:r})=>t.jsx(tn,{selected:o,disabled:n,onClick:n?void 0:r,children:e}),fo={small:l.css`
|
|
172
|
+
padding: 12px;
|
|
173
|
+
`,medium:l.css`
|
|
174
|
+
padding: 16px;
|
|
175
|
+
`,large:l.css`
|
|
176
|
+
padding: 20px;
|
|
177
|
+
`},on={default:l.css`
|
|
178
|
+
background-color: var(--theme-cardBackground, var(--white-900));
|
|
179
|
+
border: 1px solid var(--theme-cardBorder, var(--grey-200));
|
|
180
|
+
`,outlined:l.css`
|
|
181
|
+
background-color: var(--theme-cardBackground, var(--white-900));
|
|
182
|
+
border: 1px solid var(--theme-cardBorder, var(--grey-200));
|
|
183
|
+
`,elevated:l.css`
|
|
184
|
+
background-color: var(--theme-cardBackground, var(--white-900));
|
|
185
|
+
border: 1px solid var(--theme-cardBorder, var(--grey-200));
|
|
186
|
+
box-shadow: 0px 2px 4px var(--black-100);
|
|
187
|
+
`},nn=l.div`
|
|
188
|
+
border-radius: var(--theme-radius-large, 16px);
|
|
189
|
+
width: ${e=>e.$fullWidth?"100%":"auto"};
|
|
190
|
+
${e=>on[e.$variant]}
|
|
191
|
+
transition: all 0.2s ease;
|
|
192
|
+
`,rn=l.div`
|
|
193
|
+
font-family: "Inter", sans-serif;
|
|
194
|
+
font-size: 14px;
|
|
195
|
+
font-style: normal;
|
|
196
|
+
font-weight: 600;
|
|
197
|
+
line-height: 20px;
|
|
198
|
+
background-color: var(--grey-50);
|
|
199
|
+
border-top-left-radius: var(--theme-radius-large, 16px);
|
|
200
|
+
border-top-right-radius: var(--theme-radius-large, 16px);
|
|
201
|
+
${e=>fo[e.$size]}
|
|
202
|
+
`,sn=l.div`
|
|
203
|
+
${e=>fo[e.$size]}
|
|
204
|
+
`,an=({children:e,title:o,size:n="medium",variant:r="default",className:s,fullWidth:i=!1,ref:a,...u})=>t.jsxs(nn,{ref:a,$size:n,$variant:r,$fullWidth:i,className:s,...u,children:[o&&t.jsx(rn,{$size:n,children:o}),t.jsx(sn,{$size:n,children:e})]}),ln=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:[t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 4.75C2 4.33579 2.33579 4 2.75 4H17.25C17.6642 4 18 4.33579 18 4.75C18 5.16421 17.6642 5.5 17.25 5.5H2.75C2.33579 5.5 2 5.16421 2 4.75ZM2 15.25C2 14.8358 2.33579 14.5 2.75 14.5H10.25C10.6642 14.5 11 14.8358 11 15.25C11 15.6642 10.6642 16 10.25 16H2.75C2.33579 16 2 15.6642 2 15.25Z",fill:e}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 10C2 9.58579 2.33579 9.25 2.75 9.25H17.25C17.6642 9.25 18 9.58579 18 10C18 10.4142 17.6642 10.75 17.25 10.75H2.75C2.33579 10.75 2 10.4142 2 10Z",fill:e})]}),cn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 16.5V3.5H3.75C3.55109 3.5 3.36032 3.42098 3.21967 3.28033C3.07902 3.13968 3 2.94891 3 2.75C3 2.55109 3.07902 2.36032 3.21967 2.21967C3.36032 2.07902 3.55109 2 3.75 2H16.25C16.4489 2 16.6397 2.07902 16.7803 2.21967C16.921 2.36032 17 2.55109 17 2.75C17 2.94891 16.921 3.13968 16.7803 3.28033C16.6397 3.42098 16.4489 3.5 16.25 3.5H16V16.5H16.25C16.4489 16.5 16.6397 16.579 16.7803 16.7197C16.921 16.8603 17 17.0511 17 17.25C17 17.4489 16.921 17.6397 16.7803 17.7803C16.6397 17.921 16.4489 18 16.25 18H12.75C12.5511 18 12.3603 17.921 12.2197 17.7803C12.079 17.6397 12 17.4489 12 17.25V14.75C12 14.5511 11.921 14.3603 11.7803 14.2197C11.6397 14.079 11.4489 14 11.25 14H8.75C8.55109 14 8.36032 14.079 8.21967 14.2197C8.07902 14.3603 8 14.5511 8 14.75V17.25C8 17.4489 7.92098 17.6397 7.78033 17.7803C7.63968 17.921 7.44891 18 7.25 18H3.75C3.55109 18 3.36032 17.921 3.21967 17.7803C3.07902 17.6397 3 17.4489 3 17.25C3 17.0511 3.07902 16.8603 3.21967 16.7197C3.36032 16.579 3.55109 16.5 3.75 16.5H4ZM7 5.5C7 5.36739 7.05268 5.24021 7.14645 5.14645C7.24021 5.05268 7.36739 5 7.5 5H8.5C8.63261 5 8.75979 5.05268 8.85355 5.14645C8.94732 5.24021 9 5.36739 9 5.5V6.5C9 6.63261 8.94732 6.75979 8.85355 6.85355C8.75979 6.94732 8.63261 7 8.5 7H7.5C7.36739 7 7.24021 6.94732 7.14645 6.85355C7.05268 6.75979 7 6.63261 7 6.5V5.5ZM7.5 9C7.36739 9 7.24021 9.05268 7.14645 9.14645C7.05268 9.24021 7 9.36739 7 9.5V10.5C7 10.6326 7.05268 10.7598 7.14645 10.8536C7.24021 10.9473 7.36739 11 7.5 11H8.5C8.63261 11 8.75979 10.9473 8.85355 10.8536C8.94732 10.7598 9 10.6326 9 10.5V9.5C9 9.36739 8.94732 9.24021 8.85355 9.14645C8.75979 9.05268 8.63261 9 8.5 9H7.5ZM11 5.5C11 5.36739 11.0527 5.24021 11.1464 5.14645C11.2402 5.05268 11.3674 5 11.5 5H12.5C12.6326 5 12.7598 5.05268 12.8536 5.14645C12.9473 5.24021 13 5.36739 13 5.5V6.5C13 6.63261 12.9473 6.75979 12.8536 6.85355C12.7598 6.94732 12.6326 7 12.5 7H11.5C11.3674 7 11.2402 6.94732 11.1464 6.85355C11.0527 6.75979 11 6.63261 11 6.5V5.5ZM11.5 9C11.3674 9 11.2402 9.05268 11.1464 9.14645C11.0527 9.24021 11 9.36739 11 9.5V10.5C11 10.6326 11.0527 10.7598 11.1464 10.8536C11.2402 10.9473 11.3674 11 11.5 11H12.5C12.6326 11 12.7598 10.9473 12.8536 10.8536C12.9473 10.7598 13 10.6326 13 10.5V9.5C13 9.36739 12.9473 9.24021 12.8536 9.14645C12.7598 9.05268 12.6326 9 12.5 9H11.5Z",fill:e})}),dn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:[t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.997 5.25C17.9972 4.69436 17.7917 4.15832 17.4202 3.74512C17.0488 3.33191 16.5375 3.07077 15.985 3.012C15.9262 2.45948 15.6651 1.94825 15.2519 1.57677C14.8387 1.20529 14.3026 0.999846 13.747 1H12.247C11.6914 0.999846 11.1553 1.20529 10.7421 1.57677C10.3289 1.94825 10.0678 2.45948 10.009 3.012C9.134 3.104 8.409 3.698 8.125 4.5H10.997C11.66 4.5 12.2959 4.76339 12.7648 5.23223C13.2336 5.70107 13.497 6.33696 13.497 7V14H15.747C16.3437 14 16.916 13.7629 17.338 13.341C17.7599 12.919 17.997 12.3467 17.997 11.75V5.25ZM12.247 2.5C12.0481 2.5 11.8573 2.57902 11.7167 2.71967C11.576 2.86032 11.497 3.05109 11.497 3.25V3.5H14.497V3.25C14.497 3.05109 14.418 2.86032 14.2773 2.71967C14.1367 2.57902 13.9459 2.5 13.747 2.5H12.247Z",fill:e}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 6C2.73478 6 2.48043 6.10536 2.29289 6.29289C2.10536 6.48043 2 6.73478 2 7V17C2 17.2652 2.10536 17.5196 2.29289 17.7071C2.48043 17.8946 2.73478 18 3 18H11C11.2652 18 11.5196 17.8946 11.7071 17.7071C11.8946 17.5196 12 17.2652 12 17V7C12 6.73478 11.8946 6.48043 11.7071 6.29289C11.5196 6.10536 11.2652 6 11 6H3ZM9.874 10.166C9.92992 10.0841 9.96904 9.99189 9.98909 9.89475C10.0091 9.79761 10.0097 9.69746 9.99081 9.6001C9.97189 9.50273 9.93385 9.41009 9.87889 9.32752C9.82392 9.24496 9.75313 9.17412 9.6706 9.1191C9.58807 9.06408 9.49545 9.02598 9.3981 9.007C9.30075 8.98802 9.2006 8.98854 9.10345 9.00852C9.0063 9.02851 8.91407 9.06757 8.83212 9.12344C8.75017 9.1793 8.68011 9.25087 8.626 9.334L6.133 13.073L5.28 12.22C5.13783 12.0875 4.94978 12.0154 4.75548 12.0188C4.56118 12.0223 4.37579 12.101 4.23838 12.2384C4.10097 12.3758 4.02225 12.5612 4.01883 12.7555C4.0154 12.9498 4.08752 13.1378 4.22 13.28L5.72 14.78C5.79844 14.8584 5.8933 14.9184 5.99773 14.9558C6.10217 14.9931 6.21359 15.0068 6.32396 14.9959C6.43434 14.985 6.54092 14.9498 6.63603 14.8927C6.73114 14.8357 6.81242 14.7582 6.874 14.666L9.874 10.166Z",fill:e})]}),un=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.7045 4.15347C17.034 4.4045 17.0976 4.87509 16.8466 5.20457L8.84657 15.7046C8.71541 15.8767 8.51627 15.9838 8.30033 15.9983C8.08439 16.0129 7.87271 15.9334 7.71967 15.7804L3.21967 11.2804C2.92678 10.9875 2.92678 10.5126 3.21967 10.2197C3.51256 9.92682 3.98744 9.92682 4.28033 10.2197L8.17351 14.1129L15.6534 4.29551C15.9045 3.96603 16.3751 3.90243 16.7045 4.15347Z",fill:e})}),hn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18ZM13.8566 8.19113C14.1002 7.85614 14.0261 7.38708 13.6911 7.14345C13.3561 6.89982 12.8871 6.97388 12.6434 7.30887L9.15969 12.099L7.28033 10.2197C6.98744 9.92678 6.51256 9.92678 6.21967 10.2197C5.92678 10.5126 5.92678 10.9874 6.21967 11.2803L8.71967 13.7803C8.87477 13.9354 9.08999 14.0149 9.30867 13.9977C9.52734 13.9805 9.72754 13.8685 9.85655 13.6911L13.8566 8.19113Z",fill:e})}),pn=({fill:e="currentColor",width:o="16",height:n="16"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 16 16",fill:"none",children:[t.jsx("path",{d:"M11.2016 1.59961H4.80156C3.03676 1.59961 1.60156 3.03481 1.60156 4.79961V11.1996C1.60156 12.9644 3.03676 14.3996 4.80156 14.3996H11.2016C12.9664 14.3996 14.4016 12.9644 14.4016 11.1996V4.79961C14.4016 3.03481 12.9664 1.59961 11.2016 1.59961Z",fill:e}),t.jsx("path",{d:"M7.63305 10.8968L11.4331 6.09685C11.7075 5.75045 11.6491 5.24725 11.3027 4.97285C10.9555 4.69925 10.4531 4.75845 10.1787 5.10405L6.96665 9.16085L5.80025 7.86485C5.50425 7.53685 4.99945 7.50965 4.67065 7.80565C4.34265 8.10085 4.31625 8.60645 4.61145 8.93525L6.41145 10.9352C6.56265 11.104 6.77945 11.2 7.00585 11.2H7.03065C7.26665 11.1928 7.48665 11.0816 7.63305 10.8968Z",fill:"white"})]}),fn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{width:o,height:n,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.21967 8.21967C5.51256 7.92678 5.98744 7.92678 6.28033 8.21967L10 11.9393L13.7197 8.21967C14.0126 7.92678 14.4874 7.92678 14.7803 8.21967C15.0732 8.51256 15.0732 8.98744 14.7803 9.28033L10.5303 13.5303C10.3897 13.671 10.1989 13.75 10 13.75C9.80109 13.75 9.61032 13.671 9.46967 13.5303L5.21967 9.28033C4.92678 8.98744 4.92678 8.51256 5.21967 8.21967Z",fill:e})}),mn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{d:"M3.75 3.75L16.25 16.25M16.25 3.75L3.75 16.25",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),xn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.25 2C3.65326 2 3.08097 2.23705 2.65901 2.65901C2.23705 3.08097 2 3.65326 2 4.25V15.75C2 16.3467 2.23705 16.919 2.65901 17.341C3.08097 17.7629 3.65326 18 4.25 18H15.75C16.3467 18 16.919 17.7629 17.341 17.341C17.7629 16.919 18 16.3467 18 15.75V4.25C18 3.65326 17.7629 3.08097 17.341 2.65901C16.919 2.23705 16.3467 2 15.75 2H4.25ZM8.28 8.28C8.41248 8.13783 8.4846 7.94978 8.48118 7.75548C8.47775 7.56118 8.39903 7.37579 8.26162 7.23838C8.12421 7.10097 7.93882 7.02225 7.74452 7.01883C7.55022 7.0154 7.36217 7.08752 7.22 7.22L4.97 9.47C4.82955 9.61063 4.75066 9.80125 4.75066 10C4.75066 10.1988 4.82955 10.3894 4.97 10.53L7.22 12.78C7.36217 12.9125 7.55022 12.9846 7.74452 12.9812C7.93882 12.9777 8.12421 12.899 8.26162 12.7616C8.39903 12.6242 8.47775 12.4388 8.48118 12.2445C8.4846 12.0502 8.41248 11.8622 8.28 11.72L6.56 10L8.28 8.28ZM12.78 7.22C12.7113 7.14631 12.6285 7.08721 12.5365 7.04622C12.4445 7.00523 12.3452 6.98319 12.2445 6.98141C12.1438 6.97963 12.0438 6.99816 11.9504 7.03588C11.857 7.0736 11.7722 7.12974 11.701 7.20096C11.6297 7.27218 11.5736 7.35701 11.5359 7.4504C11.4982 7.54379 11.4796 7.64382 11.4814 7.74452C11.4832 7.84523 11.5052 7.94454 11.5462 8.03654C11.5872 8.12854 11.6463 8.21134 11.72 8.28L13.44 10L11.72 11.72C11.6463 11.7887 11.5872 11.8715 11.5462 11.9635C11.5052 12.0555 11.4832 12.1548 11.4814 12.2555C11.4796 12.3562 11.4982 12.4562 11.5359 12.5496C11.5736 12.643 11.6297 12.7278 11.701 12.799C11.7722 12.8703 11.857 12.9264 11.9504 12.9641C12.0438 13.0018 12.1438 13.0204 12.2445 13.0186C12.3452 13.0168 12.4445 12.9948 12.5365 12.9538C12.6285 12.9128 12.7113 12.8537 12.78 12.78L15.03 10.53C15.1705 10.3894 15.2493 10.1988 15.2493 10C15.2493 9.80125 15.1705 9.61063 15.03 9.47L12.78 7.22Z",fill:e})}),gn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 4.25C2 3.65326 2.23705 3.08097 2.65901 2.65901C3.08097 2.23705 3.65326 2 4.25 2H15.75C16.3467 2 16.919 2.23705 17.341 2.65901C17.7629 3.08097 18 3.65326 18 4.25V12.75C18 13.3467 17.7629 13.919 17.341 14.341C16.919 14.7629 16.3467 15 15.75 15H12.645C12.8403 15.6543 13.2226 16.2372 13.745 16.677C13.8625 16.7762 13.9467 16.9092 13.9861 17.0579C14.0255 17.2065 14.0182 17.3637 13.9653 17.5081C13.9123 17.6526 13.8163 17.7772 13.6901 17.8652C13.564 17.9532 13.4138 18.0002 13.26 18H6.74C6.58628 18 6.43627 17.9528 6.31027 17.8647C6.18427 17.7767 6.08838 17.652 6.03557 17.5077C5.98275 17.3633 5.97557 17.2062 6.015 17.0576C6.05443 16.9091 6.13856 16.7762 6.256 16.677C6.77799 16.2371 7.15999 15.6542 7.355 15H4.25C3.65326 15 3.08097 14.7629 2.65901 14.341C2.23705 13.919 2 13.3467 2 12.75V4.25ZM3.5 4.25C3.5 4.05109 3.57902 3.86032 3.71967 3.71967C3.86032 3.57902 4.05109 3.5 4.25 3.5H15.75C15.9489 3.5 16.1397 3.57902 16.2803 3.71967C16.421 3.86032 16.5 4.05109 16.5 4.25V11.75C16.5 11.9489 16.421 12.1397 16.2803 12.2803C16.1397 12.421 15.9489 12.5 15.75 12.5H4.25C4.05109 12.5 3.86032 12.421 3.71967 12.2803C3.57902 12.1397 3.5 11.9489 3.5 11.75V4.25Z",fill:e})}),Cn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:[t.jsx("path",{d:"M2 4.25C2 3.00736 3.00736 2 4.25 2H10.75C11.9926 2 13 3.00736 13 4.25V5.5H9.25C7.17893 5.5 5.5 7.17893 5.5 9.25V13H4.25C3.00736 13 2 11.9926 2 10.75V4.25Z",fill:e}),t.jsx("path",{d:"M9.25 7C8.00736 7 7 8.00736 7 9.25V15.75C7 16.9926 8.00736 18 9.25 18H15.75C16.9926 18 18 16.9926 18 15.75V9.25C18 8.00736 16.9926 7 15.75 7H9.25Z",fill:e})]}),bn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{d:"M10.362 1.093C10.2511 1.0319 10.1266 0.999851 10 0.999851C9.87341 0.999851 9.74887 1.0319 9.638 1.093L2.523 5.018L10 9.143L17.477 5.018L10.362 1.093ZM18 6.443L10.75 10.443V18.693L17.612 14.907C17.7295 14.8422 17.8275 14.7471 17.8958 14.6315C17.964 14.516 18 14.3842 18 14.25V6.443ZM9.25 18.693V10.443L2 6.443V14.25C1.99997 14.3842 2.03596 14.516 2.10421 14.6315C2.17245 14.7471 2.27046 14.8422 2.388 14.907L9.25 18.693Z",fill:e})}),vn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 1C13.866 1 17 2.79 17 5C17 7.21 13.866 9 10 9C6.134 9 3 7.21 3 5C3 2.79 6.134 1 10 1ZM15.694 9.13C16.158 8.866 16.604 8.547 17 8.178V10C17 12.21 13.866 14 10 14C6.134 14 3 12.21 3 10V8.178C3.396 8.548 3.842 8.866 4.306 9.131C5.838 10.006 7.854 10.5 10 10.5C12.146 10.5 14.162 10.006 15.694 9.13ZM3 13.179V15C3 17.21 6.134 19 10 19C13.866 19 17 17.21 17 15V13.178C16.604 13.548 16.158 13.866 15.694 14.131C14.162 15.006 12.146 15.5 10 15.5C7.854 15.5 5.838 15.006 4.306 14.13C3.83547 13.8644 3.39722 13.5453 3 13.179Z",fill:e})}),yn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10ZM10 5C10.4142 5 10.75 5.33579 10.75 5.75V10.25C10.75 10.6642 10.4142 11 10 11C9.58579 11 9.25 10.6642 9.25 10.25V5.75C9.25 5.33579 9.58579 5 10 5ZM10 15C10.5523 15 11 14.5523 11 14C11 13.4477 10.5523 13 10 13C9.44771 13 9 13.4477 9 14C9 14.5523 9.44771 15 10 15Z",fill:e})}),wn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.4845 2.49499C9.15808 1.32833 10.842 1.32833 11.5156 2.495L17.7943 13.37C18.4678 14.5367 17.6259 15.995 16.2787 15.995H3.72136C2.37421 15.995 1.53224 14.5367 2.20582 13.37L8.4845 2.49499ZM10 5C10.4142 5 10.75 5.33579 10.75 5.75V9.25C10.75 9.66421 10.4142 10 10 10C9.58579 10 9.25 9.66421 9.25 9.25L9.25 5.75C9.25 5.33579 9.58579 5 10 5ZM10 14C10.5523 14 11 13.5523 11 13C11 12.4477 10.5523 12 10 12C9.44772 12 9 12.4477 9 13C9 13.5523 9.44772 14 10 14Z",fill:e})}),jn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.84288 1.804C7.88817 1.57739 8.01055 1.37346 8.18921 1.22689C8.36787 1.08031 8.59178 1.00014 8.82288 1H11.1829C11.414 1.00014 11.6379 1.08031 11.8165 1.22689C11.9952 1.37346 12.1176 1.57739 12.1629 1.804L12.4939 3.456C13.1923 3.72219 13.8436 4.09863 14.4229 4.571L16.0209 4.031C16.2398 3.95702 16.4775 3.96112 16.6937 4.04261C16.9099 4.1241 17.0913 4.27795 17.2069 4.478L18.3869 6.522C18.5025 6.72209 18.5453 6.95607 18.5079 7.18413C18.4706 7.4122 18.3553 7.62029 18.1819 7.773L16.9149 8.886C17.033 9.62397 17.033 10.376 16.9149 11.114L18.1819 12.227C18.3553 12.3795 18.4705 12.5874 18.5081 12.8152C18.5456 13.0431 18.5031 13.2769 18.3879 13.477L17.2079 15.522C17.0922 15.7223 16.9107 15.8763 16.6943 15.9578C16.4779 16.0393 16.2399 16.0432 16.0209 15.969L14.4229 15.429C13.8436 15.9014 13.1923 16.2778 12.4939 16.544L12.1639 18.196C12.1186 18.4226 11.9962 18.6265 11.8175 18.7731C11.6389 18.9197 11.415 18.9999 11.1839 19H8.82288C8.59178 18.9999 8.36787 18.9197 8.18921 18.7731C8.01055 18.6265 7.88817 18.4226 7.84288 18.196L7.51188 16.544C6.81342 16.2778 6.16215 15.9014 5.58288 15.429L3.98488 15.969C3.76598 16.043 3.52823 16.0389 3.31202 15.9574C3.09581 15.8759 2.91449 15.7221 2.79888 15.522L1.61888 13.478C1.50322 13.2779 1.46045 13.0439 1.49782 12.8159C1.53519 12.5878 1.65041 12.3797 1.82388 12.227L3.09088 11.113C2.97289 10.3754 2.97289 9.62364 3.09088 8.886L1.82388 7.773C1.65049 7.62047 1.53524 7.41264 1.49769 7.18478C1.46014 6.95693 1.5026 6.7231 1.61788 6.523L2.79788 4.478C2.91352 4.27773 3.09501 4.12373 3.31144 4.04223C3.52787 3.96073 3.76585 3.95676 3.98488 4.031L5.58288 4.571C6.16245 4.09852 6.81406 3.72207 7.51288 3.456L7.84288 1.804ZM10.0029 13C10.7985 13 11.5616 12.6839 12.1242 12.1213C12.6868 11.5587 13.0029 10.7956 13.0029 10C13.0029 9.20435 12.6868 8.44129 12.1242 7.87868C11.5616 7.31607 10.7985 7 10.0029 7C9.20723 7 8.44416 7.31607 7.88156 7.87868C7.31895 8.44129 7.00288 9.20435 7.00288 10C7.00288 10.7956 7.31895 11.5587 7.88156 12.1213C8.44416 12.6839 9.20723 13 10.0029 13Z",fill:e})}),kn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10ZM16.4969 10.2041C16.389 13.6995 13.5216 16.5 10 16.5C6.41015 16.5 3.5 13.5899 3.5 10C3.5 7.12656 5.36451 4.68861 7.94969 3.82998L6.92671 5.62019C6.60171 6.18894 6.69759 6.90485 7.16078 7.36805C7.6029 7.81017 8.27833 7.91977 8.83757 7.64015L9.0123 7.55279C9.08173 7.51807 9.15829 7.5 9.23591 7.5H9.38181C9.5712 7.5 9.74433 7.607 9.82902 7.77639C9.8994 7.91716 9.8994 8.08284 9.82902 8.22361L9.80123 8.27919C9.73357 8.41452 9.59525 8.5 9.44395 8.5H8.9418C8.18614 8.5 7.48048 8.87766 7.06131 9.50641L7.01751 9.57212C6.65828 10.111 6.56795 10.7855 6.77274 11.3998C6.98201 12.0276 7.47787 12.5197 8.10338 12.7282C8.33997 12.8071 8.49984 13.0292 8.49984 13.2749V14.3246C8.49984 14.9738 9.02608 15.5 9.67523 15.5C10.0323 15.5 10.37 15.3377 10.5931 15.0589L12.2044 13.0446C12.3957 12.8056 12.4998 12.5086 12.4998 12.2025C12.4998 11.8866 12.6279 11.5791 12.8531 11.3539C13.3088 10.8982 13.3864 10.1784 13.0257 9.63738L12.5617 8.94145C12.5214 8.88091 12.4998 8.80979 12.4998 8.73703C12.4998 8.43336 12.8465 8.26002 13.0895 8.44222L13.4322 8.69925C13.748 8.93609 14.1704 8.97373 14.523 8.79746C14.7488 8.68456 15.0216 8.72887 15.1996 8.90689L16.4969 10.2041Z",fill:e})}),_n=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{d:"M13.3516 2.00712C13.7619 2.06371 14.0488 2.44249 13.9922 2.85282L13.5576 6.00028H16.6973C17.1115 6.00028 17.4473 6.33607 17.4473 6.75028C17.4473 7.16448 17.1115 7.50028 16.6973 7.50028H13.3516L12.6611 12.5003H15.8008C16.215 12.5003 16.5508 12.8361 16.5508 13.2503C16.5508 13.6645 16.215 14.0003 15.8008 14.0003H12.4551L11.9922 17.3528C11.9356 17.7631 11.5568 18.05 11.1465 17.9934C10.7362 17.9368 10.4493 17.558 10.5059 17.1477L10.9404 14.0003H7.95508L7.49219 17.3528C7.43556 17.7631 7.05679 18.05 6.64648 17.9934C6.23622 17.9368 5.94927 17.558 6.00586 17.1477L6.44043 14.0003H3.30078C2.88658 14.0003 2.5508 13.6645 2.55078 13.2503C2.55078 12.8361 2.88657 12.5003 3.30078 12.5003H6.64648L7.33691 7.50028H4.19727C3.78309 7.50024 3.44728 7.16446 3.44727 6.75028C3.44727 6.33609 3.78308 6.00032 4.19727 6.00028H7.54297L8.00586 2.64774C8.06245 2.23743 8.44125 1.95055 8.85156 2.00712C9.26189 2.06371 9.54878 2.44249 9.49219 2.85282L9.05762 6.00028H12.043L12.5059 2.64774C12.5625 2.23743 12.9413 1.95055 13.3516 2.00712ZM8.85156 7.50028L8.16113 12.5003H11.1465L11.8369 7.50028H8.85156Z",fill:e})}),En=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.29292 2.29289C9.68345 1.90237 10.3166 1.90237 10.7071 2.29289L17.7071 9.29289C17.9931 9.57889 18.0787 10.009 17.9239 10.3827C17.7691 10.7564 17.4045 11 17 11H16V17C16 17.5523 15.5523 18 15 18H13C12.4477 18 12 17.5523 12 17V14C12 13.4477 11.5523 13 11 13H9.00003C8.44774 13 8.00003 13.4477 8.00003 14V17C8.00003 17.5523 7.55231 18 7.00003 18H5.00003C4.44774 18 4.00003 17.5523 4.00003 17V11H3.00003C2.59557 11 2.23093 10.7564 2.07615 10.3827C1.92137 10.009 2.00692 9.57889 2.29292 9.29289L9.29292 2.29289Z",fill:e})}),Mn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 40 40",fill:"none",children:t.jsx("path",{d:"M3.75 22.5H10.1824C11.6028 22.5 12.9013 23.3025 13.5365 24.5729L13.9635 25.4271C14.5987 26.6975 15.8972 27.5 17.3176 27.5H22.6824C24.1028 27.5 25.4013 26.6975 26.0365 25.4271L26.4635 24.5729C27.0987 23.3025 28.3972 22.5 29.8176 22.5H36.25M3.75 23.0639V30C3.75 32.0711 5.42893 33.75 7.5 33.75H32.5C34.5711 33.75 36.25 32.0711 36.25 30V23.0639C36.25 22.6901 36.1941 22.3183 36.0842 21.9611L32.0645 8.89718C31.5804 7.32371 30.1266 6.25 28.4803 6.25H11.5197C9.87339 6.25 8.41963 7.32371 7.93548 8.89718L3.91583 21.9611C3.80589 22.3183 3.75 22.6901 3.75 23.0639Z",stroke:e,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})}),Ln=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{d:"M10 2C14.4183 2 18 5.58172 18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2ZM9 9C8.58579 9 8.25 9.33579 8.25 9.75C8.25 10.1642 8.58579 10.5 9 10.5H9.25293C9.41287 10.5 9.53176 10.6486 9.49707 10.8047L9.03809 12.8701C8.79522 13.963 9.62751 15 10.7471 15H11C11.4142 15 11.75 14.6642 11.75 14.25C11.75 13.8358 11.4142 13.5 11 13.5H10.7471C10.5871 13.5 10.4682 13.3514 10.5029 13.1953L10.9619 11.1299C11.2048 10.037 10.3725 9 9.25293 9H9ZM10 5C9.44771 5 9 5.44772 9 6C9 6.55228 9.44771 7 10 7C10.5523 7 11 6.55228 11 6C11 5.44772 10.5523 5 10 5Z",fill:e})}),Tn=({fill:e="currentColor",width:o="16",height:n="16"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 16 16",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM9 5C9 5.55228 8.55228 6 8 6C7.44772 6 7 5.55228 7 5C7 4.44772 7.44772 4 8 4C8.55228 4 9 4.44772 9 5ZM6.75 8C6.33579 8 6 8.33579 6 8.75C6 9.16421 6.33579 9.5 6.75 9.5H7.5V11.25C7.5 11.6642 7.83579 12 8.25 12C8.66421 12 9 11.6642 9 11.25V8.75C9 8.33579 8.66421 8 8.25 8H6.75Z",fill:e})}),An=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{d:"M10.0001 1C8.76409 0.99999 7.55829 1.38167 6.54746 2.09287C5.53662 2.80407 4.77008 3.81008 4.35262 4.9734C3.93516 6.13672 3.88714 7.40058 4.21512 8.59222C4.54311 9.78387 5.2311 10.8451 6.18505 11.631C7.23705 12.5 8.00005 13.443 8.00005 14.456V15.1C7.99995 15.268 8.05628 15.4312 8.16 15.5634C8.26372 15.6956 8.40883 15.7891 8.57205 15.829C9.51025 16.0582 10.4899 16.0582 11.4281 15.829C11.5913 15.7891 11.7364 15.6956 11.8401 15.5634C11.9438 15.4312 12.0001 15.268 12.0001 15.1V14.456C12.0001 13.443 12.7621 12.499 13.8151 11.631C14.769 10.8451 15.457 9.78387 15.785 8.59222C16.113 7.40058 16.0649 6.13672 15.6475 4.9734C15.23 3.81008 14.4635 2.80407 13.4526 2.09287C12.4418 1.38167 11.236 0.99999 10.0001 1ZM8.86305 17.414C8.76568 17.3992 8.66633 17.4036 8.57069 17.4272C8.47505 17.4508 8.38498 17.4929 8.30563 17.5513C8.14538 17.6691 8.03852 17.8458 8.00855 18.0425C7.97858 18.2392 8.02796 18.4397 8.14583 18.5999C8.2637 18.7602 8.44039 18.867 8.63705 18.897C9.54052 19.0344 10.4596 19.0344 11.3631 18.897C11.5597 18.867 11.7364 18.7602 11.8543 18.5999C11.9721 18.4397 12.0215 18.2392 11.9916 18.0425C11.9616 17.8458 11.8547 17.6691 11.6945 17.5513C11.5342 17.4334 11.3337 17.384 11.1371 17.414C10.3834 17.5288 9.61671 17.5288 8.86305 17.414Z",fill:e})}),In=({fill:e="currentColor",width:o="16",height:n="16"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 16 16",fill:"none",children:t.jsx("path",{d:"M11.5 1C9.567 1 8 2.567 8 4.5V7H2.5C1.67157 7 1 7.67157 1 8.5V13.5C1 14.3284 1.67157 15 2.5 15H9.5C10.3284 15 11 14.3284 11 13.5V8.5C11 7.67157 10.3284 7 9.5 7V4.5C9.5 3.39543 10.3954 2.5 11.5 2.5C12.6046 2.5 13.5 3.39543 13.5 4.5V6.25C13.5 6.66421 13.8358 7 14.25 7C14.6642 7 15 6.66421 15 6.25V4.5C15 2.567 13.433 1 11.5 1Z",fill:e})}),Rn=({fill:e="currentColor",width:o="16",height:n="16"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 16 16",fill:"none",children:t.jsx("path",{d:"M3.75 7.25C3.33579 7.25 3 7.58579 3 8C3 8.41421 3.33579 8.75 3.75 8.75L12.25 8.75C12.6642 8.75 13 8.41421 13 8C13 7.58579 12.6642 7.25 12.25 7.25H3.75Z",fill:e})}),Sn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{width:o,height:n,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M3.10526 2.28868C2.85362 2.25302 2.60104 2.34722 2.43421 2.53895C2.26738 2.73068 2.209 2.99386 2.27911 3.23815L3.69276 8.16402C3.87733 8.80713 4.4655 9.25024 5.13456 9.25024H11.25C11.6642 9.25024 12 9.58603 12 10.0002C12 10.4145 11.6642 10.7502 11.25 10.7502H5.13457C4.4655 10.7502 3.87733 11.1934 3.69277 11.8365L2.27911 16.7624C2.209 17.0067 2.26738 17.2698 2.43421 17.4616C2.60104 17.6533 2.85362 17.7475 3.10526 17.7118C8.94303 16.8844 14.221 14.319 18.3983 10.5576C18.5563 10.4154 18.6465 10.2128 18.6465 10.0003C18.6465 9.7877 18.5563 9.58513 18.3983 9.4429C14.221 5.68154 8.94303 3.1161 3.10526 2.28868Z",fill:e})}),$n=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{d:"M2.69533 14.7623L1.43355 17.9168C1.27028 18.3249 1.67532 18.73 2.08348 18.5667L5.23795 17.3049C5.74091 17.1037 6.19777 16.8025 6.58081 16.4194L17.5 5.50072C18.3284 4.67229 18.3284 3.32914 17.5 2.50072C16.6716 1.67229 15.3284 1.67229 14.5 2.50071L3.58081 13.4194C3.19777 13.8025 2.89652 14.2593 2.69533 14.7623Z",fill:e})}),Nn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:[t.jsx("path",{d:"M12 8.99908C11.7348 8.99908 11.4804 8.89372 11.2929 8.70618C11.1054 8.51865 11 8.26429 11 7.99908V2.99908C11 2.44708 11.45 1.99208 11.997 2.06908C13.4939 2.28487 14.8808 2.97941 15.9502 4.04884C17.0197 5.11828 17.7142 6.50515 17.93 8.00208C18.008 8.54908 17.552 8.99908 17 8.99908H12Z",fill:e}),t.jsx("path",{d:"M8.003 4.07083C8.55 3.99483 9 4.44982 9 5.00082V10.0008C9 10.266 9.10536 10.5204 9.29289 10.7079C9.48043 10.8955 9.73478 11.0008 10 11.0008H15C15.552 11.0008 16.008 11.4508 15.93 11.9978C15.6769 13.7491 14.77 15.3396 13.3918 16.4494C12.0135 17.5591 10.2662 18.1058 8.5012 17.9795C6.73622 17.8532 5.08455 17.0632 3.87841 15.7685C2.67226 14.4737 2.00113 12.7703 2 11.0008C2.00009 9.31693 2.60701 7.68946 3.70953 6.41668C4.81205 5.1439 6.33633 4.31107 8.003 4.07083Z",fill:e})]}),On=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.157 2.17646C7.78976 2.02451 7.37724 2.02451 7.01 2.17646L2.926 3.86646C2.65219 3.97987 2.41812 4.17185 2.25331 4.41817C2.08851 4.66448 2.00036 4.9541 2 5.25046V16.1275C1.99997 16.3742 2.06079 16.617 2.17705 16.8346C2.29332 17.0522 2.46146 17.2377 2.66656 17.3748C2.87167 17.5118 3.10741 17.5962 3.35291 17.6204C3.59841 17.6446 3.84609 17.6079 4.074 17.5135L7.584 16.0615L11.844 17.8235C12.2109 17.9751 12.6231 17.9751 12.99 17.8235L17.073 16.1335C17.3468 16.0203 17.581 15.8285 17.746 15.5824C17.911 15.3363 17.9994 15.0468 18 14.7505V3.87246C18 3.6259 17.9391 3.38315 17.8229 3.1657C17.7067 2.94824 17.5387 2.76278 17.3337 2.62574C17.1287 2.4887 16.8932 2.4043 16.6478 2.38001C16.4024 2.35571 16.1549 2.39228 15.927 2.48646L12.417 3.93846L8.157 2.17646ZM7.58 5.00046C7.77891 5.00046 7.96968 5.07948 8.11033 5.22013C8.25098 5.36079 8.33 5.55155 8.33 5.75046V12.2505C8.33 12.4494 8.25098 12.6401 8.11033 12.7808C7.96968 12.9214 7.77891 13.0005 7.58 13.0005C7.38109 13.0005 7.19032 12.9214 7.04967 12.7808C6.90902 12.6401 6.83 12.4494 6.83 12.2505V5.75046C6.83 5.55155 6.90902 5.36079 7.04967 5.22013C7.19032 5.07948 7.38109 5.00046 7.58 5.00046ZM13.17 7.75046C13.17 7.55155 13.091 7.36079 12.9503 7.22013C12.8097 7.07948 12.6189 7.00046 12.42 7.00046C12.2211 7.00046 12.0303 7.07948 11.8897 7.22013C11.749 7.36079 11.67 7.55155 11.67 7.75046V14.2505C11.67 14.4494 11.749 14.6401 11.8897 14.7808C12.0303 14.9214 12.2211 15.0005 12.42 15.0005C12.6189 15.0005 12.8097 14.9214 12.9503 14.7808C13.091 14.6401 13.17 14.4494 13.17 14.2505V7.75046Z",fill:e})}),Bn=({fill:e="currentColor",width:o="16",height:n="16"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 16 16",fill:"none",children:t.jsx("path",{d:"M8.75 3.75C8.75 3.33579 8.41421 3 8 3C7.58579 3 7.25 3.33579 7.25 3.75V7.25H3.75C3.33579 7.25 3 7.58579 3 8C3 8.41421 3.33579 8.75 3.75 8.75L7.25 8.75V12.25C7.25 12.6642 7.58579 13 8 13C8.41421 13 8.75 12.6642 8.75 12.25V8.75L12.25 8.75C12.6642 8.75 13 8.41421 13 8C13 7.58579 12.6642 7.25 12.25 7.25H8.75V3.75Z",fill:e})}),Pn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{d:"M10.0036 8C10.7993 8 11.5623 7.68393 12.1249 7.12132C12.6875 6.55871 13.0036 5.79565 13.0036 5C13.0036 4.20435 12.6875 3.44129 12.1249 2.87868C11.5623 2.31607 10.7993 2 10.0036 2C9.20797 2 8.44491 2.31607 7.8823 2.87868C7.31969 3.44129 7.00362 4.20435 7.00362 5C7.00362 5.79565 7.31969 6.55871 7.8823 7.12132C8.44491 7.68393 9.20797 8 10.0036 8ZM3.46862 14.493C3.37578 14.7411 3.36554 15.0126 3.43941 15.267C3.51329 15.5214 3.66733 15.7452 3.87862 15.905C5.62995 17.266 7.7856 18.0034 10.0036 18C12.3136 18 14.4416 17.216 16.1346 15.9C16.5646 15.567 16.7386 14.997 16.5426 14.49C16.0349 13.168 15.1382 12.0311 13.9709 11.2292C12.8037 10.4274 11.4207 9.99829 10.0046 9.99861C8.58845 9.99894 7.20569 10.4287 6.03881 11.231C4.87193 12.0334 3.97578 13.1708 3.46862 14.493Z",fill:e})}),Hn=({fill:e="currentColor",width:o="16",height:n="16"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 16 16",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM9 11.5C9 12.0523 8.55228 12.5 8 12.5C7.44772 12.5 7 12.0523 7 11.5C7 10.9477 7.44772 10.5 8 10.5C8.55228 10.5 9 10.9477 9 11.5ZM7.29303 5.29289C7.68355 4.90237 8.31671 4.90237 8.70724 5.29289C9.09776 5.68342 9.09776 6.31658 8.70724 6.70711C8.58354 6.83081 8.43743 6.91429 8.2827 6.95959C7.82404 7.09387 7.25013 7.52576 7.25013 8.25V8.50022C7.25013 8.91444 7.58592 9.25022 8.00013 9.25022C8.41435 9.25022 8.75013 8.91444 8.75013 8.50022V8.38522C9.12313 8.26818 9.47391 8.06176 9.7679 7.76777C10.7442 6.79146 10.7442 5.20854 9.7679 4.23223C8.79159 3.25592 7.20868 3.25592 6.23237 4.23223C5.93947 4.52513 5.93947 5 6.23237 5.29289C6.52526 5.58579 7.00013 5.58579 7.29303 5.29289Z",fill:e})}),Dn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:[t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.60597 12.9691C4.85946 13.2967 4.79938 13.7678 4.47179 14.0213C3.87925 14.4798 3.5 15.1954 3.5 16C3.5 16.1569 3.51437 16.31 3.54177 16.4582C3.68996 16.4856 3.84307 16.5 4 16.5C4.80458 16.5 5.52023 16.1208 5.97873 15.5282C6.23222 15.2006 6.70328 15.1405 7.03087 15.394C7.35846 15.6475 7.41854 16.1186 7.16505 16.4462C6.4347 17.39 5.2884 18 4 18C3.54003 18 3.09667 17.9221 2.6834 17.778C2.46722 17.7027 2.29728 17.5328 2.22195 17.3166C2.07794 16.9033 2 16.46 2 16C2 14.7116 2.60997 13.5653 3.55383 12.835C3.88142 12.5815 4.35248 12.6415 4.60597 12.9691Z",fill:e}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.75236 12C6.40714 12.8376 7.16237 13.5929 8 14.2476V18.25C8 18.6642 8.33579 19 8.75 19C11.5114 19 13.75 16.7614 13.75 14C13.75 13.5097 13.6792 13.035 13.5471 12.5861C16.8467 10.2297 19 6.36651 19 2C19 1.91234 18.9991 1.82486 18.9974 1.73759C18.9894 1.33502 18.665 1.01058 18.2624 1.0026C18.1751 1.00087 18.0877 1 18 1C13.6335 1 9.77032 3.15331 7.41387 6.45291C6.96496 6.32078 6.49028 6.25 6 6.25C3.23858 6.25 1 8.48858 1 11.25C1 11.6642 1.33579 12 1.75 12H5.75236ZM13 9C14.1046 9 15 8.10457 15 7C15 5.89543 14.1046 5 13 5C11.8954 5 11 5.89543 11 7C11 8.10457 11.8954 9 13 9Z",fill:e})]}),Ge=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsxs("svg",{width:o,height:n,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M9 16C12.866 16 16 12.866 16 9C16 5.13401 12.866 2 9 2C5.13401 2 2 5.13401 2 9C2 12.866 5.13401 16 9 16Z",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M18 18L14 14",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),zn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:[t.jsx("path",{d:"M8 10C8 9.60218 8.15804 9.22064 8.43934 8.93934C8.72064 8.65804 9.10218 8.5 9.5 8.5C9.89782 8.5 10.2794 8.65804 10.5607 8.93934C10.842 9.22064 11 9.60218 11 10C11 10.3978 10.842 10.7794 10.5607 11.0607C10.2794 11.342 9.89782 11.5 9.5 11.5C9.10218 11.5 8.72064 11.342 8.43934 11.0607C8.15804 10.7794 8 10.3978 8 10Z",fill:e}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.5 2C4.10218 2 3.72064 2.15804 3.43934 2.43934C3.15804 2.72065 3 3.10218 3 3.5V16.5C3 16.8978 3.15804 17.2794 3.43934 17.5607C3.72064 17.842 4.10218 18 4.5 18H15.5C15.8978 18 16.2794 17.842 16.5607 17.5607C16.842 17.2794 17 16.8978 17 16.5V7.621C16.9997 7.22331 16.8414 6.84204 16.56 6.561L12.44 2.439C12.3005 2.29961 12.1349 2.1891 11.9527 2.11377C11.7705 2.03844 11.5752 1.99978 11.378 2H4.5ZM9.5 7C9.03881 7.00024 8.58388 7.10681 8.17056 7.31143C7.75725 7.51605 7.39667 7.8132 7.11685 8.17981C6.83703 8.54641 6.64551 8.9726 6.55715 9.42525C6.46879 9.8779 6.48598 10.3448 6.60739 10.7897C6.7288 11.2347 6.95116 11.6456 7.25718 11.9906C7.5632 12.3357 7.94466 12.6055 8.3719 12.7792C8.79915 12.9528 9.26068 13.0257 9.72064 12.992C10.1806 12.9583 10.6266 12.819 11.024 12.585L12.22 13.78C12.2887 13.8537 12.3715 13.9128 12.4635 13.9538C12.5555 13.9948 12.6548 14.0168 12.7555 14.0186C12.8562 14.0204 12.9562 14.0018 13.0496 13.9641C13.143 13.9264 13.2278 13.8703 13.299 13.799C13.3703 13.7278 13.4264 13.643 13.4641 13.5496C13.5018 13.4562 13.5204 13.3562 13.5186 13.2555C13.5168 13.1548 13.4948 13.0555 13.4538 12.9635C13.4128 12.8715 13.3537 12.7887 13.28 12.72L12.085 11.524C12.3538 11.0683 12.4972 10.5496 12.5009 10.0206C12.5045 9.49158 12.3682 8.97099 12.1057 8.51165C11.8432 8.0523 11.464 7.67053 11.0063 7.40506C10.5487 7.13958 10.029 6.99984 9.5 7Z",fill:e})]}),Gn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:[t.jsx("path",{d:"M6.5 9C6.5 8.33696 6.76339 7.70107 7.23223 7.23223C7.70107 6.76339 8.33696 6.5 9 6.5C9.66304 6.5 10.2989 6.76339 10.7678 7.23223C11.2366 7.70107 11.5 8.33696 11.5 9C11.5 9.66304 11.2366 10.2989 10.7678 10.7678C10.2989 11.2366 9.66304 11.5 9 11.5C8.33696 11.5 7.70107 11.2366 7.23223 10.7678C6.76339 10.2989 6.5 9.66304 6.5 9Z",fill:e}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 18C12.1217 18 14.1566 17.1571 15.6569 15.6569C17.1571 14.1566 18 12.1217 18 10C18 7.87827 17.1571 5.84344 15.6569 4.34315C14.1566 2.84285 12.1217 2 10 2C7.87827 2 5.84344 2.84285 4.34315 4.34315C2.84285 5.84344 2 7.87827 2 10C2 12.1217 2.84285 14.1566 4.34315 15.6569C5.84344 17.1571 7.87827 18 10 18ZM9 5C8.37415 5.0001 7.75705 5.14706 7.19833 5.42906C6.63961 5.71106 6.15485 6.12023 5.78304 6.62367C5.41124 7.12711 5.16275 7.71077 5.05756 8.32773C4.95238 8.94468 4.99343 9.5777 5.17741 10.1759C5.3614 10.7741 5.68319 11.3208 6.1169 11.772C6.55061 12.2232 7.08415 12.5663 7.67462 12.7738C8.26508 12.9813 8.89599 13.0473 9.51661 12.9666C10.1372 12.8859 10.7303 12.6606 11.248 12.309L12.72 13.78C12.7887 13.8537 12.8715 13.9128 12.9635 13.9538C13.0555 13.9948 13.1548 14.0168 13.2555 14.0186C13.3562 14.0204 13.4562 14.0018 13.5496 13.9641C13.643 13.9264 13.7278 13.8703 13.799 13.799C13.8703 13.7278 13.9264 13.643 13.9641 13.5496C14.0018 13.4562 14.0204 13.3562 14.0186 13.2555C14.0168 13.1548 13.9948 13.0555 13.9538 12.9635C13.9128 12.8715 13.8537 12.7887 13.78 12.72L12.309 11.248C12.7176 10.6467 12.9546 9.94532 12.9944 9.21939C13.0343 8.49346 12.8756 7.77039 12.5353 7.1279C12.195 6.48542 11.6861 5.94782 11.0632 5.5729C10.4403 5.19798 9.72702 4.99992 9 5Z",fill:e})]}),Un=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 14 16",fill:"none",children:[t.jsx("path",{d:"M7 5V8",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M3 11V9C3 8.4477 3.4477 8 4 8H10C10.5523 8 11 8.4477 11 9V11",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M7 5C8.10457 5 9 4.10457 9 3C9 1.89543 8.10457 1 7 1C5.89543 1 5 1.89543 5 3C5 4.10457 5.89543 5 7 5Z",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M3 15C4.10457 15 5 14.1046 5 13C5 11.8954 4.10457 11 3 11C1.89543 11 1 11.8954 1 13C1 14.1046 1.89543 15 3 15Z",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M11 15C12.1046 15 13 14.1046 13 13C13 11.8954 12.1046 11 11 11C9.89543 11 9 11.8954 9 13C9 14.1046 9.89543 15 11 15Z",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Vn=({fill:e="currentColor",width:o="21",height:n="21"})=>t.jsxs("svg",{width:o,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M22.392 10.5705C21.693 5.4495 17.313 1.5 12 1.5C6.201 1.5 1.5 6.201 1.5 12C1.5 14.064 2.1045 15.9825 3.132 17.6055L1.5 22.5L6.3945 20.868C7.6395 21.657 9.06 22.188 10.584 22.3965",stroke:e,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M17.625 12.75L18.75 16.5L22.5 17.625L18.75 18.75L17.625 22.5L16.5 18.75L12.75 17.625L16.5 16.5L17.625 12.75Z",fill:e,stroke:e,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})]}),Fn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 14 14",fill:"none",children:[t.jsx("path",{d:"M13 1H1",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M7 13V1",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Yn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{d:"M11.2502 1C12.769 1 14.0002 2.23122 14.0002 3.75V4.19238C14.7954 4.26939 15.5841 4.3694 16.3655 4.49121C16.7747 4.555 17.0551 4.93847 16.9914 5.34766C16.9276 5.75685 16.5442 6.0373 16.135 5.97363C16.0856 5.96593 16.036 5.95771 15.9865 5.9502L15.1448 16.4697C15.0302 17.8987 13.8371 19 12.4035 19H7.5969C6.16331 19 4.97024 17.8987 4.85569 16.4697L4.01389 5.9502C3.96456 5.9577 3.91473 5.96595 3.86545 5.97363C3.45635 6.03717 3.07279 5.75678 3.00901 5.34766C2.94536 4.93848 3.2258 4.555 3.63499 4.49121C4.41637 4.3694 5.205 4.2694 6.00022 4.19238V3.75C6.00022 2.23122 7.23144 1 8.75022 1H11.2502ZM7.80002 7.00098C7.41217 7.01665 7.10455 7.32382 7.08127 7.70312V7.78027L7.38108 15.2803C7.39779 15.694 7.74659 16.0156 8.16038 15.999C8.57421 15.9824 8.89666 15.6336 8.8801 15.2197L8.57932 7.71973L8.57249 7.64355C8.51897 7.26722 8.18803 6.98546 7.80002 7.00098ZM12.2004 7.00098C11.7866 6.98443 11.4378 7.30599 11.4211 7.71973L11.1213 15.2197C11.1048 15.6335 11.4263 15.9823 11.8401 15.999C12.2538 16.0156 12.6026 15.694 12.6194 15.2803L12.9201 7.78027C12.9367 7.36644 12.6142 7.01761 12.2004 7.00098ZM8.75022 2.5C8.05986 2.5 7.50022 3.05964 7.50022 3.75V4.0752C8.32725 4.02543 9.16083 4 10.0002 4C10.8396 4 11.6732 4.02544 12.5002 4.0752V3.75C12.5002 3.05964 11.9406 2.5 11.2502 2.5H8.75022Z",fill:e})}),Zn=({fill:e="currentColor",width:o="16",height:n="16"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 16 16",fill:"none",children:[t.jsx("path",{d:"M3.75 2C2.7835 2 2 2.7835 2 3.75V5.25C2 5.66421 2.33579 6 2.75 6C3.16421 6 3.5 5.66421 3.5 5.25V3.75C3.5 3.61193 3.61193 3.5 3.75 3.5H5.25C5.66421 3.5 6 3.16421 6 2.75C6 2.33579 5.66421 2 5.25 2H3.75Z",fill:e}),t.jsx("path",{d:"M10.75 2C10.3358 2 10 2.33579 10 2.75C10 3.16421 10.3358 3.5 10.75 3.5H12.25C12.3881 3.5 12.5 3.61193 12.5 3.75V5.25C12.5 5.66421 12.8358 6 13.25 6C13.6642 6 14 5.66421 14 5.25V3.75C14 2.7835 13.2165 2 12.25 2H10.75Z",fill:e}),t.jsx("path",{d:"M3.5 10.75C3.5 10.3358 3.16421 10 2.75 10C2.33579 10 2 10.3358 2 10.75V12.25C2 13.2165 2.7835 14 3.75 14H5.25C5.66421 14 6 13.6642 6 13.25C6 12.8358 5.66421 12.5 5.25 12.5H3.75C3.61193 12.5 3.5 12.3881 3.5 12.25V10.75Z",fill:e}),t.jsx("path",{d:"M14 10.75C14 10.3358 13.6642 10 13.25 10C12.8358 10 12.5 10.3358 12.5 10.75V12.25C12.5 12.3881 12.3881 12.5 12.25 12.5H10.75C10.3358 12.5 10 12.8358 10 13.25C10 13.6642 10.3358 14 10.75 14H12.25C13.2165 14 14 13.2165 14 12.25V10.75Z",fill:e}),t.jsx("path",{d:"M8 10C9.10457 10 10 9.10457 10 8C10 6.89543 9.10457 6 8 6C6.89543 6 6 6.89543 6 8C6 9.10457 6.89543 10 8 10Z",fill:e})]});var $=(e=>(e.BARS_3_BOTTOM_LEFT="bars-3-bottom-left",e.BUILDING="building",e.BULK_CHECK="bulk-check",e.CHECK="check",e.CHECK_CIRCLE="check-circle",e.CHECK_SQUARE="check-square",e.CHEVRON_DOWN="chevron-down",e.CLOSE="close",e.CODE="code",e.COMPUTER="computer",e.COPY="copy",e.CUBE="cube",e.DATABASE="database",e.EXCLAMATION_CIRCLE="exclamation-circle",e.EXCLAMATION_TRIANGLE="exclamation-triangle",e.GEAR="gear",e.GLobe="globe",e.HASHTAG="hashtag",e.HOME="home",e.INBOX="inbox",e.INFORMATION_CIRCLE="information-circle",e.INFORMATION_CIRCLE_MICRO="information-circle-micro",e.LAMP="lamp",e.LOCK_OPEN="lock-open",e.MINUS="minus",e.PAPER_PLANE="paper-plane",e.PENCIL="pencil",e.PIE_CHART="pie-chart",e.PIPELINE="pipeline",e.PLUS="plus",e.PROFILE="profile",e.QUESTION_CIRCLE="question-circle",e.ROCKET_LAUNCH="rocket-launch",e.SEARCH="search",e.SEARCH_DOCUMENT="search-document",e.SEARCH_SQL="search-sql",e.SITEMAP="sitemap",e.TETRASCIENCE_ICON="tetrascience-icon",e.TEXT="text",e.TRASH="trash",e.VIEWFINDER_CIRCLE="viewfinder-circle",e))($||{});const F=e=>{let o=null;const{name:n}=e;switch(n){case"bars-3-bottom-left":o=t.jsx(ln,{...e});break;case"building":o=t.jsx(cn,{...e});break;case"bulk-check":o=t.jsx(dn,{...e});break;case"check":o=t.jsx(un,{...e});break;case"check-circle":o=t.jsx(hn,{...e});break;case"check-square":o=t.jsx(pn,{...e});break;case"chevron-down":o=t.jsx(fn,{...e});break;case"close":o=t.jsx(mn,{...e});break;case"code":o=t.jsx(xn,{...e});break;case"computer":o=t.jsx(gn,{...e});break;case"copy":o=t.jsx(Cn,{...e});break;case"cube":o=t.jsx(bn,{...e});break;case"database":o=t.jsx(vn,{...e});break;case"exclamation-circle":o=t.jsx(yn,{...e});break;case"exclamation-triangle":o=t.jsx(wn,{...e});break;case"gear":o=t.jsx(jn,{...e});break;case"globe":o=t.jsx(kn,{...e});break;case"hashtag":o=t.jsx(_n,{...e});break;case"home":o=t.jsx(En,{...e});break;case"inbox":o=t.jsx(Mn,{...e});break;case"information-circle":o=t.jsx(Ln,{...e});break;case"information-circle-micro":o=t.jsx(Tn,{...e});break;case"lamp":o=t.jsx(An,{...e});break;case"lock-open":o=t.jsx(In,{...e});break;case"minus":o=t.jsx(Rn,{...e});break;case"paper-plane":o=t.jsx(Sn,{...e});break;case"pencil":o=t.jsx($n,{...e});break;case"pie-chart":o=t.jsx(Nn,{...e});break;case"pipeline":o=t.jsx(On,{...e});break;case"plus":o=t.jsx(Bn,{...e});break;case"profile":o=t.jsx(Pn,{...e});break;case"question-circle":o=t.jsx(Hn,{...e});break;case"rocket-launch":o=t.jsx(Dn,{...e});break;case"search":o=t.jsx(Ge,{...e});break;case"search-document":o=t.jsx(zn,{...e});break;case"search-sql":o=t.jsx(Gn,{...e});break;case"sitemap":o=t.jsx(Un,{...e});break;case"tetrascience-icon":o=t.jsx(Vn,{...e});break;case"text":o=t.jsx(Fn,{...e});break;case"trash":o=t.jsx(Yn,{...e});break;case"viewfinder-circle":o=t.jsx(Zn,{...e});break;default:throw`[Icon] name "${n}" does not exist`}return t.jsx("div",{style:{display:"inline-flex"},children:o})},Wn=l.label`
|
|
205
|
+
display: inline-flex;
|
|
206
|
+
align-items: center;
|
|
207
|
+
cursor: ${e=>e.disabled?"not-allowed":"pointer"};
|
|
208
|
+
opacity: ${e=>e.disabled?.6:1};
|
|
209
|
+
padding: ${e=>e.$noPadding?"0":"12px 16px"};
|
|
210
|
+
width: 100%;
|
|
211
|
+
`,Kn=l.input.attrs({type:"checkbox"})`
|
|
212
|
+
position: absolute;
|
|
213
|
+
opacity: 0;
|
|
214
|
+
height: 0;
|
|
215
|
+
width: 0;
|
|
216
|
+
`,Xn=l.div`
|
|
217
|
+
display: flex;
|
|
218
|
+
align-items: center;
|
|
219
|
+
justify-content: center;
|
|
220
|
+
width: 16px;
|
|
221
|
+
height: 16px;
|
|
222
|
+
background: ${e=>e.checked?"var(--blue-600)":"var(--white-900)"};
|
|
223
|
+
border: 1px solid
|
|
224
|
+
${e=>e.checked?"var(--blue-600)":"var(--grey-300)"};
|
|
225
|
+
border-radius: 3px;
|
|
226
|
+
transition: all 0.2s;
|
|
227
|
+
|
|
228
|
+
${e=>!e.disabled&&`
|
|
229
|
+
&:hover {
|
|
230
|
+
border-color: var(--blue-600);
|
|
231
|
+
}
|
|
232
|
+
`}
|
|
233
|
+
`,qn=()=>t.jsx(F,{name:$.CHECK_SQUARE,fill:"var(--blue-600)"}),Qn=l.span`
|
|
234
|
+
margin-left: 10px;
|
|
235
|
+
font-family: "Inter", sans-serif;
|
|
236
|
+
font-size: 14px;
|
|
237
|
+
font-style: normal;
|
|
238
|
+
font-weight: 400;
|
|
239
|
+
line-height: 20px;
|
|
240
|
+
`,Ue=({checked:e=!1,onChange:o,disabled:n=!1,className:r,onClick:s,label:i,noPadding:a=!1,ref:u})=>{const c=f=>{!n&&o&&o(f.target.checked)},h=f=>{s&&s(f)};return t.jsxs(Wn,{className:r,disabled:n,$noPadding:a,onClick:h,children:[t.jsx(Kn,{ref:u,checked:e,onChange:c,disabled:n}),t.jsx(Xn,{checked:e,disabled:n,children:e&&t.jsx(qn,{})}),i&&t.jsx(Qn,{children:i})]})},Jn=l.div`
|
|
241
|
+
position: relative;
|
|
242
|
+
display: inline-flex;
|
|
243
|
+
width: fit-content;
|
|
244
|
+
`,er=l.div`
|
|
245
|
+
position: absolute;
|
|
246
|
+
background-color: var(--black);
|
|
247
|
+
color: var(--white);
|
|
248
|
+
padding: 8px 12px;
|
|
249
|
+
border-radius: 6px;
|
|
250
|
+
font-family: "Inter", sans-serif;
|
|
251
|
+
font-size: 13px;
|
|
252
|
+
font-weight: 400;
|
|
253
|
+
line-height: 18px;
|
|
254
|
+
max-width: 250px;
|
|
255
|
+
min-width: min-content;
|
|
256
|
+
width: max-content;
|
|
257
|
+
z-index: 1000;
|
|
258
|
+
opacity: 0;
|
|
259
|
+
visibility: hidden;
|
|
260
|
+
transition: opacity 0.2s, visibility 0.2s;
|
|
261
|
+
white-space: normal;
|
|
262
|
+
word-wrap: break-word;
|
|
263
|
+
box-sizing: border-box;
|
|
264
|
+
text-align: left;
|
|
265
|
+
|
|
266
|
+
${e=>e.$isVisible&&l.css`
|
|
267
|
+
opacity: 1;
|
|
268
|
+
visibility: visible;
|
|
269
|
+
`}
|
|
270
|
+
|
|
271
|
+
${e=>{switch(e.placement){case"top":return l.css`
|
|
272
|
+
bottom: 100%;
|
|
273
|
+
left: 50%;
|
|
274
|
+
transform: translateX(-50%) translateY(-8px);
|
|
275
|
+
|
|
276
|
+
&::after {
|
|
277
|
+
content: "";
|
|
278
|
+
position: absolute;
|
|
279
|
+
top: 100%;
|
|
280
|
+
left: 50%;
|
|
281
|
+
margin-left: -6px;
|
|
282
|
+
border-width: 6px;
|
|
283
|
+
border-style: solid;
|
|
284
|
+
border-color: var(--black) transparent transparent transparent;
|
|
285
|
+
}
|
|
286
|
+
`;case"right":return l.css`
|
|
287
|
+
top: 50%;
|
|
288
|
+
left: 100%;
|
|
289
|
+
transform: translateY(-50%) translateX(8px);
|
|
290
|
+
|
|
291
|
+
&::after {
|
|
292
|
+
content: "";
|
|
293
|
+
position: absolute;
|
|
294
|
+
top: 50%;
|
|
295
|
+
right: 100%;
|
|
296
|
+
margin-top: -6px;
|
|
297
|
+
border-width: 6px;
|
|
298
|
+
border-style: solid;
|
|
299
|
+
border-color: transparent var(--black) transparent transparent;
|
|
300
|
+
}
|
|
301
|
+
`;case"bottom":return l.css`
|
|
302
|
+
top: 100%;
|
|
303
|
+
left: 50%;
|
|
304
|
+
transform: translateX(-50%) translateY(8px);
|
|
305
|
+
|
|
306
|
+
&::after {
|
|
307
|
+
content: "";
|
|
308
|
+
position: absolute;
|
|
309
|
+
bottom: 100%;
|
|
310
|
+
left: 50%;
|
|
311
|
+
margin-left: -6px;
|
|
312
|
+
border-width: 6px;
|
|
313
|
+
border-style: solid;
|
|
314
|
+
border-color: transparent transparent var(--black) transparent;
|
|
315
|
+
}
|
|
316
|
+
`;case"left":return l.css`
|
|
317
|
+
top: 50%;
|
|
318
|
+
right: 100%;
|
|
319
|
+
transform: translateY(-50%) translateX(-8px);
|
|
320
|
+
|
|
321
|
+
&::after {
|
|
322
|
+
content: "";
|
|
323
|
+
position: absolute;
|
|
324
|
+
top: 50%;
|
|
325
|
+
left: 100%;
|
|
326
|
+
margin-top: -6px;
|
|
327
|
+
border-width: 6px;
|
|
328
|
+
border-style: solid;
|
|
329
|
+
border-color: transparent transparent transparent var(--black);
|
|
330
|
+
}
|
|
331
|
+
`;default:return""}}}
|
|
332
|
+
`,Ve=({content:e,children:o,placement:n="top",className:r,delay:s=100})=>{const[i,a]=d.useState(!1),u=d.useRef(null),c=()=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{a(!0)},s)},h=()=>{u.current&&clearTimeout(u.current),a(!1)};return d.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]),t.jsxs(Jn,{className:r,onMouseEnter:c,onMouseLeave:h,children:[o,t.jsx(er,{placement:n,$isVisible:i,children:e})]})},tr={},Ut={light:"github-light",dark:"dracula"},or=l.div`
|
|
333
|
+
border-radius: 16px;
|
|
334
|
+
overflow: hidden;
|
|
335
|
+
background-color: ${e=>e.$themeMode==="dark"?"var(--grey-800)":"var(--grey-50)"};
|
|
336
|
+
position: relative;
|
|
337
|
+
border: 1px solid var(--grey-200);
|
|
338
|
+
opacity: ${e=>e.disabled?.6:1};
|
|
339
|
+
cursor: ${e=>e.disabled?"not-allowed":"default"};
|
|
340
|
+
`,nr=l.div`
|
|
341
|
+
margin-left: auto;
|
|
342
|
+
display: flex;
|
|
343
|
+
gap: 8px;
|
|
344
|
+
padding: 8px 16px;
|
|
345
|
+
position: absolute;
|
|
346
|
+
top: 0;
|
|
347
|
+
right: 0;
|
|
348
|
+
z-index: 1;
|
|
349
|
+
`,Vt=l.div`
|
|
350
|
+
width: 32px;
|
|
351
|
+
height: 32px;
|
|
352
|
+
display: flex;
|
|
353
|
+
align-items: center;
|
|
354
|
+
justify-content: center;
|
|
355
|
+
`,Ft=l(ae)`
|
|
356
|
+
width: 100%;
|
|
357
|
+
height: 100%;
|
|
358
|
+
`,Me=({value:e,onChange:o,language:n="python",theme:r="dark",height:s=400,width:i="100%",options:a={},onCopy:u,onLaunch:c,disabled:h=!1})=>{const[f,b]=d.useState("Copy"),[x,E]=d.useState("Launch"),y=1e3,_=d.useCallback(v=>{u&&!h&&(u(v),b("Copied"),setTimeout(()=>{b("Copy")},y))},[u,h]),M=d.useCallback(v=>{c&&!h&&(c(v),E("Launched"),setTimeout(()=>{E("Launch")},y))},[c,h]),w=async v=>{const g=Ut[r];try{const p=zo[g];if(p){const k=tr[`/node_modules/monaco-themes/themes/${p}.json`];if(k){const T=(await k()).default;v.editor.defineTheme(g,T)}}v.editor.setTheme(g)}catch(p){console.error("Error loading theme:",p),v.editor.setTheme("vs-dark")}},m={minimap:{enabled:!1},scrollBeyondLastLine:!1,lineNumbers:"on",padding:{top:12,bottom:12,left:20,right:20},scrollbar:{vertical:"hidden",verticalScrollbarSize:0},readOnly:h,...a};return t.jsxs(or,{$themeMode:r,disabled:h,children:[t.jsxs(nr,{children:[u&&t.jsx(Ve,{content:f,placement:"bottom",children:t.jsx(Vt,{children:t.jsx(Ft,{variant:"tertiary",size:"small",leftIcon:t.jsx(F,{name:$.COPY}),noPadding:!0,fullWidth:!0,onClick:()=>_(e),disabled:h,children:null})})}),c&&t.jsx(Ve,{content:x,placement:"bottom",children:t.jsx(Vt,{children:t.jsx(Ft,{variant:"tertiary",size:"small",leftIcon:t.jsx(F,{name:$.ROCKET_LAUNCH}),noPadding:!0,fullWidth:!0,onClick:()=>M(e),disabled:h,children:null})})})]}),t.jsx(Do,{value:e,onChange:o,language:n,theme:Ut[r],height:s,width:i,options:m,beforeMount:w})]})},rr=l.div`
|
|
359
|
+
position: relative;
|
|
360
|
+
width: ${e=>e.width||"100%"};
|
|
361
|
+
`,sr=l.button`
|
|
362
|
+
display: flex;
|
|
363
|
+
align-items: center;
|
|
364
|
+
justify-content: space-between;
|
|
365
|
+
width: 100%;
|
|
366
|
+
height: ${e=>e.size==="xsmall"?"34px":"38px"};
|
|
367
|
+
padding: 0 12px;
|
|
368
|
+
background-color: ${e=>e.disabled?"var(--grey-100)":"var(--white-900)"};
|
|
369
|
+
border: 1px solid
|
|
370
|
+
${e=>e.$error?"var(--red-error)":e.disabled?"var(--grey-200)":e.open?"var(--blue-600)":"var(--grey-300)"};
|
|
371
|
+
border-radius: 6px;
|
|
372
|
+
outline: none;
|
|
373
|
+
cursor: ${e=>e.disabled?"not-allowed":"pointer"};
|
|
374
|
+
user-select: ${e=>e.disabled?"none":"auto"};
|
|
375
|
+
transition: all 0.2s ease;
|
|
376
|
+
font-family: "Inter", sans-serif;
|
|
377
|
+
font-size: 14px;
|
|
378
|
+
font-weight: 400;
|
|
379
|
+
line-height: 20px;
|
|
380
|
+
text-align: left;
|
|
381
|
+
color: ${e=>e.disabled?"var(--grey-400)":e.open?"var(--black-900)":"var(--grey-400)"};
|
|
382
|
+
|
|
383
|
+
&:hover:not(:disabled) {
|
|
384
|
+
border-color: ${e=>e.$error?"var(--red-error)":"var(--blue-600)"};
|
|
385
|
+
color: var(--black-900) !important;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
&:disabled {
|
|
389
|
+
color: var(--grey-400) !important;
|
|
390
|
+
border-color: var(--grey-300);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
&:active:not(:disabled) {
|
|
394
|
+
color: var(--black-900) !important;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
&:focus {
|
|
398
|
+
outline: none;
|
|
399
|
+
box-shadow: ${e=>e.$error?"0px 0px 0px 3px var(--red-bg)":"0px 0px 0px 1px var(--white-900), 0px 0px 0px 3px var(--blue-600)"};
|
|
400
|
+
border-color: ${e=>e.$error?"var(--red-error)":"var(--blue-600)"};
|
|
401
|
+
}
|
|
402
|
+
`,ir=l.div`
|
|
403
|
+
width: 20px;
|
|
404
|
+
height: 20px;
|
|
405
|
+
transform: ${e=>e.open?"rotate(180deg)":"rotate(0deg)"};
|
|
406
|
+
transition: transform 0.2s ease;
|
|
407
|
+
color: var(--grey-600);
|
|
408
|
+
display: flex;
|
|
409
|
+
align-items: center;
|
|
410
|
+
justify-content: center;
|
|
411
|
+
`,ar=l.div`
|
|
412
|
+
text-overflow: ellipsis;
|
|
413
|
+
white-space: nowrap;
|
|
414
|
+
overflow: hidden;
|
|
415
|
+
flex: 1;
|
|
416
|
+
text-align: left;
|
|
417
|
+
display: block;
|
|
418
|
+
max-width: calc(100% - 24px);
|
|
419
|
+
|
|
420
|
+
.dropdown-menu-item {
|
|
421
|
+
text-overflow: ellipsis;
|
|
422
|
+
white-space: nowrap;
|
|
423
|
+
overflow: hidden;
|
|
424
|
+
}
|
|
425
|
+
`,lr=l.ul`
|
|
426
|
+
position: absolute;
|
|
427
|
+
top: calc(100% + 4px);
|
|
428
|
+
left: 0;
|
|
429
|
+
width: ${e=>e.menuWidth||"calc(100% - 2px)"};
|
|
430
|
+
max-height: 200px;
|
|
431
|
+
overflow-y: auto;
|
|
432
|
+
background-color: var(--white-900);
|
|
433
|
+
border: 1px solid var(--grey-200);
|
|
434
|
+
border-radius: 6px;
|
|
435
|
+
box-shadow: 0px 4px 8px var(--black-100);
|
|
436
|
+
z-index: 10;
|
|
437
|
+
padding: 4px 0;
|
|
438
|
+
margin: 0;
|
|
439
|
+
list-style: none;
|
|
440
|
+
`,cr=l.div`
|
|
441
|
+
display: flex;
|
|
442
|
+
flex-direction: column;
|
|
443
|
+
align-items: center;
|
|
444
|
+
justify-content: center;
|
|
445
|
+
padding: 16px;
|
|
446
|
+
color: var(--grey-400);
|
|
447
|
+
`,dr=l.p`
|
|
448
|
+
margin: 8px 0 0 0;
|
|
449
|
+
font-family: "Inter", sans-serif;
|
|
450
|
+
font-size: 14px;
|
|
451
|
+
line-height: 20px;
|
|
452
|
+
text-align: center;
|
|
453
|
+
`,ur=l.li`
|
|
454
|
+
padding: 8px 12px;
|
|
455
|
+
cursor: ${e=>e.disabled?"not-allowed":"pointer"};
|
|
456
|
+
background-color: ${e=>e.selected?"var(--blue-50)":"transparent"};
|
|
457
|
+
color: ${e=>e.disabled?"var(--grey-400)":(e.selected,"var(--blue-900)")};
|
|
458
|
+
font-family: "Inter", sans-serif;
|
|
459
|
+
font-size: 14px;
|
|
460
|
+
line-height: 20px;
|
|
461
|
+
transition: background-color 0.2s ease;
|
|
462
|
+
outline: none;
|
|
463
|
+
|
|
464
|
+
&:hover:not(:disabled) {
|
|
465
|
+
background-color: ${e=>e.selected?"var(--blue-50)":"var(--grey-50)"};
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
&:focus-visible {
|
|
469
|
+
background-color: var(--blue-50);
|
|
470
|
+
outline: 2px solid var(--blue-600);
|
|
471
|
+
outline-offset: -2px;
|
|
472
|
+
}
|
|
473
|
+
`,Le=({options:e=[],value:o,placeholder:n="Select an option",disabled:r=!1,error:s=!1,size:i="small",onChange:a,onOpen:u,onClose:c,width:h,menuWidth:f})=>{const[b,x]=d.useState(!1),[E,y]=d.useState(o||""),_=d.useRef(null),M=d.useRef([]);d.useEffect(()=>{o!==void 0&&y(o)},[o]),d.useEffect(()=>{const L=j=>{_.current&&!_.current.contains(j.target)&&b&&(x(!1),c?.())};return document.addEventListener("mousedown",L),()=>{document.removeEventListener("mousedown",L)}},[b,c]),d.useEffect(()=>{b&&(M.current=M.current.slice(0,e.length))},[b,e.length]),d.useEffect(()=>{if(b&&M.current.length>0){const L=e.findIndex(R=>R.value===E),j=L>=0?L:0;setTimeout(()=>{M.current[j]&&M.current[j]?.focus()},10)}},[b,e,E]);const w=()=>{if(!r){const L=!b;x(L),L?u?.():c?.()}},m=L=>{L.disabled||(y(L.value),x(!1),a?.(L.value),c?.())},v=L=>{for(let j=L+1;j<e.length;j++)if(!e[j].disabled)return j;return-1},g=L=>{for(let j=L-1;j>=0;j--)if(!e[j].disabled)return j;return-1},p=(L,j)=>{const R=e[j];switch(L.key){case"Enter":case" ":L.preventDefault(),R.disabled||m(R);break;case"ArrowDown":{L.preventDefault();const N=v(j);N!==-1&&M.current[N]?.focus();break}case"ArrowUp":{L.preventDefault();const N=g(j);N!==-1&&M.current[N]?.focus();break}case"Escape":L.preventDefault(),x(!1),c?.();break;case"Tab":x(!1),c?.();break}},k=L=>{if(!r)switch(L.key){case"Enter":case" ":case"ArrowDown":L.preventDefault(),b||(x(!0),u?.());break;case"Escape":L.preventDefault(),b&&(x(!1),c?.());break}},T=e.find(L=>L.value===E),I=T?T.label:n;return t.jsxs(rr,{ref:_,width:h,children:[t.jsxs(sr,{type:"button",onClick:w,onKeyDown:k,open:b,disabled:r,$error:s,size:i,"aria-haspopup":"listbox","aria-expanded":b,"aria-label":n,children:[t.jsx(ar,{children:I}),t.jsx(ir,{open:b,children:t.jsx(F,{name:$.CHEVRON_DOWN,fill:"var(--grey-600)"})})]}),b&&t.jsx(lr,{role:"listbox","aria-labelledby":"dropdown-button",menuWidth:f,children:e.length>0?e.map((L,j)=>t.jsx(ur,{ref:R=>{M.current[j]=R},selected:L.value===E,disabled:L.disabled,onClick:()=>m(L),onKeyDown:R=>p(R,j),tabIndex:L.disabled?-1:0,role:"option","aria-selected":L.value===E,"aria-disabled":L.disabled,children:L.label},L.value)):t.jsxs(cr,{children:[t.jsx(F,{name:$.INBOX,fill:"var(--grey-400)",width:"24px",height:"24px"}),t.jsx(dr,{children:"No Data"})]})})]})},hr=l.div`
|
|
474
|
+
width: 100%;
|
|
475
|
+
padding: 15px;
|
|
476
|
+
border-radius: 4px;
|
|
477
|
+
margin-bottom: 16px;
|
|
478
|
+
background-color: #fff2f0;
|
|
479
|
+
border: 1px solid #ffccc7;
|
|
480
|
+
display: flex;
|
|
481
|
+
flex-direction: column;
|
|
482
|
+
gap: 8px;
|
|
483
|
+
box-sizing: border-box;
|
|
484
|
+
`,pr=l.div`
|
|
485
|
+
display: flex;
|
|
486
|
+
justify-content: space-between;
|
|
487
|
+
align-items: flex-start;
|
|
488
|
+
`,fr=l.div`
|
|
489
|
+
color: #ff4d4f;
|
|
490
|
+
font-size: 18px;
|
|
491
|
+
margin-right: 12px;
|
|
492
|
+
display: flex;
|
|
493
|
+
align-items: center;
|
|
494
|
+
`,mr=l.button`
|
|
495
|
+
background: none;
|
|
496
|
+
border: none;
|
|
497
|
+
font-size: 16px;
|
|
498
|
+
cursor: pointer;
|
|
499
|
+
color: rgba(0, 0, 0, 0.45);
|
|
500
|
+
padding: 0;
|
|
501
|
+
line-height: 1;
|
|
502
|
+
&:hover {
|
|
503
|
+
color: rgba(0, 0, 0, 0.75);
|
|
504
|
+
}
|
|
505
|
+
`,xr=l.div`
|
|
506
|
+
font-weight: 500;
|
|
507
|
+
font-size: 16px;
|
|
508
|
+
display: flex;
|
|
509
|
+
align-items: center;
|
|
510
|
+
flex-grow: 1;
|
|
511
|
+
`,gr=l.div`
|
|
512
|
+
display: flex;
|
|
513
|
+
flex-direction: column;
|
|
514
|
+
gap: 8px;
|
|
515
|
+
width: 100%;
|
|
516
|
+
`,Yt=l.p`
|
|
517
|
+
margin: 0;
|
|
518
|
+
padding: 0;
|
|
519
|
+
line-height: 1.5;
|
|
520
|
+
`,mo=l.span`
|
|
521
|
+
font-weight: ${e=>e.$strong?"600":"400"};
|
|
522
|
+
color: ${e=>e.$type==="secondary"?"rgba(0, 0, 0, 0.45)":"inherit"};
|
|
523
|
+
`,Cr=l(mo).attrs({$type:"secondary"})``,br=l.div`
|
|
524
|
+
margin-left: -15px;
|
|
525
|
+
margin-right: -15px;
|
|
526
|
+
margin-bottom: -5px;
|
|
527
|
+
`,vr=l.div`
|
|
528
|
+
padding: 12px 16px;
|
|
529
|
+
cursor: pointer;
|
|
530
|
+
display: flex;
|
|
531
|
+
align-items: center;
|
|
532
|
+
user-select: none;
|
|
533
|
+
|
|
534
|
+
&:hover {
|
|
535
|
+
background-color: rgba(0, 0, 0, 0.02);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
&::after {
|
|
539
|
+
content: "${e=>e.$isActive?"▼":"▶"}";
|
|
540
|
+
font-size: 12px;
|
|
541
|
+
margin-left: 8px;
|
|
542
|
+
}
|
|
543
|
+
`,yr=l.div`
|
|
544
|
+
padding: ${e=>e.$isVisible?"0 16px 12px":"0 16px"};
|
|
545
|
+
max-height: ${e=>e.$isVisible?"300px":"0"};
|
|
546
|
+
overflow: hidden;
|
|
547
|
+
transition: max-height 0.3s ease;
|
|
548
|
+
`,wr=l.pre`
|
|
549
|
+
white-space: pre-wrap;
|
|
550
|
+
word-break: break-all;
|
|
551
|
+
max-height: 300px;
|
|
552
|
+
overflow-y: auto;
|
|
553
|
+
background: #f5f5f5;
|
|
554
|
+
padding: 10px;
|
|
555
|
+
border-radius: 4px;
|
|
556
|
+
margin: 0;
|
|
557
|
+
`;function jr(e){return typeof e=="object"&&e!==null&&"isAxiosError"in e&&e.isAxiosError===!0}function kr(e){if(typeof e=="string")return{description:e,details:null};if(e&&typeof e=="object"){const o=e.detail||e.message||e.error;return typeof o=="string"?{description:o,details:null}:{description:"Check details for response data.",details:JSON.stringify(e,null,2)}}return{description:null,details:null}}function _r(e){let o="Network/API Error",n=e.message,r=null,s=null;if(e.response){const{status:i,statusText:a,data:u}=e.response;n=`API Error: ${i} ${a}`;const c=kr(u);r=c.description??`Request failed with status code ${i}.`,s=`URL: ${e.config?.method?.toUpperCase()} ${e.config?.url}
|
|
558
|
+
Status: ${i} ${a}
|
|
559
|
+
Response Data:
|
|
560
|
+
${c.details??JSON.stringify(u,null,2)}`}else e.request?(o="Network Error",n="Network Error: Could not reach the server.",r="Please check your internet connection or contact support if the problem persists.",s=`URL: ${e.config?.method?.toUpperCase()} ${e.config?.url}
|
|
561
|
+
Error Message: ${e.message}`):n=`Request Setup Error: ${e.message}`;return e.code&&(o+=` (Code: ${e.code})`),{message:n,description:r,details:s,errorType:o}}function Er(e){return{message:e.message,description:null,details:e.stack??"No stack trace available.",errorType:e.name||"Error"}}function Mr(e){const o=e.message||e.error||"An object was thrown as an error.";let n;try{n=JSON.stringify(e,null,2)}catch{n="Could not stringify the error object."}return{message:o,description:null,details:n,errorType:"Object Error"}}function Lr(e){return jr(e)?_r(e):e instanceof Error?Er(e):typeof e=="string"?{message:e,description:null,details:null,errorType:"Message"}:typeof e=="object"&&e!==null?Mr(e):{message:"An unexpected error occurred.",description:null,details:null,errorType:"Unknown Error"}}const Tr=({children:e,header:o,defaultExpanded:n=!1})=>{const[r,s]=d.useState(n);return t.jsxs("div",{children:[t.jsx(vr,{$isActive:r,onClick:()=>s(!r),children:o}),t.jsx(yr,{$isVisible:r,children:e})]})},xo=({error:e,title:o="An Error Occurred",onClose:n,showDetailsDefault:r=!1})=>{if(!e)return t.jsx(t.Fragment,{});const{message:s,description:i,details:a,errorType:u}=Lr(e);return t.jsxs(hr,{type:"error",children:[t.jsxs(pr,{children:[t.jsxs(xr,{children:[t.jsx(fr,{children:"⚠️"}),o]}),n&&t.jsx(mr,{onClick:n,children:"✕"})]}),t.jsxs(gr,{children:[t.jsxs(Yt,{children:[t.jsxs(mo,{$strong:!0,children:[u,":"]})," ",s]}),i&&t.jsx(Yt,{children:t.jsx(Cr,{children:i})}),a&&t.jsx(br,{children:t.jsx(Tr,{header:"Details",defaultExpanded:r,children:t.jsx(wr,{children:a})})})]})]})},Ar={xsmall:l.css`
|
|
562
|
+
height: 32px;
|
|
563
|
+
padding: ${e=>e.$hasIconLeft&&e.$hasIconRight?"0 32px 0 32px":e.$hasIconLeft?"0 10px 0 32px":e.$hasIconRight?"0 32px 0 10px":"0 10px"};
|
|
564
|
+
`,small:l.css`
|
|
565
|
+
height: 36px;
|
|
566
|
+
padding: ${e=>e.$hasIconLeft&&e.$hasIconRight?"0 38px 0 38px":e.$hasIconLeft?"0 12px 0 38px":e.$hasIconRight?"0 38px 0 12px":"0 12px"};
|
|
567
|
+
`},Ir=l.div`
|
|
568
|
+
position: relative;
|
|
569
|
+
display: inline-flex;
|
|
570
|
+
align-items: center;
|
|
571
|
+
width: 100%;
|
|
572
|
+
gap: 8px;
|
|
573
|
+
`,Rr=l.input`
|
|
574
|
+
width: 100%;
|
|
575
|
+
border-radius: 6px;
|
|
576
|
+
font-family: "Inter", sans-serif;
|
|
577
|
+
font-size: 14px;
|
|
578
|
+
font-style: normal;
|
|
579
|
+
font-weight: 400;
|
|
580
|
+
line-height: 20px;
|
|
581
|
+
border: 1px solid
|
|
582
|
+
${e=>e.$error?"var(--red-error)":(e.disabled,"var(--grey-300)")};
|
|
583
|
+
background-color: ${e=>e.disabled?"var(--grey-200)":"var(--white-900)"};
|
|
584
|
+
color: ${e=>e.disabled?"var(--grey-400)":"var(--black-900)"};
|
|
585
|
+
transition: all 0.2s;
|
|
586
|
+
|
|
587
|
+
${e=>Ar[e.size||"small"]}
|
|
588
|
+
|
|
589
|
+
&:hover:not(:disabled):not(:focus) {
|
|
590
|
+
border-color: ${e=>e.$error?"var(--red-error)":"var(--blue-600)"};
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
&:focus {
|
|
594
|
+
outline: none;
|
|
595
|
+
box-shadow: 0px 0px 0px 1px var(--white-900),
|
|
596
|
+
0px 0px 0px 3px var(--blue-600);
|
|
597
|
+
border-color: ${e=>e.$error?"var(--red-error)":"var(--blue-600)"};
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
&:active {
|
|
601
|
+
outline: none;
|
|
602
|
+
box-shadow: 0px 0px 0px 2px var(--blue-200);
|
|
603
|
+
border-color: ${e=>e.$error?"var(--red-error)":"var(--blue-600)"};
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
&:disabled {
|
|
607
|
+
cursor: not-allowed;
|
|
608
|
+
user-select: none;
|
|
609
|
+
pointer-events: none;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
&::placeholder {
|
|
613
|
+
color: var(--grey-400);
|
|
614
|
+
}
|
|
615
|
+
`,Zt=l.div`
|
|
616
|
+
position: absolute;
|
|
617
|
+
display: flex;
|
|
618
|
+
align-items: center;
|
|
619
|
+
justify-content: center;
|
|
620
|
+
pointer-events: none;
|
|
621
|
+
color: var(--grey-400);
|
|
622
|
+
${e=>e.position==="left"?"left: 10px;":"right: 10px;"}
|
|
623
|
+
${e=>e.size==="xsmall"?"width: 16px; height: 16px;":"width: 20px; height: 20px;"}
|
|
624
|
+
`,We=({size:e="small",iconLeft:o,iconRight:n,error:r=!1,disabled:s=!1,ref:i,...a})=>t.jsxs(Ir,{size:e,disabled:s,$error:r,children:[o&&t.jsx(Zt,{position:"left",size:e,children:o}),t.jsx(Rr,{ref:i,size:e,$hasIconLeft:!!o,$hasIconRight:!!n,$error:r,disabled:s,...a}),n&&t.jsx(Zt,{position:"right",size:e,children:n})]}),Sr=l.div`
|
|
625
|
+
display: flex;
|
|
626
|
+
flex-direction: column;
|
|
627
|
+
gap: 4px;
|
|
628
|
+
`,$r=l.div`
|
|
629
|
+
display: flex;
|
|
630
|
+
align-items: center;
|
|
631
|
+
gap: 6px;
|
|
632
|
+
color: var(--grey-600);
|
|
633
|
+
text-overflow: ellipsis;
|
|
634
|
+
font-family: "Inter", sans-serif;
|
|
635
|
+
font-size: 13px;
|
|
636
|
+
font-style: normal;
|
|
637
|
+
font-weight: 400;
|
|
638
|
+
line-height: 18px;
|
|
639
|
+
`,Nr=()=>t.jsx(F,{name:$.INFORMATION_CIRCLE_MICRO,fill:"var(--grey-600)"}),Or=l.span`
|
|
640
|
+
display: inline-flex;
|
|
641
|
+
cursor: help;
|
|
642
|
+
`,bt=({children:e,infoText:o,className:n})=>t.jsx(Sr,{className:n,children:t.jsxs($r,{children:[e,o&&t.jsx(Ve,{content:o,placement:"bottom",children:t.jsx(Or,{children:t.jsx(Nr,{})})})]})}),Br={'code[class*="language-"]':{color:"#f8f8f2",background:"none",fontFamily:`"Fira Code", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace`,textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#2E3440",fontFamily:`"Fira Code", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace`,textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em"},':not(pre) > code[class*="language-"]':{background:"#2E3440",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#636f88"},prolog:{color:"#636f88"},doctype:{color:"#636f88"},cdata:{color:"#636f88"},punctuation:{color:"#81A1C1"},".namespace":{Opacity:".7"},property:{color:"#81A1C1"},tag:{color:"#81A1C1"},constant:{color:"#81A1C1"},symbol:{color:"#81A1C1"},deleted:{color:"#81A1C1"},number:{color:"#B48EAD"},boolean:{color:"#81A1C1"},selector:{color:"#A3BE8C"},"attr-name":{color:"#A3BE8C"},string:{color:"#A3BE8C"},char:{color:"#A3BE8C"},builtin:{color:"#A3BE8C"},inserted:{color:"#A3BE8C"},operator:{color:"#81A1C1"},entity:{color:"#81A1C1",cursor:"help"},url:{color:"#81A1C1"},".language-css .token.string":{color:"#81A1C1"},".style .token.string":{color:"#81A1C1"},variable:{color:"#81A1C1"},atrule:{color:"#88C0D0"},"attr-value":{color:"#88C0D0"},function:{color:"#88C0D0"},"class-name":{color:"#88C0D0"},keyword:{color:"#81A1C1"},regex:{color:"#EBCB8B"},important:{color:"#EBCB8B",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}},Pr=2e3,Hr=l.code`
|
|
643
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
644
|
+
border-radius: 3px;
|
|
645
|
+
font-family: "Courier New", Courier, monospace;
|
|
646
|
+
padding: 0.2em 0.4em;
|
|
647
|
+
font-size: 85%;
|
|
648
|
+
`,Dr=({inline:e,className:o,children:n,...r})=>{const s=/language-(\w+)/.exec(o||""),i=s?s[1]:void 0,a=String(n).replace(/\n$/,""),[u,c]=d.useState(!1),h=b=>{console.log(b)},f=async()=>{if(!navigator.clipboard){console.error("Clipboard API not available."),h("Clipboard access not available or denied.");return}try{await navigator.clipboard.writeText(a),c(!0),h("Code copied to clipboard!"),setTimeout(()=>c(!1),Pr)}catch(b){console.error("Failed to copy code: ",b),c(!1)}};return!e&&s?t.jsxs("div",{className:"code-block-container",children:[t.jsx("div",{className:"copy-button-wrapper",children:t.jsx(ae,{size:"small",leftIcon:t.jsx(F,{name:$.COPY}),onClick:f,"aria-label":"Copy code to clipboard",children:u?"Copied!":"Copy"})}),d.createElement(Uo.Prism,{style:Br,language:i,PreTag:"div",children:a})]}):t.jsx(Hr,{...r,children:n})},zr=({markdown:e,codeRenderer:o})=>t.jsx(Go,{remarkPlugins:[Fo],rehypePlugins:[Vo],components:{code:o||Dr},children:e}),Gr=l.div`
|
|
649
|
+
display: flex;
|
|
650
|
+
align-items: center;
|
|
651
|
+
justify-content: space-between;
|
|
652
|
+
font-size: 14px;
|
|
653
|
+
gap: 10px;
|
|
654
|
+
color: ${e=>e.$active?"var(--blue-900)":"var(--grey-600)"};
|
|
655
|
+
cursor: pointer;
|
|
656
|
+
transition: all 0.2s;
|
|
657
|
+
user-select: none;
|
|
658
|
+
border-bottom: 1px solid var(--grey-200);
|
|
659
|
+
background-color: ${e=>e.$active?"var(--grey-100)":"var(--white-900)"};
|
|
660
|
+
padding: ${e=>e.$showCheckbox?"0":"12px 16px"};
|
|
661
|
+
|
|
662
|
+
&:hover {
|
|
663
|
+
background-color: ${e=>e.$active?"var(--grey-100)":"var(--grey-50)"};
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
&:last-child {
|
|
667
|
+
border-bottom: none;
|
|
668
|
+
}
|
|
669
|
+
`,Ur=l.div`
|
|
670
|
+
display: flex;
|
|
671
|
+
align-items: center;
|
|
672
|
+
gap: 12px;
|
|
673
|
+
flex: 1;
|
|
674
|
+
`,Vr=l.div`
|
|
675
|
+
display: flex;
|
|
676
|
+
align-items: center;
|
|
677
|
+
justify-content: flex-start;
|
|
678
|
+
flex: 1;
|
|
679
|
+
width: 100%;
|
|
680
|
+
`,go=({label:e,checked:o=!1,showCheckbox:n=!1,onClick:r,onCheckChange:s,active:i=!1,className:a,ref:u})=>{const c=()=>{console.log("MenuItem clicked!"),r&&r()},h=b=>{console.log("Checkbox changed:",b),s&&s(b)},f=b=>{console.log("Checkbox clicked!"),b.stopPropagation()};return t.jsxs(Gr,{ref:u,$active:i,$showCheckbox:n,className:a,onClick:c,role:"button",tabIndex:0,children:[!n&&t.jsx(Ur,{children:e}),n&&t.jsx(Vr,{onClick:f,children:t.jsx(Ue,{checked:o,onChange:h,onClick:f,label:e})})]})},Wt=300,Fr=l.createGlobalStyle`
|
|
681
|
+
body.stop-scrolling {
|
|
682
|
+
overflow: hidden;
|
|
683
|
+
}
|
|
684
|
+
`,Yr=l.keyframes`
|
|
685
|
+
from {
|
|
686
|
+
opacity: 0;
|
|
687
|
+
}
|
|
688
|
+
to {
|
|
689
|
+
opacity: 1;
|
|
690
|
+
}
|
|
691
|
+
`,Zr=l.keyframes`
|
|
692
|
+
from {
|
|
693
|
+
opacity: 1;
|
|
694
|
+
}
|
|
695
|
+
to {
|
|
696
|
+
opacity: 0;
|
|
697
|
+
}
|
|
698
|
+
`,Wr=l.keyframes`
|
|
699
|
+
from {
|
|
700
|
+
opacity: 0;
|
|
701
|
+
}
|
|
702
|
+
to {
|
|
703
|
+
opacity: 1;
|
|
704
|
+
}
|
|
705
|
+
`,Kr=l.keyframes`
|
|
706
|
+
from {
|
|
707
|
+
opacity: 1;
|
|
708
|
+
}
|
|
709
|
+
to {
|
|
710
|
+
opacity: 0;
|
|
711
|
+
}
|
|
712
|
+
`,Xr=l.div`
|
|
713
|
+
position: fixed;
|
|
714
|
+
top: 0;
|
|
715
|
+
right: 0;
|
|
716
|
+
bottom: 0;
|
|
717
|
+
left: 0;
|
|
718
|
+
z-index: 10000;
|
|
719
|
+
animation: ${e=>e.$isFadeOut?Zr:Yr} 0.3s
|
|
720
|
+
ease forwards;
|
|
721
|
+
display: flex;
|
|
722
|
+
align-items: center;
|
|
723
|
+
justify-content: center;
|
|
724
|
+
`,qr=l.button`
|
|
725
|
+
background-color: var(--black-500);
|
|
726
|
+
position: absolute;
|
|
727
|
+
top: 0;
|
|
728
|
+
right: 0;
|
|
729
|
+
bottom: 0;
|
|
730
|
+
left: 0;
|
|
731
|
+
backdrop-filter: blur(2px);
|
|
732
|
+
box-shadow: none;
|
|
733
|
+
border: none;
|
|
734
|
+
height: 100%;
|
|
735
|
+
animation: ${e=>e.$isFadeOut?Kr:Wr}
|
|
736
|
+
0.3s ease forwards;
|
|
737
|
+
`,Qr=l.div`
|
|
738
|
+
position: relative;
|
|
739
|
+
background: var(--theme-background, var(--white-900));
|
|
740
|
+
border-radius: var(--theme-radius-large, 16px);
|
|
741
|
+
width: ${e=>e.width||"480px"};
|
|
742
|
+
max-width: 90vw;
|
|
743
|
+
padding: 0;
|
|
744
|
+
box-shadow: 0px 4px 12px 0px var(--black-100),
|
|
745
|
+
0px 2px 4px -2px var(--black-100);
|
|
746
|
+
z-index: 1;
|
|
747
|
+
transform: ${e=>e.$isFadeOut?"scale(0.95)":"scale(1)"};
|
|
748
|
+
opacity: ${e=>e.$isFadeOut?0:1};
|
|
749
|
+
transition: transform 0.3s ease-out, opacity 0.3s ease-out;
|
|
750
|
+
max-height: 90vh;
|
|
751
|
+
display: flex;
|
|
752
|
+
flex-direction: column;
|
|
753
|
+
|
|
754
|
+
@media (max-width: 767px) {
|
|
755
|
+
width: calc(100% - 40px) !important;
|
|
756
|
+
}
|
|
757
|
+
`,Jr=l.div`
|
|
758
|
+
display: flex;
|
|
759
|
+
flex-direction: row;
|
|
760
|
+
justify-content: space-between;
|
|
761
|
+
align-items: center;
|
|
762
|
+
padding: 12px 24px;
|
|
763
|
+
border-bottom: 1px solid var(--grey-100);
|
|
764
|
+
`,es=l.h3`
|
|
765
|
+
margin: 0;
|
|
766
|
+
font-family: "Inter", sans-serif;
|
|
767
|
+
font-size: 18px;
|
|
768
|
+
font-style: normal;
|
|
769
|
+
font-weight: 500;
|
|
770
|
+
line-height: 28px;
|
|
771
|
+
color: var(--black-900);
|
|
772
|
+
`,Kt=l.button`
|
|
773
|
+
background: none;
|
|
774
|
+
border: none;
|
|
775
|
+
cursor: pointer;
|
|
776
|
+
padding: 0;
|
|
777
|
+
display: flex;
|
|
778
|
+
align-items: center;
|
|
779
|
+
justify-content: center;
|
|
780
|
+
color: var(--black-900);
|
|
781
|
+
width: 24px;
|
|
782
|
+
height: 24px;
|
|
783
|
+
${e=>e.$absolute&&`
|
|
784
|
+
position: absolute;
|
|
785
|
+
top: 16px;
|
|
786
|
+
right: 16px;
|
|
787
|
+
`}
|
|
788
|
+
|
|
789
|
+
&:hover {
|
|
790
|
+
color: var(--black-900);
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
svg {
|
|
794
|
+
width: 20px;
|
|
795
|
+
height: 20px;
|
|
796
|
+
}
|
|
797
|
+
`,ts=l.div`
|
|
798
|
+
padding: 12px;
|
|
799
|
+
display: flex;
|
|
800
|
+
justify-content: flex-end;
|
|
801
|
+
gap: 12px;
|
|
802
|
+
|
|
803
|
+
@media (max-width: 767px) {
|
|
804
|
+
justify-content: center !important;
|
|
805
|
+
|
|
806
|
+
.button {
|
|
807
|
+
display: flex !important;
|
|
808
|
+
width: 100%;
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
`,os=l.div`
|
|
812
|
+
color: var(--grey-500);
|
|
813
|
+
font-family: "Inter", sans-serif;
|
|
814
|
+
font-size: 14px;
|
|
815
|
+
font-style: normal;
|
|
816
|
+
font-weight: 400;
|
|
817
|
+
line-height: 20px;
|
|
818
|
+
margin: 0 24px;
|
|
819
|
+
overflow-y: auto;
|
|
820
|
+
flex: 1;
|
|
821
|
+
max-height: calc(90vh - 140px); /* Account for header and footer */
|
|
822
|
+
`,vt=({isOpen:e,onClose:o,onCloseLabel:n,onConfirm:r,onConfirmLabel:s,children:i,width:a="400px",className:u="",hideActions:c=!1,title:h})=>{const[f,b]=d.useState(!1),[x,E]=d.useState(!1),y=d.useRef(null);d.useEffect(()=>{if(e)b(!0),E(!1);else{if(!f)return;E(!0),y.current=setTimeout(()=>{b(!1)},Wt)}return()=>{y.current&&clearTimeout(y.current)}},[e,f]),d.useEffect(()=>(f?typeof document<"u"&&document.body.classList.add("stop-scrolling"):typeof document<"u"&&document.body.classList.remove("stop-scrolling"),()=>{typeof document<"u"&&document.body.classList.remove("stop-scrolling")}),[f]);const _=()=>{E(!0),y.current=setTimeout(()=>{o()},Wt)};return f&&t.jsxs(t.Fragment,{children:[t.jsx(Fr,{}),t.jsxs(Xr,{$isFadeOut:x,className:u,children:[t.jsx(qr,{$isFadeOut:x,onClick:_}),t.jsxs(Qr,{$isFadeOut:x,width:a,children:[h&&t.jsxs(Jr,{children:[t.jsx(es,{children:h}),t.jsx(Kt,{onClick:_,children:t.jsx(F,{name:$.CLOSE})})]}),!h&&t.jsx(Kt,{$absolute:!0,onClick:_,children:t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),t.jsx(os,{children:i}),!c&&t.jsxs(ts,{children:[t.jsx(ae,{variant:"tertiary",onClick:_,className:"button",size:"medium",fullWidth:!0,children:n||"Cancel"}),t.jsx(ae,{variant:"primary",onClick:r,className:"button",size:"medium",fullWidth:!0,children:s||"Confirm"})]})]})]})]})},ns=l.div`
|
|
823
|
+
position: absolute;
|
|
824
|
+
background-color: var(--white-900);
|
|
825
|
+
border-radius: 8px;
|
|
826
|
+
box-shadow: 0 3px 6px -4px var(--black-200), 0 6px 16px 0 var(--black-100),
|
|
827
|
+
0 9px 28px 8px var(--black-50);
|
|
828
|
+
z-index: 1000;
|
|
829
|
+
max-width: 450px;
|
|
830
|
+
min-width: 400px;
|
|
831
|
+
opacity: 0;
|
|
832
|
+
visibility: hidden;
|
|
833
|
+
transition: opacity 0.2s, visibility 0.2s;
|
|
834
|
+
user-select: none;
|
|
835
|
+
padding: 0;
|
|
836
|
+
font-family: "Inter", sans-serif;
|
|
837
|
+
|
|
838
|
+
${e=>e.$isVisible&&l.css`
|
|
839
|
+
opacity: 1;
|
|
840
|
+
visibility: visible;
|
|
841
|
+
`}
|
|
842
|
+
|
|
843
|
+
${e=>{switch(e.placement){case"top":return l.css`
|
|
844
|
+
bottom: 100%;
|
|
845
|
+
left: 50%;
|
|
846
|
+
transform: translateX(-50%) translateY(-15px);
|
|
847
|
+
|
|
848
|
+
&::after {
|
|
849
|
+
content: "";
|
|
850
|
+
position: absolute;
|
|
851
|
+
top: 100%;
|
|
852
|
+
left: 50%;
|
|
853
|
+
margin-left: -6px;
|
|
854
|
+
border-width: 6px;
|
|
855
|
+
border-style: solid;
|
|
856
|
+
border-color: var(--white-900) transparent transparent transparent;
|
|
857
|
+
}
|
|
858
|
+
`;case"topLeft":return l.css`
|
|
859
|
+
bottom: 100%;
|
|
860
|
+
left: 0;
|
|
861
|
+
transform: translateY(-15px);
|
|
862
|
+
|
|
863
|
+
&::after {
|
|
864
|
+
content: "";
|
|
865
|
+
position: absolute;
|
|
866
|
+
top: 100%;
|
|
867
|
+
left: 12px;
|
|
868
|
+
border-width: 6px;
|
|
869
|
+
border-style: solid;
|
|
870
|
+
border-color: var(--white-900) transparent transparent transparent;
|
|
871
|
+
}
|
|
872
|
+
`;case"topRight":return l.css`
|
|
873
|
+
bottom: 100%;
|
|
874
|
+
right: 0;
|
|
875
|
+
transform: translateY(-15px);
|
|
876
|
+
|
|
877
|
+
&::after {
|
|
878
|
+
content: "";
|
|
879
|
+
position: absolute;
|
|
880
|
+
top: 100%;
|
|
881
|
+
right: 12px;
|
|
882
|
+
border-width: 6px;
|
|
883
|
+
border-style: solid;
|
|
884
|
+
border-color: var(--white-900) transparent transparent transparent;
|
|
885
|
+
}
|
|
886
|
+
`;case"left":return l.css`
|
|
887
|
+
top: 50%;
|
|
888
|
+
right: 100%;
|
|
889
|
+
transform: translateY(-50%) translateX(-15px);
|
|
890
|
+
|
|
891
|
+
&::after {
|
|
892
|
+
content: "";
|
|
893
|
+
position: absolute;
|
|
894
|
+
top: 50%;
|
|
895
|
+
left: 100%;
|
|
896
|
+
margin-top: -6px;
|
|
897
|
+
border-width: 6px;
|
|
898
|
+
border-style: solid;
|
|
899
|
+
border-color: transparent transparent transparent var(--white-900);
|
|
900
|
+
}
|
|
901
|
+
`;case"leftTop":return l.css`
|
|
902
|
+
top: 0;
|
|
903
|
+
right: 100%;
|
|
904
|
+
transform: translateX(-15px);
|
|
905
|
+
|
|
906
|
+
&::after {
|
|
907
|
+
content: "";
|
|
908
|
+
position: absolute;
|
|
909
|
+
top: 12px;
|
|
910
|
+
left: 100%;
|
|
911
|
+
border-width: 6px;
|
|
912
|
+
border-style: solid;
|
|
913
|
+
border-color: transparent transparent transparent var(--white-900);
|
|
914
|
+
}
|
|
915
|
+
`;case"leftBottom":return l.css`
|
|
916
|
+
bottom: 0;
|
|
917
|
+
right: 100%;
|
|
918
|
+
transform: translateX(-15px);
|
|
919
|
+
|
|
920
|
+
&::after {
|
|
921
|
+
content: "";
|
|
922
|
+
position: absolute;
|
|
923
|
+
bottom: 12px;
|
|
924
|
+
left: 100%;
|
|
925
|
+
border-width: 6px;
|
|
926
|
+
border-style: solid;
|
|
927
|
+
border-color: transparent transparent transparent var(--white-900);
|
|
928
|
+
}
|
|
929
|
+
`;case"right":return l.css`
|
|
930
|
+
top: 50%;
|
|
931
|
+
left: 100%;
|
|
932
|
+
transform: translateY(-50%) translateX(15px);
|
|
933
|
+
|
|
934
|
+
&::after {
|
|
935
|
+
content: "";
|
|
936
|
+
position: absolute;
|
|
937
|
+
top: 50%;
|
|
938
|
+
right: 100%;
|
|
939
|
+
margin-top: -6px;
|
|
940
|
+
border-width: 6px;
|
|
941
|
+
border-style: solid;
|
|
942
|
+
border-color: transparent var(--white-900) transparent transparent;
|
|
943
|
+
}
|
|
944
|
+
`;case"rightTop":return l.css`
|
|
945
|
+
top: 0;
|
|
946
|
+
left: 100%;
|
|
947
|
+
transform: translateX(15px);
|
|
948
|
+
|
|
949
|
+
&::after {
|
|
950
|
+
content: "";
|
|
951
|
+
position: absolute;
|
|
952
|
+
top: 12px;
|
|
953
|
+
right: 100%;
|
|
954
|
+
border-width: 6px;
|
|
955
|
+
border-style: solid;
|
|
956
|
+
border-color: transparent var(--white-900) transparent transparent;
|
|
957
|
+
}
|
|
958
|
+
`;case"rightBottom":return l.css`
|
|
959
|
+
bottom: 0;
|
|
960
|
+
left: 100%;
|
|
961
|
+
transform: translateX(15px);
|
|
962
|
+
|
|
963
|
+
&::after {
|
|
964
|
+
content: "";
|
|
965
|
+
position: absolute;
|
|
966
|
+
bottom: 12px;
|
|
967
|
+
right: 100%;
|
|
968
|
+
border-width: 6px;
|
|
969
|
+
border-style: solid;
|
|
970
|
+
border-color: transparent var(--white-900) transparent transparent;
|
|
971
|
+
}
|
|
972
|
+
`;case"bottom":return l.css`
|
|
973
|
+
top: 100%;
|
|
974
|
+
left: 50%;
|
|
975
|
+
transform: translateX(-50%) translateY(15px);
|
|
976
|
+
|
|
977
|
+
&::after {
|
|
978
|
+
content: "";
|
|
979
|
+
position: absolute;
|
|
980
|
+
bottom: 100%;
|
|
981
|
+
left: 50%;
|
|
982
|
+
margin-left: -6px;
|
|
983
|
+
border-width: 6px;
|
|
984
|
+
border-style: solid;
|
|
985
|
+
border-color: transparent transparent var(--white-900) transparent;
|
|
986
|
+
}
|
|
987
|
+
`;case"bottomLeft":return l.css`
|
|
988
|
+
top: 100%;
|
|
989
|
+
left: 0;
|
|
990
|
+
transform: translateY(15px);
|
|
991
|
+
|
|
992
|
+
&::after {
|
|
993
|
+
content: "";
|
|
994
|
+
position: absolute;
|
|
995
|
+
bottom: 100%;
|
|
996
|
+
left: 12px;
|
|
997
|
+
border-width: 6px;
|
|
998
|
+
border-style: solid;
|
|
999
|
+
border-color: transparent transparent var(--white-900) transparent;
|
|
1000
|
+
}
|
|
1001
|
+
`;case"bottomRight":return l.css`
|
|
1002
|
+
top: 100%;
|
|
1003
|
+
right: 0;
|
|
1004
|
+
transform: translateY(15px);
|
|
1005
|
+
|
|
1006
|
+
&::after {
|
|
1007
|
+
content: "";
|
|
1008
|
+
position: absolute;
|
|
1009
|
+
bottom: 100%;
|
|
1010
|
+
right: 12px;
|
|
1011
|
+
border-width: 6px;
|
|
1012
|
+
border-style: solid;
|
|
1013
|
+
border-color: transparent transparent var(--white-900) transparent;
|
|
1014
|
+
}
|
|
1015
|
+
`;default:return""}}}
|
|
1016
|
+
`,rs=l.div`
|
|
1017
|
+
padding: 12px 16px;
|
|
1018
|
+
color: var(--black-800);
|
|
1019
|
+
font-weight: 600;
|
|
1020
|
+
font-size: 14px;
|
|
1021
|
+
border-bottom: 1px solid var(--grey-100);
|
|
1022
|
+
`,ss=l.div`
|
|
1023
|
+
padding: 12px 16px;
|
|
1024
|
+
color: var(--grey-600);
|
|
1025
|
+
font-size: 14px;
|
|
1026
|
+
`,is=l.div`
|
|
1027
|
+
display: flex;
|
|
1028
|
+
justify-content: flex-end;
|
|
1029
|
+
gap: 8px;
|
|
1030
|
+
padding: 8px 16px 12px;
|
|
1031
|
+
`,as=l.div`
|
|
1032
|
+
position: relative;
|
|
1033
|
+
display: inline-block;
|
|
1034
|
+
`,Co=({title:e,description:o,onConfirm:n,onCancel:r,okText:s="OK",cancelText:i="Cancel",placement:a="top",children:u,className:c,okButtonProps:h,cancelButtonProps:f,...b})=>{const[x,E]=d.useState(!1),y=d.useRef(null);d.useEffect(()=>{const v=g=>{y.current&&!y.current.contains(g.target)&&E(!1)};return x&&document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[x]);const _=v=>{E(!1),n?.(v)},M=v=>{E(!1),r?.(v)},w=()=>{E(!x)},m=v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),w())};return t.jsxs(as,{ref:y,className:c,...b,children:[t.jsx("div",{onClick:w,onKeyDown:m,role:"button",tabIndex:0,children:u}),t.jsxs(ns,{placement:a,$isVisible:x,children:[e&&t.jsx(rs,{children:e}),o&&t.jsx(ss,{children:o}),t.jsxs(is,{children:[t.jsx(ae,{variant:"tertiary",size:"small",onClick:M,...f,children:i}),t.jsx(ae,{variant:"primary",size:"small",onClick:_,...h,children:s})]})]})]})};Co.displayName="PopConfirm";const ls=l.div`
|
|
1035
|
+
display: flex;
|
|
1036
|
+
align-items: center;
|
|
1037
|
+
gap: 6px;
|
|
1038
|
+
color: var(--grey-600);
|
|
1039
|
+
text-overflow: ellipsis;
|
|
1040
|
+
font-family: "Inter", sans-serif;
|
|
1041
|
+
font-size: 13px;
|
|
1042
|
+
font-style: normal;
|
|
1043
|
+
font-weight: 400;
|
|
1044
|
+
line-height: 18px;
|
|
1045
|
+
`,cs=()=>t.jsx(F,{name:$.CHECK_CIRCLE,fill:"var(--grey-600)"}),yt=({children:e,showCheck:o=!1,className:n})=>t.jsxs(ls,{className:n,children:[o&&t.jsx(cs,{}),e]}),ds={small:l.css`
|
|
1046
|
+
font-family: "Inter", sans-serif;
|
|
1047
|
+
font-size: 14px;
|
|
1048
|
+
font-style: normal;
|
|
1049
|
+
font-weight: 600;
|
|
1050
|
+
line-height: 20px;
|
|
1051
|
+
`,medium:l.css`
|
|
1052
|
+
font-family: "Inter", sans-serif;
|
|
1053
|
+
font-size: 16px;
|
|
1054
|
+
font-style: normal;
|
|
1055
|
+
font-weight: 500;
|
|
1056
|
+
line-height: 24px;
|
|
1057
|
+
`},us=l.button`
|
|
1058
|
+
position: relative;
|
|
1059
|
+
display: inline-flex;
|
|
1060
|
+
align-items: center;
|
|
1061
|
+
justify-content: center;
|
|
1062
|
+
padding: 12px 16px;
|
|
1063
|
+
background: transparent;
|
|
1064
|
+
border: none;
|
|
1065
|
+
outline: none;
|
|
1066
|
+
cursor: ${e=>e.disabled?"not-allowed":"pointer"};
|
|
1067
|
+
${e=>ds[e.size]}
|
|
1068
|
+
color: ${e=>e.disabled?"var(--grey-400)":e.$active?"var(--blue-900)":"var(--grey-500)"};
|
|
1069
|
+
transition: all 0.2s ease;
|
|
1070
|
+
|
|
1071
|
+
&:hover:not(:disabled) {
|
|
1072
|
+
color: var(--blue-900);
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
&:after {
|
|
1076
|
+
content: "";
|
|
1077
|
+
position: absolute;
|
|
1078
|
+
width: 100%;
|
|
1079
|
+
height: 3px;
|
|
1080
|
+
background-color: ${e=>e.disabled?"var(--grey-400)":"var(--blue-900)"};
|
|
1081
|
+
bottom: 0;
|
|
1082
|
+
left: 0;
|
|
1083
|
+
opacity: ${e=>e.$active?1:0};
|
|
1084
|
+
transition: opacity 0.2s ease;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
&:focus {
|
|
1088
|
+
outline: none;
|
|
1089
|
+
box-shadow: none;
|
|
1090
|
+
}
|
|
1091
|
+
`,bo=({label:e,active:o=!1,disabled:n=!1,size:r="medium",onClick:s})=>t.jsx(us,{$active:o,disabled:n,size:r,onClick:s,children:e}),hs=l.td`
|
|
1092
|
+
background-color: var(--white-900);
|
|
1093
|
+
border-right: 1px solid var(--grey-200);
|
|
1094
|
+
border-bottom: 1px solid var(--grey-200);
|
|
1095
|
+
padding: 10px 12px;
|
|
1096
|
+
font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
1097
|
+
font-size: 14px;
|
|
1098
|
+
font-weight: 400;
|
|
1099
|
+
line-height: 20px;
|
|
1100
|
+
color: var(--grey-900);
|
|
1101
|
+
opacity: 0.8;
|
|
1102
|
+
text-align: ${e=>e.align||"left"};
|
|
1103
|
+
width: ${e=>e.width||"auto"};
|
|
1104
|
+
white-space: nowrap;
|
|
1105
|
+
box-sizing: border-box;
|
|
1106
|
+
|
|
1107
|
+
&:last-child {
|
|
1108
|
+
border-right: 1px solid var(--grey-200);
|
|
1109
|
+
}
|
|
1110
|
+
`,wt=({children:e,align:o="left",width:n,className:r,ref:s,...i})=>t.jsx(hs,{ref:s,align:o,width:n,className:r,...i,children:e}),Xt=l.th`
|
|
1111
|
+
background-color: var(--grey-50);
|
|
1112
|
+
border-right: 1px solid var(--grey-200);
|
|
1113
|
+
border-bottom: 1px solid var(--grey-200);
|
|
1114
|
+
padding: 8px 12px;
|
|
1115
|
+
height: 35px;
|
|
1116
|
+
box-sizing: border-box;
|
|
1117
|
+
width: ${e=>e.width||"auto"};
|
|
1118
|
+
|
|
1119
|
+
&:last-child {
|
|
1120
|
+
border-right: 1px solid var(--grey-200);
|
|
1121
|
+
}
|
|
1122
|
+
`,ps=l.div`
|
|
1123
|
+
display: flex;
|
|
1124
|
+
align-items: center;
|
|
1125
|
+
gap: 4px;
|
|
1126
|
+
cursor: ${e=>e.$clickable?"pointer":"default"};
|
|
1127
|
+
user-select: none;
|
|
1128
|
+
`,fs=l.span`
|
|
1129
|
+
font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
1130
|
+
font-size: 13px;
|
|
1131
|
+
font-weight: 600;
|
|
1132
|
+
line-height: 18px;
|
|
1133
|
+
color: var(--grey-900);
|
|
1134
|
+
white-space: nowrap;
|
|
1135
|
+
flex-shrink: 0;
|
|
1136
|
+
`,ms=l.svg`
|
|
1137
|
+
width: 16px;
|
|
1138
|
+
height: 16px;
|
|
1139
|
+
flex-shrink: 0;
|
|
1140
|
+
`,xs=l.div`
|
|
1141
|
+
padding: 10px 4px;
|
|
1142
|
+
height: 35px;
|
|
1143
|
+
box-sizing: border-box;
|
|
1144
|
+
display: flex;
|
|
1145
|
+
align-items: center;
|
|
1146
|
+
justify-content: flex-start;
|
|
1147
|
+
|
|
1148
|
+
& > div {
|
|
1149
|
+
height: 32px;
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
li {
|
|
1153
|
+
text-align: left;
|
|
1154
|
+
}
|
|
1155
|
+
`,jt=({children:e,sortable:o=!1,sortDirection:n=null,onSort:r,filterable:s=!1,filterOptions:i=[],filterValue:a,onFilterChange:u,width:c,className:h,ref:f,...b})=>{const x=()=>{o&&r&&r()};return s?t.jsx(Xt,{ref:f,width:c,className:h,...b,children:t.jsx(xs,{children:t.jsx(Le,{options:i,value:a,onChange:u,placeholder:"Placeholder",size:"small",width:"100%"})})}):t.jsx(Xt,{ref:f,width:c,className:h,...b,children:t.jsxs(ps,{$clickable:o,onClick:x,children:[t.jsx(fs,{children:e}),o&&t.jsxs(ms,{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M8 3.33337L10.6667 6.00004H5.33333L8 3.33337Z",fill:n==="asc"?"var(--grey-900)":"var(--grey-400)"}),t.jsx("path",{d:"M8 12.6667L5.33333 10H10.6667L8 12.6667Z",fill:n==="desc"?"var(--grey-900)":"var(--grey-400)"})]})]})})},gs={xsmall:l.css`
|
|
1156
|
+
min-height: ${e=>e.rows?"auto":"80px"};
|
|
1157
|
+
padding: 10px;
|
|
1158
|
+
`,small:l.css`
|
|
1159
|
+
min-height: ${e=>e.rows?"auto":"100px"};
|
|
1160
|
+
padding: 12px;
|
|
1161
|
+
`},Cs=l.div`
|
|
1162
|
+
position: relative;
|
|
1163
|
+
display: inline-flex;
|
|
1164
|
+
align-items: center;
|
|
1165
|
+
width: ${e=>e.$fullWidth?"100%":"auto"};
|
|
1166
|
+
gap: 8px;
|
|
1167
|
+
`,bs=l.textarea`
|
|
1168
|
+
width: 100%;
|
|
1169
|
+
border-radius: 6px;
|
|
1170
|
+
font-family: "Inter", sans-serif;
|
|
1171
|
+
font-style: normal;
|
|
1172
|
+
font-weight: 400;
|
|
1173
|
+
line-height: 20px;
|
|
1174
|
+
border: 1px solid
|
|
1175
|
+
${e=>e.$error?"var(--red-error)":(e.disabled,"var(--grey-300)")};
|
|
1176
|
+
background-color: ${e=>e.disabled?"var(--grey-200)":"var(--white-900)"};
|
|
1177
|
+
color: ${e=>e.disabled?"var(--grey-400)":"var(--black-900)"};
|
|
1178
|
+
transition: all 0.2s;
|
|
1179
|
+
resize: vertical;
|
|
1180
|
+
font-size: 14px;
|
|
1181
|
+
|
|
1182
|
+
${e=>gs[e.size||"small"]}
|
|
1183
|
+
|
|
1184
|
+
&:hover:not(:disabled):not(:focus) {
|
|
1185
|
+
border-color: ${e=>e.$error?"var(--red-error)":"var(--blue-600)"};
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
&:focus {
|
|
1189
|
+
outline: none;
|
|
1190
|
+
box-shadow: 0px 0px 0px 1px var(--white-900),
|
|
1191
|
+
0px 0px 0px 3px var(--blue-600);
|
|
1192
|
+
border-color: ${e=>e.$error?"var(--red-error)":"var(--blue-600)"};
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
&:active {
|
|
1196
|
+
outline: none;
|
|
1197
|
+
box-shadow: 0px 0px 0px 2px var(--blue-200);
|
|
1198
|
+
border-color: ${e=>e.$error?"var(--red-error)":"var(--blue-600)"};
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
&:disabled {
|
|
1202
|
+
cursor: not-allowed;
|
|
1203
|
+
user-select: none;
|
|
1204
|
+
pointer-events: none;
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
&::placeholder {
|
|
1208
|
+
color: var(--grey-400);
|
|
1209
|
+
}
|
|
1210
|
+
`,vs=({size:e="small",error:o=!1,disabled:n=!1,fullWidth:r=!1,rows:s,ref:i,...a})=>t.jsx(Cs,{$fullWidth:r,children:t.jsx(bs,{ref:i,size:e,$error:o,disabled:n,rows:s,...a})}),ft={info:{backgroundColor:"var(--blue-100)",borderColor:"var(--blue-600)",iconColor:"var(--blue-600)"},success:{backgroundColor:"var(--green-bg)",borderColor:"var(--green-success)",iconColor:"var(--green-success)"},warning:{backgroundColor:"var(--orange-bg)",borderColor:"var(--orange-caution)",iconColor:"var(--orange-caution)"},danger:{backgroundColor:"var(--red-bg)",borderColor:"var(--red-error)",iconColor:"var(--red-error)"},default:{backgroundColor:"var(--white-900)",borderColor:"var(--grey-300)",iconColor:"var(--grey-600)"}},ys=l.div`
|
|
1211
|
+
display: flex;
|
|
1212
|
+
padding: 8px;
|
|
1213
|
+
gap: 8px;
|
|
1214
|
+
align-items: flex-start;
|
|
1215
|
+
border-radius: 8px;
|
|
1216
|
+
background-color: ${e=>ft[e.type].backgroundColor};
|
|
1217
|
+
border: 1px solid ${e=>ft[e.type].borderColor};
|
|
1218
|
+
width: 100%;
|
|
1219
|
+
box-sizing: border-box;
|
|
1220
|
+
`,ws=l.div`
|
|
1221
|
+
display: flex;
|
|
1222
|
+
flex-direction: column;
|
|
1223
|
+
gap: 4px;
|
|
1224
|
+
flex: 1;
|
|
1225
|
+
`,js=l.h3`
|
|
1226
|
+
margin: 0;
|
|
1227
|
+
color: var(--black-900);
|
|
1228
|
+
font-family: "Inter", sans-serif;
|
|
1229
|
+
font-size: 16px;
|
|
1230
|
+
font-style: normal;
|
|
1231
|
+
font-weight: 400;
|
|
1232
|
+
line-height: 24px;
|
|
1233
|
+
`,ks=l.p`
|
|
1234
|
+
margin: 0;
|
|
1235
|
+
color: var(--grey-500);
|
|
1236
|
+
text-overflow: ellipsis;
|
|
1237
|
+
font-family: "Inter", sans-serif;
|
|
1238
|
+
font-size: 13px;
|
|
1239
|
+
font-style: normal;
|
|
1240
|
+
font-weight: 400;
|
|
1241
|
+
line-height: 18px;
|
|
1242
|
+
`,_s=({color:e})=>t.jsx(F,{name:$.INFORMATION_CIRCLE,fill:e}),Es=({color:e})=>t.jsx(F,{name:$.CHECK_CIRCLE,fill:e}),Ms=({color:e})=>t.jsx(F,{name:$.EXCLAMATION_TRIANGLE,fill:e}),Ls=({color:e})=>t.jsx(F,{name:$.EXCLAMATION_CIRCLE,fill:e}),Ts=({color:e})=>t.jsx(F,{name:$.EXCLAMATION_TRIANGLE,fill:e}),As=(e,o)=>{switch(e){case"info":return t.jsx(_s,{color:o});case"success":return t.jsx(Es,{color:o});case"warning":return t.jsx(Ms,{color:o});case"danger":return t.jsx(Ls,{color:o});default:return t.jsx(Ts,{color:o})}},Re=({type:e="default",heading:o,description:n,className:r})=>t.jsxs(ys,{type:e,className:r,children:[As(e,ft[e].iconColor),t.jsxs(ws,{children:[t.jsx(js,{children:o}),n&&t.jsx(ks,{children:n})]})]}),Is=l.div`
|
|
1243
|
+
display: flex;
|
|
1244
|
+
align-items: center;
|
|
1245
|
+
gap: 8px;
|
|
1246
|
+
opacity: ${({disabled:e})=>e?.6:1};
|
|
1247
|
+
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
1248
|
+
`,Rs=l.div`
|
|
1249
|
+
position: relative;
|
|
1250
|
+
width: 32px;
|
|
1251
|
+
height: 20px;
|
|
1252
|
+
background-color: ${({checked:e})=>e?"var(--blue-600)":"var(--grey-500)"};
|
|
1253
|
+
border-radius: 100px;
|
|
1254
|
+
border: 2px solid var(--black-200);
|
|
1255
|
+
transition: all 0.2s ease;
|
|
1256
|
+
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
1257
|
+
box-sizing: border-box;
|
|
1258
|
+
`,Ss=l.div`
|
|
1259
|
+
position: absolute;
|
|
1260
|
+
top: 0px;
|
|
1261
|
+
left: ${({checked:e})=>e?"12px":"0px"};
|
|
1262
|
+
width: 16px;
|
|
1263
|
+
height: 16px;
|
|
1264
|
+
background-color: var(--white-900);
|
|
1265
|
+
border-radius: 50%;
|
|
1266
|
+
box-shadow: 0 1px 3px var(--black-300);
|
|
1267
|
+
transition: all 0.2s ease;
|
|
1268
|
+
`,$s=l.span`
|
|
1269
|
+
font-size: 16px;
|
|
1270
|
+
font-style: normal;
|
|
1271
|
+
font-weight: 400;
|
|
1272
|
+
line-height: 24px;
|
|
1273
|
+
user-select: none;
|
|
1274
|
+
pointer-events: none;
|
|
1275
|
+
color: var(--grey-500);
|
|
1276
|
+
`,Ke=({checked:e=!1,onChange:o,disabled:n=!1,label:r,className:s})=>{const[i,a]=d.useState(e),u=()=>{if(n)return;const c=!i;a(c),o?.(c)};return t.jsxs(Is,{disabled:n,className:s,onClick:u,children:[t.jsx(Rs,{checked:i,disabled:n,children:t.jsx(Ss,{checked:i})}),r&&t.jsx($s,{children:r})]})},Ns=["/data-workspace","/data-apps","/pipelines","/pipeline-edit/","/pipeline-details/","/pipeline-processing/","/file/","/file-details/","/files","/search","/search-classic","/artifacts/","/admin","/settings","/agent-studio"];function kt(){if(typeof document>"u"||!document.referrer)return null;try{const e=new URL(document.referrer),o=e.pathname;for(const n of Ns){const r=o.indexOf(n);if(r!==-1){const s=o.slice(0,r).replace(/\/$/u,"");return`${e.origin}${s}`}}return e.origin}catch{return null}}function Se(e,o){try{const n=o.startsWith("/")?o:`/${o}`,r=new URL(e);return r.pathname=`${r.pathname.replace(/\/$/u,"")}${n}`,r.href}catch{return null}}function _t(e,o={}){if(o.newTab){window.open(e,"_blank","noopener,noreferrer");return}if(window.parent!==window)try{window.parent.location.href}catch{try{const n=new URL(e),r=`${n.pathname}${n.search}${n.hash}`;window.parent.postMessage({type:"navigate",path:r},"*");return}catch{}}window.location.href=e}const Os={fileDetails:e=>`/file/${e}`,pipelineEdit:e=>`/pipeline-edit/${e}`,pipelineDetails:e=>`/pipeline-details/${e}`,search:e=>e?`/search?q=${encodeURIComponent(e)}`:"/search",dataWorkspace:()=>"/data-workspace",dataApps:()=>"/data-apps",artifact:(e,o,n)=>`/artifacts/${e}/${o}/${n}`},Et=d.createContext(null);function vo(){const e=d.useContext(Et);if(!e)throw new Error("useTdpNavigationContext must be used within a TdpNavigationProvider. Wrap your app with <TdpNavigationProvider> or use the standalone useTdpNavigation() hook instead.");return e}const Bs=({tdpBaseUrl:e,children:o})=>{const n=d.useMemo(()=>e?e.replace(/\/$/u,""):kt(),[e]),r=d.useMemo(()=>({tdpBaseUrl:n,getTdpUrl:s=>n?Se(n,s):null,navigateToTdp:(s,i)=>{if(!n){console.warn("[TdpNavigation] Cannot navigate: TDP base URL not resolved");return}const a=Se(n,s);a&&_t(a,i)}}),[n]);return t.jsx(Et.Provider,{value:r,children:o})};function Ps(e={}){const{tdpBaseUrl:o}=e,n=d.useMemo(()=>o?o.replace(/\/$/u,""):kt(),[o]);return d.useMemo(()=>({tdpBaseUrl:n,getTdpUrl:r=>n?Se(n,r):null,navigateToTdp:(r,s)=>{if(!n){console.warn("[useTdpNavigation] Cannot navigate: TDP base URL not resolved");return}const i=Se(n,r);i&&_t(i,s)}}),[n])}const Hs=l.a`
|
|
1277
|
+
color: var(--theme-primary, var(--blue-600));
|
|
1278
|
+
text-decoration: none;
|
|
1279
|
+
cursor: pointer;
|
|
1280
|
+
|
|
1281
|
+
&:hover {
|
|
1282
|
+
text-decoration: underline;
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
&:focus-visible {
|
|
1286
|
+
outline: 2px solid var(--blue-600);
|
|
1287
|
+
outline-offset: 2px;
|
|
1288
|
+
border-radius: 2px;
|
|
1289
|
+
}
|
|
1290
|
+
`,Ds=({path:e,navigationOptions:o={newTab:!0},children:n,onClick:r,...s})=>{const{getTdpUrl:i,navigateToTdp:a}=vo(),u=i(e),c=h=>{h.metaKey||h.ctrlKey||h.shiftKey||(h.preventDefault(),r?.(h),a(e,o))};return t.jsx(Hs,{href:u??"#",target:o.newTab?"_blank":void 0,rel:o.newTab?"noopener noreferrer":void 0,onClick:c,...s,children:n})},zs=l.div`
|
|
1291
|
+
display: flex;
|
|
1292
|
+
align-items: center;
|
|
1293
|
+
justify-content: space-between;
|
|
1294
|
+
height: auto;
|
|
1295
|
+
width: 100%;
|
|
1296
|
+
padding: 16px 28px;
|
|
1297
|
+
box-sizing: border-box;
|
|
1298
|
+
border-bottom: 1px solid var(--grey-200);
|
|
1299
|
+
background-color: var(--white-900);
|
|
1300
|
+
`,Gs=l.div`
|
|
1301
|
+
color: var(--black-900);
|
|
1302
|
+
font-family: "Inter", sans-serif;
|
|
1303
|
+
font-size: 18px;
|
|
1304
|
+
font-style: normal;
|
|
1305
|
+
font-weight: 500;
|
|
1306
|
+
line-height: 28px;
|
|
1307
|
+
`,Us=l.div`
|
|
1308
|
+
display: flex;
|
|
1309
|
+
align-items: center;
|
|
1310
|
+
gap: 12px;
|
|
1311
|
+
`,Vs=l.div`
|
|
1312
|
+
display: flex;
|
|
1313
|
+
align-items: center;
|
|
1314
|
+
gap: 12px;
|
|
1315
|
+
cursor: pointer;
|
|
1316
|
+
border-radius: 4px;
|
|
1317
|
+
|
|
1318
|
+
&:hover {
|
|
1319
|
+
background-color: var(--grey-100);
|
|
1320
|
+
}
|
|
1321
|
+
`,Fs=l.div`
|
|
1322
|
+
width: 32px;
|
|
1323
|
+
height: 32px;
|
|
1324
|
+
border-radius: 50%;
|
|
1325
|
+
background-color: var(--blue-100);
|
|
1326
|
+
background-image: ${e=>e.src?`url(${e.src})`:"none"};
|
|
1327
|
+
background-size: cover;
|
|
1328
|
+
background-position: center;
|
|
1329
|
+
display: flex;
|
|
1330
|
+
align-items: center;
|
|
1331
|
+
justify-content: center;
|
|
1332
|
+
color: var(--blue-600);
|
|
1333
|
+
font-weight: 500;
|
|
1334
|
+
font-size: 14px;
|
|
1335
|
+
font-family: "Inter", sans-serif;
|
|
1336
|
+
`,Ys=l.div`
|
|
1337
|
+
font-family: "Inter", sans-serif;
|
|
1338
|
+
color: var(--grey-400);
|
|
1339
|
+
font-size: 16px;
|
|
1340
|
+
font-style: normal;
|
|
1341
|
+
font-weight: 400;
|
|
1342
|
+
line-height: 24px;
|
|
1343
|
+
`,qt=l(ae)`
|
|
1344
|
+
width: 32px;
|
|
1345
|
+
height: 32px;
|
|
1346
|
+
padding: 0;
|
|
1347
|
+
min-height: 0;
|
|
1348
|
+
border-radius: 4px;
|
|
1349
|
+
`,Zs=l.div`
|
|
1350
|
+
height: 20px;
|
|
1351
|
+
width: 1px;
|
|
1352
|
+
background-color: var(--grey-200);
|
|
1353
|
+
margin: 0;
|
|
1354
|
+
`,Mt=({hostname:e,userProfile:o,onHomeClick:n,onSettingsClick:r,onUserProfileClick:s})=>{const i=a=>a.split(" ").map(u=>u.charAt(0)).join("").toUpperCase().substring(0,2);return t.jsxs(zs,{children:[t.jsx(Gs,{children:e}),t.jsxs(Us,{children:[t.jsx(qt,{variant:"tertiary",size:"small",onClick:n,"aria-label":"Home",children:t.jsx(F,{name:$.HOME,width:"20",height:"20",fill:"var(--grey-600)"})}),t.jsx(qt,{variant:"tertiary",size:"small",onClick:r,"aria-label":"Settings",children:t.jsx(F,{name:$.GEAR,width:"20",height:"20",fill:"var(--grey-600)"})}),t.jsx(Zs,{}),t.jsxs(Vs,{onClick:s,children:[t.jsx(Fs,{src:o.avatar,children:!o.avatar&&i(o.name)}),t.jsx(Ys,{children:o.name})]})]})]})},Ws=l.div`
|
|
1355
|
+
position: fixed;
|
|
1356
|
+
top: 0;
|
|
1357
|
+
left: 0;
|
|
1358
|
+
width: 100vw;
|
|
1359
|
+
height: 100vh;
|
|
1360
|
+
background: var(--black-100);
|
|
1361
|
+
z-index: 1300;
|
|
1362
|
+
display: flex;
|
|
1363
|
+
align-items: center;
|
|
1364
|
+
justify-content: center;
|
|
1365
|
+
`,Ks=l.div`
|
|
1366
|
+
background: var(--white-900);
|
|
1367
|
+
border-radius: 20px;
|
|
1368
|
+
box-shadow: 0 2px 16px var(--black-100);
|
|
1369
|
+
min-width: 600px;
|
|
1370
|
+
max-width: 90vw;
|
|
1371
|
+
min-height: 500px;
|
|
1372
|
+
padding: 0;
|
|
1373
|
+
display: flex;
|
|
1374
|
+
flex-direction: column;
|
|
1375
|
+
`,Xs=l.div`
|
|
1376
|
+
display: flex;
|
|
1377
|
+
align-items: center;
|
|
1378
|
+
justify-content: space-between;
|
|
1379
|
+
padding: 20px 24px 0 24px;
|
|
1380
|
+
`,qs=l.div`
|
|
1381
|
+
display: flex;
|
|
1382
|
+
align-items: center;
|
|
1383
|
+
gap: 8px;
|
|
1384
|
+
`,Qs=l.span`
|
|
1385
|
+
font-weight: 600;
|
|
1386
|
+
font-size: 20px;
|
|
1387
|
+
`,Js=l.button`
|
|
1388
|
+
background: none;
|
|
1389
|
+
border: none;
|
|
1390
|
+
font-size: 20px;
|
|
1391
|
+
cursor: pointer;
|
|
1392
|
+
`,ei=l.div`
|
|
1393
|
+
padding: 24px;
|
|
1394
|
+
|
|
1395
|
+
color: var(--black-900);
|
|
1396
|
+
font-family: "Inter", sans-serif;
|
|
1397
|
+
font-size: 14px;
|
|
1398
|
+
font-style: normal;
|
|
1399
|
+
font-weight: 400;
|
|
1400
|
+
line-height: 20px;
|
|
1401
|
+
`,ti=l.div`
|
|
1402
|
+
margin: 0 24px;
|
|
1403
|
+
background: var(--blue-900);
|
|
1404
|
+
color: var(--white-900);
|
|
1405
|
+
border-radius: 12px;
|
|
1406
|
+
padding: 0;
|
|
1407
|
+
font-size: 16px;
|
|
1408
|
+
font-weight: 500;
|
|
1409
|
+
word-break: break-word;
|
|
1410
|
+
box-shadow: 0 1px 4px var(--black-50);
|
|
1411
|
+
`,oi=l.textarea`
|
|
1412
|
+
width: 100%;
|
|
1413
|
+
min-height: 48px;
|
|
1414
|
+
background: transparent;
|
|
1415
|
+
color: var(--white-900);
|
|
1416
|
+
border: none;
|
|
1417
|
+
outline: none;
|
|
1418
|
+
resize: vertical;
|
|
1419
|
+
font-family: "Inter", sans-serif;
|
|
1420
|
+
font-size: 14px;
|
|
1421
|
+
font-style: normal;
|
|
1422
|
+
font-weight: 400;
|
|
1423
|
+
line-height: 20px;
|
|
1424
|
+
padding: 16px 20px;
|
|
1425
|
+
border-radius: 12px;
|
|
1426
|
+
box-sizing: border-box;
|
|
1427
|
+
`,ni=l.div`
|
|
1428
|
+
padding: 24px;
|
|
1429
|
+
padding-bottom: 0;
|
|
1430
|
+
flex: 1;
|
|
1431
|
+
`,ri=l.div`
|
|
1432
|
+
border-radius: 20px;
|
|
1433
|
+
overflow: hidden;
|
|
1434
|
+
background: var(--blue-900);
|
|
1435
|
+
min-height: 200px;
|
|
1436
|
+
position: relative;
|
|
1437
|
+
`,si=l.div`
|
|
1438
|
+
display: flex;
|
|
1439
|
+
align-items: center;
|
|
1440
|
+
gap: 12px;
|
|
1441
|
+
padding: 24px;
|
|
1442
|
+
padding-top: 16px;
|
|
1443
|
+
background: var(--white-900);
|
|
1444
|
+
border-bottom-left-radius: 20px;
|
|
1445
|
+
border-bottom-right-radius: 20px;
|
|
1446
|
+
`,ii=l(ae)`
|
|
1447
|
+
min-width: 100px;
|
|
1448
|
+
display: flex;
|
|
1449
|
+
align-items: center;
|
|
1450
|
+
gap: 6px;
|
|
1451
|
+
`,ai=({open:e,title:o,prompt:n,initialCode:r="",userQuery:s="",onUserQueryChange:i,onCopy:a,onLaunch:u,onSend:c,onCancel:h})=>{const[f,b]=d.useState(r),[x,E]=d.useState(""),[y,_]=d.useState(s);return d.useEffect(()=>{_(s)},[s]),e?t.jsx(Ws,{children:t.jsxs(Ks,{children:[t.jsxs(Xs,{children:[t.jsxs(qs,{children:[t.jsx(F,{name:$.TETRASCIENCE_ICON,fill:"var(--blue-600)"}),t.jsx(Qs,{children:o})]}),t.jsx(Js,{onClick:h,children:t.jsx(F,{name:$.CLOSE,width:"20",height:"20",fill:"var(--black-900)"})})]}),t.jsx(ei,{children:n}),t.jsx(ti,{children:t.jsx(oi,{value:y,onChange:M=>{_(M.target.value),i&&i(M.target.value)},rows:2,placeholder:"Type your question here..."})}),t.jsx(ni,{children:t.jsx(ri,{children:t.jsx(Me,{value:f,onChange:M=>b(M??""),language:"python",theme:"dark",height:200,onCopy:a,onLaunch:u})})}),t.jsxs(si,{children:[t.jsx(We,{value:x,onChange:M=>E(M.target.value),placeholder:"Ask us anything related to your work...",size:"small",onKeyDown:M=>{M.key==="Enter"&&c(x)}}),t.jsxs(ii,{variant:"primary",onClick:()=>c(x),children:[t.jsx(F,{name:$.PAPER_PLANE}),"Send"]})]})]})}):null},li=l.div`
|
|
1452
|
+
display: flex;
|
|
1453
|
+
flex-direction: ${e=>e.$vertical?"column":"row"};
|
|
1454
|
+
border-radius: 6px;
|
|
1455
|
+
overflow: hidden;
|
|
1456
|
+
border: 1px solid var(--grey-200);
|
|
1457
|
+
|
|
1458
|
+
& > *:not(:last-child) {
|
|
1459
|
+
${e=>e.$vertical?"border-bottom: 1px solid var(--grey-200);":"border-right: 1px solid var(--grey-200);"}
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
${e=>e.$vertical&&`
|
|
1463
|
+
width: 40px;
|
|
1464
|
+
`}
|
|
1465
|
+
`,ci=l.div`
|
|
1466
|
+
&:first-child {
|
|
1467
|
+
button {
|
|
1468
|
+
${e=>e.$vertical?"border-top-right-radius: 6px;border-top-left-radius: 6px;":"border-top-left-radius: 6px;border-bottom-left-radius: 6px;"}
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
&:last-child {
|
|
1473
|
+
button {
|
|
1474
|
+
${e=>e.$vertical?"border-bottom-right-radius: 6px;border-bottom-left-radius: 6px;":"border-top-right-radius: 6px;border-bottom-right-radius: 6px;"}
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
`,di=({controls:e,selectedId:o,onChange:n,vertical:r=!0,disabled:s=!1})=>{const i=a=>{s||n?.(a)};return t.jsx(li,{$vertical:r,children:e.map(a=>t.jsx(ci,{$vertical:r,children:t.jsx(po,{icon:a.icon,selected:o===a.id,disabled:s||a.disabled,onClick:()=>i(a.id)})},a.id))})},ui=e=>{switch(e){case"active":return"var(--blue-100)";case"hover":return"var(--grey-100)";case"disabled":return"transparent";default:return"transparent"}},hi=e=>e==="disabled"?"var(--grey-400)":"var(--black-900)",pi=e=>"var(--grey-400)",fi=e=>e==="disabled"?"var(--grey-400)":"var(--blue-600)",mi=l.div`
|
|
1478
|
+
padding: 20px 16px;
|
|
1479
|
+
border-radius: 8px;
|
|
1480
|
+
background-color: ${e=>ui(e.status)};
|
|
1481
|
+
cursor: ${e=>e.status==="disabled"?"not-allowed":"pointer"};
|
|
1482
|
+
transition: background-color 0.2s ease;
|
|
1483
|
+
|
|
1484
|
+
${e=>e.status==="default"&&l.css`
|
|
1485
|
+
&:hover {
|
|
1486
|
+
background-color: var(--grey-100);
|
|
1487
|
+
}
|
|
1488
|
+
`}
|
|
1489
|
+
`,xi=l.h3`
|
|
1490
|
+
margin: 0 0 4px 0;
|
|
1491
|
+
font-family: "Inter", sans-serif;
|
|
1492
|
+
font-size: 16px;
|
|
1493
|
+
font-weight: 600;
|
|
1494
|
+
line-height: 24px;
|
|
1495
|
+
color: ${e=>hi(e.status)};
|
|
1496
|
+
`,gi=l.p`
|
|
1497
|
+
margin: 0 0 16px 0;
|
|
1498
|
+
font-family: "Inter", sans-serif;
|
|
1499
|
+
font-size: 13px;
|
|
1500
|
+
font-style: normal;
|
|
1501
|
+
font-weight: 400;
|
|
1502
|
+
line-height: 18px;
|
|
1503
|
+
line-height: 20px;
|
|
1504
|
+
color: ${e=>pi(e.status)};
|
|
1505
|
+
`,Ci=l.div`
|
|
1506
|
+
display: flex;
|
|
1507
|
+
align-items: center;
|
|
1508
|
+
gap: 16px;
|
|
1509
|
+
`,bi=l(ae)`
|
|
1510
|
+
flex-shrink: 0;
|
|
1511
|
+
`,vi=l.a`
|
|
1512
|
+
font-family: "Inter", sans-serif;
|
|
1513
|
+
font-size: 13px;
|
|
1514
|
+
font-style: normal;
|
|
1515
|
+
font-weight: 500;
|
|
1516
|
+
line-height: 18px;
|
|
1517
|
+
color: ${e=>fi(e.status)};
|
|
1518
|
+
text-decoration: none;
|
|
1519
|
+
cursor: ${e=>e.status==="disabled"?"not-allowed":"pointer"};
|
|
1520
|
+
|
|
1521
|
+
&:hover {
|
|
1522
|
+
text-decoration: ${e=>e.status==="disabled"?"none":"underline"};
|
|
1523
|
+
}
|
|
1524
|
+
`,yo=({title:e,description:o,buttonText:n,linkText:r,status:s="default",onButtonClick:i,onLinkClick:a,className:u,ref:c})=>{const h=b=>{b.stopPropagation(),s!=="disabled"&&i&&i()},f=b=>{b.stopPropagation(),s!=="disabled"&&a&&a()};return t.jsxs(mi,{ref:c,status:s,className:u,children:[t.jsx(xi,{status:s,children:e}),o&&t.jsx(gi,{status:s,children:o}),t.jsxs(Ci,{children:[n&&t.jsx(bi,{variant:"secondary",size:"small",disabled:s==="disabled",onClick:h,leftIcon:t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("rect",{x:"3",y:"3",width:"10",height:"10",rx:"2",fill:"currentColor"})}),children:n}),r&&t.jsx(vi,{status:s,onClick:f,href:s==="disabled"?void 0:"#",children:r})]})]})},yi=l.div`
|
|
1525
|
+
display: flex;
|
|
1526
|
+
align-items: center;
|
|
1527
|
+
flex-direction: row;
|
|
1528
|
+
gap: 16px;
|
|
1529
|
+
flex-wrap: wrap;
|
|
1530
|
+
width: 100%;
|
|
1531
|
+
`,wi=l.div`
|
|
1532
|
+
margin: 16px 0;
|
|
1533
|
+
`,ji=l.span`
|
|
1534
|
+
font-size: 12px;
|
|
1535
|
+
color: var(--grey-400);
|
|
1536
|
+
`,ki=l.div`
|
|
1537
|
+
& > button {
|
|
1538
|
+
height: 38px;
|
|
1539
|
+
}
|
|
1540
|
+
`,_i=({initialCode:e="",onCodeSave:o,language:n="python",buttonText:r="Edit Code",modalTitle:s="Edit Code",buttonProps:i,modalProps:a,disabled:u=!1})=>{const[c,h]=d.useState(!1),[f,b]=d.useState(e),x=f?f.split(`
|
|
1541
|
+
`).length:0,E=f.length,y=d.useCallback(()=>{b(e),h(!0)},[e]),_=d.useCallback(()=>{o&&o(f),h(!1)},[o,f]),M=d.useCallback(()=>{h(!1)},[]),w=d.useCallback(m=>{b(m||"")},[]);return t.jsxs(t.Fragment,{children:[t.jsxs(yi,{children:[t.jsx(ki,{children:t.jsx(ae,{leftIcon:t.jsx(F,{name:$.PENCIL}),onClick:y,size:"small",variant:"tertiary",...i,disabled:u,children:r})}),t.jsxs(ji,{title:`${x} lines, ${E} characters`,children:[x," lines / ",E," chars"]})]}),t.jsx(vt,{isOpen:c,onClose:M,onConfirm:_,onCloseLabel:"Cancel",onConfirmLabel:"Save Code",title:s,width:"80%",...a,children:t.jsx(wi,{children:t.jsx(Me,{height:"400px",language:n,value:f,onChange:w,options:{minimap:{enabled:!1}}})})})]})},Ei=l.div`
|
|
1542
|
+
display: flex;
|
|
1543
|
+
flex-direction: column;
|
|
1544
|
+
gap: 6px;
|
|
1545
|
+
width: 100%;
|
|
1546
|
+
`,Mi=l(bt)`
|
|
1547
|
+
margin-bottom: 2px;
|
|
1548
|
+
`,Li=({label:e,infoText:o,supportiveText:n,showSupportiveCheck:r=!1,className:s,ref:i,...a})=>t.jsxs(Ei,{className:s,children:[t.jsx(Mi,{infoText:o,children:e}),t.jsx(We,{ref:i,...a}),n&&t.jsx(yt,{showCheck:r,children:n})]}),Ti=5e3,Ai=3e3,Ii=l.div``,Ri=l.div`
|
|
1549
|
+
display: flex;
|
|
1550
|
+
align-items: center;
|
|
1551
|
+
justify-content: space-between;
|
|
1552
|
+
margin-bottom: 16px;
|
|
1553
|
+
background-color: var(--grey-100);
|
|
1554
|
+
`,Si=l.h1`
|
|
1555
|
+
color: var(--black-900);
|
|
1556
|
+
font-family: "Inter", sans-serif;
|
|
1557
|
+
font-size: 18px;
|
|
1558
|
+
font-style: normal;
|
|
1559
|
+
font-weight: 600;
|
|
1560
|
+
line-height: 28px;
|
|
1561
|
+
margin: 0;
|
|
1562
|
+
`,$i=l.div`
|
|
1563
|
+
display: flex;
|
|
1564
|
+
align-items: center;
|
|
1565
|
+
gap: 16px;
|
|
1566
|
+
`,Ni=l.div`
|
|
1567
|
+
display: flex;
|
|
1568
|
+
align-items: center;
|
|
1569
|
+
`,Oi=l.div`
|
|
1570
|
+
width: 1px;
|
|
1571
|
+
height: 20px;
|
|
1572
|
+
background-color: var(--grey-200);
|
|
1573
|
+
`,Bi=`protocolSchema: v3
|
|
1574
|
+
name: v3
|
|
1575
|
+
description: No description
|
|
1576
|
+
config: {}
|
|
1577
|
+
steps: []`,ot=l.div`
|
|
1578
|
+
position: relative;
|
|
1579
|
+
width: 100%;
|
|
1580
|
+
max-width: 100%;
|
|
1581
|
+
margin-bottom: 16px;
|
|
1582
|
+
`,wo=({initialCode:e=Bi,onDeploy:o,versions:n=["v0.0.7","v0.0.6","v0.0.5"],currentVersion:r="v0.0.7",onVersionChange:s=()=>{}})=>{const[i,a]=d.useState(e),[u,c]=d.useState(!0),[h,f]=d.useState(!1),[b,x]=d.useState(!1),[E,y]=d.useState(!1),[_,M]=d.useState(!1),w=p=>{p!==void 0&&a(p)},m=p=>{navigator.clipboard.writeText(p)},v=p=>{console.log("Launching code:",p)},g=()=>{f(!0),x(!0),y(!1),M(!1),setTimeout(()=>{x(!1),Math.random()>.3?(y(!0),M(!1)):(y(!1),M(!0)),f(!1),o&&o(),setTimeout(()=>{y(!1),M(!1)},Ti)},Ai)};return t.jsxs(Ii,{children:[t.jsxs(Ri,{children:[t.jsx(Si,{children:"Launch"}),t.jsxs($i,{children:[t.jsx(Ke,{checked:u,onChange:c,label:"Overwrite Mode",disabled:h}),t.jsx(Oi,{}),t.jsx(Ni,{children:t.jsx(Le,{options:n.map(p=>({label:p,value:p})),value:r,onChange:p=>s(p),width:"150px",size:"small",disabled:h})}),t.jsx(ae,{variant:"primary",size:"medium",onClick:g,disabled:h,children:"Deploy"})]})]}),b&&t.jsx(ot,{children:t.jsx(Re,{type:"info",heading:"Building Protocol: Status=IN_PROGRESS, Phase=FINALIZING"})}),E&&t.jsx(ot,{children:t.jsx(Re,{type:"success",heading:`Pipeline visual-pipeline-builder-protocol-${r}-pipeline deployed successfully! Deployment complete`})}),_&&t.jsx(ot,{children:t.jsx(Re,{type:"danger",heading:`Failed to deploy pipeline visual-pipeline-builder-protocol-${r}-pipeline. Please try again.`})}),t.jsx(Me,{value:i,onChange:w,language:"yaml",theme:"light",width:"100%",onCopy:m,onLaunch:v,disabled:!u})]})},Pi=l.div`
|
|
1583
|
+
width: 100%;
|
|
1584
|
+
border-radius: 8px;
|
|
1585
|
+
overflow: hidden;
|
|
1586
|
+
box-shadow: 0px 4px 12px 0px var(--black-100),
|
|
1587
|
+
0px 2px 4px -2px var(--black-100);
|
|
1588
|
+
background-color: var(--white-900);
|
|
1589
|
+
border: 1px solid var(--grey-200);
|
|
1590
|
+
`,Hi=l.div`
|
|
1591
|
+
padding: 8px 16px;
|
|
1592
|
+
font-family: "Inter", sans-serif;
|
|
1593
|
+
font-size: 12px;
|
|
1594
|
+
font-style: normal;
|
|
1595
|
+
font-weight: 500;
|
|
1596
|
+
line-height: 16px;
|
|
1597
|
+
color: var(--grey-600);
|
|
1598
|
+
border-bottom: 1px solid var(--grey-200);
|
|
1599
|
+
`,Di=l.div`
|
|
1600
|
+
display: flex;
|
|
1601
|
+
flex-direction: column;
|
|
1602
|
+
`,zi=({title:e,items:o,onItemClick:n,onItemCheckChange:r,activeItemId:s=null,className:i})=>{const a=c=>{n&&n(c)},u=(c,h)=>{r&&r(c,h)};return t.jsxs(Pi,{className:i,children:[e&&t.jsx(Hi,{children:e}),t.jsx(Di,{children:o.map(c=>t.jsx(go,{label:c.label,checked:c.checked,showCheckbox:c.showCheckbox,active:s===c.id||c.active,onClick:()=>a(c.id),onCheckChange:h=>u(c.id,h)},c.id))})]})},Gi=l.div`
|
|
1603
|
+
display: flex;
|
|
1604
|
+
align-items: center;
|
|
1605
|
+
background-color: var(--blue-900);
|
|
1606
|
+
height: 80px;
|
|
1607
|
+
width: 100%;
|
|
1608
|
+
padding: 12px 24px 12px 128px;
|
|
1609
|
+
box-sizing: border-box;
|
|
1610
|
+
color: var(--white-900);
|
|
1611
|
+
gap: 40px;
|
|
1612
|
+
`,Qt=l.div`
|
|
1613
|
+
display: flex;
|
|
1614
|
+
align-items: center;
|
|
1615
|
+
height: 100%;
|
|
1616
|
+
`,Jt=l.div`
|
|
1617
|
+
text-transform: uppercase;
|
|
1618
|
+
margin-bottom: 2px;
|
|
1619
|
+
color: var(--white-900);
|
|
1620
|
+
font-size: 10px;
|
|
1621
|
+
font-style: normal;
|
|
1622
|
+
font-weight: 500;
|
|
1623
|
+
line-height: 16px;
|
|
1624
|
+
letter-spacing: 0.2px;
|
|
1625
|
+
font-family: "Inter", sans-serif;
|
|
1626
|
+
`,Ui=l.div`
|
|
1627
|
+
font-size: 14px;
|
|
1628
|
+
font-style: normal;
|
|
1629
|
+
font-weight: 500;
|
|
1630
|
+
line-height: 22px;
|
|
1631
|
+
font-family: "Inter", sans-serif;
|
|
1632
|
+
`,Vi=l.div`
|
|
1633
|
+
color: var(--grey-400);
|
|
1634
|
+
font-size: 12px;
|
|
1635
|
+
font-style: italic;
|
|
1636
|
+
font-weight: 500;
|
|
1637
|
+
line-height: 16px;
|
|
1638
|
+
font-family: "Inter", sans-serif;
|
|
1639
|
+
`,eo=l.div`
|
|
1640
|
+
display: flex;
|
|
1641
|
+
flex-direction: column;
|
|
1642
|
+
`,Fi=l.div`
|
|
1643
|
+
display: flex;
|
|
1644
|
+
align-items: center;
|
|
1645
|
+
justify-content: center;
|
|
1646
|
+
`,Yi=l.div`
|
|
1647
|
+
display: flex;
|
|
1648
|
+
align-items: center;
|
|
1649
|
+
padding: 6px 0;
|
|
1650
|
+
border-radius: 4px;
|
|
1651
|
+
gap: 8px;
|
|
1652
|
+
`,Zi=l.div`
|
|
1653
|
+
font-family: "Inter", sans-serif;
|
|
1654
|
+
color: var(--grey-400);
|
|
1655
|
+
font-size: 14px;
|
|
1656
|
+
font-style: normal;
|
|
1657
|
+
font-weight: 500;
|
|
1658
|
+
line-height: 22px;
|
|
1659
|
+
`,Wi=l.div`
|
|
1660
|
+
display: flex;
|
|
1661
|
+
align-items: center;
|
|
1662
|
+
justify-content: center;
|
|
1663
|
+
`,Ki=l.div`
|
|
1664
|
+
display: flex;
|
|
1665
|
+
align-items: center;
|
|
1666
|
+
gap: 8px;
|
|
1667
|
+
width: 320px;
|
|
1668
|
+
`,Xi=()=>t.jsx("div",{style:{borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center"},children:t.jsx(F,{name:$.BUILDING,fill:"var(--white-900)",width:"20",height:"20"})}),qi=()=>t.jsx(F,{name:$.LAMP,fill:"var(--white-900)",width:"20",height:"20"}),Lt=({organization:e})=>t.jsxs(Gi,{children:[t.jsx(Qt,{children:t.jsxs(eo,{children:[t.jsx(Jt,{children:"ORGANIZATION"}),t.jsxs(Ki,{children:[t.jsx(Fi,{children:e.logo||t.jsx(Xi,{})}),t.jsxs("div",{children:[t.jsx(Ui,{children:e.name}),e.subtext&&t.jsx(Vi,{children:e.subtext})]})]})]})}),t.jsx(Qt,{children:t.jsxs(eo,{children:[t.jsx(Jt,{children:"PROJECT"}),t.jsxs(Yi,{children:[t.jsx(Wi,{children:t.jsx(qi,{})}),t.jsx(Zi,{children:"Not Selected"})]})]})})]}),Qi=l.div`
|
|
1669
|
+
display: flex;
|
|
1670
|
+
align-items: center;
|
|
1671
|
+
justify-content: space-between;
|
|
1672
|
+
background: var(--grey-100);
|
|
1673
|
+
padding: 0 0 24px;
|
|
1674
|
+
border-top-left-radius: 24px;
|
|
1675
|
+
border-top-right-radius: 24px;
|
|
1676
|
+
`,Ji=l.h2`
|
|
1677
|
+
color: var(--blue-900);
|
|
1678
|
+
font-family: "Inter", sans-serif;
|
|
1679
|
+
font-size: 20px;
|
|
1680
|
+
font-weight: 600;
|
|
1681
|
+
line-height: 28px;
|
|
1682
|
+
margin: 0;
|
|
1683
|
+
`,ea=l.div`
|
|
1684
|
+
display: flex;
|
|
1685
|
+
align-items: center;
|
|
1686
|
+
gap: 8px;
|
|
1687
|
+
color: var(--grey-600);
|
|
1688
|
+
font-size: 15px;
|
|
1689
|
+
font-weight: 500;
|
|
1690
|
+
`,ta=l.div`
|
|
1691
|
+
background-color: var(--white-900);
|
|
1692
|
+
border-radius: 24px;
|
|
1693
|
+
border: 1px solid var(--grey-200);
|
|
1694
|
+
width: 100%;
|
|
1695
|
+
`,oa=l.div`
|
|
1696
|
+
display: flex;
|
|
1697
|
+
align-items: center;
|
|
1698
|
+
border-bottom: 1px solid var(--grey-200);
|
|
1699
|
+
padding-bottom: 16px;
|
|
1700
|
+
padding: 12px 24px;
|
|
1701
|
+
`,na=l.h3`
|
|
1702
|
+
color: var(--blue-900);
|
|
1703
|
+
font-family: "Inter", sans-serif;
|
|
1704
|
+
font-size: 20px;
|
|
1705
|
+
font-weight: 600;
|
|
1706
|
+
line-height: 28px;
|
|
1707
|
+
margin: 0;
|
|
1708
|
+
`,ra=l.div`
|
|
1709
|
+
padding: 20px 24px 36px 24px;
|
|
1710
|
+
`,sa=l.div`
|
|
1711
|
+
display: flex;
|
|
1712
|
+
flex-direction: column;
|
|
1713
|
+
align-items: flex-start;
|
|
1714
|
+
gap: 16px;
|
|
1715
|
+
`,ia=l.div`
|
|
1716
|
+
color: var(--grey-400);
|
|
1717
|
+
font-size: 14px;
|
|
1718
|
+
font-weight: 500;
|
|
1719
|
+
`,jo=({className:e})=>{const[o,n]=d.useState(!1);return t.jsxs("div",{className:e,children:[t.jsxs(Qi,{children:[t.jsx(Ji,{children:"Protocol Configuration"}),t.jsx(ea,{children:t.jsx(Ke,{label:"Edit Mode",checked:o,onChange:()=>n(r=>!r)})})]}),t.jsxs(ta,{children:[t.jsx(oa,{children:t.jsx(na,{children:"Configuration"})}),t.jsx(ra,{children:o?t.jsx(ae,{variant:"secondary",size:"medium",leftIcon:t.jsx(F,{name:$.PLUS,width:"20",height:"20",fill:"var(--blue-600)"}),children:"Add Input"}):t.jsx(sa,{children:t.jsx(ia,{children:"No values, Use the 'edit' button to add values"})})})]})]})},aa=l.div`
|
|
1720
|
+
display: flex;
|
|
1721
|
+
flex-direction: column;
|
|
1722
|
+
align-items: flex-start;
|
|
1723
|
+
padding: 0;
|
|
1724
|
+
gap: 16px;
|
|
1725
|
+
width: 928px;
|
|
1726
|
+
background: transparent;
|
|
1727
|
+
`,la=l.div`
|
|
1728
|
+
display: flex;
|
|
1729
|
+
flex-direction: row;
|
|
1730
|
+
justify-content: space-between;
|
|
1731
|
+
align-items: center;
|
|
1732
|
+
width: 928px;
|
|
1733
|
+
height: 36px;
|
|
1734
|
+
`,ca=l.span`
|
|
1735
|
+
font-family: "Inter", sans-serif;
|
|
1736
|
+
font-weight: 600;
|
|
1737
|
+
font-size: 18px;
|
|
1738
|
+
line-height: 28px;
|
|
1739
|
+
color: var(--black-900);
|
|
1740
|
+
`,da=l.div`
|
|
1741
|
+
display: flex;
|
|
1742
|
+
flex-direction: row;
|
|
1743
|
+
align-items: center;
|
|
1744
|
+
gap: 16px;
|
|
1745
|
+
justify-content: flex-end;
|
|
1746
|
+
`,ua=l.div`
|
|
1747
|
+
width: 1px;
|
|
1748
|
+
height: 20px;
|
|
1749
|
+
background: var(--grey-200);
|
|
1750
|
+
`,ha=l.div`
|
|
1751
|
+
width: 100%;
|
|
1752
|
+
`,pa=l(Ke)`
|
|
1753
|
+
min-width: 176px;
|
|
1754
|
+
`,fa=l(Le)``,ma=({title:e,newVersionMode:o,onToggleNewVersionMode:n,versionOptions:r,selectedVersion:s,onVersionChange:i,onDeploy:a,yaml:u,onYamlChange:c})=>t.jsxs(aa,{children:[t.jsxs(la,{children:[t.jsx(ca,{children:e}),t.jsxs(da,{children:[t.jsx(pa,{checked:o,onChange:n,label:"New Version Mode"}),t.jsx(ua,{}),t.jsx(fa,{options:r,value:s,onChange:i,size:"small",width:"120px"}),t.jsx(ae,{variant:"primary",size:"medium",onClick:a,children:"Deploy"})]})]}),t.jsx(ha,{children:t.jsx(Me,{value:u,onChange:h=>c(h??""),language:"yaml",theme:"light",onCopy:()=>{},onLaunch:()=>{}})})]}),xa=l.div`
|
|
1755
|
+
padding: 12px 0;
|
|
1756
|
+
flex: 1;
|
|
1757
|
+
`,ga=({open:e,initialValue:o="",title:n="",onSave:r,onCancel:s})=>{const[i,a]=d.useState(o),u=()=>{r(i)};return t.jsx(vt,{isOpen:e,onClose:s,onCloseLabel:"Cancel",onConfirm:u,onConfirmLabel:"Save Code",title:n,width:"600px",children:t.jsx(xa,{children:t.jsx(Me,{value:i,onChange:c=>a(c??""),language:"python",height:300,theme:"dark",onCopy:()=>{},onLaunch:()=>{}})})})},Ca=l.div`
|
|
1758
|
+
display: flex;
|
|
1759
|
+
flex-direction: column;
|
|
1760
|
+
gap: 6px;
|
|
1761
|
+
width: 100%;
|
|
1762
|
+
`,ba=l(bt)`
|
|
1763
|
+
margin-bottom: 2px;
|
|
1764
|
+
`,va=({label:e,infoText:o,supportiveText:n,showSupportiveCheck:r=!1,className:s,ref:i,...a})=>t.jsxs(Ca,{className:s,ref:i,children:[t.jsx(ba,{infoText:o,children:e}),t.jsx(Le,{...a}),n&&t.jsx(yt,{showCheck:r,children:n})]}),ya=l.div`
|
|
1765
|
+
width: 104px;
|
|
1766
|
+
height: 100%;
|
|
1767
|
+
background-color: var(--blue-900);
|
|
1768
|
+
display: flex;
|
|
1769
|
+
flex-direction: column;
|
|
1770
|
+
align-items: center;
|
|
1771
|
+
padding: 0;
|
|
1772
|
+
`,wa=l.div`
|
|
1773
|
+
width: 100%;
|
|
1774
|
+
display: inline-flex;
|
|
1775
|
+
flex-direction: column;
|
|
1776
|
+
align-items: center;
|
|
1777
|
+
padding: 12px 0;
|
|
1778
|
+
cursor: pointer;
|
|
1779
|
+
transition: background-color 0.2s ease;
|
|
1780
|
+
background-color: ${e=>e.$active?"var(--white-100)":"transparent"};
|
|
1781
|
+
|
|
1782
|
+
&:hover {
|
|
1783
|
+
background-color: var(--white-50);
|
|
1784
|
+
}
|
|
1785
|
+
`,ja=l.div`
|
|
1786
|
+
display: flex;
|
|
1787
|
+
justify-content: center;
|
|
1788
|
+
align-items: center;
|
|
1789
|
+
margin-bottom: 10px;
|
|
1790
|
+
color: var(--white-900);
|
|
1791
|
+
`,ka=l.div`
|
|
1792
|
+
color: var(--white-900);
|
|
1793
|
+
text-align: center;
|
|
1794
|
+
font-family: "Inter", sans-serif;
|
|
1795
|
+
font-size: 12px;
|
|
1796
|
+
font-style: normal;
|
|
1797
|
+
font-weight: 500;
|
|
1798
|
+
line-height: 16px;
|
|
1799
|
+
text-align: center;
|
|
1800
|
+
padding: 0 8px;
|
|
1801
|
+
`,_a=({icon:e,label:o,active:n,onClick:r})=>t.jsxs(wa,{$active:n,onClick:r,children:[t.jsx(ja,{children:t.jsx(F,{name:e,fill:"var(--white-900)",width:"20",height:"20"})}),t.jsx(ka,{children:o})]}),Tt=({items:e,activeItem:o,onItemClick:n})=>{const r=s=>{n&&n(s)};return t.jsx(ya,{children:e.map(s=>t.jsx(_a,{icon:s.icon,label:s.label,active:o===s.label,onClick:()=>r(s.label)},s.label))})},Ea=l.div`
|
|
1802
|
+
width: 100%;
|
|
1803
|
+
border: 1px solid var(--grey-200);
|
|
1804
|
+
border-radius: 8px;
|
|
1805
|
+
overflow: visible;
|
|
1806
|
+
background-color: var(--white-900);
|
|
1807
|
+
`,Ma=l.table`
|
|
1808
|
+
width: 100%;
|
|
1809
|
+
border-collapse: collapse;
|
|
1810
|
+
border-spacing: 0;
|
|
1811
|
+
`,La=l.tbody``,Ta=l.tr`
|
|
1812
|
+
cursor: ${e=>e.$selectable?"pointer":"default"};
|
|
1813
|
+
|
|
1814
|
+
&:hover {
|
|
1815
|
+
background-color: ${e=>e.$selectable?"var(--grey-50)":"transparent"};
|
|
1816
|
+
}
|
|
1817
|
+
`,Aa=l(wt)`
|
|
1818
|
+
width: 40px;
|
|
1819
|
+
padding: 10px 12px;
|
|
1820
|
+
`,Ia=l(jt)`
|
|
1821
|
+
width: 40px;
|
|
1822
|
+
padding: 8px 12px;
|
|
1823
|
+
`,Ra=l.div`
|
|
1824
|
+
display: flex;
|
|
1825
|
+
align-items: center;
|
|
1826
|
+
justify-content: center;
|
|
1827
|
+
gap: 16px;
|
|
1828
|
+
padding: 10px 12px;
|
|
1829
|
+
height: 40px;
|
|
1830
|
+
background-color: var(--grey-50);
|
|
1831
|
+
border-top: 1px solid var(--grey-200);
|
|
1832
|
+
`,to=l.button`
|
|
1833
|
+
display: flex;
|
|
1834
|
+
align-items: center;
|
|
1835
|
+
justify-content: center;
|
|
1836
|
+
width: 32px;
|
|
1837
|
+
height: 32px;
|
|
1838
|
+
padding: 0;
|
|
1839
|
+
border: 1px solid var(--grey-300);
|
|
1840
|
+
border-radius: 6px;
|
|
1841
|
+
background-color: var(--white-900);
|
|
1842
|
+
cursor: ${e=>e.disabled?"not-allowed":"pointer"};
|
|
1843
|
+
opacity: ${e=>e.disabled?.5:1};
|
|
1844
|
+
|
|
1845
|
+
&:hover:not(:disabled) {
|
|
1846
|
+
background-color: var(--grey-50);
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
svg {
|
|
1850
|
+
width: 20px;
|
|
1851
|
+
height: 20px;
|
|
1852
|
+
}
|
|
1853
|
+
`,Sa=l.div`
|
|
1854
|
+
display: flex;
|
|
1855
|
+
align-items: center;
|
|
1856
|
+
gap: 0;
|
|
1857
|
+
`,$a=l.button`
|
|
1858
|
+
display: flex;
|
|
1859
|
+
align-items: center;
|
|
1860
|
+
justify-content: center;
|
|
1861
|
+
width: 32px;
|
|
1862
|
+
height: 32px;
|
|
1863
|
+
padding: 0;
|
|
1864
|
+
border: none;
|
|
1865
|
+
border-radius: 6px;
|
|
1866
|
+
background-color: ${e=>e.$active?"var(--grey-100)":"transparent"};
|
|
1867
|
+
font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
1868
|
+
font-size: 13px;
|
|
1869
|
+
font-weight: 500;
|
|
1870
|
+
line-height: 18px;
|
|
1871
|
+
color: var(--grey-600);
|
|
1872
|
+
cursor: pointer;
|
|
1873
|
+
|
|
1874
|
+
&:hover:not(:disabled) {
|
|
1875
|
+
background-color: var(--grey-100);
|
|
1876
|
+
}
|
|
1877
|
+
`;function At({columns:e,data:o,pageSize:n=10,rowKey:r,selectable:s=!1,onRowSelect:i,sortKey:a,sortDirection:u,onSort:c,currentPage:h,onPageChange:f,totalItems:b,selectedRows:x,className:E}){const[y,_]=d.useState(null),[M,w]=d.useState(null),[m,v]=d.useState(1),[g,p]=d.useState([]),[k,T]=d.useState({}),I=a!==void 0,L=h!==void 0,j=x!==void 0,R=I?a:y,N=I?u:M,z=L?h:m,B=j?x:g,U=d.useMemo(()=>{let A=[...o];return Object.entries(k).forEach(([D,P])=>{P&&(A=A.filter(J=>J[D]?.toString()===P))}),A},[o,k]),Y=d.useMemo(()=>!R||!N?U:[...U].sort((A,D)=>{const P=A[R],J=D[R];if(P===J)return 0;let se=0;return se=typeof P=="number"&&typeof J=="number"?P-J:String(P).localeCompare(String(J)),N==="asc"?se:-se}),[U,R,N]),W=n===-1?1:Math.ceil((b||Y.length)/n),G=d.useMemo(()=>{if(b!==void 0||n===-1)return Y;const A=(z-1)*n;return Y.slice(A,A+n)},[Y,z,n,b]);d.useEffect(()=>{L||v(1)},[k,R,N,L]);const ie=A=>{I&&c?c(A,R===A&&N==="asc"?"desc":"asc"):R===A?N==="asc"?w("desc"):(_(null),w(null)):(_(A),w("asc"))},Q=A=>{L&&f?f(A):v(A)},me=A=>{const D=A?[...Y]:[];j&&i?i(D):(p(D),i?.(D))},ce=(A,D)=>r?typeof r=="function"?r(A):A[r]:D,he=(A,D)=>{const P=D?[...B,A]:B.filter(J=>J!==A);j&&i?i(P):(p(P),i?.(P))},te=A=>B.some(D=>ce(D,0)===ce(A,0)),le=Y.length>0&&Y.every(A=>te(A)),H=(A,D)=>{T(P=>({...P,[A]:D}))},re=()=>{const A=[];if(W<=5)for(let P=1;P<=W;P++)A.push(P);else{A.push(1),z>3&&A.push("...");const P=Math.max(2,z-1),J=Math.min(W-1,z+1);for(let se=P;se<=J;se++)A.push(se);z<W-2&&A.push("..."),A.push(W)}return A};return t.jsxs(Ea,{className:E,children:[t.jsxs(Ma,{children:[t.jsx("thead",{children:t.jsxs("tr",{children:[s&&t.jsx(Ia,{children:t.jsx(Ue,{checked:le,onChange:me,noPadding:!0})}),e.map(A=>t.jsx(jt,{width:A.width,sortable:A.sortable,sortDirection:R===A.key&&N||null,onSort:A.sortable?()=>ie(A.key):void 0,filterable:A.filterable,filterOptions:A.filterOptions,filterValue:k[A.key]||"",onFilterChange:A.filterable?D=>H(A.key,D):void 0,children:A.header},A.key))]})}),t.jsx(La,{children:G.map((A,D)=>t.jsxs(Ta,{$selectable:s,onClick:s?()=>he(A,!te(A)):void 0,children:[s&&t.jsx(Aa,{children:t.jsx(Ue,{checked:te(A),onChange:P=>he(A,P),noPadding:!0,onClick:P=>P.stopPropagation()})}),e.map(P=>{const J=A[P.key],se=P.render?P.render(J,A,D):J;return t.jsx(wt,{align:P.align,children:se},P.key)})]},ce(A,D)))})]}),n!==-1&&W>1&&t.jsxs(Ra,{children:[t.jsx(to,{disabled:z===1,onClick:()=>Q(z-1),"aria-label":"Previous page",children:t.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),t.jsx(Sa,{children:re().map((A,D)=>t.jsx($a,{$active:A===z,onClick:typeof A=="number"?()=>Q(A):void 0,disabled:typeof A!="number",children:A},D))}),t.jsx(to,{disabled:z===W,onClick:()=>Q(z+1),"aria-label":"Next page",children:t.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M7.5 15L12.5 10L7.5 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]})}At.displayName="Table";const Na=l.div`
|
|
1878
|
+
display: flex;
|
|
1879
|
+
align-items: center;
|
|
1880
|
+
border-bottom: 1px solid var(--grey-200);
|
|
1881
|
+
overflow-x: auto;
|
|
1882
|
+
|
|
1883
|
+
&::-webkit-scrollbar {
|
|
1884
|
+
display: none;
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1887
|
+
-ms-overflow-style: none;
|
|
1888
|
+
scrollbar-width: none;
|
|
1889
|
+
`,mt=({tabs:e,activeTab:o,onChange:n,disabled:r=!1,size:s="medium"})=>{const[i,a]=d.useState(o||(e.length>0?e[0].id:"")),u=c=>{r||(a(c),n?.(c))};return t.jsx(Na,{children:e.map(c=>t.jsx(bo,{label:c.label,active:o?o===c.id:i===c.id,disabled:r||c.disabled,size:c.size||s,onClick:()=>u(c.id)},c.id))})},Oa=l.div`
|
|
1890
|
+
position: fixed;
|
|
1891
|
+
${e=>e.position==="top"?"top: 16px;":"bottom: 16px;"}
|
|
1892
|
+
left: 50%;
|
|
1893
|
+
transform: translateX(-50%);
|
|
1894
|
+
z-index: 9999;
|
|
1895
|
+
width: 100%;
|
|
1896
|
+
max-width: 500px;
|
|
1897
|
+
display: flex;
|
|
1898
|
+
flex-direction: column;
|
|
1899
|
+
gap: 8px;
|
|
1900
|
+
pointer-events: none;
|
|
1901
|
+
`,Ba=l.div`
|
|
1902
|
+
opacity: 0;
|
|
1903
|
+
transform: translateY(
|
|
1904
|
+
${e=>e.theme.position==="top"?"-10px":"10px"}
|
|
1905
|
+
);
|
|
1906
|
+
animation: ${e=>e.theme.position==="top"?"slideDownFade":"slideUpFade"}
|
|
1907
|
+
0.3s forwards;
|
|
1908
|
+
pointer-events: auto;
|
|
1909
|
+
|
|
1910
|
+
@keyframes slideDownFade {
|
|
1911
|
+
to {
|
|
1912
|
+
opacity: 1;
|
|
1913
|
+
transform: translateY(0);
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
@keyframes slideUpFade {
|
|
1918
|
+
to {
|
|
1919
|
+
opacity: 1;
|
|
1920
|
+
transform: translateY(0);
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1923
|
+
`;d.createContext(void 0);let Pa=[],nt=[];const Ha=e=>(nt.push(e),e(Pa),()=>{nt=nt.filter(o=>o!==e)}),Da=({position:e="top"})=>{const[o,n]=d.useState([]),[r,s]=d.useState(!1);return d.useEffect(()=>{s(!0);const i=Ha(n);return()=>{i(),s(!1)}},[]),r?Yo.createPortal(t.jsx(Oa,{position:e,children:o.map(i=>t.jsx(Ba,{theme:{position:e},children:t.jsx(Re,{type:i.type,heading:i.heading,description:i.description})},i.id))}),document.body):null},za=({userProfile:e,hostname:o,organization:n,children:r})=>{const s=[{icon:$.SEARCH_DOCUMENT,label:"Search"},{icon:$.SEARCH_SQL,label:"SQL Search"},{icon:$.LAMP,label:"Projects"},{icon:$.PIPELINE,label:"Pipelines"},{icon:$.COMPUTER,label:"Data & AI Workspace"},{icon:$.CUBE,label:"Artifacts"},{icon:$.DATABASE,label:"Data Sources"},{icon:$.PIE_CHART,label:"Health Monitoring"},{icon:$.BULK_CHECK,label:"Bulk Actions"},{icon:$.CODE,label:"Attribute Management"},{icon:$.GEAR,label:"Administration"}],[i,a]=d.useState("Pipelines"),u=b=>{a(b)},c=()=>{console.log("Home clicked")},h=()=>{console.log("Settings clicked")},f=()=>{console.log("User profile clicked")};return t.jsxs("div",{className:"app-layout",children:[t.jsx(Lt,{organization:n}),t.jsxs("div",{className:"content-container",children:[t.jsx(Tt,{items:s,activeItem:i,onItemClick:u}),t.jsxs("div",{className:"main-content",children:[t.jsx(Mt,{hostname:o,userProfile:e,onHomeClick:c,onSettingsClick:h,onUserProfileClick:f}),t.jsx("div",{className:"main-layout",children:r})]})]})]})},S=(e,o)=>{if(typeof window<"u")return getComputedStyle(document.documentElement).getPropertyValue("--"+e).trim()||o||"";const n=o?", "+o:"";return"var(--"+e+n+")"},C={BLACK_50:S("black-50","rgba(26, 26, 26, 0.05)"),BLACK_100:S("black-100","rgba(26, 26, 26, 0.1)"),BLACK_200:S("black-200","rgba(26, 26, 26, 0.2)"),BLACK_300:S("black-300","rgba(26, 26, 26, 0.3)"),BLACK_400:S("black-400","rgba(26, 26, 26, 0.4)"),BLACK_500:S("black-500","rgba(26, 26, 26, 0.5)"),BLACK_600:S("black-600","rgba(26, 26, 26, 0.6)"),BLACK_700:S("black-700","rgba(26, 26, 26, 0.7)"),BLACK_800:S("black-800","rgba(26, 26, 26, 0.8)"),BLACK_900:S("black-900","rgba(26, 26, 26, 1)"),BLACK:S("black-900","#1a1a1a"),BLACK_OPACITY_20:"rgba(26, 26, 26, 0.2)",WHITE_50:S("white-50","rgba(255, 255, 255, 0.05)"),WHITE_100:S("white-100","rgba(255, 255, 255, 0.1)"),WHITE_200:S("white-200","rgba(255, 255, 255, 0.2)"),WHITE_300:S("white-300","rgba(255, 255, 255, 0.3)"),WHITE_400:S("white-400","rgba(255, 255, 255, 0.4)"),WHITE_500:S("white-500","rgba(255, 255, 255, 0.5)"),WHITE_600:S("white-600","rgba(255, 255, 255, 0.6)"),WHITE_700:S("white-700","rgba(255, 255, 255, 0.7)"),WHITE_800:S("white-800","rgba(255, 255, 255, 0.8)"),WHITE_900:S("white-900","rgba(255, 255, 255, 1)"),WHITE:S("white-900","#ffffff"),BLUE_50:S("blue-50","rgba(240, 249, 255, 1)"),BLUE_100:S("blue-100","rgba(225, 243, 254, 1)"),BLUE_200:S("blue-200","rgba(185, 229, 252, 1)"),BLUE_300:S("blue-300","rgba(125, 211, 251, 1)"),BLUE_400:S("blue-400","rgba(58, 190, 247, 1)"),BLUE_500:S("blue-500","rgba(27, 173, 240, 1)"),BLUE_600:S("blue-600","rgba(64, 114, 210, 1)"),BLUE_700:S("blue-700","rgba(3, 105, 159, 1)"),BLUE_800:S("blue-800","rgba(5, 69, 103, 1)"),BLUE_900:S("blue-900","rgba(4, 38, 63, 1)"),BLUE:S("graph-primary-blue","#2D9CDB"),GREY_50:S("grey-50","rgba(248, 250, 252, 1)"),GREY_100:S("grey-100","rgba(241, 245, 249, 1)"),GREY_200:S("grey-200","rgba(225, 231, 239, 1)"),GREY_300:S("grey-300","rgba(200, 214, 229, 1)"),GREY_400:S("grey-400","rgba(158, 172, 192, 1)"),GREY_500:S("grey-500","rgba(100, 116, 139, 1)"),GREY_600:S("grey-600","rgba(72, 86, 106, 1)"),GREY_700:S("grey-700","rgba(51, 65, 86, 1)"),GREY_800:S("grey-800","rgba(29, 40, 57, 1)"),GREY_900:S("grey-900","rgba(20, 30, 53, 1)"),GREY:S("grey-400","#CCCCCC"),ORANGE:S("graph-primary-orange","#FFA62E"),RED:S("graph-primary-red","#FF5C64"),GREEN:S("graph-primary-green","#A5C34E"),YELLOW:S("graph-primary-yellow","#FBED53"),PURPLE:S("graph-primary-purple","#7A51AB"),GREEN_BG:S("green-bg","rgba(234, 254, 229, 1)"),GREEN_SUCCESS:S("green-success","rgba(8, 173, 55, 1)"),ORANGE_BG:S("orange-bg","rgba(254, 250, 229, 1)"),ORANGE_CAUTION:S("orange-caution","rgba(249, 173, 20, 1)"),RED_BG:S("red-bg","rgba(254, 234, 229, 1)"),RED_ERROR:S("red-error","rgba(216, 35, 44, 1)"),GRAPH_SECONDARY_BROWN:S("graph-secondary-brown","#AD7942"),GRAPH_SECONDARY_PINK:S("graph-secondary-pink","#FB90B4"),GRAPH_SECONDARY_TEAL:S("graph-secondary-teal","#3CCABA"),GRAPH_SECONDARY_DARK_BLUE:S("graph-secondary-dark-blue","#4072D2"),GRAPH_SECONDARY_BLACK:S("graph-secondary-black","#424E62"),GRAPH_SECONDARY_GREY:S("graph-secondary-grey","#B4B4B4")},je=[C.ORANGE,C.RED,C.GREEN,C.BLUE,C.YELLOW,C.PURPLE,C.GRAPH_SECONDARY_BROWN,C.GRAPH_SECONDARY_PINK,C.GRAPH_SECONDARY_TEAL,C.GRAPH_SECONDARY_DARK_BLUE,C.GRAPH_SECONDARY_BLACK,C.GRAPH_SECONDARY_GREY],Ga=({dataSeries:e,width:o=1e3,height:n=600,xRange:r,yRange:s,variant:i="normal",xTitle:a="Columns",yTitle:u="Rows",title:c="Area Graph"})=>{const h=d.useRef(null),{xMin:f,xMax:b,yMin:x,yMax:E}=d.useMemo(()=>{let g=Number.MAX_VALUE,p=Number.MIN_VALUE,k=Number.MAX_VALUE,T=Number.MIN_VALUE;e.forEach(j=>{j.x.forEach(R=>{g=Math.min(g,R),p=Math.max(p,R)}),j.y.forEach(R=>{k=Math.min(k,R),T=Math.max(T,R)})});const I=(p-g)*.1,L=(T-k)*.1;return{xMin:g-I,xMax:p+I,yMin:i==="stacked"?0:k-L,yMax:T+L}},[e,i]),y=d.useMemo(()=>r||[f,b],[r,f,b]),_=d.useMemo(()=>s||[x,E],[s,x,E]),M=d.useMemo(()=>{const g=y[1]-y[0];let p=Math.pow(10,Math.floor(Math.log10(g)));g/p>10&&(p=p*2),g/p<4&&(p=p/2);const k=[];let T=Math.ceil(y[0]/p)*p;for(;T<=y[1];)k.push(T),T+=p;return k},[y]),w=d.useMemo(()=>{const g=_[1]-_[0];let p=Math.pow(10,Math.floor(Math.log10(g)));g/p>10&&(p=p*2),g/p<4&&(p=p/2);const k=[];let T=Math.ceil(_[0]/p)*p;for(;T<=_[1];)k.push(T),T+=p;return k},[_]),m=d.useMemo(()=>({tickcolor:C.GREY_200,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:C.BLACK_900,family:"Inter, sans-serif",weight:400},linecolor:C.BLACK_900,linewidth:1,position:0,zeroline:!1}),[]),v=d.useMemo(()=>({text:c,x:.5,y:.95,xanchor:"center",yanchor:"top",font:{size:32,weight:600,family:"Inter, sans-serif",color:C.BLACK_900,lineheight:1.2,standoff:30}}),[c]);return d.useEffect(()=>{if(!h.current)return;let g;if(i==="stacked"){const I=new Array(e[0]?.x.length||0).fill(0);g=e.map((L,j)=>{const R=L.y.map((N,z)=>{const B=I[z]+N;return I[z]=B,B});return{x:L.x,y:R,type:"scatter",mode:"lines",name:L.name,fill:j===0?"tozeroy":"tonexty",fillcolor:L.color,line:{color:L.color,width:2}}})}else g=e.map(I=>({x:I.x,y:I.y,type:"scatter",mode:"lines",name:I.name,fill:I.fill||"tozeroy",fillcolor:I.color,line:{color:I.color,width:2}}));const p={width:o,height:n,title:v,margin:{l:80,r:40,b:80,t:80,pad:0},paper_bgcolor:C.WHITE,plot_bgcolor:C.WHITE,font:{family:"Inter, sans-serif"},dragmode:!1,xaxis:{title:{text:a,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:C.GREY_200,range:r,autorange:!r,tickmode:"array",tickvals:M,showgrid:!0,...m},yaxis:{title:{text:u,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:C.GREY_200,range:s,autorange:!s,tickmode:"array",tickvals:w,showgrid:!0,...m},legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:13,color:C.BLUE_900,family:"Inter, sans-serif",weight:500,lineheight:18}},showlegend:!0},k={responsive:!0,displayModeBar:!1,displaylogo:!1};q.newPlot(h.current,g,p,k);const T=h.current;return()=>{T&&q.purge(T)}},[e,o,n,r,s,y,_,i,a,u,v,m,M,w]),t.jsx("div",{className:"area-graph-container",children:t.jsx("div",{ref:h,style:{width:"100%",height:"100%"}})})},Ua=({dataSeries:e,width:o=1e3,height:n=600,xRange:r,yRange:s,variant:i="group",xTitle:a="Columns",yTitle:u="Rows",title:c="Bar Graph",barWidth:h=24})=>{const f=d.useRef(null),{yMin:b,yMax:x}=d.useMemo(()=>{let m=Number.MAX_VALUE,v=Number.MIN_VALUE,g=Number.MAX_VALUE,p=Number.MIN_VALUE;e.forEach(I=>{I.x.forEach(L=>{m=Math.min(m,L),v=Math.max(v,L)}),I.y.forEach(L=>{g=Math.min(g,L),p=Math.max(p,L)})});const k=(v-m)*.1,T=(p-g)*.1;return{xMin:m-k,xMax:v+k,yMin:i==="stack"?0:g-T,yMax:p+T}},[e,i]),E=d.useMemo(()=>s||[b,x],[s,b,x]),y=d.useMemo(()=>[...new Set(e.flatMap(m=>m.x))],[e]),_=d.useMemo(()=>{const m=E[1]-E[0];let v=Math.pow(10,Math.floor(Math.log10(m)));m/v>10&&(v=v*2),m/v<4&&(v=v/2);const g=[];let p=Math.ceil(E[0]/v)*v;for(;p<=E[1];)g.push(p),p+=v;return g},[E]),M=d.useMemo(()=>{switch(i){case"stack":return"stack";case"overlay":return"overlay";default:return"group"}},[i]),w=d.useMemo(()=>({tickcolor:C.GREY_200,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:C.BLACK_900,family:"Inter, sans-serif",weight:400},linecolor:C.BLACK_900,linewidth:1,position:0,zeroline:!1}),[]);return d.useEffect(()=>{if(!f.current)return;const m=e.map(k=>({x:k.x,y:k.y,type:"bar",name:k.name,marker:{color:k.color},width:h,error_y:k.error_y})),v={title:{text:c,font:{size:32,family:"Inter, sans-serif",color:C.BLACK_900}},width:o,height:n,margin:{l:80,r:30,b:80,t:60,pad:0},paper_bgcolor:C.WHITE,plot_bgcolor:C.WHITE,font:{family:"Inter, sans-serif"},barmode:M,bargap:.15,dragmode:!1,xaxis:{title:{text:a,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:32},gridcolor:C.GREY_200,range:r,autorange:!r,tickmode:"array",tickvals:y,showgrid:!0,...w},yaxis:{title:{text:u,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:30},gridcolor:C.GREY_200,range:s,autorange:!s,tickmode:"array",tickvals:_,showgrid:!0,...w},legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:16,color:C.BLUE_900,family:"Inter, sans-serif",weight:500}},showlegend:e.length>1},g={responsive:!0,displayModeBar:!1,displaylogo:!1};q.newPlot(f.current,m,v,g);const p=f.current;return()=>{p&&q.purge(p)}},[e,o,n,r,s,a,u,c,h,M,w,y,_]),t.jsx("div",{className:"bar-graph-container",children:t.jsx("div",{ref:f,style:{width:"100%",height:"100%"}})})},Va=-1.8,Fa=({dataSeries:e,width:o=1e3,height:n=600,xRange:r,yRange:s,xTitle:i="Columns",yTitle:a="Rows",title:u="Boxplot",showPoints:c=!1})=>{const h=d.useRef(null),{yMin:f,yMax:b}=d.useMemo(()=>{let M=Number.MAX_VALUE,w=Number.MIN_VALUE;e.forEach(v=>{v.y.forEach(g=>{M=Math.min(M,g),w=Math.max(w,g)})});const m=(w-M)*.1;return{yMin:M-m,yMax:w+m}},[e]),x=d.useMemo(()=>s||[f,b],[s,f,b]),E=d.useMemo(()=>{const M=x[1]-x[0];let w=Math.pow(10,Math.floor(Math.log10(M)));M/w>10&&(w=w*2),M/w<4&&(w=w/2);const m=[];let v=Math.ceil(x[0]/w)*w;for(;v<=x[1];)m.push(v),v+=w;return m},[x]),y=d.useMemo(()=>({tickcolor:C.GREY_200,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:C.BLACK_900,family:"Inter, sans-serif",weight:400},linecolor:C.BLACK_900,linewidth:1,position:0,zeroline:!1}),[]),_=d.useMemo(()=>({text:u,x:.5,y:.95,xanchor:"center",yanchor:"top",font:{size:32,weight:600,family:"Inter, sans-serif",color:C.BLACK_900,lineheight:1.2,standoff:30}}),[u]);return d.useEffect(()=>{if(!h.current)return;const M=e.map(g=>({y:g.y,x:g.x,type:"box",name:g.name,marker:{color:g.color},line:{color:g.color},fillcolor:g.color+"40",boxpoints:c?g.boxpoints||"outliers":!1,jitter:g.jitter||.3,pointpos:g.pointpos||Va})),w={width:o,height:n,title:_,margin:{l:80,r:40,b:80,t:80,pad:0},paper_bgcolor:C.WHITE,plot_bgcolor:C.WHITE,font:{family:"Inter, sans-serif"},dragmode:!1,xaxis:{title:{text:i,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:C.GREY_200,range:r,autorange:!r,showgrid:!0,...y},yaxis:{title:{text:a,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:C.GREY_200,range:s,autorange:!s,tickmode:"array",tickvals:E,showgrid:!0,...y},legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:13,color:C.BLUE_900,family:"Inter, sans-serif",weight:500,lineheight:18}},showlegend:!0},m={responsive:!0,displayModeBar:!1,displaylogo:!1};q.newPlot(h.current,M,w,m);const v=h.current;return()=>{v&&q.purge(v)}},[e,o,n,r,s,x,i,a,c,_,y,E]),t.jsx("div",{className:"boxplot-container",children:t.jsx("div",{ref:h,style:{width:"100%",height:"100%"}})})},Ya=75,Za=1.05,Wa=e=>{const o={A:e.peakA,T:e.peakT,G:e.peakG,C:e.peakC},n=Object.values(o);if(n.every(a=>a===n[0]))return"";let s="",i=0;return Object.entries(o).forEach(([a,u])=>{u>i&&(s=a,i=u)}),s},Ka=({data:e=[],width:o=900,height:n=600,positionInterval:r=10,colorA:s="#2D9CDB",colorT:i="#A1C63C",colorG:a="#FF5C64",colorC:u="#FFA62E"})=>{const c=d.useRef(null),h=d.useMemo(()=>e.map(p=>p.position),[e]),f=d.useMemo(()=>e.map(p=>Wa(p)),[e]),b=d.useMemo(()=>e.map(p=>p.peakA),[e]),x=d.useMemo(()=>e.map(p=>p.peakT),[e]),E=d.useMemo(()=>e.map(p=>p.peakG),[e]),y=d.useMemo(()=>e.map(p=>p.peakC),[e]),_=d.useMemo(()=>({x:h,y:b,type:"scatter",mode:"lines",name:"A",line:{color:s,width:2,shape:"spline"}}),[h,b,s]),M=d.useMemo(()=>({x:h,y:x,type:"scatter",mode:"lines",name:"T",line:{color:i,width:2,shape:"spline"}}),[h,x,i]),w=d.useMemo(()=>({x:h,y:E,type:"scatter",mode:"lines",name:"G",line:{color:a,width:2,shape:"spline"}}),[h,E,a]),m=d.useMemo(()=>({x:h,y,type:"scatter",mode:"lines",name:"C",line:{color:u,width:2,shape:"spline"}}),[h,y,u]),v=d.useMemo(()=>Math.max(...b,...x,...E,...y),[b,x,E,y]);if(d.useEffect(()=>{if(!c.current||e.length===0)return;const p=[_,M,w,m],k={width:o,height:n-Ya,margin:{l:0,r:0,b:20,t:10,pad:0},paper_bgcolor:"var(--white-900)",plot_bgcolor:"var(--white-900)",font:{family:"Inter, sans-serif"},showlegend:!1,xaxis:{showgrid:!1,zeroline:!1,showticklabels:!1,showline:!1,range:[Math.min(...h),Math.max(...h)],fixedrange:!0},yaxis:{showgrid:!1,zeroline:!1,showticklabels:!1,showline:!1,range:[0,v*Za],fixedrange:!0}},T={responsive:!0,displayModeBar:!1,displaylogo:!1,fillFrame:!0};q.newPlot(c.current,p,k,T);const I=c.current;return()=>{I&&q.purge(I)}},[e,o,n,_,M,w,m,v,h]),e.length===0)return t.jsx("div",{className:"chart-container",children:"No data available"});const g=()=>{const p=()=>{const T=Math.min(...h),I=Math.max(...h),L=o;return t.jsx("div",{className:"sequence-letters-container",children:f.map((j,R)=>{const N=h[R],z=j==="A"?s:j==="T"?i:j==="G"?a:j==="C"?u:"var(--black-900)",U=(N-T)/(I-T)*L;return t.jsx("span",{className:"sequence-letter",style:{left:`${U}px`,color:z},children:j},`base-${R}`)})})},k=()=>{const T=Math.min(...h),I=Math.max(...h),L=o,j=Math.ceil(T/r)*r,R=[];for(let N=j;N<=I;N+=r)R.push({position:N,label:N.toString()});return t.jsx("div",{className:"position-numbers-container",children:R.map(N=>{const B=(N.position-T)/(I-T)*L;return t.jsx("span",{className:"position-number",style:{left:`${B}px`},children:N.label},`pos-${N.position}`)})})};return t.jsxs("div",{className:"sequence-header",children:[p(),k()]})};return t.jsxs("div",{className:"chromatogram-container",style:{width:o,height:n},children:[g(),t.jsx("div",{className:"chromatogram-chart",children:t.jsx("div",{ref:c,style:{width:"100%",height:"100%"}})})]})},_e={MARGIN_LEFT:70,MARGIN_RIGHT:30,MARGIN_BOTTOM:60,MARGIN_TOP_WITH_TITLE:50,MARGIN_TOP_NO_TITLE:30,MARGIN_PAD:5},oo={USER_ANNOTATION_FONT_SIZE:11,AUTO_ANNOTATION_FONT_SIZE:10},rt={default:{ax:0,ay:-35},overlap:[{ax:50,ay:-35},{ax:-60,ay:-35},{ax:70,ay:-55},{ax:-80,ay:-55},{ax:50,ay:-75},{ax:-60,ay:-75}]};function Xa(e,o){const n=[...e].sort((i,a)=>i.peak.x-a.peak.x),r=[];let s=[];for(const i of n){if(s.length===0){s.push(i);continue}const a=s[s.length-1];Math.abs(i.peak.x-a.peak.x)<o?s.push(i):(r.push(s),s=[i])}return s.length>0&&r.push(s),r}function no(e,o,n){const r=o===-1,s=r?C.GREY_500:je[o%je.length],i=r?C.BLACK_900:s,a=e.text??(e._computed?.area===void 0?"":`Area: ${e._computed.area.toFixed(2)}`),u=r&&e.ax!==void 0?e.ax:n.ax,c=r&&e.ay!==void 0?e.ay:n.ay;return{x:e.x,y:e.y,text:a,showarrow:!0,arrowhead:2,arrowsize:1,arrowwidth:1,arrowcolor:s,ax:u,ay:c,font:{size:r?oo.USER_ANNOTATION_FONT_SIZE:oo.AUTO_ANNOTATION_FONT_SIZE,color:i,family:"Inter, sans-serif"},bgcolor:C.WHITE,borderpad:2,bordercolor:r?void 0:s,borderwidth:r?0:1}}function qa(e){if(e.length===1){const{peak:n,seriesIndex:r}=e[0];return[no(n,r,rt.default)]}return[...e].sort((n,r)=>n.peak.y-r.peak.y).map(({peak:n,seriesIndex:r},s)=>{const i=rt.overlap[s%rt.overlap.length];return no(n,r,i)})}const Qa=-5,Ja=-12,ro=-16;function so(e,o,n,r){return n==="none"?[]:[{x:[e],y:[o],type:"scatter",mode:"markers",marker:{symbol:n==="diamond"?"diamond":"triangle-up",size:8,color:r},showlegend:!1,hoverinfo:"skip"}]}function el(e){const o=[];for(const{peaks:n,seriesIndex:r,x:s}of e){const i=je[r%je.length],a=Qa+r*ro,u=Ja+r*ro;for(const c of n){const h=c._computed?.startIndex??0,f=c._computed?.endIndex??0,b=s[h],x=s[f],E=c.startMarker??"triangle",y=c.endMarker??"diamond";o.push(...so(b,a,E,i)),o.push(...so(x,u,y,i))}}return o}function tl(e,o,n){let r=e[o],s=e[o];for(let i=o-1;i>=Math.max(0,o-n);i--)r=Math.min(r,e[i]);for(let i=o+1;i<Math.min(e.length,o+n);i++)s=Math.min(s,e[i]);return e[o]-Math.max(r,s)}function ol(e,o){let n=o,r=o;for(let s=o-1;s>=0&&e[s]<=e[s+1];s--)n=s;for(let s=o+1;s<e.length&&e[s]<=e[s-1];s++)r=s;return{startIndex:n,endIndex:r}}function ko(e,o,n,r){const s=Math.min(o[n],o[r]);let i=0;for(let a=n;a<r;a++){const u=e[a+1]-e[a],c=o[a]-s,h=o[a+1]-s;i+=(c+h)*u/2}return i}function nl(e,o,n,r,s){const i=Math.min(o[r],o[s]),a=(o[n]+i)/2;let u=n,c=n;for(let h=n;h>=r;h--)if(o[h]<a){u=h;break}for(let h=n;h<=s;h++)if(o[h]<a){c=h;break}return e[c]-e[u]}function rl(e,o){const n=[];for(const r of e)n.some(i=>Math.abs((i._computed?.index??0)-(r._computed?.index??0))<o)?n.length>0&&r.y>n[n.length-1].y&&(n.pop(),n.push(r)):n.push(r);return n.sort((r,s)=>r.x-s.x)}function sl(e,o,n={}){const{minHeight:r=.05,minDistance:s=5,prominence:i=.02,relativeThreshold:a=!0}=n;if(o.length<3)return[];const u=Math.max(...o),c=a?r*u:r,h=a?i*u:i,f=s*3,b=[];for(let x=1;x<o.length-1;x++){if(!(o[x]>o[x-1]&&o[x]>o[x+1]&&o[x]>=c)||tl(o,x,f)<h)continue;const{startIndex:_,endIndex:M}=ol(o,x),w=ko(e,o,_,M),m=nl(e,o,x,_,M);b.push({x:e[x],y:o[x],_computed:{area:w,index:x,startIndex:_,endIndex:M,widthAtHalfMax:m}})}return rl(b,s)}function st(e,o){if(e.length===0||e.length===1)return 0;let n=0,r=e.length-1;for(;n<r;){const s=Math.floor((n+r)/2);e[s]<o?n=s+1:r=s}return n>0&&Math.abs(e[n-1]-o)<Math.abs(e[n]-o)?n-1:n}function il(e,o,n){return e.map(r=>{if(r.startX!==void 0&&r.endX!==void 0){const s=st(o,r.startX),i=st(o,r.endX),a=st(o,r.x),u=r._computed?.area??ko(o,n,s,i);return{...r,_computed:{...r._computed,index:a,startIndex:s,endIndex:i,area:u}}}return r})}function al(e,o,n){const r=[];e.forEach(({peaks:i,seriesIndex:a})=>{r.push({peaks:i,seriesIndex:a,x:n[a].x,y:n[a].y})});const s=o.filter(i=>i._computed?.startIndex!==void 0&&i._computed?.endIndex!==void 0);return s.length>0&&n.length>0&&r.push({peaks:s,seriesIndex:0,x:n[0].x,y:n[0].y}),r}function ll(e,o){if(!o)return e;const n=[];for(const[r,s]of Object.entries(o))if(s!=null&&s!==""){const i=r.replace(/([A-Z])/g," $1").replace(/^./,a=>a.toUpperCase()).trim();n.push(`${i}: ${String(s)}`)}return n.length>0?`${e}<br>${n.join("<br>")}`:e}function cl(e,o){const n=Math.min(e.length,o.length),r=e.slice(0,n),i=o.slice(0,n).map(u=>Number.isFinite(u)?u:0);return{x:r.map(u=>Number.isFinite(u)?u:0),y:i}}function dl(e,o,n=50){if(o==="none"||e.length===0)return e;if(o==="linear"){if(e.length===1)return[0];const r=(e[e.length-1]-e[0])/(e.length-1);return e.map((s,i)=>s-(e[0]+r*i))}if(o==="rolling"){const r=[],s=Math.floor(n/2);for(let i=0;i<e.length;i++){const a=Math.max(0,i-s),u=Math.min(e.length,i+s+1),c=e.slice(a,u);r.push(Math.min(...c))}return e.map((i,a)=>i-r[a])}return e}const ul=({series:e,width:o=900,height:n=500,title:r,xAxisTitle:s="Retention Time (min)",yAxisTitle:i="Signal (mAU)",annotations:a=[],xRange:u,yRange:c,showLegend:h=!0,showGridX:f=!0,showGridY:b=!0,showMarkers:x=!1,markerSize:E=4,showCrosshairs:y=!1,baselineCorrection:_="none",baselineWindowSize:M=50,peakDetectionOptions:w,showPeakAreas:m=!1,boundaryMarkers:v="none",annotationOverlapThreshold:g=.4,showExportButton:p=!0})=>{const k=w!==void 0,T=d.useRef(null),I=d.useMemo(()=>e.map(R=>{const N=cl(R.x,R.y);return{...R,x:N.x,y:dl(N.y,_,M)}}),[e,_,M]),L=d.useMemo(()=>{if(a.length===0||I.length===0)return a;const{x:R,y:N}=I[0];return il(a,R,N)},[a,I]),j=d.useMemo(()=>{const R=[];return k&&w&&I.forEach((N,z)=>{const B=sl(N.x,N.y,w);B.length>0&&R.push({peaks:B,seriesIndex:z})}),R},[I,k,w]);return d.useEffect(()=>{const R=T.current;if(!R||e.length===0)return;const N=I.map((G,ie)=>{const Q=G.color||je[ie%je.length],me=ll(G.name,G.metadata),ce={x:G.x,y:G.y,type:"scatter",mode:x?"lines+markers":"lines",name:G.name,line:{color:Q,width:1.5},hovertemplate:`%{x:.2f} ${s}<br>%{y:.2f} ${i}<extra>${me}</extra>`};return x&&(ce.marker={size:E,color:Q}),ce});if(v!=="none"){const G=al(j,L,I);if(G.length>0){const ie=el(G);N.push(...ie)}}const z=[];L.forEach(G=>{z.push({peak:G,seriesIndex:-1})}),m&&k&&j.forEach(({peaks:G,seriesIndex:ie})=>{G.forEach(Q=>{z.push({peak:Q,seriesIndex:ie})})});const B=Xa(z,g),U=[];for(const G of B)U.push(...qa(G));const Y={title:r?{text:r,font:{size:20,family:"Inter, sans-serif",color:C.BLACK_900}}:void 0,width:o,height:n,margin:{l:_e.MARGIN_LEFT,r:_e.MARGIN_RIGHT,b:_e.MARGIN_BOTTOM,t:r?_e.MARGIN_TOP_WITH_TITLE:_e.MARGIN_TOP_NO_TITLE,pad:_e.MARGIN_PAD},paper_bgcolor:C.WHITE,plot_bgcolor:C.WHITE,font:{family:"Inter, sans-serif"},hovermode:y?"x":"x unified",dragmode:"zoom",xaxis:{title:{text:s,font:{size:14,color:C.BLACK_600,family:"Inter, sans-serif"},standoff:15},showgrid:f,gridcolor:C.GREY_200,linecolor:C.BLACK_900,linewidth:1,range:u,autorange:!u,zeroline:!1,tickfont:{size:12,color:C.BLACK_900,family:"Inter, sans-serif"},showspikes:y,spikemode:"across",spikesnap:"cursor",spikecolor:C.GREY_500,spikethickness:1,spikedash:"dot"},yaxis:{title:{text:i,font:{size:14,color:C.BLACK_600,family:"Inter, sans-serif"},standoff:10},showgrid:b,gridcolor:C.GREY_200,linecolor:C.BLACK_900,linewidth:1,range:c,autorange:!c,zeroline:!1,tickfont:{size:12,color:C.BLACK_900,family:"Inter, sans-serif"},showspikes:y,spikemode:"across",spikesnap:"cursor",spikecolor:C.GREY_500,spikethickness:1,spikedash:"dot"},legend:{x:.5,y:-.15,xanchor:"center",yanchor:"top",orientation:"h",font:{size:12,color:C.BLACK_900,family:"Inter, sans-serif"}},showlegend:h&&e.length>1,annotations:U},W={responsive:!0,displayModeBar:!0,displaylogo:!1,modeBarButtonsToRemove:["lasso2d","select2d",...p?[]:["toImage"]],...p&&{toImageButtonOptions:{format:"png",filename:"chromatogram",width:o,height:n}}};return q.newPlot(R,N,Y,W),()=>{R&&q.purge(R)}},[I,j,e.length,o,n,r,s,i,L,u,c,h,f,b,x,E,y,k,w,m,v,g,p]),t.jsx("div",{className:"chromatogram-chart-container",children:t.jsx("div",{ref:T,style:{width:"100%",height:"100%"}})})},hl=({dataSeries:e,width:o=1e3,height:n=600,title:r="Dot Plot",xTitle:s="Columns",yTitle:i="Rows",variant:a="default",markerSize:u=8})=>{const c=d.useRef(null),h=d.useMemo(()=>Array.isArray(e)?e:[e],[e]),f=d.useMemo(()=>[C.ORANGE,C.RED,C.GREEN,C.BLUE,C.YELLOW,C.PURPLE],[]),b=d.useMemo(()=>["circle","square","diamond","triangle-up","triangle-down","star"],[]),x=d.useMemo(()=>h.map((w,m)=>a==="default"?{...w,color:w.color||f[0],symbol:"circle",size:w.size||u}:{...w,color:w.color||f[m%f.length],symbol:w.symbol||b[m%b.length],size:w.size||u}),[h,a,u,f,b]),E=C.GREY_200,y=d.useMemo(()=>x.map(w=>({type:"scatter",x:w.x,y:w.y,mode:"markers",name:w.name,marker:{color:w.color,size:w.size,symbol:w.symbol,line:{color:C.WHITE,width:1}},hovertemplate:`${s}: %{x}<br>${i}: %{y}<extra>${w.name}</extra>`})),[x,s,i]),_=d.useMemo(()=>({tickcolor:C.GREY_200,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:C.BLACK_900,family:"Inter, sans-serif",weight:400},linecolor:C.BLACK_900,linewidth:1,position:0,zeroline:!1}),[]),M=d.useMemo(()=>({text:r,x:.5,y:.95,xanchor:"center",yanchor:"top",font:{size:32,weight:600,family:"Inter, sans-serif",color:C.BLACK_900,lineheight:1.2,standoff:30}}),[r]);return d.useEffect(()=>{if(!c.current)return;const w={width:o,height:n,font:{family:"Inter, sans-serif"},title:M,margin:{l:80,r:40,b:80,t:80,pad:0},showlegend:!0,legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:13,color:C.BLUE_900,family:"Inter, sans-serif",weight:500,lineheight:18}},xaxis:{title:{text:s,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:E,..._},yaxis:{title:{text:i,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:E,..._},paper_bgcolor:C.WHITE,plot_bgcolor:C.WHITE},m={responsive:!0,displayModeBar:!1,displaylogo:!1};q.newPlot(c.current,y,w,m);const v=c.current;return()=>{v&&q.purge(v)}},[o,n,s,i,y,M,_,E]),t.jsx("div",{className:"dotplot-container",style:{width:o},children:t.jsx("div",{ref:c,style:{width:"100%",height:"100%",margin:"0"}})})},_o="96",pl="384",fl="1536",ml="custom",xl={sample:"#4575b4",control:"#d73027",empty:"#f0f0f0"},gl={[_o]:{rows:8,columns:12},[pl]:{rows:16,columns:24},[fl]:{rows:32,columns:48}},Cl=[[0,"#313695"],[.1,"#4575b4"],[.2,"#74add1"],[.3,"#abd9e9"],[.4,"#e0f3f8"],[.5,"#ffffbf"],[.6,"#fee090"],[.7,"#fdae61"],[.8,"#f46d43"],[.9,"#d73027"],[1,"#a50026"]],it={textDark:"#333",regionBorder:"#000",emptyWell:"#f0f0f0"},bl={Viridis:[[0,"#440154"],[.25,"#414487"],[.5,"#2a788e"],[.75,"#22a884"],[1,"#7ad151"]],Blues:[[0,"#f7fbff"],[.25,"#c6dbef"],[.5,"#6baed6"],[.75,"#2171b5"],[1,"#08306b"]],RdBu:[[0,"#67001f"],[.25,"#d6604d"],[.5,"#f7f7f7"],[.75,"#4393c3"],[1,"#053061"]],Greens:[[0,"#f7fcf5"],[.25,"#c7e9c0"],[.5,"#74c476"],[.75,"#238b45"],[1,"#00441b"]],Reds:[[0,"#fff5f0"],[.25,"#fcbba1"],[.5,"#fb6a4a"],[.75,"#cb181d"],[1,"#67000d"]],Greys:[[0,"#ffffff"],[.25,"#d9d9d9"],[.5,"#969696"],[.75,"#525252"],[1,"#000000"]],Hot:[[0,"#000000"],[.33,"#e60000"],[.66,"#ffff00"],[1,"#ffffff"]],YlGnBu:[[0,"#ffffd9"],[.25,"#c7e9b4"],[.5,"#41b6c4"],[.75,"#225ea8"],[1,"#081d58"]],YlOrRd:[[0,"#ffffcc"],[.25,"#fed976"],[.5,"#fd8d3c"],[.75,"#e31a1c"],[1,"#800026"]],Plasma:[[0,"#0d0887"],[.25,"#7e03a8"],[.5,"#cc4778"],[.75,"#f89540"],[1,"#f0f921"]]},X={MAX_RANDOM_VALUE:5e4,SENTINEL_RATIO:.01,COLOR_SCALE_THRESHOLD:.99,COLOR_SCALE_EPSILON:.001,MULTI_VALUE_PRIMARY_RATIO:.575,MULTI_VALUE_SECONDARY_RATIO:.425,FONT_SIZE_LARGE:11,LABEL_CENTER_OFFSET:-.5,MARGIN_TOP:70,MARGIN_RIGHT:50,MARGIN_BOTTOM:40,MARGIN_LEFT:80,COLORBAR_LENGTH:130,DOMAIN_COLORBAR_OFFSET:.15,DOMAIN_COLORBAR_END:.85},Fe=65,xt=26;function vl(e){return Array.from({length:e},(o,n)=>n<xt?String.fromCharCode(Fe+n):"A"+String.fromCharCode(Fe+(n-xt)))}function yl(e){return Array.from({length:e},(o,n)=>n+1)}function gt(e){const o=e.match(/^([A-Z]{1,2})(\d{1,2})$/i);if(!o)return null;const n=o[1].toUpperCase(),r=n.length===1?n.charCodeAt(0)-Fe:xt+(n.charCodeAt(1)-Fe),s=parseInt(o[2],10)-1;return{row:r,col:s}}function wl(e,o,n){if(!e)return!1;const{row:r,col:s}=e;return r>=0&&s>=0&&r<o&&s<n}function jl(e,o){if(!e)return null;const n=o??Object.keys(e)[0];return n?e[n]:null}function kl(e,o,n,r,s){typeof e=="number"?r[o][n]=e:typeof e=="string"&&(s[o][n]=e)}function _l(e,o,n,r){const s=Array.from({length:o},()=>Array(n).fill(null)),i=Array.from({length:o},()=>Array(n).fill(null)),a=new Map,u=new Map;for(const c of e){const h=gt(c.wellId);if(!wl(h,o,n))continue;const f=c.wellId.toUpperCase();c.values&&a.set(f,c.values),c.tooltipData&&u.set(f,c.tooltipData);const b=jl(c.values,r);kl(b,h.row,h.col,s,i)}return{grid:s,categories:i,allValues:a,tooltipData:u}}function El(e){let o=1/0,n=-1/0;for(const r of e)for(const s of r)s!==null&&Number.isFinite(s)&&(o=Math.min(o,s),n=Math.max(n,s));return Number.isFinite(o)||(o=0),Number.isFinite(n)||(n=1),o===n&&(n=o+1),{min:o,max:n}}function Ml(e){return e.some(o=>o.values&&Object.keys(o.values).length>0)}function Ll(e){const o=new Set;for(const n of e)n.values&&Object.keys(n.values).forEach(r=>o.add(r));return[...o]}function Tl(e,o){for(const n of e)if(typeof n.values?.[o]=="string")return!0;return!1}function Al(e,o){return Ll(e).map(r=>{const s=o?.find(a=>a.id===r),i=Tl(e,r);return{id:r,name:s?.name??r,visualizationMode:s?.visualizationMode??(i?"categorical":void 0),colorScale:s?.colorScale,valueMin:s?.valueMin,valueMax:s?.valueMax,valueUnit:s?.valueUnit,categoryColors:s?.categoryColors}})}function Il(e,o,n){const r=e.match(/^([A-Z]{1,2})(\d{1,2}):([A-Z]{1,2})(\d{1,2})$/i);if(!r)return null;const s=gt(`${r[1]}${r[2]}`),i=gt(`${r[3]}${r[4]}`),a=Math.min(s.row,i.row),u=Math.max(s.row,i.row),c=Math.min(s.col,i.col),h=Math.max(s.col,i.col),f=o.length,b=n.length;return a>=f||u>=f||c>=b||h>=b?null:{minRow:a,maxRow:u,minCol:c,maxCol:h}}function Rl({wellId:e,value:o,allValues:n,tooltipExtra:r,activeLayerId:s,layerConfigMap:i,precision:a,valueUnit:u}){let c=`Well ${e}`;return n?c+=Sl(n,s,i,a):o!==null?c+=`<br>Value: ${o.toFixed(a)}${u}`:s?c+=`<br>▶ ${s}: -`:c+="<br>No data",r&&(c+=$l(r)),c}function Sl(e,o,n,r){let s="";for(const[i,a]of Object.entries(e)){const c=i===o?"▶ ":"",h=n.get(i)?.valueUnit,f=h?` ${h}`:"";a===null?s+=`<br>${c}${i}: -`:typeof a=="number"?s+=`<br>${c}${i}: ${a.toFixed(r)}${f}`:s+=`<br>${c}${i}: ${a.charAt(0).toUpperCase()+a.slice(1)}`}return s}function $l(e){let o="";for(const[n,r]of Object.entries(e))o+=`<br>${n}: ${String(r)}`;return o}function Nl(e,o,n){const r=n?{text:n}:void 0;switch(e){case"bottom":return{orientation:"h",thickness:20,len:.75,outlinewidth:0,ticksuffix:o,y:-.15,yanchor:"top",x:.5,xanchor:"center",title:r?{...r,side:"top"}:void 0};case"top":return{orientation:"h",thickness:20,len:.75,outlinewidth:0,ticksuffix:o,y:1.15,yanchor:"bottom",x:.5,xanchor:"center",title:r?{...r,side:"bottom"}:void 0};case"left":return{thickness:28,len:1,outlinewidth:0,ticksuffix:o,y:.5,yanchor:"middle",x:-.15,xanchor:"right",title:r?{...r,side:"right"}:void 0};default:return{thickness:20,len:.9,outlinewidth:0,ticksuffix:o,x:.88,xanchor:"left",y:.5,yanchor:"middle",title:r?{...r,side:"right"}:void 0}}}function Ol(e,o,n){const r=n?X.MARGIN_TOP:X.MARGIN_RIGHT,s=X.MARGIN_RIGHT,i=e==="left"?r+X.MARGIN_RIGHT:r,a=e==="right"?s+X.MARGIN_RIGHT:s,u=e==="bottom"?X.MARGIN_LEFT:X.MARGIN_RIGHT;let c;return o?c=e==="top"?X.COLORBAR_LENGTH:100:c=e==="top"?X.MARGIN_TOP:X.MARGIN_BOTTOM,{l:i,r:a,b:u,t:c,pad:5}}function Bl(e){switch(e){case"left":return X.MULTI_VALUE_PRIMARY_RATIO;case"right":return X.MULTI_VALUE_SECONDARY_RATIO;default:return .5}}function Pl(e){switch(e){case"left":return[X.DOMAIN_COLORBAR_OFFSET,1];case"right":return[0,X.DOMAIN_COLORBAR_END];default:return[0,1]}}function Hl(e,o,n,r,s,i){const a=[],u=[],c=[],h=[];for(let f=0;f<r;f++)for(let b=0;b<s;b++){a.push(b+1),u.push(o[f]);const x=e[f][b];c.push(x??i),h.push(n[f][b])}return{xData:a,yData:u,colorData:c,textData:h}}const Dl=4,zl=1,Gl=.8,io=100;function Ul(e,o,n,r,s,i,a){const u=a?X.MARGIN_TOP:X.MARGIN_RIGHT,c=io,h=i?io:X.MARGIN_BOTTOM,f=X.MARGIN_RIGHT,b=e-u-c,x=o-h-f,E=b/r,y=x/n,_=s==="square"?Math.max(E,y):Math.min(E,y);return Math.max(Dl,_*(s==="square"?zl:Gl))}const Eo=({data:e,layerConfigs:o,initialLayerId:n,onLayerChange:r,plateFormat:s=_o,rows:i,columns:a,visualizationMode:u="heatmap",categoryColors:c,regions:h,title:f,xTitle:b,yTitle:x,xLabels:E,yLabels:y,colorScale:_=Cl,valueMin:M,valueMax:w,emptyWellColor:m=it.emptyWell,showColorBar:v=!0,showLegend:g=!0,legendConfig:p,width:k=800,height:T=500,precision:I=0,markerShape:L="circle",onWellClick:j})=>{const R=d.useRef(null),N=d.useRef(j);N.current=j;const[z,B]=d.useState(n);let U,Y;if(s===ml)U=i??8,Y=a??12;else{const O=gl[s];U=O.rows,Y=O.columns}const W=d.useMemo(()=>{if(Array.isArray(e)&&e.length>0&&"wellId"in e[0]){const O=e;if(Ml(O))return Al(O,o)}return null},[e,o]),G=d.useMemo(()=>!W||W.length===0?null:z?W.find(O=>O.id===z)??W[0]:W[0],[W,z]),ie=G?.visualizationMode??u,Q=G?.colorScale??_,me=G?.valueMin??M,ce=G?.valueMax??w,he=G?.valueUnit?` ${G.valueUnit}`:"",te=d.useMemo(()=>({...xl,...c,...G?.categoryColors}),[c,G?.categoryColors]),le=G?.id,{grid:H,categoriesGrid:re,allValuesMap:A,tooltipDataMap:D}=d.useMemo(()=>{let O,V=Array.from({length:U},()=>Array(Y).fill(null)),K=new Map,ne=new Map;if(Array.isArray(e)&&e.length>0){const Z=_l(e,U,Y,le);O=Z.grid,V=Z.categories,K=Z.allValues,ne=Z.tooltipData}else O=Array.from({length:U},()=>Array.from({length:Y},()=>Math.random()*X.MAX_RANDOM_VALUE));return{grid:O,categoriesGrid:V,allValuesMap:K,tooltipDataMap:ne}},[e,U,Y,le]),P=y??vl(U),J=E??yl(Y),se=El(H),xe=me??se.min,be=ce??se.max,oe=H.some(O=>O.includes(null)),fe=xe-(be-xe)*X.SENTINEL_RATIO-1,ke=oe?H.map(O=>O.map(V=>V===null?fe:V)):H,ve=d.useMemo(()=>{if(!oe)return Q;let O;if(typeof Q=="string"){const Z=bl[Q];if(Z)O=Z;else return Q}else O=Q;const V=be-fe,K=(xe-fe)/V,ne=[[0,m],[K*X.COLOR_SCALE_THRESHOLD,m]];for(const[Z,pe]of O){const ge=K+Z*(1-K);ne.push([ge,pe])}return ne},[Q,oe,xe,be,fe,m]),de=oe?fe:xe,ye=d.useMemo(()=>{const O=new Map;if(W)for(const V of W)O.set(V.id,V);return O},[W]),Rt=H.map((O,V)=>O.map((K,ne)=>{const Z=`${P[V]}${J[ne]}`,pe=String(Z).toUpperCase();return Rl({wellId:Z,value:K,allValues:A.get(pe),tooltipExtra:D.get(pe),activeLayerId:G?.id,layerConfigMap:ye,precision:I,valueUnit:he})})),{categoricalGrid:Xe,categoricalColorScale:qe,uniqueTypes:Qe,catMax:St}=d.useMemo(()=>{if(ie!=="categorical")return{categoricalGrid:null,categoricalColorScale:null,uniqueTypes:[],catMax:0};const O=new Set;let V=!1;for(const ue of re)for(const Ce of ue)Ce?O.add(Ce):V=!0;V&&O.add("empty");const K=[...O].sort(),ne=new Map;K.forEach((ue,Ce)=>ne.set(ue,Ce));const Z=re.map(ue=>ue.map(Ce=>Ce===null?ne.get("empty")??0:ne.get(Ce)??ne.get("empty")??0)),pe=K.length,ge=[];if(pe===1){const ue=te[K[0]]||m;ge.push([0,ue]),ge.push([1,ue])}else K.forEach((ue,Ce)=>{const Be=te[ue]||m,Pe=Ce/(pe-1),He=.5/(pe-1),et=Math.max(0,Pe-He),Ie=Math.min(1,Pe+He-X.COLOR_SCALE_EPSILON);ge.push([et,Be]),ge.push([Ie,Be])});return{categoricalGrid:Z,categoricalColorScale:ge,uniqueTypes:K,catMax:pe-1}},[ie,re,te,m]),$t=d.useMemo(()=>{if(!h||h.length===0)return[];const O=[];for(const V of h){const K=Il(V.wells,P,J);if(!K)continue;const ne=.49,Z=K.minCol+1-ne,pe=K.maxCol+1+ne,ge=K.minRow-ne,ue=K.maxRow+ne;O.push({type:"rect",xref:"x",yref:"y",x0:Z,x1:pe,y0:ge,y1:ue,line:{color:V.borderColor||it.textDark,width:V.borderWidth??2},fillcolor:V.fillColor||"transparent",layer:"above"})}return O},[h,P,J]);d.useEffect(()=>{const O=R.current;if(!O)return;const V=ie==="categorical",K=V&&Xe?Xe:ke,ne=V&&qe?qe:ve,Z=V?0:de,pe=V?St||1:be,ge=V?!1:v,{xData:ue,yData:Ce,colorData:Be,textData:Pe}=Hl(K,P,Rt,U,Y,Z),He=Ul(k,T,U,Y,L,!!f,!!x),et=[{x:ue,y:Ce,mode:"markers",type:"scatter",marker:{symbol:L,size:He,color:Be,colorscale:ne,cmin:Z,cmax:pe,showscale:ge,colorbar:Nl(p?.position??"right",he,p?.title),line:{color:"var(--grey-400)",width:1}},hoverinfo:"text",text:Pe}],Ie=p?.position??"right",No={autosize:!1,title:f?{text:f,font:{family:"Inter, sans-serif",size:20,color:"var(--black-300)"},x:Bl(Ie),xanchor:"center",y:.98,yanchor:"top"}:void 0,width:k,height:T,margin:Ol(Ie,!!f,!!x),xaxis:{title:{text:b||"",font:{size:16,color:"var(--black-300)",family:"Inter, sans-serif"},standoff:15},side:"top",fixedrange:!0,dtick:1,range:[.5,Y+.5],automargin:!1,tickmode:"array",tickvals:Array.from({length:Y},(tt,we)=>we+1),ticktext:J.map(String),tickangle:0,tickfont:{size:Y>24?8:X.FONT_SIZE_LARGE},domain:Pl(Ie)},yaxis:{title:{text:x||"",font:{size:16,color:"var(--black-300)",family:"Inter, sans-serif"},standoff:15},fixedrange:!0,dtick:1,range:[U+X.LABEL_CENTER_OFFSET,X.LABEL_CENTER_OFFSET],automargin:!1,tickmode:"array",tickvals:Array.from({length:U},(tt,we)=>we),ticktext:P.map(String),tickfont:{size:U>16?8:X.FONT_SIZE_LARGE}},paper_bgcolor:"var(--white-900)",plot_bgcolor:"var(--white-900)",font:{family:"Inter, sans-serif",color:"var(--grey-600)"},shapes:$t},Oo={responsive:!0,displayModeBar:!1,displaylogo:!1};return q.newPlot(O,et,No,Oo),O.on("plotly_click",tt=>{if(!N.current)return;const we=tt.points[0];if(we){const Bt=P,Pt=J,Ht=Bt.indexOf(we.y),Dt=Pt.indexOf(we.x);if(Ht>=0&&Dt>=0){const zt=`${Bt[Ht]}${Pt[Dt]}`,Gt=String(zt).toUpperCase(),Bo=A.get(Gt),Po=D.get(Gt),Ho={wellId:zt,values:Bo,tooltipData:Po};N.current?.(Ho)}}}),()=>{O&&q.purge(O)}},[ke,J,P,ve,v,de,be,he,f,b,x,k,T,Rt,I,D,A,H,ie,Xe,qe,Qe.length,St,$t,U,Y,p,L]);const Io=()=>!W||W.length<=1?null:t.jsx("div",{className:"platemap-layer-selector",children:W.map(O=>{const V=G?.id===O.id;return t.jsx("button",{type:"button",className:`platemap-layer-selector__button${V?" platemap-layer-selector__button--active":""}`,onClick:()=>{B(O.id),r?.(O.id)},children:O.name},O.id)})}),Te=p?.position??"right",Je=p?.fontSize??12,Ro=p?.itemSpacing??4,$e=p?.swatchSize??16,Nt=p?.title,Ot=120,Ae=Te==="top"||Te==="bottom",So=()=>{const O=ie==="categorical"&&Qe.length>0,V=h&&h.length>0;if(!g||!O&&!V)return Ae?null:t.jsx("div",{className:"platemap-legend-placeholder",style:{width:Ot}});const K=["platemap-legend"];Ae?K.push("platemap-legend--horizontal"):Te==="left"?K.push("platemap-legend--left"):Te==="right"&&K.push("platemap-legend--right");const ne={gap:`${Ro}px`,width:Ae?void 0:Ot};return t.jsxs("div",{className:K.join(" "),style:ne,children:[Nt&&t.jsx("div",{className:`platemap-legend__title${Ae?" platemap-legend__title--horizontal":""}`,style:{fontSize:`${Je}px`},children:Nt}),O&&Qe.map(Z=>t.jsxs("div",{className:"platemap-legend__item",children:[t.jsx("div",{className:"platemap-legend__swatch",style:{width:`${$e}px`,height:`${$e}px`,backgroundColor:te[Z]||m}}),t.jsx("span",{className:"platemap-legend__label platemap-legend__label--capitalize",style:{fontSize:`${Je}px`},children:Z})]},Z)),V&&h.map(Z=>t.jsxs("div",{className:"platemap-legend__item",children:[t.jsx("div",{className:"platemap-legend__swatch platemap-legend__swatch--region",style:{width:`${$e}px`,height:`${$e}px`,backgroundColor:Z.fillColor||"transparent",border:`${Z.borderWidth||2}px solid ${Z.borderColor||it.regionBorder}`}}),t.jsx("span",{className:"platemap-legend__label",style:{fontSize:`${Je}px`},children:Z.name})]},Z.id))]})},Ne=t.jsx("div",{ref:R,className:"platemap-plot",style:{width:k,height:T}}),Oe=So(),$o=()=>{switch(Te){case"left":return t.jsxs("div",{className:"platemap-plot-wrapper platemap-plot-wrapper--vertical",children:[Oe,Ne]});case"top":return t.jsxs("div",{className:"platemap-plot-wrapper platemap-plot-wrapper--horizontal",children:[Oe,Ne]});case"bottom":return t.jsxs("div",{className:"platemap-plot-wrapper platemap-plot-wrapper--horizontal",children:[Ne,Oe]});default:return t.jsxs("div",{className:"platemap-plot-wrapper platemap-plot-wrapper--vertical",children:[Ne,Oe]})}};return t.jsxs("div",{className:"platemap-container",style:{width:Ae?void 0:k},children:[Io(),$o()]})};function Vl(e){if(!e||e.length===0)return[];const o=Math.max(...e.map(n=>n.length));return e.map(n=>{if(n.length===o)return n;const r=[...n];for(;r.length<o;)r.push(0);return r})}const Fl=({data:e,xLabels:o,yLabels:n,title:r,xTitle:s,yTitle:i,colorscale:a,width:u=800,height:c=600,showScale:h=!0,precision:f=0,zmin:b,zmax:x,valueUnit:E=""})=>{const y=e?Vl(e):void 0,_=y?.length??n?.length??16,M=y?.[0]?.length??o?.length??24,w=d.useMemo(()=>{if(!y)return;const v="ABCDEFGHIJKLMNOPQRSTUVWXYZ",g=[];for(let p=0;p<y.length;p++)for(let k=0;k<y[p].length;k++){const T=n?.[p]?.toString()??v[p]??`R${p+1}`,I=o?.[k]?.toString()??String(k+1),L=`${T}${I}`;g.push({wellId:L,values:{Value:y[p][k]}})}return g},[y,o,n]),m=a;return t.jsx(Eo,{data:w,plateFormat:"custom",rows:_,columns:M,title:r,xTitle:s,yTitle:i,xLabels:o,yLabels:n,colorScale:m,valueMin:b,valueMax:x,showColorBar:h,width:u,height:c,layerConfigs:[{id:"Value",valueUnit:E}],precision:f})},Yl=-.5,Zl=e=>e.reduce((n,r)=>n+r,0)/e.length,Wl=(e,o)=>{const r=e.map(s=>Math.pow(s-o,2)).reduce((s,i)=>s+i,0)/e.length;return Math.sqrt(r)},Kl=(e,o,n,r,s=100)=>{const i=[],a=[],u=(r-n)/(s-1);for(let c=0;c<s;c++){const h=n+c*u;i.push(h);const f=Yl*Math.pow((h-e)/o,2),b=1/(o*Math.sqrt(2*Math.PI))*Math.exp(f);a.push(b)}return{x:i,y:a}},Xl=(e,o,n)=>{const r=Math.ceil((n.end-n.start)/n.size),s=Array(r).fill(0);o.forEach(c=>{if(c>=n.start&&c<=n.end){const h=Math.floor((c-n.start)/n.size);s[h]++}});const i=Math.max(...s),a=Math.max(...e),u=i/a;return e.map(c=>c*u)},ql=({dataSeries:e,width:o=480,height:n=480,title:r="Histogram",xTitle:s="X Axis",yTitle:i="Frequency",bargap:a=.2,showDistributionLine:u=!1})=>{const c=d.useRef(null),h=d.useMemo(()=>Array.isArray(e)?e:[e],[e]),f=d.useMemo(()=>h.length>1?"stack":void 0,[h.length]),b=d.useMemo(()=>[C.ORANGE,C.RED,C.BLUE,C.GREEN,C.PURPLE,C.YELLOW],[]),x=d.useMemo(()=>h.map((m,v)=>{const g=typeof m.showDistributionLine>"u"?u:m.showDistributionLine;return{...m,color:m.color||b[v%b.length],opacity:g?.5:m.opacity||1,showDistributionLine:g,lineWidth:m.lineWidth||3}}),[h,u,b]),E=C.GREY_200,y=d.useMemo(()=>x.map(m=>({type:"histogram",x:m.x,name:m.name,marker:{color:m.color,line:{color:C.WHITE,width:1},opacity:m.opacity},autobinx:m.autobinx,xbins:m.xbins,hovertemplate:`${s}: %{x}<br>${i}: %{y}<extra>${m.name}</extra>`})),[x,s,i]),_=d.useMemo(()=>x.filter(m=>m.showDistributionLine).map(m=>{const v=Zl(m.x),g=Wl(m.x,v),p=Math.min(...m.x),k=Math.max(...m.x),T=k-p,I=p-T*.1,L=k+T*.1,j=m.xbins||{start:I,end:L,size:T/10},R=Kl(v,g,I,L,100),N=Xl(R.y,m.x,j);return{type:"scatter",x:R.x,y:N,mode:"lines",name:`${m.name} Distribution`,line:{color:m.color,width:m.lineWidth},hoverinfo:"none"}}),[x]),M=d.useMemo(()=>[...y,..._],[y,_]);d.useEffect(()=>{if(!c.current)return;const m={width:o,height:n,font:{family:"Inter, sans-serif"},showlegend:!1,margin:{l:90,r:40,b:80,t:40},xaxis:{title:{text:s,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:20},gridcolor:E,tickcolor:C.GREY_200,ticklen:8,tickwidth:1,ticks:"outside",linecolor:C.BLACK_900,linewidth:1,zeroline:!1},yaxis:{title:{text:i,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:20},gridcolor:E,tickcolor:C.GREY_200,ticklen:8,tickwidth:1,ticks:"outside",linecolor:C.BLACK_900,linewidth:1,zeroline:!1,rangemode:"tozero"},barmode:f,bargap:a,paper_bgcolor:C.WHITE,plot_bgcolor:C.WHITE},v={responsive:!0,displayModeBar:!1,displaylogo:!1};q.newPlot(c.current,M,m,v);const g=c.current;return()=>{g&&q.purge(g)}},[o,n,s,i,a,M,f,E]);const w=({series:m})=>{const v=m.map((k,T)=>t.jsx(d.Fragment,{children:t.jsxs("div",{className:"legend-item",children:[t.jsx("span",{className:"color-box",style:{background:k.color}}),k.name,T<m.length-1&&t.jsx("span",{className:"divider"})]})},k.name)),g=[],p=6;for(let k=0;k<v.length;k+=p)g.push(t.jsx("div",{className:"legend-row",children:v.slice(k,k+p)},k));return t.jsx("div",{className:"legend-container",children:g})};return t.jsx("div",{className:"histogram-container",style:{width:o},children:t.jsxs("div",{className:"chart-container",children:[r&&t.jsx("div",{className:"title-container",children:t.jsx("h2",{className:"title",children:r})}),t.jsx("div",{ref:c,style:{width:"100%",height:"100%",margin:"0"}}),t.jsx(w,{series:x})]})})},Mo=[[0,"#313695"],[.25,"#4575b4"],[.5,"#ffffbf"],[.75,"#fdae61"],[1,"#a50026"]],De=["#4575b4","#d73027","#1a9850","#fdae61","#9467bd","#e377c2","#8c564b","#bcbd22","#17becf","#ff7f0e"],Ee=8,Lo=[4,20],Ct=5e3,ee={MARGIN_LEFT:80,MARGIN_RIGHT:30,MARGIN_TOP:80,MARGIN_BOTTOM:80,TITLE_FONT_SIZE:20,AXIS_TITLE_FONT_SIZE:16,AXIS_TICK_FONT_SIZE:12,LEGEND_FONT_SIZE:12,FONT_FAMILY:"Inter, sans-serif",GRID_WIDTH:1,AXIS_LINE_WIDTH:1,AUTO_RANGE_PADDING:.1},Ql={ADD:"shiftKey",REMOVE:"ctrlKey",TOGGLE:"both"};function To(e,o){let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(const s of e){const i=s.metadata?.[o];typeof i=="number"&&Number.isFinite(i)&&(n=Math.min(n,i),r=Math.max(r,i))}return!Number.isFinite(n)||!Number.isFinite(r)?{min:0,max:1}:n===r?{min:n-1,max:r+1}:{min:n,max:r}}function It(e,o){const n=e.map(r=>r.metadata?.[o]).filter(r=>typeof r=="string");return[...new Set(n)].sort()}function Jl(e,o){if(!o||o.type==="static"){const n=o?.value||"#4575b4";return new Array(e.length).fill(n)}if(o.type==="categorical"&&o.field){const n=It(e,o.field),r=o.categoryColors||{},s={};return n.forEach((i,a)=>{s[i]=r[i]||De[a%De.length]}),e.map(i=>{const a=i.metadata?.[o.field];return s[String(a)]||De[0]})}return new Array(e.length).fill("#4575b4")}function e1(e,o){if(!o||o.type==="static"){const n=o?.value||"circle";return new Array(e.length).fill(n)}if(o.type==="categorical"&&o.field){const n=It(e,o.field),r=o.categoryShapes||{},s=["circle","square","diamond","cross","x","triangle-up","triangle-down","star"],i={};return n.forEach((a,u)=>{i[a]=r[a]||s[u%s.length]}),e.map(a=>{const u=a.metadata?.[o.field];return i[String(u)]||"circle"})}return new Array(e.length).fill("circle")}function t1(e,o){if(!o||o.type==="static"){const n=o?.value||Ee;return new Array(e.length).fill(n)}if(o.type==="categorical"&&o.field){const n=It(e,o.field),r=o.categorySizes||{},s={};return n.forEach((i,a)=>{s[i]=r[i]||Ee+a*2}),e.map(i=>{const a=i.metadata?.[o.field];return s[String(a)]||Ee})}if(o.type==="continuous"&&o.field){const n=o.min!==void 0&&o.max!==void 0?{min:o.min,max:o.max}:To(e,o.field),r=o.sizeRange||Lo,[s,i]=r;return e.map(a=>{const u=a.metadata?.[o.field];if(typeof u=="number"&&Number.isFinite(u)){const c=(u-n.min)/(n.max-n.min);return s+c*(i-s)}return Ee})}return new Array(e.length).fill(Ee)}function o1(e,o){if(!o.enabled||e.length<=(o.maxPoints||Ct))return e;const n=o.maxPoints||Ct;return(o.strategy||"lttb")==="lttb"?r1(e,n):e}function n1(e,o,n,r){const s=n-o;if(s>0){let a=0,u=0;for(let c=o;c<n;c++)a+=e[c].x,u+=e[c].y;return{x:a/s,y:u/s}}const i=Math.max(0,Math.min(o,r-1));return{x:e[i].x,y:e[i].y}}function r1(e,o){const n=e.length;if(o<=0||n===0)return[];if(o>=n)return e;if(o===1)return[e[0]];if(o===2)return[e[0],e[n-1]];const r=(n-2)/(o-2),{floor:s,abs:i,min:a}=Math,u=[e[0]];let c=0;for(let h=0;h<o-2;h++){const f=a(s((h+1)*r)+1,n-1),b=a(s((h+2)*r)+1,n),{x,y:E}=n1(e,f,b,n),y=a(s(h*r)+1,n-1),_=a(s((h+1)*r)+1,n-1),M=e[c].x,w=e[c].y;let m=-1,v=e[y],g=y;for(let p=y;p<_;p++){const k=i((M-x)*(e[p].y-w)-(M-e[p].x)*(E-w))*.5;k>m&&(m=k,v=e[p],g=p)}u.push(v),c=g}return u.push(e[n-1]),u}function s1(e,o){const n=[];if(n.push(`X: ${e.x.toFixed(2)}`),n.push(`Y: ${e.y.toFixed(2)}`),e.label&&n.push(`Label: ${e.label}`),o&&e.metadata){for(const r of o)if(r in e.metadata){const s=e.metadata[r];n.push(`${r}: ${s}`)}}else if(e.metadata&&!o)for(const[r,s]of Object.entries(e.metadata))n.push(`${r}: ${s}`);return n.join("<br>")}function i1(e){const o=e.ctrlKey||e.metaKey;return e.shiftKey&&o?"toggle":e.shiftKey?"add":o?"remove":"replace"}function ao(e,o,n=.1,r="linear"){const s=r==="log";let i=1/0,a=-1/0;for(const c of e){const h=c[o];if(!Number.isFinite(h)||s&&h<=0)continue;const f=s?Math.log10(h):h;f<i&&(i=f),f>a&&(a=f)}if(!Number.isFinite(i))return[0,1];if(i===a)return[i-1,a+1];const u=a-i;return[i-u*n,a+u*n]}function a1(e,o,n){const r=new Set(e);switch(n){case"replace":return new Set(o);case"add":for(const s of o)r.add(s);return r;case"remove":for(const s of o)r.delete(s);return r;case"toggle":for(const s of o)r.has(s)?r.delete(s):r.add(s);return r;default:return r}}const l1=({title:e,xAxis:o,yAxis:n,width:r,height:s,xRange:i,yRange:a,enableLassoSelection:u,enableBoxSelection:c})=>({autosize:!1,width:r,height:s,title:e?{text:e,font:{family:ee.FONT_FAMILY,size:ee.TITLE_FONT_SIZE,color:"#333333"},x:.5,xanchor:"center"}:void 0,margin:{l:ee.MARGIN_LEFT,r:ee.MARGIN_RIGHT,t:e?ee.MARGIN_TOP:ee.MARGIN_TOP-ee.TITLE_FONT_SIZE,b:ee.MARGIN_BOTTOM},xaxis:{title:{text:o.title||"",font:{family:ee.FONT_FAMILY,size:ee.AXIS_TITLE_FONT_SIZE,color:"#333333"}},type:o.scale==="log"?"log":"linear",range:i,autorange:!i,gridcolor:"#e0e0e0",linecolor:"#333333",linewidth:ee.AXIS_LINE_WIDTH,tickfont:{family:ee.FONT_FAMILY,size:ee.AXIS_TICK_FONT_SIZE},zeroline:!1},yaxis:{title:{text:n.title||"",font:{family:ee.FONT_FAMILY,size:ee.AXIS_TITLE_FONT_SIZE,color:"#333333"}},type:n.scale==="log"?"log":"linear",range:a,autorange:!a,gridcolor:"#e0e0e0",linecolor:"#333333",linewidth:ee.AXIS_LINE_WIDTH,tickfont:{family:ee.FONT_FAMILY,size:ee.AXIS_TICK_FONT_SIZE},zeroline:!1},paper_bgcolor:"#ffffff",plot_bgcolor:"#ffffff",font:{family:ee.FONT_FAMILY,color:"#333333"},hovermode:"closest",dragmode:u?"lasso":c?"select":!1}),c1=({data:e,title:o,xAxis:n={},yAxis:r={},colorMapping:s,shapeMapping:i,sizeMapping:a,tooltip:u={enabled:!0},enableClickSelection:c=!0,enableBoxSelection:h=!0,enableLassoSelection:f=!0,selectedIds:b,onSelectionChange:x,onPointClick:E,downsampling:y,width:_=800,height:M=600,showColorBar:w=!0,className:m})=>{const v=d.useRef(null),g=d.useRef(x),p=d.useRef(E),k=d.useRef(new Set),T=d.useRef(!1);g.current=x,p.current=E;const[I,L]=d.useState(new Set),j=b!==void 0,R=j?b:I;k.current=R,T.current=j;const N=d.useMemo(()=>new Set([...R].map(String)),[R]),z=d.useMemo(()=>new Map(e.map(H=>[String(H.id),H.id])),[e]),B=d.useMemo(()=>y?o1(e,y):e,[e,y]),U=d.useMemo(()=>Jl(B,s),[B,s]),Y=d.useMemo(()=>e1(B,i),[B,i]),W=d.useMemo(()=>t1(B,a),[B,a]),G=d.useMemo(()=>{if(n.range)return n.range;if(n.autoRange!==!1)return ao(B,"x",n.autoRangePadding??ee.AUTO_RANGE_PADDING,n.scale)},[B,n]),ie=d.useMemo(()=>{if(r.range)return r.range;if(r.autoRange!==!1)return ao(B,"y",r.autoRangePadding??ee.AUTO_RANGE_PADDING,r.scale)},[B,r]),Q=u.enabled!==!1,me=d.useMemo(()=>Q?B.map(H=>u.content?u.content(H):s1(H,u.fields)):[],[B,u,Q]),ce=d.useMemo(()=>s?.type==="continuous"&&s.field&&B.length>0?B.map(H=>{const re=H.metadata?.[s.field];return typeof re=="number"&&Number.isFinite(re)?re:0}):U,[B,s,U]),he=d.useMemo(()=>{if(s?.type==="continuous"){const H=s.colorScale||Mo;return H}},[s]),te=d.useMemo(()=>{const H={size:W,symbol:Y,line:{color:"#ffffff",width:1}};if(s?.type==="continuous"&&he){if(H.color=ce,H.colorscale=he,H.showscale=w,s.field){const re=s.min!==void 0&&s.max!==void 0?{min:s.min,max:s.max}:To(B,s.field);H.cmin=re.min,H.cmax=re.max,H.colorbar={title:{text:s.field,side:"right"},thickness:20,len:.7}}}else H.color=U;return H},[W,Y,s,he,ce,w,B,U]);d.useEffect(()=>{const H=v.current;if(!H||B.length===0)return;const re=B.map(oe=>oe.x),A=B.map(oe=>oe.y),D=B.map(oe=>String(oe.id)),J=[{x:re,y:A,ids:D,mode:"markers",type:"scatter",marker:te,hoverinfo:Q?"text":"skip",text:me,hovertemplate:Q?"%{text}<extra></extra>":void 0,showlegend:!1,unselected:{marker:{opacity:.3}},selected:{marker:{opacity:1,line:{color:"#d73027",width:2}}}}],se=l1({title:o,xAxis:n,yAxis:r,width:_,height:M,xRange:G,yRange:ie,enableLassoSelection:f,enableBoxSelection:h}),xe={responsive:!0,displayModeBar:!0,displaylogo:!1,modeBarButtonsToAdd:[],modeBarButtonsToRemove:["toImage"]};h&&xe.modeBarButtonsToAdd?.push("select2d"),f&&xe.modeBarButtonsToAdd?.push("lasso2d"),q.newPlot(H,J,se,xe);const be=H;return c&&be.on("plotly_click",oe=>{const fe=oe.points[0];if(fe&&fe.data.ids){const ke=fe.data.ids[fe.pointIndex],ve=B.find(de=>String(de.id)===ke);if(ve){p.current?.(ve,oe.event);const de=i1(oe.event),ye=a1(k.current,new Set([ve.id]),de);T.current||L(ye),g.current?.(ye,de)}}}),(h||f)&&(be.on("plotly_selected",oe=>{if(oe&&oe.points){const fe=oe.points.map(de=>{if(de.data.ids&&de.pointIndex!==void 0){const ye=de.data.ids[de.pointIndex];return z.get(ye)??ye}return null}).filter(de=>de!==null),ke="replace",ve=new Set(fe);T.current||L(ve),g.current?.(ve,ke)}}),be.on("plotly_deselect",()=>{const oe=new Set;T.current||L(oe),g.current?.(oe,"replace")})),()=>{H&&q.purge(H)}},[B,te,n,r,G,ie,o,_,M,u,me,c,h,f,z,Q]),d.useEffect(()=>{const H=v.current;if(!H||B.length===0)return;const re=H,A=B.map((D,P)=>N.has(String(D.id))?P:null).filter(D=>D!==null);A.length>0?q.restyle(re,{selectedpoints:[A]},[0]):q.restyle(re,{selectedpoints:[null]},[0])},[N,B]);const le=m?`interactive-scatter ${m}`:"interactive-scatter";return t.jsx("div",{className:le,children:t.jsx("div",{ref:v,className:"interactive-scatter__plot",style:{width:_,height:M}})})},d1=({dataSeries:e,width:o=1e3,height:n=600,xRange:r,yRange:s,variant:i="lines",xTitle:a="Columns",yTitle:u="Rows",title:c="Line Graph"})=>{const h=d.useRef(null),{yMin:f,yMax:b}=d.useMemo(()=>{let w=Number.MAX_VALUE,m=Number.MIN_VALUE,v=Number.MAX_VALUE,g=Number.MIN_VALUE;e.forEach(T=>{T.x.forEach(I=>{w=Math.min(w,I),m=Math.max(m,I)}),T.y.forEach(I=>{v=Math.min(v,I),g=Math.max(g,I)})});const p=(m-w)*.1,k=(g-v)*.1;return{xMin:w-p,xMax:m+p,yMin:v-k,yMax:g+k}},[e]),x=d.useMemo(()=>s||[f,b],[s,f,b]),E=d.useMemo(()=>{const w=x[1]-x[0];let m=Math.pow(10,Math.floor(Math.log10(w)));w/m>10&&(m=m*2),w/m<4&&(m=m/2);const v=[];let g=Math.ceil(x[0]/m)*m;for(;g<=x[1];)v.push(g),g+=m;return v},[x]),y=d.useMemo(()=>[...new Set(e.flatMap(w=>w.x))],[e]),_=d.useMemo(()=>{switch(i){case"lines+markers":case"lines+markers+error_bars":return"lines+markers";default:return"lines"}},[i]),M=d.useMemo(()=>({tickcolor:C.GREY_200,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:C.BLACK_900,family:"Inter, sans-serif",weight:400},linecolor:C.BLACK_900,linewidth:1,position:0,zeroline:!1}),[]);return d.useEffect(()=>{if(!h.current)return;const w=e.map(p=>({x:p.x,y:p.y,type:"scatter",mode:_,name:p.name,line:{color:p.color,width:1.5},marker:i==="lines"?{opacity:0}:{color:p.color,size:8,symbol:p.symbol||"triangle-up"},error_y:i==="lines+markers+error_bars"?p.error_y||{type:"data",array:p.y.map(()=>10),visible:!0,color:p.color,thickness:1,width:5}:void 0})),m={title:{text:c,font:{size:32,family:"Inter, sans-serif",color:C.BLACK_900}},width:o,height:n,margin:{l:80,r:30,b:80,t:60,pad:10},paper_bgcolor:C.WHITE,plot_bgcolor:C.WHITE,font:{family:"Inter, sans-serif"},dragmode:!1,xaxis:{title:{text:a,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:32},gridcolor:C.GREY_200,range:r,autorange:!r,tickmode:"array",tickvals:y,ticktext:y.map(String),showgrid:!0,...M},yaxis:{title:{text:u,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:30},gridcolor:C.GREY_200,range:s,autorange:!s,tickmode:"array",tickvals:E,showgrid:!0,...M},legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:16,color:C.BLUE_900,family:"Inter, sans-serif",weight:500}},showlegend:!0},v={responsive:!0,displayModeBar:!1,displaylogo:!1};q.newPlot(h.current,w,m,v);const g=h.current;return()=>{g&&q.purge(g)}},[e,o,n,r,s,a,u,c,_,M,y,E,x,i]),t.jsx("div",{className:"chart-container",children:t.jsx("div",{ref:h,style:{width:"100%",height:"100%"}})})},u1=l.div`
|
|
1924
|
+
display: flex;
|
|
1925
|
+
flex-direction: column;
|
|
1926
|
+
width: 100vw;
|
|
1927
|
+
height: 100vh;
|
|
1928
|
+
`,h1=l.div`
|
|
1929
|
+
display: flex;
|
|
1930
|
+
flex: 1;
|
|
1931
|
+
overflow: hidden;
|
|
1932
|
+
`,p1=l.div`
|
|
1933
|
+
display: flex;
|
|
1934
|
+
flex-direction: column;
|
|
1935
|
+
flex: 1;
|
|
1936
|
+
overflow: hidden;
|
|
1937
|
+
`,f1=l.div`
|
|
1938
|
+
display: flex;
|
|
1939
|
+
flex-direction: column;
|
|
1940
|
+
background-color: var(--white-900);
|
|
1941
|
+
flex: 1;
|
|
1942
|
+
overflow: hidden;
|
|
1943
|
+
`,m1=l.div`
|
|
1944
|
+
border-bottom: 1px solid var(--grey-200);
|
|
1945
|
+
display: flex;
|
|
1946
|
+
flex-direction: column;
|
|
1947
|
+
flex: 1;
|
|
1948
|
+
overflow: hidden;
|
|
1949
|
+
`,at=l.div`
|
|
1950
|
+
display: flex;
|
|
1951
|
+
justify-content: space-between;
|
|
1952
|
+
align-items: center;
|
|
1953
|
+
padding: 24px 0;
|
|
1954
|
+
background-color: var(--white-900);
|
|
1955
|
+
`,lt=l.h2`
|
|
1956
|
+
font-family: "Inter", sans-serif;
|
|
1957
|
+
font-size: 20px;
|
|
1958
|
+
font-weight: 500;
|
|
1959
|
+
color: var(--black-900);
|
|
1960
|
+
margin: 0;
|
|
1961
|
+
`,x1=l.div`
|
|
1962
|
+
display: flex;
|
|
1963
|
+
gap: 8px;
|
|
1964
|
+
`,lo=l(ae)`
|
|
1965
|
+
border-radius: 4px;
|
|
1966
|
+
width: 32px;
|
|
1967
|
+
height: 32px;
|
|
1968
|
+
`,g1=l.div`
|
|
1969
|
+
width: 360px;
|
|
1970
|
+
height: 100%;
|
|
1971
|
+
display: flex;
|
|
1972
|
+
flex-direction: column;
|
|
1973
|
+
padding: 16px 24px;
|
|
1974
|
+
overflow: hidden;
|
|
1975
|
+
max-height: 100%;
|
|
1976
|
+
`,C1=l.div`
|
|
1977
|
+
flex: 1;
|
|
1978
|
+
height: 100%;
|
|
1979
|
+
background-color: var(--grey-100);
|
|
1980
|
+
display: flex;
|
|
1981
|
+
flex-direction: column;
|
|
1982
|
+
`,b1=l.div`
|
|
1983
|
+
padding: 16px 24px 0 24px;
|
|
1984
|
+
`,ct=l.div`
|
|
1985
|
+
display: flex;
|
|
1986
|
+
flex-direction: column;
|
|
1987
|
+
overflow-y: auto;
|
|
1988
|
+
flex: 1;
|
|
1989
|
+
margin-top: 8px;
|
|
1990
|
+
max-height: calc(100vh - 240px);
|
|
1991
|
+
`,dt=l.div`
|
|
1992
|
+
display: flex;
|
|
1993
|
+
flex-direction: column;
|
|
1994
|
+
justify-content: center;
|
|
1995
|
+
align-items: center;
|
|
1996
|
+
gap: 16px;
|
|
1997
|
+
`,ut=l.div`
|
|
1998
|
+
color: var(--grey-400);
|
|
1999
|
+
font-size: 14px;
|
|
2000
|
+
font-weight: 500;
|
|
2001
|
+
`,ht=l.div`
|
|
2002
|
+
cursor: pointer;
|
|
2003
|
+
|
|
2004
|
+
&:last-child {
|
|
2005
|
+
border-bottom: none;
|
|
2006
|
+
}
|
|
2007
|
+
`,pt=l(yo)``,v1=l.div`
|
|
2008
|
+
padding: 24px;
|
|
2009
|
+
margin-top: -1px;
|
|
2010
|
+
flex: 1;
|
|
2011
|
+
border-top: 1px solid var(--grey-200);
|
|
2012
|
+
`,y1=l.div`
|
|
2013
|
+
height: 100%;
|
|
2014
|
+
border: 1px solid var(--grey-200);
|
|
2015
|
+
border-radius: 8px;
|
|
2016
|
+
overflow: hidden;
|
|
2017
|
+
`,w1=({userProfile:e,hostname:o,organization:n})=>{const r=[{icon:$.SEARCH_DOCUMENT,label:"Search"},{icon:$.SEARCH_SQL,label:"SQL Search"},{icon:$.LAMP,label:"Projects"},{icon:$.PIPELINE,label:"Pipelines"},{icon:$.COMPUTER,label:"Data & AI Workspace"},{icon:$.CUBE,label:"Artifacts"},{icon:$.DATABASE,label:"Data Sources"},{icon:$.PIE_CHART,label:"Health Monitoring"},{icon:$.BULK_CHECK,label:"Bulk Actions"},{icon:$.CODE,label:"Attribute Management"},{icon:$.GEAR,label:"Administration"}],s=[{id:"templates",label:"Templates"},{id:"protocol",label:"Protocol"},{id:"steps",label:"Steps"}],i=[{id:"pipelineBuilder",label:"Pipeline Builder"},{id:"configuration",label:"Configuration"},{id:"launch",label:"Launch"}],[a,u]=d.useState("Pipelines"),[c,h]=d.useState("templates"),[f,b]=d.useState("pipelineBuilder"),[x,E]=d.useState("1"),y=[{id:"1",title:"Tecan D300e and PerkinElmer EnVision to Dotmatics (v1)",description:"c901ejs",buttonText:"",linkText:""},{id:"2",title:"Bruker D8 Andvanced CRD Raw to IDS(Draft)",description:"c901ejs",buttonText:"",linkText:""},{id:"3",title:"Extract and Decorate(Draft)",description:"c901ejs",buttonText:"",linkText:""},{id:"4",title:"Intellict (Que3 Raw to IDS(Draft)",description:"c901ejs",buttonText:"",linkText:""},{id:"5",title:"Leica Aperio RAW to IDS(Draft)",description:"c901ejs",buttonText:"",linkText:""},{id:"6",title:"IDS to Benchling(Draft)",description:"c901ejs",buttonText:"",linkText:""},{id:"7",title:"Lorem Ipsum",description:"c901ejs",buttonText:"",linkText:""}],_=[],M=[],w=j=>{u(j)},m=j=>{h(j)},v=j=>{b(j)},g=()=>{console.log("Home clicked")},p=()=>{console.log("Settings clicked")},k=()=>{console.log("User profile clicked")},T=j=>{E(j===x?null:j)},I=j=>{console.log(`Using template: ${j}`)},L=j=>{console.log(`Viewing template: ${j}`)};return t.jsxs(u1,{children:[t.jsx(Lt,{organization:n}),t.jsxs(h1,{children:[t.jsx(Tt,{items:r,activeItem:a,onItemClick:w}),t.jsxs(p1,{children:[t.jsx(Mt,{hostname:o,userProfile:e,onHomeClick:g,onSettingsClick:p,onUserProfileClick:k}),t.jsx(f1,{children:t.jsx(m1,{children:t.jsxs("div",{style:{display:"flex",height:"100%"},children:[t.jsxs(g1,{children:[t.jsx(mt,{tabs:s,activeTab:c,onChange:m}),c==="templates"&&t.jsxs(t.Fragment,{children:[t.jsxs(at,{children:[t.jsx(lt,{children:"Templates"}),t.jsxs(x1,{children:[t.jsx(lo,{variant:"tertiary",size:"small","aria-label":"Delete",noPadding:!0,children:t.jsx(F,{name:$.TRASH,width:"20",height:"20",fill:"var(--red-error)"})}),t.jsx(lo,{variant:"primary",size:"small","aria-label":"Add",noPadding:!0,children:t.jsx(F,{name:$.PLUS,width:"20",height:"20",fill:"var(--white-900)"})})]})]}),t.jsx(ct,{children:y.length>0?y.map(j=>t.jsx(ht,{onClick:()=>T(j.id),children:t.jsx(pt,{title:j.title,description:j.description,buttonText:j.buttonText,linkText:j.linkText,status:x===j.id?"active":"default",onButtonClick:()=>I(j.id),onLinkClick:()=>L(j.id)})},j.id)):t.jsxs(dt,{children:[t.jsx(F,{name:$.INBOX,width:"40",height:"40",fill:"var(--grey-400)"}),t.jsx(ut,{children:"No data"})]})})]}),c==="protocol"&&t.jsxs(t.Fragment,{children:[t.jsx(at,{children:t.jsxs(lt,{children:["Protocol (",_.length,")"]})}),t.jsx(ct,{children:_.length>0?_.map(j=>t.jsx(ht,{onClick:()=>T(j.id),children:t.jsx(pt,{title:j.title,description:j.description,status:x===j.id?"active":"default",onButtonClick:()=>I(j.id),onLinkClick:()=>L(j.id)})},j.id)):t.jsxs(dt,{children:[t.jsx(F,{name:$.INBOX,width:"40",height:"40",fill:"var(--grey-400)"}),t.jsx(ut,{children:"No data"})]})})]}),c==="steps"&&t.jsxs(t.Fragment,{children:[t.jsx(at,{children:t.jsxs(lt,{children:["Task Scripts (",M.length,")"]})}),t.jsx(ct,{children:_.length>0?_.map(j=>t.jsx(ht,{onClick:()=>T(j.id),children:t.jsx(pt,{title:j.title,description:j.description,status:x===j.id?"active":"default",onButtonClick:()=>I(j.id),onLinkClick:()=>L(j.id)})},j.id)):t.jsxs(dt,{children:[t.jsx(F,{name:$.INBOX,width:"40",height:"40",fill:"var(--grey-400)"}),t.jsx(ut,{children:"No data"})]})})]})]}),t.jsxs(C1,{children:[t.jsx(b1,{children:t.jsx(mt,{tabs:i,activeTab:f,onChange:v})}),t.jsxs(v1,{children:[f==="pipelineBuilder"&&t.jsx(y1,{}),f==="configuration"&&t.jsx(jo,{}),f==="launch"&&t.jsx(wo,{})]})]})]})})})]})]})]})},co=[C.BLUE,C.GREEN,C.ORANGE,C.RED,C.YELLOW,C.PURPLE],j1=({dataSeries:e,width:o=400,height:n=400,title:r="Pie Chart",textInfo:s="percent",hole:i=0,rotation:a=0})=>{const u=d.useRef(null),c=d.useMemo(()=>{if(e.colors&&e.colors.length>=e.labels.length)return e.colors;const f=[...e.colors||[]],b=e.labels.length-f.length;if(b<=0)return f;for(let x=0;x<b;x++)f.push(co[x%co.length]);return f},[e.colors,e.labels.length]);d.useEffect(()=>{if(!u.current)return;const f=[{type:"pie",labels:e.labels,values:e.values,name:e.name,marker:{colors:c},textinfo:s,hoverinfo:"label+text+value",insidetextfont:{size:0,family:"Inter, sans-serif",color:"transparent"},hole:i,rotation:a}],b={width:o,height:n,font:{family:"Inter, sans-serif"},showlegend:!1,margin:{l:40,r:40,b:40,t:40}},x={responsive:!0,displayModeBar:!1,displaylogo:!1};q.newPlot(u.current,f,b,x);const E=u.current;return()=>{E&&q.purge(E)}},[c,e.labels,e.name,e.values,o,n,s,i,a]);const h=({labels:f,colors:b})=>{const x=f.map((_,M)=>t.jsx(d.Fragment,{children:t.jsxs("div",{className:"legend-item",children:[t.jsx("span",{className:"color-box",style:{background:b[M]}}),_,M<f.length-1&&t.jsx("span",{className:"divider"})]})},_)),E=6,y=[];for(let _=0;_<x.length;_+=E)y.push(t.jsx("div",{className:"legend-row",children:x.slice(_,_+E)},_));return t.jsx("div",{className:"legend-container",children:y})};return t.jsx("div",{className:"card-container",style:{width:o},children:t.jsxs("div",{className:"chart-container",children:[r&&t.jsx("div",{className:"title-container",children:t.jsx("h2",{className:"title",children:r})}),t.jsx("div",{ref:u,style:{width:"100%",height:"100%",margin:"0"}}),t.jsx(h,{labels:e.labels,colors:c})]})})},k1=({dataSeries:e,width:o=1e3,height:n=600,xRange:r,yRange:s,xTitle:i="Columns",yTitle:a="Rows",title:u="Scatter Plot"})=>{const c=d.useRef(null),{xMin:h,xMax:f,yMin:b,yMax:x}=d.useMemo(()=>{let v=Number.MAX_VALUE,g=Number.MIN_VALUE,p=Number.MAX_VALUE,k=Number.MIN_VALUE;e.forEach(L=>{L.x.forEach(j=>{v=Math.min(v,j),g=Math.max(g,j)}),L.y.forEach(j=>{p=Math.min(p,j),k=Math.max(k,j)})});const T=(g-v)*.1,I=(k-p)*.1;return{xMin:v-T,xMax:g+T,yMin:p-I,yMax:k+I}},[e]),E=d.useMemo(()=>r||[h,f],[r,h,f]),y=d.useMemo(()=>s||[b,x],[s,b,x]),_=d.useMemo(()=>{const v=E[1]-E[0];let g=Math.pow(10,Math.floor(Math.log10(v)));v/g>10&&(g=g*2),v/g<4&&(g=g/2);const p=[];let k=Math.ceil(E[0]/g)*g;for(;k<=E[1];)p.push(k),k+=g;return p},[E]),M=d.useMemo(()=>{const v=y[1]-y[0];let g=Math.pow(10,Math.floor(Math.log10(v)));v/g>10&&(g=g*2),v/g<4&&(g=g/2);const p=[];let k=Math.ceil(y[0]/g)*g;for(;k<=y[1];)p.push(k),k+=g;return p},[y]),w=d.useMemo(()=>({tickcolor:C.GREY_200,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:C.BLACK_900,family:"Inter, sans-serif",weight:400},linecolor:C.BLACK_900,linewidth:1,position:0,zeroline:!1}),[]),m=d.useMemo(()=>({showspikes:!0,spikemode:"across",spikedash:"solid",spikecolor:C.BLACK_OPACITY_20,spikethickness:2}),[]);return d.useEffect(()=>{if(!c.current)return;const v=e.map(T=>({x:T.x,y:T.y,type:"scatter",mode:"markers",name:T.name,marker:{color:T.color,size:10,symbol:"circle"},hovertemplate:`${i}: %{x}<br>${a}: %{y}<extra>${T.name}</extra>`})),g={title:{text:u,font:{size:32,family:"Inter, sans-serif",color:C.BLACK_900}},width:o,height:n,margin:{l:80,r:30,b:80,t:60,pad:10},paper_bgcolor:C.WHITE,plot_bgcolor:C.WHITE,font:{family:"Inter, sans-serif"},dragmode:!1,xaxis:{title:{text:i,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:32},gridcolor:C.GREY_200,range:r,autorange:!r,tickmode:"array",tickvals:_,ticktext:_.map(String),showgrid:!0,...m,...w},yaxis:{title:{text:a,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:30},gridcolor:C.GREY_200,range:s,autorange:!s,tickmode:"array",tickvals:M,showgrid:!0,...m,...w},legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:16,color:C.BLUE_900,family:"Inter, sans-serif",weight:500}},showlegend:!0,hovermode:"closest"},p={responsive:!0,displayModeBar:!1,displaylogo:!1};q.newPlot(c.current,v,g,p);const k=c.current;return()=>{k&&q.purge(k)}},[e,o,n,r,s,i,a,u,E,y,_,M,w,m]),t.jsx("div",{className:"chart-container",children:t.jsx("div",{ref:c,style:{width:"100%",height:"100%"}})})},_1=({filters:e,filterValues:o,onFilterChange:n})=>t.jsx("div",{className:"tdp-search__filters-row",children:e.map(r=>t.jsxs("div",{className:"tdp-search__filter-wrapper",children:[t.jsx("label",{className:"tdp-search__filter-label",children:r.label}),t.jsx(Le,{options:r.options,value:o[r.key]||"",onChange:s=>n(r.key,s)})]},r.key))}),E1=({results:e,total:o,currentPage:n,pageSize:r,columns:s,onPageChange:i,sortKey:a,sortDirection:u,onSort:c})=>t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"tdp-search__results-header",children:t.jsxs("div",{className:"tdp-search__results-count",children:["Showing ",(n-1)*r+1,"-",Math.min(n*r,o)," of ",o," results"]})}),t.jsx(At,{columns:s,data:e,pageSize:r,currentPage:n,totalItems:o,onPageChange:i,sortKey:a||void 0,sortDirection:u,onSort:c,rowKey:h=>h.id||Math.random().toString()})]}),M1=({query:e,setQuery:o,onSearch:n,isLoading:r,placeholder:s})=>{const i=a=>{a.key==="Enter"&&n()};return t.jsxs("div",{className:"tdp-search__search-bar",children:[t.jsx("div",{className:"tdp-search__search-input-wrapper",children:t.jsx(We,{value:e,onChange:a=>o(a.target.value),onKeyDown:i,placeholder:s,iconLeft:t.jsx(Ge,{}),size:"small"})}),t.jsx(ae,{variant:"primary",onClick:n,disabled:!e.trim()||r,children:r?"Searching...":"Search"})]})},Ye="ts-auth-token",Ze="x-org-slug",L1="/v1/datalake/searchEql",T1=(e,o,n)=>{const{searchTerm:r,sort:s,order:i,...a}=e,u={from:o,size:n};return r!==void 0&&r!==""&&(u.query={simple_query_string:{query:r,default_operator:"and"}}),s!==void 0&&s!==""&&(u.sort=i?[{[s]:i}]:[s]),Object.entries(a).forEach(([c,h])=>{h!==void 0&&(u[c]=h)}),u};function Ao(e){const[o,n]=d.useState([]),[r,s]=d.useState(0),[i,a]=d.useState(1),[u,c]=d.useState(!1),[h,f]=d.useState(null);return{results:o,total:r,currentPage:i,isLoading:u,error:h,executeSearch:async(x,E=1)=>{c(!0),f(null);const{pageSize:y,standalone:_,baseUrl:M,apiEndpoint:w="/api/search",authToken:m,orgSlug:v}=e,g=(E-1)*y;let p,k;if(_){if(!M)throw new Error("baseUrl is required when standalone is true");p=`${M.replace(/\/$/,"")}${L1}`,k={method:"POST",headers:{"Content-Type":"application/json",...m&&{[Ye]:m},...v&&{[Ze]:v}},body:JSON.stringify(T1(x,g,y))}}else{const T={"Content-Type":"application/json"};m&&v&&(T[Ye]=m,T[Ze]=v),p=w,k={method:"POST",headers:T,credentials:"include",body:JSON.stringify({...x,size:y,from:g})}}try{const T=await fetch(p,k);if(!T.ok){const R=await T.json().catch(()=>({error:"Unknown error"})),N=_&&R.error?.message||R.error;throw new Error(N||`HTTP ${T.status}: ${T.statusText}`)}const I=await T.json(),L=(I.hits?.hits||[]).map(R=>({id:R._id,...R._source,_score:R._score})),j=typeof I.hits?.total=="number"?I.hits.total:I.hits?.total?.value||0;return n(L),s(j),a(E),L}catch(T){return f(T.message||"An error occurred while searching"),n([]),s(0),[]}finally{c(!1)}}}}function uo(e){try{return localStorage.getItem(e)??void 0}catch{return}}function ho(e){try{const o=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return o?decodeURIComponent(o[1]):void 0}catch{return}}function A1(e,o){if(e&&o)return{authToken:e,orgSlug:o};const n=uo(Ye),r=uo(Ze);if(n&&r)return{authToken:n,orgSlug:r};const s=ho(Ye),i=ho(Ze);return s&&i?{authToken:s,orgSlug:i}:{authToken:e,orgSlug:o}}const I1=({defaultQuery:e="",columns:o,filters:n=[],defaultSort:r,advancedSearchParams:s,pageSize:i=10,searchPlaceholder:a="Enter search term...",className:u,onSearch:c,renderSearchBar:h,renderFilters:f,renderResults:b,...x})=>{const{authToken:E,orgSlug:y}=A1(x.authToken,x.orgSlug),{results:_,total:M,currentPage:w,isLoading:m,error:v,executeSearch:g}=Ao({...x,authToken:E??"",orgSlug:y??"",pageSize:i}),[p,k]=d.useState(e),[T,I]=d.useState({}),[L,j]=d.useState(null),[R,N]=d.useState("asc"),[z,B]=d.useState(!1),U=async(te=1,le)=>{if(!p.trim())return;B(!0);const H=le?.sortKey??L??r?.field,re=le==null?L?R:r?.order??R:le.sortDirection,A=Object.entries(T).filter(([,se])=>se!=="").map(([se,xe])=>({field:se,operator:"eq",value:xe}));let D=s?.expression;A.length>0&&(D={g:"AND",e:D?[...A,D]:A});const P={searchTerm:p.trim(),sort:H??void 0,order:re,...s,...D!==void 0&&{expression:D}},J=await g(P,te);c&&c({...P,from:(te-1)*i,size:i},J)},Y=()=>{U(1)},W=(te,le)=>{I(H=>({...H,[te]:le}))},G=te=>{U(te)},ie=(te,le)=>{j(te),N(le),U(1,{sortKey:te,sortDirection:le})},Q=t.jsxs("div",{className:"tdp-search__empty-state",children:[t.jsx("div",{className:"tdp-search__empty-state-icon",children:t.jsx(Ge,{})}),t.jsx("div",{className:"tdp-search__empty-state-text",children:"No results found. Try adjusting your search query or filters."})]}),me={query:p,setQuery:k,onSearch:Y,isLoading:m,placeholder:a},ce={filters:n,filterValues:T,onFilterChange:W},he={results:_,total:M,currentPage:w,pageSize:i,columns:o,onPageChange:G,sortKey:L,sortDirection:R,onSort:ie};return t.jsxs("div",{className:`tdp-search ${u||""}`,children:[h?h(me):t.jsx(M1,{...me}),n.length>0&&(f?f(ce):t.jsx(_1,{...ce})),v&&t.jsxs(t.Fragment,{children:[t.jsx(xo,{error:v,onClose:()=>{}}),Q]}),m&&t.jsx("div",{className:"tdp-search__loading-overlay",children:"Loading results..."}),!m&&!z&&t.jsxs("div",{className:"tdp-search__empty-state",children:[t.jsx("div",{className:"tdp-search__empty-state-icon",children:t.jsx(Ge,{})}),t.jsx("div",{className:"tdp-search__empty-state-text",children:"Enter a search query and click Search to get started."})]}),!m&&!v&&z&&_.length>0&&(b?b(he):t.jsx(E1,{...he})),!m&&!v&&z&&_.length===0&&Q]})},ze={colors:{primary:"var(--blue-900)",primaryHover:"var(--blue-800)",primaryActive:"var(--blue-800)",background:"var(--white-900)",text:"var(--black-900)",border:"var(--grey-200)",cardBackground:"var(--white-900)",cardBorder:"var(--grey-200)"},radius:{small:"4px",medium:"8px",large:"16px"},spacing:{small:"8px",medium:"16px",large:"24px"}},R1=l.div`
|
|
2018
|
+
${e=>Object.entries(e.$themeStyles).map(([o,n])=>`${o}: ${n};`).join(`
|
|
2019
|
+
`)}
|
|
2020
|
+
`,S1=({theme:e={},children:o})=>{const n=d.useMemo(()=>({colors:{...ze.colors,...e.colors},radius:{...ze.radius,...e.radius},spacing:{...ze.spacing,...e.spacing}}),[e]),r=d.useMemo(()=>{const s={};return n.colors&&Object.entries(n.colors).forEach(([i,a])=>{a&&(s[`--theme-${i}`]=a)}),n.radius&&Object.entries(n.radius).forEach(([i,a])=>{a&&(s[`--theme-radius-${i}`]=a)}),n.spacing&&Object.entries(n.spacing).forEach(([i,a])=>{a&&(s[`--theme-spacing-${i}`]=a)}),s},[n]);return t.jsx(l.ThemeProvider,{theme:n,children:t.jsx(R1,{$themeStyles:r,children:o})})};exports.AppHeader=Mt;exports.AppLayout=za;exports.AreaGraph=Ga;exports.AssistantModal=ai;exports.Badge=Xo;exports.BarGraph=Ua;exports.Boxplot=Fa;exports.Button=ae;exports.ButtonControl=po;exports.ButtonControlGroup=di;exports.CHART_COLORS=je;exports.COLORS=C;exports.Card=an;exports.CardSidebar=yo;exports.Checkbox=Ue;exports.Chromatogram=Ka;exports.ChromatogramChart=ul;exports.CodeEditor=Me;exports.CodeScriptEditorButton=_i;exports.DEFAULT_CATEGORY_COLORS=De;exports.DEFAULT_COLOR_SCALE=Mo;exports.DEFAULT_MARKER_SIZE=Ee;exports.DEFAULT_MAX_POINTS=Ct;exports.DEFAULT_SIZE_RANGE=Lo;exports.DotPlot=hl;exports.Dropdown=Le;exports.ErrorAlert=xo;exports.FormField=Li;exports.Heatmap=Fl;exports.Histogram=ql;exports.Icon=F;exports.IconName=$;exports.Input=We;exports.InteractiveScatter=c1;exports.Label=bt;exports.LaunchContent=wo;exports.LineGraph=d1;exports.Main=w1;exports.MarkdownDisplay=zr;exports.Menu=zi;exports.MenuItem=go;exports.Modal=vt;exports.Navbar=Lt;exports.PLOT_CONSTANTS=ee;exports.PieChart=j1;exports.PlateMap=Eo;exports.PopConfirm=Co;exports.ProtocolConfiguration=jo;exports.ProtocolYamlCard=ma;exports.PythonEditorModal=ga;exports.SELECTION_MODIFIERS=Ql;exports.ScatterGraph=k1;exports.SelectField=va;exports.Sidebar=Tt;exports.SupportiveText=yt;exports.TDPLink=Ds;exports.Tab=bo;exports.TabGroup=mt;exports.Table=At;exports.TableCell=wt;exports.TableHeaderCell=jt;exports.TdpNavigationContext=Et;exports.TdpNavigationProvider=Bs;exports.TdpSearch=I1;exports.Textarea=vs;exports.ThemeProvider=S1;exports.Toast=Re;exports.ToastManager=Da;exports.Toggle=Ke;exports.Tooltip=Ve;exports.buildTdpUrl=Se;exports.defaultTheme=ze;exports.getTdpBaseUrlFromReferrer=kt;exports.navigateToTdpUrl=_t;exports.tdpPaths=Os;exports.useSearch=Ao;exports.useTdpNavigation=Ps;exports.useTdpNavigationContext=vo;
|
|
2021
|
+
//# sourceMappingURL=index.cjs.map
|