monobill-mintui 0.6.668 → 0.6.670

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 (123) hide show
  1. package/dist/back-button.css +1 -1
  2. package/dist/button.css +1 -1
  3. package/dist/checkbox.css +1 -1
  4. package/dist/choice.css +1 -1
  5. package/dist/components/alert/browser.js +3 -3
  6. package/dist/components/alert/index.cjs +1 -1
  7. package/dist/components/alert/index.js +3 -3
  8. package/dist/components/back-button/browser.js +1 -1
  9. package/dist/components/back-button/index.cjs +1 -1
  10. package/dist/components/back-button/index.js +1 -1
  11. package/dist/components/bottom-navigation/browser.js +2 -2
  12. package/dist/components/bottom-navigation/index.cjs +1 -1
  13. package/dist/components/bottom-navigation/index.js +2 -2
  14. package/dist/components/button/browser.js +1 -1
  15. package/dist/components/button/index.cjs +1 -1
  16. package/dist/components/button/index.js +1 -1
  17. package/dist/components/checkbox/browser.js +2 -2
  18. package/dist/components/checkbox/index.cjs +1 -1
  19. package/dist/components/checkbox/index.js +2 -2
  20. package/dist/components/chip/browser.js +1 -1
  21. package/dist/components/chip/index.cjs +1 -1
  22. package/dist/components/chip/index.js +1 -1
  23. package/dist/components/chunks/{back-button-Bq1zXUQY.js → back-button-TLWsaZZT.js} +2 -2
  24. package/dist/components/chunks/{back-button-DaAufhBf.js → back-button-VEcRfWEx.js} +1 -1
  25. package/dist/components/chunks/{button-BRSUb0vH.js → button-9OkdUt6p.js} +1 -1
  26. package/dist/components/chunks/{button-bTGgcEQa.js → button-By-fwuGE.js} +2 -2
  27. package/dist/components/chunks/{caret-down-iipO1Dc4.js → caret-down-BBhOg9_Z.js} +1 -1
  28. package/dist/components/chunks/caret-down-BfBLwx6q.js +1 -0
  29. package/dist/components/chunks/{caret-right-D5Ff1OAV.js → caret-right-C-bQyIjW.js} +1 -1
  30. package/dist/components/chunks/caret-right-CqNU7vAZ.js +1 -0
  31. package/dist/components/chunks/{chip-W7L_mUed.js → chip-Ct2fr0ce.js} +3 -3
  32. package/dist/components/chunks/{chip-ClBkQ_df.js → chip-DovN-Bp2.js} +1 -1
  33. package/dist/components/chunks/{close-CaN_RbYr.js → close-BeiBTo1F.js} +1 -1
  34. package/dist/components/chunks/close-a2blCqJN.js +1 -0
  35. package/dist/components/chunks/{confirm-action-ToLjdUEa.js → confirm-action-CK6XNdUM.js} +1 -1
  36. package/dist/components/chunks/{confirm-action-D8Yw1wVl.js → confirm-action-DKgSfwTn.js} +2 -2
  37. package/dist/components/chunks/{date-picker-DAbKJN_O.js → date-picker-DTEJkwcA.js} +4 -4
  38. package/dist/components/chunks/{date-picker-BGuBaVJ2.js → date-picker-fM6RiC8Q.js} +1 -1
  39. package/dist/components/chunks/{icon-BVkUo6Cq.js → icon-Basse9AD.js} +88 -49
  40. package/dist/components/chunks/{icon-DUXUj1Xl.js → icon-CGXHKbMq.js} +13 -3
  41. package/dist/components/chunks/icon-Cfhjb8tV.js +1 -0
  42. package/dist/components/chunks/icon-DcgcsymT.js +1 -0
  43. package/dist/components/chunks/{input-CQotxpZy.js → input-CNG7PaSY.js} +1 -1
  44. package/dist/components/chunks/{input-CF2u4smb.js → input-DzTy1_ke.js} +3 -3
  45. package/dist/components/chunks/{modal-Df8StF09.js → modal-CAhV008D.js} +1 -1
  46. package/dist/components/chunks/{modal-BvfqDCBC.js → modal-CM0ZoVGN.js} +2 -2
  47. package/dist/components/chunks/{search-DbOQdGDQ.js → search-BiBJR6IK.js} +1 -1
  48. package/dist/components/chunks/search-Ce29Aglb.js +1 -0
  49. package/dist/components/chunks/{time-picker-Cw0-EgBh.js → time-picker-D6QRY9_l.js} +1 -1
  50. package/dist/components/chunks/{time-picker-CIEoPb9R.js → time-picker-RLxkfNOb.js} +2 -2
  51. package/dist/components/confirm-action/browser.js +1 -1
  52. package/dist/components/confirm-action/index.cjs +1 -1
  53. package/dist/components/confirm-action/index.js +1 -1
  54. package/dist/components/date-picker/browser.js +1 -1
  55. package/dist/components/date-picker/index.cjs +1 -1
  56. package/dist/components/date-picker/index.js +1 -1
  57. package/dist/components/datetime-picker/browser.js +3 -3
  58. package/dist/components/datetime-picker/index.cjs +1 -1
  59. package/dist/components/datetime-picker/index.js +3 -3
  60. package/dist/components/dropzone/browser.js +3 -3
  61. package/dist/components/dropzone/index.cjs +1 -1
  62. package/dist/components/dropzone/index.js +3 -3
  63. package/dist/components/icon/browser.js +1 -1
  64. package/dist/components/icon/index.cjs +1 -1
  65. package/dist/components/icon/index.js +1 -1
  66. package/dist/components/input/browser.js +1 -1
  67. package/dist/components/input/index.cjs +1 -1
  68. package/dist/components/input/index.js +1 -1
  69. package/dist/components/modal/browser.js +1 -1
  70. package/dist/components/modal/index.cjs +1 -1
  71. package/dist/components/modal/index.js +1 -1
  72. package/dist/components/navigation/browser.js +2 -2
  73. package/dist/components/navigation/index.cjs +1 -1
  74. package/dist/components/navigation/index.js +2 -2
  75. package/dist/components/off-canvas/browser.js +2 -2
  76. package/dist/components/off-canvas/index.cjs +1 -1
  77. package/dist/components/off-canvas/index.js +2 -2
  78. package/dist/components/page/browser.js +1 -1
  79. package/dist/components/page/index.cjs +1 -1
  80. package/dist/components/page/index.js +1 -1
  81. package/dist/components/resource-table/ResourceTable.d.ts.map +1 -1
  82. package/dist/components/resource-table/browser.js +21 -21
  83. package/dist/components/resource-table/index.cjs +1 -1
  84. package/dist/components/resource-table/index.js +21 -21
  85. package/dist/components/search/browser.js +7 -7
  86. package/dist/components/search/index.cjs +1 -1
  87. package/dist/components/search/index.js +7 -7
  88. package/dist/components/select/browser.js +2 -2
  89. package/dist/components/select/index.cjs +1 -1
  90. package/dist/components/select/index.js +2 -2
  91. package/dist/components/side-navigation/browser.js +4 -4
  92. package/dist/components/side-navigation/index.cjs +1 -1
  93. package/dist/components/side-navigation/index.js +4 -4
  94. package/dist/components/switch/browser.js +2 -2
  95. package/dist/components/switch/index.cjs +1 -1
  96. package/dist/components/switch/index.js +2 -2
  97. package/dist/components/tags/browser.js +3 -3
  98. package/dist/components/tags/index.cjs +1 -1
  99. package/dist/components/tags/index.js +3 -3
  100. package/dist/components/time-picker/browser.js +1 -1
  101. package/dist/components/time-picker/index.cjs +1 -1
  102. package/dist/components/time-picker/index.js +1 -1
  103. package/dist/components/tree/browser.js +3 -3
  104. package/dist/components/tree/index.cjs +1 -1
  105. package/dist/components/tree/index.js +3 -3
  106. package/dist/confirm-action.css +1 -1
  107. package/dist/date-picker.css +1 -1
  108. package/dist/icon.css +1 -1
  109. package/dist/index.cjs +12 -2
  110. package/dist/index.css +12 -12
  111. package/dist/index.js +82 -43
  112. package/dist/link.css +1 -1
  113. package/dist/modal.css +1 -1
  114. package/dist/navigation.css +1 -1
  115. package/dist/select.css +1 -1
  116. package/dist/switch.css +1 -1
  117. package/package.json +1 -1
  118. package/dist/components/chunks/caret-down-D_LtPGNJ.js +0 -1
  119. package/dist/components/chunks/caret-right-BUb3nX4n.js +0 -1
  120. package/dist/components/chunks/close-CK62SDFq.js +0 -1
  121. package/dist/components/chunks/icon-BbZ9RIyB.js +0 -1
  122. package/dist/components/chunks/icon-EKS-0LRg.js +0 -1
  123. package/dist/components/chunks/search-GQiuYHrw.js +0 -1
@@ -4,26 +4,29 @@ var t = /* @__PURE__ */ new Map();
4
4
  function n(e) {
5
5
  t.set(e.name, e);
6
6
  }
