@supersoniks/concorde 1.1.43 → 1.1.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/README.md +9 -7
  2. package/concorde-core.bundle.js +20 -20
  3. package/concorde-core.es.js +987 -804
  4. package/core/_types/types.d.ts +13 -8
  5. package/core/_types/types.js +1 -0
  6. package/core/components/functional/date/date.d.ts +2 -2
  7. package/core/components/functional/date/date.js +10 -10
  8. package/core/components/functional/example/example.d.ts +1 -1
  9. package/core/components/functional/fetch/fetch.d.ts +8 -6
  10. package/core/components/functional/list/list.d.ts +16 -8
  11. package/core/components/functional/list/list.js +29 -14
  12. package/core/components/functional/mix/mix.d.ts +5 -5
  13. package/core/components/functional/mix/mix.js +11 -8
  14. package/core/components/functional/queue/queue.d.ts +13 -4
  15. package/core/components/functional/queue/queue.js +33 -27
  16. package/core/components/functional/router/redirect.d.ts +2 -2
  17. package/core/components/functional/router/redirect.js +2 -6
  18. package/core/components/functional/router/router.d.ts +1 -1
  19. package/core/components/functional/router/router.js +22 -13
  20. package/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts +0 -1
  21. package/core/components/functional/sdui/SDUIDescriptorTransformer.js +35 -36
  22. package/core/components/functional/sdui/sdui-utils.js +11 -11
  23. package/core/components/functional/sdui/sdui.d.ts +11 -10
  24. package/core/components/functional/sdui/sdui.js +33 -34
  25. package/core/components/functional/sdui/types.d.ts +8 -8
  26. package/core/components/functional/states/states.d.ts +3 -3
  27. package/core/components/functional/states/states.js +9 -8
  28. package/core/components/functional/submit/submit.d.ts +1 -1
  29. package/core/components/functional/submit/submit.js +16 -16
  30. package/core/components/functional/subscriber/subscriber.d.ts +1 -1
  31. package/core/components/functional/value/value.d.ts +1 -1
  32. package/core/components/functional/value/value.js +3 -2
  33. package/core/components/ui/_css/size.d.ts +1 -1
  34. package/core/components/ui/button/button.d.ts +6 -4
  35. package/core/components/ui/button/button.js +34 -30
  36. package/core/components/ui/captcha/captcha.d.ts +2 -2
  37. package/core/components/ui/captcha/captcha.js +2 -2
  38. package/core/components/ui/card/card-header.js +5 -1
  39. package/core/components/ui/card/card.js +7 -5
  40. package/core/components/ui/form/checkbox/checkbox.d.ts +36 -12
  41. package/core/components/ui/form/fieldset/fieldset.d.ts +1 -1
  42. package/core/components/ui/form/form-layout/form-layout.d.ts +1 -1
  43. package/core/components/ui/form/input/input.d.ts +14 -9
  44. package/core/components/ui/form/input/input.js +2 -2
  45. package/core/components/ui/form/input/password-helper.d.ts +1 -1
  46. package/core/components/ui/form/input/password-helper.js +1 -1
  47. package/core/components/ui/form/input/same-value-helper.d.ts +1 -1
  48. package/core/components/ui/form/input/same-value-helper.js +2 -2
  49. package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +1 -1
  50. package/core/components/ui/form/input-autocomplete/input-autocomplete.js +1 -1
  51. package/core/components/ui/form/select/select.d.ts +5 -4
  52. package/core/components/ui/form/select/select.js +24 -12
  53. package/core/components/ui/form/textarea/textarea.d.ts +11 -9
  54. package/core/components/ui/form/textarea/textarea.js +1 -1
  55. package/core/components/ui/group/group.js +8 -2
  56. package/core/components/ui/icon/icons.js +15 -13
  57. package/core/components/ui/loader/loader.d.ts +1 -1
  58. package/core/components/ui/loader/loader.js +1 -1
  59. package/core/components/ui/menu/menu.js +15 -16
  60. package/core/components/ui/modal/modal.d.ts +1 -1
  61. package/core/components/ui/modal/modal.js +1 -1
  62. package/core/components/ui/pop/pop.d.ts +6 -5
  63. package/core/components/ui/pop/pop.js +76 -46
  64. package/core/components/ui/table/table-tbody.js +1 -1
  65. package/core/components/ui/theme/theme.js +15 -13
  66. package/core/components/ui/toast/message-subscriber.d.ts +12 -9
  67. package/core/components/ui/toast/message-subscriber.js +10 -8
  68. package/core/components/ui/toast/toast.d.ts +1 -1
  69. package/core/components/ui/toast/toast.js +7 -8
  70. package/core/components/ui/toast/types.d.ts +3 -2
  71. package/core/components/ui/tooltip/tooltip.js +4 -4
  72. package/core/components/ui/ui.d.ts +1 -1
  73. package/core/components/ui/ui.js +1 -1
  74. package/core/mixins/Fetcher.d.ts +15 -17
  75. package/core/mixins/Fetcher.js +19 -10
  76. package/core/mixins/FormCheckable.d.ts +8 -5
  77. package/core/mixins/FormCheckable.js +21 -19
  78. package/core/mixins/FormElement.d.ts +10 -7
  79. package/core/mixins/FormElement.js +24 -23
  80. package/core/mixins/FormInput.d.ts +16 -10
  81. package/core/mixins/FormInput.js +1 -1
  82. package/core/mixins/Subscriber.d.ts +8 -6
  83. package/core/mixins/Subscriber.js +24 -23
  84. package/core/mixins/TemplatesContainer.d.ts +2 -1
  85. package/core/mixins/TemplatesContainer.js +2 -2
  86. package/core/utils/Arrays.js +12 -9
  87. package/core/utils/DataBindObserver.d.ts +4 -4
  88. package/core/utils/DataBindObserver.js +26 -28
  89. package/core/utils/HTML.d.ts +1 -1
  90. package/core/utils/HTML.js +2 -2
  91. package/core/utils/LocationHandler.js +10 -10
  92. package/core/utils/Objects.js +10 -4
  93. package/core/utils/PublisherProxy.d.ts +21 -15
  94. package/core/utils/PublisherProxy.js +67 -63
  95. package/core/utils/api.d.ts +40 -32
  96. package/core/utils/api.js +127 -32
  97. package/mixins.d.ts +25 -19
  98. package/package.json +11 -6
  99. package/core/components/ui/taxonomy/taxonomy.d.ts +0 -44
  100. package/core/components/ui/taxonomy/taxonomy.js +0 -115
@@ -1,22 +1,3 @@
1
- var __defProp2 = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a2, b2) => {
9
- for (var prop in b2 || (b2 = {}))
10
- if (__hasOwnProp.call(b2, prop))
11
- __defNormalProp(a2, prop, b2[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b2)) {
14
- if (__propIsEnum.call(b2, prop))
15
- __defNormalProp(a2, prop, b2[prop]);
16
- }
17
- return a2;
18
- };
19
- var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
20
1
  var _a;
