textbrowser 0.49.1 → 0.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGES.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # CHANGES to `textbrowser`
2
2
 
3
+ ## 0.50.0
4
+
5
+ - fix: revert apparent indexeddbshim regression
6
+
7
+ Versions past 12 have some apparent node-sqlite3 issues (after rollup, can't run server script)
8
+
3
9
  ## 0.49.1
4
10
 
5
11
  - fix: apparent regression with `nodeActivate`
@@ -1,69 +1,68 @@
1
- /**
2
- * @typedef {JSONValue[]} JSONArray
3
- */
4
- /**
5
- * @typedef {null|boolean|number|string|JSONArray|{[key: string]: JSONValue}} JSONValue
6
- */
1
+ /* eslint-disable node/no-unsupported-features/es-syntax */
7
2
 
8
3
  /**
9
- * @callback SimpleJSONCallback
10
- * @param {...JSONValue} json
11
- * @returns {void}
12
- */
13
-
14
- /**
15
- * @callback SimpleJSONErrback
16
- * @param {Error} err
17
- * @param {string|string[]} jsonURL
18
- * @returns {JSONValue}
19
- */
20
-
21
- /**
22
- * @typedef {((
23
- * jsonURL: string|string[],
24
- * cb?: SimpleJSONCallback,
25
- * errBack?: SimpleJSONErrback
26
- * ) => Promise<JSONValue>) & {
27
- * _fetch?: import('./index-polyglot.js').SimpleFetch,
28
- * hasURLBasePath?: boolean,
29
- * basePath?: string|false
30
- * }} getJSONCallback
4
+ * @callback getJSONCallback
5
+ * @param {string|string[]} jsonURL
6
+ * @param {SimpleJSONCallback} cb
7
+ * @param {SimpleJSONErrback} errBack
8
+ * @returns {Promise<JSON>}
31
9
  */
32
10
 
33
11
  /**
34
- * @param {object} [cfg]
35
- * @param {import('./index-polyglot.js').SimpleFetch} [cfg.fetch]
12
+ * @param {PlainObject} cfg
13
+ * @param {fetch} cfg.fetch
36
14
  * @returns {getJSONCallback}
37
15
  */
38
-
39
16
  function _await$2$1(value, then, direct) {
17
+
40
18
  if (!value || !value.then) {
41
19
  value = Promise.resolve(value);
42
20
  }
21
+
43
22
  return then ? value.then(then) : value;
44
23
  }
24
+
45
25
  function _invoke$1(body, then) {
46
26
  var result = body();
27
+
47
28
  if (result && result.then) {
48
29
  return result.then(then);
49
30
  }
31
+
50
32
  return then(result);
51
33
  }
34
+
52
35
  function _catch$2(body, recover) {
53
36
  try {
54
37
  var result = body();
55
38
  } catch (e) {
56
39
  return recover(e);
57
40
  }
41
+
58
42
  if (result && result.then) {
59
43
  return result.then(void 0, recover);
60
44
  }
45
+
61
46
  return result;
62
47
  }
48
+
63
49
  function buildGetJSONWithFetch({
64
- // eslint-disable-next-line no-shadow, no-undef -- This is a polyfill
50
+ // eslint-disable-next-line no-shadow
65
51
  fetch = typeof window !== 'undefined' ? window.fetch : self.fetch
66
52
  } = {}) {
53
+ /**
54
+ * @callback SimpleJSONCallback
55
+ * @param {JSON} json
56
+ * @returns {void}
57
+ */
58
+
59
+ /**
60
+ * @callback SimpleJSONErrback
61
+ * @param {Error} err
62
+ * @param {string|string[]} jsonURL
63
+ * @returns {void}
64
+ */
65
+
67
66
  /**
68
67
  * @type {getJSONCallback}
69
68
  */
@@ -74,12 +73,13 @@ function buildGetJSONWithFetch({
74
73
  return _invoke$1(function () {
75
74
  if (Array.isArray(jsonURL)) {
76
75
  return _await$2$1(Promise.all(jsonURL.map(url => {
77
- return /** @type {getJSONCallback} */getJSON(url);
76
+ return getJSON(url);
78
77
  })), function (arrResult) {
79
78
  if (cb) {
80
- // eslint-disable-next-line promise/prefer-await-to-callbacks -- Old-style API
79
+ // eslint-disable-next-line node/callback-return, node/no-callback-literal, promise/prefer-await-to-callbacks
81
80
  cb(...arrResult);
82
81
  }
82
+
83
83
  _exit = true;
84
84
  return arrResult;
85
85
  });
@@ -87,22 +87,22 @@ function buildGetJSONWithFetch({
87
87
  }, function (_result) {
88
88
  return _exit ? _result : _await$2$1(fetch(jsonURL), function (resp) {
89
89
  return _await$2$1(resp.json(), function (result) {
90
- return typeof cb === 'function'
91
- // eslint-disable-next-line promise/prefer-await-to-callbacks -- Old-style API
92
- ? cb(result) : result;
93
- // https://github.com/bcoe/c8/issues/135
90
+ return typeof cb === 'function' // eslint-disable-next-line promise/prefer-await-to-callbacks
91
+ ? cb(result) : result; // https://github.com/bcoe/c8/issues/135
92
+
94
93
  /* c8 ignore next */
95
94
  });
96
95
  });
97
96
  });
98
- }, function (err) {
99
- const e = /** @type {Error} */err;
97
+ }, function (e) {
100
98
  e.message += ` (File: ${jsonURL})`;
99
+
101
100
  if (errBack) {
102
101
  return errBack(e, jsonURL);
103
102
  }
104
- throw e;
105
- // https://github.com/bcoe/c8/issues/135
103
+
104
+ throw e; // https://github.com/bcoe/c8/issues/135
105
+
106
106
  /* c8 ignore next */
107
107
  }));
108
108
  /* c8 ignore next */
@@ -113,43 +113,44 @@ function buildGetJSONWithFetch({
113
113
  }
114
114
 
115
115
  function _await$1$1(value, then, direct) {
116
+
116
117
  if (!value || !value.then) {
117
118
  value = Promise.resolve(value);
118
119
  }
120
+
119
121
  return then ? value.then(then) : value;
120
122
  }
121
- /* globals process -- Node */
122
123
 
124
+ /* eslint-disable node/no-unsupported-features/node-builtins,
125
+ node/no-unsupported-features/es-syntax, compat/compat */
123
126
  // Needed for polyglot support (no `path` in browser); even if
124
127
  // polyglot using dynamic `import` not supported by Rollup (complaining
125
128
  // of inability to do tree-shaking in UMD builds), still useful to delay
126
129
  // path import for our testing, so that test can import this file in
127
130
  // the browser without compilation without it choking
131
+ let dirname, isWindows;
128
132
 
133
+ function _empty() {}
129
134
  /**
130
- * @type {(directory: string) => string}
135
+ * @param {string} path
136
+ * @returns {string}
131
137
  */
132
- let dirname;
133
138
 
134
- /** @type {boolean} */
135
139
 
136
- function _empty() {}
137
- let isWindows;
138
140
  function _invokeIgnored(body) {
139
141
  var result = body();
142
+
140
143
  if (result && result.then) {
141
144
  return result.then(_empty);
142
145
  }
143
- } /**
144
- * @param {string} path
145
- * @returns {string}
146
- */
146
+ }
147
147
 
148
148
  function _async$1$1(f) {
149
149
  return function () {
150
150
  for (var args = [], i = 0; i < arguments.length; i++) {
151
151
  args[i] = arguments[i];
152
152
  }
153
+
153
154
  try {
154
155
  return Promise.resolve(f.apply(this, args));
155
156
  } catch (e) {
@@ -157,10 +158,11 @@ function _async$1$1(f) {
157
158
  }
158
159
  };
159
160
  }
161
+
160
162
  const setDirname = _async$1$1(function () {
161
163
  return _invokeIgnored(function () {
162
164
  if (!dirname) {
163
- return _await$1$1(import('node:path'), function (_import) {
165
+ return _await$1$1(import('path'), function (_import) {
164
166
  ({
165
167
  dirname
166
168
  } = _import);
@@ -168,20 +170,23 @@ const setDirname = _async$1$1(function () {
168
170
  }
169
171
  });
170
172
  });
173
+
171
174
  function fixWindowsPath(path) {
172
175
  if (!isWindows) {
173
176
  isWindows = process.platform === 'win32';
174
177
  }
175
- return path.slice(
176
- // https://github.com/bcoe/c8/issues/135
178
+
179
+ return path.slice( // https://github.com/bcoe/c8/issues/135
180
+
177
181
  /* c8 ignore next */
178
182
  isWindows ? 1 : 0);
179
183
  }
180
-
181
184
  /**
182
185
  * @param {string} url
183
186
  * @returns {string}
184
187
  */
188
+
189
+
185
190
  function getDirectoryForURL(url) {
186
191
  // Node should be ok with this, but transpiling
187
192
  // to `require` doesn't work, so detect Windows
@@ -190,36 +195,37 @@ function getDirectoryForURL(url) {
190
195
  return fixWindowsPath(dirname(new URL(url).pathname));
191
196
  }
192
197
 
193
- /* globals window, self -- Polyglot */
194
-
195
- /**
196
- * @typedef {(url: string) => Promise<Response>} SimpleFetch
197
- */
198
-
199
- /** @type {{default: SimpleFetch}} */
198
+ /* eslint-disable node/no-unsupported-features/es-syntax */
200
199
 
201
200
  function _await$3(value, then, direct) {
201
+
202
202
  if (!value || !value.then) {
203
203
  value = Promise.resolve(value);
204
204
  }
205
+
205
206
  return then ? value.then(then) : value;
206
207
  }
208
+
207
209
  let nodeFetch;
208
210
  /**
209
- * @param {object} [cfg]
210
- * @param {string} [cfg.baseURL]
211
- * @param {string|false} [cfg.cwd]
212
- * @returns {import('./buildGetJSONWithFetch.js').getJSONCallback}
211
+ * @param {PlainObject} cfg
212
+ * @param {string} cfg.baseURL
213
+ * @param {string} cfg.cwd
214
+ * @returns {getJSONCallback}
213
215
  */
214
216
 
215
217
  function _invoke$2(body, then) {
216
218
  var result = body();
219
+
217
220
  if (result && result.then) {
218
221
  return result.then(then);
219
222
  }
223
+
220
224
  return then(result);
221
225
  }
226
+
222
227
  function _call(body, then, direct) {
228
+
223
229
  try {
224
230
  var result = Promise.resolve(body());
225
231
  return then ? result.then(then) : result;
@@ -227,11 +233,13 @@ function _call(body, then, direct) {
227
233
  return Promise.reject(e);
228
234
  }
229
235
  }
236
+
230
237
  function _async$2(f) {
231
238
  return function () {
232
239
  for (var args = [], i = 0; i < arguments.length; i++) {
233
240
  args[i] = arguments[i];
234
241
  }
242
+
235
243
  try {
236
244
  return Promise.resolve(f.apply(this, args));
237
245
  } catch (e) {
@@ -239,32 +247,24 @@ function _async$2(f) {
239
247
  }
240
248
  };
241
249
  }
250
+
242
251
  function buildGetJSON({
243
252
  baseURL,
244
253
  cwd: basePath
245
254
  } = {}) {
246
- const _fetch = typeof window !== 'undefined' || typeof self !== 'undefined' ? typeof window !== 'undefined' ? window.fetch : self.fetch
247
- // eslint-disable-next-line @stylistic/operator-linebreak -- TS
248
- :
249
- /**
250
- * @param {string} jsonURL
251
- * @returns {Promise<Response>}
252
- */
253
- _async$2(function (jsonURL) {
255
+ const _fetch = typeof window !== 'undefined' || typeof self !== 'undefined' ? typeof window !== 'undefined' ? window.fetch : self.fetch : _async$2(function (jsonURL) {
254
256
  let _exit = false;
255
257
  return _invoke$2(function () {
256
258
  if (/^https?:/u.test(jsonURL)) {
257
259
  return _invoke$2(function () {
258
260
  if (!nodeFetch) {
259
- return _await$3(import('node-fetch'), function (
260
- /** @type {{default: SimpleFetch}} */
261
- /** @type {unknown} */
262
- _import) {
261
+ return _await$3(import('node-fetch'), function (_import) {
263
262
  nodeFetch = _import;
264
263
  });
265
264
  }
266
265
  }, function () {
267
- const _nodeFetch$default = /** @type {SimpleFetch} */nodeFetch.default(jsonURL);
266
+ const _nodeFetch$default = nodeFetch.default(jsonURL);
267
+
268
268
  _exit = true;
269
269
  return _nodeFetch$default;
270
270
  });
@@ -280,50 +280,48 @@ function buildGetJSON({
280
280
  // Filed https://github.com/bergos/file-fetch/issues/12 to see
281
281
  // about getting relative basePaths in `file-fetch` and using
282
282
  // that better-tested package instead
283
- // @ts-expect-error Todo
284
- // Don't change to an import as won't resolve for browser testing
285
- // eslint-disable-next-line promise/avoid-new -- own API
286
- /* c8 ignore next */
287
283
  return _await$3(import('local-xmlhttprequest'), function (localXMLHttpRequest) {
288
- const XMLHttpRequest = /* eslint-disable jsdoc/valid-types -- Bug */
289
- /**
290
- * @type {{
291
- * prototype: XMLHttpRequest;
292
- * new(): XMLHttpRequest
293
- * }}
294
- */localXMLHttpRequest.default({
295
- /* eslint-enable jsdoc/valid-types -- Bug */
284
+ // eslint-disable-next-line no-shadow
285
+ const XMLHttpRequest = localXMLHttpRequest.default({
296
286
  basePath
297
- });
287
+ }); // Don't change to an import as won't resolve for browser testing
288
+ // eslint-disable-next-line promise/avoid-new
289
+
298
290
  return new Promise((resolve, reject) => {
299
291
  const r = new XMLHttpRequest();
300
- r.open('GET', jsonURL, true);
301
- // r.responseType = 'json';
292
+ r.open('GET', jsonURL, true); // r.responseType = 'json';
302
293
  // eslint-disable-next-line unicorn/prefer-add-event-listener -- May not be available
294
+
303
295
  r.onreadystatechange = function () {
304
296
  // Not sure how to simulate `if`
305
- /* c8 ignore next 3 */
297
+
298
+ /* c8 ignore next */
306
299
  if (r.readyState !== 4) {
307
300
  return;
308
301
  }
302
+
309
303
  if (r.status === 200) {
310
304
  // var json = r.json;
311
305
  const response = r.responseText;
312
- resolve(/** @type {Response} */{
306
+ resolve({
313
307
  json: () => JSON.parse(response)
314
308
  });
315
309
  return;
316
310
  }
311
+
317
312
  reject(new SyntaxError('Failed to fetch URL: ' + jsonURL + 'state: ' + r.readyState + '; status: ' + r.status));
318
313
  };
319
- r.send();
320
- // https://github.com/bcoe/c8/issues/135
314
+
315
+ r.send(); // https://github.com/bcoe/c8/issues/135
316
+
321
317
  /* c8 ignore next */
322
318
  });
319
+ /* c8 ignore next */
323
320
  });
324
321
  });
325
322
  });
326
323
  });
324
+
327
325
  const ret = buildGetJSONWithFetch({
328
326
  fetch: _fetch
329
327
  });
@@ -332,6 +330,7 @@ function buildGetJSON({
332
330
  ret.basePath = basePath;
333
331
  return ret;
334
332
  }
333
+
335
334
  const getJSON = buildGetJSON();
336
335
 
337
336
  function _iterableToArrayLimit(arr, i) {
package/dist/index-es.js CHANGED
@@ -1,41 +1,18 @@
1
- /**
2
- * @typedef {JSONValue[]} JSONArray
3
- */
4
- /**
5
- * @typedef {null|boolean|number|string|JSONArray|{[key: string]: JSONValue}} JSONValue
6
- */
1
+ /* eslint-disable node/no-unsupported-features/es-syntax */
7
2
 
8
3
  /**
9
- * @callback SimpleJSONCallback
10
- * @param {...JSONValue} json
11
- * @returns {void}
12
- */
13
-
14
- /**
15
- * @callback SimpleJSONErrback
16
- * @param {Error} err
17
- * @param {string|string[]} jsonURL
18
- * @returns {JSONValue}
19
- */
20
-
21
- /**
22
- * @typedef {((
23
- * jsonURL: string|string[],
24
- * cb?: SimpleJSONCallback,
25
- * errBack?: SimpleJSONErrback
26
- * ) => Promise<JSONValue>) & {
27
- * _fetch?: import('./index-polyglot.js').SimpleFetch,
28
- * hasURLBasePath?: boolean,
29
- * basePath?: string|false
30
- * }} getJSONCallback
4
+ * @callback getJSONCallback
5
+ * @param {string|string[]} jsonURL
6
+ * @param {SimpleJSONCallback} cb
7
+ * @param {SimpleJSONErrback} errBack
8
+ * @returns {Promise<JSON>}
31
9
  */
32
10
 
33
11
  /**
34
- * @param {object} [cfg]
35
- * @param {import('./index-polyglot.js').SimpleFetch} [cfg.fetch]
12
+ * @param {PlainObject} cfg
13
+ * @param {fetch} cfg.fetch
36
14
  * @returns {getJSONCallback}
37
15
  */
38
-
39
16
  function _await$2$1(value, then, direct) {
40
17
  if (!value || !value.then) {
41
18
  value = Promise.resolve(value);
@@ -61,9 +38,22 @@ function _catch$2(body, recover) {
61
38
  return result;
62
39
  }
63
40
  function buildGetJSONWithFetch({
64
- // eslint-disable-next-line no-shadow, no-undef -- This is a polyfill
41
+ // eslint-disable-next-line no-shadow
65
42
  fetch = typeof window !== 'undefined' ? window.fetch : self.fetch
66
43
  } = {}) {
44
+ /**
45
+ * @callback SimpleJSONCallback
46
+ * @param {JSON} json
47
+ * @returns {void}
48
+ */
49
+
50
+ /**
51
+ * @callback SimpleJSONErrback
52
+ * @param {Error} err
53
+ * @param {string|string[]} jsonURL
54
+ * @returns {void}
55
+ */
56
+
67
57
  /**
68
58
  * @type {getJSONCallback}
69
59
  */
@@ -74,10 +64,10 @@ function buildGetJSONWithFetch({
74
64
  return _invoke$1(function () {
75
65
  if (Array.isArray(jsonURL)) {
76
66
  return _await$2$1(Promise.all(jsonURL.map(url => {
77
- return /** @type {getJSONCallback} */getJSON(url);
67
+ return getJSON(url);
78
68
  })), function (arrResult) {
79
69
  if (cb) {
80
- // eslint-disable-next-line promise/prefer-await-to-callbacks -- Old-style API
70
+ // eslint-disable-next-line node/callback-return, node/no-callback-literal, promise/prefer-await-to-callbacks
81
71
  cb(...arrResult);
82
72
  }
83
73
  _exit = true;
@@ -87,22 +77,20 @@ function buildGetJSONWithFetch({
87
77
  }, function (_result) {
88
78
  return _exit ? _result : _await$2$1(fetch(jsonURL), function (resp) {
89
79
  return _await$2$1(resp.json(), function (result) {
90
- return typeof cb === 'function'
91
- // eslint-disable-next-line promise/prefer-await-to-callbacks -- Old-style API
92
- ? cb(result) : result;
93
- // https://github.com/bcoe/c8/issues/135
80
+ return typeof cb === 'function' // eslint-disable-next-line promise/prefer-await-to-callbacks
81
+ ? cb(result) : result; // https://github.com/bcoe/c8/issues/135
82
+
94
83
  /* c8 ignore next */
95
84
  });
96
85
  });
97
86
  });
98
- }, function (err) {
99
- const e = /** @type {Error} */err;
87
+ }, function (e) {
100
88
  e.message += ` (File: ${jsonURL})`;
101
89
  if (errBack) {
102
90
  return errBack(e, jsonURL);
103
91
  }
104
- throw e;
105
- // https://github.com/bcoe/c8/issues/135
92
+ throw e; // https://github.com/bcoe/c8/issues/135
93
+
106
94
  /* c8 ignore next */
107
95
  }));
108
96
  /* c8 ignore next */
@@ -117,33 +105,27 @@ function _await$1$1(value, then, direct) {
117
105
  }
118
106
  return then ? value.then(then) : value;
119
107
  }
120
- /* globals process -- Node */
121
108
 
109
+ /* eslint-disable node/no-unsupported-features/node-builtins,
110
+ node/no-unsupported-features/es-syntax, compat/compat */
122
111
  // Needed for polyglot support (no `path` in browser); even if
123
112
  // polyglot using dynamic `import` not supported by Rollup (complaining
124
113
  // of inability to do tree-shaking in UMD builds), still useful to delay
125
114
  // path import for our testing, so that test can import this file in
126
115
  // the browser without compilation without it choking
127
-
116
+ let dirname, isWindows;
117
+ function _empty() {}
128
118
  /**
129
- * @type {(directory: string) => string}
119
+ * @param {string} path
120
+ * @returns {string}
130
121
  */
131
- let dirname;
132
-
133
- /** @type {boolean} */
134
122
 
135
- function _empty() {}
136
- let isWindows;
137
123
  function _invokeIgnored(body) {
138
124
  var result = body();
139
125
  if (result && result.then) {
140
126
  return result.then(_empty);
141
127
  }
142
- } /**
143
- * @param {string} path
144
- * @returns {string}
145
- */
146
-
128
+ }
147
129
  function _async$1$1(f) {
148
130
  return function () {
149
131
  for (var args = [], i = 0; i < arguments.length; i++) {
@@ -159,7 +141,7 @@ function _async$1$1(f) {
159
141
  const setDirname = _async$1$1(function () {
160
142
  return _invokeIgnored(function () {
161
143
  if (!dirname) {
162
- return _await$1$1(import('node:path'), function (_import) {
144
+ return _await$1$1(import('path'), function (_import) {
163
145
  ({
164
146
  dirname
165
147
  } = _import);
@@ -173,14 +155,15 @@ function fixWindowsPath(path) {
173
155
  }
174
156
  return path.slice(
175
157
  // https://github.com/bcoe/c8/issues/135
158
+
176
159
  /* c8 ignore next */
177
160
  isWindows ? 1 : 0);
178
161
  }
179
-
180
162
  /**
181
163
  * @param {string} url
182
164
  * @returns {string}
183
165
  */
166
+
184
167
  function getDirectoryForURL(url) {
185
168
  // Node should be ok with this, but transpiling
186
169
  // to `require` doesn't work, so detect Windows
@@ -189,13 +172,7 @@ function getDirectoryForURL(url) {
189
172
  return fixWindowsPath(dirname(new URL(url).pathname));
190
173
  }
191
174
 
192
- /* globals window, self -- Polyglot */
193
-
194
- /**
195
- * @typedef {(url: string) => Promise<Response>} SimpleFetch
196
- */
197
-
198
- /** @type {{default: SimpleFetch}} */
175
+ /* eslint-disable node/no-unsupported-features/es-syntax */
199
176
 
200
177
  function _await$3(value, then, direct) {
201
178
  if (!value || !value.then) {
@@ -205,10 +182,10 @@ function _await$3(value, then, direct) {
205
182
  }
206
183
  let nodeFetch;
207
184
  /**
208
- * @param {object} [cfg]
209
- * @param {string} [cfg.baseURL]
210
- * @param {string|false} [cfg.cwd]
211
- * @returns {import('./buildGetJSONWithFetch.js').getJSONCallback}
185
+ * @param {PlainObject} cfg
186
+ * @param {string} cfg.baseURL
187
+ * @param {string} cfg.cwd
188
+ * @returns {getJSONCallback}
212
189
  */
213
190
 
214
191
  function _invoke$2(body, then) {
@@ -242,27 +219,18 @@ function buildGetJSON({
242
219
  baseURL,
243
220
  cwd: basePath
244
221
  } = {}) {
245
- const _fetch = typeof window !== 'undefined' || typeof self !== 'undefined' ? typeof window !== 'undefined' ? window.fetch : self.fetch
246
- // eslint-disable-next-line @stylistic/operator-linebreak -- TS
247
- :
248
- /**
249
- * @param {string} jsonURL
250
- * @returns {Promise<Response>}
251
- */
252
- _async$2(function (jsonURL) {
222
+ const _fetch = typeof window !== 'undefined' || typeof self !== 'undefined' ? typeof window !== 'undefined' ? window.fetch : self.fetch : _async$2(function (jsonURL) {
253
223
  let _exit = false;
254
224
  return _invoke$2(function () {
255
225
  if (/^https?:/u.test(jsonURL)) {
256
226
  return _invoke$2(function () {
257
227
  if (!nodeFetch) {
258
- return _await$3(import('node-fetch'), function (/** @type {{default: SimpleFetch}} */
259
- /** @type {unknown} */
260
- _import) {
228
+ return _await$3(import('node-fetch'), function (_import) {
261
229
  nodeFetch = _import;
262
230
  });
263
231
  }
264
232
  }, function () {
265
- const _nodeFetch$default = /** @type {SimpleFetch} */nodeFetch.default(jsonURL);
233
+ const _nodeFetch$default = nodeFetch.default(jsonURL);
266
234
  _exit = true;
267
235
  return _nodeFetch$default;
268
236
  });
@@ -278,46 +246,40 @@ function buildGetJSON({
278
246
  // Filed https://github.com/bergos/file-fetch/issues/12 to see
279
247
  // about getting relative basePaths in `file-fetch` and using
280
248
  // that better-tested package instead
281
- // @ts-expect-error Todo
282
- // Don't change to an import as won't resolve for browser testing
283
- // eslint-disable-next-line promise/avoid-new -- own API
284
- /* c8 ignore next */
285
249
  return _await$3(import('local-xmlhttprequest'), function (localXMLHttpRequest) {
286
- const XMLHttpRequest = /* eslint-disable jsdoc/valid-types -- Bug */
287
- /**
288
- * @type {{
289
- * prototype: XMLHttpRequest;
290
- * new(): XMLHttpRequest
291
- * }}
292
- */localXMLHttpRequest.default({
293
- /* eslint-enable jsdoc/valid-types -- Bug */
250
+ // eslint-disable-next-line no-shadow
251
+ const XMLHttpRequest = localXMLHttpRequest.default({
294
252
  basePath
295
- });
253
+ }); // Don't change to an import as won't resolve for browser testing
254
+ // eslint-disable-next-line promise/avoid-new
255
+
296
256
  return new Promise((resolve, reject) => {
297
257
  const r = new XMLHttpRequest();
298
- r.open('GET', jsonURL, true);
299
- // r.responseType = 'json';
258
+ r.open('GET', jsonURL, true); // r.responseType = 'json';
300
259
  // eslint-disable-next-line unicorn/prefer-add-event-listener -- May not be available
260
+
301
261
  r.onreadystatechange = function () {
302
262
  // Not sure how to simulate `if`
303
- /* c8 ignore next 3 */
263
+
264
+ /* c8 ignore next */
304
265
  if (r.readyState !== 4) {
305
266
  return;
306
267
  }
307
268
  if (r.status === 200) {
308
269
  // var json = r.json;
309
270
  const response = r.responseText;
310
- resolve(/** @type {Response} */{
271
+ resolve({
311
272
  json: () => JSON.parse(response)
312
273
  });
313
274
  return;
314
275
  }
315
276
  reject(new SyntaxError('Failed to fetch URL: ' + jsonURL + 'state: ' + r.readyState + '; status: ' + r.status));
316
277
  };
317
- r.send();
318
- // https://github.com/bcoe/c8/issues/135
278
+ r.send(); // https://github.com/bcoe/c8/issues/135
279
+
319
280
  /* c8 ignore next */
320
281
  });
282
+ /* c8 ignore next */
321
283
  });
322
284
  });
323
285
  });
@@ -1,4 +1,4 @@
1
- function e(e,t,n){return e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e}let t,n;function r(){}const o=(i=function(){return function(e){var t=e();if(t&&t.then)return t.then(r)}((function(){if(!t)return e=import("node:path"),n=function(e){({dirname:t}=e)},e&&e.then||(e=Promise.resolve(e)),n?e.then(n):e;var e,n}))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(i.apply(this,e))}catch(e){return Promise.reject(e)}});var i;function a(e){return r=t(new URL(e).pathname),n||(n="win32"===process.platform),r.slice(n?1:0);var r}function s(e,t,n){return e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e}let u;function c(e,t){var n=e();return n&&n.then?n.then(t):t(n)}const l=function({baseURL:t,cwd:n}={}){const r="undefined"!=typeof window||"undefined"!=typeof self?"undefined"!=typeof window?window.fetch:self.fetch:function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e){let r=!1;return c((function(){if(/^https?:/u.test(e))return c((function(){if(!u)return s(import("node-fetch"),(function(e){u=e}))}),(function(){const t=u.default(e);return r=!0,t}))}),(function(i){return r?i:c((function(){if(!n)return function(e,t,n){try{var r=Promise.resolve(e());return t?r.then(t):r}catch(e){return Promise.reject(e)}}(o,(function(){n=t?a(t):"undefined"==typeof window&&process.cwd()}))}),(function(){return s(import("local-xmlhttprequest"),(function(t){const r=t.default({basePath:n});return new Promise(((t,n)=>{const o=new r;o.open("GET",e,!0),o.onreadystatechange=function(){if(4===o.readyState)if(200!==o.status)n(new SyntaxError("Failed to fetch URL: "+e+"state: "+o.readyState+"; status: "+o.status));else{const e=o.responseText;t({json:()=>JSON.parse(e)})}},o.send()}))}))}))}))})),i=function({fetch:t=("undefined"!=typeof window?window.fetch:self.fetch)}={}){return function n(r,o,i){try{let a=!1;return e(function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return function(e,t){var n=e();return n&&n.then?n.then(t):t(n)}((function(){if(Array.isArray(r))return e(Promise.all(r.map((e=>n(e)))),(function(e){return o&&o(...e),a=!0,e}))}),(function(n){return a?n:e(t(r),(function(t){return e(t.json(),(function(e){return"function"==typeof o?o(e):e}))}))}))}),(function(e){const t=e;if(t.message+=` (File: ${r})`,i)return i(t,r);throw t})))}catch(e){return Promise.reject(e)}}}({fetch:r});return i._fetch=r,i.hasURLBasePath=Boolean(t),i.basePath=n,i}();function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(){h=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,o){var i=new RegExp(e,r);return t.set(i,o||t.get(e)),_(i,n.prototype)}function r(e,n){var r=t.get(n);return Object.keys(r).reduce((function(t,n){var o=r[n];if("number"==typeof o)t[n]=e[o];else{for(var i=0;void 0===e[o[i]]&&i+1<o.length;)i++;t[n]=e[o[i]]}return t}),Object.create(null))}return b(n,RegExp),n.prototype.exec=function(t){var n=e.exec.call(this,t);if(n){n.groups=r(n,this);var o=n.indices;o&&(o.groups=r(o,this))}return n},n.prototype[Symbol.replace]=function(n,o){if("string"==typeof o){var i=t.get(this);return e[Symbol.replace].call(this,n,o.replace(/\$<([^>]+)>/g,(function(e,t){var n=i[t];return"$"+(Array.isArray(n)?n.join("$"):n)})))}if("function"==typeof o){var a=this;return e[Symbol.replace].call(this,n,(function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(r(e,a)),o.apply(this,e)}))}return e[Symbol.replace].call(this,n,o)},h.apply(this,arguments)}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,A(r.key),r)}}function y(e,t,n){return t&&g(e.prototype,t),n&&g(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e,t,n){return(t=A(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}function x(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=w(e);if(t){var o=w(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return x(this,n)}}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||k(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||k(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){if(e){if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(e,t):void 0}}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function A(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var F=globalThis.jsonExtra,D=function(e){return e.replace(/\\+/g,(function(e){return e.slice(0,e.length/2)}))},I=function(e){return F.parse("{"+(e||"").replace(/^\{/,"").replace(/\}$/,"")+"}")},P=function(e,t,n){var r,o=n.onMatch,i=n.extra,a=n.betweenMatches,s=n.afterMatch,u=n.escapeAtOne,c=0;if(i&&(a=i,s=i,u=i),!a||!s)throw new Error("You must have `extra` or `betweenMatches` and `afterMatch` arguments.");for(;null!==(r=e.exec(t));){var l=j(r,2),f=l[0],p=l[1],d=e.lastIndex,h=d-f.length;h>c&&a(t.slice(c,h)),u&&p.length%2?(c=d,u(f)):(o.apply(void 0,E(r)),c=d)}c!==t.length&&s(t.slice(c))},N="undefined"!=typeof fetch?fetch:null,T=function(){return N},C="undefined"!=typeof document?document:null,L=function(){return C};var $=function(e,t,n){return t.sort(new Intl.Collator(e,n).compare)},R=function(e,t,n){return new Intl.ListFormat(e,n).format(t)},U=function(e,t,n,r,o){if("function"!=typeof n)return function(e,t,n,r){return $(e,t,r),R(e,t,n)}(e,t,n,r);$(e,t,o);var i,a=(i=Date.now(),"undefined"!=typeof performance&&"function"==typeof performance.now&&(i+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=Math.trunc((i+16*Math.random())%16);return i=Math.floor(i/16),("x"===e?t:3&t|8).toString(16)}))),s=E(t).map((function(e,t){return"<<".concat(a).concat(t,">>")})),u=[],c=function(e){u.push(e)};P(new RegExp("<<".concat(a,"(\\d)>>"),"gu"),R(e,s,r),{betweenMatches:c,afterMatch:c,onMatch:function(e,r){c(n(t[Number(r)],Number(r)))}});var l=L().createDocumentFragment();return l.append.apply(l,u),l},M=function(e){var t=e.object;if(Array.isArray(t)){if("function"==typeof t[1]){var n=j(t,4);return{value:n[0],callback:n[1],options:n[2],extraOpts:n[3]}}var r=j(t,3);return{value:r[0],options:r[1],extraOpts:r[2]}}return{value:t}},z=function(e){var t=e.value,n=e.arg;e.key;var r,o=e.locale;if("string"==typeof t||t&&"object"===d(t)&&"nodeType"in t)return t;var i=function(e){var t=e.type,o=e.options,i=void 0===o?r:o,a=e.checkArgOptions,s=void 0!==a&&a;if("string"==typeof n){var u=j(n.split("|"),3),c=u[0],l=u[1],f=u[2];"DATE"===c&&(c="DATETIME"),c===t&&(l?s&&!f||(i=p(p({},i),I(s&&f?f:l))):i={})}return i},a=!1;if(t&&"object"===d(t)&&!Array.isArray(t)){var s=Object.keys(t)[0];if(["number","date","datetime","dateRange","datetimeRange","relative","region","language","script","currency","list","plural"].includes(s)){var u,c,l=t[s],f=M({object:l});switch(t=f.value,r=f.options,u=f.extraOpts,c=f.callback,s){case"date":case"datetime":a=!0;break;case"dateRange":case"datetimeRange":var h=new Intl.DateTimeFormat(o,i({type:"DATERANGE",options:u}));return h.formatRange.apply(h,E([t,r].map((function(e){return"number"==typeof e?new Date(e):e}))));case"region":case"language":case"script":case"currency":return new Intl.DisplayNames(o,p(p({},i({type:s.toUpperCase()})),{},{type:s})).of(t);case"relative":var v=[r,u];return u=v[0],r=v[1],new Intl.RelativeTimeFormat(o,i({type:"RELATIVE"})).format(t,u);case"list":return c?U(o,t,c,i({type:"LIST"}),i({type:"LIST",options:u,checkArgOptions:!0})):U(o,t,i({type:"LIST"}),i({type:"LIST",options:u,checkArgOptions:!0}))}}}if(t&&("number"==typeof t&&(a||/^DATE(?:TIME)(?:\||$)/.test(n))&&(t=new Date(t)),"object"===d(t)&&"getTime"in t&&"function"==typeof t.getTime))return new Intl.DateTimeFormat(o,i({type:"DATETIME"})).format(t);if(Array.isArray(t)){var g,y=t[2];return(g=new Intl.DateTimeFormat(o,i({type:"DATERANGE",options:y}))).formatRange.apply(g,E(t.slice(0,2).map((function(e){return"number"==typeof e?new Date(e):e}))))}if("number"==typeof t)return new Intl.NumberFormat(o,i({type:"NUMBER"})).format(t);throw new TypeError("Unknown formatter")},B=y((function e(){v(this,e)})),q=function(e){var t=e.key,n=e.body,r=e.type,o=e.messageStyle,i=ee({messageStyle:void 0===o?"richNested":o})({body:n},t);if(!i)throw new Error("Key value not found for ".concat(r," key: (").concat(t,")"));return i.value},W=function(e){b(n,B);var t=S(n);function n(e){var r;return v(this,n),(r=t.call(this)).locals=e,r}return y(n,[{key:"getSubstitution",value:function(e){return q({key:e.slice(1),body:this.locals,type:"local"})}},{key:"isMatch",value:function(e){var t=e.slice(1).split("."),n=this.locals;return this.constructor.isMatchingKey(e)&&t.every((function(e){var t=e in n;return n=n[e],t}))}}],[{key:"isMatchingKey",value:function(e){return e.startsWith("-")}}]),n}(),V=function(e){b(n,B);var t=S(n);function n(e){var r;return v(this,n),(r=t.call(this)).substitutions=e,r}return y(n,[{key:"isMatch",value:function(e){return this.constructor.isMatchingKey(e)&&e in this.substitutions}}],[{key:"isMatchingKey",value:function(e){return/^[0-9A-Z_a-z]/.test(e)}}]),n}(),H=function(e){b(n,B);var t=S(n);function n(e,r){var o,i=r.substitutions;return v(this,n),(o=t.call(this)).switches=e,o.substitutions=i,o}return y(n,[{key:"getSubstitution",value:function(e,t){var n,r,o=t.locale,i=t.usedKeys,a=t.arg,s=t.missingSuppliedFormatters,u=this.constructor.getKey(e).slice(1),c=j(this.getMatch(u),3),l=c[0],f=c[1],h=c[2];if(i.push(h),l&&l.includes("|")){var v=j(l.split("|"),3);n=v[1],r=v[2]}if(!f)return s({key:e,formatter:this}),"\\{"+e+"}";var g=function(e,t){var n=I(r);return new Intl.NumberFormat(o,p(p({},t),n)).format(e)},y=function(e,t){var n=I(r);return new Intl.PluralRules(o,p(p({},t),n)).select(e)},m=this.substitutions[h],b=m;if("number"==typeof m)switch(n){case"NUMBER":b=g(m);break;case"PLURAL":b=y(m);break;default:b=new Intl.PluralRules(o).select(m)}else if(m&&"object"===d(m)){var w=Object.keys(m)[0];if(["number","plural"].includes(w)){var _=M({object:m[w]}),x=_.value,S=_.options;if(n||(n=w.toUpperCase()),!(w.toUpperCase()===n))throw new TypeError('Expecting type "'.concat(n.toLowerCase(),'"; instead found "').concat(w,'".'));switch(n){case"NUMBER":b=g(x,S);break;case"PLURAL":b=y(x,S)}}}var E="richNested",k=function(e){return e.replace(/\\/g,"\\\\").replace(/\./g,"\\.")};try{return q({messageStyle:E,key:b?k(b):a,body:f,type:"switch"})}catch(e){try{return q({messageStyle:E,key:"*"+k(b),body:f,type:"switch"})}catch(e){var O=Object.keys(f).find((function(e){return e.startsWith("*")}));if(!O)throw new Error("No defaults found for switch ".concat(u));return q({messageStyle:E,key:k(O),body:f,type:"switch"})}}}},{key:"isMatch",value:function(e){return Boolean(e&&this.constructor.isMatchingKey(e)&&this.getMatch(e.slice(1)).length)}},{key:"getMatch",value:function(e){var t=this,n=e.split(".");return n.reduce((function(r,o,i){if(i<n.length-1){if(!(o in r))throw new Error('Switch key "'.concat(o,'" not found (from "~').concat(e,'")'));return r[o]}var a=Object.entries(r).find((function(e){var n=j(e,1)[0];return o===t.constructor.getKey(n)}));return a?[].concat(E(a),[o]):[]}),this.switches)}}],[{key:"isMatchingKey",value:function(e){return e.startsWith("~")}},{key:"getKey",value:function(e){var t=e.match(/^(?:[\0-\{\}-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*/);return t&&t[0]}}]),n}();function J(e,t,n){if(!e.s){if(n instanceof K){if(!n.s)return void(n.o=J.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(J.bind(null,e,t),J.bind(null,e,2));e.s=t,e.v=n;var r=e.o;r&&r(e)}}var K=function(){function e(){}return e.prototype.then=function(t,n){var r=new e,o=this.s;if(o){var i=1&o?t:n;if(i){try{J(r,1,i(this.v))}catch(e){J(r,2,e)}return r}return this}return this.o=function(e){try{var o=e.v;1&e.s?J(r,1,t?t(o):o):n?J(r,1,n(o)):J(r,2,o)}catch(e){J(r,2,e)}},r},e}();function G(e){return e instanceof K&&1&e.s}var Z=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Reached end of values array.";if(!Array.isArray(e))throw new TypeError("The `values` argument to `promiseChainForValues` must be an array.");if("function"!=typeof t)throw new TypeError("The `errBack` argument to `promiseChainForValues` must be a function.");return function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(){var r,o,i,a,s=!1,u=Promise.reject(new Error("Intentionally reject so as to begin checking chain"));return i=function(e,t,n){for(var r;;){var o=e();if(G(o)&&(o=o.v),!o)return i;if(o.then){r=0;break}var i=n();if(i&&i.then){if(!G(i)){r=1;break}i=i.s}}var a=new K,s=J.bind(null,a,2);return(0===r?o.then(c):1===r?i.then(u):(void 0).then((function(){(o=e())?o.then?o.then(c).then(void 0,s):c(o):J(a,1,i)}))).then(void 0,s),a;function u(t){i=t;do{if(!(o=e())||G(o)&&!o.v)return void J(a,1,i);if(o.then)return void o.then(c).then(void 0,s);G(i=n())&&(i=i.v)}while(!i||!i.then);i.then(u).then(void 0,s)}function c(e){e?(i=n())&&i.then?i.then(u).then(void 0,s):u(i):J(a,1,i)}}((function(){return!s}),0,(function(){var i=e.shift();return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return function(e,t,n){return e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e}(u,(function(e){r=e,s=!0}))}),(function(){if(o)throw new Error(n);e.length||(o=!0),u=t(i)}))})),a=function(e){return r},i&&i.then?i.then(a):a(i)}))()},X=function(e,t){if("string"!=typeof e)throw new TypeError("`defaultLocaleResolver` expects a string `localesBasePath`.");if("string"!=typeof t)throw new TypeError("`defaultLocaleResolver` expects a string `locale`.");if(/[\.\/\\]/.test(t))throw new TypeError("Locales cannot use file-reserved characters, `.`, `/` or `\\`");return"".concat(e.replace(/\/$/,""),"/_locales/").concat(t,"/messages.json")},Y=function(e){var t=e.string,n=e.dom,r=e.usedKeys,o=e.substitutions,i=e.allSubstitutions,a=e.locale,s=e.locals,u=e.switches,c=e.maximumLocalNestingDepth,l=void 0===c?3:c,f=e.missingSuppliedFormatters,h=e.checkExtraSuppliedFormatters;if("number"!=typeof l)throw new TypeError("`maximumLocalNestingDepth` must be a number.");var v=function(){Object.entries(o).forEach((function(e){var t=j(e,2),n=t[0];"function"==typeof t[1]&&r.push(n)}))};v();var g=new W(s),y=new V(o),m=new H(u,{substitutions:o}),b=/(\\*)\{((?:(?:[\0-\|~-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])|\\\})*?)(?:(\|)((?:[\0-\|~-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*))?\}/g;i&&(i=Array.isArray(i)?i:[i]);var w=function(e){var t,n=e.key,o=e.arg,s=e.substs;return g.constructor.isMatchingKey(n)?t=g.getSubstitution(n):m.constructor.isMatchingKey(n)?t=m.getSubstitution(n,{locale:a,usedKeys:r,arg:o,missingSuppliedFormatters:f}):"function"==typeof(t=s[n])&&(t=t({arg:o,key:n})),i?t=i.reduce((function(e,t){return t({value:e,arg:o,key:n,locale:a})}),t):o&&/^(?:NUMBER|DATE(?:TIME|RANGE|TIMERANGE)?|REGION|LANGUAGE|SCRIPT|CURRENCY|RELATIVE|LIST)(?:\||$)/.test(o)&&(t=z({value:t,arg:o,key:n,locale:a})),t},_=1,x=function(e){var t=e.substitution,n=e.ky,r=e.arg,i=e.processSubsts,a=t;if("string"==typeof t&&t.includes("{")){if(_++>l)throw new TypeError("Too much recursion in local variables.");if(g.constructor.isMatchingKey(n)){var s,u=o;r&&(s=I(r),u=p(p({},o),s)),a=i({str:t,substs:u,formatter:g}),s&&h({substitutions:s})}else m.constructor.isMatchingKey(n)&&(a=i({str:t}))}return a};if(!n){var S=!1,k=function e(t){var n=t.str,i=t.substs,a=void 0===i?o:i,s=t.formatter,u=void 0===s?y:s;return n.replace(b,(function(t,n,o,i,s){if(n.length%2)return t;if(f({key:o,formatter:u}))return t;var c=w({key:o,arg:s,substs:a});return c=x({substitution:c,ky:o,arg:s,processSubsts:e}),S=S||null!==c&&"object"===d(c)&&"nodeType"in c,r.push(o),n+c}))}({str:t});if(!S)return h({substitutions:o}),r.length=0,v(),D(k);r.length=0,v()}_=1;var O=function e(t){var n=t.str,i=t.substs,a=void 0===i?o:i,s=t.formatter,u=void 0===s?y:s,c=[],l=new RegExp(b,"gu"),p=function(){c.push.apply(c,arguments)};return P(l,n,{extra:p,onMatch:function(t,n,o,i,s){if(f({key:o,formatter:u}))p(t);else{n.length&&p(n);var c=w({key:o,arg:s,substs:a});c=x({substitution:c,ky:o,arg:s,processSubsts:e}),Array.isArray(c)?p.apply(void 0,E(c)):c&&"object"===d(c)&&"nodeType"in c?p(c.cloneNode(!0)):p(c)}r.push(o)}}),c}({str:t});return h({substitutions:o}),r.length=0,O.map((function(e){return"string"==typeof e?D(e):e}))};function Q(e,t){if(Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))&&"string"==typeof t&&t.endsWith("Nested"))return e.map((function(e){return e.replace(h(/(\\+)/g,{backslashes:1}),"\\$<backslashes>").replace(/\./g,"\\.")})).join(".");if("string"!=typeof e)throw new TypeError("`key` is expected to be a string (or array of strings for nested style)");return e}var ee=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).messageStyle,t=void 0===e?"richNested":e;return"function"==typeof t?t:"richNested"===t?function(e,t){var n=e&&"object"===d(e)&&e.body,r=[],o=function(e){r.length||(r[0]=""),r[r.length-1]+=e};P(/(\\*)\./g,t,{extra:o,onMatch:function(e,t){o(t),r.push("")}});var i=r.map((function(e){return D(e)})),a=!1,s=n;return i.some((function(e,t,n){return!s||"object"!==d(s)||(t===n.length-1&&e in s&&s[e]&&"object"===d(s[e])&&"message"in s[e]&&"string"==typeof s[e].message&&(a={value:s[e].message,info:s[e]}),s=s[e],!1)})),a}:"rich"===t?function(e,t){var n=e&&"object"===d(e)&&e.body;return!!(n&&"object"===d(n)&&t in n&&n[t]&&"object"===d(n[t])&&"message"in n[t]&&"string"==typeof n[t].message)&&{value:n[t].message,info:n[t]}}:"plain"===t?function(e,t){var n=e&&"object"===d(e)&&e.body;return!!(n&&"object"===d(n)&&t in n&&n[t]&&"string"==typeof n[t])&&{value:n[t]}}:"plainNested"===t?function(e,t){var n=e&&"object"===d(e)&&e.body;if(n&&"object"===d(n)){var r=t.split(/(?<!\\)\./).reduce((function(e,t){return e&&"object"===d(e)&&e[t]?e[t]:null}),n);if(r&&"string"==typeof r)return{value:r}}return!1}:function(){throw new TypeError("Unknown `messageStyle` ".concat(t))}()};function te(e,t,n){return e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e}function ne(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}var re=function(e){if(!e.includes("-"))throw new Error("Locale not available");return e.replace(/\x2D(?:[\0-,\.-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*$/,"")},oe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.locales,n=e.defaultLocales,r=e.localeResolver,o=e.localesBasePath,i=e.localeMatcher;return ie({locales:t,defaultLocales:n,localeResolver:r,localesBasePath:o,localeMatcher:i})},ie=ne((function(e){var t=ne((function(e){if("string"!=typeof e)throw new TypeError("Non-string locale type");var n=s(c,e);if("string"!=typeof n)throw new TypeError("`localeResolver` expected to resolve to (URL) string.");return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){var t=T();return te(d?t(n,{method:"HEAD"}):t(n),(function(t){if(404===t.status)throw new Error("Trying again");return d?e:te(t.json(),(function(t){return{locale:e,strings:t}}))}))}),(function(n){if("SyntaxError"===n.name)throw n;return te(f(e),t)}))})),n=e.locales,r=void 0===n?"undefined"!=typeof intlDomLocale?[intlDomLocale]:"undefined"==typeof navigator?[]:navigator.languages:n,o=e.defaultLocales,i=void 0===o?["en-US"]:o,a=e.localeResolver,s=void 0===a?X:a,u=e.localesBasePath,c=void 0===u?".":u,l=e.localeMatcher,f=void 0===l?"lookup":l,p=e.headOnly,d=void 0!==p&&p;if("lookup"===f)f=re;else if("function"!=typeof f)throw new TypeError('`localeMatcher` must be "lookup" or a function!');return Z([].concat(E(r),E(i)),t,"No matching locale found for "+[].concat(E(r),E(i)).join(", "))}));function ae(e,t,n){return e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e}var se=function(e){var t=e.strings,n=e.resolvedLocale,r=e.messageStyle,o=void 0===r?"richNested":r,i=e.allSubstitutions,a=e.insertNodes,s=e.keyCheckerConverter,u=void 0===s?Q:s,c=e.defaults,l=e.substitutions,f=e.maximumLocalNestingDepth,h=e.dom,v=void 0!==h&&h,g=e.forceNodeReturn,y=void 0!==g&&g,m=e.throwOnMissingSuppliedFormatters,b=void 0===m||m,w=e.throwOnExtraSuppliedFormatters,_=void 0===w||w;if(!t||"object"!==d(t))throw new TypeError("Locale strings must be an object!");var x=ee({messageStyle:o}),S=function(e,r){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},h=s.allSubstitutions,g=void 0===h?i:h,m=s.defaults,w=void 0===m?c:m,S=s.dom,j=void 0===S?v:S,k=s.forceNodeReturn,O=void 0===k?y:k,A=s.throwOnMissingSuppliedFormatters,F=void 0===A?b:A,D=s.throwOnExtraSuppliedFormatters,I=void 0===D?_:D;e=u(e,o);var P=x(t,e),N=function(e){var t,n=e.message,r=e.defaults,o=e.messageStyle,i=e.messageForKey,a=void 0===i?ee({messageStyle:o}):i,s=e.key;if("string"==typeof n)t=n;else if(!1===r||null==r)t=!1;else{if(!r||"object"!==d(r))throw new TypeError("Default locale strings must resolve to `false`, nullish, or an object!");var u=a(r,s);t=u?u.value:u}if(!1===t)throw new Error("Key value not found for key: (".concat(s,")"));return t}({message:!(!P||"string"!=typeof P.value)&&P.value,defaults:w,messageForKey:x,key:e});return function(e){var t=e.string,n=e.locale,r=e.locals,o=e.switches,i=e.allSubstitutions,a=void 0===i?[z]:i,s=e.insertNodes,u=void 0===s?Y:s,c=e.substitutions,l=void 0!==c&&c,f=e.dom,p=void 0!==f&&f,d=e.forceNodeReturn,h=void 0!==d&&d,v=e.throwOnMissingSuppliedFormatters,g=void 0===v||v,y=e.throwOnExtraSuppliedFormatters,m=void 0===y||y;if("string"!=typeof t)throw new TypeError("An options object with a `string` property set to a string must be provided for `getDOMForLocaleString`.");var b=function(e){var t=L();return h?t.createTextNode(e):e},w=[];if(!l&&!a&&!g)return b(t);l||(l={});var _=u({string:t,dom:p,usedKeys:w,substitutions:l,allSubstitutions:a,locale:n,locals:r,switches:o,missingSuppliedFormatters:function(e){var t=e.key,n=e.formatter,r=n.isMatch(t);if(n.constructor.isMatchingKey(t)&&!r){if(g)throw new Error("Missing formatting key: ".concat(t));return!0}return!1},checkExtraSuppliedFormatters:function(e){var t=e.substitutions;m&&Object.keys(t).forEach((function(e){if(!w.includes(e))throw new Error("Extra formatting key: ".concat(e))}))}});if("string"==typeof _)return b(_);var x=L().createDocumentFragment();return x.append.apply(x,E(_)),x}({string:N,locals:t.head&&t.head.locals,switches:t.head&&t.head.switches,locale:n,maximumLocalNestingDepth:f,allSubstitutions:g,insertNodes:a,substitutions:p(p({},l),r),dom:j,forceNodeReturn:O,throwOnMissingSuppliedFormatters:F,throwOnExtraSuppliedFormatters:I})};return S.resolvedLocale=n,S.strings=t,S.sort=function(e,t){return $(n,e,t)},S.sortList=function(e,t,r,o){return U(n,e,t,r,o)},S.list=function(e,t){return R(n,e,t)},S},ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.locales,n=e.defaultLocales,r=e.localeStringFinder,o=void 0===r?oe:r,i=e.localesBasePath,a=e.localeResolver,s=e.localeMatcher,u=e.messageStyle,c=e.allSubstitutions,l=e.insertNodes,f=e.keyCheckerConverter,p=e.defaults,d=e.substitutions,h=e.maximumLocalNestingDepth,v=e.dom,g=e.forceNodeReturn,y=e.throwOnMissingSuppliedFormatters,m=e.throwOnExtraSuppliedFormatters;try{return ae(o({locales:t,defaultLocales:n,localeResolver:a,localesBasePath:i,localeMatcher:s}),(function(e){var t=e.strings,r=e.locale;return function(e,t){var n=e();return n&&n.then?n.then(t):t(n)}((function(){if(!p&&n)return ae(o({locales:n,defaultLocales:[],localeResolver:a,localesBasePath:i,localeMatcher:s}),(function(e){p=e.strings,e.locale===r&&(p=null)}))}),(function(){return se({strings:t,resolvedLocale:r,messageStyle:u,allSubstitutions:c,insertNodes:l,keyCheckerConverter:f,defaults:p,substitutions:d,maximumLocalNestingDepth:h,dom:v,forceNodeReturn:g,throwOnMissingSuppliedFormatters:y,throwOnExtraSuppliedFormatters:m})}))}))}catch(e){return Promise.reject(e)}};function ce(e,{before:t,after:n,favicon:r,canvas:o,image:i=!0,acceptErrors:a}={}){return e=Array.isArray(e)?e:[e],Promise.all(e.map((e=>function(e){let s,u={};Array.isArray(e)?[s,u={}]=e:s=e;let{favicon:c=r}=u;const{before:l=t,after:f=n,canvas:p=o,image:d=i}=u;function h(){l?l.before(v):f?f.after(v):document.head.append(v)}const v=document.createElement("link");return new Promise(((e,t)=>{let n=t;if(a&&(n="function"==typeof a?n=>{a({error:n,stylesheetURL:s,options:u,resolve:e,reject:t})}:e),s.endsWith(".css")?c=!1:s.endsWith(".ico")&&(c=!0),c){if(v.rel="shortcut icon",v.type="image/x-icon",!1===d)return v.href=s,h(),void e(v);const n=document.createElement("canvas");n.width=16,n.height=16;const r=n.getContext("2d"),o=document.createElement("img");return o.addEventListener("error",(e=>{t(e)})),o.addEventListener("load",(()=>{if(!r)throw new Error("Canvas context could not be found");r.drawImage(o,0,0),v.href=p?n.toDataURL("image/x-icon"):s,h(),e(v)})),void(o.src=s)}v.rel="stylesheet",v.type="text/css",v.href=s,h(),v.addEventListener("error",(e=>{n(e)})),v.addEventListener("load",(()=>{e(v)}))}))}(e))))}function le(e){return le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},le(e)}function fe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||de(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pe(e){return function(e){if(Array.isArray(e))return he(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||de(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function de(e,t){if(e){if("string"==typeof e)return he(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?he(e,t):void 0}}function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ve=/^(?:submit|button|image|reset|file)$/i,ge=/^(?:input|select|textarea|keygen)/i,ye=/(\[[^[\]]*])/g;function me(e,t){"object"!==le(t)?t={hash:Boolean(t)}:void 0===t.hash&&(t.hash=!0);var n=t.hash?{}:"",r=t.serializer||(t.hash?we:_e),o=e&&e.elements?pe(e.elements):[],i=Object.create(null);return o.forEach((function(e){if((t.disabled||!e.disabled)&&e.name&&ge.test(e.nodeName)&&!ve.test(e.type)){var o=e.name,a=e.type,s=e.name,u=e.checked,c=e.value;if("checkbox"!==a&&"radio"!==a||u||(c=void 0),t.empty){if("checkbox"!==a||u||(c=""),"radio"===a&&(i[s]||u?u&&(i[s]=!0):i[s]=!1,void 0===c))return}else if(!c)return;if("select-multiple"===a){var l=!1;return pe(e.options).forEach((function(e){var i=t.empty&&!e.value,a=e.value||i;e.selected&&a&&(l=!0,n=t.hash&&"[]"!==o.slice(-2)?r(n,o+"[]",e.value):r(n,o,e.value))})),void(!l&&t.empty&&(n=r(n,o,"")))}n=r(n,o,c)}})),t.empty&&Object.entries(i).forEach((function(e){var t=fe(e,2),o=t[0];t[1]||(n=r(n,o,""))})),n}function be(e,t,n){if(0===t.length)return n;var r=t.shift(),o=r.match(/^\[(.+?)]$/);if("[]"===r)return e=e||[],Array.isArray(e)?e.push(be(null,t,n)):(e._values=e._values||[],e._values.push(be(null,t,n))),e;if(o){var i=o[1],a=Number(i);isNaN(a)?(e=e||{})[i]=be(e[i],t,n):(e=e||[])[a]=be(e[a],t,n)}else e[r]=be(e[r],t,n);return e}function we(e,t,n){if(t.match(ye)){be(e,function(e){var t=[],n=new RegExp(ye),r=/^([^[\]]*)/.exec(e);for(r[1]&&t.push(r[1]);null!==(r=n.exec(e));)t.push(r[1]);return t}(t),n)}else{var r=e[t];r?(Array.isArray(r)||(e[t]=[r]),e[t].push(n)):e[t]=n}return e}function _e(e,t,n){return n=n.replace(/(\r)?\n/g,"\r\n"),n=(n=encodeURIComponent(n)).replace(/%20/g,"+"),e+(e?"&":"")+encodeURIComponent(t)+"="+n}function xe(e,t){Object.entries(t).forEach((function(t){var n=fe(t,2),r=n[0],o=n[1],i=e[r],a=!1;if(!i&&!(i=e.querySelector('[name="'.concat(r,'"]')))){if(!((i=e[r+"[]"])&&"object"===le(i)&&"length"in i||(i=e.querySelectorAll('[name="'.concat(r,'[]"]'))).length))throw new Error("Name not found ".concat(r));a=!0}var s=i.type;if("checkbox"===s&&(i.checked=""!==o),("radio"===s||i[0]&&"radio"===i[0].type)&&pe(e.querySelectorAll('[name="'.concat(r+(a?"[]":""),'"]'))).forEach((function(e){e.checked=o===e.value})),i[0]&&"select-multiple"===i[0].type)pe(i[0].options).forEach((function(e){o.includes(e.value)&&(e.selected=!0)}));else if(Array.isArray(o)){if("select-multiple"===s)return void pe(i.options).forEach((function(e){o.includes(e.value)&&(e.selected=!0)}));o.forEach((function(e,t){var n=i[t];if("checkbox"!==n.type)"select-multiple"!==n.type?n.value=e:pe(n.options).forEach((function(t){e.includes(t.value)&&(t.selected=!0)}));else{var r=n.value===e||"on"===e;n.checked=r}}))}else i.value=o}))}let Se;"undefined"!=typeof window&&window&&(Se=window);let je="undefined"!=typeof document&&document||Se?.document;const Ee=["$plugins","$map"],ke="http://www.w3.org/1999/xhtml",Oe=/-([a-z])/gu,Ae=new Map([["maxlength","maxLength"],["minlength","minLength"],["readonly","readOnly"]]),Fe=["checked","defaultChecked","defaultSelected","disabled","indeterminate","open","readOnly","selected","accessKey","async","autocapitalize","autofocus","contentEditable","defaultValue","defer","draggable","formnovalidate","hidden","innerText","inputMode","ismap","multiple","novalidate","pattern","required","spellcheck","translate","value","willvalidate"],De=["autocomplete","dir","integrity","lang","max","min","minLength","maxLength","title"],Ie=e=>{if(!je)throw new Error("No document object");return je.querySelector(e)},Pe=e=>{if(!je)throw new Error("No document object");return[...je.querySelectorAll(e)]};function Ne(e,t){var n;"template"!==((n=e).nodeName&&n.nodeName.toLowerCase())?e.append(t):e.content.append(t)}function Te(e,t,n){if(!je)throw new Error("No document defined");if(!/^\w+$/u.test(n))throw new TypeError(`Bad ${e} reference; with prefix "${t}" and arg "${n}"`);const r=je.createElement("div");return r.innerHTML="&"+t+n+";",je.createTextNode(r.innerHTML)}function Ce(e,t){return t.toUpperCase()}function Le(e){return null==e}function $e(e){const t=typeof e;if("string"==typeof e||void 0===e)return"string";if("object"===t){if(null===e)return"null";if(Array.isArray(e))return"array";if("nodeType"in e)switch(e.nodeType){case 1:return"element";case 9:return"document";case 11:return"fragment";default:return"non-container node"}}return t}function Re(e,t){return e.append(t),e}function Ue(e){return function(...t){const n=t[0];let r=e[""]?' xmlns="'+e[""]+'"':n;for(const[t,n]of Object.entries(e))""!==t&&(r+=" xmlns:"+t+'="'+n+'"');return r}}function Me(e){return function(t,n){const r=e.childNodes[n],o=Array.isArray(t)?Ve(...t):Ve(t);r.replaceWith(o)}}function ze(e){return function(t){if("string"==typeof t||"number"==typeof t)throw new TypeError("Unexpected text string/number in the head");Array.isArray(t)?e.append(Ve(...t)):"object"==typeof t&&"nodeType"in t?e.append(t):e.append(Ve(t))}}function Be(e){return function(t){"string"==typeof t||"number"==typeof t?e.append(String(t)):Array.isArray(t)?e.append(Ve(...t)):"object"==typeof t&&"nodeType"in t?e.append(t):e.append(Ve(t))}}function qe(e,t,n,r,o){if(r.$state=o??"attributeValue",n&&"object"==typeof n){const o=We(r,Object.keys(n)[0]);if(o)return o.set({opts:r,element:e,attribute:{name:t,value:n}})}return n}function We(e,t){return e.$plugins&&e.$plugins.find((e=>e.name===t))}const Ve=function e(...t){if(!Se)throw new Error("No window object");if(!je)throw new Error("No document object");let n=je.createDocumentFragment();function r(r){if(!je)throw new Error("No document object");for(let[p,d]of Object.entries(r))if(p=Ae.get(p)??p,De.includes(p))d=qe(n,p,d,a),Le(d)||(n[p]=d);else if(Fe.includes(p))d=qe(n,p,d,a),n[p]=d;else switch(p){case"#":a.$state="fragmentChildren",o[o.length]=e(a,d);break;case"$shadow":{const{open:t,closed:r}=d;let{content:o,template:i}=d;const a=n.attachShadow({mode:r||!1===t?"closed":"open"});i?(Array.isArray(i)?i="object"===$e(i[0])?e("template",...i,je.body):e("template",i,je.body):"string"==typeof i&&(i=Ie(i)),e(i.content.cloneNode(!0),a)):(o||!0!==t&&(o=t||"boolean"==typeof r?o:r),o&&"boolean"!=typeof o&&(Array.isArray(o)?e({"#":o},a):e(o,a)));break}case"$state":case"is":case"xmlns":break;case"$custom":Object.assign(n,d);break;case"$define":{if(!("localName"in n))throw new Error("Element expected for `$define`");const e=n.localName.toLowerCase(),o=!e.includes("-");let i;if(o&&(i=n.getAttribute("is"),!i)){if(!Object.hasOwn(r,"is"))throw new TypeError(`Expected \`is\` with \`$define\` on built-in; args: ${JSON.stringify(t)}`);r.is=qe(n,"is",r.is,a),n.setAttribute("is",r.is),({is:i}=r)}const s=o?i:e;if(window.customElements.get(s))break;const u=t=>{if(!je)throw new Error("No document object");const n="object"==typeof l&&"string"==typeof l.extends?je.createElement(l.extends).constructor:o?je.createElement(e).constructor:window.HTMLElement;return t?class extends n{constructor(){super(),t.call(this)}}:class extends n{}};let c,l,f;const p=d;Array.isArray(p)?p.length<=2?([c,l]=p,"string"==typeof l?l={extends:l}:l&&!Object.hasOwn(l,"extends")&&(f=l),"object"==typeof c&&(f=c,c=u())):([c,f,l]=p,"string"==typeof l&&(l={extends:l})):"function"==typeof p?c=p:(f=p,c=u()),c.toString().startsWith("class")||(c=u(c)),!l&&o&&(l={extends:e}),f&&Object.entries(f).forEach((([e,t])=>{c.prototype[e]=t})),window.customElements.define(s,c,"object"==typeof l?l:void 0);break}case"$symbol":{const[e,t]=d;if("function"==typeof t){const r=t.bind(n);"string"==typeof e?n[Symbol.for(e)]=r:n[e]=r}else{const r=t;r.elem=n,"string"==typeof e?n[Symbol.for(e)]=r:n[e]=r}break}case"$data":f(d);break;case"$attribute":{const e=d,t=3===e.length?je.createAttributeNS(e[0],e[1]):je.createAttribute(e[0]);t.value=e[e.length-1],o[o.length]=t;break}case"$text":{const e=je.createTextNode(d);o[o.length]=e;break}case"$document":{const t=je.implementation.createHTMLDocument();if(!d)throw new Error("Bad attribute value");const n=d;if(n.childNodes){const e=n.childNodes.length;for(;t.childNodes[e];){t.childNodes[e].remove()}n.childNodes.forEach(Me(t))}else{if(n.$DOCTYPE){const r={$DOCTYPE:n.$DOCTYPE},o=e(r);t.firstChild?.replaceWith(o)}const r=t.querySelector("html"),o=r?.querySelector("head"),i=r?.querySelector("body");if(n.title||n.head){const e=je.createElement("meta");e.setAttribute("charset","utf-8"),o?.append(e),n.title&&(t.title=n.title),n.head&&o&&n.head.forEach(ze(o))}n.body&&i&&n.body.forEach(Be(i))}o[o.length]=t;break}case"$DOCTYPE":{const e=d,t=je.implementation.createDocumentType(e.name,e.publicId||"",e.systemId||"");o[o.length]=t;break}case"$on":for(let[e,r]of Object.entries(d||{})){if("function"==typeof r&&(r=[r,!1]),"function"!=typeof r[0])throw new TypeError(`Expect a function for \`$on\`; args: ${JSON.stringify(t)}`);s=n,u=e,c=r[0],l=r[1],s.addEventListener(u,c,Boolean(l))}break;case"className":case"class":d=qe(n,p,d,a),Le(d)||(n.className=d);break;case"dataset":{const e=(t,r)=>{let o="";const i=""!==r;Object.keys(t).forEach((a=>{const s=t[a];if(o=i?r+a.replace(Oe,Ce).replace(/^([a-z])/u,Ce):r+a.replace(Oe,Ce),null===s||"object"!=typeof s)return Le(s)||(n.dataset[o]=s),void(o=r);e(s,o)}))};e(d,"");break}case"innerHTML":Le(d)||(n.innerHTML=d);break;case"htmlFor":case"for":if("label"===i){d=qe(n,p,d,a),Le(d)||(n.htmlFor=d);break}d=qe(n,p,d,a),n.setAttribute(p,d);break;default:{if(p.startsWith("on")){d=qe(n,p,d,a),n[p]=d;break}if("style"===p){if(d=qe(n,p,d,a),Le(d))break;if("object"==typeof d){for(const[e,t]of Object.entries(d))Le(t)||("float"===e?(n.style.cssFloat=t,n.style.styleFloat=t):n.style[e.replace(Oe,Ce)]=t);break}n.setAttribute(p,d);break}const e=p,t=We(a,e);if(t){t.set({opts:a,element:o[0],attribute:{name:e,value:d}});break}d=qe(n,p,d,a),n.setAttribute(p,d);break}}var s,u,c,l}const o=[];let i,a,s=!1,u=0;if("object"===$e(t[0])&&Object.keys(t[0]).some((e=>Ee.includes(e)))){if(a=t[0],void 0===a.$state&&(s=!0,a.$state="root"),Array.isArray(a.$map)&&(a.$map={root:a.$map}),"$plugins"in a){if(!Array.isArray(a.$plugins))throw new TypeError(`\`$plugins\` must be an array; args: ${JSON.stringify(t)}`);a.$plugins.forEach((e=>{if(!e||"object"!=typeof e)throw new TypeError(`Plugin must be an object; args: ${JSON.stringify(t)}`);if(!e.name||!e.name.startsWith("$_"))throw new TypeError(`Plugin object name must be present and begin with \`$_\`; args: ${JSON.stringify(t)}`);if("function"!=typeof e.set)throw new TypeError(`Plugin object must have a \`set\` method; args: ${JSON.stringify(t)}`)}))}u=1}else a={$state:void 0};const c=t.length,l=a.$map&&a.$map.root,f=e=>{let t,r;const o=l;if(!0===e)[t,r]=o;else if(Array.isArray(e)){if("string"==typeof e[0])return void e.forEach((e=>{f(a.$map[e])}));t=e[0]||o[0],r=e[1]||o[1]}else/^\[object (?:Weak)?Map\]$/u.test([].toString.call(e))?(t=e,r=o[1]):(t=o[0],r=e);t.set(n,r)};for(let s=u;s<c;s++){let u=t[s];const l=$e(u);switch(l){case"null":if(s===c-1)return o.length<=1?o[0]:o.reduce(Re,je.createDocumentFragment());throw new TypeError(`\`null\` values not allowed except as final Jamilih argument; index ${s} on args: ${JSON.stringify(t)}`);case"string":switch(u){case"!":o[o.length]=je.createComment(t[++s]);break;case"?":{u=t[++s];let e=t[++s];const n=e;if(n&&"object"==typeof n){const t=[];for(const[e,r]of Object.entries(n))t.push(e+'="'+r.replace(/"/gu,"&quot;")+'"');e=t.join(" ")}try{o[o.length]=je.createProcessingInstruction(u,e)}catch(t){o[o.length]=je.createComment("?"+u+" "+e+"?")}break}case"&":o[o.length]=Te("entity","",t[++s]);break;case"#":o[o.length]=Te("decimal",u,String(t[++s]));break;case"#x":o[o.length]=Te("hexadecimal",u,t[++s]);break;case"![":try{o[o.length]=je.createCDATASection(t[++s])}catch(e){o[o.length]=je.createTextNode(t[s])}break;case"":o[o.length]=n=je.createDocumentFragment(),a.$state="fragment";break;default:{i=u;const e=t[s+1];if(e&&"object"===$e(e)&&e.is){const{is:t}=e;n=je.createElementNS?je.createElementNS(ke,i,{is:t}):je.createElement(i,{is:t})}else n=je.createElementNS?je.createElementNS(ke,i):je.createElement(i);a.$state="element",o[o.length]=n;break}}break;case"object":{if(!u||"object"!=typeof u)throw new Error("Null should not reach here");const e=u;if("xmlns"in e){const t=e,r=t.xmlns&&"object"==typeof t.xmlns?Ue(t.xmlns):' xmlns="'+t.xmlns+'"';n=o[o.length-1]=(new Se.DOMParser).parseFromString((new Se.XMLSerializer).serializeToString(n).replace(' xmlns="'+ke+'"',r),"application/xml").documentElement,a.$state="element"}r(e);break}case"document":case"fragment":case"element":if(0===s&&(n=u,a.$state="element"),s===c-1||s===c-2&&null===t[s+1]){const e=o.length;for(let t=0;t<e;t++)Ne(u,o[t])}else o[o.length]=u;break;case"array":{const r=u,o=r.length;for(let i=0;i<o;i++){const o=r[i],s=typeof o;if(null===o||Le(o))throw new TypeError(`Bad children (parent array: ${JSON.stringify(t)}; index ${i} of child: ${JSON.stringify(r)})`);switch(s){case"string":case"number":case"boolean":Ne(n,je.createTextNode(String(o)));break;default:if("object"!=typeof o)throw new TypeError(`Bad children (parent array: ${JSON.stringify(t)}; index ${i} of child: ${JSON.stringify(r)})`);if(Array.isArray(o))a.$state="children",Ne(n,e(a,...o));else if("#"in o)a.$state="fragmentChildren",Ne(n,e(a,o["#"]));else{let e;"nodeType"in o||(e=qe(n,null,o,a,"children")),Ne(n,e||o)}}}break}default:throw new TypeError(`Unexpected type: ${l}; arg: ${u}; index ${s} on args: ${JSON.stringify(t)}`)}}const p=o[0]||n;return s&&a.$map&&a.$map.root&&f(!0),p};class He extends Error{constructor(e,t){super(e),this.code=0,this.name=t}}Ve.toJML=function(e,{stringOutput:t=!1,reportInvalidState:n=!0,stripWhitespace:r=!1}={}){if(!Se)throw new Error("No window object set");"string"==typeof e&&(e=(new Se.DOMParser).parseFromString(e,"text/html"));const o=[];let i=o,a=0;function s(e){if(n){const t=new He(e,"INVALID_STATE_ERR");throw t.code=11,t}}function u(e){i[a]=e,a++}function c(){u([]),i=i[a-1],a=0}function l(e,t){i=i[a-1][e],a=0,t&&(i=i[t])}return function e(t,n){const o="nodeType"in t?t.nodeType:null;if(!o)throw new TypeError("Not an XML type");if(5===o)return void u(["&",t.nodeName]);let f,p;function d(){f=i,p=a}function h(){i=f,a=p,a++}switch(n={...n},[2,3,4,7,8].includes(o)&&t.nodeValue&&!/^([\u0009\u000A\u000D\u0020-\uD7FF\uE000-\uFFFD]|[\uD800-\uDBFF][\uDC00-\uDFFF])*$/u.test(t.nodeValue)&&s("Node has bad XML character value"),o){case 1:{const r=t;d();const o=r.nodeName.toLowerCase();c(),u(o);const i={};let a=!1;n[r.prefix||""]!==r.namespaceURI&&(n[r.prefix||""]=r.namespaceURI,r.prefix?i["xmlns:"+r.prefix]=r.namespaceURI:r.namespaceURI?i.xmlns=r.namespaceURI:i.xmlns=null,a=!0),r.attributes.length?u([...r.attributes].reduce((function(e,t){return e[t.name]=t.value,e}),i)):a&&u(i);const{childNodes:s}=r;s.length&&(c(),[...s].forEach((function(t){e(t,n)}))),h();break}case 2:{const e=t;u({$attribute:[e.namespaceURI,e.name,e.value]});break}case 3:{const e=t;if(!e.nodeValue)throw new Error("Unexpected null comment value");if(r&&/^\s+$/u.test(e.nodeValue))return void u("");u(e.nodeValue);break}case 4:{const e=t;e.nodeValue?.includes("]]>")&&s("CDATA cannot end with closing ]]>"),u(["![",e.nodeValue]);break}case 7:{const e=t;/^xml$/iu.test(e.target)&&s('Processing instructions cannot be "xml".'),e.target.includes("?>")&&s("Processing instruction targets cannot include ?>"),e.target.includes(":")&&s('The processing instruction target cannot include ":"'),e.data.includes("?>")&&s("Processing instruction data cannot include ?>"),u(["?",e.target,e.data]);break}case 8:{const e=t;if(!e.nodeValue)throw new Error("Unexpected null comment value");(e.nodeValue.includes("--")||e.nodeValue.length&&e.nodeValue.lastIndexOf("-")===e.nodeValue.length-1)&&s("Comments cannot include --"),u(["!",e.nodeValue]);break}case 9:{const r=t;d();u({$document:{childNodes:[]}}),l("$document","childNodes");const{childNodes:o}=r;o.length||s("Documents must have a child node"),[...o].forEach((function(t){e(t,n)})),h();break}case 10:{const e=t;d();const n={$DOCTYPE:{name:e.name}};/^(\u0020|\u000D|\u000A|[a-zA-Z0-9]|[-'()+,./:=?;!*#@$_%])*$/u.test(e.publicId)||s("A publicId must have valid characters."),function(e,t){t.systemId.includes('"')&&t.systemId.includes("'")&&s("systemId cannot have both single and double quotes.");const{publicId:n,systemId:r}=t;r&&(e.systemId=r),n&&(e.publicId=n)}(n.$DOCTYPE,e),u(n),h();break}case 11:{const r=t;d(),u({"#":[]}),l("#");const{childNodes:o}=r;[...o].forEach((function(t){e(t,n)})),h();break}default:throw new TypeError("Not an XML type")}}(e,{}),t?JSON.stringify(o[0]):o[0]},Ve.toJMLString=function(e,t){return Ve.toJML(e,Object.assign(t||{},{stringOutput:!0}))},Ve.toDOM=function(...e){return Ve(...e)},Ve.toHTML=function(...e){const t=Ve(...e);switch(t.nodeType){case 1:return t.outerHTML;case 2:return`${t.name}="${t.value.replace(/"/gu,"&quot;")}"`;case 3:if(!t.nodeValue)throw new TypeError("Unexpected null Text node");return t.nodeValue;case 9:case 11:return[...t.childNodes].map((e=>Ve.toHTML(e))).join("");case 10:{const e=t;return`<!DOCTYPE ${e.name}${e.publicId?` PUBLIC "${e.publicId}" "${e.systemId}"`:e.systemId?` SYSTEM "${e.systemId}"`:""}>`}default:throw new Error("Unexpected node type")}},Ve.toDOMString=function(...e){return Ve.toHTML(...e)},Ve.toXML=function(...e){if(!Se)throw new Error("No window object set");const t=Ve(...e);return(new Se.XMLSerializer).serializeToString(t)},Ve.toXMLDOMString=function(...e){return Ve.toXML(...e)};class Je extends Map{get(e){const t="string"==typeof e?Ie(e):e;return super.get.call(this,t)}set(e,t){const n="string"==typeof e?Ie(e):e;return super.set.call(this,n,t)}invoke(e,t,...n){const r="string"==typeof e?Ie(e):e;return this.get(r)[t](r,...n)}}class Ke extends WeakMap{get(e){const t="string"==typeof e?Ie(e):e;if(!t)throw new Error("Can't find the element");return super.get.call(this,t)}set(e,t){const n="string"==typeof e?Ie(e):e;if(!n)throw new Error("Can't find the element");return super.set.call(this,n,t)}invoke(e,t,...n){const r="string"==typeof e?Ie(e):e;if(!r)throw new Error("Can't find the element");return this.get(r)[t](r,...n)}}let Ge;Ve.Map=Je,Ve.WeakMap=Ke,Ve.weak=function(e,...t){const n=new Ke;return[n,Ve({$map:[n,e]},...t)]},Ve.strong=function(e,...t){const n=new Je;return[n,Ve({$map:[n,e]},...t)]},Ve.symbol=Ve.sym=Ve.for=function(e,t){return("string"==typeof e?Ie(e):e)["symbol"==typeof t?t:Symbol.for(t)]},Ve.command=function(e,t,n,...r){if(!(e="string"==typeof e?Ie(e):e))throw new Error("No element found");let o;if(["symbol","string"].includes(typeof t))return o=Ve.sym(e,t),"function"==typeof o?o(n,...r):o[n](...r);if(o=t.get(e),!o)throw new Error("No map found");return"function"==typeof o?o.call(e,n,...r):o[n](e,...r)},Ve.setWindow=e=>{Se=e,je=Se?.document,je&&je.body&&(Ge=je.body)},Ve.getWindow=()=>{if(!Se)throw new Error("No window object set");return Se},je&&je.body&&(Ge=je.body);const Ze=" ",Xe=(e,t)=>{var n;return(e="string"==typeof e?(n=e,document.querySelector(n)):e).querySelector(t)},Ye={en:{submit:"Submit",cancel:"Cancel",ok:"Ok"}};const Qe=new class{constructor(){let{locale:e,localeObject:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.setLocale({locale:e,localeObject:t})}setLocale(e){let{locale:t={},localeObject:n={}}=e;this.localeStrings={...Ye.en,...Ye[t],...n}}makeDialog(e){let{atts:t={$on:null},children:n=[],close:r,remove:o=!0}=e;r&&(t.$on||(t.$on={}),t.$on.close||(t.$on.close=r));const i=Ve("dialog",t,n,Ie("#main"));return i.showModal(),o&&i.addEventListener("close",(()=>{i.remove()})),i}makeSubmitDialog(e){let{submit:t,submitClass:n="submit",...r}=e;const o=this.makeCancelDialog(r);return Xe(o,`button.${r.cancelClass||"cancel"}`).before(Ve("button",{class:n,$on:{click(e){t&&t.call(this,{e:e,dialog:o})}}},[this.localeStrings.submit]),Ze.repeat(2)),o}makeCancelDialog(e){let{submit:t,cancel:n,cancelClass:r="cancel",submitClass:o="submit",...i}=e;const a=this.makeDialog(i);return Ve("div",{class:o},[["br"],["br"],["button",{class:r,$on:{click(e){e.preventDefault(),n&&!1===n.call(this,{e:e,dialog:a})||a.close()}}},[this.localeStrings.cancel]]],a),a}alert(e,t){e="string"==typeof e?{message:e}:e;const{ok:n=("object"==typeof t?!1!==t.ok:!1!==t),message:r,submitClass:o="submit"}=e;return new Promise((e=>{const t=Ve("dialog",[r,...n?[["br"],["br"],["div",{class:o},[["button",{$on:{click(){t.close(),e()}}},[this.localeStrings.ok]]]]]:[]],Ie("#main"));t.showModal()}))}prompt(e){e="string"==typeof e?{message:e}:e;const{message:t,submit:n,...r}=e;return new Promise(((e,o)=>{this.makeSubmitDialog({...r,submit:function(t){let{e:r,dialog:o}=t;n&&n.call(this,{e:r,dialog:o}),o.close(),e(Xe(o,"input").value)},cancel(){o(new Error("cancelled"))},children:[["label",[t,Ze.repeat(3),["input"]]]]})}))}confirm(e){e="string"==typeof e?{message:e}:e;const{message:t,submitClass:n="submit"}=e;return new Promise(((e,r)=>{const o=Ve("dialog",[t,["br"],["br"],["div",{class:n},[["button",{$on:{click(){o.close(),e()}}},[this.localeStrings.ok]],Ze.repeat(2),["button",{$on:{click(){o.close(),r(new Error("cancelled"))}}},[this.localeStrings.cancel]]]]],Ie("#main"));o.showModal()}))}};class et{constructor(e){let{langData:t}=e;this.langData=t}localeFromLangData(e){return this.langData["localization-strings"][e]}getLanguageFromCode(e){return this.localeFromLangData(e).languages[e]}getFieldNameFromPluginNameAndLocales(e){let{pluginName:t,workI18n:n,targetLanguage:r,applicableFieldI18N:o,meta:i,metaApplicableField:a}=e;return n(["plugins",t,"fieldname"],{...i,...a,applicableField:o,targetLanguage:r?this.getLanguageFromCode(r):""},{throwOnExtraSuppliedFormatters:!1})}getLanguageInfo(e){let{$p:t}=e;const n=this.langData.languages,r=e=>!!n.some((t=>{let{code:n}=t;return n===e}))&&e,o=t.get("lang",!0),i=navigator.languages.filter(r),a=i.length?i:[r(navigator.language)||"en-US"];return{lang:[...(o||a[0]).split("."),...a],langs:n,languageParam:o,fallbackLanguages:a}}}var tt=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=84)}([function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r;try{r={clone:n(88),constant:n(64),each:n(146),filter:n(152),has:n(175),isArray:n(0),isEmpty:n(177),isFunction:n(17),isUndefined:n(178),keys:n(6),map:n(179),reduce:n(181),size:n(184),transform:n(190),union:n(191),values:n(210)}}catch(e){}r||(r=window._),e.exports=r},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(47),i="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,a=o||i||Function("return this")();e.exports=a},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return null!=e&&"object"==n(e)}},function(e,t,n){var r=n(100),o=n(105);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){var t=n(e);return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(52),o=n(37),i=n(7);e.exports=function(e){return i(e)?r(e):o(e)}},function(e,t,n){var r=n(17),o=n(34);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){var r=n(9),o=n(101),i=n(102),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},function(e,t,n){var r=n(2).Symbol;e.exports=r},function(e,t,n){var r=n(132),o=n(31),i=n(133),a=n(61),s=n(134),u=n(8),c=n(48),l=c(r),f=c(o),p=c(i),d=c(a),h=c(s),v=u;(r&&"[object DataView]"!=v(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=v(new o)||i&&"[object Promise]"!=v(i.resolve())||a&&"[object Set]"!=v(new a)||s&&"[object WeakMap]"!=v(new s))&&(v=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case p:return"[object Promise]";case d:return"[object Set]";case h:return"[object WeakMap]"}return t}),e.exports=v},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"===("undefined"==typeof window?"undefined":n(window))&&(r=window)}e.exports=r},function(e,t,n){(function(e){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(2),i=n(121),a="object"==r(t)&&t&&!t.nodeType&&t,s=a&&"object"==r(e)&&e&&!e.nodeType&&e,u=s&&s.exports===a?o.Buffer:void 0,c=(u?u.isBuffer:void 0)||i;e.exports=c}).call(this,n(14)(e))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],l=!1,f=-1;function p(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=s(p);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||l||s(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(90),o=n(91),i=n(92),a=n(93),s=n(94);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t,n){var r=n(30);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(8),o=n(5);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){var r=n(4)(Object,"create");e.exports=r},function(e,t,n){var r=n(114);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(49),o=n(50);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var s=-1,u=t.length;++s<u;){var c=t[s],l=i?i(n[c],e[c],c,n,e):void 0;void 0===l&&(l=e[c]),a?o(n,c,l):r(n,c,l)}return n}},function(e,t,n){var r=n(120),o=n(3),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},function(e,t,n){var r=n(122),o=n(35),i=n(36),a=i&&i.isTypedArray,s=a?o(a):r;e.exports=s},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(65),o=n(150)(r);e.exports=o},function(e,t){e.exports=function(e){return e}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(154),i=n(164),a=n(25),s=n(0),u=n(173);e.exports=function(e){return"function"==typeof e?e:null==e?a:"object"==r(e)?s(e)?i(e[0],e[1]):o(e):u(e)}},function(e,t,n){var r=n(44);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(1);function i(e){this._isDirected=!o.has(e,"directed")||e.directed,this._isMultigraph=!!o.has(e,"multigraph")&&e.multigraph,this._isCompound=!!o.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=o.constant(void 0),this._defaultEdgeLabelFn=o.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function a(e,t){e[t]?e[t]++:e[t]=1}function s(e,t){--e[t]||delete e[t]}function u(e,t,n,r){var i=""+t,a=""+n;if(!e&&i>a){var s=i;i=a,a=s}return i+""+a+""+(o.isUndefined(r)?"\0":r)}function c(e,t){return u(e,t.v,t.w,t.name)}e.exports=i,i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(e){return this._label=e,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(e){return o.isFunction(e)||(e=o.constant(e)),this._defaultNodeLabelFn=e,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return o.keys(this._nodes)},i.prototype.sources=function(){var e=this;return o.filter(this.nodes(),(function(t){return o.isEmpty(e._in[t])}))},i.prototype.sinks=function(){var e=this;return o.filter(this.nodes(),(function(t){return o.isEmpty(e._out[t])}))},i.prototype.setNodes=function(e,t){var n=arguments,r=this;return o.each(e,(function(e){n.length>1?r.setNode(e,t):r.setNode(e)})),this},i.prototype.setNode=function(e,t){return o.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},i.prototype.node=function(e){return this._nodes[e]},i.prototype.hasNode=function(e){return o.has(this._nodes,e)},i.prototype.removeNode=function(e){var t=this;if(o.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],o.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),o.each(o.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],o.each(o.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},i.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(o.isUndefined(t))t="\0";else{for(var n=t+="";!o.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},i.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},i.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if("\0"!==t)return t}},i.prototype.children=function(e){if(o.isUndefined(e)&&(e="\0"),this._isCompound){var t=this._children[e];if(t)return o.keys(t)}else{if("\0"===e)return this.nodes();if(this.hasNode(e))return[]}},i.prototype.predecessors=function(e){var t=this._preds[e];if(t)return o.keys(t)},i.prototype.successors=function(e){var t=this._sucs[e];if(t)return o.keys(t)},i.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return o.union(t,this.successors(e))},i.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},i.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;o.each(this._nodes,(function(n,r){e(r)&&t.setNode(r,n)})),o.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var r={};return this._isCompound&&o.each(t.nodes(),(function(e){t.setParent(e,function e(o){var i=n.parent(o);return void 0===i||t.hasNode(i)?(r[o]=i,i):i in r?r[i]:e(i)}(e))})),t},i.prototype.setDefaultEdgeLabel=function(e){return o.isFunction(e)||(e=o.constant(e)),this._defaultEdgeLabelFn=e,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return o.values(this._edgeObjs)},i.prototype.setPath=function(e,t){var n=this,r=arguments;return o.reduce(e,(function(e,o){return r.length>1?n.setEdge(e,o,t):n.setEdge(e,o),o})),this},i.prototype.setEdge=function(){var e,t,n,i,s=!1,c=arguments[0];"object"===r(c)&&null!==c&&"v"in c?(e=c.v,t=c.w,n=c.name,2===arguments.length&&(i=arguments[1],s=!0)):(e=c,t=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),e=""+e,t=""+t,o.isUndefined(n)||(n=""+n);var l=u(this._isDirected,e,t,n);if(o.has(this._edgeLabels,l))return s&&(this._edgeLabels[l]=i),this;if(!o.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[l]=s?i:this._defaultEdgeLabelFn(e,t,n);var f=function(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};return r&&(s.name=r),s}(this._isDirected,e,t,n);return e=f.v,t=f.w,Object.freeze(f),this._edgeObjs[l]=f,a(this._preds[t],e),a(this._sucs[e],t),this._in[t][l]=f,this._out[e][l]=f,this._edgeCount++,this},i.prototype.edge=function(e,t,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):u(this._isDirected,e,t,n);return this._edgeLabels[r]},i.prototype.hasEdge=function(e,t,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):u(this._isDirected,e,t,n);return o.has(this._edgeLabels,r)},i.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):u(this._isDirected,e,t,n),o=this._edgeObjs[r];return o&&(e=o.v,t=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[t],e),s(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},i.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var r=o.values(n);return t?o.filter(r,(function(e){return e.v===t})):r}},i.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var r=o.values(n);return t?o.filter(r,(function(e){return e.w===t})):r}},i.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},function(e,t,n){var r=n(15),o=n(95),i=n(96),a=n(97),s=n(98),u=n(99);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,e.exports=c},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(4)(n(2),"Map");e.exports=r},function(e,t,n){var r=n(106),o=n(113),i=n(115),a=n(116),s=n(117);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(47),i="object"==r(t)&&t&&!t.nodeType&&t,a=i&&"object"==r(e)&&e&&!e.nodeType&&e,s=a&&a.exports===i&&o.process,u=function(){try{return a&&a.require&&a.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=u}).call(this,n(14)(e))},function(e,t,n){var r=n(23),o=n(123),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(56),o=n(57),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=s},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},function(e,t,n){var r=n(54)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(62);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(0),i=n(44),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(o(e))return!1;var n=r(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||s.test(e)||!a.test(e)||null!=t&&e in Object(t)}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(8),i=n(3);e.exports=function(e){return"symbol"==r(e)||i(e)&&"[object Symbol]"==o(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){(function(t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r="object"==(void 0===t?"undefined":n(t))&&t&&t.Object===Object&&t;e.exports=r}).call(this,n(11))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(50),o=n(30),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(51);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(4),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(119),o=n(21),i=n(0),a=n(12),s=n(53),u=n(22),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),l=!n&&o(e),f=!n&&!l&&a(e),p=!n&&!l&&!f&&u(e),d=n||l||f||p,h=d?r(e.length,String):[],v=h.length;for(var g in e)!t&&!c.call(e,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,v))||h.push(g);return h}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var o=n(e);return!!(t=null==t?9007199254740991:t)&&("number"==o||"symbol"!=o&&r.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(52),o=n(125),i=n(7);e.exports=function(e){return i(e)?r(e,!0):o(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(39),o=n(40),i=n(38),a=n(57),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=s},function(e,t,n){var r=n(60),o=n(38),i=n(6);e.exports=function(e){return r(e,i,o)}},function(e,t,n){var r=n(39),o=n(0);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},function(e,t,n){var r=n(4)(n(2),"Set");e.exports=r},function(e,t,n){var r=n(2).Uint8Array;e.exports=r},function(e,t,n){var r=n(5),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t,n){var r=n(148),o=n(6);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(156),o=n(3);e.exports=function e(t,n,i,a,s){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,a,e,s))}},function(e,t,n){var r=n(68),o=n(159),i=n(69);e.exports=function(e,t,n,a,s,u){var c=1&n,l=e.length,f=t.length;if(l!=f&&!(c&&f>l))return!1;var p=u.get(e);if(p&&u.get(t))return p==t;var d=-1,h=!0,v=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++d<l;){var g=e[d],y=t[d];if(a)var m=c?a(y,g,d,t,e,u):a(g,y,d,e,t,u);if(void 0!==m){if(m)continue;h=!1;break}if(v){if(!o(t,(function(e,t){if(!i(v,t)&&(g===e||s(g,e,n,a,u)))return v.push(t)}))){h=!1;break}}else if(g!==y&&!s(g,y,n,a,u)){h=!1;break}}return u.delete(e),u.delete(t),h}},function(e,t,n){var r=n(32),o=n(157),i=n(158);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(5);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},function(e,t,n){var r=n(73),o=n(27);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n<i;)e=e[o(t[n++])];return n&&n==i?e:void 0}},function(e,t,n){var r=n(0),o=n(43),i=n(166),a=n(169);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}},function(e,t,n){var r=n(73),o=n(21),i=n(0),a=n(53),s=n(34),u=n(27);e.exports=function(e,t,n){for(var c=-1,l=(t=r(t,e)).length,f=!1;++c<l;){var p=u(t[c]);if(!(f=null!=e&&n(e,p)))break;e=e[p]}return f||++c!=l?f:!!(l=null==e?0:e.length)&&s(l)&&a(p,l)&&(i(e)||o(e))}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(1),o=n(77);e.exports=function(e,t,n,r){return function(e,t,n,r){var i,a,s={},u=new o,c=function(e){var t=e.v!==i?e.v:e.w,r=s[t],o=n(e),c=a.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);c<r.distance&&(r.distance=c,r.predecessor=i,u.decrease(t,c))};for(e.nodes().forEach((function(e){var n=e===t?0:Number.POSITIVE_INFINITY;s[e]={distance:n},u.add(e,n)}));u.size()>0&&(i=u.removeMin(),(a=s[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(c);return s}(e,String(t),n||i,r||function(t){return e.outEdges(t)})};var i=r.constant(1)},function(e,t,n){var r=n(1);function o(){this._arr=[],this._keyIndices={}}e.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},o.prototype.has=function(e){return r.has(this._keyIndices,e)},o.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},o.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var o=this._arr,i=o.length;return n[e]=i,o.push({key:e,priority:t}),this._decrease(i),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},o.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},o.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,o=e;n<t.length&&(o=t[n].priority<t[o].priority?n:o,r<t.length&&(o=t[r].priority<t[o].priority?r:o),o!==e&&(this._swap(e,o),this._heapify(o)))},o.prototype._decrease=function(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t},o.prototype._swap=function(e,t){var n=this._arr,r=this._keyIndices,o=n[e],i=n[t];n[e]=i,n[t]=o,r[i.key]=e,r[o.key]=t}},function(e,t,n){var r=n(1);e.exports=function(e){var t=0,n=[],o={},i=[];return e.nodes().forEach((function(a){r.has(o,a)||function a(s){var u=o[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach((function(e){r.has(o,e)?o[e].onStack&&(u.lowlink=Math.min(u.lowlink,o[e].index)):(a(e),u.lowlink=Math.min(u.lowlink,o[e].lowlink))})),u.lowlink===u.index){var c,l=[];do{c=n.pop(),o[c].onStack=!1,l.push(c)}while(s!==c);i.push(l)}}(a)})),i}},function(e,t,n){var r=n(1);function o(e){var t={},n={},o=[];if(r.each(e.sinks(),(function a(s){if(r.has(n,s))throw new i;r.has(t,s)||(n[s]=!0,t[s]=!0,r.each(e.predecessors(s),a),delete n[s],o.push(s))})),r.size(t)!==e.nodeCount())throw new i;return o}function i(){}e.exports=o,o.CycleException=i,i.prototype=new Error},function(e,t,n){var r=n(1);e.exports=function(e,t,n){r.isArray(t)||(t=[t]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],a={};return r.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);!function e(t,n,o,i,a,s){r.has(i,n)||(i[n]=!0,o||s.push(n),r.each(a(n),(function(n){e(t,n,o,i,a,s)})),o&&s.push(n))}(e,t,"post"===n,a,o,i)})),i}},function(e,t,n){(function(t){var r=n(226),o=["delete","get","head","patch","post","put"];e.exports.load=function(e,n,i){var a,s,u=n.method?n.method.toLowerCase():"get";function c(e,n){e?i(e):("[object process]"===Object.prototype.toString.call(void 0!==t?t:0)&&"function"==typeof n.buffer&&n.buffer(!0),n.end((function(e,t){e?i(e):i(void 0,t)})))}if(void 0!==n.method?"string"!=typeof n.method?a=new TypeError("options.method must be a string"):-1===o.indexOf(n.method)&&(a=new TypeError("options.method must be one of the following: "+o.slice(0,o.length-1).join(", ")+" or "+o[o.length-1])):void 0!==n.prepareRequest&&"function"!=typeof n.prepareRequest&&(a=new TypeError("options.prepareRequest must be a function")),a)i(a);else if(s=r["delete"===u?"del":u](e),n.prepareRequest)try{n.prepareRequest(s,c)}catch(e){i(e)}else c(void 0,s)}}).call(this,n(13))},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return null!==e&&"object"===r(e)}},function(e,t,n){(function(r,o){var i,a,s,u;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
1
+ function e(e,t,n){return e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e}let t,n;function r(){}const o=(i=function(){return function(e){var t=e();if(t&&t.then)return t.then(r)}((function(){if(!t)return e=import("path"),n=function(e){({dirname:t}=e)},e&&e.then||(e=Promise.resolve(e)),n?e.then(n):e;var e,n}))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(i.apply(this,e))}catch(e){return Promise.reject(e)}});var i;function a(e){return r=t(new URL(e).pathname),n||(n="win32"===process.platform),r.slice(n?1:0);var r}function s(e,t,n){return e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e}let u;function c(e,t){var n=e();return n&&n.then?n.then(t):t(n)}const l=function({baseURL:t,cwd:n}={}){const r="undefined"!=typeof window||"undefined"!=typeof self?"undefined"!=typeof window?window.fetch:self.fetch:function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e){let r=!1;return c((function(){if(/^https?:/u.test(e))return c((function(){if(!u)return s(import("node-fetch"),(function(e){u=e}))}),(function(){const t=u.default(e);return r=!0,t}))}),(function(i){return r?i:c((function(){if(!n)return function(e,t,n){try{var r=Promise.resolve(e());return t?r.then(t):r}catch(e){return Promise.reject(e)}}(o,(function(){n=t?a(t):"undefined"==typeof window&&process.cwd()}))}),(function(){return s(import("local-xmlhttprequest"),(function(t){const r=t.default({basePath:n});return new Promise(((t,n)=>{const o=new r;o.open("GET",e,!0),o.onreadystatechange=function(){if(4===o.readyState)if(200!==o.status)n(new SyntaxError("Failed to fetch URL: "+e+"state: "+o.readyState+"; status: "+o.status));else{const e=o.responseText;t({json:()=>JSON.parse(e)})}},o.send()}))}))}))}))})),i=function({fetch:t=("undefined"!=typeof window?window.fetch:self.fetch)}={}){return function n(r,o,i){try{let a=!1;return e(function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return function(e,t){var n=e();return n&&n.then?n.then(t):t(n)}((function(){if(Array.isArray(r))return e(Promise.all(r.map((e=>n(e)))),(function(e){return o&&o(...e),a=!0,e}))}),(function(n){return a?n:e(t(r),(function(t){return e(t.json(),(function(e){return"function"==typeof o?o(e):e}))}))}))}),(function(e){if(e.message+=` (File: ${r})`,i)return i(e,r);throw e})))}catch(e){return Promise.reject(e)}}}({fetch:r});return i._fetch=r,i.hasURLBasePath=Boolean(t),i.basePath=n,i}();function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(){h=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,o){var i=new RegExp(e,r);return t.set(i,o||t.get(e)),_(i,n.prototype)}function r(e,n){var r=t.get(n);return Object.keys(r).reduce((function(t,n){var o=r[n];if("number"==typeof o)t[n]=e[o];else{for(var i=0;void 0===e[o[i]]&&i+1<o.length;)i++;t[n]=e[o[i]]}return t}),Object.create(null))}return b(n,RegExp),n.prototype.exec=function(t){var n=e.exec.call(this,t);if(n){n.groups=r(n,this);var o=n.indices;o&&(o.groups=r(o,this))}return n},n.prototype[Symbol.replace]=function(n,o){if("string"==typeof o){var i=t.get(this);return e[Symbol.replace].call(this,n,o.replace(/\$<([^>]+)>/g,(function(e,t){var n=i[t];return"$"+(Array.isArray(n)?n.join("$"):n)})))}if("function"==typeof o){var a=this;return e[Symbol.replace].call(this,n,(function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(r(e,a)),o.apply(this,e)}))}return e[Symbol.replace].call(this,n,o)},h.apply(this,arguments)}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,A(r.key),r)}}function y(e,t,n){return t&&g(e.prototype,t),n&&g(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e,t,n){return(t=A(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}function x(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=w(e);if(t){var o=w(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return x(this,n)}}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||k(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||k(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){if(e){if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(e,t):void 0}}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function A(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var F=globalThis.jsonExtra,D=function(e){return e.replace(/\\+/g,(function(e){return e.slice(0,e.length/2)}))},I=function(e){return F.parse("{"+(e||"").replace(/^\{/,"").replace(/\}$/,"")+"}")},P=function(e,t,n){var r,o=n.onMatch,i=n.extra,a=n.betweenMatches,s=n.afterMatch,u=n.escapeAtOne,c=0;if(i&&(a=i,s=i,u=i),!a||!s)throw new Error("You must have `extra` or `betweenMatches` and `afterMatch` arguments.");for(;null!==(r=e.exec(t));){var l=j(r,2),f=l[0],p=l[1],d=e.lastIndex,h=d-f.length;h>c&&a(t.slice(c,h)),u&&p.length%2?(c=d,u(f)):(o.apply(void 0,E(r)),c=d)}c!==t.length&&s(t.slice(c))},N="undefined"!=typeof fetch?fetch:null,T=function(){return N},C="undefined"!=typeof document?document:null,L=function(){return C};var $=function(e,t,n){return t.sort(new Intl.Collator(e,n).compare)},R=function(e,t,n){return new Intl.ListFormat(e,n).format(t)},U=function(e,t,n,r,o){if("function"!=typeof n)return function(e,t,n,r){return $(e,t,r),R(e,t,n)}(e,t,n,r);$(e,t,o);var i,a=(i=Date.now(),"undefined"!=typeof performance&&"function"==typeof performance.now&&(i+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=Math.trunc((i+16*Math.random())%16);return i=Math.floor(i/16),("x"===e?t:3&t|8).toString(16)}))),s=E(t).map((function(e,t){return"<<".concat(a).concat(t,">>")})),u=[],c=function(e){u.push(e)};P(new RegExp("<<".concat(a,"(\\d)>>"),"gu"),R(e,s,r),{betweenMatches:c,afterMatch:c,onMatch:function(e,r){c(n(t[Number(r)],Number(r)))}});var l=L().createDocumentFragment();return l.append.apply(l,u),l},M=function(e){var t=e.object;if(Array.isArray(t)){if("function"==typeof t[1]){var n=j(t,4);return{value:n[0],callback:n[1],options:n[2],extraOpts:n[3]}}var r=j(t,3);return{value:r[0],options:r[1],extraOpts:r[2]}}return{value:t}},z=function(e){var t=e.value,n=e.arg;e.key;var r,o=e.locale;if("string"==typeof t||t&&"object"===d(t)&&"nodeType"in t)return t;var i=function(e){var t=e.type,o=e.options,i=void 0===o?r:o,a=e.checkArgOptions,s=void 0!==a&&a;if("string"==typeof n){var u=j(n.split("|"),3),c=u[0],l=u[1],f=u[2];"DATE"===c&&(c="DATETIME"),c===t&&(l?s&&!f||(i=p(p({},i),I(s&&f?f:l))):i={})}return i},a=!1;if(t&&"object"===d(t)&&!Array.isArray(t)){var s=Object.keys(t)[0];if(["number","date","datetime","dateRange","datetimeRange","relative","region","language","script","currency","list","plural"].includes(s)){var u,c,l=t[s],f=M({object:l});switch(t=f.value,r=f.options,u=f.extraOpts,c=f.callback,s){case"date":case"datetime":a=!0;break;case"dateRange":case"datetimeRange":var h=new Intl.DateTimeFormat(o,i({type:"DATERANGE",options:u}));return h.formatRange.apply(h,E([t,r].map((function(e){return"number"==typeof e?new Date(e):e}))));case"region":case"language":case"script":case"currency":return new Intl.DisplayNames(o,p(p({},i({type:s.toUpperCase()})),{},{type:s})).of(t);case"relative":var v=[r,u];return u=v[0],r=v[1],new Intl.RelativeTimeFormat(o,i({type:"RELATIVE"})).format(t,u);case"list":return c?U(o,t,c,i({type:"LIST"}),i({type:"LIST",options:u,checkArgOptions:!0})):U(o,t,i({type:"LIST"}),i({type:"LIST",options:u,checkArgOptions:!0}))}}}if(t&&("number"==typeof t&&(a||/^DATE(?:TIME)(?:\||$)/.test(n))&&(t=new Date(t)),"object"===d(t)&&"getTime"in t&&"function"==typeof t.getTime))return new Intl.DateTimeFormat(o,i({type:"DATETIME"})).format(t);if(Array.isArray(t)){var g,y=t[2];return(g=new Intl.DateTimeFormat(o,i({type:"DATERANGE",options:y}))).formatRange.apply(g,E(t.slice(0,2).map((function(e){return"number"==typeof e?new Date(e):e}))))}if("number"==typeof t)return new Intl.NumberFormat(o,i({type:"NUMBER"})).format(t);throw new TypeError("Unknown formatter")},B=y((function e(){v(this,e)})),q=function(e){var t=e.key,n=e.body,r=e.type,o=e.messageStyle,i=ee({messageStyle:void 0===o?"richNested":o})({body:n},t);if(!i)throw new Error("Key value not found for ".concat(r," key: (").concat(t,")"));return i.value},W=function(e){b(n,B);var t=S(n);function n(e){var r;return v(this,n),(r=t.call(this)).locals=e,r}return y(n,[{key:"getSubstitution",value:function(e){return q({key:e.slice(1),body:this.locals,type:"local"})}},{key:"isMatch",value:function(e){var t=e.slice(1).split("."),n=this.locals;return this.constructor.isMatchingKey(e)&&t.every((function(e){var t=e in n;return n=n[e],t}))}}],[{key:"isMatchingKey",value:function(e){return e.startsWith("-")}}]),n}(),V=function(e){b(n,B);var t=S(n);function n(e){var r;return v(this,n),(r=t.call(this)).substitutions=e,r}return y(n,[{key:"isMatch",value:function(e){return this.constructor.isMatchingKey(e)&&e in this.substitutions}}],[{key:"isMatchingKey",value:function(e){return/^[0-9A-Z_a-z]/.test(e)}}]),n}(),H=function(e){b(n,B);var t=S(n);function n(e,r){var o,i=r.substitutions;return v(this,n),(o=t.call(this)).switches=e,o.substitutions=i,o}return y(n,[{key:"getSubstitution",value:function(e,t){var n,r,o=t.locale,i=t.usedKeys,a=t.arg,s=t.missingSuppliedFormatters,u=this.constructor.getKey(e).slice(1),c=j(this.getMatch(u),3),l=c[0],f=c[1],h=c[2];if(i.push(h),l&&l.includes("|")){var v=j(l.split("|"),3);n=v[1],r=v[2]}if(!f)return s({key:e,formatter:this}),"\\{"+e+"}";var g=function(e,t){var n=I(r);return new Intl.NumberFormat(o,p(p({},t),n)).format(e)},y=function(e,t){var n=I(r);return new Intl.PluralRules(o,p(p({},t),n)).select(e)},m=this.substitutions[h],b=m;if("number"==typeof m)switch(n){case"NUMBER":b=g(m);break;case"PLURAL":b=y(m);break;default:b=new Intl.PluralRules(o).select(m)}else if(m&&"object"===d(m)){var w=Object.keys(m)[0];if(["number","plural"].includes(w)){var _=M({object:m[w]}),x=_.value,S=_.options;if(n||(n=w.toUpperCase()),!(w.toUpperCase()===n))throw new TypeError('Expecting type "'.concat(n.toLowerCase(),'"; instead found "').concat(w,'".'));switch(n){case"NUMBER":b=g(x,S);break;case"PLURAL":b=y(x,S)}}}var E="richNested",k=function(e){return e.replace(/\\/g,"\\\\").replace(/\./g,"\\.")};try{return q({messageStyle:E,key:b?k(b):a,body:f,type:"switch"})}catch(e){try{return q({messageStyle:E,key:"*"+k(b),body:f,type:"switch"})}catch(e){var O=Object.keys(f).find((function(e){return e.startsWith("*")}));if(!O)throw new Error("No defaults found for switch ".concat(u));return q({messageStyle:E,key:k(O),body:f,type:"switch"})}}}},{key:"isMatch",value:function(e){return Boolean(e&&this.constructor.isMatchingKey(e)&&this.getMatch(e.slice(1)).length)}},{key:"getMatch",value:function(e){var t=this,n=e.split(".");return n.reduce((function(r,o,i){if(i<n.length-1){if(!(o in r))throw new Error('Switch key "'.concat(o,'" not found (from "~').concat(e,'")'));return r[o]}var a=Object.entries(r).find((function(e){var n=j(e,1)[0];return o===t.constructor.getKey(n)}));return a?[].concat(E(a),[o]):[]}),this.switches)}}],[{key:"isMatchingKey",value:function(e){return e.startsWith("~")}},{key:"getKey",value:function(e){var t=e.match(/^(?:[\0-\{\}-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*/);return t&&t[0]}}]),n}();function J(e,t,n){if(!e.s){if(n instanceof K){if(!n.s)return void(n.o=J.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(J.bind(null,e,t),J.bind(null,e,2));e.s=t,e.v=n;var r=e.o;r&&r(e)}}var K=function(){function e(){}return e.prototype.then=function(t,n){var r=new e,o=this.s;if(o){var i=1&o?t:n;if(i){try{J(r,1,i(this.v))}catch(e){J(r,2,e)}return r}return this}return this.o=function(e){try{var o=e.v;1&e.s?J(r,1,t?t(o):o):n?J(r,1,n(o)):J(r,2,o)}catch(e){J(r,2,e)}},r},e}();function G(e){return e instanceof K&&1&e.s}var Z=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Reached end of values array.";if(!Array.isArray(e))throw new TypeError("The `values` argument to `promiseChainForValues` must be an array.");if("function"!=typeof t)throw new TypeError("The `errBack` argument to `promiseChainForValues` must be a function.");return function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(){var r,o,i,a,s=!1,u=Promise.reject(new Error("Intentionally reject so as to begin checking chain"));return i=function(e,t,n){for(var r;;){var o=e();if(G(o)&&(o=o.v),!o)return i;if(o.then){r=0;break}var i=n();if(i&&i.then){if(!G(i)){r=1;break}i=i.s}}var a=new K,s=J.bind(null,a,2);return(0===r?o.then(c):1===r?i.then(u):(void 0).then((function(){(o=e())?o.then?o.then(c).then(void 0,s):c(o):J(a,1,i)}))).then(void 0,s),a;function u(t){i=t;do{if(!(o=e())||G(o)&&!o.v)return void J(a,1,i);if(o.then)return void o.then(c).then(void 0,s);G(i=n())&&(i=i.v)}while(!i||!i.then);i.then(u).then(void 0,s)}function c(e){e?(i=n())&&i.then?i.then(u).then(void 0,s):u(i):J(a,1,i)}}((function(){return!s}),0,(function(){var i=e.shift();return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return function(e,t,n){return e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e}(u,(function(e){r=e,s=!0}))}),(function(){if(o)throw new Error(n);e.length||(o=!0),u=t(i)}))})),a=function(e){return r},i&&i.then?i.then(a):a(i)}))()},X=function(e,t){if("string"!=typeof e)throw new TypeError("`defaultLocaleResolver` expects a string `localesBasePath`.");if("string"!=typeof t)throw new TypeError("`defaultLocaleResolver` expects a string `locale`.");if(/[\.\/\\]/.test(t))throw new TypeError("Locales cannot use file-reserved characters, `.`, `/` or `\\`");return"".concat(e.replace(/\/$/,""),"/_locales/").concat(t,"/messages.json")},Y=function(e){var t=e.string,n=e.dom,r=e.usedKeys,o=e.substitutions,i=e.allSubstitutions,a=e.locale,s=e.locals,u=e.switches,c=e.maximumLocalNestingDepth,l=void 0===c?3:c,f=e.missingSuppliedFormatters,h=e.checkExtraSuppliedFormatters;if("number"!=typeof l)throw new TypeError("`maximumLocalNestingDepth` must be a number.");var v=function(){Object.entries(o).forEach((function(e){var t=j(e,2),n=t[0];"function"==typeof t[1]&&r.push(n)}))};v();var g=new W(s),y=new V(o),m=new H(u,{substitutions:o}),b=/(\\*)\{((?:(?:[\0-\|~-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])|\\\})*?)(?:(\|)((?:[\0-\|~-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*))?\}/g;i&&(i=Array.isArray(i)?i:[i]);var w=function(e){var t,n=e.key,o=e.arg,s=e.substs;return g.constructor.isMatchingKey(n)?t=g.getSubstitution(n):m.constructor.isMatchingKey(n)?t=m.getSubstitution(n,{locale:a,usedKeys:r,arg:o,missingSuppliedFormatters:f}):"function"==typeof(t=s[n])&&(t=t({arg:o,key:n})),i?t=i.reduce((function(e,t){return t({value:e,arg:o,key:n,locale:a})}),t):o&&/^(?:NUMBER|DATE(?:TIME|RANGE|TIMERANGE)?|REGION|LANGUAGE|SCRIPT|CURRENCY|RELATIVE|LIST)(?:\||$)/.test(o)&&(t=z({value:t,arg:o,key:n,locale:a})),t},_=1,x=function(e){var t=e.substitution,n=e.ky,r=e.arg,i=e.processSubsts,a=t;if("string"==typeof t&&t.includes("{")){if(_++>l)throw new TypeError("Too much recursion in local variables.");if(g.constructor.isMatchingKey(n)){var s,u=o;r&&(s=I(r),u=p(p({},o),s)),a=i({str:t,substs:u,formatter:g}),s&&h({substitutions:s})}else m.constructor.isMatchingKey(n)&&(a=i({str:t}))}return a};if(!n){var S=!1,k=function e(t){var n=t.str,i=t.substs,a=void 0===i?o:i,s=t.formatter,u=void 0===s?y:s;return n.replace(b,(function(t,n,o,i,s){if(n.length%2)return t;if(f({key:o,formatter:u}))return t;var c=w({key:o,arg:s,substs:a});return c=x({substitution:c,ky:o,arg:s,processSubsts:e}),S=S||null!==c&&"object"===d(c)&&"nodeType"in c,r.push(o),n+c}))}({str:t});if(!S)return h({substitutions:o}),r.length=0,v(),D(k);r.length=0,v()}_=1;var O=function e(t){var n=t.str,i=t.substs,a=void 0===i?o:i,s=t.formatter,u=void 0===s?y:s,c=[],l=new RegExp(b,"gu"),p=function(){c.push.apply(c,arguments)};return P(l,n,{extra:p,onMatch:function(t,n,o,i,s){if(f({key:o,formatter:u}))p(t);else{n.length&&p(n);var c=w({key:o,arg:s,substs:a});c=x({substitution:c,ky:o,arg:s,processSubsts:e}),Array.isArray(c)?p.apply(void 0,E(c)):c&&"object"===d(c)&&"nodeType"in c?p(c.cloneNode(!0)):p(c)}r.push(o)}}),c}({str:t});return h({substitutions:o}),r.length=0,O.map((function(e){return"string"==typeof e?D(e):e}))};function Q(e,t){if(Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))&&"string"==typeof t&&t.endsWith("Nested"))return e.map((function(e){return e.replace(h(/(\\+)/g,{backslashes:1}),"\\$<backslashes>").replace(/\./g,"\\.")})).join(".");if("string"!=typeof e)throw new TypeError("`key` is expected to be a string (or array of strings for nested style)");return e}var ee=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).messageStyle,t=void 0===e?"richNested":e;return"function"==typeof t?t:"richNested"===t?function(e,t){var n=e&&"object"===d(e)&&e.body,r=[],o=function(e){r.length||(r[0]=""),r[r.length-1]+=e};P(/(\\*)\./g,t,{extra:o,onMatch:function(e,t){o(t),r.push("")}});var i=r.map((function(e){return D(e)})),a=!1,s=n;return i.some((function(e,t,n){return!s||"object"!==d(s)||(t===n.length-1&&e in s&&s[e]&&"object"===d(s[e])&&"message"in s[e]&&"string"==typeof s[e].message&&(a={value:s[e].message,info:s[e]}),s=s[e],!1)})),a}:"rich"===t?function(e,t){var n=e&&"object"===d(e)&&e.body;return!!(n&&"object"===d(n)&&t in n&&n[t]&&"object"===d(n[t])&&"message"in n[t]&&"string"==typeof n[t].message)&&{value:n[t].message,info:n[t]}}:"plain"===t?function(e,t){var n=e&&"object"===d(e)&&e.body;return!!(n&&"object"===d(n)&&t in n&&n[t]&&"string"==typeof n[t])&&{value:n[t]}}:"plainNested"===t?function(e,t){var n=e&&"object"===d(e)&&e.body;if(n&&"object"===d(n)){var r=t.split(/(?<!\\)\./).reduce((function(e,t){return e&&"object"===d(e)&&e[t]?e[t]:null}),n);if(r&&"string"==typeof r)return{value:r}}return!1}:function(){throw new TypeError("Unknown `messageStyle` ".concat(t))}()};function te(e,t,n){return e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e}function ne(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}var re=function(e){if(!e.includes("-"))throw new Error("Locale not available");return e.replace(/\x2D(?:[\0-,\.-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*$/,"")},oe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.locales,n=e.defaultLocales,r=e.localeResolver,o=e.localesBasePath,i=e.localeMatcher;return ie({locales:t,defaultLocales:n,localeResolver:r,localesBasePath:o,localeMatcher:i})},ie=ne((function(e){var t=ne((function(e){if("string"!=typeof e)throw new TypeError("Non-string locale type");var n=s(c,e);if("string"!=typeof n)throw new TypeError("`localeResolver` expected to resolve to (URL) string.");return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){var t=T();return te(d?t(n,{method:"HEAD"}):t(n),(function(t){if(404===t.status)throw new Error("Trying again");return d?e:te(t.json(),(function(t){return{locale:e,strings:t}}))}))}),(function(n){if("SyntaxError"===n.name)throw n;return te(f(e),t)}))})),n=e.locales,r=void 0===n?"undefined"!=typeof intlDomLocale?[intlDomLocale]:"undefined"==typeof navigator?[]:navigator.languages:n,o=e.defaultLocales,i=void 0===o?["en-US"]:o,a=e.localeResolver,s=void 0===a?X:a,u=e.localesBasePath,c=void 0===u?".":u,l=e.localeMatcher,f=void 0===l?"lookup":l,p=e.headOnly,d=void 0!==p&&p;if("lookup"===f)f=re;else if("function"!=typeof f)throw new TypeError('`localeMatcher` must be "lookup" or a function!');return Z([].concat(E(r),E(i)),t,"No matching locale found for "+[].concat(E(r),E(i)).join(", "))}));function ae(e,t,n){return e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e}var se=function(e){var t=e.strings,n=e.resolvedLocale,r=e.messageStyle,o=void 0===r?"richNested":r,i=e.allSubstitutions,a=e.insertNodes,s=e.keyCheckerConverter,u=void 0===s?Q:s,c=e.defaults,l=e.substitutions,f=e.maximumLocalNestingDepth,h=e.dom,v=void 0!==h&&h,g=e.forceNodeReturn,y=void 0!==g&&g,m=e.throwOnMissingSuppliedFormatters,b=void 0===m||m,w=e.throwOnExtraSuppliedFormatters,_=void 0===w||w;if(!t||"object"!==d(t))throw new TypeError("Locale strings must be an object!");var x=ee({messageStyle:o}),S=function(e,r){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},h=s.allSubstitutions,g=void 0===h?i:h,m=s.defaults,w=void 0===m?c:m,S=s.dom,j=void 0===S?v:S,k=s.forceNodeReturn,O=void 0===k?y:k,A=s.throwOnMissingSuppliedFormatters,F=void 0===A?b:A,D=s.throwOnExtraSuppliedFormatters,I=void 0===D?_:D;e=u(e,o);var P=x(t,e),N=function(e){var t,n=e.message,r=e.defaults,o=e.messageStyle,i=e.messageForKey,a=void 0===i?ee({messageStyle:o}):i,s=e.key;if("string"==typeof n)t=n;else if(!1===r||null==r)t=!1;else{if(!r||"object"!==d(r))throw new TypeError("Default locale strings must resolve to `false`, nullish, or an object!");var u=a(r,s);t=u?u.value:u}if(!1===t)throw new Error("Key value not found for key: (".concat(s,")"));return t}({message:!(!P||"string"!=typeof P.value)&&P.value,defaults:w,messageForKey:x,key:e});return function(e){var t=e.string,n=e.locale,r=e.locals,o=e.switches,i=e.allSubstitutions,a=void 0===i?[z]:i,s=e.insertNodes,u=void 0===s?Y:s,c=e.substitutions,l=void 0!==c&&c,f=e.dom,p=void 0!==f&&f,d=e.forceNodeReturn,h=void 0!==d&&d,v=e.throwOnMissingSuppliedFormatters,g=void 0===v||v,y=e.throwOnExtraSuppliedFormatters,m=void 0===y||y;if("string"!=typeof t)throw new TypeError("An options object with a `string` property set to a string must be provided for `getDOMForLocaleString`.");var b=function(e){var t=L();return h?t.createTextNode(e):e},w=[];if(!l&&!a&&!g)return b(t);l||(l={});var _=u({string:t,dom:p,usedKeys:w,substitutions:l,allSubstitutions:a,locale:n,locals:r,switches:o,missingSuppliedFormatters:function(e){var t=e.key,n=e.formatter,r=n.isMatch(t);if(n.constructor.isMatchingKey(t)&&!r){if(g)throw new Error("Missing formatting key: ".concat(t));return!0}return!1},checkExtraSuppliedFormatters:function(e){var t=e.substitutions;m&&Object.keys(t).forEach((function(e){if(!w.includes(e))throw new Error("Extra formatting key: ".concat(e))}))}});if("string"==typeof _)return b(_);var x=L().createDocumentFragment();return x.append.apply(x,E(_)),x}({string:N,locals:t.head&&t.head.locals,switches:t.head&&t.head.switches,locale:n,maximumLocalNestingDepth:f,allSubstitutions:g,insertNodes:a,substitutions:p(p({},l),r),dom:j,forceNodeReturn:O,throwOnMissingSuppliedFormatters:F,throwOnExtraSuppliedFormatters:I})};return S.resolvedLocale=n,S.strings=t,S.sort=function(e,t){return $(n,e,t)},S.sortList=function(e,t,r,o){return U(n,e,t,r,o)},S.list=function(e,t){return R(n,e,t)},S},ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.locales,n=e.defaultLocales,r=e.localeStringFinder,o=void 0===r?oe:r,i=e.localesBasePath,a=e.localeResolver,s=e.localeMatcher,u=e.messageStyle,c=e.allSubstitutions,l=e.insertNodes,f=e.keyCheckerConverter,p=e.defaults,d=e.substitutions,h=e.maximumLocalNestingDepth,v=e.dom,g=e.forceNodeReturn,y=e.throwOnMissingSuppliedFormatters,m=e.throwOnExtraSuppliedFormatters;try{return ae(o({locales:t,defaultLocales:n,localeResolver:a,localesBasePath:i,localeMatcher:s}),(function(e){var t=e.strings,r=e.locale;return function(e,t){var n=e();return n&&n.then?n.then(t):t(n)}((function(){if(!p&&n)return ae(o({locales:n,defaultLocales:[],localeResolver:a,localesBasePath:i,localeMatcher:s}),(function(e){p=e.strings,e.locale===r&&(p=null)}))}),(function(){return se({strings:t,resolvedLocale:r,messageStyle:u,allSubstitutions:c,insertNodes:l,keyCheckerConverter:f,defaults:p,substitutions:d,maximumLocalNestingDepth:h,dom:v,forceNodeReturn:g,throwOnMissingSuppliedFormatters:y,throwOnExtraSuppliedFormatters:m})}))}))}catch(e){return Promise.reject(e)}};function ce(e,{before:t,after:n,favicon:r,canvas:o,image:i=!0,acceptErrors:a}={}){return e=Array.isArray(e)?e:[e],Promise.all(e.map((e=>function(e){let s,u={};Array.isArray(e)?[s,u={}]=e:s=e;let{favicon:c=r}=u;const{before:l=t,after:f=n,canvas:p=o,image:d=i}=u;function h(){l?l.before(v):f?f.after(v):document.head.append(v)}const v=document.createElement("link");return new Promise(((e,t)=>{let n=t;if(a&&(n="function"==typeof a?n=>{a({error:n,stylesheetURL:s,options:u,resolve:e,reject:t})}:e),s.endsWith(".css")?c=!1:s.endsWith(".ico")&&(c=!0),c){if(v.rel="shortcut icon",v.type="image/x-icon",!1===d)return v.href=s,h(),void e(v);const n=document.createElement("canvas");n.width=16,n.height=16;const r=n.getContext("2d"),o=document.createElement("img");return o.addEventListener("error",(e=>{t(e)})),o.addEventListener("load",(()=>{if(!r)throw new Error("Canvas context could not be found");r.drawImage(o,0,0),v.href=p?n.toDataURL("image/x-icon"):s,h(),e(v)})),void(o.src=s)}v.rel="stylesheet",v.type="text/css",v.href=s,h(),v.addEventListener("error",(e=>{n(e)})),v.addEventListener("load",(()=>{e(v)}))}))}(e))))}function le(e){return le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},le(e)}function fe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||de(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pe(e){return function(e){if(Array.isArray(e))return he(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||de(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function de(e,t){if(e){if("string"==typeof e)return he(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?he(e,t):void 0}}function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ve=/^(?:submit|button|image|reset|file)$/i,ge=/^(?:input|select|textarea|keygen)/i,ye=/(\[[^[\]]*])/g;function me(e,t){"object"!==le(t)?t={hash:Boolean(t)}:void 0===t.hash&&(t.hash=!0);var n=t.hash?{}:"",r=t.serializer||(t.hash?we:_e),o=e&&e.elements?pe(e.elements):[],i=Object.create(null);return o.forEach((function(e){if((t.disabled||!e.disabled)&&e.name&&ge.test(e.nodeName)&&!ve.test(e.type)){var o=e.name,a=e.type,s=e.name,u=e.checked,c=e.value;if("checkbox"!==a&&"radio"!==a||u||(c=void 0),t.empty){if("checkbox"!==a||u||(c=""),"radio"===a&&(i[s]||u?u&&(i[s]=!0):i[s]=!1,void 0===c))return}else if(!c)return;if("select-multiple"===a){var l=!1;return pe(e.options).forEach((function(e){var i=t.empty&&!e.value,a=e.value||i;e.selected&&a&&(l=!0,n=t.hash&&"[]"!==o.slice(-2)?r(n,o+"[]",e.value):r(n,o,e.value))})),void(!l&&t.empty&&(n=r(n,o,"")))}n=r(n,o,c)}})),t.empty&&Object.entries(i).forEach((function(e){var t=fe(e,2),o=t[0];t[1]||(n=r(n,o,""))})),n}function be(e,t,n){if(0===t.length)return n;var r=t.shift(),o=r.match(/^\[(.+?)]$/);if("[]"===r)return e=e||[],Array.isArray(e)?e.push(be(null,t,n)):(e._values=e._values||[],e._values.push(be(null,t,n))),e;if(o){var i=o[1],a=Number(i);isNaN(a)?(e=e||{})[i]=be(e[i],t,n):(e=e||[])[a]=be(e[a],t,n)}else e[r]=be(e[r],t,n);return e}function we(e,t,n){if(t.match(ye)){be(e,function(e){var t=[],n=new RegExp(ye),r=/^([^[\]]*)/.exec(e);for(r[1]&&t.push(r[1]);null!==(r=n.exec(e));)t.push(r[1]);return t}(t),n)}else{var r=e[t];r?(Array.isArray(r)||(e[t]=[r]),e[t].push(n)):e[t]=n}return e}function _e(e,t,n){return n=n.replace(/(\r)?\n/g,"\r\n"),n=(n=encodeURIComponent(n)).replace(/%20/g,"+"),e+(e?"&":"")+encodeURIComponent(t)+"="+n}function xe(e,t){Object.entries(t).forEach((function(t){var n=fe(t,2),r=n[0],o=n[1],i=e[r],a=!1;if(!i&&!(i=e.querySelector('[name="'.concat(r,'"]')))){if(!((i=e[r+"[]"])&&"object"===le(i)&&"length"in i||(i=e.querySelectorAll('[name="'.concat(r,'[]"]'))).length))throw new Error("Name not found ".concat(r));a=!0}var s=i.type;if("checkbox"===s&&(i.checked=""!==o),("radio"===s||i[0]&&"radio"===i[0].type)&&pe(e.querySelectorAll('[name="'.concat(r+(a?"[]":""),'"]'))).forEach((function(e){e.checked=o===e.value})),i[0]&&"select-multiple"===i[0].type)pe(i[0].options).forEach((function(e){o.includes(e.value)&&(e.selected=!0)}));else if(Array.isArray(o)){if("select-multiple"===s)return void pe(i.options).forEach((function(e){o.includes(e.value)&&(e.selected=!0)}));o.forEach((function(e,t){var n=i[t];if("checkbox"!==n.type)"select-multiple"!==n.type?n.value=e:pe(n.options).forEach((function(t){e.includes(t.value)&&(t.selected=!0)}));else{var r=n.value===e||"on"===e;n.checked=r}}))}else i.value=o}))}let Se;"undefined"!=typeof window&&window&&(Se=window);let je="undefined"!=typeof document&&document||Se?.document;const Ee=["$plugins","$map"],ke="http://www.w3.org/1999/xhtml",Oe=/-([a-z])/gu,Ae=new Map([["maxlength","maxLength"],["minlength","minLength"],["readonly","readOnly"]]),Fe=["checked","defaultChecked","defaultSelected","disabled","indeterminate","open","readOnly","selected","accessKey","async","autocapitalize","autofocus","contentEditable","defaultValue","defer","draggable","formnovalidate","hidden","innerText","inputMode","ismap","multiple","novalidate","pattern","required","spellcheck","translate","value","willvalidate"],De=["autocomplete","dir","integrity","lang","max","min","minLength","maxLength","title"],Ie=e=>{if(!je)throw new Error("No document object");return je.querySelector(e)},Pe=e=>{if(!je)throw new Error("No document object");return[...je.querySelectorAll(e)]};function Ne(e,t){var n;"template"!==((n=e).nodeName&&n.nodeName.toLowerCase())?e.append(t):e.content.append(t)}function Te(e,t,n){if(!je)throw new Error("No document defined");if(!/^\w+$/u.test(n))throw new TypeError(`Bad ${e} reference; with prefix "${t}" and arg "${n}"`);const r=je.createElement("div");return r.innerHTML="&"+t+n+";",je.createTextNode(r.innerHTML)}function Ce(e,t){return t.toUpperCase()}function Le(e){return null==e}function $e(e){const t=typeof e;if("string"==typeof e||void 0===e)return"string";if("object"===t){if(null===e)return"null";if(Array.isArray(e))return"array";if("nodeType"in e)switch(e.nodeType){case 1:return"element";case 9:return"document";case 11:return"fragment";default:return"non-container node"}}return t}function Re(e,t){return e.append(t),e}function Ue(e){return function(...t){const n=t[0];let r=e[""]?' xmlns="'+e[""]+'"':n;for(const[t,n]of Object.entries(e))""!==t&&(r+=" xmlns:"+t+'="'+n+'"');return r}}function Me(e){return function(t,n){const r=e.childNodes[n],o=Array.isArray(t)?Ve(...t):Ve(t);r.replaceWith(o)}}function ze(e){return function(t){if("string"==typeof t||"number"==typeof t)throw new TypeError("Unexpected text string/number in the head");Array.isArray(t)?e.append(Ve(...t)):"object"==typeof t&&"nodeType"in t?e.append(t):e.append(Ve(t))}}function Be(e){return function(t){"string"==typeof t||"number"==typeof t?e.append(String(t)):Array.isArray(t)?e.append(Ve(...t)):"object"==typeof t&&"nodeType"in t?e.append(t):e.append(Ve(t))}}function qe(e,t,n,r,o){if(r.$state=o??"attributeValue",n&&"object"==typeof n){const o=We(r,Object.keys(n)[0]);if(o)return o.set({opts:r,element:e,attribute:{name:t,value:n}})}return n}function We(e,t){return e.$plugins&&e.$plugins.find((e=>e.name===t))}const Ve=function e(...t){if(!Se)throw new Error("No window object");if(!je)throw new Error("No document object");let n=je.createDocumentFragment();function r(r){if(!je)throw new Error("No document object");for(let[p,d]of Object.entries(r))if(p=Ae.get(p)??p,De.includes(p))d=qe(n,p,d,a),Le(d)||(n[p]=d);else if(Fe.includes(p))d=qe(n,p,d,a),n[p]=d;else switch(p){case"#":a.$state="fragmentChildren",o[o.length]=e(a,d);break;case"$shadow":{const{open:t,closed:r}=d;let{content:o,template:i}=d;const a=n.attachShadow({mode:r||!1===t?"closed":"open"});i?(Array.isArray(i)?i="object"===$e(i[0])?e("template",...i,je.body):e("template",i,je.body):"string"==typeof i&&(i=Ie(i)),e(i.content.cloneNode(!0),a)):(o||!0!==t&&(o=t||"boolean"==typeof r?o:r),o&&"boolean"!=typeof o&&(Array.isArray(o)?e({"#":o},a):e(o,a)));break}case"$state":case"is":case"xmlns":break;case"$custom":Object.assign(n,d);break;case"$define":{if(!("localName"in n))throw new Error("Element expected for `$define`");const e=n.localName.toLowerCase(),o=!e.includes("-");let i;if(o&&(i=n.getAttribute("is"),!i)){if(!Object.hasOwn(r,"is"))throw new TypeError(`Expected \`is\` with \`$define\` on built-in; args: ${JSON.stringify(t)}`);r.is=qe(n,"is",r.is,a),n.setAttribute("is",r.is),({is:i}=r)}const s=o?i:e;if(window.customElements.get(s))break;const u=t=>{if(!je)throw new Error("No document object");const n="object"==typeof l&&"string"==typeof l.extends?je.createElement(l.extends).constructor:o?je.createElement(e).constructor:window.HTMLElement;return t?class extends n{constructor(){super(),t.call(this)}}:class extends n{}};let c,l,f;const p=d;Array.isArray(p)?p.length<=2?([c,l]=p,"string"==typeof l?l={extends:l}:l&&!Object.hasOwn(l,"extends")&&(f=l),"object"==typeof c&&(f=c,c=u())):([c,f,l]=p,"string"==typeof l&&(l={extends:l})):"function"==typeof p?c=p:(f=p,c=u()),c.toString().startsWith("class")||(c=u(c)),!l&&o&&(l={extends:e}),f&&Object.entries(f).forEach((([e,t])=>{c.prototype[e]=t})),window.customElements.define(s,c,"object"==typeof l?l:void 0);break}case"$symbol":{const[e,t]=d;if("function"==typeof t){const r=t.bind(n);"string"==typeof e?n[Symbol.for(e)]=r:n[e]=r}else{const r=t;r.elem=n,"string"==typeof e?n[Symbol.for(e)]=r:n[e]=r}break}case"$data":f(d);break;case"$attribute":{const e=d,t=3===e.length?je.createAttributeNS(e[0],e[1]):je.createAttribute(e[0]);t.value=e[e.length-1],o[o.length]=t;break}case"$text":{const e=je.createTextNode(d);o[o.length]=e;break}case"$document":{const t=je.implementation.createHTMLDocument();if(!d)throw new Error("Bad attribute value");const n=d;if(n.childNodes){const e=n.childNodes.length;for(;t.childNodes[e];){t.childNodes[e].remove()}n.childNodes.forEach(Me(t))}else{if(n.$DOCTYPE){const r={$DOCTYPE:n.$DOCTYPE},o=e(r);t.firstChild?.replaceWith(o)}const r=t.querySelector("html"),o=r?.querySelector("head"),i=r?.querySelector("body");if(n.title||n.head){const e=je.createElement("meta");e.setAttribute("charset","utf-8"),o?.append(e),n.title&&(t.title=n.title),n.head&&o&&n.head.forEach(ze(o))}n.body&&i&&n.body.forEach(Be(i))}o[o.length]=t;break}case"$DOCTYPE":{const e=d,t=je.implementation.createDocumentType(e.name,e.publicId||"",e.systemId||"");o[o.length]=t;break}case"$on":for(let[e,r]of Object.entries(d||{})){if("function"==typeof r&&(r=[r,!1]),"function"!=typeof r[0])throw new TypeError(`Expect a function for \`$on\`; args: ${JSON.stringify(t)}`);s=n,u=e,c=r[0],l=r[1],s.addEventListener(u,c,Boolean(l))}break;case"className":case"class":d=qe(n,p,d,a),Le(d)||(n.className=d);break;case"dataset":{const e=(t,r)=>{let o="";const i=""!==r;Object.keys(t).forEach((a=>{const s=t[a];if(o=i?r+a.replace(Oe,Ce).replace(/^([a-z])/u,Ce):r+a.replace(Oe,Ce),null===s||"object"!=typeof s)return Le(s)||(n.dataset[o]=s),void(o=r);e(s,o)}))};e(d,"");break}case"innerHTML":Le(d)||(n.innerHTML=d);break;case"htmlFor":case"for":if("label"===i){d=qe(n,p,d,a),Le(d)||(n.htmlFor=d);break}d=qe(n,p,d,a),n.setAttribute(p,d);break;default:{if(p.startsWith("on")){d=qe(n,p,d,a),n[p]=d;break}if("style"===p){if(d=qe(n,p,d,a),Le(d))break;if("object"==typeof d){for(const[e,t]of Object.entries(d))Le(t)||("float"===e?(n.style.cssFloat=t,n.style.styleFloat=t):n.style[e.replace(Oe,Ce)]=t);break}n.setAttribute(p,d);break}const e=p,t=We(a,e);if(t){t.set({opts:a,element:o[0],attribute:{name:e,value:d}});break}d=qe(n,p,d,a),n.setAttribute(p,d);break}}var s,u,c,l}const o=[];let i,a,s=!1,u=0;if("object"===$e(t[0])&&Object.keys(t[0]).some((e=>Ee.includes(e)))){if(a=t[0],void 0===a.$state&&(s=!0,a.$state="root"),Array.isArray(a.$map)&&(a.$map={root:a.$map}),"$plugins"in a){if(!Array.isArray(a.$plugins))throw new TypeError(`\`$plugins\` must be an array; args: ${JSON.stringify(t)}`);a.$plugins.forEach((e=>{if(!e||"object"!=typeof e)throw new TypeError(`Plugin must be an object; args: ${JSON.stringify(t)}`);if(!e.name||!e.name.startsWith("$_"))throw new TypeError(`Plugin object name must be present and begin with \`$_\`; args: ${JSON.stringify(t)}`);if("function"!=typeof e.set)throw new TypeError(`Plugin object must have a \`set\` method; args: ${JSON.stringify(t)}`)}))}u=1}else a={$state:void 0};const c=t.length,l=a.$map&&a.$map.root,f=e=>{let t,r;const o=l;if(!0===e)[t,r]=o;else if(Array.isArray(e)){if("string"==typeof e[0])return void e.forEach((e=>{f(a.$map[e])}));t=e[0]||o[0],r=e[1]||o[1]}else/^\[object (?:Weak)?Map\]$/u.test([].toString.call(e))?(t=e,r=o[1]):(t=o[0],r=e);t.set(n,r)};for(let s=u;s<c;s++){let u=t[s];const l=$e(u);switch(l){case"null":if(s===c-1)return o.length<=1?o[0]:o.reduce(Re,je.createDocumentFragment());throw new TypeError(`\`null\` values not allowed except as final Jamilih argument; index ${s} on args: ${JSON.stringify(t)}`);case"string":switch(u){case"!":o[o.length]=je.createComment(t[++s]);break;case"?":{u=t[++s];let e=t[++s];const n=e;if(n&&"object"==typeof n){const t=[];for(const[e,r]of Object.entries(n))t.push(e+'="'+r.replace(/"/gu,"&quot;")+'"');e=t.join(" ")}try{o[o.length]=je.createProcessingInstruction(u,e)}catch(t){o[o.length]=je.createComment("?"+u+" "+e+"?")}break}case"&":o[o.length]=Te("entity","",t[++s]);break;case"#":o[o.length]=Te("decimal",u,String(t[++s]));break;case"#x":o[o.length]=Te("hexadecimal",u,t[++s]);break;case"![":try{o[o.length]=je.createCDATASection(t[++s])}catch(e){o[o.length]=je.createTextNode(t[s])}break;case"":o[o.length]=n=je.createDocumentFragment(),a.$state="fragment";break;default:{i=u;const e=t[s+1];if(e&&"object"===$e(e)&&e.is){const{is:t}=e;n=je.createElementNS?je.createElementNS(ke,i,{is:t}):je.createElement(i,{is:t})}else n=je.createElementNS?je.createElementNS(ke,i):je.createElement(i);a.$state="element",o[o.length]=n;break}}break;case"object":{if(!u||"object"!=typeof u)throw new Error("Null should not reach here");const e=u;if("xmlns"in e){const t=e,r=t.xmlns&&"object"==typeof t.xmlns?Ue(t.xmlns):' xmlns="'+t.xmlns+'"';n=o[o.length-1]=(new Se.DOMParser).parseFromString((new Se.XMLSerializer).serializeToString(n).replace(' xmlns="'+ke+'"',r),"application/xml").documentElement,a.$state="element"}r(e);break}case"document":case"fragment":case"element":if(0===s&&(n=u,a.$state="element"),s===c-1||s===c-2&&null===t[s+1]){const e=o.length;for(let t=0;t<e;t++)Ne(u,o[t])}else o[o.length]=u;break;case"array":{const r=u,o=r.length;for(let i=0;i<o;i++){const o=r[i],s=typeof o;if(null===o||Le(o))throw new TypeError(`Bad children (parent array: ${JSON.stringify(t)}; index ${i} of child: ${JSON.stringify(r)})`);switch(s){case"string":case"number":case"boolean":Ne(n,je.createTextNode(String(o)));break;default:if("object"!=typeof o)throw new TypeError(`Bad children (parent array: ${JSON.stringify(t)}; index ${i} of child: ${JSON.stringify(r)})`);if(Array.isArray(o))a.$state="children",Ne(n,e(a,...o));else if("#"in o)a.$state="fragmentChildren",Ne(n,e(a,o["#"]));else{let e;"nodeType"in o||(e=qe(n,null,o,a,"children")),Ne(n,e||o)}}}break}default:throw new TypeError(`Unexpected type: ${l}; arg: ${u}; index ${s} on args: ${JSON.stringify(t)}`)}}const p=o[0]||n;return s&&a.$map&&a.$map.root&&f(!0),p};class He extends Error{constructor(e,t){super(e),this.code=0,this.name=t}}Ve.toJML=function(e,{stringOutput:t=!1,reportInvalidState:n=!0,stripWhitespace:r=!1}={}){if(!Se)throw new Error("No window object set");"string"==typeof e&&(e=(new Se.DOMParser).parseFromString(e,"text/html"));const o=[];let i=o,a=0;function s(e){if(n){const t=new He(e,"INVALID_STATE_ERR");throw t.code=11,t}}function u(e){i[a]=e,a++}function c(){u([]),i=i[a-1],a=0}function l(e,t){i=i[a-1][e],a=0,t&&(i=i[t])}return function e(t,n){const o="nodeType"in t?t.nodeType:null;if(!o)throw new TypeError("Not an XML type");if(5===o)return void u(["&",t.nodeName]);let f,p;function d(){f=i,p=a}function h(){i=f,a=p,a++}switch(n={...n},[2,3,4,7,8].includes(o)&&t.nodeValue&&!/^([\u0009\u000A\u000D\u0020-\uD7FF\uE000-\uFFFD]|[\uD800-\uDBFF][\uDC00-\uDFFF])*$/u.test(t.nodeValue)&&s("Node has bad XML character value"),o){case 1:{const r=t;d();const o=r.nodeName.toLowerCase();c(),u(o);const i={};let a=!1;n[r.prefix||""]!==r.namespaceURI&&(n[r.prefix||""]=r.namespaceURI,r.prefix?i["xmlns:"+r.prefix]=r.namespaceURI:r.namespaceURI?i.xmlns=r.namespaceURI:i.xmlns=null,a=!0),r.attributes.length?u([...r.attributes].reduce((function(e,t){return e[t.name]=t.value,e}),i)):a&&u(i);const{childNodes:s}=r;s.length&&(c(),[...s].forEach((function(t){e(t,n)}))),h();break}case 2:{const e=t;u({$attribute:[e.namespaceURI,e.name,e.value]});break}case 3:{const e=t;if(!e.nodeValue)throw new Error("Unexpected null comment value");if(r&&/^\s+$/u.test(e.nodeValue))return void u("");u(e.nodeValue);break}case 4:{const e=t;e.nodeValue?.includes("]]>")&&s("CDATA cannot end with closing ]]>"),u(["![",e.nodeValue]);break}case 7:{const e=t;/^xml$/iu.test(e.target)&&s('Processing instructions cannot be "xml".'),e.target.includes("?>")&&s("Processing instruction targets cannot include ?>"),e.target.includes(":")&&s('The processing instruction target cannot include ":"'),e.data.includes("?>")&&s("Processing instruction data cannot include ?>"),u(["?",e.target,e.data]);break}case 8:{const e=t;if(!e.nodeValue)throw new Error("Unexpected null comment value");(e.nodeValue.includes("--")||e.nodeValue.length&&e.nodeValue.lastIndexOf("-")===e.nodeValue.length-1)&&s("Comments cannot include --"),u(["!",e.nodeValue]);break}case 9:{const r=t;d();u({$document:{childNodes:[]}}),l("$document","childNodes");const{childNodes:o}=r;o.length||s("Documents must have a child node"),[...o].forEach((function(t){e(t,n)})),h();break}case 10:{const e=t;d();const n={$DOCTYPE:{name:e.name}};/^(\u0020|\u000D|\u000A|[a-zA-Z0-9]|[-'()+,./:=?;!*#@$_%])*$/u.test(e.publicId)||s("A publicId must have valid characters."),function(e,t){t.systemId.includes('"')&&t.systemId.includes("'")&&s("systemId cannot have both single and double quotes.");const{publicId:n,systemId:r}=t;r&&(e.systemId=r),n&&(e.publicId=n)}(n.$DOCTYPE,e),u(n),h();break}case 11:{const r=t;d(),u({"#":[]}),l("#");const{childNodes:o}=r;[...o].forEach((function(t){e(t,n)})),h();break}default:throw new TypeError("Not an XML type")}}(e,{}),t?JSON.stringify(o[0]):o[0]},Ve.toJMLString=function(e,t){return Ve.toJML(e,Object.assign(t||{},{stringOutput:!0}))},Ve.toDOM=function(...e){return Ve(...e)},Ve.toHTML=function(...e){const t=Ve(...e);switch(t.nodeType){case 1:return t.outerHTML;case 2:return`${t.name}="${t.value.replace(/"/gu,"&quot;")}"`;case 3:if(!t.nodeValue)throw new TypeError("Unexpected null Text node");return t.nodeValue;case 9:case 11:return[...t.childNodes].map((e=>Ve.toHTML(e))).join("");case 10:{const e=t;return`<!DOCTYPE ${e.name}${e.publicId?` PUBLIC "${e.publicId}" "${e.systemId}"`:e.systemId?` SYSTEM "${e.systemId}"`:""}>`}default:throw new Error("Unexpected node type")}},Ve.toDOMString=function(...e){return Ve.toHTML(...e)},Ve.toXML=function(...e){if(!Se)throw new Error("No window object set");const t=Ve(...e);return(new Se.XMLSerializer).serializeToString(t)},Ve.toXMLDOMString=function(...e){return Ve.toXML(...e)};class Je extends Map{get(e){const t="string"==typeof e?Ie(e):e;return super.get.call(this,t)}set(e,t){const n="string"==typeof e?Ie(e):e;return super.set.call(this,n,t)}invoke(e,t,...n){const r="string"==typeof e?Ie(e):e;return this.get(r)[t](r,...n)}}class Ke extends WeakMap{get(e){const t="string"==typeof e?Ie(e):e;if(!t)throw new Error("Can't find the element");return super.get.call(this,t)}set(e,t){const n="string"==typeof e?Ie(e):e;if(!n)throw new Error("Can't find the element");return super.set.call(this,n,t)}invoke(e,t,...n){const r="string"==typeof e?Ie(e):e;if(!r)throw new Error("Can't find the element");return this.get(r)[t](r,...n)}}let Ge;Ve.Map=Je,Ve.WeakMap=Ke,Ve.weak=function(e,...t){const n=new Ke;return[n,Ve({$map:[n,e]},...t)]},Ve.strong=function(e,...t){const n=new Je;return[n,Ve({$map:[n,e]},...t)]},Ve.symbol=Ve.sym=Ve.for=function(e,t){return("string"==typeof e?Ie(e):e)["symbol"==typeof t?t:Symbol.for(t)]},Ve.command=function(e,t,n,...r){if(!(e="string"==typeof e?Ie(e):e))throw new Error("No element found");let o;if(["symbol","string"].includes(typeof t))return o=Ve.sym(e,t),"function"==typeof o?o(n,...r):o[n](...r);if(o=t.get(e),!o)throw new Error("No map found");return"function"==typeof o?o.call(e,n,...r):o[n](e,...r)},Ve.setWindow=e=>{Se=e,je=Se?.document,je&&je.body&&(Ge=je.body)},Ve.getWindow=()=>{if(!Se)throw new Error("No window object set");return Se},je&&je.body&&(Ge=je.body);const Ze=" ",Xe=(e,t)=>{var n;return(e="string"==typeof e?(n=e,document.querySelector(n)):e).querySelector(t)},Ye={en:{submit:"Submit",cancel:"Cancel",ok:"Ok"}};const Qe=new class{constructor(){let{locale:e,localeObject:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.setLocale({locale:e,localeObject:t})}setLocale(e){let{locale:t={},localeObject:n={}}=e;this.localeStrings={...Ye.en,...Ye[t],...n}}makeDialog(e){let{atts:t={$on:null},children:n=[],close:r,remove:o=!0}=e;r&&(t.$on||(t.$on={}),t.$on.close||(t.$on.close=r));const i=Ve("dialog",t,n,Ie("#main"));return i.showModal(),o&&i.addEventListener("close",(()=>{i.remove()})),i}makeSubmitDialog(e){let{submit:t,submitClass:n="submit",...r}=e;const o=this.makeCancelDialog(r);return Xe(o,`button.${r.cancelClass||"cancel"}`).before(Ve("button",{class:n,$on:{click(e){t&&t.call(this,{e:e,dialog:o})}}},[this.localeStrings.submit]),Ze.repeat(2)),o}makeCancelDialog(e){let{submit:t,cancel:n,cancelClass:r="cancel",submitClass:o="submit",...i}=e;const a=this.makeDialog(i);return Ve("div",{class:o},[["br"],["br"],["button",{class:r,$on:{click(e){e.preventDefault(),n&&!1===n.call(this,{e:e,dialog:a})||a.close()}}},[this.localeStrings.cancel]]],a),a}alert(e,t){e="string"==typeof e?{message:e}:e;const{ok:n=("object"==typeof t?!1!==t.ok:!1!==t),message:r,submitClass:o="submit"}=e;return new Promise((e=>{const t=Ve("dialog",[r,...n?[["br"],["br"],["div",{class:o},[["button",{$on:{click(){t.close(),e()}}},[this.localeStrings.ok]]]]]:[]],Ie("#main"));t.showModal()}))}prompt(e){e="string"==typeof e?{message:e}:e;const{message:t,submit:n,...r}=e;return new Promise(((e,o)=>{this.makeSubmitDialog({...r,submit:function(t){let{e:r,dialog:o}=t;n&&n.call(this,{e:r,dialog:o}),o.close(),e(Xe(o,"input").value)},cancel(){o(new Error("cancelled"))},children:[["label",[t,Ze.repeat(3),["input"]]]]})}))}confirm(e){e="string"==typeof e?{message:e}:e;const{message:t,submitClass:n="submit"}=e;return new Promise(((e,r)=>{const o=Ve("dialog",[t,["br"],["br"],["div",{class:n},[["button",{$on:{click(){o.close(),e()}}},[this.localeStrings.ok]],Ze.repeat(2),["button",{$on:{click(){o.close(),r(new Error("cancelled"))}}},[this.localeStrings.cancel]]]]],Ie("#main"));o.showModal()}))}};class et{constructor(e){let{langData:t}=e;this.langData=t}localeFromLangData(e){return this.langData["localization-strings"][e]}getLanguageFromCode(e){return this.localeFromLangData(e).languages[e]}getFieldNameFromPluginNameAndLocales(e){let{pluginName:t,workI18n:n,targetLanguage:r,applicableFieldI18N:o,meta:i,metaApplicableField:a}=e;return n(["plugins",t,"fieldname"],{...i,...a,applicableField:o,targetLanguage:r?this.getLanguageFromCode(r):""},{throwOnExtraSuppliedFormatters:!1})}getLanguageInfo(e){let{$p:t}=e;const n=this.langData.languages,r=e=>!!n.some((t=>{let{code:n}=t;return n===e}))&&e,o=t.get("lang",!0),i=navigator.languages.filter(r),a=i.length?i:[r(navigator.language)||"en-US"];return{lang:[...(o||a[0]).split("."),...a],langs:n,languageParam:o,fallbackLanguages:a}}}var tt=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=84)}([function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r;try{r={clone:n(88),constant:n(64),each:n(146),filter:n(152),has:n(175),isArray:n(0),isEmpty:n(177),isFunction:n(17),isUndefined:n(178),keys:n(6),map:n(179),reduce:n(181),size:n(184),transform:n(190),union:n(191),values:n(210)}}catch(e){}r||(r=window._),e.exports=r},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(47),i="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,a=o||i||Function("return this")();e.exports=a},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return null!=e&&"object"==n(e)}},function(e,t,n){var r=n(100),o=n(105);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){var t=n(e);return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(52),o=n(37),i=n(7);e.exports=function(e){return i(e)?r(e):o(e)}},function(e,t,n){var r=n(17),o=n(34);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){var r=n(9),o=n(101),i=n(102),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},function(e,t,n){var r=n(2).Symbol;e.exports=r},function(e,t,n){var r=n(132),o=n(31),i=n(133),a=n(61),s=n(134),u=n(8),c=n(48),l=c(r),f=c(o),p=c(i),d=c(a),h=c(s),v=u;(r&&"[object DataView]"!=v(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=v(new o)||i&&"[object Promise]"!=v(i.resolve())||a&&"[object Set]"!=v(new a)||s&&"[object WeakMap]"!=v(new s))&&(v=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case p:return"[object Promise]";case d:return"[object Set]";case h:return"[object WeakMap]"}return t}),e.exports=v},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"===("undefined"==typeof window?"undefined":n(window))&&(r=window)}e.exports=r},function(e,t,n){(function(e){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(2),i=n(121),a="object"==r(t)&&t&&!t.nodeType&&t,s=a&&"object"==r(e)&&e&&!e.nodeType&&e,u=s&&s.exports===a?o.Buffer:void 0,c=(u?u.isBuffer:void 0)||i;e.exports=c}).call(this,n(14)(e))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],l=!1,f=-1;function p(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=s(p);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||l||s(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(90),o=n(91),i=n(92),a=n(93),s=n(94);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t,n){var r=n(30);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(8),o=n(5);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){var r=n(4)(Object,"create");e.exports=r},function(e,t,n){var r=n(114);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(49),o=n(50);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var s=-1,u=t.length;++s<u;){var c=t[s],l=i?i(n[c],e[c],c,n,e):void 0;void 0===l&&(l=e[c]),a?o(n,c,l):r(n,c,l)}return n}},function(e,t,n){var r=n(120),o=n(3),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},function(e,t,n){var r=n(122),o=n(35),i=n(36),a=i&&i.isTypedArray,s=a?o(a):r;e.exports=s},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(65),o=n(150)(r);e.exports=o},function(e,t){e.exports=function(e){return e}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(154),i=n(164),a=n(25),s=n(0),u=n(173);e.exports=function(e){return"function"==typeof e?e:null==e?a:"object"==r(e)?s(e)?i(e[0],e[1]):o(e):u(e)}},function(e,t,n){var r=n(44);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(1);function i(e){this._isDirected=!o.has(e,"directed")||e.directed,this._isMultigraph=!!o.has(e,"multigraph")&&e.multigraph,this._isCompound=!!o.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=o.constant(void 0),this._defaultEdgeLabelFn=o.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function a(e,t){e[t]?e[t]++:e[t]=1}function s(e,t){--e[t]||delete e[t]}function u(e,t,n,r){var i=""+t,a=""+n;if(!e&&i>a){var s=i;i=a,a=s}return i+""+a+""+(o.isUndefined(r)?"\0":r)}function c(e,t){return u(e,t.v,t.w,t.name)}e.exports=i,i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(e){return this._label=e,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(e){return o.isFunction(e)||(e=o.constant(e)),this._defaultNodeLabelFn=e,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return o.keys(this._nodes)},i.prototype.sources=function(){var e=this;return o.filter(this.nodes(),(function(t){return o.isEmpty(e._in[t])}))},i.prototype.sinks=function(){var e=this;return o.filter(this.nodes(),(function(t){return o.isEmpty(e._out[t])}))},i.prototype.setNodes=function(e,t){var n=arguments,r=this;return o.each(e,(function(e){n.length>1?r.setNode(e,t):r.setNode(e)})),this},i.prototype.setNode=function(e,t){return o.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},i.prototype.node=function(e){return this._nodes[e]},i.prototype.hasNode=function(e){return o.has(this._nodes,e)},i.prototype.removeNode=function(e){var t=this;if(o.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],o.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),o.each(o.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],o.each(o.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},i.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(o.isUndefined(t))t="\0";else{for(var n=t+="";!o.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},i.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},i.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if("\0"!==t)return t}},i.prototype.children=function(e){if(o.isUndefined(e)&&(e="\0"),this._isCompound){var t=this._children[e];if(t)return o.keys(t)}else{if("\0"===e)return this.nodes();if(this.hasNode(e))return[]}},i.prototype.predecessors=function(e){var t=this._preds[e];if(t)return o.keys(t)},i.prototype.successors=function(e){var t=this._sucs[e];if(t)return o.keys(t)},i.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return o.union(t,this.successors(e))},i.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},i.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;o.each(this._nodes,(function(n,r){e(r)&&t.setNode(r,n)})),o.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var r={};return this._isCompound&&o.each(t.nodes(),(function(e){t.setParent(e,function e(o){var i=n.parent(o);return void 0===i||t.hasNode(i)?(r[o]=i,i):i in r?r[i]:e(i)}(e))})),t},i.prototype.setDefaultEdgeLabel=function(e){return o.isFunction(e)||(e=o.constant(e)),this._defaultEdgeLabelFn=e,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return o.values(this._edgeObjs)},i.prototype.setPath=function(e,t){var n=this,r=arguments;return o.reduce(e,(function(e,o){return r.length>1?n.setEdge(e,o,t):n.setEdge(e,o),o})),this},i.prototype.setEdge=function(){var e,t,n,i,s=!1,c=arguments[0];"object"===r(c)&&null!==c&&"v"in c?(e=c.v,t=c.w,n=c.name,2===arguments.length&&(i=arguments[1],s=!0)):(e=c,t=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),e=""+e,t=""+t,o.isUndefined(n)||(n=""+n);var l=u(this._isDirected,e,t,n);if(o.has(this._edgeLabels,l))return s&&(this._edgeLabels[l]=i),this;if(!o.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[l]=s?i:this._defaultEdgeLabelFn(e,t,n);var f=function(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};return r&&(s.name=r),s}(this._isDirected,e,t,n);return e=f.v,t=f.w,Object.freeze(f),this._edgeObjs[l]=f,a(this._preds[t],e),a(this._sucs[e],t),this._in[t][l]=f,this._out[e][l]=f,this._edgeCount++,this},i.prototype.edge=function(e,t,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):u(this._isDirected,e,t,n);return this._edgeLabels[r]},i.prototype.hasEdge=function(e,t,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):u(this._isDirected,e,t,n);return o.has(this._edgeLabels,r)},i.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):u(this._isDirected,e,t,n),o=this._edgeObjs[r];return o&&(e=o.v,t=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[t],e),s(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},i.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var r=o.values(n);return t?o.filter(r,(function(e){return e.v===t})):r}},i.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var r=o.values(n);return t?o.filter(r,(function(e){return e.w===t})):r}},i.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},function(e,t,n){var r=n(15),o=n(95),i=n(96),a=n(97),s=n(98),u=n(99);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,e.exports=c},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(4)(n(2),"Map");e.exports=r},function(e,t,n){var r=n(106),o=n(113),i=n(115),a=n(116),s=n(117);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(47),i="object"==r(t)&&t&&!t.nodeType&&t,a=i&&"object"==r(e)&&e&&!e.nodeType&&e,s=a&&a.exports===i&&o.process,u=function(){try{return a&&a.require&&a.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=u}).call(this,n(14)(e))},function(e,t,n){var r=n(23),o=n(123),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(56),o=n(57),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=s},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},function(e,t,n){var r=n(54)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(62);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(0),i=n(44),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(o(e))return!1;var n=r(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||s.test(e)||!a.test(e)||null!=t&&e in Object(t)}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(8),i=n(3);e.exports=function(e){return"symbol"==r(e)||i(e)&&"[object Symbol]"==o(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){(function(t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r="object"==(void 0===t?"undefined":n(t))&&t&&t.Object===Object&&t;e.exports=r}).call(this,n(11))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(50),o=n(30),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(51);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(4),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(119),o=n(21),i=n(0),a=n(12),s=n(53),u=n(22),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),l=!n&&o(e),f=!n&&!l&&a(e),p=!n&&!l&&!f&&u(e),d=n||l||f||p,h=d?r(e.length,String):[],v=h.length;for(var g in e)!t&&!c.call(e,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,v))||h.push(g);return h}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var o=n(e);return!!(t=null==t?9007199254740991:t)&&("number"==o||"symbol"!=o&&r.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(52),o=n(125),i=n(7);e.exports=function(e){return i(e)?r(e,!0):o(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(39),o=n(40),i=n(38),a=n(57),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=s},function(e,t,n){var r=n(60),o=n(38),i=n(6);e.exports=function(e){return r(e,i,o)}},function(e,t,n){var r=n(39),o=n(0);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},function(e,t,n){var r=n(4)(n(2),"Set");e.exports=r},function(e,t,n){var r=n(2).Uint8Array;e.exports=r},function(e,t,n){var r=n(5),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t,n){var r=n(148),o=n(6);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(156),o=n(3);e.exports=function e(t,n,i,a,s){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,a,e,s))}},function(e,t,n){var r=n(68),o=n(159),i=n(69);e.exports=function(e,t,n,a,s,u){var c=1&n,l=e.length,f=t.length;if(l!=f&&!(c&&f>l))return!1;var p=u.get(e);if(p&&u.get(t))return p==t;var d=-1,h=!0,v=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++d<l;){var g=e[d],y=t[d];if(a)var m=c?a(y,g,d,t,e,u):a(g,y,d,e,t,u);if(void 0!==m){if(m)continue;h=!1;break}if(v){if(!o(t,(function(e,t){if(!i(v,t)&&(g===e||s(g,e,n,a,u)))return v.push(t)}))){h=!1;break}}else if(g!==y&&!s(g,y,n,a,u)){h=!1;break}}return u.delete(e),u.delete(t),h}},function(e,t,n){var r=n(32),o=n(157),i=n(158);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(5);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},function(e,t,n){var r=n(73),o=n(27);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n<i;)e=e[o(t[n++])];return n&&n==i?e:void 0}},function(e,t,n){var r=n(0),o=n(43),i=n(166),a=n(169);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}},function(e,t,n){var r=n(73),o=n(21),i=n(0),a=n(53),s=n(34),u=n(27);e.exports=function(e,t,n){for(var c=-1,l=(t=r(t,e)).length,f=!1;++c<l;){var p=u(t[c]);if(!(f=null!=e&&n(e,p)))break;e=e[p]}return f||++c!=l?f:!!(l=null==e?0:e.length)&&s(l)&&a(p,l)&&(i(e)||o(e))}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(1),o=n(77);e.exports=function(e,t,n,r){return function(e,t,n,r){var i,a,s={},u=new o,c=function(e){var t=e.v!==i?e.v:e.w,r=s[t],o=n(e),c=a.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);c<r.distance&&(r.distance=c,r.predecessor=i,u.decrease(t,c))};for(e.nodes().forEach((function(e){var n=e===t?0:Number.POSITIVE_INFINITY;s[e]={distance:n},u.add(e,n)}));u.size()>0&&(i=u.removeMin(),(a=s[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(c);return s}(e,String(t),n||i,r||function(t){return e.outEdges(t)})};var i=r.constant(1)},function(e,t,n){var r=n(1);function o(){this._arr=[],this._keyIndices={}}e.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},o.prototype.has=function(e){return r.has(this._keyIndices,e)},o.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},o.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var o=this._arr,i=o.length;return n[e]=i,o.push({key:e,priority:t}),this._decrease(i),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},o.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},o.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,o=e;n<t.length&&(o=t[n].priority<t[o].priority?n:o,r<t.length&&(o=t[r].priority<t[o].priority?r:o),o!==e&&(this._swap(e,o),this._heapify(o)))},o.prototype._decrease=function(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t},o.prototype._swap=function(e,t){var n=this._arr,r=this._keyIndices,o=n[e],i=n[t];n[e]=i,n[t]=o,r[i.key]=e,r[o.key]=t}},function(e,t,n){var r=n(1);e.exports=function(e){var t=0,n=[],o={},i=[];return e.nodes().forEach((function(a){r.has(o,a)||function a(s){var u=o[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach((function(e){r.has(o,e)?o[e].onStack&&(u.lowlink=Math.min(u.lowlink,o[e].index)):(a(e),u.lowlink=Math.min(u.lowlink,o[e].lowlink))})),u.lowlink===u.index){var c,l=[];do{c=n.pop(),o[c].onStack=!1,l.push(c)}while(s!==c);i.push(l)}}(a)})),i}},function(e,t,n){var r=n(1);function o(e){var t={},n={},o=[];if(r.each(e.sinks(),(function a(s){if(r.has(n,s))throw new i;r.has(t,s)||(n[s]=!0,t[s]=!0,r.each(e.predecessors(s),a),delete n[s],o.push(s))})),r.size(t)!==e.nodeCount())throw new i;return o}function i(){}e.exports=o,o.CycleException=i,i.prototype=new Error},function(e,t,n){var r=n(1);e.exports=function(e,t,n){r.isArray(t)||(t=[t]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],a={};return r.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);!function e(t,n,o,i,a,s){r.has(i,n)||(i[n]=!0,o||s.push(n),r.each(a(n),(function(n){e(t,n,o,i,a,s)})),o&&s.push(n))}(e,t,"post"===n,a,o,i)})),i}},function(e,t,n){(function(t){var r=n(226),o=["delete","get","head","patch","post","put"];e.exports.load=function(e,n,i){var a,s,u=n.method?n.method.toLowerCase():"get";function c(e,n){e?i(e):("[object process]"===Object.prototype.toString.call(void 0!==t?t:0)&&"function"==typeof n.buffer&&n.buffer(!0),n.end((function(e,t){e?i(e):i(void 0,t)})))}if(void 0!==n.method?"string"!=typeof n.method?a=new TypeError("options.method must be a string"):-1===o.indexOf(n.method)&&(a=new TypeError("options.method must be one of the following: "+o.slice(0,o.length-1).join(", ")+" or "+o[o.length-1])):void 0!==n.prepareRequest&&"function"!=typeof n.prepareRequest&&(a=new TypeError("options.prepareRequest must be a function")),a)i(a);else if(s=r["delete"===u?"del":u](e),n.prepareRequest)try{n.prepareRequest(s,c)}catch(e){i(e)}else c(void 0,s)}}).call(this,n(13))},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return null!==e&&"object"===r(e)}},function(e,t,n){(function(r,o){var i,a,s,u;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
2
2
  /*! Native Promise Only
3
3
  v0.8.1 (c) Kyle Simpson
4
4
  MIT License: http://getify.mit-license.org
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "textbrowser",
3
- "version": "0.49.1",
3
+ "version": "0.50.0",
4
4
  "description": "Multilinear text browser",
5
5
  "type": "module",
6
6
  "main": "dist/index-es.min.js",
@@ -35,7 +35,7 @@
35
35
  "command-line-args": "^6.0.0",
36
36
  "dom-parser": "^1.1.5",
37
37
  "form-serialization": "^0.11.0",
38
- "indexeddbshim": "^15.2.0",
38
+ "indexeddbshim": "^12.0.0",
39
39
  "intl-dom": "^0.20.0",
40
40
  "intl-locale-textinfo-polyfill": "^2.1.1",
41
41
  "jamilih": "0.60.0",