bitboss-ui 0.2.13 → 0.2.14

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/composables/useWizard.d.ts +20 -20
  2. package/dist/index101.js +3 -3
  3. package/dist/index103.js +2 -2
  4. package/dist/index109.js +1 -1
  5. package/dist/index11.js +2 -2
  6. package/dist/index111.js +4 -4
  7. package/dist/index113.js +1 -1
  8. package/dist/index116.js +1 -1
  9. package/dist/index117.js +1 -1
  10. package/dist/index118.js +1 -1
  11. package/dist/index119.js +1 -1
  12. package/dist/index121.js +1 -1
  13. package/dist/index125.js +1 -1
  14. package/dist/index126.js +1 -1
  15. package/dist/index131.js +2 -2
  16. package/dist/index17.js +6 -6
  17. package/dist/index19.js +3 -3
  18. package/dist/index196.js +2 -2
  19. package/dist/index196.js.map +1 -1
  20. package/dist/index197.js +2 -4
  21. package/dist/index197.js.map +1 -1
  22. package/dist/index198.js +4 -235
  23. package/dist/index198.js.map +1 -1
  24. package/dist/index199.js +1 -1
  25. package/dist/index200.js +1 -1
  26. package/dist/index201.js +1 -1
  27. package/dist/index202.js +1 -1
  28. package/dist/index203.js +1 -1
  29. package/dist/index204.js +1 -1
  30. package/dist/index207.js +378 -2
  31. package/dist/index207.js.map +1 -1
  32. package/dist/index208.js +131 -375
  33. package/dist/index208.js.map +1 -1
  34. package/dist/index209.js +2 -134
  35. package/dist/index209.js.map +1 -1
  36. package/dist/index21.js +2 -2
  37. package/dist/index210.js +174 -2
  38. package/dist/index210.js.map +1 -1
  39. package/dist/index211.js +23 -174
  40. package/dist/index211.js.map +1 -1
  41. package/dist/index212.js +373 -23
  42. package/dist/index212.js.map +1 -1
  43. package/dist/index213.js +3 -373
  44. package/dist/index213.js.map +1 -1
  45. package/dist/index214.js +3 -3
  46. package/dist/index214.js.map +1 -1
  47. package/dist/index215.js +232 -32
  48. package/dist/index215.js.map +1 -1
  49. package/dist/index216.js +2 -6
  50. package/dist/index216.js.map +1 -1
  51. package/dist/index217.js +3 -10
  52. package/dist/index217.js.map +1 -1
  53. package/dist/index218.js +35 -3
  54. package/dist/index218.js.map +1 -1
  55. package/dist/index219.js +6 -3
  56. package/dist/index219.js.map +1 -1
  57. package/dist/index221.js +10 -2
  58. package/dist/index221.js.map +1 -1
  59. package/dist/index222.js +8 -27
  60. package/dist/index222.js.map +1 -1
  61. package/dist/index223.js +120 -12
  62. package/dist/index223.js.map +1 -1
  63. package/dist/index224.js +27 -8
  64. package/dist/index224.js.map +1 -1
  65. package/dist/index225.js +12 -120
  66. package/dist/index225.js.map +1 -1
  67. package/dist/index228.js +295 -2
  68. package/dist/index228.js.map +1 -1
  69. package/dist/index23.js +1 -1
  70. package/dist/index230.js +2 -2
  71. package/dist/index231.js +2 -295
  72. package/dist/index231.js.map +1 -1
  73. package/dist/index232.js +2 -2
  74. package/dist/index234.js +2 -117
  75. package/dist/index234.js.map +1 -1
  76. package/dist/index235.js +2 -106
  77. package/dist/index235.js.map +1 -1
  78. package/dist/index236.js +2 -2
  79. package/dist/index237.js +117 -2
  80. package/dist/index237.js.map +1 -1
  81. package/dist/index238.js +106 -2
  82. package/dist/index238.js.map +1 -1
  83. package/dist/index239.js +2 -2
  84. package/dist/index239.js.map +1 -1
  85. package/dist/index240.js +224 -162
  86. package/dist/index240.js.map +1 -1
  87. package/dist/index241.js +258 -2
  88. package/dist/index241.js.map +1 -1
  89. package/dist/index242.js +435 -2
  90. package/dist/index242.js.map +1 -1
  91. package/dist/index243.js +88 -68
  92. package/dist/index243.js.map +1 -1
  93. package/dist/index244.js +200 -2
  94. package/dist/index244.js.map +1 -1
  95. package/dist/index245.js +162 -224
  96. package/dist/index245.js.map +1 -1
  97. package/dist/index246.js +2 -258
  98. package/dist/index246.js.map +1 -1
  99. package/dist/index247.js +2 -435
  100. package/dist/index247.js.map +1 -1
  101. package/dist/index248.js +68 -88
  102. package/dist/index248.js.map +1 -1
  103. package/dist/index249.js +2 -200
  104. package/dist/index249.js.map +1 -1
  105. package/dist/index25.js +2 -2
  106. package/dist/index254.js +2 -2
  107. package/dist/index255.js +1 -1
  108. package/dist/index29.js +3 -3
  109. package/dist/index31.js +4 -4
  110. package/dist/index33.js +2 -2
  111. package/dist/index35.js +2 -2
  112. package/dist/index47.js +1 -1
  113. package/dist/index49.js +1 -1
  114. package/dist/index65.js +5 -5
  115. package/dist/index69.js +2 -2
  116. package/dist/index72.js +1 -1
  117. package/dist/index75.js +1 -1
  118. package/dist/index79.js +4 -4
  119. package/dist/index8.js +85 -104
  120. package/dist/index8.js.map +1 -1
  121. package/dist/index81.js +1 -1
  122. package/dist/style.css +1 -1
  123. package/package.json +1 -1
