@brett_lamy/ui 4.0.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/README.md +1 -1
  2. package/dist/components/animated-height.d.ts +3 -1
  3. package/dist/components/animated-height.d.ts.map +1 -1
  4. package/dist/components/animated-height.js +11 -11
  5. package/dist/components/artifact-chat-container.d.ts.map +1 -1
  6. package/dist/components/artifact-chat-container.js +81 -82
  7. package/dist/components/button.d.ts +4 -3
  8. package/dist/components/button.d.ts.map +1 -1
  9. package/dist/components/button.js +22 -9
  10. package/dist/components/calendar.d.ts +26 -0
  11. package/dist/components/calendar.d.ts.map +1 -0
  12. package/dist/components/calendar.js +97 -0
  13. package/dist/components/canvas.d.ts +91 -0
  14. package/dist/components/canvas.d.ts.map +1 -0
  15. package/dist/components/canvas.js +296 -0
  16. package/dist/components/color-field.d.ts +22 -0
  17. package/dist/components/color-field.d.ts.map +1 -0
  18. package/dist/components/color-field.js +60 -0
  19. package/dist/components/color-picker.d.ts +49 -0
  20. package/dist/components/color-picker.d.ts.map +1 -0
  21. package/dist/components/color-picker.js +121 -0
  22. package/dist/components/composer/composer-cards.d.ts +55 -0
  23. package/dist/components/composer/composer-cards.d.ts.map +1 -0
  24. package/dist/components/composer/composer-cards.js +351 -0
  25. package/dist/components/composer/composer.d.ts +9 -1
  26. package/dist/components/composer/composer.d.ts.map +1 -1
  27. package/dist/components/composer/composer.js +179 -154
  28. package/dist/components/context-menu.d.ts +25 -0
  29. package/dist/components/context-menu.d.ts.map +1 -0
  30. package/dist/components/context-menu.js +127 -0
  31. package/dist/components/credenza.d.ts.map +1 -1
  32. package/dist/components/credenza.js +52 -92
  33. package/dist/components/cron-editor.d.ts +47 -0
  34. package/dist/components/cron-editor.d.ts.map +1 -0
  35. package/dist/components/cron-editor.js +297 -0
  36. package/dist/components/date-field.d.ts +19 -0
  37. package/dist/components/date-field.d.ts.map +1 -0
  38. package/dist/components/date-field.js +79 -0
  39. package/dist/components/date-picker.d.ts +38 -0
  40. package/dist/components/date-picker.d.ts.map +1 -0
  41. package/dist/components/date-picker.js +110 -0
  42. package/dist/components/dropdown-menu.d.ts +3 -1
  43. package/dist/components/dropdown-menu.d.ts.map +1 -1
  44. package/dist/components/dropdown-menu.js +5 -5
  45. package/dist/components/edge-drawer.d.ts.map +1 -1
  46. package/dist/components/edge-drawer.js +1 -0
  47. package/dist/components/file-upload.d.ts +121 -0
  48. package/dist/components/file-upload.d.ts.map +1 -0
  49. package/dist/components/file-upload.js +405 -0
  50. package/dist/components/filter-input.d.ts +22 -0
  51. package/dist/components/filter-input.d.ts.map +1 -0
  52. package/dist/components/filter-input.js +126 -0
  53. package/dist/components/filter.d.ts +154 -0
  54. package/dist/components/filter.d.ts.map +1 -0
  55. package/dist/components/filter.js +815 -0
  56. package/dist/components/floating-chat.d.ts.map +1 -1
  57. package/dist/components/floating-chat.js +71 -88
  58. package/dist/components/floating-sheet.d.ts.map +1 -1
  59. package/dist/components/floating-sheet.js +93 -104
  60. package/dist/components/markdown-editor.d.ts +2 -0
  61. package/dist/components/markdown-editor.d.ts.map +1 -1
  62. package/dist/components/markdown-editor.js +46 -45
  63. package/dist/components/markdown-view.d.ts +6 -1
  64. package/dist/components/markdown-view.d.ts.map +1 -1
  65. package/dist/components/markdown-view.js +13 -11
  66. package/dist/components/navigation-stack.d.ts +3 -5
  67. package/dist/components/navigation-stack.d.ts.map +1 -1
  68. package/dist/components/navigation-stack.js +212 -382
  69. package/dist/components/passkey-enroll-dialog.d.ts +36 -0
  70. package/dist/components/passkey-enroll-dialog.d.ts.map +1 -0
  71. package/dist/components/passkey-enroll-dialog.js +234 -0
  72. package/dist/components/result-table.d.ts +38 -0
  73. package/dist/components/result-table.d.ts.map +1 -0
  74. package/dist/components/result-table.js +161 -0
  75. package/dist/components/schema-tree.d.ts +19 -0
  76. package/dist/components/schema-tree.d.ts.map +1 -0
  77. package/dist/components/schema-tree.js +172 -0
  78. package/dist/components/side-drawer.d.ts.map +1 -1
  79. package/dist/components/side-drawer.js +117 -143
  80. package/dist/components/slider.d.ts.map +1 -1
  81. package/dist/components/slider.js +4 -1
  82. package/dist/components/spinner-shapes.d.ts +299 -0
  83. package/dist/components/spinner-shapes.d.ts.map +1 -0
  84. package/dist/components/spinner-shapes.js +876 -0
  85. package/dist/components/spinner.d.ts +133 -3
  86. package/dist/components/spinner.d.ts.map +1 -1
  87. package/dist/components/spinner.js +445 -29
  88. package/dist/components/sql-console.d.ts +28 -0
  89. package/dist/components/sql-console.d.ts.map +1 -0
  90. package/dist/components/sql-console.js +348 -0
  91. package/dist/components/sql-editor.d.ts +47 -0
  92. package/dist/components/sql-editor.d.ts.map +1 -0
  93. package/dist/components/sql-editor.js +170 -0
  94. package/dist/components/tab-view.d.ts +2 -2
  95. package/dist/components/tab-view.d.ts.map +1 -1
  96. package/dist/components/tab-view.js +63 -49
  97. package/dist/components/tailscale-login-button.d.ts +53 -0
  98. package/dist/components/tailscale-login-button.d.ts.map +1 -0
  99. package/dist/components/tailscale-login-button.js +197 -0
  100. package/dist/components/time-input.d.ts +46 -0
  101. package/dist/components/time-input.d.ts.map +1 -0
  102. package/dist/components/time-input.js +258 -0
  103. package/dist/components/toast.d.ts +5 -2
  104. package/dist/components/toast.d.ts.map +1 -1
  105. package/dist/components/toast.js +249 -125
  106. package/dist/components/vault-gate.d.ts +60 -0
  107. package/dist/components/vault-gate.d.ts.map +1 -0
  108. package/dist/components/vault-gate.js +382 -0
  109. package/dist/index.css +1 -1
  110. package/dist/index.d.ts +90 -3
  111. package/dist/index.d.ts.map +1 -1
  112. package/dist/index.js +134 -83
  113. package/dist/lib/back-history.d.ts +5 -0
  114. package/dist/lib/back-history.d.ts.map +1 -0
  115. package/dist/lib/back-history.js +44 -0
  116. package/dist/lib/canvas-math.d.ts +82 -0
  117. package/dist/lib/canvas-math.d.ts.map +1 -0
  118. package/dist/lib/canvas-math.js +226 -0
  119. package/dist/lib/controllable-state.d.ts +4 -0
  120. package/dist/lib/controllable-state.d.ts.map +1 -0
  121. package/dist/lib/controllable-state.js +11 -0
  122. package/dist/lib/cron.d.ts +55 -0
  123. package/dist/lib/cron.d.ts.map +1 -0
  124. package/dist/lib/cron.js +269 -0
  125. package/dist/lib/edge-swipe.d.ts +36 -0
  126. package/dist/lib/edge-swipe.d.ts.map +1 -0
  127. package/dist/lib/edge-swipe.js +73 -0
  128. package/dist/lib/file-upload.d.ts +187 -0
  129. package/dist/lib/file-upload.d.ts.map +1 -0
  130. package/dist/lib/file-upload.js +349 -0
  131. package/dist/lib/filter-query.d.ts +90 -0
  132. package/dist/lib/filter-query.d.ts.map +1 -0
  133. package/dist/lib/filter-query.js +459 -0
  134. package/dist/lib/filter.d.ts +120 -0
  135. package/dist/lib/filter.d.ts.map +1 -0
  136. package/dist/lib/filter.js +399 -0
  137. package/dist/lib/format-bytes.d.ts +3 -0
  138. package/dist/lib/format-bytes.d.ts.map +1 -0
  139. package/dist/lib/format-bytes.js +16 -0
  140. package/dist/lib/gpu-cron.d.ts +51 -0
  141. package/dist/lib/gpu-cron.d.ts.map +1 -0
  142. package/dist/lib/gpu-cron.js +81 -0
  143. package/dist/lib/gpu-query/featurize.d.ts +19 -0
  144. package/dist/lib/gpu-query/featurize.d.ts.map +1 -0
  145. package/dist/lib/gpu-query/featurize.js +88 -0
  146. package/dist/lib/gpu-query/index.d.ts +73 -0
  147. package/dist/lib/gpu-query/index.d.ts.map +1 -0
  148. package/dist/lib/gpu-query/index.js +117 -0
  149. package/dist/lib/gpu-query/kernel.wgsl.d.ts +30 -0
  150. package/dist/lib/gpu-query/kernel.wgsl.d.ts.map +1 -0
  151. package/dist/lib/gpu-query/model.d.ts +8 -0
  152. package/dist/lib/gpu-query/model.d.ts.map +1 -0
  153. package/dist/lib/gpu-query/model.js +91 -0
  154. package/dist/lib/gpu-query/schema.d.ts +40 -0
  155. package/dist/lib/gpu-query/schema.d.ts.map +1 -0
  156. package/dist/lib/gpu-query/schema.js +0 -0
  157. package/dist/lib/gpu-query/webgpu.d.ts +12 -0
  158. package/dist/lib/gpu-query/webgpu.d.ts.map +1 -0
  159. package/dist/lib/gpu-query/weights.d.ts +17 -0
  160. package/dist/lib/gpu-query/weights.d.ts.map +1 -0
  161. package/dist/lib/gpu-query/weights.js +40 -0
  162. package/dist/lib/gpu-query/weights.json.d.ts +3 -0
  163. package/dist/lib/gpu-query/weights2.js +25 -0
  164. package/dist/lib/gpu-time.d.ts +77 -0
  165. package/dist/lib/gpu-time.d.ts.map +1 -0
  166. package/dist/lib/gpu-time.js +260 -0
  167. package/dist/lib/morph-path.d.ts +22 -0
  168. package/dist/lib/morph-path.d.ts.map +1 -0
  169. package/dist/lib/morph-path.js +42 -0
  170. package/dist/lib/passkey.d.ts +120 -0
  171. package/dist/lib/passkey.d.ts.map +1 -0
  172. package/dist/lib/passkey.js +186 -0
  173. package/dist/lib/persistent-state.d.ts +9 -0
  174. package/dist/lib/persistent-state.d.ts.map +1 -0
  175. package/dist/lib/persistent-state.js +37 -0
  176. package/dist/lib/pglite-core.d.ts +219 -0
  177. package/dist/lib/pglite-core.d.ts.map +1 -0
  178. package/dist/lib/pglite-core.js +273 -0
  179. package/dist/lib/pglite-files.d.ts +7 -0
  180. package/dist/lib/pglite-files.d.ts.map +1 -0
  181. package/dist/lib/pglite-files.js +17 -0
  182. package/dist/lib/pglite-schema.d.ts +58 -0
  183. package/dist/lib/pglite-schema.d.ts.map +1 -0
  184. package/dist/lib/pglite-schema.js +105 -0
  185. package/dist/lib/pglite-storage.d.ts +33 -0
  186. package/dist/lib/pglite-storage.d.ts.map +1 -0
  187. package/dist/lib/pglite-storage.js +55 -0
  188. package/dist/lib/pglite-transfer.d.ts +53 -0
  189. package/dist/lib/pglite-transfer.d.ts.map +1 -0
  190. package/dist/lib/pglite-transfer.js +126 -0
  191. package/dist/lib/pglite.d.ts +106 -0
  192. package/dist/lib/pglite.d.ts.map +1 -0
  193. package/dist/lib/pglite.js +298 -0
  194. package/dist/lib/pull-to-refresh.d.ts +24 -0
  195. package/dist/lib/pull-to-refresh.d.ts.map +1 -0
  196. package/dist/lib/pull-to-refresh.js +74 -0
  197. package/dist/lib/scroll-hidden.d.ts +6 -0
  198. package/dist/lib/scroll-hidden.d.ts.map +1 -0
  199. package/dist/lib/scroll-hidden.js +21 -0
  200. package/dist/lib/sql-format.d.ts +62 -0
  201. package/dist/lib/sql-format.d.ts.map +1 -0
  202. package/dist/lib/sql-format.js +175 -0
  203. package/dist/lib/sql-lex.d.ts +25 -0
  204. package/dist/lib/sql-lex.d.ts.map +1 -0
  205. package/dist/lib/sql-lex.js +135 -0
  206. package/dist/lib/tab-lock.d.ts +28 -0
  207. package/dist/lib/tab-lock.d.ts.map +1 -0
  208. package/dist/lib/tab-lock.js +80 -0
  209. package/dist/lib/tailscale-connect.d.ts +56 -0
  210. package/dist/lib/tailscale-connect.d.ts.map +1 -0
  211. package/dist/lib/tailscale-connect.js +99 -0
  212. package/dist/lib/tailscale-fake.d.ts +33 -0
  213. package/dist/lib/tailscale-fake.d.ts.map +1 -0
  214. package/dist/lib/tailscale-fake.js +80 -0
  215. package/dist/lib/tailscale-policy.d.ts +71 -0
  216. package/dist/lib/tailscale-policy.d.ts.map +1 -0
  217. package/dist/lib/tailscale-policy.js +244 -0
  218. package/dist/lib/tailscale-react.d.ts +20 -0
  219. package/dist/lib/tailscale-react.d.ts.map +1 -0
  220. package/dist/lib/tailscale-react.js +37 -0
  221. package/dist/lib/tailscale-router/bridge.d.ts +60 -0
  222. package/dist/lib/tailscale-router/bridge.d.ts.map +1 -0
  223. package/dist/lib/tailscale-router/bridge.js +198 -0
  224. package/dist/lib/tailscale-router/react.d.ts +19 -0
  225. package/dist/lib/tailscale-router/react.d.ts.map +1 -0
  226. package/dist/lib/tailscale-router/react.js +52 -0
  227. package/dist/lib/tailscale.d.ts +204 -0
  228. package/dist/lib/tailscale.d.ts.map +1 -0
  229. package/dist/lib/tailscale.js +443 -0
  230. package/dist/lib/title-flight.d.ts +34 -0
  231. package/dist/lib/title-flight.d.ts.map +1 -0
  232. package/dist/lib/title-flight.js +123 -0
  233. package/dist/lib/vault-react.d.ts +49 -0
  234. package/dist/lib/vault-react.d.ts.map +1 -0
  235. package/dist/lib/vault-react.js +196 -0
  236. package/dist/lib/vault-storage.d.ts +30 -0
  237. package/dist/lib/vault-storage.d.ts.map +1 -0
  238. package/dist/lib/vault-storage.js +105 -0
  239. package/dist/lib/vault.d.ts +200 -0
  240. package/dist/lib/vault.d.ts.map +1 -0
  241. package/dist/lib/vault.js +641 -0
  242. package/dist/tailscale-sw.js +332 -0
  243. package/package.json +35 -4
  244. package/dist/components/icon-button.d.ts +0 -19
  245. package/dist/components/icon-button.d.ts.map +0 -1
  246. package/dist/components/icon-button.js +0 -31
  247. package/dist/components/measure-h.d.ts +0 -7
  248. package/dist/components/measure-h.d.ts.map +0 -1
  249. package/dist/components/measure-h.js +0 -20
