@useinsider/ab-components 0.0.7 → 0.0.9

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 (28) hide show
  1. package/dist/{FilledCautionTriangle-Den_JoCB.js → FilledCautionTriangle-B-VZeFjY.js} +2 -2
  2. package/dist/{FilledCautionTriangle-Den_JoCB.js.map → FilledCautionTriangle-B-VZeFjY.js.map} +1 -1
  3. package/dist/{FilledCheckCircle-BR6BSl0B.js → FilledCheckCircle-DeSb_9a3.js} +2 -2
  4. package/dist/{FilledCheckCircle-BR6BSl0B.js.map → FilledCheckCircle-DeSb_9a3.js.map} +1 -1
  5. package/dist/{FilledErrorBox-CzGGEQKK.js → FilledErrorBox-C8QwS9_f.js} +2 -2
  6. package/dist/{FilledErrorBox-CzGGEQKK.js.map → FilledErrorBox-C8QwS9_f.js.map} +1 -1
  7. package/dist/{FilledInfoCircle-DD2GTz7X.js → FilledInfoCircle-1M2EFdfF.js} +2 -2
  8. package/dist/{FilledInfoCircle-DD2GTz7X.js.map → FilledInfoCircle-1M2EFdfF.js.map} +1 -1
  9. package/dist/{LineCheck-D7vZtNt6.js → LineCheck-D_eespyM.js} +2 -2
  10. package/dist/{LineCheck-D7vZtNt6.js.map → LineCheck-D_eespyM.js.map} +1 -1
  11. package/dist/{LoadingCircle-Bzwjmwjs.js → LoadingCircle-D1WUSicd.js} +2 -2
  12. package/dist/{LoadingCircle-Bzwjmwjs.js.map → LoadingCircle-D1WUSicd.js.map} +1 -1
  13. package/dist/{SmartIcon-D_SgnXu7.js → SmartIcon-CMaePamQ.js} +2 -2
  14. package/dist/{SmartIcon-D_SgnXu7.js.map → SmartIcon-CMaePamQ.js.map} +1 -1
  15. package/dist/ab-components.cjs.js +1 -1
  16. package/dist/ab-components.cjs.js.map +1 -1
  17. package/dist/ab-components.css +1 -1
  18. package/dist/ab-components.es.js +1 -1
  19. package/dist/ab-components.iife.js +1 -1
  20. package/dist/ab-components.iife.js.map +1 -1
  21. package/dist/ab-components.umd.js +1 -1
  22. package/dist/ab-components.umd.js.map +1 -1
  23. package/dist/index-CtEelMqj.js +550 -0
  24. package/dist/index-CtEelMqj.js.map +1 -0
  25. package/dist/index.d.ts +9 -6
  26. package/package.json +1 -1
  27. package/dist/index-CzHOuBwI.js +0 -537
  28. package/dist/index-CzHOuBwI.js.map +0 -1