package/dist/index245.js CHANGED
@@ -1,227 +1,165 @@
1
- import { commonjsGlobal as r, getDefaultExportFromCjs as f } from "./index229.js";
2
- var c = 1 / 0, n = "[object Symbol]", a = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, d = "\\u0300-\\u036f\\ufe20-\\ufe23", b = "\\u20d0-\\u20f0", i = "[" + d + b + "]", s = RegExp(i, "g"), l = {
3
- // Latin-1 Supplement block.
4
- À: "A",
5
- Á: "A",
6
- Â: "A",
7
- Ã: "A",
8
- Ä: "A",
9
- Å: "A",
10
- à: "a",
11
- á: "a",
12
- â: "a",
13
- ã: "a",
14
- ä: "a",
15
- å: "a",
16
- Ç: "C",
17
- ç: "c",
18
- Ð: "D",
19
- ð: "d",
20
- È: "E",
21
- É: "E",
22
- Ê: "E",
23
- Ë: "E",
24
- è: "e",
25
- é: "e",
26
- ê: "e",
27
- ë: "e",
28
- Ì: "I",
29
- Í: "I",
30
- Î: "I",
31
- Ï: "I",
32
- ì: "i",
33
- í: "i",
34
- î: "i",
35
- ï: "i",
36
- Ñ: "N",
37
- ñ: "n",
38
- Ò: "O",
39
- Ó: "O",
40
- Ô: "O",
41
- Õ: "O",
42
- Ö: "O",
43
- Ø: "O",
44
- ò: "o",
45
- ó: "o",
46
- ô: "o",
47
- õ: "o",
48
- ö: "o",
49
- ø: "o",
50
- Ù: "U",
51
- Ú: "U",
52
- Û: "U",
53
- Ü: "U",
54
- ù: "u",
55
- ú: "u",
56
- û: "u",
57
- ü: "u",
58
- Ý: "Y",
59
- ý: "y",
60
- ÿ: "y",
61
- Æ: "Ae",
62
- æ: "ae",
63
- Þ: "Th",
64
- þ: "th",
65
- ß: "ss",
66
- // Latin Extended-A block.
67
- Ā: "A",
68
- Ă: "A",
69
- Ą: "A",
70
- ā: "a",
71
- ă: "a",
72
- ą: "a",
73
- Ć: "C",
74
- Ĉ: "C",
75
- Ċ: "C",
76
- Č: "C",
77
- ć: "c",
78
- ĉ: "c",
79
- ċ: "c",
80
- č: "c",
81
- Ď: "D",
82
- Đ: "D",
83
- ď: "d",
84
- đ: "d",
85
- Ē: "E",
86
- Ĕ: "E",
87
- Ė: "E",
88
- Ę: "E",
89
- Ě: "E",
90
- ē: "e",
91
- ĕ: "e",
92
- ė: "e",
93
- ę: "e",
94
- ě: "e",
95
- Ĝ: "G",
96
- Ğ: "G",
97
- Ġ: "G",
98
- Ģ: "G",
99
- ĝ: "g",
100
- ğ: "g",
101
- ġ: "g",
102
- ģ: "g",
103
- Ĥ: "H",
104
- Ħ: "H",
105
- ĥ: "h",
106
- ħ: "h",
107
- Ĩ: "I",
108
- Ī: "I",
109
- Ĭ: "I",
110
- Į: "I",
111
- İ: "I",
112
- ĩ: "i",
113
- ī: "i",
114
- ĭ: "i",
115
- į: "i",
116
- ı: "i",
117
- Ĵ: "J",
118
- ĵ: "j",
119
- Ķ: "K",
120
- ķ: "k",
121
- ĸ: "k",
122
- Ĺ: "L",
123
- Ļ: "L",
124
- Ľ: "L",
125
- Ŀ: "L",
126
- Ł: "L",
127
- ĺ: "l",
128
- ļ: "l",
129
- ľ: "l",
130
- ŀ: "l",
131
- ł: "l",
132
- Ń: "N",
133
- Ņ: "N",
134
- Ň: "N",
135
- Ŋ: "N",
136
- ń: "n",
137
- ņ: "n",
138
- ň: "n",
139
- ŋ: "n",
140
- Ō: "O",
141
- Ŏ: "O",
142
- Ő: "O",
143
- ō: "o",
144
- ŏ: "o",
145
- ő: "o",
146
- Ŕ: "R",
147
- Ŗ: "R",
148
- Ř: "R",
149
- ŕ: "r",
150
- ŗ: "r",
151
- ř: "r",
152
- Ś: "S",
153
- Ŝ: "S",
154
- Ş: "S",
155
- Š: "S",
156
- ś: "s",
157
- ŝ: "s",
158
- ş: "s",
159
- š: "s",
160
- Ţ: "T",
161
- Ť: "T",
162
- Ŧ: "T",
163
- ţ: "t",
164
- ť: "t",
165
- ŧ: "t",
166
- Ũ: "U",
167
- Ū: "U",
168
- Ŭ: "U",
169
- Ů: "U",
170
- Ű: "U",
171
- Ų: "U",
172
- ũ: "u",
173
- ū: "u",
174
- ŭ: "u",
175
- ů: "u",
176
- ű: "u",
177
- ų: "u",
178
- Ŵ: "W",
179
- ŵ: "w",
180
- Ŷ: "Y",
181
- ŷ: "y",
182
- Ÿ: "Y",
183
- Ź: "Z",
184
- Ż: "Z",
185
- Ž: "Z",
186
- ź: "z",
187
- ż: "z",
188
- ž: "z",
189
- IJ: "IJ",
190
- ij: "ij",
191
- Œ: "Oe",
192
- œ: "oe",
193
- ʼn: "'n",
194
- ſ: "ss"
195
- }, y = typeof r == "object" && r && r.Object === Object && r, m = typeof self == "object" && self && self.Object === Object && self, O = y || m || Function("return this")();
196
- function p(u) {
197
- return function(e) {
198
- return u == null ? void 0 : u[e];
199
- };
200
- }
201
- var S = p(l), g = Object.prototype, j = g.toString, o = O.Symbol, x = o ? o.prototype : void 0, t = x ? x.toString : void 0;
202
- function I(u) {
203
- if (typeof u == "string")
204
- return u;
205
- if (A(u))
206
- return t ? t.call(u) : "";
207
- var e = u + "";
208
- return e == "0" && 1 / u == -c ? "-0" : e;
209
- }
210
- function E(u) {
211
- return !!u && typeof u == "object";
212
- }
213
- function A(u) {
214
- return typeof u == "symbol" || E(u) && j.call(u) == n;
215
- }
216
- function C(u) {
217
- return u == null ? "" : I(u);
218
- }
219
- function U(u) {
220
- return u = C(u), u && u.replace(a, S).replace(s, "");
221
- }
222
- var L = U;
223
- const v = /* @__PURE__ */ f(L);
1
+ import { defineComponent as K, ref as s, computed as y, openBlock as p, createElementBlock as m, normalizeClass as g, renderSlot as v, createElementVNode as k, Fragment as E, renderList as C, toDisplayString as B, createBlock as S, withDirectives as z, mergeProps as H, vModelDynamic as J } from "vue";
2
+ import { clamp as P } from "./index196.js";
3
+ import { drop as q } from "./index256.js";
4
+ import { isNil as R } from "./index120.js";
5
+ import { isNotNil as w } from "./index124.js";
6
+ import { wait as L } from "./index122.js";
7
+ import U from "./index115.js";
8
+ import "./index158.js";
9
+ const j = { class: "bb-base-tag__input-container" }, G = ["autocomplete", "autofocus", "disabled", "id", "placeholder", "readonly"], te = /* @__PURE__ */ K({
10
+ __name: "BaseTag",
11
+ props: {
12
+ autocomplete: {},
13
+ autofocus: {},
14
+ comma: { type: Boolean },
15
+ disabled: { type: Boolean },
16
+ divider: { default: "Enter" },
17
+ hasErrors: { type: Boolean },
18
+ id: {},
19
+ modelValue: {},
20
+ multiple: { type: Boolean, default: !0 },
21
+ name: {},
22
+ placeholder: {},
23
+ readonly: {}
24
+ },
25
+ emits: ["blur", "change", "click", "duplicate", "focus", "inactive", "input", "keydown", "keyup", "update:modelValue"],
26
+ setup(N, { emit: I }) {
27
+ const a = N, u = I;
28
+ if (a.multiple && !Array.isArray(a.modelValue))
29
+ throw new Error('Multiple is set to "true" but modelValue is not an array.');
30
+ const i = s(null), $ = s(null), c = s(null), t = s(""), D = y(() => a.placeholder), o = y(
31
+ () => [].concat(a.modelValue).filter(w)
32
+ ), h = y(() => {
33
+ let e = {};
34
+ return o.value.forEach((n, r) => {
35
+ e[JSON.stringify(n)] = r;
36
+ }), {
37
+ get: (n) => e[JSON.stringify(n)]
38
+ };
39
+ }), f = s(!1), l = s(null), A = (e) => {
40
+ if (u("keyup", e), a.readonly || a.disabled) {
41
+ e.preventDefault();
42
+ return;
43
+ }
44
+ if (e.key === a.divider) {
45
+ if (t.value[t.value.length - 1] === e.key && (t.value = t.value.slice(0, t.value.length - 1)), !t.value)
46
+ return;
47
+ l.value = null;
48
+ const n = h.value.get(t.value);
49
+ R(n) ? F(t.value) : u("duplicate", t.value), t.value = "";
50
+ } else if (e.key === "ArrowLeft")
51
+ l.value === null ? l.value = o.value.length - 1 : l.value === 0 ? l.value = null : l.value--;
52
+ else if (e.key === "ArrowRight")
53
+ l.value === null ? l.value = 1 : l.value === o.value.length - 1 ? l.value = null : l.value++;
54
+ else if (e.key === "Backspace") {
55
+ if (t.value)
56
+ return;
57
+ w(l.value) ? (b(l.value), l.value = P(
58
+ l.value,
59
+ 0,
60
+ o.value.length - 2
61
+ ), o.value.length === 1 && (l.value = null)) : l.value = o.value.length - 1;
62
+ } else
63
+ (e.key === "Tab" || e.key === "Escape") && (l.value = null);
64
+ }, F = (e) => {
65
+ a.multiple ? u("update:modelValue", a.modelValue.concat(e)) : u("update:modelValue", e);
66
+ }, b = (e) => {
67
+ if (typeof e == "number")
68
+ a.multiple ? u("update:modelValue", q(a.modelValue, 1, e)) : u("update:modelValue", null);
69
+ else {
70
+ const n = h.value.get(t.value);
71
+ b(n);
72
+ }
73
+ }, M = (e) => {
74
+ u("focus", e), f.value = !0, document.addEventListener("click", _), document.addEventListener("focusin", V), c.value instanceof HTMLInputElement && c.value.select();
75
+ }, O = (e) => {
76
+ u("click", e), !(a.disabled || a.readonly) && c.value instanceof HTMLElement && c.value.focus();
77
+ }, _ = (e) => {
78
+ if (e.target instanceof Node && i.value && !i.value.contains(e.target)) {
79
+ u("inactive"), document.removeEventListener("click", _), f.value = !1, a.multiple && L(500).then(() => {
80
+ t.value = "";
81
+ });
82
+ return;
83
+ }
84
+ }, V = (e) => {
85
+ if (e.target instanceof Node && i.value && !i.value.contains(e.target)) {
86
+ u("inactive"), document.removeEventListener("focusin", V), f.value = !1, a.multiple && L(500).then(() => {
87
+ t.value = "";
88
+ });
89
+ return;
90
+ }
91
+ }, T = {
92
+ onBlur: (e) => u("blur", e),
93
+ onChange: (e) => u("change", e),
94
+ onKeydown: (e) => {
95
+ e.key === "Enter" && a.divider === "Enter" && e.preventDefault(), u("keydown", e);
96
+ },
97
+ onInput: (e) => u("input", e)
98
+ };
99
+ return (e, n) => (p(), m("span", {
100
+ class: g({
101
+ "bb-base-tag": !0,
102
+ "bb-base-tag--active": f.value,
103
+ "bb-base-tag--disabled": e.disabled,
104
+ "bb-base-tag--errors": e.hasErrors,
105
+ "bb-base-tag--readonly": e.readonly
106
+ }),
107
+ onClick: O,
108
+ ref_key: "outerContainer",
109
+ ref: i
110
+ }, [
111
+ v(e.$slots, "prepend-outer"),
112
+ k("span", {
113
+ class: "bb-base-tag__inner-container",
114
+ ref_key: "innerContainer",
115
+ ref: $
116
+ }, [
117
+ v(e.$slots, "prepend"),
118
+ k("span", j, [
119
+ e.comma ? (p(!0), m(E, { key: 0 }, C(o.value, (r, d) => (p(), m("span", {
120
+ class: g({
121
+ "bb-base-tag__selected": !0,
122
+ "bb-base-tag__selected--comma": !0,
123
+ "bb-base-tag__selected--focused": d === l.value
124
+ }),
125
+ key: r
126
+ }, B(r) + B(d < o.value.length - 1 ? "," : ""), 3))), 128)) : (p(!0), m(E, { key: 1 }, C(o.value, (r, d) => (p(), S(U, {
127
+ class: g({
128
+ "bb-base-tag__selected": !0,
129
+ "bb-base-tag__selected--chip": !0,
130
+ "bb-base-tag__selected--focused": d === l.value
131
+ }),
132
+ clearable: !0,
133
+ key: r,
134
+ text: r,
135
+ "onClick:clear": (Q) => b(d)
136
+ }, null, 8, ["class", "text", "onClick:clear"]))), 128)),
137
+ z(k("input", H({
138
+ autocomplete: e.autocomplete,
139
+ autofocus: e.autofocus,
140
+ class: "bb-base-tag__text-input",
141
+ disabled: e.disabled,
142
+ id: e.id,
143
+ placeholder: D.value,
144
+ readonly: e.readonly,
145
+ type: "text",
146
+ onKeyup: A,
147
+ onFocus: M
148
+ }, T, {
149
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => t.value = r),
150
+ ref_key: "input",
151
+ ref: c
152
+ }), null, 16, G), [
153
+ [J, t.value]
154
+ ])
155
+ ]),
156
+ v(e.$slots, "append")
157
+ ], 512),
158
+ v(e.$slots, "append-outer")
159
+ ], 2));
160
+ }
161
+ });
224
162
  export {
225
- v as default
163
+ te as default
226
164
  };