@@ -0,0 +1,443 @@
1
+ import { matchTailscalePolicy as e, resolveTailscalePolicy as t } from "./tailscale-policy.js";
2
+ //#region src/lib/tailscale.ts
3
+ function n(e) {
4
+ if (!e || typeof e != "object") return null;
5
+ let t = e;
6
+ if (t.v !== 1 || typeof t.hostname != "string" || !t.state || typeof t.state != "object") return null;
7
+ let n = {};
8
+ for (let [e, r] of Object.entries(t.state)) {
9
+ if (typeof r != "string") return null;
10
+ n[e] = r;
11
+ }
12
+ return {
13
+ v: 1,
14
+ hostname: t.hostname,
15
+ state: n
16
+ };
17
+ }
18
+ function r() {
19
+ let e = null;
20
+ return {
21
+ load: async () => e,
22
+ save: async (t) => {
23
+ e = {
24
+ ...t,
25
+ state: { ...t.state }
26
+ };
27
+ },
28
+ clear: async () => {
29
+ e = null;
30
+ }
31
+ };
32
+ }
33
+ function i(e, t = "bl-tailscale-session") {
34
+ return {
35
+ load: async () => {
36
+ try {
37
+ return n(JSON.parse(e.getItem(t) ?? "null"));
38
+ } catch {
39
+ return null;
40
+ }
41
+ },
42
+ save: async (n) => e.setItem(t, JSON.stringify(n)),
43
+ clear: async () => e.removeItem(t)
44
+ };
45
+ }
46
+ function a(e, t = "tailscale-session") {
47
+ return {
48
+ load: async () => n(await e.get(t)),
49
+ save: (n) => e.put(t, n),
50
+ clear: () => e.delete(t)
51
+ };
52
+ }
53
+ var o = class extends Error {
54
+ reason;
55
+ constructor(e, t, n) {
56
+ super(t, n), this.name = "TailscaleError", this.reason = e;
57
+ }
58
+ };
59
+ function s(e) {
60
+ if (e instanceof o) switch (e.reason) {
61
+ case "no-client": return "Tailscale is not set up on this page.";
62
+ case "auth-key": return "Couldn't sign in with the auth key. It may have expired or been used already.";
63
+ case "login-url": return "The sign-in page address was not safe to open.";
64
+ case "not-connected": return "Not connected to Tailscale.";
65
+ case "other-tab": return "Tailscale is already running in another tab of this app.";
66
+ case "storage": return "Couldn't read or save the Tailscale session.";
67
+ case "locked-out": return "Tailnet lock: an administrator has to sign this device.";
68
+ case "in-use": return "This Tailscale session belongs to a different user.";
69
+ default: return e.message || "Tailscale stopped unexpectedly.";
70
+ }
71
+ return "Something went wrong with Tailscale. Try again.";
72
+ }
73
+ var c = Object.freeze({
74
+ status: "idle",
75
+ loginUrl: null,
76
+ error: null,
77
+ warning: null,
78
+ selfName: null,
79
+ tailnet: null,
80
+ addresses: [],
81
+ peers: [],
82
+ hasSession: !1
83
+ });
84
+ function l(e) {
85
+ try {
86
+ let t = new URL(e);
87
+ return t.protocol === "https:" || t.protocol === "http:" && (t.hostname === "localhost" || t.hostname === "127.0.0.1" || t.hostname === "[::1]");
88
+ } catch {
89
+ return !1;
90
+ }
91
+ }
92
+ function u() {
93
+ let e = /* @__PURE__ */ new Uint8Array(6);
94
+ return globalThis.crypto.getRandomValues(e), `bl-${Array.from(e, (e) => "abcdefghijklmnopqrstuvwxyz0123456789"[e % 36]).join("")}`;
95
+ }
96
+ function d(e) {
97
+ if (!e) return null;
98
+ let t = e.replace(/\.$/, "").split(".");
99
+ return t.length > 2 ? t.slice(1).join(".") : null;
100
+ }
101
+ function f(n = {}) {
102
+ let i = t(n.policy), a = n.auth ?? { mode: "interactive" }, s = n.persistence ?? r(), f = n.lockName === !1 ? null : `bl-tailscale:${n.lockName ?? "default"}`, p = /* @__PURE__ */ new Set(), m = c, h = null, g = null, _ = 0, v = "NoState", y = !1, b = null, x = null, S = null, C = null, w = null, T = null, E = null, D = null, O = 0, k = null, A = () => ({
103
+ open: n.env?.open === void 0 ? typeof window < "u" ? (e, t, n) => window.open(e, t, n) : null : n.env.open,
104
+ locks: n.env?.locks === void 0 ? typeof navigator < "u" && navigator.locks ? navigator.locks : null : n.env.locks
105
+ });
106
+ function j(e) {
107
+ let t = {
108
+ ...m,
109
+ ...e
110
+ };
111
+ Object.keys(e).every((e) => Object.is(t[e], m[e])) || (m = t, p.forEach((e) => e()));
112
+ }
113
+ function M(e) {
114
+ L(), V(), y = !1, j({
115
+ status: "error",
116
+ error: e,
117
+ loginUrl: null
118
+ });
119
+ }
120
+ function N() {
121
+ return S ||= s.load().then((e) => {
122
+ x = e, j({ hasSession: e !== null });
123
+ }, (e) => {
124
+ throw S = null, new o("storage", "Could not read the saved Tailscale session.", { cause: e });
125
+ }), S;
126
+ }
127
+ function P(e, t) {
128
+ w = e, !C && (C = setTimeout(() => void F(t), 250));
129
+ }
130
+ async function F(e) {
131
+ C && clearTimeout(C), C = null;
132
+ let t = w;
133
+ if (w = null, t) {
134
+ x = {
135
+ v: 1,
136
+ hostname: e,
137
+ state: t
138
+ };
139
+ try {
140
+ await s.save(x), j({
141
+ hasSession: !0,
142
+ warning: null
143
+ });
144
+ } catch {
145
+ j({ warning: "The Tailscale session couldn't be saved; you will be asked to sign in again next time." });
146
+ }
147
+ }
148
+ }
149
+ function I() {
150
+ if (n.popup === !1) return;
151
+ let e = A().open;
152
+ if (!(!e || b && !b.closed)) {
153
+ try {
154
+ b = e("", "bl-tailscale-login", "popup,width=520,height=720");
155
+ } catch {
156
+ b = null;
157
+ }
158
+ if (b) try {
159
+ let e = b.document;
160
+ e && (e.title = "Tailscale", e.body && (e.body.textContent = "Waiting for Tailscale…"));
161
+ } catch {}
162
+ }
163
+ }
164
+ function L() {
165
+ let e = b;
166
+ b = null;
167
+ try {
168
+ e && !e.closed && e.close();
169
+ } catch {}
170
+ }
171
+ function R(e) {
172
+ if (e === null) return j({ loginUrl: null });
173
+ if (!l(e)) return M(new o("login-url", `Refused to open the sign-in URL ${JSON.stringify(e.slice(0, 80))}.`));
174
+ j({ loginUrl: e });
175
+ let t = b;
176
+ if (t && !t.closed) try {
177
+ t.opener = null, t.location.replace(e);
178
+ return;
179
+ } catch {
180
+ b = null;
181
+ }
182
+ n.onLoginUrl?.(e);
183
+ }
184
+ function z() {
185
+ switch (v) {
186
+ case "Running": return "connected";
187
+ case "Starting": return y ? "signing-in" : "starting";
188
+ case "NeedsMachineAuth": return "needs-approval";
189
+ case "NeedsLogin":
190
+ case "Stopped":
191
+ case "NoState": return y ? "signing-in" : g || h ? "needs-login" : "idle";
192
+ default: return "error";
193
+ }
194
+ }
195
+ function B(e, t) {
196
+ if (e === _) {
197
+ if (t.error) {
198
+ W(!1), M(new o("client", t.error));
199
+ return;
200
+ }
201
+ if (t.netMap !== void 0) {
202
+ let e = t.netMap;
203
+ if (e?.lockedOut) {
204
+ M(new o("locked-out", "Tailnet lock: this device is not signed."));
205
+ return;
206
+ }
207
+ let n = e?.self.name.replace(/\.$/, "") || null;
208
+ j({
209
+ selfName: n,
210
+ tailnet: d(n),
211
+ addresses: e?.self.addresses ?? [],
212
+ peers: (e?.peers ?? []).map((e) => ({
213
+ name: e.name.replace(/\.$/, ""),
214
+ addresses: e.addresses,
215
+ online: e.online === !0
216
+ }))
217
+ });
218
+ }
219
+ if (t.loginUrl !== void 0 && R(t.loginUrl), t.state) {
220
+ if (v = t.state, v === "InUseOtherUser") return M(new o("in-use", "The session belongs to a different user."));
221
+ v === "Running" && (y = !1, V(), L(), j({ loginUrl: null }));
222
+ }
223
+ (m.status !== "error" || t.state === "Running") && j({
224
+ status: z(),
225
+ ...t.state === "Running" ? { error: null } : {}
226
+ });
227
+ }
228
+ }
229
+ function V() {
230
+ D && clearTimeout(D), D = null;
231
+ }
232
+ async function H() {
233
+ if (!f || T) return !0;
234
+ let e = A().locks;
235
+ return !e || new Promise((t) => {
236
+ e.request(f, { ifAvailable: !0 }, (e) => {
237
+ if (!e) {
238
+ t(!1);
239
+ return;
240
+ }
241
+ return t(!0), new Promise((e) => {
242
+ T = e;
243
+ });
244
+ }).catch(() => t(!0));
245
+ });
246
+ }
247
+ async function U(e) {
248
+ if (h) return h;
249
+ if (g) return g;
250
+ let t = ++_;
251
+ g = (async () => {
252
+ if (j({
253
+ status: "loading",
254
+ error: null
255
+ }), !await H()) throw new o("other-tab", "Tailscale is running in another tab.");
256
+ await N();
257
+ let r = n.client;
258
+ if (!r) throw new o("no-client", "No Tailscale client: pass `client` to createTailscale (for example createTailscaleConnectClient).");
259
+ let i;
260
+ try {
261
+ i = typeof r == "function" ? await r() : r;
262
+ } catch (e) {
263
+ throw new o("client", `The Tailscale client failed to load: ${e instanceof Error ? e.message : String(e)}`, { cause: e });
264
+ }
265
+ if (t !== _) throw i.dispose(), new o("client", "Stopped while starting.");
266
+ let a = x?.hostname ?? n.hostname ?? u();
267
+ v = "NoState";
268
+ try {
269
+ await i.start({
270
+ hostname: a,
271
+ controlUrl: n.controlUrl,
272
+ authKey: e,
273
+ state: x?.state ?? null,
274
+ onState: (e) => {
275
+ t === _ && P(e, a);
276
+ },
277
+ onEvent: (e) => B(t, e)
278
+ });
279
+ } catch (e) {
280
+ throw i.dispose(), new o("client", `The Tailscale client failed to start: ${e instanceof Error ? e.message : String(e)}`, { cause: e });
281
+ }
282
+ if (t !== _) throw i.dispose(), new o("client", "Stopped while starting.");
283
+ return h = i, j({ status: z() }), i;
284
+ })();
285
+ try {
286
+ return await g;
287
+ } catch (e) {
288
+ throw t === _ && (T?.(), T = null), e;
289
+ } finally {
290
+ t === _ && (g = null);
291
+ }
292
+ }
293
+ async function W(e) {
294
+ _++, V(), E?.abort(), E = null;
295
+ let t = h;
296
+ h = null, g = null, v = "NoState", y = !1, w && x && await F(x.hostname), e || (T?.(), T = null), t && await t.dispose();
297
+ }
298
+ let G = () => j({
299
+ status: "idle",
300
+ loginUrl: null,
301
+ selfName: null,
302
+ tailnet: null,
303
+ addresses: [],
304
+ peers: []
305
+ }), K = {
306
+ policy: i,
307
+ getSnapshot: () => m,
308
+ getServerSnapshot: () => c,
309
+ subscribe(e) {
310
+ return p.add(e), () => p.delete(e);
311
+ },
312
+ activate() {
313
+ O++, k && clearTimeout(k), k = null, N().then(() => {
314
+ O > 0 && x && n.autoConnect !== !1 && m.status === "idle" && K.connect();
315
+ }, (e) => j({ warning: e instanceof Error ? e.message : String(e) }));
316
+ let e = !1;
317
+ return () => {
318
+ e || (e = !0, O--, O === 0 && (k = setTimeout(() => {
319
+ k = null, O === 0 && K.dispose();
320
+ }, 0)));
321
+ };
322
+ },
323
+ async connect() {
324
+ if (!(h || g)) try {
325
+ if (await N(), !x) return;
326
+ await U();
327
+ } catch (e) {
328
+ M(e instanceof o ? e : new o("client", String(e)));
329
+ }
330
+ },
331
+ async signIn() {
332
+ if (m.status === "connected") return;
333
+ let e = a.mode === "interactive";
334
+ e && I(), y = !0, j({
335
+ status: "signing-in",
336
+ error: null,
337
+ loginUrl: null
338
+ });
339
+ try {
340
+ let t;
341
+ if (a.mode === "auth-key") {
342
+ h && await W(!0), E = new AbortController();
343
+ try {
344
+ t = typeof a.authKey == "function" ? await a.authKey(E.signal) : a.authKey;
345
+ } catch (e) {
346
+ throw new o("auth-key", `Could not get an auth key: ${e instanceof Error ? e.message : String(e)}`, { cause: e });
347
+ }
348
+ if (!t) throw new o("auth-key", "The auth key is empty.");
349
+ let e = _;
350
+ V(), D = setTimeout(() => {
351
+ e <= _ && m.status !== "connected" && y && (W(!1), M(new o("auth-key", "Signing in with the auth key did not finish in time.")));
352
+ }, n.authKeyTimeoutMs ?? 3e4);
353
+ }
354
+ y = !0;
355
+ let r = await U(t);
356
+ j({ status: z() }), e && v !== "Running" && await r.login();
357
+ } catch (e) {
358
+ if (!y && !(e instanceof o)) return;
359
+ M(e instanceof o ? e : new o("client", e instanceof Error ? e.message : String(e), { cause: e }));
360
+ }
361
+ },
362
+ cancel() {
363
+ (m.status === "signing-in" || m.status === "loading") && (y = !1, V(), E?.abort(), L(), j({
364
+ loginUrl: null,
365
+ status: h ? z() : "idle"
366
+ }));
367
+ },
368
+ async disconnect() {
369
+ L(), await W(!1), G(), j({ error: null });
370
+ },
371
+ async signOut() {
372
+ L();
373
+ let e = h;
374
+ try {
375
+ e && await e.logout();
376
+ } catch {}
377
+ w = null, await W(!1), x = null;
378
+ try {
379
+ await s.clear();
380
+ } catch {
381
+ j({ warning: "The saved session couldn't be deleted." });
382
+ }
383
+ G(), j({
384
+ hasSession: !1,
385
+ error: null
386
+ });
387
+ },
388
+ async fetch(e) {
389
+ if (!h || v !== "Running") throw new o("not-connected", "Not connected to Tailscale.");
390
+ return h.fetch(e);
391
+ },
392
+ matches(t, n = "GET") {
393
+ return e(t, n, i, typeof location < "u" ? location.origin : void 0).route;
394
+ },
395
+ async dispose() {
396
+ L(), await W(!1), G();
397
+ }
398
+ };
399
+ return K;
400
+ }
401
+ async function p(e, t) {
402
+ let n = new Request(e, t), r = [];
403
+ n.headers.forEach((e, t) => r.push([t, e]));
404
+ let i = n.method.toUpperCase(), a = i === "GET" || i === "HEAD" ? null : new Uint8Array(await n.arrayBuffer());
405
+ return {
406
+ url: n.url,
407
+ method: i,
408
+ headers: r,
409
+ body: a && a.byteLength ? a : null,
410
+ redirect: n.redirect,
411
+ signal: t?.signal ?? void 0
412
+ };
413
+ }
414
+ var m = /* @__PURE__ */ new Set([
415
+ 101,
416
+ 103,
417
+ 204,
418
+ 205,
419
+ 304
420
+ ]);
421
+ function h(e) {
422
+ let t = e.status >= 200 && e.status <= 599 ? e.status : 502, n = new Headers();
423
+ for (let [t, r] of e.headers) try {
424
+ n.append(t, r);
425
+ } catch {}
426
+ let r = m.has(t) ? null : e.body;
427
+ return new Response(r, {
428
+ status: t,
429
+ statusText: e.statusText ?? "",
430
+ headers: n
431
+ });
432
+ }
433
+ function g(e, t = (...e) => globalThis.fetch(...e)) {
434
+ return async (n, r) => {
435
+ let i = new Request(n, r);
436
+ return e.matches(i.url, i.method) ? e.getSnapshot().status === "connected" ? h(await e.fetch(await p(i))) : e.policy.whenUnavailable === "error" ? new Response("Tailscale is not connected.", {
437
+ status: 503,
438
+ headers: { "content-type": "text/plain" }
439
+ }) : t(n, r) : t(n, r);
440
+ };
441
+ }
442
+ //#endregion
443
+ export { o as TailscaleError, f as createTailscale, g as createTailscaleFetch, l as isSafeLoginUrl, r as memoryTailscalePersistence, s as tailscaleErrorMessage, h as toResponse, p as toTailscaleRequest, a as vaultTailscalePersistence, i as webStorageTailscalePersistence };
@@ -0,0 +1,34 @@
1
+ import { RefObject } from 'react';
2
+ import { AnimationPlaybackControls } from 'framer-motion';
3
+ /** The elements of a screen's header the morph reads. */
4
+ export interface TitleParts {
5
+ /** The screen's root; `data-scrolled` says its large title has gone under the bar. */
6
+ el?: HTMLElement | null;
7
+ large?: HTMLElement | null;
8
+ inline?: HTMLElement | null;
9
+ back?: HTMLElement | null;
10
+ }
11
+ interface Flight {
12
+ set: (t: number) => void;
13
+ done: () => void;
14
+ }
15
+ /** A flight in progress: `run` is its spring once released. */
16
+ export interface ActiveFlight {
17
+ f: Flight;
18
+ run?: AnimationPlaybackControls;
19
+ }
20
+ /** The title a screen is showing right now: its large title until it scrolls under the bar, else the inline one. */
21
+ export declare function shownTitle(r: TitleParts | undefined): HTMLElement | null;
22
+ /** A screen's back label, when it shows the previous title (not "Back", not nothing). */
23
+ export declare function backLabel(r: TitleParts | undefined): HTMLElement | null;
24
+ /** Owns the stack's one flight at a time: starting another (or unmounting) ends the one in progress, so a push or
25
+ * pop that lands mid-flight simply takes over. `cont` is the element the flight layer is drawn in. */
26
+ export declare function useTitleFlight(cont: RefObject<HTMLElement | null>): {
27
+ fly: (pick: () => [HTMLElement | null, HTMLElement | null, HTMLElement | null | undefined]) => void;
28
+ scrub: (from: HTMLElement | null, to: HTMLElement | null, toScreen: HTMLElement | null | undefined) => ActiveFlight | null;
29
+ release: (c: ActiveFlight | null | undefined, p: number, to: 0 | 1) => void;
30
+ end: () => void;
31
+ isCurrent: (c: ActiveFlight | null | undefined) => c is ActiveFlight;
32
+ };
33
+ export {};
34
+ //# sourceMappingURL=title-flight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"title-flight.d.ts","sourceRoot":"","sources":["../../src/lib/title-flight.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAW,KAAK,yBAAyB,EAAE,MAAM,eAAe,CAAC;AASxE,yDAAyD;AACzD,MAAM,WAAW,UAAU;IACzB,sFAAsF;IACtF,EAAE,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACxB,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC3B,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,IAAI,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;CAC3B;AAED,UAAU,MAAM;IAAG,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,IAAI,CAAA;CAAE;AAE/D,+DAA+D;AAC/D,MAAM,WAAW,YAAY;IAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,yBAAyB,CAAA;CAAE;AAM5E,oHAAoH;AACpH,wBAAgB,UAAU,CAAC,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,IAAI,CAKxE;AAED,yFAAyF;AACzF,wBAAgB,SAAS,CAAC,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,IAAI,CAEvE;AAmED;uGACuG;AACvG,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC;gBAa7C,MAAM,CAAC,WAAW,GAAG,IAAI,EAAE,WAAW,GAAG,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;kBAiB5E,WAAW,GAAG,IAAI,MAAM,WAAW,GAAG,IAAI,YAAY,WAAW,GAAG,IAAI,GAAG,SAAS;iBAQrF,YAAY,GAAG,IAAI,GAAG,SAAS,KAAK,MAAM,MAAM,CAAC,GAAG,CAAC;;mBA/BnD,YAAY,GAAG,IAAI,GAAG,SAAS,KAAG,CAAC,IAAI,YAAY;EAqC1E"}
@@ -0,0 +1,123 @@
1
+ "use client";
2
+ import { springs as e } from "./motion.js";
3
+ import { animate as t } from "framer-motion";
4
+ import { useEffect as n, useRef as r } from "react";
5
+ //#region src/lib/title-flight.ts
6
+ var i = (e, t, n) => e + (t - e) * n, a = (e) => Math.max(0, Math.min(1, e)), o = () => typeof matchMedia < "u" && matchMedia("(prefers-reduced-motion: reduce)").matches;
7
+ function s(e) {
8
+ return e ? e.large && !e.el?.hasAttribute("data-scrolled") ? e.large : e.inline && parseFloat(getComputedStyle(e.inline).opacity) > .5 ? e.inline : null : null;
9
+ }
10
+ function c(e) {
11
+ return e?.back && e.back.dataset.mode === "title" ? e.back : null;
12
+ }
13
+ function l(e) {
14
+ if (!e.dataset.mode) return null;
15
+ let t = e.previousElementSibling;
16
+ return t instanceof HTMLElement || t instanceof SVGElement ? t : null;
17
+ }
18
+ function u(e, t, n, r) {
19
+ let o = e.getBoundingClientRect(), s = t.getBoundingClientRect(), c = n.getBoundingClientRect();
20
+ if (!s.width || !c.width) return null;
21
+ let u = r ? r.getBoundingClientRect() : o, d = {
22
+ x: s.left - o.left,
23
+ y: s.top - o.top,
24
+ w: s.width,
25
+ h: s.height
26
+ }, f = {
27
+ x: c.left - u.left,
28
+ y: c.top - u.top,
29
+ w: c.width,
30
+ h: c.height
31
+ }, p = getComputedStyle(t), m = getComputedStyle(n), h = (parseFloat(m.fontSize) || 17) / (parseFloat(p.fontSize) || 17), g = document.createElement("div");
32
+ g.setAttribute("aria-hidden", "true"), g.dataset.slot = "navigation-title-flight", Object.assign(g.style, {
33
+ position: "absolute",
34
+ inset: "0",
35
+ pointerEvents: "none",
36
+ zIndex: "300",
37
+ overflow: "hidden"
38
+ });
39
+ let _ = (e, t, n) => {
40
+ let r = document.createElement("div");
41
+ return r.innerHTML = e.innerHTML, Object.assign(r.style, {
42
+ position: "absolute",
43
+ left: "0",
44
+ top: "0",
45
+ width: n.w + "px",
46
+ height: n.h + "px",
47
+ whiteSpace: "nowrap",
48
+ overflow: "hidden",
49
+ textOverflow: "ellipsis",
50
+ transformOrigin: "0 50%",
51
+ willChange: "transform, opacity",
52
+ color: t.color,
53
+ fontFamily: t.fontFamily,
54
+ fontSize: t.fontSize,
55
+ fontWeight: t.fontWeight,
56
+ letterSpacing: t.letterSpacing,
57
+ lineHeight: n.h + "px"
58
+ }), g.appendChild(r), r;
59
+ }, v = _(t, p, d), y = _(n, m, f);
60
+ e.appendChild(g), t.style.visibility = "hidden", n.style.visibility = "hidden";
61
+ let b = Math.abs(h - 1) < .05, x = l(n), S = null;
62
+ if (x) {
63
+ let e = x.getBoundingClientRect();
64
+ S = x.cloneNode(!0), Object.assign(S.style, {
65
+ position: "absolute",
66
+ left: e.left - u.left + "px",
67
+ top: e.top - u.top + "px",
68
+ margin: "0",
69
+ opacity: "0",
70
+ width: e.width + "px",
71
+ height: e.height + "px",
72
+ color: getComputedStyle(x).color
73
+ }), g.appendChild(S), x.style.visibility = "hidden";
74
+ }
75
+ return {
76
+ set(e) {
77
+ let t = i(d.x, f.x, e), n = i(d.y + d.h / 2, f.y + f.h / 2, e);
78
+ v.style.transform = `translate(${t}px, ${n - d.h / 2}px) scale(${i(1, h, e)})`, y.style.transform = `translate(${t}px, ${n - f.h / 2}px) scale(${i(1 / h, 1, e)})`, v.style.opacity = String(a(b ? (.85 - e) / .2 : 1 - e * 1.8)), y.style.opacity = String(a(b ? e / .6 : (e - .2) / .6)), S && (S.style.opacity = String(a((e - .3) / .5)));
79
+ },
80
+ done() {
81
+ t.style.visibility = "", n.style.visibility = "", x && (x.style.visibility = ""), g.remove();
82
+ }
83
+ };
84
+ }
85
+ function d(i) {
86
+ let a = r(null), s = () => {
87
+ let e = a.current;
88
+ a.current = null, e && (e.run?.stop(), e.f.done());
89
+ }, c = (e) => !!e && a.current === e, l = (e, n, r, i) => {
90
+ e.run = t(n, r, {
91
+ ...i,
92
+ onUpdate: e.f.set,
93
+ onComplete: () => {
94
+ a.current === e && s();
95
+ }
96
+ });
97
+ };
98
+ return n(() => s, []), {
99
+ fly: (t) => {
100
+ s(), !o() && requestAnimationFrame(() => {
101
+ let [n, r, o] = t();
102
+ if (!n || !r || !i.current) return;
103
+ let s = u(i.current, n, r, o);
104
+ if (!s) return;
105
+ s.set(0);
106
+ let c = { f: s };
107
+ a.current = c, l(c, 0, 1, e.smooth);
108
+ });
109
+ },
110
+ scrub: (e, t, n) => {
111
+ s();
112
+ let r = !o() && e && t && i.current ? u(i.current, e, t, n) : null;
113
+ return r ? (r.set(0), a.current = { f: r }, a.current) : null;
114
+ },
115
+ release: (t, n, r) => {
116
+ c(t) && l(t, n, r, e.tray);
117
+ },
118
+ end: s,
119
+ isCurrent: c
120
+ };
121
+ }
122
+ //#endregion
123
+ export { c as backLabel, s as shownTitle, d as useTitleFlight };
@@ -0,0 +1,49 @@
1
+ import { ReactNode } from 'react';
2
+ import { PasskeyError, CreatePasskeyOptions, CreatePasskeyResult, GetPrfSecretOptions, PasskeyCredentialRef, PasskeyEnv, PasskeySupport, PrfSecret } from './passkey';
3
+ import { Vault, VaultOptions, VaultState } from './vault';
4
+ export interface VaultProviderProps {
5
+ /** An existing vault (created with `createVault`). Takes precedence over `options`. */
6
+ vault?: Vault;
7
+ /** Options for a vault the provider creates once, on first render. Later changes are ignored; pass `key` to restart. */
8
+ options?: VaultOptions;
9
+ /** Restart the auto-lock timer on pointer and key activity anywhere on the page (default true; a no-op without `autoLockMs`). */
10
+ trackActivity?: boolean;
11
+ children?: ReactNode;
12
+ }
13
+ /** Provides a vault to the tree and runs its lifecycle: `init()` on mount, `dispose()` (which locks it) on unmount. */
14
+ export declare function VaultProvider({ vault, options, trackActivity, children }: VaultProviderProps): import("react/jsx-runtime").JSX.Element;
15
+ /** The vault's current snapshot; re-renders on every change. */
16
+ export declare function useVaultState(vault?: Vault): VaultState;
17
+ /** The vault, with the component subscribed to its status: `useVault().status`, `.enroll()`, `.put()`… Pass a vault to skip the provider. */
18
+ export declare function useVault(vault?: Vault): Vault;
19
+ /** A sentence for the person using the app, for anything the vault or a passkey throws. Never includes secrets. Replace it to localise. */
20
+ export declare function vaultErrorMessage(error: unknown): string;
21
+ /** What this browser can do for passkeys: `null` on the server and until the check finishes (it never prompts). */
22
+ export declare function useWebAuthnSupport(env?: PasskeyEnv): PasskeySupport | null;
23
+ export interface UsePasskey {
24
+ support: PasskeySupport | null;
25
+ status: 'idle' | 'pending' | 'success' | 'error';
26
+ /** The last failure; branch on `error.reason`. Cleared when a new request starts. */
27
+ error: PasskeyError | null;
28
+ /** Create a passkey and, if the authenticator evaluates it at creation, its PRF secret. Resolves `null` on failure (see `error`). */
29
+ create: (options: Omit<CreatePasskeyOptions, 'signal' | 'env'>) => Promise<CreatePasskeyResult | null>;
30
+ /** Ask for the PRF secret of one of `credentials`. Resolves `null` on failure (see `error`). */
31
+ getSecret: (credentials: ReadonlyArray<string | PasskeyCredentialRef>, salt: BufferSource, options?: Omit<GetPrfSecretOptions, 'signal' | 'env'>) => Promise<PrfSecret | null>;
32
+ /** Abort the request in flight (the prompt closes; `error.reason` becomes `cancelled`). */
33
+ cancel: () => void;
34
+ reset: () => void;
35
+ }
36
+ /** Passkey ceremonies as state: pending while the prompt is open, the typed error afterwards, aborted on unmount. Secrets
37
+ * come back through the promises and are never kept in state. For app data use `useVault`; this is for custom schemes. */
38
+ export declare function usePasskey(env?: PasskeyEnv): UsePasskey;
39
+ export interface EncryptedStateMeta {
40
+ /** `locked` (value is `initial`; nothing is in memory), `loading`, `ready` or `error`. */
41
+ status: 'locked' | 'loading' | 'ready' | 'error';
42
+ error: Error | null;
43
+ }
44
+ export type EncryptedStateSetter<T> = (next: T | ((prev: T) => T)) => Promise<boolean>;
45
+ /** `useState` that lives in the vault. While the vault is locked the value is `initial` and nothing is read or kept;
46
+ * on unlock it loads; `set` updates the screen at once and writes encrypted in the background (resolves `false` and sets
47
+ * `meta.error` if the write failed). Changes from other tabs arrive on their own. */
48
+ export declare function useEncryptedState<T>(name: string, initial: T | (() => T), vault?: Vault): [T, EncryptedStateSetter<T>, EncryptedStateMeta];
49
+ //# sourceMappingURL=vault-react.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vault-react.d.ts","sourceRoot":"","sources":["../../src/lib/vault-react.tsx"],"names":[],"mappings":"AACA,OAAO,EACsF,KAAK,SAAS,EAC1G,MAAM,OAAO,CAAC;AACf,OAAO,EACL,YAAY,EACZ,KAAK,oBAAoB,EAAE,KAAK,mBAAmB,EAAE,KAAK,mBAAmB,EAAE,KAAK,oBAAoB,EAAE,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAC/J,MAAM,eAAe,CAAC;AACvB,OAAO,EAA2B,KAAK,KAAK,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAatG,MAAM,WAAW,kBAAkB;IACjC,uFAAuF;IACvF,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,wHAAwH;IACxH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,iIAAiI;IACjI,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,uHAAuH;AACvH,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,aAAoB,EAAE,QAAQ,EAAE,EAAE,kBAAkB,2CA2BnG;AAUD,gEAAgE;AAChE,wBAAgB,aAAa,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,UAAU,CAGvD;AAED,6IAA6I;AAC7I,wBAAgB,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,KAAK,CAI7C;AAID,2IAA2I;AAC3I,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAyBxD;AAID,mHAAmH;AACnH,wBAAgB,kBAAkB,CAAC,GAAG,CAAC,EAAE,UAAU,GAAG,cAAc,GAAG,IAAI,CAS1E;AAID,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;IAC/B,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IACjD,qFAAqF;IACrF,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IAC3B,qIAAqI;IACrI,MAAM,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAAE,QAAQ,GAAG,KAAK,CAAC,KAAK,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;IACvG,gGAAgG;IAChG,SAAS,EAAE,CAAC,WAAW,EAAE,aAAa,CAAC,MAAM,GAAG,oBAAoB,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,EAAE,QAAQ,GAAG,KAAK,CAAC,KAAK,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IAC/K,2FAA2F;IAC3F,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED;2HAC2H;AAC3H,wBAAgB,UAAU,CAAC,GAAG,CAAC,EAAE,UAAU,GAAG,UAAU,CAkCvD;AAID,MAAM,WAAW,kBAAkB;IACjC,0FAA0F;IAC1F,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;IACjD,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAEvF;;sFAEsF;AACtF,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,EAAE,kBAAkB,CAAC,CAwE1I"}