@telia-ace/alliance-utilities 1.0.12-next.3 → 1.0.12-next.4
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/CHANGELOG.md +6 -0
- package/dist/get-current-user.d.ts +6 -0
- package/dist/get-current-workspace.d.ts +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +142 -138
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*! js-cookie v3.0.5 | MIT */
|
|
2
2
|
function F(e) {
|
|
3
|
-
for (var
|
|
4
|
-
var
|
|
5
|
-
for (var a in
|
|
6
|
-
e[a] =
|
|
3
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
4
|
+
var t = arguments[r];
|
|
5
|
+
for (var a in t)
|
|
6
|
+
e[a] = t[a];
|
|
7
7
|
}
|
|
8
8
|
return e;
|
|
9
9
|
}
|
|
@@ -18,10 +18,10 @@ var X = {
|
|
|
18
18
|
);
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
|
-
function P(e,
|
|
22
|
-
function
|
|
21
|
+
function P(e, r) {
|
|
22
|
+
function t(i, p, l) {
|
|
23
23
|
if (!(typeof document > "u")) {
|
|
24
|
-
l = F({},
|
|
24
|
+
l = F({}, r, l), typeof l.expires == "number" && (l.expires = new Date(Date.now() + l.expires * 864e5)), l.expires && (l.expires = l.expires.toUTCString()), i = encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
25
25
|
var d = "";
|
|
26
26
|
for (var c in l)
|
|
27
27
|
l[c] && (d += "; " + c, l[c] !== !0 && (d += "=" + l[c].split(";")[0]));
|
|
@@ -44,10 +44,10 @@ function P(e, t) {
|
|
|
44
44
|
}
|
|
45
45
|
return Object.create(
|
|
46
46
|
{
|
|
47
|
-
set:
|
|
47
|
+
set: t,
|
|
48
48
|
get: a,
|
|
49
49
|
remove: function(i, p) {
|
|
50
|
-
|
|
50
|
+
t(
|
|
51
51
|
i,
|
|
52
52
|
"",
|
|
53
53
|
F({}, p, {
|
|
@@ -63,14 +63,14 @@ function P(e, t) {
|
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
|
-
attributes: { value: Object.freeze(
|
|
66
|
+
attributes: { value: Object.freeze(r) },
|
|
67
67
|
converter: { value: Object.freeze(e) }
|
|
68
68
|
}
|
|
69
69
|
);
|
|
70
70
|
}
|
|
71
|
-
var
|
|
72
|
-
function
|
|
73
|
-
return Object.entries(
|
|
71
|
+
var Y = P(X, { path: "/" }), ee = Object.defineProperty, te = (e, r, t) => r in e ? ee(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, I = (e, r, t) => (te(e, typeof r != "symbol" ? r + "" : r, t), t), K = /* @__PURE__ */ ((e) => (e[e.AlreadyInitialized = 1e3] = "AlreadyInitialized", e[e.NoAppNameOrKey = 1001] = "NoAppNameOrKey", e[e.MissingAppController = 1002] = "MissingAppController", e[e.MissingCapabilityOnApp = 1003] = "MissingCapabilityOnApp", e[e.MissingManagedObjectProvider = 1004] = "MissingManagedObjectProvider", e[e.NoManifest = 1005] = "NoManifest", e[e.NoRootElement = 1006] = "NoRootElement", e[e.NoView = 1007] = "NoView", e[e.CookieKeyNotDefined = 1008] = "CookieKeyNotDefined", e[e.CookieCategoryNotAllowed = 1009] = "CookieCategoryNotAllowed", e[e.StorageKeyNotDefined = 1010] = "StorageKeyNotDefined", e[e.StorageCategoryNotAllowed = 1011] = "StorageCategoryNotAllowed", e[e.LocalizationTemplateNotDefined = 1012] = "LocalizationTemplateNotDefined", e))(K || {});
|
|
72
|
+
function re(e, r) {
|
|
73
|
+
return Object.entries(r).reduce((t, [a, i]) => t.replaceAll(`{{${a}}}`, i), e);
|
|
74
74
|
}
|
|
75
75
|
const oe = {
|
|
76
76
|
// framework
|
|
@@ -93,14 +93,14 @@ const oe = {
|
|
|
93
93
|
2002: "Could not access the required backend when querying 'currentUser'",
|
|
94
94
|
2003: "Could not locate the authenticated user in the Alliance database"
|
|
95
95
|
}, ne = "AllianceError";
|
|
96
|
-
|
|
97
|
-
constructor(
|
|
98
|
-
const a =
|
|
99
|
-
super(a), this.code =
|
|
96
|
+
let ie = class extends Error {
|
|
97
|
+
constructor(r, t = {}) {
|
|
98
|
+
const a = re(oe[r], t), i = `https://github.com/telia-company/ace-alliance-sdk/wiki/error-codes#${r}`;
|
|
99
|
+
super(a), this.code = r, this.name = ne, this.stack = `[${r}] - ${a}
|
|
100
100
|
` + i;
|
|
101
101
|
}
|
|
102
|
-
}
|
|
103
|
-
var
|
|
102
|
+
};
|
|
103
|
+
var _ = /* @__PURE__ */ ((e) => (e[e.AlreadyExists = 0] = "AlreadyExists", e[e.ApiGatewayPortDescription = 1] = "ApiGatewayPortDescription", e[e.ApiServerModeDescription = 2] = "ApiServerModeDescription", e[e.AppConfigurationPath = 3] = "AppConfigurationPath", e[e.AppCreated = 4] = "AppCreated", e[e.AppEntryBuildOptionDescription = 5] = "AppEntryBuildOptionDescription", e[e.AppNameInquiry = 6] = "AppNameInquiry", e[e.BuildDescription = 7] = "BuildDescription", e[e.BuildModeOptionDescription = 8] = "BuildModeOptionDescription", e[e.BuildWatchDescription = 9] = "BuildWatchDescription", e[e.CreateAppDescription = 10] = "CreateAppDescription", e[e.CreateWorkspaceDescription = 11] = "CreateWorkspaceDescription", e[e.DevServerOpenDescription = 12] = "DevServerOpenDescription", e[e.DevServerPortDescription = 13] = "DevServerPortDescription", e[e.DevServerLoggingDescription = 14] = "DevServerLoggingDescription", e[e.Done = 15] = "Done", e[e.FetchPackageVersionError = 16] = "FetchPackageVersionError", e[e.ManifestEntryBuildOptionDescription = 17] = "ManifestEntryBuildOptionDescription", e[e.MissingTranslationKey = 18] = "MissingTranslationKey", e[e.NoAppName = 19] = "NoAppName", e[e.NoAppNameFound = 20] = "NoAppNameFound", e[e.NoAppOrWorkspaceInCurrentDirectory = 21] = "NoAppOrWorkspaceInCurrentDirectory", e[e.NoWorkspaceName = 22] = "NoWorkspaceName", e[e.OperationCancelled = 23] = "OperationCancelled", e[e.ServeDescription = 24] = "ServeDescription", e[e.ServedStopped = 25] = "ServedStopped", e[e.ServerGatewayMode = 26] = "ServerGatewayMode", e[e.ServerMode = 27] = "ServerMode", e[e.ServerModeInquiry = 28] = "ServerModeInquiry", e[e.ServerProxyMode = 29] = "ServerProxyMode", e[e.StopServerInstructions = 30] = "StopServerInstructions", e[e.TemplateFrameworkInquiry = 31] = "TemplateFrameworkInquiry", e[e.TemplateLanguageInquiry = 32] = "TemplateLanguageInquiry", e[e.UnrecognizedCommand = 33] = "UnrecognizedCommand", e[e.WorkspaceCreated = 34] = "WorkspaceCreated", e[e.WorkspaceNameInquiry = 35] = "WorkspaceNameInquiry", e))(_ || {});
|
|
104
104
|
const ae = {
|
|
105
105
|
15: "Done",
|
|
106
106
|
22: "No workspace name provided!",
|
|
@@ -141,24 +141,24 @@ const ae = {
|
|
|
141
141
|
26: "Server with gateway"
|
|
142
142
|
}, v = class {
|
|
143
143
|
};
|
|
144
|
-
I(v, "getTranslations", () => ae), I(v, "getTranslation", (e, ...
|
|
145
|
-
const
|
|
146
|
-
if (!
|
|
144
|
+
I(v, "getTranslations", () => ae), I(v, "getTranslation", (e, ...r) => {
|
|
145
|
+
const t = v.getTranslations()[e];
|
|
146
|
+
if (!t)
|
|
147
147
|
throw new Error(`Could not find text with given key '${e}'.`);
|
|
148
|
-
return
|
|
148
|
+
return r.reduce(
|
|
149
149
|
(a, i, p) => a.toString().replace(`{${p}}`, i.toString()),
|
|
150
|
-
|
|
150
|
+
t
|
|
151
151
|
).toString();
|
|
152
|
-
}), I(v, "get", (e =
|
|
152
|
+
}), I(v, "get", (e = _.MissingTranslationKey, ...r) => v.getTranslation(e, ...r));
|
|
153
153
|
function se(e) {
|
|
154
154
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
155
155
|
}
|
|
156
|
-
var x = { exports: {} }, O,
|
|
156
|
+
var x = { exports: {} }, O, q;
|
|
157
157
|
function ce() {
|
|
158
|
-
if (
|
|
158
|
+
if (q)
|
|
159
159
|
return O;
|
|
160
|
-
|
|
161
|
-
var e = 1e3,
|
|
160
|
+
q = 1;
|
|
161
|
+
var e = 1e3, r = e * 60, t = r * 60, a = t * 24, i = a * 7, p = a * 365.25;
|
|
162
162
|
O = function(o, n) {
|
|
163
163
|
n = n || {};
|
|
164
164
|
var s = typeof o;
|
|
@@ -197,13 +197,13 @@ function ce() {
|
|
|
197
197
|
case "hrs":
|
|
198
198
|
case "hr":
|
|
199
199
|
case "h":
|
|
200
|
-
return s *
|
|
200
|
+
return s * t;
|
|
201
201
|
case "minutes":
|
|
202
202
|
case "minute":
|
|
203
203
|
case "mins":
|
|
204
204
|
case "min":
|
|
205
205
|
case "m":
|
|
206
|
-
return s *
|
|
206
|
+
return s * r;
|
|
207
207
|
case "seconds":
|
|
208
208
|
case "second":
|
|
209
209
|
case "secs":
|
|
@@ -224,11 +224,11 @@ function ce() {
|
|
|
224
224
|
}
|
|
225
225
|
function d(o) {
|
|
226
226
|
var n = Math.abs(o);
|
|
227
|
-
return n >= a ? Math.round(o / a) + "d" : n >=
|
|
227
|
+
return n >= a ? Math.round(o / a) + "d" : n >= t ? Math.round(o / t) + "h" : n >= r ? Math.round(o / r) + "m" : n >= e ? Math.round(o / e) + "s" : o + "ms";
|
|
228
228
|
}
|
|
229
229
|
function c(o) {
|
|
230
230
|
var n = Math.abs(o);
|
|
231
|
-
return n >= a ? u(o, n, a, "day") : n >=
|
|
231
|
+
return n >= a ? u(o, n, a, "day") : n >= t ? u(o, n, t, "hour") : n >= r ? u(o, n, r, "minute") : n >= e ? u(o, n, e, "second") : o + " ms";
|
|
232
232
|
}
|
|
233
233
|
function u(o, n, s, f) {
|
|
234
234
|
var k = n >= s * 1.5;
|
|
@@ -237,72 +237,72 @@ function ce() {
|
|
|
237
237
|
return O;
|
|
238
238
|
}
|
|
239
239
|
function pe(e) {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}),
|
|
243
|
-
function
|
|
240
|
+
t.debug = t, t.default = t, t.coerce = c, t.disable = p, t.enable = i, t.enabled = l, t.humanize = ce(), t.destroy = u, Object.keys(e).forEach((o) => {
|
|
241
|
+
t[o] = e[o];
|
|
242
|
+
}), t.names = [], t.skips = [], t.formatters = {};
|
|
243
|
+
function r(o) {
|
|
244
244
|
let n = 0;
|
|
245
245
|
for (let s = 0; s < o.length; s++)
|
|
246
246
|
n = (n << 5) - n + o.charCodeAt(s), n |= 0;
|
|
247
|
-
return
|
|
247
|
+
return t.colors[Math.abs(n) % t.colors.length];
|
|
248
248
|
}
|
|
249
|
-
|
|
250
|
-
function
|
|
249
|
+
t.selectColor = r;
|
|
250
|
+
function t(o) {
|
|
251
251
|
let n, s = null, f, k;
|
|
252
252
|
function h(...g) {
|
|
253
253
|
if (!h.enabled)
|
|
254
254
|
return;
|
|
255
255
|
const C = h, D = Number(/* @__PURE__ */ new Date()), J = D - (n || D);
|
|
256
|
-
C.diff = J, C.prev = n, C.curr = D, n = D, g[0] =
|
|
256
|
+
C.diff = J, C.prev = n, C.curr = D, n = D, g[0] = t.coerce(g[0]), typeof g[0] != "string" && g.unshift("%O");
|
|
257
257
|
let S = 0;
|
|
258
|
-
g[0] = g[0].replace(/%([a-zA-Z%])/g, (M,
|
|
258
|
+
g[0] = g[0].replace(/%([a-zA-Z%])/g, (M, Z) => {
|
|
259
259
|
if (M === "%%")
|
|
260
260
|
return "%";
|
|
261
261
|
S++;
|
|
262
|
-
const
|
|
263
|
-
if (typeof
|
|
264
|
-
const
|
|
265
|
-
M =
|
|
262
|
+
const L = t.formatters[Z];
|
|
263
|
+
if (typeof L == "function") {
|
|
264
|
+
const H = g[S];
|
|
265
|
+
M = L.call(C, H), g.splice(S, 1), S--;
|
|
266
266
|
}
|
|
267
267
|
return M;
|
|
268
|
-
}),
|
|
268
|
+
}), t.formatArgs.call(C, g), (C.log || t.log).apply(C, g);
|
|
269
269
|
}
|
|
270
|
-
return h.namespace = o, h.useColors =
|
|
270
|
+
return h.namespace = o, h.useColors = t.useColors(), h.color = t.selectColor(o), h.extend = a, h.destroy = t.destroy, Object.defineProperty(h, "enabled", {
|
|
271
271
|
enumerable: !0,
|
|
272
272
|
configurable: !1,
|
|
273
|
-
get: () => s !== null ? s : (f !==
|
|
273
|
+
get: () => s !== null ? s : (f !== t.namespaces && (f = t.namespaces, k = t.enabled(o)), k),
|
|
274
274
|
set: (g) => {
|
|
275
275
|
s = g;
|
|
276
276
|
}
|
|
277
|
-
}), typeof
|
|
277
|
+
}), typeof t.init == "function" && t.init(h), h;
|
|
278
278
|
}
|
|
279
279
|
function a(o, n) {
|
|
280
|
-
const s =
|
|
280
|
+
const s = t(this.namespace + (typeof n > "u" ? ":" : n) + o);
|
|
281
281
|
return s.log = this.log, s;
|
|
282
282
|
}
|
|
283
283
|
function i(o) {
|
|
284
|
-
|
|
284
|
+
t.save(o), t.namespaces = o, t.names = [], t.skips = [];
|
|
285
285
|
let n;
|
|
286
286
|
const s = (typeof o == "string" ? o : "").split(/[\s,]+/), f = s.length;
|
|
287
287
|
for (n = 0; n < f; n++)
|
|
288
|
-
s[n] && (o = s[n].replace(/\*/g, ".*?"), o[0] === "-" ?
|
|
288
|
+
s[n] && (o = s[n].replace(/\*/g, ".*?"), o[0] === "-" ? t.skips.push(new RegExp("^" + o.slice(1) + "$")) : t.names.push(new RegExp("^" + o + "$")));
|
|
289
289
|
}
|
|
290
290
|
function p() {
|
|
291
291
|
const o = [
|
|
292
|
-
...
|
|
293
|
-
...
|
|
292
|
+
...t.names.map(d),
|
|
293
|
+
...t.skips.map(d).map((n) => "-" + n)
|
|
294
294
|
].join(",");
|
|
295
|
-
return
|
|
295
|
+
return t.enable(""), o;
|
|
296
296
|
}
|
|
297
297
|
function l(o) {
|
|
298
298
|
if (o[o.length - 1] === "*")
|
|
299
299
|
return !0;
|
|
300
300
|
let n, s;
|
|
301
|
-
for (n = 0, s =
|
|
302
|
-
if (
|
|
301
|
+
for (n = 0, s = t.skips.length; n < s; n++)
|
|
302
|
+
if (t.skips[n].test(o))
|
|
303
303
|
return !1;
|
|
304
|
-
for (n = 0, s =
|
|
305
|
-
if (
|
|
304
|
+
for (n = 0, s = t.names.length; n < s; n++)
|
|
305
|
+
if (t.names[n].test(o))
|
|
306
306
|
return !0;
|
|
307
307
|
return !1;
|
|
308
308
|
}
|
|
@@ -315,16 +315,16 @@ function pe(e) {
|
|
|
315
315
|
function u() {
|
|
316
316
|
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
317
317
|
}
|
|
318
|
-
return
|
|
318
|
+
return t.enable(t.load()), t;
|
|
319
319
|
}
|
|
320
320
|
var le = pe;
|
|
321
|
-
(function(e,
|
|
322
|
-
|
|
321
|
+
(function(e, r) {
|
|
322
|
+
r.formatArgs = a, r.save = i, r.load = p, r.useColors = t, r.storage = l(), r.destroy = (() => {
|
|
323
323
|
let c = !1;
|
|
324
324
|
return () => {
|
|
325
325
|
c || (c = !0, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
|
|
326
326
|
};
|
|
327
|
-
})(),
|
|
327
|
+
})(), r.colors = [
|
|
328
328
|
"#0000CC",
|
|
329
329
|
"#0000FF",
|
|
330
330
|
"#0033CC",
|
|
@@ -402,7 +402,7 @@ var le = pe;
|
|
|
402
402
|
"#FFCC00",
|
|
403
403
|
"#FFCC33"
|
|
404
404
|
];
|
|
405
|
-
function
|
|
405
|
+
function t() {
|
|
406
406
|
return typeof window < "u" && window.process && (window.process.type === "renderer" || window.process.__nwjs) ? !0 : typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/) ? !1 : typeof document < "u" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
407
407
|
typeof window < "u" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
408
408
|
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
@@ -419,18 +419,18 @@ var le = pe;
|
|
|
419
419
|
s !== "%%" && (o++, s === "%c" && (n = o));
|
|
420
420
|
}), c.splice(n, 0, u);
|
|
421
421
|
}
|
|
422
|
-
|
|
422
|
+
r.log = console.debug || console.log || (() => {
|
|
423
423
|
});
|
|
424
424
|
function i(c) {
|
|
425
425
|
try {
|
|
426
|
-
c ?
|
|
426
|
+
c ? r.storage.setItem("debug", c) : r.storage.removeItem("debug");
|
|
427
427
|
} catch {
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
430
|
function p() {
|
|
431
431
|
let c;
|
|
432
432
|
try {
|
|
433
|
-
c =
|
|
433
|
+
c = r.storage.getItem("debug");
|
|
434
434
|
} catch {
|
|
435
435
|
}
|
|
436
436
|
return !c && typeof process < "u" && "env" in process && (c = process.env.DEBUG), c;
|
|
@@ -441,7 +441,7 @@ var le = pe;
|
|
|
441
441
|
} catch {
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
|
-
e.exports = le(
|
|
444
|
+
e.exports = le(r);
|
|
445
445
|
const { formatters: d } = e.exports;
|
|
446
446
|
d.j = function(c) {
|
|
447
447
|
try {
|
|
@@ -470,21 +470,21 @@ function he() {
|
|
|
470
470
|
return e;
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
|
-
function
|
|
474
|
-
if (
|
|
473
|
+
function G() {
|
|
474
|
+
if (B())
|
|
475
475
|
return Promise.resolve();
|
|
476
|
-
const e = 2e4,
|
|
477
|
-
return new Promise((
|
|
476
|
+
const e = 2e4, r = 5;
|
|
477
|
+
return new Promise((t, a) => {
|
|
478
478
|
const i = () => {
|
|
479
479
|
clearInterval(l), clearTimeout(p);
|
|
480
480
|
}, p = setTimeout(() => {
|
|
481
481
|
i(), a(new Error(`Runtime not initialized after ${e}ms`));
|
|
482
482
|
}, e), l = setInterval(() => {
|
|
483
|
-
|
|
484
|
-
},
|
|
483
|
+
B() && (i(), t());
|
|
484
|
+
}, r);
|
|
485
485
|
});
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function B() {
|
|
488
488
|
return N(
|
|
489
489
|
"RUNTIME_INITIALIZED"
|
|
490
490
|
/* RuntimeInitialized */
|
|
@@ -496,7 +496,7 @@ function N(e = "") {
|
|
|
496
496
|
function fe(e) {
|
|
497
497
|
return `__ALLIANCE_${e}`;
|
|
498
498
|
}
|
|
499
|
-
function
|
|
499
|
+
function ye(e) {
|
|
500
500
|
return `APP_CONTROLLER_KEY_${e}`;
|
|
501
501
|
}
|
|
502
502
|
var W = /* @__PURE__ */ ((e) => (e.RuntimeInitialized = "RUNTIME_INITIALIZED", e.RuntimeApps = "RUNTIME_APPS", e.RuntimeManifests = "RUNTIME_MANIFESTS", e))(W || {});
|
|
@@ -510,31 +510,31 @@ function Ce(e) {
|
|
|
510
510
|
system: "#D52C2E"
|
|
511
511
|
}[e];
|
|
512
512
|
}
|
|
513
|
-
const
|
|
514
|
-
function
|
|
515
|
-
let
|
|
516
|
-
return
|
|
513
|
+
const $ = /* @__PURE__ */ new Map();
|
|
514
|
+
function m(e) {
|
|
515
|
+
let r = $.get(e);
|
|
516
|
+
return r || (r = ue(e === "system" ? "[system]" : `[${ge()}] ${e}`), r.color = Ce(e), r.enabled = me(), $.set(e, r), r);
|
|
517
517
|
}
|
|
518
|
-
function
|
|
519
|
-
const e = he(),
|
|
520
|
-
return e.environment === "development" && !!e.logging ||
|
|
518
|
+
function me() {
|
|
519
|
+
const e = he(), r = Y.get("logging");
|
|
520
|
+
return e.environment === "development" && !!e.logging || r === "true";
|
|
521
521
|
}
|
|
522
|
-
|
|
522
|
+
m("controller");
|
|
523
523
|
async function ve(e) {
|
|
524
|
-
await
|
|
525
|
-
const
|
|
526
|
-
if (!
|
|
524
|
+
await G();
|
|
525
|
+
const r = ye(e), t = N(r);
|
|
526
|
+
if (!t)
|
|
527
527
|
return;
|
|
528
|
-
const a = N(
|
|
528
|
+
const a = N(t);
|
|
529
529
|
if (a)
|
|
530
530
|
return a;
|
|
531
531
|
}
|
|
532
532
|
async function we() {
|
|
533
|
-
return await
|
|
533
|
+
return await G(), (await Promise.all(
|
|
534
534
|
N(W.RuntimeApps).map((e) => ve(e))
|
|
535
535
|
)).filter((e) => !!e);
|
|
536
536
|
}
|
|
537
|
-
|
|
537
|
+
m("views");
|
|
538
538
|
function be() {
|
|
539
539
|
return structuredClone(N(W.RuntimeManifests));
|
|
540
540
|
}
|
|
@@ -544,31 +544,31 @@ function Ae() {
|
|
|
544
544
|
} catch {
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
const E =
|
|
550
|
-
function
|
|
551
|
-
return E("querying objects - object: %o, args: %O", e,
|
|
547
|
+
m("system");
|
|
548
|
+
m("capabilities");
|
|
549
|
+
const E = m("managed-objects");
|
|
550
|
+
function z(e, r) {
|
|
551
|
+
return E("querying objects - object: %o, args: %O", e, r), {
|
|
552
552
|
async resolve() {
|
|
553
|
-
return E("resolving query - object: %o, args: %O", e,
|
|
553
|
+
return E("resolving query - object: %o, args: %O", e, r), await (await R(e)).managedObjects.providers.get(e)(r);
|
|
554
554
|
},
|
|
555
|
-
async watch(
|
|
556
|
-
E("adding watcher - object: %o, args: %O", e,
|
|
555
|
+
async watch(t) {
|
|
556
|
+
E("adding watcher - object: %o, args: %O", e, r), (await R(e)).managedObjects.watchers.get(e).push(t);
|
|
557
557
|
}
|
|
558
558
|
};
|
|
559
559
|
}
|
|
560
|
-
async function
|
|
561
|
-
const
|
|
562
|
-
(
|
|
560
|
+
async function R(e) {
|
|
561
|
+
const r = (await we()).find(
|
|
562
|
+
(t) => t.managedObjects.providers.has(e) && t.managedObjects.watchers.has(e)
|
|
563
563
|
);
|
|
564
|
-
if (!
|
|
565
|
-
throw new ie(
|
|
566
|
-
return
|
|
564
|
+
if (!r)
|
|
565
|
+
throw new ie(K.MissingManagedObjectProvider, { object: e });
|
|
566
|
+
return r;
|
|
567
567
|
}
|
|
568
|
-
|
|
569
|
-
var Ne = Object.defineProperty, ke = (e,
|
|
570
|
-
function De(e,
|
|
571
|
-
return Object.entries(
|
|
568
|
+
m("proxy");
|
|
569
|
+
var Ne = Object.defineProperty, ke = (e, r, t) => r in e ? Ne(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, T = (e, r, t) => (ke(e, typeof r != "symbol" ? r + "" : r, t), t), U = /* @__PURE__ */ ((e) => (e[e.AlreadyInitialized = 1e3] = "AlreadyInitialized", e[e.NoAppNameOrKey = 1001] = "NoAppNameOrKey", e[e.MissingAppController = 1002] = "MissingAppController", e[e.MissingCapabilityOnApp = 1003] = "MissingCapabilityOnApp", e[e.MissingManagedObjectProvider = 1004] = "MissingManagedObjectProvider", e[e.NoManifest = 1005] = "NoManifest", e[e.NoRootElement = 1006] = "NoRootElement", e[e.NoView = 1007] = "NoView", e[e.CookieKeyNotDefined = 1008] = "CookieKeyNotDefined", e[e.CookieCategoryNotAllowed = 1009] = "CookieCategoryNotAllowed", e[e.StorageKeyNotDefined = 1010] = "StorageKeyNotDefined", e[e.StorageCategoryNotAllowed = 1011] = "StorageCategoryNotAllowed", e[e.LocalizationTemplateNotDefined = 1012] = "LocalizationTemplateNotDefined", e))(U || {}), b = /* @__PURE__ */ ((e) => (e[e.CurrentUserMissingProvider = 2e3] = "CurrentUserMissingProvider", e[e.CurrentUserGatewayNotStarted = 2001] = "CurrentUserGatewayNotStarted", e[e.CurrentUserMissingBackend = 2002] = "CurrentUserMissingBackend", e[e.CurrentUserMissingInDatabase = 2003] = "CurrentUserMissingInDatabase", e))(b || {});
|
|
570
|
+
function De(e, r) {
|
|
571
|
+
return Object.entries(r).reduce((t, [a, i]) => t.replaceAll(`{{${a}}}`, i), e);
|
|
572
572
|
}
|
|
573
573
|
const Se = {
|
|
574
574
|
// framework
|
|
@@ -592,16 +592,16 @@ const Se = {
|
|
|
592
592
|
2003: "Could not locate the authenticated user in the Alliance database"
|
|
593
593
|
}, V = "AllianceError";
|
|
594
594
|
class A extends Error {
|
|
595
|
-
constructor(
|
|
596
|
-
const a = De(Se[
|
|
597
|
-
super(a), this.code =
|
|
595
|
+
constructor(r, t = {}) {
|
|
596
|
+
const a = De(Se[r], t), i = `https://github.com/telia-company/ace-alliance-sdk/wiki/error-codes#${r}`;
|
|
597
|
+
super(a), this.code = r, this.name = V, this.stack = `[${r}] - ${a}
|
|
598
598
|
` + i;
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
601
|
function Fe(e) {
|
|
602
602
|
return !!e.code && e.name === V;
|
|
603
603
|
}
|
|
604
|
-
var
|
|
604
|
+
var Q = /* @__PURE__ */ ((e) => (e[e.AlreadyExists = 0] = "AlreadyExists", e[e.ApiGatewayPortDescription = 1] = "ApiGatewayPortDescription", e[e.ApiServerModeDescription = 2] = "ApiServerModeDescription", e[e.AppConfigurationPath = 3] = "AppConfigurationPath", e[e.AppCreated = 4] = "AppCreated", e[e.AppEntryBuildOptionDescription = 5] = "AppEntryBuildOptionDescription", e[e.AppNameInquiry = 6] = "AppNameInquiry", e[e.BuildDescription = 7] = "BuildDescription", e[e.BuildModeOptionDescription = 8] = "BuildModeOptionDescription", e[e.BuildWatchDescription = 9] = "BuildWatchDescription", e[e.CreateAppDescription = 10] = "CreateAppDescription", e[e.CreateWorkspaceDescription = 11] = "CreateWorkspaceDescription", e[e.DevServerOpenDescription = 12] = "DevServerOpenDescription", e[e.DevServerPortDescription = 13] = "DevServerPortDescription", e[e.DevServerLoggingDescription = 14] = "DevServerLoggingDescription", e[e.Done = 15] = "Done", e[e.FetchPackageVersionError = 16] = "FetchPackageVersionError", e[e.ManifestEntryBuildOptionDescription = 17] = "ManifestEntryBuildOptionDescription", e[e.MissingTranslationKey = 18] = "MissingTranslationKey", e[e.NoAppName = 19] = "NoAppName", e[e.NoAppNameFound = 20] = "NoAppNameFound", e[e.NoAppOrWorkspaceInCurrentDirectory = 21] = "NoAppOrWorkspaceInCurrentDirectory", e[e.NoWorkspaceName = 22] = "NoWorkspaceName", e[e.OperationCancelled = 23] = "OperationCancelled", e[e.ServeDescription = 24] = "ServeDescription", e[e.ServedStopped = 25] = "ServedStopped", e[e.ServerGatewayMode = 26] = "ServerGatewayMode", e[e.ServerMode = 27] = "ServerMode", e[e.ServerModeInquiry = 28] = "ServerModeInquiry", e[e.ServerProxyMode = 29] = "ServerProxyMode", e[e.StopServerInstructions = 30] = "StopServerInstructions", e[e.TemplateFrameworkInquiry = 31] = "TemplateFrameworkInquiry", e[e.TemplateLanguageInquiry = 32] = "TemplateLanguageInquiry", e[e.UnrecognizedCommand = 33] = "UnrecognizedCommand", e[e.WorkspaceCreated = 34] = "WorkspaceCreated", e[e.WorkspaceNameInquiry = 35] = "WorkspaceNameInquiry", e))(Q || {});
|
|
605
605
|
const Me = {
|
|
606
606
|
15: "Done",
|
|
607
607
|
22: "No workspace name provided!",
|
|
@@ -642,56 +642,60 @@ const Me = {
|
|
|
642
642
|
26: "Server with gateway"
|
|
643
643
|
}, w = class {
|
|
644
644
|
};
|
|
645
|
-
T(w, "getTranslations", () => Me), T(w, "getTranslation", (e, ...
|
|
646
|
-
const
|
|
647
|
-
if (!
|
|
645
|
+
T(w, "getTranslations", () => Me), T(w, "getTranslation", (e, ...r) => {
|
|
646
|
+
const t = w.getTranslations()[e];
|
|
647
|
+
if (!t)
|
|
648
648
|
throw new Error(`Could not find text with given key '${e}'.`);
|
|
649
|
-
return
|
|
649
|
+
return r.reduce(
|
|
650
650
|
(a, i, p) => a.toString().replace(`{${p}}`, i.toString()),
|
|
651
|
-
|
|
651
|
+
t
|
|
652
652
|
).toString();
|
|
653
|
-
}), T(w, "get", (e =
|
|
654
|
-
let
|
|
653
|
+
}), T(w, "get", (e = Q.MissingTranslationKey, ...r) => w.getTranslation(e, ...r));
|
|
654
|
+
let y;
|
|
655
655
|
async function Pe() {
|
|
656
656
|
try {
|
|
657
|
-
return
|
|
658
|
-
...
|
|
659
|
-
hasPermission(e,
|
|
660
|
-
return !!(
|
|
661
|
-
({ permission:
|
|
657
|
+
return y || (y = await z("currentUser").resolve()), {
|
|
658
|
+
...y,
|
|
659
|
+
hasPermission(e, r) {
|
|
660
|
+
return !!(y != null && y.permissions.find(
|
|
661
|
+
({ permission: t }) => t.app.name === e && t.name === r
|
|
662
662
|
));
|
|
663
663
|
},
|
|
664
664
|
isSystemAdmin() {
|
|
665
|
-
return !!
|
|
665
|
+
return !!y && y.type === "system-admin";
|
|
666
666
|
}
|
|
667
667
|
};
|
|
668
668
|
} catch (e) {
|
|
669
|
-
throw Fe(e) && e.code ===
|
|
669
|
+
throw Fe(e) && e.code === U.MissingManagedObjectProvider ? new A(b.CurrentUserMissingProvider) : e.message.includes("GraphQL Error (Code: 404)") ? new A(b.CurrentUserGatewayNotStarted) : e.message.includes("GraphQL Error (Code: 500)") ? new A(b.CurrentUserMissingBackend) : e.message.includes("GraphQL Error (Code: 200)") && e.message.includes("Cannot return null for non-nullable field") ? new A(b.CurrentUserMissingInDatabase) : e;
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
|
+
async function xe() {
|
|
673
|
+
return await z("currentWorkspace").resolve();
|
|
674
|
+
}
|
|
672
675
|
function Ie(e) {
|
|
673
676
|
var a;
|
|
674
677
|
return !e || !((a = e.resources) != null && a.localization) ? {} : Object.keys(e.resources.localization).reduce((i, p) => (i[p] = e.resources.localization[p].value, i), {});
|
|
675
678
|
}
|
|
676
|
-
function Oe(e = "",
|
|
677
|
-
return Object.entries(
|
|
679
|
+
function Oe(e = "", r) {
|
|
680
|
+
return Object.entries(r).reduce((t, [a, i]) => t.replaceAll(`{{${a}}}`, i), e);
|
|
678
681
|
}
|
|
679
682
|
async function Ee() {
|
|
680
|
-
const e = Ae(),
|
|
683
|
+
const e = Ae(), r = be(), t = Ie(e);
|
|
681
684
|
let a = {};
|
|
682
|
-
return
|
|
685
|
+
return r != null && r.find(({ name: i }) => i === "resource-management") && (a = await z("resourceTexts", { app: e == null ? void 0 : e.name }).resolve()), Object.keys(t).reduce((i, p) => (a[p] && (i[p] = a[p]), i), t);
|
|
683
686
|
}
|
|
684
687
|
let j = {};
|
|
685
|
-
async function
|
|
686
|
-
return Object.keys(j).length === 0 && (j = await Ee()), (e,
|
|
687
|
-
const
|
|
688
|
-
if (
|
|
689
|
-
throw new A(
|
|
690
|
-
return !
|
|
688
|
+
async function We() {
|
|
689
|
+
return Object.keys(j).length === 0 && (j = await Ee()), (e, r) => {
|
|
690
|
+
const t = j[e];
|
|
691
|
+
if (t === void 0)
|
|
692
|
+
throw new A(U.LocalizationTemplateNotDefined, { key: e });
|
|
693
|
+
return !r || typeof r != "object" || Object.keys(r).length === 0 ? t : Oe(t, r);
|
|
691
694
|
};
|
|
692
695
|
}
|
|
693
696
|
export {
|
|
694
697
|
Pe as getCurrentUser,
|
|
695
|
-
xe as
|
|
698
|
+
xe as getCurrentWorkspace,
|
|
699
|
+
We as getTranslator
|
|
696
700
|
};
|
|
697
701
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../framework/dist/chunks/capabilities-058adb20.js","../../framework/dist/index.js","../../../internal/client-utilities/dist/index.js","../src/get-current-user.ts","../src/get-translator.ts"],"sourcesContent":["var ae = Object.defineProperty;\nvar se = (e, o, t) => o in e ? ae(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t;\nvar k = (e, o, t) => (se(e, typeof o != \"symbol\" ? o + \"\" : o, t), t);\n/*! js-cookie v3.0.5 | MIT */\nfunction S(e) {\n for (var o = 1; o < arguments.length; o++) {\n var t = arguments[o];\n for (var r in t)\n e[r] = t[r];\n }\n return e;\n}\nvar ce = {\n read: function(e) {\n return e[0] === '\"' && (e = e.slice(1, -1)), e.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent);\n },\n write: function(e) {\n return encodeURIComponent(e).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n );\n }\n};\nfunction j(e, o) {\n function t(i, s, u) {\n if (!(typeof document > \"u\")) {\n u = S({}, o, u), typeof u.expires == \"number\" && (u.expires = new Date(Date.now() + u.expires * 864e5)), u.expires && (u.expires = u.expires.toUTCString()), i = encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);\n var p = \"\";\n for (var c in u)\n u[c] && (p += \"; \" + c, u[c] !== !0 && (p += \"=\" + u[c].split(\";\")[0]));\n return document.cookie = i + \"=\" + e.write(s, i) + p;\n }\n }\n function r(i) {\n if (!(typeof document > \"u\" || arguments.length && !i)) {\n for (var s = document.cookie ? document.cookie.split(\"; \") : [], u = {}, p = 0; p < s.length; p++) {\n var c = s[p].split(\"=\"), d = c.slice(1).join(\"=\");\n try {\n var n = decodeURIComponent(c[0]);\n if (u[n] = e.read(d, n), i === n)\n break;\n } catch {\n }\n }\n return i ? u[i] : u;\n }\n }\n return Object.create(\n {\n set: t,\n get: r,\n remove: function(i, s) {\n t(\n i,\n \"\",\n S({}, s, {\n expires: -1\n })\n );\n },\n withAttributes: function(i) {\n return j(this.converter, S({}, this.attributes, i));\n },\n withConverter: function(i) {\n return j(S({}, this.converter, i), this.attributes);\n }\n },\n {\n attributes: { value: Object.freeze(o) },\n converter: { value: Object.freeze(e) }\n }\n );\n}\nvar W = j(ce, { path: \"/\" }), le = Object.defineProperty, ue = (e, o, t) => o in e ? le(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, x = (e, o, t) => (ue(e, typeof o != \"symbol\" ? o + \"\" : o, t), t), m = /* @__PURE__ */ ((e) => (e[e.AlreadyInitialized = 1e3] = \"AlreadyInitialized\", e[e.NoAppNameOrKey = 1001] = \"NoAppNameOrKey\", e[e.MissingAppController = 1002] = \"MissingAppController\", e[e.MissingCapabilityOnApp = 1003] = \"MissingCapabilityOnApp\", e[e.MissingManagedObjectProvider = 1004] = \"MissingManagedObjectProvider\", e[e.NoManifest = 1005] = \"NoManifest\", e[e.NoRootElement = 1006] = \"NoRootElement\", e[e.NoView = 1007] = \"NoView\", e[e.CookieKeyNotDefined = 1008] = \"CookieKeyNotDefined\", e[e.CookieCategoryNotAllowed = 1009] = \"CookieCategoryNotAllowed\", e[e.StorageKeyNotDefined = 1010] = \"StorageKeyNotDefined\", e[e.StorageCategoryNotAllowed = 1011] = \"StorageCategoryNotAllowed\", e[e.LocalizationTemplateNotDefined = 1012] = \"LocalizationTemplateNotDefined\", e))(m || {});\nfunction pe(e, o) {\n return Object.entries(o).reduce((t, [r, i]) => t.replaceAll(`{{${r}}}`, i), e);\n}\nconst de = {\n // framework\n 1e3: \"The runtime has already been initialized\",\n 1001: \"App name and/or app key is not defined on global scope\",\n 1002: \"No app controller registered for app '{{app}}'\",\n 1003: \"No capability '{{capability}}' enabled for app '{{app}}'\",\n 1004: \"No managed object provider registered for object '{{object}}'\",\n 1005: \"The current apps manifest is not defined on global scope\",\n 1006: \"Could not find the root element in the DOM\",\n 1007: \"Could not find view with id '{{id}}' on view controller for app '{{app}}'\",\n 1008: \"Cookie key '{{key}}' not present in manifest, cookie has not been set\",\n 1009: \"Cookies categorized as '{{category}}' are not allowed by the user, cookie '{{key}}' has not been set\",\n 1010: \"Storage key '{{key}}' not present in manifest, item has not been stored\",\n 1011: \"Storage categorized as '{{category}}' is not allowed by the user, item '{{key}}' has not been stored\",\n 1012: \"The translation template, referred by the key '{{key}}' is being used in app, but is not defined in the manifest.\",\n // utilities\n 2e3: \"No managed object provider registered for object 'currentUser'\",\n 2001: \"Could not access the gateway when querying 'currentUser'\",\n 2002: \"Could not access the required backend when querying 'currentUser'\",\n 2003: \"Could not locate the authenticated user in the Alliance database\"\n}, fe = \"AllianceError\";\nclass b extends Error {\n constructor(o, t = {}) {\n const r = pe(de[o], t), i = `https://github.com/telia-company/ace-alliance-sdk/wiki/error-codes#${o}`;\n super(r), this.code = o, this.name = fe, this.stack = `[${o}] - ${r}\n` + i;\n }\n}\nfunction he(e) {\n const o = Object.entries(e).reduce((t, r) => {\n const [i, s] = r;\n return typeof s > \"u\" || (typeof s == \"object\" && s !== null ? t[i] = JSON.stringify(s) : t[i] = s), t;\n }, {});\n return Object.keys(o).length ? `?${new URLSearchParams(o)}` : \"\";\n}\nfunction ye() {\n const e = H(), { href: o, search: t } = window.location;\n return o.replace(e, \"\").replace(t, \"\");\n}\nfunction me(e = \"\", o = \"\", t = {}) {\n const r = H().replace(location.origin, \"\"), i = he(t);\n return e ? o ? `${r}/${e}/${o}${i}` : `${r}/${e}${i}` : `${r}${i}`;\n}\nfunction Ge() {\n const e = ye(), [o = \"\", t = \"\"] = e.split(\"/\").filter((r) => !!r);\n return {\n app: o,\n capability: t\n };\n}\nfunction We(e) {\n const { origin: o, pathname: t } = window.location;\n if (e === \"production\") {\n const [r] = t.split(\"/\").filter((i) => !!i);\n return globalThis.__ALLIANCE_RUNTIME_ROOT_URL = `${o}/${r}`;\n }\n return globalThis.__ALLIANCE_RUNTIME_ROOT_URL = o;\n}\nfunction H() {\n return globalThis.__ALLIANCE_RUNTIME_ROOT_URL;\n}\nvar Y = /* @__PURE__ */ ((e) => (e[e.AlreadyExists = 0] = \"AlreadyExists\", e[e.ApiGatewayPortDescription = 1] = \"ApiGatewayPortDescription\", e[e.ApiServerModeDescription = 2] = \"ApiServerModeDescription\", e[e.AppConfigurationPath = 3] = \"AppConfigurationPath\", e[e.AppCreated = 4] = \"AppCreated\", e[e.AppEntryBuildOptionDescription = 5] = \"AppEntryBuildOptionDescription\", e[e.AppNameInquiry = 6] = \"AppNameInquiry\", e[e.BuildDescription = 7] = \"BuildDescription\", e[e.BuildModeOptionDescription = 8] = \"BuildModeOptionDescription\", e[e.BuildWatchDescription = 9] = \"BuildWatchDescription\", e[e.CreateAppDescription = 10] = \"CreateAppDescription\", e[e.CreateWorkspaceDescription = 11] = \"CreateWorkspaceDescription\", e[e.DevServerOpenDescription = 12] = \"DevServerOpenDescription\", e[e.DevServerPortDescription = 13] = \"DevServerPortDescription\", e[e.DevServerLoggingDescription = 14] = \"DevServerLoggingDescription\", e[e.Done = 15] = \"Done\", e[e.FetchPackageVersionError = 16] = \"FetchPackageVersionError\", e[e.ManifestEntryBuildOptionDescription = 17] = \"ManifestEntryBuildOptionDescription\", e[e.MissingTranslationKey = 18] = \"MissingTranslationKey\", e[e.NoAppName = 19] = \"NoAppName\", e[e.NoAppNameFound = 20] = \"NoAppNameFound\", e[e.NoAppOrWorkspaceInCurrentDirectory = 21] = \"NoAppOrWorkspaceInCurrentDirectory\", e[e.NoWorkspaceName = 22] = \"NoWorkspaceName\", e[e.OperationCancelled = 23] = \"OperationCancelled\", e[e.ServeDescription = 24] = \"ServeDescription\", e[e.ServedStopped = 25] = \"ServedStopped\", e[e.ServerGatewayMode = 26] = \"ServerGatewayMode\", e[e.ServerMode = 27] = \"ServerMode\", e[e.ServerModeInquiry = 28] = \"ServerModeInquiry\", e[e.ServerProxyMode = 29] = \"ServerProxyMode\", e[e.StopServerInstructions = 30] = \"StopServerInstructions\", e[e.TemplateFrameworkInquiry = 31] = \"TemplateFrameworkInquiry\", e[e.TemplateLanguageInquiry = 32] = \"TemplateLanguageInquiry\", e[e.UnrecognizedCommand = 33] = \"UnrecognizedCommand\", e[e.WorkspaceCreated = 34] = \"WorkspaceCreated\", e[e.WorkspaceNameInquiry = 35] = \"WorkspaceNameInquiry\", e))(Y || {});\nconst ge = {\n 15: \"Done\",\n 22: \"No workspace name provided!\",\n 19: \"No app name provided!\",\n 0: \"File or directory '{0}' already exists!\",\n 21: \"Could not find any app entry file at '{0}'!\",\n 33: \"Unrecognized command(s) {0}!\",\n 34: \"Workspace was created at path '{0}'!\",\n 4: \"App was created at path '{0}'!\",\n 25: \"Server stopped.\",\n 11: \"Creates an Alliance Workspace in the current directory.\",\n 10: \"Creates an Alliance Application in the current directory or Alliance Workspace.\",\n 24: \"Starts a Alliance development server using the current directory package.json.\",\n 7: \"Builds an Alliance Application using Vite.\",\n 35: \"Enter the name of your workspace\",\n 28: \"Which server mode do you want to use?\",\n 6: \"Enter the name of your app\",\n 18: \"No translation key provided!\",\n 23: \"Operation cancelled.\",\n 30: `Press CTRL + C to stop the server.\n`,\n 32: \"Select preferred language\",\n 31: \"Select preferred framework template\",\n 13: \"The port that the dev server should use.\",\n 14: \"Whether the dev server and browser console should output more log information or not (false).\",\n 1: \"The port that the api gateway should use.\",\n 2: \"Which components to start. [server|server-proxy|server-gateway].\",\n 12: \"Whether the dev server should automatically open in your browser or not.\",\n 9: \"Whether the build should start watching and rebuild when files change or not.\",\n 5: \"The entry file for the app (./src/app).\",\n 17: \"The entry file for the app manifest (./src/manifest).\",\n 8: \"Which mode to use when building the app.\",\n 16: \"Failed to fetch package info from the NPM registry for package '${0}'!\",\n 20: \"Could not find app name in manifest.\",\n 3: \"The path to the app configuration file.\",\n 27: \"Server\",\n 29: \"Server with proxy\",\n 26: \"Server with gateway\"\n}, A = class {\n};\nx(A, \"getTranslations\", () => ge), x(A, \"getTranslation\", (e, ...o) => {\n const t = A.getTranslations()[e];\n if (!t)\n throw new Error(`Could not find text with given key '${e}'.`);\n return o.reduce(\n (r, i, s) => r.toString().replace(`{${s}}`, i.toString()),\n t\n ).toString();\n}), x(A, \"get\", (e = Y.MissingTranslationKey, ...o) => A.getTranslation(e, ...o));\nfunction we(e) {\n return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, \"default\") ? e.default : e;\n}\nvar U = { exports: {} }, R, _;\nfunction Ce() {\n if (_)\n return R;\n _ = 1;\n var e = 1e3, o = e * 60, t = o * 60, r = t * 24, i = r * 7, s = r * 365.25;\n R = function(n, a) {\n a = a || {};\n var l = typeof n;\n if (l === \"string\" && n.length > 0)\n return u(n);\n if (l === \"number\" && isFinite(n))\n return a.long ? c(n) : p(n);\n throw new Error(\n \"val is not a non-empty string or a valid number. val=\" + JSON.stringify(n)\n );\n };\n function u(n) {\n if (n = String(n), !(n.length > 100)) {\n var a = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n n\n );\n if (a) {\n var l = parseFloat(a[1]), w = (a[2] || \"ms\").toLowerCase();\n switch (w) {\n case \"years\":\n case \"year\":\n case \"yrs\":\n case \"yr\":\n case \"y\":\n return l * s;\n case \"weeks\":\n case \"week\":\n case \"w\":\n return l * i;\n case \"days\":\n case \"day\":\n case \"d\":\n return l * r;\n case \"hours\":\n case \"hour\":\n case \"hrs\":\n case \"hr\":\n case \"h\":\n return l * t;\n case \"minutes\":\n case \"minute\":\n case \"mins\":\n case \"min\":\n case \"m\":\n return l * o;\n case \"seconds\":\n case \"second\":\n case \"secs\":\n case \"sec\":\n case \"s\":\n return l * e;\n case \"milliseconds\":\n case \"millisecond\":\n case \"msecs\":\n case \"msec\":\n case \"ms\":\n return l;\n default:\n return;\n }\n }\n }\n }\n function p(n) {\n var a = Math.abs(n);\n return a >= r ? Math.round(n / r) + \"d\" : a >= t ? Math.round(n / t) + \"h\" : a >= o ? Math.round(n / o) + \"m\" : a >= e ? Math.round(n / e) + \"s\" : n + \"ms\";\n }\n function c(n) {\n var a = Math.abs(n);\n return a >= r ? d(n, a, r, \"day\") : a >= t ? d(n, a, t, \"hour\") : a >= o ? d(n, a, o, \"minute\") : a >= e ? d(n, a, e, \"second\") : n + \" ms\";\n }\n function d(n, a, l, w) {\n var f = a >= l * 1.5;\n return Math.round(n / l) + \" \" + w + (f ? \"s\" : \"\");\n }\n return R;\n}\nfunction be(e) {\n t.debug = t, t.default = t, t.coerce = c, t.disable = s, t.enable = i, t.enabled = u, t.humanize = Ce(), t.destroy = d, Object.keys(e).forEach((n) => {\n t[n] = e[n];\n }), t.names = [], t.skips = [], t.formatters = {};\n function o(n) {\n let a = 0;\n for (let l = 0; l < n.length; l++)\n a = (a << 5) - a + n.charCodeAt(l), a |= 0;\n return t.colors[Math.abs(a) % t.colors.length];\n }\n t.selectColor = o;\n function t(n) {\n let a, l = null, w, f;\n function h(...y) {\n if (!h.enabled)\n return;\n const g = h, F = Number(/* @__PURE__ */ new Date()), re = F - (a || F);\n g.diff = re, g.prev = a, g.curr = F, a = F, y[0] = t.coerce(y[0]), typeof y[0] != \"string\" && y.unshift(\"%O\");\n let N = 0;\n y[0] = y[0].replace(/%([a-zA-Z%])/g, (P, ne) => {\n if (P === \"%%\")\n return \"%\";\n N++;\n const K = t.formatters[ne];\n if (typeof K == \"function\") {\n const ie = y[N];\n P = K.call(g, ie), y.splice(N, 1), N--;\n }\n return P;\n }), t.formatArgs.call(g, y), (g.log || t.log).apply(g, y);\n }\n return h.namespace = n, h.useColors = t.useColors(), h.color = t.selectColor(n), h.extend = r, h.destroy = t.destroy, Object.defineProperty(h, \"enabled\", {\n enumerable: !0,\n configurable: !1,\n get: () => l !== null ? l : (w !== t.namespaces && (w = t.namespaces, f = t.enabled(n)), f),\n set: (y) => {\n l = y;\n }\n }), typeof t.init == \"function\" && t.init(h), h;\n }\n function r(n, a) {\n const l = t(this.namespace + (typeof a > \"u\" ? \":\" : a) + n);\n return l.log = this.log, l;\n }\n function i(n) {\n t.save(n), t.namespaces = n, t.names = [], t.skips = [];\n let a;\n const l = (typeof n == \"string\" ? n : \"\").split(/[\\s,]+/), w = l.length;\n for (a = 0; a < w; a++)\n l[a] && (n = l[a].replace(/\\*/g, \".*?\"), n[0] === \"-\" ? t.skips.push(new RegExp(\"^\" + n.slice(1) + \"$\")) : t.names.push(new RegExp(\"^\" + n + \"$\")));\n }\n function s() {\n const n = [\n ...t.names.map(p),\n ...t.skips.map(p).map((a) => \"-\" + a)\n ].join(\",\");\n return t.enable(\"\"), n;\n }\n function u(n) {\n if (n[n.length - 1] === \"*\")\n return !0;\n let a, l;\n for (a = 0, l = t.skips.length; a < l; a++)\n if (t.skips[a].test(n))\n return !1;\n for (a = 0, l = t.names.length; a < l; a++)\n if (t.names[a].test(n))\n return !0;\n return !1;\n }\n function p(n) {\n return n.toString().substring(2, n.toString().length - 2).replace(/\\.\\*\\?$/, \"*\");\n }\n function c(n) {\n return n instanceof Error ? n.stack || n.message : n;\n }\n function d() {\n console.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\");\n }\n return t.enable(t.load()), t;\n}\nvar ve = be;\n(function(e, o) {\n o.formatArgs = r, o.save = i, o.load = s, o.useColors = t, o.storage = u(), o.destroy = (() => {\n let c = !1;\n return () => {\n c || (c = !0, console.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\"));\n };\n })(), o.colors = [\n \"#0000CC\",\n \"#0000FF\",\n \"#0033CC\",\n \"#0033FF\",\n \"#0066CC\",\n \"#0066FF\",\n \"#0099CC\",\n \"#0099FF\",\n \"#00CC00\",\n \"#00CC33\",\n \"#00CC66\",\n \"#00CC99\",\n \"#00CCCC\",\n \"#00CCFF\",\n \"#3300CC\",\n \"#3300FF\",\n \"#3333CC\",\n \"#3333FF\",\n \"#3366CC\",\n \"#3366FF\",\n \"#3399CC\",\n \"#3399FF\",\n \"#33CC00\",\n \"#33CC33\",\n \"#33CC66\",\n \"#33CC99\",\n \"#33CCCC\",\n \"#33CCFF\",\n \"#6600CC\",\n \"#6600FF\",\n \"#6633CC\",\n \"#6633FF\",\n \"#66CC00\",\n \"#66CC33\",\n \"#9900CC\",\n \"#9900FF\",\n \"#9933CC\",\n \"#9933FF\",\n \"#99CC00\",\n \"#99CC33\",\n \"#CC0000\",\n \"#CC0033\",\n \"#CC0066\",\n \"#CC0099\",\n \"#CC00CC\",\n \"#CC00FF\",\n \"#CC3300\",\n \"#CC3333\",\n \"#CC3366\",\n \"#CC3399\",\n \"#CC33CC\",\n \"#CC33FF\",\n \"#CC6600\",\n \"#CC6633\",\n \"#CC9900\",\n \"#CC9933\",\n \"#CCCC00\",\n \"#CCCC33\",\n \"#FF0000\",\n \"#FF0033\",\n \"#FF0066\",\n \"#FF0099\",\n \"#FF00CC\",\n \"#FF00FF\",\n \"#FF3300\",\n \"#FF3333\",\n \"#FF3366\",\n \"#FF3399\",\n \"#FF33CC\",\n \"#FF33FF\",\n \"#FF6600\",\n \"#FF6633\",\n \"#FF9900\",\n \"#FF9933\",\n \"#FFCC00\",\n \"#FFCC33\"\n ];\n function t() {\n return typeof window < \"u\" && window.process && (window.process.type === \"renderer\" || window.process.__nwjs) ? !0 : typeof navigator < \"u\" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/) ? !1 : typeof document < \"u\" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773\n typeof window < \"u\" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n typeof navigator < \"u\" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker\n typeof navigator < \"u\" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n }\n function r(c) {\n if (c[0] = (this.useColors ? \"%c\" : \"\") + this.namespace + (this.useColors ? \" %c\" : \" \") + c[0] + (this.useColors ? \"%c \" : \" \") + \"+\" + e.exports.humanize(this.diff), !this.useColors)\n return;\n const d = \"color: \" + this.color;\n c.splice(1, 0, d, \"color: inherit\");\n let n = 0, a = 0;\n c[0].replace(/%[a-zA-Z%]/g, (l) => {\n l !== \"%%\" && (n++, l === \"%c\" && (a = n));\n }), c.splice(a, 0, d);\n }\n o.log = console.debug || console.log || (() => {\n });\n function i(c) {\n try {\n c ? o.storage.setItem(\"debug\", c) : o.storage.removeItem(\"debug\");\n } catch {\n }\n }\n function s() {\n let c;\n try {\n c = o.storage.getItem(\"debug\");\n } catch {\n }\n return !c && typeof process < \"u\" && \"env\" in process && (c = process.env.DEBUG), c;\n }\n function u() {\n try {\n return localStorage;\n } catch {\n }\n }\n e.exports = ve(o);\n const { formatters: p } = e.exports;\n p.j = function(c) {\n try {\n return JSON.stringify(c);\n } catch (d) {\n return \"[UnexpectedJSONParseError]: \" + d.message;\n }\n };\n})(U, U.exports);\nvar ke = U.exports;\nconst Ae = /* @__PURE__ */ we(ke);\nfunction Z(e) {\n return e.type === \"Logic\";\n}\nvar B = /* @__PURE__ */ ((e) => (e.View = \"View\", e.Logic = \"Logic\", e))(B || {});\nclass Fe {\n constructor(o) {\n k(this, \"type\", \"Logic\");\n k(this, \"execute\");\n this.execute = o;\n }\n}\nfunction T() {\n try {\n return ALLIANCE_APP_NAME;\n } catch {\n }\n}\nfunction Ne() {\n try {\n return ALLIANCE_APP_KEY;\n } catch {\n }\n}\nfunction Se() {\n const e = {\n environment: \"production\",\n logging: !1\n };\n try {\n return ALLIANCE_ENVIRONMENT || e;\n } catch {\n return e;\n }\n}\nfunction J() {\n if (E())\n return Promise.resolve();\n const e = 2e4, o = 5;\n return new Promise((t, r) => {\n const i = () => {\n clearInterval(u), clearTimeout(s);\n }, s = setTimeout(() => {\n i(), r(new Error(`Runtime not initialized after ${e}ms`));\n }, e), u = setInterval(() => {\n E() && (i(), t());\n }, o);\n });\n}\nfunction E() {\n return C(\n \"RUNTIME_INITIALIZED\"\n /* RuntimeInitialized */\n );\n}\nfunction C(e = \"\") {\n return globalThis[X(e)];\n}\nfunction $(e, o) {\n return globalThis[X(e)] = o;\n}\nfunction X(e) {\n return `__ALLIANCE_${e}`;\n}\nfunction Q(e) {\n return `APP_CONTROLLER_KEY_${e}`;\n}\nvar I = /* @__PURE__ */ ((e) => (e.RuntimeInitialized = \"RUNTIME_INITIALIZED\", e.RuntimeApps = \"RUNTIME_APPS\", e.RuntimeManifests = \"RUNTIME_MANIFESTS\", e))(I || {});\nfunction Ye() {\n const e = document.createElement(\"div\");\n return e.id = \"root\", document.body.append(e), e;\n}\nfunction Ee() {\n const e = document.getElementById(\"root\");\n if (!e)\n throw new b(m.NoRootElement);\n return e;\n}\nfunction Te(e) {\n return {\n capabilities: \"#25BCDD\",\n \"managed-objects\": \"#FC7A12\",\n controller: \"#F635C6\",\n proxy: \"#48E70B\",\n views: \"#F6D72E\",\n system: \"#D52C2E\"\n }[e];\n}\nconst G = /* @__PURE__ */ new Map();\nfunction M(e) {\n let o = G.get(e);\n return o || (o = Ae(e === \"system\" ? \"[system]\" : `[${T()}] ${e}`), o.color = Te(e), o.enabled = Ie(), G.set(e, o), o);\n}\nfunction Ie() {\n const e = Se(), o = W.get(\"logging\");\n return e.environment === \"development\" && !!e.logging || o === \"true\";\n}\nlet z = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((o, t) => (t &= 63, t < 36 ? o += t.toString(36) : t < 62 ? o += (t - 26).toString(36).toUpperCase() : t > 62 ? o += \"-\" : o += \"_\", o), \"\");\nconst Me = M(\"controller\");\nfunction De() {\n const e = T(), o = Ne();\n if (!e || !o)\n throw new b(m.NoAppNameOrKey);\n const t = Q(e);\n return C(t) ? C(t) : ($(t, o), o);\n}\nfunction ee() {\n const e = De();\n if (C(e))\n return C(e);\n const o = T();\n Me(\"creating app controller\");\n const t = {\n name: o,\n capabilities: {\n app: /* @__PURE__ */ new Map(),\n system: /* @__PURE__ */ new Map()\n },\n managedObjects: {\n providers: /* @__PURE__ */ new Map(),\n watchers: /* @__PURE__ */ new Map()\n },\n views: Oe()\n };\n return $(e, t), t;\n}\nasync function q(e) {\n await J();\n const o = Q(e), t = C(o);\n if (!t)\n return;\n const r = C(t);\n if (r)\n return r;\n}\nasync function Ze() {\n return await J(), (await Promise.all(\n C(I.RuntimeApps).map((o) => q(o))\n )).filter((o) => !!o);\n}\nconst L = M(\"views\");\nfunction te(e) {\n return e.type === B.View;\n}\nvar D = /* @__PURE__ */ ((e) => (e.Main = \"main\", e.Aside = \"aside\", e.Body = \"body\", e))(D || {});\nclass V {\n constructor(o, t) {\n k(this, \"type\", B.View);\n k(this, \"execute\");\n this.container = t, this.execute = o;\n }\n}\nfunction Oe() {\n const e = T(), o = /* @__PURE__ */ new Map(), t = async (i) => {\n const s = o.get(i);\n if (L(\"unmounting view - view: %O\", s), !s)\n throw new b(m.NoView, { id: i, app: e });\n s.unmount && await s.unmount(), s.element.replaceChildren(), s.element.removeAttribute(\"app\"), s.element.removeAttribute(\"view-id\"), o.delete(i), s.element.remove();\n };\n return {\n unmount: t,\n mount: async (i, s, u, p) => {\n if (L(\"mounting view - operation: %O, capability: %o, args: %O\", i, u, p), i.container === \"main\") {\n const f = me(e, u, p), h = location.href.replace(location.origin, \"\");\n f !== h && (L(\"syncing url - data: %O, url: %o\", p, f), history.pushState(p, \"\", f));\n }\n if (i.container === \"aside\" || i.container === \"main\") {\n const [f] = Array.from(document.getElementsByTagName(i.container)), h = f == null ? void 0 : f.getAttribute(\"app\"), y = f == null ? void 0 : f.getAttribute(\"view-id\");\n if (h && y) {\n const g = await q(h);\n await (g == null ? void 0 : g.views.unmount(y));\n }\n }\n let c;\n const d = Ee();\n i.container === \"aside\" ? (c = document.createElement(\n \"aside\"\n /* Aside */\n ), d.prepend(c)) : i.container === \"body\" ? (c = document.createElement(\"div\"), d.append(c)) : (c = document.createElement(\n \"main\"\n /* Main */\n ), d.append(c));\n const n = Pe(), a = z(8);\n c.setAttribute(\"app\", e), c.setAttribute(\"view-id\", a);\n const l = await i.execute(c, (f) => {\n s(f), t(a);\n });\n n.remove();\n const w = {\n element: c,\n unmount: l\n };\n o.set(a, w);\n }\n };\n}\nfunction Pe() {\n const e = document.createElement(\"div\");\n return e.id = \"app-loader\", e.innerHTML = `\n <div>\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </div>\n `, document.body.append(e), e;\n}\nfunction Je(e) {\n return new V(e, D.Main);\n}\nfunction $e(e) {\n return new V(e, D.Body);\n}\nfunction Xe(e) {\n return new V(e, D.Aside);\n}\nfunction Qe(e) {\n return new Fe(e);\n}\nfunction xe() {\n return structuredClone(C(I.RuntimeManifests));\n}\nfunction et() {\n try {\n return ALLIANCE_APP_MANIFEST;\n } catch {\n }\n}\nconst v = M(\"system\");\nfunction Re(e) {\n const o = e.split(\";\")[0];\n return decodeURIComponent(o.split(\"=\")[0].trim());\n}\nconst Le = \"alliance-cookie-consent\";\nfunction je() {\n let e = [\"necessary\"];\n const o = W.get(Le);\n if (o) {\n const t = o.split(\",\"), r = /* @__PURE__ */ new Set([...e, ...t]);\n e = Array.from(r);\n }\n return e;\n}\nfunction Ue() {\n return xe().reduce((o, t) => {\n if (!t.storage)\n return o;\n for (const [r, i] of Object.entries(t.storage))\n o[r] = i;\n return o;\n }, {});\n}\nfunction tt() {\n const e = Ue();\n function o(t, r, i) {\n const s = e[t];\n if (!s)\n throw new b(r, {\n key: t\n });\n if (!je().includes(s.category))\n throw new b(i, {\n key: t,\n category: s.category\n });\n return !0;\n }\n try {\n const t = Object.getOwnPropertyDescriptor(Document.prototype, \"cookie\") || Object.getOwnPropertyDescriptor(HTMLDocument.prototype, \"cookie\");\n t && t.configurable && (v(\"registering override for document.cookie setter\"), Object.defineProperty(document, \"cookie\", {\n get: function() {\n var r;\n return (r = t == null ? void 0 : t.get) == null ? void 0 : r.call(document);\n },\n set: function(r) {\n var i;\n if (r) {\n const s = Re(r);\n try {\n o(\n s,\n m.CookieKeyNotDefined,\n m.CookieCategoryNotAllowed\n );\n } catch (u) {\n console.error(u);\n return;\n }\n }\n return (i = t == null ? void 0 : t.set) == null ? void 0 : i.call(document, r);\n }\n }));\n } catch (t) {\n v(\"error occurred when attempting to override document.cookie setter - error: %O\", t);\n }\n try {\n const t = window.CookieStore.prototype.set;\n t && (v(\"registering override for cookieStore.set function\"), window.CookieStore.prototype.set = async function(r) {\n const i = typeof r == \"object\" ? r.name : r;\n try {\n o(\n i,\n m.CookieKeyNotDefined,\n m.CookieCategoryNotAllowed\n );\n } catch (s) {\n console.error(s);\n return;\n }\n return t.apply(this, arguments);\n });\n } catch (t) {\n v(\"error occurred when attempting to cookieStore.set - error: %O\", t);\n }\n try {\n const t = window.Storage.prototype.setItem;\n v(\"registering override for sessionStorage.setItem and localStorage.setItem\"), window.Storage.prototype.setItem = function(r, i) {\n try {\n o(\n r,\n m.StorageKeyNotDefined,\n m.StorageCategoryNotAllowed\n );\n } catch (s) {\n console.error(s);\n return;\n }\n return t.apply(this, arguments);\n };\n } catch (t) {\n v(\n \"error occurred when attempting to sessionStorage.setItem and localStorage.setItem - error: %O\",\n t\n );\n }\n}\nconst Be = `\n<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <title>ACE Alliance - Cookie Policy</title>\n <link\n rel=\"icon\"\n href=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAGcElEQVRYha2Xe4xUVx3HP7/fPTOzDLO7sw8RlzWlZEtp2dCy0qIVWltKU/UPDZH6ijXWEK2odPcPa2qbhpi2kSa7blSStsFUjNq0lWCMaVMx8rAm22IJMJRHCqFC6BJ22eEx+5p7z88/7sywC7uwgCe5mXsz5/y+j/M753eOcJ2tK5sDyBrME2gBmkBq43/tnMERgXdAjrbn518yXq4RNA3cB/J54HNiMhfEicm4oAYghmHexN4Dew5k01giUybQlc1h0CbI9zC+Imi9mCAIYhoHsnI4KcNjYoDhxWPxsxFY1Z5vHQVwVwSu3Qdid4E8rSb3i6mqKYwBjpWX1V/QZBiYYWIIiifCw8Mm/vS7L/W237FqJno58M5srgmxP4npjsAHDwTeaeAdagGBdwQWoBYgFqCmqGlMqvTE3+U+ipbeE+ngB42Lde6kDnRmcwisAHlBfdBYCYxStp3y7xjTJ51RA0XxgGCkasQFSfkW8NQlBDqzORVYK6ZPqAU6ThUyqd0TN7mQDRZ/CULzvVVeRO68xIGubE6BbjH9oVqA+thaQccpvjL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B5R0w0XSvL4cjwV+FnLU+HiZ2tUpxtbf9Tnj20vOJPo2fZ8688u7n3pmdB42Yt/xUuESVQ+yVJexZNtVmbQ2JYIH9zcGC5/pd71Hxjxm5f1cnzboDPx7xs8M9G4CSV1ZnOZICE7GNXbKweTMU7EA6USoemeVLhgTYame1Nu4MBI2PN0ng+3DDovIZFG5w37bEe+dc+UCQC8/ZtjzX07i/88saU4J8yLXiAhaCC+fn7Sz/7iNFq+mqZ6TuD6do+Gu7vPcuQvBRf62LlIQ2/Y1zvyra9OhnPZSf1g58k5I6ftDSnqnNFTaOACqmclfP0tSa3KBjrc5/2Hbwz7Q38ocHLniDM8XjxeIrxG3rA16vXXj529dVKMK2bVL2fkmhrmJ/9cPy91Z2ZGwhMqQx95TudC8gdCZx4obbMVAhqNGvaoCr99bKD1svGntK4647vg84J8X021PBXlK5gJGJWr11GDb3fkW7dPJfaUi3539iARxSUCz4AsERMVpHwDxMTyhq0HftGRbz071bhXfeooXVJvBR4EbgSGgR6Bt9qvArjc/gfZzPoCTDB+AgAAAABJRU5ErkJggg==\"\n />\n <style>\n @charset \"UTF-8\";\n @import 'https://cdn.voca.teliacompany.com/fonts/TeliaSansV10/TeliaSans.css';\n @import 'https://fonts.googleapis.com/css?family=Reenie+Beanie';\n\n body {\n font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;\n }\n\n body > div {\n max-width: 1000px;\n margin: 0 auto;\n padding: 0 40px 40px;\n }\n </style>\n </head>\n\n <body>\n <div>\n <h1>Cookie Policy</h1>\n <p>\n On our websites, we use cookies and other similar technologies. You can choose\n whether you want to allow our websites to store cookies on your computer or not. You\n can change your choices at any time.\n </p>\n\n <h2>Your consent is required</h2>\n <p>\n You choose whether you want to accept cookies on your device or not. Your consent is\n required for the use of cookies, but not for such cookies that are necessary to\n enable the service that you as a user have requested. If you do not accept our use\n of cookies, or if you have previously approved our use and have changed your mind,\n you can return to your cookie settings at any time and change your choices. You do\n this by clicking on the cookie button/link. You may also need to change the settings\n in your browser and manually delete cookies to clear your device of previously\n stored cookies.\n </p>\n\n <h2>What are cookies?</h2>\n <p>\n A cookie is a small text file that is stored on your computer by the web browser\n while browsing a website. When we refer to cookies (“cookies”) in this policy, other\n similar technologies and tools that retrieve and store information in your browser,\n and in some cases forward such information to third parties, in a manner similar to\n cookies. Examples are pixels, local storage, session storage and fingerprinting.\n </p>\n <p>\n The websites will “remember” and “recognize” you. This can be done by placing\n cookies in three different ways;\n </p>\n <ul>\n <li>The session ends, ie until you close the window in your browser.</li>\n <li>\n Time-limited, ie the cookie has a predetermined lifespan. The time may vary\n between different cookies.\n </li>\n <li>\n Until further notice, ie the information remains until you choose to delete it\n yourself. This applies to local storage.\n </li>\n </ul>\n <p>You can always go into your browser and delete already stored cookies yourself.</p>\n\n <h3>Third Party Cookies</h3>\n <p>\n We use third-party cookies on our websites. Third-party cookies are stored by\n someone other than the person responsible for the website, in this case by a company\n other than Telia.\n </p>\n <p>\n Telia uses external platforms to communicate digitally, these include the Google\n Marketing Platform and others. The platforms use both first- and third-party cookies\n as well as similar techniques to advertise and follow up the results of the\n advertising.\n </p>\n <p>\n A third-party cookie can be used by several websites to understand and track how you\n browse between different websites. Telia receives information from these cookies,\n but the information can also be used for other purposes determined by third parties.\n Third-party cookies found on our website are covered by each third-party privacy\n policy. Feel free to read these to understand what other purposes the information\n can be used for. Links are in our Cookie Table.\n </p>\n <p>\n For information about which third-party cookies are used on our websites, see our\n Cookie Table. For more information on how Telia handles personal data in connection\n with transfers to third parties, read our Privacy Policy.\n </p>\n\n <h2>Cookies on our websites</h2>\n <p>\n In order for you to have better control over which cookies are used on the websites,\n and thus be able to more easily decide how cookies should be used when you visit our\n websites, we have identified four different categories of cookies. These categories\n are defined based on the purposes for the use of the cookies.\n </p>\n <p>\n In our Cookie Table, you can also see which category each cookie belongs to, for\n what purposes it is used and for how long it is active.\n </p>\n <p>\n We have identified the following four categories of cookies. All categories contain\n cookies which means that data is shared with third parties.\n </p>\n\n <h3>Necessary</h3>\n <p>\n These cookies are needed for our app to work in a secure and correct way. Necessary\n cookies enable you to use our app and us to provide the service you request.\n Necessary cookies make basic functions of the app possible, for example, identifying\n you when you log into My Telia, detecting repeated failed login attempts,\n identifying where you are in the buying process and remembering the items put into\n your shopping basket.\n </p>\n\n <h3>Functionality</h3>\n <p>\n These cookies let us to enable some useful functionalities to make the user\n experience better, for example, to remember your login details and settings.\n </p>\n\n <h3>Analytics</h3>\n <p>\n These cookies give us information about how you use our app and allow us to improve\n the user experience.\n </p>\n\n <h3>Marketing</h3>\n <p>\n These cookies help us and our partners to display personalized and relevant ads\n based on your browsing behavior on our website and in our app, even when you later\n visit other (third parties’) websites. These cookies are used to evaluate the\n effectiveness of our marketingcampaigns, as well as for targeted marketing and\n profiling, regardless of which device(s) you have used. Information collected for\n this purpose may also be combined with other customer and traffic data we have about\n you, if you have given your consent that we may use your traffic data for marketing\n purpose and have not objected to the use of your customer data for marketing\n purposes.\n </p>\n\n <h2>Manage settings</h2>\n <p>\n We save your cookie consent for 12 months. Then we will ask you again. Please note\n that some cookies have a lifespan that exceeds these 12 months. You may therefore\n need to change the settings in your browser and manually delete all cookies.\n </p>\n <p>\n More information on how to turn off cookies can be found in the instructions for\n your browser.\n </p>\n <ul>\n <li>\n <a\n href=\"https://support.google.com/accounts/answer/61416?co=GENIE.Platform%3DDesktop&hl=en\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >Google Chrome</a\n >\n </li>\n <li>\n <a\n href=\"https://privacy.microsoft.com/en-us/windows-10-microsoft-edge-and-privacy\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >Microsoft Edge</a\n >\n </li>\n <li>\n <a\n href=\"https://support.mozilla.org/en-US/kb/enable-and-disable-cookies-website-preferences\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >Mozilla Firefox</a\n >\n </li>\n <li>\n <a\n href=\"https://support.microsoft.com/en-gb/help/17442/windows-internet-explorer-delete-manage-cookies\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >Microsoft Internet Explorer</a\n >\n </li>\n <li>\n <a\n href=\"https://www.opera.com/help/tutorials/security/privacy/\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >Opera</a\n >\n </li>\n <li>\n <a\n href=\"https://support.apple.com/guide/safari/manage-cookies-and-website-data-sfri11471/mac\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >Apple Safari</a\n >\n </li>\n </ul>\n\n <h3>Do Not Track-signals</h3>\n <p>\n If you have chosen to turn on the Do Not Track function in your browser, we will not\n automatically place cookies for marketing on your device. You make other choices in\n your cookie settings.\n </p>\n\n <h3>If you block cookies</h3>\n <p>\n If you choose not to accept our use of cookies, the functionality and performance of\n our websites may deteriorate as certain functions are dependent on cookies. A\n blocking of cookies can therefore mean that the websites’ services do not work as\n they should.\n </p>\n\n <h3>Your security with us</h3>\n <p>\n If you want to read more about your rights and how we protect your privacy, go to\n our privacy policy for\n <a\n href=\"https://www.telia.se/dam/jcr:df2eeb83-50ce-4383-89fc-0613f7615796/Integritetspolicy-privatkunder.pdf\"\n >private customers</a\n >\n (C2B) or\n <a\n href=\"https://www.telia.se/dam/jcr:95b2b4a5-82ca-436b-90e0-873e0a864118/Telia-integritetspolicy-foretag.pdf\"\n >corporate customers</a\n >\n (B2B). You are always welcome to contact us at\n <a href=\"mailto:dpo-se@teliacompany.com\">dpo-se@teliacompany.com</a> if you have any\n questions.\n </p>\n <p>Our cookie policy may change in the future.</p>\n <p>\n More information about cookies can be found at the Swedish Post and Telecom\n Authority (PTS).\n </p>\n\n <h2>Our Cookie Table</h2>\n <p>\n Below, you will find a list of the cookies and similar technologies that we use on\n this website. These cookies are stored on your device by us.\n </p>\n <table>\n <thead>\n <tr>\n <th>Cookie</th>\n <th>Category</th>\n <th>Purpose</th>\n <th>Lifespan</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>alliance-session-v1</td>\n <td>necessary</td>\n <td>Contains the authenticated user.</td>\n <td>1 day</td>\n </tr>\n {APP_COOKIES}\n </tbody>\n </table>\n <style>\n table {\n width: 100%;\n border: 1px solid rgba(0, 0, 0, 0.15);\n }\n th, td {\n text-align: left;\n padding: 3px;\n }\n </style>\n </div>\n </body>\n</html>\n`;\nfunction ot(e) {\n const o = [];\n for (const t of e)\n if (t.storage)\n for (const [r, i] of Object.entries(t.storage)) {\n const s = ze(r, i);\n o.push(s);\n }\n return Be.replace(\"{APP_COOKIES}\", o.join(\"\"));\n}\nfunction ze(e, o) {\n const t = [\"<tr>\"], { category: r, purpose: i, lifespan: s } = o;\n return t.push(`<td>${e}</td>`), t.push(`<td>${r}</td>`), t.push(`<td>${i}</td>`), t.push(`<td>${s}</td>`), t.push(\"</tr>\"), t.join(\"\");\n}\nconst O = M(\"capabilities\");\nasync function oe(e, o, t) {\n const r = await q(e);\n if (!r)\n throw new b(m.MissingAppController, { app: e });\n const s = (t === \"app\" ? r.capabilities.app : r.capabilities.system).get(o);\n if (!s)\n throw new b(m.MissingCapabilityOnApp, {\n capability: o,\n app: e\n });\n return { controller: r, handler: s };\n}\nfunction qe(e) {\n return (o, t, r) => (e(\"requesting capability - app: %o, capability: %o, args: %O\", o, t, r), {\n id: z(8),\n result: new Promise(async (i) => {\n const { controller: s, handler: u } = await oe(\n o,\n t,\n \"app\"\n ), p = await u(r);\n Z(p) ? await p.execute(i) : te(p) && await s.views.mount(p, i, t, r), e(\n \"resolved capability - app: %o, capability: %o, args: %O\",\n o,\n t,\n r\n );\n })\n });\n}\nfunction rt(e, o) {\n if (E())\n throw new b(m.AlreadyInitialized);\n const t = ee();\n O(\"enabling capability - capability: %o, handler: %O\", e, o), t.capabilities.app.set(e, o);\n}\nfunction nt(e, o) {\n if (E())\n throw new b(m.AlreadyInitialized);\n const t = ee();\n O(\"enabling system capability - capability: %o, handler: %O\", e, o), t.capabilities.system.set(e, o);\n}\nfunction Ve(e) {\n return (o, t, r) => {\n e(\n \"requesting system capability - capability: %o, args: %O, targetApp: %o\",\n o,\n t,\n r\n );\n const i = [], s = C(I.RuntimeApps);\n for (const u of s) {\n if (r && u !== r)\n continue;\n const p = new Promise(async (c) => {\n const { controller: d, handler: n } = await oe(\n u,\n o,\n \"system\"\n ), a = await n(t);\n Z(a) ? await a.execute(c) : te(a) && await d.views.mount(a, c, o, t), e(\n \"resolved system capability - capability: %o, args: %O, targetApp: %o\",\n o,\n t,\n r\n );\n });\n i.push({\n id: z(8),\n result: p\n });\n }\n return i;\n };\n}\nconst it = Ve(O), at = qe(O);\nexport {\n Le as A,\n b as I,\n m as N,\n We as P,\n I as S,\n Ge as W,\n Ze as a,\n et as b,\n M as c,\n Se as d,\n ot as e,\n rt as f,\n ee as g,\n nt as h,\n E as i,\n it as j,\n Xe as k,\n $e as l,\n Qe as m,\n Je as n,\n xe as o,\n Ye as p,\n Ve as q,\n at as r,\n q as s,\n tt as t,\n qe as u,\n C as v,\n $ as w\n};\n//# sourceMappingURL=capabilities-058adb20.js.map\n","import { c as C, i as b, I as p, N as g, g as P, a as S, b as A, d as N } from \"./chunks/capabilities-058adb20.js\";\nimport { A as _, k as V, l as z, m as K, n as Q, f as W, h as B, e as J, o as F, r as M, j as X } from \"./chunks/capabilities-058adb20.js\";\nfunction $(e) {\n return e;\n}\nconst c = C(\"managed-objects\");\nfunction I(e, n) {\n return c(\"querying objects - object: %o, args: %O\", e, n), {\n async resolve() {\n return c(\"resolving query - object: %o, args: %O\", e, n), await (await m(e)).managedObjects.providers.get(e)(n);\n },\n async watch(r) {\n c(\"adding watcher - object: %o, args: %O\", e, n), (await m(e)).managedObjects.watchers.get(e).push(r);\n }\n };\n}\nfunction U(e, n) {\n if (b())\n throw new p(g.AlreadyInitialized);\n c(\"registering provider - object: %o, handler: %O\", e, n);\n const r = P();\n return r.managedObjects.providers.set(e, n), r.managedObjects.watchers.set(e, []), function() {\n c(\"triggering watchers - object: %o, handler: %O\", e, n);\n const t = r.managedObjects.watchers.get(e) || [];\n for (const a of t)\n a();\n };\n}\nasync function m(e) {\n const r = (await S()).find(\n (t) => t.managedObjects.providers.has(e) && t.managedObjects.watchers.has(e)\n );\n if (!r)\n throw new p(g.MissingManagedObjectProvider, { object: e });\n return r;\n}\nconst y = C(\"proxy\");\nvar v = /* @__PURE__ */ ((e) => (e.Get = \"GET\", e.Head = \"HEAD\", e.Post = \"POST\", e.Put = \"PUT\", e.Delete = \"DELETE\", e.Connect = \"CONNECT\", e.Options = \"OPTIONS\", e.Trace = \"TRACE\", e.Patch = \"PATCH\", e))(v || {});\nfunction E(e, n, r = []) {\n const t = new URL(e, location.origin);\n if (r.find((o) => q(o, e))) {\n const s = \"/-/gateway\" + (t.pathname !== \"/\" ? t.pathname : \"/\") + (n ? t.search : \"\");\n return new URL(s, location.origin);\n }\n return t;\n}\nfunction R(e = {}) {\n if (Object.keys(e).length === 0)\n return \"\";\n const n = Object.entries(e).reduce(\n (t, [a, o]) => (typeof o > \"u\" || o === null || (t[a] = o.toString()), t),\n {}\n );\n return `?${new URLSearchParams(n).toString()}`;\n}\nfunction j(e) {\n return e.replaceAll(/[-\\/\\\\^$*+?.()|[\\]{}]/g, \"\\\\$&\");\n}\nfunction q(e, n) {\n const r = j(e);\n return new RegExp(`^${r.replaceAll(\"\\\\?\", \".?\").replaceAll(\"\\\\*\", \".*\")}`, \"i\").test(n);\n}\nfunction x(e, n) {\n const r = A();\n if (!r)\n throw new p(g.NoManifest);\n const { name: t, endpoints: a = [] } = r;\n y(\"creating request - input: %o, options: %O\", e, { lots: 1, of: { properties: 123 } });\n const o = E(e.toString(), !0, a), s = new Request(o, n), { environment: l } = N();\n if (l === \"production\") {\n const u = location.pathname.split(\"/\").filter((f) => !!f);\n s.headers.set(\"Alliance-Target-Workspace\", u[0]);\n }\n return s.headers.set(\"Alliance-Target-Url\", e.toString()), s.headers.set(\"Alliance-Target-App\", t), y(\"created request - request: %O\", s), s;\n}\nfunction k() {\n const e = A();\n if (!e)\n throw new p(g.NoManifest);\n const { name: n, endpoints: r = [] } = e;\n async function t(a, o, s = {}) {\n const { body: l, query: u, headers: f } = s, T = E(a, !1, r), d = R(u), O = {\n \"Alliance-Target-Url\": `${a}${d}`,\n // FUTURE TODO: Is there a better name for this?\n \"Alliance-Target-App\": n\n }, w = location.pathname.split(\"/\").filter((i) => !!i);\n w.length > 1 && (O[\n \"Alliance-Target-Workspace\"\n /* TargetWorkspace */\n ] = w[0]);\n const h = {\n method: o,\n headers: {\n \"Content-Type\": \"application/json\",\n ...f,\n ...O\n }\n };\n return l && (h.body = JSON.stringify(l)), fetch(`${T}${d}`, h).then((i) => i.json()).catch((i) => {\n throw i;\n });\n }\n return {\n post: (a, o) => t(a, \"POST\", o),\n put: (a, o) => t(a, \"PUT\", o),\n delete: (a, o) => t(a, \"DELETE\", o),\n get: (a, o) => t(a, \"GET\", o),\n create: x\n };\n}\nexport {\n _ as ALLIANCE_COOKIE_CONSENT_COOKIE_NAME,\n v as HttpMethods,\n V as createAsideViewOperation,\n z as createBodyViewOperation,\n K as createOperation,\n k as createProxy,\n x as createRequest,\n Q as createViewOperation,\n $ as defineConfig,\n W as enableCapability,\n B as enableSystemCapability,\n J as generateCookiePolicyHtml,\n A as getAppManifest,\n F as getAppManifests,\n U as provideObjects,\n I as queryObjects,\n M as runCapability,\n X as runSystemCapability\n};\n//# sourceMappingURL=index.js.map\n","var g = Object.defineProperty;\nvar v = (e, t, r) => t in e ? g(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;\nvar a = (e, t, r) => (v(e, typeof t != \"symbol\" ? t + \"\" : t, r), r);\nvar N = /* @__PURE__ */ ((e) => (e[e.AlreadyInitialized = 1e3] = \"AlreadyInitialized\", e[e.NoAppNameOrKey = 1001] = \"NoAppNameOrKey\", e[e.MissingAppController = 1002] = \"MissingAppController\", e[e.MissingCapabilityOnApp = 1003] = \"MissingCapabilityOnApp\", e[e.MissingManagedObjectProvider = 1004] = \"MissingManagedObjectProvider\", e[e.NoManifest = 1005] = \"NoManifest\", e[e.NoRootElement = 1006] = \"NoRootElement\", e[e.NoView = 1007] = \"NoView\", e[e.CookieKeyNotDefined = 1008] = \"CookieKeyNotDefined\", e[e.CookieCategoryNotAllowed = 1009] = \"CookieCategoryNotAllowed\", e[e.StorageKeyNotDefined = 1010] = \"StorageKeyNotDefined\", e[e.StorageCategoryNotAllowed = 1011] = \"StorageCategoryNotAllowed\", e[e.LocalizationTemplateNotDefined = 1012] = \"LocalizationTemplateNotDefined\", e))(N || {}), A = /* @__PURE__ */ ((e) => (e[e.CurrentUserMissingProvider = 2e3] = \"CurrentUserMissingProvider\", e[e.CurrentUserGatewayNotStarted = 2001] = \"CurrentUserGatewayNotStarted\", e[e.CurrentUserMissingBackend = 2002] = \"CurrentUserMissingBackend\", e[e.CurrentUserMissingInDatabase = 2003] = \"CurrentUserMissingInDatabase\", e))(A || {});\nfunction m(e, t) {\n return Object.entries(t).reduce((r, [i, n]) => r.replaceAll(`{{${i}}}`, n), e);\n}\nconst S = {\n // framework\n 1e3: \"The runtime has already been initialized\",\n 1001: \"App name and/or app key is not defined on global scope\",\n 1002: \"No app controller registered for app '{{app}}'\",\n 1003: \"No capability '{{capability}}' enabled for app '{{app}}'\",\n 1004: \"No managed object provider registered for object '{{object}}'\",\n 1005: \"The current apps manifest is not defined on global scope\",\n 1006: \"Could not find the root element in the DOM\",\n 1007: \"Could not find view with id '{{id}}' on view controller for app '{{app}}'\",\n 1008: \"Cookie key '{{key}}' not present in manifest, cookie has not been set\",\n 1009: \"Cookies categorized as '{{category}}' are not allowed by the user, cookie '{{key}}' has not been set\",\n 1010: \"Storage key '{{key}}' not present in manifest, item has not been stored\",\n 1011: \"Storage categorized as '{{category}}' is not allowed by the user, item '{{key}}' has not been stored\",\n 1012: \"The translation template, referred by the key '{{key}}' is being used in app, but is not defined in the manifest.\",\n // utilities\n 2e3: \"No managed object provider registered for object 'currentUser'\",\n 2001: \"Could not access the gateway when querying 'currentUser'\",\n 2002: \"Could not access the required backend when querying 'currentUser'\",\n 2003: \"Could not locate the authenticated user in the Alliance database\"\n}, d = \"AllianceError\";\nclass I extends Error {\n constructor(t, r = {}) {\n const i = m(S[t], r), n = `https://github.com/telia-company/ace-alliance-sdk/wiki/error-codes#${t}`;\n super(i), this.code = t, this.name = d, this.stack = `[${t}] - ${i}\n` + n;\n }\n}\nfunction k(e) {\n return !!e.code && e.name === d;\n}\nfunction b(e) {\n const r = Object.entries(e).reduce((i, n) => {\n const [o, p] = n;\n return typeof p > \"u\" || (typeof p == \"object\" && p !== null ? i[o] = JSON.stringify(p) : i[o] = p), i;\n }, {});\n return Object.keys(r).length ? `?${new URLSearchParams(r)}` : \"\";\n}\nfunction D() {\n const e = l(), { href: t, search: r } = window.location;\n return t.replace(e, \"\").replace(r, \"\");\n}\nfunction C(e = \"\", t = \"\", r = {}) {\n const i = l().replace(location.origin, \"\"), n = b(r);\n return e ? t ? `${i}/${e}/${t}${n}` : `${i}/${e}${n}` : `${i}${n}`;\n}\nfunction W() {\n const e = D(), [t = \"\", r = \"\"] = e.split(\"/\").filter((i) => !!i);\n return {\n app: t,\n capability: r\n };\n}\nfunction P(e) {\n const { origin: t, pathname: r } = window.location;\n if (e === \"production\") {\n const [i] = r.split(\"/\").filter((n) => !!n);\n return globalThis.__ALLIANCE_RUNTIME_ROOT_URL = `${t}/${i}`;\n }\n return globalThis.__ALLIANCE_RUNTIME_ROOT_URL = t;\n}\nfunction l() {\n return globalThis.__ALLIANCE_RUNTIME_ROOT_URL;\n}\nvar s = /* @__PURE__ */ ((e) => (e[e.AlreadyExists = 0] = \"AlreadyExists\", e[e.ApiGatewayPortDescription = 1] = \"ApiGatewayPortDescription\", e[e.ApiServerModeDescription = 2] = \"ApiServerModeDescription\", e[e.AppConfigurationPath = 3] = \"AppConfigurationPath\", e[e.AppCreated = 4] = \"AppCreated\", e[e.AppEntryBuildOptionDescription = 5] = \"AppEntryBuildOptionDescription\", e[e.AppNameInquiry = 6] = \"AppNameInquiry\", e[e.BuildDescription = 7] = \"BuildDescription\", e[e.BuildModeOptionDescription = 8] = \"BuildModeOptionDescription\", e[e.BuildWatchDescription = 9] = \"BuildWatchDescription\", e[e.CreateAppDescription = 10] = \"CreateAppDescription\", e[e.CreateWorkspaceDescription = 11] = \"CreateWorkspaceDescription\", e[e.DevServerOpenDescription = 12] = \"DevServerOpenDescription\", e[e.DevServerPortDescription = 13] = \"DevServerPortDescription\", e[e.DevServerLoggingDescription = 14] = \"DevServerLoggingDescription\", e[e.Done = 15] = \"Done\", e[e.FetchPackageVersionError = 16] = \"FetchPackageVersionError\", e[e.ManifestEntryBuildOptionDescription = 17] = \"ManifestEntryBuildOptionDescription\", e[e.MissingTranslationKey = 18] = \"MissingTranslationKey\", e[e.NoAppName = 19] = \"NoAppName\", e[e.NoAppNameFound = 20] = \"NoAppNameFound\", e[e.NoAppOrWorkspaceInCurrentDirectory = 21] = \"NoAppOrWorkspaceInCurrentDirectory\", e[e.NoWorkspaceName = 22] = \"NoWorkspaceName\", e[e.OperationCancelled = 23] = \"OperationCancelled\", e[e.ServeDescription = 24] = \"ServeDescription\", e[e.ServedStopped = 25] = \"ServedStopped\", e[e.ServerGatewayMode = 26] = \"ServerGatewayMode\", e[e.ServerMode = 27] = \"ServerMode\", e[e.ServerModeInquiry = 28] = \"ServerModeInquiry\", e[e.ServerProxyMode = 29] = \"ServerProxyMode\", e[e.StopServerInstructions = 30] = \"StopServerInstructions\", e[e.TemplateFrameworkInquiry = 31] = \"TemplateFrameworkInquiry\", e[e.TemplateLanguageInquiry = 32] = \"TemplateLanguageInquiry\", e[e.UnrecognizedCommand = 33] = \"UnrecognizedCommand\", e[e.WorkspaceCreated = 34] = \"WorkspaceCreated\", e[e.WorkspaceNameInquiry = 35] = \"WorkspaceNameInquiry\", e))(s || {});\nconst M = {\n 15: \"Done\",\n 22: \"No workspace name provided!\",\n 19: \"No app name provided!\",\n 0: \"File or directory '{0}' already exists!\",\n 21: \"Could not find any app entry file at '{0}'!\",\n 33: \"Unrecognized command(s) {0}!\",\n 34: \"Workspace was created at path '{0}'!\",\n 4: \"App was created at path '{0}'!\",\n 25: \"Server stopped.\",\n 11: \"Creates an Alliance Workspace in the current directory.\",\n 10: \"Creates an Alliance Application in the current directory or Alliance Workspace.\",\n 24: \"Starts a Alliance development server using the current directory package.json.\",\n 7: \"Builds an Alliance Application using Vite.\",\n 35: \"Enter the name of your workspace\",\n 28: \"Which server mode do you want to use?\",\n 6: \"Enter the name of your app\",\n 18: \"No translation key provided!\",\n 23: \"Operation cancelled.\",\n 30: `Press CTRL + C to stop the server.\n`,\n 32: \"Select preferred language\",\n 31: \"Select preferred framework template\",\n 13: \"The port that the dev server should use.\",\n 14: \"Whether the dev server and browser console should output more log information or not (false).\",\n 1: \"The port that the api gateway should use.\",\n 2: \"Which components to start. [server|server-proxy|server-gateway].\",\n 12: \"Whether the dev server should automatically open in your browser or not.\",\n 9: \"Whether the build should start watching and rebuild when files change or not.\",\n 5: \"The entry file for the app (./src/app).\",\n 17: \"The entry file for the app manifest (./src/manifest).\",\n 8: \"Which mode to use when building the app.\",\n 16: \"Failed to fetch package info from the NPM registry for package '${0}'!\",\n 20: \"Could not find app name in manifest.\",\n 3: \"The path to the app configuration file.\",\n 27: \"Server\",\n 29: \"Server with proxy\",\n 26: \"Server with gateway\"\n}, c = class c {\n};\na(c, \"getTranslations\", () => M), a(c, \"getTranslation\", (t, ...r) => {\n const n = c.getTranslations()[t];\n if (!n)\n throw new Error(`Could not find text with given key '${t}'.`);\n return r.reduce(\n (p, h, f) => p.toString().replace(`{${f}}`, h.toString()),\n n\n ).toString();\n}), a(c, \"get\", (t = s.MissingTranslationKey, ...r) => c.getTranslation(t, ...r));\nlet u = c;\nfunction R(e, t) {\n return O(Object.values(e), ({ name: r }) => ({\n label: r,\n value: r,\n selected: t === r\n }));\n}\nvar y = /* @__PURE__ */ ((e) => (e.Primary = \"primary\", e.Secondary = \"secondary\", e.Expressive = \"expressive\", e.Destructive = \"destructive\", e.Text = \"text\", e.PrimaryWhite = \"primary-white\", e.SecondaryWhite = \"secondary-white\", e.ExpressiveWhite = \"expressive-white\", e.TertiaryPurple = \"tertiary-purple\", e))(y || {});\nfunction $(e, t) {\n return Object.values(e).find((i) => i.name === t);\n}\nfunction O(e, t, r = \"Choose...\") {\n return e.reduce(\n (i, n) => (i.push({\n disabled: !1,\n selected: !1,\n ...t(n)\n }), i),\n [\n {\n label: r,\n value: \"\",\n disabled: !0,\n selected: !0\n }\n ]\n );\n}\nfunction L(e) {\n return (t) => {\n t.key === \"Enter\" && e(t);\n };\n}\nfunction U(e, t = \"all\") {\n const { email: r, displayName: i } = e, n = i && i !== \"unknown\", o = !!r;\n switch (t) {\n case \"all\": {\n if (n && o)\n return `${i} (${r})`;\n if (n)\n return i;\n if (o)\n return r;\n }\n case \"single\": {\n if (n)\n return i;\n if (o)\n return r;\n }\n }\n return \"<UNKNOWN USER>\";\n}\nfunction j(...e) {\n return e.filter((t) => !!t).join(\" \");\n}\nfunction q(e) {\n return Object.entries(e).reduce(\n (t, [r, i]) => (typeof i != \"object\" && typeof i != \"function\" && (t[r] = i), t),\n {}\n );\n}\nexport {\n I as AllianceError,\n N as FrameworkErrorCodes,\n u as Texts,\n s as TranslationsKey,\n A as UtilitiesErrorCodes,\n y as VocaButtonVariant,\n j as classNames,\n C as createCapabilityPath,\n U as friendlyUserName,\n W as getCurrentLocationInfo,\n l as getRuntimeRootUrl,\n $ as getVocaIcon,\n k as isAllianceError,\n O as mapToVocaOptions,\n L as onEnter,\n q as props,\n P as setRuntimeRootUrl,\n R as vocaIconsToOptions\n};\n//# sourceMappingURL=index.js.map\n","import { queryObjects } from '@telia-ace/alliance-framework';\nimport {\n AllianceError,\n FrameworkErrorCodes,\n UtilitiesErrorCodes,\n isAllianceError,\n} from '@telia-ace/alliance-internal-client-utilities';\n\ntype CurrentUser = {\n displayName: string;\n email: string;\n type: 'system-admin' | 'user';\n objectId: string;\n permissions: { permission: { name: string; app: { name: string } } }[];\n hasPermission: (appName: string, permissionName: string) => boolean;\n isSystemAdmin: () => boolean;\n};\n\nlet currentUser: CurrentUser;\n\nexport async function getCurrentUser(): Promise<CurrentUser> {\n try {\n if (!currentUser) {\n const query = queryObjects<CurrentUser>('currentUser');\n currentUser = await query.resolve();\n }\n\n return {\n ...currentUser,\n hasPermission(appName, permissionName) {\n return !!currentUser?.permissions.find(\n ({ permission }) =>\n permission.app.name === appName && permission.name === permissionName\n );\n },\n isSystemAdmin() {\n return !!currentUser && currentUser.type === 'system-admin';\n },\n };\n } catch (err: any) {\n if (isAllianceError(err) && err.code === FrameworkErrorCodes.MissingManagedObjectProvider) {\n throw new AllianceError(UtilitiesErrorCodes.CurrentUserMissingProvider);\n } else if (err.message.includes('GraphQL Error (Code: 404)')) {\n throw new AllianceError(UtilitiesErrorCodes.CurrentUserGatewayNotStarted);\n } else if (err.message.includes('GraphQL Error (Code: 500)')) {\n throw new AllianceError(UtilitiesErrorCodes.CurrentUserMissingBackend);\n } else if (\n err.message.includes('GraphQL Error (Code: 200)') &&\n err.message.includes('Cannot return null for non-nullable field')\n ) {\n throw new AllianceError(UtilitiesErrorCodes.CurrentUserMissingInDatabase);\n } else {\n throw err;\n }\n }\n}\n","import {\n getAppManifest,\n getAppManifests,\n queryObjects,\n type AppManifest,\n} from '@telia-ace/alliance-framework';\nimport { AllianceError, FrameworkErrorCodes } from '@telia-ace/alliance-internal-client-utilities';\n\ntype RecordEntries = Record<string, string>;\nexport type TranslatorFunction = (key: string, params?: RecordEntries) => string;\n\nexport function getDefaultLocalization(manifest?: AppManifest): RecordEntries {\n if (!manifest || !manifest.resources?.localization) {\n return {};\n }\n\n const localizationKeys = Object.keys(manifest.resources.localization);\n const defaults = localizationKeys.reduce((obj: RecordEntries, item: string) => {\n obj[item] = manifest.resources!.localization![item].value;\n\n return obj;\n }, {});\n\n return defaults;\n}\n\nfunction parseTemplates(message: string = '', variables: RecordEntries) {\n return Object.entries(variables).reduce((acc, [key, value]) => {\n return acc.replaceAll(`{{${key}}}`, value);\n }, message);\n}\n\nasync function getAppLocalization(): Promise<RecordEntries> {\n const manifest = getAppManifest();\n const appManifests = getAppManifests();\n\n const defaultLocalization = getDefaultLocalization(manifest);\n let localization: Record<string, string> = {};\n\n // Dont try to query objects if the resource management app is not installed\n if (appManifests?.find(({ name }) => name === 'resource-management')) {\n localization = await queryObjects('resourceTexts', { app: manifest?.name }).resolve();\n }\n\n return Object.keys(defaultLocalization).reduce<Record<string, string>>((acc, key) => {\n if (localization[key]) {\n acc[key] = localization[key];\n }\n\n return acc;\n }, defaultLocalization);\n}\n\nlet localizationStore: RecordEntries = {};\n\nexport async function getTranslator(): Promise<TranslatorFunction> {\n if (Object.keys(localizationStore).length === 0) {\n localizationStore = await getAppLocalization();\n }\n\n return (key: string, params?: RecordEntries): string => {\n const template = localizationStore[key];\n\n if (template === undefined) {\n throw new AllianceError(FrameworkErrorCodes.LocalizationTemplateNotDefined, { key });\n }\n\n if (!params || typeof params !== 'object' || Object.keys(params).length === 0) {\n return template;\n }\n\n return parseTemplates(template, params);\n };\n}\n"],"names":["S","o","t","r","ce","j","s","u","p","d","n","W","le","ue","x","m","pe","de","fe","b","Y","ge","A","we","U","R","_","Ce","a","l","w","f","be","y","g","F","re","N","P","ne","K","ie","ve","ke","Ae","T","Se","J","E","C","X","Q","I","Te","G","M","Ie","q","Ze","xe","et","c","v","i","k","h","currentUser","getCurrentUser","queryObjects","appName","permissionName","permission","err","isAllianceError","FrameworkErrorCodes","AllianceError","UtilitiesErrorCodes","getDefaultLocalization","manifest","_a","obj","item","parseTemplates","message","variables","acc","key","value","getAppLocalization","getAppManifest","appManifests","getAppManifests","defaultLocalization","localization","name","localizationStore","getTranslator","params","template"],"mappings":"AAGA;AACA,SAASA,EAAE,GAAG;AACZ,WAASC,IAAI,GAAGA,IAAI,UAAU,QAAQA,KAAK;AACzC,QAAIC,IAAI,UAAUD,CAAC;AACnB,aAASE,KAAKD;AACZ,QAAEC,CAAC,IAAID,EAAEC,CAAC;AAAA,EACb;AACD,SAAO;AACT;AACA,IAAIC,IAAK;AAAA,EACP,MAAM,SAAS,G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K,KAA6C;AACxD,QAAMV,IAAWW,MACXC,IAAeC,MAEfC,IAAsBf,GAAuBC,CAAQ;AAC3D,MAAIe,IAAuC,CAAA;AAGvC,SAAAH,KAAA,QAAAA,EAAc,KAAK,CAAC,EAAE,MAAAI,QAAWA,MAAS,2BAC3BD,IAAA,MAAMzB,EAAa,iBAAiB,EAAE,KAAKU,KAAA,gBAAAA,EAAU,KAAA,CAAM,EAAE,YAGzE,OAAO,KAAKc,CAAmB,EAAE,OAA+B,CAACP,GAAKC,OACrEO,EAAaP,CAAG,MACZD,EAAAC,CAAG,IAAIO,EAAaP,CAAG,IAGxBD,IACRO,CAAmB;AAC1B;AAEA,IAAIG,IAAmC,CAAA;AAEvC,eAAsBC,KAA6C;AAC/D,SAAI,OAAO,KAAKD,CAAiB,EAAE,WAAW,MAC1CA,IAAoB,MAAMP,OAGvB,CAACF,GAAaW,MAAmC;AAC9C,UAAAC,IAAWH,EAAkBT,CAAG;AAEtC,QAAIY,MAAa;AACb,YAAM,IAAIvB,EAAcD,EAAoB,gCAAgC,EAAE,KAAAY,EAAK,CAAA;AAGnF,WAAA,CAACW,KAAU,OAAOA,KAAW,YAAY,OAAO,KAAKA,CAAM,EAAE,WAAW,IACjEC,IAGJhB,GAAegB,GAAUD,CAAM;AAAA,EAAA;AAE9C;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../framework/dist/chunks/capabilities-ff8d3362.js","../../framework/dist/index.js","../../../internal/client-utilities/dist/index.js","../src/get-current-user.ts","../src/get-current-workspace.ts","../src/get-translator.ts"],"sourcesContent":["var ae = Object.defineProperty;\nvar se = (e, n, t) => n in e ? ae(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;\nvar b = (e, n, t) => (se(e, typeof n != \"symbol\" ? n + \"\" : n, t), t);\n/*! js-cookie v3.0.5 | MIT */\nfunction k(e) {\n for (var n = 1; n < arguments.length; n++) {\n var t = arguments[n];\n for (var o in t)\n e[o] = t[o];\n }\n return e;\n}\nvar ce = {\n read: function(e) {\n return e[0] === '\"' && (e = e.slice(1, -1)), e.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent);\n },\n write: function(e) {\n return encodeURIComponent(e).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n );\n }\n};\nfunction j(e, n) {\n function t(i, s, l) {\n if (!(typeof document > \"u\")) {\n l = k({}, n, l), typeof l.expires == \"number\" && (l.expires = new Date(Date.now() + l.expires * 864e5)), l.expires && (l.expires = l.expires.toUTCString()), i = encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);\n var p = \"\";\n for (var c in l)\n l[c] && (p += \"; \" + c, l[c] !== !0 && (p += \"=\" + l[c].split(\";\")[0]));\n return document.cookie = i + \"=\" + e.write(s, i) + p;\n }\n }\n function o(i) {\n if (!(typeof document > \"u\" || arguments.length && !i)) {\n for (var s = document.cookie ? document.cookie.split(\"; \") : [], l = {}, p = 0; p < s.length; p++) {\n var c = s[p].split(\"=\"), d = c.slice(1).join(\"=\");\n try {\n var r = decodeURIComponent(c[0]);\n if (l[r] = e.read(d, r), i === r)\n break;\n } catch {\n }\n }\n return i ? l[i] : l;\n }\n }\n return Object.create(\n {\n set: t,\n get: o,\n remove: function(i, s) {\n t(\n i,\n \"\",\n k({}, s, {\n expires: -1\n })\n );\n },\n withAttributes: function(i) {\n return j(this.converter, k({}, this.attributes, i));\n },\n withConverter: function(i) {\n return j(k({}, this.converter, i), this.attributes);\n }\n },\n {\n attributes: { value: Object.freeze(n) },\n converter: { value: Object.freeze(e) }\n }\n );\n}\nvar V = j(ce, { path: \"/\" }), ue = Object.defineProperty, le = (e, n, t) => n in e ? ue(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t, R = (e, n, t) => (le(e, typeof n != \"symbol\" ? n + \"\" : n, t), t), C = /* @__PURE__ */ ((e) => (e[e.AlreadyInitialized = 1e3] = \"AlreadyInitialized\", e[e.NoAppNameOrKey = 1001] = \"NoAppNameOrKey\", e[e.MissingAppController = 1002] = \"MissingAppController\", e[e.MissingCapabilityOnApp = 1003] = \"MissingCapabilityOnApp\", e[e.MissingManagedObjectProvider = 1004] = \"MissingManagedObjectProvider\", e[e.NoManifest = 1005] = \"NoManifest\", e[e.NoRootElement = 1006] = \"NoRootElement\", e[e.NoView = 1007] = \"NoView\", e[e.CookieKeyNotDefined = 1008] = \"CookieKeyNotDefined\", e[e.CookieCategoryNotAllowed = 1009] = \"CookieCategoryNotAllowed\", e[e.StorageKeyNotDefined = 1010] = \"StorageKeyNotDefined\", e[e.StorageCategoryNotAllowed = 1011] = \"StorageCategoryNotAllowed\", e[e.LocalizationTemplateNotDefined = 1012] = \"LocalizationTemplateNotDefined\", e))(C || {});\nfunction pe(e, n) {\n return Object.entries(n).reduce((t, [o, i]) => t.replaceAll(`{{${o}}}`, i), e);\n}\nconst de = {\n // framework\n 1e3: \"The runtime has already been initialized\",\n 1001: \"App name and/or app key is not defined on global scope\",\n 1002: \"No app controller registered for app '{{app}}'\",\n 1003: \"No capability '{{capability}}' enabled for app '{{app}}'\",\n 1004: \"No managed object provider registered for object '{{object}}'\",\n 1005: \"The current apps manifest is not defined on global scope\",\n 1006: \"Could not find the root element in the DOM\",\n 1007: \"Could not find view with id '{{id}}' on view controller for app '{{app}}'\",\n 1008: \"Cookie key '{{key}}' not present in manifest, cookie has not been set\",\n 1009: \"Cookies categorized as '{{category}}' are not allowed by the user, cookie '{{key}}' has not been set\",\n 1010: \"Storage key '{{key}}' not present in manifest, item has not been stored\",\n 1011: \"Storage categorized as '{{category}}' is not allowed by the user, item '{{key}}' has not been stored\",\n 1012: \"The translation template, referred by the key '{{key}}' is being used in app, but is not defined in the manifest.\",\n // utilities\n 2e3: \"No managed object provider registered for object 'currentUser'\",\n 2001: \"Could not access the gateway when querying 'currentUser'\",\n 2002: \"Could not access the required backend when querying 'currentUser'\",\n 2003: \"Could not locate the authenticated user in the Alliance database\"\n}, fe = \"AllianceError\";\nclass v extends Error {\n constructor(n, t = {}) {\n const o = pe(de[n], t), i = `https://github.com/telia-company/ace-alliance-sdk/wiki/error-codes#${n}`;\n super(o), this.code = n, this.name = fe, this.stack = `[${n}] - ${o}\n` + i;\n }\n}\nfunction ge(e) {\n const n = Object.entries(e).reduce((t, o) => {\n const [i, s] = o;\n return typeof s > \"u\" || (typeof s == \"object\" && s !== null ? t[i] = JSON.stringify(s) : t[i] = s), t;\n }, {});\n return Object.keys(n).length ? `?${new URLSearchParams(n)}` : \"\";\n}\nfunction me() {\n const e = G(), { href: n, search: t } = window.location;\n return n.replace(e, \"\").replace(t, \"\");\n}\nfunction Ce(e = \"\", n = \"\", t = {}) {\n const o = G().replace(location.origin, \"\"), i = ge(t);\n return e ? n ? `${o}/${e}/${n}${i}` : `${o}/${e}${i}` : `${o}${i}`;\n}\nfunction ze() {\n const e = me(), [n = \"\", t = \"\"] = e.split(\"/\").filter((o) => !!o);\n return {\n app: n,\n capability: t\n };\n}\nfunction Ke(e) {\n const { origin: n, pathname: t } = window.location;\n if (e === \"production\") {\n const [o] = t.split(\"/\").filter((i) => !!i);\n return globalThis.__ALLIANCE_RUNTIME_ROOT_URL = `${n}/${o}`;\n }\n return globalThis.__ALLIANCE_RUNTIME_ROOT_URL = n;\n}\nfunction G() {\n return globalThis.__ALLIANCE_RUNTIME_ROOT_URL;\n}\nvar J = /* @__PURE__ */ ((e) => (e[e.AlreadyExists = 0] = \"AlreadyExists\", e[e.ApiGatewayPortDescription = 1] = \"ApiGatewayPortDescription\", e[e.ApiServerModeDescription = 2] = \"ApiServerModeDescription\", e[e.AppConfigurationPath = 3] = \"AppConfigurationPath\", e[e.AppCreated = 4] = \"AppCreated\", e[e.AppEntryBuildOptionDescription = 5] = \"AppEntryBuildOptionDescription\", e[e.AppNameInquiry = 6] = \"AppNameInquiry\", e[e.BuildDescription = 7] = \"BuildDescription\", e[e.BuildModeOptionDescription = 8] = \"BuildModeOptionDescription\", e[e.BuildWatchDescription = 9] = \"BuildWatchDescription\", e[e.CreateAppDescription = 10] = \"CreateAppDescription\", e[e.CreateWorkspaceDescription = 11] = \"CreateWorkspaceDescription\", e[e.DevServerOpenDescription = 12] = \"DevServerOpenDescription\", e[e.DevServerPortDescription = 13] = \"DevServerPortDescription\", e[e.DevServerLoggingDescription = 14] = \"DevServerLoggingDescription\", e[e.Done = 15] = \"Done\", e[e.FetchPackageVersionError = 16] = \"FetchPackageVersionError\", e[e.ManifestEntryBuildOptionDescription = 17] = \"ManifestEntryBuildOptionDescription\", e[e.MissingTranslationKey = 18] = \"MissingTranslationKey\", e[e.NoAppName = 19] = \"NoAppName\", e[e.NoAppNameFound = 20] = \"NoAppNameFound\", e[e.NoAppOrWorkspaceInCurrentDirectory = 21] = \"NoAppOrWorkspaceInCurrentDirectory\", e[e.NoWorkspaceName = 22] = \"NoWorkspaceName\", e[e.OperationCancelled = 23] = \"OperationCancelled\", e[e.ServeDescription = 24] = \"ServeDescription\", e[e.ServedStopped = 25] = \"ServedStopped\", e[e.ServerGatewayMode = 26] = \"ServerGatewayMode\", e[e.ServerMode = 27] = \"ServerMode\", e[e.ServerModeInquiry = 28] = \"ServerModeInquiry\", e[e.ServerProxyMode = 29] = \"ServerProxyMode\", e[e.StopServerInstructions = 30] = \"StopServerInstructions\", e[e.TemplateFrameworkInquiry = 31] = \"TemplateFrameworkInquiry\", e[e.TemplateLanguageInquiry = 32] = \"TemplateLanguageInquiry\", e[e.UnrecognizedCommand = 33] = \"UnrecognizedCommand\", e[e.WorkspaceCreated = 34] = \"WorkspaceCreated\", e[e.WorkspaceNameInquiry = 35] = \"WorkspaceNameInquiry\", e))(J || {});\nconst ye = {\n 15: \"Done\",\n 22: \"No workspace name provided!\",\n 19: \"No app name provided!\",\n 0: \"File or directory '{0}' already exists!\",\n 21: \"Could not find any app entry file at '{0}'!\",\n 33: \"Unrecognized command(s) {0}!\",\n 34: \"Workspace was created at path '{0}'!\",\n 4: \"App was created at path '{0}'!\",\n 25: \"Server stopped.\",\n 11: \"Creates an Alliance Workspace in the current directory.\",\n 10: \"Creates an Alliance Application in the current directory or Alliance Workspace.\",\n 24: \"Starts a Alliance development server using the current directory package.json.\",\n 7: \"Builds an Alliance Application using Vite.\",\n 35: \"Enter the name of your workspace\",\n 28: \"Which server mode do you want to use?\",\n 6: \"Enter the name of your app\",\n 18: \"No translation key provided!\",\n 23: \"Operation cancelled.\",\n 30: `Press CTRL + C to stop the server.\n`,\n 32: \"Select preferred language\",\n 31: \"Select preferred framework template\",\n 13: \"The port that the dev server should use.\",\n 14: \"Whether the dev server and browser console should output more log information or not (false).\",\n 1: \"The port that the api gateway should use.\",\n 2: \"Which components to start. [server|server-proxy|server-gateway].\",\n 12: \"Whether the dev server should automatically open in your browser or not.\",\n 9: \"Whether the build should start watching and rebuild when files change or not.\",\n 5: \"The entry file for the app (./src/app).\",\n 17: \"The entry file for the app manifest (./src/manifest).\",\n 8: \"Which mode to use when building the app.\",\n 16: \"Failed to fetch package info from the NPM registry for package '${0}'!\",\n 20: \"Could not find app name in manifest.\",\n 3: \"The path to the app configuration file.\",\n 27: \"Server\",\n 29: \"Server with proxy\",\n 26: \"Server with gateway\"\n}, F = class {\n};\nR(F, \"getTranslations\", () => ye), R(F, \"getTranslation\", (e, ...n) => {\n const t = F.getTranslations()[e];\n if (!t)\n throw new Error(`Could not find text with given key '${e}'.`);\n return n.reduce(\n (o, i, s) => o.toString().replace(`{${s}}`, i.toString()),\n t\n ).toString();\n}), R(F, \"get\", (e = J.MissingTranslationKey, ...n) => F.getTranslation(e, ...n));\nfunction he(e) {\n return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, \"default\") ? e.default : e;\n}\nvar $ = { exports: {} }, _, K;\nfunction we() {\n if (K)\n return _;\n K = 1;\n var e = 1e3, n = e * 60, t = n * 60, o = t * 24, i = o * 7, s = o * 365.25;\n _ = function(r, a) {\n a = a || {};\n var u = typeof r;\n if (u === \"string\" && r.length > 0)\n return l(r);\n if (u === \"number\" && isFinite(r))\n return a.long ? c(r) : p(r);\n throw new Error(\n \"val is not a non-empty string or a valid number. val=\" + JSON.stringify(r)\n );\n };\n function l(r) {\n if (r = String(r), !(r.length > 100)) {\n var a = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n r\n );\n if (a) {\n var u = parseFloat(a[1]), h = (a[2] || \"ms\").toLowerCase();\n switch (h) {\n case \"years\":\n case \"year\":\n case \"yrs\":\n case \"yr\":\n case \"y\":\n return u * s;\n case \"weeks\":\n case \"week\":\n case \"w\":\n return u * i;\n case \"days\":\n case \"day\":\n case \"d\":\n return u * o;\n case \"hours\":\n case \"hour\":\n case \"hrs\":\n case \"hr\":\n case \"h\":\n return u * t;\n case \"minutes\":\n case \"minute\":\n case \"mins\":\n case \"min\":\n case \"m\":\n return u * n;\n case \"seconds\":\n case \"second\":\n case \"secs\":\n case \"sec\":\n case \"s\":\n return u * e;\n case \"milliseconds\":\n case \"millisecond\":\n case \"msecs\":\n case \"msec\":\n case \"ms\":\n return u;\n default:\n return;\n }\n }\n }\n }\n function p(r) {\n var a = Math.abs(r);\n return a >= o ? Math.round(r / o) + \"d\" : a >= t ? Math.round(r / t) + \"h\" : a >= n ? Math.round(r / n) + \"m\" : a >= e ? Math.round(r / e) + \"s\" : r + \"ms\";\n }\n function c(r) {\n var a = Math.abs(r);\n return a >= o ? d(r, a, o, \"day\") : a >= t ? d(r, a, t, \"hour\") : a >= n ? d(r, a, n, \"minute\") : a >= e ? d(r, a, e, \"second\") : r + \" ms\";\n }\n function d(r, a, u, h) {\n var f = a >= u * 1.5;\n return Math.round(r / u) + \" \" + h + (f ? \"s\" : \"\");\n }\n return _;\n}\nfunction ve(e) {\n t.debug = t, t.default = t, t.coerce = c, t.disable = s, t.enable = i, t.enabled = l, t.humanize = we(), t.destroy = d, Object.keys(e).forEach((r) => {\n t[r] = e[r];\n }), t.names = [], t.skips = [], t.formatters = {};\n function n(r) {\n let a = 0;\n for (let u = 0; u < r.length; u++)\n a = (a << 5) - a + r.charCodeAt(u), a |= 0;\n return t.colors[Math.abs(a) % t.colors.length];\n }\n t.selectColor = n;\n function t(r) {\n let a, u = null, h, f;\n function g(...m) {\n if (!g.enabled)\n return;\n const y = g, N = Number(/* @__PURE__ */ new Date()), re = N - (a || N);\n y.diff = re, y.prev = a, y.curr = N, a = N, m[0] = t.coerce(m[0]), typeof m[0] != \"string\" && m.unshift(\"%O\");\n let S = 0;\n m[0] = m[0].replace(/%([a-zA-Z%])/g, (T, oe) => {\n if (T === \"%%\")\n return \"%\";\n S++;\n const z = t.formatters[oe];\n if (typeof z == \"function\") {\n const ie = m[S];\n T = z.call(y, ie), m.splice(S, 1), S--;\n }\n return T;\n }), t.formatArgs.call(y, m), (y.log || t.log).apply(y, m);\n }\n return g.namespace = r, g.useColors = t.useColors(), g.color = t.selectColor(r), g.extend = o, g.destroy = t.destroy, Object.defineProperty(g, \"enabled\", {\n enumerable: !0,\n configurable: !1,\n get: () => u !== null ? u : (h !== t.namespaces && (h = t.namespaces, f = t.enabled(r)), f),\n set: (m) => {\n u = m;\n }\n }), typeof t.init == \"function\" && t.init(g), g;\n }\n function o(r, a) {\n const u = t(this.namespace + (typeof a > \"u\" ? \":\" : a) + r);\n return u.log = this.log, u;\n }\n function i(r) {\n t.save(r), t.namespaces = r, t.names = [], t.skips = [];\n let a;\n const u = (typeof r == \"string\" ? r : \"\").split(/[\\s,]+/), h = u.length;\n for (a = 0; a < h; a++)\n u[a] && (r = u[a].replace(/\\*/g, \".*?\"), r[0] === \"-\" ? t.skips.push(new RegExp(\"^\" + r.slice(1) + \"$\")) : t.names.push(new RegExp(\"^\" + r + \"$\")));\n }\n function s() {\n const r = [\n ...t.names.map(p),\n ...t.skips.map(p).map((a) => \"-\" + a)\n ].join(\",\");\n return t.enable(\"\"), r;\n }\n function l(r) {\n if (r[r.length - 1] === \"*\")\n return !0;\n let a, u;\n for (a = 0, u = t.skips.length; a < u; a++)\n if (t.skips[a].test(r))\n return !1;\n for (a = 0, u = t.names.length; a < u; a++)\n if (t.names[a].test(r))\n return !0;\n return !1;\n }\n function p(r) {\n return r.toString().substring(2, r.toString().length - 2).replace(/\\.\\*\\?$/, \"*\");\n }\n function c(r) {\n return r instanceof Error ? r.stack || r.message : r;\n }\n function d() {\n console.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\");\n }\n return t.enable(t.load()), t;\n}\nvar Ae = ve;\n(function(e, n) {\n n.formatArgs = o, n.save = i, n.load = s, n.useColors = t, n.storage = l(), n.destroy = (() => {\n let c = !1;\n return () => {\n c || (c = !0, console.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\"));\n };\n })(), n.colors = [\n \"#0000CC\",\n \"#0000FF\",\n \"#0033CC\",\n \"#0033FF\",\n \"#0066CC\",\n \"#0066FF\",\n \"#0099CC\",\n \"#0099FF\",\n \"#00CC00\",\n \"#00CC33\",\n \"#00CC66\",\n \"#00CC99\",\n \"#00CCCC\",\n \"#00CCFF\",\n \"#3300CC\",\n \"#3300FF\",\n \"#3333CC\",\n \"#3333FF\",\n \"#3366CC\",\n \"#3366FF\",\n \"#3399CC\",\n \"#3399FF\",\n \"#33CC00\",\n \"#33CC33\",\n \"#33CC66\",\n \"#33CC99\",\n \"#33CCCC\",\n \"#33CCFF\",\n \"#6600CC\",\n \"#6600FF\",\n \"#6633CC\",\n \"#6633FF\",\n \"#66CC00\",\n \"#66CC33\",\n \"#9900CC\",\n \"#9900FF\",\n \"#9933CC\",\n \"#9933FF\",\n \"#99CC00\",\n \"#99CC33\",\n \"#CC0000\",\n \"#CC0033\",\n \"#CC0066\",\n \"#CC0099\",\n \"#CC00CC\",\n \"#CC00FF\",\n \"#CC3300\",\n \"#CC3333\",\n \"#CC3366\",\n \"#CC3399\",\n \"#CC33CC\",\n \"#CC33FF\",\n \"#CC6600\",\n \"#CC6633\",\n \"#CC9900\",\n \"#CC9933\",\n \"#CCCC00\",\n \"#CCCC33\",\n \"#FF0000\",\n \"#FF0033\",\n \"#FF0066\",\n \"#FF0099\",\n \"#FF00CC\",\n \"#FF00FF\",\n \"#FF3300\",\n \"#FF3333\",\n \"#FF3366\",\n \"#FF3399\",\n \"#FF33CC\",\n \"#FF33FF\",\n \"#FF6600\",\n \"#FF6633\",\n \"#FF9900\",\n \"#FF9933\",\n \"#FFCC00\",\n \"#FFCC33\"\n ];\n function t() {\n return typeof window < \"u\" && window.process && (window.process.type === \"renderer\" || window.process.__nwjs) ? !0 : typeof navigator < \"u\" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/) ? !1 : typeof document < \"u\" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773\n typeof window < \"u\" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n typeof navigator < \"u\" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker\n typeof navigator < \"u\" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n }\n function o(c) {\n if (c[0] = (this.useColors ? \"%c\" : \"\") + this.namespace + (this.useColors ? \" %c\" : \" \") + c[0] + (this.useColors ? \"%c \" : \" \") + \"+\" + e.exports.humanize(this.diff), !this.useColors)\n return;\n const d = \"color: \" + this.color;\n c.splice(1, 0, d, \"color: inherit\");\n let r = 0, a = 0;\n c[0].replace(/%[a-zA-Z%]/g, (u) => {\n u !== \"%%\" && (r++, u === \"%c\" && (a = r));\n }), c.splice(a, 0, d);\n }\n n.log = console.debug || console.log || (() => {\n });\n function i(c) {\n try {\n c ? n.storage.setItem(\"debug\", c) : n.storage.removeItem(\"debug\");\n } catch {\n }\n }\n function s() {\n let c;\n try {\n c = n.storage.getItem(\"debug\");\n } catch {\n }\n return !c && typeof process < \"u\" && \"env\" in process && (c = process.env.DEBUG), c;\n }\n function l() {\n try {\n return localStorage;\n } catch {\n }\n }\n e.exports = Ae(n);\n const { formatters: p } = e.exports;\n p.j = function(c) {\n try {\n return JSON.stringify(c);\n } catch (d) {\n return \"[UnexpectedJSONParseError]: \" + d.message;\n }\n };\n})($, $.exports);\nvar be = $.exports;\nconst Fe = /* @__PURE__ */ he(be);\nfunction Z(e) {\n return e.type === \"Logic\";\n}\nvar U = /* @__PURE__ */ ((e) => (e.View = \"View\", e.Logic = \"Logic\", e))(U || {});\nclass Ne {\n constructor(n) {\n b(this, \"type\", \"Logic\");\n b(this, \"execute\");\n this.execute = n;\n }\n}\nfunction I() {\n try {\n return ALLIANCE_APP_NAME;\n } catch {\n }\n}\nfunction Se() {\n try {\n return ALLIANCE_APP_KEY;\n } catch {\n }\n}\nfunction ke() {\n const e = {\n environment: \"production\",\n logging: !1\n };\n try {\n return ALLIANCE_ENVIRONMENT || e;\n } catch {\n return e;\n }\n}\nfunction H() {\n if (O())\n return Promise.resolve();\n const e = 2e4, n = 5;\n return new Promise((t, o) => {\n const i = () => {\n clearInterval(l), clearTimeout(s);\n }, s = setTimeout(() => {\n i(), o(new Error(`Runtime not initialized after ${e}ms`));\n }, e), l = setInterval(() => {\n O() && (i(), t());\n }, n);\n });\n}\nfunction O() {\n return w(\n \"RUNTIME_INITIALIZED\"\n /* RuntimeInitialized */\n );\n}\nfunction w(e = \"\") {\n return globalThis[Q(e)];\n}\nfunction Y(e, n) {\n return globalThis[Q(e)] = n;\n}\nfunction Q(e) {\n return `__ALLIANCE_${e}`;\n}\nfunction X(e) {\n return `APP_CONTROLLER_KEY_${e}`;\n}\nvar E = /* @__PURE__ */ ((e) => (e.RuntimeInitialized = \"RUNTIME_INITIALIZED\", e.RuntimeApps = \"RUNTIME_APPS\", e.RuntimeManifests = \"RUNTIME_MANIFESTS\", e))(E || {});\nfunction Ve() {\n const e = document.createElement(\"div\");\n return e.id = \"root\", document.body.append(e), e;\n}\nfunction Oe() {\n const e = document.getElementById(\"root\");\n if (!e)\n throw new v(C.NoRootElement);\n return e;\n}\nfunction Ie(e) {\n return {\n capabilities: \"#25BCDD\",\n \"managed-objects\": \"#FC7A12\",\n controller: \"#F635C6\",\n proxy: \"#48E70B\",\n views: \"#F6D72E\",\n system: \"#D52C2E\"\n }[e];\n}\nconst q = /* @__PURE__ */ new Map();\nfunction M(e) {\n let n = q.get(e);\n return n || (n = Fe(e === \"system\" ? \"[system]\" : `[${I()}] ${e}`), n.color = Ie(e), n.enabled = Ee(), q.set(e, n), n);\n}\nfunction Ee() {\n const e = ke(), n = V.get(\"logging\");\n return e.environment === \"development\" && !!e.logging || n === \"true\";\n}\nlet x = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((n, t) => (t &= 63, t < 36 ? n += t.toString(36) : t < 62 ? n += (t - 26).toString(36).toUpperCase() : t > 62 ? n += \"-\" : n += \"_\", n), \"\");\nconst Me = M(\"controller\");\nfunction De() {\n const e = I(), n = Se();\n if (!e || !n)\n throw new v(C.NoAppNameOrKey);\n const t = X(e);\n return w(t) ? w(t) : (Y(t, n), n);\n}\nfunction ee() {\n const e = De();\n if (w(e))\n return w(e);\n const n = I();\n Me(\"creating app controller\");\n const t = {\n name: n,\n capabilities: {\n app: /* @__PURE__ */ new Map(),\n system: /* @__PURE__ */ new Map()\n },\n managedObjects: {\n providers: /* @__PURE__ */ new Map(),\n watchers: /* @__PURE__ */ new Map()\n },\n views: Le()\n };\n return Y(e, t), t;\n}\nasync function B(e) {\n await H();\n const n = X(e), t = w(n);\n if (!t)\n return;\n const o = w(t);\n if (o)\n return o;\n}\nasync function Ge() {\n return await H(), (await Promise.all(\n w(E.RuntimeApps).map((n) => B(n))\n )).filter((n) => !!n);\n}\nconst P = M(\"views\");\nfunction te(e) {\n return e.type === U.View;\n}\nvar D = /* @__PURE__ */ ((e) => (e.Main = \"main\", e.Aside = \"aside\", e.Body = \"body\", e))(D || {});\nclass W {\n constructor(n, t) {\n b(this, \"type\", U.View);\n b(this, \"execute\");\n this.container = t, this.execute = n;\n }\n}\nfunction Le() {\n const e = I(), n = /* @__PURE__ */ new Map(), t = async (i) => {\n const s = n.get(i);\n if (P(\"unmounting view - view: %O\", s), !s)\n throw new v(C.NoView, { id: i, app: e });\n s.unmount && await s.unmount(), s.element.replaceChildren(), s.element.removeAttribute(\"app\"), s.element.removeAttribute(\"view-id\"), n.delete(i), s.element.remove();\n };\n return {\n unmount: t,\n mount: async (i, s, l, p) => {\n if (P(\"mounting view - operation: %O, capability: %o, args: %O\", i, l, p), i.container === \"main\") {\n const f = Ce(e, l, p), g = location.href.replace(location.origin, \"\");\n f !== g && (P(\"syncing url - data: %O, url: %o\", p, f), history.pushState(p, \"\", f));\n }\n if (i.container === \"aside\" || i.container === \"main\") {\n const [f] = Array.from(document.getElementsByTagName(i.container)), g = f == null ? void 0 : f.getAttribute(\"app\"), m = f == null ? void 0 : f.getAttribute(\"view-id\");\n if (g && m) {\n const y = await B(g);\n await (y == null ? void 0 : y.views.unmount(m));\n }\n }\n let c;\n const d = Oe();\n i.container === \"aside\" ? (c = document.createElement(\n \"aside\"\n /* Aside */\n ), d.prepend(c)) : i.container === \"body\" ? (c = document.createElement(\"div\"), d.append(c)) : (c = document.createElement(\n \"main\"\n /* Main */\n ), d.append(c));\n const r = Te(), a = x(8);\n c.setAttribute(\"app\", e), c.setAttribute(\"view-id\", a);\n const u = await i.execute(c, (f) => {\n s(f), t(a);\n });\n r.remove();\n const h = {\n element: c,\n unmount: u\n };\n n.set(a, h);\n }\n };\n}\nfunction Te() {\n const e = document.createElement(\"div\");\n return e.id = \"app-loader\", e.innerHTML = `\n <div>\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </div>\n `, document.body.append(e), e;\n}\nfunction Je(e) {\n return new W(e, D.Main);\n}\nfunction Ze(e) {\n return new W(e, D.Body);\n}\nfunction He(e) {\n return new W(e, D.Aside);\n}\nfunction Ye(e) {\n return new Ne(e);\n}\nfunction Re() {\n return structuredClone(w(E.RuntimeManifests));\n}\nfunction Qe() {\n try {\n return ALLIANCE_APP_MANIFEST;\n } catch {\n }\n}\nconst A = M(\"system\");\nfunction _e(e) {\n const n = e.split(\";\")[0];\n return decodeURIComponent(n.split(\"=\")[0].trim());\n}\nconst Pe = \"alliance-cookie-consent\";\nfunction je() {\n let e = [\"necessary\"];\n const n = V.get(Pe);\n if (n) {\n const t = n.split(\",\"), o = /* @__PURE__ */ new Set([...e, ...t]);\n e = Array.from(o);\n }\n return e;\n}\nfunction $e() {\n return Re().reduce((n, t) => {\n if (!t.storage)\n return n;\n for (const [o, i] of Object.entries(t.storage))\n n[o] = i;\n return n;\n }, {});\n}\nfunction Xe() {\n const e = $e();\n function n(t, o, i) {\n const s = e[t];\n if (!s)\n throw new v(o, {\n key: t\n });\n if (!je().includes(s.category))\n throw new v(i, {\n key: t,\n category: s.category\n });\n return !0;\n }\n try {\n const t = Object.getOwnPropertyDescriptor(Document.prototype, \"cookie\") || Object.getOwnPropertyDescriptor(HTMLDocument.prototype, \"cookie\");\n t && t.configurable && (A(\"registering override for document.cookie setter\"), Object.defineProperty(document, \"cookie\", {\n get: function() {\n var o;\n return (o = t == null ? void 0 : t.get) == null ? void 0 : o.call(document);\n },\n set: function(o) {\n var i;\n if (o) {\n const s = _e(o);\n try {\n n(\n s,\n C.CookieKeyNotDefined,\n C.CookieCategoryNotAllowed\n );\n } catch (l) {\n console.error(l);\n return;\n }\n }\n return (i = t == null ? void 0 : t.set) == null ? void 0 : i.call(document, o);\n }\n }));\n } catch (t) {\n A(\"error occurred when attempting to override document.cookie setter - error: %O\", t);\n }\n try {\n const t = window.CookieStore.prototype.set;\n t && (A(\"registering override for cookieStore.set function\"), window.CookieStore.prototype.set = async function(o) {\n const i = typeof o == \"object\" ? o.name : o;\n try {\n n(\n i,\n C.CookieKeyNotDefined,\n C.CookieCategoryNotAllowed\n );\n } catch (s) {\n console.error(s);\n return;\n }\n return t.apply(this, arguments);\n });\n } catch (t) {\n A(\"error occurred when attempting to cookieStore.set - error: %O\", t);\n }\n try {\n const t = window.Storage.prototype.setItem;\n A(\"registering override for sessionStorage.setItem and localStorage.setItem\"), window.Storage.prototype.setItem = function(o, i) {\n try {\n n(\n o,\n C.StorageKeyNotDefined,\n C.StorageCategoryNotAllowed\n );\n } catch (s) {\n console.error(s);\n return;\n }\n return t.apply(this, arguments);\n };\n } catch (t) {\n A(\n \"error occurred when attempting to sessionStorage.setItem and localStorage.setItem - error: %O\",\n t\n );\n }\n}\nconst L = M(\"capabilities\");\nasync function ne(e, n, t) {\n const o = await B(e);\n if (!o)\n throw new v(C.MissingAppController, { app: e });\n const s = (t === \"app\" ? o.capabilities.app : o.capabilities.system).get(n);\n if (!s)\n throw new v(C.MissingCapabilityOnApp, {\n capability: n,\n app: e\n });\n return { controller: o, handler: s };\n}\nfunction Ue(e) {\n return (n, t, o) => (e(\"requesting capability - app: %o, capability: %o, args: %O\", n, t, o), {\n id: x(8),\n result: new Promise(async (i) => {\n const { controller: s, handler: l } = await ne(\n n,\n t,\n \"app\"\n ), p = await l(o);\n Z(p) ? await p.execute(i) : te(p) && await s.views.mount(p, i, t, o), e(\n \"resolved capability - app: %o, capability: %o, args: %O\",\n n,\n t,\n o\n );\n })\n });\n}\nfunction et(e, n) {\n if (O())\n throw new v(C.AlreadyInitialized);\n const t = ee();\n L(\"enabling capability - capability: %o, handler: %O\", e, n), t.capabilities.app.set(e, n);\n}\nfunction tt(e, n) {\n if (O())\n throw new v(C.AlreadyInitialized);\n const t = ee();\n L(\"enabling system capability - capability: %o, handler: %O\", e, n), t.capabilities.system.set(e, n);\n}\nfunction xe(e) {\n return (n, t, o) => {\n e(\n \"requesting system capability - capability: %o, args: %O, targetApp: %o\",\n n,\n t,\n o\n );\n const i = [], s = w(E.RuntimeApps);\n for (const l of s) {\n if (o && l !== o)\n continue;\n const p = new Promise(async (c) => {\n const { controller: d, handler: r } = await ne(\n l,\n n,\n \"system\"\n ), a = await r(t);\n Z(a) ? await a.execute(c) : te(a) && await d.views.mount(a, c, n, t), e(\n \"resolved system capability - capability: %o, args: %O, targetApp: %o\",\n n,\n t,\n o\n );\n });\n i.push({\n id: x(8),\n result: p\n });\n }\n return i;\n };\n}\nconst nt = xe(L), rt = Ue(L);\nexport {\n Pe as A,\n v as I,\n C as N,\n Ke as P,\n E as S,\n ze as W,\n Ge as a,\n Qe as b,\n M as c,\n ke as d,\n et as e,\n tt as f,\n ee as g,\n nt as h,\n O as i,\n He as j,\n Ze as k,\n Ye as l,\n Je as m,\n Re as n,\n Ve as o,\n xe as p,\n B as q,\n rt as r,\n Ue as s,\n Xe as t,\n w as u,\n Y as w\n};\n//# sourceMappingURL=capabilities-ff8d3362.js.map\n","import { c as C, i as b, I as p, N as g, g as P, a as S, b as A, d as N } from \"./chunks/capabilities-ff8d3362.js\";\nimport { A as _, j as V, k as z, l as K, m as Q, e as W, f as B, n as J, r as F, h as M } from \"./chunks/capabilities-ff8d3362.js\";\nfunction $(e) {\n return e;\n}\nconst c = C(\"managed-objects\");\nfunction I(e, n) {\n return c(\"querying objects - object: %o, args: %O\", e, n), {\n async resolve() {\n return c(\"resolving query - object: %o, args: %O\", e, n), await (await m(e)).managedObjects.providers.get(e)(n);\n },\n async watch(r) {\n c(\"adding watcher - object: %o, args: %O\", e, n), (await m(e)).managedObjects.watchers.get(e).push(r);\n }\n };\n}\nfunction U(e, n) {\n if (b())\n throw new p(g.AlreadyInitialized);\n c(\"registering provider - object: %o, handler: %O\", e, n);\n const r = P();\n return r.managedObjects.providers.set(e, n), r.managedObjects.watchers.set(e, []), function() {\n c(\"triggering watchers - object: %o, handler: %O\", e, n);\n const t = r.managedObjects.watchers.get(e) || [];\n for (const a of t)\n a();\n };\n}\nasync function m(e) {\n const r = (await S()).find(\n (t) => t.managedObjects.providers.has(e) && t.managedObjects.watchers.has(e)\n );\n if (!r)\n throw new p(g.MissingManagedObjectProvider, { object: e });\n return r;\n}\nconst y = C(\"proxy\");\nvar v = /* @__PURE__ */ ((e) => (e.Get = \"GET\", e.Head = \"HEAD\", e.Post = \"POST\", e.Put = \"PUT\", e.Delete = \"DELETE\", e.Connect = \"CONNECT\", e.Options = \"OPTIONS\", e.Trace = \"TRACE\", e.Patch = \"PATCH\", e))(v || {});\nfunction E(e, n, r = []) {\n const t = new URL(e, location.origin);\n if (r.find((o) => q(o, e))) {\n const s = \"/-/gateway\" + (t.pathname !== \"/\" ? t.pathname : \"/\") + (n ? t.search : \"\");\n return new URL(s, location.origin);\n }\n return t;\n}\nfunction R(e = {}) {\n if (Object.keys(e).length === 0)\n return \"\";\n const n = Object.entries(e).reduce(\n (t, [a, o]) => (typeof o > \"u\" || o === null || (t[a] = o.toString()), t),\n {}\n );\n return `?${new URLSearchParams(n).toString()}`;\n}\nfunction j(e) {\n return e.replaceAll(/[-\\/\\\\^$*+?.()|[\\]{}]/g, \"\\\\$&\");\n}\nfunction q(e, n) {\n const r = j(e);\n return new RegExp(`^${r.replaceAll(\"\\\\?\", \".?\").replaceAll(\"\\\\*\", \".*\")}`, \"i\").test(n);\n}\nfunction x(e, n) {\n const r = A();\n if (!r)\n throw new p(g.NoManifest);\n const { name: t, endpoints: a = [] } = r;\n y(\"creating request - input: %o, options: %O\", e, { lots: 1, of: { properties: 123 } });\n const o = E(e.toString(), !0, a), s = new Request(o, n), { environment: l } = N();\n if (l === \"production\") {\n const u = location.pathname.split(\"/\").filter((f) => !!f);\n s.headers.set(\"Alliance-Target-Workspace\", u[0]);\n }\n return s.headers.set(\"Alliance-Target-Url\", e.toString()), s.headers.set(\"Alliance-Target-App\", t), y(\"created request - request: %O\", s), s;\n}\nfunction k() {\n const e = A();\n if (!e)\n throw new p(g.NoManifest);\n const { name: n, endpoints: r = [] } = e;\n async function t(a, o, s = {}) {\n const { body: l, query: u, headers: f } = s, T = E(a, !1, r), d = R(u), O = {\n \"Alliance-Target-Url\": `${a}${d}`,\n // FUTURE TODO: Is there a better name for this?\n \"Alliance-Target-App\": n\n }, w = location.pathname.split(\"/\").filter((i) => !!i);\n w.length > 1 && (O[\n \"Alliance-Target-Workspace\"\n /* TargetWorkspace */\n ] = w[0]);\n const h = {\n method: o,\n headers: {\n \"Content-Type\": \"application/json\",\n ...f,\n ...O\n }\n };\n return l && (h.body = JSON.stringify(l)), fetch(`${T}${d}`, h).then((i) => i.json()).catch((i) => {\n throw i;\n });\n }\n return {\n post: (a, o) => t(a, \"POST\", o),\n put: (a, o) => t(a, \"PUT\", o),\n delete: (a, o) => t(a, \"DELETE\", o),\n get: (a, o) => t(a, \"GET\", o),\n create: x\n };\n}\nexport {\n _ as ALLIANCE_COOKIE_CONSENT_COOKIE_NAME,\n v as HttpMethods,\n V as createAsideViewOperation,\n z as createBodyViewOperation,\n K as createOperation,\n k as createProxy,\n x as createRequest,\n Q as createViewOperation,\n $ as defineConfig,\n W as enableCapability,\n B as enableSystemCapability,\n A as getAppManifest,\n J as getAppManifests,\n U as provideObjects,\n I as queryObjects,\n F as runCapability,\n M as runSystemCapability\n};\n//# sourceMappingURL=index.js.map\n","var g = Object.defineProperty;\nvar v = (e, t, r) => t in e ? g(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;\nvar a = (e, t, r) => (v(e, typeof t != \"symbol\" ? t + \"\" : t, r), r);\nvar N = /* @__PURE__ */ ((e) => (e[e.AlreadyInitialized = 1e3] = \"AlreadyInitialized\", e[e.NoAppNameOrKey = 1001] = \"NoAppNameOrKey\", e[e.MissingAppController = 1002] = \"MissingAppController\", e[e.MissingCapabilityOnApp = 1003] = \"MissingCapabilityOnApp\", e[e.MissingManagedObjectProvider = 1004] = \"MissingManagedObjectProvider\", e[e.NoManifest = 1005] = \"NoManifest\", e[e.NoRootElement = 1006] = \"NoRootElement\", e[e.NoView = 1007] = \"NoView\", e[e.CookieKeyNotDefined = 1008] = \"CookieKeyNotDefined\", e[e.CookieCategoryNotAllowed = 1009] = \"CookieCategoryNotAllowed\", e[e.StorageKeyNotDefined = 1010] = \"StorageKeyNotDefined\", e[e.StorageCategoryNotAllowed = 1011] = \"StorageCategoryNotAllowed\", e[e.LocalizationTemplateNotDefined = 1012] = \"LocalizationTemplateNotDefined\", e))(N || {}), A = /* @__PURE__ */ ((e) => (e[e.CurrentUserMissingProvider = 2e3] = \"CurrentUserMissingProvider\", e[e.CurrentUserGatewayNotStarted = 2001] = \"CurrentUserGatewayNotStarted\", e[e.CurrentUserMissingBackend = 2002] = \"CurrentUserMissingBackend\", e[e.CurrentUserMissingInDatabase = 2003] = \"CurrentUserMissingInDatabase\", e))(A || {});\nfunction m(e, t) {\n return Object.entries(t).reduce((r, [i, n]) => r.replaceAll(`{{${i}}}`, n), e);\n}\nconst S = {\n // framework\n 1e3: \"The runtime has already been initialized\",\n 1001: \"App name and/or app key is not defined on global scope\",\n 1002: \"No app controller registered for app '{{app}}'\",\n 1003: \"No capability '{{capability}}' enabled for app '{{app}}'\",\n 1004: \"No managed object provider registered for object '{{object}}'\",\n 1005: \"The current apps manifest is not defined on global scope\",\n 1006: \"Could not find the root element in the DOM\",\n 1007: \"Could not find view with id '{{id}}' on view controller for app '{{app}}'\",\n 1008: \"Cookie key '{{key}}' not present in manifest, cookie has not been set\",\n 1009: \"Cookies categorized as '{{category}}' are not allowed by the user, cookie '{{key}}' has not been set\",\n 1010: \"Storage key '{{key}}' not present in manifest, item has not been stored\",\n 1011: \"Storage categorized as '{{category}}' is not allowed by the user, item '{{key}}' has not been stored\",\n 1012: \"The translation template, referred by the key '{{key}}' is being used in app, but is not defined in the manifest.\",\n // utilities\n 2e3: \"No managed object provider registered for object 'currentUser'\",\n 2001: \"Could not access the gateway when querying 'currentUser'\",\n 2002: \"Could not access the required backend when querying 'currentUser'\",\n 2003: \"Could not locate the authenticated user in the Alliance database\"\n}, d = \"AllianceError\";\nclass I extends Error {\n constructor(t, r = {}) {\n const i = m(S[t], r), n = `https://github.com/telia-company/ace-alliance-sdk/wiki/error-codes#${t}`;\n super(i), this.code = t, this.name = d, this.stack = `[${t}] - ${i}\n` + n;\n }\n}\nfunction k(e) {\n return !!e.code && e.name === d;\n}\nfunction b(e) {\n const r = Object.entries(e).reduce((i, n) => {\n const [o, p] = n;\n return typeof p > \"u\" || (typeof p == \"object\" && p !== null ? i[o] = JSON.stringify(p) : i[o] = p), i;\n }, {});\n return Object.keys(r).length ? `?${new URLSearchParams(r)}` : \"\";\n}\nfunction D() {\n const e = l(), { href: t, search: r } = window.location;\n return t.replace(e, \"\").replace(r, \"\");\n}\nfunction C(e = \"\", t = \"\", r = {}) {\n const i = l().replace(location.origin, \"\"), n = b(r);\n return e ? t ? `${i}/${e}/${t}${n}` : `${i}/${e}${n}` : `${i}${n}`;\n}\nfunction W() {\n const e = D(), [t = \"\", r = \"\"] = e.split(\"/\").filter((i) => !!i);\n return {\n app: t,\n capability: r\n };\n}\nfunction P(e) {\n const { origin: t, pathname: r } = window.location;\n if (e === \"production\") {\n const [i] = r.split(\"/\").filter((n) => !!n);\n return globalThis.__ALLIANCE_RUNTIME_ROOT_URL = `${t}/${i}`;\n }\n return globalThis.__ALLIANCE_RUNTIME_ROOT_URL = t;\n}\nfunction l() {\n return globalThis.__ALLIANCE_RUNTIME_ROOT_URL;\n}\nvar s = /* @__PURE__ */ ((e) => (e[e.AlreadyExists = 0] = \"AlreadyExists\", e[e.ApiGatewayPortDescription = 1] = \"ApiGatewayPortDescription\", e[e.ApiServerModeDescription = 2] = \"ApiServerModeDescription\", e[e.AppConfigurationPath = 3] = \"AppConfigurationPath\", e[e.AppCreated = 4] = \"AppCreated\", e[e.AppEntryBuildOptionDescription = 5] = \"AppEntryBuildOptionDescription\", e[e.AppNameInquiry = 6] = \"AppNameInquiry\", e[e.BuildDescription = 7] = \"BuildDescription\", e[e.BuildModeOptionDescription = 8] = \"BuildModeOptionDescription\", e[e.BuildWatchDescription = 9] = \"BuildWatchDescription\", e[e.CreateAppDescription = 10] = \"CreateAppDescription\", e[e.CreateWorkspaceDescription = 11] = \"CreateWorkspaceDescription\", e[e.DevServerOpenDescription = 12] = \"DevServerOpenDescription\", e[e.DevServerPortDescription = 13] = \"DevServerPortDescription\", e[e.DevServerLoggingDescription = 14] = \"DevServerLoggingDescription\", e[e.Done = 15] = \"Done\", e[e.FetchPackageVersionError = 16] = \"FetchPackageVersionError\", e[e.ManifestEntryBuildOptionDescription = 17] = \"ManifestEntryBuildOptionDescription\", e[e.MissingTranslationKey = 18] = \"MissingTranslationKey\", e[e.NoAppName = 19] = \"NoAppName\", e[e.NoAppNameFound = 20] = \"NoAppNameFound\", e[e.NoAppOrWorkspaceInCurrentDirectory = 21] = \"NoAppOrWorkspaceInCurrentDirectory\", e[e.NoWorkspaceName = 22] = \"NoWorkspaceName\", e[e.OperationCancelled = 23] = \"OperationCancelled\", e[e.ServeDescription = 24] = \"ServeDescription\", e[e.ServedStopped = 25] = \"ServedStopped\", e[e.ServerGatewayMode = 26] = \"ServerGatewayMode\", e[e.ServerMode = 27] = \"ServerMode\", e[e.ServerModeInquiry = 28] = \"ServerModeInquiry\", e[e.ServerProxyMode = 29] = \"ServerProxyMode\", e[e.StopServerInstructions = 30] = \"StopServerInstructions\", e[e.TemplateFrameworkInquiry = 31] = \"TemplateFrameworkInquiry\", e[e.TemplateLanguageInquiry = 32] = \"TemplateLanguageInquiry\", e[e.UnrecognizedCommand = 33] = \"UnrecognizedCommand\", e[e.WorkspaceCreated = 34] = \"WorkspaceCreated\", e[e.WorkspaceNameInquiry = 35] = \"WorkspaceNameInquiry\", e))(s || {});\nconst M = {\n 15: \"Done\",\n 22: \"No workspace name provided!\",\n 19: \"No app name provided!\",\n 0: \"File or directory '{0}' already exists!\",\n 21: \"Could not find any app entry file at '{0}'!\",\n 33: \"Unrecognized command(s) {0}!\",\n 34: \"Workspace was created at path '{0}'!\",\n 4: \"App was created at path '{0}'!\",\n 25: \"Server stopped.\",\n 11: \"Creates an Alliance Workspace in the current directory.\",\n 10: \"Creates an Alliance Application in the current directory or Alliance Workspace.\",\n 24: \"Starts a Alliance development server using the current directory package.json.\",\n 7: \"Builds an Alliance Application using Vite.\",\n 35: \"Enter the name of your workspace\",\n 28: \"Which server mode do you want to use?\",\n 6: \"Enter the name of your app\",\n 18: \"No translation key provided!\",\n 23: \"Operation cancelled.\",\n 30: `Press CTRL + C to stop the server.\n`,\n 32: \"Select preferred language\",\n 31: \"Select preferred framework template\",\n 13: \"The port that the dev server should use.\",\n 14: \"Whether the dev server and browser console should output more log information or not (false).\",\n 1: \"The port that the api gateway should use.\",\n 2: \"Which components to start. [server|server-proxy|server-gateway].\",\n 12: \"Whether the dev server should automatically open in your browser or not.\",\n 9: \"Whether the build should start watching and rebuild when files change or not.\",\n 5: \"The entry file for the app (./src/app).\",\n 17: \"The entry file for the app manifest (./src/manifest).\",\n 8: \"Which mode to use when building the app.\",\n 16: \"Failed to fetch package info from the NPM registry for package '${0}'!\",\n 20: \"Could not find app name in manifest.\",\n 3: \"The path to the app configuration file.\",\n 27: \"Server\",\n 29: \"Server with proxy\",\n 26: \"Server with gateway\"\n}, c = class c {\n};\na(c, \"getTranslations\", () => M), a(c, \"getTranslation\", (t, ...r) => {\n const n = c.getTranslations()[t];\n if (!n)\n throw new Error(`Could not find text with given key '${t}'.`);\n return r.reduce(\n (p, h, f) => p.toString().replace(`{${f}}`, h.toString()),\n n\n ).toString();\n}), a(c, \"get\", (t = s.MissingTranslationKey, ...r) => c.getTranslation(t, ...r));\nlet u = c;\nfunction R(e, t) {\n return O(Object.values(e), ({ name: r }) => ({\n label: r,\n value: r,\n selected: t === r\n }));\n}\nvar y = /* @__PURE__ */ ((e) => (e.Primary = \"primary\", e.Secondary = \"secondary\", e.Expressive = \"expressive\", e.Destructive = \"destructive\", e.Text = \"text\", e.PrimaryWhite = \"primary-white\", e.SecondaryWhite = \"secondary-white\", e.ExpressiveWhite = \"expressive-white\", e.TertiaryPurple = \"tertiary-purple\", e))(y || {});\nfunction $(e, t) {\n return Object.values(e).find((i) => i.name === t);\n}\nfunction O(e, t, r = \"Choose...\") {\n return e.reduce(\n (i, n) => (i.push({\n disabled: !1,\n selected: !1,\n ...t(n)\n }), i),\n [\n {\n label: r,\n value: \"\",\n disabled: !0,\n selected: !0\n }\n ]\n );\n}\nfunction L(e) {\n return (t) => {\n t.key === \"Enter\" && e(t);\n };\n}\nfunction U(e, t = \"all\") {\n const { email: r, displayName: i } = e, n = i && i !== \"unknown\", o = !!r;\n switch (t) {\n case \"all\": {\n if (n && o)\n return `${i} (${r})`;\n if (n)\n return i;\n if (o)\n return r;\n }\n case \"single\": {\n if (n)\n return i;\n if (o)\n return r;\n }\n }\n return \"<UNKNOWN USER>\";\n}\nfunction j(...e) {\n return e.filter((t) => !!t).join(\" \");\n}\nfunction q(e) {\n return Object.entries(e).reduce(\n (t, [r, i]) => (typeof i != \"object\" && typeof i != \"function\" && (t[r] = i), t),\n {}\n );\n}\nexport {\n I as AllianceError,\n N as FrameworkErrorCodes,\n u as Texts,\n s as TranslationsKey,\n A as UtilitiesErrorCodes,\n y as VocaButtonVariant,\n j as classNames,\n C as createCapabilityPath,\n U as friendlyUserName,\n W as getCurrentLocationInfo,\n l as getRuntimeRootUrl,\n $ as getVocaIcon,\n k as isAllianceError,\n O as mapToVocaOptions,\n L as onEnter,\n q as props,\n P as setRuntimeRootUrl,\n R as vocaIconsToOptions\n};\n//# sourceMappingURL=index.js.map\n","import { queryObjects } from '@telia-ace/alliance-framework';\nimport {\n AllianceError,\n FrameworkErrorCodes,\n UtilitiesErrorCodes,\n isAllianceError,\n} from '@telia-ace/alliance-internal-client-utilities';\n\ntype CurrentUser = {\n displayName: string;\n email: string;\n type: 'system-admin' | 'user';\n objectId: string;\n permissions: { permission: { name: string; app: { name: string } } }[];\n workspaces: { workspace: { name: string; slug: string } }[];\n hasPermission: (appName: string, permissionName: string) => boolean;\n isSystemAdmin: () => boolean;\n};\n\nlet currentUser: CurrentUser;\n\nexport async function getCurrentUser(): Promise<CurrentUser> {\n try {\n if (!currentUser) {\n const query = queryObjects<CurrentUser>('currentUser');\n currentUser = await query.resolve();\n }\n\n return {\n ...currentUser,\n hasPermission(appName, permissionName) {\n return !!currentUser?.permissions.find(\n ({ permission }) =>\n permission.app.name === appName && permission.name === permissionName\n );\n },\n isSystemAdmin() {\n return !!currentUser && currentUser.type === 'system-admin';\n },\n };\n } catch (err: any) {\n if (isAllianceError(err) && err.code === FrameworkErrorCodes.MissingManagedObjectProvider) {\n throw new AllianceError(UtilitiesErrorCodes.CurrentUserMissingProvider);\n } else if (err.message.includes('GraphQL Error (Code: 404)')) {\n throw new AllianceError(UtilitiesErrorCodes.CurrentUserGatewayNotStarted);\n } else if (err.message.includes('GraphQL Error (Code: 500)')) {\n throw new AllianceError(UtilitiesErrorCodes.CurrentUserMissingBackend);\n } else if (\n err.message.includes('GraphQL Error (Code: 200)') &&\n err.message.includes('Cannot return null for non-nullable field')\n ) {\n throw new AllianceError(UtilitiesErrorCodes.CurrentUserMissingInDatabase);\n } else {\n throw err;\n }\n }\n}\n","import { queryObjects } from '@telia-ace/alliance-framework';\n\ntype CurrentWorkspace = {\n name: string;\n slug: string;\n};\n\nexport async function getCurrentWorkspace() {\n const query = queryObjects<CurrentWorkspace>('currentWorkspace');\n return await query.resolve();\n}\n","import {\n getAppManifest,\n getAppManifests,\n queryObjects,\n type AppManifest,\n} from '@telia-ace/alliance-framework';\nimport { AllianceError, FrameworkErrorCodes } from '@telia-ace/alliance-internal-client-utilities';\n\ntype RecordEntries = Record<string, string>;\nexport type TranslatorFunction = (key: string, params?: RecordEntries) => string;\n\nexport function getDefaultLocalization(manifest?: AppManifest): RecordEntries {\n if (!manifest || !manifest.resources?.localization) {\n return {};\n }\n\n const localizationKeys = Object.keys(manifest.resources.localization);\n const defaults = localizationKeys.reduce((obj: RecordEntries, item: string) => {\n obj[item] = manifest.resources!.localization![item].value;\n\n return obj;\n }, {});\n\n return defaults;\n}\n\nfunction parseTemplates(message: string = '', variables: RecordEntries) {\n return Object.entries(variables).reduce((acc, [key, value]) => {\n return acc.replaceAll(`{{${key}}}`, value);\n }, message);\n}\n\nasync function getAppLocalization(): Promise<RecordEntries> {\n const manifest = getAppManifest();\n const appManifests = getAppManifests();\n\n const defaultLocalization = getDefaultLocalization(manifest);\n let localization: Record<string, string> = {};\n\n // Dont try to query objects if the resource management app is not installed\n if (appManifests?.find(({ name }) => name === 'resource-management')) {\n localization = await queryObjects('resourceTexts', { app: manifest?.name }).resolve();\n }\n\n return Object.keys(defaultLocalization).reduce<Record<string, string>>((acc, key) => {\n if (localization[key]) {\n acc[key] = localization[key];\n }\n\n return acc;\n }, defaultLocalization);\n}\n\nlet localizationStore: RecordEntries = {};\n\nexport async function getTranslator(): Promise<TranslatorFunction> {\n if (Object.keys(localizationStore).length === 0) {\n localizationStore = await getAppLocalization();\n }\n\n return (key: string, params?: RecordEntries): string => {\n const template = localizationStore[key];\n\n if (template === undefined) {\n throw new AllianceError(FrameworkErrorCodes.LocalizationTemplateNotDefined, { key });\n }\n\n if (!params || typeof params !== 'object' || Object.keys(params).length === 0) {\n return template;\n }\n\n return parseTemplates(template, params);\n };\n}\n"],"names":["k","n","o","ce","j","s","p","d","r","V","ue","le","R","C","pe","de","fe","J","ye","F","he","$","_","K","we","a","u","h","f","ve","g","m","y","N","re","T","oe","z","ie","Ae","be","Fe","I","ke","H","O","w","Q","X","E","Ie","q","M","Ee","B","Ge","Re","Qe","c","S","v","t","A","i","currentUser","getCurrentUser","queryObjects","appName","permissionName","permission","err","isAllianceError","FrameworkErrorCodes","AllianceError","UtilitiesErrorCodes","getCurrentWorkspace","getDefaultLocalization","manifest","_a","obj","item","parseTemplates","message","variables","acc","key","value","getAppLocalization","getAppManifest","appManifests","getAppManifests","defaultLocalization","localization","name","localizationStore","getTranslator","params","template"],"mappings":"AAGA;AACA,SAASA,EAAE,GAAG;AACZ,WAASC,IAAI,GAAGA,IAAI,UAAU,QAAQA,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