227
165
  //# sourceMappingURL=index245.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index245.js","sources":["../node_modules/lodash.deburr/index.js"],"sourcesContent":["/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match Latin Unicode letters (excluding mathematical operators). */\nvar reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n/** Used to compose unicode character classes. */\nvar rsComboMarksRange = '\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe23',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20f0';\n\n/** Used to compose unicode capture groups. */\nvar rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']';\n\n/**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\nvar reComboMark = RegExp(rsCombo, 'g');\n\n/** Used to map Latin Unicode letters to basic Latin letters. */\nvar deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 'ss'\n};\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n}\n\n/**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\nvar deburrLetter = basePropertyOf(deburredLetters);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\n/**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\nfunction deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n}\n\nmodule.exports = deburr;\n"],"names":["INFINITY","symbolTag","reLatin","rsComboMarksRange","rsComboSymbolsRange","rsCombo","reComboMark","deburredLetters","freeGlobal","global","freeSelf","root","basePropertyOf","object","key","deburrLetter","objectProto","objectToString","Symbol","symbolProto","symbolToString","baseToString","value","isSymbol","result","isObjectLike","toString","deburr","string","lodash_deburr"],"mappings":";AAUA,IAAIA,IAAW,IAAI,GAGfC,IAAY,mBAGZC,IAAU,+CAGVC,IAAoB,kCACpBC,IAAsB,mBAGtBC,IAAU,MAAMF,IAAoBC,IAAsB,KAM1DE,IAAc,OAAOD,GAAS,GAAG,GAGjCE,IAAkB;AAAA;AAAA,EAEpB,GAAQ;AAAA,EAAM,GAAQ;AAAA,EAAK,GAAQ;AAAA,EAAK,GAAQ;AAAA,EAAK,GAAQ;AAAA,EAAK,GAAQ;AAAA,EAC1E,GAAQ;AAAA,EAAM,GAAQ;AAAA,EAAK,GAAQ;AAAA,EAAK,GAAQ;AAAA,EAAK,GAAQ;AAAA,EAAK,GAAQ;AAAA,EAC1E,GAAQ;AAAA,EAAM,GAAQ;AAAA,EACtB,GAAQ;AAAA,EAAM,GAAQ;AAAA,EACtB,GAAQ;AAAA,EAAM,GAAQ;AAAA,EAAK,GAAQ;AAAA,EAAK,GAAQ;AAAA,EAChD,GAAQ;AAAA,EAAM,GAAQ;AAAA,EAAK,GAAQ;AAAA,EAAK,GAAQ;AAAA,EAChD,GAAQ;AAAA,EAAM,GAAQ;AAAA,EAAK,GAAQ;AAAA,EAAK,GAAQ;AAAA,EAChD,GAAQ;AAAA,EAAM,GAAQ;AAAA,EAAK,GAAQ;AAAA,EAAK,GAAQ;AAAA,EAChD,GAAQ;AAAA,EAAM,GAAQ;AAAA,EACtB,GAAQ;AAAA,EAAM,GAAQ;AAAA,EAAK,GAAQ;AAAA,EAAK,GAAQ;AAAA,EAAK,GAAQ;AAAA,EAAK,GAAQ;AAAA,EAC1E,GAAQ;AAAA,EAAM,GAAQ;AAAA,EAAK,GAAQ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AASE,CAAM,GACjBA,KAAUA,EAAO,QAAQ1B,GAASa,CAAY,EAAE,QAAQT,GAAa,EAAE;AAChF;AAEA,IAAAuB,IAAiBF;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index245.js","sources":["../src/components/BaseTag/BaseTag.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, createCommentVNode as _createCommentVNode, createBlock as _createBlock, vModelDynamic as _vModelDynamic, mergeProps as _mergeProps, createElementVNode as _createElementVNode, withDirectives as _withDirectives } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-base-tag__input-container\" }\nconst _hoisted_2 = [\"autocomplete\", \"autofocus\", \"disabled\", \"id\", \"placeholder\", \"readonly\"]\n\nimport { clamp } from \"@/utilities/functions/clamp\";\nimport { computed, ref } from \"vue\";\nimport { drop } from \"@/utilities/functions/drop\";\nimport { isNil } from \"@/utilities/functions/isNil\";\nimport { isNotNil } from \"@/utilities/functions/isNotNil\";\nimport { wait } from \"@/utilities/functions/wait\";\nimport BbChip from \"../BbChip/BbChip.vue\";\nimport type { InputHTMLAttributes, HTMLAttributes } from \"vue\";\n\nexport type BaseTagProps = {\n /**\n * Guides to the browser as to the type of information expected in the field.\n */\n autocomplete?: InputHTMLAttributes[\"autocomplete\"];\n\n /**\n * Sets autofocus on page load.\n */\n autofocus?: InputHTMLAttributes[\"autofocus\"];\n\n /**\n * Sets the display model for selected values to a list\n * of comma separated string. In this mode the user\n * cannot deselect an option by pressing the close button.\n */\n comma?: boolean;\n\n /**\n * Disables the component\n */\n disabled?: boolean;\n\n /**\n * The divider key used to separate values from one another. By default it is \"Enter\"\n */\n divider?: KeyboardEvent[\"key\"];\n\n /**\n * Define if the component should be in an error state.\n * It usually attaches a CSS class for styling purposes.\n */\n hasErrors?: boolean;\n\n /**\n * The identifier of the component.\n */\n id?: HTMLAttributes[\"id\"];\n\n /**\n * Used by v-model. Can be any serializable type.\n */\n modelValue: any;\n\n /**\n * Allows the selection of multiple items.\n */\n multiple?: boolean;\n\n /**\n * Defines the name of the input.\n */\n name?: InputHTMLAttributes[\"name\"];\n\n /**\n * String displayed when there's no data.\n */\n placeholder?: InputHTMLAttributes[\"placeholder\"];\n\n /**\n * Sets the input in a readonly state.\n */\n readonly?: InputHTMLAttributes[\"readonly\"];\n};\n\nexport type BaseTagEvents = {\n (e: \"blur\", event: FocusEvent): void;\n\n (e: \"change\", event: Event): void;\n\n (e: \"click\", event: MouseEvent): void;\n\n (e: \"duplicate\", string: string): void;\n\n (e: \"focus\", event: FocusEvent): void;\n\n (e: \"inactive\"): void;\n\n (e: \"input\", event: Event): void;\n\n (e: \"keydown\", event: KeyboardEvent): void;\n\n (e: \"keyup\", event: KeyboardEvent): void;\n\n (e: \"update:modelValue\", value: any): void;\n};\n\nexport type BaseTagSlots = {\n append?: (props: {}) => any;\n\n \"append-outer\"?: (props: {}) => any;\n\n prepend?: (props: {}) => any;\n\n \"prepend-outer\"?: (props: {}) => any;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseTag',\n props: {\n autocomplete: {},\n autofocus: {},\n comma: { type: Boolean },\n disabled: { type: Boolean },\n divider: { default: \"Enter\" },\n hasErrors: { type: Boolean },\n id: {},\n modelValue: {},\n multiple: { type: Boolean, default: true },\n name: {},\n placeholder: {},\n readonly: {}\n },\n emits: [\"blur\", \"change\", \"click\", \"duplicate\", \"focus\", \"inactive\", \"input\", \"keydown\", \"keyup\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nif (props.multiple && !Array.isArray(props.modelValue)) {\n throw new Error('Multiple is set to \"true\" but modelValue is not an array.');\n}\n\nconst outerContainer = ref<HTMLElement | null>(null);\nconst innerContainer = ref<HTMLElement | null>(null);\nconst input = ref<HTMLElement | null>(null);\nconst query = ref<string>(\"\");\nconst computedPlaceholder = computed(() => {\n return props.placeholder;\n});\n\nconst modelValueNormalized = computed(() =>\n [].concat(props.modelValue).filter(isNotNil)\n);\n\n/**\n * Indexes modelValue to a map so when can easily know which values are selected\n */\nconst modelValueIndexed = computed(() => {\n let map: { [key: string]: number } = {};\n modelValueNormalized.value.forEach((value: any, index: number) => {\n map[JSON.stringify(value)] = index;\n });\n return {\n get: (value: any) => map[JSON.stringify(value)],\n };\n});\n\n/**\n * Applies a class when the user is inside this whole component.\n * We cannot use focus within as it doesn't work for elements that are teleported.\n * Also we cannot use the <input/> if we phisically move focus to the options so\n * we track it manually.\n */\nconst active = ref(false);\n\nconst focusedIndex = ref<null | number>(null);\n\nconst onInputKeyup = (event: KeyboardEvent) => {\n emit(\"keyup\", event);\n if (props.readonly || props.disabled) {\n event.preventDefault();\n return;\n }\n if (event.key === props.divider) {\n if (query.value[query.value.length - 1] === event.key) {\n query.value = query.value.slice(0, query.value.length - 1);\n }\n if (!query.value) return;\n focusedIndex.value = null;\n const currentIndex = modelValueIndexed.value.get(query.value);\n if (isNil(currentIndex)) selectValue(query.value);\n else emit(\"duplicate\", query.value);\n query.value = \"\";\n } else if (event.key === \"ArrowLeft\") {\n if (focusedIndex.value === null)\n focusedIndex.value = modelValueNormalized.value.length - 1;\n else if (focusedIndex.value === 0) focusedIndex.value = null;\n else focusedIndex.value--;\n } else if (event.key === \"ArrowRight\") {\n if (focusedIndex.value === null) focusedIndex.value = 1;\n else if (focusedIndex.value === modelValueNormalized.value.length - 1)\n focusedIndex.value = null;\n else focusedIndex.value++;\n } else if (event.key === \"Backspace\") {\n if (query.value) return;\n if (isNotNil(focusedIndex.value)) {\n removeValue(focusedIndex.value);\n focusedIndex.value = clamp(\n focusedIndex.value,\n 0,\n modelValueNormalized.value.length - 2\n );\n if (modelValueNormalized.value.length === 1) focusedIndex.value = null;\n } else focusedIndex.value = modelValueNormalized.value.length - 1;\n } else if (event.key === \"Tab\" || event.key === \"Escape\") {\n focusedIndex.value = null;\n }\n};\n\nconst selectValue = (text: string) => {\n if (props.multiple) emit(\"update:modelValue\", props.modelValue.concat(text));\n else emit(\"update:modelValue\", text);\n};\n\nconst removeValue = (indexOrString: number | string) => {\n if (typeof indexOrString === \"number\") {\n if (props.multiple)\n emit(\"update:modelValue\", drop(props.modelValue, 1, indexOrString));\n else emit(\"update:modelValue\", null);\n } else {\n const currentIndex = modelValueIndexed.value.get(query.value);\n removeValue(currentIndex);\n }\n};\n\nconst onInputFocus = (event: FocusEvent) => {\n emit(\"focus\", event);\n active.value = true;\n document.addEventListener(\"click\", onClickOutside);\n document.addEventListener(\"focusin\", onFocusOutside);\n if (input.value instanceof HTMLInputElement) input.value.select();\n};\n\n/**\n * When clicking on the outside container seamlessly move focus to the input and open the panel\n */\nconst onOuterContainerClick = (event: MouseEvent) => {\n emit(\"click\", event);\n if (props.disabled || props.readonly) return;\n if (input.value instanceof HTMLElement) {\n input.value.focus();\n }\n};\n\n/**\n * On click outside of the container close the panel, remove active state.\n * In multiple selection clear query after a timeout\n */\nconst onClickOutside = (event: Event) => {\n if (event.target instanceof Node) {\n if (outerContainer.value) {\n if (!outerContainer.value.contains(event.target)) {\n emit(\"inactive\");\n document.removeEventListener(\"click\", onClickOutside);\n active.value = false;\n if (props.multiple)\n wait(500).then(() => {\n query.value = \"\";\n });\n return;\n }\n }\n }\n};\n\nconst onFocusOutside = (event: FocusEvent) => {\n if (event.target instanceof Node) {\n if (outerContainer.value) {\n if (!outerContainer.value.contains(event.target)) {\n emit(\"inactive\");\n document.removeEventListener(\"focusin\", onFocusOutside);\n active.value = false;\n if (props.multiple)\n wait(500).then(() => {\n query.value = \"\";\n });\n return;\n }\n }\n }\n};\n\nconst eventListeners = {\n onBlur: (event: FocusEvent) => emit(\"blur\", event),\n onChange: (event: Event) => emit(\"change\", event),\n onKeydown: (event: KeyboardEvent) => {\n if (event.key === \"Enter\" && props.divider === \"Enter\") {\n event.preventDefault();\n }\n emit(\"keydown\", event);\n },\n onInput: (event: Event) => emit(\"input\", event),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass({\n 'bb-base-tag': true,\n 'bb-base-tag--active': active.value,\n 'bb-base-tag--disabled': _ctx.disabled,\n 'bb-base-tag--errors': _ctx.hasErrors,\n 'bb-base-tag--readonly': _ctx.readonly,\n }),\n onClick: onOuterContainerClick,\n ref_key: \"outerContainer\",\n ref: outerContainer\n }, [\n _renderSlot(_ctx.$slots, \"prepend-outer\"),\n _createElementVNode(\"span\", {\n class: \"bb-base-tag__inner-container\",\n ref_key: \"innerContainer\",\n ref: innerContainer\n }, [\n _renderSlot(_ctx.$slots, \"prepend\"),\n _createElementVNode(\"span\", _hoisted_1, [\n (_ctx.comma)\n ? (_openBlock(true), _createElementBlock(_Fragment, { key: 0 }, _renderList(modelValueNormalized.value, (option, index) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass({\n 'bb-base-tag__selected': true,\n 'bb-base-tag__selected--comma': true,\n 'bb-base-tag__selected--focused': index === focusedIndex.value,\n }),\n key: option\n }, _toDisplayString(option) + _toDisplayString(index < modelValueNormalized.value.length - 1 ? \",\" : \"\"), 3))\n }), 128))\n : (_openBlock(true), _createElementBlock(_Fragment, { key: 1 }, _renderList(modelValueNormalized.value, (option, index) => {\n return (_openBlock(), _createBlock(BbChip, {\n class: _normalizeClass({\n 'bb-base-tag__selected': true,\n 'bb-base-tag__selected--chip': true,\n 'bb-base-tag__selected--focused': index === focusedIndex.value,\n }),\n clearable: true,\n key: option,\n text: option,\n \"onClick:clear\": ($event: any) => (removeValue(index))\n }, null, 8, [\"class\", \"text\", \"onClick:clear\"]))\n }), 128)),\n _withDirectives(_createElementVNode(\"input\", _mergeProps({\n autocomplete: _ctx.autocomplete,\n autofocus: _ctx.autofocus,\n class: 'bb-base-tag__text-input',\n disabled: _ctx.disabled,\n id: _ctx.id,\n placeholder: computedPlaceholder.value,\n readonly: _ctx.readonly,\n type: 'text',\n onKeyup: onInputKeyup,\n onFocus: onInputFocus\n }, eventListeners, {\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((query).value = $event)),\n ref_key: \"input\",\n ref: input\n }), null, 16, _hoisted_2), [\n [_vModelDynamic, query.value]\n ])\n ]),\n _renderSlot(_ctx.$slots, \"append\")\n ], 512),\n _renderSlot(_ctx.$slots, \"append-outer\")\n ], 2))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","__emit","props","emit","outerContainer","ref","innerContainer","input","query","computedPlaceholder","computed","modelValueNormalized","isNotNil","modelValueIndexed","map","value","index","active","focusedIndex","onInputKeyup","event","currentIndex","isNil","selectValue","removeValue","clamp","text","indexOrString","drop","onInputFocus","onClickOutside","onFocusOutside","onOuterContainerClick","wait","eventListeners","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_renderSlot","_createElementVNode","_Fragment","_renderList","option","_toDisplayString","_createBlock","BbChip","$event","_withDirectives","_mergeProps","_vModelDynamic"],"mappings":";;;;;;;;AAGA,MAAMA,IAAa,EAAE,OAAO,kCACtBC,IAAa,CAAC,gBAAgB,aAAa,YAAY,MAAM,eAAe,UAAU,GA6GhEC,KAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,cAAc,CAAC;AAAA,IACf,WAAW,CAAC;AAAA,IACZ,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,SAAS,EAAE,SAAS,QAAQ;AAAA,IAC5B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,YAAY,CAAC;AAAA,IACb,UAAU,EAAE,MAAM,SAAS,SAAS,GAAK;AAAA,IACzC,MAAM,CAAC;AAAA,IACP,aAAa,CAAC;AAAA,IACd,UAAU,CAAC;AAAA,EACb;AAAA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