7
- function ee(e) {
7
+ function r(e) {
8
8
  return t.get(e);
9
9
  }
10
- function te(e) {
10
+ function i(e) {
11
11
  return t.has(e);
12
12
  }
13
- function r() {
13
+ function a() {
14
14
  return Array.from(t.values());
15
15
  }
16
16
  //#endregion
17
17
  //#region src/components/icon/Icon.js
18
- var i = class extends HTMLElement {
18
+ var o = class extends HTMLElement {
19
19
  static get observedAttributes() {
20
- return ["name"];
20
+ return ["name", "color"];
21
21
  }
22
+ _darkModeObserver = null;
23
+ _defaultWidthClass = null;
24
+ _defaultHeightClass = null;
22
25
  constructor() {
23
- super(), this._darkModeObserver = null, this._defaultWidthClass = null, this._defaultHeightClass = null;
26
+ super();
24
27
  }
25
28
  connectedCallback() {
26
- this.render(), this._observeDarkMode();
29
+ this.classList.add("box-border", "m-0", "p-0", "border-0", "inline-flex", "items-center", "leading-none"), this.render(), this._observeDarkMode();
27
30
  }
28
31
  attributeChangedCallback(e, t, n) {
29
32
  t !== n && this.render();
@@ -32,115 +35,151 @@ var i = class extends HTMLElement {
32
35
  this._darkModeObserver &&= (this._darkModeObserver.disconnect(), null);
33
36
  }
34
37
  _observeDarkMode() {
35
- if (!this._darkModeObserver) {
36
- if (this._darkModeObserver = new MutationObserver((e) => {
37
- for (let t of e) if (t.type === "attributes" && ["class", "data-mint-theme"].includes(t.attributeName)) {
38
- this.render();
39
- break;
40
- }
41
- }), !document.documentElement) return;
42
- this._darkModeObserver.observe(document.documentElement, {
43
- attributes: !0,
44
- attributeFilter: ["class", "data-mint-theme"]
45
- });
46
- }
38
+ this._darkModeObserver || (this._darkModeObserver = new MutationObserver((e) => {
39
+ for (let t of e) if (t.type === "attributes" && t.attributeName === "class") {
40
+ this.render();
41
+ break;
42
+ }
43
+ }), this._darkModeObserver.observe(document.documentElement, {
44
+ attributes: !0,
45
+ attributeFilter: ["class"]
46
+ }));
47
47
  }
48
48
  getName() {
49
49
  return this.getAttribute("name") || "";
50
50
  }
51
- getIconDataUrl(e) {
52
- let t = e.customSvg || `<svg xmlns="http://www.w3.org/2000/svg" viewBox="${e.viewBox}" fill="none" stroke="currentColor" stroke-width="2"${e.strokeLinecap ? ` stroke-linecap="${e.strokeLinecap}"` : ""}${e.strokeLinejoin ? ` stroke-linejoin="${e.strokeLinejoin}"` : ""}><path d="${e.path}" /></svg>`;
53
- return `url("data:image/svg+xml,${encodeURIComponent(t)}")`;
51
+ _normalizeColorValue(e) {
52
+ if (!e) return "";
53
+ let t = e.trim();
54
+ if (!t) return "";
55
+ if (/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(t) || /^rgba?\(\s*[\d.\s]+,\s*[\d.\s]+,\s*[\d.\s]+(?:,\s*[\d.\s]+)?\s*\)$/.test(t)) return t;
56
+ if (/^\(\s*[\d.\s]+,\s*[\d.\s]+,\s*[\d.\s]+(?:,\s*[\d.\s]+)?\s*\)$/.test(t)) {
57
+ let e = t.slice(1, -1).trim().split(",").map((e) => e.trim());
58
+ if (e.length === 3) return `rgb(${e.join(", ")})`;
59
+ if (e.length === 4) return `rgba(${e.join(", ")})`;
60
+ }
61
+ return "";
62
+ }
63
+ generateSVGMarkup(e) {
64
+ if (e.customSvg) return e.customSvg;
65
+ let t;
66
+ return t = e.fill && e.strokeWidth ? `<svg xmlns="http://www.w3.org/2000/svg" viewBox="${e.viewBox}" fill="none" stroke="currentColor" stroke-width="${e.strokeWidth}" stroke-linecap="${e.strokeLinecap || "round"}" stroke-linejoin="${e.strokeLinejoin || "round"}">
67
+ <path d="${e.path}" />
68
+ </svg>` : e.fill ? e.viewBox === "0 0 512 512" ? `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
69
+ <g transform="scale(0.046875)">
70
+ <path d="${e.path}" />
71
+ </g>
72
+ </svg>` : `<svg xmlns="http://www.w3.org/2000/svg" viewBox="${e.viewBox}" fill="currentColor">
73
+ <path d="${e.path}" />
74
+ </svg>` : `<svg xmlns="http://www.w3.org/2000/svg" viewBox="${e.viewBox}" fill="none" stroke="currentColor" stroke-width="${e.strokeWidth || "2"}" stroke-linecap="${e.strokeLinecap || "round"}" stroke-linejoin="${e.strokeLinejoin || "round"}">
75
+ <path d="${e.path}" />
76
+ </svg>`, t;
54
77
  }
55
78
  render() {
56
79
  let e = this.getName();
57
- if (!e) {
58
- this.innerHTML = "", this.style.maskImage = "", this.style.webkitMaskImage = "";
80
+ if (this.getAttribute("aria-label")?.trim() || this.hasAttribute("aria-labelledby") ? (this.setAttribute("role", "img"), this.removeAttribute("aria-hidden")) : (this.removeAttribute("role"), this.setAttribute("aria-hidden", "true")), !e) {
81
+ this.innerHTML = "", this.style.maskImage = "", this.style.webkitMaskImage = "", this.style.backgroundColor = "", this.style.color = "";
59
82
  return;
60
83
  }
61
- let t = ee(e);
84
+ let t = r(e);
62
85
  if (!t) {
63
- console.warn(`Icon "${e}" not found. Make sure you've imported the icon: import 'monobill-mintui/icon/icons/${e}'`), this.innerHTML = "", this.style.maskImage = "", this.style.webkitMaskImage = "";
86
+ console.warn(`Icon "${e}" not found. Make sure you've imported the icon: import 'monobill-mintui/icon/icons/${e}'`), this.innerHTML = "", this.style.maskImage = "", this.style.webkitMaskImage = "", this.style.backgroundColor = "", this.style.color = "";
64
87
  return;
65
88
  }
66
- let n = this.closest("mint-button") || this.parentElement?.closest("mint-button"), te = this.closest("mint-switch") || this.parentElement?.closest("mint-switch"), r, i;
67
- te ? (r = "w-3", i = "h-3") : n ? (r = "w-5", i = "h-5") : (r = "w-[1.3em]", i = "h-[1.3em]");
68
- let a = (e, t) => Array.from(this.classList).some((n) => n === t ? !1 : n.split(":").pop().replace(/^!/, "").startsWith(`${e}-`)), o = a("w", this._defaultWidthClass), s = a("h", this._defaultHeightClass);
69
- this._defaultWidthClass && this.classList.remove(this._defaultWidthClass), this._defaultHeightClass && this.classList.remove(this._defaultHeightClass), this._defaultWidthClass = null, this._defaultHeightClass = null, o || (this._defaultWidthClass = r, this.classList.add(r)), s || (this._defaultHeightClass = i, this.classList.add(i)), this.style.display = "inline-block";
70
- let c = this.getIconDataUrl(t);
71
- this.style.maskImage = c, this.style.webkitMaskImage = c, this.style.maskSize = "contain", this.style.webkitMaskSize = "contain", this.style.maskRepeat = "no-repeat", this.style.webkitMaskRepeat = "no-repeat", this.style.maskPosition = "center", this.style.webkitMaskPosition = "center", this.style.aspectRatio = "1 / 1", this.style.backgroundColor = "currentColor", this.innerHTML = "";
89
+ let n = this.closest("mint-button") || this.parentElement?.closest("mint-button"), i = this.closest("mint-switch") || this.parentElement?.closest("mint-switch"), a = this.closest("mint-select") || this.parentElement?.closest("mint-select"), o = !!this.closest("mint-sidenav-link") && !n && !i && !a, s = (e, t) => Array.from(this.classList).some((n) => {
90
+ if (n === t) return !1;
91
+ let r = n.split(":");
92
+ return (r[r.length - 1]?.replace(/^!/, "") || "").startsWith(`${e}-`);
93
+ }), c = s("w", this._defaultWidthClass), l = s("h", this._defaultHeightClass);
94
+ if (this._defaultWidthClass && this.classList.remove(this._defaultWidthClass), this._defaultHeightClass && this.classList.remove(this._defaultHeightClass), this._defaultWidthClass = null, this._defaultHeightClass = null, !a && (!c || !l)) {
95
+ let e, t;
96
+ i ? (e = "w-3", t = "h-3") : n || o ? (e = "w-[1em]", t = "h-[1em]") : (e = "w-[1.3em]", t = "h-[1.3em]"), c || (this._defaultWidthClass = e, this.classList.add(e)), l || (this._defaultHeightClass = t, this.classList.add(t));
97
+ }
98
+ this.innerHTML = this.generateSVGMarkup(t), this.style.maskImage = "", this.style.webkitMaskImage = "", this.style.maskSize = "", this.style.webkitMaskSize = "", this.style.maskRepeat = "", this.style.webkitMaskRepeat = "", this.style.maskPosition = "", this.style.webkitMaskPosition = "", this.style.backgroundColor = "", this.style.aspectRatio = "1 / 1";
99
+ let u = this.querySelector("svg");
100
+ u && (u.style.width = "100%", u.style.height = "100%", u.setAttribute("aria-hidden", "true"), u.setAttribute("focusable", "false"));
101
+ let d = this._normalizeColorValue(this.getAttribute("color"));
102
+ if (d) {
103
+ this.style.color = d, this.classList.remove("text-gray-100", "text-gray-900");
104
+ return;
105
+ }
106
+ if (this.style.color = "", i) this.classList.remove("text-gray-100", "text-gray-900"), this.classList.add("text-gray-900");
107
+ else if (!n && !o) {
108
+ let e = document.documentElement.classList.contains("dark") ? "text-gray-100" : "text-gray-900";
109
+ this.classList.remove("text-gray-100", "text-gray-900"), this.classList.add(e);
110
+ } else this.classList.remove("text-gray-100", "text-gray-900");
72
111
  }
73
112
  };
74
- typeof customElements < "u" && !customElements.get("mint-icon") && e("mint-icon", i);
113
+ customElements.get("mint-icon") || e("mint-icon", o);
75
114
  //#endregion
76
115
  //#region src/components/icon/icons/ai.js
77
- var a = {
116
+ var s = {
78
117
  name: "ai",
79
118
  viewBox: "0 0 24 24",
80
119
  path: "M13 3.5H7.5a4 4 0 00-4 4v9a4 4 0 004 4h9a4 4 0 004-4V12M7.6 15.5l2-6.2h1.2l2 6.2m-3.2-2h2.2m3.5-4.2v6.2",
81
120
  customSvg: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\">\n <path d=\"M13 3.5H7.5a4 4 0 0 0-4 4v9a4 4 0 0 0 4 4h9a4 4 0 0 0 4-4V12\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"m7.6 15.5 2-6.2h1.2l2 6.2m-3.2-2h2.2m3.5-4.2v6.2\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M17 1.5c.5 2.3 1.2 3 3.5 3.5-2.3.5-3 1.2-3.5 3.5-.5-2.3-1.2-3-3.5-3.5 2.3-.5 3-1.2 3.5-3.5Z\" fill=\"currentColor\"/>\n <path d=\"M21 4.2c.25 1.2.6 1.55 1.8 1.8-1.2.25-1.55.6-1.8 1.8-.25-1.2-.6-1.55-1.8-1.8 1.2-.25 1.55-.6 1.8-1.8Z\" fill=\"currentColor\"/>\n <path d=\"M18.7 6.8c.3 1.5.8 2 2.3 2.3-1.5.3-2 .8-2.3 2.3-.3-1.5-.8-2-2.3-2.3 1.5-.3 2-.8 2.3-2.3Z\" fill=\"currentColor\"/>\n </svg>"
82
121
  };
83
- n(a);
122
+ n(s);
84
123
  //#endregion
85
124
  //#region src/components/icon/icons/archive.js
86
- var o = {
125
+ var c = {
87
126
  name: "archive",
88
127
  viewBox: "0 0 24 24",
89
128
  path: "M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4",
90
129
  strokeLinecap: "round",
91
130
  strokeLinejoin: "round"
92
131
  };
93
- n(o);
132
+ n(c);
94
133
  //#endregion
95
134
  //#region src/components/icon/icons/arrow-down.js
96
- var s = {
135
+ var l = {
97
136
  name: "arrow-down",
98
137
  viewBox: "0 0 24 24",
99
138
  path: "M19 14l-7 7m0 0l-7-7m7 7V3",
100
139
  strokeLinecap: "round",
101
140
  strokeLinejoin: "round"
102
141
  };
103
- n(s);
142
+ n(l);
104
143
  //#endregion
105
144
  //#region src/components/icon/icons/arrow-left.js
106
- var c = {
145
+ var u = {
107
146
  name: "arrow-left",
108
147
  viewBox: "0 0 24 24",
109
148
  path: "M19 12H5m7-7l-7 7 7 7",
110
149
  strokeLinecap: "round",
111
150
  strokeLinejoin: "round"
112
151
  };
113
- n(c);
152
+ n(u);
114
153
  //#endregion
115
154
  //#region src/components/icon/icons/arrow-right.js
116
- var l = {
155
+ var d = {
117
156
  name: "arrow-right",
118
157
  viewBox: "0 0 24 24",
119
158
  path: "M14 5l7 7m0 0l-7 7m7-7H3",
120
159
  strokeLinecap: "round",
121
160
  strokeLinejoin: "round"
122
161
  };
123
- n(l);
162
+ n(d);
124
163
  //#endregion
125
164
  //#region src/components/icon/icons/arrow-up.js
126
- var u = {
165
+ var ee = {
127
166
  name: "arrow-up",
128
167
  viewBox: "0 0 24 24",
129
168
  path: "M5 10l7-7m0 0l7 7m-7-7v18",
130
169
  strokeLinecap: "round",
131
170
  strokeLinejoin: "round"
132
171
  };
133
- n(u);
172
+ n(ee);
134
173
  //#endregion
135
174
  //#region src/components/icon/icons/attach.js
136
- var d = {
175
+ var te = {
137
176
  name: "attach",
138
177
  viewBox: "0 0 24 24",
139
178
  path: "M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13",
140
179
  strokeLinecap: "round",
141
180
  strokeLinejoin: "round"
142
181
  };
143
- n(d);
182
+ n(te);
144
183
  //#endregion
145
184
  //#region src/components/icon/icons/bank.js
146
185
  var f = {
@@ -1570,6 +1609,6 @@ n(kt), n({
1570
1609
  path: "M14 4h6v6m0-6-9 9M18 13v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h5",
1571
1610
  strokeLinecap: "round",
1572
1611
  strokeLinejoin: "round"
1573
- }), n(a), n(o), n(s), n(c), n(l), n(u), n(d), n(f), n(p), n(m), n(h), n(g), n(_), n(v), n(y), n(b), n(x), n(S), n(C), n(w), n(T), n(E), n(D), n(O), n(k), n(A), n(j), n(M), n(N), n(P), n(F), n(I), n(L), n(R), n(z), n(B), n(V), n(H), n(U), n(W), n(G), n(K), n(q), n(J), n(Y), n(X), n(Z), n(Q), n(ne), n(re), n(ie), n(ae), n(oe), n(se), n(ce), n(le), n(ue), n(de), n(fe), n(pe), n(me), n(he), n(ge), n(_e), n(ve), n(ye), n(be), n(xe), n(Se), n(Ce), n(we), n(Te), n(Ee), n(De), n(Oe), n(ke), n(Ae), n(je), n(Me), n(Ne), n(Pe), n(Fe), n(Ie), n(Le), n(Re), n(ze), n(Be), n(Ve), n(He), n(Ue), n(We), n(Ge), n(Ke), n(qe), n(Je), n(Ye), n(Xe), n(Ze), n(Qe), n($e), n(et), n(tt), n(nt), n(rt), n(it), n(at), n(ot), n(st), n(ct), n(lt), n(ut), n(dt), n(ft), n(pt), n(mt), n(ht), n(gt), n(_t), n(vt), n(yt), n($), n(bt), n(xt), n(St), n(Ct), n(wt), n(Tt), n(Et), n(Dt), n(Ot), n(kt);
1612
+ }), n(s), n(c), n(l), n(u), n(d), n(ee), n(te), n(f), n(p), n(m), n(h), n(g), n(_), n(v), n(y), n(b), n(x), n(S), n(C), n(w), n(T), n(E), n(D), n(O), n(k), n(A), n(j), n(M), n(N), n(P), n(F), n(I), n(L), n(R), n(z), n(B), n(V), n(H), n(U), n(W), n(G), n(K), n(q), n(J), n(Y), n(X), n(Z), n(Q), n(ne), n(re), n(ie), n(ae), n(oe), n(se), n(ce), n(le), n(ue), n(de), n(fe), n(pe), n(me), n(he), n(ge), n(_e), n(ve), n(ye), n(be), n(xe), n(Se), n(Ce), n(we), n(Te), n(Ee), n(De), n(Oe), n(ke), n(Ae), n(je), n(Me), n(Ne), n(Pe), n(Fe), n(Ie), n(Le), n(Re), n(ze), n(Be), n(Ve), n(He), n(Ue), n(We), n(Ge), n(Ke), n(qe), n(Je), n(Ye), n(Xe), n(Ze), n(Qe), n($e), n(et), n(tt), n(nt), n(rt), n(it), n(at), n(ot), n(st), n(ct), n(lt), n(ut), n(dt), n(ft), n(pt), n(mt), n(ht), n(gt), n(_t), n(vt), n(yt), n($), n(bt), n(xt), n(St), n(Ct), n(wt), n(Tt), n(Et), n(Dt), n(Ot), n(kt);
1574
1613
  //#endregion
1575
- export { n as a, te as i, r as n, ee as r, i as t };
1614
+ export { n as a, i, a as n, r, o as t };
@@ -1,10 +1,20 @@
1
- const e=require(`./register-element-tCL_F1YI.js`);var t=new Map;function n(e){t.set(e.name,e)}function ee(e){return t.get(e)}function te(e){return t.has(e)}function r(){return Array.from(t.values())}var i=class extends HTMLElement{static get observedAttributes(){return[`name`]}constructor(){super(),this._darkModeObserver=null,this._defaultWidthClass=null,this._defaultHeightClass=null}connectedCallback(){this.render(),this._observeDarkMode()}attributeChangedCallback(e,t,n){t!==n&&this.render()}disconnectedCallback(){this._darkModeObserver&&=(this._darkModeObserver.disconnect(),null)}_observeDarkMode(){if(!this._darkModeObserver){if(this._darkModeObserver=new MutationObserver(e=>{for(let t of e)if(t.type===`attributes`&&[`class`,`data-mint-theme`].includes(t.attributeName)){this.render();break}}),!document.documentElement)return;this._darkModeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`,`data-mint-theme`]})}}getName(){return this.getAttribute(`name`)||``}getIconDataUrl(e){let t=e.customSvg||`<svg xmlns="http://www.w3.org/2000/svg" viewBox="${e.viewBox}" fill="none" stroke="currentColor" stroke-width="2"${e.strokeLinecap?` stroke-linecap="${e.strokeLinecap}"`:``}${e.strokeLinejoin?` stroke-linejoin="${e.strokeLinejoin}"`:``}><path d="${e.path}" /></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(t)}")`}render(){let e=this.getName();if(!e){this.innerHTML=``,this.style.maskImage=``,this.style.webkitMaskImage=``;return}let t=ee(e);if(!t){console.warn(`Icon "${e}" not found. Make sure you've imported the icon: import 'monobill-mintui/icon/icons/${e}'`),this.innerHTML=``,this.style.maskImage=``,this.style.webkitMaskImage=``;return}let n=this.closest(`mint-button`)||this.parentElement?.closest(`mint-button`),te=this.closest(`mint-switch`)||this.parentElement?.closest(`mint-switch`),r,i;te?(r=`w-3`,i=`h-3`):n?(r=`w-5`,i=`h-5`):(r=`w-[1.3em]`,i=`h-[1.3em]`);let a=(e,t)=>Array.from(this.classList).some(n=>n===t?!1:n.split(`:`).pop().replace(/^!/,``).startsWith(`${e}-`)),o=a(`w`,this._defaultWidthClass),s=a(`h`,this._defaultHeightClass);this._defaultWidthClass&&this.classList.remove(this._defaultWidthClass),this._defaultHeightClass&&this.classList.remove(this._defaultHeightClass),this._defaultWidthClass=null,this._defaultHeightClass=null,o||(this._defaultWidthClass=r,this.classList.add(r)),s||(this._defaultHeightClass=i,this.classList.add(i)),this.style.display=`inline-block`;let c=this.getIconDataUrl(t);this.style.maskImage=c,this.style.webkitMaskImage=c,this.style.maskSize=`contain`,this.style.webkitMaskSize=`contain`,this.style.maskRepeat=`no-repeat`,this.style.webkitMaskRepeat=`no-repeat`,this.style.maskPosition=`center`,this.style.webkitMaskPosition=`center`,this.style.aspectRatio=`1 / 1`,this.style.backgroundColor=`currentColor`,this.innerHTML=``}};typeof customElements<`u`&&!customElements.get(`mint-icon`)&&e.t(`mint-icon`,i);var a={name:`ai`,viewBox:`0 0 24 24`,path:`M13 3.5H7.5a4 4 0 00-4 4v9a4 4 0 004 4h9a4 4 0 004-4V12M7.6 15.5l2-6.2h1.2l2 6.2m-3.2-2h2.2m3.5-4.2v6.2`,customSvg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
1
+ const e=require(`./register-element-tCL_F1YI.js`);var t=new Map;function n(e){t.set(e.name,e)}function r(e){return t.get(e)}function i(e){return t.has(e)}function a(){return Array.from(t.values())}var o=class extends HTMLElement{static get observedAttributes(){return[`name`,`color`]}_darkModeObserver=null;_defaultWidthClass=null;_defaultHeightClass=null;constructor(){super()}connectedCallback(){this.classList.add(`box-border`,`m-0`,`p-0`,`border-0`,`inline-flex`,`items-center`,`leading-none`),this.render(),this._observeDarkMode()}attributeChangedCallback(e,t,n){t!==n&&this.render()}disconnectedCallback(){this._darkModeObserver&&=(this._darkModeObserver.disconnect(),null)}_observeDarkMode(){this._darkModeObserver||(this._darkModeObserver=new MutationObserver(e=>{for(let t of e)if(t.type===`attributes`&&t.attributeName===`class`){this.render();break}}),this._darkModeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`]}))}getName(){return this.getAttribute(`name`)||``}_normalizeColorValue(e){if(!e)return``;let t=e.trim();if(!t)return``;if(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(t)||/^rgba?\(\s*[\d.\s]+,\s*[\d.\s]+,\s*[\d.\s]+(?:,\s*[\d.\s]+)?\s*\)$/.test(t))return t;if(/^\(\s*[\d.\s]+,\s*[\d.\s]+,\s*[\d.\s]+(?:,\s*[\d.\s]+)?\s*\)$/.test(t)){let e=t.slice(1,-1).trim().split(`,`).map(e=>e.trim());if(e.length===3)return`rgb(${e.join(`, `)})`;if(e.length===4)return`rgba(${e.join(`, `)})`}return``}generateSVGMarkup(e){if(e.customSvg)return e.customSvg;let t;return t=e.fill&&e.strokeWidth?`<svg xmlns="http://www.w3.org/2000/svg" viewBox="${e.viewBox}" fill="none" stroke="currentColor" stroke-width="${e.strokeWidth}" stroke-linecap="${e.strokeLinecap||`round`}" stroke-linejoin="${e.strokeLinejoin||`round`}">
2
+ <path d="${e.path}" />
3
+ </svg>`:e.fill?e.viewBox===`0 0 512 512`?`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
4
+ <g transform="scale(0.046875)">
5
+ <path d="${e.path}" />
6
+ </g>
7
+ </svg>`:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="${e.viewBox}" fill="currentColor">
8
+ <path d="${e.path}" />
9
+ </svg>`:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="${e.viewBox}" fill="none" stroke="currentColor" stroke-width="${e.strokeWidth||`2`}" stroke-linecap="${e.strokeLinecap||`round`}" stroke-linejoin="${e.strokeLinejoin||`round`}">
10
+ <path d="${e.path}" />
11
+ </svg>`,t}render(){let e=this.getName();if(this.getAttribute(`aria-label`)?.trim()||this.hasAttribute(`aria-labelledby`)?(this.setAttribute(`role`,`img`),this.removeAttribute(`aria-hidden`)):(this.removeAttribute(`role`),this.setAttribute(`aria-hidden`,`true`)),!e){this.innerHTML=``,this.style.maskImage=``,this.style.webkitMaskImage=``,this.style.backgroundColor=``,this.style.color=``;return}let t=r(e);if(!t){console.warn(`Icon "${e}" not found. Make sure you've imported the icon: import 'monobill-mintui/icon/icons/${e}'`),this.innerHTML=``,this.style.maskImage=``,this.style.webkitMaskImage=``,this.style.backgroundColor=``,this.style.color=``;return}let n=this.closest(`mint-button`)||this.parentElement?.closest(`mint-button`),i=this.closest(`mint-switch`)||this.parentElement?.closest(`mint-switch`),a=this.closest(`mint-select`)||this.parentElement?.closest(`mint-select`),o=!!this.closest(`mint-sidenav-link`)&&!n&&!i&&!a,s=(e,t)=>Array.from(this.classList).some(n=>{if(n===t)return!1;let r=n.split(`:`);return(r[r.length-1]?.replace(/^!/,``)||``).startsWith(`${e}-`)}),c=s(`w`,this._defaultWidthClass),l=s(`h`,this._defaultHeightClass);if(this._defaultWidthClass&&this.classList.remove(this._defaultWidthClass),this._defaultHeightClass&&this.classList.remove(this._defaultHeightClass),this._defaultWidthClass=null,this._defaultHeightClass=null,!a&&(!c||!l)){let e,t;i?(e=`w-3`,t=`h-3`):n||o?(e=`w-[1em]`,t=`h-[1em]`):(e=`w-[1.3em]`,t=`h-[1.3em]`),c||(this._defaultWidthClass=e,this.classList.add(e)),l||(this._defaultHeightClass=t,this.classList.add(t))}this.innerHTML=this.generateSVGMarkup(t),this.style.maskImage=``,this.style.webkitMaskImage=``,this.style.maskSize=``,this.style.webkitMaskSize=``,this.style.maskRepeat=``,this.style.webkitMaskRepeat=``,this.style.maskPosition=``,this.style.webkitMaskPosition=``,this.style.backgroundColor=``,this.style.aspectRatio=`1 / 1`;let u=this.querySelector(`svg`);u&&(u.style.width=`100%`,u.style.height=`100%`,u.setAttribute(`aria-hidden`,`true`),u.setAttribute(`focusable`,`false`));let d=this._normalizeColorValue(this.getAttribute(`color`));if(d){this.style.color=d,this.classList.remove(`text-gray-100`,`text-gray-900`);return}if(this.style.color=``,i)this.classList.remove(`text-gray-100`,`text-gray-900`),this.classList.add(`text-gray-900`);else if(!n&&!o){let e=document.documentElement.classList.contains(`dark`)?`text-gray-100`:`text-gray-900`;this.classList.remove(`text-gray-100`,`text-gray-900`),this.classList.add(e)}else this.classList.remove(`text-gray-100`,`text-gray-900`)}};customElements.get(`mint-icon`)||e.t(`mint-icon`,o);var s={name:`ai`,viewBox:`0 0 24 24`,path:`M13 3.5H7.5a4 4 0 00-4 4v9a4 4 0 004 4h9a4 4 0 004-4V12M7.6 15.5l2-6.2h1.2l2 6.2m-3.2-2h2.2m3.5-4.2v6.2`,customSvg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
2
12
  <path d="M13 3.5H7.5a4 4 0 0 0-4 4v9a4 4 0 0 0 4 4h9a4 4 0 0 0 4-4V12" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
3
13
  <path d="m7.6 15.5 2-6.2h1.2l2 6.2m-3.2-2h2.2m3.5-4.2v6.2" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/>
4
14
  <path d="M17 1.5c.5 2.3 1.2 3 3.5 3.5-2.3.5-3 1.2-3.5 3.5-.5-2.3-1.2-3-3.5-3.5 2.3-.5 3-1.2 3.5-3.5Z" fill="currentColor"/>
5
15
  <path d="M21 4.2c.25 1.2.6 1.55 1.8 1.8-1.2.25-1.55.6-1.8 1.8-.25-1.2-.6-1.55-1.8-1.8 1.2-.25 1.55-.6 1.8-1.8Z" fill="currentColor"/>
6
16
  <path d="M18.7 6.8c.3 1.5.8 2 2.3 2.3-1.5.3-2 .8-2.3 2.3-.3-1.5-.8-2-2.3-2.3 1.5-.3 2-.8 2.3-2.3Z" fill="currentColor"/>
7
- </svg>`};n(a);var o={name:`archive`,viewBox:`0 0 24 24`,path:`M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4`,strokeLinecap:`round`,strokeLinejoin:`round`};n(o);var s={name:`arrow-down`,viewBox:`0 0 24 24`,path:`M19 14l-7 7m0 0l-7-7m7 7V3`,strokeLinecap:`round`,strokeLinejoin:`round`};n(s);var c={name:`arrow-left`,viewBox:`0 0 24 24`,path:`M19 12H5m7-7l-7 7 7 7`,strokeLinecap:`round`,strokeLinejoin:`round`};n(c);var l={name:`arrow-right`,viewBox:`0 0 24 24`,path:`M14 5l7 7m0 0l-7 7m7-7H3`,strokeLinecap:`round`,strokeLinejoin:`round`};n(l);var u={name:`arrow-up`,viewBox:`0 0 24 24`,path:`M5 10l7-7m0 0l7 7m-7-7v18`,strokeLinecap:`round`,strokeLinejoin:`round`};n(u);var d={name:`attach`,viewBox:`0 0 24 24`,path:`M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13`,strokeLinecap:`round`,strokeLinejoin:`round`};n(d);var f={name:`bank`,viewBox:`0 0 24 24`,path:`M4.75 8.65 L12 3.2 L19.25 8.65 Z M4.75 8.65 H19.25 V10.15 H4.75 Z M5.2 10.15 H6.95 V17.65 H5.2 Z M11.125 10.15 H12.875 V17.65 H11.125 Z M17.05 10.15 H18.8 V17.65 H17.05 Z M3.5 17.65 H20.5 V21 H3.5 Z`,fill:`currentColor`};n(f);var p={name:`barcode`,viewBox:`0 0 24 24`,path:`M3 4h1.5v16H3V4zM7 4h1v16H7V4zM11 4h1.5v16H11V4zM15.5 4h1v16h-1V4zM19.5 4h1.5v16h-1.5V4z`,strokeLinecap:`round`,strokeLinejoin:`round`};n(p);var m={name:`basket`,viewBox:`0 0 24 24`,path:`M4 9h16l-1.4 10.5a2 2 0 01-2 1.7H7.4a2 2 0 01-2-1.7L4 9zm4.5 0L12 4.5 15.5 9M10 13v3m4-3v3`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2.7`};n(m);var h={name:`bookmark`,viewBox:`0 0 24 24`,path:`M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z`,strokeLinecap:`round`,strokeLinejoin:`round`};n(h);var g={name:`building`,viewBox:`0 0 24 24`,path:`M7 21V6l5-3 5 3v15M3 21h18M10 8h1M13 8h1M10 11h1M13 11h1M10 14h1M13 14h1M11 21v-3h2v3`,strokeLinecap:`square`,strokeLinejoin:`miter`,strokeWidth:`2.2`};n(g);var _={name:`buildings`,viewBox:`0 0 24 24`,path:`M2 21h20M4 21v-9l3-2v11M9 21V6l3-2 3 2v15M17 21V10l3 2v9M5 13h1M5 16h1M10 8h1M13 8h1M10 11h1M13 11h1M10 14h1M13 14h1M18 13h1M18 16h1M11 21v-3h2v3`,strokeLinecap:`square`,strokeLinejoin:`miter`,strokeWidth:`1.5`};n(_);var v={name:`bullhorn`,viewBox:`0 0 24 24`,path:`M3 11v2l9 3V8l-9 3zm9-3l7-3v14l-7-3M6 14.5V18a2 2 0 002 2h1`,strokeLinecap:`round`,strokeLinejoin:`round`};n(v);var y={name:`calendar`,viewBox:`0 0 24 24`,path:`M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z`,strokeLinecap:`round`,strokeLinejoin:`round`};n(y);var b={name:`calendar-day`,viewBox:`0 0 24 24`,path:`M8 7V3m8 4V3M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z`,customSvg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
17
+ </svg>`};n(s);var c={name:`archive`,viewBox:`0 0 24 24`,path:`M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4`,strokeLinecap:`round`,strokeLinejoin:`round`};n(c);var l={name:`arrow-down`,viewBox:`0 0 24 24`,path:`M19 14l-7 7m0 0l-7-7m7 7V3`,strokeLinecap:`round`,strokeLinejoin:`round`};n(l);var u={name:`arrow-left`,viewBox:`0 0 24 24`,path:`M19 12H5m7-7l-7 7 7 7`,strokeLinecap:`round`,strokeLinejoin:`round`};n(u);var d={name:`arrow-right`,viewBox:`0 0 24 24`,path:`M14 5l7 7m0 0l-7 7m7-7H3`,strokeLinecap:`round`,strokeLinejoin:`round`};n(d);var ee={name:`arrow-up`,viewBox:`0 0 24 24`,path:`M5 10l7-7m0 0l7 7m-7-7v18`,strokeLinecap:`round`,strokeLinejoin:`round`};n(ee);var te={name:`attach`,viewBox:`0 0 24 24`,path:`M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13`,strokeLinecap:`round`,strokeLinejoin:`round`};n(te);var f={name:`bank`,viewBox:`0 0 24 24`,path:`M4.75 8.65 L12 3.2 L19.25 8.65 Z M4.75 8.65 H19.25 V10.15 H4.75 Z M5.2 10.15 H6.95 V17.65 H5.2 Z M11.125 10.15 H12.875 V17.65 H11.125 Z M17.05 10.15 H18.8 V17.65 H17.05 Z M3.5 17.65 H20.5 V21 H3.5 Z`,fill:`currentColor`};n(f);var p={name:`barcode`,viewBox:`0 0 24 24`,path:`M3 4h1.5v16H3V4zM7 4h1v16H7V4zM11 4h1.5v16H11V4zM15.5 4h1v16h-1V4zM19.5 4h1.5v16h-1.5V4z`,strokeLinecap:`round`,strokeLinejoin:`round`};n(p);var m={name:`basket`,viewBox:`0 0 24 24`,path:`M4 9h16l-1.4 10.5a2 2 0 01-2 1.7H7.4a2 2 0 01-2-1.7L4 9zm4.5 0L12 4.5 15.5 9M10 13v3m4-3v3`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2.7`};n(m);var h={name:`bookmark`,viewBox:`0 0 24 24`,path:`M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z`,strokeLinecap:`round`,strokeLinejoin:`round`};n(h);var g={name:`building`,viewBox:`0 0 24 24`,path:`M7 21V6l5-3 5 3v15M3 21h18M10 8h1M13 8h1M10 11h1M13 11h1M10 14h1M13 14h1M11 21v-3h2v3`,strokeLinecap:`square`,strokeLinejoin:`miter`,strokeWidth:`2.2`};n(g);var _={name:`buildings`,viewBox:`0 0 24 24`,path:`M2 21h20M4 21v-9l3-2v11M9 21V6l3-2 3 2v15M17 21V10l3 2v9M5 13h1M5 16h1M10 8h1M13 8h1M10 11h1M13 11h1M10 14h1M13 14h1M18 13h1M18 16h1M11 21v-3h2v3`,strokeLinecap:`square`,strokeLinejoin:`miter`,strokeWidth:`1.5`};n(_);var v={name:`bullhorn`,viewBox:`0 0 24 24`,path:`M3 11v2l9 3V8l-9 3zm9-3l7-3v14l-7-3M6 14.5V18a2 2 0 002 2h1`,strokeLinecap:`round`,strokeLinejoin:`round`};n(v);var y={name:`calendar`,viewBox:`0 0 24 24`,path:`M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z`,strokeLinecap:`round`,strokeLinejoin:`round`};n(y);var b={name:`calendar-day`,viewBox:`0 0 24 24`,path:`M8 7V3m8 4V3M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z`,customSvg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
8
18
  <path d="M8 7V3m8 4V3M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" />
9
19
  <rect x="7" y="11" width="10" height="5" fill="currentColor"/>
10
20
  </svg>`,strokeLinecap:`round`,strokeLinejoin:`round`};n(b);var x={name:`calendar-empty`,viewBox:`0 0 24 24`,path:`M8 7V3m8 4V3M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z`,strokeLinecap:`round`,strokeLinejoin:`round`};n(x);var S={name:`calendar-week`,viewBox:`0 0 24 24`,path:`M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z`,strokeLinecap:`round`,strokeLinejoin:`round`};n(S);var C={name:`caret-down`,viewBox:`0 0 24 24`,path:`M19 9l-7 7-7-7`,strokeLinecap:`round`,strokeLinejoin:`round`};n(C);var w={name:`caret-left`,viewBox:`0 0 24 24`,path:`M15 19l-7-7 7-7`,strokeLinecap:`round`,strokeLinejoin:`round`};n(w);var T={name:`caret-right`,viewBox:`0 0 24 24`,path:`M9 5l7 7-7 7`,strokeLinecap:`round`,strokeLinejoin:`round`};n(T);var E={name:`caret-up`,viewBox:`0 0 24 24`,path:`M5 15l7-7 7 7`,strokeLinecap:`round`,strokeLinejoin:`round`};n(E);var D={name:`chart-bar`,viewBox:`0 0 24 24`,path:`M3 20h18M6 17v-5m4 5V7m4 10v-8m4 8v-3`,strokeLinecap:`round`,strokeLinejoin:`round`};n(D);var O={name:`chart-line`,viewBox:`0 0 24 24`,path:`M3 20h18M4 18V4m2 11l4-4 3 3 5-6m0 0h-4m4 0v4`,strokeLinecap:`round`,strokeLinejoin:`round`};n(O);var k={name:`chat`,viewBox:`0 0 24 24`,path:`M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z`,strokeLinecap:`round`,strokeLinejoin:`round`};n(k);var A={name:`check`,viewBox:`0 0 24 24`,path:`M5 13l4 4L19 7`,strokeLinecap:`round`,strokeLinejoin:`round`};n(A);var j={name:`collapse`,viewBox:`0 0 24 24`,path:`M8 3v3a2 2 0 01-2 2H3m18 0h-3a2 2 0 01-2-2V3M3 16h3a2 2 0 012 2v3m13-5h-3a2 2 0 00-2 2v3`,strokeLinecap:`round`,strokeLinejoin:`round`};n(j);var M={name:`clock`,viewBox:`0 0 24 24`,path:`M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z`,strokeLinecap:`round`,strokeLinejoin:`round`};n(M);var N={name:`close`,viewBox:`0 0 24 24`,path:`M6 18L18 6M6 6l12 12`,strokeLinecap:`round`,strokeLinejoin:`round`};n(N);var P={name:`copy`,viewBox:`0 0 24 24`,path:`M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z`,strokeLinecap:`round`,strokeLinejoin:`round`};n(P);var F={name:`credit-card`,viewBox:`0 0 24 24`,path:`M3 7.5A2.5 2.5 0 0 1 5.5 5h13A2.5 2.5 0 0 1 21 7.5v9A2.5 2.5 0 0 1 18.5 19h-13A2.5 2.5 0 0 1 3 16.5v-9zM3 10h18M7 15h3`,strokeLinecap:`round`,strokeLinejoin:`round`};n(F);var I={name:`delete`,viewBox:`0 0 24 24`,path:`M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16`,strokeLinecap:`round`,strokeLinejoin:`round`};n(I);var L={name:`desktop`,viewBox:`0 0 24 24`,path:`M4 4h16a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1ZM12 17v3m-4 0h8`,strokeLinecap:`round`,strokeLinejoin:`round`};n(L);var R={name:`desktop-screen`,viewBox:`0 0 24 24`,path:`M3 5a2 2 0 012-2h14a2 2 0 012 2v9a2 2 0 01-2 2h-5m-4 0H5a2 2 0 01-2-2V5m7 11v4m-2 0h8`,strokeLinecap:`round`,strokeLinejoin:`round`};n(R);var z={name:`documentation`,viewBox:`0 0 24 24`,path:`M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253`,strokeLinecap:`round`,strokeLinejoin:`round`};n(z);var B={name:`dollar-sign`,viewBox:`0 0 24 24`,path:`M12 3v18M17 7c0-1.2-1.3-2-3-2h-4c-1.7 0-3 1-3 2.2 0 1.5 1.4 2.2 3 2.6l4 1c1.6.4 3 1.1 3 2.6 0 1.2-1.3 2.2-3 2.2h-4c-1.7 0-3-1-3-2`,strokeWidth:`2.75`,strokeLinecap:`butt`,strokeLinejoin:`miter`};n(B);var V={name:`download`,viewBox:`0 0 24 24`,path:`M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4`,strokeLinecap:`round`,strokeLinejoin:`round`};n(V);var H={name:`duplicate`,viewBox:`0 0 24 24`,path:`M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z`,strokeLinecap:`round`,strokeLinejoin:`round`};n(H);var U={name:`edit`,viewBox:`0 0 24 24`,path:`M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z`,strokeLinecap:`round`,strokeLinejoin:`round`};n(U);var W={name:`ellipsis`,viewBox:`0 0 24 24`,path:`M6.6 12h.01M13.6 12h.01M20.6 12h.01M6.6 12a1.6 1.6 0 11-3.2 0 1.6 1.6 0 013.2 0zm7 0a1.6 1.6 0 11-3.2 0 1.6 1.6 0 013.2 0zm7 0a1.6 1.6 0 11-3.2 0 1.6 1.6 0 013.2 0z`,strokeLinecap:`round`,strokeLinejoin:`round`};n(W);var G={name:`error`,viewBox:`0 0 24 24`,path:`M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z`,strokeLinecap:`round`,strokeLinejoin:`round`};n(G);var K={name:`external-link`,viewBox:`0 0 24 24`,path:`M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14`,strokeLinecap:`round`,strokeLinejoin:`round`};n(K);var q={name:`expand`,viewBox:`0 0 24 24`,path:`M8 3H5a2 2 0 00-2 2v3m13-5h3a2 2 0 012 2v3M3 16v3a2 2 0 002 2h3m13-5v3a2 2 0 01-2 2h-3`,strokeLinecap:`round`,strokeLinejoin:`round`};n(q);var J={name:`eye`,viewBox:`0 0 24 24`,path:`M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6-10-6-10-6zm10 3.5a3.5 3.5 0 100-7 3.5 3.5 0 000 7z`,strokeLinecap:`round`,strokeLinejoin:`round`};n(J);var Y={name:`file`,viewBox:`0 0 24 24`,path:`M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z`,strokeLinecap:`round`,strokeLinejoin:`round`};n(Y);var X={name:`filter`,viewBox:`0 0 24 24`,path:`M3 6h18M3 12h18M3 18h18M6 6a2 2 0 11-4 0 2 2 0 014 0zM12 12a2 2 0 11-4 0 2 2 0 014 0zM16 18a2 2 0 11-4 0 2 2 0 014 0z`,strokeLinecap:`round`,strokeLinejoin:`round`};n(X);var Z={name:`folder`,viewBox:`0 0 24 24`,path:`M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z`,strokeLinecap:`round`,strokeLinejoin:`round`};n(Z);var Q={name:`gavel`,viewBox:`0 0 24 24`,path:`M12 12`,customSvg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
@@ -38,4 +48,4 @@ const e=require(`./register-element-tCL_F1YI.js`);var t=new Map;function n(e){t.
38
48
  <path d="M12 2h3l7 7-9 9-8-8V6a4 4 0 014-4z" mask="url(#products-front-tag-mask)" />
39
49
  <path d="M8 7h3l7 7-9 9-7-7v-5a4 4 0 014-4z" />
40
50
  <circle cx="7.5" cy="11.5" r="0.7" />
41
- </svg>`};n(St);var Ct={name:`loyalty-points`,viewBox:`0 0 24 24`,path:`M12 3l2.4 4.8 5.3.8-3.8 3.7.9 5.2-4.8-2.5-4.8 2.5.9-5.2-3.8-3.7 5.3-.8L12 3zm-3 13v5l3-1.7 3 1.7v-5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.8`};n(Ct);var wt={name:`membership`,viewBox:`0 0 24 24`,path:`M5 3.5h14a2 2 0 012 2v13a2 2 0 01-2 2H5a2 2 0 01-2-2v-13a2 2 0 012-2zm-2 4h12m2-4v6l1.5-1.2L20 9.5v-6M8.5 11.5a1.3 1.3 0 100 2.6 1.3 1.3 0 000-2.6zm-2.3 5.1c.5-.9 1.3-1.3 2.3-1.3s1.8.4 2.3 1.3M13.5 12.5h4.5m-4.5 3h4.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.8`};n(wt);var Tt={name:`inventory`,viewBox:`0 0 24 24`,path:`M8 4h8a2 2 0 012 2v1h2v14H4V7h2V6a2 2 0 012-2zm1 0V3h6v1M8 11h8m-8 4h8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.8`};n(Tt);var Et={name:`out-of-stock`,viewBox:`0 0 24 24`,path:`M4 5h16v14H4V5zm3 3l10 8m0-8L7 16m-3 5h16`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.8`};n(Et);var Dt={name:`pickup`,viewBox:`0 0 24 24`,path:`M5.5 2.8a1.6 1.6 0 100 3.2 1.6 1.6 0 000-3.2zm-.8 5.1-1 5.8 2.2 1.7 2.5 5.1m-4.7-6.8L2.5 20m2.2-12.1 3.8 2.8 3.2.1m-.2-5.1l4.5-2 4.5 2-4.5 2-4.5-2zm0 0v5l4.5 2 4.5-2v-5m-4.5 1v6.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.8`};n(Dt);var Ot={name:`secure-checkout`,viewBox:`0 0 24 24`,path:`M12 3l7 3v5c0 5-3 8-7 10-4-2-7-5-7-10V6l7-3zm-3 9l2 2 4-4`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.8`};n(Ot);var kt={name:`refund`,viewBox:`0 0 24 24`,path:`M14 5.5a6.5 6.5 0 110 13 6.5 6.5 0 010-13zm0 2.5v8m2-6.2c-.4-.8-1.1-1.2-2-1.2-1.2 0-2 .6-2 1.5 0 2 4 1 4 3s-.8 1.6-2 1.6c-.9 0-1.7-.4-2.1-1.2M6.5 7H3m0 0l2-2M3 7l2 2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`};n(kt),n({name:`ruler`,viewBox:`0 0 24 24`,path:`M3 7.5 7.5 3l13.5 13.5-4.5 4.5L3 7.5ZM6 6l2.5-2.5M8.5 8.5 10 7m1.5 4.5L13 10m1.5 4.5L16 13m1.5 4.5L19 16`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`heading`,viewBox:`0 0 24 24`,path:`M5 4v16M19 4v16M5 12h14`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`file-alt`,viewBox:`0 0 24 24`,path:`M6 3h8l5 5v13H6a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Zm8 0v5h5M8 13h8M8 17h8`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`info-circle`,viewBox:`0 0 24 24`,path:`M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20ZM12 11v5m0-8h.01`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`chevron-down`,viewBox:`0 0 24 24`,path:`m6 9 6 6 6-6`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`chevron-up`,viewBox:`0 0 24 24`,path:`m6 15 6-6 6 6`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`cog`,viewBox:`0 0 24 24`,path:`M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`columns`,viewBox:`0 0 24 24`,path:`M12 12`,customSvg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" d="M4 1h16a3 3 0 0 1 3 3v16a3 3 0 0 1-3 3H4a3 3 0 0 1-3-3V4a3 3 0 0 1 3-3Zm-.5 3v16h7.5V4h-7.5Zm10 0v16H21V4h-7.5Z"/></svg>`}),n({name:`arrows-alt-h`,viewBox:`0 0 24 24`,path:`M4 12h16m-4-4 4 4-4 4M8 8l-4 4 4 4`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`exchange-alt`,viewBox:`0 0 24 24`,path:`M4 8h15m-4-4 4 4-4 4M20 16H5m4 4-4-4 4-4`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`hand-point-up`,viewBox:`0 0 24 24`,path:`M9 11V5a2 2 0 0 1 4 0v6-2a2 2 0 0 1 4 0v2-1a2 2 0 0 1 4 0v5c0 4-2.5 7-6.5 7h-1c-2 0-3.5-.8-4.8-2.2L5 15a2 2 0 0 1 3-2.6L9 14`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`images`,viewBox:`0 0 24 24`,path:`M8 7V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2h-3M4 7h10a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2Zm0 11 3.5-3.5 2.5 2 2-2 2 3.5M11 11h.01`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`align-left`,viewBox:`0 0 24 24`,path:`M4 5h16M4 9h10M4 13h16M4 17h10M4 21h16`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`th-list`,viewBox:`0 0 24 24`,path:`M4 5h2m4 0h10M4 12h2m4 0h10M4 19h2m4 0h10`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`hashtag`,viewBox:`0 0 24 24`,path:`M5 9h15M4 15h15M10 4 8 20M17 4l-2 16`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`th-large`,viewBox:`0 0 24 24`,path:`M12 12`,customSvg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><rect x="1" y="1" width="10.5" height="10.5" rx="1.8"/><rect x="12.5" y="1" width="10.5" height="10.5" rx="1.8"/><rect x="1" y="12.5" width="10.5" height="10.5" rx="1.8"/><rect x="12.5" y="12.5" width="10.5" height="10.5" rx="1.8"/></svg>`}),n({name:`stream`,viewBox:`0 0 24 24`,path:`M4 5h16M4 9h12M4 13h16M4 17h12M4 21h16`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`mouse-pointer`,viewBox:`0 0 24 24`,path:`M5 3v17l5-5 4 6 3-2-4-6h7L5 3Z`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`sign-out-alt`,viewBox:`0 0 24 24`,path:`M10 4H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5M14 8l4 4-4 4m4-4H8`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`mobile-alt`,viewBox:`0 0 24 24`,path:`M9 2h6a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm1 3h4m-3 13h2`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`circle-notch`,viewBox:`0 0 24 24`,path:`M12 3a9 9 0 1 0 9 9`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`ellipsis-h`,viewBox:`0 0 24 24`,path:`M5 12h.01M12 12h.01M19 12h.01`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`plus-circle`,viewBox:`0 0 24 24`,path:`M12 8v8m4-4H8m13 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`external-link-alt`,viewBox:`0 0 24 24`,path:`M14 4h6v6m0-6-9 9M18 13v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h5`,strokeLinecap:`round`,strokeLinejoin:`round`}),n(a),n(o),n(s),n(c),n(l),n(u),n(d),n(f),n(p),n(m),n(h),n(g),n(_),n(v),n(y),n(b),n(x),n(S),n(C),n(w),n(T),n(E),n(D),n(O),n(k),n(A),n(j),n(M),n(N),n(P),n(F),n(I),n(L),n(R),n(z),n(B),n(V),n(H),n(U),n(W),n(G),n(K),n(q),n(J),n(Y),n(X),n(Z),n(Q),n(ne),n(re),n(ie),n(ae),n(oe),n(se),n(ce),n(le),n(ue),n(de),n(fe),n(pe),n(me),n(he),n(ge),n(_e),n(ve),n(ye),n(be),n(xe),n(Se),n(Ce),n(we),n(Te),n(Ee),n(De),n(Oe),n(ke),n(Ae),n(je),n(Me),n(Ne),n(Pe),n(Fe),n(Ie),n(Le),n(Re),n(ze),n(Be),n(Ve),n(He),n(Ue),n(We),n(Ge),n(Ke),n(qe),n(Je),n(Ye),n(Xe),n(Ze),n(Qe),n($e),n(et),n(tt),n(nt),n(rt),n(it),n(at),n(ot),n(st),n(ct),n(lt),n(ut),n(dt),n(ft),n(pt),n(mt),n(ht),n(gt),n(_t),n(vt),n(yt),n($),n(bt),n(xt),n(St),n(Ct),n(wt),n(Tt),n(Et),n(Dt),n(Ot),n(kt),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
51
+ </svg>`};n(St);var Ct={name:`loyalty-points`,viewBox:`0 0 24 24`,path:`M12 3l2.4 4.8 5.3.8-3.8 3.7.9 5.2-4.8-2.5-4.8 2.5.9-5.2-3.8-3.7 5.3-.8L12 3zm-3 13v5l3-1.7 3 1.7v-5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.8`};n(Ct);var wt={name:`membership`,viewBox:`0 0 24 24`,path:`M5 3.5h14a2 2 0 012 2v13a2 2 0 01-2 2H5a2 2 0 01-2-2v-13a2 2 0 012-2zm-2 4h12m2-4v6l1.5-1.2L20 9.5v-6M8.5 11.5a1.3 1.3 0 100 2.6 1.3 1.3 0 000-2.6zm-2.3 5.1c.5-.9 1.3-1.3 2.3-1.3s1.8.4 2.3 1.3M13.5 12.5h4.5m-4.5 3h4.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.8`};n(wt);var Tt={name:`inventory`,viewBox:`0 0 24 24`,path:`M8 4h8a2 2 0 012 2v1h2v14H4V7h2V6a2 2 0 012-2zm1 0V3h6v1M8 11h8m-8 4h8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.8`};n(Tt);var Et={name:`out-of-stock`,viewBox:`0 0 24 24`,path:`M4 5h16v14H4V5zm3 3l10 8m0-8L7 16m-3 5h16`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.8`};n(Et);var Dt={name:`pickup`,viewBox:`0 0 24 24`,path:`M5.5 2.8a1.6 1.6 0 100 3.2 1.6 1.6 0 000-3.2zm-.8 5.1-1 5.8 2.2 1.7 2.5 5.1m-4.7-6.8L2.5 20m2.2-12.1 3.8 2.8 3.2.1m-.2-5.1l4.5-2 4.5 2-4.5 2-4.5-2zm0 0v5l4.5 2 4.5-2v-5m-4.5 1v6.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.8`};n(Dt);var Ot={name:`secure-checkout`,viewBox:`0 0 24 24`,path:`M12 3l7 3v5c0 5-3 8-7 10-4-2-7-5-7-10V6l7-3zm-3 9l2 2 4-4`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.8`};n(Ot);var kt={name:`refund`,viewBox:`0 0 24 24`,path:`M14 5.5a6.5 6.5 0 110 13 6.5 6.5 0 010-13zm0 2.5v8m2-6.2c-.4-.8-1.1-1.2-2-1.2-1.2 0-2 .6-2 1.5 0 2 4 1 4 3s-.8 1.6-2 1.6c-.9 0-1.7-.4-2.1-1.2M6.5 7H3m0 0l2-2M3 7l2 2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`};n(kt),n({name:`ruler`,viewBox:`0 0 24 24`,path:`M3 7.5 7.5 3l13.5 13.5-4.5 4.5L3 7.5ZM6 6l2.5-2.5M8.5 8.5 10 7m1.5 4.5L13 10m1.5 4.5L16 13m1.5 4.5L19 16`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`heading`,viewBox:`0 0 24 24`,path:`M5 4v16M19 4v16M5 12h14`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`file-alt`,viewBox:`0 0 24 24`,path:`M6 3h8l5 5v13H6a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Zm8 0v5h5M8 13h8M8 17h8`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`info-circle`,viewBox:`0 0 24 24`,path:`M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20ZM12 11v5m0-8h.01`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`chevron-down`,viewBox:`0 0 24 24`,path:`m6 9 6 6 6-6`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`chevron-up`,viewBox:`0 0 24 24`,path:`m6 15 6-6 6 6`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`cog`,viewBox:`0 0 24 24`,path:`M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`columns`,viewBox:`0 0 24 24`,path:`M12 12`,customSvg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" d="M4 1h16a3 3 0 0 1 3 3v16a3 3 0 0 1-3 3H4a3 3 0 0 1-3-3V4a3 3 0 0 1 3-3Zm-.5 3v16h7.5V4h-7.5Zm10 0v16H21V4h-7.5Z"/></svg>`}),n({name:`arrows-alt-h`,viewBox:`0 0 24 24`,path:`M4 12h16m-4-4 4 4-4 4M8 8l-4 4 4 4`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`exchange-alt`,viewBox:`0 0 24 24`,path:`M4 8h15m-4-4 4 4-4 4M20 16H5m4 4-4-4 4-4`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`hand-point-up`,viewBox:`0 0 24 24`,path:`M9 11V5a2 2 0 0 1 4 0v6-2a2 2 0 0 1 4 0v2-1a2 2 0 0 1 4 0v5c0 4-2.5 7-6.5 7h-1c-2 0-3.5-.8-4.8-2.2L5 15a2 2 0 0 1 3-2.6L9 14`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`images`,viewBox:`0 0 24 24`,path:`M8 7V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2h-3M4 7h10a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2Zm0 11 3.5-3.5 2.5 2 2-2 2 3.5M11 11h.01`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`align-left`,viewBox:`0 0 24 24`,path:`M4 5h16M4 9h10M4 13h16M4 17h10M4 21h16`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`th-list`,viewBox:`0 0 24 24`,path:`M4 5h2m4 0h10M4 12h2m4 0h10M4 19h2m4 0h10`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`hashtag`,viewBox:`0 0 24 24`,path:`M5 9h15M4 15h15M10 4 8 20M17 4l-2 16`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`th-large`,viewBox:`0 0 24 24`,path:`M12 12`,customSvg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><rect x="1" y="1" width="10.5" height="10.5" rx="1.8"/><rect x="12.5" y="1" width="10.5" height="10.5" rx="1.8"/><rect x="1" y="12.5" width="10.5" height="10.5" rx="1.8"/><rect x="12.5" y="12.5" width="10.5" height="10.5" rx="1.8"/></svg>`}),n({name:`stream`,viewBox:`0 0 24 24`,path:`M4 5h16M4 9h12M4 13h16M4 17h12M4 21h16`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`mouse-pointer`,viewBox:`0 0 24 24`,path:`M5 3v17l5-5 4 6 3-2-4-6h7L5 3Z`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`sign-out-alt`,viewBox:`0 0 24 24`,path:`M10 4H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5M14 8l4 4-4 4m4-4H8`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`mobile-alt`,viewBox:`0 0 24 24`,path:`M9 2h6a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm1 3h4m-3 13h2`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`circle-notch`,viewBox:`0 0 24 24`,path:`M12 3a9 9 0 1 0 9 9`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`ellipsis-h`,viewBox:`0 0 24 24`,path:`M5 12h.01M12 12h.01M19 12h.01`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`plus-circle`,viewBox:`0 0 24 24`,path:`M12 8v8m4-4H8m13 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`,strokeLinecap:`round`,strokeLinejoin:`round`}),n({name:`external-link-alt`,viewBox:`0 0 24 24`,path:`M14 4h6v6m0-6-9 9M18 13v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h5`,strokeLinecap:`round`,strokeLinejoin:`round`}),n(s),n(c),n(l),n(u),n(d),n(ee),n(te),n(f),n(p),n(m),n(h),n(g),n(_),n(v),n(y),n(b),n(x),n(S),n(C),n(w),n(T),n(E),n(D),n(O),n(k),n(A),n(j),n(M),n(N),n(P),n(F),n(I),n(L),n(R),n(z),n(B),n(V),n(H),n(U),n(W),n(G),n(K),n(q),n(J),n(Y),n(X),n(Z),n(Q),n(ne),n(re),n(ie),n(ae),n(oe),n(se),n(ce),n(le),n(ue),n(de),n(fe),n(pe),n(me),n(he),n(ge),n(_e),n(ve),n(ye),n(be),n(xe),n(Se),n(Ce),n(we),n(Te),n(Ee),n(De),n(Oe),n(ke),n(Ae),n(je),n(Me),n(Ne),n(Pe),n(Fe),n(Ie),n(Le),n(Re),n(ze),n(Be),n(Ve),n(He),n(Ue),n(We),n(Ge),n(Ke),n(qe),n(Je),n(Ye),n(Xe),n(Ze),n(Qe),n($e),n(et),n(tt),n(nt),n(rt),n(it),n(at),n(ot),n(st),n(ct),n(lt),n(ut),n(dt),n(ft),n(pt),n(mt),n(ht),n(gt),n(_t),n(vt),n(yt),n($),n(bt),n(xt),n(St),n(Ct),n(wt),n(Tt),n(Et),n(Dt),n(Ot),n(kt),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
@@ -0,0 +1 @@
1
+ require(`./icon-CGXHKbMq.js`);
@@ -0,0 +1 @@
1
+ import "./icon-Basse9AD.js";
@@ -1 +1 @@
1
- const e=require(`./icon-DUXUj1Xl.js`),t=require(`./register-element-tCL_F1YI.js`);require(`./icon-EKS-0LRg.js`),require(`./caret-down-D_LtPGNJ.js`),e.a({name:`caret-up`,viewBox:`0 0 24 24`,path:`M5 15l7-7 7 7`,strokeLinecap:`round`,strokeLinejoin:`round`});var n=class extends HTMLElement{static get observedAttributes(){return[`type`,`placeholder`,`value`,`disabled`,`id`,`name`,`required`,`readonly`,`rows`,`icon`,`label`,`info`,`error`,`error-message`,`loading`,`aria-label`,`aria-labelledby`,`aria-describedby`]}constructor(){super(),this._input=null,this._textarea=null,this._element=null,this._wrapper=null,this._icon=null,this._prependSlotContainer=null,this._appendSlotContainer=null,this._colorPicker=null,this._colorTextInput=null,this._colorContainer=null,this._colorPickerWrapper=null,this._numberSpinnerContainer=null,this._numberIncrementButton=null,this._numberDecrementButton=null,this._contentObserver=null,this._focusHandler=null,this._a11yId=``,this._blurHandler=null,this._clickHandler=null,this._clickOutsideHandler=null,this._renderFrame=null}connectedCallback(){this.classList.add(`mint-input-host`),this.render(),this._observeContentMutations()}disconnectedCallback(){this.removeEventListeners(),this._contentObserver&&=(this._contentObserver.disconnect(),null),this._renderFrame!==null&&(cancelAnimationFrame(this._renderFrame),this._renderFrame=null)}attributeChangedCallback(e,t,n){if(t!==n){if(e===`error`||e===`error-message`){this._renderErrorState(),this._syncControlAccessibility(),this._element&&(this._element.className=this.getInputClasses()),this._colorTextInput&&(this._colorTextInput.className=this.getInputClasses());return}if(e===`loading`){this.render();return}this.render()}}_scheduleRender(){this._renderFrame===null&&(this._renderFrame=requestAnimationFrame(()=>{this._renderFrame=null,this.render()}))}_observeContentMutations(){this._contentObserver||=new MutationObserver(()=>{this._scheduleRender()}),this._contentObserver.disconnect(),this._contentObserver.observe(this,{childList:!0,attributes:!0,attributeFilter:[`slot`]})}getType(){return this.getAttribute(`type`)||`text`}getRows(){let e=this.getAttribute(`rows`);return e?parseInt(e,10):3}_getNormalizedType(){let e=this.getType();return e===`datetime`?`datetime-local`:e===`money`?`text`:e===`textarea`?`textarea`:e}_isTextarea(){return this.getType()===`textarea`}_isMoney(){return this.getType()===`money`}_isColor(){return this.getType()===`color`}_isNumber(){return this.getType()===`number`}getPlaceholder(){return this.getAttribute(`placeholder`)||``}getValue(){return this._isColor()?this._colorTextInput?this._colorTextInput.value:this._colorPicker?this._colorPicker.value:this.getAttribute(`value`)||`#000000`:this._element?this._element.value:this.getAttribute(`value`)||``}set value(e){try{this._isColor()?(this._colorPicker&&(this._colorPicker.value=e||`#000000`),this._colorTextInput&&(this._colorTextInput.value=e||`#000000`)):this._element&&(this._element.value=e),e?this.setAttribute(`value`,e):this.removeAttribute(`value`)}catch{}}get value(){try{return this.getValue()||``}catch{return``}}isDisabled(){return this.getAttribute(`disabled`)===`true`}isReadonly(){return this.getAttribute(`readonly`)===`true`}isRequired(){return this.getAttribute(`required`)===`true`}hasError(){return this.getAttribute(`error`)===`true`}getErrorMessage(){return this.getAttribute(`error-message`)||``}getId(){return this.getAttribute(`id`)||``}getName(){return this.getAttribute(`name`)||``}getIcon(){return this.getAttribute(`icon`)||``}getLabel(){return this.getAttribute(`label`)||``}getInfo(){return this.getAttribute(`info`)||``}getInputClasses(){let e=this._isTextarea(),t=!!this.getIcon(),n=this.querySelector(`[slot="prepend"]`)!==null,r=this.querySelector(`[slot="append"]`)!==null,i=this._isColor(),a=this._isNumber(),o=this.hasError();return[`mint-input-control`,e&&`is-textarea`,t&&`has-icon`,i&&`is-color`,n&&`has-prepend`,r&&`has-append`,a&&`is-number`,o&&`has-error`].filter(Boolean).join(` `)}_syncSlotAdornments(e,t){if(!this._wrapper||e||this._isColor()){this._prependSlotContainer&&=(this._prependSlotContainer.remove(),null),this._appendSlotContainer&&=(this._appendSlotContainer.remove(),null);return}this._prependSlotContainer||(this._prependSlotContainer=document.createElement(`div`),this._prependSlotContainer.className=`mint-input-adornment mint-input-prepend-slot`,this._wrapper.appendChild(this._prependSlotContainer)),this._appendSlotContainer||(this._appendSlotContainer=document.createElement(`div`),this._appendSlotContainer.className=`mint-input-adornment mint-input-append-slot`,this._wrapper.appendChild(this._appendSlotContainer)),this._prependSlotContainer.classList.toggle(`has-icon-offset`,t);let n=Array.from(this.querySelectorAll(`[slot="prepend"]`)),r=Array.from(this.querySelectorAll(`[slot="append"]`));this._prependSlotContainer.replaceChildren(),this._appendSlotContainer.replaceChildren(),n.forEach(e=>this._prependSlotContainer.appendChild(e)),r.forEach(e=>this._appendSlotContainer.appendChild(e)),this._prependSlotContainer.classList.toggle(`is-hidden`,n.length===0),this._appendSlotContainer.classList.toggle(`is-hidden`,r.length===0)}isLoading(){return this.getAttribute(`loading`)===`true`}render(){this.getType();let e=this._getNormalizedType(),t=this._isTextarea(),n=this._isMoney(),r=this._isColor(),i=this.getPlaceholder(),a=this.isDisabled(),o=this.isReadonly(),s=this.isRequired(),c=this.getId(),l=this.getName(),u=this.getAttribute(`value`)||(r?`#000000`:``),d=this.getRows(),f=this.getIcon(),p=this.getLabel(),m=this.getInfo(),h=this.isLoading();if(r&&this._renderSkeleton(h),r){this._input&&=(this._input.remove(),null),this._textarea&&=(this._textarea.remove(),null),this._wrapper||(this._wrapper=document.createElement(`div`),this._wrapper.className=`mint-input-wrapper`,this.appendChild(this._wrapper)),this._colorContainer&&=(this._colorContainer.remove(),null),this._colorPickerWrapper&&!r&&(this._colorPickerWrapper.remove(),this._colorPickerWrapper=null),this._colorPickerWrapper||(this._colorPickerWrapper=document.createElement(`div`),this._colorPickerWrapper.className=`mint-color-picker-wrapper`,this._wrapper.appendChild(this._colorPickerWrapper),this._colorPicker=document.createElement(`input`),this._colorPicker.type=`color`,this._colorPicker.className=`mint-color-picker`,this._colorPickerWrapper.appendChild(this._colorPicker),this._focusHandler=e=>{this._colorPickerWrapper&&this._colorPicker&&this._colorPicker.matches(`:focus-visible`)&&requestAnimationFrame(()=>{this._colorPicker&&this._colorPicker.matches(`:focus-visible`)&&this._colorPickerWrapper?.classList.add(`is-focused`)})},this._blurHandler=()=>{this._colorPickerWrapper&&this._colorPickerWrapper.classList.remove(`is-focused`)},this._colorPicker.addEventListener(`focus`,this._focusHandler),this._colorPicker.addEventListener(`blur`,this._blurHandler),this._colorPicker.addEventListener(`input`,()=>{let e=this._colorPicker?.value||`#000000`;this._colorTextInput&&(this._colorTextInput.value=e),this.setAttribute(`value`,e),this.dispatchEvent(new CustomEvent(`input`,{detail:{value:e},bubbles:!0,cancelable:!0}))}),this._colorPicker.addEventListener(`change`,()=>{let e=this._colorPicker?.value||`#000000`;this.setAttribute(`value`,e),this.dispatchEvent(new CustomEvent(`change`,{detail:{value:e},bubbles:!0,cancelable:!0}))})),this._colorTextInput||(this._colorTextInput=document.createElement(`input`),this._colorTextInput.type=`text`,this._colorTextInput.className=this.getInputClasses(),this._colorTextInput.placeholder=i||`#000000`,this._colorTextInput.pattern=`^#[0-9A-Fa-f]{6}$`,this._wrapper.appendChild(this._colorTextInput),this._colorTextInput.addEventListener(`input`,()=>{let e=this._colorTextInput?.value||``;/^#[0-9A-Fa-f]{6}$/.test(e)&&(this._colorPicker&&(this._colorPicker.value=e),this.setAttribute(`value`,e),this.dispatchEvent(new CustomEvent(`input`,{detail:{value:e},bubbles:!0,cancelable:!0})))}),this._colorTextInput.addEventListener(`blur`,()=>{let e=this._colorTextInput?.value||``;/^#[0-9A-Fa-f]{6}$/.test(e)?(this._colorPicker&&(this._colorPicker.value=e),this.setAttribute(`value`,e)):this._colorPicker&&this._colorTextInput&&(this._colorTextInput.value=this._colorPicker.value),this.dispatchEvent(new CustomEvent(`change`,{detail:{value:this._colorPicker?.value||`#000000`},bubbles:!0,cancelable:!0}))}));let e=u||`#000000`;if(this._colorPicker&&this._colorPicker.value!==e&&(this._colorPicker.value=e),this._colorTextInput&&this._colorTextInput.value!==e&&(this._colorTextInput.value=e),this._colorPicker&&(this._colorPicker.disabled=a),this._colorPickerWrapper&&(a?this._colorPickerWrapper.classList.add(`is-disabled`):this._colorPickerWrapper.classList.remove(`is-disabled`)),this._colorTextInput&&(this._colorTextInput.disabled=a,this._colorTextInput.readOnly=o,this._colorTextInput.required=s),this._colorTextInput){let e=this._colorTextInput;c?e.id=c:e.removeAttribute(`id`),l?e.name=l:e.removeAttribute(`name`),e.setAttribute(`aria-invalid`,this.hasError()?`true`:`false`),this._element=e}this._renderErrorState();let t=this.querySelector(`.mint-input-label-container`);if(p||m){t||(t=document.createElement(`div`),t.className=`mint-input-label-container`,this._wrapper&&this._wrapper.parentElement===this?this.insertBefore(t,this._wrapper):this.insertBefore(t,this.firstChild));let e=t.querySelector(`.mint-input-label`);if(p){e||(e=document.createElement(`label`),e.className=`mint-input-label`,t.insertBefore(e,t.firstChild)),e.textContent=p;let n=c||this._colorTextInput?.id;if(n)e.setAttribute(`for`,n);else{let t=`mint-input-${Math.random().toString(36).substr(2,9)}`;this._colorTextInput&&(this._colorTextInput.id=t),e.setAttribute(`for`,t)}a?e.classList.add(`is-disabled`):e.classList.remove(`is-disabled`)}else e&&e.remove();let n=t.querySelector(`.mint-input-info`);m?(n||(n=document.createElement(`span`),n.className=`mint-input-info`,t.appendChild(n)),n.textContent=m,a?n.classList.add(`is-disabled`):n.classList.remove(`is-disabled`)):n&&n.remove()}else t&&t.remove();return}if(this._wrapper||(this._wrapper=document.createElement(`div`),this._wrapper.className=`mint-input-wrapper`,this.appendChild(this._wrapper)),this._colorContainer&&(this._colorContainer.remove(),this._colorContainer=null,this._colorPicker=null,this._colorTextInput=null),this._colorPickerWrapper&&!r&&(this._colorPickerWrapper.remove(),this._colorPickerWrapper=null,this._colorPicker=null,this._colorTextInput=null),f&&!t?this._icon?this._icon.setAttribute(`name`,f):(this._icon=document.createElement(`mint-icon`),this._icon.setAttribute(`name`,f),this._icon.className=`mint-input-icon`,this._wrapper.appendChild(this._icon)):this._icon&&=(this._icon.remove(),null),this._syncSlotAdornments(t,!!f),this._isNumber()&&!t){if(!this._numberSpinnerContainer){this._numberSpinnerContainer=document.createElement(`div`),this._numberSpinnerContainer.className=`mint-input-spinner`,this._wrapper.appendChild(this._numberSpinnerContainer),this._numberIncrementButton=document.createElement(`button`),this._numberIncrementButton.type=`button`,this._numberIncrementButton.className=`mint-input-spinner-button`;let e=document.createElement(`mint-icon`);e.setAttribute(`name`,`caret-up`),e.className=`mint-input-spinner-icon`,this._numberIncrementButton.appendChild(e),this._numberSpinnerContainer.appendChild(this._numberIncrementButton),this._numberDecrementButton=document.createElement(`button`),this._numberDecrementButton.type=`button`,this._numberDecrementButton.className=`mint-input-spinner-button`;let t=document.createElement(`mint-icon`);t.setAttribute(`name`,`caret-down`),t.className=`mint-input-spinner-icon`,this._numberDecrementButton.appendChild(t),this._numberSpinnerContainer.appendChild(this._numberDecrementButton),this._numberIncrementButton.addEventListener(`click`,e=>{if(e.preventDefault(),e.stopPropagation(),this._input&&!this._input.disabled&&!this._input.readOnly){let e=parseFloat(this._input.value)||0,t=parseFloat(this._input.step)||1,n=this._input.min?parseFloat(this._input.min):void 0,r=this._input.max?parseFloat(this._input.max):void 0,i=e+t;r!==void 0&&i>r&&(i=r),n!==void 0&&i<n&&(i=n),this._input.value=i.toString(),this.setAttribute(`value`,i.toString()),this._input.dispatchEvent(new Event(`input`,{bubbles:!0})),this._input.dispatchEvent(new Event(`change`,{bubbles:!0}))}}),this._numberDecrementButton.addEventListener(`click`,e=>{if(e.preventDefault(),e.stopPropagation(),this._input&&!this._input.disabled&&!this._input.readOnly){let e=parseFloat(this._input.value)||0,t=parseFloat(this._input.step)||1,n=this._input.min?parseFloat(this._input.min):void 0,r=this._input.max?parseFloat(this._input.max):void 0,i=e-t;n!==void 0&&i<n&&(i=n),r!==void 0&&i>r&&(i=r),this._input.value=i.toString(),this.setAttribute(`value`,i.toString()),this._input.dispatchEvent(new Event(`input`,{bubbles:!0})),this._input.dispatchEvent(new Event(`change`,{bubbles:!0}))}})}this._numberIncrementButton&&(this._numberIncrementButton.disabled=a||o),this._numberDecrementButton&&(this._numberDecrementButton.disabled=a||o)}else this._numberSpinnerContainer&&(this._numberSpinnerContainer.remove(),this._numberSpinnerContainer=null,this._numberIncrementButton=null,this._numberDecrementButton=null);if(t){if(this._input&&=(this._input.remove(),null),this._textarea||(this._textarea=document.createElement(`textarea`),this._element=this._textarea,this._wrapper.appendChild(this._textarea),this.setupEventListeners()),this._element=this._textarea,this._textarea.placeholder=i,this._textarea.disabled=a,this._textarea.readOnly=o,this._textarea.required=s,this._textarea.rows=d,this._textarea.setAttribute(`aria-invalid`,this.hasError()?`true`:`false`),u!==this._textarea.value&&(this._textarea.value=u),c?this._textarea.id=c:this._textarea.removeAttribute(`id`),l?this._textarea.name=l:this._textarea.removeAttribute(`name`),this._textarea.className=this.getInputClasses(),this.firstChild&&this.firstChild!==this._wrapper&&this.firstChild.nodeType===Node.TEXT_NODE){let e=this.firstChild.textContent;e&&!this._textarea.value&&(this._textarea.value=e.trim()),this.removeChild(this.firstChild)}}else if(this._textarea&&=(this._textarea.remove(),null),this._input||(this._input=document.createElement(`input`),this._element=this._input,this._wrapper.appendChild(this._input),this.setupEventListeners()),this._element=this._input,this._input.type=e,this._input.placeholder=i,this._input.disabled=a,this._input.readOnly=o,this._input.required=s,this._input.setAttribute(`aria-invalid`,this.hasError()?`true`:`false`),n?(this._input.inputMode=`decimal`,this._input.pattern=`[0-9]*\\.?[0-9]*`):(this._input.removeAttribute(`inputmode`),this._input.removeAttribute(`pattern`)),u!==this._input.value&&(this._input.value=u),c?this._input.id=c:this._input.removeAttribute(`id`),l?this._input.name=l:this._input.removeAttribute(`name`),this._input.className=this.getInputClasses(),this.firstChild&&this.firstChild!==this._wrapper&&this.firstChild.nodeType===Node.TEXT_NODE){let e=this.firstChild.textContent;e&&!this._input.value&&(this._input.value=e.trim()),this.removeChild(this.firstChild)}let g=this.querySelector(`.mint-input-label-container`);if(p||m){g||(g=document.createElement(`div`),g.className=`mint-input-label-container`,this._wrapper&&this._wrapper.parentElement===this?this.insertBefore(g,this._wrapper):this.insertBefore(g,this.firstChild));let e=g.querySelector(`.mint-input-label`);if(p){e||(e=document.createElement(`label`),e.className=`mint-input-label`,g.insertBefore(e,g.firstChild)),e.textContent=p;let t=c||this._element?.id||this._colorTextInput?.id||this._input?.id||this._textarea?.id;if(t)e.setAttribute(`for`,t);else{let t=`mint-input-${Math.random().toString(36).substr(2,9)}`;this._element?this._element.id=t:this._colorTextInput?this._colorTextInput.id=t:this._input?this._input.id=t:this._textarea&&(this._textarea.id=t),e.setAttribute(`for`,t)}a?e.classList.add(`is-disabled`):e.classList.remove(`is-disabled`)}else e&&e.remove();let t=g.querySelector(`.mint-input-info`);m?(t||(t=document.createElement(`span`),t.className=`mint-input-info`,g.appendChild(t)),t.textContent=m,a?t.classList.add(`is-disabled`):t.classList.remove(`is-disabled`)):t&&t.remove()}else g&&g.remove();this._syncSlotAdornments(t,!!f),this._renderErrorState(),this._syncControlAccessibility(),this._renderSkeleton(h)}_renderErrorState(){let e=this.hasError(),t=this.getErrorMessage(),n=this.querySelector(`.mint-input-error`);e&&t?(n||(n=document.createElement(`div`),n.className=`mint-input-error`,this.appendChild(n)),n.textContent=t):n&&n.remove()}_syncControlAccessibility(){let e=this._element;if(!e)return;this._a11yId||=this.getId()||`mint-input-${Math.random().toString(36).slice(2,10)}`;let t=this.getAttribute(`aria-label`)?.trim(),n=!!this.querySelector(`.mint-input-label`);t?e.setAttribute(`aria-label`,t):!n&&this.getAttribute(`placeholder`)?.trim()?e.setAttribute(`aria-label`,this.getAttribute(`placeholder`).trim()):e.removeAttribute(`aria-label`);let r=this.querySelector(`.mint-input-info`),i=this.querySelector(`.mint-input-error`),a=(this.getAttribute(`aria-describedby`)||``).split(/\s+/).filter(Boolean);r&&(r.id=`${this._a11yId}-info`,a.push(r.id)),i&&(i.id=`${this._a11yId}-error`,a.push(i.id)),e.setAttribute(`aria-invalid`,String(this.hasError())),a.length?e.setAttribute(`aria-describedby`,Array.from(new Set(a)).join(` `)):e.removeAttribute(`aria-describedby`);let o=this.getAttribute(`aria-labelledby`)?.trim();o?e.setAttribute(`aria-labelledby`,o):e.removeAttribute(`aria-labelledby`)}setupEventListeners(){this._element&&(this._element.addEventListener(`input`,()=>{let e=this._element?.value||``;e?this.setAttribute(`value`,e):this.removeAttribute(`value`);let t=new Event(`input`,{bubbles:!0,cancelable:!0,composed:!0});this.dispatchEvent(t),this.dispatchEvent(new CustomEvent(`input`,{detail:{value:e},bubbles:!0,cancelable:!0,composed:!0}))}),this._element.addEventListener(`blur`,()=>{let e=this._element?.value||``;e?this.setAttribute(`value`,e):this.removeAttribute(`value`),this.dispatchEvent(new CustomEvent(`change`,{detail:{value:e},bubbles:!0,cancelable:!0}))}))}removeEventListeners(){this._colorPicker&&(this._focusHandler&&=(this._colorPicker.removeEventListener(`focus`,this._focusHandler),null),this._blurHandler&&=(this._colorPicker.removeEventListener(`blur`,this._blurHandler),null))}focus(){this._isColor()&&this._colorTextInput?this._colorTextInput.focus():this._element?.focus()}blur(){this._isColor()&&this._colorTextInput?this._colorTextInput.blur():this._element?.blur()}_renderSkeleton(e){this.classList.toggle(`is-loading`,e);let t=this.querySelector(`.mint-input-skeleton-container`),n=this._wrapper||this.querySelector(`.mint-input-wrapper`);if(e){t||(t=document.createElement(`div`),t.className=`mint-input-skeleton-container`,n?(n.classList.add(`mint-input-positioned`),n.appendChild(t)):(this.classList.add(`mint-input-positioned`),this.appendChild(t)));let e=t.querySelector(`.mint-input-skeleton`);e||(e=document.createElement(`div`),e.className=`mint-input-skeleton`,t.appendChild(e)),e.parentElement||t.appendChild(e)}}};customElements.get(`mint-input`)||t.t(`mint-input`,n),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
1
+ const e=require(`./icon-CGXHKbMq.js`),t=require(`./register-element-tCL_F1YI.js`);require(`./icon-Cfhjb8tV.js`),require(`./caret-down-BfBLwx6q.js`),e.a({name:`caret-up`,viewBox:`0 0 24 24`,path:`M5 15l7-7 7 7`,strokeLinecap:`round`,strokeLinejoin:`round`});var n=class extends HTMLElement{static get observedAttributes(){return[`type`,`placeholder`,`value`,`disabled`,`id`,`name`,`required`,`readonly`,`rows`,`icon`,`label`,`info`,`error`,`error-message`,`loading`,`aria-label`,`aria-labelledby`,`aria-describedby`]}constructor(){super(),this._input=null,this._textarea=null,this._element=null,this._wrapper=null,this._icon=null,this._prependSlotContainer=null,this._appendSlotContainer=null,this._colorPicker=null,this._colorTextInput=null,this._colorContainer=null,this._colorPickerWrapper=null,this._numberSpinnerContainer=null,this._numberIncrementButton=null,this._numberDecrementButton=null,this._contentObserver=null,this._focusHandler=null,this._a11yId=``,this._blurHandler=null,this._clickHandler=null,this._clickOutsideHandler=null,this._renderFrame=null}connectedCallback(){this.classList.add(`mint-input-host`),this.render(),this._observeContentMutations()}disconnectedCallback(){this.removeEventListeners(),this._contentObserver&&=(this._contentObserver.disconnect(),null),this._renderFrame!==null&&(cancelAnimationFrame(this._renderFrame),this._renderFrame=null)}attributeChangedCallback(e,t,n){if(t!==n){if(e===`error`||e===`error-message`){this._renderErrorState(),this._syncControlAccessibility(),this._element&&(this._element.className=this.getInputClasses()),this._colorTextInput&&(this._colorTextInput.className=this.getInputClasses());return}if(e===`loading`){this.render();return}this.render()}}_scheduleRender(){this._renderFrame===null&&(this._renderFrame=requestAnimationFrame(()=>{this._renderFrame=null,this.render()}))}_observeContentMutations(){this._contentObserver||=new MutationObserver(()=>{this._scheduleRender()}),this._contentObserver.disconnect(),this._contentObserver.observe(this,{childList:!0,attributes:!0,attributeFilter:[`slot`]})}getType(){return this.getAttribute(`type`)||`text`}getRows(){let e=this.getAttribute(`rows`);return e?parseInt(e,10):3}_getNormalizedType(){let e=this.getType();return e===`datetime`?`datetime-local`:e===`money`?`text`:e===`textarea`?`textarea`:e}_isTextarea(){return this.getType()===`textarea`}_isMoney(){return this.getType()===`money`}_isColor(){return this.getType()===`color`}_isNumber(){return this.getType()===`number`}getPlaceholder(){return this.getAttribute(`placeholder`)||``}getValue(){return this._isColor()?this._colorTextInput?this._colorTextInput.value:this._colorPicker?this._colorPicker.value:this.getAttribute(`value`)||`#000000`:this._element?this._element.value:this.getAttribute(`value`)||``}set value(e){try{this._isColor()?(this._colorPicker&&(this._colorPicker.value=e||`#000000`),this._colorTextInput&&(this._colorTextInput.value=e||`#000000`)):this._element&&(this._element.value=e),e?this.setAttribute(`value`,e):this.removeAttribute(`value`)}catch{}}get value(){try{return this.getValue()||``}catch{return``}}isDisabled(){return this.getAttribute(`disabled`)===`true`}isReadonly(){return this.getAttribute(`readonly`)===`true`}isRequired(){return this.getAttribute(`required`)===`true`}hasError(){return this.getAttribute(`error`)===`true`}getErrorMessage(){return this.getAttribute(`error-message`)||``}getId(){return this.getAttribute(`id`)||``}getName(){return this.getAttribute(`name`)||``}getIcon(){return this.getAttribute(`icon`)||``}getLabel(){return this.getAttribute(`label`)||``}getInfo(){return this.getAttribute(`info`)||``}getInputClasses(){let e=this._isTextarea(),t=!!this.getIcon(),n=this.querySelector(`[slot="prepend"]`)!==null,r=this.querySelector(`[slot="append"]`)!==null,i=this._isColor(),a=this._isNumber(),o=this.hasError();return[`mint-input-control`,e&&`is-textarea`,t&&`has-icon`,i&&`is-color`,n&&`has-prepend`,r&&`has-append`,a&&`is-number`,o&&`has-error`].filter(Boolean).join(` `)}_syncSlotAdornments(e,t){if(!this._wrapper||e||this._isColor()){this._prependSlotContainer&&=(this._prependSlotContainer.remove(),null),this._appendSlotContainer&&=(this._appendSlotContainer.remove(),null);return}this._prependSlotContainer||(this._prependSlotContainer=document.createElement(`div`),this._prependSlotContainer.className=`mint-input-adornment mint-input-prepend-slot`,this._wrapper.appendChild(this._prependSlotContainer)),this._appendSlotContainer||(this._appendSlotContainer=document.createElement(`div`),this._appendSlotContainer.className=`mint-input-adornment mint-input-append-slot`,this._wrapper.appendChild(this._appendSlotContainer)),this._prependSlotContainer.classList.toggle(`has-icon-offset`,t);let n=Array.from(this.querySelectorAll(`[slot="prepend"]`)),r=Array.from(this.querySelectorAll(`[slot="append"]`));this._prependSlotContainer.replaceChildren(),this._appendSlotContainer.replaceChildren(),n.forEach(e=>this._prependSlotContainer.appendChild(e)),r.forEach(e=>this._appendSlotContainer.appendChild(e)),this._prependSlotContainer.classList.toggle(`is-hidden`,n.length===0),this._appendSlotContainer.classList.toggle(`is-hidden`,r.length===0)}isLoading(){return this.getAttribute(`loading`)===`true`}render(){this.getType();let e=this._getNormalizedType(),t=this._isTextarea(),n=this._isMoney(),r=this._isColor(),i=this.getPlaceholder(),a=this.isDisabled(),o=this.isReadonly(),s=this.isRequired(),c=this.getId(),l=this.getName(),u=this.getAttribute(`value`)||(r?`#000000`:``),d=this.getRows(),f=this.getIcon(),p=this.getLabel(),m=this.getInfo(),h=this.isLoading();if(r&&this._renderSkeleton(h),r){this._input&&=(this._input.remove(),null),this._textarea&&=(this._textarea.remove(),null),this._wrapper||(this._wrapper=document.createElement(`div`),this._wrapper.className=`mint-input-wrapper`,this.appendChild(this._wrapper)),this._colorContainer&&=(this._colorContainer.remove(),null),this._colorPickerWrapper&&!r&&(this._colorPickerWrapper.remove(),this._colorPickerWrapper=null),this._colorPickerWrapper||(this._colorPickerWrapper=document.createElement(`div`),this._colorPickerWrapper.className=`mint-color-picker-wrapper`,this._wrapper.appendChild(this._colorPickerWrapper),this._colorPicker=document.createElement(`input`),this._colorPicker.type=`color`,this._colorPicker.className=`mint-color-picker`,this._colorPickerWrapper.appendChild(this._colorPicker),this._focusHandler=e=>{this._colorPickerWrapper&&this._colorPicker&&this._colorPicker.matches(`:focus-visible`)&&requestAnimationFrame(()=>{this._colorPicker&&this._colorPicker.matches(`:focus-visible`)&&this._colorPickerWrapper?.classList.add(`is-focused`)})},this._blurHandler=()=>{this._colorPickerWrapper&&this._colorPickerWrapper.classList.remove(`is-focused`)},this._colorPicker.addEventListener(`focus`,this._focusHandler),this._colorPicker.addEventListener(`blur`,this._blurHandler),this._colorPicker.addEventListener(`input`,()=>{let e=this._colorPicker?.value||`#000000`;this._colorTextInput&&(this._colorTextInput.value=e),this.setAttribute(`value`,e),this.dispatchEvent(new CustomEvent(`input`,{detail:{value:e},bubbles:!0,cancelable:!0}))}),this._colorPicker.addEventListener(`change`,()=>{let e=this._colorPicker?.value||`#000000`;this.setAttribute(`value`,e),this.dispatchEvent(new CustomEvent(`change`,{detail:{value:e},bubbles:!0,cancelable:!0}))})),this._colorTextInput||(this._colorTextInput=document.createElement(`input`),this._colorTextInput.type=`text`,this._colorTextInput.className=this.getInputClasses(),this._colorTextInput.placeholder=i||`#000000`,this._colorTextInput.pattern=`^#[0-9A-Fa-f]{6}$`,this._wrapper.appendChild(this._colorTextInput),this._colorTextInput.addEventListener(`input`,()=>{let e=this._colorTextInput?.value||``;/^#[0-9A-Fa-f]{6}$/.test(e)&&(this._colorPicker&&(this._colorPicker.value=e),this.setAttribute(`value`,e),this.dispatchEvent(new CustomEvent(`input`,{detail:{value:e},bubbles:!0,cancelable:!0})))}),this._colorTextInput.addEventListener(`blur`,()=>{let e=this._colorTextInput?.value||``;/^#[0-9A-Fa-f]{6}$/.test(e)?(this._colorPicker&&(this._colorPicker.value=e),this.setAttribute(`value`,e)):this._colorPicker&&this._colorTextInput&&(this._colorTextInput.value=this._colorPicker.value),this.dispatchEvent(new CustomEvent(`change`,{detail:{value:this._colorPicker?.value||`#000000`},bubbles:!0,cancelable:!0}))}));let e=u||`#000000`;if(this._colorPicker&&this._colorPicker.value!==e&&(this._colorPicker.value=e),this._colorTextInput&&this._colorTextInput.value!==e&&(this._colorTextInput.value=e),this._colorPicker&&(this._colorPicker.disabled=a),this._colorPickerWrapper&&(a?this._colorPickerWrapper.classList.add(`is-disabled`):this._colorPickerWrapper.classList.remove(`is-disabled`)),this._colorTextInput&&(this._colorTextInput.disabled=a,this._colorTextInput.readOnly=o,this._colorTextInput.required=s),this._colorTextInput){let e=this._colorTextInput;c?e.id=c:e.removeAttribute(`id`),l?e.name=l:e.removeAttribute(`name`),e.setAttribute(`aria-invalid`,this.hasError()?`true`:`false`),this._element=e}this._renderErrorState();let t=this.querySelector(`.mint-input-label-container`);if(p||m){t||(t=document.createElement(`div`),t.className=`mint-input-label-container`,this._wrapper&&this._wrapper.parentElement===this?this.insertBefore(t,this._wrapper):this.insertBefore(t,this.firstChild));let e=t.querySelector(`.mint-input-label`);if(p){e||(e=document.createElement(`label`),e.className=`mint-input-label`,t.insertBefore(e,t.firstChild)),e.textContent=p;let n=c||this._colorTextInput?.id;if(n)e.setAttribute(`for`,n);else{let t=`mint-input-${Math.random().toString(36).substr(2,9)}`;this._colorTextInput&&(this._colorTextInput.id=t),e.setAttribute(`for`,t)}a?e.classList.add(`is-disabled`):e.classList.remove(`is-disabled`)}else e&&e.remove();let n=t.querySelector(`.mint-input-info`);m?(n||(n=document.createElement(`span`),n.className=`mint-input-info`,t.appendChild(n)),n.textContent=m,a?n.classList.add(`is-disabled`):n.classList.remove(`is-disabled`)):n&&n.remove()}else t&&t.remove();return}if(this._wrapper||(this._wrapper=document.createElement(`div`),this._wrapper.className=`mint-input-wrapper`,this.appendChild(this._wrapper)),this._colorContainer&&(this._colorContainer.remove(),this._colorContainer=null,this._colorPicker=null,this._colorTextInput=null),this._colorPickerWrapper&&!r&&(this._colorPickerWrapper.remove(),this._colorPickerWrapper=null,this._colorPicker=null,this._colorTextInput=null),f&&!t?this._icon?this._icon.setAttribute(`name`,f):(this._icon=document.createElement(`mint-icon`),this._icon.setAttribute(`name`,f),this._icon.className=`mint-input-icon`,this._wrapper.appendChild(this._icon)):this._icon&&=(this._icon.remove(),null),this._syncSlotAdornments(t,!!f),this._isNumber()&&!t){if(!this._numberSpinnerContainer){this._numberSpinnerContainer=document.createElement(`div`),this._numberSpinnerContainer.className=`mint-input-spinner`,this._wrapper.appendChild(this._numberSpinnerContainer),this._numberIncrementButton=document.createElement(`button`),this._numberIncrementButton.type=`button`,this._numberIncrementButton.className=`mint-input-spinner-button`;let e=document.createElement(`mint-icon`);e.setAttribute(`name`,`caret-up`),e.className=`mint-input-spinner-icon`,this._numberIncrementButton.appendChild(e),this._numberSpinnerContainer.appendChild(this._numberIncrementButton),this._numberDecrementButton=document.createElement(`button`),this._numberDecrementButton.type=`button`,this._numberDecrementButton.className=`mint-input-spinner-button`;let t=document.createElement(`mint-icon`);t.setAttribute(`name`,`caret-down`),t.className=`mint-input-spinner-icon`,this._numberDecrementButton.appendChild(t),this._numberSpinnerContainer.appendChild(this._numberDecrementButton),this._numberIncrementButton.addEventListener(`click`,e=>{if(e.preventDefault(),e.stopPropagation(),this._input&&!this._input.disabled&&!this._input.readOnly){let e=parseFloat(this._input.value)||0,t=parseFloat(this._input.step)||1,n=this._input.min?parseFloat(this._input.min):void 0,r=this._input.max?parseFloat(this._input.max):void 0,i=e+t;r!==void 0&&i>r&&(i=r),n!==void 0&&i<n&&(i=n),this._input.value=i.toString(),this.setAttribute(`value`,i.toString()),this._input.dispatchEvent(new Event(`input`,{bubbles:!0})),this._input.dispatchEvent(new Event(`change`,{bubbles:!0}))}}),this._numberDecrementButton.addEventListener(`click`,e=>{if(e.preventDefault(),e.stopPropagation(),this._input&&!this._input.disabled&&!this._input.readOnly){let e=parseFloat(this._input.value)||0,t=parseFloat(this._input.step)||1,n=this._input.min?parseFloat(this._input.min):void 0,r=this._input.max?parseFloat(this._input.max):void 0,i=e-t;n!==void 0&&i<n&&(i=n),r!==void 0&&i>r&&(i=r),this._input.value=i.toString(),this.setAttribute(`value`,i.toString()),this._input.dispatchEvent(new Event(`input`,{bubbles:!0})),this._input.dispatchEvent(new Event(`change`,{bubbles:!0}))}})}this._numberIncrementButton&&(this._numberIncrementButton.disabled=a||o),this._numberDecrementButton&&(this._numberDecrementButton.disabled=a||o)}else this._numberSpinnerContainer&&(this._numberSpinnerContainer.remove(),this._numberSpinnerContainer=null,this._numberIncrementButton=null,this._numberDecrementButton=null);if(t){if(this._input&&=(this._input.remove(),null),this._textarea||(this._textarea=document.createElement(`textarea`),this._element=this._textarea,this._wrapper.appendChild(this._textarea),this.setupEventListeners()),this._element=this._textarea,this._textarea.placeholder=i,this._textarea.disabled=a,this._textarea.readOnly=o,this._textarea.required=s,this._textarea.rows=d,this._textarea.setAttribute(`aria-invalid`,this.hasError()?`true`:`false`),u!==this._textarea.value&&(this._textarea.value=u),c?this._textarea.id=c:this._textarea.removeAttribute(`id`),l?this._textarea.name=l:this._textarea.removeAttribute(`name`),this._textarea.className=this.getInputClasses(),this.firstChild&&this.firstChild!==this._wrapper&&this.firstChild.nodeType===Node.TEXT_NODE){let e=this.firstChild.textContent;e&&!this._textarea.value&&(this._textarea.value=e.trim()),this.removeChild(this.firstChild)}}else if(this._textarea&&=(this._textarea.remove(),null),this._input||(this._input=document.createElement(`input`),this._element=this._input,this._wrapper.appendChild(this._input),this.setupEventListeners()),this._element=this._input,this._input.type=e,this._input.placeholder=i,this._input.disabled=a,this._input.readOnly=o,this._input.required=s,this._input.setAttribute(`aria-invalid`,this.hasError()?`true`:`false`),n?(this._input.inputMode=`decimal`,this._input.pattern=`[0-9]*\\.?[0-9]*`):(this._input.removeAttribute(`inputmode`),this._input.removeAttribute(`pattern`)),u!==this._input.value&&(this._input.value=u),c?this._input.id=c:this._input.removeAttribute(`id`),l?this._input.name=l:this._input.removeAttribute(`name`),this._input.className=this.getInputClasses(),this.firstChild&&this.firstChild!==this._wrapper&&this.firstChild.nodeType===Node.TEXT_NODE){let e=this.firstChild.textContent;e&&!this._input.value&&(this._input.value=e.trim()),this.removeChild(this.firstChild)}let g=this.querySelector(`.mint-input-label-container`);if(p||m){g||(g=document.createElement(`div`),g.className=`mint-input-label-container`,this._wrapper&&this._wrapper.parentElement===this?this.insertBefore(g,this._wrapper):this.insertBefore(g,this.firstChild));let e=g.querySelector(`.mint-input-label`);if(p){e||(e=document.createElement(`label`),e.className=`mint-input-label`,g.insertBefore(e,g.firstChild)),e.textContent=p;let t=c||this._element?.id||this._colorTextInput?.id||this._input?.id||this._textarea?.id;if(t)e.setAttribute(`for`,t);else{let t=`mint-input-${Math.random().toString(36).substr(2,9)}`;this._element?this._element.id=t:this._colorTextInput?this._colorTextInput.id=t:this._input?this._input.id=t:this._textarea&&(this._textarea.id=t),e.setAttribute(`for`,t)}a?e.classList.add(`is-disabled`):e.classList.remove(`is-disabled`)}else e&&e.remove();let t=g.querySelector(`.mint-input-info`);m?(t||(t=document.createElement(`span`),t.className=`mint-input-info`,g.appendChild(t)),t.textContent=m,a?t.classList.add(`is-disabled`):t.classList.remove(`is-disabled`)):t&&t.remove()}else g&&g.remove();this._syncSlotAdornments(t,!!f),this._renderErrorState(),this._syncControlAccessibility(),this._renderSkeleton(h)}_renderErrorState(){let e=this.hasError(),t=this.getErrorMessage(),n=this.querySelector(`.mint-input-error`);e&&t?(n||(n=document.createElement(`div`),n.className=`mint-input-error`,this.appendChild(n)),n.textContent=t):n&&n.remove()}_syncControlAccessibility(){let e=this._element;if(!e)return;this._a11yId||=this.getId()||`mint-input-${Math.random().toString(36).slice(2,10)}`;let t=this.getAttribute(`aria-label`)?.trim(),n=!!this.querySelector(`.mint-input-label`);t?e.setAttribute(`aria-label`,t):!n&&this.getAttribute(`placeholder`)?.trim()?e.setAttribute(`aria-label`,this.getAttribute(`placeholder`).trim()):e.removeAttribute(`aria-label`);let r=this.querySelector(`.mint-input-info`),i=this.querySelector(`.mint-input-error`),a=(this.getAttribute(`aria-describedby`)||``).split(/\s+/).filter(Boolean);r&&(r.id=`${this._a11yId}-info`,a.push(r.id)),i&&(i.id=`${this._a11yId}-error`,a.push(i.id)),e.setAttribute(`aria-invalid`,String(this.hasError())),a.length?e.setAttribute(`aria-describedby`,Array.from(new Set(a)).join(` `)):e.removeAttribute(`aria-describedby`);let o=this.getAttribute(`aria-labelledby`)?.trim();o?e.setAttribute(`aria-labelledby`,o):e.removeAttribute(`aria-labelledby`)}setupEventListeners(){this._element&&(this._element.addEventListener(`input`,()=>{let e=this._element?.value||``;e?this.setAttribute(`value`,e):this.removeAttribute(`value`);let t=new Event(`input`,{bubbles:!0,cancelable:!0,composed:!0});this.dispatchEvent(t),this.dispatchEvent(new CustomEvent(`input`,{detail:{value:e},bubbles:!0,cancelable:!0,composed:!0}))}),this._element.addEventListener(`blur`,()=>{let e=this._element?.value||``;e?this.setAttribute(`value`,e):this.removeAttribute(`value`),this.dispatchEvent(new CustomEvent(`change`,{detail:{value:e},bubbles:!0,cancelable:!0}))}))}removeEventListeners(){this._colorPicker&&(this._focusHandler&&=(this._colorPicker.removeEventListener(`focus`,this._focusHandler),null),this._blurHandler&&=(this._colorPicker.removeEventListener(`blur`,this._blurHandler),null))}focus(){this._isColor()&&this._colorTextInput?this._colorTextInput.focus():this._element?.focus()}blur(){this._isColor()&&this._colorTextInput?this._colorTextInput.blur():this._element?.blur()}_renderSkeleton(e){this.classList.toggle(`is-loading`,e);let t=this.querySelector(`.mint-input-skeleton-container`),n=this._wrapper||this.querySelector(`.mint-input-wrapper`);if(e){t||(t=document.createElement(`div`),t.className=`mint-input-skeleton-container`,n?(n.classList.add(`mint-input-positioned`),n.appendChild(t)):(this.classList.add(`mint-input-positioned`),this.appendChild(t)));let e=t.querySelector(`.mint-input-skeleton`);e||(e=document.createElement(`div`),e.className=`mint-input-skeleton`,t.appendChild(e)),e.parentElement||t.appendChild(e)}}};customElements.get(`mint-input`)||t.t(`mint-input`,n),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
@@ -1,7 +1,7 @@
1
- import { a as e } from "./icon-BVkUo6Cq.js";
1
+ import { a as e } from "./icon-Basse9AD.js";
2
2
  import { t } from "./register-element-BFYmIynH.js";
3
- import "./icon-BbZ9RIyB.js";
4
- import "./caret-down-iipO1Dc4.js";
3
+ import "./icon-DcgcsymT.js";
4
+ import "./caret-down-BBhOg9_Z.js";
5
5
  e({
6
6
  name: "caret-up",
7
7
  viewBox: "0 0 24 24",
@@ -1 +1 @@
1
- require(`./icon-DUXUj1Xl.js`);const e=require(`./register-element-tCL_F1YI.js`);require(`./text-Cpl5ljSe.js`),require(`./button-BRSUb0vH.js`),require(`./stack-Bdl46AdO.js`);var t=new Set,n=null;function r(e){if(!t.has(e)){if(t.size===0){let e=document.documentElement;n={scrollY:window.scrollY||window.pageYOffset||0,rootOverflow:e.style.overflow,rootOverscrollBehavior:e.style.overscrollBehavior},e.style.overflow=`hidden`,e.style.overscrollBehavior=`none`}t.add(e)}}function i(e){if(!t.delete(e)||t.size>0||!n)return;let r=n;n=null;let i=document.documentElement;i.style.overflow=r.rootOverflow,i.style.overscrollBehavior=r.rootOverscrollBehavior,window.scrollTo({left:0,top:r.scrollY,behavior:`instant`})}var a=class extends HTMLElement{static get observedAttributes(){return[`id`,`heading`,`open`,`size`]}constructor(){super(),this._overlay=null,this._modal=null,this._header=null,this._headingSlot=null,this._bodySlot=null,this._actionsSlot=null,this._closeButton=null,this._triggerElement=null,this._triggerPoint=null,this._renderedOpen=!1,this._lastPointerPoint=null,this._pointerDownHandler=null,this._darkModeObserver=null,this._exitTimer=null,this._backdropTimer=null}connectedCallback(){this.isOpen()||this.classList.add(`mint-hidden`),this.render(),this._observeDarkMode(),this._pointerDownHandler=e=>{this._lastPointerPoint={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()}},document.addEventListener(`pointerdown`,this._pointerDownHandler,!0)}disconnectedCallback(){i(this),this._pointerDownHandler&&=(document.removeEventListener(`pointerdown`,this._pointerDownHandler,!0),null),this._exitTimer&&=(clearTimeout(this._exitTimer),null),this._backdropTimer&&=(clearTimeout(this._backdropTimer),null),this._darkModeObserver&&=(this._darkModeObserver.disconnect(),null)}attributeChangedCallback(e,t,n){t!==n&&(e===`open`&&n!==null&&!this._triggerElement&&(this._triggerElement=this._findTriggerElement(),this._triggerPoint=this._findTriggerPoint(this._triggerElement)),this.render())}getId(){return this.getAttribute(`id`)||``}getHeading(){return this.getAttribute(`heading`)||``}getSize(){let e=this.getAttribute(`size`);return e===`small`||e===`large`?e:`default`}isOpen(){return this.hasAttribute(`open`)}open(e){this._triggerElement=this._findTriggerElement(e),this._triggerPoint=this._findTriggerPoint(this._triggerElement),this.setAttribute(`open`,``)}close(){this.removeAttribute(`open`)}render(){let e=this.getId(),t=this.getHeading(),n=this.isOpen(),i=this.getSize();if(e&&(this.id=e),this._overlay||(this._overlay=document.createElement(`div`),this._overlay.className=`mint-modal-overlay`,this._overlay.addEventListener(`click`,()=>this.close()),this.appendChild(this._overlay)),this._modal||(this._modal=document.createElement(`div`),this._modal.className=`mint-modal-shell`,this.appendChild(this._modal)),n){let e=this._modal.querySelector(`.modal-content`);e||(e=document.createElement(`div`),e.className=`modal-content`,this._modal.appendChild(e)),this._renderedOpen||(this._renderedOpen=!0,r(this),this._animateEnter())}else this._renderedOpen&&(this._renderedOpen=!1,this._animateExit());let a=this._modal.querySelector(`.modal-content`);a||(a=document.createElement(`div`),a.className=`modal-content`,this._modal.appendChild(a)),a.classList.remove(`modal-content--small`,`modal-content--large`),i!==`default`&&a.classList.add(`modal-content--${i}`),this._header||(this._header=document.createElement(`div`),this._header.className=`mint-modal-header`,a.appendChild(this._header)),this._headingSlot||(this._headingSlot=document.createElement(`div`),this._headingSlot.className=`mint-modal-heading`,this._headingSlot.setAttribute(`slot`,`heading`),this._header.appendChild(this._headingSlot));let o=this._headingSlot.querySelector(`mint-text`);t?(o||(o=document.createElement(`mint-text`),o.setAttribute(`size`,`sub-heading`),o.setAttribute(`bold`,``),this._headingSlot.appendChild(o)),o.textContent=t):o&&o.remove(),Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._modal&&e!==this._headingSlot&&e.getAttribute(`slot`)===`heading`).forEach(e=>{e.parentElement!==this._headingSlot&&this._headingSlot.appendChild(e)}),this._closeButton||(this._closeButton=document.createElement(`mint-button`),this._closeButton.classList.add(`mint-modal-close-button`),this._closeButton.setAttribute(`variant`,`ghost`),this._closeButton.setAttribute(`icon`,`close`),this._closeButton.addEventListener(`click`,()=>this.close()),this._header.appendChild(this._closeButton)),this._bodySlot||(this._bodySlot=document.createElement(`div`),this._bodySlot.className=`mint-modal-body`,this._bodySlot.setAttribute(`slot`,`body`),a.appendChild(this._bodySlot)),Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._modal&&e!==this._bodySlot&&e.getAttribute(`slot`)===`body`).forEach(e=>{e.parentElement!==this._bodySlot&&this._bodySlot.appendChild(e)});let s=Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._modal&&e!==this._actionsSlot&&e.getAttribute(`slot`)===`actions`),c=this._actionsSlot?.querySelector(`mint-stack`),l=!!c&&c.children.length>0;if(s.length||l){this._actionsSlot||(this._actionsSlot=document.createElement(`div`),this._actionsSlot.className=`p-4 border-t border-gray-200 dark:border-mint-divider`,this._actionsSlot.setAttribute(`slot`,`actions`),a.appendChild(this._actionsSlot));let e=this._actionsSlot.querySelector(`mint-stack`);e||(e=document.createElement(`mint-stack`),e.setAttribute(`direction`,`horizontal`),e.setAttribute(`align-content`,`right`),e.className=`mint-actions-stack`,this._actionsSlot.appendChild(e)),s.forEach(t=>{Array.from(t.children).forEach(t=>e.appendChild(t)),t.remove()})}else this._actionsSlot&&=(this._actionsSlot.remove(),null);Array.from(this.children).forEach(e=>{e!==this._overlay&&e!==this._modal&&e.getAttribute(`slot`)!==`heading`&&e.getAttribute(`slot`)!==`body`&&e.getAttribute(`slot`)!==`actions`&&e!==this._headingSlot&&e!==this._bodySlot&&e!==this._actionsSlot&&e.parentElement!==this._bodySlot&&this._bodySlot.appendChild(e)}),this._updateBackgroundColor()}_updateBackgroundColor(){if(!this._modal)return;document.documentElement?.classList.contains(`dark`)||document.documentElement?.dataset.mintTheme;let e=this._modal.querySelector(`.modal-content`);e&&(e.style.background=`var(--mint-color-surface-raised)`)}_observeDarkMode(){if(!this._darkModeObserver){if(this._darkModeObserver=new MutationObserver(()=>{this._updateBackgroundColor()}),!document.documentElement)return;this._darkModeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`,`data-mint-theme`]})}}_animateEnter(){let e=this._modal?.querySelector(`.modal-content`);e&&(this._exitTimer&&=(clearTimeout(this._exitTimer),null),this._backdropTimer&&=(clearTimeout(this._backdropTimer),null),this.classList.remove(`mint-modal-closing`),this.classList.remove(`mint-modal-open`),this.classList.add(`mint-modal-open`),this.classList.remove(`mint-hidden`),e.style.transform=`none`,e.style.opacity=`0`,e.style.transition=`none`,requestAnimationFrame(()=>{if(!this.isOpen())return;let t=window.getComputedStyle(e).borderRadius;this._setTransformOrigin(e),e.style.borderRadius=`50%`,e.style.transform=`scale(0.1, 0.2)`,e.style.opacity=`0.9`,e.getBoundingClientRect(),e.style.transition=`opacity 320ms ease-out, transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1), border-radius 360ms cubic-bezier(0.2, 0.8, 0.2, 1)`,requestAnimationFrame(()=>{this.isOpen()&&(e.style.transform=`scale(1)`,e.style.opacity=`1`,e.style.borderRadius=t,window.setTimeout(()=>{this.isOpen()&&(e.style.transition=``,e.style.transform=`none`)},380))})}))}_findTriggerElement(e){if(typeof e==`string`){let t=document.getElementById(e);return t&&!this.contains(t)?t:null}if(e instanceof HTMLElement)return e.isConnected&&!this.contains(e)?e:null;let t=this.getAttribute(`trigger-id`);if(t){let e=document.getElementById(t);if(e&&!this.contains(e))return e}let n=document.activeElement;return n instanceof HTMLElement&&n.isConnected&&n!==document.body&&!this.contains(n)?n:null}_findTriggerPoint(e){if(!e)return null;let t=this._lastPointerPoint;if(!t||Date.now()-t.time>1e3)return null;let n=t.target instanceof Node?t.target:null;return n===e||n&&e.contains(n)?{x:t.x,y:t.y}:null}_setTransformOrigin(e){let t=this._findTriggerElement(this._triggerElement);this._triggerElement=t;let n=this._findTriggerPoint(t);if(n){let t=e.getBoundingClientRect();e.style.transformOrigin=`${n.x-t.left}px ${n.y-t.top}px`,this._triggerPoint=n;return}this._triggerPoint={x:window.innerWidth/2,y:0};let r=e.getBoundingClientRect();e.style.transformOrigin=`${this._triggerPoint.x-r.left}px ${this._triggerPoint.y-r.top}px`}_animateExit(){this.classList.remove(`mint-modal-open`),this._backdropTimer&&=(clearTimeout(this._backdropTimer),null);let e=this._modal?.querySelector(`.modal-content`);if(!e){this.classList.add(`mint-hidden`),this.classList.remove(`mint-modal-closing`),i(this);return}this._exitTimer&&clearTimeout(this._exitTimer),this.classList.add(`mint-modal-closing`),e.style.transition=`opacity 220ms ease-in, transform 260ms cubic-bezier(0.4, 0, 1, 1), border-radius 260ms cubic-bezier(0.4, 0, 1, 1)`,e.style.borderRadius=`50%`,e.style.transform=`scale(0.1, 0.2)`,e.style.opacity=`0.9`,this._exitTimer=setTimeout(()=>{this._exitTimer=null,!this.isOpen()&&(this.classList.add(`mint-hidden`),this.classList.remove(`mint-modal-closing`),e.style.transform=``,e.style.opacity=``,e.style.borderRadius=``,e.style.transition=``,i(this))},280)}};typeof customElements<`u`&&!customElements.get(`mint-modal`)&&e.t(`mint-modal`,a),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
1
+ require(`./icon-CGXHKbMq.js`);const e=require(`./register-element-tCL_F1YI.js`);require(`./text-Cpl5ljSe.js`),require(`./button-9OkdUt6p.js`),require(`./stack-Bdl46AdO.js`);var t=new Set,n=null;function r(e){if(!t.has(e)){if(t.size===0){let e=document.documentElement;n={scrollY:window.scrollY||window.pageYOffset||0,rootOverflow:e.style.overflow,rootOverscrollBehavior:e.style.overscrollBehavior},e.style.overflow=`hidden`,e.style.overscrollBehavior=`none`}t.add(e)}}function i(e){if(!t.delete(e)||t.size>0||!n)return;let r=n;n=null;let i=document.documentElement;i.style.overflow=r.rootOverflow,i.style.overscrollBehavior=r.rootOverscrollBehavior,window.scrollTo({left:0,top:r.scrollY,behavior:`instant`})}var a=class extends HTMLElement{static get observedAttributes(){return[`id`,`heading`,`open`,`size`]}constructor(){super(),this._overlay=null,this._modal=null,this._header=null,this._headingSlot=null,this._bodySlot=null,this._actionsSlot=null,this._closeButton=null,this._triggerElement=null,this._triggerPoint=null,this._renderedOpen=!1,this._lastPointerPoint=null,this._pointerDownHandler=null,this._darkModeObserver=null,this._exitTimer=null,this._backdropTimer=null}connectedCallback(){this.isOpen()||this.classList.add(`mint-hidden`),this.render(),this._observeDarkMode(),this._pointerDownHandler=e=>{this._lastPointerPoint={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()}},document.addEventListener(`pointerdown`,this._pointerDownHandler,!0)}disconnectedCallback(){i(this),this._pointerDownHandler&&=(document.removeEventListener(`pointerdown`,this._pointerDownHandler,!0),null),this._exitTimer&&=(clearTimeout(this._exitTimer),null),this._backdropTimer&&=(clearTimeout(this._backdropTimer),null),this._darkModeObserver&&=(this._darkModeObserver.disconnect(),null)}attributeChangedCallback(e,t,n){t!==n&&(e===`open`&&n!==null&&!this._triggerElement&&(this._triggerElement=this._findTriggerElement(),this._triggerPoint=this._findTriggerPoint(this._triggerElement)),this.render())}getId(){return this.getAttribute(`id`)||``}getHeading(){return this.getAttribute(`heading`)||``}getSize(){let e=this.getAttribute(`size`);return e===`small`||e===`large`?e:`default`}isOpen(){return this.hasAttribute(`open`)}open(e){this._triggerElement=this._findTriggerElement(e),this._triggerPoint=this._findTriggerPoint(this._triggerElement),this.setAttribute(`open`,``)}close(){this.removeAttribute(`open`)}render(){let e=this.getId(),t=this.getHeading(),n=this.isOpen(),i=this.getSize();if(e&&(this.id=e),this._overlay||(this._overlay=document.createElement(`div`),this._overlay.className=`mint-modal-overlay`,this._overlay.addEventListener(`click`,()=>this.close()),this.appendChild(this._overlay)),this._modal||(this._modal=document.createElement(`div`),this._modal.className=`mint-modal-shell`,this.appendChild(this._modal)),n){let e=this._modal.querySelector(`.modal-content`);e||(e=document.createElement(`div`),e.className=`modal-content`,this._modal.appendChild(e)),this._renderedOpen||(this._renderedOpen=!0,r(this),this._animateEnter())}else this._renderedOpen&&(this._renderedOpen=!1,this._animateExit());let a=this._modal.querySelector(`.modal-content`);a||(a=document.createElement(`div`),a.className=`modal-content`,this._modal.appendChild(a)),a.classList.remove(`modal-content--small`,`modal-content--large`),i!==`default`&&a.classList.add(`modal-content--${i}`),this._header||(this._header=document.createElement(`div`),this._header.className=`mint-modal-header`,a.appendChild(this._header)),this._headingSlot||(this._headingSlot=document.createElement(`div`),this._headingSlot.className=`mint-modal-heading`,this._headingSlot.setAttribute(`slot`,`heading`),this._header.appendChild(this._headingSlot));let o=this._headingSlot.querySelector(`mint-text`);t?(o||(o=document.createElement(`mint-text`),o.setAttribute(`size`,`sub-heading`),o.setAttribute(`bold`,``),this._headingSlot.appendChild(o)),o.textContent=t):o&&o.remove(),Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._modal&&e!==this._headingSlot&&e.getAttribute(`slot`)===`heading`).forEach(e=>{e.parentElement!==this._headingSlot&&this._headingSlot.appendChild(e)}),this._closeButton||(this._closeButton=document.createElement(`mint-button`),this._closeButton.classList.add(`mint-modal-close-button`),this._closeButton.setAttribute(`variant`,`ghost`),this._closeButton.setAttribute(`icon`,`close`),this._closeButton.addEventListener(`click`,()=>this.close()),this._header.appendChild(this._closeButton)),this._bodySlot||(this._bodySlot=document.createElement(`div`),this._bodySlot.className=`mint-modal-body`,this._bodySlot.setAttribute(`slot`,`body`),a.appendChild(this._bodySlot)),Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._modal&&e!==this._bodySlot&&e.getAttribute(`slot`)===`body`).forEach(e=>{e.parentElement!==this._bodySlot&&this._bodySlot.appendChild(e)});let s=Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._modal&&e!==this._actionsSlot&&e.getAttribute(`slot`)===`actions`),c=this._actionsSlot?.querySelector(`mint-stack`),l=!!c&&c.children.length>0;if(s.length||l){this._actionsSlot||(this._actionsSlot=document.createElement(`div`),this._actionsSlot.className=`p-4 border-t border-gray-200 dark:border-mint-divider`,this._actionsSlot.setAttribute(`slot`,`actions`),a.appendChild(this._actionsSlot));let e=this._actionsSlot.querySelector(`mint-stack`);e||(e=document.createElement(`mint-stack`),e.setAttribute(`direction`,`horizontal`),e.setAttribute(`align-content`,`right`),e.className=`mint-actions-stack`,this._actionsSlot.appendChild(e)),s.forEach(t=>{Array.from(t.children).forEach(t=>e.appendChild(t)),t.remove()})}else this._actionsSlot&&=(this._actionsSlot.remove(),null);Array.from(this.children).forEach(e=>{e!==this._overlay&&e!==this._modal&&e.getAttribute(`slot`)!==`heading`&&e.getAttribute(`slot`)!==`body`&&e.getAttribute(`slot`)!==`actions`&&e!==this._headingSlot&&e!==this._bodySlot&&e!==this._actionsSlot&&e.parentElement!==this._bodySlot&&this._bodySlot.appendChild(e)}),this._updateBackgroundColor()}_updateBackgroundColor(){if(!this._modal)return;document.documentElement?.classList.contains(`dark`)||document.documentElement?.dataset.mintTheme;let e=this._modal.querySelector(`.modal-content`);e&&(e.style.background=`var(--mint-color-surface-raised)`)}_observeDarkMode(){if(!this._darkModeObserver){if(this._darkModeObserver=new MutationObserver(()=>{this._updateBackgroundColor()}),!document.documentElement)return;this._darkModeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`,`data-mint-theme`]})}}_animateEnter(){let e=this._modal?.querySelector(`.modal-content`);e&&(this._exitTimer&&=(clearTimeout(this._exitTimer),null),this._backdropTimer&&=(clearTimeout(this._backdropTimer),null),this.classList.remove(`mint-modal-closing`),this.classList.remove(`mint-modal-open`),this.classList.add(`mint-modal-open`),this.classList.remove(`mint-hidden`),e.style.transform=`none`,e.style.opacity=`0`,e.style.transition=`none`,requestAnimationFrame(()=>{if(!this.isOpen())return;let t=window.getComputedStyle(e).borderRadius;this._setTransformOrigin(e),e.style.borderRadius=`50%`,e.style.transform=`scale(0.1, 0.2)`,e.style.opacity=`0.9`,e.getBoundingClientRect(),e.style.transition=`opacity 320ms ease-out, transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1), border-radius 360ms cubic-bezier(0.2, 0.8, 0.2, 1)`,requestAnimationFrame(()=>{this.isOpen()&&(e.style.transform=`scale(1)`,e.style.opacity=`1`,e.style.borderRadius=t,window.setTimeout(()=>{this.isOpen()&&(e.style.transition=``,e.style.transform=`none`)},380))})}))}_findTriggerElement(e){if(typeof e==`string`){let t=document.getElementById(e);return t&&!this.contains(t)?t:null}if(e instanceof HTMLElement)return e.isConnected&&!this.contains(e)?e:null;let t=this.getAttribute(`trigger-id`);if(t){let e=document.getElementById(t);if(e&&!this.contains(e))return e}let n=document.activeElement;return n instanceof HTMLElement&&n.isConnected&&n!==document.body&&!this.contains(n)?n:null}_findTriggerPoint(e){if(!e)return null;let t=this._lastPointerPoint;if(!t||Date.now()-t.time>1e3)return null;let n=t.target instanceof Node?t.target:null;return n===e||n&&e.contains(n)?{x:t.x,y:t.y}:null}_setTransformOrigin(e){let t=this._findTriggerElement(this._triggerElement);this._triggerElement=t;let n=this._findTriggerPoint(t);if(n){let t=e.getBoundingClientRect();e.style.transformOrigin=`${n.x-t.left}px ${n.y-t.top}px`,this._triggerPoint=n;return}this._triggerPoint={x:window.innerWidth/2,y:0};let r=e.getBoundingClientRect();e.style.transformOrigin=`${this._triggerPoint.x-r.left}px ${this._triggerPoint.y-r.top}px`}_animateExit(){this.classList.remove(`mint-modal-open`),this._backdropTimer&&=(clearTimeout(this._backdropTimer),null);let e=this._modal?.querySelector(`.modal-content`);if(!e){this.classList.add(`mint-hidden`),this.classList.remove(`mint-modal-closing`),i(this);return}this._exitTimer&&clearTimeout(this._exitTimer),this.classList.add(`mint-modal-closing`),e.style.transition=`opacity 220ms ease-in, transform 260ms cubic-bezier(0.4, 0, 1, 1), border-radius 260ms cubic-bezier(0.4, 0, 1, 1)`,e.style.borderRadius=`50%`,e.style.transform=`scale(0.1, 0.2)`,e.style.opacity=`0.9`,this._exitTimer=setTimeout(()=>{this._exitTimer=null,!this.isOpen()&&(this.classList.add(`mint-hidden`),this.classList.remove(`mint-modal-closing`),e.style.transform=``,e.style.opacity=``,e.style.borderRadius=``,e.style.transition=``,i(this))},280)}};typeof customElements<`u`&&!customElements.get(`mint-modal`)&&e.t(`mint-modal`,a),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
@@ -1,7 +1,7 @@
1
- import "./icon-BVkUo6Cq.js";
1
+ import "./icon-Basse9AD.js";
2
2
  import { t as e } from "./register-element-BFYmIynH.js";
3
3
  import "./text-Bmfl6CxJ.js";
4
- import "./button-bTGgcEQa.js";
4
+ import "./button-By-fwuGE.js";
5
5
  import "./stack-nq3AmcMG.js";
6
6
  //#region src/components/modal/Modal.js
7
7
  var t = /* @__PURE__ */ new Set(), n = null;
@@ -1,4 +1,4 @@
1
- import { a as e } from "./icon-BVkUo6Cq.js";
1
+ import { a as e } from "./icon-Basse9AD.js";
2
2
  e({
3
3
  name: "search",
4
4
  viewBox: "0 0 24 24",
@@ -0,0 +1 @@
1
+ require(`./icon-CGXHKbMq.js`).a({name:`search`,viewBox:`0 0 24 24`,path:`M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z`,strokeLinecap:`round`,strokeLinejoin:`round`});