@webority/ui-elements 0.10.1 → 0.11.1

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.
@@ -866,7 +866,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
866
866
  disconnectedCallback() {
867
867
  this._teardown();
868
868
  }
869
- }, A = class extends e {
869
+ }, te = class extends e {
870
870
  static formAssociated = !0;
871
871
  static get observedAttributes() {
872
872
  return [
@@ -1081,7 +1081,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1081
1081
  disconnectedCallback() {
1082
1082
  this._teardown();
1083
1083
  }
1084
- }, te = class extends e {
1084
+ }, ne = class extends e {
1085
1085
  static get observedAttributes() {
1086
1086
  return [
1087
1087
  "static",
@@ -1102,10 +1102,10 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1102
1102
  e === "static" && this.isConnected && this._wire();
1103
1103
  }
1104
1104
  _maxScale() {
1105
- return ne(this.getAttribute("max-scale"), 1.6);
1105
+ return re(this.getAttribute("max-scale"), 1.6);
1106
1106
  }
1107
1107
  _radius() {
1108
- return ne(this.getAttribute("radius"), 100);
1108
+ return re(this.getAttribute("radius"), 100);
1109
1109
  }
1110
1110
  _magnifyEnabled() {
1111
1111
  return !(this.hasAttribute("static") || typeof matchMedia == "function" && (matchMedia("(pointer: coarse)").matches || matchMedia("(prefers-reduced-motion: reduce)").matches));
@@ -1130,10 +1130,10 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1130
1130
  _teardown() {
1131
1131
  this._pointerMoveListener &&= (this.removeEventListener("pointermove", this._pointerMoveListener), null), this._pointerLeaveListener &&= (this.removeEventListener("pointerleave", this._pointerLeaveListener), null), this._resetMagnification();
1132
1132
  }
1133
- }, ne = (e, t) => {
1133
+ }, re = (e, t) => {
1134
1134
  let n = Number.parseFloat(e);
1135
1135
  return Number.isFinite(n) ? n : t;
1136
- }, j = "wui-feedback-submit", M = {
1136
+ }, A = "wui-feedback-submit", j = {
1137
1137
  label: "Feedback",
1138
1138
  heading: "Share feedback",
1139
1139
  placeholder: "What's working, what isn't?",
@@ -1144,7 +1144,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1144
1144
  emptyError: "Please write a message before sending.",
1145
1145
  failedError: "That didn't send. Please try again.",
1146
1146
  thanks: "Thanks — we've got it."
1147
- }, re = 1e4, ie = 1600, N = class extends e {
1147
+ }, ie = 1e4, ae = 1600, oe = class extends e {
1148
1148
  static get observedAttributes() {
1149
1149
  return [
1150
1150
  "position",
@@ -1166,19 +1166,19 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1166
1166
  this.setAttribute("position", String(e ?? "bottom-right"));
1167
1167
  }
1168
1168
  get label() {
1169
- return this.getAttribute("label") || M.label;
1169
+ return this.getAttribute("label") || j.label;
1170
1170
  }
1171
1171
  set label(e) {
1172
1172
  this.setAttribute("label", String(e ?? ""));
1173
1173
  }
1174
1174
  get heading() {
1175
- return this.getAttribute("heading") || M.heading;
1175
+ return this.getAttribute("heading") || j.heading;
1176
1176
  }
1177
1177
  set heading(e) {
1178
1178
  this.setAttribute("heading", String(e ?? ""));
1179
1179
  }
1180
1180
  get placeholder() {
1181
- return this.getAttribute("placeholder") || M.placeholder;
1181
+ return this.getAttribute("placeholder") || j.placeholder;
1182
1182
  }
1183
1183
  set placeholder(e) {
1184
1184
  this.setAttribute("placeholder", String(e ?? ""));
@@ -1193,10 +1193,10 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1193
1193
  return this._open === !0;
1194
1194
  }
1195
1195
  addEventListener(e, t, n) {
1196
- e === j && (this._submitListeners += 1), super.addEventListener(e, t, n);
1196
+ e === A && (this._submitListeners += 1), super.addEventListener(e, t, n);
1197
1197
  }
1198
1198
  removeEventListener(e, t, n) {
1199
- e === j && this._submitListeners > 0 && --this._submitListeners, super.removeEventListener(e, t, n);
1199
+ e === A && this._submitListeners > 0 && --this._submitListeners, super.removeEventListener(e, t, n);
1200
1200
  }
1201
1201
  connectedCallback() {
1202
1202
  this._rendered || this.render();
@@ -1212,31 +1212,31 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1212
1212
  this.innerHTML = `
1213
1213
  <button type="button" class="feedback-trigger" aria-expanded="false" aria-haspopup="dialog">
1214
1214
  <span class="feedback-trigger-icon" aria-hidden="true">${p("message-square", { size: 18 })}</span>
1215
- <span class="feedback-trigger-label">${ae(this.label)}</span>
1215
+ <span class="feedback-trigger-label">${se(this.label)}</span>
1216
1216
  </button>
1217
- <div class="feedback-panel" role="dialog" aria-label="${oe(this.heading)}" hidden>
1217
+ <div class="feedback-panel" role="dialog" aria-label="${ce(this.heading)}" hidden>
1218
1218
  <div class="feedback-head">
1219
- <h2 class="feedback-heading">${ae(this.heading)}</h2>
1219
+ <h2 class="feedback-heading">${se(this.heading)}</h2>
1220
1220
  <button type="button" class="feedback-close" aria-label="Close">${p("x", { size: 16 })}</button>
1221
1221
  </div>
1222
1222
  <div class="feedback-body">
1223
1223
  <label class="feedback-field">
1224
- <span class="feedback-field-label">${M.messageLabel}</span>
1225
- <textarea class="feedback-message" rows="4" required placeholder="${oe(this.placeholder)}"></textarea>
1224
+ <span class="feedback-field-label">${j.messageLabel}</span>
1225
+ <textarea class="feedback-message" rows="4" required placeholder="${ce(this.placeholder)}"></textarea>
1226
1226
  </label>
1227
1227
  ${this.collectEmail ? `<label class="feedback-field">
1228
- <span class="feedback-field-label">${M.emailLabel}</span>
1228
+ <span class="feedback-field-label">${j.emailLabel}</span>
1229
1229
  <input type="email" class="feedback-email" autocomplete="email" placeholder="you@example.com" />
1230
1230
  </label>` : ""}
1231
1231
  <p class="feedback-error" role="alert" hidden></p>
1232
1232
  </div>
1233
1233
  <div class="feedback-actions">
1234
1234
  <button type="button" class="feedback-cancel">Cancel</button>
1235
- <button type="button" class="feedback-submit">${M.submitLabel}</button>
1235
+ <button type="button" class="feedback-submit">${j.submitLabel}</button>
1236
1236
  </div>
1237
1237
  <div class="feedback-thanks" hidden>
1238
1238
  <span class="feedback-thanks-icon" aria-hidden="true">${p("check-circle", { size: 20 })}</span>
1239
- <span class="feedback-thanks-text">${M.thanks}</span>
1239
+ <span class="feedback-thanks-text">${j.thanks}</span>
1240
1240
  </div>
1241
1241
  </div>`, this._rendered = !0, this._wire();
1242
1242
  let r = this._refs();
@@ -1274,18 +1274,18 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1274
1274
  let { thanks: e, error: t, submit: n, message: r, email: i } = this._refs();
1275
1275
  this._setBusy(!1), t && (t.hidden = !0, t.textContent = ""), e && (e.hidden = !1), this.querySelector(".feedback-body")?.setAttribute("hidden", ""), this.querySelector(".feedback-actions")?.setAttribute("hidden", ""), n && (n.disabled = !0), this._thanksTimer = setTimeout(() => {
1276
1276
  r && (r.value = ""), i && (i.value = ""), this._reset(), this.close();
1277
- }, ie);
1277
+ }, ae);
1278
1278
  }
1279
1279
  failed(e) {
1280
1280
  this._clearTimers(), this._state = "error", this._setBusy(!1);
1281
1281
  let { error: t, message: n } = this._refs();
1282
- t && (t.textContent = e || M.failedError, t.hidden = !1), n?.focus();
1282
+ t && (t.textContent = e || j.failedError, t.hidden = !1), n?.focus();
1283
1283
  }
1284
1284
  _submit() {
1285
1285
  if (this._state === "submitting") return;
1286
1286
  let { message: e, email: t, error: n } = this._refs(), r = (e?.value ?? "").trim();
1287
1287
  if (!r) {
1288
- n && (n.textContent = M.emptyError, n.hidden = !1), e?.focus();
1288
+ n && (n.textContent = j.emptyError, n.hidden = !1), e?.focus();
1289
1289
  return;
1290
1290
  }
1291
1291
  n && (n.hidden = !0, n.textContent = ""), this._state = "submitting", this._setBusy(!0);
@@ -1295,7 +1295,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1295
1295
  surface: this.getAttribute("surface") || "",
1296
1296
  screen: this.getAttribute("screen") || ""
1297
1297
  };
1298
- if (this.dispatchEvent(new CustomEvent(j, {
1298
+ if (this.dispatchEvent(new CustomEvent(A, {
1299
1299
  bubbles: !0,
1300
1300
  composed: !0,
1301
1301
  detail: i
@@ -1305,11 +1305,11 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1305
1305
  }
1306
1306
  this._timer = setTimeout(() => {
1307
1307
  this._state === "submitting" && this.failed();
1308
- }, re);
1308
+ }, ie);
1309
1309
  }
1310
1310
  _setBusy(e) {
1311
1311
  let { submit: t } = this._refs();
1312
- t && (t.disabled = e, t.textContent = e ? M.sendingLabel : M.submitLabel, this.toggleAttribute("busy", e));
1312
+ t && (t.disabled = e, t.textContent = e ? j.sendingLabel : j.submitLabel, this.toggleAttribute("busy", e));
1313
1313
  }
1314
1314
  _reset() {
1315
1315
  this._clearTimers(), this._state = "idle", this._setBusy(!1);
@@ -1319,7 +1319,23 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1319
1319
  _clearTimers() {
1320
1320
  this._timer &&= (clearTimeout(this._timer), 0), this._thanksTimer &&= (clearTimeout(this._thanksTimer), 0);
1321
1321
  }
1322
- }, ae = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), oe = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), se = class extends e {
1322
+ }, se = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), ce = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), le = {
1323
+ enter: "Enter",
1324
+ comma: ",",
1325
+ space: " ",
1326
+ tab: "Tab"
1327
+ }, ue = {
1328
+ enter: "\n",
1329
+ comma: ",",
1330
+ space: " ",
1331
+ tab: " "
1332
+ }, de = (e) => le[e], fe = (e) => ue[e];
1333
+ function pe(e, t) {
1334
+ let n = [String(e ?? "")];
1335
+ for (let e of t) n = n.flatMap((t) => t.split(e));
1336
+ return n.map((e) => e.trim()).filter(Boolean);
1337
+ }
1338
+ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends e {
1323
1339
  static formAssociated = !0;
1324
1340
  _accessibleName() {
1325
1341
  return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
@@ -1334,11 +1350,14 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1334
1350
  "size",
1335
1351
  "collapse-chips",
1336
1352
  "aria-label",
1337
- "aria-invalid"
1353
+ "aria-invalid",
1354
+ "allow-custom",
1355
+ "custom-pattern",
1356
+ "custom-invalid-message"
1338
1357
  ];
1339
1358
  }
1340
1359
  constructor() {
1341
- super(), this._values = [], this._optionsProp = null, this._active = -1, this._typeahead = "", this._typeaheadTimer = null;
1360
+ super(), this._values = [], this._optionsProp = null, this._active = -1, this._typeahead = "", this._typeaheadTimer = null, this._customError = "";
1342
1361
  try {
1343
1362
  this._internals = this.attachInternals();
1344
1363
  } catch {
@@ -1362,44 +1381,66 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1362
1381
  }
1363
1382
  formResetCallback() {
1364
1383
  this.values = (this._defaultValues || []).slice();
1384
+ let e = this.querySelector("[data-input]");
1385
+ e && (e.value = ""), this._setCustomError("");
1365
1386
  }
1366
1387
  attributeChangedCallback(e) {
1367
1388
  if (e === "aria-invalid") {
1368
1389
  this._syncInvalid();
1369
1390
  return;
1370
1391
  }
1371
- this._rendered && this.render();
1392
+ e === "custom-pattern" || e === "custom-invalid-message" || this._rendered && this.render();
1372
1393
  }
1373
1394
  _syncInvalid() {
1374
1395
  let e = this.querySelector(".search-select-control");
1375
- e && (this.hasAttribute("aria-invalid") ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid"));
1396
+ e && (this.hasAttribute("aria-invalid") || this._customError ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid"));
1376
1397
  }
1377
1398
  get values() {
1378
1399
  return this._values.slice();
1379
1400
  }
1380
1401
  set values(e) {
1381
- if (this._values = Array.isArray(e) ? e.map(String) : [], d(this, this._values.join(",")), this._rendered) {
1382
- this._renderControl();
1383
- let e = this.querySelector(".search-select-input");
1384
- this._renderOptions(e ? e.value : "");
1385
- }
1402
+ this._values = Array.isArray(e) ? e.map(String) : [], d(this, this._values.join(",")), this._rendered && (this._renderControl(), this._renderOptions(this._query()));
1386
1403
  }
1387
1404
  set options(e) {
1388
- this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
1405
+ if (this._optionsProp = Array.isArray(e) ? e : null, this._rendered && this._allowCustom) {
1406
+ this._renderControl(), this._renderOptions(this._query());
1407
+ return;
1408
+ }
1409
+ this.isConnected && this.render();
1389
1410
  }
1390
1411
  get options() {
1391
1412
  return this._readOptions();
1392
1413
  }
1414
+ get validateCustom() {
1415
+ return this._validateCustom ?? null;
1416
+ }
1417
+ set validateCustom(e) {
1418
+ this._validateCustom = typeof e == "function" ? e : null;
1419
+ }
1420
+ get _allowCustom() {
1421
+ return this.hasAttribute("allow-custom");
1422
+ }
1423
+ _query() {
1424
+ let e = this.querySelector(this._allowCustom ? "[data-input]" : ".search-select-input");
1425
+ return e ? e.value : "";
1426
+ }
1393
1427
  _snapshotDeclared() {
1394
1428
  if (this._declared) return;
1395
1429
  let e = [...this.querySelectorAll(":scope > wui-option")];
1396
- e.length && (this._declared = e.map((e) => ({
1397
- value: e.getAttribute("value") ?? e.textContent.trim(),
1398
- label: e.innerHTML,
1399
- icon: e.getAttribute("icon") || void 0,
1400
- [h]: !0,
1401
- selected: e.hasAttribute("selected")
1402
- })));
1430
+ e.length && (this._declared = e.map((e) => {
1431
+ let t = {
1432
+ value: e.getAttribute("value") ?? e.textContent.trim(),
1433
+ label: e.innerHTML,
1434
+ icon: e.getAttribute("icon") || void 0,
1435
+ [h]: !0,
1436
+ selected: e.hasAttribute("selected")
1437
+ };
1438
+ for (let [n, r] of he) {
1439
+ let i = e.getAttribute(n);
1440
+ i && (t[r] = i);
1441
+ }
1442
+ return e.hasAttribute("disabled") && (t.disabled = !0), t;
1443
+ }));
1403
1444
  }
1404
1445
  _readOptions() {
1405
1446
  return this._optionsProp ? this._optionsProp : (this._snapshotDeclared(), this._declared || []);
@@ -1414,32 +1455,54 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1414
1455
  }
1415
1456
  render() {
1416
1457
  this._snapshotDeclared();
1417
- let e = this.hasAttribute("searchable"), t = this.getAttribute("search-placeholder") || "Search…", n = this.getAttribute("icon"), r = this.getAttribute("size"), i = r === "sm" ? " search-select-sm" : r === "lg" ? " search-select-lg" : "";
1458
+ let e = this._allowCustom, t = this.hasAttribute("searchable") && !e, n = this.getAttribute("search-placeholder") || "Search…", r = this.getAttribute("icon"), i = this.getAttribute("size"), a = i === "sm" ? " search-select-sm" : i === "lg" ? " search-select-lg" : "";
1418
1459
  d(this, this._values.join(",")), this.id ||= `wui-multiselect-${Math.random().toString(36).slice(2, 9)}`;
1419
- let a = `${this.id}-listbox`;
1420
- this._listboxId = a, this.innerHTML = `
1421
- <div class="search-select${i}">
1422
- <div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${P(a)}" aria-label="${P(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : " tabindex=\"0\""}>
1423
- ${n ? p(n, { className: "search-select-icon" }) : ""}
1460
+ let o = `${this.id}-listbox`;
1461
+ this._listboxId = o;
1462
+ let s = this.hasAttribute("disabled");
1463
+ if (e) {
1464
+ let e = `${this.id}-custom-error`;
1465
+ this.innerHTML = `
1466
+ <div class="search-select${a}">
1467
+ <div class="input search-select-control search-select-multi"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${s ? " aria-disabled=\"true\"" : ""}>
1468
+ ${r ? p(r, { className: "search-select-icon" }) : ""}
1469
+ <div class="ms-chips" data-chips><input type="text" class="ms-input" data-input role="combobox" aria-autocomplete="list" aria-haspopup="listbox" aria-expanded="false" aria-controls="${F(o)}" aria-label="${F(this._accessibleName())}" aria-describedby="${F(e)}" autocomplete="off"${s ? " disabled" : ""} /></div>
1470
+ ${p("chevron-down", { className: "search-select-caret" })}
1471
+ </div>
1472
+ <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${F(o)}" aria-multiselectable="true" tabindex="-1" hidden>
1473
+ <div class="search-select-options"></div>
1474
+ </div>
1475
+ </div>
1476
+ <div class="field-error wui-ms-custom-error" id="${F(e)}" aria-live="polite" hidden></div>`;
1477
+ } else this.innerHTML = `
1478
+ <div class="search-select${a}">
1479
+ <div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${F(o)}" aria-label="${F(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${s ? " aria-disabled=\"true\"" : " tabindex=\"0\""}>
1480
+ ${r ? p(r, { className: "search-select-icon" }) : ""}
1424
1481
  <div class="ms-chips" data-chips></div>
1425
1482
  ${p("chevron-down", { className: "search-select-caret" })}
1426
1483
  </div>
1427
- <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${P(a)}" aria-multiselectable="true" tabindex="-1" hidden>
1428
- ${e ? `<div class="search-select-search">${p("search")}<input class="search-select-input" placeholder="${P(t)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${p("x")}</button></div>` : ""}
1484
+ <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${F(o)}" aria-multiselectable="true" tabindex="-1" hidden>
1485
+ ${t ? `<div class="search-select-search">${p("search")}<input class="search-select-input" placeholder="${F(n)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${p("x")}</button></div>` : ""}
1429
1486
  <div class="search-select-options"></div>
1430
1487
  <div class="search-select-empty" hidden>No matches</div>
1431
1488
  </div>
1432
- </div>`, this._rendered = !0, d(this, this._values.join(",")), this._renderControl(), this._renderOptions(), this._wire();
1489
+ </div>`;
1490
+ this._rendered = !0, this._customError = "", d(this, this._values.join(",")), this._renderControl(), this._renderOptions(), this._wire();
1433
1491
  }
1434
1492
  _renderControl() {
1435
1493
  let e = this.querySelector("[data-chips]");
1436
1494
  if (!e) return;
1437
- let t = this.getAttribute("placeholder") || "Select…";
1495
+ let t = this.getAttribute("placeholder") || "Select…", n = this._allowCustom ? e.querySelector("[data-input]") : null, r = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${F(e)}" aria-label="Remove ${F(I(this._labelFor(e)))}">${p("x")}</button></span>`).join("");
1496
+ if (n) {
1497
+ for (let t of [...e.querySelectorAll(":scope > .chip")]) t.remove();
1498
+ n.insertAdjacentHTML("beforebegin", r), n.placeholder = this._values.length ? "" : t, this._collapseChips();
1499
+ return;
1500
+ }
1438
1501
  if (!this._values.length) {
1439
1502
  e.innerHTML = `<span class="search-select-placeholder">${g(t)}</span>`;
1440
1503
  return;
1441
1504
  }
1442
- e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${P(e)}" aria-label="Remove ${P(F(this._labelFor(e)))}">${p("x")}</button></span>`).join(""), this._collapseChips();
1505
+ e.innerHTML = r, this._collapseChips();
1443
1506
  }
1444
1507
  _collapseChips() {
1445
1508
  let e = this.querySelector("[data-chips]");
@@ -1451,7 +1514,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1451
1514
  let n = e.clientWidth, r = (e) => e.offsetLeft + e.offsetWidth;
1452
1515
  if (r(t[t.length - 1]) <= n) return;
1453
1516
  let i = document.createElement("span");
1454
- i.className = "chip chip-sm chip-more", i.textContent = `+${t.length}`, e.appendChild(i);
1517
+ i.className = "chip chip-sm chip-more", i.textContent = `+${t.length}`, t[t.length - 1].after(i);
1455
1518
  let a = i.offsetWidth + 6, o = 0;
1456
1519
  for (let e of t) if (r(e) <= n - a) o += 1;
1457
1520
  else break;
@@ -1459,85 +1522,189 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1459
1522
  for (let e = o; e < t.length; e += 1) t[e].style.display = "none";
1460
1523
  i.textContent = `+${t.length - o}`;
1461
1524
  }
1525
+ _matches(e, t) {
1526
+ return I(e.label).toLowerCase().includes(t) || String(e.description ?? "").toLowerCase().includes(t);
1527
+ }
1528
+ _optionNamed(e) {
1529
+ let t = e.trim().toLowerCase();
1530
+ return this._readOptions().find((e) => String(e.value ?? "").toLowerCase() === t || I(e.label).trim().toLowerCase() === t);
1531
+ }
1462
1532
  _renderOptions(e) {
1463
1533
  let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
1464
1534
  if (!t) return;
1465
- let r = (e || "").trim().toLowerCase(), i = this._readOptions();
1466
- r && (i = i.filter((e) => F(e.label).toLowerCase().includes(r)));
1467
- let a = this._listboxId || `${this.id || "wui-multiselect"}-listbox`;
1468
- t.innerHTML = i.map((e, t) => {
1469
- let n = this._values.includes(String(e.value));
1470
- return `<button type="button" role="option" id="${P(`${a}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${P(e.value)}" aria-selected="${n}"><span class="ms-opt-label">${v(e)}</span><span class="ms-check">${p("check")}</span></button>`;
1471
- }).join(""), n && (n.hidden = i.length > 0), this._active = -1, this.querySelector(".search-select-control")?.removeAttribute("aria-activedescendant"), this._reanchor?.();
1535
+ let r = (e || "").trim(), i = r.toLowerCase(), a = this._readOptions();
1536
+ i && (a = a.filter((e) => this._matches(e, i)));
1537
+ let o = this._listboxId || `${this.id || "wui-multiselect"}-listbox`, s = this._allowCustom && r && !this._optionNamed(r), c = a.map((e, t) => {
1538
+ let n = this._values.includes(String(e.value)), r = `${o}-opt-${t}`;
1539
+ return ge(e) ? ye(e, r, n) : `<button type="button" role="option" id="${F(r)}" class="search-select-option${n ? " selected" : ""}" data-value="${F(e.value)}" aria-selected="${n}"><span class="ms-opt-label">${v(e)}</span><span class="ms-check">${p("check")}</span></button>`;
1540
+ });
1541
+ s && c.push(`<button type="button" role="option" id="${F(`${o}-opt-${a.length}`)}" class="search-select-option search-select-option-custom" data-value="${F(r)}" data-custom="true" aria-selected="false">Add “${g(r)}”</button>`), t.innerHTML = c.join(""), n && (n.hidden = a.length > 0), this._active = -1, this._combobox()?.removeAttribute("aria-activedescendant"), this._allowCustom && this._syncCustomMenu?.(), this._reanchor?.();
1542
+ }
1543
+ _combobox() {
1544
+ return this._allowCustom ? this.querySelector("[data-input]") : this.querySelector(".search-select-control");
1545
+ }
1546
+ _setCustomError(e) {
1547
+ this._customError = e || "";
1548
+ let t = this.querySelector(".wui-ms-custom-error"), n = this.querySelector("[data-input]");
1549
+ t && (t.textContent = this._customError, t.hidden = !this._customError), n && (this._customError ? n.setAttribute("aria-invalid", "true") : n.removeAttribute("aria-invalid")), this._syncInvalid();
1550
+ }
1551
+ _customRefusal(e) {
1552
+ let t = this.getAttribute("custom-invalid-message") || "Enter a valid value.", n = this.getAttribute("custom-pattern");
1553
+ if (n) {
1554
+ let r = be(n);
1555
+ if (r && !r.test(e)) return t;
1556
+ }
1557
+ let r = this._validateCustom;
1558
+ if (r) {
1559
+ let n = r(e);
1560
+ return n === !0 ? "" : typeof n == "string" && n ? n : t;
1561
+ }
1562
+ return "";
1563
+ }
1564
+ _commitTyped(e) {
1565
+ let t = e.trim().replace(/,+$/, "").trim();
1566
+ if (!t) return "";
1567
+ let n = this._optionNamed(t), r;
1568
+ if (n) {
1569
+ if (n.disabled) return n.disabledHint || this.getAttribute("custom-invalid-message") || "That option is not available.";
1570
+ r = String(n.value);
1571
+ } else {
1572
+ let e = this._customRefusal(t);
1573
+ if (e) return e;
1574
+ r = t;
1575
+ }
1576
+ let i = r.toLowerCase();
1577
+ return this._values.some((e) => e.toLowerCase() === i) || (this._values = [...this._values, r]), "";
1472
1578
  }
1473
1579
  _wire() {
1474
1580
  this._teardown();
1475
- let e = this.querySelector(".search-select-control"), t = this.querySelector(".search-select-menu"), n = this.querySelector(".search-select-input"), r = this.querySelector(".search-select-clear"), i = this.querySelector(".search-select-options");
1581
+ let e = this.querySelector(".search-select-control"), t = this.querySelector(".search-select-menu"), n = this.querySelector(".search-select-input"), r = this.querySelector(".search-select-clear"), i = this.querySelector(".search-select-options"), a = this._allowCustom, o = a ? this.querySelector("[data-input]") : null, l = o || e;
1476
1582
  if (!e || !t) return;
1477
- let a = () => this.hasAttribute("disabled"), o = () => s(e, t, { matchWidth: !0 }), l = () => [...this.querySelectorAll(".search-select-option")], u = () => l().filter((e) => !e.hidden), f = (t) => {
1478
- let n = u();
1479
- this._active = t;
1480
- for (let e of l()) e.classList.remove("is-active");
1481
- t >= 0 && n[t] ? (n[t].classList.add("is-active"), n[t].scrollIntoView({ block: "nearest" }), e.setAttribute("aria-activedescendant", n[t].id)) : e.removeAttribute("aria-activedescendant");
1482
- }, p = () => !t.hidden, h = () => {
1483
- a() || (t.hidden = !1, e.setAttribute("aria-expanded", "true"), e.classList.add("open"), o(), n && (n.value = "", this._renderOptions(""), n.focus()));
1484
- }, g = () => {
1485
- t.hidden = !0, e.setAttribute("aria-expanded", "false"), e.classList.remove("open"), f(-1), clearTimeout(this._typeaheadTimer), this._typeaheadTimer = null, this._typeahead = "";
1486
- }, _ = () => {
1583
+ let u = () => this.hasAttribute("disabled"), f = () => s(e, t, { matchWidth: !0 }), p = () => [...this.querySelectorAll(".search-select-option")], h = () => p().filter((e) => !e.hidden), g = (e) => {
1584
+ let t = h();
1585
+ this._active = e;
1586
+ for (let e of p()) e.classList.remove("is-active");
1587
+ e >= 0 && t[e] ? (t[e].classList.add("is-active"), t[e].scrollIntoView({ block: "nearest" }), l.setAttribute("aria-activedescendant", t[e].id)) : l.removeAttribute("aria-activedescendant");
1588
+ }, _ = !1, v = () => a ? _ : !t.hidden, y = () => {
1589
+ let n = _ && p().length > 0, r = t.hidden;
1590
+ t.hidden = !n, l.setAttribute("aria-expanded", String(n)), e.classList.toggle("open", n), n && r && f();
1591
+ };
1592
+ this._syncCustomMenu = a ? y : null;
1593
+ let b = () => {
1594
+ if (!u()) {
1595
+ if (a) {
1596
+ _ = !0, y();
1597
+ return;
1598
+ }
1599
+ t.hidden = !1, e.setAttribute("aria-expanded", "true"), e.classList.add("open"), f(), n && (n.value = "", this._renderOptions(""), n.focus());
1600
+ }
1601
+ }, x = () => {
1602
+ a ? (_ = !1, y()) : (t.hidden = !0, e.setAttribute("aria-expanded", "false"), e.classList.remove("open")), g(-1), clearTimeout(this._typeaheadTimer), this._typeaheadTimer = null, this._typeahead = "";
1603
+ }, S = () => {
1487
1604
  d(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
1488
- }, v = (e) => {
1605
+ }, C = (e) => {
1489
1606
  let t = String(e);
1490
- this._values.includes(t) ? this._values = this._values.filter((e) => e !== t) : this._values = [...this._values, t], this._renderControl(), this._renderOptions(n ? n.value : ""), _();
1491
- }, y = (e) => {
1492
- this._values = this._values.filter((t) => t !== String(e)), this._renderControl(), this._renderOptions(n ? n.value : ""), _();
1607
+ if (this._values.includes(t)) this._values = this._values.filter((e) => e !== t);
1608
+ else if (a && this._values.some((e) => e.toLowerCase() === t.toLowerCase())) return;
1609
+ else this._values = [...this._values, t];
1610
+ this._renderControl(), this._renderOptions(this._query()), S();
1611
+ }, w = (e) => {
1612
+ this._values = this._values.filter((t) => t !== String(e)), this._renderControl(), this._renderOptions(this._query()), S();
1613
+ }, T = (e, { quiet: t = !1 } = {}) => {
1614
+ let n = this._values.length, r = M(e, N) ? pe(e, N) : [e], i = [], a = "";
1615
+ for (let e of r) {
1616
+ let t = this._commitTyped(e);
1617
+ t && (i.push(e.trim()), a ||= t);
1618
+ }
1619
+ t && i.length || (o.value = i.join(", "), this._setCustomError(a), this._values.length !== n && (this._renderControl(), S()), this._renderOptions(o.value));
1620
+ }, E = (e) => {
1621
+ if (!(!e || e.getAttribute("aria-disabled") === "true")) {
1622
+ if (e.dataset.custom === "true") {
1623
+ T(e.dataset.value);
1624
+ return;
1625
+ }
1626
+ C(e.dataset.value), o?.value && (o.value = "", this._setCustomError(""), this._renderOptions(""));
1627
+ }
1493
1628
  };
1494
1629
  e.addEventListener("click", (e) => {
1495
- if (a()) return;
1630
+ if (u()) return;
1496
1631
  let t = e.target.closest("[data-remove]");
1497
1632
  if (t) {
1498
- e.stopPropagation(), y(t.dataset.remove);
1633
+ e.stopPropagation(), w(t.dataset.remove), o?.focus();
1634
+ return;
1635
+ }
1636
+ if (o) {
1637
+ let t = v();
1638
+ e.target !== o && o.focus(), e.target === o || !t ? b() : x();
1499
1639
  return;
1500
1640
  }
1501
- p() ? g() : h();
1641
+ v() ? x() : b();
1502
1642
  }), i.addEventListener("click", (e) => {
1503
1643
  let t = e.target.closest(".search-select-option");
1504
- t && (v(t.dataset.value), n?.focus());
1644
+ t && (E(t), (o || n)?.focus());
1505
1645
  }), i.addEventListener("mousemove", (e) => {
1506
1646
  let t = e.target.closest(".search-select-option");
1507
- t && f(u().indexOf(t));
1508
- }), i.addEventListener("mouseleave", () => f(-1)), n?.addEventListener("input", () => {
1509
- this._renderOptions(n.value), r && (r.hidden = !n.value), f(-1);
1647
+ t && g(h().indexOf(t));
1648
+ }), i.addEventListener("mouseleave", () => g(-1)), i.addEventListener("error", (e) => {
1649
+ e.target?.classList?.contains("avatar-img") && e.target.remove();
1650
+ }, !0), n?.addEventListener("input", () => {
1651
+ this._renderOptions(n.value), r && (r.hidden = !n.value), g(-1);
1510
1652
  }), this._navHandler = m({
1511
- getVisibleOptions: u,
1653
+ getVisibleOptions: h,
1512
1654
  getActive: () => this._active,
1513
- setActive: (e) => f(e),
1655
+ setActive: (e) => g(e),
1514
1656
  onEnter: (e) => {
1515
- e && v(e.dataset.value);
1657
+ e ? E(e) : o?.value.trim() && T(o.value);
1516
1658
  },
1517
1659
  onEscape: () => {
1518
- this._navHandler.clearTypeahead(), g(), e.focus();
1660
+ this._navHandler.clearTypeahead(), x(), o || e.focus();
1519
1661
  }
1520
1662
  });
1521
- let b = (e) => {
1522
- if (e.key === "Backspace" && !n?.value && this._values.length) {
1523
- y(this._values[this._values.length - 1]);
1663
+ let D = (e) => {
1664
+ let t = o || n;
1665
+ if (e.key === "Backspace" && !t?.value && this._values.length) {
1666
+ w(this._values[this._values.length - 1]);
1524
1667
  return;
1525
1668
  }
1526
1669
  this._navHandler.handler(e);
1527
1670
  };
1528
- n?.addEventListener("keydown", b), r?.addEventListener("click", () => {
1671
+ if (n?.addEventListener("keydown", D), r?.addEventListener("click", () => {
1529
1672
  n.value = "", this._renderOptions(""), r.hidden = !0, n.focus();
1530
- }), e.addEventListener("keydown", (e) => {
1531
- if (p()) {
1532
- b(e);
1673
+ }), o) {
1674
+ let t = (e) => {
1675
+ e.target !== o && e.preventDefault();
1676
+ };
1677
+ i.addEventListener("mousedown", t), e.addEventListener("mousedown", t), o.addEventListener("focus", () => b()), o.addEventListener("input", () => {
1678
+ this._customError && this._setCustomError(""), this._renderOptions(o.value), b();
1679
+ }), o.addEventListener("keydown", (e) => {
1680
+ if (e.key === "," && o.value.trim()) {
1681
+ e.preventDefault(), T(o.value);
1682
+ return;
1683
+ }
1684
+ if (e.key === "Enter") {
1685
+ if (this._active < 0 && !o.value.trim()) return;
1686
+ this._navHandler.handler(e);
1687
+ return;
1688
+ }
1689
+ (e.key === "ArrowDown" || e.key === "ArrowUp") && !v() && b(), D(e);
1690
+ }), o.addEventListener("paste", (e) => {
1691
+ let t = e.clipboardData?.getData("text/plain") ?? "";
1692
+ M(t, N) && (e.preventDefault(), T(`${o.value}${t}`));
1693
+ }), o.addEventListener("blur", (e) => {
1694
+ e.relatedTarget && this.contains(e.relatedTarget) || (o.value.trim() && T(o.value, { quiet: !0 }), x());
1695
+ });
1696
+ } else e.addEventListener("keydown", (e) => {
1697
+ if (v()) {
1698
+ D(e);
1533
1699
  return;
1534
1700
  }
1535
- (e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), h());
1536
- }), this._bindGlobal = () => {
1701
+ (e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), b());
1702
+ });
1703
+ this._bindGlobal = () => {
1537
1704
  this._teardown(), !this._ro && typeof ResizeObserver < "u" && (this._ro = new ResizeObserver(() => this._collapseChips()), this._ro.observe(this)), this._onDocClick = (e) => {
1538
- p() && !this.contains(e.target) && g();
1705
+ v() && !this.contains(e.target) && x();
1539
1706
  }, document.addEventListener("click", this._onDocClick), c(this, () => {
1540
- p() && o();
1707
+ v() && f();
1541
1708
  });
1542
1709
  }, this._bindGlobal();
1543
1710
  }
@@ -1547,7 +1714,35 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1547
1714
  disconnectedCallback() {
1548
1715
  this._teardown(), this._ro?.disconnect(), this._ro = null;
1549
1716
  }
1550
- }, P = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), F = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), ce = /[^0-9]/g, le = /[^0-9a-zA-Z]/g, ue = class extends e {
1717
+ }, N = [
1718
+ ",",
1719
+ ";",
1720
+ "\n",
1721
+ " "
1722
+ ], he = [
1723
+ ["description", "description"],
1724
+ ["avatar", "avatar"],
1725
+ ["initials", "initials"],
1726
+ ["disabled-hint", "disabledHint"]
1727
+ ], ge = (e) => !!(e.description || e.avatar || e.initials || e.disabled || e.disabledHint), _e = (e) => {
1728
+ let t = String(e ?? "").trim();
1729
+ return /^(https?:)?\/\//i.test(t) || /^\/(?!\/)/.test(t) || /^data:image\/(png|jpe?g|gif|webp|avif);/i.test(t) ? t : "";
1730
+ }, ve = (e) => {
1731
+ let t = _e(e.avatar);
1732
+ return !t && !e.initials ? "" : `<span class="avatar wui-opt-avatar" aria-hidden="true"><span class="avatar-face">${g(e.initials ?? "")}</span>${t ? `<img class="avatar-img" src="${F(t)}" alt="" />` : ""}</span>`;
1733
+ }, ye = (e, t, n) => {
1734
+ let r = !!e.disabled, i = e.description ? `<span class="wui-opt-desc">${g(e.description)}</span>` : "", a = e.disabledHint && r ? `<span class="wui-opt-hint">${g(e.disabledHint)}</span>` : "";
1735
+ return `<button type="button" role="option" id="${F(t)}" class="search-select-option wui-opt-rich${n ? " selected" : ""}" data-value="${F(e.value)}" aria-selected="${n}"${r ? " aria-disabled=\"true\"" : ""}><span class="ms-opt-label"><span class="wui-opt-name">${v(e)}</span>${i}</span>${a}${ve(e)}<span class="ms-check">${p("check")}</span></button>`;
1736
+ }, P = /* @__PURE__ */ new Map(), be = (e) => {
1737
+ if (P.has(e)) return P.get(e);
1738
+ let t = null;
1739
+ try {
1740
+ t = RegExp(`^(?:${e})$`, "u");
1741
+ } catch {
1742
+ console.warn(`<wui-multiselect> custom-pattern is not a valid regular expression and is ignored: ${e}`);
1743
+ }
1744
+ return P.set(e, t), t;
1745
+ }, F = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), I = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), xe = /[^0-9]/g, Se = /[^0-9a-zA-Z]/g, Ce = class extends e {
1551
1746
  static formAssociated = !0;
1552
1747
  static get observedAttributes() {
1553
1748
  return [
@@ -1578,7 +1773,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1578
1773
  this._value = this._clean(e), d(this, this._value), this._paint();
1579
1774
  }
1580
1775
  _clean(e) {
1581
- return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? le : ce, "").slice(0, this.length);
1776
+ return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? Se : xe, "").slice(0, this.length);
1582
1777
  }
1583
1778
  constructor() {
1584
1779
  super();
@@ -1669,7 +1864,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1669
1864
  disconnectedCallback() {
1670
1865
  this._onSelectionChange && document.removeEventListener("selectionchange", this._onSelectionChange);
1671
1866
  }
1672
- }, de = [
1867
+ }, L = [
1673
1868
  [
1674
1869
  "AF",
1675
1870
  "Afghanistan",
@@ -2895,65 +3090,481 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
2895
3090
  "Zimbabwe",
2896
3091
  "263"
2897
3092
  ]
2898
- ], I = (e) => (de.find((t) => t[0] === e) || [
3093
+ ], R = (e) => (L.find((t) => t[0] === e) || [
2899
3094
  "",
2900
3095
  "",
2901
3096
  ""
2902
- ])[2], L = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, R = null, z = null;
2903
- function fe() {
2904
- return R ? Promise.resolve(R) : (z ||= Promise.all([import("./max-BDKx469G.js"), import("./examples.mobile.json-BMXTGiGC.js")]).then(([e, t]) => (R = {
3097
+ ])[2], we = {
3098
+ AD: ["Europe/Andorra"],
3099
+ AE: ["Asia/Dubai"],
3100
+ AF: ["Asia/Kabul"],
3101
+ AG: ["America/Antigua"],
3102
+ AI: ["America/Anguilla"],
3103
+ AL: ["Europe/Tirane"],
3104
+ AM: ["Asia/Yerevan"],
3105
+ AO: ["Africa/Luanda"],
3106
+ AR: [
3107
+ "America/Argentina/Buenos_Aires",
3108
+ "America/Argentina/Catamarca",
3109
+ "America/Argentina/Cordoba",
3110
+ "America/Argentina/Jujuy",
3111
+ "America/Argentina/La_Rioja",
3112
+ "America/Argentina/Mendoza",
3113
+ "America/Argentina/Rio_Gallegos",
3114
+ "America/Argentina/Salta",
3115
+ "America/Argentina/San_Juan",
3116
+ "America/Argentina/San_Luis",
3117
+ "America/Argentina/Tucuman",
3118
+ "America/Argentina/Ushuaia",
3119
+ "America/Buenos_Aires",
3120
+ "America/Catamarca",
3121
+ "America/Cordoba",
3122
+ "America/Jujuy",
3123
+ "America/Mendoza"
3124
+ ],
3125
+ AS: [
3126
+ "Pacific/Pago_Pago",
3127
+ "Pacific/Samoa",
3128
+ "US/Samoa"
3129
+ ],
3130
+ AT: ["Europe/Vienna"],
3131
+ AU: [
3132
+ "Antarctica/Macquarie",
3133
+ "Australia/Adelaide",
3134
+ "Australia/Brisbane",
3135
+ "Australia/Broken_Hill",
3136
+ "Australia/Darwin",
3137
+ "Australia/Eucla",
3138
+ "Australia/Hobart",
3139
+ "Australia/LHI",
3140
+ "Australia/Lindeman",
3141
+ "Australia/Lord_Howe",
3142
+ "Australia/Melbourne",
3143
+ "Australia/NSW",
3144
+ "Australia/North",
3145
+ "Australia/Perth",
3146
+ "Australia/Queensland",
3147
+ "Australia/South",
3148
+ "Australia/Sydney",
3149
+ "Australia/Tasmania",
3150
+ "Australia/Victoria",
3151
+ "Australia/West",
3152
+ "Australia/Yancowinna"
3153
+ ],
3154
+ AW: ["America/Aruba"],
3155
+ AX: ["Europe/Mariehamn"],
3156
+ AZ: ["Asia/Baku"],
3157
+ BA: ["Europe/Sarajevo"],
3158
+ BB: ["America/Barbados"],
3159
+ BD: ["Asia/Dacca", "Asia/Dhaka"],
3160
+ BE: ["Europe/Brussels"],
3161
+ BF: ["Africa/Ouagadougou"],
3162
+ BG: ["Europe/Sofia"],
3163
+ BH: ["Asia/Bahrain"],
3164
+ BI: ["Africa/Bujumbura"],
3165
+ BJ: ["Africa/Porto-Novo"],
3166
+ BL: ["America/St_Barthelemy"],
3167
+ BM: ["Atlantic/Bermuda"],
3168
+ BN: ["Asia/Brunei"],
3169
+ BO: ["America/La_Paz"],
3170
+ BQ: ["America/Kralendijk"],
3171
+ BR: [
3172
+ "America/Araguaina",
3173
+ "America/Bahia",
3174
+ "America/Belem",
3175
+ "America/Boa_Vista",
3176
+ "America/Campo_Grande",
3177
+ "America/Cuiaba",
3178
+ "America/Eirunepe",
3179
+ "America/Fortaleza",
3180
+ "America/Maceio",
3181
+ "America/Manaus",
3182
+ "America/Noronha",
3183
+ "America/Porto_Velho",
3184
+ "America/Recife",
3185
+ "America/Rio_Branco",
3186
+ "America/Santarem",
3187
+ "America/Sao_Paulo",
3188
+ "Brazil/DeNoronha",
3189
+ "Brazil/East",
3190
+ "Brazil/West"
3191
+ ],
3192
+ BS: ["America/Nassau"],
3193
+ BT: ["Asia/Thimbu", "Asia/Thimphu"],
3194
+ BW: ["Africa/Gaborone"],
3195
+ BY: ["Europe/Minsk"],
3196
+ BZ: ["America/Belize"],
3197
+ CA: /* @__PURE__ */ "America/Atikokan.America/Blanc-Sablon.America/Cambridge_Bay.America/Creston.America/Dawson.America/Dawson_Creek.America/Edmonton.America/Fort_Nelson.America/Glace_Bay.America/Goose_Bay.America/Halifax.America/Inuvik.America/Iqaluit.America/Moncton.America/Rankin_Inlet.America/Regina.America/Resolute.America/St_Johns.America/Swift_Current.America/Toronto.America/Vancouver.America/Whitehorse.America/Winnipeg.Canada/Atlantic.Canada/Central.Canada/Eastern.Canada/Mountain.Canada/Newfoundland.Canada/Pacific.Canada/Saskatchewan.Canada/Yukon".split("."),
3198
+ CC: ["Indian/Cocos"],
3199
+ CD: ["Africa/Kinshasa", "Africa/Lubumbashi"],
3200
+ CF: ["Africa/Bangui"],
3201
+ CG: ["Africa/Brazzaville"],
3202
+ CH: ["Europe/Zurich"],
3203
+ CI: ["Africa/Abidjan"],
3204
+ CK: ["Pacific/Rarotonga"],
3205
+ CL: [
3206
+ "America/Coyhaique",
3207
+ "America/Punta_Arenas",
3208
+ "America/Santiago",
3209
+ "Chile/Continental",
3210
+ "Chile/EasterIsland",
3211
+ "Pacific/Easter"
3212
+ ],
3213
+ CM: ["Africa/Douala"],
3214
+ CN: ["Asia/Shanghai", "Asia/Urumqi"],
3215
+ CO: ["America/Bogota"],
3216
+ CR: ["America/Costa_Rica"],
3217
+ CU: ["America/Havana"],
3218
+ CV: ["Atlantic/Cape_Verde"],
3219
+ CW: ["America/Curacao"],
3220
+ CX: ["Indian/Christmas"],
3221
+ CY: [
3222
+ "Asia/Famagusta",
3223
+ "Asia/Nicosia",
3224
+ "Europe/Nicosia"
3225
+ ],
3226
+ CZ: ["Europe/Prague"],
3227
+ DE: ["Europe/Berlin", "Europe/Busingen"],
3228
+ DJ: ["Africa/Djibouti"],
3229
+ DK: ["Europe/Copenhagen"],
3230
+ DM: ["America/Dominica"],
3231
+ DO: ["America/Santo_Domingo"],
3232
+ DZ: ["Africa/Algiers"],
3233
+ EC: ["America/Guayaquil", "Pacific/Galapagos"],
3234
+ EE: ["Europe/Tallinn"],
3235
+ EG: ["Africa/Cairo"],
3236
+ EH: ["Africa/El_Aaiun"],
3237
+ ER: ["Africa/Asmara", "Africa/Asmera"],
3238
+ ES: [
3239
+ "Africa/Ceuta",
3240
+ "Atlantic/Canary",
3241
+ "Europe/Madrid"
3242
+ ],
3243
+ ET: ["Africa/Addis_Ababa"],
3244
+ FI: ["Europe/Helsinki"],
3245
+ FJ: ["Pacific/Fiji"],
3246
+ FK: ["Atlantic/Stanley"],
3247
+ FM: [
3248
+ "Pacific/Chuuk",
3249
+ "Pacific/Kosrae",
3250
+ "Pacific/Pohnpei",
3251
+ "Pacific/Ponape",
3252
+ "Pacific/Truk"
3253
+ ],
3254
+ FO: ["Atlantic/Faeroe", "Atlantic/Faroe"],
3255
+ FR: ["Europe/Paris"],
3256
+ GA: ["Africa/Libreville"],
3257
+ GB: ["Europe/London"],
3258
+ GD: ["America/Grenada"],
3259
+ GE: ["Asia/Tbilisi"],
3260
+ GF: ["America/Cayenne"],
3261
+ GG: ["Europe/Guernsey"],
3262
+ GH: ["Africa/Accra"],
3263
+ GI: ["Europe/Gibraltar"],
3264
+ GL: [
3265
+ "America/Danmarkshavn",
3266
+ "America/Godthab",
3267
+ "America/Nuuk",
3268
+ "America/Scoresbysund",
3269
+ "America/Thule"
3270
+ ],
3271
+ GM: ["Africa/Banjul"],
3272
+ GN: ["Africa/Conakry"],
3273
+ GP: ["America/Guadeloupe"],
3274
+ GQ: ["Africa/Malabo"],
3275
+ GR: ["Europe/Athens"],
3276
+ GT: ["America/Guatemala"],
3277
+ GU: ["Pacific/Guam"],
3278
+ GW: ["Africa/Bissau"],
3279
+ GY: ["America/Guyana"],
3280
+ HK: ["Asia/Hong_Kong"],
3281
+ HN: ["America/Tegucigalpa"],
3282
+ HR: ["Europe/Zagreb"],
3283
+ HT: ["America/Port-au-Prince"],
3284
+ HU: ["Europe/Budapest"],
3285
+ ID: [
3286
+ "Asia/Jakarta",
3287
+ "Asia/Jayapura",
3288
+ "Asia/Makassar",
3289
+ "Asia/Pontianak",
3290
+ "Asia/Ujung_Pandang"
3291
+ ],
3292
+ IE: ["Europe/Dublin"],
3293
+ IL: ["Asia/Jerusalem"],
3294
+ IM: ["Europe/Isle_of_Man"],
3295
+ IN: ["Asia/Calcutta", "Asia/Kolkata"],
3296
+ IO: ["Indian/Chagos"],
3297
+ IQ: ["Asia/Baghdad"],
3298
+ IR: ["Asia/Tehran"],
3299
+ IS: ["Atlantic/Reykjavik"],
3300
+ IT: ["Europe/Rome"],
3301
+ JE: ["Europe/Jersey"],
3302
+ JM: ["America/Jamaica"],
3303
+ JO: ["Asia/Amman"],
3304
+ JP: ["Asia/Tokyo"],
3305
+ KE: ["Africa/Nairobi"],
3306
+ KG: ["Asia/Bishkek"],
3307
+ KH: ["Asia/Phnom_Penh"],
3308
+ KI: [
3309
+ "Pacific/Kanton",
3310
+ "Pacific/Kiritimati",
3311
+ "Pacific/Tarawa"
3312
+ ],
3313
+ KM: ["Indian/Comoro"],
3314
+ KN: ["America/St_Kitts"],
3315
+ KP: ["Asia/Pyongyang"],
3316
+ KR: ["Asia/Seoul"],
3317
+ KW: ["Asia/Kuwait"],
3318
+ KY: ["America/Cayman"],
3319
+ KZ: [
3320
+ "Asia/Almaty",
3321
+ "Asia/Aqtau",
3322
+ "Asia/Aqtobe",
3323
+ "Asia/Atyrau",
3324
+ "Asia/Oral",
3325
+ "Asia/Qostanay",
3326
+ "Asia/Qyzylorda"
3327
+ ],
3328
+ LA: ["Asia/Vientiane"],
3329
+ LB: ["Asia/Beirut"],
3330
+ LC: ["America/St_Lucia"],
3331
+ LI: ["Europe/Vaduz"],
3332
+ LK: ["Asia/Colombo"],
3333
+ LR: ["Africa/Monrovia"],
3334
+ LS: ["Africa/Maseru"],
3335
+ LT: ["Europe/Vilnius"],
3336
+ LU: ["Europe/Luxembourg"],
3337
+ LV: ["Europe/Riga"],
3338
+ LY: ["Africa/Tripoli"],
3339
+ MA: ["Africa/Casablanca"],
3340
+ MC: ["Europe/Monaco"],
3341
+ MD: ["Europe/Chisinau"],
3342
+ ME: ["Europe/Podgorica"],
3343
+ MF: ["America/Marigot"],
3344
+ MG: ["Indian/Antananarivo"],
3345
+ MH: ["Pacific/Kwajalein", "Pacific/Majuro"],
3346
+ MK: ["Europe/Skopje"],
3347
+ ML: ["Africa/Bamako"],
3348
+ MM: ["Asia/Rangoon", "Asia/Yangon"],
3349
+ MN: [
3350
+ "Asia/Hovd",
3351
+ "Asia/Ulaanbaatar",
3352
+ "Asia/Ulan_Bator"
3353
+ ],
3354
+ MO: ["Asia/Macao", "Asia/Macau"],
3355
+ MP: ["Pacific/Saipan"],
3356
+ MQ: ["America/Martinique"],
3357
+ MR: ["Africa/Nouakchott"],
3358
+ MS: ["America/Montserrat"],
3359
+ MT: ["Europe/Malta"],
3360
+ MU: ["Indian/Mauritius"],
3361
+ MV: ["Indian/Maldives"],
3362
+ MW: ["Africa/Blantyre"],
3363
+ MX: [
3364
+ "America/Bahia_Banderas",
3365
+ "America/Cancun",
3366
+ "America/Chihuahua",
3367
+ "America/Ciudad_Juarez",
3368
+ "America/Hermosillo",
3369
+ "America/Matamoros",
3370
+ "America/Mazatlan",
3371
+ "America/Merida",
3372
+ "America/Mexico_City",
3373
+ "America/Monterrey",
3374
+ "America/Ojinaga",
3375
+ "America/Tijuana",
3376
+ "Mexico/BajaNorte",
3377
+ "Mexico/BajaSur",
3378
+ "Mexico/General"
3379
+ ],
3380
+ MY: ["Asia/Kuala_Lumpur", "Asia/Kuching"],
3381
+ MZ: ["Africa/Maputo"],
3382
+ NA: ["Africa/Windhoek"],
3383
+ NC: ["Pacific/Noumea"],
3384
+ NE: ["Africa/Niamey"],
3385
+ NF: ["Pacific/Norfolk"],
3386
+ NG: ["Africa/Lagos"],
3387
+ NI: ["America/Managua"],
3388
+ NL: ["Europe/Amsterdam"],
3389
+ NO: ["Europe/Oslo"],
3390
+ NP: ["Asia/Kathmandu", "Asia/Katmandu"],
3391
+ NR: ["Pacific/Nauru"],
3392
+ NU: ["Pacific/Niue"],
3393
+ NZ: ["Pacific/Auckland", "Pacific/Chatham"],
3394
+ OM: ["Asia/Muscat"],
3395
+ PA: ["America/Panama"],
3396
+ PE: ["America/Lima"],
3397
+ PF: [
3398
+ "Pacific/Gambier",
3399
+ "Pacific/Marquesas",
3400
+ "Pacific/Tahiti"
3401
+ ],
3402
+ PG: ["Pacific/Bougainville", "Pacific/Port_Moresby"],
3403
+ PH: ["Asia/Manila"],
3404
+ PK: ["Asia/Karachi"],
3405
+ PL: ["Europe/Warsaw"],
3406
+ PM: ["America/Miquelon"],
3407
+ PR: ["America/Puerto_Rico"],
3408
+ PS: ["Asia/Gaza", "Asia/Hebron"],
3409
+ PT: [
3410
+ "Atlantic/Azores",
3411
+ "Atlantic/Madeira",
3412
+ "Europe/Lisbon"
3413
+ ],
3414
+ PW: ["Pacific/Palau"],
3415
+ PY: ["America/Asuncion"],
3416
+ QA: ["Asia/Qatar"],
3417
+ RE: ["Indian/Reunion"],
3418
+ RO: ["Europe/Bucharest"],
3419
+ RS: ["Europe/Belgrade"],
3420
+ RU: /* @__PURE__ */ "Asia/Anadyr.Asia/Barnaul.Asia/Chita.Asia/Irkutsk.Asia/Kamchatka.Asia/Khandyga.Asia/Krasnoyarsk.Asia/Magadan.Asia/Novokuznetsk.Asia/Novosibirsk.Asia/Omsk.Asia/Sakhalin.Asia/Srednekolymsk.Asia/Tomsk.Asia/Ust-Nera.Asia/Vladivostok.Asia/Yakutsk.Asia/Yekaterinburg.Europe/Astrakhan.Europe/Kaliningrad.Europe/Kirov.Europe/Moscow.Europe/Samara.Europe/Saratov.Europe/Ulyanovsk.Europe/Volgograd".split("."),
3421
+ RW: ["Africa/Kigali"],
3422
+ SA: ["Asia/Riyadh"],
3423
+ SB: ["Pacific/Guadalcanal"],
3424
+ SC: ["Indian/Mahe"],
3425
+ SD: ["Africa/Khartoum"],
3426
+ SE: ["Europe/Stockholm"],
3427
+ SG: ["Asia/Singapore"],
3428
+ SH: ["Atlantic/St_Helena"],
3429
+ SI: ["Europe/Ljubljana"],
3430
+ SJ: ["Arctic/Longyearbyen"],
3431
+ SK: ["Europe/Bratislava"],
3432
+ SL: ["Africa/Freetown"],
3433
+ SM: ["Europe/San_Marino"],
3434
+ SN: ["Africa/Dakar"],
3435
+ SO: ["Africa/Mogadishu"],
3436
+ SR: ["America/Paramaribo"],
3437
+ SS: ["Africa/Juba"],
3438
+ ST: ["Africa/Sao_Tome"],
3439
+ SV: ["America/El_Salvador"],
3440
+ SX: ["America/Lower_Princes"],
3441
+ SY: ["Asia/Damascus"],
3442
+ SZ: ["Africa/Mbabane"],
3443
+ TC: ["America/Grand_Turk"],
3444
+ TD: ["Africa/Ndjamena"],
3445
+ TG: ["Africa/Lome"],
3446
+ TH: ["Asia/Bangkok"],
3447
+ TJ: ["Asia/Dushanbe"],
3448
+ TK: ["Pacific/Fakaofo"],
3449
+ TL: ["Asia/Dili"],
3450
+ TM: ["Asia/Ashgabat", "Asia/Ashkhabad"],
3451
+ TN: ["Africa/Tunis"],
3452
+ TO: ["Pacific/Tongatapu"],
3453
+ TR: ["Asia/Istanbul", "Europe/Istanbul"],
3454
+ TT: ["America/Port_of_Spain"],
3455
+ TV: ["Pacific/Funafuti"],
3456
+ TW: ["Asia/Taipei"],
3457
+ TZ: ["Africa/Dar_es_Salaam"],
3458
+ UA: [
3459
+ "Europe/Kiev",
3460
+ "Europe/Kyiv",
3461
+ "Europe/Simferopol"
3462
+ ],
3463
+ UG: ["Africa/Kampala"],
3464
+ US: /* @__PURE__ */ "America/Adak.America/Anchorage.America/Boise.America/Chicago.America/Denver.America/Detroit.America/Indiana/Indianapolis.America/Indiana/Knox.America/Indiana/Marengo.America/Indiana/Petersburg.America/Indiana/Tell_City.America/Indiana/Vevay.America/Indiana/Vincennes.America/Indiana/Winamac.America/Indianapolis.America/Juneau.America/Kentucky/Louisville.America/Kentucky/Monticello.America/Knox_IN.America/Los_Angeles.America/Louisville.America/Menominee.America/Metlakatla.America/New_York.America/Nome.America/North_Dakota/Beulah.America/North_Dakota/Center.America/North_Dakota/New_Salem.America/Phoenix.America/Sitka.America/Yakutat.Pacific/Honolulu.US/Alaska.US/Aleutian.US/Arizona.US/Central.US/East-Indiana.US/Eastern.US/Hawaii.US/Indiana-Starke.US/Michigan.US/Mountain.US/Pacific".split("."),
3465
+ UY: ["America/Montevideo"],
3466
+ UZ: ["Asia/Samarkand", "Asia/Tashkent"],
3467
+ VA: ["Europe/Vatican"],
3468
+ VC: ["America/St_Vincent"],
3469
+ VE: ["America/Caracas"],
3470
+ VG: ["America/Tortola"],
3471
+ VI: ["America/St_Thomas", "America/Virgin"],
3472
+ VN: ["Asia/Ho_Chi_Minh", "Asia/Saigon"],
3473
+ VU: ["Pacific/Efate"],
3474
+ WF: ["Pacific/Wallis"],
3475
+ WS: ["Pacific/Apia"],
3476
+ YE: ["Asia/Aden"],
3477
+ YT: ["Indian/Mayotte"],
3478
+ ZA: ["Africa/Johannesburg"],
3479
+ ZM: ["Africa/Lusaka"],
3480
+ ZW: ["Africa/Harare"]
3481
+ }, Te = new Set(L.map(([e]) => e)), Ee = /* @__PURE__ */ new Map();
3482
+ for (let [e, t] of Object.entries(we)) for (let n of t) Ee.set(n, e);
3483
+ function De(e) {
3484
+ let t = Ee.get(e);
3485
+ return t && Te.has(t) ? t : null;
3486
+ }
3487
+ function Oe(e) {
3488
+ if (!e) return null;
3489
+ let t;
3490
+ try {
3491
+ t = new Intl.Locale(e).region;
3492
+ } catch {
3493
+ return null;
3494
+ }
3495
+ return t && Te.has(t) ? t : null;
3496
+ }
3497
+ function ke() {
3498
+ let e;
3499
+ try {
3500
+ e = Intl.DateTimeFormat().resolvedOptions().timeZone;
3501
+ } catch {
3502
+ e = void 0;
3503
+ }
3504
+ let t = typeof navigator > "u" ? void 0 : navigator.language;
3505
+ return De(e) || Oe(t) || "IN";
3506
+ }
3507
+ //#endregion
3508
+ //#region src/WuiPhone.js
3509
+ var z = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, B = null, Ae = null;
3510
+ function je() {
3511
+ return B ? Promise.resolve(B) : (Ae ||= Promise.all([import("./max-BDKx469G.js"), import("./examples.mobile.json-BMXTGiGC.js")]).then(([e, t]) => (B = {
2905
3512
  AsYouType: e.AsYouType,
2906
3513
  getExampleNumber: e.getExampleNumber,
2907
3514
  isValidPhoneNumber: e.isValidPhoneNumber,
2908
3515
  parsePhoneNumber: e.parsePhoneNumber,
2909
3516
  examples: t.default || t
2910
- }, R)).catch(() => null), z);
3517
+ }, B)).catch(() => null), Ae);
3518
+ }
3519
+ function Me(e, t) {
3520
+ let n = `+${R(e)}`;
3521
+ return t?.startsWith(n) ? t.slice(n.length).trimStart() : null;
2911
3522
  }
2912
- function B(e, t) {
2913
- if (!R || !t) return t;
3523
+ function V(e, t) {
3524
+ if (!B || !t) return t;
2914
3525
  try {
2915
- return new R.AsYouType(e).input(t);
3526
+ return Me(e, new B.AsYouType(e).input(`+${R(e)}${t}`)) || t;
2916
3527
  } catch {
2917
3528
  return t;
2918
3529
  }
2919
3530
  }
2920
- function pe(e, t) {
3531
+ function Ne(e, t) {
2921
3532
  if (t <= 0) return 0;
2922
3533
  let n = 0;
2923
3534
  for (let r = 0; r < e.length; r++) if (/[0-9]/.test(e[r]) && (n += 1, n === t)) return r + 1;
2924
3535
  return e.length;
2925
3536
  }
2926
- function V(e) {
2927
- if (!R) return null;
3537
+ function H(e) {
3538
+ if (!B) return null;
2928
3539
  try {
2929
- return R.getExampleNumber(e, R.examples)?.formatNational() || null;
3540
+ return Me(e, B.getExampleNumber(e, B.examples)?.formatInternational()) || null;
2930
3541
  } catch {
2931
3542
  return null;
2932
3543
  }
2933
3544
  }
2934
- function H(e) {
2935
- if (!R || !e) return null;
3545
+ function Pe(e) {
3546
+ if (!B || !e) return null;
2936
3547
  try {
2937
- if (!R.isValidPhoneNumber(e)) return !1;
2938
- let t = R.parsePhoneNumber(e)?.getType?.();
3548
+ if (!B.isValidPhoneNumber(e)) return !1;
3549
+ let t = B.parsePhoneNumber(e)?.getType?.();
2939
3550
  return t === void 0 || t === "MOBILE" || t === "FIXED_LINE_OR_MOBILE";
2940
3551
  } catch {
2941
3552
  return null;
2942
3553
  }
2943
3554
  }
2944
- function me(e) {
2945
- if (!R) return null;
3555
+ function Fe(e) {
3556
+ if (!B) return null;
2946
3557
  try {
2947
- let t = R.getExampleNumber(e, R.examples);
3558
+ let t = B.getExampleNumber(e, B.examples);
2948
3559
  return t?.nationalNumber ? t.nationalNumber.length : null;
2949
3560
  } catch {
2950
3561
  return null;
2951
3562
  }
2952
3563
  }
2953
- function he(e) {
2954
- if (!R || !e?.trim().startsWith("+")) return null;
3564
+ function Ie(e) {
3565
+ if (!B || !e?.trim().startsWith("+")) return null;
2955
3566
  try {
2956
- let t = new R.AsYouType();
3567
+ let t = new B.AsYouType();
2957
3568
  t.input(e.trim());
2958
3569
  let n = t.getCountry();
2959
3570
  return n ? {
@@ -2964,7 +3575,7 @@ function he(e) {
2964
3575
  return null;
2965
3576
  }
2966
3577
  }
2967
- var ge = class extends e {
3578
+ var Le = class extends e {
2968
3579
  static formAssociated = !0;
2969
3580
  static get observedAttributes() {
2970
3581
  return [
@@ -2984,7 +3595,7 @@ var ge = class extends e {
2984
3595
  } catch {
2985
3596
  this._internals = null;
2986
3597
  }
2987
- this._country = "IN", this._national = "", this._active = -1, this._committedValue = "";
3598
+ this._defaultCountry = ke(), this._country = this._defaultCountry, this._national = "", this._active = -1, this._committedValue = "";
2988
3599
  }
2989
3600
  connectedCallback() {
2990
3601
  if (!this._rendered) {
@@ -3004,20 +3615,20 @@ var ge = class extends e {
3004
3615
  t && (n == null ? t.removeAttribute(e) : t.setAttribute(e, n));
3005
3616
  return;
3006
3617
  }
3007
- e === "country" && (this._country = n || "IN", this._suppressCountryRender) || this.render();
3618
+ e === "country" && (this._country = n || this._defaultCountry, this._suppressCountryRender) || this.render();
3008
3619
  }
3009
3620
  }
3010
3621
  formResetCallback() {
3011
3622
  this.value = this._defaultValue || "";
3012
3623
  }
3013
3624
  get value() {
3014
- return this._national ? `+${I(this._country)}${this._national}` : "";
3625
+ return this._national ? `+${R(this._country)}${this._national}` : "";
3015
3626
  }
3016
3627
  set value(e) {
3017
- let t = String(e ?? "").trim(), n = he(t);
3628
+ let t = String(e ?? "").trim(), n = Ie(t);
3018
3629
  if (n) this._country = n.country, this._national = n.national.replace(/[^0-9]/g, "");
3019
3630
  else if (t.startsWith("+")) {
3020
- let e = t.replace(/[^0-9]/g, ""), n = String(I(this._country));
3631
+ let e = t.replace(/[^0-9]/g, ""), n = String(R(this._country));
3021
3632
  n && e.startsWith(n) && (e = e.slice(n.length)), this._national = e;
3022
3633
  } else this._national = t.replace(/[^0-9]/g, "");
3023
3634
  n && this.getAttribute("country") !== this._country ? this.setAttribute("country", this._country) : this._rendered && this.render(), this._committedValue = this.value, this._syncMirror();
@@ -3033,25 +3644,25 @@ var ge = class extends e {
3033
3644
  }
3034
3645
  render() {
3035
3646
  this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || ""), this._country = this.getAttribute("country") || this._country;
3036
- let e = this.getAttribute("placeholder") || V(this._country) || "Enter phone number";
3647
+ let e = this.getAttribute("placeholder") || H(this._country) || "Enter phone number";
3037
3648
  this.id ||= `wui-phone-${Math.random().toString(36).slice(2, 9)}`;
3038
3649
  let t = `${this.id}-listbox`;
3039
3650
  this._listboxId = t;
3040
- let n = de.map(([e, n, r], i) => `<button type="button" role="option" id="${U(`${t}-opt-${i}`)}" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}" aria-selected="${e === this._country}"><span class="${L(e)}" aria-hidden="true"></span><span class="country-name-text">${n}<span class="country-code-text">+${r}</span></span></button>`).join("");
3651
+ let n = L.map(([e, n, r], i) => `<button type="button" role="option" id="${U(`${t}-opt-${i}`)}" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}" aria-selected="${e === this._country}"><span class="${z(e)}" aria-hidden="true"></span><span class="country-name-text">${n}<span class="country-code-text">+${r}</span></span></button>`).join("");
3041
3652
  this.innerHTML = `
3042
3653
  <div class="phone-input-wrap">
3043
3654
  <div class="phone-country-adornment">
3044
3655
  <button type="button" class="country-toggle" aria-label="Choose country" aria-haspopup="listbox" aria-expanded="false" aria-controls="${U(t)}"${this.hasAttribute("disabled") ? " disabled" : ""}>
3045
- <span class="${L(this._country)}" data-flag aria-hidden="true"></span>
3656
+ <span class="${z(this._country)}" data-flag aria-hidden="true"></span>
3046
3657
  ${p("chevron-down", { className: "phone-chevron" })}
3047
- <span class="phone-dial" data-dial>+${I(this._country)}</span>
3658
+ <span class="phone-dial" data-dial>+${R(this._country)}</span>
3048
3659
  </button>
3049
3660
  <div class="country-dropdown-menu" role="listbox" id="${U(t)}" tabindex="-1" hidden>
3050
3661
  <div class="dropdown-search-wrapper"><span class="dropdown-search-icon">${p("search")}</span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" aria-controls="${U(t)}" aria-autocomplete="list" /></div>
3051
3662
  <div class="country-list-scroll">${n}<div class="country-empty" hidden>No countries found</div></div>
3052
3663
  </div>
3053
3664
  </div>
3054
- <input type="tel" class="input" placeholder="${U(e)}" value="${U(B(this._country, this._national))}"${this.getAttribute("aria-label") ? ` aria-label="${U(this.getAttribute("aria-label"))}"` : ""}${this.getAttribute("aria-describedby") ? ` aria-describedby="${U(this.getAttribute("aria-describedby"))}"` : ""}${this.hasAttribute("required") ? " required aria-required=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""} />
3665
+ <input type="tel" class="input" placeholder="${U(e)}" value="${U(V(this._country, this._national))}"${this.getAttribute("aria-label") ? ` aria-label="${U(this.getAttribute("aria-label"))}"` : ""}${this.getAttribute("aria-describedby") ? ` aria-describedby="${U(this.getAttribute("aria-describedby"))}"` : ""}${this.hasAttribute("required") ? " required aria-required=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""} />
3055
3666
  </div>
3056
3667
  <div class="field-error" data-phone-error hidden></div>`, this._rendered = !0, d(this, this.value), this._wire();
3057
3668
  }
@@ -3082,12 +3693,12 @@ var ge = class extends e {
3082
3693
  }
3083
3694
  a && (a.hidden = n > 0);
3084
3695
  }, v = (e) => {
3085
- this._country = e, this.getAttribute("country") !== e && (this._suppressCountryRender = !0, this.setAttribute("country", e), this._suppressCountryRender = !1), u && (u.className = L(e)), d && (d.textContent = `+${I(e)}`);
3696
+ this._country = e, this.getAttribute("country") !== e && (this._suppressCountryRender = !0, this.setAttribute("country", e), this._suppressCountryRender = !1), u && (u.className = z(e)), d && (d.textContent = `+${R(e)}`);
3086
3697
  for (let t of this._itemEls()) {
3087
3698
  let n = t.dataset.iso === e;
3088
3699
  t.classList.toggle("selected", n), t.setAttribute("aria-selected", String(n));
3089
3700
  }
3090
- !this.getAttribute("placeholder") && o && (o.placeholder = V(e) || "Enter phone number"), o && this._national && (o.value = B(e, this._national)), g(), this._syncMirror(), this._emitChange(), o?.focus();
3701
+ !this.getAttribute("placeholder") && o && (o.placeholder = H(e) || "Enter phone number"), o && this._national && (o.value = V(e, this._national)), g(), this._syncMirror(), this._emitChange(), o?.focus();
3091
3702
  }, y = (t) => {
3092
3703
  let n = this._visibleItems();
3093
3704
  if (t.key === "ArrowDown") {
@@ -3121,7 +3732,7 @@ var ge = class extends e {
3121
3732
  let b = this.querySelector("[data-phone-error]"), x = (e) => {
3122
3733
  if (o.classList.toggle("is-invalid", e), e ? o.setAttribute("aria-invalid", "true") : o.removeAttribute("aria-invalid"), b) {
3123
3734
  if (e) {
3124
- let e = V(this._country);
3735
+ let e = H(this._country);
3125
3736
  b.textContent = e ? `Enter a valid phone number, e.g. ${e}` : "Enter a valid phone number";
3126
3737
  }
3127
3738
  b.hidden = !e;
@@ -3129,20 +3740,20 @@ var ge = class extends e {
3129
3740
  };
3130
3741
  o.addEventListener("input", (e) => {
3131
3742
  e.stopPropagation();
3132
- let t = o.selectionStart ?? o.value.length, n = o.value.slice(0, t).replace(/[^0-9]/g, "").length, r = o.value.replace(/[^0-9]/g, ""), i = me(this._country);
3743
+ let t = o.selectionStart ?? o.value.length, n = o.value.slice(0, t).replace(/[^0-9]/g, "").length, r = o.value.replace(/[^0-9]/g, ""), i = Fe(this._country);
3133
3744
  i && r.length > i && (r = r.slice(0, i)), this._national = r;
3134
- let a = B(this._country, this._national);
3745
+ let a = V(this._country, this._national);
3135
3746
  if (o.value !== a) {
3136
3747
  o.value = a;
3137
- let e = pe(a, Math.min(n, r.length));
3748
+ let e = Ne(a, Math.min(n, r.length));
3138
3749
  o.setSelectionRange(e, e);
3139
3750
  }
3140
- this._syncMirror(), this._emitInput(), o.classList.contains("is-invalid") && (!this._national || H(this.value) === !0) && x(!1);
3751
+ this._syncMirror(), this._emitInput(), o.classList.contains("is-invalid") && (!this._national || Pe(this.value) === !0) && x(!1);
3141
3752
  }), o.addEventListener("change", (e) => e.stopPropagation()), o.addEventListener("blur", () => {
3142
- x(this._national.length > 0 && H(this.value) === !1), this.value !== this._committedValue && this._emitChange();
3753
+ x(this._national.length > 0 && Pe(this.value) === !1), this.value !== this._committedValue && this._emitChange();
3143
3754
  }), o.addEventListener("paste", (e) => {
3144
- let t = he(e.clipboardData?.getData("text"));
3145
- t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = B(this._country, this._national) : this.setAttribute("country", t.country), this._syncMirror(), this._emitInput(), this._emitChange(), this.querySelector("input[type=tel]")?.focus());
3755
+ let t = Ie(e.clipboardData?.getData("text"));
3756
+ t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = V(this._country, this._national) : this.setAttribute("country", t.country), this._syncMirror(), this._emitInput(), this._emitChange(), this.querySelector("input[type=tel]")?.focus());
3146
3757
  }), this._bindGlobal = () => {
3147
3758
  this._teardownGlobals?.(), this._onDocClick = (e) => {
3148
3759
  f() && !this.contains(e.target) && g();
@@ -3151,9 +3762,9 @@ var ge = class extends e {
3151
3762
  });
3152
3763
  }, this._teardownGlobals = () => {
3153
3764
  this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), l(this);
3154
- }, this._bindGlobal(), fe().then((e) => {
3155
- if (!(!e || !o.isConnected) && (this._national && (o.value = B(this._country, this._national)), !this.getAttribute("placeholder"))) {
3156
- let e = V(this._country);
3765
+ }, this._bindGlobal(), je().then((e) => {
3766
+ if (!(!e || !o.isConnected) && (this._national && (o.value = V(this._country, this._national)), !this.getAttribute("placeholder"))) {
3767
+ let e = H(this._country);
3157
3768
  e && (o.placeholder = e);
3158
3769
  }
3159
3770
  }), this._syncMirror();
@@ -3164,7 +3775,7 @@ var ge = class extends e {
3164
3775
  disconnectedCallback() {
3165
3776
  this._teardown();
3166
3777
  }
3167
- }, U = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), _e = class extends e {
3778
+ }, U = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Re = class extends e {
3168
3779
  static formAssociated = !0;
3169
3780
  static get observedAttributes() {
3170
3781
  return [
@@ -3370,7 +3981,7 @@ var ge = class extends e {
3370
3981
  disconnectedCallback() {
3371
3982
  this._teardown();
3372
3983
  }
3373
- }, W = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), ve = class extends e {
3984
+ }, W = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), ze = class extends e {
3374
3985
  static formAssociated = !0;
3375
3986
  static get observedAttributes() {
3376
3987
  return [
@@ -3512,7 +4123,7 @@ var ge = class extends e {
3512
4123
  aria-valuenow="${this._value}"
3513
4124
  aria-valuetext="${this._formatValue(this._value)}"
3514
4125
  ${a ? "disabled" : ""}
3515
- aria-label="${ye(this.getAttribute("aria-label") || "Value")}"
4126
+ aria-label="${Be(this.getAttribute("aria-label") || "Value")}"
3516
4127
  ></button>
3517
4128
  `}
3518
4129
  ${this.hasAttribute("show-value") ? n ? `<span class="slider-value">${this._formatValue(this._start)} – ${this._formatValue(this._end)}</span>` : `<span class="slider-value">${this._formatValue(this._value)}</span>` : ""}
@@ -3615,7 +4226,7 @@ var ge = class extends e {
3615
4226
  }, G = (e, t) => {
3616
4227
  let n = Number.parseFloat(e);
3617
4228
  return Number.isFinite(n) ? n : t;
3618
- }, ye = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), be = class extends e {
4229
+ }, Be = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Ve = class extends e {
3619
4230
  static formAssociated = !0;
3620
4231
  _accessibleName() {
3621
4232
  return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Add tags";
@@ -3700,16 +4311,14 @@ var ge = class extends e {
3700
4311
  e.innerHTML = "";
3701
4312
  return;
3702
4313
  }
3703
- e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${xe(e)}</span><button type="button" class="chip-remove" data-remove="${K(e)}" aria-label="Remove ${K(e)}">${p("x")}</button></span>`).join("");
4314
+ e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${He(e)}</span><button type="button" class="chip-remove" data-remove="${K(e)}" aria-label="Remove ${K(e)}">${p("x")}</button></span>`).join("");
3704
4315
  }
3705
4316
  }
3706
4317
  _wire() {
3707
4318
  this._teardown();
3708
4319
  let e = this.querySelector(".search-select-control"), t = this.querySelector("[data-input]");
3709
4320
  if (!e || !t) return;
3710
- let n = () => this.hasAttribute("disabled"), r = (this.getAttribute("separators") || "enter,comma").split(",").map((e) => e.trim()), i = this.getAttribute("max-tags"), a = this.hasAttribute("allow-duplicates"), o = /* @__PURE__ */ new Set();
3711
- for (let e of r) e === "enter" ? o.add("Enter") : e === "comma" ? o.add(",") : e === "space" ? o.add(" ") : e === "tab" && o.add("Tab");
3712
- let s = () => {
4321
+ let n = () => this.hasAttribute("disabled"), r = (this.getAttribute("separators") || "enter,comma").split(",").map((e) => e.trim()), i = this.getAttribute("max-tags"), a = this.hasAttribute("allow-duplicates"), o = new Set(r.map(de).filter(Boolean)), s = () => {
3713
4322
  d(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
3714
4323
  }, c = (e) => {
3715
4324
  let t = e.trim();
@@ -3741,9 +4350,9 @@ var ge = class extends e {
3741
4350
  e.preventDefault();
3742
4351
  let n = e.clipboardData.getData("text/plain"), a = [];
3743
4352
  for (let e of r) {
3744
- let t = e;
3745
- if (t === "enter" ? t = "\n" : t === "comma" ? t = "," : t === "space" ? t = " " : t === "tab" && (t = " "), n.includes(t)) {
3746
- a.push(...n.split(t).map((e) => e.trim()).filter((e) => e));
4353
+ let t = fe(e) ?? e;
4354
+ if (M(n, [t])) {
4355
+ a.push(...pe(n, [t]));
3747
4356
  break;
3748
4357
  }
3749
4358
  }
@@ -3771,7 +4380,7 @@ var ge = class extends e {
3771
4380
  disconnectedCallback() {
3772
4381
  this._teardown();
3773
4382
  }
3774
- }, xe = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), K = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), q = (e) => String(e).padStart(2, "0"), Se = (e, t) => `${q(e)}:${q(t)}`, J = (e) => {
4383
+ }, He = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), K = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), q = (e) => String(e).padStart(2, "0"), Ue = (e, t) => `${q(e)}:${q(t)}`, J = (e) => {
3775
4384
  let t = /^(\d{2}):(\d{2})$/.exec(e || "");
3776
4385
  return t ? {
3777
4386
  h: +t[1],
@@ -3779,10 +4388,10 @@ var ge = class extends e {
3779
4388
  } : null;
3780
4389
  }, Y = (e, t = "24") => {
3781
4390
  if (!e) return "";
3782
- if (t === "24") return Se(e.h, e.m);
4391
+ if (t === "24") return Ue(e.h, e.m);
3783
4392
  let n = e.h % 12 || 12, r = e.h >= 12 ? "PM" : "AM";
3784
4393
  return `${n}:${q(e.m)} ${r}`;
3785
- }, Ce = class extends e {
4394
+ }, We = class extends e {
3786
4395
  static formAssociated = !0;
3787
4396
  static get observedAttributes() {
3788
4397
  return [
@@ -3867,7 +4476,7 @@ var ge = class extends e {
3867
4476
  if (!e) return;
3868
4477
  let t = this.getAttribute("format") || "24", n = this._buildTimes(), r = J(this._value), i = this._focus, a = "";
3869
4478
  for (let e = 0; e < n.length; e++) {
3870
- let o = n[e], s = Se(o.h, o.m), c = r && r.h === o.h && r.m === o.m;
4479
+ let o = n[e], s = Ue(o.h, o.m), c = r && r.h === o.h && r.m === o.m;
3871
4480
  a += `<button type="button" class="timepicker-option${c ? " is-selected" : ""}" data-hm="${s}" role="option" tabindex="${i === e ? "0" : "-1"}"${c ? " aria-selected=\"true\"" : ""}>${Y(o, t)}</button>`;
3872
4481
  }
3873
4482
  e.innerHTML = a, this._focusActive();
@@ -3966,7 +4575,7 @@ var ge = class extends e {
3966
4575
  disconnectedCallback() {
3967
4576
  this._teardown();
3968
4577
  }
3969
- }, we = "wui-wizard-step", Te = class extends e {
4578
+ }, Ge = "wui-wizard-step", Ke = class extends e {
3970
4579
  static get observedAttributes() {
3971
4580
  return [
3972
4581
  "active",
@@ -4000,7 +4609,7 @@ var ge = class extends e {
4000
4609
  this._beforeNext = typeof e == "function" ? e : null;
4001
4610
  }
4002
4611
  get _steps() {
4003
- return [...this.querySelectorAll(`:scope > ${we}`)];
4612
+ return [...this.querySelectorAll(`:scope > ${Ge}`)];
4004
4613
  }
4005
4614
  refresh() {
4006
4615
  this._rendered && this._renderChrome();
@@ -4133,7 +4742,7 @@ var ge = class extends e {
4133
4742
  _reflectActive(e) {
4134
4743
  this._reflecting = !0, this.setAttribute("active", String(e)), this._reflecting = !1;
4135
4744
  }
4136
- }, X = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), Ee = class extends e {
4745
+ }, X = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), qe = class extends e {
4137
4746
  static get observedAttributes() {
4138
4747
  return [
4139
4748
  "label",
@@ -4147,8 +4756,8 @@ var ge = class extends e {
4147
4756
  let e = this.closest("wui-wizard");
4148
4757
  e && typeof e.refresh == "function" && e.refresh();
4149
4758
  }
4150
- }, De = 2e3;
4151
- async function Oe(e) {
4759
+ }, Je = 2e3;
4760
+ async function Ye(e) {
4152
4761
  try {
4153
4762
  if (navigator.clipboard?.writeText) return await navigator.clipboard.writeText(e), !0;
4154
4763
  } catch {}
@@ -4163,14 +4772,14 @@ async function Oe(e) {
4163
4772
  }
4164
4773
  //#endregion
4165
4774
  //#region src/fileValidation.js
4166
- var ke = "image/png,image/jpeg,image/webp", Ae = 5, je = {
4775
+ var Xe = "image/png,image/jpeg,image/webp", Ze = 5, Qe = {
4167
4776
  "image/png": [".png"],
4168
4777
  "image/jpeg": [".jpg", ".jpeg"],
4169
4778
  "image/webp": [".webp"],
4170
4779
  "image/gif": [".gif"],
4171
4780
  "image/svg+xml": [".svg"],
4172
4781
  "application/pdf": [".pdf"]
4173
- }, Me = {
4782
+ }, $e = {
4174
4783
  "image/png": "PNG",
4175
4784
  "image/jpeg": "JPG",
4176
4785
  "image/webp": "WEBP",
@@ -4184,7 +4793,7 @@ var ke = "image/png,image/jpeg,image/webp", Ae = 5, je = {
4184
4793
  ".gif": "GIF",
4185
4794
  ".svg": "SVG",
4186
4795
  ".pdf": "PDF"
4187
- }, Z = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), Ne = [
4796
+ }, Z = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), et = [
4188
4797
  ".png",
4189
4798
  ".jpg",
4190
4799
  ".jpeg",
@@ -4195,35 +4804,35 @@ var ke = "image/png,image/jpeg,image/webp", Ae = 5, je = {
4195
4804
  ".avif",
4196
4805
  ".heic"
4197
4806
  ];
4198
- function Pe(e) {
4807
+ function tt(e) {
4199
4808
  if (!e) return !1;
4200
4809
  let t = typeof e == "object" && e.type ? String(e.type).toLowerCase() : "";
4201
4810
  if (t) return t.startsWith("image/");
4202
4811
  let n = typeof e == "string" ? e : e.name || e.url || "", r = String(n).toLowerCase();
4203
- return Ne.some((e) => r.endsWith(e));
4812
+ return et.some((e) => r.endsWith(e));
4204
4813
  }
4205
- function Fe(e) {
4814
+ function nt(e) {
4206
4815
  let t = Z(e);
4207
- return t.length ? t.every((e) => e.startsWith(".") ? Ne.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
4816
+ return t.length ? t.every((e) => e.startsWith(".") ? et.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
4208
4817
  }
4209
- function Ie(e) {
4818
+ function rt(e) {
4210
4819
  let t = [];
4211
4820
  for (let n of Z(e)) {
4212
- let e = Me[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
4821
+ let e = $e[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
4213
4822
  t.includes(e) || t.push(e);
4214
4823
  }
4215
4824
  return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
4216
4825
  }
4217
- function Le(e, t) {
4826
+ function it(e, t) {
4218
4827
  let n = Z(t);
4219
4828
  if (!n.length) return !0;
4220
4829
  let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
4221
- return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (je[e] || []).some((e) => i.endsWith(e)));
4830
+ return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (Qe[e] || []).some((e) => i.endsWith(e)));
4222
4831
  }
4223
- function Re(e, t = {}) {
4832
+ function at(e, t = {}) {
4224
4833
  if (!e) return null;
4225
- let n = t.accept === void 0 ? ke : t.accept, r = t.maxSizeMb || 5;
4226
- return Le(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${Ie(n)} file.`;
4834
+ let n = t.accept === void 0 ? Xe : t.accept, r = t.maxSizeMb || 5;
4835
+ return it(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${rt(n)} file.`;
4227
4836
  }
4228
4837
  //#endregion
4229
4838
  //#region src/passwordRules.js
@@ -4234,15 +4843,15 @@ var Q = {
4234
4843
  digit: !0,
4235
4844
  special: !0,
4236
4845
  uniqueChars: 0
4237
- }, ze = "Password Requirements";
4238
- function Be(e) {
4846
+ }, ot = "Password Requirements";
4847
+ function st(e) {
4239
4848
  return e === !0 || e == null ? { ...Q } : {
4240
4849
  ...Q,
4241
4850
  ...e
4242
4851
  };
4243
4852
  }
4244
- function Ve(e) {
4245
- let t = Be(e), n = [];
4853
+ function ct(e) {
4854
+ let t = st(e), n = [];
4246
4855
  if (t.minLength > 0 && n.push({
4247
4856
  key: "length",
4248
4857
  label: `At least ${t.minLength} characters long`,
@@ -4273,25 +4882,25 @@ function Ve(e) {
4273
4882
  }
4274
4883
  return n;
4275
4884
  }
4276
- function He(e, t) {
4885
+ function lt(e, t) {
4277
4886
  let n = e == null ? "" : String(e);
4278
- return Ve(t).map((e) => ({
4887
+ return ct(t).map((e) => ({
4279
4888
  key: e.key,
4280
4889
  label: e.label,
4281
4890
  met: e.test(n)
4282
4891
  }));
4283
4892
  }
4284
- function Ue(e, t) {
4285
- return He(e, t).every((e) => e.met);
4893
+ function ut(e, t) {
4894
+ return lt(e, t).every((e) => e.met);
4286
4895
  }
4287
4896
  //#endregion
4288
4897
  //#region src/index.js
4289
4898
  var $ = (e, t) => {
4290
4899
  typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
4291
4900
  };
4292
- function We() {
4293
- $("wui-select", _e), $("wui-phone", ge), $("wui-datepicker", ee), $("wui-date-range", A), $("wui-dock", te), $("wui-feedback", N), $("wui-slider", ve), $("wui-timepicker", Ce), $("wui-autocomplete", y), $("wui-multiselect", se), $("wui-taginput", be), $("wui-otp", ue), $("wui-status-icon", r), $("wui-wizard-step", Ee), $("wui-wizard", Te);
4901
+ function dt() {
4902
+ $("wui-select", Re), $("wui-phone", Le), $("wui-datepicker", ee), $("wui-date-range", te), $("wui-dock", ne), $("wui-feedback", oe), $("wui-slider", ze), $("wui-timepicker", We), $("wui-autocomplete", y), $("wui-multiselect", me), $("wui-taginput", Ve), $("wui-otp", Ce), $("wui-status-icon", r), $("wui-wizard-step", qe), $("wui-wizard", Ke);
4294
4903
  }
4295
- We();
4904
+ dt();
4296
4905
  //#endregion
4297
- export { De as COPY_FEEDBACK_MS, ke as DEFAULT_IMAGE_ACCEPT, Ae as DEFAULT_MAX_SIZE_MB, Q as DEFAULT_PASSWORD_RULES, ze as DEFAULT_REQUIREMENTS_TITLE, n as STATUS_TONES, y as WuiAutocomplete, ee as WuiDatePicker, A as WuiDateRange, te as WuiDock, N as WuiFeedback, se as WuiMultiSelect, ue as WuiOtp, ge as WuiPhone, _e as WuiSelect, ve as WuiSlider, r as WuiStatusIcon, be as WuiTagInput, Ce as WuiTimePicker, Te as WuiWizard, Ee as WuiWizardStep, Ie as acceptLabel, Ve as buildPasswordRules, Oe as copyTextToClipboard, We as defineWeborityElements, He as evaluatePassword, p as glyphSvg, Pe as isImageFile, Fe as isImageOnlyAccept, Le as matchesAccept, Ue as passwordSatisfies, Re as validateFile };
4906
+ export { Je as COPY_FEEDBACK_MS, Xe as DEFAULT_IMAGE_ACCEPT, Ze as DEFAULT_MAX_SIZE_MB, Q as DEFAULT_PASSWORD_RULES, ot as DEFAULT_REQUIREMENTS_TITLE, n as STATUS_TONES, y as WuiAutocomplete, ee as WuiDatePicker, te as WuiDateRange, ne as WuiDock, oe as WuiFeedback, me as WuiMultiSelect, Ce as WuiOtp, Le as WuiPhone, Re as WuiSelect, ze as WuiSlider, r as WuiStatusIcon, Ve as WuiTagInput, We as WuiTimePicker, Ke as WuiWizard, qe as WuiWizardStep, rt as acceptLabel, ct as buildPasswordRules, Ye as copyTextToClipboard, dt as defineWeborityElements, lt as evaluatePassword, p as glyphSvg, tt as isImageFile, nt as isImageOnlyAccept, it as matchesAccept, ut as passwordSatisfies, at as validateFile };