@homingbird/mod 0.0.0-stage → 0.1.0-rc.1

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.
@@ -0,0 +1,59 @@
1
+ import type { PaneText } from '../pane-text'
2
+
3
+ export const en: PaneText = {
4
+ connection: {
5
+ idle: 'not the desk',
6
+ starting: 'starting',
7
+ live: 'desk · live',
8
+ reconnecting: 'desk · reconnecting',
9
+ 'signed-out': 'not signed in',
10
+ unavailable: 'command line not found',
11
+ },
12
+ waiting: (count) => `${count} waiting`,
13
+ keepOpen: 'Keep this session open for Homingbird.',
14
+ moved: 'Another session is your Homingbird desk now. This one no longer reacts to notes.',
15
+ becomeDesk: 'Make this the desk',
16
+ confirmSignIn: 'Confirm the sign-in in your browser. If it did not open:',
17
+ openSignInPage: 'Open the sign-in page',
18
+ signInCode: (code) => `Code ${code}. Keep "approve button" ticked to approve notes from this pane.`,
19
+ signInPrompt: "Sign in to your organization's Homingbird server to make this session your desk.",
20
+ serverUrl: 'Server URL',
21
+ signIn: 'Sign in',
22
+ memberOn: (member, server) => `${member} on ${server}`,
23
+ draftsWaiting: 'Drafts waiting for your approval',
24
+ none: 'None.',
25
+ noneYet: 'None yet.',
26
+ notesWaiting: 'Notes waiting for a reply',
27
+ draftReady: 'draft ready',
28
+ drafting: 'drafting',
29
+ askedForDraft: 'You asked for a draft',
30
+ askedForDraftWith: (instruction) => `You asked for a draft: ${instruction}`,
31
+ conversations: 'Conversations',
32
+ unread: (count) => `${count} unread`,
33
+ newNote: 'New note',
34
+ reply: 'Reply',
35
+ newNoteBy: (agent) => `New note drafted by ${agent}`,
36
+ replyBy: (agent) => `Reply drafted by ${agent}`,
37
+ editThenSend: 'Edit, then send',
38
+ send: 'Send',
39
+ approve: 'Approve',
40
+ edit: 'Edit',
41
+ cancel: 'Cancel',
42
+ discard: 'Discard',
43
+ approveInWebClient: 'Approve, edit or discard drafts in the Homingbird web client. Each draft links there.',
44
+ openInWebClient: 'Approve in the web client',
45
+ deskStatus: (waiting) =>
46
+ waiting === 0
47
+ ? 'Homingbird desk'
48
+ : `Homingbird desk · ${waiting} ${waiting === 1 ? 'draft' : 'drafts'} waiting for approval`,
49
+ toast: (text) => `Homingbird: ${text}`,
50
+ noteArrived: (author) => `A note from ${author} arrived. Drafting a reply.`,
51
+ aColleague: 'a colleague',
52
+ draftReadyNotice: 'A draft is ready for your approval in the Homingbird pane.',
53
+ draftingRequest: 'Drafting what you asked for.',
54
+ streamStopped: 'The live stream stopped. Reconnecting in half a minute.',
55
+ noApproveButton: 'This device has no approve button. Approve in the Homingbird web client.',
56
+ couldNotSignIn: (reason) => `Could not sign in: ${reason}`,
57
+ characterStarted:
58
+ 'Making your character: your agent drafts and checks it, then gives you a link to the editor. Only your click on "Use this character" saves it.',
59
+ }
@@ -0,0 +1,58 @@
1
+ import type { PaneText } from '../pane-text'
2
+
3
+ export const ko: PaneText = {
4
+ connection: {
5
+ idle: '전용 세션 아님',
6
+ starting: '시작하는 중',
7
+ live: '전용 세션 · 실시간',
8
+ reconnecting: '전용 세션 · 다시 연결하는 중',
9
+ 'signed-out': '로그인 안 됨',
10
+ unavailable: '명령줄 도구를 찾을 수 없어요',
11
+ },
12
+ waiting: (count) => `${count}개 대기 중`,
13
+ keepOpen: '이 세션을 Homingbird 전용 세션으로 열어 두세요.',
14
+ moved: '이제 다른 세션이 Homingbird 전용 세션이에요. 이 세션은 더 이상 노트에 반응하지 않아요.',
15
+ becomeDesk: '이 세션을 전용 세션으로',
16
+ confirmSignIn: '브라우저에서 로그인을 확인해 주세요. 브라우저가 열리지 않았다면:',
17
+ openSignInPage: '로그인 페이지 열기',
18
+ signInCode: (code) => `코드 ${code}. 이 창에서 노트를 승인하려면 "승인 버튼"을 체크한 채로 두세요.`,
19
+ signInPrompt: '조직의 Homingbird 서버에 로그인하면 이 세션이 전용 세션이 돼요.',
20
+ serverUrl: '서버 URL',
21
+ signIn: '로그인',
22
+ memberOn: (member, server) => `${member} · ${server}`,
23
+ draftsWaiting: '승인을 기다리는 초안',
24
+ none: '없음',
25
+ noneYet: '아직 없음',
26
+ notesWaiting: '답장을 기다리는 노트',
27
+ draftReady: '초안 준비됨',
28
+ drafting: '초안 작성 중',
29
+ askedForDraft: '초안을 요청했어요',
30
+ askedForDraftWith: (instruction) => `초안을 요청했어요: ${instruction}`,
31
+ conversations: '대화',
32
+ unread: (count) => `읽지 않음 ${count}`,
33
+ newNote: '새 노트',
34
+ reply: '답장',
35
+ newNoteBy: (agent) => `${agent}이(가) 쓴 새 노트 초안`,
36
+ replyBy: (agent) => `${agent}이(가) 쓴 답장 초안`,
37
+ editThenSend: '수정한 뒤 보내기',
38
+ send: '보내기',
39
+ approve: '승인',
40
+ edit: '수정',
41
+ cancel: '취소',
42
+ discard: '삭제',
43
+ approveInWebClient:
44
+ '초안은 Homingbird 웹 클라이언트에서 승인, 수정, 삭제해요. 초안마다 바로 가는 링크가 있어요.',
45
+ openInWebClient: '웹 클라이언트에서 승인',
46
+ deskStatus: (waiting) =>
47
+ waiting === 0 ? 'Homingbird 전용 세션' : `Homingbird 전용 세션 · 승인을 기다리는 초안 ${waiting}개`,
48
+ toast: (text) => `Homingbird: ${text}`,
49
+ noteArrived: (author) => `${author} 님이 보낸 노트가 도착했어요. 답장 초안을 쓰고 있어요.`,
50
+ aColleague: '동료',
51
+ draftReadyNotice: 'Homingbird 창에서 승인할 초안이 준비됐어요.',
52
+ draftingRequest: '요청한 초안을 쓰고 있어요.',
53
+ streamStopped: '실시간 연결이 끊겼어요. 30초 뒤에 다시 연결해요.',
54
+ noApproveButton: '이 기기에는 승인 버튼이 없어요. Homingbird 웹 클라이언트에서 승인해 주세요.',
55
+ couldNotSignIn: (reason) => `로그인하지 못했어요: ${reason}`,
56
+ characterStarted:
57
+ '캐릭터 만들기를 시작했어요. 에이전트가 초안을 만들고 확인한 뒤 편집기 링크를 줘요. 저장은 "이 캐릭터 쓰기"를 눌러야만 돼요.',
58
+ }
@@ -0,0 +1,77 @@
1
+ import type { EngineInterface } from 'claude-code'
2
+
3
+ import type { HomingbirdConnection, HomingbirdOverview } from '../types'
4
+ import { en } from './pane-text/en'
5
+ import { ko } from './pane-text/ko'
6
+
7
+ export type PaneLanguage = 'en' | 'ko'
8
+
9
+ export const paneTextIn = (language: PaneLanguage): PaneText => PANE_TEXT[language]
10
+
11
+ export const paneLanguageFrom = (
12
+ chosen: string | null | undefined,
13
+ environment: ReadonlyArray<string | undefined>,
14
+ ): PaneLanguage => {
15
+ if (isPaneLanguage(chosen)) return chosen
16
+ const setting = environment.find((value) => value !== undefined && value !== '')
17
+ const primary = setting?.split(/[-_.@]/)[0]?.toLowerCase()
18
+ return isPaneLanguage(primary) ? primary : 'en'
19
+ }
20
+
21
+ /** The person's language for the pane, the status line, toasts and notifications. */
22
+ export async function textFor($: EngineInterface, latest: HomingbirdOverview | null): Promise<PaneText> {
23
+ const environment = [await $.env.get('LC_ALL'), await $.env.get('LC_MESSAGES'), await $.env.get('LANG')]
24
+ return paneTextIn(paneLanguageFrom(latest?.locale, environment))
25
+ }
26
+
27
+ export interface PaneText {
28
+ readonly connection: Readonly<Record<HomingbirdConnection, string>>
29
+ readonly waiting: (count: number) => string
30
+ readonly keepOpen: string
31
+ readonly moved: string
32
+ readonly becomeDesk: string
33
+ readonly confirmSignIn: string
34
+ readonly openSignInPage: string
35
+ readonly signInCode: (code: string) => string
36
+ readonly signInPrompt: string
37
+ readonly serverUrl: string
38
+ readonly signIn: string
39
+ readonly memberOn: (member: string, server: string) => string
40
+ readonly draftsWaiting: string
41
+ readonly none: string
42
+ readonly noneYet: string
43
+ readonly notesWaiting: string
44
+ readonly draftReady: string
45
+ readonly drafting: string
46
+ readonly askedForDraft: string
47
+ readonly askedForDraftWith: (instruction: string) => string
48
+ readonly conversations: string
49
+ readonly unread: (count: number) => string
50
+ readonly newNote: string
51
+ readonly reply: string
52
+ readonly newNoteBy: (agent: string) => string
53
+ readonly replyBy: (agent: string) => string
54
+ readonly editThenSend: string
55
+ readonly send: string
56
+ readonly approve: string
57
+ readonly edit: string
58
+ readonly cancel: string
59
+ readonly discard: string
60
+ readonly approveInWebClient: string
61
+ readonly openInWebClient: string
62
+ readonly deskStatus: (waiting: number) => string
63
+ readonly toast: (text: string) => string
64
+ readonly noteArrived: (author: string) => string
65
+ readonly aColleague: string
66
+ readonly draftReadyNotice: string
67
+ readonly draftingRequest: string
68
+ readonly streamStopped: string
69
+ readonly noApproveButton: string
70
+ readonly couldNotSignIn: (reason: string) => string
71
+ readonly characterStarted: string
72
+ }
73
+
74
+ const PANE_TEXT: Readonly<Record<PaneLanguage, PaneText>> = { en, ko }
75
+
76
+ const isPaneLanguage = (value: string | null | undefined): value is PaneLanguage =>
77
+ value !== null && value !== undefined && Object.hasOwn(PANE_TEXT, value)
package/hooks/pane.tsx ADDED
@@ -0,0 +1,273 @@
1
+ import { atom, read, update } from 'claude-code'
2
+ import type { EngineInterface, RenderElement, ResolveInput } from 'claude-code'
3
+
4
+ import type {
5
+ HomingbirdConnection,
6
+ HomingbirdConversation,
7
+ HomingbirdDraft,
8
+ HomingbirdDraftRequest,
9
+ HomingbirdOverview,
10
+ } from '../types'
11
+ import { bodyOf } from './drafting'
12
+ import { type PaneText, textFor } from './pane-text'
13
+ import { PIP, PIP_COLUMNS, PIP_PIXELS, PIP_ROWS, type PipState } from './pip'
14
+
15
+ export async function renderPane(
16
+ $: EngineInterface,
17
+ e: ResolveInput,
18
+ actions: PaneActions,
19
+ ): Promise<RenderElement> {
20
+ const { Box, Text } = $.ui.resolve(e)
21
+ const state = await read($, connection)
22
+ const role = await read($, desk)
23
+ const latest = await read($, overview)
24
+ const trouble = await read($, problem)
25
+ const pending = await read($, signIn)
26
+ const open = await read($, requests)
27
+ const text = await paneTextFor($, latest)
28
+ const waiting = latest?.drafts.length ?? 0
29
+ return (
30
+ <Box flexDirection="column" gap={1}>
31
+ <Box flexDirection="row" gap={1}>
32
+ {pip($, e, pipStateFor(state, latest, pending !== null))}
33
+ <Box flexDirection="column">
34
+ <Text bold>Homingbird{waiting > 0 ? ` · ${text.waiting(waiting)}` : ''}</Text>
35
+ <Text dimColor>{text.connection[state]}</Text>
36
+ </Box>
37
+ </Box>
38
+ {role === 'desk' && <Text color="warning">{text.keepOpen}</Text>}
39
+ {role === 'moved' && movedRows($, e, text, actions)}
40
+ {trouble !== null && <Text color="error">{trouble}</Text>}
41
+ {latest === null
42
+ ? await signInRows($, e, text, actions)
43
+ : await overviewRows($, e, text, latest, open, actions)}
44
+ </Box>
45
+ )
46
+ }
47
+
48
+ export interface PaneActions {
49
+ readonly defaultServer: string
50
+ readonly signIn: (server: string) => void
51
+ readonly becomeDesk: () => Promise<void>
52
+ readonly approve: (draftId: string, editedBody: string | null) => Promise<void>
53
+ readonly discard: (draftId: string) => Promise<void>
54
+ }
55
+
56
+ export const paneTitleFor = (waiting: number): string =>
57
+ waiting > 0 ? `Homingbird (${waiting})` : 'Homingbird'
58
+
59
+ export const PANE = 'homingbird'
60
+
61
+ function paneTextFor($: EngineInterface, latest: HomingbirdOverview | null): Promise<PaneText> {
62
+ return textFor($, latest)
63
+ }
64
+
65
+ function pip($: EngineInterface, e: ResolveInput, state: PipState): RenderElement | null {
66
+ if (e.surface === 'terminal') {
67
+ const { Image } = $.ui.resolve(e)
68
+ return (
69
+ <Image key="pip" source={{ png: PIP[state].png }} columns={PIP_COLUMNS} rows={PIP_ROWS} alt="Pip" />
70
+ )
71
+ }
72
+ const { Svg } = $.ui.resolve(e as ResolveInput & { surface: 'desktop' })
73
+ return <Svg source={PIP[state].svg} alt="Pip" width={PIP_PIXELS} height={PIP_PIXELS} />
74
+ }
75
+
76
+ const pipStateFor = (
77
+ state: HomingbirdConnection,
78
+ latest: HomingbirdOverview | null,
79
+ isSigningIn: boolean,
80
+ ): PipState => {
81
+ if (isSigningIn || state === 'signed-out') return 'signIn'
82
+ if (state === 'starting' || state === 'reconnecting') return 'connecting'
83
+ if (latest === null || state === 'unavailable' || state === 'idle') return 'offline'
84
+ if (latest.drafts.length > 0) return 'awaitingApproval'
85
+ if (latest.awaiting.length > 0) return 'newNote'
86
+ return 'idle'
87
+ }
88
+
89
+ function movedRows($: EngineInterface, e: ResolveInput, text: PaneText, actions: PaneActions): RenderElement {
90
+ const { Box, Text, Button } = $.ui.resolve(e)
91
+ return (
92
+ <Box flexDirection="column">
93
+ <Text>{text.moved}</Text>
94
+ <Button key="become-desk" label={text.becomeDesk} onPress={() => void actions.becomeDesk()} />
95
+ </Box>
96
+ )
97
+ }
98
+
99
+ async function signInRows(
100
+ $: EngineInterface,
101
+ e: ResolveInput,
102
+ text: PaneText,
103
+ actions: PaneActions,
104
+ ): Promise<RenderElement> {
105
+ const { Box, Text, Button, Input, Link } = $.ui.resolve(e)
106
+ const pending = await read($, signIn)
107
+ if (pending !== null)
108
+ return (
109
+ <Box flexDirection="column">
110
+ <Text>{text.confirmSignIn}</Text>
111
+ <Link href={pending.verificationUri}>{text.openSignInPage}</Link>
112
+ <Text dimColor>{text.signInCode(pending.userCode)}</Text>
113
+ </Box>
114
+ )
115
+ return (
116
+ <Box flexDirection="column">
117
+ <Text>{text.signInPrompt}</Text>
118
+ {actions.defaultServer === '' ? (
119
+ <Input
120
+ key="server"
121
+ label={text.serverUrl}
122
+ placeholder="https://homingbird.example.com"
123
+ submitLabel={text.signIn}
124
+ onSubmit={(server) => actions.signIn(server.trim())}
125
+ />
126
+ ) : (
127
+ <Button
128
+ key="sign-in"
129
+ label={text.signIn}
130
+ variant="primary"
131
+ onPress={() => actions.signIn(actions.defaultServer)}
132
+ />
133
+ )}
134
+ </Box>
135
+ )
136
+ }
137
+
138
+ async function overviewRows(
139
+ $: EngineInterface,
140
+ e: ResolveInput,
141
+ text: PaneText,
142
+ latest: HomingbirdOverview,
143
+ open: ReadonlyArray<HomingbirdDraftRequest>,
144
+ actions: PaneActions,
145
+ ): Promise<RenderElement> {
146
+ const { Box, Text } = $.ui.resolve(e)
147
+ const edited = await read($, editing)
148
+ const drafted = new Set(latest.drafts.map((draft) => draft.inReplyTo))
149
+ return (
150
+ <Box flexDirection="column" gap={1}>
151
+ <Text dimColor>{text.memberOn(latest.memberName, latest.server)}</Text>
152
+ <Box flexDirection="column">
153
+ <Text bold>{text.draftsWaiting}</Text>
154
+ {!hasApproveButton(latest) && <Text dimColor>{text.approveInWebClient}</Text>}
155
+ {latest.drafts.length === 0 && <Text dimColor>{text.none}</Text>}
156
+ {latest.drafts.map((draft) => draftRow($, e, text, latest, draft, edited === draft.id, actions))}
157
+ </Box>
158
+ <Box flexDirection="column">
159
+ <Text bold>{text.notesWaiting}</Text>
160
+ {latest.awaiting.length === 0 && open.length === 0 && <Text dimColor>{text.none}</Text>}
161
+ {latest.awaiting.map((waiting) => (
162
+ <Box key={`waiting:${waiting.noteId}`}>
163
+ <Text wrap="truncate-end">
164
+ {waiting.from.name}: {firstLine(bodyOf(waiting.wrapped))}
165
+ <Text dimColor> · {drafted.has(waiting.noteId) ? text.draftReady : text.drafting}</Text>
166
+ </Text>
167
+ </Box>
168
+ ))}
169
+ {open.map((request) => (
170
+ <Box key={`request:${request.id}`}>
171
+ <Text wrap="truncate-end" dimColor>
172
+ {request.instruction === ''
173
+ ? text.askedForDraft
174
+ : text.askedForDraftWith(firstLine(request.instruction))}
175
+ </Text>
176
+ </Box>
177
+ ))}
178
+ </Box>
179
+ <Box flexDirection="column">
180
+ <Text bold>{text.conversations}</Text>
181
+ {latest.conversations.length === 0 && <Text dimColor>{text.noneYet}</Text>}
182
+ {latest.conversations.map((conversation) => (
183
+ <Box key={`conversation:${conversation.id}`}>
184
+ <Text wrap="truncate-end">
185
+ {conversationName(conversation)}
186
+ {conversation.unreadCount > 0 ? ` · ${text.unread(conversation.unreadCount)}` : ''}
187
+ </Text>
188
+ </Box>
189
+ ))}
190
+ </Box>
191
+ </Box>
192
+ )
193
+ }
194
+
195
+ function draftRow(
196
+ $: EngineInterface,
197
+ e: ResolveInput,
198
+ text: PaneText,
199
+ latest: HomingbirdOverview,
200
+ draft: HomingbirdDraft,
201
+ isEditing: boolean,
202
+ actions: PaneActions,
203
+ ): RenderElement {
204
+ const { Box, Text, Button, Input, Link } = $.ui.resolve(e)
205
+ return (
206
+ <Box key={`draft:${draft.id}`} flexDirection="column" borderStyle="round" paddingX={1}>
207
+ <Text dimColor>{draftHeading(text, draft)}</Text>
208
+ {isEditing ? (
209
+ <Input
210
+ key={`edit:${draft.id}`}
211
+ label={text.editThenSend}
212
+ value={draft.body}
213
+ rows={4}
214
+ submitLabel={text.send}
215
+ onSubmit={(body) => void actions.approve(draft.id, body)}
216
+ />
217
+ ) : (
218
+ <Text>{draft.body}</Text>
219
+ )}
220
+ {hasApproveButton(latest) ? (
221
+ <Box flexDirection="row" gap={1}>
222
+ {!isEditing && (
223
+ <Button
224
+ key={`approve:${draft.id}`}
225
+ label={text.approve}
226
+ variant="primary"
227
+ onPress={() => void actions.approve(draft.id, null)}
228
+ />
229
+ )}
230
+ <Button
231
+ key={`edit-toggle:${draft.id}`}
232
+ label={isEditing ? text.cancel : text.edit}
233
+ onPress={() => void update($, editing, () => (isEditing ? null : draft.id))}
234
+ />
235
+ <Button
236
+ key={`discard:${draft.id}`}
237
+ label={text.discard}
238
+ onPress={() => void actions.discard(draft.id)}
239
+ />
240
+ </Box>
241
+ ) : (
242
+ <Link href={conversationUrl(latest.server, draft.conversationId)}>{text.openInWebClient}</Link>
243
+ )}
244
+ </Box>
245
+ )
246
+ }
247
+
248
+ const hasApproveButton = (latest: HomingbirdOverview): boolean =>
249
+ latest.hasApproveButton && latest.approveButtonAllowed === true
250
+
251
+ const conversationUrl = (server: string, conversationId: string): string =>
252
+ `${server.replace(/\/+$/, '')}/#/c/${encodeURIComponent(conversationId)}`
253
+
254
+ const draftHeading = (text: PaneText, draft: HomingbirdDraft): string => {
255
+ if (draft.agentName === null) return draft.inReplyTo === null ? text.newNote : text.reply
256
+ return draft.inReplyTo === null ? text.newNoteBy(draft.agentName) : text.replyBy(draft.agentName)
257
+ }
258
+
259
+ const conversationName = (conversation: HomingbirdConversation): string => {
260
+ if (conversation.kind !== 'topic') return conversation.with
261
+ const name = conversation.title ?? conversation.with
262
+ return name.startsWith('#') ? name : `#${name}`
263
+ }
264
+
265
+ const firstLine = (text: string): string => text.split('\n')[0] ?? ''
266
+
267
+ const connection = atom({ plugin: 'homingbird', key: 'connection' } as const, 'idle')
268
+ const desk = atom({ plugin: 'homingbird', key: 'desk' } as const, 'not-desk')
269
+ const editing = atom({ plugin: 'homingbird', key: 'editing' } as const, null)
270
+ const overview = atom({ plugin: 'homingbird', key: 'overview' } as const, null, { shape: 'overview-2' })
271
+ const problem = atom({ plugin: 'homingbird', key: 'problem' } as const, null)
272
+ const requests = atom({ plugin: 'homingbird', key: 'requests' } as const, [], { shape: 'requests-2' })
273
+ const signIn = atom({ plugin: 'homingbird', key: 'signIn' } as const, null)
package/hooks/pip.ts ADDED
@@ -0,0 +1,36 @@
1
+ export const PIP_COLUMNS = 4
2
+ export const PIP_ROWS = 2
3
+ export const PIP_PIXELS = 32
4
+
5
+ export const PIP = {
6
+ idle: {
7
+ png: 'iVBORw0KGgoAAAANSUhEUgAAAEAAAABECAYAAAAx+DPIAAAA8UlEQVR42u3asQnCQBiG4UQs3UAQl3AYQaytdQBxAK2tRXAYlxDBDexj7TUh3hnN5Xk7IWjy8n9fzlyKAgAA9JUy9Rfuz9fqmye8WcySnvOg7xNAgA74s4y33REiQIAO6HbmYztBBAjoOcOuZf6wXb19Xu+OJoAAAhJ2QG48T/PKBBBAQD4dEHvfHy0vpQkggIDPO+B2f0T94HQybvUCw8ybAAIIiOuAMMNNOyE8vu1OMAEEEJD2v8CvM2wCCCAgCnuDIkCAdUBWeEdIBAiIWwfU3febZizcm6t7Rtf0eBNAAAFx64DUmTcBBBAAAADQCV6T1Ddqdvtw4QAAAABJRU5ErkJggg==',
8
+ svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 17" shape-rendering="crispEdges"><rect x="5" y="2" width="6" height="1" fill="#8DA4CB"/><rect x="3" y="3" width="10" height="1" fill="#8DA4CB"/><rect x="2" y="4" width="12" height="1" fill="#8DA4CB"/><rect x="1" y="5" width="10" height="1" fill="#8DA4CB"/><rect x="11" y="5" width="1" height="1" fill="#1B2333"/><rect x="12" y="5" width="2" height="1" fill="#8DA4CB"/><rect x="1" y="6" width="10" height="1" fill="#8DA4CB"/><rect x="11" y="6" width="1" height="1" fill="#1B2333"/><rect x="12" y="6" width="2" height="1" fill="#8DA4CB"/><rect x="14" y="6" width="2" height="1" fill="#F4A259"/><rect x="1" y="7" width="13" height="1" fill="#8DA4CB"/><rect x="14" y="7" width="1" height="1" fill="#F4A259"/><rect x="1" y="8" width="2" height="1" fill="#8DA4CB"/><rect x="3" y="8" width="4" height="1" fill="#6D86B0"/><rect x="7" y="8" width="7" height="1" fill="#8DA4CB"/><rect x="1" y="9" width="3" height="1" fill="#8DA4CB"/><rect x="4" y="9" width="4" height="1" fill="#6D86B0"/><rect x="8" y="9" width="6" height="1" fill="#8DA4CB"/><rect x="1" y="10" width="13" height="1" fill="#8DA4CB"/><rect x="2" y="11" width="12" height="1" fill="#8DA4CB"/><rect x="2" y="12" width="11" height="1" fill="#8DA4CB"/><rect x="1" y="13" width="2" height="1" fill="#8DA4CB"/><rect x="6" y="13" width="1" height="1" fill="#F4A259"/><rect x="9" y="13" width="1" height="1" fill="#F4A259"/><rect x="0" y="14" width="2" height="1" fill="#8DA4CB"/><rect x="6" y="14" width="1" height="1" fill="#F4A259"/><rect x="9" y="14" width="1" height="1" fill="#F4A259"/></svg>',
9
+ },
10
+ offline: {
11
+ png: 'iVBORw0KGgoAAAANSUhEUgAAAEAAAABECAYAAAAx+DPIAAABFklEQVR42u2ZMQrCMBiFG3H0BoJ4CQ8jFGdx1ANYD6CjOEvBE3gFFwevIAVv4B73DAnhT2qTfG9NSpuP917TpqoQQiVLpb6AetNoyfWj0h0AADogc5kd0Z4bhQMAAIB4HXBsnzrmA+/qhZJkHgcAAACyDoidcV+9HnccAAAAROyAoWU+9L6BCACgcI1zyzwOAAAAZB0wNJ32a+v49nCxjn+vS40DAACAdDvAlXFfTVY3zgUAAABBB7y7j+iG89m01wWamccBAACArAPMDPt2gjm/707AAQAAQNhvgX9nGAcAAAAicTZIBADAPiAruTKPAwAAAPs+wPXe982YeTbn+kfnOx8HAAAAsn1A6MzjAAAAACGEktEP2nNDAjFmRQEAAAAASUVORK5CYII=',
12
+ svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 17" shape-rendering="crispEdges"><rect x="12" y="1" width="4" height="1" fill="#5C6A80"/><rect x="14" y="2" width="1" height="1" fill="#5C6A80"/><rect x="5" y="3" width="6" height="1" fill="#8DA4CB"/><rect x="13" y="3" width="1" height="1" fill="#5C6A80"/><rect x="3" y="4" width="9" height="1" fill="#8DA4CB"/><rect x="12" y="4" width="4" height="1" fill="#5C6A80"/><rect x="2" y="5" width="12" height="1" fill="#8DA4CB"/><rect x="1" y="6" width="13" height="1" fill="#8DA4CB"/><rect x="1" y="7" width="9" height="1" fill="#8DA4CB"/><rect x="10" y="7" width="2" height="1" fill="#1B2333"/><rect x="12" y="7" width="2" height="1" fill="#8DA4CB"/><rect x="14" y="7" width="2" height="1" fill="#F4A259"/><rect x="1" y="8" width="13" height="1" fill="#8DA4CB"/><rect x="14" y="8" width="1" height="1" fill="#F4A259"/><rect x="1" y="9" width="2" height="1" fill="#8DA4CB"/><rect x="3" y="9" width="4" height="1" fill="#6D86B0"/><rect x="7" y="9" width="7" height="1" fill="#8DA4CB"/><rect x="1" y="10" width="3" height="1" fill="#8DA4CB"/><rect x="4" y="10" width="4" height="1" fill="#6D86B0"/><rect x="8" y="10" width="6" height="1" fill="#8DA4CB"/><rect x="1" y="11" width="13" height="1" fill="#8DA4CB"/><rect x="2" y="12" width="12" height="1" fill="#8DA4CB"/><rect x="2" y="13" width="11" height="1" fill="#8DA4CB"/><rect x="1" y="14" width="2" height="1" fill="#8DA4CB"/><rect x="6" y="14" width="1" height="1" fill="#F4A259"/><rect x="9" y="14" width="1" height="1" fill="#F4A259"/><rect x="0" y="15" width="2" height="1" fill="#8DA4CB"/><rect x="6" y="15" width="1" height="1" fill="#F4A259"/><rect x="9" y="15" width="1" height="1" fill="#F4A259"/></svg>',
13
+ },
14
+ connecting: {
15
+ png: 'iVBORw0KGgoAAAANSUhEUgAAAEAAAABECAYAAAAx+DPIAAABF0lEQVR42u2azQnCMBiGG/HoBoK4hAM4hQjFo4hHHcA6gB5FPEpBnKIDuIQIbuA9XptcSvjSapLnuZUWfx6+901sVVng5OtC14/LU6Hqx5d7ZZxfzqbG+V6WOAjIAAASRvl+wUP50G1+4G0+cVrn2QewDCLAbwe0nXHfHcEEIAABsg7498xLO4EIICBx+qFl/rhbGceb/ZkJQAACPHZAbHyuc80EIAAB8XSAdN0fLG7cE0QAAgQd8Hy9RW84Hg07/YJ25pkABCBA1gF2hl07wb6+605gAhCAAL+/BX6dYSYAAQgQwbNBIoAA9gFRwX+EiAACZPuApnXfNWP2s7mme3Su1zMBCECAbB/gO/NMAAIQAAAAABAEXy27R3H9/1pSAAAAAElFTkSuQmCC',
16
+ svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 17" shape-rendering="crispEdges"><rect x="12" y="0" width="1" height="1" fill="#5C6A80"/><rect x="14" y="0" width="1" height="1" fill="#9AA9BF"/><rect x="5" y="2" width="6" height="1" fill="#8DA4CB"/><rect x="12" y="2" width="1" height="1" fill="#9AA9BF"/><rect x="14" y="2" width="1" height="1" fill="#9AA9BF"/><rect x="3" y="3" width="10" height="1" fill="#8DA4CB"/><rect x="2" y="4" width="12" height="1" fill="#8DA4CB"/><rect x="1" y="5" width="10" height="1" fill="#8DA4CB"/><rect x="11" y="5" width="1" height="1" fill="#1B2333"/><rect x="12" y="5" width="2" height="1" fill="#8DA4CB"/><rect x="1" y="6" width="10" height="1" fill="#8DA4CB"/><rect x="11" y="6" width="1" height="1" fill="#1B2333"/><rect x="12" y="6" width="2" height="1" fill="#8DA4CB"/><rect x="14" y="6" width="2" height="1" fill="#F4A259"/><rect x="1" y="7" width="13" height="1" fill="#8DA4CB"/><rect x="14" y="7" width="1" height="1" fill="#F4A259"/><rect x="1" y="8" width="2" height="1" fill="#8DA4CB"/><rect x="3" y="8" width="4" height="1" fill="#6D86B0"/><rect x="7" y="8" width="7" height="1" fill="#8DA4CB"/><rect x="1" y="9" width="3" height="1" fill="#8DA4CB"/><rect x="4" y="9" width="4" height="1" fill="#6D86B0"/><rect x="8" y="9" width="6" height="1" fill="#8DA4CB"/><rect x="1" y="10" width="13" height="1" fill="#8DA4CB"/><rect x="2" y="11" width="12" height="1" fill="#8DA4CB"/><rect x="2" y="12" width="11" height="1" fill="#8DA4CB"/><rect x="1" y="13" width="2" height="1" fill="#8DA4CB"/><rect x="6" y="13" width="1" height="1" fill="#F4A259"/><rect x="9" y="13" width="1" height="1" fill="#F4A259"/><rect x="0" y="14" width="2" height="1" fill="#8DA4CB"/><rect x="6" y="14" width="1" height="1" fill="#F4A259"/><rect x="9" y="14" width="1" height="1" fill="#F4A259"/></svg>',
17
+ },
18
+ signIn: {
19
+ png: 'iVBORw0KGgoAAAANSUhEUgAAAEAAAABECAYAAAAx+DPIAAABFklEQVR42u2asQ4BQRRF94nSH0hE6Qd8jETUaiqVqFTUapHo/IgfUIpk/0A/alOYPG+smZ1zO9kJuyf33n07S6rM5G4rp1kvo618Ot6pChcASgcguXeAn3FtRxABABSubuwv3J2u7renfFHNBaGOIAIAYA5ILeM2LadjwQEAAEC8Dkg989ZOIAIA4Fkgr8zv1/O3z4vNAQcAAAAJ7Qekpudx4nAAAADQng6w3vd7s7PgAAAA4PsOuD9q0w8OB/1GL9DPPA4AAABsHeBnWNsJ/vqmOwEHAAAAcZ8F/p1hHAAAAJjEu0EiAADmgFaJ/wgRAQDY5oDQfV+bMf/dXGiPTrseBwAAALY5IHbmcQAAAIAQQgghlIVe+jRJwq0MN0MAAAAASUVORK5CYII=',
20
+ svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 17" shape-rendering="crispEdges"><rect x="11" y="0" width="3" height="1" fill="#FFD879"/><rect x="11" y="1" width="1" height="1" fill="#FFD879"/><rect x="13" y="1" width="3" height="1" fill="#FFD879"/><rect x="5" y="2" width="6" height="1" fill="#8DA4CB"/><rect x="11" y="2" width="3" height="1" fill="#FFD879"/><rect x="15" y="2" width="1" height="1" fill="#FFD879"/><rect x="3" y="3" width="10" height="1" fill="#8DA4CB"/><rect x="2" y="4" width="12" height="1" fill="#8DA4CB"/><rect x="1" y="5" width="10" height="1" fill="#8DA4CB"/><rect x="11" y="5" width="1" height="1" fill="#1B2333"/><rect x="12" y="5" width="2" height="1" fill="#8DA4CB"/><rect x="1" y="6" width="10" height="1" fill="#8DA4CB"/><rect x="11" y="6" width="1" height="1" fill="#1B2333"/><rect x="12" y="6" width="2" height="1" fill="#8DA4CB"/><rect x="14" y="6" width="2" height="1" fill="#F4A259"/><rect x="1" y="7" width="13" height="1" fill="#8DA4CB"/><rect x="14" y="7" width="1" height="1" fill="#F4A259"/><rect x="1" y="8" width="2" height="1" fill="#8DA4CB"/><rect x="3" y="8" width="4" height="1" fill="#6D86B0"/><rect x="7" y="8" width="7" height="1" fill="#8DA4CB"/><rect x="1" y="9" width="3" height="1" fill="#8DA4CB"/><rect x="4" y="9" width="4" height="1" fill="#6D86B0"/><rect x="8" y="9" width="6" height="1" fill="#8DA4CB"/><rect x="1" y="10" width="13" height="1" fill="#8DA4CB"/><rect x="2" y="11" width="12" height="1" fill="#8DA4CB"/><rect x="2" y="12" width="11" height="1" fill="#8DA4CB"/><rect x="1" y="13" width="2" height="1" fill="#8DA4CB"/><rect x="6" y="13" width="1" height="1" fill="#F4A259"/><rect x="9" y="13" width="1" height="1" fill="#F4A259"/><rect x="0" y="14" width="2" height="1" fill="#8DA4CB"/><rect x="6" y="14" width="1" height="1" fill="#F4A259"/><rect x="9" y="14" width="1" height="1" fill="#F4A259"/></svg>',
21
+ },
22
+ newNote: {
23
+ png: 'iVBORw0KGgoAAAANSUhEUgAAAEAAAABECAYAAAAx+DPIAAABC0lEQVR42u3avQnCUBiFYSOWbiCISziMIFoJ1jqAOICCnbUIDuEILiGCC4h9rE0j15uYxDynC9z83JdzvvuXVouImqyk7h14TMdpzP3tpjsAAAAAAACAJquT9wM3x0ta5Acvx8OEAwAAoLy1QNEZD9XsvOMAAAAosAZULfN5zxtEAABrgXplfruav10v1nsOAACACu0HVE3PwyjlAAAA+J8aEDvudyenhAMAAOD7GnC93aNeOOj3ftrBbOY5AAAA4mpANsOhNSHb/tc1gQMAACDftUDZGeYAAACIkrNBEQDAPOCvFPofoQgAYB4QNu6HZix7Nvdpjy60PQcAAEDcPCDvzHMAAAAQEdVGL4lOOtReypdMAAAAAElFTkSuQmCC',
24
+ svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 17" shape-rendering="crispEdges"><rect x="12" y="1" width="4" height="1" fill="#F25F5C"/><rect x="12" y="2" width="4" height="1" fill="#F25F5C"/><rect x="5" y="3" width="6" height="1" fill="#8DA4CB"/><rect x="12" y="3" width="4" height="1" fill="#F25F5C"/><rect x="3" y="4" width="9" height="1" fill="#8DA4CB"/><rect x="12" y="4" width="4" height="1" fill="#F25F5C"/><rect x="2" y="5" width="12" height="1" fill="#8DA4CB"/><rect x="1" y="6" width="10" height="1" fill="#8DA4CB"/><rect x="11" y="6" width="1" height="1" fill="#1B2333"/><rect x="12" y="6" width="2" height="1" fill="#8DA4CB"/><rect x="1" y="7" width="10" height="1" fill="#8DA4CB"/><rect x="11" y="7" width="1" height="1" fill="#1B2333"/><rect x="12" y="7" width="2" height="1" fill="#8DA4CB"/><rect x="14" y="7" width="2" height="1" fill="#F4A259"/><rect x="1" y="8" width="13" height="1" fill="#8DA4CB"/><rect x="14" y="8" width="1" height="1" fill="#F4A259"/><rect x="1" y="9" width="2" height="1" fill="#8DA4CB"/><rect x="3" y="9" width="4" height="1" fill="#6D86B0"/><rect x="7" y="9" width="7" height="1" fill="#8DA4CB"/><rect x="1" y="10" width="3" height="1" fill="#8DA4CB"/><rect x="4" y="10" width="4" height="1" fill="#6D86B0"/><rect x="8" y="10" width="6" height="1" fill="#8DA4CB"/><rect x="1" y="11" width="13" height="1" fill="#8DA4CB"/><rect x="2" y="12" width="12" height="1" fill="#8DA4CB"/><rect x="2" y="13" width="11" height="1" fill="#8DA4CB"/><rect x="1" y="14" width="2" height="1" fill="#8DA4CB"/><rect x="6" y="14" width="1" height="1" fill="#F4A259"/><rect x="9" y="14" width="1" height="1" fill="#F4A259"/><rect x="0" y="15" width="2" height="1" fill="#8DA4CB"/><rect x="6" y="15" width="1" height="1" fill="#F4A259"/><rect x="9" y="15" width="1" height="1" fill="#F4A259"/></svg>',
25
+ },
26
+ awaitingApproval: {
27
+ png: 'iVBORw0KGgoAAAANSUhEUgAAAEAAAABECAYAAAAx+DPIAAABNklEQVR42u2aOwrCQBRFE7HMDgSxFlu3YGstBMVKay0sQxZgajtBBGtL3YKlGxDBHaQ21hkwj/Elks85XeBB4mHunZHEdWpGfJgkNvMtp+EgoOkC3Kb9YLMjiAAC6IB82R5vSZEPvPaHribz3vTksgIQgIDfO6DojP+7I4gAAuiAamdeYvGOHM4BRAABX2lXLfNRsExdr8Jd5ryZeVYAAhCQ3QF1Q3pPQAQQQAdUC2nfl+C/ABFAgK4DHs+X6oa9bsdqfnCfpa5H87HtHVNXl02fd4MIQICiA8wM23aCOS91gpn56/5s1QnSPBFAAB2gw3Zf1yJ1gjTPCkAAAlKU/t2g7wWsAAQgoMTngKI5xqHVPN8IEQEE6M4B0r6f97e62nlWAAIQoDsH5J15VgACEAAAAABQCT6aH1UI5wbULAAAAABJRU5ErkJggg==',
28
+ svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 17" shape-rendering="crispEdges"><rect x="13" y="0" width="3" height="1" fill="#F4A259"/><rect x="15" y="1" width="1" height="1" fill="#F4A259"/><rect x="5" y="2" width="6" height="1" fill="#8DA4CB"/><rect x="14" y="2" width="1" height="1" fill="#F4A259"/><rect x="3" y="3" width="10" height="1" fill="#8DA4CB"/><rect x="2" y="4" width="12" height="1" fill="#8DA4CB"/><rect x="14" y="4" width="1" height="1" fill="#F4A259"/><rect x="1" y="5" width="10" height="1" fill="#8DA4CB"/><rect x="11" y="5" width="1" height="1" fill="#1B2333"/><rect x="12" y="5" width="2" height="1" fill="#8DA4CB"/><rect x="1" y="6" width="10" height="1" fill="#8DA4CB"/><rect x="11" y="6" width="1" height="1" fill="#1B2333"/><rect x="12" y="6" width="2" height="1" fill="#8DA4CB"/><rect x="14" y="6" width="2" height="1" fill="#F4A259"/><rect x="1" y="7" width="13" height="1" fill="#8DA4CB"/><rect x="14" y="7" width="1" height="1" fill="#F4A259"/><rect x="1" y="8" width="2" height="1" fill="#8DA4CB"/><rect x="3" y="8" width="4" height="1" fill="#6D86B0"/><rect x="7" y="8" width="3" height="1" fill="#8DA4CB"/><rect x="10" y="8" width="1" height="1" fill="#B9772A"/><rect x="11" y="8" width="4" height="1" fill="#FFD879"/><rect x="15" y="8" width="1" height="1" fill="#B9772A"/><rect x="1" y="9" width="3" height="1" fill="#8DA4CB"/><rect x="4" y="9" width="4" height="1" fill="#6D86B0"/><rect x="8" y="9" width="2" height="1" fill="#8DA4CB"/><rect x="10" y="9" width="1" height="1" fill="#FFD879"/><rect x="11" y="9" width="1" height="1" fill="#B9772A"/><rect x="12" y="9" width="2" height="1" fill="#FFD879"/><rect x="14" y="9" width="1" height="1" fill="#B9772A"/><rect x="15" y="9" width="1" height="1" fill="#FFD879"/><rect x="1" y="10" width="9" height="1" fill="#8DA4CB"/><rect x="10" y="10" width="2" height="1" fill="#FFD879"/><rect x="12" y="10" width="2" height="1" fill="#B9772A"/><rect x="14" y="10" width="2" height="1" fill="#FFD879"/><rect x="2" y="11" width="8" height="1" fill="#8DA4CB"/><rect x="10" y="11" width="6" height="1" fill="#E9B04A"/><rect x="2" y="12" width="11" height="1" fill="#8DA4CB"/><rect x="1" y="13" width="2" height="1" fill="#8DA4CB"/><rect x="6" y="13" width="1" height="1" fill="#F4A259"/><rect x="9" y="13" width="1" height="1" fill="#F4A259"/><rect x="0" y="14" width="2" height="1" fill="#8DA4CB"/><rect x="6" y="14" width="1" height="1" fill="#F4A259"/><rect x="9" y="14" width="1" height="1" fill="#F4A259"/></svg>',
29
+ },
30
+ drafting: {
31
+ png: 'iVBORw0KGgoAAAANSUhEUgAAAEAAAABECAYAAAAx+DPIAAABA0lEQVR42u2aMQrCMBSGE3H0BoJ4CQ8jFGdx1ANYD6CjOEvBw3gJEbyBe7pqlhLfa2yS79sKBduP9/+Jba3pmWpTu8/j5lxbMyBGpnAQYAAACkZ9TT42d9fnBe+qheo1swwigA4YVsZjdwQRQAAdkHbmpZ1ABBBQOOPUMn/ar7+Ot4cLE4AABCh2QG68r0vHBCAAAfl0gHTdn6xulglAAAJ+74DH8yX6wflsGvUG/cwzAQhAgKwD/AyHdoJ/fuxOYAIQgADd/wL/zjATgAAEiODdIBFAAPuArOAbISKAANk+oGvdD82Y/26u6xld6PlMAAIQINsHaGeeCUAAAgAAAACSoAXf8ztx+daungAAAABJRU5ErkJggg==',
32
+ svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 17" shape-rendering="crispEdges"><rect x="6" y="0" width="1" height="1" fill="#5C6A80"/><rect x="5" y="2" width="6" height="1" fill="#8DA4CB"/><rect x="3" y="3" width="10" height="1" fill="#8DA4CB"/><rect x="2" y="4" width="12" height="1" fill="#8DA4CB"/><rect x="1" y="5" width="10" height="1" fill="#8DA4CB"/><rect x="11" y="5" width="1" height="1" fill="#1B2333"/><rect x="12" y="5" width="2" height="1" fill="#8DA4CB"/><rect x="1" y="6" width="10" height="1" fill="#8DA4CB"/><rect x="11" y="6" width="1" height="1" fill="#1B2333"/><rect x="12" y="6" width="2" height="1" fill="#8DA4CB"/><rect x="14" y="6" width="2" height="1" fill="#F4A259"/><rect x="1" y="7" width="13" height="1" fill="#8DA4CB"/><rect x="14" y="7" width="1" height="1" fill="#F4A259"/><rect x="1" y="8" width="2" height="1" fill="#8DA4CB"/><rect x="3" y="8" width="4" height="1" fill="#6D86B0"/><rect x="7" y="8" width="7" height="1" fill="#8DA4CB"/><rect x="1" y="9" width="3" height="1" fill="#8DA4CB"/><rect x="4" y="9" width="4" height="1" fill="#6D86B0"/><rect x="8" y="9" width="6" height="1" fill="#8DA4CB"/><rect x="1" y="10" width="13" height="1" fill="#8DA4CB"/><rect x="2" y="11" width="12" height="1" fill="#8DA4CB"/><rect x="2" y="12" width="11" height="1" fill="#8DA4CB"/><rect x="1" y="13" width="2" height="1" fill="#8DA4CB"/><rect x="6" y="13" width="1" height="1" fill="#F4A259"/><rect x="9" y="13" width="1" height="1" fill="#F4A259"/><rect x="0" y="14" width="2" height="1" fill="#8DA4CB"/><rect x="6" y="14" width="1" height="1" fill="#F4A259"/><rect x="9" y="14" width="1" height="1" fill="#F4A259"/></svg>',
33
+ },
34
+ } as const
35
+
36
+ export type PipState = keyof typeof PIP