@entur-partner/micro-frontend 2.4.3 → 2.4.5

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.
@@ -1,351 +1,322 @@
1
1
  import React, { useContext, useState, useEffect } from 'react';
2
2
  import { assertIsDefined } from '@entur-partner/util';
3
3
 
4
+ function _construct(t, e, r) {
5
+ if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
6
+ var o = [null];
7
+ o.push.apply(o, e);
8
+ var p = new (t.bind.apply(t, o))();
9
+ return r && _setPrototypeOf(p, r.prototype), p;
10
+ }
11
+ function _isNativeReflectConstruct() {
12
+ try {
13
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
14
+ } catch (t) {}
15
+ return (_isNativeReflectConstruct = function () {
16
+ return !!t;
17
+ })();
18
+ }
4
19
  function _regeneratorRuntime() {
5
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
6
-
7
20
  _regeneratorRuntime = function () {
8
- return exports;
21
+ return e;
9
22
  };
10
-
11
- var exports = {},
12
- Op = Object.prototype,
13
- hasOwn = Op.hasOwnProperty,
14
- $Symbol = "function" == typeof Symbol ? Symbol : {},
15
- iteratorSymbol = $Symbol.iterator || "@@iterator",
16
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
17
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
18
-
19
- function define(obj, key, value) {
20
- return Object.defineProperty(obj, key, {
21
- value: value,
23
+ var t,
24
+ e = {},
25
+ r = Object.prototype,
26
+ n = r.hasOwnProperty,
27
+ o = Object.defineProperty || function (t, e, r) {
28
+ t[e] = r.value;
29
+ },
30
+ i = "function" == typeof Symbol ? Symbol : {},
31
+ a = i.iterator || "@@iterator",
32
+ c = i.asyncIterator || "@@asyncIterator",
33
+ u = i.toStringTag || "@@toStringTag";
34
+ function define(t, e, r) {
35
+ return Object.defineProperty(t, e, {
36
+ value: r,
22
37
  enumerable: !0,
23
38
  configurable: !0,
24
39
  writable: !0
25
- }), obj[key];
40
+ }), t[e];
26
41
  }
27
-
28
42
  try {
29
43
  define({}, "");
30
- } catch (err) {
31
- define = function (obj, key, value) {
32
- return obj[key] = value;
44
+ } catch (t) {
45
+ define = function (t, e, r) {
46
+ return t[e] = r;
33
47
  };
34
48
  }
35
-
36
- function wrap(innerFn, outerFn, self, tryLocsList) {
37
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
38
- generator = Object.create(protoGenerator.prototype),
39
- context = new Context(tryLocsList || []);
40
- return generator._invoke = function (innerFn, self, context) {
41
- var state = "suspendedStart";
42
- return function (method, arg) {
43
- if ("executing" === state) throw new Error("Generator is already running");
44
-
45
- if ("completed" === state) {
46
- if ("throw" === method) throw arg;
47
- return doneResult();
48
- }
49
-
50
- for (context.method = method, context.arg = arg;;) {
51
- var delegate = context.delegate;
52
-
53
- if (delegate) {
54
- var delegateResult = maybeInvokeDelegate(delegate, context);
55
-
56
- if (delegateResult) {
57
- if (delegateResult === ContinueSentinel) continue;
58
- return delegateResult;
59
- }
60
- }
61
-
62
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
63
- if ("suspendedStart" === state) throw state = "completed", context.arg;
64
- context.dispatchException(context.arg);
65
- } else "return" === context.method && context.abrupt("return", context.arg);
66
- state = "executing";
67
- var record = tryCatch(innerFn, self, context);
68
-
69
- if ("normal" === record.type) {
70
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
71
- return {
72
- value: record.arg,
73
- done: context.done
74
- };
75
- }
76
-
77
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
78
- }
79
- };
80
- }(innerFn, self, context), generator;
49
+ function wrap(t, e, r, n) {
50
+ var i = e && e.prototype instanceof Generator ? e : Generator,
51
+ a = Object.create(i.prototype),
52
+ c = new Context(n || []);
53
+ return o(a, "_invoke", {
54
+ value: makeInvokeMethod(t, r, c)
55
+ }), a;
81
56
  }
82
-
83
- function tryCatch(fn, obj, arg) {
57
+ function tryCatch(t, e, r) {
84
58
  try {
85
59
  return {
86
60
  type: "normal",
87
- arg: fn.call(obj, arg)
61
+ arg: t.call(e, r)
88
62
  };
89
- } catch (err) {
63
+ } catch (t) {
90
64
  return {
91
65
  type: "throw",
92
- arg: err
66
+ arg: t
93
67
  };
94
68
  }
95
69
  }
96
-
97
- exports.wrap = wrap;
98
- var ContinueSentinel = {};
99
-
70
+ e.wrap = wrap;
71
+ var h = "suspendedStart",
72
+ l = "suspendedYield",
73
+ f = "executing",
74
+ s = "completed",
75
+ y = {};
100
76
  function Generator() {}
101
-
102
77
  function GeneratorFunction() {}
103
-
104
78
  function GeneratorFunctionPrototype() {}
105
-
106
- var IteratorPrototype = {};
107
- define(IteratorPrototype, iteratorSymbol, function () {
79
+ var p = {};
80
+ define(p, a, function () {
108
81
  return this;
109
82
  });
110
- var getProto = Object.getPrototypeOf,
111
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
112
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
113
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
114
-
115
- function defineIteratorMethods(prototype) {
116
- ["next", "throw", "return"].forEach(function (method) {
117
- define(prototype, method, function (arg) {
118
- return this._invoke(method, arg);
83
+ var d = Object.getPrototypeOf,
84
+ v = d && d(d(values([])));
85
+ v && v !== r && n.call(v, a) && (p = v);
86
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
87
+ function defineIteratorMethods(t) {
88
+ ["next", "throw", "return"].forEach(function (e) {
89
+ define(t, e, function (t) {
90
+ return this._invoke(e, t);
119
91
  });
120
92
  });
121
93
  }
122
-
123
- function AsyncIterator(generator, PromiseImpl) {
124
- function invoke(method, arg, resolve, reject) {
125
- var record = tryCatch(generator[method], generator, arg);
126
-
127
- if ("throw" !== record.type) {
128
- var result = record.arg,
129
- value = result.value;
130
- return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
131
- invoke("next", value, resolve, reject);
132
- }, function (err) {
133
- invoke("throw", err, resolve, reject);
134
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
135
- result.value = unwrapped, resolve(result);
136
- }, function (error) {
137
- return invoke("throw", error, resolve, reject);
94
+ function AsyncIterator(t, e) {
95
+ function invoke(r, o, i, a) {
96
+ var c = tryCatch(t[r], t, o);
97
+ if ("throw" !== c.type) {
98
+ var u = c.arg,
99
+ h = u.value;
100
+ return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
101
+ invoke("next", t, i, a);
102
+ }, function (t) {
103
+ invoke("throw", t, i, a);
104
+ }) : e.resolve(h).then(function (t) {
105
+ u.value = t, i(u);
106
+ }, function (t) {
107
+ return invoke("throw", t, i, a);
138
108
  });
139
109
  }
140
-
141
- reject(record.arg);
110
+ a(c.arg);
142
111
  }
143
-
144
- var previousPromise;
145
-
146
- this._invoke = function (method, arg) {
147
- function callInvokeWithMethodAndArg() {
148
- return new PromiseImpl(function (resolve, reject) {
149
- invoke(method, arg, resolve, reject);
150
- });
112
+ var r;
113
+ o(this, "_invoke", {
114
+ value: function (t, n) {
115
+ function callInvokeWithMethodAndArg() {
116
+ return new e(function (e, r) {
117
+ invoke(t, n, e, r);
118
+ });
119
+ }
120
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
151
121
  }
152
-
153
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
154
- };
122
+ });
155
123
  }
156
-
157
- function maybeInvokeDelegate(delegate, context) {
158
- var method = delegate.iterator[context.method];
159
-
160
- if (undefined === method) {
161
- if (context.delegate = null, "throw" === context.method) {
162
- if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
163
- context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
124
+ function makeInvokeMethod(e, r, n) {
125
+ var o = h;
126
+ return function (i, a) {
127
+ if (o === f) throw Error("Generator is already running");
128
+ if (o === s) {
129
+ if ("throw" === i) throw a;
130
+ return {
131
+ value: t,
132
+ done: !0
133
+ };
164
134
  }
165
-
166
- return ContinueSentinel;
167
- }
168
-
169
- var record = tryCatch(method, delegate.iterator, context.arg);
170
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
171
- var info = record.arg;
172
- return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
135
+ for (n.method = i, n.arg = a;;) {
136
+ var c = n.delegate;
137
+ if (c) {
138
+ var u = maybeInvokeDelegate(c, n);
139
+ if (u) {
140
+ if (u === y) continue;
141
+ return u;
142
+ }
143
+ }
144
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
145
+ if (o === h) throw o = s, n.arg;
146
+ n.dispatchException(n.arg);
147
+ } else "return" === n.method && n.abrupt("return", n.arg);
148
+ o = f;
149
+ var p = tryCatch(e, r, n);
150
+ if ("normal" === p.type) {
151
+ if (o = n.done ? s : l, p.arg === y) continue;
152
+ return {
153
+ value: p.arg,
154
+ done: n.done
155
+ };
156
+ }
157
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
158
+ }
159
+ };
173
160
  }
174
-
175
- function pushTryEntry(locs) {
176
- var entry = {
177
- tryLoc: locs[0]
161
+ function maybeInvokeDelegate(e, r) {
162
+ var n = r.method,
163
+ o = e.iterator[n];
164
+ if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
165
+ var i = tryCatch(o, e.iterator, r.arg);
166
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
167
+ var a = i.arg;
168
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
169
+ }
170
+ function pushTryEntry(t) {
171
+ var e = {
172
+ tryLoc: t[0]
178
173
  };
179
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
174
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
180
175
  }
181
-
182
- function resetTryEntry(entry) {
183
- var record = entry.completion || {};
184
- record.type = "normal", delete record.arg, entry.completion = record;
176
+ function resetTryEntry(t) {
177
+ var e = t.completion || {};
178
+ e.type = "normal", delete e.arg, t.completion = e;
185
179
  }
186
-
187
- function Context(tryLocsList) {
180
+ function Context(t) {
188
181
  this.tryEntries = [{
189
182
  tryLoc: "root"
190
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
183
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
191
184
  }
192
-
193
- function values(iterable) {
194
- if (iterable) {
195
- var iteratorMethod = iterable[iteratorSymbol];
196
- if (iteratorMethod) return iteratorMethod.call(iterable);
197
- if ("function" == typeof iterable.next) return iterable;
198
-
199
- if (!isNaN(iterable.length)) {
200
- var i = -1,
201
- next = function next() {
202
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
203
-
204
- return next.value = undefined, next.done = !0, next;
205
- };
206
-
207
- return next.next = next;
185
+ function values(e) {
186
+ if (e || "" === e) {
187
+ var r = e[a];
188
+ if (r) return r.call(e);
189
+ if ("function" == typeof e.next) return e;
190
+ if (!isNaN(e.length)) {
191
+ var o = -1,
192
+ i = function next() {
193
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
194
+ return next.value = t, next.done = !0, next;
195
+ };
196
+ return i.next = i;
208
197
  }
209
198
  }
210
-
211
- return {
212
- next: doneResult
213
- };
214
- }
215
-
216
- function doneResult() {
217
- return {
218
- value: undefined,
219
- done: !0
220
- };
199
+ throw new TypeError(typeof e + " is not iterable");
221
200
  }
222
-
223
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
224
- var ctor = "function" == typeof genFun && genFun.constructor;
225
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
226
- }, exports.mark = function (genFun) {
227
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
228
- }, exports.awrap = function (arg) {
201
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
202
+ value: GeneratorFunctionPrototype,
203
+ configurable: !0
204
+ }), o(GeneratorFunctionPrototype, "constructor", {
205
+ value: GeneratorFunction,
206
+ configurable: !0
207
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
208
+ var e = "function" == typeof t && t.constructor;
209
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
210
+ }, e.mark = function (t) {
211
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
212
+ }, e.awrap = function (t) {
229
213
  return {
230
- __await: arg
214
+ __await: t
231
215
  };
232
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
216
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
233
217
  return this;
234
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
235
- void 0 === PromiseImpl && (PromiseImpl = Promise);
236
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
237
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
238
- return result.done ? result.value : iter.next();
218
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
219
+ void 0 === i && (i = Promise);
220
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
221
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
222
+ return t.done ? t.value : a.next();
239
223
  });
240
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
224
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
241
225
  return this;
242
- }), define(Gp, "toString", function () {
226
+ }), define(g, "toString", function () {
243
227
  return "[object Generator]";
244
- }), exports.keys = function (object) {
245
- var keys = [];
246
-
247
- for (var key in object) keys.push(key);
248
-
249
- return keys.reverse(), function next() {
250
- for (; keys.length;) {
251
- var key = keys.pop();
252
- if (key in object) return next.value = key, next.done = !1, next;
228
+ }), e.keys = function (t) {
229
+ var e = Object(t),
230
+ r = [];
231
+ for (var n in e) r.push(n);
232
+ return r.reverse(), function next() {
233
+ for (; r.length;) {
234
+ var t = r.pop();
235
+ if (t in e) return next.value = t, next.done = !1, next;
253
236
  }
254
-
255
237
  return next.done = !0, next;
256
238
  };
257
- }, exports.values = values, Context.prototype = {
239
+ }, e.values = values, Context.prototype = {
258
240
  constructor: Context,
259
- reset: function (skipTempReset) {
260
- if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
241
+ reset: function (e) {
242
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
261
243
  },
262
244
  stop: function () {
263
245
  this.done = !0;
264
- var rootRecord = this.tryEntries[0].completion;
265
- if ("throw" === rootRecord.type) throw rootRecord.arg;
246
+ var t = this.tryEntries[0].completion;
247
+ if ("throw" === t.type) throw t.arg;
266
248
  return this.rval;
267
249
  },
268
- dispatchException: function (exception) {
269
- if (this.done) throw exception;
270
- var context = this;
271
-
272
- function handle(loc, caught) {
273
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
250
+ dispatchException: function (e) {
251
+ if (this.done) throw e;
252
+ var r = this;
253
+ function handle(n, o) {
254
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
274
255
  }
275
-
276
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
277
- var entry = this.tryEntries[i],
278
- record = entry.completion;
279
- if ("root" === entry.tryLoc) return handle("end");
280
-
281
- if (entry.tryLoc <= this.prev) {
282
- var hasCatch = hasOwn.call(entry, "catchLoc"),
283
- hasFinally = hasOwn.call(entry, "finallyLoc");
284
-
285
- if (hasCatch && hasFinally) {
286
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
287
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
288
- } else if (hasCatch) {
289
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
256
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
257
+ var i = this.tryEntries[o],
258
+ a = i.completion;
259
+ if ("root" === i.tryLoc) return handle("end");
260
+ if (i.tryLoc <= this.prev) {
261
+ var c = n.call(i, "catchLoc"),
262
+ u = n.call(i, "finallyLoc");
263
+ if (c && u) {
264
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
265
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
266
+ } else if (c) {
267
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
290
268
  } else {
291
- if (!hasFinally) throw new Error("try statement without catch or finally");
292
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
269
+ if (!u) throw Error("try statement without catch or finally");
270
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
293
271
  }
294
272
  }
295
273
  }
296
274
  },
297
- abrupt: function (type, arg) {
298
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
299
- var entry = this.tryEntries[i];
300
-
301
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
302
- var finallyEntry = entry;
275
+ abrupt: function (t, e) {
276
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
277
+ var o = this.tryEntries[r];
278
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
279
+ var i = o;
303
280
  break;
304
281
  }
305
282
  }
306
-
307
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
308
- var record = finallyEntry ? finallyEntry.completion : {};
309
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
283
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
284
+ var a = i ? i.completion : {};
285
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
310
286
  },
311
- complete: function (record, afterLoc) {
312
- if ("throw" === record.type) throw record.arg;
313
- return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
287
+ complete: function (t, e) {
288
+ if ("throw" === t.type) throw t.arg;
289
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
314
290
  },
315
- finish: function (finallyLoc) {
316
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
317
- var entry = this.tryEntries[i];
318
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
291
+ finish: function (t) {
292
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
293
+ var r = this.tryEntries[e];
294
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
319
295
  }
320
296
  },
321
- catch: function (tryLoc) {
322
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
323
- var entry = this.tryEntries[i];
324
-
325
- if (entry.tryLoc === tryLoc) {
326
- var record = entry.completion;
327
-
328
- if ("throw" === record.type) {
329
- var thrown = record.arg;
330
- resetTryEntry(entry);
297
+ catch: function (t) {
298
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
299
+ var r = this.tryEntries[e];
300
+ if (r.tryLoc === t) {
301
+ var n = r.completion;
302
+ if ("throw" === n.type) {
303
+ var o = n.arg;
304
+ resetTryEntry(r);
331
305
  }
332
-
333
- return thrown;
306
+ return o;
334
307
  }
335
308
  }
336
-
337
- throw new Error("illegal catch attempt");
309
+ throw Error("illegal catch attempt");
338
310
  },
339
- delegateYield: function (iterable, resultName, nextLoc) {
311
+ delegateYield: function (e, r, n) {
340
312
  return this.delegate = {
341
- iterator: values(iterable),
342
- resultName: resultName,
343
- nextLoc: nextLoc
344
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
313
+ iterator: values(e),
314
+ resultName: r,
315
+ nextLoc: n
316
+ }, "next" === this.method && (this.arg = t), y;
345
317
  }
346
- }, exports;
318
+ }, e;
347
319
  }
348
-
349
320
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
350
321
  try {
351
322
  var info = gen[key](arg);
@@ -354,65 +325,53 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
354
325
  reject(error);
355
326
  return;
356
327
  }
357
-
358
328
  if (info.done) {
359
329
  resolve(value);
360
330
  } else {
361
331
  Promise.resolve(value).then(_next, _throw);
362
332
  }
363
333
  }
364
-
365
334
  function _asyncToGenerator(fn) {
366
335
  return function () {
367
336
  var self = this,
368
- args = arguments;
337
+ args = arguments;
369
338
  return new Promise(function (resolve, reject) {
370
339
  var gen = fn.apply(self, args);
371
-
372
340
  function _next(value) {
373
341
  asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
374
342
  }
375
-
376
343
  function _throw(err) {
377
344
  asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
378
345
  }
379
-
380
346
  _next(undefined);
381
347
  });
382
348
  };
383
349
  }
384
-
385
350
  function _extends() {
386
351
  _extends = Object.assign ? Object.assign.bind() : function (target) {
387
352
  for (var i = 1; i < arguments.length; i++) {
388
353
  var source = arguments[i];
389
-
390
354
  for (var key in source) {
391
355
  if (Object.prototype.hasOwnProperty.call(source, key)) {
392
356
  target[key] = source[key];
393
357
  }
394
358
  }
395
359
  }
396
-
397
360
  return target;
398
361
  };
399
362
  return _extends.apply(this, arguments);
400
363
  }
401
-
402
364
  function _inheritsLoose(subClass, superClass) {
403
365
  subClass.prototype = Object.create(superClass.prototype);
404
366
  subClass.prototype.constructor = subClass;
405
-
406
367
  _setPrototypeOf(subClass, superClass);
407
368
  }
408
-
409
369
  function _getPrototypeOf(o) {
410
370
  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
411
371
  return o.__proto__ || Object.getPrototypeOf(o);
412
372
  };
413
373
  return _getPrototypeOf(o);
414
374
  }
415
-
416
375
  function _setPrototypeOf(o, p) {
417
376
  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
418
377
  o.__proto__ = p;
@@ -420,61 +379,27 @@ function _setPrototypeOf(o, p) {
420
379
  };
421
380
  return _setPrototypeOf(o, p);
422
381
  }
423
-
424
- function _isNativeReflectConstruct() {
425
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
426
- if (Reflect.construct.sham) return false;
427
- if (typeof Proxy === "function") return true;
428
-
382
+ function _isNativeFunction(fn) {
429
383
  try {
430
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
431
- return true;
384
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
432
385
  } catch (e) {
433
- return false;
386
+ return typeof fn === "function";
434
387
  }
435
388
  }
436
-
437
- function _construct(Parent, args, Class) {
438
- if (_isNativeReflectConstruct()) {
439
- _construct = Reflect.construct.bind();
440
- } else {
441
- _construct = function _construct(Parent, args, Class) {
442
- var a = [null];
443
- a.push.apply(a, args);
444
- var Constructor = Function.bind.apply(Parent, a);
445
- var instance = new Constructor();
446
- if (Class) _setPrototypeOf(instance, Class.prototype);
447
- return instance;
448
- };
449
- }
450
-
451
- return _construct.apply(null, arguments);
452
- }
453
-
454
- function _isNativeFunction(fn) {
455
- return Function.toString.call(fn).indexOf("[native code]") !== -1;
456
- }
457
-
458
389
  function _wrapNativeSuper(Class) {
459
390
  var _cache = typeof Map === "function" ? new Map() : undefined;
460
-
461
391
  _wrapNativeSuper = function _wrapNativeSuper(Class) {
462
392
  if (Class === null || !_isNativeFunction(Class)) return Class;
463
-
464
393
  if (typeof Class !== "function") {
465
394
  throw new TypeError("Super expression must either be null or a function");
466
395
  }
467
-
468
396
  if (typeof _cache !== "undefined") {
469
397
  if (_cache.has(Class)) return _cache.get(Class);
470
-
471
398
  _cache.set(Class, Wrapper);
472
399
  }
473
-
474
400
  function Wrapper() {
475
401
  return _construct(Class, arguments, _getPrototypeOf(this).constructor);
476
402
  }
477
-
478
403
  Wrapper.prototype = Object.create(Class.prototype, {
479
404
  constructor: {
480
405
  value: Wrapper,
@@ -485,22 +410,18 @@ function _wrapNativeSuper(Class) {
485
410
  });
486
411
  return _setPrototypeOf(Wrapper, Class);
487
412
  };
488
-
489
413
  return _wrapNativeSuper(Class);
490
414
  }
491
-
492
415
  function _objectWithoutPropertiesLoose(source, excluded) {
493
416
  if (source == null) return {};
494
417
  var target = {};
495
418
  var sourceKeys = Object.keys(source);
496
419
  var key, i;
497
-
498
420
  for (i = 0; i < sourceKeys.length; i++) {
499
421
  key = sourceKeys[i];
500
422
  if (excluded.indexOf(key) >= 0) continue;
501
423
  target[key] = source[key];
502
424
  }
503
-
504
425
  return target;
505
426
  }
506
427
 
@@ -518,31 +439,27 @@ function createUnmountEvent(detail) {
518
439
  }
519
440
  var ROUTE_CHANGE_EVENT_TYPE = '@entur-partner:after-route-change';
520
441
  var RouteChangeEvent = /*#__PURE__*/function (_CustomEvent) {
521
- _inheritsLoose(RouteChangeEvent, _CustomEvent);
522
-
523
442
  function RouteChangeEvent() {
524
443
  return _CustomEvent.apply(this, arguments) || this;
525
444
  }
526
-
445
+ _inheritsLoose(RouteChangeEvent, _CustomEvent);
527
446
  return RouteChangeEvent;
528
447
  }( /*#__PURE__*/_wrapNativeSuper(CustomEvent));
529
448
 
530
449
  function registerMicroFrontend(config) {
531
450
  var unmount = config.unmount,
532
- microFrontendId = config.microFrontendId,
533
- mount = config.mount;
451
+ microFrontendId = config.microFrontendId,
452
+ mount = config.mount;
534
453
  window.addEventListener(MOUNT_EVENT_TYPE, function (event) {
535
454
  if (!event.detail.id.startsWith(microFrontendId)) {
536
455
  return;
537
456
  }
538
-
539
457
  mount(event.detail.mountPoint, event.detail.payload, event.detail.mountPoint);
540
458
  });
541
459
  window.addEventListener(UNMOUNT_EVENT_TYPE, function (event) {
542
460
  if (!event.detail.id.startsWith(microFrontendId)) {
543
461
  return;
544
462
  }
545
-
546
463
  unmount(event.detail.mountPoint);
547
464
  });
548
465
  }
@@ -566,51 +483,42 @@ var useNavigate = function useNavigate() {
566
483
  };
567
484
  var AppProvider = function AppProvider(_ref) {
568
485
  var children = _ref.children,
569
- organisationId = _ref.organisationId,
570
- getPermissions = _ref.getPermissions,
571
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
572
-
486
+ organisationId = _ref.organisationId,
487
+ getPermissions = _ref.getPermissions,
488
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
573
489
  var _useState = useState([]),
574
- permissions = _useState[0],
575
- setPermissions = _useState[1];
576
-
490
+ permissions = _useState[0],
491
+ setPermissions = _useState[1];
577
492
  useEffect(function () {
578
493
  function fetchData() {
579
494
  return _fetchData.apply(this, arguments);
580
495
  }
581
-
582
496
  function _fetchData() {
583
497
  _fetchData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
584
498
  var fetchedPermissions;
585
499
  return _regeneratorRuntime().wrap(function _callee$(_context) {
586
- while (1) {
587
- switch (_context.prev = _context.next) {
588
- case 0:
589
- _context.prev = 0;
590
- _context.next = 3;
591
- return getPermissions();
592
-
593
- case 3:
594
- fetchedPermissions = _context.sent;
595
- setPermissions(fetchedPermissions);
596
- _context.next = 10;
597
- break;
598
-
599
- case 7:
600
- _context.prev = 7;
601
- _context.t0 = _context["catch"](0);
602
- console.error('Fetching permissions with the provided getPermissions function failed in AppProvider with the following error:', _context.t0);
603
-
604
- case 10:
605
- case "end":
606
- return _context.stop();
607
- }
500
+ while (1) switch (_context.prev = _context.next) {
501
+ case 0:
502
+ _context.prev = 0;
503
+ _context.next = 3;
504
+ return getPermissions();
505
+ case 3:
506
+ fetchedPermissions = _context.sent;
507
+ setPermissions(fetchedPermissions);
508
+ _context.next = 10;
509
+ break;
510
+ case 7:
511
+ _context.prev = 7;
512
+ _context.t0 = _context["catch"](0);
513
+ console.error('Fetching permissions with the provided getPermissions function failed in AppProvider with the following error:', _context.t0);
514
+ case 10:
515
+ case "end":
516
+ return _context.stop();
608
517
  }
609
518
  }, _callee, null, [[0, 7]]);
610
519
  }));
611
520
  return _fetchData.apply(this, arguments);
612
521
  }
613
-
614
522
  fetchData();
615
523
  }, [getPermissions]);
616
524
  return React.createElement(AppContext.Provider, {