21
2
  class HTML$1 {
22
3
  static getLanguage() {
@@ -57,7 +38,7 @@ class HTML$1 {
57
38
  }
58
39
  static async loadJS(src) {
59
40
  const p2 = new Promise(async (resolve) => {
60
- let script = document.createElement("script");
41
+ const script = document.createElement("script");
61
42
  script.src = src;
62
43
  script.onload = () => resolve(true);
63
44
  script.onerror = () => resolve(true);
@@ -67,7 +48,7 @@ class HTML$1 {
67
48
  }
68
49
  static async loadCSS(src) {
69
50
  const p2 = new Promise(async (resolve) => {
70
- var cssnode = document.createElement("link");
51
+ const cssnode = document.createElement("link");
71
52
  cssnode.type = "text/css";
72
53
  cssnode.rel = "stylesheet";
73
54
  cssnode.href = src;
@@ -85,7 +66,7 @@ class Objects$1 {
85
66
  if (keys1.length !== keys2.length && useStrictComparaison) {
86
67
  return false;
87
68
  }
88
- for (let key of keys1) {
69
+ for (const key of keys1) {
89
70
  const val1 = object1[key];
90
71
  const val2 = object2[key];
91
72
  const areEqual = useStrictComparaison ? val1 !== val2 : val1 != val2;
@@ -119,8 +100,8 @@ class Objects$1 {
119
100
  return object === null || object === void 0;
120
101
  }
121
102
  static traverse(obj, pathArray, extendValues = false) {
122
- for (let key of pathArray) {
123
- let newObj = obj[key];
103
+ for (const key of pathArray) {
104
+ const newObj = obj[key];
124
105
  if (newObj === void 0) {
125
106
  return void 0;
126
107
  }
@@ -135,7 +116,7 @@ class Objects$1 {
135
116
  static getURLSearchArray(sourceObject, prefix = "") {
136
117
  let arr = [];
137
118
  for (let key in sourceObject) {
138
- let value = sourceObject[key];
119
+ const value = sourceObject[key];
139
120
  if (prefix)
140
121
  key = prefix + "[" + key + "]";
141
122
  if (Objects$1.isObject(value)) {
@@ -158,18 +139,42 @@ const _API = class {
158
139
  this.serviceURL = document.location.origin;
159
140
  this.userName = config.userName;
160
141
  this.password = config.password;
161
- this.token = config.token;
142
+ if (config.token)
143
+ this.token = config.token;
162
144
  this.tokenProvider = config.tokenProvider;
145
+ this.authToken = config.authToken;
163
146
  this.addHTTPResponse = config.addHTTPResponse || false;
164
147
  this.credentials = config.credentials;
165
148
  }
166
- async handleResult(fetchResult) {
149
+ set token(token) {
150
+ this._token = token;
151
+ if (!token) {
152
+ _API.tokens.delete(this.serviceURL);
153
+ return;
154
+ }
155
+ if (_API.invalidTokens.includes(token))
156
+ return;
157
+ _API.tokens.set(this.serviceURL, token);
158
+ }
159
+ get token() {
160
+ return _API.invalidTokens.includes(this._token) ? _API.tokens.get(this.serviceURL) : this._token;
161
+ }
162
+ handleInvalidToken(token) {
163
+ if (!token)
164
+ return;
165
+ if (_API.invalidTokens.includes(token))
166
+ return;
167
+ _API.invalidTokens.push(token);
168
+ this.token = null;
169
+ }
170
+ async handleResult(fetchResult, lastCall) {
167
171
  var _a2;
168
172
  this.lastResult = fetchResult;
169
173
  const contentType = (_a2 = fetchResult.headers.get("content-type")) == null ? void 0 : _a2.toLowerCase();
174
+ const httpCode = fetchResult.status;
170
175
  let result = {};
171
- if (contentType && contentType.indexOf("text/") == 0) {
172
- let str = await fetchResult.text();
176
+ if (!contentType || contentType.indexOf("text/") == 0) {
177
+ const str = await fetchResult.text();
173
178
  result = { text: str };
174
179
  } else {
175
180
  try {
@@ -181,6 +186,19 @@ const _API = class {
181
186
  if (this.addHTTPResponse && Objects$1.isObject(result)) {
182
187
  result._sonic_http_response_ = fetchResult;
183
188
  }
189
+ if (httpCode === 498 && !_API.failledTokenUpdates.has(this.serviceURL)) {
190
+ this.handleInvalidToken(this.token);
191
+ if (lastCall.apiMethod === "get") {
192
+ result = await this[lastCall.apiMethod](lastCall.path, lastCall.additionalHeaders);
193
+ } else {
194
+ result = await this[lastCall.apiMethod](
195
+ lastCall.path,
196
+ lastCall.data,
197
+ lastCall.method,
198
+ lastCall.additionalHeaders
199
+ );
200
+ }
201
+ }
184
202
  return result;
185
203
  }
186
204
  async auth() {
@@ -190,40 +208,63 @@ const _API = class {
190
208
  this.token = _API.tokens.get(this.serviceURL);
191
209
  return;
192
210
  }
193
- if (!this.userName || !this.password || !this.tokenProvider)
211
+ if (!this.tokenProvider)
194
212
  return;
195
- let headers = {
196
- Authorization: "Basic " + window.btoa(unescape(encodeURIComponent(this.userName + ":" + this.password)))
197
- };
198
- let result = await fetch(this.computeURL(this.tokenProvider), {
213
+ let headers = {};
214
+ if (this.userName && this.password) {
215
+ headers = {
216
+ Authorization: "Basic " + window.btoa(unescape(encodeURIComponent(this.userName + ":" + this.password)))
217
+ };
218
+ } else if (this.authToken) {
219
+ headers = {
220
+ Authorization: "Bearer " + this.authToken
221
+ };
222
+ }
223
+ const serviceURL = new URL(this.serviceURL);
224
+ const serviceHost = serviceURL.protocol + "//" + serviceURL.host;
225
+ const result = await fetch(this.computeURL(this.tokenProvider, { serviceHost }), {
199
226
  headers,
200
227
  credentials: this.credentials
201
228
  });
202
229
  try {
203
- let json = await result.json();
204
- this.token = json.token;
205
- _API.tokens.set(this.serviceURL, this.token);
230
+ const json = await result.json();
231
+ const newToken = json.token;
232
+ if (newToken) {
233
+ this.token = json.token;
234
+ } else {
235
+ _API.failledTokenUpdates.set(this.serviceURL, true);
236
+ }
206
237
  } catch (e2) {
238
+ _API.failledTokenUpdates.set(this.serviceURL, true);
207
239
  }
208
240
  }
209
241
  async get(path, additionalHeaders) {
210
- let headers = await this.createHeaders(additionalHeaders);
242
+ const lastCall = {
243
+ apiMethod: "get",
244
+ path,
245
+ additionalHeaders
246
+ };
247
+ const headers = await this.createHeaders(additionalHeaders);
211
248
  const url = this.computeURL(path);
212
- if (!_API.loadingGetPromises.has(url)) {
213
- let promise = new Promise(async (resolve) => {
214
- let result2 = await fetch(url, { headers, credentials: this.credentials });
215
- let handledResult = await this.handleResult(result2);
249
+ const mapKey = JSON.stringify({
250
+ url,
251
+ headers
252
+ });
253
+ if (!_API.loadingGetPromises.has(mapKey)) {
254
+ const promise = new Promise(async (resolve) => {
255
+ const result2 = await fetch(url, { headers, credentials: this.credentials });
256
+ const handledResult = await this.handleResult(result2, lastCall);
216
257
  resolve(handledResult);
217
258
  });
218
- _API.loadingGetPromises.set(url, promise);
259
+ _API.loadingGetPromises.set(mapKey, promise);
219
260
  }
220
- let result = await _API.loadingGetPromises.get(url);
221
- _API.loadingGetPromises.delete(url);
261
+ const result = await _API.loadingGetPromises.get(mapKey);
262
+ _API.loadingGetPromises.delete(mapKey);
222
263
  return result;
223
264
  }
224
265
  async createHeaders(additionalHeaders) {
225
266
  await this.auth();
226
- let headers = {};
267
+ const headers = {};
227
268
  if (this.token)
228
269
  headers.Authorization = "Bearer " + this.token;
229
270
  headers["Accept-Language"] = HTML$1.getLanguage();
@@ -232,35 +273,60 @@ const _API = class {
232
273
  }
233
274
  return headers;
234
275
  }
235
- computeURL(path) {
236
- return (this.serviceURL + "/" + path).replace(/([^(https?\:)])\/{2,}/g, "$1/");
276
+ computeURL(path, query = {}) {
277
+ let url = "";
278
+ if (path.startsWith("http"))
279
+ url = path;
280
+ else
281
+ url = this.serviceURL + "/" + path;
282
+ if (!url.startsWith("http"))
283
+ url = window.location.origin + url;
284
+ const computedUrl = new URL(url);
285
+ for (const key in query) {
286
+ computedUrl.searchParams.set(key, query[key]);
287
+ }
288
+ return computedUrl.toString().replace(/([^(https?:)])\/{2,}/g, "$1/");
237
289
  }
238
290
  async send(path, data, method = "POST", additionalHeaders) {
239
- let headers = await this.createHeaders(additionalHeaders);
291
+ const lastCall = {
292
+ apiMethod: "send",
293
+ path,
294
+ additionalHeaders,
295
+ method,
296
+ data
297
+ };
298
+ const headers = await this.createHeaders(additionalHeaders);
240
299
  headers["Accept"] = "application/json";
241
300
  headers["Content-Type"] = "application/json";
242
- let result = await fetch(this.computeURL(path), {
301
+ const result = await fetch(this.computeURL(path), {
243
302
  headers,
244
303
  credentials: this.credentials,
245
304
  method,
246
305
  body: JSON.stringify(data)
247
306
  });
248
- return await this.handleResult(result);
307
+ return await this.handleResult(result, lastCall);
249
308
  }
250
309
  async submitFormData(path, data, method = "POST", additionalHeaders) {
251
- let headers = await this.createHeaders(additionalHeaders);
310
+ const lastCall = {
311
+ apiMethod: "submitFormData",
312
+ path,
313
+ additionalHeaders,
314
+ method,
315
+ data
316
+ };
317
+ const headers = await this.createHeaders(additionalHeaders);
252
318
  headers["Accept"] = "application/json";
253
- let formData = new FormData();
319
+ const formData = new FormData();
254
320
  const dynamicData = data;
255
- for (let z2 in dynamicData)
321
+ for (const z2 in dynamicData)
256
322
  formData.set(z2, dynamicData[z2]);
257
- let result = await fetch(this.computeURL(path), {
323
+ const result = await fetch(this.computeURL(path), {
258
324
  headers,
259
325
  credentials: this.credentials,
260
326
  method,
261
327
  body: formData
262
328
  });
263
- return await this.handleResult(result);
329
+ return await this.handleResult(result, lastCall);
264
330
  }
265
331
  async put(path, data, additionalHeaders) {
266
332
  return this.send(path, data, "PUT", additionalHeaders);
@@ -275,6 +341,8 @@ const _API = class {
275
341
  let API = _API;
276
342
  API.loadingGetPromises = /* @__PURE__ */ new Map();
277
343
  API.tokens = /* @__PURE__ */ new Map();
344
+ API.invalidTokens = [];
345
+ API.failledTokenUpdates = /* @__PURE__ */ new Map();
278
346
  class Format$1 {
279
347
  static ucFirst(str) {
280
348
  if (typeof str != "string")
@@ -302,15 +370,15 @@ class PublisherProxy$1 {
302
370
  this._fillListeners_ = /* @__PURE__ */ new Set();
303
371
  this._templateFillListeners_ = /* @__PURE__ */ new Set();
304
372
  this._lockInternalMutationPublishing_ = false;
305
- this.root = this;
306
373
  this._value_ = target;
307
374
  this.parent = parentProxPub || null;
375
+ this.root = this;
308
376
  while (this.root.parent) {
309
377
  this.root = this.root.parent;
310
378
  }
311
379
  }
312
380
  delete() {
313
- for (let proxy of this._proxies_.values()) {
381
+ for (const proxy of this._proxies_.values()) {
314
382
  proxy.delete();
315
383
  }
316
384
  this._invalidateListeners_.clear();
@@ -347,7 +415,7 @@ class PublisherProxy$1 {
347
415
  }
348
416
  _publishTemplateFilling_(key, value) {
349
417
  this._templateFillListeners_.forEach((handler) => {
350
- let desc = Object.getOwnPropertyDescriptor(handler, key);
418
+ const desc = Object.getOwnPropertyDescriptor(handler, key);
351
419
  if (desc && !desc.set && !desc.writable)
352
420
  return;
353
421
  if (handler.propertyMap && handler.propertyMap[key]) {
@@ -393,13 +461,16 @@ class PublisherProxy$1 {
393
461
  }
394
462
  startTemplateFilling(handler) {
395
463
  this._templateFillListeners_.add(handler);
396
- for (var z2 in this._value_) {
464
+ if (typeof this._value_ != "object")
465
+ return;
466
+ for (const z2 in this._value_) {
467
+ let valueKey = z2;
397
468
  const value = this._value_[z2];
398
469
  if (handler.propertyMap && handler.propertyMap[z2]) {
399
- z2 = handler.propertyMap[z2];
470
+ valueKey = handler.propertyMap[z2];
400
471
  }
401
472
  if (typeof handler[z2] != "undefined" && handler[z2] !== value) {
402
- handler[z2] = value;
473
+ handler[valueKey] = value;
403
474
  }
404
475
  }
405
476
  }
@@ -408,7 +479,7 @@ class PublisherProxy$1 {
408
479
  }
409
480
  startDynamicFilling(handler) {
410
481
  this._fillListeners_.add(handler);
411
- for (var z2 in this._value_) {
482
+ for (const z2 in this._value_) {
412
483
  const value = this._value_[z2];
413
484
  if (handler[z2] !== value)
414
485
  handler[z2] = value;
@@ -421,17 +492,17 @@ class PublisherProxy$1 {
421
492
  var _a2;
422
493
  if (this._value_ === newValue)
423
494
  return true;
424
- if ("hasOwnProperty" in this._value_ && this._value_.hasOwnProperty("__value") && newValue.hasOwnProperty("__value") && this._value_.__value === newValue.__value) {
495
+ if (this._value_ && Object.prototype.hasOwnProperty.call(this._value_, "__value") && Object.prototype.hasOwnProperty.call(newValue, "__value") && this._value_.__value === newValue.__value) {
425
496
  return true;
426
497
  }
427
498
  const prevValue = this._value_;
428
499
  this._value_ = isComplex(newValue) ? newValue : { __value: newValue };
429
- const isPrimitiveValue = this._value_.hasOwnProperty("__value");
500
+ const isPrimitiveValue = Object.prototype.hasOwnProperty.call(this._value_, "__value");
430
501
  if (isPrimitiveValue) {
431
502
  this._publishAssignement_(lockInternalMutationsTransmission);
432
503
  return true;
433
504
  }
434
- for (let key in this._value_) {
505
+ for (const key in this._value_) {
435
506
  if (typeof this._value_[key] === "undefined")
436
507
  delete this._value_[key];
437
508
  }
@@ -450,12 +521,12 @@ class PublisherProxy$1 {
450
521
  });
451
522
  this._publishAssignement_();
452
523
  if (isComplex(this._value_)) {
453
- for (let key in this._value_) {
454
- let v2 = newValue[key];
455
- let isVComplex = isComplex(v2);
456
- let valueV = isVComplex ? v2 : { __value: v2 };
524
+ for (const key in this._value_) {
525
+ const v2 = newValue[key];
526
+ const isVComplex = isComplex(v2);
527
+ const valueV = isVComplex ? v2 : { __value: v2 };
457
528
  if (!this._proxies_.has(key)) {
458
- let newPublisher = new Publisher({}, this);
529
+ const newPublisher = new Publisher({}, this);
459
530
  this._proxies_.set(key, newPublisher);
460
531
  newPublisher._proxies_.set("_parent_", this);
461
532
  }
@@ -466,8 +537,8 @@ class PublisherProxy$1 {
466
537
  return true;
467
538
  }
468
539
  get() {
469
- if (this._value_.hasOwnProperty("__value")) {
470
- let v2 = this._value_.__value;
540
+ if (Object.prototype.hasOwnProperty.call(this._value_, "__value")) {
541
+ const v2 = this._value_.__value;
471
542
  return v2 != void 0 ? v2 : null;
472
543
  }
473
544
  return this._value_;
@@ -511,9 +582,8 @@ PublisherManager$1.instance = null;
511
582
  class Publisher extends PublisherProxy$1 {
512
583
  constructor(target, parentProxPub = null) {
513
584
  super(target, parentProxPub);
514
- let that = this;
515
- let thisProxy = new Proxy(this, {
516
- get: function(oTarget, sKey) {
585
+ const thisProxy = new Proxy(this, {
586
+ get: function(publisherInstance, sKey) {
517
587
  if ([
518
588
  "invalidate",
519
589
  "onInvalidate",
@@ -545,58 +615,58 @@ class Publisher extends PublisherProxy$1 {
545
615
  "_value_",
546
616
  "_lockInternalMutationPublishing_"
547
617
  ].includes(sKey))
548
- return that[sKey];
549
- if (!that._proxies_.has(sKey)) {
550
- let vValue = that._value_[sKey];
551
- let newPublisher = new Publisher(isComplex(vValue) ? vValue : { __value: vValue }, that);
618
+ return publisherInstance[sKey];
619
+ if (!publisherInstance._proxies_.has(sKey)) {
620
+ const vValue = publisherInstance._value_[sKey];
621
+ const newPublisher = new Publisher(isComplex(vValue) ? vValue : { __value: vValue }, publisherInstance);
552
622
  newPublisher._proxies_.set("_parent_", thisProxy);
553
- that._proxies_.set(sKey, newPublisher);
623
+ publisherInstance._proxies_.set(sKey, newPublisher);
554
624
  }
555
- return that._proxies_.get(sKey);
625
+ return publisherInstance._proxies_.get(sKey);
556
626
  },
557
- set: function(oTarget, sKey, vValue) {
627
+ set: function(publisherInstance, sKey, vValue) {
558
628
  var _a2;
559
629
  if (sKey == "_value_") {
560
- oTarget._value_ = vValue;
561
- return oTarget._value_;
630
+ publisherInstance._value_ = vValue;
631
+ return true;
562
632
  }
563
- if (!that._proxies_.has(sKey)) {
564
- let newPublisher = new Publisher({}, that);
633
+ if (!publisherInstance._proxies_.has(sKey)) {
634
+ const newPublisher = new Publisher({}, publisherInstance);
565
635
  newPublisher._proxies_.set("_parent_", thisProxy);
566
- that._proxies_.set(sKey, newPublisher);
636
+ publisherInstance._proxies_.set(sKey, newPublisher);
567
637
  }
568
- const prevValue = that._value_[sKey];
638
+ const prevValue = publisherInstance._value_[sKey];
569
639
  if (prevValue !== vValue) {
570
- that._value_[sKey] = vValue;
571
- that._publishDynamicFilling_(sKey, vValue);
572
- (_a2 = that._proxies_.get(sKey)) == null ? void 0 : _a2.set(isComplex(vValue) ? vValue : { __value: vValue });
640
+ publisherInstance._value_[sKey] = vValue;
641
+ publisherInstance._publishDynamicFilling_(sKey, vValue);
642
+ (_a2 = publisherInstance._proxies_.get(sKey)) == null ? void 0 : _a2.set(isComplex(vValue) ? vValue : { __value: vValue });
573
643
  }
574
- return that._proxies_.get(sKey);
644
+ return true;
575
645
  },
576
- deleteProperty: function(oTarget, sKey) {
577
- that._publishDynamicFilling_(sKey, null);
578
- that._proxies_.delete(sKey);
579
- return delete that._value_[sKey];
646
+ deleteProperty: function(publisherInstance, sKey) {
647
+ publisherInstance._publishDynamicFilling_(sKey, null);
648
+ publisherInstance._proxies_.delete(sKey);
649
+ return delete publisherInstance._value_[sKey];
580
650
  },
581
- has: function(oTarget, sKey) {
582
- return sKey in that._value_ && sKey != "_lockInternalMutationPublishing_";
651
+ has: function(publisherInstance, sKey) {
652
+ return sKey in publisherInstance._value_ && sKey != "_lockInternalMutationPublishing_";
583
653
  },
584
- defineProperty: function(oTarget, sKey, oDesc) {
654
+ defineProperty: function(publisherInstance, sKey, oDesc) {
585
655
  if (oDesc && "value" in oDesc) {
586
- that._value_[sKey] = oDesc.value;
656
+ publisherInstance._value_[sKey] = oDesc.value;
587
657
  }
588
- return that._value_;
658
+ return true;
589
659
  },
590
- getOwnPropertyDescriptor: function(oTarget, sKey) {
660
+ getOwnPropertyDescriptor: function(publisherInstance, sKey) {
591
661
  return {
592
662
  enumerable: true,
593
663
  configurable: true
594
664
  };
595
665
  },
596
- ownKeys: function(target2) {
597
- if (that._value_.__value)
598
- return Object.keys(that._value_.__value);
599
- return Object.keys(that._value_);
666
+ ownKeys: function(publisherInstance) {
667
+ if (publisherInstance._value_.__value)
668
+ return Object.keys(publisherInstance._value_.__value);
669
+ return Object.keys(publisherInstance._value_);
600
670
  }
601
671
  });
602
672
  return thisProxy;
@@ -612,7 +682,9 @@ const _DataBindObserver = class {
612
682
  if (!this.enabled)
613
683
  return;
614
684
  this.enabled = false;
615
- Array.from(_DataBindObserver.observedElements.keys()).forEach((k2) => _DataBindObserver.unObserve(k2));
685
+ Array.from(_DataBindObserver.observedElements.keys()).forEach(
686
+ (k2) => _DataBindObserver.unObserve(k2)
687
+ );
616
688
  }
617
689
  static observe(element) {
618
690
  if (!element)
@@ -621,8 +693,8 @@ const _DataBindObserver = class {
621
693
  return;
622
694
  if (_DataBindObserver.observedElements.has(element))
623
695
  return;
624
- let obs = new MutationObserver(_DataBindObserver.onMutation);
625
- let opt = {};
696
+ const obs = new MutationObserver(_DataBindObserver.onMutation);
697
+ const opt = {};
626
698
  opt.childList = true;
627
699
  opt.subtree = true;
628
700
  opt.attributes = true;
@@ -634,7 +706,7 @@ const _DataBindObserver = class {
634
706
  static unObserve(element) {
635
707
  if (!element)
636
708
  return;
637
- let observer = this.observedElements.get(element);
709
+ const observer = this.observedElements.get(element);
638
710
  if (!observer)
639
711
  return;
640
712
  observer.disconnect();
@@ -657,18 +729,16 @@ const _DataBindObserver = class {
657
729
  elt.childNodes.forEach((elt2) => _DataBindObserver.onRemoved(elt2));
658
730
  }
659
731
  static onMutation(list) {
660
- for (let l2 of list) {
732
+ for (const l2 of list) {
661
733
  switch (l2.type) {
662
734
  case "attributes":
663
735
  _DataBindObserver.addPublisherListeners(l2.target);
664
736
  break;
665
737
  case "childList":
666
- var added = l2.addedNodes;
667
- var removed = l2.removedNodes;
668
- added.forEach((elt) => {
738
+ l2.addedNodes.forEach((elt) => {
669
739
  _DataBindObserver.onAdded(elt);
670
740
  });
671
- removed.forEach((elt) => {
741
+ l2.removedNodes.forEach((elt) => {
672
742
  _DataBindObserver.onRemoved(elt);
673
743
  });
674
744
  break;
@@ -676,7 +746,7 @@ const _DataBindObserver = class {
676
746
  }
677
747
  }
678
748
  static removePublisherListeners(target) {
679
- let conf = _DataBindObserver.publisherListeners.get(target);
749
+ const conf = _DataBindObserver.publisherListeners.get(target);
680
750
  if (!conf)
681
751
  return;
682
752
  _DataBindObserver.publisherListeners.delete(target);
@@ -701,9 +771,9 @@ const _DataBindObserver = class {
701
771
  if (!("attributes" in element))
702
772
  return [];
703
773
  return Array.from(element.attributes).filter((attribute) => attribute.name.indexOf("::") == 0).map((e2) => {
704
- let name = e2.name.substring(2);
774
+ const name = e2.name.substring(2);
705
775
  return {
706
- propertyToUpdate: name.replace(/\-((html)|\w)/g, (match) => match.substring(1).toUpperCase()),
776
+ propertyToUpdate: name.replace(/-((html)|\w)/g, (match) => match.substring(1).toUpperCase()),
707
777
  bindedVariablesDescriptor: _DataBindObserver.getVariablesDescriptor(e2.value)
708
778
  };
709
779
  });
@@ -711,7 +781,7 @@ const _DataBindObserver = class {
711
781
  static getSubPublisher(pub, pathArray) {
712
782
  if (!pathArray)
713
783
  return pub;
714
- for (let key of pathArray) {
784
+ for (const key of pathArray) {
715
785
  if (key == "_self_")
716
786
  continue;
717
787
  if (!pub)
@@ -722,24 +792,27 @@ const _DataBindObserver = class {
722
792
  }
723
793
  static addPublisherListeners(target) {
724
794
  _DataBindObserver.removePublisherListeners(target);
725
- let dataProviderId = HTML$1.getAncestorAttributeValue(target.parentNode || target.host || target, "dataProvider");
795
+ const dataProviderId = HTML$1.getAncestorAttributeValue(
796
+ target.parentNode || target.host || target,
797
+ "dataProvider"
798
+ );
726
799
  if (!dataProviderId)
727
800
  return;
728
- let publisher = PublisherManager$1.getInstance().get(dataProviderId);
729
- let dataBindItems = _DataBindObserver.getDataBindItems(target);
730
- let conf = [];
801
+ const publisher = PublisherManager$1.getInstance().get(dataProviderId);
802
+ const dataBindItems = _DataBindObserver.getDataBindItems(target);
803
+ const conf = [];
731
804
  dataBindItems.forEach((dataBindItem) => {
732
- let bindedVariablesDescriptor = dataBindItem.bindedVariablesDescriptor;
733
- let propertyToUpdate = dataBindItem.propertyToUpdate;
734
- for (let value of bindedVariablesDescriptor.variables) {
735
- let publisherPathArray = value;
805
+ const bindedVariablesDescriptor = dataBindItem.bindedVariablesDescriptor;
806
+ const propertyToUpdate = dataBindItem.propertyToUpdate;
807
+ for (const value of bindedVariablesDescriptor.variables) {
808
+ const publisherPathArray = value;
736
809
  let pub = publisher;
737
810
  pub = _DataBindObserver.getSubPublisher(publisher, publisherPathArray);
738
- let rec = target;
739
- let currentConf = {
811
+ const rec = target;
812
+ const currentConf = {
740
813
  publisher: pub,
741
814
  onAssign: () => {
742
- let values = bindedVariablesDescriptor.variables.map((dataPath) => {
815
+ const values = bindedVariablesDescriptor.variables.map((dataPath) => {
743
816
  var _a2;
744
817
  return (_a2 = _DataBindObserver.getSubPublisher(publisher, dataPath)) == null ? void 0 : _a2.get();
745
818
  });
@@ -755,7 +828,7 @@ const _DataBindObserver = class {
755
828
  }
756
829
  for (let i2 = 0; i2 < values.length; i2++) {
757
830
  let value2 = values[i2];
758
- let variable = bindedVariablesDescriptor.variables[i2];
831
+ const variable = bindedVariablesDescriptor.variables[i2];
759
832
  if (value2 === null) {
760
833
  hasUndeterminatedValue = true;
761
834
  value2 = void 0;
@@ -763,13 +836,13 @@ const _DataBindObserver = class {
763
836
  expression = expression.replace("$" + variable.join("."), value2);
764
837
  }
765
838
  if (expression.indexOf("|") != -1) {
766
- let funcDelimiterIdx = expression.indexOf("|");
839
+ const funcDelimiterIdx = expression.indexOf("|");
767
840
  if (funcDelimiterIdx == 0) {
768
841
  expression = Format$1.js(expression.substring(1));
769
842
  } else {
770
- let funcName = expression.substring(0, funcDelimiterIdx);
771
- let funcArgs = expression.substring(funcDelimiterIdx + 1);
772
- let fmtFunc = Format$1[funcName];
843
+ const funcName = expression.substring(0, funcDelimiterIdx);
844
+ const funcArgs = expression.substring(funcDelimiterIdx + 1);
845
+ const fmtFunc = Format$1[funcName];
773
846
  expression = hasUndeterminatedValue ? "" : fmtFunc ? fmtFunc(funcArgs) : expression;
774
847
  }
775
848
  } else {
@@ -797,7 +870,7 @@ if (!window.SonicDataBindObserver)
797
870
  * Copyright 2017 Google LLC
798
871
  * SPDX-License-Identifier: BSD-3-Clause
799
872
  */
800
- const e$8 = (e2) => (n2) => typeof n2 == "function" ? ((e3, n3) => (customElements.define(e3, n3), n3))(e2, n2) : ((e3, n3) => {
873
+ const e$8 = (e2) => (n2) => "function" == typeof n2 ? ((e3, n3) => (customElements.define(e3, n3), n3))(e2, n2) : ((e3, n3) => {
801
874
  const { kind: t2, elements: s2 } = n3;
802
875
  return { kind: t2, elements: s2, finisher(n4) {
803
876
  customElements.define(e3, n4);
@@ -808,15 +881,15 @@ const e$8 = (e2) => (n2) => typeof n2 == "function" ? ((e3, n3) => (customElemen
808
881
  * Copyright 2017 Google LLC
809
882
  * SPDX-License-Identifier: BSD-3-Clause
810
883
  */
811
- const i$6 = (i2, e2) => e2.kind === "method" && e2.descriptor && !("value" in e2.descriptor) ? __spreadProps(__spreadValues({}, e2), { finisher(n2) {
884
+ const i$6 = (i2, e2) => "method" === e2.kind && e2.descriptor && !("value" in e2.descriptor) ? { ...e2, finisher(n2) {
812
885
  n2.createProperty(e2.key, i2);
813
- } }) : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: e2.key, initializer() {
814
- typeof e2.initializer == "function" && (this[e2.key] = e2.initializer.call(this));
886
+ } } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: e2.key, initializer() {
887
+ "function" == typeof e2.initializer && (this[e2.key] = e2.initializer.call(this));
815
888
  }, finisher(n2) {
816
889
  n2.createProperty(e2.key, i2);
817
890
  } };
818
891
  function e$7(e2) {
819
- return (n2, t2) => t2 !== void 0 ? ((i2, e3, n3) => {
892
+ return (n2, t2) => void 0 !== t2 ? ((i2, e3, n3) => {
820
893
  e3.constructor.createProperty(n3, i2);
821
894
  })(e2, n2, t2) : i$6(e2, n2);
822
895
  }
@@ -826,7 +899,7 @@ function e$7(e2) {
826
899
  * SPDX-License-Identifier: BSD-3-Clause
827
900
  */
828
901
  function t$3(t2) {
829
- return e$7(__spreadProps(__spreadValues({}, t2), { state: true }));
902
+ return e$7({ ...t2, state: true });
830
903
  }
831
904
  /**
832
905
  * @license
@@ -835,15 +908,15 @@ function t$3(t2) {
835
908
  */
836
909
  const o$9 = ({ finisher: e2, descriptor: t2 }) => (o2, n2) => {
837
910
  var r2;
838
- if (n2 === void 0) {
839
- const n3 = (r2 = o2.originalKey) !== null && r2 !== void 0 ? r2 : o2.key, i2 = t2 != null ? { kind: "method", placement: "prototype", key: n3, descriptor: t2(o2.key) } : __spreadProps(__spreadValues({}, o2), { key: n3 });
840
- return e2 != null && (i2.finisher = function(t3) {
911
+ if (void 0 === n2) {
912
+ const n3 = null !== (r2 = o2.originalKey) && void 0 !== r2 ? r2 : o2.key, i2 = null != t2 ? { kind: "method", placement: "prototype", key: n3, descriptor: t2(o2.key) } : { ...o2, key: n3 };
913
+ return null != e2 && (i2.finisher = function(t3) {
841
914
  e2(t3, n3);
842
915
  }), i2;
843
916
  }
844
917
  {
845
918
  const r3 = o2.constructor;
846
- t2 !== void 0 && Object.defineProperty(o2, n2, t2(n2)), e2 == null || e2(r3, n2);
919
+ void 0 !== t2 && Object.defineProperty(o2, n2, t2(n2)), null == e2 || e2(r3, n2);
847
920
  }
848
921
  };
849
922
  /**
@@ -855,13 +928,13 @@ function i$5(i2, n2) {
855
928
  return o$9({ descriptor: (o2) => {
856
929
  const t2 = { get() {
857
930
  var o3, n3;
858
- return (n3 = (o3 = this.renderRoot) === null || o3 === void 0 ? void 0 : o3.querySelector(i2)) !== null && n3 !== void 0 ? n3 : null;
931
+ return null !== (n3 = null === (o3 = this.renderRoot) || void 0 === o3 ? void 0 : o3.querySelector(i2)) && void 0 !== n3 ? n3 : null;
859
932
  }, enumerable: true, configurable: true };
860
933
  if (n2) {
861
- const n3 = typeof o2 == "symbol" ? Symbol() : "__" + o2;
934
+ const n3 = "symbol" == typeof o2 ? Symbol() : "__" + o2;
862
935
  t2.get = function() {
863
936
  var o3, t3;
864
- return this[n3] === void 0 && (this[n3] = (t3 = (o3 = this.renderRoot) === null || o3 === void 0 ? void 0 : o3.querySelector(i2)) !== null && t3 !== void 0 ? t3 : null), this[n3];
937
+ return void 0 === this[n3] && (this[n3] = null !== (t3 = null === (o3 = this.renderRoot) || void 0 === o3 ? void 0 : o3.querySelector(i2)) && void 0 !== t3 ? t3 : null), this[n3];
865
938
  };
866
939
  }
867
940
  return t2;
@@ -873,12 +946,12 @@ function i$5(i2, n2) {
873
946
  * SPDX-License-Identifier: BSD-3-Clause
874
947
  */
875
948
  var n$6;
876
- const e$6 = ((n$6 = window.HTMLSlotElement) === null || n$6 === void 0 ? void 0 : n$6.prototype.assignedElements) != null ? (o2, n2) => o2.assignedElements(n2) : (o2, n2) => o2.assignedNodes(n2).filter((o3) => o3.nodeType === Node.ELEMENT_NODE);
949
+ const e$6 = null != (null === (n$6 = window.HTMLSlotElement) || void 0 === n$6 ? void 0 : n$6.prototype.assignedElements) ? (o2, n2) => o2.assignedElements(n2) : (o2, n2) => o2.assignedNodes(n2).filter((o3) => o3.nodeType === Node.ELEMENT_NODE);
877
950
  function l$6(n2) {
878
- const { slot: l2, selector: t2 } = n2 != null ? n2 : {};
951
+ const { slot: l2, selector: t2 } = null != n2 ? n2 : {};
879
952
  return o$9({ descriptor: (o2) => ({ get() {
880
953
  var o3;
881
- const r2 = "slot" + (l2 ? `[name=${l2}]` : ":not([name])"), i2 = (o3 = this.renderRoot) === null || o3 === void 0 ? void 0 : o3.querySelector(r2), s2 = i2 != null ? e$6(i2, n2) : [];
954
+ const r2 = "slot" + (l2 ? `[name=${l2}]` : ":not([name])"), i2 = null === (o3 = this.renderRoot) || void 0 === o3 ? void 0 : o3.querySelector(r2), s2 = null != i2 ? e$6(i2, n2) : [];
882
955
  return t2 ? s2.filter((o4) => o4.matches(t2)) : s2;
883
956
  }, enumerable: true, configurable: true }) });
884
957
  }
@@ -889,10 +962,10 @@ function l$6(n2) {
889
962
  */
890
963
  function o$8(o2, n2, r2) {
891
964
  let l2, s2 = o2;
892
- return typeof o2 == "object" ? (s2 = o2.slot, l2 = o2) : l2 = { flatten: n2 }, r2 ? l$6({ slot: s2, flatten: n2, selector: r2 }) : o$9({ descriptor: (e2) => ({ get() {
965
+ return "object" == typeof o2 ? (s2 = o2.slot, l2 = o2) : l2 = { flatten: n2 }, r2 ? l$6({ slot: s2, flatten: n2, selector: r2 }) : o$9({ descriptor: (e2) => ({ get() {
893
966
  var e3, t2;
894
- const o3 = "slot" + (s2 ? `[name=${s2}]` : ":not([name])"), n3 = (e3 = this.renderRoot) === null || e3 === void 0 ? void 0 : e3.querySelector(o3);
895
- return (t2 = n3 == null ? void 0 : n3.assignedNodes(l2)) !== null && t2 !== void 0 ? t2 : [];
967
+ const o3 = "slot" + (s2 ? `[name=${s2}]` : ":not([name])"), n3 = null === (e3 = this.renderRoot) || void 0 === e3 ? void 0 : e3.querySelector(o3);
968
+ return null !== (t2 = null == n3 ? void 0 : n3.assignedNodes(l2)) && void 0 !== t2 ? t2 : [];
896
969
  }, enumerable: true, configurable: true }) });
897
970
  }
898
971
  var __defProp$18 = Object.defineProperty;
@@ -953,8 +1026,9 @@ const Subscriber$1 = (superClass, type) => {
953
1026
  }
954
1027
  updated(_changedProperties) {
955
1028
  super.updated(_changedProperties);
956
- let ref = this.shadowRoot || this;
957
- let display = this.displayContents ? "contents" : ref.children.length == 0 ? "none" : null;
1029
+ const ref = this.shadowRoot || this;
1030
+ const children = [...ref.children].filter((child) => child.tagName != "STYLE");
1031
+ const display = this.displayContents ? "contents" : children.length == 0 ? "none" : null;
958
1032
  if (display)
959
1033
  this.style.display = display;
960
1034
  else
@@ -962,12 +1036,12 @@ const Subscriber$1 = (superClass, type) => {
962
1036
  }
963
1037
  connectedCallback() {
964
1038
  if (this.hasAttribute("lazyRendering")) {
965
- let options = {
1039
+ const options = {
966
1040
  root: null,
967
1041
  rootMargin: Math.max(window.innerWidth * 0.1, window.innerHeight * 0.1) + "px"
968
1042
  };
969
1043
  let firstView = true;
970
- let iObserver = new IntersectionObserver((entries) => {
1044
+ const iObserver = new IntersectionObserver((entries) => {
971
1045
  for (const e2 of entries) {
972
1046
  if (firstView && e2.isIntersecting) {
973
1047
  firstView = false;
@@ -1003,7 +1077,7 @@ const Subscriber$1 = (superClass, type) => {
1003
1077
  if (this.hasAttribute("debug") && !this.defferedDebug) {
1004
1078
  if (!this.debug) {
1005
1079
  this.debug = document.createElement("div");
1006
- let style = this.debug.style;
1080
+ const style = this.debug.style;
1007
1081
  style.position = "fixed";
1008
1082
  style.top = "0";
1009
1083
  style.right = "0";
@@ -1045,7 +1119,11 @@ const Subscriber$1 = (superClass, type) => {
1045
1119
  });
1046
1120
  (_a2 = this.publisher) == null ? void 0 : _a2.onInternalMutation(() => {
1047
1121
  var _a3;
1048
- this.debug.innerHTML = `\u{1F916} DataProvider : "<b style="font-weight:700;color:#fff">${this.dataProvider}</b>"<br><div style="font-size:10px;border-top:1px dashed;margin-top:5px;padding-left:23px;opacity:.6;padding-top:5px">Variable disponible dans la console<br>ctrl + Clique : \xE9pingler / d\xE9s\xE9pingler</div><pre style="margin-top:10px;background:0 0;padding:0;font-size:inherit;color:inherit">${JSON.stringify((_a3 = this.publisher) == null ? void 0 : _a3.get(), null, " ")}</pre>`;
1122
+ this.debug.innerHTML = `\u{1F916} DataProvider : "<b style="font-weight:700;color:#fff">${this.dataProvider}</b>"<br><div style="font-size:10px;border-top:1px dashed;margin-top:5px;padding-left:23px;opacity:.6;padding-top:5px">Variable disponible dans la console<br>ctrl + Clique : \xE9pingler / d\xE9s\xE9pingler</div><pre style="margin-top:10px;background:0 0;padding:0;font-size:inherit;color:inherit">${JSON.stringify(
1123
+ (_a3 = this.publisher) == null ? void 0 : _a3.get(),
1124
+ null,
1125
+ " "
1126
+ )}</pre>`;
1049
1127
  });
1050
1128
  }
1051
1129
  }
@@ -1058,23 +1136,23 @@ const Subscriber$1 = (superClass, type) => {
1058
1136
  }
1059
1137
  getApiConfiguration() {
1060
1138
  const token = this.getAncestorAttributeValue("token");
1061
- let addHTTPResponse = this.getAncestorAttributeValue("addHTTPResponse") != null;
1062
- let serviceURL = this.getAncestorAttributeValue("serviceURL");
1139
+ const addHTTPResponse = this.getAncestorAttributeValue("addHTTPResponse") != null;
1140
+ const serviceURL = this.getAncestorAttributeValue("serviceURL");
1063
1141
  let userName = null;
1064
1142
  let password2 = null;
1065
- let tokenProvider = null;
1143
+ const tokenProvider = this.getAncestorAttributeValue("tokenProvider");
1144
+ const authToken = this.getAncestorAttributeValue("eventsApiToken");
1066
1145
  if (!token) {
1067
1146
  userName = this.getAncestorAttributeValue("userName");
1068
1147
  password2 = this.getAncestorAttributeValue("password");
1069
- tokenProvider = this.getAncestorAttributeValue("tokenProvider");
1070
1148
  }
1071
- let credentials = this.getAncestorAttributeValue("credentials") || void 0;
1072
- return { serviceURL, token, userName, password: password2, tokenProvider, addHTTPResponse, credentials };
1149
+ const credentials = this.getAncestorAttributeValue("credentials") || void 0;
1150
+ return { serviceURL, token, userName, password: password2, authToken, tokenProvider, addHTTPResponse, credentials };
1073
1151
  }
1074
1152
  async initWording() {
1075
1153
  let hasWording = false;
1076
1154
  const propNames = Object.getOwnPropertyNames(this.constructor.prototype);
1077
- for (let p2 of propNames) {
1155
+ for (const p2 of propNames) {
1078
1156
  if (p2.indexOf("wording_") == 0) {
1079
1157
  hasWording = true;
1080
1158
  break;
@@ -1082,14 +1160,14 @@ const Subscriber$1 = (superClass, type) => {
1082
1160
  }
1083
1161
  if (!hasWording)
1084
1162
  return;
1085
- let publisher = PublisherManager$1.getInstance().get("sonic-wording");
1086
- let wordingProvider = this.getAncestorAttributeValue("wordingProvider");
1163
+ const publisher = PublisherManager$1.getInstance().get("sonic-wording");
1164
+ const wordingProvider = this.getAncestorAttributeValue("wordingProvider");
1087
1165
  const api2 = new API(this.getApiConfiguration());
1088
1166
  if (wordingProvider) {
1089
- let wordings = [];
1090
- for (let p2 of propNames) {
1167
+ const wordings = [];
1168
+ for (const p2 of propNames) {
1091
1169
  if (p2.indexOf("wording_") == 0) {
1092
- let p8 = p2.substring(8);
1170
+ const p8 = p2.substring(8);
1093
1171
  if (!publisher.get()[p2]) {
1094
1172
  publisher[p2] = "...";
1095
1173
  wordings.push(p8);
@@ -1097,8 +1175,8 @@ const Subscriber$1 = (superClass, type) => {
1097
1175
  }
1098
1176
  }
1099
1177
  if (wordings.length > 0) {
1100
- let result = await api2.post(wordingProvider, { labels: wordings });
1101
- for (let elt in result) {
1178
+ const result = await api2.post(wordingProvider, { labels: wordings });
1179
+ for (const elt in result) {
1102
1180
  publisher["wording_" + elt] = result[elt];
1103
1181
  }
1104
1182
  }
@@ -1110,7 +1188,7 @@ const Subscriber$1 = (superClass, type) => {
1110
1188
  if (this.noShadowDom === "" || this.getAttribute("noShadowDom") === "") {
1111
1189
  return this;
1112
1190
  }
1113
- let shadowRoot = super.createRenderRoot();
1191
+ const shadowRoot = super.createRenderRoot();
1114
1192
  DataBindObserver$1.observe(shadowRoot);
1115
1193
  return shadowRoot;
1116
1194
  }
@@ -1137,7 +1215,7 @@ const Subscriber$1 = (superClass, type) => {
1137
1215
  let pub = mng.get(publisherId);
1138
1216
  this.dataProvider = publisherId;
1139
1217
  if (this.hasAttribute("subDataProvider")) {
1140
- let dataPath = this.getAttribute("subDataProvider");
1218
+ const dataPath = this.getAttribute("subDataProvider");
1141
1219
  this.dataProvider = publisherId + "/" + dataPath;
1142
1220
  pub = Objects$1.traverse(pub, dataPath.split("."));
1143
1221
  mng.set(this.dataProvider, pub);
@@ -1209,8 +1287,8 @@ const TemplatesContainer$1 = (superClass) => {
1209
1287
  this.templatePartsList = [];
1210
1288
  }
1211
1289
  connectedCallback() {
1212
- let templates = this.templates || [...this.querySelectorAll("template")];
1213
- for (let t2 of templates) {
1290
+ const templates = this.templates || [...this.querySelectorAll("template")];
1291
+ for (const t2 of templates) {
1214
1292
  if (t2.hasAttribute(this.templateValueAttribute)) {
1215
1293
  this.templateParts[t2.getAttribute(this.templateValueAttribute)] = t2;
1216
1294
  this.templatePartsList.push(t2);
@@ -1232,7 +1310,7 @@ const TemplatesContainer$1 = (superClass) => {
1232
1310
  * Copyright 2019 Google LLC
1233
1311
  * SPDX-License-Identifier: BSD-3-Clause
1234
1312
  */
1235
- const t$2 = window, e$5 = t$2.ShadowRoot && (t$2.ShadyCSS === void 0 || t$2.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$6 = Symbol(), n$5 = /* @__PURE__ */ new WeakMap();
1313
+ const t$2 = window, e$5 = t$2.ShadowRoot && (void 0 === t$2.ShadyCSS || t$2.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$6 = Symbol(), n$5 = /* @__PURE__ */ new WeakMap();
1236
1314
  class o$7 {
1237
1315
  constructor(t2, e2, n2) {
1238
1316
  if (this._$cssResult$ = true, n2 !== s$6)
@@ -1242,9 +1320,9 @@ class o$7 {
1242
1320
  get styleSheet() {
1243
1321
  let t2 = this.o;
1244
1322
  const s2 = this.t;
1245
- if (e$5 && t2 === void 0) {
1246
- const e2 = s2 !== void 0 && s2.length === 1;
1247
- e2 && (t2 = n$5.get(s2)), t2 === void 0 && ((this.o = t2 = new CSSStyleSheet()).replaceSync(this.cssText), e2 && n$5.set(s2, t2));
1323
+ if (e$5 && void 0 === t2) {
1324
+ const e2 = void 0 !== s2 && 1 === s2.length;
1325
+ e2 && (t2 = n$5.get(s2)), void 0 === t2 && ((this.o = t2 = new CSSStyleSheet()).replaceSync(this.cssText), e2 && n$5.set(s2, t2));
1248
1326
  }
1249
1327
  return t2;
1250
1328
  }
@@ -1252,11 +1330,11 @@ class o$7 {
1252
1330
  return this.cssText;
1253
1331
  }
1254
1332
  }
1255
- const r$5 = (t2) => new o$7(typeof t2 == "string" ? t2 : t2 + "", void 0, s$6), i$4 = (t2, ...e2) => {
1256
- const n2 = t2.length === 1 ? t2[0] : e2.reduce((e3, s2, n3) => e3 + ((t3) => {
1257
- if (t3._$cssResult$ === true)
1333
+ const r$5 = (t2) => new o$7("string" == typeof t2 ? t2 : t2 + "", void 0, s$6), i$4 = (t2, ...e2) => {
1334
+ const n2 = 1 === t2.length ? t2[0] : e2.reduce((e3, s2, n3) => e3 + ((t3) => {
1335
+ if (true === t3._$cssResult$)
1258
1336
  return t3.cssText;
1259
- if (typeof t3 == "number")
1337
+ if ("number" == typeof t3)
1260
1338
  return t3;
1261
1339
  throw Error("Value passed to 'css' function must be a 'css' function result: " + t3 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
1262
1340
  })(s2) + t2[n3 + 1], t2[0]);
@@ -1264,7 +1342,7 @@ const r$5 = (t2) => new o$7(typeof t2 == "string" ? t2 : t2 + "", void 0, s$6),
1264
1342
  }, S$2 = (s2, n2) => {
1265
1343
  e$5 ? s2.adoptedStyleSheets = n2.map((t2) => t2 instanceof CSSStyleSheet ? t2 : t2.styleSheet) : n2.forEach((e2) => {
1266
1344
  const n3 = document.createElement("style"), o2 = t$2.litNonce;
1267
- o2 !== void 0 && n3.setAttribute("nonce", o2), n3.textContent = e2.cssText, s2.appendChild(n3);
1345
+ void 0 !== o2 && n3.setAttribute("nonce", o2), n3.textContent = e2.cssText, s2.appendChild(n3);
1268
1346
  });
1269
1347
  }, c$4 = e$5 ? (t2) => t2 : (t2) => t2 instanceof CSSStyleSheet ? ((t3) => {
1270
1348
  let e2 = "";
@@ -1285,17 +1363,17 @@ const e$4 = window, r$4 = e$4.trustedTypes, h$3 = r$4 ? r$4.emptyScript : "", o$
1285
1363
  break;
1286
1364
  case Object:
1287
1365
  case Array:
1288
- t2 = t2 == null ? t2 : JSON.stringify(t2);
1366
+ t2 = null == t2 ? t2 : JSON.stringify(t2);
1289
1367
  }
1290
1368
  return t2;
1291
1369
  }, fromAttribute(t2, i2) {
1292
1370
  let s2 = t2;
1293
1371
  switch (i2) {
1294
1372
  case Boolean:
1295
- s2 = t2 !== null;
1373
+ s2 = null !== t2;
1296
1374
  break;
1297
1375
  case Number:
1298
- s2 = t2 === null ? null : Number(t2);
1376
+ s2 = null === t2 ? null : Number(t2);
1299
1377
  break;
1300
1378
  case Object:
1301
1379
  case Array:
@@ -1313,20 +1391,20 @@ class d$1 extends HTMLElement {
1313
1391
  }
1314
1392
  static addInitializer(t2) {
1315
1393
  var i2;
1316
- this.finalize(), ((i2 = this.h) !== null && i2 !== void 0 ? i2 : this.h = []).push(t2);
1394
+ this.finalize(), (null !== (i2 = this.h) && void 0 !== i2 ? i2 : this.h = []).push(t2);
1317
1395
  }
1318
1396
  static get observedAttributes() {
1319
1397
  this.finalize();
1320
1398
  const t2 = [];
1321
1399
  return this.elementProperties.forEach((i2, s2) => {
1322
1400
  const e2 = this._$Ep(s2, i2);
1323
- e2 !== void 0 && (this._$Ev.set(e2, s2), t2.push(e2));
1401
+ void 0 !== e2 && (this._$Ev.set(e2, s2), t2.push(e2));
1324
1402
  }), t2;
1325
1403
  }
1326
1404
  static createProperty(t2, i2 = l$5) {
1327
1405
  if (i2.state && (i2.attribute = false), this.finalize(), this.elementProperties.set(t2, i2), !i2.noAccessor && !this.prototype.hasOwnProperty(t2)) {
1328
- const s2 = typeof t2 == "symbol" ? Symbol() : "__" + t2, e2 = this.getPropertyDescriptor(t2, s2, i2);
1329
- e2 !== void 0 && Object.defineProperty(this.prototype, t2, e2);
1406
+ const s2 = "symbol" == typeof t2 ? Symbol() : "__" + t2, e2 = this.getPropertyDescriptor(t2, s2, i2);
1407
+ void 0 !== e2 && Object.defineProperty(this.prototype, t2, e2);
1330
1408
  }
1331
1409
  }
1332
1410
  static getPropertyDescriptor(t2, i2, s2) {
@@ -1345,7 +1423,7 @@ class d$1 extends HTMLElement {
1345
1423
  return false;
1346
1424
  this.finalized = true;
1347
1425
  const t2 = Object.getPrototypeOf(this);
1348
- if (t2.finalize(), t2.h !== void 0 && (this.h = [...t2.h]), this.elementProperties = new Map(t2.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
1426
+ if (t2.finalize(), void 0 !== t2.h && (this.h = [...t2.h]), this.elementProperties = new Map(t2.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
1349
1427
  const t3 = this.properties, i2 = [...Object.getOwnPropertyNames(t3), ...Object.getOwnPropertySymbols(t3)];
1350
1428
  for (const s2 of i2)
1351
1429
  this.createProperty(s2, t3[s2]);
@@ -1359,24 +1437,24 @@ class d$1 extends HTMLElement {
1359
1437
  for (const i3 of e2)
1360
1438
  s2.unshift(c$4(i3));
1361
1439
  } else
1362
- i2 !== void 0 && s2.push(c$4(i2));
1440
+ void 0 !== i2 && s2.push(c$4(i2));
1363
1441
  return s2;
1364
1442
  }
1365
1443
  static _$Ep(t2, i2) {
1366
1444
  const s2 = i2.attribute;
1367
- return s2 === false ? void 0 : typeof s2 == "string" ? s2 : typeof t2 == "string" ? t2.toLowerCase() : void 0;
1445
+ return false === s2 ? void 0 : "string" == typeof s2 ? s2 : "string" == typeof t2 ? t2.toLowerCase() : void 0;
1368
1446
  }
1369
1447
  u() {
1370
1448
  var t2;
1371
- this._$E_ = new Promise((t3) => this.enableUpdating = t3), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (t2 = this.constructor.h) === null || t2 === void 0 || t2.forEach((t3) => t3(this));
1449
+ this._$E_ = new Promise((t3) => this.enableUpdating = t3), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), null === (t2 = this.constructor.h) || void 0 === t2 || t2.forEach((t3) => t3(this));
1372
1450
  }
1373
1451
  addController(t2) {
1374
1452
  var i2, s2;
1375
- ((i2 = this._$ES) !== null && i2 !== void 0 ? i2 : this._$ES = []).push(t2), this.renderRoot !== void 0 && this.isConnected && ((s2 = t2.hostConnected) === null || s2 === void 0 || s2.call(t2));
1453
+ (null !== (i2 = this._$ES) && void 0 !== i2 ? i2 : this._$ES = []).push(t2), void 0 !== this.renderRoot && this.isConnected && (null === (s2 = t2.hostConnected) || void 0 === s2 || s2.call(t2));
1376
1454
  }
1377
1455
  removeController(t2) {
1378
1456
  var i2;
1379
- (i2 = this._$ES) === null || i2 === void 0 || i2.splice(this._$ES.indexOf(t2) >>> 0, 1);
1457
+ null === (i2 = this._$ES) || void 0 === i2 || i2.splice(this._$ES.indexOf(t2) >>> 0, 1);
1380
1458
  }
1381
1459
  _$Eg() {
1382
1460
  this.constructor.elementProperties.forEach((t2, i2) => {
@@ -1385,23 +1463,23 @@ class d$1 extends HTMLElement {
1385
1463
  }
1386
1464
  createRenderRoot() {
1387
1465
  var t2;
1388
- const s2 = (t2 = this.shadowRoot) !== null && t2 !== void 0 ? t2 : this.attachShadow(this.constructor.shadowRootOptions);
1466
+ const s2 = null !== (t2 = this.shadowRoot) && void 0 !== t2 ? t2 : this.attachShadow(this.constructor.shadowRootOptions);
1389
1467
  return S$2(s2, this.constructor.elementStyles), s2;
1390
1468
  }
1391
1469
  connectedCallback() {
1392
1470
  var t2;
1393
- this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(true), (t2 = this._$ES) === null || t2 === void 0 || t2.forEach((t3) => {
1471
+ void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(true), null === (t2 = this._$ES) || void 0 === t2 || t2.forEach((t3) => {
1394
1472
  var i2;
1395
- return (i2 = t3.hostConnected) === null || i2 === void 0 ? void 0 : i2.call(t3);
1473
+ return null === (i2 = t3.hostConnected) || void 0 === i2 ? void 0 : i2.call(t3);
1396
1474
  });
1397
1475
  }
1398
1476
  enableUpdating(t2) {
1399
1477
  }
1400
1478
  disconnectedCallback() {
1401
1479
  var t2;
1402
- (t2 = this._$ES) === null || t2 === void 0 || t2.forEach((t3) => {
1480
+ null === (t2 = this._$ES) || void 0 === t2 || t2.forEach((t3) => {
1403
1481
  var i2;
1404
- return (i2 = t3.hostDisconnected) === null || i2 === void 0 ? void 0 : i2.call(t3);
1482
+ return null === (i2 = t3.hostDisconnected) || void 0 === i2 ? void 0 : i2.call(t3);
1405
1483
  });
1406
1484
  }
1407
1485
  attributeChangedCallback(t2, i2, s2) {
@@ -1410,22 +1488,22 @@ class d$1 extends HTMLElement {
1410
1488
  _$EO(t2, i2, s2 = l$5) {
1411
1489
  var e2;
1412
1490
  const r2 = this.constructor._$Ep(t2, s2);
1413
- if (r2 !== void 0 && s2.reflect === true) {
1414
- const h2 = (((e2 = s2.converter) === null || e2 === void 0 ? void 0 : e2.toAttribute) !== void 0 ? s2.converter : n$4).toAttribute(i2, s2.type);
1415
- this._$El = t2, h2 == null ? this.removeAttribute(r2) : this.setAttribute(r2, h2), this._$El = null;
1491
+ if (void 0 !== r2 && true === s2.reflect) {
1492
+ const h2 = (void 0 !== (null === (e2 = s2.converter) || void 0 === e2 ? void 0 : e2.toAttribute) ? s2.converter : n$4).toAttribute(i2, s2.type);
1493
+ this._$El = t2, null == h2 ? this.removeAttribute(r2) : this.setAttribute(r2, h2), this._$El = null;
1416
1494
  }
1417
1495
  }
1418
1496
  _$AK(t2, i2) {
1419
1497
  var s2;
1420
1498
  const e2 = this.constructor, r2 = e2._$Ev.get(t2);
1421
- if (r2 !== void 0 && this._$El !== r2) {
1422
- const t3 = e2.getPropertyOptions(r2), h2 = typeof t3.converter == "function" ? { fromAttribute: t3.converter } : ((s2 = t3.converter) === null || s2 === void 0 ? void 0 : s2.fromAttribute) !== void 0 ? t3.converter : n$4;
1499
+ if (void 0 !== r2 && this._$El !== r2) {
1500
+ const t3 = e2.getPropertyOptions(r2), h2 = "function" == typeof t3.converter ? { fromAttribute: t3.converter } : void 0 !== (null === (s2 = t3.converter) || void 0 === s2 ? void 0 : s2.fromAttribute) ? t3.converter : n$4;
1423
1501
  this._$El = r2, this[r2] = h2.fromAttribute(i2, t3.type), this._$El = null;
1424
1502
  }
1425
1503
  }
1426
1504
  requestUpdate(t2, i2, s2) {
1427
1505
  let e2 = true;
1428
- t2 !== void 0 && (((s2 = s2 || this.constructor.getPropertyOptions(t2)).hasChanged || a$2)(this[t2], i2) ? (this._$AL.has(t2) || this._$AL.set(t2, i2), s2.reflect === true && this._$El !== t2 && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t2, s2))) : e2 = false), !this.isUpdatePending && e2 && (this._$E_ = this._$Ej());
1506
+ void 0 !== t2 && (((s2 = s2 || this.constructor.getPropertyOptions(t2)).hasChanged || a$2)(this[t2], i2) ? (this._$AL.has(t2) || this._$AL.set(t2, i2), true === s2.reflect && this._$El !== t2 && (void 0 === this._$EC && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t2, s2))) : e2 = false), !this.isUpdatePending && e2 && (this._$E_ = this._$Ej());
1429
1507
  }
1430
1508
  async _$Ej() {
1431
1509
  this.isUpdatePending = true;
@@ -1435,7 +1513,7 @@ class d$1 extends HTMLElement {
1435
1513
  Promise.reject(t3);
1436
1514
  }
1437
1515
  const t2 = this.scheduleUpdate();
1438
- return t2 != null && await t2, !this.isUpdatePending;
1516
+ return null != t2 && await t2, !this.isUpdatePending;
1439
1517
  }
1440
1518
  scheduleUpdate() {
1441
1519
  return this.performUpdate();
@@ -1448,9 +1526,9 @@ class d$1 extends HTMLElement {
1448
1526
  let i2 = false;
1449
1527
  const s2 = this._$AL;
1450
1528
  try {
1451
- i2 = this.shouldUpdate(s2), i2 ? (this.willUpdate(s2), (t2 = this._$ES) === null || t2 === void 0 || t2.forEach((t3) => {
1529
+ i2 = this.shouldUpdate(s2), i2 ? (this.willUpdate(s2), null === (t2 = this._$ES) || void 0 === t2 || t2.forEach((t3) => {
1452
1530
  var i3;
1453
- return (i3 = t3.hostUpdate) === null || i3 === void 0 ? void 0 : i3.call(t3);
1531
+ return null === (i3 = t3.hostUpdate) || void 0 === i3 ? void 0 : i3.call(t3);
1454
1532
  }), this.update(s2)) : this._$Ek();
1455
1533
  } catch (t3) {
1456
1534
  throw i2 = false, this._$Ek(), t3;
@@ -1461,9 +1539,9 @@ class d$1 extends HTMLElement {
1461
1539
  }
1462
1540
  _$AE(t2) {
1463
1541
  var i2;
1464
- (i2 = this._$ES) === null || i2 === void 0 || i2.forEach((t3) => {
1542
+ null === (i2 = this._$ES) || void 0 === i2 || i2.forEach((t3) => {
1465
1543
  var i3;
1466
- return (i3 = t3.hostUpdated) === null || i3 === void 0 ? void 0 : i3.call(t3);
1544
+ return null === (i3 = t3.hostUpdated) || void 0 === i3 ? void 0 : i3.call(t3);
1467
1545
  }), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t2)), this.updated(t2);
1468
1546
  }
1469
1547
  _$Ek() {
@@ -1479,39 +1557,39 @@ class d$1 extends HTMLElement {
1479
1557
  return true;
1480
1558
  }
1481
1559
  update(t2) {
1482
- this._$EC !== void 0 && (this._$EC.forEach((t3, i2) => this._$EO(i2, this[i2], t3)), this._$EC = void 0), this._$Ek();
1560
+ void 0 !== this._$EC && (this._$EC.forEach((t3, i2) => this._$EO(i2, this[i2], t3)), this._$EC = void 0), this._$Ek();
1483
1561
  }
1484
1562
  updated(t2) {
1485
1563
  }
1486
1564
  firstUpdated(t2) {
1487
1565
  }
1488
1566
  }
1489
- d$1.finalized = true, d$1.elementProperties = /* @__PURE__ */ new Map(), d$1.elementStyles = [], d$1.shadowRootOptions = { mode: "open" }, o$6 == null || o$6({ ReactiveElement: d$1 }), ((s$5 = e$4.reactiveElementVersions) !== null && s$5 !== void 0 ? s$5 : e$4.reactiveElementVersions = []).push("1.4.2");
1567
+ d$1.finalized = true, d$1.elementProperties = /* @__PURE__ */ new Map(), d$1.elementStyles = [], d$1.shadowRootOptions = { mode: "open" }, null == o$6 || o$6({ ReactiveElement: d$1 }), (null !== (s$5 = e$4.reactiveElementVersions) && void 0 !== s$5 ? s$5 : e$4.reactiveElementVersions = []).push("1.6.1");
1490
1568
  /**
1491
1569
  * @license
1492
1570
  * Copyright 2017 Google LLC
1493
1571
  * SPDX-License-Identifier: BSD-3-Clause
1494
1572
  */
1495
1573
  var t$1;
1496
- const i$3 = window, s$4 = i$3.trustedTypes, e$3 = s$4 ? s$4.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0, o$5 = `lit$${(Math.random() + "").slice(9)}$`, n$3 = "?" + o$5, l$4 = `<${n$3}>`, h$2 = document, r$3 = (t2 = "") => h$2.createComment(t2), d = (t2) => t2 === null || typeof t2 != "object" && typeof t2 != "function", u$2 = Array.isArray, c$3 = (t2) => u$2(t2) || typeof (t2 == null ? void 0 : t2[Symbol.iterator]) == "function", v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, a$1 = /-->/g, f$2 = />/g, _ = RegExp(`>|[
1574
+ const i$3 = window, s$4 = i$3.trustedTypes, e$3 = s$4 ? s$4.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0, o$5 = `lit$${(Math.random() + "").slice(9)}$`, n$3 = "?" + o$5, l$4 = `<${n$3}>`, h$2 = document, r$3 = (t2 = "") => h$2.createComment(t2), d = (t2) => null === t2 || "object" != typeof t2 && "function" != typeof t2, u$2 = Array.isArray, c$3 = (t2) => u$2(t2) || "function" == typeof (null == t2 ? void 0 : t2[Symbol.iterator]), v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, a$1 = /-->/g, f$2 = />/g, _ = RegExp(`>|[
1497
1575
  \f\r](?:([^\\s"'>=/]+)([
1498
1576
  \f\r]*=[
1499
1577
  \f\r]*(?:[^
1500
1578
  \f\r"'\`<>=]|("|')|))|$)`, "g"), m$1 = /'/g, p$2 = /"/g, $$1 = /^(?:script|style|textarea|title)$/i, g$1 = (t2) => (i2, ...s2) => ({ _$litType$: t2, strings: i2, values: s2 }), y = g$1(1), x$1 = Symbol.for("lit-noChange"), b$1 = Symbol.for("lit-nothing"), T = /* @__PURE__ */ new WeakMap(), A$1 = h$2.createTreeWalker(h$2, 129, null, false), E = (t2, i2) => {
1501
1579
  const s2 = t2.length - 1, n2 = [];
1502
- let h2, r2 = i2 === 2 ? "<svg>" : "", d2 = v;
1580
+ let h2, r2 = 2 === i2 ? "<svg>" : "", d2 = v;
1503
1581
  for (let i3 = 0; i3 < s2; i3++) {
1504
1582
  const s3 = t2[i3];
1505
1583
  let e2, u3, c2 = -1, g2 = 0;
1506
- for (; g2 < s3.length && (d2.lastIndex = g2, u3 = d2.exec(s3), u3 !== null); )
1507
- g2 = d2.lastIndex, d2 === v ? u3[1] === "!--" ? d2 = a$1 : u3[1] !== void 0 ? d2 = f$2 : u3[2] !== void 0 ? ($$1.test(u3[2]) && (h2 = RegExp("</" + u3[2], "g")), d2 = _) : u3[3] !== void 0 && (d2 = _) : d2 === _ ? u3[0] === ">" ? (d2 = h2 != null ? h2 : v, c2 = -1) : u3[1] === void 0 ? c2 = -2 : (c2 = d2.lastIndex - u3[2].length, e2 = u3[1], d2 = u3[3] === void 0 ? _ : u3[3] === '"' ? p$2 : m$1) : d2 === p$2 || d2 === m$1 ? d2 = _ : d2 === a$1 || d2 === f$2 ? d2 = v : (d2 = _, h2 = void 0);
1584
+ for (; g2 < s3.length && (d2.lastIndex = g2, u3 = d2.exec(s3), null !== u3); )
1585
+ g2 = d2.lastIndex, d2 === v ? "!--" === u3[1] ? d2 = a$1 : void 0 !== u3[1] ? d2 = f$2 : void 0 !== u3[2] ? ($$1.test(u3[2]) && (h2 = RegExp("</" + u3[2], "g")), d2 = _) : void 0 !== u3[3] && (d2 = _) : d2 === _ ? ">" === u3[0] ? (d2 = null != h2 ? h2 : v, c2 = -1) : void 0 === u3[1] ? c2 = -2 : (c2 = d2.lastIndex - u3[2].length, e2 = u3[1], d2 = void 0 === u3[3] ? _ : '"' === u3[3] ? p$2 : m$1) : d2 === p$2 || d2 === m$1 ? d2 = _ : d2 === a$1 || d2 === f$2 ? d2 = v : (d2 = _, h2 = void 0);
1508
1586
  const y2 = d2 === _ && t2[i3 + 1].startsWith("/>") ? " " : "";
1509
- r2 += d2 === v ? s3 + l$4 : c2 >= 0 ? (n2.push(e2), s3.slice(0, c2) + "$lit$" + s3.slice(c2) + o$5 + y2) : s3 + o$5 + (c2 === -2 ? (n2.push(void 0), i3) : y2);
1587
+ r2 += d2 === v ? s3 + l$4 : c2 >= 0 ? (n2.push(e2), s3.slice(0, c2) + "$lit$" + s3.slice(c2) + o$5 + y2) : s3 + o$5 + (-2 === c2 ? (n2.push(void 0), i3) : y2);
1510
1588
  }
1511
- const u2 = r2 + (t2[s2] || "<?>") + (i2 === 2 ? "</svg>" : "");
1589
+ const u2 = r2 + (t2[s2] || "<?>") + (2 === i2 ? "</svg>" : "");
1512
1590
  if (!Array.isArray(t2) || !t2.hasOwnProperty("raw"))
1513
1591
  throw Error("invalid template strings array");
1514
- return [e$3 !== void 0 ? e$3.createHTML(u2) : u2, n2];
1592
+ return [void 0 !== e$3 ? e$3.createHTML(u2) : u2, n2];
1515
1593
  };
1516
1594
  class C {
1517
1595
  constructor({ strings: t2, _$litType$: i2 }, e2) {
@@ -1519,20 +1597,20 @@ class C {
1519
1597
  this.parts = [];
1520
1598
  let h2 = 0, d2 = 0;
1521
1599
  const u2 = t2.length - 1, c2 = this.parts, [v2, a2] = E(t2, i2);
1522
- if (this.el = C.createElement(v2, e2), A$1.currentNode = this.el.content, i2 === 2) {
1600
+ if (this.el = C.createElement(v2, e2), A$1.currentNode = this.el.content, 2 === i2) {
1523
1601
  const t3 = this.el.content, i3 = t3.firstChild;
1524
1602
  i3.remove(), t3.append(...i3.childNodes);
1525
1603
  }
1526
- for (; (l2 = A$1.nextNode()) !== null && c2.length < u2; ) {
1527
- if (l2.nodeType === 1) {
1604
+ for (; null !== (l2 = A$1.nextNode()) && c2.length < u2; ) {
1605
+ if (1 === l2.nodeType) {
1528
1606
  if (l2.hasAttributes()) {
1529
1607
  const t3 = [];
1530
1608
  for (const i3 of l2.getAttributeNames())
1531
1609
  if (i3.endsWith("$lit$") || i3.startsWith(o$5)) {
1532
1610
  const s2 = a2[d2++];
1533
- if (t3.push(i3), s2 !== void 0) {
1611
+ if (t3.push(i3), void 0 !== s2) {
1534
1612
  const t4 = l2.getAttribute(s2.toLowerCase() + "$lit$").split(o$5), i4 = /([.?@])?(.*)/.exec(s2);
1535
- c2.push({ type: 1, index: h2, name: i4[2], strings: t4, ctor: i4[1] === "." ? M : i4[1] === "?" ? k : i4[1] === "@" ? H : S$1 });
1613
+ c2.push({ type: 1, index: h2, name: i4[2], strings: t4, ctor: "." === i4[1] ? M : "?" === i4[1] ? k : "@" === i4[1] ? H : S$1 });
1536
1614
  } else
1537
1615
  c2.push({ type: 6, index: h2 });
1538
1616
  }
@@ -1548,12 +1626,12 @@ class C {
1548
1626
  l2.append(t3[i3], r$3());
1549
1627
  }
1550
1628
  }
1551
- } else if (l2.nodeType === 8)
1629
+ } else if (8 === l2.nodeType)
1552
1630
  if (l2.data === n$3)
1553
1631
  c2.push({ type: 2, index: h2 });
1554
1632
  else {
1555
1633
  let t3 = -1;
1556
- for (; (t3 = l2.data.indexOf(o$5, t3 + 1)) !== -1; )
1634
+ for (; -1 !== (t3 = l2.data.indexOf(o$5, t3 + 1)); )
1557
1635
  c2.push({ type: 7, index: h2 }), t3 += o$5.length - 1;
1558
1636
  }
1559
1637
  h2++;
@@ -1568,9 +1646,9 @@ function P(t2, i2, s2 = t2, e2) {
1568
1646
  var o2, n2, l2, h2;
1569
1647
  if (i2 === x$1)
1570
1648
  return i2;
1571
- let r2 = e2 !== void 0 ? (o2 = s2._$Co) === null || o2 === void 0 ? void 0 : o2[e2] : s2._$Cl;
1649
+ let r2 = void 0 !== e2 ? null === (o2 = s2._$Co) || void 0 === o2 ? void 0 : o2[e2] : s2._$Cl;
1572
1650
  const u2 = d(i2) ? void 0 : i2._$litDirective$;
1573
- return (r2 == null ? void 0 : r2.constructor) !== u2 && ((n2 = r2 == null ? void 0 : r2._$AO) === null || n2 === void 0 || n2.call(r2, false), u2 === void 0 ? r2 = void 0 : (r2 = new u2(t2), r2._$AT(t2, s2, e2)), e2 !== void 0 ? ((l2 = (h2 = s2)._$Co) !== null && l2 !== void 0 ? l2 : h2._$Co = [])[e2] = r2 : s2._$Cl = r2), r2 !== void 0 && (i2 = P(t2, r2._$AS(t2, i2.values), r2, e2)), i2;
1651
+ return (null == r2 ? void 0 : r2.constructor) !== u2 && (null === (n2 = null == r2 ? void 0 : r2._$AO) || void 0 === n2 || n2.call(r2, false), void 0 === u2 ? r2 = void 0 : (r2 = new u2(t2), r2._$AT(t2, s2, e2)), void 0 !== e2 ? (null !== (l2 = (h2 = s2)._$Co) && void 0 !== l2 ? l2 : h2._$Co = [])[e2] = r2 : s2._$Cl = r2), void 0 !== r2 && (i2 = P(t2, r2._$AS(t2, i2.values), r2, e2)), i2;
1574
1652
  }
1575
1653
  class V {
1576
1654
  constructor(t2, i2) {
@@ -1584,37 +1662,37 @@ class V {
1584
1662
  }
1585
1663
  v(t2) {
1586
1664
  var i2;
1587
- const { el: { content: s2 }, parts: e2 } = this._$AD, o2 = ((i2 = t2 == null ? void 0 : t2.creationScope) !== null && i2 !== void 0 ? i2 : h$2).importNode(s2, true);
1665
+ const { el: { content: s2 }, parts: e2 } = this._$AD, o2 = (null !== (i2 = null == t2 ? void 0 : t2.creationScope) && void 0 !== i2 ? i2 : h$2).importNode(s2, true);
1588
1666
  A$1.currentNode = o2;
1589
1667
  let n2 = A$1.nextNode(), l2 = 0, r2 = 0, d2 = e2[0];
1590
- for (; d2 !== void 0; ) {
1668
+ for (; void 0 !== d2; ) {
1591
1669
  if (l2 === d2.index) {
1592
1670
  let i3;
1593
- d2.type === 2 ? i3 = new N(n2, n2.nextSibling, this, t2) : d2.type === 1 ? i3 = new d2.ctor(n2, d2.name, d2.strings, this, t2) : d2.type === 6 && (i3 = new I(n2, this, t2)), this.u.push(i3), d2 = e2[++r2];
1671
+ 2 === d2.type ? i3 = new N(n2, n2.nextSibling, this, t2) : 1 === d2.type ? i3 = new d2.ctor(n2, d2.name, d2.strings, this, t2) : 6 === d2.type && (i3 = new I(n2, this, t2)), this.u.push(i3), d2 = e2[++r2];
1594
1672
  }
1595
- l2 !== (d2 == null ? void 0 : d2.index) && (n2 = A$1.nextNode(), l2++);
1673
+ l2 !== (null == d2 ? void 0 : d2.index) && (n2 = A$1.nextNode(), l2++);
1596
1674
  }
1597
1675
  return o2;
1598
1676
  }
1599
1677
  p(t2) {
1600
1678
  let i2 = 0;
1601
1679
  for (const s2 of this.u)
1602
- s2 !== void 0 && (s2.strings !== void 0 ? (s2._$AI(t2, s2, i2), i2 += s2.strings.length - 2) : s2._$AI(t2[i2])), i2++;
1680
+ void 0 !== s2 && (void 0 !== s2.strings ? (s2._$AI(t2, s2, i2), i2 += s2.strings.length - 2) : s2._$AI(t2[i2])), i2++;
1603
1681
  }
1604
1682
  }
1605
1683
  class N {
1606
1684
  constructor(t2, i2, s2, e2) {
1607
1685
  var o2;
1608
- this.type = 2, this._$AH = b$1, this._$AN = void 0, this._$AA = t2, this._$AB = i2, this._$AM = s2, this.options = e2, this._$Cm = (o2 = e2 == null ? void 0 : e2.isConnected) === null || o2 === void 0 || o2;
1686
+ this.type = 2, this._$AH = b$1, this._$AN = void 0, this._$AA = t2, this._$AB = i2, this._$AM = s2, this.options = e2, this._$Cm = null === (o2 = null == e2 ? void 0 : e2.isConnected) || void 0 === o2 || o2;
1609
1687
  }
1610
1688
  get _$AU() {
1611
1689
  var t2, i2;
1612
- return (i2 = (t2 = this._$AM) === null || t2 === void 0 ? void 0 : t2._$AU) !== null && i2 !== void 0 ? i2 : this._$Cm;
1690
+ return null !== (i2 = null === (t2 = this._$AM) || void 0 === t2 ? void 0 : t2._$AU) && void 0 !== i2 ? i2 : this._$Cm;
1613
1691
  }
1614
1692
  get parentNode() {
1615
1693
  let t2 = this._$AA.parentNode;
1616
1694
  const i2 = this._$AM;
1617
- return i2 !== void 0 && t2.nodeType === 11 && (t2 = i2.parentNode), t2;
1695
+ return void 0 !== i2 && 11 === t2.nodeType && (t2 = i2.parentNode), t2;
1618
1696
  }
1619
1697
  get startNode() {
1620
1698
  return this._$AA;
@@ -1623,7 +1701,7 @@ class N {
1623
1701
  return this._$AB;
1624
1702
  }
1625
1703
  _$AI(t2, i2 = this) {
1626
- t2 = P(this, t2, i2), d(t2) ? t2 === b$1 || t2 == null || t2 === "" ? (this._$AH !== b$1 && this._$AR(), this._$AH = b$1) : t2 !== this._$AH && t2 !== x$1 && this.g(t2) : t2._$litType$ !== void 0 ? this.$(t2) : t2.nodeType !== void 0 ? this.T(t2) : c$3(t2) ? this.k(t2) : this.g(t2);
1704
+ t2 = P(this, t2, i2), d(t2) ? t2 === b$1 || null == t2 || "" === t2 ? (this._$AH !== b$1 && this._$AR(), this._$AH = b$1) : t2 !== this._$AH && t2 !== x$1 && this.g(t2) : void 0 !== t2._$litType$ ? this.$(t2) : void 0 !== t2.nodeType ? this.T(t2) : c$3(t2) ? this.k(t2) : this.g(t2);
1627
1705
  }
1628
1706
  O(t2, i2 = this._$AB) {
1629
1707
  return this._$AA.parentNode.insertBefore(t2, i2);
@@ -1636,8 +1714,8 @@ class N {
1636
1714
  }
1637
1715
  $(t2) {
1638
1716
  var i2;
1639
- const { values: s2, _$litType$: e2 } = t2, o2 = typeof e2 == "number" ? this._$AC(t2) : (e2.el === void 0 && (e2.el = C.createElement(e2.h, this.options)), e2);
1640
- if (((i2 = this._$AH) === null || i2 === void 0 ? void 0 : i2._$AD) === o2)
1717
+ const { values: s2, _$litType$: e2 } = t2, o2 = "number" == typeof e2 ? this._$AC(t2) : (void 0 === e2.el && (e2.el = C.createElement(e2.h, this.options)), e2);
1718
+ if ((null === (i2 = this._$AH) || void 0 === i2 ? void 0 : i2._$AD) === o2)
1641
1719
  this._$AH.p(s2);
1642
1720
  else {
1643
1721
  const t3 = new V(o2, this), i3 = t3.v(this.options);
@@ -1646,7 +1724,7 @@ class N {
1646
1724
  }
1647
1725
  _$AC(t2) {
1648
1726
  let i2 = T.get(t2.strings);
1649
- return i2 === void 0 && T.set(t2.strings, i2 = new C(t2)), i2;
1727
+ return void 0 === i2 && T.set(t2.strings, i2 = new C(t2)), i2;
1650
1728
  }
1651
1729
  k(t2) {
1652
1730
  u$2(this._$AH) || (this._$AH = [], this._$AR());
@@ -1658,19 +1736,19 @@ class N {
1658
1736
  }
1659
1737
  _$AR(t2 = this._$AA.nextSibling, i2) {
1660
1738
  var s2;
1661
- for ((s2 = this._$AP) === null || s2 === void 0 || s2.call(this, false, true, i2); t2 && t2 !== this._$AB; ) {
1739
+ for (null === (s2 = this._$AP) || void 0 === s2 || s2.call(this, false, true, i2); t2 && t2 !== this._$AB; ) {
1662
1740
  const i3 = t2.nextSibling;
1663
1741
  t2.remove(), t2 = i3;
1664
1742
  }
1665
1743
  }
1666
1744
  setConnected(t2) {
1667
1745
  var i2;
1668
- this._$AM === void 0 && (this._$Cm = t2, (i2 = this._$AP) === null || i2 === void 0 || i2.call(this, t2));
1746
+ void 0 === this._$AM && (this._$Cm = t2, null === (i2 = this._$AP) || void 0 === i2 || i2.call(this, t2));
1669
1747
  }
1670
1748
  }
1671
1749
  class S$1 {
1672
1750
  constructor(t2, i2, s2, e2, o2) {
1673
- this.type = 1, this._$AH = b$1, this._$AN = void 0, this.element = t2, this.name = i2, this._$AM = e2, this.options = o2, s2.length > 2 || s2[0] !== "" || s2[1] !== "" ? (this._$AH = Array(s2.length - 1).fill(new String()), this.strings = s2) : this._$AH = b$1;
1751
+ this.type = 1, this._$AH = b$1, this._$AN = void 0, this.element = t2, this.name = i2, this._$AM = e2, this.options = o2, s2.length > 2 || "" !== s2[0] || "" !== s2[1] ? (this._$AH = Array(s2.length - 1).fill(new String()), this.strings = s2) : this._$AH = b$1;
1674
1752
  }
1675
1753
  get tagName() {
1676
1754
  return this.element.tagName;
@@ -1681,18 +1759,18 @@ class S$1 {
1681
1759
  _$AI(t2, i2 = this, s2, e2) {
1682
1760
  const o2 = this.strings;
1683
1761
  let n2 = false;
1684
- if (o2 === void 0)
1762
+ if (void 0 === o2)
1685
1763
  t2 = P(this, t2, i2, 0), n2 = !d(t2) || t2 !== this._$AH && t2 !== x$1, n2 && (this._$AH = t2);
1686
1764
  else {
1687
1765
  const e3 = t2;
1688
1766
  let l2, h2;
1689
1767
  for (t2 = o2[0], l2 = 0; l2 < o2.length - 1; l2++)
1690
- h2 = P(this, e3[s2 + l2], i2, l2), h2 === x$1 && (h2 = this._$AH[l2]), n2 || (n2 = !d(h2) || h2 !== this._$AH[l2]), h2 === b$1 ? t2 = b$1 : t2 !== b$1 && (t2 += (h2 != null ? h2 : "") + o2[l2 + 1]), this._$AH[l2] = h2;
1768
+ h2 = P(this, e3[s2 + l2], i2, l2), h2 === x$1 && (h2 = this._$AH[l2]), n2 || (n2 = !d(h2) || h2 !== this._$AH[l2]), h2 === b$1 ? t2 = b$1 : t2 !== b$1 && (t2 += (null != h2 ? h2 : "") + o2[l2 + 1]), this._$AH[l2] = h2;
1691
1769
  }
1692
1770
  n2 && !e2 && this.j(t2);
1693
1771
  }
1694
1772
  j(t2) {
1695
- t2 === b$1 ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t2 != null ? t2 : "");
1773
+ t2 === b$1 ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t2 ? t2 : "");
1696
1774
  }
1697
1775
  }
1698
1776
  class M extends S$1 {
@@ -1718,14 +1796,14 @@ class H extends S$1 {
1718
1796
  }
1719
1797
  _$AI(t2, i2 = this) {
1720
1798
  var s2;
1721
- if ((t2 = (s2 = P(this, t2, i2, 0)) !== null && s2 !== void 0 ? s2 : b$1) === x$1)
1799
+ if ((t2 = null !== (s2 = P(this, t2, i2, 0)) && void 0 !== s2 ? s2 : b$1) === x$1)
1722
1800
  return;
1723
1801
  const e2 = this._$AH, o2 = t2 === b$1 && e2 !== b$1 || t2.capture !== e2.capture || t2.once !== e2.once || t2.passive !== e2.passive, n2 = t2 !== b$1 && (e2 === b$1 || o2);
1724
1802
  o2 && this.element.removeEventListener(this.name, this, e2), n2 && this.element.addEventListener(this.name, this, t2), this._$AH = t2;
1725
1803
  }
1726
1804
  handleEvent(t2) {
1727
1805
  var i2, s2;
1728
- typeof this._$AH == "function" ? this._$AH.call((s2 = (i2 = this.options) === null || i2 === void 0 ? void 0 : i2.host) !== null && s2 !== void 0 ? s2 : this.element, t2) : this._$AH.handleEvent(t2);
1806
+ "function" == typeof this._$AH ? this._$AH.call(null !== (s2 = null === (i2 = this.options) || void 0 === i2 ? void 0 : i2.host) && void 0 !== s2 ? s2 : this.element, t2) : this._$AH.handleEvent(t2);
1729
1807
  }
1730
1808
  }
1731
1809
  class I {
@@ -1740,14 +1818,14 @@ class I {
1740
1818
  }
1741
1819
  }
1742
1820
  const L = { P: "$lit$", A: o$5, M: n$3, C: 1, L: E, R: V, D: c$3, V: P, I: N, H: S$1, N: k, U: H, B: M, F: I }, z = i$3.litHtmlPolyfillSupport;
1743
- z == null || z(C, N), ((t$1 = i$3.litHtmlVersions) !== null && t$1 !== void 0 ? t$1 : i$3.litHtmlVersions = []).push("2.4.0");
1821
+ null == z || z(C, N), (null !== (t$1 = i$3.litHtmlVersions) && void 0 !== t$1 ? t$1 : i$3.litHtmlVersions = []).push("2.6.1");
1744
1822
  const Z = (t2, i2, s2) => {
1745
1823
  var e2, o2;
1746
- const n2 = (e2 = s2 == null ? void 0 : s2.renderBefore) !== null && e2 !== void 0 ? e2 : i2;
1824
+ const n2 = null !== (e2 = null == s2 ? void 0 : s2.renderBefore) && void 0 !== e2 ? e2 : i2;
1747
1825
  let l2 = n2._$litPart$;
1748
- if (l2 === void 0) {
1749
- const t3 = (o2 = s2 == null ? void 0 : s2.renderBefore) !== null && o2 !== void 0 ? o2 : null;
1750
- n2._$litPart$ = l2 = new N(i2.insertBefore(r$3(), t3), t3, void 0, s2 != null ? s2 : {});
1826
+ if (void 0 === l2) {
1827
+ const t3 = null !== (o2 = null == s2 ? void 0 : s2.renderBefore) && void 0 !== o2 ? o2 : null;
1828
+ n2._$litPart$ = l2 = new N(i2.insertBefore(r$3(), t3), t3, void 0, null != s2 ? s2 : {});
1751
1829
  }
1752
1830
  return l2._$AI(t2), l2;
1753
1831
  };
@@ -1764,7 +1842,7 @@ class s$3 extends d$1 {
1764
1842
  createRenderRoot() {
1765
1843
  var t2, e2;
1766
1844
  const i2 = super.createRenderRoot();
1767
- return (t2 = (e2 = this.renderOptions).renderBefore) !== null && t2 !== void 0 || (e2.renderBefore = i2.firstChild), i2;
1845
+ return null !== (t2 = (e2 = this.renderOptions).renderBefore) && void 0 !== t2 || (e2.renderBefore = i2.firstChild), i2;
1768
1846
  }
1769
1847
  update(t2) {
1770
1848
  const i2 = this.render();
@@ -1772,20 +1850,20 @@ class s$3 extends d$1 {
1772
1850
  }
1773
1851
  connectedCallback() {
1774
1852
  var t2;
1775
- super.connectedCallback(), (t2 = this._$Do) === null || t2 === void 0 || t2.setConnected(true);
1853
+ super.connectedCallback(), null === (t2 = this._$Do) || void 0 === t2 || t2.setConnected(true);
1776
1854
  }
1777
1855
  disconnectedCallback() {
1778
1856
  var t2;
1779
- super.disconnectedCallback(), (t2 = this._$Do) === null || t2 === void 0 || t2.setConnected(false);
1857
+ super.disconnectedCallback(), null === (t2 = this._$Do) || void 0 === t2 || t2.setConnected(false);
1780
1858
  }
1781
1859
  render() {
1782
1860
  return x$1;
1783
1861
  }
1784
1862
  }
1785
- s$3.finalized = true, s$3._$litElement$ = true, (l$3 = globalThis.litElementHydrateSupport) === null || l$3 === void 0 || l$3.call(globalThis, { LitElement: s$3 });
1863
+ s$3.finalized = true, s$3._$litElement$ = true, null === (l$3 = globalThis.litElementHydrateSupport) || void 0 === l$3 || l$3.call(globalThis, { LitElement: s$3 });
1786
1864
  const n$2 = globalThis.litElementPolyfillSupport;
1787
- n$2 == null || n$2({ LitElement: s$3 });
1788
- ((o$4 = globalThis.litElementVersions) !== null && o$4 !== void 0 ? o$4 : globalThis.litElementVersions = []).push("3.2.2");
1865
+ null == n$2 || n$2({ LitElement: s$3 });
1866
+ (null !== (o$4 = globalThis.litElementVersions) && void 0 !== o$4 ? o$4 : globalThis.litElementVersions = []).push("3.2.2");
1789
1867
  var __defProp$16 = Object.defineProperty;
1790
1868
  var __getOwnPropDesc$16 = Object.getOwnPropertyDescriptor;
1791
1869
  var __decorateClass$16 = (decorators, target, key, kind) => {
@@ -1841,24 +1919,29 @@ let SonicDate = class extends Subscriber$1(TemplatesContainer$1(s$3)) {
1841
1919
  super.connectedCallback();
1842
1920
  }
1843
1921
  getDatesParts(start_date, end_date, options) {
1844
- let start = this.startDateObject;
1922
+ const start = this.startDateObject;
1845
1923
  start.setTime(start_date * 1e3);
1846
1924
  let parts = [];
1847
1925
  if (end_date > 0) {
1848
- let end = this.endDateObject;
1926
+ const end = this.endDateObject;
1849
1927
  end.setTime(end_date * 1e3);
1850
1928
  const isSameDay = start.toDateString() == end.toDateString();
1851
1929
  if (!isSameDay) {
1852
1930
  delete options.hour;
1853
1931
  delete options.minute;
1854
1932
  }
1855
- let format = new Intl.DateTimeFormat(this.language || this.pageLanguage, options);
1933
+ const format = new Intl.DateTimeFormat(
1934
+ this.language || this.pageLanguage,
1935
+ options
1936
+ );
1856
1937
  parts = format.formatRangeToParts(start, end);
1857
1938
  if (this.designMode) {
1858
1939
  parts.forEach((part) => part.hidden = part.value.trim() == ",");
1859
1940
  }
1860
1941
  if (!isSameDay) {
1861
- let to = parts.find((part) => part.type == "literal" && part.source == "shared" && part.value.trim().length > 0);
1942
+ const to = parts.find(
1943
+ (part) => part.type == "literal" && part.source == "shared" && part.value.trim().length > 0
1944
+ );
1862
1945
  if (to) {
1863
1946
  to.value = " " + this.duAu[1] + " ";
1864
1947
  to.type = "to";
@@ -1867,7 +1950,7 @@ let SonicDate = class extends Subscriber$1(TemplatesContainer$1(s$3)) {
1867
1950
  parts.unshift({ type: "from", value: this.duAu[0] + " ", source: "shared" });
1868
1951
  }
1869
1952
  } else {
1870
- let format = new Intl.DateTimeFormat(this.language || this.pageLanguage, options);
1953
+ const format = new Intl.DateTimeFormat(this.language || this.pageLanguage, options);
1871
1954
  parts = format.formatToParts(start);
1872
1955
  }
1873
1956
  parts[0].value = Format$1.ucFirst(parts[0].value);
@@ -1896,7 +1979,7 @@ let SonicDate = class extends Subscriber$1(TemplatesContainer$1(s$3)) {
1896
1979
  this.start_date = this.end_date;
1897
1980
  this.end_date = copy;
1898
1981
  }
1899
- let options = {
1982
+ const options = {
1900
1983
  year: this.year,
1901
1984
  month: this.month,
1902
1985
  day: this.day
@@ -1911,12 +1994,12 @@ let SonicDate = class extends Subscriber$1(TemplatesContainer$1(s$3)) {
1911
1994
  options.era = this.era;
1912
1995
  if (this.time_zone)
1913
1996
  options.timeZone = this.time_zone;
1914
- let parts = this.getDatesParts(this.start_date, this.end_date, options);
1997
+ const parts = this.getDatesParts(this.start_date, this.end_date, options);
1915
1998
  return y`${parts.map((part) => {
1916
- let template = this.templateParts[part.type];
1999
+ const template = this.templateParts[part.type];
1917
2000
  if (template) {
1918
- var clone = document.importNode(template.content, true);
1919
- let child = clone.children[0];
2001
+ const clone = document.importNode(template.content, true);
2002
+ const child = clone.children[0];
1920
2003
  if (child.innerText.trim() == "")
1921
2004
  child.innerText = part.value;
1922
2005
  return clone;
@@ -1991,7 +2074,7 @@ const _LocationHandler = class {
1991
2074
  if (!_LocationHandler.listening) {
1992
2075
  return;
1993
2076
  }
1994
- let newURL = (_a2 = document.location) == null ? void 0 : _a2.href.replace(document.location.origin, "");
2077
+ const newURL = (_a2 = document.location) == null ? void 0 : _a2.href.replace(document.location.origin, "");
1995
2078
  if (_LocationHandler.prevURL && _LocationHandler.prevURL != newURL) {
1996
2079
  _LocationHandler.prevURL = newURL;
1997
2080
  _LocationHandler.listeners.forEach((listener) => {
@@ -2001,7 +2084,7 @@ const _LocationHandler = class {
2001
2084
  window.requestAnimationFrame(_LocationHandler.listen);
2002
2085
  }
2003
2086
  static offChange(listener) {
2004
- let idx = _LocationHandler.listeners.indexOf(listener);
2087
+ const idx = _LocationHandler.listeners.indexOf(listener);
2005
2088
  if (idx == -1)
2006
2089
  return;
2007
2090
  _LocationHandler.listeners.splice(idx, 1);
@@ -2021,7 +2104,7 @@ const _LocationHandler = class {
2021
2104
  const referrer = document.referrer;
2022
2105
  if (goBack !== null && goBack !== void 0) {
2023
2106
  const origin = document.location.origin;
2024
- let urlDest = goBack || origin;
2107
+ const urlDest = goBack || origin;
2025
2108
  const isHTTP = referrer.indexOf("http") == 0;
2026
2109
  const isNotSameOrigin = isHTTP ? new URL(referrer).origin != origin : false;
2027
2110
  const isReferrerEmpty = referrer == "";
@@ -2030,7 +2113,7 @@ const _LocationHandler = class {
2030
2113
  const isNotSameURL = urlDest != document.location.href;
2031
2114
  const goToURLDest = isNotSameOrigin && isNotSameURL || isFallbackNoReferer;
2032
2115
  if (goToURLDest) {
2033
- let state = history.state || {};
2116
+ const state = history.state || {};
2034
2117
  state.concorde = state.concorde || {};
2035
2118
  state.concorde.hasDoneHistoryBack = true;
2036
2119
  history.pushState(state, document.title);
@@ -2050,11 +2133,11 @@ const _LocationHandler = class {
2050
2133
  document.location.hash = to.substring(1);
2051
2134
  return;
2052
2135
  }
2053
- let url = new URL(to, document.location.href);
2054
- let split = url.pathname.split("/");
2055
- let newPathName = [];
2136
+ const url = new URL(to, document.location.href);
2137
+ const split = url.pathname.split("/");
2138
+ const newPathName = [];
2056
2139
  let prevSp = "";
2057
- for (let sp of split) {
2140
+ for (const sp of split) {
2058
2141
  if (sp != prevSp)
2059
2142
  newPathName.push(sp);
2060
2143
  prevSp = sp;
@@ -2071,8 +2154,8 @@ const _LocationHandler = class {
2071
2154
  if (component.autoActive == "disabled")
2072
2155
  return;
2073
2156
  if (component.href && component.href.indexOf("http") != 0) {
2074
- let url1 = new URL(component.href, document.location.href);
2075
- let url2 = new URL(component.location || "", document.location.origin);
2157
+ const url1 = new URL(component.href, document.location.href);
2158
+ const url2 = new URL(component.location || "", document.location.origin);
2076
2159
  let isActive = false;
2077
2160
  if (component.autoActive == "strict") {
2078
2161
  isActive = url1.pathname == url2.pathname && url1.hash == url2.hash && url1.search == url2.search;
@@ -2119,29 +2202,29 @@ class i$2 {
2119
2202
  const i$1 = e$2(class extends i$2 {
2120
2203
  constructor(t$12) {
2121
2204
  var e2;
2122
- if (super(t$12), t$12.type !== t.ATTRIBUTE || t$12.name !== "style" || ((e2 = t$12.strings) === null || e2 === void 0 ? void 0 : e2.length) > 2)
2205
+ if (super(t$12), t$12.type !== t.ATTRIBUTE || "style" !== t$12.name || (null === (e2 = t$12.strings) || void 0 === e2 ? void 0 : e2.length) > 2)
2123
2206
  throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
2124
2207
  }
2125
2208
  render(t2) {
2126
2209
  return Object.keys(t2).reduce((e2, r2) => {
2127
2210
  const s2 = t2[r2];
2128
- return s2 == null ? e2 : e2 + `${r2 = r2.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${s2};`;
2211
+ return null == s2 ? e2 : e2 + `${r2 = r2.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${s2};`;
2129
2212
  }, "");
2130
2213
  }
2131
2214
  update(e2, [r2]) {
2132
2215
  const { style: s2 } = e2.element;
2133
- if (this.vt === void 0) {
2216
+ if (void 0 === this.vt) {
2134
2217
  this.vt = /* @__PURE__ */ new Set();
2135
2218
  for (const t2 in r2)
2136
2219
  this.vt.add(t2);
2137
2220
  return this.render(r2);
2138
2221
  }
2139
2222
  this.vt.forEach((t2) => {
2140
- r2[t2] == null && (this.vt.delete(t2), t2.includes("-") ? s2.removeProperty(t2) : s2[t2] = "");
2223
+ null == r2[t2] && (this.vt.delete(t2), t2.includes("-") ? s2.removeProperty(t2) : s2[t2] = "");
2141
2224
  });
2142
2225
  for (const t2 in r2) {
2143
2226
  const e3 = r2[t2];
2144
- e3 != null && (this.vt.add(t2), t2.includes("-") ? s2.setProperty(t2, e3) : s2[t2] = e3);
2227
+ null != e3 && (this.vt.add(t2), t2.includes("-") ? s2.setProperty(t2, e3) : s2[t2] = e3);
2145
2228
  }
2146
2229
  return x$1;
2147
2230
  }
@@ -2178,7 +2261,7 @@ const Form$2 = (superClass) => {
2178
2261
  this.setFormValueFromPublisher(value);
2179
2262
  };
2180
2263
  this.onFormDataInValidate = () => {
2181
- let formPublisher = this.getFormPublisher();
2264
+ const formPublisher = this.getFormPublisher();
2182
2265
  if (!(formPublisher && formPublisher.isFormValid.get())) {
2183
2266
  return;
2184
2267
  }
@@ -2197,9 +2280,9 @@ const Form$2 = (superClass) => {
2197
2280
  validateFormElement() {
2198
2281
  }
2199
2282
  updateDataValue() {
2200
- let name = this.getAttribute("name");
2283
+ const name = this.getAttribute("name");
2201
2284
  if (name) {
2202
- let formPublisher = this.getFormPublisher();
2285
+ const formPublisher = this.getFormPublisher();
2203
2286
  if (formPublisher) {
2204
2287
  formPublisher[name] = this.getValueForFormPublisher();
2205
2288
  this.setFormValueFromPublisher(formPublisher[name].get());
@@ -2227,12 +2310,9 @@ const Form$2 = (superClass) => {
2227
2310
  return this._value;
2228
2311
  }
2229
2312
  set value(value) {
2230
- if (this.name == "nom" && value && Objects$1.deepEqual(value, {})) {
2231
- console.trace(this);
2232
- }
2233
2313
  if (value == null)
2234
2314
  value = "";
2235
- if (Objects$1.isObject(value) && value.hasOwnProperty("__value") && value.value == void 0)
2315
+ if (Objects$1.isObject(value) && Object.prototype.hasOwnProperty.call(value, "__value") && value._value == void 0)
2236
2316
  value = "";
2237
2317
  if (this._value == value)
2238
2318
  return;
@@ -2242,7 +2322,7 @@ const Form$2 = (superClass) => {
2242
2322
  }
2243
2323
  initPublisher() {
2244
2324
  let formPublisher = this.getFormPublisher();
2245
- let value = this.hasAncestorAttribute("initFromPublisher") && this._name && formPublisher[this._name].get() ? formPublisher[this._name].get() : this.getAttribute("value");
2325
+ const value = this.hasAncestorAttribute("initFromPublisher") && this._name && formPublisher[this._name].get() ? formPublisher[this._name].get() : this.getAttribute("value");
2246
2326
  if (this._name && this.publisher)
2247
2327
  this.publisher[this._name].offAssign(this.onValueAssign);
2248
2328
  if (this._name && formPublisher)
@@ -2273,54 +2353,54 @@ const Form$2 = (superClass) => {
2273
2353
  this.dispatchEvent(event);
2274
2354
  }
2275
2355
  addKeyboardNavigation() {
2276
- let keyboardLoopIds = this.getAncestorAttributeValue("data-keyboard-nav");
2356
+ const keyboardLoopIds = this.getAncestorAttributeValue("data-keyboard-nav");
2277
2357
  if (!keyboardLoopIds)
2278
2358
  return;
2279
- let split = keyboardLoopIds.split(" ");
2280
- let keyboardLoopId = split[0];
2359
+ const split = keyboardLoopIds.split(" ");
2360
+ const keyboardLoopId = split[0];
2281
2361
  if (!keyboardLoopId)
2282
2362
  return;
2283
- for (let keyboardLoopId2 of split) {
2363
+ for (const keyboardLoopId2 of split) {
2284
2364
  if (!keyboardLoops.has(keyboardLoopId2)) {
2285
2365
  keyboardLoops.set(keyboardLoopId2, []);
2286
2366
  }
2287
- let keyboardLoop2 = keyboardLoops.get(keyboardLoopId2);
2367
+ const keyboardLoop2 = keyboardLoops.get(keyboardLoopId2);
2288
2368
  if ((keyboardLoop2 == null ? void 0 : keyboardLoop2.indexOf(this)) == -1) {
2289
2369
  keyboardLoop2.push(this);
2290
2370
  }
2291
2371
  }
2292
- let keyboardLoop = keyboardLoops.get(keyboardLoopId);
2372
+ const keyboardLoop = keyboardLoops.get(keyboardLoopId);
2293
2373
  this.addEventListener("keydown", (e2) => {
2294
2374
  var _a2;
2295
2375
  const keyboardEvent = e2;
2296
2376
  if (!["ArrowDown", "ArrowUp"].includes(keyboardEvent.key))
2297
2377
  return;
2298
- let selector = "input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])";
2299
- let loop = keyboardLoop == null ? void 0 : keyboardLoop.filter((el) => {
2378
+ const selector = "input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])";
2379
+ const loop = keyboardLoop == null ? void 0 : keyboardLoop.filter((el) => {
2300
2380
  var _a3;
2301
- let child = (_a3 = el.shadowRoot) == null ? void 0 : _a3.querySelector(selector);
2381
+ const child = (_a3 = el.shadowRoot) == null ? void 0 : _a3.querySelector(selector);
2302
2382
  if (!child)
2303
2383
  return false;
2304
- let cpStyle = window.getComputedStyle(child);
2384
+ const cpStyle = window.getComputedStyle(child);
2305
2385
  return cpStyle.display !== "none" && cpStyle.display !== "" && cpStyle.pointerEvents != "none" && cpStyle.visibility !== "hidden" && child.getBoundingClientRect().width > 0;
2306
2386
  });
2307
2387
  let next = null;
2308
2388
  if (keyboardEvent.key == "ArrowDown" && loop) {
2309
- let index = loop.indexOf(this);
2389
+ const index = loop.indexOf(this);
2310
2390
  if (index == loop.length - 1) {
2311
2391
  next = loop[0];
2312
2392
  } else {
2313
2393
  next = loop[index + 1];
2314
2394
  }
2315
2395
  } else if (keyboardEvent.key == "ArrowUp" && loop) {
2316
- let index = loop.indexOf(this);
2396
+ const index = loop.indexOf(this);
2317
2397
  if (index == 0) {
2318
2398
  next = loop[loop.length - 1];
2319
2399
  } else {
2320
2400
  next = loop[index - 1];
2321
2401
  }
2322
2402
  }
2323
- let elt = (_a2 = next == null ? void 0 : next.shadowRoot) == null ? void 0 : _a2.querySelector(selector);
2403
+ const elt = (_a2 = next == null ? void 0 : next.shadowRoot) == null ? void 0 : _a2.querySelector(selector);
2324
2404
  if (elt && elt.focus) {
2325
2405
  elt.focus();
2326
2406
  e2.preventDefault();
@@ -2336,7 +2416,7 @@ const Form$2 = (superClass) => {
2336
2416
  super.disconnectedCallback();
2337
2417
  if (this._name && this.publisher)
2338
2418
  this.publisher[this._name].offAssign(this.onValueAssign);
2339
- let formPublisher = this.getFormPublisher();
2419
+ const formPublisher = this.getFormPublisher();
2340
2420
  if (this._name && formPublisher) {
2341
2421
  formPublisher[this._name].offAssign(this.onFormValueAssign);
2342
2422
  formPublisher.offInvalidate(this.onFormDataInValidate);
@@ -2417,7 +2497,7 @@ class Arrays$1 {
2417
2497
  forKey: (key) => {
2418
2498
  if (source.length < 1)
2419
2499
  return true;
2420
- let first = (source[0] || {})[key];
2500
+ const first = (source[0] || {})[key];
2421
2501
  return source.every((item) => (item || {})[key] == first);
2422
2502
  }
2423
2503
  };
@@ -2439,7 +2519,7 @@ class Arrays$1 {
2439
2519
  return {
2440
2520
  toKey: (toKey) => {
2441
2521
  source.forEach((item) => {
2442
- item[toKey] = Array.isArray(item[atKey]) ? [...item[atKey]] : typeof item[atKey] === "object" && item[atKey] != null ? __spreadValues({}, item[atKey]) : item[atKey];
2522
+ item[toKey] = Array.isArray(item[atKey]) ? [...item[atKey]] : typeof item[atKey] === "object" && item[atKey] != null ? { ...item[atKey] } : item[atKey];
2443
2523
  });
2444
2524
  }
2445
2525
  };
@@ -2456,14 +2536,14 @@ class Arrays$1 {
2456
2536
  group: () => {
2457
2537
  return {
2458
2538
  byKey: (key) => {
2459
- let result = [];
2460
- let keys = /* @__PURE__ */ new Map();
2461
- for (let item of source) {
2462
- let value = item[key];
2539
+ const result = [];
2540
+ const keys = /* @__PURE__ */ new Map();
2541
+ for (const item of source) {
2542
+ const value = item[key];
2463
2543
  if (!keys.has(value)) {
2464
- let idx = result.length;
2544
+ const idx = result.length;
2465
2545
  keys.set(value, idx);
2466
- let pushable = { items: [] };
2546
+ const pushable = { items: [] };
2467
2547
  pushable[key] = value;
2468
2548
  result.push(pushable);
2469
2549
  }
@@ -2478,8 +2558,10 @@ class Arrays$1 {
2478
2558
  duplicates: () => {
2479
2559
  return {
2480
2560
  forKey: (key) => {
2481
- let set = [...new Set(source.map((item) => item[key]))];
2482
- return Arrays$1.from(set.map((value) => source.find((item) => item[key] == value)));
2561
+ const set = [...new Set(source.map((item) => item[key]))];
2562
+ return Arrays$1.from(
2563
+ set.map((value) => source.find((item) => item[key] == value))
2564
+ );
2483
2565
  }
2484
2566
  };
2485
2567
  },
@@ -2488,8 +2570,10 @@ class Arrays$1 {
2488
2570
  havingSameValue: () => {
2489
2571
  return {
2490
2572
  forKey: (key) => {
2491
- let areValuesDifferentForKey = (compared1, key2) => (compared2) => compared1[key2] != compared2[key2];
2492
- return Arrays$1.from(source.filter((elt) => toRemoveFromSource.every(areValuesDifferentForKey(elt, key))));
2573
+ const areValuesDifferentForKey = (compared1, key2) => (compared2) => compared1[key2] != compared2[key2];
2574
+ return Arrays$1.from(
2575
+ source.filter((elt) => toRemoveFromSource.every(areValuesDifferentForKey(elt, key)))
2576
+ );
2493
2577
  }
2494
2578
  };
2495
2579
  }
@@ -2545,9 +2629,9 @@ const Form$1 = (superClass) => {
2545
2629
  this.unCheckOnDisconnect = false;
2546
2630
  this._checked = null;
2547
2631
  this.updateAllChecked = () => {
2548
- let name = this.getAttribute("name");
2549
- let checkAllPublisher = this.getCheckAllPublisher();
2550
- let formPublisher = this.getFormPublisher();
2632
+ const name = this.getAttribute("name");
2633
+ const checkAllPublisher = this.getCheckAllPublisher();
2634
+ const formPublisher = this.getFormPublisher();
2551
2635
  if (!(checkAllPublisher == null ? void 0 : checkAllPublisher.hasCheckAll.get())) {
2552
2636
  return;
2553
2637
  }
@@ -2560,11 +2644,11 @@ const Form$1 = (superClass) => {
2560
2644
  } else if (checkAllPublisher.checkMode.get() == "noneChecked" || checkAllPublisher.checkMode.get() == null) {
2561
2645
  checkAllPublisher.checkMode = "someUnchecked";
2562
2646
  }
2563
- let currentValues = formPublisher[name].get();
2564
- let allValues = checkAllPublisher.values.get();
2647
+ const currentValues = formPublisher[name].get();
2648
+ const allValues = checkAllPublisher.values.get();
2565
2649
  if (allValues && allValues.length) {
2566
2650
  let checkedCount = allValues.length;
2567
- for (let p2 of allValues) {
2651
+ for (const p2 of allValues) {
2568
2652
  if (currentValues.indexOf(p2) == -1) {
2569
2653
  checkedCount -= 1;
2570
2654
  }
@@ -2613,7 +2697,7 @@ const Form$1 = (superClass) => {
2613
2697
  this._value = newValue;
2614
2698
  if (!this.value)
2615
2699
  return;
2616
- let formPublisher = this.getFormPublisher();
2700
+ const formPublisher = this.getFormPublisher();
2617
2701
  if (formPublisher && this.name) {
2618
2702
  let currentValue = formPublisher[this.name].get();
2619
2703
  if (this.radio || this.unique) {
@@ -2635,13 +2719,13 @@ const Form$1 = (superClass) => {
2635
2719
  set checked(checked) {
2636
2720
  this.setCheckedValue(checked);
2637
2721
  if (this.checksAll()) {
2638
- let checkAllPublisher = this.getCheckAllPublisher();
2722
+ const checkAllPublisher = this.getCheckAllPublisher();
2639
2723
  if (checkAllPublisher) {
2640
2724
  if (this.checked === true)
2641
2725
  checkAllPublisher.checkMode = "allChecked";
2642
2726
  else if (this.checked === null) {
2643
2727
  checkAllPublisher.checkMode = "noneChecked";
2644
- let formPublisher = this.getFormPublisher();
2728
+ const formPublisher = this.getFormPublisher();
2645
2729
  if (formPublisher) {
2646
2730
  formPublisher[this.name] = [];
2647
2731
  }
@@ -2655,9 +2739,9 @@ const Form$1 = (superClass) => {
2655
2739
  const input = (_a2 = this.shadowRoot) == null ? void 0 : _a2.querySelector("input");
2656
2740
  if (!input || input.checkValidity())
2657
2741
  return;
2658
- let formPublisher = this.getFormPublisher();
2742
+ const formPublisher = this.getFormPublisher();
2659
2743
  if (formPublisher) {
2660
- let value = formPublisher[this.name].get();
2744
+ const value = formPublisher[this.name].get();
2661
2745
  if ((this.unique || this.radio) && value !== null && value.toString().length > 0)
2662
2746
  return;
2663
2747
  formPublisher.isFormValid = false;
@@ -2682,7 +2766,7 @@ const Form$1 = (superClass) => {
2682
2766
  this.dispatchEvent(event);
2683
2767
  }
2684
2768
  getValueForFormPublisher() {
2685
- let formPublisher = this.getFormPublisher();
2769
+ const formPublisher = this.getFormPublisher();
2686
2770
  if (!formPublisher)
2687
2771
  return null;
2688
2772
  let currentValue = formPublisher[this.name].get();
@@ -2696,7 +2780,7 @@ const Form$1 = (superClass) => {
2696
2780
  currentValue = [];
2697
2781
  }
2698
2782
  currentValue = currentValue.slice(0);
2699
- let idx = currentValue.indexOf(this.value);
2783
+ const idx = currentValue.indexOf(this.value);
2700
2784
  if (this.checked === true && idx === -1 && !this.checksAll())
2701
2785
  currentValue.push(this.value);
2702
2786
  if (this.checked === null && idx !== -1) {
@@ -2720,7 +2804,7 @@ const Form$1 = (superClass) => {
2720
2804
  if (!this.formDataProvider)
2721
2805
  this.formDataProvider = this.getAncestorAttributeValue("formDataProvider");
2722
2806
  const formDataProvider = this.formDataProvider;
2723
- let name = this.getAttribute("name");
2807
+ const name = this.getAttribute("name");
2724
2808
  if (!formDataProvider || !name) {
2725
2809
  return null;
2726
2810
  }
@@ -2728,11 +2812,11 @@ const Form$1 = (superClass) => {
2728
2812
  }
2729
2813
  disconnectedCallback() {
2730
2814
  super.disconnectedCallback();
2731
- let checkAllPublisher = this.getCheckAllPublisher();
2815
+ const checkAllPublisher = this.getCheckAllPublisher();
2732
2816
  if (checkAllPublisher) {
2733
2817
  checkAllPublisher.checkMode.offAssign(this.onChecksAllRequest);
2734
2818
  if (!this.checksAll()) {
2735
- let values = checkAllPublisher.values.get().slice(0);
2819
+ const values = checkAllPublisher.values.get().slice(0);
2736
2820
  const idx = values.indexOf(this.value);
2737
2821
  if (idx != -1) {
2738
2822
  values.splice(idx, 1);
@@ -2746,12 +2830,12 @@ const Form$1 = (superClass) => {
2746
2830
  super.connectedCallback();
2747
2831
  const formPublisher = this.getFormPublisher();
2748
2832
  if (formPublisher && this.name) {
2749
- let publisherValueForName = formPublisher[this.name].get();
2750
- if (publisherValueForName && publisherValueForName.indexOf(this.value) !== -1) {
2833
+ const publisherValueForName = formPublisher[this.name].get();
2834
+ if (publisherValueForName && Array.isArray(publisherValueForName) && publisherValueForName.indexOf(this.value) !== -1) {
2751
2835
  this.checked = true;
2752
2836
  }
2753
2837
  }
2754
- let checkAllPublisher = this.getCheckAllPublisher();
2838
+ const checkAllPublisher = this.getCheckAllPublisher();
2755
2839
  if (checkAllPublisher) {
2756
2840
  checkAllPublisher.checkMode.onAssign(this.onChecksAllRequest);
2757
2841
  if (this.checksAll()) {
@@ -2797,7 +2881,7 @@ const Form$1 = (superClass) => {
2797
2881
  * Copyright 2018 Google LLC
2798
2882
  * SPDX-License-Identifier: BSD-3-Clause
2799
2883
  */
2800
- const l$2 = (l2) => l2 != null ? l2 : b$1;
2884
+ const l$2 = (l2) => null != l2 ? l2 : b$1;
2801
2885
  const fontSize = i$4`:host{--sc-fs:1rem;--sc-lh:1.2;font-size:var(--sc-fs);line-height:var(--sc-lh)}:host([size="2xs"]){--sc-fs:0.625rem}:host([size=xs]){--sc-fs:0.75rem}:host([size=sm]){--sc-fs:0.875rem}:host([size=lg]){--sc-fs:1.125rem}:host([size=xl]){--sc-fs:1.25rem}:host([size="2xl"]){--sc-fs:1.5rem}`;
2802
2886
  var __defProp$13 = Object.defineProperty;
2803
2887
  var __getOwnPropDesc$13 = Object.getOwnPropertyDescriptor;
@@ -2849,7 +2933,7 @@ let Button = class extends Form$1(Form$2(Subscriber$1(s$3))) {
2849
2933
  LocationHandler$1.changeFromComponent(this);
2850
2934
  }
2851
2935
  handleChange(e2) {
2852
- super.handleChange(e2);
2936
+ super.handleChange();
2853
2937
  if (this.pushState || this.goBack !== null) {
2854
2938
  e2 == null ? void 0 : e2.preventDefault();
2855
2939
  e2 == null ? void 0 : e2.stopPropagation();
@@ -2857,7 +2941,7 @@ let Button = class extends Form$1(Form$2(Subscriber$1(s$3))) {
2857
2941
  }
2858
2942
  if (this.hasAttribute("reset")) {
2859
2943
  const resetDataProvider = this.getAttribute("reset");
2860
- let formPublisher = resetDataProvider ? PublisherManager.get(resetDataProvider) : this.getFormPublisher();
2944
+ const formPublisher = resetDataProvider ? PublisherManager.get(resetDataProvider) : this.getFormPublisher();
2861
2945
  if (formPublisher)
2862
2946
  formPublisher.set({});
2863
2947
  }
@@ -2906,7 +2990,7 @@ let Button = class extends Form$1(Form$2(Subscriber$1(s$3))) {
2906
2990
  };
2907
2991
  Button.styles = [
2908
2992
  fontSize,
2909
- i$4`*{box-sizing:border-box}:host{--sc-btn-gap:0.35em;--sc-btn-py:0.25em;--sc-btn-px:1.1em;--sc-btn-fs:var(--sc-fs, 1rem);--sc-btn-fw:var(--sc-btn-font-weight);--sc-btn-ff:var(--sc-btn-font-family);--sc-btn-height:var(--sc-form-height);--sc-btn-color:var(--sc-base-content);--sc-btn-bg:var(--sc-base-100);--sc-btn-border-style:solid;--sc-btn-border-with:var(--sc-form-border-width);--sc-btn-border-color:transparent;--sc-btn-outline-bg-hover:var(--sc-base-100);--sc-btn-ghost-bg-hover:var(--sc-base-100);--sc-btn-active-color:var(--sc-base);--sc-btn-hover-filter:brightness(0.98);--sc-btn-active-filter:brightness(0.97);--sc-btn-active-bg:var(--sc-base-content);--sc-item-rounded-tr:var(--sc-btn-rounded);--sc-item-rounded-tl:var(--sc-btn-rounded);--sc-item-rounded-bl:var(--sc-btn-rounded);--sc-item-rounded-br:var(--sc-btn-rounded);display:inline-flex;vertical-align:middle;box-sizing:border-box;-webkit-print-color-adjust:exact}:host a{display:contents;color:unset}:host button{display:flex;flex:1;box-sizing:border-box;align-items:center;justify-content:center;font-family:var(--sc-btn-ff);font-weight:var(--sc-btn-fw);font-size:var(--sc-btn-fs);cursor:pointer;text-align:center;line-height:1.1;border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl);background:var(--sc-btn-bg);color:var(--sc-btn-color);padding-top:var(--sc-btn-py);padding-bottom:var(--sc-btn-py);padding-left:var(--sc-btn-px);padding-right:var(--sc-btn-px);border:var(--sc-btn-border-with) var(--sc-btn-border-style) var(--sc-btn-border-color);min-height:var(--sc-btn-height)}:host button.has-prefix-or-suffix{gap:var(--sc-btn-gap)}:host button:focus,:host button:hover{filter:var(--sc-btn-hover-filter)}:host button:active{filter:var(--sc-btn-active-filter)}:host([type=default]) button{--sc-btn-color:var(--sc-base-content);--sc-btn-bg:var(--sc-base-100)}:host([type=primary]) button{--sc-btn-color:var(--sc-primary-content);--sc-btn-bg:var(--sc-primary)}:host([type=warning]) button{--sc-btn-color:var(--sc-warning-content);--sc-btn-bg:var(--sc-warning)}:host([type=danger]) button{--sc-btn-color:var(--sc-danger-content);--sc-btn-bg:var(--sc-danger)}:host([type=info]) button{--sc-btn-color:var(--sc-info-content);--sc-btn-bg:var(--sc-info)}:host([type=success]) button{--sc-btn-color:var(--sc-success-content);--sc-btn-bg:var(--sc-success)}:host([type=neutral]) button{--sc-btn-color:var(--sc-base);--sc-btn-bg:var(--sc-base-600)}:host([variant=unstyled]){display:inline-block}:host([variant=unstyled]) button{all:unset;display:contents;cursor:pointer;--sc-btn-height:auto;--sc-btn-width:auto}:host(:not([disabled])) button:focus{box-shadow:0 0 0 .18rem var(--sc-base-300);border-color:var(--sc-base-300)!important;outline:0}:host([variant=ghost][type]) button{color:var(--sc-btn-bg);background:0 0}:host([variant=ghost][type=default]) button{color:var(--sc-btn-color);background:0 0}:host([variant=ghost]) button:hover{background:var(--sc-btn-ghost-bg-hover);filter:none}:host([active][variant=ghost]) button{background:var(--sc-btn-ghost-bg-hover);filter:none}:host([active][variant=ghost]) button:hover{filter:var(--sc-btn-hover-filter)}:host([variant=outline][type]) button{border-color:var(--sc-btn-bg);color:var(--sc-btn-bg);background:0 0}:host([variant=outline][type=default]) button{border-color:var(--sc-base-400);color:var(--sc-base-500);background:0 0}:host([variant=outline]) button:hover{background:var(--sc-btn-outline-bg-hover)}:host([variant=link]:not([size])){vertical-align:baseline;margin-left:.25em;margin-right:.25em}:host([variant=link]:not([size])){font-size:inherit}:host([variant=link]) button{text-decoration:underline;padding:0;background:0 0;border:none;font-size:inherit;min-height:0;color:inherit}:host([variant=link][type]) button{color:var(--sc-btn-bg)}:host([variant=link][type=default]) button{color:inherit}:host([variant=link]) button:focus,:host([variant=link]) button:hover{text-decoration:none}:host([shape=circle]) button{border-radius:50%}:host([shape=circle]) button,:host([shape=square]) button{width:var(--sc-btn-height);height:var(--sc-btn-height);overflow:hidden;padding:0;align-items:center;justify-content:0;text-align:center!important}:host([shape=block]),:host([shape=block]) button{width:100%}:host([disabled]){opacity:.3;pointer-events:none;user-select:none}:host([active]:not([variant=ghost]):not([variant=unstyled])) button{background:var(--sc-btn-active-bg);color:var(--sc-btn-active-color);border-color:var(--sc-btn-active-bg)}:host([align=left]) button{text-align:left}:host([align=right]) button{text-align:right}.main-slot{flex-grow:1;display:block}:host([minWidth]) .main-slot{flex-grow:0}slot[name=prefix],slot[name=suffix]{flex-shrink:0}::slotted(sonic-icon){min-width:1em;text-align:center}:host([icon]) ::slotted(sonic-icon){font-size:1.2em}sonic-tooltip{display:contents}:host(:not([active])) ::slotted([swap=on]){display:none!important}:host([active]) ::slotted([swap=off]){display:none!important}:host([loading]){pointer-events:none;position:relative}:host([loading]) slot{opacity:0!important;pointer-events:none}:host([loading]) .loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;line-height:0;height:var(--sc-btn-ff);width:var(--sc-btn-ff);animation:rotation 2s infinite linear}@keyframes rotation{from{transform-origin:50% 50%;transform:translate(-50%,-50%) rotate(0)}to{transform-origin:50% 50%;transform:translate(-50%,-50%) rotate(359deg)}}`
2993
+ i$4`*{box-sizing:border-box}:host{--sc-btn-gap:0.35em;--sc-btn-py:0.25em;--sc-btn-px:1.1em;--sc-btn-fs:var(--sc-fs, 1rem);--sc-btn-fw:var(--sc-btn-font-weight);--sc-btn-ff:var(--sc-btn-font-family);--sc-btn-height:var(--sc-form-height);--btn-color:var(--sc-btn-color, var(--sc-base-content));--btn-bg:var(--sc-btn-bg, var(--sc-base-100));--sc-btn-border-style:solid;--sc-btn-border-width:var(--sc-form-border-width);--sc-btn-border-color:transparent;--btn-outline-bg-hover:var(--sc-btn-outline-bg-hover, var(--sc-base-100));--sc-btn-ghost-bg-hover:var(--sc-base-100);--sc-btn-active-color:var(--sc-base);--sc-btn-hover-filter:brightness(0.98);--sc-btn-active-filter:brightness(0.97);--sc-btn-active-bg:var(--sc-base-content);--sc-item-rounded-tr:var(--sc-btn-rounded);--sc-item-rounded-tl:var(--sc-btn-rounded);--sc-item-rounded-bl:var(--sc-btn-rounded);--sc-item-rounded-br:var(--sc-btn-rounded);display:inline-flex;vertical-align:middle;box-sizing:border-box;-webkit-print-color-adjust:exact}:host a{display:contents;color:unset}:host button{display:flex;flex:1;box-sizing:border-box;align-items:center;justify-content:center;font-family:var(--sc-btn-ff);font-weight:var(--sc-btn-fw);font-size:var(--sc-btn-fs);cursor:pointer;text-align:center;line-height:1.1;border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl);background:var(--btn-bg);color:var(--btn-color);padding-top:var(--sc-btn-py);padding-bottom:var(--sc-btn-py);padding-left:var(--sc-btn-px);padding-right:var(--sc-btn-px);border:var(--sc-btn-border-width) var(--sc-btn-border-style) var(--sc-btn-border-color);min-height:var(--sc-btn-height)}:host button.has-prefix-or-suffix{gap:var(--sc-btn-gap)}:host button:focus,:host button:hover{filter:var(--sc-btn-hover-filter)}:host button:active{filter:var(--sc-btn-active-filter)}:host([type=default]) button{--btn-color:var(--sc-base-content);--btn-bg:var(--sc-base-100)}:host([type=primary]) button{--btn-color:var(--sc-primary-content);--btn-bg:var(--sc-primary)}:host([type=warning]) button{--btn-color:var(--sc-warning-content);--btn-bg:var(--sc-warning)}:host([type=danger]) button{--btn-color:var(--sc-danger-content);--btn-bg:var(--sc-danger)}:host([type=info]) button{--btn-color:var(--sc-info-content);--btn-bg:var(--sc-info)}:host([type=success]) button{--btn-color:var(--sc-success-content);--btn-bg:var(--sc-success)}:host([type=neutral]) button{--btn-color:var(--sc-base);--btn-bg:var(--sc-base-600)}:host([type=custom]) button{--btn-color:var(--sc-btn-custom-color);--btn-bg:var(--sc-btn-custom-bg)}:host([variant=unstyled]){display:inline-block}:host([variant=unstyled]) button{all:unset;display:contents;cursor:pointer;--sc-btn-height:auto;--sc-btn-width:auto}:host(:not([disabled])) button:focus{box-shadow:0 0 0 .18rem var(--sc-base-300);border-color:var(--sc-base-300)!important;outline:0}:host([variant=ghost][type]) button{color:var(--btn-bg);background:0 0}:host([variant=ghost][type=default]) button{color:var(--btn-color);background:0 0}:host([variant=ghost]) button:hover{background:var(--sc-btn-ghost-bg-hover);filter:none}:host([active][variant=ghost]) button{background:var(--sc-btn-ghost-bg-hover);filter:none}:host([active][variant=ghost]) button:hover{filter:var(--sc-btn-hover-filter)}:host([variant=outline][type]) button{border-color:var(--btn-bg);color:var(--btn-bg);background:0 0}:host([variant=outline][type=default]) button{border-color:var(--sc-base-400);color:var(--sc-base-500);background:0 0}:host([variant=outline]) button:hover{background:var(--btn-outline-bg-hover)}:host([variant=link]:not([size])){vertical-align:baseline;margin-left:.25em;margin-right:.25em}:host([variant=link]:not([size])){font-size:inherit}:host([variant=link]) button{text-decoration:underline;padding:0;background:0 0;border:none;font-size:inherit;min-height:0;color:inherit}:host([variant=link][type]) button{color:var(--btn-bg)}:host([variant=link][type=default]) button{color:inherit}:host([variant=link]) button:focus,:host([variant=link]) button:hover{text-decoration:none}:host([shape=circle]) button{border-radius:50%}:host([shape=circle]) button,:host([shape=square]) button{width:var(--sc-btn-height);height:var(--sc-btn-height);padding:0;align-items:center;justify-content:0;text-align:center!important}:host([shape=block]),:host([shape=block]) button{width:100%}:host([disabled]){opacity:.3;pointer-events:none;user-select:none}:host([active]:not([variant=ghost]):not([variant=unstyled])) button{background:var(--sc-btn-active-bg);color:var(--sc-btn-active-color);border-color:var(--sc-btn-active-bg)}:host([align=left]) button{text-align:left}:host([align=right]) button{text-align:right}.main-slot{flex-grow:1;display:block}:host([minWidth]) .main-slot{flex-grow:0}slot[name=prefix],slot[name=suffix]{flex-shrink:0}::slotted(sonic-icon){min-width:1em;text-align:center}:host([icon]) ::slotted(sonic-icon){font-size:1.2em}sonic-tooltip{display:contents}:host(:not([active])) ::slotted([swap=on]){display:none!important}:host([active]) ::slotted([swap=off]){display:none!important}:host([loading]){pointer-events:none;position:relative}:host([loading]) slot{opacity:0!important;pointer-events:none}:host([loading]) .loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;line-height:0;height:var(--sc-btn-ff);width:var(--sc-btn-ff);animation:rotation 2s infinite linear}@keyframes rotation{from{transform-origin:50% 50%;transform:translate(-50%,-50%) rotate(0)}to{transform-origin:50% 50%;transform:translate(-50%,-50%) rotate(359deg)}}`
2910
2994
  ];
2911
2995
  __decorateClass$13([
2912
2996
  e$7({ type: String, reflect: true })
@@ -2996,7 +3080,7 @@ let Loader = class extends s$3 {
2996
3080
  static show(conf) {
2997
3081
  if (!Loader.loader)
2998
3082
  Loader.loader = document.createElement("sonic-loader");
2999
- let loader = Loader.loader;
3083
+ const loader = Loader.loader;
3000
3084
  if (!conf)
3001
3085
  conf = {};
3002
3086
  if (conf.mode)
@@ -3036,17 +3120,17 @@ Loader = __decorateClass$12([
3036
3120
  * Copyright 2020 Google LLC
3037
3121
  * SPDX-License-Identifier: BSD-3-Clause
3038
3122
  */
3039
- const { I: l$1 } = L, e$1 = (o2) => o2.strings === void 0, c$2 = () => document.createComment(""), r$2 = (o2, t2, i2) => {
3123
+ const { I: l$1 } = L, e$1 = (o2) => void 0 === o2.strings, c$2 = () => document.createComment(""), r$2 = (o2, t2, i2) => {
3040
3124
  var n2;
3041
- const d2 = o2._$AA.parentNode, v2 = t2 === void 0 ? o2._$AB : t2._$AA;
3042
- if (i2 === void 0) {
3125
+ const d2 = o2._$AA.parentNode, v2 = void 0 === t2 ? o2._$AB : t2._$AA;
3126
+ if (void 0 === i2) {
3043
3127
  const t3 = d2.insertBefore(c$2(), v2), n3 = d2.insertBefore(c$2(), v2);
3044
3128
  i2 = new l$1(t3, n3, o2, o2.options);
3045
3129
  } else {
3046
3130
  const l2 = i2._$AB.nextSibling, t3 = i2._$AM, e2 = t3 !== o2;
3047
3131
  if (e2) {
3048
3132
  let l3;
3049
- (n2 = i2._$AQ) === null || n2 === void 0 || n2.call(i2, o2), i2._$AM = o2, i2._$AP !== void 0 && (l3 = o2._$AU) !== t3._$AU && i2._$AP(l3);
3133
+ null === (n2 = i2._$AQ) || void 0 === n2 || n2.call(i2, o2), i2._$AM = o2, void 0 !== i2._$AP && (l3 = o2._$AU) !== t3._$AU && i2._$AP(l3);
3050
3134
  }
3051
3135
  if (l2 !== v2 || e2) {
3052
3136
  let o3 = i2._$AA;
@@ -3059,7 +3143,7 @@ const { I: l$1 } = L, e$1 = (o2) => o2.strings === void 0, c$2 = () => document.
3059
3143
  return i2;
3060
3144
  }, u$1 = (o2, l2, t2 = o2) => (o2._$AI(l2, t2), o2), f$1 = {}, s$2 = (o2, l2 = f$1) => o2._$AH = l2, m = (o2) => o2._$AH, p$1 = (o2) => {
3061
3145
  var l2;
3062
- (l2 = o2._$AP) === null || l2 === void 0 || l2.call(o2, false, true);
3146
+ null === (l2 = o2._$AP) || void 0 === l2 || l2.call(o2, false, true);
3063
3147
  let t2 = o2._$AA;
3064
3148
  const i2 = o2._$AB.nextSibling;
3065
3149
  for (; t2 !== i2; ) {
@@ -3084,7 +3168,7 @@ const u = (e2, s2, t2) => {
3084
3168
  }
3085
3169
  ht(e2, s2, t2) {
3086
3170
  let r2;
3087
- t2 === void 0 ? t2 = s2 : s2 !== void 0 && (r2 = s2);
3171
+ void 0 === t2 ? t2 = s2 : void 0 !== s2 && (r2 = s2);
3088
3172
  const l2 = [], o2 = [];
3089
3173
  let i2 = 0;
3090
3174
  for (const s3 of e2)
@@ -3099,12 +3183,12 @@ const u = (e2, s2, t2) => {
3099
3183
  const a2 = m(s2), { values: p2, keys: v2 } = this.ht(t2, r2, c2);
3100
3184
  if (!Array.isArray(a2))
3101
3185
  return this.ut = v2, p2;
3102
- const h2 = (d2 = this.ut) !== null && d2 !== void 0 ? d2 : this.ut = [], m$12 = [];
3186
+ const h2 = null !== (d2 = this.ut) && void 0 !== d2 ? d2 : this.ut = [], m$12 = [];
3103
3187
  let y2, x2, j2 = 0, k2 = a2.length - 1, w2 = 0, A2 = p2.length - 1;
3104
3188
  for (; j2 <= k2 && w2 <= A2; )
3105
- if (a2[j2] === null)
3189
+ if (null === a2[j2])
3106
3190
  j2++;
3107
- else if (a2[k2] === null)
3191
+ else if (null === a2[k2])
3108
3192
  k2--;
3109
3193
  else if (h2[j2] === v2[w2])
3110
3194
  m$12[w2] = u$1(a2[j2], p2[w2]), j2++, w2++;
@@ -3114,10 +3198,10 @@ const u = (e2, s2, t2) => {
3114
3198
  m$12[A2] = u$1(a2[j2], p2[A2]), r$2(s2, m$12[A2 + 1], a2[j2]), j2++, A2--;
3115
3199
  else if (h2[k2] === v2[w2])
3116
3200
  m$12[w2] = u$1(a2[k2], p2[w2]), r$2(s2, a2[j2], a2[k2]), k2--, w2++;
3117
- else if (y2 === void 0 && (y2 = u(v2, w2, A2), x2 = u(h2, j2, k2)), y2.has(h2[j2]))
3201
+ else if (void 0 === y2 && (y2 = u(v2, w2, A2), x2 = u(h2, j2, k2)), y2.has(h2[j2]))
3118
3202
  if (y2.has(h2[k2])) {
3119
- const e2 = x2.get(v2[w2]), t3 = e2 !== void 0 ? a2[e2] : null;
3120
- if (t3 === null) {
3203
+ const e2 = x2.get(v2[w2]), t3 = void 0 !== e2 ? a2[e2] : null;
3204
+ if (null === t3) {
3121
3205
  const e3 = r$2(s2, a2[j2]);
3122
3206
  u$1(e3, p2[w2]), m$12[w2] = e3;
3123
3207
  } else
@@ -3133,7 +3217,7 @@ const u = (e2, s2, t2) => {
3133
3217
  }
3134
3218
  for (; j2 <= k2; ) {
3135
3219
  const e2 = a2[j2++];
3136
- e2 !== null && p$1(e2);
3220
+ null !== e2 && p$1(e2);
3137
3221
  }
3138
3222
  return this.ut = v2, s$2(s2, m$12), x$1;
3139
3223
  }
@@ -3146,22 +3230,22 @@ const u = (e2, s2, t2) => {
3146
3230
  const s$1 = (i2, t2) => {
3147
3231
  var e2, o2;
3148
3232
  const r2 = i2._$AN;
3149
- if (r2 === void 0)
3233
+ if (void 0 === r2)
3150
3234
  return false;
3151
3235
  for (const i3 of r2)
3152
- (o2 = (e2 = i3)._$AO) === null || o2 === void 0 || o2.call(e2, t2, false), s$1(i3, t2);
3236
+ null === (o2 = (e2 = i3)._$AO) || void 0 === o2 || o2.call(e2, t2, false), s$1(i3, t2);
3153
3237
  return true;
3154
3238
  }, o$3 = (i2) => {
3155
3239
  let t2, e2;
3156
3240
  do {
3157
- if ((t2 = i2._$AM) === void 0)
3241
+ if (void 0 === (t2 = i2._$AM))
3158
3242
  break;
3159
3243
  e2 = t2._$AN, e2.delete(i2), i2 = t2;
3160
- } while ((e2 == null ? void 0 : e2.size) === 0);
3244
+ } while (0 === (null == e2 ? void 0 : e2.size));
3161
3245
  }, r$1 = (i2) => {
3162
3246
  for (let t2; t2 = i2._$AM; i2 = t2) {
3163
3247
  let e2 = t2._$AN;
3164
- if (e2 === void 0)
3248
+ if (void 0 === e2)
3165
3249
  t2._$AN = e2 = /* @__PURE__ */ new Set();
3166
3250
  else if (e2.has(i2))
3167
3251
  break;
@@ -3169,23 +3253,23 @@ const s$1 = (i2, t2) => {
3169
3253
  }
3170
3254
  };
3171
3255
  function n$1(i2) {
3172
- this._$AN !== void 0 ? (o$3(this), this._$AM = i2, r$1(this)) : this._$AM = i2;
3256
+ void 0 !== this._$AN ? (o$3(this), this._$AM = i2, r$1(this)) : this._$AM = i2;
3173
3257
  }
3174
3258
  function h$1(i2, t2 = false, e2 = 0) {
3175
3259
  const r2 = this._$AH, n2 = this._$AN;
3176
- if (n2 !== void 0 && n2.size !== 0)
3260
+ if (void 0 !== n2 && 0 !== n2.size)
3177
3261
  if (t2)
3178
3262
  if (Array.isArray(r2))
3179
3263
  for (let i3 = e2; i3 < r2.length; i3++)
3180
3264
  s$1(r2[i3], false), o$3(r2[i3]);
3181
3265
  else
3182
- r2 != null && (s$1(r2, false), o$3(r2));
3266
+ null != r2 && (s$1(r2, false), o$3(r2));
3183
3267
  else
3184
3268
  s$1(this, i2);
3185
3269
  }
3186
3270
  const l = (i2) => {
3187
3271
  var t$12, s2, o2, r2;
3188
- i2.type == t.CHILD && ((t$12 = (o2 = i2)._$AP) !== null && t$12 !== void 0 || (o2._$AP = h$1), (s2 = (r2 = i2)._$AQ) !== null && s2 !== void 0 || (r2._$AQ = n$1));
3272
+ i2.type == t.CHILD && (null !== (t$12 = (o2 = i2)._$AP) && void 0 !== t$12 || (o2._$AP = h$1), null !== (s2 = (r2 = i2)._$AQ) && void 0 !== s2 || (r2._$AQ = n$1));
3189
3273
  };
3190
3274
  class c extends i$2 {
3191
3275
  constructor() {
@@ -3196,7 +3280,7 @@ class c extends i$2 {
3196
3280
  }
3197
3281
  _$AO(i2, t2 = true) {
3198
3282
  var e2, r2;
3199
- i2 !== this.isConnected && (this.isConnected = i2, i2 ? (e2 = this.reconnected) === null || e2 === void 0 || e2.call(this) : (r2 = this.disconnected) === null || r2 === void 0 || r2.call(this)), t2 && (s$1(this, i2), o$3(this));
3283
+ i2 !== this.isConnected && (this.isConnected = i2, i2 ? null === (e2 = this.reconnected) || void 0 === e2 || e2.call(this) : null === (r2 = this.disconnected) || void 0 === r2 || r2.call(this)), t2 && (s$1(this, i2), o$3(this));
3200
3284
  }
3201
3285
  setValue(t2) {
3202
3286
  if (e$1(this._$Ct))
@@ -3215,10 +3299,10 @@ const i = /* @__PURE__ */ new WeakMap();
3215
3299
  let h = 0;
3216
3300
  const r = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new WeakSet(), a = () => new Promise((t2) => requestAnimationFrame(t2)), f = [{ opacity: 0 }], p = [{ opacity: 0 }, { opacity: 1 }], g = (t2, i2) => {
3217
3301
  const s2 = t2 - i2;
3218
- return s2 === 0 ? void 0 : s2;
3302
+ return 0 === s2 ? void 0 : s2;
3219
3303
  }, w = (t2, i2) => {
3220
3304
  const s2 = t2 / i2;
3221
- return s2 === 1 ? void 0 : s2;
3305
+ return 1 === s2 ? void 0 : s2;
3222
3306
  }, A = { left: (t2, i2) => {
3223
3307
  const s2 = g(t2, i2);
3224
3308
  return { value: s2, transform: s2 && `translateX(${s2}px)` };
@@ -3240,13 +3324,13 @@ class S extends c {
3240
3324
  }
3241
3325
  createFinished() {
3242
3326
  var t2;
3243
- (t2 = this.resolveFinished) === null || t2 === void 0 || t2.call(this), this.finished = new Promise((t3) => {
3327
+ null === (t2 = this.resolveFinished) || void 0 === t2 || t2.call(this), this.finished = new Promise((t3) => {
3244
3328
  this.h = t3;
3245
3329
  });
3246
3330
  }
3247
3331
  async resolveFinished() {
3248
3332
  var t2;
3249
- (t2 = this.h) === null || t2 === void 0 || t2.call(this), this.h = void 0;
3333
+ null === (t2 = this.h) || void 0 === t2 || t2.call(this), this.h = void 0;
3250
3334
  }
3251
3335
  render(i2) {
3252
3336
  return b$1;
@@ -3256,24 +3340,24 @@ class S extends c {
3256
3340
  }
3257
3341
  isDisabled() {
3258
3342
  var t2;
3259
- return this.options.disabled || ((t2 = this.getController()) === null || t2 === void 0 ? void 0 : t2.disabled);
3343
+ return this.options.disabled || (null === (t2 = this.getController()) || void 0 === t2 ? void 0 : t2.disabled);
3260
3344
  }
3261
3345
  update(t2, [i2]) {
3262
3346
  var s2;
3263
- const e2 = this.l === void 0;
3264
- return e2 && (this.l = (s2 = t2.options) === null || s2 === void 0 ? void 0 : s2.host, this.l.addController(this), this.element = t2.element, x.set(this.element, this)), this.optionsOrCallback = i2, (e2 || typeof i2 != "function") && this.u(i2), this.render(i2);
3347
+ const e2 = void 0 === this.l;
3348
+ return e2 && (this.l = null === (s2 = t2.options) || void 0 === s2 ? void 0 : s2.host, this.l.addController(this), this.element = t2.element, x.set(this.element, this)), this.optionsOrCallback = i2, (e2 || "function" != typeof i2) && this.u(i2), this.render(i2);
3265
3349
  }
3266
3350
  u(t2) {
3267
3351
  var i2, s2;
3268
- t2 = t2 != null ? t2 : {};
3352
+ t2 = null != t2 ? t2 : {};
3269
3353
  const e2 = this.getController();
3270
- e2 !== void 0 && ((t2 = __spreadValues(__spreadValues({}, e2.defaultOptions), t2)).keyframeOptions = __spreadValues(__spreadValues({}, e2.defaultOptions.keyframeOptions), t2.keyframeOptions)), (i2 = (s2 = t2).properties) !== null && i2 !== void 0 || (s2.properties = j), this.options = t2;
3354
+ void 0 !== e2 && ((t2 = { ...e2.defaultOptions, ...t2 }).keyframeOptions = { ...e2.defaultOptions.keyframeOptions, ...t2.keyframeOptions }), null !== (i2 = (s2 = t2).properties) && void 0 !== i2 || (s2.properties = j), this.options = t2;
3271
3355
  }
3272
3356
  v() {
3273
3357
  const t2 = {}, i2 = this.element.getBoundingClientRect(), s2 = getComputedStyle(this.element);
3274
3358
  return this.options.properties.forEach((e2) => {
3275
3359
  var o2;
3276
- const h2 = (o2 = i2[e2]) !== null && o2 !== void 0 ? o2 : A[e2] ? void 0 : s2[e2], r2 = Number(h2);
3360
+ const h2 = null !== (o2 = i2[e2]) && void 0 !== o2 ? o2 : A[e2] ? void 0 : s2[e2], r2 = Number(h2);
3277
3361
  t2[e2] = isNaN(r2) ? h2 + "" : r2;
3278
3362
  }), t2;
3279
3363
  }
@@ -3290,7 +3374,7 @@ class S extends c {
3290
3374
  }
3291
3375
  hostUpdate() {
3292
3376
  var t2;
3293
- typeof this.optionsOrCallback == "function" && this.u(this.optionsOrCallback()), this.p() && (this.g = this.v(), this.t = (t2 = this.t) !== null && t2 !== void 0 ? t2 : this.element.parentNode, this.i = this.element.nextSibling);
3377
+ "function" == typeof this.optionsOrCallback && this.u(this.optionsOrCallback()), this.p() && (this.g = this.v(), this.t = null !== (t2 = this.t) && void 0 !== t2 ? t2 : this.element.parentNode, this.i = this.element.nextSibling);
3294
3378
  }
3295
3379
  async hostUpdated() {
3296
3380
  if (!this.o || !this.element.isConnected || this.options.skipInitial && !this.isHostRendered)
@@ -3298,7 +3382,7 @@ class S extends c {
3298
3382
  let t2;
3299
3383
  this.prepare(), await a;
3300
3384
  const i2 = this._(), s2 = this.A(this.options.keyframeOptions, i2), e2 = this.v();
3301
- if (this.g !== void 0) {
3385
+ if (void 0 !== this.g) {
3302
3386
  const { from: s3, to: o2 } = this.O(this.g, e2, i2);
3303
3387
  this.log("measured", [this.g, e2, s3, o2]), t2 = this.calculateKeyframes(s3, o2);
3304
3388
  } else {
@@ -3306,7 +3390,7 @@ class S extends c {
3306
3390
  if (s3) {
3307
3391
  r.delete(this.options.inId);
3308
3392
  const { from: o2, to: n2 } = this.O(s3, e2, i2);
3309
- t2 = this.calculateKeyframes(o2, n2), t2 = this.options.in ? [__spreadValues(__spreadValues({}, this.options.in[0]), t2[0]), ...this.options.in.slice(1), t2[1]] : t2, h++, t2.forEach((t3) => t3.zIndex = h);
3393
+ t2 = this.calculateKeyframes(o2, n2), t2 = this.options.in ? [{ ...this.options.in[0], ...t2[0] }, ...this.options.in.slice(1), t2[1]] : t2, h++, t2.forEach((t3) => t3.zIndex = h);
3310
3394
  } else
3311
3395
  this.options.in && (t2 = [...this.options.in, {}]);
3312
3396
  }
@@ -3314,11 +3398,11 @@ class S extends c {
3314
3398
  }
3315
3399
  resetStyles() {
3316
3400
  var t2;
3317
- this.P !== void 0 && (this.element.setAttribute("style", (t2 = this.P) !== null && t2 !== void 0 ? t2 : ""), this.P = void 0);
3401
+ void 0 !== this.P && (this.element.setAttribute("style", null !== (t2 = this.P) && void 0 !== t2 ? t2 : ""), this.P = void 0);
3318
3402
  }
3319
3403
  commitStyles() {
3320
3404
  var t2, i2;
3321
- this.P = this.element.getAttribute("style"), (t2 = this.webAnimation) === null || t2 === void 0 || t2.commitStyles(), (i2 = this.webAnimation) === null || i2 === void 0 || i2.cancel();
3405
+ this.P = this.element.getAttribute("style"), null === (t2 = this.webAnimation) || void 0 === t2 || t2.commitStyles(), null === (i2 = this.webAnimation) || void 0 === i2 || i2.cancel();
3322
3406
  }
3323
3407
  reconnected() {
3324
3408
  }
@@ -3326,15 +3410,15 @@ class S extends c {
3326
3410
  var t2;
3327
3411
  if (!this.o)
3328
3412
  return;
3329
- if (this.options.id !== void 0 && r.set(this.options.id, this.g), this.options.out === void 0)
3413
+ if (void 0 !== this.options.id && r.set(this.options.id, this.g), void 0 === this.options.out)
3330
3414
  return;
3331
- if (this.prepare(), await a(), (t2 = this.t) === null || t2 === void 0 ? void 0 : t2.isConnected) {
3415
+ if (this.prepare(), await a(), null === (t2 = this.t) || void 0 === t2 ? void 0 : t2.isConnected) {
3332
3416
  const t3 = this.i && this.i.parentNode === this.t ? this.i : null;
3333
3417
  if (this.t.insertBefore(this.element, t3), this.options.stabilizeOut) {
3334
3418
  const t4 = this.v();
3335
3419
  this.log("stabilizing out");
3336
3420
  const i3 = this.g.left - t4.left, s2 = this.g.top - t4.top;
3337
- !(getComputedStyle(this.element).position === "static") || i3 === 0 && s2 === 0 || (this.element.style.position = "relative"), i3 !== 0 && (this.element.style.left = i3 + "px"), s2 !== 0 && (this.element.style.top = s2 + "px");
3421
+ !("static" === getComputedStyle(this.element).position) || 0 === i3 && 0 === s2 || (this.element.style.position = "relative"), 0 !== i3 && (this.element.style.left = i3 + "px"), 0 !== s2 && (this.element.style.top = s2 + "px");
3338
3422
  }
3339
3423
  }
3340
3424
  const i2 = this.A(this.options.keyframeOptions);
@@ -3345,15 +3429,15 @@ class S extends c {
3345
3429
  }
3346
3430
  start() {
3347
3431
  var t2, i2;
3348
- (i2 = (t2 = this.options).onStart) === null || i2 === void 0 || i2.call(t2, this);
3432
+ null === (i2 = (t2 = this.options).onStart) || void 0 === i2 || i2.call(t2, this);
3349
3433
  }
3350
3434
  didFinish(t2) {
3351
3435
  var i2, s2;
3352
- t2 && ((s2 = (i2 = this.options).onComplete) === null || s2 === void 0 || s2.call(i2, this)), this.g = void 0, this.animatingProperties = void 0, this.frames = void 0, this.resolveFinished();
3436
+ t2 && (null === (s2 = (i2 = this.options).onComplete) || void 0 === s2 || s2.call(i2, this)), this.g = void 0, this.animatingProperties = void 0, this.frames = void 0, this.resolveFinished();
3353
3437
  }
3354
3438
  _() {
3355
3439
  const t2 = [];
3356
- for (let i2 = this.element.parentNode; i2; i2 = i2 == null ? void 0 : i2.parentNode) {
3440
+ for (let i2 = this.element.parentNode; i2; i2 = null == i2 ? void 0 : i2.parentNode) {
3357
3441
  const s2 = x.get(i2);
3358
3442
  s2 && !s2.isDisabled() && s2 && t2.push(s2);
3359
3443
  }
@@ -3366,16 +3450,16 @@ class S extends c {
3366
3450
  }), t2;
3367
3451
  }
3368
3452
  A(t2, i2 = this._()) {
3369
- const s2 = __spreadValues({}, b);
3453
+ const s2 = { ...b };
3370
3454
  return i2.forEach((t3) => Object.assign(s2, t3.options.keyframeOptions)), Object.assign(s2, t2), s2;
3371
3455
  }
3372
3456
  O(t2, i2, s2) {
3373
- t2 = __spreadValues({}, t2), i2 = __spreadValues({}, i2);
3374
- const e2 = s2.map((t3) => t3.animatingProperties).filter((t3) => t3 !== void 0);
3457
+ t2 = { ...t2 }, i2 = { ...i2 };
3458
+ const e2 = s2.map((t3) => t3.animatingProperties).filter((t3) => void 0 !== t3);
3375
3459
  let o2 = 1, h2 = 1;
3376
- return e2 !== void 0 && (e2.forEach((t3) => {
3460
+ return void 0 !== e2 && (e2.forEach((t3) => {
3377
3461
  t3.width && (o2 /= t3.width), t3.height && (h2 /= t3.height);
3378
- }), t2.left !== void 0 && i2.left !== void 0 && (t2.left = o2 * t2.left, i2.left = o2 * i2.left), t2.top !== void 0 && i2.top !== void 0 && (t2.top = h2 * t2.top, i2.top = h2 * i2.top)), { from: t2, to: i2 };
3462
+ }), void 0 !== t2.left && void 0 !== i2.left && (t2.left = o2 * t2.left, i2.left = o2 * i2.left), void 0 !== t2.top && void 0 !== i2.top && (t2.top = h2 * t2.top, i2.top = h2 * i2.top)), { from: t2, to: i2 };
3379
3463
  }
3380
3464
  calculateKeyframes(t2, i2, s2 = false) {
3381
3465
  var e2;
@@ -3386,33 +3470,33 @@ class S extends c {
3386
3470
  const a2 = t2[s3], l2 = i2[s3];
3387
3471
  if (s3 in A) {
3388
3472
  const t3 = A[s3];
3389
- if (a2 === void 0 || l2 === void 0)
3473
+ if (void 0 === a2 || void 0 === l2)
3390
3474
  continue;
3391
3475
  const i3 = t3(a2, l2);
3392
- i3.transform !== void 0 && (n2[s3] = i3.value, r2 = true, o2.transform = `${(e2 = o2.transform) !== null && e2 !== void 0 ? e2 : ""} ${i3.transform}`);
3476
+ void 0 !== i3.transform && (n2[s3] = i3.value, r2 = true, o2.transform = `${null !== (e2 = o2.transform) && void 0 !== e2 ? e2 : ""} ${i3.transform}`);
3393
3477
  } else
3394
- a2 !== l2 && a2 !== void 0 && l2 !== void 0 && (r2 = true, o2[s3] = a2, h2[s3] = l2);
3478
+ a2 !== l2 && void 0 !== a2 && void 0 !== l2 && (r2 = true, o2[s3] = a2, h2[s3] = l2);
3395
3479
  }
3396
3480
  return o2.transformOrigin = h2.transformOrigin = s2 ? "center center" : "top left", this.animatingProperties = n2, r2 ? [o2, h2] : void 0;
3397
3481
  }
3398
3482
  async animate(t2, i2 = this.options.keyframeOptions) {
3399
3483
  this.start(), this.frames = t2;
3400
3484
  let s2 = false;
3401
- if (!this.isAnimating() && !this.isDisabled() && (this.options.onFrames && (this.frames = t2 = this.options.onFrames(this), this.log("modified frames", t2)), t2 !== void 0)) {
3485
+ if (!this.isAnimating() && !this.isDisabled() && (this.options.onFrames && (this.frames = t2 = this.options.onFrames(this), this.log("modified frames", t2)), void 0 !== t2)) {
3402
3486
  this.log("animate", [t2, i2]), s2 = true, this.webAnimation = this.element.animate(t2, i2);
3403
3487
  const e2 = this.getController();
3404
- e2 == null || e2.add(this);
3488
+ null == e2 || e2.add(this);
3405
3489
  try {
3406
3490
  await this.webAnimation.finished;
3407
3491
  } catch (t3) {
3408
3492
  }
3409
- e2 == null || e2.remove(this);
3493
+ null == e2 || e2.remove(this);
3410
3494
  }
3411
3495
  return this.didFinish(s2), s2;
3412
3496
  }
3413
3497
  isAnimating() {
3414
3498
  var t2, i2;
3415
- return ((t2 = this.webAnimation) === null || t2 === void 0 ? void 0 : t2.playState) === "running" || ((i2 = this.webAnimation) === null || i2 === void 0 ? void 0 : i2.pending);
3499
+ return "running" === (null === (t2 = this.webAnimation) || void 0 === t2 ? void 0 : t2.playState) || (null === (i2 = this.webAnimation) || void 0 === i2 ? void 0 : i2.pending);
3416
3500
  }
3417
3501
  log(t2, i2) {
3418
3502
  this.shouldLog && !this.isDisabled() && console.log(t2, this.options.id, i2);
@@ -3446,11 +3530,11 @@ class e extends i$2 {
3446
3530
  throw Error(this.constructor.directiveName + "() can only be used in child bindings");
3447
3531
  }
3448
3532
  render(r2) {
3449
- if (r2 === b$1 || r2 == null)
3533
+ if (r2 === b$1 || null == r2)
3450
3534
  return this._t = void 0, this.it = r2;
3451
3535
  if (r2 === x$1)
3452
3536
  return r2;
3453
- if (typeof r2 != "string")
3537
+ if ("string" != typeof r2)
3454
3538
  throw Error(this.constructor.directiveName + "() called with a non-string value");
3455
3539
  if (r2 === this.it)
3456
3540
  return this._t;
@@ -3498,10 +3582,10 @@ function enableCustomLibrary() {
3498
3582
  const _Icons = class {
3499
3583
  static registerIcons(newIcons) {
3500
3584
  const record = icons;
3501
- for (let prefix in newIcons) {
3585
+ for (const prefix in newIcons) {
3502
3586
  const newObj = newIcons[prefix];
3503
3587
  const currentRecord = record[prefix] || {};
3504
- for (let name in newObj) {
3588
+ for (const name in newObj) {
3505
3589
  currentRecord[name] = newObj[name];
3506
3590
  }
3507
3591
  record[prefix] = currentRecord;
@@ -3511,30 +3595,30 @@ const _Icons = class {
3511
3595
  let Icons = _Icons;
3512
3596
  Icons.fontAwesomeNext = {
3513
3597
  get: async (params) => {
3514
- let library = params.library;
3515
- let name = params.name || "";
3598
+ const library = params.library;
3599
+ const name = params.name || "";
3516
3600
  const iconsAsRecord = icons;
3517
3601
  if (library == "custom") {
3518
3602
  enableCustomLibrary();
3519
3603
  }
3520
3604
  if (library && libraries[library]) {
3521
- let libraryItem = libraries[library];
3522
- let prefix = params.prefix || libraryItem.defaultPrefix || "";
3523
- let libIcons = iconsAsRecord[library] || {};
3605
+ const libraryItem = libraries[library];
3606
+ const prefix = params.prefix || libraryItem.defaultPrefix || "";
3607
+ const libIcons = iconsAsRecord[library] || {};
3524
3608
  iconsAsRecord[library] = libIcons;
3525
- let libIconsKey = prefix + "-" + name;
3609
+ const libIconsKey = prefix + "-" + name;
3526
3610
  if (libIcons[libIconsKey])
3527
3611
  return o$2(libIcons[libIconsKey]);
3528
- let url = libraryItem.url.replace("$prefix", prefix).replace("$name", name);
3612
+ const url = libraryItem.url.replace("$prefix", prefix).replace("$name", name);
3529
3613
  if (!loadingGetPromises.has(url)) {
3530
- let promise = new Promise(async (resolve) => {
3531
- let result2 = await fetch(url);
3614
+ const promise = new Promise(async (resolve) => {
3615
+ const result2 = await fetch(url);
3532
3616
  if (!result2.ok) {
3533
3617
  resolve(`<b title="Erreur ${result2.status}">\u{1F636}</b>`);
3534
3618
  return;
3535
3619
  }
3536
3620
  try {
3537
- let text = await result2.text();
3621
+ const text = await result2.text();
3538
3622
  resolve(text);
3539
3623
  } catch (e2) {
3540
3624
  resolve(null);
@@ -3542,7 +3626,7 @@ Icons.fontAwesomeNext = {
3542
3626
  });
3543
3627
  loadingGetPromises.set(url, promise);
3544
3628
  }
3545
- let result = await loadingGetPromises.get(url);
3629
+ const result = await loadingGetPromises.get(url);
3546
3630
  loadingGetPromises.delete(url);
3547
3631
  libIcons[libIconsKey] = result || "";
3548
3632
  return o$2(result);
@@ -3757,7 +3841,8 @@ let SonicToast$1 = class extends s$3 {
3757
3841
  margin: "1rem"
3758
3842
  };
3759
3843
  if (!isIframe) {
3760
- styles = __spreadProps(__spreadValues({}, styles), {
3844
+ styles = {
3845
+ ...styles,
3761
3846
  margin: "0",
3762
3847
  width: "calc(100% - 2.5rem)",
3763
3848
  position: "fixed",
@@ -3766,29 +3851,33 @@ let SonicToast$1 = class extends s$3 {
3766
3851
  zIndex: "10000",
3767
3852
  maxWidth: "64ch",
3768
3853
  flexDirection: "column-reverse"
3769
- });
3854
+ };
3770
3855
  }
3771
3856
  if (!this.toasts)
3772
3857
  return b$1;
3773
- return y`<div aria-live="polite" style="${i$1(styles)}">${c$1(this.toasts, (item) => item.id, (item) => y`<sonic-toast-item maxHeight="${isIframe ? "none" : "10rem"}" status="${l$2(item.status)}" title="${l$2(item.title)}" ?ghost="${item.ghost}" ?dismissForever="${item.dismissForever}" ?preserve="${item.preserve}" id="${l$2(item.id)}" @hide="${() => this.removeItem(item)}" ${$({
3774
- keyframeOptions: {
3775
- duration: 250,
3776
- easing: `cubic-bezier(0.250, 0.250, 0.420, 1.225)`
3777
- },
3778
- in: [{ transform: "translateY(0) scale(1.25)", boxShadow: "0 0 0 rgba(0,0,0,0)", opacity: 0 }],
3779
- out: [
3780
- {
3781
- transform: "scale(.90) ",
3782
- opacity: 0,
3783
- duration: 3e3,
3784
- easing: `ease-in-out`
3785
- }
3786
- ],
3787
- stabilizeOut: true
3788
- })}>${item.text ? o$2(item.text) : ""}</sonic-toast-item>`)}</div>`;
3858
+ return y`<div aria-live="polite" style="${i$1(styles)}">${c$1(
3859
+ this.toasts,
3860
+ (item) => item.id,
3861
+ (item) => y`<sonic-toast-item maxHeight="${isIframe ? "none" : "10rem"}" status="${l$2(item.status)}" title="${l$2(item.title)}" ?ghost="${item.ghost}" ?dismissForever="${item.dismissForever}" ?preserve="${item.preserve}" id="${l$2(item.id)}" @hide="${() => this.removeItem(item)}" ${$({
3862
+ keyframeOptions: {
3863
+ duration: 250,
3864
+ easing: `cubic-bezier(0.250, 0.250, 0.420, 1.225)`
3865
+ },
3866
+ in: [{ transform: "translateY(0) scale(1.25)", boxShadow: "0 0 0 rgba(0,0,0,0)", opacity: 0 }],
3867
+ out: [
3868
+ {
3869
+ transform: "scale(.90) ",
3870
+ opacity: 0,
3871
+ duration: 3e3,
3872
+ easing: `ease-in-out`
3873
+ }
3874
+ ],
3875
+ stabilizeOut: true
3876
+ })}>${item.text ? o$2(item.text) : ""}</sonic-toast-item>`
3877
+ )}</div>`;
3789
3878
  }
3790
3879
  static removeAll() {
3791
- let toastComponent = document.querySelector("sonic-toast");
3880
+ const toastComponent = document.querySelector("sonic-toast");
3792
3881
  if (!toastComponent)
3793
3882
  return;
3794
3883
  toastComponent.toasts = toastComponent.toasts.filter((item) => item.ghost);
@@ -3796,11 +3885,11 @@ let SonicToast$1 = class extends s$3 {
3796
3885
  static add(conf) {
3797
3886
  var _a2;
3798
3887
  if (!document.querySelector("sonic-toast")) {
3799
- let toastComponent2 = document.createElement("sonic-toast");
3800
- let container = document.querySelector("sonic-theme") || document.body;
3888
+ const toastComponent2 = document.createElement("sonic-toast");
3889
+ const container = document.querySelector("sonic-theme") || document.body;
3801
3890
  container.prepend(toastComponent2);
3802
3891
  }
3803
- let toastComponent = document.querySelector("sonic-toast");
3892
+ const toastComponent = document.querySelector("sonic-toast");
3804
3893
  const nextId = (_a2 = conf.id) != null ? _a2 : new Date().valueOf();
3805
3894
  const interactiveRegExp = new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>");
3806
3895
  const hasInteractive = interactiveRegExp.test(conf.text);
@@ -3821,9 +3910,9 @@ let SonicToast$1 = class extends s$3 {
3821
3910
  }
3822
3911
  }
3823
3912
  if (toastComponent.toasts.length > 0) {
3824
- let toastA = __spreadValues({}, currentToast);
3913
+ const toastA = { ...currentToast };
3825
3914
  for (const toast of toastComponent.toasts) {
3826
- let toastB = __spreadValues({}, toast);
3915
+ const toastB = { ...toast };
3827
3916
  toastA.id = toastB.id = 0;
3828
3917
  if (Objects$1.shallowEqual(toastA, toastB)) {
3829
3918
  return null;
@@ -3834,17 +3923,16 @@ let SonicToast$1 = class extends s$3 {
3834
3923
  return currentToast;
3835
3924
  }
3836
3925
  static removeItem(toastToRemove) {
3837
- let toastComponent = document.querySelector("sonic-toast");
3926
+ const toastComponent = document.querySelector("sonic-toast");
3838
3927
  if (!toastComponent)
3839
3928
  return;
3840
- console.log(toastToRemove);
3841
3929
  toastComponent.removeItem(toastToRemove);
3842
3930
  }
3843
3931
  removeItem(toastToRemove) {
3844
3932
  if (!toastToRemove)
3845
3933
  return;
3846
3934
  this.toasts = this.toasts.filter((toast) => {
3847
- toast = __spreadValues({}, toast);
3935
+ toast = { ...toast };
3848
3936
  delete toast.id;
3849
3937
  return !Objects$1.shallowEqual(toast, toastToRemove, false);
3850
3938
  });
@@ -3886,6 +3974,12 @@ const Fetcher$1 = (superClass, propsType) => {
3886
3974
  this.refetchEveryMs = 0;
3887
3975
  this.dataProvider = "";
3888
3976
  }
3977
+ get props() {
3978
+ return super.props;
3979
+ }
3980
+ set props(value) {
3981
+ super.props = value;
3982
+ }
3889
3983
  set endPoint(value) {
3890
3984
  this._endPoint = value;
3891
3985
  if (this.isConnected)
@@ -3903,12 +3997,11 @@ const Fetcher$1 = (superClass, propsType) => {
3903
3997
  this.dispatchEvent(new CustomEvent("loading", { detail: this }));
3904
3998
  this.isLoading = true;
3905
3999
  this.requestUpdate();
3906
- let data;
3907
- let hasLoader = this.isDefaultLoaderEnabled && !this.hasAttribute("noLoader");
4000
+ const hasLoader = this.isDefaultLoaderEnabled && !this.hasAttribute("noLoader");
3908
4001
  if (hasLoader)
3909
4002
  Loader.show();
3910
- let headerData = PublisherManager.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();
3911
- data = await this.api.get(this.endPoint || this.dataProvider || "", headerData);
4003
+ const headerData = PublisherManager.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();
4004
+ let data = await this.api.get(this.endPoint || this.dataProvider || "", headerData);
3912
4005
  if (!data) {
3913
4006
  SonicToast$1.add({ text: "Network Error", status: "error" });
3914
4007
  this.isLoading = false;
@@ -3921,7 +4014,7 @@ const Fetcher$1 = (superClass, propsType) => {
3921
4014
  if (hasLoader)
3922
4015
  Loader.hide();
3923
4016
  if (this.key) {
3924
- let response = data._sonic_http_response_;
4017
+ const response = data._sonic_http_response_;
3925
4018
  data = Objects$1.traverse(data, this.key.split("."), this.hasAttribute("preserveOtherKeys"));
3926
4019
  if (data && Objects$1.isObject(data) && response)
3927
4020
  data._sonic_http_response_ = response;
@@ -3964,18 +4057,17 @@ const Fetcher$1 = (superClass, propsType) => {
3964
4057
  if (lazyLoad === null) {
3965
4058
  return;
3966
4059
  }
3967
- let options = {
4060
+ const options = {
3968
4061
  root: null,
3969
4062
  rootMargin: Math.max(window.innerWidth, window.innerHeight) + "px"
3970
4063
  };
3971
4064
  this.iObserver = new IntersectionObserver((entries) => this.onIntersection(entries), options);
3972
- let that = this;
3973
- let elt = this.shadowRoot ? this.shadowRoot.children[0] : that.children[0];
4065
+ let elt = this.shadowRoot ? this.shadowRoot.children[0] : this.children[0];
3974
4066
  if (elt && elt.nodeName.toLocaleLowerCase() == "slot")
3975
4067
  elt = elt.children[0];
3976
4068
  if (!elt || elt.nodeName.toLocaleLowerCase() == "template") {
3977
4069
  elt = document.createElement("span");
3978
- that.appendChild(elt);
4070
+ this.appendChild(elt);
3979
4071
  }
3980
4072
  if (elt) {
3981
4073
  this.iObserver.observe(elt);
@@ -3991,6 +4083,9 @@ const Fetcher$1 = (superClass, propsType) => {
3991
4083
  }
3992
4084
  }
3993
4085
  }
4086
+ __decorateClass$_([
4087
+ e$7()
4088
+ ], FetcherElement.prototype, "props", 1);
3994
4089
  __decorateClass$_([
3995
4090
  e$7({ type: String })
3996
4091
  ], FetcherElement.prototype, "endPoint", 1);
@@ -4139,13 +4234,16 @@ let List = class extends Fetcher$1(Subscriber$1(TemplatesContainer$1(s$3))) {
4139
4234
  }
4140
4235
  formatProps() {
4141
4236
  let props = this.props;
4142
- let response = props._sonic_http_response_;
4143
- let extractValues = this.hasAttribute("extractValues");
4237
+ if (props == null) {
4238
+ return null;
4239
+ }
4240
+ const response = props._sonic_http_response_;
4241
+ const extractValues = this.hasAttribute("extractValues");
4144
4242
  if (!Array.isArray(props)) {
4145
4243
  if (extractValues) {
4146
4244
  props = Object.entries(props).map(([k2, v2]) => ({ key: k2, value: v2 }));
4147
4245
  } else {
4148
- if (!response || response.ok)
4246
+ if (Objects$1.isObject(props) && Object.keys(props).length > 0 && (!response || response.ok))
4149
4247
  props = [props];
4150
4248
  else {
4151
4249
  props = [];
@@ -4167,30 +4265,41 @@ let List = class extends Fetcher$1(Subscriber$1(TemplatesContainer$1(s$3))) {
4167
4265
  const propsIsBaddlyFormatted = !Objects$1.isObject(this.props);
4168
4266
  if (propsIsBaddlyFormatted)
4169
4267
  return y`<div></div>`;
4170
- let props = this.formatProps();
4171
- if (props.length == 0 && this.templateParts["no-item"]) {
4268
+ const props = this.formatProps();
4269
+ if (((props == null ? void 0 : props.length) || 0) == 0 && this.templateParts["no-item"]) {
4172
4270
  return o$1(this.templateParts["no-item"]);
4173
4271
  }
4174
4272
  const templateCount = this.templateList.length;
4175
4273
  let counter = -1;
4176
4274
  const extractValues = this.hasAttribute("extractValues");
4177
4275
  const separator = this.templateParts["separator"];
4178
- const length = props.length;
4179
- return y`${props.map((item, index) => {
4180
- let templatePartName = item[this.templateKey];
4181
- let hasCustomTemplate = templatePartName && this.templateParts[templatePartName];
4182
- let key = extractValues ? item == null ? void 0 : item[this.idKey] : index;
4276
+ const length = (props == null ? void 0 : props.length) || 0;
4277
+ return y`${props == null ? void 0 : props.map((item, index) => {
4278
+ if (item == null)
4279
+ return b$1;
4280
+ let templatePart = null;
4281
+ let key = index;
4282
+ if (typeof item == "object" && !Array.isArray(item)) {
4283
+ const templatePartName = item[this.templateKey];
4284
+ if (templatePartName && typeof templatePartName == "string") {
4285
+ templatePart = this.templateParts[templatePartName];
4286
+ }
4287
+ if (extractValues)
4288
+ key = item == null ? void 0 : item["key"];
4289
+ }
4183
4290
  if (key == "_sonic_http_response_")
4184
4291
  return b$1;
4185
- let pub = this.publisher[key];
4292
+ if (typeof key != "string" && typeof key != "number")
4293
+ return b$1;
4294
+ const pub = this.publisher[key];
4186
4295
  pub._key_ = key + "";
4187
4296
  counter++;
4188
4297
  const isNotLast = index < length - 1;
4189
- if (hasCustomTemplate)
4298
+ if (templatePart)
4190
4299
  counter = -1;
4191
4300
  return item && y`<sonic-subscriber ?debug="${this.defferedDebug === true}" .bindPublisher="${function() {
4192
4301
  return pub;
4193
- }}" .propertyMap?="${this.itemPropertyMap}" dataProvider="${this.dataProvider}/list-item/${key}">${hasCustomTemplate ? o$1(this.templateParts[templatePartName]) : o$1(this.templateList[counter % templateCount])}</sonic-subscriber>${separator && isNotLast ? o$1(separator) : b$1}`;
4302
+ }}" .propertyMap?="${this.itemPropertyMap}" dataProvider="${this.dataProvider}/list-item/${key}">${templatePart ? o$1(templatePart) : o$1(this.templateList[counter % templateCount])}</sonic-subscriber>${separator && isNotLast ? o$1(separator) : b$1}`;
4194
4303
  })}`;
4195
4304
  }
4196
4305
  };
@@ -4240,7 +4349,7 @@ let Queue = class extends Subscriber$1(s$3) {
4240
4349
  this.nextHadEvent = false;
4241
4350
  }
4242
4351
  disconnectedCallback() {
4243
- for (let dataProvider of this.listDataProviders) {
4352
+ for (const dataProvider of this.listDataProviders) {
4244
4353
  PublisherManager$1.delete(dataProvider);
4245
4354
  }
4246
4355
  super.disconnectedCallback();
@@ -4260,11 +4369,12 @@ let Queue = class extends Subscriber$1(s$3) {
4260
4369
  if (!this.templates)
4261
4370
  this.templates = Array.from(this.querySelectorAll("template"));
4262
4371
  this.lastRequestTime = new Date().getTime();
4263
- this.next();
4372
+ const func = window.requestAnimationFrame;
4373
+ func(() => this.next());
4264
4374
  }
4265
4375
  configFilter() {
4266
4376
  var _a2;
4267
- let dataFilterProvider = this.getAncestorAttributeValue("dataFilterProvider");
4377
+ const dataFilterProvider = this.getAncestorAttributeValue("dataFilterProvider");
4268
4378
  if (!dataFilterProvider)
4269
4379
  return;
4270
4380
  this.filterPublisher = PublisherManager$1.getInstance().get(dataFilterProvider);
@@ -4277,28 +4387,31 @@ let Queue = class extends Subscriber$1(s$3) {
4277
4387
  }
4278
4388
  updateFilteredContent() {
4279
4389
  var _a2;
4280
- let dataProvider = this.dataProviderExpression;
4281
- let split = dataProvider.split("?");
4390
+ const dataProvider = this.dataProviderExpression;
4391
+ const split = dataProvider.split("?");
4282
4392
  split.shift();
4283
- let searchParams = new URLSearchParams(split.join("?"));
4284
- let filterData = (_a2 = this.filterPublisher) == null ? void 0 : _a2.get();
4285
- let filteredFieldsArray = this.filteredFields.split(" ");
4286
- for (let f2 in filterData) {
4287
- if (this.filteredFields && !filteredFieldsArray.includes(f2) || filterData[f2] == null)
4393
+ const searchParams = new URLSearchParams(split.join("?"));
4394
+ const filterData = (_a2 = this.filterPublisher) == null ? void 0 : _a2.get();
4395
+ const filteredFieldsArray = this.filteredFields.split(" ");
4396
+ for (const f2 in filterData) {
4397
+ let value = filterData[f2];
4398
+ if (Array.isArray(value))
4399
+ value = value.filter((v2) => v2 !== null);
4400
+ if (this.filteredFields && !filteredFieldsArray.includes(f2) || value == null || value.toString() === "")
4288
4401
  continue;
4289
- searchParams.set(f2, filterData[f2]);
4402
+ searchParams.set(f2, filterData[f2].toString());
4290
4403
  }
4291
- let searchHash = searchParams.toString();
4404
+ const searchHash = searchParams.toString();
4292
4405
  if (searchHash == this.searchHash)
4293
4406
  return;
4294
4407
  this.searchHash = searchHash;
4295
- for (let dataProvider2 of this.listDataProviders) {
4408
+ for (const dataProvider2 of this.listDataProviders) {
4296
4409
  PublisherManager$1.delete(dataProvider2);
4297
4410
  }
4298
4411
  this.listDataProviders = [];
4299
4412
  clearTimeout(this.filterTimeoutId);
4300
4413
  this.filterTimeoutId = setTimeout(() => {
4301
- let count = this.resultCount;
4414
+ const count = this.resultCount;
4302
4415
  this.props = null;
4303
4416
  this.resultCount = count;
4304
4417
  this.requestId++;
@@ -4327,7 +4440,7 @@ let Queue = class extends Subscriber$1(s$3) {
4327
4440
  }
4328
4441
  }
4329
4442
  if (!Array.isArray(this.props)) {
4330
- let newProps2 = [];
4443
+ const newProps2 = [];
4331
4444
  newProps2.resultCount = this.resultCount;
4332
4445
  this.props = newProps2;
4333
4446
  } else {
@@ -4342,20 +4455,22 @@ let Queue = class extends Subscriber$1(s$3) {
4342
4455
  if (this.limit > 15)
4343
4456
  this.limit = 15;
4344
4457
  let dataProvider = this.dataProviderExpression.replace("$offset", offset + "").replace("$limit", this.limit + "");
4345
- let split = dataProvider.split("?");
4346
- let endpoint = split.shift();
4347
- let searchParams = new URLSearchParams(split.join("?"));
4348
- let filterData = (_a2 = this.filterPublisher) == null ? void 0 : _a2.get();
4349
- let filteredFieldsArray = this.filteredFields.split(" ");
4350
- for (let f2 in filterData) {
4458
+ const split = dataProvider.split("?");
4459
+ const endpoint = split.shift();
4460
+ const searchParams = new URLSearchParams(split.join("?"));
4461
+ const filterData = (_a2 = this.filterPublisher) == null ? void 0 : _a2.get();
4462
+ const filteredFieldsArray = this.filteredFields.split(" ");
4463
+ for (const f2 in filterData) {
4351
4464
  if (this.filteredFields && !filteredFieldsArray.includes(f2) || filterData[f2] == null)
4352
4465
  continue;
4353
4466
  searchParams.set(f2, filterData[f2]);
4354
4467
  }
4468
+ if (!this.searchHash)
4469
+ this.searchHash = searchParams.toString();
4355
4470
  dataProvider = endpoint + "?" + searchParams.toString();
4356
4471
  this.listDataProviders.push(dataProvider);
4357
4472
  this.currentScrollPosition = (_b = document.scrollingElement) == null ? void 0 : _b.scrollTop;
4358
- let newProps = [
4473
+ const newProps = [
4359
4474
  ...this.props,
4360
4475
  {
4361
4476
  id: searchParams.toString() + "/" + this.props.length,
@@ -4371,18 +4486,22 @@ let Queue = class extends Subscriber$1(s$3) {
4371
4486
  render() {
4372
4487
  if (this.currentScrollPosition) {
4373
4488
  window.requestAnimationFrame(() => {
4374
- if (document.scrollingElement)
4489
+ if (document.scrollingElement && this.currentScrollPosition != void 0)
4375
4490
  document.scrollingElement.scrollTop = this.currentScrollPosition;
4376
4491
  this.currentScrollPosition = void 0;
4377
4492
  });
4378
4493
  }
4379
4494
  if (!Array.isArray(this.props))
4380
4495
  return b$1;
4381
- return y`${c$1(this.props, (item) => item.id, (item, index) => {
4382
- var _a2;
4383
- let templates = index == 0 ? this.templates : (_a2 = this.templates) == null ? void 0 : _a2.filter((elt) => elt.getAttribute("data-value") != "no-item");
4384
- return y`<sonic-list fetch displayContents lazyload requestId="${this.requestId}" ?itemPropertyMap="${this.itemPropertyMap}" ?debug="${this.defferedDebug === true}" @load="${this.next}" key="${this.key}" @loading="${this.resetDuration}" dataProvider="${item.dataProvider}" idKey="${this.idKey}" .templates="${templates}"></sonic-list>`;
4385
- })}`;
4496
+ return y`${c$1(
4497
+ this.props,
4498
+ (item) => item.id,
4499
+ (item, index) => {
4500
+ var _a2;
4501
+ const templates = index == 0 ? this.templates : (_a2 = this.templates) == null ? void 0 : _a2.filter((elt) => elt.getAttribute("data-value") != "no-item");
4502
+ return y`<sonic-list fetch displayContents lazyload requestId="${this.requestId}" .itemPropertyMap="${this.itemPropertyMap}" ?debug="${this.defferedDebug === true}" @load="${this.next}" key="${this.key}" @loading="${this.resetDuration}" dataProvider="${item.dataProvider}" idKey="${this.idKey}" .templates="${templates}"></sonic-list>`;
4503
+ }
4504
+ )}`;
4386
4505
  }
4387
4506
  };
4388
4507
  Queue.instanceCounter = 0;
@@ -4456,11 +4575,13 @@ let Submit = class extends Subscriber$1(s$3) {
4456
4575
  if (!form2)
4457
4576
  return;
4458
4577
  const formDataProvider = this.getAncestorAttributeValue("formDataProvider");
4459
- let formData = PublisherManager$1.get(formDataProvider).get();
4578
+ const formData = PublisherManager$1.get(formDataProvider).get();
4460
4579
  for (const name in formData) {
4461
4580
  if (name == "isFormValid")
4462
4581
  continue;
4463
- let control = form2.querySelector('input[name="' + name + '"], select[name="' + name + '"], textarea[name="' + name + '"]');
4582
+ let control = form2.querySelector(
4583
+ 'input[name="' + name + '"], select[name="' + name + '"], textarea[name="' + name + '"]'
4584
+ );
4464
4585
  if (!control) {
4465
4586
  control = document.createElement("input");
4466
4587
  control.type = "hidden";
@@ -4477,7 +4598,7 @@ let Submit = class extends Subscriber$1(s$3) {
4477
4598
  control.value = value;
4478
4599
  }
4479
4600
  }
4480
- let submitButton = document.createElement("input");
4601
+ const submitButton = document.createElement("input");
4481
4602
  submitButton.name = this.name;
4482
4603
  submitButton.style.display = "none";
4483
4604
  submitButton.value = this.value;
@@ -4496,14 +4617,14 @@ let Submit = class extends Subscriber$1(s$3) {
4496
4617
  if (this.publisher)
4497
4618
  this.publisher.disabled = true;
4498
4619
  formPublisher.isFormValid;
4499
- let native = this.hasAttribute("native");
4620
+ const native = this.hasAttribute("native");
4500
4621
  if (native) {
4501
4622
  this.submitNativeForm();
4502
4623
  return;
4503
4624
  }
4504
- let method = ((_a2 = this.getAttribute("method")) == null ? void 0 : _a2.toLocaleLowerCase()) || "post";
4505
- let sendAsFormData = this.hasAttribute("sendAsFormData");
4506
- let formData = formPublisher.get();
4625
+ const method = ((_a2 = this.getAttribute("method")) == null ? void 0 : _a2.toLocaleLowerCase()) || "post";
4626
+ const sendAsFormData = this.hasAttribute("sendAsFormData");
4627
+ const formData = formPublisher.get();
4507
4628
  delete formData.isFormValid;
4508
4629
  const headesDataProvider = this.getAncestorAttributeValue("headersDataProvider");
4509
4630
  const headerPublisher = headesDataProvider ? PublisherManager$1.getInstance().get(headesDataProvider) : null;
@@ -4511,10 +4632,10 @@ let Submit = class extends Subscriber$1(s$3) {
4511
4632
  if (headerPublisher)
4512
4633
  headerData = headerPublisher.get();
4513
4634
  let result = null;
4514
- let dataProvider = this.getAncestorAttributeValue("dataProvider");
4515
- let endPoint = this.endPoint || dataProvider;
4635
+ const dataProvider = this.getAncestorAttributeValue("dataProvider");
4636
+ const endPoint = this.endPoint || dataProvider;
4516
4637
  Loader.show();
4517
- let sendData = async () => {
4638
+ const sendData = async () => {
4518
4639
  var _a3, _b2, _c2, _d, _e, _f, _g;
4519
4640
  if (sendAsFormData) {
4520
4641
  result = await ((_a3 = this.api) == null ? void 0 : _a3.submitFormData(endPoint, formData, method, headerData));
@@ -4539,30 +4660,30 @@ let Submit = class extends Subscriber$1(s$3) {
4539
4660
  result = { messages: [{ content: "Network Error", status: "error" }] };
4540
4661
  else if (result._sonic_http_response_ && !result._sonic_http_response_.ok && Object.keys(result).length === 1)
4541
4662
  result.messages = [{ content: "Network Error", status: "error" }];
4542
- let clearedDataProvider = this.getAncestorAttributeValue("clearedDataOnSuccess");
4663
+ const clearedDataProvider = this.getAncestorAttributeValue("clearedDataOnSuccess");
4543
4664
  if (clearedDataProvider) {
4544
4665
  clearedDataProvider.split(" ").forEach((dataProvider2) => PublisherManager$1.get(dataProvider2).set({}));
4545
4666
  }
4546
- let username_key = this.hasAttribute("usernameKey") ? this.getAttribute("usernameKey") : "username";
4547
- let password_key = this.hasAttribute("passwordKey") ? this.getAttribute("passwordKey") : "password";
4667
+ const username_key = this.hasAttribute("usernameKey") ? this.getAttribute("usernameKey") : "username";
4668
+ const password_key = this.hasAttribute("passwordKey") ? this.getAttribute("passwordKey") : "password";
4548
4669
  if (((_g = (_f = this.api) == null ? void 0 : _f.lastResult) == null ? void 0 : _g.ok) && formData[username_key] && formData[password_key]) {
4549
4670
  this.saveCredentials(formData[username_key], formData[password_key]);
4550
4671
  }
4551
4672
  if (this.submitResultKey) {
4552
4673
  result = Objects$1.traverse(result, this.submitResultKey.split("."), true);
4553
4674
  }
4554
- let submitResultDataProvider = this.getAncestorAttributeValue("submitResultDataProvider");
4675
+ const submitResultDataProvider = this.getAncestorAttributeValue("submitResultDataProvider");
4555
4676
  if (submitResultDataProvider)
4556
4677
  PublisherManager$1.get(submitResultDataProvider).set(result);
4557
4678
  if (this.publisher)
4558
4679
  this.publisher.disabled = null;
4559
4680
  };
4560
- let captchaPublisher = (headerPublisher == null ? void 0 : headerPublisher.needsCaptchaValidation.get()) ? headerPublisher : formPublisher.needsCaptchaValidation.get() ? formPublisher : null;
4681
+ const captchaPublisher = (headerPublisher == null ? void 0 : headerPublisher.needsCaptchaValidation.get()) ? headerPublisher : formPublisher.needsCaptchaValidation.get() ? formPublisher : null;
4561
4682
  if (captchaPublisher) {
4562
4683
  captchaPublisher.captchaMethod = method;
4563
4684
  captchaPublisher.captchaAction = (_c = (_b = dataProvider == null ? void 0 : dataProvider.split("?")[0]) != null ? _b : this.getAncestorAttributeValue("formDataProvider")) != null ? _c : "submit";
4564
4685
  captchaPublisher.captchaToken = "request_token";
4565
- let captchaAssign = (token) => {
4686
+ const captchaAssign = (token) => {
4566
4687
  if (token != "request_token") {
4567
4688
  sendData();
4568
4689
  captchaPublisher.captchaToken.offAssign(captchaAssign);
@@ -4575,7 +4696,7 @@ let Submit = class extends Subscriber$1(s$3) {
4575
4696
  }
4576
4697
  async saveCredentials(username, password2) {
4577
4698
  if ("PasswordCredential" in window) {
4578
- let credential = new window.PasswordCredential({
4699
+ const credential = new window.PasswordCredential({
4579
4700
  id: username,
4580
4701
  password: password2
4581
4702
  });
@@ -4955,7 +5076,7 @@ var urlPattern = { exports: {} };
4955
5076
  return;
4956
5077
  }
4957
5078
  this.isRegex = arg1 instanceof RegExp;
4958
- if (!(typeof arg1 === "string" || this.isRegex)) {
5079
+ if (!("string" === typeof arg1 || this.isRegex)) {
4959
5080
  throw new TypeError("argument must be a regex or a string");
4960
5081
  }
4961
5082
  if (this.isRegex) {
@@ -5077,42 +5198,53 @@ let SonicRouter = class extends Subscriber$1(TemplatesContainer$1(s$3)) {
5077
5198
  return this._location;
5078
5199
  }
5079
5200
  render() {
5080
- let templates = [];
5081
- for (let t2 of this.templatePartsList) {
5082
- let path = t2.getAttribute(this.templateValueAttribute);
5083
- let regexp = new RegExp(path);
5084
- let urlPattern2 = new UrlPattern(path);
5201
+ const templates = [];
5202
+ for (const t2 of this.templatePartsList) {
5203
+ const path = t2.getAttribute(this.templateValueAttribute) || "";
5204
+ const regexp = new RegExp(path);
5085
5205
  if (regexp.test(this.location)) {
5086
5206
  templates.push(t2);
5087
- } else if (urlPattern2.match(this.location)) {
5088
- t2.setAttribute("mode", "patternMatching");
5089
- templates.push(t2);
5207
+ } else {
5208
+ try {
5209
+ if (new UrlPattern(path).match(this.location)) {
5210
+ t2.setAttribute("mode", "patternMatching");
5211
+ templates.push(t2);
5212
+ }
5213
+ } catch (e2) {
5214
+ if (this.location.indexOf(path.replace(document.location.origin, "")) != -1) {
5215
+ templates.push(t2);
5216
+ }
5217
+ }
5090
5218
  }
5091
5219
  }
5092
- return y`${c$1(templates, (template, index) => {
5093
- return index + new Date().getTime();
5094
- }, (template) => {
5095
- var _a2;
5096
- if (template.title)
5097
- document.title = template.title;
5098
- if (template.hasAttribute("dataProviderExpression")) {
5099
- let dataProvider = "";
5100
- let dataProviderExpression = template.getAttribute("dataProviderExpression");
5101
- if (template.getAttribute("mode") == "patternMatching") {
5102
- const matcher = new UrlPattern(template.getAttribute(this.templateValueAttribute));
5103
- const filler = new UrlPattern(dataProviderExpression);
5104
- dataProvider = filler.stringify(matcher.match(this.location));
5105
- } else {
5106
- const regexp = new RegExp(template.getAttribute(this.templateValueAttribute));
5107
- let match = (this.location + "").match(regexp);
5108
- if (match) {
5109
- dataProvider = (_a2 = match.shift()) == null ? void 0 : _a2.replace(regexp, dataProviderExpression);
5220
+ return y`${c$1(
5221
+ templates,
5222
+ (template, index) => {
5223
+ return index + new Date().getTime();
5224
+ },
5225
+ (template) => {
5226
+ var _a2;
5227
+ if (template.title)
5228
+ document.title = template.title;
5229
+ if (template.hasAttribute("dataProviderExpression")) {
5230
+ let dataProvider = "";
5231
+ const dataProviderExpression = template.getAttribute("dataProviderExpression") || "";
5232
+ if (template.getAttribute("mode") == "patternMatching") {
5233
+ const matcher = new UrlPattern(template.getAttribute(this.templateValueAttribute) || "");
5234
+ const filler = new UrlPattern(dataProviderExpression);
5235
+ dataProvider = filler.stringify(matcher.match(this.location));
5236
+ } else {
5237
+ const regexp = new RegExp(template.getAttribute(this.templateValueAttribute) || "");
5238
+ const match = (this.location + "").match(regexp);
5239
+ if (match) {
5240
+ dataProvider = ((_a2 = match.shift()) == null ? void 0 : _a2.replace(regexp, dataProviderExpression)) || "";
5241
+ }
5110
5242
  }
5243
+ return y`<div style="display:contents" dataProvider="${dataProvider}">${o$1(template)}</div>`;
5111
5244
  }
5112
- return y`<div style="display:contents" dataProvider="${dataProvider}">${o$1(template)}</div>`;
5245
+ return o$1(template);
5113
5246
  }
5114
- return o$1(template);
5115
- })}`;
5247
+ )}`;
5116
5248
  }
5117
5249
  };
5118
5250
  __decorateClass$T([
@@ -5134,11 +5266,6 @@ var __decorateClass$S = (decorators, target, key, kind) => {
5134
5266
  };
5135
5267
  const tagName$O = "sonic-redirect";
5136
5268
  let SonicRedirect = class extends Subscriber$1(s$3) {
5137
- constructor() {
5138
- super(...arguments);
5139
- this.udpateCallBack = () => {
5140
- };
5141
- }
5142
5269
  connectedCallback() {
5143
5270
  this.noShadowDom = "";
5144
5271
  this.style.display = "none";
@@ -5159,8 +5286,8 @@ let SonicRedirect = class extends Subscriber$1(s$3) {
5159
5286
  }
5160
5287
  if (!this.props)
5161
5288
  return;
5162
- let onDataPath = this.getAttribute("onData").split(".");
5163
- let searchedData = Objects$1.traverse(this.props, onDataPath);
5289
+ const onDataPath = this.getAttribute("onData").split(".");
5290
+ const searchedData = Objects$1.traverse(this.props, onDataPath);
5164
5291
  if (searchedData && !(Objects$1.isObject(searchedData) && searchedData)) {
5165
5292
  LocationHandler$1.changeFromComponent(this);
5166
5293
  }
@@ -5193,14 +5320,15 @@ let SonicStates = class extends Subscriber$1(TemplatesContainer$1(s$3)) {
5193
5320
  };
5194
5321
  }
5195
5322
  connectedCallback() {
5323
+ this.noShadowDom = "";
5196
5324
  super.connectedCallback();
5197
5325
  if (this.hasAttribute("data-path")) {
5198
5326
  this.statePath = this.getAttribute("data-path");
5199
5327
  }
5200
5328
  if (this.statePath) {
5201
5329
  this.statePublisher = this.publisher;
5202
- let split = this.statePath.split(".");
5203
- for (let s2 of split) {
5330
+ const split = this.statePath.split(".");
5331
+ for (const s2 of split) {
5204
5332
  this.statePublisher = this.statePublisher[s2];
5205
5333
  }
5206
5334
  this.statePublisher.onAssign(this.onAssign);
@@ -5213,12 +5341,12 @@ let SonicStates = class extends Subscriber$1(TemplatesContainer$1(s$3)) {
5213
5341
  super.disconnectedCallback();
5214
5342
  }
5215
5343
  render() {
5216
- let templates = [];
5344
+ const templates = [];
5217
5345
  let state = this.state;
5218
5346
  if (!Array.isArray(state) && Objects$1.isObject(state) || state === void 0) {
5219
5347
  state = "";
5220
5348
  }
5221
- for (let t2 of this.templatePartsList) {
5349
+ for (const t2 of this.templatePartsList) {
5222
5350
  let path = t2.getAttribute(this.templateValueAttribute);
5223
5351
  let stateToMatch = state;
5224
5352
  if (this.inverted) {
@@ -5227,50 +5355,54 @@ let SonicStates = class extends Subscriber$1(TemplatesContainer$1(s$3)) {
5227
5355
  }
5228
5356
  if (path == "")
5229
5357
  path = this.inverted ? ".*?" : "^$";
5230
- let regexp = new RegExp(path);
5358
+ const regexp = new RegExp(path);
5231
5359
  if (regexp.test(stateToMatch)) {
5232
5360
  templates.push(t2);
5233
5361
  t2.removeAttribute("mode");
5234
5362
  } else {
5235
- let urlPattern2 = new UrlPattern(path);
5363
+ const urlPattern2 = new UrlPattern(path);
5236
5364
  if (urlPattern2.names.length > 0 && urlPattern2.match(stateToMatch)) {
5237
5365
  t2.setAttribute("mode", "patternMatching");
5238
5366
  templates.push(t2);
5239
5367
  }
5240
5368
  }
5241
5369
  }
5242
- return y`${c$1(templates, (template, index) => {
5243
- return index + new Date().getTime();
5244
- }, (template) => {
5245
- var _a2;
5246
- if (template.title)
5247
- document.title = template.title;
5248
- if (template.hasAttribute("dataProviderExpression")) {
5249
- let dataProviderExpression = template.getAttribute("dataProviderExpression");
5250
- let dataProvider = "";
5251
- let stateToMatch = state;
5252
- let path = template.getAttribute(this.templateValueAttribute);
5253
- if (this.inverted) {
5254
- stateToMatch = path;
5255
- path = state;
5256
- }
5257
- if (path == "")
5258
- path = this.inverted ? "*" : "^$";
5259
- if (template.getAttribute("mode") == "patternMatching") {
5260
- const matcher = new UrlPattern(path);
5261
- const filler = new UrlPattern(dataProviderExpression);
5262
- dataProvider = filler.stringify(matcher.match(stateToMatch));
5263
- } else {
5264
- const regexp = new RegExp(path);
5265
- let match = (stateToMatch + "").match(regexp);
5266
- if (match) {
5267
- dataProvider = (_a2 = match.shift()) == null ? void 0 : _a2.replace(regexp, dataProviderExpression);
5370
+ return y`${c$1(
5371
+ templates,
5372
+ (template, index) => {
5373
+ return index + new Date().getTime();
5374
+ },
5375
+ (template) => {
5376
+ var _a2;
5377
+ if (template.title)
5378
+ document.title = template.title;
5379
+ if (template.hasAttribute("dataProviderExpression")) {
5380
+ const dataProviderExpression = template.getAttribute("dataProviderExpression");
5381
+ let dataProvider = "";
5382
+ let stateToMatch = state;
5383
+ let path = template.getAttribute(this.templateValueAttribute);
5384
+ if (this.inverted) {
5385
+ stateToMatch = path;
5386
+ path = state;
5387
+ }
5388
+ if (path == "")
5389
+ path = this.inverted ? "*" : "^$";
5390
+ if (template.getAttribute("mode") == "patternMatching") {
5391
+ const matcher = new UrlPattern(path);
5392
+ const filler = new UrlPattern(dataProviderExpression);
5393
+ dataProvider = filler.stringify(matcher.match(stateToMatch));
5394
+ } else {
5395
+ const regexp = new RegExp(path);
5396
+ const match = (stateToMatch + "").match(regexp);
5397
+ if (match) {
5398
+ dataProvider = (_a2 = match.shift()) == null ? void 0 : _a2.replace(regexp, dataProviderExpression);
5399
+ }
5268
5400
  }
5401
+ return y`<div style="display:contents" dataProvider="${dataProvider}">${o$1(template)}</div>`;
5269
5402
  }
5270
- return y`<div style="display:contents" dataProvider="${dataProvider}">${o$1(template)}</div>`;
5403
+ return o$1(template);
5271
5404
  }
5272
- return o$1(template);
5273
- })}`;
5405
+ )}`;
5274
5406
  }
5275
5407
  };
5276
5408
  __decorateClass$R([
@@ -5467,35 +5599,36 @@ var default_library = {
5467
5599
  divider
5468
5600
  };
5469
5601
  class SDUIDescriptorTransformer {
5470
- constructor() {
5471
- }
5472
5602
  async transform(sduiDescriptor, transformDescriptor) {
5473
5603
  this.sduiDescriptor = sduiDescriptor;
5474
5604
  if (this.sduiDescriptor.library) {
5475
- for (let key in transformDescriptor.library) {
5605
+ for (const key in transformDescriptor.library) {
5476
5606
  this.sduiDescriptor.library[key] = transformDescriptor.library[key];
5477
5607
  }
5478
5608
  }
5479
- for (let item of transformDescriptor.transforms) {
5609
+ for (const item of transformDescriptor.transforms) {
5480
5610
  this.transformAction(item);
5481
5611
  }
5482
5612
  }
5483
5613
  transformAction(transformAction) {
5484
- let uis = this.getNodesMatchingPatterns(transformAction.patterns, this.sduiDescriptor);
5485
- this[transformAction.action](transformAction, uis);
5614
+ const uis = this.getNodesMatchingPatterns(transformAction.patterns, this.sduiDescriptor);
5615
+ this[transformAction.action](
5616
+ transformAction,
5617
+ uis
5618
+ );
5486
5619
  }
5487
5620
  getNodesMatchingPatterns(patterns, node) {
5488
5621
  if (!patterns)
5489
5622
  return [];
5490
5623
  if (!node)
5491
5624
  return [];
5492
- let nodes = node.nodes;
5625
+ const nodes = node.nodes;
5493
5626
  if (!nodes)
5494
5627
  return [];
5495
5628
  let result = [];
5496
5629
  let index = 0;
5497
- for (let pattern of patterns) {
5498
- for (let child of nodes) {
5630
+ for (const pattern of patterns) {
5631
+ for (const child of nodes) {
5499
5632
  if (this.nodeMatchesPattern(pattern, child)) {
5500
5633
  result.push({ parent: node, child, index });
5501
5634
  }
@@ -5509,20 +5642,20 @@ class SDUIDescriptorTransformer {
5509
5642
  return !regExpString || stringToTest && stringToTest.match(regExpString);
5510
5643
  }
5511
5644
  nodeMatchesPattern(pattern, node) {
5512
- let patternDynamic = pattern;
5513
- let nodeDynamic = node;
5514
- let keys = ["libraryKey", "innerHTML", "prefix", "suffix", "markup"];
5515
- for (let key of keys) {
5645
+ const patternDynamic = pattern;
5646
+ const nodeDynamic = node;
5647
+ const keys = ["libraryKey", "innerHTML", "prefix", "suffix", "markup"];
5648
+ for (const key of keys) {
5516
5649
  if (!this.stringMatchesExpression(nodeDynamic[key], patternDynamic[key])) {
5517
5650
  return false;
5518
5651
  }
5519
5652
  }
5520
- let patternAttributes = pattern.attributes;
5521
- let nodeAttributes = node.attributes;
5653
+ const patternAttributes = pattern.attributes;
5654
+ const nodeAttributes = node.attributes;
5522
5655
  if (patternAttributes && !nodeAttributes)
5523
5656
  return false;
5524
5657
  if (patternAttributes) {
5525
- for (let name in patternAttributes) {
5658
+ for (const name in patternAttributes) {
5526
5659
  if (!nodeAttributes || !this.stringMatchesExpression(nodeAttributes[name], patternAttributes[name])) {
5527
5660
  return false;
5528
5661
  }
@@ -5532,7 +5665,7 @@ class SDUIDescriptorTransformer {
5532
5665
  }
5533
5666
  unwrap(transformAction, list) {
5534
5667
  var _a2, _b;
5535
- for (let item of list) {
5668
+ for (const item of list) {
5536
5669
  (_a2 = item.parent.nodes) == null ? void 0 : _a2.splice(item.parent.nodes.indexOf(item.child), 1);
5537
5670
  if (item.child.nodes) {
5538
5671
  (_b = item.parent.nodes) == null ? void 0 : _b.splice(item.parent.nodes.indexOf(item.child), 0, ...item.child.nodes);
@@ -5541,18 +5674,18 @@ class SDUIDescriptorTransformer {
5541
5674
  }
5542
5675
  wrap(transformAction, list) {
5543
5676
  var _a2, _b, _c, _d, _e, _f;
5544
- let wrapper = __spreadValues({}, transformAction.ui);
5677
+ const wrapper = { ...transformAction.ui };
5545
5678
  if (!wrapper.nodes)
5546
5679
  wrapper.nodes = [];
5547
5680
  let i2 = 0;
5548
- for (let item of list) {
5681
+ for (const item of list) {
5549
5682
  (_a2 = wrapper.nodes) == null ? void 0 : _a2.push(item.child);
5550
5683
  if (i2 > 0) {
5551
5684
  (_b = item.parent.nodes) == null ? void 0 : _b.splice(item.parent.nodes.indexOf(item.child), 1);
5552
5685
  }
5553
5686
  i2++;
5554
5687
  }
5555
- let idx = (_d = (_c = list[0]) == null ? void 0 : _c.parent.nodes) == null ? void 0 : _d.indexOf(list[0].child);
5688
+ const idx = (_d = (_c = list[0]) == null ? void 0 : _c.parent.nodes) == null ? void 0 : _d.indexOf(list[0].child);
5556
5689
  if (idx) {
5557
5690
  (_e = list[0].parent.nodes) == null ? void 0 : _e.splice(idx, 1);
5558
5691
  (_f = list[0].parent.nodes) == null ? void 0 : _f.splice(idx, 0, wrapper);
@@ -5560,50 +5693,54 @@ class SDUIDescriptorTransformer {
5560
5693
  }
5561
5694
  move(transformAction, list) {
5562
5695
  var _a2, _b;
5563
- for (let item of list) {
5696
+ for (const item of list) {
5564
5697
  (_a2 = item.parent.nodes) == null ? void 0 : _a2.splice(item.parent.nodes.indexOf(item.child), 1);
5565
5698
  let list2 = [];
5566
5699
  if (transformAction.after)
5567
5700
  list2 = this.getNodesMatchingPatterns([transformAction.after], this.sduiDescriptor);
5568
5701
  if (transformAction.before)
5569
5702
  list2 = this.getNodesMatchingPatterns([transformAction.before], this.sduiDescriptor);
5570
- let element = list2[0];
5703
+ const element = list2[0];
5571
5704
  if (element) {
5572
- (_b = element.parent.nodes) == null ? void 0 : _b.splice(element.parent.nodes.indexOf(element.child) + (transformAction.after ? 1 : 0), 0, item.child);
5705
+ (_b = element.parent.nodes) == null ? void 0 : _b.splice(
5706
+ element.parent.nodes.indexOf(element.child) + (transformAction.after ? 1 : 0),
5707
+ 0,
5708
+ item.child
5709
+ );
5573
5710
  }
5574
5711
  }
5575
5712
  }
5576
5713
  remap(transformAction, list) {
5577
5714
  var _a2, _b, _c;
5578
- for (let item of list) {
5579
- let newUI = __spreadValues({}, transformAction.ui);
5715
+ for (const item of list) {
5716
+ const newUI = { ...transformAction.ui };
5580
5717
  if (!newUI.attributes) {
5581
5718
  newUI.attributes = {};
5582
5719
  }
5583
- let childAttributes = item.child.attributes;
5720
+ const childAttributes = item.child.attributes;
5584
5721
  if (childAttributes) {
5585
- for (let key in childAttributes) {
5586
- if (!newUI.attributes.hasOwnProperty("key"))
5722
+ for (const key in childAttributes) {
5723
+ if (!Object.prototype.hasOwnProperty.call(newUI.attributes, "key"))
5587
5724
  newUI.attributes[key] = childAttributes[key];
5588
5725
  }
5589
5726
  }
5590
- let keys = ["libraryKey", "innerHTML", "prefix", "suffix", "markup"];
5591
- let childDynamic = item.child;
5592
- let newUIDynamic = newUI;
5593
- for (let key of keys) {
5594
- if (!newUI.hasOwnProperty(key) && childDynamic[key])
5727
+ const keys = ["libraryKey", "innerHTML", "prefix", "suffix", "markup"];
5728
+ const childDynamic = item.child;
5729
+ const newUIDynamic = newUI;
5730
+ for (const key of keys) {
5731
+ if (!Object.prototype.hasOwnProperty.call(newUI, key) && childDynamic[key])
5595
5732
  newUIDynamic[key] = childDynamic[key];
5596
5733
  }
5597
5734
  if (!newUI.nodes) {
5598
5735
  newUI.nodes = [];
5599
5736
  }
5600
- let childNodes = item.child.nodes;
5737
+ const childNodes = item.child.nodes;
5601
5738
  if (childNodes) {
5602
- for (let node of childNodes) {
5739
+ for (const node of childNodes) {
5603
5740
  newUI.nodes.push(node);
5604
5741
  }
5605
5742
  }
5606
- let idx = ((_a2 = item.parent.nodes) == null ? void 0 : _a2.indexOf(item.child)) || -1;
5743
+ const idx = ((_a2 = item.parent.nodes) == null ? void 0 : _a2.indexOf(item.child)) || -1;
5607
5744
  if (idx != -1) {
5608
5745
  (_b = item.parent.nodes) == null ? void 0 : _b.splice(idx, 1);
5609
5746
  (_c = item.parent.nodes) == null ? void 0 : _c.splice(idx, 0, newUI);
@@ -5612,13 +5749,13 @@ class SDUIDescriptorTransformer {
5612
5749
  }
5613
5750
  delete(transformAction, list) {
5614
5751
  var _a2;
5615
- for (let item of list) {
5752
+ for (const item of list) {
5616
5753
  (_a2 = item.parent.nodes) == null ? void 0 : _a2.splice(item.parent.nodes.indexOf(item.child), 1);
5617
5754
  }
5618
5755
  }
5619
5756
  insert(transformAction, list) {
5620
5757
  var _a2;
5621
- let positionType = transformAction.after ? "after" : transformAction.before ? "before" : "in";
5758
+ const positionType = transformAction.after ? "after" : transformAction.before ? "before" : "in";
5622
5759
  list = [];
5623
5760
  if (transformAction.after) {
5624
5761
  list = this.getNodesMatchingPatterns([transformAction.after], this.sduiDescriptor);
@@ -5627,14 +5764,16 @@ class SDUIDescriptorTransformer {
5627
5764
  } else if (transformAction.in) {
5628
5765
  list = this.getNodesMatchingPatterns([transformAction.in], this.sduiDescriptor);
5629
5766
  }
5630
- let node = list[0];
5767
+ const node = list[0];
5631
5768
  if (node) {
5632
5769
  if (positionType == "in") {
5633
5770
  if (!node.child.nodes)
5634
5771
  node.child.nodes = [];
5635
- node.child.nodes.push(__spreadValues({}, transformAction.ui));
5772
+ node.child.nodes.push({ ...transformAction.ui });
5636
5773
  } else {
5637
- (_a2 = node.parent.nodes) == null ? void 0 : _a2.splice(node.parent.nodes.indexOf(node.child) + (positionType == "after" ? 1 : 0), 0, __spreadValues({}, transformAction.ui));
5774
+ (_a2 = node.parent.nodes) == null ? void 0 : _a2.splice(node.parent.nodes.indexOf(node.child) + (positionType == "after" ? 1 : 0), 0, {
5775
+ ...transformAction.ui
5776
+ });
5638
5777
  }
5639
5778
  }
5640
5779
  }
@@ -5662,7 +5801,7 @@ const Form = (superClass) => {
5662
5801
  const input = (_a2 = this.shadowRoot) == null ? void 0 : _a2.querySelector("input");
5663
5802
  if (!input || input.checkValidity())
5664
5803
  return;
5665
- let formPublisher = this.getFormPublisher();
5804
+ const formPublisher = this.getFormPublisher();
5666
5805
  if (formPublisher)
5667
5806
  formPublisher.isFormValid = false;
5668
5807
  input.reportValidity();
@@ -5753,23 +5892,23 @@ let SonicSDUI = class extends Fetcher(Subscriber(s$3)) {
5753
5892
  this.isFetchEnabled = this.hasAttribute("fetch");
5754
5893
  super.connectedCallback();
5755
5894
  }
5756
- get props() {
5757
- return super.props;
5758
- }
5759
- set props(value) {
5760
- if (value === this.props)
5761
- return;
5762
- super.props = value;
5763
- let newSduiDescriptor = this.sduiKey ? value[this.sduiKey] : value;
5764
- if (this.sduiDescriptor == newSduiDescriptor)
5765
- return;
5766
- this.sduiDescriptor = newSduiDescriptor;
5767
- this.updateContents();
5895
+ willUpdate(changedProperties) {
5896
+ if (this.props == null) {
5897
+ this.sduiDescriptor = {};
5898
+ }
5899
+ {
5900
+ const newSduiDescriptor = this.sduiKey ? this.props[this.sduiKey] : this.props;
5901
+ if (this.sduiDescriptor == newSduiDescriptor)
5902
+ return;
5903
+ this.sduiDescriptor = newSduiDescriptor;
5904
+ this.updateContents();
5905
+ }
5906
+ super.willUpdate(changedProperties);
5768
5907
  }
5769
5908
  async updateContents() {
5770
5909
  if (!this.sduiDescriptor)
5771
5910
  return;
5772
- let library = {};
5911
+ const library = {};
5773
5912
  Object.assign(library, default_library, this.sduiDescriptor.library);
5774
5913
  this.sduiDescriptor.library = library;
5775
5914
  this.loadAssets();
@@ -5797,16 +5936,16 @@ let SonicSDUI = class extends Fetcher(Subscriber(s$3)) {
5797
5936
  async transformSDUIDescriptor() {
5798
5937
  if (!this.hasAttribute("transformation"))
5799
5938
  return;
5800
- let result = await fetch(this.getAttribute("transformation"));
5801
- let json = await result.json();
5802
- let transformer = new SDUIDescriptorTransformer();
5939
+ const result = await fetch(this.getAttribute("transformation"));
5940
+ const json = await result.json();
5941
+ const transformer = new SDUIDescriptorTransformer();
5803
5942
  await transformer.transform(this.sduiDescriptor, json);
5804
5943
  }
5805
5944
  async loadLibrary() {
5806
5945
  if (!this.hasAttribute("library"))
5807
5946
  return;
5808
- let result = await fetch(this.getAttribute("library"));
5809
- let json = await result.json();
5947
+ const result = await fetch(this.getAttribute("library"));
5948
+ const json = await result.json();
5810
5949
  this.sduiDescriptor.library = json;
5811
5950
  }
5812
5951
  parseRootNodes() {
@@ -5816,7 +5955,7 @@ let SonicSDUI = class extends Fetcher(Subscriber(s$3)) {
5816
5955
  let nodes = this.sduiDescriptor.nodes;
5817
5956
  if (!nodes)
5818
5957
  nodes = [];
5819
- let messageProvider = { tagName: "sonic-toast-message-subscriber", attributes: {} };
5958
+ const messageProvider = { tagName: "sonic-toast-message-subscriber", attributes: {} };
5820
5959
  if (this.messagesKey) {
5821
5960
  messageProvider.attributes = { subDataProvider: this.messagesKey };
5822
5961
  }
@@ -5824,7 +5963,7 @@ let SonicSDUI = class extends Fetcher(Subscriber(s$3)) {
5824
5963
  nodes.forEach((node) => this.appendChild(this.parseChild(node)));
5825
5964
  }
5826
5965
  parseChild(node) {
5827
- let tagName2 = node.tagName || "div";
5966
+ const tagName2 = node.tagName || "div";
5828
5967
  let { element, contentElement } = this.handleLibrary(node, tagName2);
5829
5968
  this.handleAttributes(node, element);
5830
5969
  element = this.handleMarkup(node, element);
@@ -5846,9 +5985,9 @@ let SonicSDUI = class extends Fetcher(Subscriber(s$3)) {
5846
5985
  }
5847
5986
  handleChildNodes(node, contentElement, element) {
5848
5987
  if (node.nodes) {
5849
- let children = node.nodes;
5850
- for (let child of children) {
5851
- let childElement = this.parseChild(child);
5988
+ const children = node.nodes;
5989
+ for (const child of children) {
5990
+ const childElement = this.parseChild(child);
5852
5991
  let nodeToAppendOn = contentElement;
5853
5992
  if (child.parentElementSelector) {
5854
5993
  nodeToAppendOn = element.querySelector(child.parentElementSelector) || contentElement;
@@ -5856,7 +5995,7 @@ let SonicSDUI = class extends Fetcher(Subscriber(s$3)) {
5856
5995
  if (nodeToAppendOn.shadowRoot)
5857
5996
  nodeToAppendOn.shadowRoot.appendChild(childElement);
5858
5997
  else if (nodeToAppendOn.tagName.toLocaleLowerCase() == "template") {
5859
- let template = nodeToAppendOn;
5998
+ const template = nodeToAppendOn;
5860
5999
  template.content.appendChild(childElement);
5861
6000
  } else
5862
6001
  nodeToAppendOn.appendChild(childElement);
@@ -5868,7 +6007,7 @@ let SonicSDUI = class extends Fetcher(Subscriber(s$3)) {
5868
6007
  let contentElement;
5869
6008
  if (node.libraryKey && this.sduiDescriptor.library) {
5870
6009
  element = this.parseChild(this.sduiDescriptor.library[node.libraryKey] || { tagName: "div" });
5871
- let selector = (this.sduiDescriptor.library[node.libraryKey] || {}).contentElementSelector;
6010
+ const selector = (this.sduiDescriptor.library[node.libraryKey] || {}).contentElementSelector;
5872
6011
  if (selector)
5873
6012
  contentElement = element.querySelector(selector);
5874
6013
  } else
@@ -5876,10 +6015,10 @@ let SonicSDUI = class extends Fetcher(Subscriber(s$3)) {
5876
6015
  return { element, contentElement };
5877
6016
  }
5878
6017
  handleAttributes(node, element) {
5879
- let attributes = node.attributes;
5880
- for (let k2 in attributes) {
5881
- let attrData = attributes[k2];
5882
- let attr = Objects.isObject(attrData) ? JSON.stringify(attrData) : attrData;
6018
+ const attributes = node.attributes;
6019
+ for (const k2 in attributes) {
6020
+ const attrData = attributes[k2];
6021
+ const attr = Objects.isObject(attrData) ? JSON.stringify(attrData) : attrData;
5883
6022
  element.setAttribute(k2, attr);
5884
6023
  }
5885
6024
  }
@@ -5896,7 +6035,7 @@ let SonicSDUI = class extends Fetcher(Subscriber(s$3)) {
5896
6035
  if (!node.innerHTML)
5897
6036
  return;
5898
6037
  if (node.innerHTML.indexOf("wording_") != -1) {
5899
- let wordingProvider = this.getAncestorAttributeValue("wordingProvider");
6038
+ const wordingProvider = this.getAncestorAttributeValue("wordingProvider");
5900
6039
  (_a2 = this.api) == null ? void 0 : _a2.post(wordingProvider, { labels: [node.innerHTML.substring(8)] }).then((value) => {
5901
6040
  if (contentElement)
5902
6041
  contentElement.innerHTML += value;
@@ -5912,9 +6051,6 @@ __decorateClass$N([
5912
6051
  __decorateClass$N([
5913
6052
  e$7()
5914
6053
  ], SonicSDUI.prototype, "messagesKey", 2);
5915
- __decorateClass$N([
5916
- e$7()
5917
- ], SonicSDUI.prototype, "props", 1);
5918
6054
  SonicSDUI = __decorateClass$N([
5919
6055
  e$8(tagName$K)
5920
6056
  ], SonicSDUI);
@@ -5958,7 +6094,7 @@ let SonicMix = class extends Subscriber(s$3) {
5958
6094
  this.parseComposition(this.composition, this.publisher);
5959
6095
  }
5960
6096
  removePublisherListeners() {
5961
- let listeners = this.listeners;
6097
+ const listeners = this.listeners;
5962
6098
  this.listeners = [];
5963
6099
  listeners.forEach((listener) => {
5964
6100
  this.publisher.offAssign(listener.subscriber);
@@ -5967,13 +6103,16 @@ let SonicMix = class extends Subscriber(s$3) {
5967
6103
  parseComposition(composition, publisher) {
5968
6104
  if (!composition)
5969
6105
  return;
5970
- for (let z2 in composition) {
5971
- let value = composition[z2];
6106
+ for (const z2 in composition) {
6107
+ const value = composition[z2];
5972
6108
  if (typeof value === "string") {
5973
- let split = value.split(".");
5974
- let publisherSource = PublisherManager.get(split.shift());
6109
+ const split = value.split(".");
6110
+ const first = split.shift();
6111
+ if (!first)
6112
+ continue;
6113
+ let publisherSource = PublisherManager.get(first);
5975
6114
  publisherSource = Objects.traverse(publisherSource, split);
5976
- let publisherSubscriber = {
6115
+ const publisherSubscriber = {
5977
6116
  publisher: publisherSource,
5978
6117
  subscriber: (v2) => {
5979
6118
  publisher[z2] = v2;
@@ -5984,9 +6123,9 @@ let SonicMix = class extends Subscriber(s$3) {
5984
6123
  publisher._proxies_.set(z2, publisherSource);
5985
6124
  } else {
5986
6125
  this.publisher[z2] = {};
5987
- let newPublisher = new PublisherProxy$1({}, publisher);
6126
+ const newPublisher = new PublisherProxy$1({}, publisher);
5988
6127
  publisher._proxies_.set(z2, newPublisher);
5989
- let publisherSubscriber = {
6128
+ const publisherSubscriber = {
5990
6129
  publisher: newPublisher,
5991
6130
  subscriber: (v2) => {
5992
6131
  publisher[z2] = v2;
@@ -6029,9 +6168,9 @@ let SonicValue = class extends Subscriber(s$3) {
6029
6168
  super.connectedCallback();
6030
6169
  }
6031
6170
  render() {
6032
- if (typeof this.props !== "string")
6171
+ if (typeof this.props === "object" || this.props === void 0)
6033
6172
  return y`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`;
6034
- return y`${o$2(this.props)}<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`;
6173
+ return y`${o$2(this.props.toString())}<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`;
6035
6174
  }
6036
6175
  };
6037
6176
  SonicValue = __decorateClass$L([
@@ -6071,50 +6210,56 @@ let Theme = class extends s$3 {
6071
6210
  postCSSVars() {
6072
6211
  const stylesheets = document.styleSheets;
6073
6212
  const ssLength = stylesheets.length;
6074
- let fontUrls = [];
6213
+ const fontUrls = [];
6075
6214
  for (let i2 = 0; i2 < ssLength; i2++) {
6076
- let ss = stylesheets[i2];
6215
+ const ss = stylesheets[i2];
6077
6216
  if (ss.href && (ss.href.includes("googleapis") || ss.href.includes("typekit.net")))
6078
6217
  fontUrls.push(ss.href);
6079
6218
  }
6080
- document.querySelectorAll("iframe").forEach((elt) => {
6081
- var _a2;
6082
- return (_a2 = elt.contentWindow) == null ? void 0 : _a2.postMessage({
6083
- type: "SonicTheme",
6084
- variables: this.getCssVariables(),
6085
- fonts: fontUrls
6086
- }, "*");
6087
- });
6219
+ document.querySelectorAll("iframe").forEach(
6220
+ (elt) => {
6221
+ var _a2;
6222
+ return (_a2 = elt.contentWindow) == null ? void 0 : _a2.postMessage(
6223
+ {
6224
+ type: "SonicTheme",
6225
+ variables: this.getCssVariables(),
6226
+ fonts: fontUrls
6227
+ },
6228
+ "*"
6229
+ );
6230
+ }
6231
+ );
6088
6232
  }
6089
6233
  receiveMessage(event) {
6090
- let data = event.data;
6234
+ const data = event.data;
6091
6235
  if (!data.type || data.type != "GetSonicTheme")
6092
6236
  return;
6093
6237
  this.postCSSVars();
6094
6238
  }
6095
6239
  getCssVariables() {
6096
- let names = [];
6097
- let stylesheets = [...Theme.styles.map((s2) => s2.styleSheet), ...Array.from(document.styleSheets)];
6098
- for (let stylesheet of stylesheets) {
6240
+ const names = [];
6241
+ const stylesheets = [...Theme.styles.map((s2) => s2.styleSheet), ...Array.from(document.styleSheets)];
6242
+ for (const stylesheet of stylesheets) {
6099
6243
  try {
6100
6244
  if (!stylesheet)
6101
6245
  continue;
6102
- let rules = stylesheet.cssRules;
6103
- for (let rule of rules) {
6246
+ const rules = stylesheet.cssRules;
6247
+ for (const rule of rules) {
6104
6248
  if (!("style" in rule))
6105
6249
  continue;
6106
- let style2 = rule.style;
6107
- for (let name of style2) {
6250
+ const style2 = rule.style;
6251
+ for (const name of style2) {
6108
6252
  if (names.includes(name) || name.indexOf("--sc") !== 0)
6109
6253
  continue;
6110
6254
  names.push(name);
6111
6255
  }
6112
6256
  }
6113
6257
  } catch (e2) {
6258
+ console.log("Erreur lors de la r\xE9cup\xE9ration des variables CSS");
6114
6259
  }
6115
6260
  }
6116
- let style = window.getComputedStyle(this);
6117
- let result = {};
6261
+ const style = window.getComputedStyle(this);
6262
+ const result = {};
6118
6263
  names.forEach((name) => result[name] = style.getPropertyValue(name));
6119
6264
  return result;
6120
6265
  }
@@ -6328,7 +6473,7 @@ const formControl = i$4`*{box-sizing:border-box}:host{--sc-input-height:var(--sc
6328
6473
  const o = e$2(class extends i$2 {
6329
6474
  constructor(t$12) {
6330
6475
  var i2;
6331
- if (super(t$12), t$12.type !== t.ATTRIBUTE || t$12.name !== "class" || ((i2 = t$12.strings) === null || i2 === void 0 ? void 0 : i2.length) > 2)
6476
+ if (super(t$12), t$12.type !== t.ATTRIBUTE || "class" !== t$12.name || (null === (i2 = t$12.strings) || void 0 === i2 ? void 0 : i2.length) > 2)
6332
6477
  throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
6333
6478
  }
6334
6479
  render(t2) {
@@ -6336,10 +6481,10 @@ const o = e$2(class extends i$2 {
6336
6481
  }
6337
6482
  update(i2, [s2]) {
6338
6483
  var r2, o2;
6339
- if (this.nt === void 0) {
6340
- this.nt = /* @__PURE__ */ new Set(), i2.strings !== void 0 && (this.st = new Set(i2.strings.join(" ").split(/\s/).filter((t2) => t2 !== "")));
6484
+ if (void 0 === this.nt) {
6485
+ this.nt = /* @__PURE__ */ new Set(), void 0 !== i2.strings && (this.st = new Set(i2.strings.join(" ").split(/\s/).filter((t2) => "" !== t2)));
6341
6486
  for (const t2 in s2)
6342
- s2[t2] && !((r2 = this.st) === null || r2 === void 0 ? void 0 : r2.has(t2)) && this.nt.add(t2);
6487
+ s2[t2] && !(null === (r2 = this.st) || void 0 === r2 ? void 0 : r2.has(t2)) && this.nt.add(t2);
6343
6488
  return this.render(s2);
6344
6489
  }
6345
6490
  const e2 = i2.element.classList;
@@ -6348,7 +6493,7 @@ const o = e$2(class extends i$2 {
6348
6493
  });
6349
6494
  for (const t2 in s2) {
6350
6495
  const i3 = !!s2[t2];
6351
- i3 === this.nt.has(t2) || ((o2 = this.st) === null || o2 === void 0 ? void 0 : o2.has(t2)) || (i3 ? (e2.add(t2), this.nt.add(t2)) : (e2.remove(t2), this.nt.delete(t2)));
6496
+ i3 === this.nt.has(t2) || (null === (o2 = this.st) || void 0 === o2 ? void 0 : o2.has(t2)) || (i3 ? (e2.add(t2), this.nt.add(t2)) : (e2.remove(t2), this.nt.delete(t2)));
6352
6497
  }
6353
6498
  return x$1;
6354
6499
  }
@@ -6382,7 +6527,7 @@ let Input = class extends Form(Form$2(Subscriber$1(s$3))) {
6382
6527
  if (this.hasAttribute("sameValueAs")) {
6383
6528
  this.sameValueAsName = this.getAttribute("sameValueAs");
6384
6529
  this.sameValueAsHandle = (v2) => this.pattern = v2;
6385
- let formPublisher = this.getFormPublisher();
6530
+ const formPublisher = this.getFormPublisher();
6386
6531
  if (!formPublisher)
6387
6532
  return;
6388
6533
  formPublisher[this.sameValueAsName].onAssign(this.sameValueAsHandle);
@@ -6391,7 +6536,7 @@ let Input = class extends Form(Form$2(Subscriber$1(s$3))) {
6391
6536
  disconnectedCallback() {
6392
6537
  super.disconnectedCallback();
6393
6538
  if (this.hasAttribute("sameValueAs") && this.sameValueAsName) {
6394
- let formPublisher = this.getFormPublisher();
6539
+ const formPublisher = this.getFormPublisher();
6395
6540
  if (!formPublisher)
6396
6541
  return;
6397
6542
  formPublisher[this.sameValueAsName].offAssign(this.sameValueAsHandle);
@@ -6523,21 +6668,21 @@ let Pop = class extends s$3 {
6523
6668
  constructor() {
6524
6669
  super(...arguments);
6525
6670
  this.open = false;
6526
- this.toggle = "true";
6527
6671
  this.noToggle = false;
6528
6672
  this.inline = false;
6529
6673
  this.shadow = "lg";
6530
6674
  this.placement = "bottom";
6531
6675
  this.positioningRuns = false;
6532
- this.lastContentX = Number.NaN;
6533
- this.lastContentY = Number.NaN;
6676
+ this.lastContentX = 0;
6677
+ this.lastContentY = 0;
6678
+ this.resizeObserver = new ResizeObserver(() => this.computePosition(this.placement));
6534
6679
  }
6535
- runPositioning() {
6680
+ runPositioningLoop() {
6536
6681
  if (!this.positioningRuns)
6537
6682
  return;
6538
6683
  this.positioningRuns = true;
6539
- this._setUpMenu(this.placement);
6540
- window.requestAnimationFrame(() => this.runPositioning());
6684
+ this.computePosition(this.placement);
6685
+ window.requestAnimationFrame(() => this.runPositioningLoop());
6541
6686
  }
6542
6687
  _toggle(e2) {
6543
6688
  if (this.open && this.noToggle)
@@ -6549,13 +6694,14 @@ let Pop = class extends s$3 {
6549
6694
  this.open ? this._show() : this._hide();
6550
6695
  }
6551
6696
  _show() {
6697
+ this.popContent.style.removeProperty("display");
6552
6698
  this.open = true;
6553
6699
  this.popContent.setAttribute("tabindex", "0");
6554
6700
  if (this.popBtn && this.popContent && !this.positioningRuns) {
6555
6701
  this.positioningRuns = true;
6556
- this.lastContentX = Number.NaN;
6557
- this.lastContentY = Number.NaN;
6558
- this.runPositioning();
6702
+ this.lastContentX = 0;
6703
+ this.lastContentY = 0;
6704
+ this.runPositioningLoop();
6559
6705
  }
6560
6706
  }
6561
6707
  _hide() {
@@ -6564,8 +6710,8 @@ let Pop = class extends s$3 {
6564
6710
  this.positioningRuns = false;
6565
6711
  }
6566
6712
  _handleClosePop(e2) {
6567
- let path = e2.composedPath();
6568
- let target = path[0];
6713
+ const path = e2.composedPath();
6714
+ const target = path[0];
6569
6715
  Pop.pops.forEach((pop) => {
6570
6716
  const popContainsTarget = path.includes(pop);
6571
6717
  const popContentContainsTarget = path.includes(pop.querySelector('[slot="content"]'));
@@ -6585,6 +6731,11 @@ let Pop = class extends s$3 {
6585
6731
  }
6586
6732
  Pop.pops.add(this);
6587
6733
  }
6734
+ firstUpdated(_changedProperties) {
6735
+ super.firstUpdated(_changedProperties);
6736
+ this.resizeObserver.observe(this.popContent);
6737
+ this.computePosition(this.placement);
6738
+ }
6588
6739
  disconnectedCallback() {
6589
6740
  super.disconnectedCallback();
6590
6741
  Pop.pops.delete(this);
@@ -6592,23 +6743,21 @@ let Pop = class extends s$3 {
6592
6743
  document.removeEventListener("pointerdown", this._handleClosePop);
6593
6744
  document.removeEventListener("click", this._handleClosePop);
6594
6745
  }
6746
+ this.resizeObserver.unobserve(this.popContent);
6595
6747
  }
6596
- _setUpMenu(placement) {
6597
- var _a2;
6598
- const contentRect = (_a2 = this.popContent) == null ? void 0 : _a2.getBoundingClientRect();
6748
+ computePosition(placement) {
6749
+ var _a2, _b, _c;
6750
+ let contentRect = (_a2 = this.popContent) == null ? void 0 : _a2.getBoundingClientRect();
6599
6751
  const padding = 8;
6600
- const shiftPadding = 20;
6752
+ const shiftPadding = 5;
6601
6753
  const thisRect = this.getBoundingClientRect();
6602
- if (!this.offsetParent)
6603
- return;
6604
- let bodyRect = this.offsetParent.getBoundingClientRect();
6605
- let x0 = thisRect.left - bodyRect.left;
6606
- let y0 = thisRect.top - bodyRect.top;
6754
+ const x0 = thisRect.left;
6755
+ const y0 = thisRect.top;
6607
6756
  let x2 = x0, y2 = y0;
6608
- let yTop = y0 - contentRect.height - padding;
6609
- let xLeft = x0 - contentRect.width - 2 * padding;
6610
- let xRight = x0 + thisRect.width + 2 * padding;
6611
- let yBottom = y0 + thisRect.height + padding;
6757
+ const yTop = y0 - contentRect.height - padding;
6758
+ const xLeft = x0 - contentRect.width - padding;
6759
+ const xRight = x0 + thisRect.width + padding;
6760
+ const yBottom = y0 + thisRect.height + padding;
6612
6761
  switch (placement) {
6613
6762
  case "bottom":
6614
6763
  y2 = yBottom;
@@ -6623,27 +6772,43 @@ let Pop = class extends s$3 {
6623
6772
  x2 = xRight;
6624
6773
  break;
6625
6774
  }
6626
- let dxRight = window.innerWidth - xRight - bodyRect.left - contentRect.width - shiftPadding;
6627
- if (dxRight < 0 && placement === "right")
6628
- x2 = xLeft;
6629
- if (dxRight < 0 && ["top", "bottom"].includes(placement))
6630
- x2 = Math.max(x2 + dxRight, xLeft + thisRect.width);
6631
- let dxLeft = -bodyRect.left - xLeft;
6632
- if (dxLeft > shiftPadding && placement === "left")
6775
+ this.lastContentX += x2 - contentRect.x;
6776
+ this.lastContentY += y2 - contentRect.y;
6777
+ Object.assign(this.popContent.style, {
6778
+ left: `${this.lastContentX}px`,
6779
+ top: `${this.lastContentY}px`
6780
+ });
6781
+ contentRect = (_b = this.popContent) == null ? void 0 : _b.getBoundingClientRect();
6782
+ if (contentRect.x < shiftPadding && placement == "left")
6633
6783
  x2 = xRight;
6634
- let dyBottom = window.innerHeight - yBottom - bodyRect.top - contentRect.height - shiftPadding;
6635
- if (dyBottom < 0 && placement === "bottom")
6636
- y2 = yTop;
6637
- if (dyBottom < 0 && ["left", "right"].includes(placement))
6638
- y2 = Math.max(y2 + dyBottom, yTop + thisRect.height);
6639
- let dyTop = -bodyRect.top - yTop;
6640
- if (dyTop > -shiftPadding && placement === "top")
6784
+ if (contentRect.y < shiftPadding && placement == "top")
6641
6785
  y2 = yBottom;
6642
- this.lastContentX = x2;
6643
- this.lastContentY = y2;
6786
+ if (contentRect.x + contentRect.width > window.innerWidth - shiftPadding && placement == "right")
6787
+ x2 = xLeft;
6788
+ if (contentRect.y + contentRect.height > window.innerHeight - shiftPadding && placement == "bottom")
6789
+ y2 = yTop;
6790
+ this.lastContentX += x2 - contentRect.x;
6791
+ this.lastContentY += y2 - contentRect.y;
6792
+ Object.assign(this.popContent.style, {
6793
+ left: `${this.lastContentX}px`,
6794
+ top: `${this.lastContentY}px`
6795
+ });
6796
+ contentRect = (_c = this.popContent) == null ? void 0 : _c.getBoundingClientRect();
6797
+ if (contentRect.x < 0) {
6798
+ this.lastContentX += -contentRect.x;
6799
+ }
6800
+ if (contentRect.y < 0) {
6801
+ this.lastContentY += -contentRect.y;
6802
+ }
6803
+ if (contentRect.x + contentRect.width > window.innerWidth) {
6804
+ this.lastContentX += window.innerWidth - (contentRect.x + contentRect.width);
6805
+ }
6806
+ if (contentRect.y + contentRect.height > window.innerHeight) {
6807
+ this.lastContentY += window.innerHeight - (contentRect.y + contentRect.height);
6808
+ }
6644
6809
  Object.assign(this.popContent.style, {
6645
- left: `${x2}px`,
6646
- top: `${y2}px`
6810
+ left: `${this.lastContentX}px`,
6811
+ top: `${this.lastContentY}px`
6647
6812
  });
6648
6813
  }
6649
6814
  render() {
@@ -6652,7 +6817,7 @@ let Pop = class extends s$3 {
6652
6817
  };
6653
6818
  Pop.pops = /* @__PURE__ */ new Set();
6654
6819
  Pop.styles = [
6655
- i$4`:host{display:inline-block;vertical-align:middle}slot[name=content]{max-width:80vw;background-color:var(--sc-base);position:absolute;z-index:50;display:block;transform:translateY(1rem) scale(.95);opacity:0;pointer-events:none;transition-duration:.15s;transition-timing-function:ease;transition-property:all;border-radius:min(calc(var(--sc-btn-rounded) * 2),.4em)}slot[name=content].is-open{transform:translateY(0) scale(1);opacity:1;pointer-events:auto;transition-property:scale,opacity;transition-timing-function:cubic-bezier(.25,.25,.42,1.225)}:host([shadow=md]) slot[name=content],:host([shadow=true]) slot[name=content],:host([shadow]) slot[name=content]{box-shadow:var(--sc-shadow)}:host([shadow=sm]) slot[name=content]{box-shadow:var(--sc-shadow-sm)}:host([shadow=none]) slot[name=content]{box-shadow:none}:host([shadow=lg]) slot[name=content]{box-shadow:var(--sc-shadow-lg)}:host([inline]){vertical-align:baseline}`
6820
+ i$4`:host{display:inline-block;vertical-align:middle}slot[name=content]{max-width:80vw;background-color:var(--sc-base);position:absolute;z-index:50;display:block;transform:translateY(1rem) scale(.95);opacity:0;pointer-events:none;transition-duration:.15s;transition-timing-function:ease;transition-property:all;border-radius:min(calc(var(--sc-btn-rounded) * 2),.4em)}slot[name=content].is-open:not(.is-empty){transform:translateY(0) scale(1);opacity:1;pointer-events:auto;transition-property:scale,opacity;transition-timing-function:cubic-bezier(.25,.25,.42,1.225)}:host([shadow=md]) slot[name=content],:host([shadow=true]) slot[name=content],:host([shadow]) slot[name=content]{box-shadow:var(--sc-shadow)}:host([shadow=sm]) slot[name=content]{box-shadow:var(--sc-shadow-sm)}:host([shadow=none]) slot[name=content]{box-shadow:none}:host([shadow=lg]) slot[name=content]{box-shadow:var(--sc-shadow-lg)}:host([inline]){vertical-align:baseline}`
6656
6821
  ];
6657
6822
  __decorateClass$F([
6658
6823
  t$3()
@@ -6663,9 +6828,6 @@ __decorateClass$F([
6663
6828
  __decorateClass$F([
6664
6829
  i$5("slot[name=content]")
6665
6830
  ], Pop.prototype, "popContent", 2);
6666
- __decorateClass$F([
6667
- e$7({ type: String })
6668
- ], Pop.prototype, "toggle", 2);
6669
6831
  __decorateClass$F([
6670
6832
  e$7({ type: Boolean })
6671
6833
  ], Pop.prototype, "noToggle", 2);
@@ -6772,7 +6934,7 @@ let InputAutocomplete = class extends TemplatesContainer(Subscriber(s$3)) {
6772
6934
  super.connectedCallback();
6773
6935
  }
6774
6936
  render() {
6775
- return y`<sonic-pop toggle="false" style="display:block"><sonic-input type="search" data-keyboard-nav="nav-autocomplete" label="${l$2(this.label)}" description="${l$2(this.description)}" name="${l$2(this.name)}" value="${l$2(this.value)}" autocomplete="off" clearable></sonic-input><sonic-menu slot="content"><sonic-queue filteredFields="${this.filteredFields}" dataProviderExpression="${this.dataProviderExpression}" dataFilterProvider="${this.formDataProvider}" key="${this.key}" .templates="${this.templateList}" displayContents></sonic-queue></sonic-menu></sonic-pop>`;
6937
+ return y`<sonic-pop noToggle style="display:block"><sonic-input type="search" data-keyboard-nav="nav-autocomplete" label="${l$2(this.label)}" description="${l$2(this.description)}" name="${l$2(this.name)}" value="${l$2(this.value)}" autocomplete="off" clearable></sonic-input><sonic-menu slot="content"><sonic-queue filteredFields="${this.filteredFields}" dataProviderExpression="${this.dataProviderExpression}" dataFilterProvider="${this.formDataProvider}" key="${this.key}" .templates="${this.templateList}" displayContents></sonic-queue></sonic-menu></sonic-pop>`;
6776
6938
  }
6777
6939
  };
6778
6940
  InputAutocomplete.styles = [
@@ -6854,7 +7016,7 @@ let SonicComponent$1 = class extends Subscriber(s$3) {
6854
7016
  this.hasMinuscule = /[a-z]/.test(v2);
6855
7017
  this.hasMajuscule = /[A-Z]/.test(v2);
6856
7018
  this.hasNumber = /[0-9]/.test(v2);
6857
- this.hasSpecialChar = /[!"#$%&'()*+,\-\.\/:;<=>?@[\]^_`{|}~]/.test(v2);
7019
+ this.hasSpecialChar = /[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/.test(v2);
6858
7020
  };
6859
7021
  PublisherManager.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue);
6860
7022
  }
@@ -6941,7 +7103,7 @@ let SonicComponent = class extends Subscriber(s$3) {
6941
7103
  }
6942
7104
  connectedCallback() {
6943
7105
  super.connectedCallback();
6944
- let formDataProvider = PublisherManager.get(this.getAncestorAttributeValue("formDataProvider"));
7106
+ const formDataProvider = PublisherManager.get(this.getAncestorAttributeValue("formDataProvider"));
6945
7107
  if (this.name && this.sameValueAs) {
6946
7108
  this.checkValue = (v2) => {
6947
7109
  if (v2)
@@ -6958,7 +7120,7 @@ let SonicComponent = class extends Subscriber(s$3) {
6958
7120
  }
6959
7121
  disconnectedCallback() {
6960
7122
  if (this.checkValue && this.name && this.sameValueAs) {
6961
- let formDataProvider = PublisherManager.get(this.getAncestorAttributeValue("formDataProvider"));
7123
+ const formDataProvider = PublisherManager.get(this.getAncestorAttributeValue("formDataProvider"));
6962
7124
  formDataProvider[this.name].offAssign(this.checkValue);
6963
7125
  formDataProvider[this.sameValueAs].offAssign(this.checkValue);
6964
7126
  }
@@ -7121,7 +7283,7 @@ let Select = class extends Form$2(Subscriber$1(s$3)) {
7121
7283
  this.value = option.value || "";
7122
7284
  }
7123
7285
  }
7124
- let value = this.value || this.getAttribute("value");
7286
+ const value = this.value || this.getAttribute("value");
7125
7287
  if (!value && this._options.length > 0) {
7126
7288
  this.value = this._options[0][this.valueKey];
7127
7289
  }
@@ -7130,7 +7292,7 @@ let Select = class extends Form$2(Subscriber$1(s$3)) {
7130
7292
  get options() {
7131
7293
  return this._options;
7132
7294
  }
7133
- firstUpdated(_changedProperties) {
7295
+ firstUpdated() {
7134
7296
  this.hasDoneFirstUpdate = true;
7135
7297
  }
7136
7298
  set value(value) {
@@ -7148,7 +7310,7 @@ let Select = class extends Form$2(Subscriber$1(s$3)) {
7148
7310
  return this._value;
7149
7311
  }
7150
7312
  updateFormPublisherValue() {
7151
- let formPublisher = this.getFormPublisher();
7313
+ const formPublisher = this.getFormPublisher();
7152
7314
  if (formPublisher) {
7153
7315
  formPublisher[this.name] = this.value;
7154
7316
  }
@@ -7156,7 +7318,7 @@ let Select = class extends Form$2(Subscriber$1(s$3)) {
7156
7318
  connectedCallback() {
7157
7319
  super.connectedCallback();
7158
7320
  this.hasSlotOrProps();
7159
- let options = this.querySelectorAll("option");
7321
+ const options = this.querySelectorAll("option");
7160
7322
  if (options.length > 0) {
7161
7323
  this.options = Array.from(options).map((option) => {
7162
7324
  return {
@@ -7201,7 +7363,7 @@ let Select = class extends Form$2(Subscriber$1(s$3)) {
7201
7363
  const select2 = (_a2 = this.shadowRoot) == null ? void 0 : _a2.querySelector("select");
7202
7364
  if (!select2 || select2.checkValidity())
7203
7365
  return;
7204
- let formPublisher = this.getFormPublisher();
7366
+ const formPublisher = this.getFormPublisher();
7205
7367
  if (formPublisher) {
7206
7368
  formPublisher.isFormValid = false;
7207
7369
  }
@@ -7212,10 +7374,14 @@ let Select = class extends Form$2(Subscriber$1(s$3)) {
7212
7374
  "has-prefix": this.hasPrefix,
7213
7375
  "has-suffix": this.hasSuffix
7214
7376
  };
7215
- return y`<label for="form-element" class="${this.hasLabel ? "form-label" : "hidden"}">${this.label ? o$2(this.label) : ""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div class="form-control ${o(slotClasses)}"><slot name="prefix" @slotchange="${this.hasSlotOrProps}"></slot><div class="form-select-wrapper"><select id="form-element" @change="${this.handleChange}" @blur="${this.handleBlur}" ?disabled="${l$2(this.disabled)}" ?required="${this.required}" ?multiple="${this.multiple}" size="${l$2(this.selectSize)}" ?autofocus="${this.autofocus}" .value="${this.value}" class="form-element" aria-label="${l$2(this.ariaLabel)}" aria-labelledby="${l$2(this.ariaLabelledby)}">${c$1(this.options, (option) => option[this.valueKey], (option) => {
7216
- const isSelected = this.value == option[this.valueKey] ? "selected" : null;
7217
- return y`<option selected="${l$2(isSelected)}" value="${option[this.valueKey]}">${option[this.wordingKey]}</option>`;
7218
- })}<slot></slot></select><sonic-icon class="select-chevron" name="nav-arrow-down" .size="${this.size}"></sonic-icon></div><slot name="suffix" @slotchange="${this.hasSlotOrProps}"></slot></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription ? "form-description" : "hidden"}">${this.description ? y`${o$2(this.description)}` : ""}</slot>`;
7377
+ return y`<label for="form-element" class="${this.hasLabel ? "form-label" : "hidden"}">${this.label ? o$2(this.label) : ""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div class="form-control ${o(slotClasses)}"><slot name="prefix" @slotchange="${this.hasSlotOrProps}"></slot><div class="form-select-wrapper"><select id="form-element" @change="${this.handleChange}" @blur="${this.handleBlur}" ?disabled="${this.disabled}" ?required="${this.required}" ?multiple="${this.multiple}" size="${l$2(this.selectSize)}" ?autofocus="${this.autofocus}" .value="${this.value}" class="form-element" aria-label="${l$2(this.ariaLabel)}" aria-labelledby="${l$2(this.ariaLabelledby)}">${c$1(
7378
+ this.options,
7379
+ (option) => option[this.valueKey],
7380
+ (option) => {
7381
+ const isSelected = this.value == option[this.valueKey] ? true : false;
7382
+ return y`<option ?selected="${isSelected}" value="${option[this.valueKey]}">${option[this.wordingKey]}</option>`;
7383
+ }
7384
+ )}<slot></slot></select><sonic-icon class="select-chevron" name="nav-arrow-down" .size="${this.size}"></sonic-icon></div><slot name="suffix" @slotchange="${this.hasSlotOrProps}"></slot></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription ? "form-description" : "hidden"}">${this.description ? y`${o$2(this.description)}` : ""}</slot>`;
7219
7385
  }
7220
7386
  };
7221
7387
  Select.styles = [
@@ -7223,7 +7389,7 @@ Select.styles = [
7223
7389
  formControl,
7224
7390
  label,
7225
7391
  description,
7226
- i$4`.form-element{appearance:none}:host([disabled]) sonic-icon{opacity:0}:host(:not([disabled])) .form-element:not(:has(option:only-child)){padding-right:max(1em,calc(.8 * var(--sc-input-px)))}.form-select-wrapper{position:relative;width:100%}sonic-icon{position:absolute;right:calc(.8 * var(--sc-input-px));top:50%;pointer-events:none;transform:translateY(-50%);color:var(--sc-input-c)}option{padding:.1rem 5rem;color:var(--sc-base-content);background:var(--sc-base)}`
7392
+ i$4`.form-element{appearance:none}:host([disabled]) sonic-icon{opacity:0}@supports selector(:has(*)){:host(:not([disabled])) .form-element:not(:has(option:only-child)){padding-right:max(1.275em,calc(1.5 * var(--sc-input-px)))}}@supports not selector(:has(*)){:host(:not([disabled])) .form-element{padding-right:max(1.275em,calc(1.5 * var(--sc-input-px)))}}.form-select-wrapper{position:relative;width:100%}sonic-icon{position:absolute;right:calc(.8 * var(--sc-input-px));top:50%;pointer-events:none;transform:translateY(-50%);color:var(--sc-input-c)}option{padding:.1rem var(--sc-input-px);color:var(--sc-base-content);background:var(--sc-base)}select[multiple] option{background:0 0;padding:0}`
7227
7393
  ];
7228
7394
  __decorateClass$y([
7229
7395
  e$7({ type: String })
@@ -7320,7 +7486,7 @@ let Textarea = class extends Form(Form$2(Subscriber$1(s$3))) {
7320
7486
  const textarea2 = (_a2 = this.shadowRoot) == null ? void 0 : _a2.querySelector("textarea");
7321
7487
  if (!textarea2 || textarea2.checkValidity())
7322
7488
  return;
7323
- let formPublisher = this.getFormPublisher();
7489
+ const formPublisher = this.getFormPublisher();
7324
7490
  if (formPublisher) {
7325
7491
  formPublisher.isFormValid = false;
7326
7492
  }
@@ -7517,13 +7683,13 @@ Fieldset = __decorateClass$u([
7517
7683
  ], Fieldset);
7518
7684
  class s {
7519
7685
  constructor(s2, { target: t2, config: i2, callback: h2, skipInitial: e2 }) {
7520
- this.t = /* @__PURE__ */ new Set(), this.o = false, this.i = false, this.h = s2, t2 !== null && this.t.add(t2 != null ? t2 : s2), this.l = i2, this.o = e2 != null ? e2 : this.o, this.callback = h2, window.ResizeObserver ? (this.u = new ResizeObserver((s3) => {
7686
+ this.t = /* @__PURE__ */ new Set(), this.o = false, this.i = false, this.h = s2, null !== t2 && this.t.add(null != t2 ? t2 : s2), this.l = i2, this.o = null != e2 ? e2 : this.o, this.callback = h2, window.ResizeObserver ? (this.u = new ResizeObserver((s3) => {
7521
7687
  this.handleChanges(s3), this.h.requestUpdate();
7522
7688
  }), s2.addController(this)) : console.warn("ResizeController error: browser does not support ResizeObserver.");
7523
7689
  }
7524
7690
  handleChanges(s2) {
7525
7691
  var t2;
7526
- this.value = (t2 = this.callback) === null || t2 === void 0 ? void 0 : t2.call(this, s2, this.u);
7692
+ this.value = null === (t2 = this.callback) || void 0 === t2 ? void 0 : t2.call(this, s2, this.u);
7527
7693
  }
7528
7694
  hostConnected() {
7529
7695
  for (const s2 of this.t)
@@ -7647,7 +7813,7 @@ let Group = class extends s$3 {
7647
7813
  this.hasLabel = false;
7648
7814
  }
7649
7815
  updated() {
7650
- const children = this.querySelectorAll("sonic-input, sonic-button");
7816
+ const children = this.querySelectorAll("sonic-input, sonic-button, sonic-select");
7651
7817
  const nbChildren = children.length;
7652
7818
  if (nbChildren > 1) {
7653
7819
  children.forEach((item, index) => {
@@ -7681,7 +7847,7 @@ let Group = class extends s$3 {
7681
7847
  this.hasDescription = this.description || ((_b = this.slotDescriptionNodes) == null ? void 0 : _b.length) ? true : false;
7682
7848
  }
7683
7849
  render() {
7684
- var slotStyle = {
7850
+ const slotStyle = {
7685
7851
  alignItems: this.alignItems
7686
7852
  };
7687
7853
  return y`<span class="${this.hasLabel ? "form-label" : "hidden"}">${this.label ? o$2(this.label) : ""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></span><slot class="main-slot" style="${i$1(slotStyle)}"></slot><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription ? "form-description" : "hidden"}">${this.description ? y`${o$2(this.description)}` : ""}</slot>`;
@@ -7691,7 +7857,7 @@ Group.styles = [
7691
7857
  fontSize,
7692
7858
  label,
7693
7859
  description,
7694
- i$4`:host{display:inline-block;vertical-align:middle}.main-slot{width:100%;display:flex}.hidden{display:none}`
7860
+ i$4`:host{display:inline-block;vertical-align:middle}.main-slot{width:100%;display:flex}.hidden{display:none}::slotted(sonic-button),::slotted(sonic-input),::slotted(sonic-select){flex-grow:1}`
7695
7861
  ];
7696
7862
  __decorateClass$r([
7697
7863
  e$7({ type: String })
@@ -7791,7 +7957,7 @@ var __decorateClass$p = (decorators, target, key, kind) => {
7791
7957
  __defProp$p(target, key, result);
7792
7958
  return result;
7793
7959
  };
7794
- const tagName$p = "sonic-taxonomy";
7960
+ const tagName$p = "sonic-event-taxonomy";
7795
7961
  let Taxonomy = class extends s$3 {
7796
7962
  constructor() {
7797
7963
  super(...arguments);
@@ -7799,6 +7965,7 @@ let Taxonomy = class extends s$3 {
7799
7965
  this.taxonomy = [];
7800
7966
  this.separator = ",&nbsp;";
7801
7967
  this.key = "";
7968
+ this.displayAll = false;
7802
7969
  this.type = "default";
7803
7970
  this.variant = "default";
7804
7971
  this.size = "md";
@@ -7806,16 +7973,22 @@ let Taxonomy = class extends s$3 {
7806
7973
  render() {
7807
7974
  if (!Array.isArray(this.taxonomy))
7808
7975
  return b$1;
7809
- let key = this.key + "_display";
7810
- let taxo = this.taxonomy.filter((elt) => elt != null && (elt[key] === true || elt[key] == "1" || !elt.hasOwnProperty(key)));
7976
+ const key = this.key + "_display";
7977
+ const taxo = this.displayAll ? this.taxonomy : this.taxonomy.filter(
7978
+ (elt) => elt != null && (elt[key] === true || elt[key] == "1" || !Object.hasOwnProperty.call(elt, key))
7979
+ );
7811
7980
  if (taxo.length === 0) {
7812
7981
  this.style.display = "none";
7813
7982
  return b$1;
7814
7983
  }
7815
7984
  this.style.removeProperty("display");
7816
- return y`<sonic-badge type="${this.type}" variant="${this.variant}" size="${this.size}"><sonic-icon slot="prefix" library="${l$2(this.icon.library)}" prefix="${l$2(this.icon.prefix)}" name="${l$2(this.icon.name)}"></sonic-icon><span class="taxonomy-list">${c$1(taxo, (item) => item[this.key + "_id"], (item) => {
7817
- return y`<span>${item[this.key + "_name"] || item["name"]}</span><span class="sonic-taxonomy-separator">${o$2(this.separator)}</span>`;
7818
- })}</span></sonic-badge>`;
7985
+ return y`<sonic-badge type="${this.type}" variant="${this.variant}" size="${this.size}"><sonic-icon slot="prefix" library="${l$2(this.icon.library)}" prefix="${l$2(this.icon.prefix)}" name="${l$2(this.icon.name)}"></sonic-icon><span class="taxonomy-list">${c$1(
7986
+ taxo,
7987
+ (item) => item[this.key + "_id"],
7988
+ (item) => {
7989
+ return y`<span>${item[this.key + "_name"] || item["name"]}</span><span class="sonic-taxonomy-separator">${o$2(this.separator)}</span>`;
7990
+ }
7991
+ )}</span></sonic-badge>`;
7819
7992
  }
7820
7993
  };
7821
7994
  Taxonomy.styles = i$4`:host .sonic-taxonomy-separator:last-child{display:none}.taxonomy-list{display:flex;flex-wrap:wrap}`;
@@ -7831,6 +8004,9 @@ __decorateClass$p([
7831
8004
  __decorateClass$p([
7832
8005
  e$7({ type: String })
7833
8006
  ], Taxonomy.prototype, "key", 2);
8007
+ __decorateClass$p([
8008
+ e$7({ type: Boolean })
8009
+ ], Taxonomy.prototype, "displayAll", 2);
7834
8010
  __decorateClass$p([
7835
8011
  e$7({ type: String, reflect: true })
7836
8012
  ], Taxonomy.prototype, "type", 2);
@@ -7907,37 +8083,36 @@ let MenuItems = class extends s$3 {
7907
8083
  super.disconnectedCallback();
7908
8084
  }
7909
8085
  initScrollable() {
7910
- const tabsMenu = this;
7911
8086
  let isDown = false;
7912
8087
  let startX;
7913
8088
  let scrollLeft;
7914
8089
  if (this.scrollable) {
7915
- tabsMenu.addEventListener("mousedown", (e2) => {
8090
+ this.addEventListener("mousedown", (e2) => {
7916
8091
  isDown = true;
7917
- tabsMenu.classList.add("active");
7918
- startX = e2.pageX - tabsMenu.offsetLeft;
7919
- scrollLeft = tabsMenu.scrollLeft;
8092
+ this.classList.add("active");
8093
+ startX = e2.pageX - this.offsetLeft;
8094
+ scrollLeft = this.scrollLeft;
7920
8095
  });
7921
- tabsMenu.addEventListener("mouseleave", () => {
8096
+ this.addEventListener("mouseleave", () => {
7922
8097
  isDown = false;
7923
- tabsMenu.classList.remove("active");
8098
+ this.classList.remove("active");
7924
8099
  });
7925
- tabsMenu.addEventListener("mouseup", () => {
8100
+ this.addEventListener("mouseup", () => {
7926
8101
  isDown = false;
7927
- tabsMenu.classList.remove("active");
8102
+ this.classList.remove("active");
7928
8103
  });
7929
- tabsMenu.addEventListener("mousemove", (e2) => {
8104
+ this.addEventListener("mousemove", (e2) => {
7930
8105
  if (!isDown)
7931
8106
  return;
7932
8107
  e2.preventDefault();
7933
- const x2 = e2.pageX - tabsMenu.offsetLeft;
8108
+ const x2 = e2.pageX - this.offsetLeft;
7934
8109
  const walk = (x2 - startX) * 1.5;
7935
- tabsMenu.scrollLeft = scrollLeft - walk;
7936
- this.setScrollShadow(tabsMenu, this.direction);
8110
+ this.scrollLeft = scrollLeft - walk;
8111
+ this.setScrollShadow(this, this.direction);
7937
8112
  });
7938
- tabsMenu.addEventListener("scroll", (e2) => {
8113
+ this.addEventListener("scroll", (e2) => {
7939
8114
  e2.preventDefault();
7940
- this.setScrollShadow(tabsMenu, this.direction);
8115
+ this.setScrollShadow(this, this.direction);
7941
8116
  });
7942
8117
  }
7943
8118
  }
@@ -8206,7 +8381,7 @@ let Modal = class extends Subscriber$1(s$3) {
8206
8381
  static create(options) {
8207
8382
  const modal = document.createElement(tagName$i);
8208
8383
  modal.innerHTML = `<sonic-modal-close></sonic-modal-close><sonic-modal-content>${options.content}</sonic-modal-content>` || "";
8209
- let container = document.querySelector("sonic-theme") || document.body;
8384
+ const container = document.querySelector("sonic-theme") || document.body;
8210
8385
  container.appendChild(modal);
8211
8386
  modal.show();
8212
8387
  return modal;
@@ -8219,9 +8394,13 @@ let Modal = class extends Subscriber$1(s$3) {
8219
8394
  const currentModal = this;
8220
8395
  document.addEventListener("keydown", this.handleEscape);
8221
8396
  currentModal.closeBtn.forEach((closeBtn) => {
8222
- closeBtn.addEventListener("click", function() {
8223
- currentModal.hide();
8224
- }, { once: true });
8397
+ closeBtn.addEventListener(
8398
+ "click",
8399
+ function() {
8400
+ currentModal.hide();
8401
+ },
8402
+ { once: true }
8403
+ );
8225
8404
  });
8226
8405
  }
8227
8406
  willUpdate(_changedProperties) {
@@ -8433,19 +8612,20 @@ let MessageSubscriber = class extends Subscriber$1(s$3) {
8433
8612
  return;
8434
8613
  value.forEach((message) => {
8435
8614
  if (message.type == "public")
8436
- SonicToast$1.add({ text: message.content, status: message.status });
8615
+ SonicToast$1.add({ text: message.content || "", status: message.status });
8437
8616
  });
8438
8617
  }
8439
8618
  get message() {
8440
8619
  return this._message;
8441
8620
  }
8442
8621
  set message(value) {
8622
+ var _a2, _b;
8443
8623
  this._message = value;
8444
8624
  if (!this.message)
8445
8625
  return;
8446
- if (this.props.success !== false)
8626
+ if (((_a2 = this.props) == null ? void 0 : _a2.success) !== false)
8447
8627
  return;
8448
- if (this.props.public_message)
8628
+ if ((_b = this.props) == null ? void 0 : _b.public_message)
8449
8629
  return;
8450
8630
  SonicToast$1.add({ text: this.message, status: "error" });
8451
8631
  }
@@ -8453,15 +8633,16 @@ let MessageSubscriber = class extends Subscriber$1(s$3) {
8453
8633
  return this._data;
8454
8634
  }
8455
8635
  set data(value) {
8636
+ var _a2, _b, _c, _d;
8456
8637
  this._data = value;
8457
8638
  const toastOptions = { text: "Votre produit a bien \xE9t\xE9 ajout\xE9", status: "success" };
8458
- if (Array.isArray(this.data) && this.props.success === true)
8639
+ if (Array.isArray(this.data) && ((_a2 = this.props) == null ? void 0 : _a2.success) === true)
8459
8640
  SonicToast$1.add(toastOptions);
8460
- if (this.data == "" && this.props.status === true)
8641
+ if (this.data == "" && ((_b = this.props) == null ? void 0 : _b.status) === true)
8461
8642
  SonicToast$1.add(toastOptions);
8462
- if (this.props.success !== false)
8643
+ if (((_c = this.props) == null ? void 0 : _c.success) !== false)
8463
8644
  return;
8464
- if (this.props.public_message)
8645
+ if ((_d = this.props) == null ? void 0 : _d.public_message)
8465
8646
  return;
8466
8647
  SonicToast$1.add({ text: this.data, status: "error" });
8467
8648
  }
@@ -8506,12 +8687,12 @@ let Tooltip = class extends s$3 {
8506
8687
  this.disabled = false;
8507
8688
  }
8508
8689
  render() {
8509
- let disabledClass = this.disabled || this.label == "" ? "disabled" : "";
8690
+ const disabledClass = this.disabled || this.label == "" ? "disabled" : "";
8510
8691
  return y`<div data-tooltip-text="${this.label.trim().replace("&nbsp;", " ")}" class="tooltip ${disabledClass}"><slot></slot></div>`;
8511
8692
  }
8512
8693
  };
8513
8694
  Tooltip.styles = [
8514
- i$4`:host{position:relative;display:inline-flex;align-items:center;text-align:center;--sc-tooltip-fw:var(--sc-font-weight-base)}.tooltip:before{position:absolute;content:attr(data-tooltip-text);font-size:.85rem;display:block;opacity:0;pointer-events:none;background:var(--sc-base-content,#111827);padding:.25rem;border-radius:.25rem;color:var(--sc-base,#fff);z-index:999;display:none;line-height:1.1;width:max-content;max-width:20rem;white-space:pre-line;font-weight:var(--sc-tooltip-fw)}.tooltip:not(.disabled):hover:before{opacity:1;display:block}:host(:not([placement])) .tooltip:before,:host([placement=top]) .tooltip:before{bottom:calc(100% + .25rem);left:50%;transform:translateX(-50%)}:host([placement=bottom]) .tooltip:before{top:calc(100% + .25rem);left:50%;transform:translateX(-50%)}:host([placement=left]) .tooltip:before{top:50%;right:calc(100% + .25rem);transform:translateY(-50%)}:host([placement=right]) .tooltip:before{top:50%;transform:translateY(-50%);left:calc(100% + .25rem)}`
8695
+ i$4`:host{position:relative;display:inline-flex;align-items:center;text-align:center;--sc-tooltip-fw:var(--sc-font-weight-base)}.tooltip:before{position:absolute;content:attr(data-tooltip-text);font-size:.85rem;display:block;opacity:0;pointer-events:none;background:var(--sc-base-content,#111827);padding:.32rem .25rem;border-radius:var(--sc-rounded);color:var(--sc-base,#fff);z-index:999;display:none;line-height:1.1;width:max-content;max-width:18rem;white-space:pre-line;font-weight:var(--sc-tooltip-fw)}.tooltip:not(.disabled):hover:before{opacity:1;display:block}:host(:not([placement])) .tooltip:before,:host([placement=top]) .tooltip:before{bottom:calc(100% + .25rem);left:50%;transform:translateX(-50%)}:host([placement=bottom]) .tooltip:before{top:calc(100% + .25rem);left:50%;transform:translateX(-50%)}:host([placement=left]) .tooltip:before{top:50%;right:calc(100% + .25rem);transform:translateY(-50%)}:host([placement=right]) .tooltip:before{top:50%;transform:translateY(-50%);left:calc(100% + .25rem)}`
8515
8696
  ];
8516
8697
  __decorateClass$f([
8517
8698
  e$7({ type: String })
@@ -8623,7 +8804,7 @@ let CardHeader = class extends s$3 {
8623
8804
  }
8624
8805
  };
8625
8806
  CardHeader.styles = [
8626
- i$4`:host{--sc-card-header-mb:1.35rem;--sc-card-header-font-size:1.875rem;--sc-card-header-font-weight:var(--sc-headings-font-weight);--sc-card-header-font-style:var(--sc-headings-font-style);--sc-card-header-family:var(--sc-headings-font-family);--sc-card-header-line-height:var(--sc-headings-line-height)}.header{display:flex;align-items:flex-start;gap:.5em 1em;margin-bottom:var(--sc-card-header-mb);line-height:var(--sc-card-header-line-height);font-family:var(--sc-card-header-font-family);font-size:var(--sc-card-header-font-size);font-style:var(--sc-card-header-font-style);font-weight:var(--sc-card-header-font-weight)}.header-content{flex-grow:1}slot[name=suffix]{flex-shrink:0}`
8807
+ i$4`:host{--sc-card-header-mb:1.35rem;--sc-card-header-font-size:1.875rem;--sc-card-header-font-weight:var(--sc-headings-font-weight);--sc-card-header-font-style:var(--sc-headings-font-style);--sc-card-header-family:var(--sc-headings-font-family);--sc-card-header-line-height:var(--sc-headings-line-height)}@media print{:host{--sc-card-header-font-size:1.45rem}}.header{display:flex;align-items:flex-start;gap:.5em 1em;margin-bottom:var(--sc-card-header-mb);line-height:var(--sc-card-header-line-height);font-family:var(--sc-card-header-font-family);font-size:var(--sc-card-header-font-size);font-style:var(--sc-card-header-font-style);font-weight:var(--sc-card-header-font-weight)}.header-content{flex-grow:1}slot[name=suffix]{flex-shrink:0}`
8627
8808
  ];
8628
8809
  __decorateClass$c([
8629
8810
  e$7()
@@ -8696,7 +8877,7 @@ let Card = class extends s$3 {
8696
8877
  }
8697
8878
  };
8698
8879
  Card.styles = [
8699
- i$4`:host{--sc-card-padding:1.5rem;--sc-card-color:var(--sc-base-content);--sc-card-bg:var(--sc-base);--sc-card-rounded:var(--sc-rounded-lg);--sc-card-shadow:var(--sc-shadow-lg);-webkit-print-color-adjust:exact}@media print{:host{break-inside:avoid}}*{box-sizing:border-box}.card{padding:var(--sc-card-padding);background-color:var(--sc-card-bg);border-radius:var(--sc-card-rounded);box-shadow:var(--sc-card-shadow);color:var(--sc-card-color)}:host([type=primary]){--sc-card-bg:var(--sc-primary);--sc-card-color:var(--sc-primary-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=warning]){--sc-card-bg:var(--sc-warning);--sc-card-color:var(--sc-warning-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=danger]){--sc-card-bg:var(--sc-danger);--sc-card-color:var(--sc-danger-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=info]){--sc-card-bg:var(--sc-info);--sc-card-color:var(--sc-info-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=success]){--sc-card-bg:var(--sc-success);--sc-card-color:var(--sc-success-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=light]){--sc-card-bg:var(--sc-base-100);--sc-card-color:var(--sc-base-content)}:host([type=neutral]){--sc-card-bg:var(--sc-base-content);--sc-card-color:var(--sc-base)}:host([type=invert]){--sc-card-color:var(--sc-base);--sc-card-bg:var(--sc-base-900)}`
8880
+ i$4`*{box-sizing:border-box}:host{--sc-card-padding:1.5rem;--sc-card-color:var(--sc-base-content);--sc-card-bg:var(--sc-base);--sc-card-rounded:var(--sc-rounded-lg);--sc-card-shadow:var(--sc-shadow-lg);-webkit-print-color-adjust:exact}@media print{.card{page-break-inside:avoid;break-inside:avoid;box-shadow:none!important;border:1px solid var(--sc-base-200)}}.card{padding:var(--sc-card-padding);background-color:var(--sc-card-bg);border-radius:var(--sc-card-rounded);box-shadow:var(--sc-card-shadow);color:var(--sc-card-color)}:host([type=primary]){--sc-card-bg:var(--sc-primary);--sc-card-color:var(--sc-primary-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=warning]){--sc-card-bg:var(--sc-warning);--sc-card-color:var(--sc-warning-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=danger]){--sc-card-bg:var(--sc-danger);--sc-card-color:var(--sc-danger-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=info]){--sc-card-bg:var(--sc-info);--sc-card-color:var(--sc-info-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=success]){--sc-card-bg:var(--sc-success);--sc-card-color:var(--sc-success-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=light]){--sc-card-bg:var(--sc-base-100);--sc-card-color:var(--sc-base-content)}:host([type=neutral]){--sc-card-bg:var(--sc-base-content);--sc-card-color:var(--sc-base)}:host([type=invert]){--sc-card-color:var(--sc-base);--sc-card-bg:var(--sc-base-900)}`
8700
8881
  ];
8701
8882
  __decorateClass$9([
8702
8883
  e$7({ type: String, reflect: true })
@@ -8867,7 +9048,7 @@ var __decorateClass$4 = (decorators, target, key, kind) => {
8867
9048
  const tagName$4 = "sonic-tbody";
8868
9049
  let TableTbody = class extends s$3 {
8869
9050
  render() {
8870
- return y`<tbody><slot></slot></tbody>`;
9051
+ return y`<tbody part="tbody"><slot></slot></tbody>`;
8871
9052
  }
8872
9053
  };
8873
9054
  TableTbody.styles = [
@@ -8987,7 +9168,9 @@ let Captcha = class extends Subscriber(s$3) {
8987
9168
  script.src = "https://www.google.com/recaptcha/api.js?render=" + this.key;
8988
9169
  document.head.appendChild(script);
8989
9170
  super.connectedCallback();
8990
- this.formPublisher = PublisherManager.get((_a2 = this.getAncestorAttributeValue("headersDataProvider")) != null ? _a2 : this.getAncestorAttributeValue("formDataProvider"));
9171
+ this.formPublisher = PublisherManager.get(
9172
+ (_a2 = this.getAncestorAttributeValue("headersDataProvider")) != null ? _a2 : this.getAncestorAttributeValue("formDataProvider")
9173
+ );
8991
9174
  if (this.formPublisher) {
8992
9175
  this.formPublisher.needsCaptchaValidation = true;
8993
9176
  this.formPublisher.captchaToken.onAssign((v2) => {
@@ -9001,8 +9184,8 @@ let Captcha = class extends Subscriber(s$3) {
9001
9184
  var _a2, _b, _c, _d, _e;
9002
9185
  if (!this.formPublisher)
9003
9186
  return;
9004
- let action = ((_c = (_b = this.action) != null ? _b : (_a2 = this.formPublisher.captchaAction) == null ? void 0 : _a2.get()) != null ? _c : "submit").replace(/[^\w_\/]/g, "_");
9005
- let method = ((_e = (_d = this.formPublisher.captchaMethod) == null ? void 0 : _d.get()) != null ? _e : "POST").toUpperCase();
9187
+ const action = ((_c = (_b = this.action) != null ? _b : (_a2 = this.formPublisher.captchaAction) == null ? void 0 : _a2.get()) != null ? _c : "submit").replace(/[^\w_/]/g, "_");
9188
+ const method = ((_e = (_d = this.formPublisher.captchaMethod) == null ? void 0 : _d.get()) != null ? _e : "POST").toUpperCase();
9006
9189
  delete this.formPublisher.captchaAction;
9007
9190
  delete this.formPublisher.captchaMethod;
9008
9191
  window.grecaptcha.ready(() => {