@@ -1,537 +0,0 @@
1
- import { defineComponent as B, computed as S, openBlock as s, createElementBlock as p, normalizeClass as a, unref as e, createBlock as H, createCommentVNode as h, toDisplayString as g, ref as k, reactive as T, onMounted as U, Fragment as O, createElementVNode as C, withDirectives as D, normalizeStyle as E, withModifiers as ee, vModelText as te, renderList as A, defineAsyncComponent as I, resolveDynamicComponent as ne, createVNode as oe } from "vue";
2
- const le = "_button__size_default_16zzc_1", re = "_button__size_small_16zzc_8", _e = "_button_16zzc_1", ae = "_button__label_16zzc_193", se = "_button__solid_16zzc_205", ue = "_fill_16zzc_1125", x = {
3
- button__size_default: le,
4
- button__size_small: re,
5
- button: _e,
6
- button__label: ae,
7
- "button__solid-primary": "_button__solid-primary_16zzc_205",
8
- "no-hover-effect": "_no-hover-effect_16zzc_212",
9
- "button--selected": "_button--selected_16zzc_234",
10
- "button__solid-subtle-primary": "_button__solid-subtle-primary_16zzc_241",
11
- "button__solid-secondary": "_button__solid-secondary_16zzc_277",
12
- "button__solid-danger": "_button__solid-danger_16zzc_313",
13
- "button__solid-warning": "_button__solid-warning_16zzc_349",
14
- "button__solid-smart": "_button__solid-smart_16zzc_385",
15
- "button__ghost-primary": "_button__ghost-primary_16zzc_421",
16
- "button__ghost-subtle-primary": "_button__ghost-subtle-primary_16zzc_457",
17
- "button__ghost-secondary": "_button__ghost-secondary_16zzc_493",
18
- "button__ghost-danger": "_button__ghost-danger_16zzc_529",
19
- "button__ghost-warning": "_button__ghost-warning_16zzc_565",
20
- "button__ghost-smart": "_button__ghost-smart_16zzc_601",
21
- "button__text-primary": "_button__text-primary_16zzc_637",
22
- "button__text-text": "_button__text-text_16zzc_673",
23
- "button__text-subtle-primary": "_button__text-subtle-primary_16zzc_709",
24
- "button__text-secondary": "_button__text-secondary_16zzc_745",
25
- "button__text-danger": "_button__text-danger_16zzc_781",
26
- "button__text-warning": "_button__text-warning_16zzc_817",
27
- "button__text-smart": "_button__text-smart_16zzc_853",
28
- "button__outline-primary": "_button__outline-primary_16zzc_889",
29
- "button__outline-subtle-primary": "_button__outline-subtle-primary_16zzc_926",
30
- "button__outline-secondary": "_button__outline-secondary_16zzc_963",
31
- "button__outline-danger": "_button__outline-danger_16zzc_1000",
32
- "button__outline-warning": "_button__outline-warning_16zzc_1037",
33
- "button__outline-smart": "_button__outline-smart_16zzc_1074",
34
- button__solid: se,
35
- fill: ue
36
- }, ie = ["disabled"], lt = /* @__PURE__ */ B({
37
- __name: "Button",
38
- props: {
39
- variant: {},
40
- color: {},
41
- size: { default: "default" },
42
- leftIconName: {},
43
- rightIconName: {},
44
- loadingStatus: { type: Boolean, default: !1 },
45
- successStatus: { type: Boolean, default: !1 },
46
- label: {},
47
- disabled: { type: Boolean, default: !1 },
48
- fill: { type: Boolean, default: !1 }
49
- },
50
- emits: ["click"],
51
- setup(u, { emit: i }) {
52
- const r = u, t = i, _ = (l) => {
53
- r.disabled || t("click", l);
54
- }, m = S(() => r.loadingStatus ? "LoadingCircle" : r.successStatus ? "LineCheck" : r.leftIconName);
55
- return (l, n) => (s(), p("button", {
56
- class: a([
57
- e(x).button,
58
- e(x)[`button__${l.variant}`],
59
- e(x)[`button__${l.variant}-${l.color}`],
60
- e(x)[`button__size_${l.size}`],
61
- { [e(x).fill]: l.fill }
62
- ]),
63
- disabled: r.disabled,
64
- onClick: _
65
- }, [
66
- m.value ? (s(), H(e(V), {
67
- key: 0,
68
- name: m.value
69
- }, null, 8, ["name"])) : h("", !0),
70
- l.label ? (s(), p("span", {
71
- key: 1,
72
- class: a(e(x).button__label)
73
- }, g(l.label), 3)) : h("", !0),
74
- l.rightIconName ? (s(), H(e(V), {
75
- key: 2,
76
- name: l.rightIconName
77
- }, null, 8, ["name"])) : h("", !0)
78
- ], 10, ie));
79
- }
80
- }), ce = {
81
- mounted(u, i) {
82
- u.clickOutsideEvent = (r) => {
83
- [u, ...i.value.exclude || []].some((_) => _ && (_ === r.target || _.contains(r.target))) || i.value.handler();
84
- }, document.addEventListener("click", u.clickOutsideEvent);
85
- },
86
- unmounted(u) {
87
- u.clickOutsideEvent && document.removeEventListener("click", u.clickOutsideEvent);
88
- }
89
- }, de = (u, i) => {
90
- var t;
91
- let r = 0;
92
- for (const _ of u)
93
- if (_.toLowerCase() === ((t = i[r]) == null ? void 0 : t.toLowerCase()) && r++, r === i.length)
94
- return !0;
95
- return !1;
96
- }, pe = (u, i, r) => {
97
- if (!r.trim())
98
- return u;
99
- const t = r.toLowerCase();
100
- return u.filter((_) => {
101
- const m = String(_[i]);
102
- return de(m.toLowerCase(), t);
103
- }).sort((_, m) => {
104
- const l = String(_[i]).toLowerCase(), n = String(m[i]).toLowerCase();
105
- return l === t ? -1 : n === t ? 1 : l.startsWith(t) && !n.startsWith(t) ? -1 : !l.startsWith(t) && n.startsWith(t) ? 1 : l.length - n.length;
106
- });
107
- }, me = "_dropdown_olekc_1", be = "_menu_olekc_1", fe = "_dropdown__valueContent_olekc_182", he = "_dropdown__label_olekc_193", ge = "_dropdown__value_olekc_182", ve = "_dropdown__placeholder_olekc_200", we = "_dropdown__arrowIcon_olekc_208", ze = "_menu__searchContainer_olekc_223", ye = "_menu__searchInputWrap_olekc_227", ke = "_menu__searchInput_olekc_227", Ce = "_menu__errorMessage_olekc_249", Ie = "_menu__addButton_olekc_256", $e = "_menu__itemContainer_olekc_264", xe = "_menu__item_olekc_264", b = {
108
- dropdown: me,
109
- menu: be,
110
- dropdown__valueContent: fe,
111
- "dropdown__valueContent--open": "_dropdown__valueContent--open_olekc_190",
112
- dropdown__label: he,
113
- dropdown__value: ge,
114
- dropdown__placeholder: ve,
115
- dropdown__arrowIcon: we,
116
- menu__searchContainer: ze,
117
- menu__searchInputWrap: ye,
118
- menu__searchInput: ke,
119
- "menu__searchInput--error": "_menu__searchInput--error_olekc_246",
120
- menu__errorMessage: Ce,
121
- menu__addButton: Ie,
122
- menu__itemContainer: $e,
123
- menu__item: xe,
124
- "menu__item--active": "_menu__item--active_olekc_302"
125
- }, Be = ["for"], Me = ["placeholder"], Le = ["onClick"], rt = /* @__PURE__ */ B({
126
- __name: "DropdownMenu",
127
- props: {
128
- id: {},
129
- label: {},
130
- modelValue: { default: "" },
131
- menuHeight: { default: 154 },
132
- placeholder: {},
133
- addable: { type: Boolean },
134
- addButtonText: {},
135
- searchable: { type: Boolean },
136
- searchPlaceHolder: {},
137
- items: {},
138
- validateAddItem: { type: Function, default: () => null }
139
- },
140
- emits: ["update:modelValue", "add-error", "item-added", "select-item"],
141
- setup(u, { emit: i }) {
142
- const r = ce, t = u, _ = i, m = k(), l = k(), n = k(!1), o = k(null), w = k(""), c = k(null), $ = k({ x: 0, y: 0, width: 0, shouldOpenUp: !1, height: t.menuHeight }), M = T([...t.items]), L = T([...t.items]), N = () => {
143
- if (!m.value)
144
- return;
145
- const { offsetTop: d, offsetLeft: f, offsetWidth: v } = m.value, q = window.innerHeight, F = d + m.value.offsetHeight, R = F + t.menuHeight > q;
146
- $.value = {
147
- x: f + window.scrollX,
148
- y: R ? d + window.scrollY : F + window.scrollY,
149
- width: v,
150
- shouldOpenUp: R,
151
- height: t.menuHeight
152
- };
153
- }, Y = () => {
154
- N(), n.value = !n.value;
155
- }, W = () => {
156
- c.value = null, w.value = "", M.splice(0, M.length, ...L);
157
- }, P = () => {
158
- n.value = !1, W();
159
- }, Q = (d) => {
160
- o.value = d, _("select-item", d), _("update:modelValue", d.value), P();
161
- }, X = () => {
162
- const d = w.value.trim(), f = t.validateAddItem(d, L);
163
- if (f) {
164
- c.value = f, _("add-error", f);
165
- return;
166
- }
167
- const v = {
168
- text: d,
169
- value: d
170
- };
171
- L.push(v), W(), _("item-added", v);
172
- }, Z = () => {
173
- const d = pe(L, "text", w.value);
174
- M.splice(0, M.length, ...d);
175
- }, J = () => {
176
- c.value = "";
177
- }, K = S(() => ({
178
- top: $.value.shouldOpenUp ? `${$.value.y - 10}px` : `${$.value.y}px`,
179
- left: `${$.value.x}px`,
180
- width: `${$.value.width}px`,
181
- height: `${t.menuHeight}px`
182
- }));
183
- U(() => {
184
- if (N(), t.modelValue) {
185
- const d = L.find((f) => f.value === t.modelValue);
186
- d && (o.value = d);
187
- }
188
- });
189
- const j = S(() => o.value ? o.value.text : "");
190
- return (d, f) => (s(), p(O, null, [
191
- C("div", {
192
- ref_key: "dropdownRef",
193
- ref: m,
194
- class: a(e(b).dropdown)
195
- }, [
196
- d.label ? (s(), p("label", {
197
- key: 0,
198
- class: a(e(b).dropdown__label),
199
- for: d.id
200
- }, g(d.label), 11, Be)) : h("", !0),
201
- C("button", {
202
- class: a([
203
- e(b).dropdown__valueContent,
204
- {
205
- [e(b)["dropdown__valueContent--open"]]: n.value
206
- }
207
- ]),
208
- onClick: Y
209
- }, [
210
- C("span", {
211
- class: a(e(b).dropdown__value)
212
- }, g(j.value), 3),
213
- d.placeholder && !j.value ? (s(), p("span", {
214
- key: 0,
215
- class: a(e(b).dropdown__placeholder)
216
- }, g(d.placeholder), 3)) : h("", !0),
217
- (s(), p("svg", {
218
- fill: "none",
219
- height: "17",
220
- viewBox: "0 0 16 17",
221
- width: "16",
222
- xmlns: "http://www.w3.org/2000/svg",
223
- class: a(e(b).dropdown__arrowIcon)
224
- }, f[2] || (f[2] = [
225
- C("path", {
226
- d: "M8 11.2021L4.5359 6.70215L11.4641 6.70215L8 11.2021Z",
227
- fill: "#91949F"
228
- }, null, -1)
229
- ]), 2))
230
- ], 2)
231
- ], 2),
232
- n.value ? D((s(), p("div", {
233
- key: 0,
234
- ref_key: "menuRef",
235
- ref: l,
236
- class: a(e(b).menu),
237
- style: E(K.value),
238
- onClick: f[1] || (f[1] = ee(() => {
239
- }, ["prevent"]))
240
- }, [
241
- t.searchable ? (s(), p("div", {
242
- key: 0,
243
- class: a(e(b).menu__searchContainer)
244
- }, [
245
- C("div", {
246
- class: a(e(b).menu__searchInputWrap)
247
- }, [
248
- D(C("input", {
249
- type: "text",
250
- class: a([
251
- e(b).menu__searchInput,
252
- {
253
- [e(b)["menu__searchInput--error"]]: c.value
254
- }
255
- ]),
256
- placeholder: d.searchPlaceHolder,
257
- "onUpdate:modelValue": f[0] || (f[0] = (v) => w.value = v),
258
- onFocus: J,
259
- onInput: Z
260
- }, null, 42, Me), [
261
- [te, w.value]
262
- ]),
263
- c.value ? (s(), p("p", {
264
- key: 0,
265
- class: a(e(b).menu__errorMessage)
266
- }, g(c.value), 3)) : h("", !0)
267
- ], 2),
268
- t.addable ? (s(), p("button", {
269
- key: 0,
270
- class: a(e(b).menu__addButton),
271
- onClick: X
272
- }, g(d.addButtonText), 3)) : h("", !0)
273
- ], 2)) : h("", !0),
274
- C("ul", {
275
- class: a(e(b).menu__itemContainer)
276
- }, [
277
- (s(!0), p(O, null, A(M, (v, q) => (s(), p("li", {
278
- key: `${v.value}-${q}`,
279
- class: a([
280
- e(b).menu__item,
281
- {
282
- [e(b)["menu__item--active"]]: o.value && v.value === o.value.value
283
- }
284
- ]),
285
- onClick: (F) => Q(v)
286
- }, g(v.text), 11, Le))), 128))
287
- ], 2)
288
- ], 6)), [
289
- [e(r), { handler: P, exclude: [m.value, l.value] }]
290
- ]) : h("", !0)
291
- ], 64));
292
- }
293
- }), Se = {
294
- FilledErrorBox: I(() => import("./FilledErrorBox-CzGGEQKK.js")),
295
- LineCheck: I(() => import("./LineCheck-D7vZtNt6.js")),
296
- FilledCheckCircle: I(() => import("./FilledCheckCircle-BR6BSl0B.js")),
297
- LoadingCircle: I(() => import("./LoadingCircle-Bzwjmwjs.js")),
298
- FilledInfoCircle: I(() => import("./FilledInfoCircle-DD2GTz7X.js")),
299
- SmartIcon: I(() => import("./SmartIcon-D_SgnXu7.js")),
300
- FilledCautionTriangle: I(() => import("./FilledCautionTriangle-Den_JoCB.js"))
301
- }, He = /* @__PURE__ */ B({
302
- __name: "Icon",
303
- props: {
304
- name: {},
305
- size: { default: 16 },
306
- color: {}
307
- },
308
- setup(u) {
309
- const i = u, r = S(() => typeof i.size == "number" ? `${i.size}px` : i.size);
310
- return (t, _) => (s(), H(ne(e(Se)[t.name]), {
311
- class: "icon",
312
- style: E({ width: r.value, height: r.value, fill: i.color || "currentColor" })
313
- }, null, 8, ["style"]));
314
- }
315
- }), Ve = (u, i) => {
316
- const r = u.__vccOpts || u;
317
- for (const [t, _] of i)
318
- r[t] = _;
319
- return r;
320
- }, V = /* @__PURE__ */ Ve(He, [["__scopeId", "data-v-3e9c3b20"]]), qe = "_container_2joy4_1", Fe = "_container__text_2joy4_187", Ge = "_container__default_2joy4_191", Oe = "_container__warning_2joy4_199", Ee = "_container__alert_2joy4_207", Ne = "_container__success_2joy4_215", G = {
321
- container: qe,
322
- container__text: Fe,
323
- container__default: Ge,
324
- container__warning: Oe,
325
- container__alert: Ee,
326
- container__success: Ne
327
- }, _t = /* @__PURE__ */ B({
328
- __name: "OnPageMessage",
329
- props: {
330
- variant: { default: "default" },
331
- text: {}
332
- },
333
- setup(u) {
334
- const i = u, r = S(() => {
335
- switch (i.variant) {
336
- case "alert":
337
- return "FilledErrorBox";
338
- case "warning":
339
- return "FilledCautionTriangle";
340
- case "success":
341
- return "FilledCheckCircle";
342
- default:
343
- return "FilledInfoCircle";
344
- }
345
- });
346
- return (t, _) => (s(), p("div", {
347
- class: a([
348
- e(G).container,
349
- e(G)[`container__${t.variant}`]
350
- ])
351
- }, [
352
- oe(V, {
353
- name: r.value,
354
- size: 24
355
- }, null, 8, ["name"]),
356
- C("span", {
357
- class: a(e(G).container__text)
358
- }, g(t.text), 3)
359
- ], 2));
360
- }
361
- }), We = "_button__size_default_qxh1r_1", Pe = "_button__size_small_qxh1r_8", je = "_button_qxh1r_1", Re = "_button__label_qxh1r_191", Te = "_button__solid_qxh1r_328", De = "_segmentGroup_qxh1r_335", Ue = "_fill_qxh1r_357", z = {
362
- button__size_default: We,
363
- button__size_small: Pe,
364
- button: je,
365
- button__label: Re,
366
- "button--primary": "_button--primary_qxh1r_206",
367
- "button--selected": "_button--selected_qxh1r_216",
368
- "button--secondary": "_button--secondary_qxh1r_229",
369
- "button--danger": "_button--danger_qxh1r_252",
370
- "button--warning": "_button--warning_qxh1r_275",
371
- "button--smart": "_button--smart_qxh1r_298",
372
- button__solid: Te,
373
- segmentGroup: De,
374
- "segmentGroup--vertical": "_segmentGroup--vertical_qxh1r_338",
375
- "segmentGroup--horizontal": "_segmentGroup--horizontal_qxh1r_347",
376
- fill: Ue
377
- }, Ae = ["disabled", "onClick"], at = /* @__PURE__ */ B({
378
- __name: "SegmentButton",
379
- props: {
380
- color: {},
381
- size: { default: "default" },
382
- align: { default: "horizontal" },
383
- disabled: { type: Boolean, default: !1 },
384
- segments: {},
385
- fill: { type: Boolean }
386
- },
387
- emits: ["click"],
388
- setup(u, { emit: i }) {
389
- const r = u, t = i, _ = k(""), m = (l) => {
390
- r.disabled || l.disabled || (_.value = l.value, t("click", l.value));
391
- };
392
- return (l, n) => (s(), p("div", {
393
- class: a([
394
- e(z).segmentGroup,
395
- e(z)[`segmentGroup--${l.align}`],
396
- { [e(z).fill]: l.fill }
397
- ])
398
- }, [
399
- (s(!0), p(O, null, A(l.segments, (o, w) => (s(), p("button", {
400
- key: `${o.value}-${w}`,
401
- class: a([
402
- e(z).button,
403
- e(z)[`button--${l.color}`],
404
- e(z)[`button__size_${l.size}`],
405
- e(z).fill,
406
- {
407
- [e(z)["button--selected"]]: o.value === _.value
408
- }
409
- ]),
410
- disabled: o.disabled || r.disabled,
411
- onClick: (c) => m(o)
412
- }, [
413
- o.icon ? (s(), H(e(V), {
414
- key: 0,
415
- name: o.icon
416
- }, null, 8, ["name"])) : h("", !0),
417
- o.label ? (s(), p("span", {
418
- key: 1,
419
- class: a(e(z).button__label)
420
- }, g(o.label), 3)) : h("", !0)
421
- ], 10, Ae))), 128))
422
- ], 2));
423
- }
424
- }), Ye = "_wrapper_1pges_169", Qe = "_wrapper__field_1pges_174", Xe = "_wrapper__label_1pges_208", Ze = "_wrapper__bottom_1pges_216", Je = "_wrapper__errorMessage_1pges_220", Ke = "_wrapper__counter_1pges_225", y = {
425
- wrapper: Ye,
426
- wrapper__field: Qe,
427
- wrapper__label: Xe,
428
- wrapper__bottom: Ze,
429
- wrapper__errorMessage: Je,
430
- wrapper__counter: Ke,
431
- "wrapper--error": "_wrapper--error_1pges_231"
432
- }, et = ["for"], tt = ["id", "maxlength", "name", "placeholder", "value"], nt = ["id", "maxlength", "name", "placeholder", "value"], st = /* @__PURE__ */ B({
433
- __name: "TextInput",
434
- props: {
435
- id: {},
436
- name: {},
437
- modelValue: { default: "" },
438
- label: { default: "" },
439
- placeholder: { default: "" },
440
- maxLength: { default: void 0 },
441
- maxHeight: { default: void 0 },
442
- error: { default: "" },
443
- multiline: { type: Boolean, default: !1 },
444
- autoGrow: { type: Boolean, default: !1 },
445
- counter: { type: Boolean }
446
- },
447
- emits: ["update:modelValue", "input", "change", "paste", "focus", "blur"],
448
- setup(u, { emit: i }) {
449
- const r = u, t = i, _ = k(null), m = () => {
450
- if (r.autoGrow && _.value) {
451
- _.value.style.height = "";
452
- const n = Math.min(_.value.scrollHeight, r.maxHeight || _.value.scrollHeight);
453
- _.value.style.height = `${n}px`;
454
- }
455
- }, l = (n) => {
456
- const o = n.target;
457
- t("input", n), t("update:modelValue", o.value), m();
458
- };
459
- return U(() => {
460
- m();
461
- }), (n, o) => {
462
- var w;
463
- return s(), p("div", {
464
- class: a(e(y).wrapper)
465
- }, [
466
- n.label ? (s(), p("label", {
467
- key: 0,
468
- class: a(e(y).wrapper__label),
469
- for: n.id
470
- }, g(n.label), 11, et)) : h("", !0),
471
- n.multiline ? (s(), p("textarea", {
472
- key: 1,
473
- id: n.id,
474
- ref_key: "textareaRef",
475
- ref: _,
476
- class: a([
477
- e(y).wrapper__field,
478
- {
479
- [e(y)["wrapper--error"]]: n.error
480
- }
481
- ]),
482
- maxlength: n.maxLength,
483
- name: n.name,
484
- placeholder: n.placeholder,
485
- style: E(n.maxHeight ? { maxHeight: `${n.maxHeight}px` } : void 0),
486
- value: n.modelValue,
487
- onBlur: o[0] || (o[0] = (c) => t("blur", c)),
488
- onChange: o[1] || (o[1] = (c) => n.$emit("change", c)),
489
- onFocus: o[2] || (o[2] = (c) => t("focus", c)),
490
- onInput: l,
491
- onPaste: o[3] || (o[3] = (c) => t("paste", c))
492
- }, null, 46, tt)) : (s(), p("input", {
493
- key: 2,
494
- id: n.id,
495
- type: "text",
496
- class: a([
497
- e(y).wrapper__field,
498
- {
499
- [e(y)["wrapper--error"]]: n.error
500
- }
501
- ]),
502
- maxlength: n.maxLength,
503
- name: n.name,
504
- placeholder: n.placeholder,
505
- value: n.modelValue,
506
- onBlur: o[4] || (o[4] = (c) => t("blur", c)),
507
- onChange: o[5] || (o[5] = (c) => n.$emit("change", c)),
508
- onFocus: o[6] || (o[6] = (c) => t("focus", c)),
509
- onInput: l,
510
- onPaste: o[7] || (o[7] = (c) => t("paste", c))
511
- }, null, 42, nt)),
512
- C("div", {
513
- class: a(e(y).wrapper__bottom)
514
- }, [
515
- n.error ? (s(), p("div", {
516
- key: 0,
517
- class: a(e(y).wrapper__errorMessage)
518
- }, g(n.error), 3)) : h("", !0),
519
- n.counter ? (s(), p("div", {
520
- key: 1,
521
- class: a(e(y).wrapper__counter)
522
- }, g(((w = n.modelValue) == null ? void 0 : w.toString().length) || 0), 3)) : h("", !0)
523
- ], 2)
524
- ], 2);
525
- };
526
- }
527
- });
528
- export {
529
- V as I,
530
- Ve as _,
531
- lt as a,
532
- rt as b,
533
- _t as c,
534
- at as d,
535
- st as e
536
- };
537
- //# sourceMappingURL=index-CzHOuBwI.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-CzHOuBwI.js","sources":["../src/components/Button/Button.vue","../src/directives/clickOutside.ts","../src/utils/search.ts","../src/components/Dropdown/DropdownMenu.vue","../src/components/Icon/icons/index.ts","../src/components/Icon/Icon.vue","../src/components/OnPageMessage/OnPageMessage.vue","../src/components/SegmentButton/SegmentButton.vue","../src/components/TextInput/TextInput.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from 'vue';\nimport type { IconNames } from '@/components/Icon/types';\nimport { Icon } from '@/index';\nimport styles from './Button.module.scss';\n\ninterface ButtonProps {\n variant: 'solid' | 'ghost' | 'text' | 'outline';\n color: 'primary' | 'subtle-primary' | 'secondary' | 'danger' | 'warning' | 'smart';\n size?: 'default' | 'small';\n leftIconName?: IconNames;\n rightIconName?: IconNames;\n loadingStatus?: boolean;\n successStatus?: boolean;\n label?: string;\n disabled?: boolean;\n fill?: boolean;\n}\n\nconst props = withDefaults(defineProps<ButtonProps>(), {\n loadingStatus: false,\n successStatus: false,\n disabled: false,\n fill: false,\n size: 'default',\n});\n\nconst emit = defineEmits<{\n click: [event: MouseEvent];\n}>();\n\nconst onClick = (event: MouseEvent) => {\n if (props.disabled) {\n return;\n }\n\n emit('click', event);\n};\n\nconst leftIcon = computed<IconNames | undefined>(() => {\n if (props.loadingStatus) {\n return 'LoadingCircle';\n } else if (props.successStatus) {\n return 'LineCheck';\n }\n\n return props.leftIconName;\n});\n</script>\n\n<template>\n <button\n :class=\"[\n styles.button,\n styles[`button__${variant}`],\n styles[`button__${variant}-${color}`],\n styles[`button__size_${size}`],\n { [styles.fill]: fill },\n ]\"\n :disabled=\"props.disabled\"\n @click=\"onClick\">\n <Icon\n v-if=\"leftIcon\"\n :name=\"leftIcon\" />\n <span\n v-if=\"label\"\n :class=\"styles.button__label\">\n {{ label }}\n </span>\n <Icon\n v-if=\"rightIconName\"\n :name=\"rightIconName\" />\n </button>\n</template>\n","import type { DirectiveBinding } from 'vue';\n\ninterface ClickOutsideElement extends HTMLElement {\n clickOutsideEvent?: (event: Event) => void;\n}\n\nexport default {\n mounted(el: ClickOutsideElement, binding: DirectiveBinding<{ handler: () => void; exclude?: HTMLElement[] }>) {\n el.clickOutsideEvent = (event: Event) => {\n const isClickInside = [el, ...(binding.value.exclude || [])].some(element => {\n return element && (element === event.target || element.contains(event.target as Node))\n });\n\n if (!isClickInside) {\n binding.value.handler(); // Close handler\n }\n };\n\n document.addEventListener('click', el.clickOutsideEvent);\n },\n unmounted(el: ClickOutsideElement) {\n if (el.clickOutsideEvent) {\n document.removeEventListener('click', el.clickOutsideEvent);\n }\n },\n};","const isFuzzyMatch = (choiceValue: string, searchTerm: string): boolean => {\n let searchIndex = 0;\n for (const char of choiceValue) {\n if (char.toLowerCase() === searchTerm[searchIndex]?.toLowerCase()) {\n searchIndex++;\n }\n if (searchIndex === searchTerm.length) {\n return true;\n }\n }\n return false;\n};\n\n\nexport const fuzzySearch = <T>(\n choices: T[],\n key: keyof T,\n searchTerm: string,\n): T[] => {\n if (!searchTerm.trim()) {\n return choices;\n }\n\n const normalizedSearchTerm = searchTerm.toLowerCase();\n\n return choices\n .filter(choice => {\n const value = String(choice[key]);\n\n return isFuzzyMatch(value.toLowerCase(), normalizedSearchTerm)\n })\n .sort((a, b) => {\n const aValue = String(a[key]).toLowerCase();\n const bValue = String(b[key]).toLowerCase();\n\n if (aValue === normalizedSearchTerm) return -1;\n if (bValue === normalizedSearchTerm) return 1;\n\n if (aValue.startsWith(normalizedSearchTerm) && !bValue.startsWith(normalizedSearchTerm))\n return -1;\n if (!aValue.startsWith(normalizedSearchTerm) && bValue.startsWith(normalizedSearchTerm))\n return 1;\n\n return aValue.length - bValue.length;\n });\n};\n","<script lang=\"ts\" setup>\nimport { ref, computed, type StyleValue, onMounted, reactive } from 'vue';\nimport clickOutside from '@/directives/clickOutside';\nimport { fuzzySearch } from '@/utils/search';\nimport styles from './Dropdown.module.scss';\n\nconst vClickOutside = clickOutside;\n\ninterface MenuItem {\n text: string;\n value: string;\n}\n\ninterface DropdownProps {\n id: string;\n label?: string;\n modelValue?: string;\n menuHeight?: number;\n placeholder?: string;\n addable?: boolean;\n addButtonText?: string;\n searchable?: boolean;\n searchPlaceHolder?: string;\n items: MenuItem[];\n validateAddItem?: (item: string, items: MenuItem[]) => string | null;\n}\n\ninterface Emits {\n (e: 'update:modelValue', value: string): void;\n (e: 'add-error', error: string): void;\n (e: 'item-added', item: MenuItem): void;\n (e: 'select-item', item: MenuItem): void;\n}\n\nconst props = withDefaults(defineProps<DropdownProps>(), {\n menuHeight: 154,\n searchBar: false,\n addItem: false,\n modelValue: '',\n validateAddItem: () => null,\n});\n\nconst emit = defineEmits<Emits>();\nconst dropdownRef = ref<HTMLDivElement>();\nconst menuRef = ref<HTMLDivElement>();\nconst isOpen = ref(false);\nconst selectedItem = ref<MenuItem | null>(null);\nconst searchQuery = ref('');\nconst errorMessage = ref<string | null>(null);\nconst menuPosition = ref({ x: 0, y: 0, width: 0, shouldOpenUp: false, height: props.menuHeight });\nconst filteredItems = reactive([...props.items]);\nconst allItems = reactive([...props.items]);\n\nconst calculateMenuPosition = () => {\n if (!dropdownRef.value) {\n return;\n }\n\n const { offsetTop: top, offsetLeft: left, offsetWidth: width } = dropdownRef.value;\n const viewportHeight = window.innerHeight;\n const bottom = top + dropdownRef.value.offsetHeight;\n const shouldOpenUp = bottom + props.menuHeight > viewportHeight;\n\n menuPosition.value = {\n x: left + window.scrollX,\n y: shouldOpenUp ? top + window.scrollY : bottom + window.scrollY,\n width,\n shouldOpenUp,\n height: props.menuHeight,\n };\n};\n\nconst toggleMenu = () => {\n calculateMenuPosition();\n isOpen.value = !isOpen.value;\n};\n\nconst resetSettings = () => {\n errorMessage.value = null;\n searchQuery.value = '';\n filteredItems.splice(0, filteredItems.length, ...allItems);\n};\n\nconst closeMenu = () => {\n isOpen.value = false;\n\n resetSettings();\n};\n\nconst selectItem = (item: MenuItem) => {\n selectedItem.value = item;\n\n emit('select-item', item);\n emit('update:modelValue', item.value);\n\n closeMenu();\n};\n\nconst addItem = () => {\n const query = searchQuery.value.trim();\n const error = props.validateAddItem(query, allItems);\n\n if (error) {\n errorMessage.value = error;\n\n emit('add-error', error);\n\n return;\n }\n\n const newItem: MenuItem = {\n text: query,\n value: query,\n };\n\n allItems.push(newItem);\n resetSettings();\n\n emit('item-added', newItem);\n};\n\nconst onSearch = () => {\n const results = fuzzySearch<MenuItem>(allItems, 'text', searchQuery.value);\n\n filteredItems.splice(0, filteredItems.length, ...results);\n};\n\nconst onFocusSearch = () => {\n errorMessage.value = '';\n};\n\nconst menuStyle = computed<Partial<StyleValue>>(() => ({\n top: menuPosition.value.shouldOpenUp ? `${menuPosition.value.y - 10}px` : `${menuPosition.value.y}px`,\n left: `${menuPosition.value.x}px`,\n width: `${menuPosition.value.width}px`,\n height: `${props.menuHeight}px`,\n}));\n\nonMounted(() => {\n calculateMenuPosition();\n\n if (props.modelValue) {\n const defaultItem = allItems.find(item => item.value === props.modelValue);\n\n if (defaultItem) {\n selectedItem.value = defaultItem;\n }\n }\n});\n\nconst selectedValue = computed(() => (selectedItem.value ? selectedItem.value.text : ''));\n</script>\n\n<template>\n <div\n ref=\"dropdownRef\"\n :class=\"styles.dropdown\">\n <label\n v-if=\"label\"\n :class=\"styles.dropdown__label\"\n :for=\"id\">\n {{ label }}\n </label>\n <button\n :class=\"[\n styles.dropdown__valueContent, {\n [styles['dropdown__valueContent--open']]: isOpen,\n },\n ]\"\n @click=\"toggleMenu\">\n <span :class=\"styles.dropdown__value\">\n {{ selectedValue }}\n </span>\n <span\n v-if=\"placeholder && !selectedValue\"\n :class=\"styles.dropdown__placeholder\">\n {{ placeholder }}\n </span>\n <svg\n fill=\"none\"\n height=\"17\"\n viewBox=\"0 0 16 17\"\n width=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n :class=\"styles.dropdown__arrowIcon\">\n <path\n d=\"M8 11.2021L4.5359 6.70215L11.4641 6.70215L8 11.2021Z\"\n fill=\"#91949F\" />\n </svg>\n </button>\n </div>\n\n <div\n v-if=\"isOpen\"\n ref=\"menuRef\"\n :class=\"styles.menu\"\n :style=\"menuStyle\"\n v-click-outside=\"{ handler: closeMenu, exclude: [dropdownRef, menuRef] }\"\n @click.prevent>\n <div\n v-if=\"props.searchable\"\n :class=\"styles.menu__searchContainer\">\n <div :class=\"styles.menu__searchInputWrap\">\n <input\n type=\"text\"\n :class=\"[\n styles.menu__searchInput, {\n [styles['menu__searchInput--error']]: errorMessage,\n },\n ]\"\n :placeholder=\"searchPlaceHolder\"\n v-model=\"searchQuery\"\n @focus=\"onFocusSearch\"\n @input=\"onSearch\">\n <p\n v-if=\"errorMessage\"\n :class=\"styles.menu__errorMessage\">\n {{ errorMessage }}\n </p>\n </div>\n <button\n v-if=\"props.addable\"\n :class=\"styles.menu__addButton\"\n @click=\"addItem\">\n {{ addButtonText }}\n </button>\n </div>\n <ul :class=\"styles.menu__itemContainer\">\n <li\n v-for=\"(item, index) in filteredItems\"\n :key=\"`${item.value}-${index}`\"\n :class=\"[\n styles.menu__item, {\n [styles['menu__item--active']]: selectedItem && item.value === selectedItem.value,\n },\n ]\"\n @click=\"selectItem(item)\">\n {{ item.text }}\n </li>\n </ul>\n </div>\n</template>\n","import { defineAsyncComponent } from 'vue';\n\nconst iconMap = {\n FilledErrorBox: defineAsyncComponent(() => import('./FilledErrorBox.vue')),\n LineCheck: defineAsyncComponent(() => import('./LineCheck.vue')),\n FilledCheckCircle: defineAsyncComponent(() => import('./FilledCheckCircle.vue')),\n LoadingCircle: defineAsyncComponent(() => import('./LoadingCircle.vue')),\n FilledInfoCircle: defineAsyncComponent(() => import('./FilledInfoCircle.vue')),\n SmartIcon: defineAsyncComponent(() => import('./SmartIcon.vue')),\n FilledCautionTriangle: defineAsyncComponent(() => import('./FilledCautionTriangle.vue')),\n};\n\nexport default iconMap;\n","<script lang=\"ts\" setup>\nimport { computed } from 'vue';\nimport iconMap from '@/components/Icon/icons';\nimport type { IconNames } from '@/components/Icon/types';\n\ninterface IconProps {\n name: IconNames;\n size?: 16 | 24;\n color?: string;\n}\n\nconst props = withDefaults(defineProps<IconProps>(), {\n size: 16,\n});\n\nconst iconSize = computed(() => (typeof props.size === 'number' ? `${props.size}px` : props.size));\n</script>\n\n<template>\n <component\n :is=\"iconMap[name]\"\n class=\"icon\"\n :style=\"{ width: iconSize, height: iconSize, fill: props.color || 'currentColor' }\" />\n</template>\n\n<style scoped>\n.icon {\n display: inline-block;\n line-height: 0;\n vertical-align: middle;\n}\n</style>\n","<script lang=\"ts\" setup>\nimport { computed } from 'vue';\nimport Icon from '@/components/Icon/Icon.vue';\nimport type { IconNames } from '@/components/Icon/types';\nimport styles from './OnPageMessage.module.scss';\n\ninterface OnPageMessageProps {\n variant?: 'default' | 'warning' | 'alert' | 'success';\n text: string;\n}\n\nconst props = withDefaults(defineProps<OnPageMessageProps>(), {\n variant: 'default',\n});\n\nconst IconName = computed<IconNames>(() => {\n switch (props.variant) {\n case 'alert': return 'FilledErrorBox';\n case 'warning': return 'FilledCautionTriangle';\n case 'success': return 'FilledCheckCircle';\n\n default: return 'FilledInfoCircle';\n }\n});\n</script>\n\n<template>\n <div\n :class=\"[\n styles.container,\n styles[`container__${variant}`],\n ]\">\n <Icon\n :name=\"IconName\"\n :size=\"24\" />\n <span :class=\"styles.container__text\">{{ text }}</span>\n </div>\n</template>\n","<script lang=\"ts\" setup>\nimport { ref } from 'vue';\nimport type { IconNames } from '@/components/Icon/types';\nimport { Icon } from '@/index';\nimport styles from './SegmentButton.module.scss';\n\ninterface SegmentType {\n value: string;\n label: string;\n disabled?: boolean;\n icon?: IconNames;\n}\n\ninterface SegmentButtonProps {\n color: 'primary' | 'secondary' | 'danger' | 'warning' | 'smart';\n size?: 'default' | 'small';\n align?: 'vertical' | 'horizontal';\n disabled?: boolean;\n segments: SegmentType[];\n fill?: boolean;\n}\n\nconst props = withDefaults(defineProps<SegmentButtonProps>(), {\n loadingStatus: false,\n successStatus: false,\n disabled: false,\n size: 'default',\n align: 'horizontal',\n});\n\nconst emit = defineEmits<{\n click: [event: SegmentType['value']];\n}>();\n\nconst selected = ref<string>('');\n\nconst setSelect = (segment: SegmentType) => {\n if (props.disabled || segment.disabled) {\n return;\n }\n\n selected.value = segment.value;\n\n emit('click', segment.value);\n};\n</script>\n\n<template>\n <div\n :class=\"[\n styles.segmentGroup,\n styles[`segmentGroup--${align}`],\n { [styles.fill]: fill },\n ]\">\n <button\n v-for=\"(segment, index) in segments\"\n :key=\"`${segment.value}-${index}`\"\n :class=\"[\n styles.button,\n styles[`button--${color}`],\n styles[`button__size_${size}`],\n styles.fill,\n {\n [styles[`button--selected`]]: segment.value === selected,\n },\n ]\"\n :disabled=\"segment.disabled || props.disabled\"\n @click=\"setSelect(segment)\">\n <Icon\n v-if=\"segment.icon\"\n :name=\"segment.icon\" />\n <span\n v-if=\"segment.label\"\n :class=\"styles.button__label\">\n {{ segment.label }}\n </span>\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { onMounted, ref } from 'vue';\nimport styles from './TextInput.module.scss';\n\nexport interface Props {\n id: string;\n name: string;\n modelValue: string | number;\n label?: string;\n placeholder?: string;\n maxLength?: number;\n maxHeight?: number;\n error?: string;\n multiline?: boolean;\n autoGrow?: boolean;\n counter?: boolean;\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n label: '',\n placeholder: '',\n maxLength: undefined,\n maxHeight: undefined,\n error: '',\n multiline: false,\n autoGrow: false,\n modelValue: '',\n});\n\nconst emit = defineEmits<{\n 'update:modelValue': [Props['modelValue']];\n input: [event: Event];\n change: [event: Event];\n paste: [event: ClipboardEvent];\n focus: [event: FocusEvent];\n blur: [event: FocusEvent];\n}>();\n\nconst textareaRef = ref<HTMLTextAreaElement | null>(null);\n\nconst autoGrow = () => {\n if (props.autoGrow && textareaRef.value) {\n textareaRef.value.style.height = '';\n\n const newHeight = Math.min(textareaRef.value.scrollHeight, props.maxHeight || textareaRef.value.scrollHeight);\n\n textareaRef.value.style.height = `${newHeight}px`;\n }\n};\n\nconst handleInput = (event: Event) => {\n const target = event.target as HTMLInputElement | HTMLTextAreaElement;\n\n emit('input', event);\n emit('update:modelValue', target.value);\n\n autoGrow();\n};\n\nonMounted(() => {\n autoGrow();\n});\n</script>\n\n<template>\n <div :class=\"styles.wrapper\">\n <label\n v-if=\"label\"\n :class=\"styles.wrapper__label\"\n :for=\"id\">\n {{ label }}\n </label>\n <template v-if=\"multiline\">\n <textarea\n :id=\"id\"\n ref=\"textareaRef\"\n :class=\"[\n styles.wrapper__field, {\n [styles['wrapper--error']]: error,\n },\n ]\"\n :maxlength=\"maxLength\"\n :name=\"name\"\n :placeholder=\"placeholder\"\n :style=\"maxHeight ? { maxHeight: `${maxHeight}px` } : undefined\"\n :value=\"modelValue\"\n @blur=\"emit('blur', $event)\"\n @change=\"$emit('change', $event)\"\n @focus=\"emit('focus', $event)\"\n @input=\"handleInput\"\n @paste=\"emit('paste', $event)\" />\n </template>\n <template v-else>\n <input\n :id=\"id\"\n type=\"text\"\n :class=\"[\n styles.wrapper__field, {\n [styles['wrapper--error']]: error,\n },\n ]\"\n :maxlength=\"maxLength\"\n :name=\"name\"\n :placeholder=\"placeholder\"\n :value=\"modelValue\"\n @blur=\"emit('blur', $event)\"\n @change=\"$emit('change', $event)\"\n @focus=\"emit('focus', $event)\"\n @input=\"handleInput\"\n @paste=\"emit('paste', $event)\">\n </template>\n\n <div :class=\"styles.wrapper__bottom\">\n <div\n v-if=\"error\"\n :class=\"styles.wrapper__errorMessage\">\n {{ error }}\n </div>\n <div\n v-if=\"counter\"\n :class=\"styles.wrapper__counter\">\n {{ modelValue?.toString().length || 0 }}\n </div>\n </div>\n </div>\n</template>\n"],"names":["props","__props","emit","__emit","onClick","event","leftIcon","computed","clickOutside","el","binding","element","isFuzzyMatch","choiceValue","searchTerm","searchIndex","char","_a","fuzzySearch","choices","key","normalizedSearchTerm","choice","value","a","b","aValue","bValue","vClickOutside","dropdownRef","ref","menuRef","isOpen","selectedItem","searchQuery","errorMessage","menuPosition","filteredItems","reactive","allItems","calculateMenuPosition","top","left","width","viewportHeight","bottom","shouldOpenUp","toggleMenu","resetSettings","closeMenu","selectItem","item","addItem","query","error","newItem","onSearch","results","onFocusSearch","menuStyle","onMounted","defaultItem","selectedValue","iconMap","defineAsyncComponent","iconSize","IconName","selected","setSelect","segment","textareaRef","autoGrow","newHeight","handleInput","target"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,UAAMA,IAAQC,GAQRC,IAAOC,GAIPC,IAAU,CAACC,MAAsB;AACnC,MAAIL,EAAM,YAIVE,EAAK,SAASG,CAAK;AAAA,IACvB,GAEMC,IAAWC,EAAgC,MACzCP,EAAM,gBACC,kBACAA,EAAM,gBACN,cAGJA,EAAM,YAChB;;;;;;;;;;;;;;;;;;;;;;;;;;ICzCcQ,KAAA;AAAA,EACX,QAAQC,GAAyBC,GAA6E;AACvG,IAAAD,EAAA,oBAAoB,CAACJ,MAAiB;AAKrC,MAJsB,CAACI,GAAI,GAAIC,EAAQ,MAAM,WAAW,EAAG,EAAE,KAAK,CAAWC,MAClEA,MAAYA,MAAYN,EAAM,UAAUM,EAAQ,SAASN,EAAM,MAAc,EACvF,KAGGK,EAAQ,MAAM,QAAQ;AAAA,IAE9B,GAES,SAAA,iBAAiB,SAASD,EAAG,iBAAiB;AAAA,EAC3D;AAAA,EACA,UAAUA,GAAyB;AAC/B,IAAIA,EAAG,qBACM,SAAA,oBAAoB,SAASA,EAAG,iBAAiB;AAAA,EAC9D;AAER,GCzBMG,KAAe,CAACC,GAAqBC,MAAgC;;AACvE,MAAIC,IAAc;AAClB,aAAWC,KAAQH;AAIX,QAHAG,EAAK,YAAY,QAAMC,IAAAH,EAAWC,CAAW,MAAtB,gBAAAE,EAAyB,kBAChDF,KAEAA,MAAgBD,EAAW;AACpB,aAAA;AAGR,SAAA;AACX,GAGaI,KAAc,CACvBC,GACAC,GACAN,MACM;AACF,MAAA,CAACA,EAAW;AACL,WAAAK;AAGL,QAAAE,IAAuBP,EAAW,YAAY;AAE7C,SAAAK,EACF,OAAO,CAAUG,MAAA;AACd,UAAMC,IAAQ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