@hintergrund/ui 0.2.1 → 0.2.3

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 (42) hide show
  1. package/dist/Builder-H8tY8V9I.js +14172 -0
  2. package/dist/admin.js +11160 -9739
  3. package/dist/{anthropic-UhrJpH25.js → anthropic-messages-C3hIUlsA.js} +1134 -1055
  4. package/dist/azure-openai-responses-t7u41KMr.js +222 -0
  5. package/dist/builder.js +2 -2
  6. package/dist/client-Cd7yMX39.js +7860 -0
  7. package/dist/deferred-tools-BZWMWBYN.js +28 -0
  8. package/dist/error-body-BUPcH4GF.js +71 -0
  9. package/dist/github-copilot-headers-B1RBGoZi.js +21 -0
  10. package/dist/{global-CFcrkAa3.js → global-Bk9T4Af5.js} +17896 -16508
  11. package/dist/google-generative-ai-6ZG79NDC.js +264 -0
  12. package/dist/{google-shared-BmdaIInh.js → google-shared-C6y4fA42.js} +1135 -1104
  13. package/dist/google-vertex-f2myaAmm.js +305 -0
  14. package/dist/headers-D4iLzGaS.js +21 -0
  15. package/dist/json-parse-LZdWp-Nd.js +232 -0
  16. package/dist/login.js +79 -75
  17. package/dist/mistral-conversations-D16H8Mgq.js +513 -0
  18. package/dist/openai-codex-responses-DIHPbnIS.js +947 -0
  19. package/dist/openai-completions-vDHGFsWV.js +741 -0
  20. package/dist/{headers-u7rXGJ9f.js → openai-prompt-cache-BJwqbEDx.js} +7 -6
  21. package/dist/openai-responses-B0rjAJxx.js +184 -0
  22. package/dist/openai-responses-shared-DqdzMfa_.js +477 -0
  23. package/dist/pi-messages-DB2BtH-g.js +251 -0
  24. package/dist/pi-user-agent-CUqx-qiX.js +13 -0
  25. package/dist/provider-env-D2VjEV3S.js +26 -0
  26. package/dist/provider-retry-BsigVlMg.js +67 -0
  27. package/dist/setup.js +275 -188
  28. package/dist/transform-messages-CsKsy6b4.js +398 -0
  29. package/package.json +4 -5
  30. package/dist/Builder-B0XYsyXe.js +0 -163449
  31. package/dist/azure-openai-responses-DAC03Qw1.js +0 -203
  32. package/dist/client-Sh7wNjbG.js +0 -5277
  33. package/dist/github-copilot-headers-DWh_6bE3.js +0 -35
  34. package/dist/google-CVz_TaG6.js +0 -248
  35. package/dist/google-vertex-C6GE41DE.js +0 -285
  36. package/dist/json-parse-DmJ6NiZE.js +0 -93
  37. package/dist/mistral-DqYbzWvv.js +0 -22932
  38. package/dist/openai-codex-responses-ZWuD9ryk.js +0 -700
  39. package/dist/openai-completions-B6B2OwYj.js +0 -535
  40. package/dist/openai-responses-D9Ip2Wgd.js +0 -142
  41. package/dist/openai-responses-shared-eUUJSL4D.js +0 -324
  42. package/dist/transform-messages-CkpQp6fJ.js +0 -132
package/dist/login.js CHANGED
@@ -1,106 +1,110 @@
1
- import { Y as I, Z as Q, _ as V, am as W, K as X, S as r, a1 as l, a2 as o, a7 as y, a5 as n, aa as ee, P as m, ab as g, ao as ae, N as a, ad as i, a8 as q, ag as E, af as M, a3 as te, ax as re, a0 as se, a4 as J, ay as oe, a9 as N } from "./global-CFcrkAa3.js";
2
- typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(p) {
3
- return Promise.resolve().then(p);
1
+ import { $ as W, a0 as X, a1 as Y, ap as ee, K as ae, S as s, a4 as i, a5 as l, aa as y, a6 as te, aA as re, a3 as se, a8 as u, N as t, ab as g, aB as oe, ac as z, ad as ie, U as c, ae as w, ar as le, ai as k, ag as n, a7 as A, aj as N, au as ne } from "./global-Bk9T4Af5.js";
2
+ typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(x) {
3
+ return Promise.resolve().then(x);
4
4
  } });
5
- var ie = g('<div class="flash flash-error"><svg class="octicon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M2.343 13.657A8 8 0 1 1 13.658 2.343 8 8 0 0 1 2.343 13.657ZM6.03 4.97a.751.751 0 0 0-1.042.018.751.751 0 0 0-.018 1.042L6.94 8 4.97 9.97a.749.749 0 0 0 .326 1.275.749.749 0 0 0 .734-.215L8 9.06l1.97 1.97a.749.749 0 0 0 1.275-.326.749.749 0 0 0-.215-.734L9.06 8l1.97-1.97a.749.749 0 0 0-.326-1.275.749.749 0 0 0-.734.215L8 6.94Z"></path></svg> </div>'), le = g('<div class="flash flash-success"><svg class="octicon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M8 16A8 8 0 1 1 8 0a8 8 0 0 1 0 16Zm3.78-9.72a.751.751 0 0 0-.018-1.042.751.751 0 0 0-1.042-.018L6.75 9.19 5.28 7.72a.751.751 0 0 0-1.042.018.751.751 0 0 0-.018 1.042l2 2a.75.75 0 0 0 1.06 0Z"></path></svg> </div>'), ne = g('<div class="form-group"><label for="password">Password</label> <input type="password" id="password" name="password" class="form-control form-control-lg" required="" placeholder="••••••••"/></div>'), de = g('<div class="Box"><div class="Box-body"><form autocomplete="off"><div class="form-group"><label for="email">Email</label> <input type="email" id="email" name="email" class="form-control form-control-lg" required="" placeholder="you@example.com"/></div> <!> <!></form></div></div>'), ve = g('<main class="auth-wrapper svelte-uxwqu2"><div class="auth-container svelte-uxwqu2"><div class="auth-header svelte-uxwqu2"><svg class="auth-logo svelte-uxwqu2" viewBox="0 0 90 90" width="48" height="48" fill="currentColor"><rect x="12" y="12" width="66" height="66" fill="currentColor"></rect></svg> <h1 class="svelte-uxwqu2">Sign in to Hintergrund</h1></div> <!> <!></div></main>');
6
- const ue = {
5
+ var de = w('<div class="flash flash-error"><svg class="octicon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M2.343 13.657A8 8 0 1 1 13.658 2.343 8 8 0 0 1 2.343 13.657ZM6.03 4.97a.751.751 0 0 0-1.042.018.751.751 0 0 0-.018 1.042L6.94 8 4.97 9.97a.749.749 0 0 0 .326 1.275.749.749 0 0 0 .734-.215L8 9.06l1.97 1.97a.749.749 0 0 0 1.275-.326.749.749 0 0 0-.215-.734L9.06 8l1.97-1.97a.749.749 0 0 0-.326-1.275.749.749 0 0 0-.734.215L8 6.94Z"></path></svg> </div>'), ue = w('<div class="flash flash-success"><svg class="octicon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M8 16A8 8 0 1 1 8 0a8 8 0 0 1 0 16Zm3.78-9.72a.751.751 0 0 0-.018-1.042.751.751 0 0 0-1.042-.018L6.75 9.19 5.28 7.72a.751.751 0 0 0-1.042.018.751.751 0 0 0-.018 1.042l2 2a.75.75 0 0 0 1.06 0Z"></path></svg> </div>'), ce = w('<div class="form-group"><label for="password">Password</label> <input type="password" id="password" name="password" class="form-control form-control-lg" required="" placeholder="••••••••"/></div>'), ve = w('<div class="form-group"><label for="otp">Email code</label> <input type="text" id="otp" name="otp" class="form-control form-control-lg" required="" inputmode="numeric" autocomplete="one-time-code" maxlength="6" placeholder="123456"/></div>'), fe = w('<main class="auth-wrapper svelte-uxwqu2"><div class="auth-container svelte-uxwqu2"><div class="auth-header svelte-uxwqu2"><svg class="auth-logo svelte-uxwqu2" viewBox="0 0 90 90" width="48" height="48" fill="currentColor"><rect x="12" y="12" width="66" height="66" fill="currentColor"></rect></svg> <h1 class="svelte-uxwqu2">Sign in to Hintergrund</h1></div> <!> <!> <div class="Box"><div class="Box-body"><form autocomplete="off"><div class="form-group"><label for="email">Email</label> <input type="email" id="email" name="email" class="form-control form-control-lg" required="" placeholder="you@example.com"/></div> <!> <!></form></div></div></div></main>');
6
+ const pe = {
7
7
  hash: "svelte-uxwqu2",
8
8
  code: ".auth-wrapper.svelte-uxwqu2 {min-height:100vh;display:flex;align-items:center;justify-content:center;background-color:var(--bgColor-muted);padding:var(--base-size-24);}.auth-container.svelte-uxwqu2 {width:100%;max-width:340px;}.auth-header.svelte-uxwqu2 {text-align:center;margin-bottom:var(--base-size-24);}.auth-logo.svelte-uxwqu2 {color:var(--fgColor-default);margin-bottom:var(--base-size-16);}.auth-header.svelte-uxwqu2 h1:where(.svelte-uxwqu2) {font-size:var(--text-title-size-medium);font-weight:var(--base-text-weight-light);color:var(--fgColor-default);margin:0;}"
9
9
  };
10
- function ce(p, B) {
11
- Q(B, !0), V(p, ue);
12
- let T = W(B, "config", 7), w = m(!1), P = m(""), x = m(""), u = m(""), _ = m(""), c = m(!1);
13
- X(() => {
10
+ function me(x, T) {
11
+ X(T, !0), Y(x, pe);
12
+ let j = ee(T, "config", 7), m = c(!1), f = c(!1), q = c(""), P = c(""), _ = c(""), p = c(""), b = c(""), v = c(!1);
13
+ ae(() => {
14
14
  const e = new URLSearchParams(window.location.search).get("error");
15
- e && (r(u, e, !0), window.history.replaceState({}, "", window.location.pathname));
15
+ e && (s(p, e, !0), window.history.replaceState({}, "", window.location.pathname));
16
16
  });
17
- async function O(t) {
18
- t.preventDefault(), r(u, ""), r(_, ""), r(c, !0);
17
+ async function O(a) {
18
+ a.preventDefault(), s(p, ""), s(b, ""), s(v, !0);
19
19
  try {
20
20
  const e = {};
21
- a(x) && (e.email = a(x)), a(w) && (e.password = a(P));
22
- const s = await (await fetch("/api/admin/login", {
21
+ t(_) && (e.email = t(_)), t(m) && (e.password = t(q)), t(f) && (e.otp = t(P));
22
+ const o = await (await fetch("/api/admin/login", {
23
23
  method: "POST",
24
24
  headers: { "Content-Type": "application/json" },
25
25
  body: JSON.stringify(e)
26
26
  })).json();
27
- s.success ? s.requirePassword ? r(w, !0) : s.emailSent ? r(_, s.message || "Check your email for the login link.", !0) : window.location.href = "/admin" : r(u, s.message ?? "An error occurred. Please try again.", !0);
27
+ o.success ? o.requirePassword ? s(m, !0) : o.otpRequired ? (s(f, !0), s(b, o.message || "Check your email for a six-digit sign-in code.", !0)) : window.location.href = "/admin" : (o.requirePassword && (s(m, !0), s(f, !1)), s(p, o.message ?? "An error occurred. Please try again.", !0));
28
28
  } catch {
29
- r(u, "An error occurred. Please try again.");
29
+ s(p, "An error occurred. Please try again.");
30
30
  } finally {
31
- r(c, !1);
31
+ s(v, !1);
32
32
  }
33
33
  }
34
- var U = {
34
+ var D = {
35
35
  get config() {
36
- return T();
36
+ return j();
37
37
  },
38
- set config(t) {
39
- T(t), ae();
38
+ set config(a) {
39
+ j(a), le();
40
40
  }
41
- }, C = ve(), Z = o(C), A = l(o(Z), 2);
41
+ }, C = fe(), E = l(C), Z = i(l(E), 2);
42
42
  {
43
- var $ = (t) => {
44
- var e = ie(), d = l(o(e));
45
- i(e), q(() => E(d, ` ${a(u) ?? ""}`)), n(t, e);
43
+ var H = (a) => {
44
+ var e = de(), r = i(l(e));
45
+ n(e), g(() => N(r, ` ${t(p) ?? ""}`)), u(a, e);
46
46
  };
47
- y(A, (t) => {
48
- a(u) && t($);
47
+ y(Z, (a) => {
48
+ t(p) && a(H);
49
49
  });
50
50
  }
51
- var D = l(A, 2);
51
+ var M = i(Z, 2);
52
52
  {
53
- var H = (t) => {
54
- var e = le(), d = l(o(e));
55
- i(e), q(() => E(d, ` ${a(_) ?? ""}`)), n(t, e);
56
- }, K = (t) => {
57
- var e = de(), d = o(e), s = o(d), S = o(s), L = l(o(S), 2);
58
- M(L), i(S);
59
- var j = l(S, 2);
53
+ var K = (a) => {
54
+ var e = ue(), r = i(l(e));
55
+ n(e), g(() => N(r, ` ${t(b) ?? ""}`)), u(a, e);
56
+ };
57
+ y(M, (a) => {
58
+ t(b) && a(K);
59
+ });
60
+ }
61
+ var R = i(M, 2), U = l(R), S = l(U), B = l(S), L = i(l(B), 2);
62
+ k(L), n(B);
63
+ var J = i(B, 2);
64
+ {
65
+ var $ = (a) => {
66
+ var e = ce(), r = i(l(e), 2);
67
+ k(r), n(e), g(() => r.disabled = t(v)), z(r, () => t(q), (o) => s(q, o)), u(a, e);
68
+ }, F = (a) => {
69
+ var e = ve(), r = i(l(e), 2);
70
+ k(r), ne(r, "pattern", "[0-9]6"), n(e), g(() => r.disabled = t(v)), z(r, () => t(P), (o) => s(P, o)), u(a, e);
71
+ };
72
+ y(J, (a) => {
73
+ t(m) ? a($) : t(f) && a(F, 1);
74
+ });
75
+ }
76
+ var G = i(J, 2);
77
+ return te(G, {
78
+ type: "submit",
79
+ variant: "primary",
80
+ size: "large",
81
+ block: !0,
82
+ get disabled() {
83
+ return t(v);
84
+ },
85
+ children: (a, e) => {
86
+ var r = re(), o = se(r);
60
87
  {
61
- var R = (v) => {
62
- var b = ne(), f = l(o(b), 2);
63
- M(f), i(b), q(() => f.disabled = a(c)), N(f, () => a(P), (k) => r(P, k)), n(v, b);
88
+ var I = (d) => {
89
+ var h = A("Please wait...");
90
+ u(d, h);
91
+ }, Q = (d) => {
92
+ var h = A("Sign in");
93
+ u(d, h);
94
+ }, V = (d) => {
95
+ var h = A("Continue");
96
+ u(d, h);
64
97
  };
65
- y(j, (v) => {
66
- a(w) && v(R);
98
+ y(o, (d) => {
99
+ t(v) ? d(I) : t(f) ? d(Q, 1) : d(V, -1);
67
100
  });
68
101
  }
69
- var Y = l(j, 2);
70
- te(Y, {
71
- type: "submit",
72
- variant: "primary",
73
- size: "large",
74
- block: !0,
75
- get disabled() {
76
- return a(c);
77
- },
78
- children: (v, b) => {
79
- var f = re(), k = se(f);
80
- {
81
- var F = (h) => {
82
- var z = J("Please wait...");
83
- n(h, z);
84
- }, G = (h) => {
85
- var z = J("Continue");
86
- n(h, z);
87
- };
88
- y(k, (h) => {
89
- a(c) ? h(F) : h(G, -1);
90
- });
91
- }
92
- n(v, f);
93
- },
94
- $$slots: { default: !0 }
95
- }), i(s), i(d), i(e), q(() => L.disabled = a(c) || a(w)), oe("submit", s, O), N(L, () => a(x), (v) => r(x, v)), n(t, e);
96
- };
97
- y(D, (t) => {
98
- a(_) ? t(H) : t(K, -1);
99
- });
100
- }
101
- return i(Z), i(C), n(p, C), ee(U);
102
+ u(a, r);
103
+ },
104
+ $$slots: { default: !0 }
105
+ }), n(S), n(U), n(R), n(E), n(C), g(() => L.disabled = t(v) || t(m) || t(f)), oe("submit", S, O), z(L, () => t(_), (a) => s(_, a)), u(x, C), ie(D);
102
106
  }
103
- customElements.define("hintergrund-login", I(ce, { config: {} }, [], []));
107
+ customElements.define("hintergrund-login", W(me, { config: {} }, [], []));
104
108
  export {
105
- ce as default
109
+ me as default
106
110
  };