@juspay/svelte-ui-components 4.23.0 → 4.25.0
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.
- package/dist/Checkbox/Checkbox.svelte +44 -6
- package/dist/Checkbox/properties.d.ts +18 -2
- package/dist/MarkdownText/MarkdownText.svelte +3 -2
- package/dist/MarkdownText/markdown.d.ts +7 -2
- package/dist/MarkdownText/markdown.js +142 -9
- package/dist/MarkdownText/properties.d.ts +63 -2
- package/dist/Select/Select.svelte +12 -1
- package/dist/Select/properties.d.ts +11 -0
- package/dist/SpeechSynthesis/controller.svelte.d.ts +89 -0
- package/dist/SpeechSynthesis/controller.svelte.js +385 -0
- package/dist/SpeechSynthesis/types.d.ts +68 -0
- package/dist/SpeechSynthesis/types.js +1 -0
- package/dist/Toggle/Toggle.svelte +6 -2
- package/dist/Toggle/properties.d.ts +9 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist-wc/index.js +346 -232
- package/package.json +1 -1
package/dist-wc/index.js
CHANGED
|
@@ -5748,24 +5748,32 @@ var checkmark_default = "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"curre
|
|
|
5748
5748
|
};
|
|
5749
5749
|
function Checkbox(e, t) {
|
|
5750
5750
|
push(t, !0), append_styles$1(e, $$css$81);
|
|
5751
|
-
let n = prop(t, "text", 7), i = prop(t, "checked", 15, !1), a = prop(t, "disabled", 7, !1), o = prop(t, "indeterminate", 15, !1), s = prop(t, "testId", 7), c = prop(t, "checkedIcon", 7), l = prop(t, "indeterminateIcon", 7), u = prop(t, "onclick", 7), f = prop(t, "classes", 7), p = prop(t, "ariaControls", 7), h = prop(t, "ariaLabel", 7), S = prop(t, "controlled", 7, !1), C = prop(t, "attributes", 7), k = /* @__PURE__ */ user_derived(() => n().length > 0 ? n() : typeof h() == "string" && h().trim() !== "" ? h() : null);
|
|
5752
|
-
function
|
|
5751
|
+
let n = prop(t, "text", 7, ""), i = prop(t, "checked", 15, !1), a = prop(t, "disabled", 7, !1), o = prop(t, "indeterminate", 15, !1), s = prop(t, "testId", 7), c = prop(t, "checkedIcon", 7), l = prop(t, "indeterminateIcon", 7), u = prop(t, "onclick", 7), f = prop(t, "classes", 7), p = prop(t, "ariaControls", 7), h = prop(t, "ariaLabel", 7), S = prop(t, "controlled", 7, !1), C = prop(t, "attributes", 7), k = prop(t, "name", 7), R = prop(t, "value", 7), te = /* @__PURE__ */ state(null), ne = /* @__PURE__ */ user_derived(() => n().length > 0 ? n() : typeof h() == "string" && h().trim() !== "" ? h() : null);
|
|
5752
|
+
function re() {
|
|
5753
5753
|
if (!a()) {
|
|
5754
5754
|
if (S()) {
|
|
5755
5755
|
u()?.(!i());
|
|
5756
5756
|
return;
|
|
5757
5757
|
}
|
|
5758
|
-
|
|
5758
|
+
flushSync(() => {
|
|
5759
|
+
i(!i()), o() && o(!1);
|
|
5760
|
+
}), u()?.(i()), get(te)?.dispatchEvent(new Event("input", {
|
|
5761
|
+
bubbles: !0,
|
|
5762
|
+
composed: !0
|
|
5763
|
+
})), get(te)?.dispatchEvent(new Event("change", {
|
|
5764
|
+
bubbles: !0,
|
|
5765
|
+
composed: !0
|
|
5766
|
+
}));
|
|
5759
5767
|
}
|
|
5760
5768
|
}
|
|
5761
|
-
function
|
|
5762
|
-
(e.key === " " || e.key === "Enter") && (e.preventDefault(),
|
|
5769
|
+
function G(e) {
|
|
5770
|
+
(e.key === " " || e.key === "Enter") && (e.preventDefault(), re());
|
|
5763
5771
|
}
|
|
5764
|
-
var
|
|
5772
|
+
var be = {
|
|
5765
5773
|
get text() {
|
|
5766
5774
|
return n();
|
|
5767
5775
|
},
|
|
5768
|
-
set text(e) {
|
|
5776
|
+
set text(e = "") {
|
|
5769
5777
|
n(e), flushSync();
|
|
5770
5778
|
},
|
|
5771
5779
|
get checked() {
|
|
@@ -5839,21 +5847,33 @@ function Checkbox(e, t) {
|
|
|
5839
5847
|
},
|
|
5840
5848
|
set attributes(e) {
|
|
5841
5849
|
C(e), flushSync();
|
|
5850
|
+
},
|
|
5851
|
+
get name() {
|
|
5852
|
+
return k();
|
|
5853
|
+
},
|
|
5854
|
+
set name(e) {
|
|
5855
|
+
k(e), flushSync();
|
|
5856
|
+
},
|
|
5857
|
+
get value() {
|
|
5858
|
+
return R();
|
|
5859
|
+
},
|
|
5860
|
+
set value(e) {
|
|
5861
|
+
R(e), flushSync();
|
|
5842
5862
|
}
|
|
5843
|
-
},
|
|
5844
|
-
let
|
|
5845
|
-
var
|
|
5846
|
-
remove_input_defaults(
|
|
5847
|
-
var
|
|
5848
|
-
attribute_effect(
|
|
5863
|
+
}, Me = root_2$53();
|
|
5864
|
+
let Re;
|
|
5865
|
+
var Ue = child(Me);
|
|
5866
|
+
remove_input_defaults(Ue), set_attribute(Ue, "tabindex", -1), bind_this(Ue, (e) => set(te, e), () => get(te));
|
|
5867
|
+
var it = sibling(Ue, 2);
|
|
5868
|
+
attribute_effect(it, () => ({
|
|
5849
5869
|
class: "box",
|
|
5850
5870
|
role: "checkbox",
|
|
5851
5871
|
tabindex: a() ? -1 : 0,
|
|
5852
5872
|
"aria-checked": o() ? "mixed" : i(),
|
|
5853
5873
|
"aria-disabled": a(),
|
|
5854
5874
|
"aria-controls": p() ?? null,
|
|
5855
|
-
"aria-label": get(
|
|
5856
|
-
onkeydown:
|
|
5875
|
+
"aria-label": get(ne),
|
|
5876
|
+
onkeydown: G,
|
|
5857
5877
|
"data-pw": typeof s() == "string" ? `${s()}-box` : null,
|
|
5858
5878
|
testID: typeof s() == "string" ? `${s()}-box` : null,
|
|
5859
5879
|
...C(),
|
|
@@ -5862,7 +5882,7 @@ function Checkbox(e, t) {
|
|
|
5862
5882
|
indeterminate: o()
|
|
5863
5883
|
}
|
|
5864
5884
|
}), void 0, void 0, void 0, "svelte-f1in4m");
|
|
5865
|
-
var
|
|
5885
|
+
var at = child(it), ot = (e) => {
|
|
5866
5886
|
var t = comment(), n = first_child(t), i = (e) => {
|
|
5867
5887
|
var t = comment();
|
|
5868
5888
|
snippet(first_child(t), c), append(e, t);
|
|
@@ -5874,10 +5894,10 @@ function Checkbox(e, t) {
|
|
|
5874
5894
|
typeof c() == "function" ? e(i) : e(a, -1);
|
|
5875
5895
|
}), append(e, t);
|
|
5876
5896
|
};
|
|
5877
|
-
if_block(
|
|
5878
|
-
i() && !o() && e(
|
|
5897
|
+
if_block(at, (e) => {
|
|
5898
|
+
i() && !o() && e(ot);
|
|
5879
5899
|
});
|
|
5880
|
-
var
|
|
5900
|
+
var ct = sibling(at, 2), lt = (e) => {
|
|
5881
5901
|
var t = comment(), n = first_child(t), i = (e) => {
|
|
5882
5902
|
var t = comment();
|
|
5883
5903
|
snippet(first_child(t), l), append(e, t);
|
|
@@ -5889,15 +5909,15 @@ function Checkbox(e, t) {
|
|
|
5889
5909
|
typeof l() == "function" ? e(i) : e(a, -1);
|
|
5890
5910
|
}), append(e, t);
|
|
5891
5911
|
};
|
|
5892
|
-
if_block(
|
|
5893
|
-
o() && e(
|
|
5894
|
-
}), reset(
|
|
5895
|
-
var
|
|
5896
|
-
return reset(
|
|
5897
|
-
|
|
5898
|
-
}), delegated("click",
|
|
5899
|
-
e.preventDefault(),
|
|
5900
|
-
}), delegated("click",
|
|
5912
|
+
if_block(ct, (e) => {
|
|
5913
|
+
o() && e(lt);
|
|
5914
|
+
}), reset(it);
|
|
5915
|
+
var ut = sibling(it, 2), dt = child(ut, !0);
|
|
5916
|
+
return reset(ut), reset(Me), template_effect(() => {
|
|
5917
|
+
Re = set_class(Me, 1, `container ${f() ?? "" ?? ""}`, "svelte-f1in4m", Re, { disabled: a() }), set_attribute(Me, "data-pw", s()), set_attribute(Me, "testid", s()), set_checked(Ue, i()), Ue.disabled = a(), set_attribute(Ue, "name", k() ?? null), set_value(Ue, R() ?? null), set_attribute(Ue, "data-pw", typeof s() == "string" ? `${s()}-native-input` : null), set_attribute(Ue, "testid", typeof s() == "string" ? `${s()}-native-input` : null), set_attribute(ut, "hidden", n().length === 0), set_text(dt, n());
|
|
5918
|
+
}), delegated("click", Me, (e) => {
|
|
5919
|
+
e.preventDefault(), re();
|
|
5920
|
+
}), delegated("click", Ue, (e) => e.stopPropagation()), append(e, Me), pop(be);
|
|
5901
5921
|
}
|
|
5902
5922
|
delegate(["click"]), create_custom_element(Checkbox, {
|
|
5903
5923
|
text: {},
|
|
@@ -5912,7 +5932,9 @@ delegate(["click"]), create_custom_element(Checkbox, {
|
|
|
5912
5932
|
ariaControls: {},
|
|
5913
5933
|
ariaLabel: {},
|
|
5914
5934
|
controlled: {},
|
|
5915
|
-
attributes: {}
|
|
5935
|
+
attributes: {},
|
|
5936
|
+
name: {},
|
|
5937
|
+
value: {}
|
|
5916
5938
|
}, [], [], { mode: "open" });
|
|
5917
5939
|
//#endregion
|
|
5918
5940
|
//#region src/wc/components/Checkbox.wc.svelte
|
|
@@ -5998,7 +6020,15 @@ customElements.define("sui-checkbox", create_custom_element(Checkbox_wc, {
|
|
|
5998
6020
|
type: "Boolean"
|
|
5999
6021
|
},
|
|
6000
6022
|
checkboxAttributes: { type: "Object" },
|
|
6001
|
-
onclick: { type: "Object" }
|
|
6023
|
+
onclick: { type: "Object" },
|
|
6024
|
+
name: {
|
|
6025
|
+
reflect: !0,
|
|
6026
|
+
type: "String"
|
|
6027
|
+
},
|
|
6028
|
+
value: {
|
|
6029
|
+
reflect: !0,
|
|
6030
|
+
type: "String"
|
|
6031
|
+
}
|
|
6002
6032
|
}, ["checked-icon", "indeterminate-icon"], [], { mode: "open" }));
|
|
6003
6033
|
//#endregion
|
|
6004
6034
|
//#region src/lib/utils.ts
|
|
@@ -12324,15 +12354,15 @@ customElements.define("sui-theme-switcher", create_custom_element(ThemeSwitcher_
|
|
|
12324
12354
|
//#region src/lib/Toggle/Toggle.svelte
|
|
12325
12355
|
var root$54 = /* @__PURE__ */ from_html("<div><label class=\"text svelte-1kpnf4s\"> </label> <label class=\"switch svelte-1kpnf4s\"><input class=\"input-checkbox svelte-1kpnf4s\" type=\"checkbox\"/> <span class=\"slider round svelte-1kpnf4s\"></span></label></div>"), $$css$54 = {
|
|
12326
12356
|
hash: "svelte-1kpnf4s",
|
|
12327
|
-
code: ".container.svelte-1kpnf4s {display:var(--toggle-container-display, flex);align-items:var(--toggle-container-align-items, center);gap:var(--toggle-container-gap, 8px);}.container.disabled.svelte-1kpnf4s {opacity:var(--toggle-disabled-opacity, 0.4);cursor:not-allowed;pointer-events:none;}.text.svelte-1kpnf4s {font-size:var(--toggle-text-font-size, 14px);font-weight:var(--toggle-text-font-weight, 400);color:var(--toggle-text-color, #4a4a4a);margin:var(--toggle-text-margin, 0px 8px 0px 0px);order:var(--toggle-text-order, 0);}.switch.svelte-1kpnf4s {position:relative;display:inline-block;width:var(--toggle-switch-width, 46px);height:var(--toggle-switch-height, 25px);}.switch.svelte-1kpnf4s .input-checkbox:where(.svelte-1kpnf4s) {opacity:0;width:0;height:0;}.slider.svelte-1kpnf4s {position:absolute;cursor:pointer;top:var(--toggle-slider-top, 0);left:var(--toggle-slider-left, 0);right:var(--toggle-slider-right, 0);bottom:var(--toggle-slider-bottom, 0);background-color:var(--slider-unchecked-color, #ccc);-webkit-transition:var(--toggle-slider-transition, 0.4s);transition:var(--toggle-slider-transition, 0.4s);}.slider.svelte-1kpnf4s:before {position:absolute;content:'';height:var(--toggle-ball-height, 23px);width:var(--toggle-ball-width, 23px);left:var(--toggle-slider-before-left, 2px);bottom:var(--toggle-slider-before-bottom, 1px);top:var(--toggle-slider-before-top, 1px);background-color:var(--toggle-slider-before-background-color, white);-webkit-transition:var(--toggle-slider-transition, 0.4s);transition:var(--toggle-slider-transition, 0.4s);}.input-checkbox.svelte-1kpnf4s:checked + .slider:where(.svelte-1kpnf4s) {background-color:var(--slider-checked-color, #2196f3);}.input-checkbox.svelte-1kpnf4s:focus + .slider:where(.svelte-1kpnf4s) {box-shadow:0 0
|
|
12357
|
+
code: ".container.svelte-1kpnf4s {display:var(--toggle-container-display, flex);align-items:var(--toggle-container-align-items, center);gap:var(--toggle-container-gap, 8px);}.container.disabled.svelte-1kpnf4s {opacity:var(--toggle-disabled-opacity, 0.4);cursor:not-allowed;pointer-events:none;}.text.svelte-1kpnf4s {font-size:var(--toggle-text-font-size, 14px);font-weight:var(--toggle-text-font-weight, 400);color:var(--toggle-text-color, #4a4a4a);margin:var(--toggle-text-margin, 0px 8px 0px 0px);order:var(--toggle-text-order, 0);}.switch.svelte-1kpnf4s {position:relative;display:inline-block;width:var(--toggle-switch-width, 46px);height:var(--toggle-switch-height, 25px);}.switch.svelte-1kpnf4s .input-checkbox:where(.svelte-1kpnf4s) {opacity:0;width:0;height:0;}.slider.svelte-1kpnf4s {position:absolute;cursor:pointer;top:var(--toggle-slider-top, 0);left:var(--toggle-slider-left, 0);right:var(--toggle-slider-right, 0);bottom:var(--toggle-slider-bottom, 0);background-color:var(--slider-unchecked-color, #ccc);-webkit-transition:var(--toggle-slider-transition, 0.4s);transition:var(--toggle-slider-transition, 0.4s);}.slider.svelte-1kpnf4s:before {position:absolute;content:'';height:var(--toggle-ball-height, 23px);width:var(--toggle-ball-width, 23px);left:var(--toggle-slider-before-left, 2px);bottom:var(--toggle-slider-before-bottom, 1px);top:var(--toggle-slider-before-top, 1px);background-color:var(--toggle-slider-before-background-color, white);-webkit-transition:var(--toggle-slider-transition, 0.4s);transition:var(--toggle-slider-transition, 0.4s);}.input-checkbox.svelte-1kpnf4s:checked + .slider:where(.svelte-1kpnf4s) {background-color:var(--slider-checked-color, #2196f3);}.input-checkbox.svelte-1kpnf4s:focus + .slider:where(.svelte-1kpnf4s) {box-shadow:var(--toggle-focus-ring, 0 0 0 3px rgba(33, 150, 243, 0.3));}.input-checkbox.svelte-1kpnf4s:checked + .slider:where(.svelte-1kpnf4s):before {-webkit-transform:translateX(19px);-ms-transform:translateX(19px);transform:translateX(19px);}.slider.round.svelte-1kpnf4s {border-radius:var(--slider-border-radius, 23px);}.slider.round.svelte-1kpnf4s:before {border-radius:var(--slider-border-radius-before, 50%);}"
|
|
12328
12358
|
};
|
|
12329
12359
|
function Toggle(e, t) {
|
|
12330
12360
|
let n = props_id();
|
|
12331
12361
|
push(t, !0), append_styles$1(e, $$css$54);
|
|
12332
|
-
let i = prop(t, "checked", 7, !1), a = prop(t, "text", 7, ""), o = prop(t, "disabled", 7, !1), s = prop(t, "testId", 7), c = prop(t, "classes", 7), l = prop(t, "id", 7), u = prop(t, "ariaLabel", 7), f = prop(t, "ariaLabelledby", 7), p = prop(t, "onclick", 7), h = /* @__PURE__ */ user_derived(() => l()?.trim() || `toggle-${n}`),
|
|
12362
|
+
let i = prop(t, "checked", 7, !1), a = prop(t, "text", 7, ""), o = prop(t, "disabled", 7, !1), s = prop(t, "testId", 7), c = prop(t, "classes", 7), l = prop(t, "id", 7), u = prop(t, "ariaLabel", 7), f = prop(t, "ariaLabelledby", 7), p = prop(t, "onclick", 7), h = prop(t, "name", 7), S = prop(t, "value", 7), C = /* @__PURE__ */ user_derived(() => l()?.trim() || `toggle-${n}`), k = (e) => {
|
|
12333
12363
|
e.target instanceof HTMLInputElement && typeof e.target.checked == "boolean" && i(e.target.checked), p()?.(i());
|
|
12334
12364
|
};
|
|
12335
|
-
var
|
|
12365
|
+
var R = {
|
|
12336
12366
|
get checked() {
|
|
12337
12367
|
return i();
|
|
12338
12368
|
},
|
|
@@ -12386,15 +12416,27 @@ function Toggle(e, t) {
|
|
|
12386
12416
|
},
|
|
12387
12417
|
set onclick(e) {
|
|
12388
12418
|
p(e), flushSync();
|
|
12419
|
+
},
|
|
12420
|
+
get name() {
|
|
12421
|
+
return h();
|
|
12422
|
+
},
|
|
12423
|
+
set name(e) {
|
|
12424
|
+
h(e), flushSync();
|
|
12425
|
+
},
|
|
12426
|
+
get value() {
|
|
12427
|
+
return S();
|
|
12428
|
+
},
|
|
12429
|
+
set value(e) {
|
|
12430
|
+
S(e), flushSync();
|
|
12389
12431
|
}
|
|
12390
|
-
},
|
|
12391
|
-
let
|
|
12392
|
-
var
|
|
12393
|
-
reset(
|
|
12394
|
-
var
|
|
12395
|
-
return remove_input_defaults(
|
|
12396
|
-
|
|
12397
|
-
}, [() => u()?.trim() || null, () => f()?.trim() || null]), delegated("click",
|
|
12432
|
+
}, te = root$54();
|
|
12433
|
+
let ne;
|
|
12434
|
+
var re = child(te), G = child(re, !0);
|
|
12435
|
+
reset(re);
|
|
12436
|
+
var be = sibling(re, 2), Me = child(be);
|
|
12437
|
+
return remove_input_defaults(Me), next(2), reset(be), reset(te), template_effect((e, t) => {
|
|
12438
|
+
ne = set_class(te, 1, `container ${c() ?? "" ?? ""}`, "svelte-1kpnf4s", ne, { disabled: o() }), set_attribute(te, "aria-disabled", o()), set_attribute(te, "data-pw", s()), set_attribute(te, "testid", s()), set_attribute(re, "for", get(C)), set_attribute(re, "hidden", a().length === 0), set_text(G, a()), set_attribute(Me, "id", get(C)), set_checked(Me, i()), Me.disabled = o(), set_attribute(Me, "name", h() ?? null), set_value(Me, S() ?? null), set_attribute(Me, "aria-label", e), set_attribute(Me, "aria-labelledby", t);
|
|
12439
|
+
}, [() => u()?.trim() || null, () => f()?.trim() || null]), delegated("click", Me, k), append(e, te), pop(R);
|
|
12398
12440
|
}
|
|
12399
12441
|
delegate(["click"]), create_custom_element(Toggle, {
|
|
12400
12442
|
checked: {},
|
|
@@ -12405,7 +12447,9 @@ delegate(["click"]), create_custom_element(Toggle, {
|
|
|
12405
12447
|
id: {},
|
|
12406
12448
|
ariaLabel: {},
|
|
12407
12449
|
ariaLabelledby: {},
|
|
12408
|
-
onclick: {}
|
|
12450
|
+
onclick: {},
|
|
12451
|
+
name: {},
|
|
12452
|
+
value: {}
|
|
12409
12453
|
}, [], [], { mode: "open" });
|
|
12410
12454
|
//#endregion
|
|
12411
12455
|
//#region src/wc/components/Toggle.wc.svelte
|
|
@@ -12482,6 +12526,14 @@ customElements.define("sui-toggle", create_custom_element(Toggle_wc, {
|
|
|
12482
12526
|
inputAriaLabelledby: {
|
|
12483
12527
|
attribute: "input-aria-labelledby",
|
|
12484
12528
|
type: "String"
|
|
12529
|
+
},
|
|
12530
|
+
name: {
|
|
12531
|
+
reflect: !0,
|
|
12532
|
+
type: "String"
|
|
12533
|
+
},
|
|
12534
|
+
value: {
|
|
12535
|
+
reflect: !0,
|
|
12536
|
+
type: "String"
|
|
12485
12537
|
}
|
|
12486
12538
|
}, [], [], { mode: "open" }));
|
|
12487
12539
|
//#endregion
|
|
@@ -17003,43 +17055,43 @@ function computeSelectDropdownPosition(e) {
|
|
|
17003
17055
|
}
|
|
17004
17056
|
//#endregion
|
|
17005
17057
|
//#region src/lib/Select/Select.svelte
|
|
17006
|
-
var root$36 = /* @__PURE__ */ from_html("<div class=\"select-empty svelte-52lifo\">No results</div>"), root_1$33 = /* @__PURE__ */ from_html("<span class=\"select-option-check svelte-52lifo\"></span>"), root_2$26 = /* @__PURE__ */ from_html("<span class=\"select-option-dash svelte-52lifo\"></span>"), root_3$24 = /* @__PURE__ */ from_html("<span aria-hidden=\"true\"><!></span>"), root_4$19 = /* @__PURE__ */ from_html("<div><!> </div>"), root_5$17 = /* @__PURE__ */ from_html("<span class=\"select-option-tick svelte-52lifo\" aria-hidden=\"true\"></span>"), root_6$16 = /* @__PURE__ */ from_html("<div><!> <!> <span class=\"select-option-label svelte-52lifo\"> </span> <!></div>"), root_7$15 = /* @__PURE__ */ from_html("<div class=\"select-bottom-content svelte-52lifo\"><!></div>"), root_8$14 = /* @__PURE__ */ from_html("<!> <!>", 1), root_9$11 = /* @__PURE__ */ from_html("<input class=\"select-search svelte-52lifo\" type=\"text\" autocomplete=\"off\"/>"),
|
|
17058
|
+
var root$36 = /* @__PURE__ */ from_html("<div class=\"select-empty svelte-52lifo\">No results</div>"), root_1$33 = /* @__PURE__ */ from_html("<span class=\"select-option-check svelte-52lifo\"></span>"), root_2$26 = /* @__PURE__ */ from_html("<span class=\"select-option-dash svelte-52lifo\"></span>"), root_3$24 = /* @__PURE__ */ from_html("<span aria-hidden=\"true\"><!></span>"), root_4$19 = /* @__PURE__ */ from_html("<div><!> </div>"), root_5$17 = /* @__PURE__ */ from_html("<span class=\"select-option-tick svelte-52lifo\" aria-hidden=\"true\"></span>"), root_6$16 = /* @__PURE__ */ from_html("<div><!> <!> <span class=\"select-option-label svelte-52lifo\"> </span> <!></div>"), root_7$15 = /* @__PURE__ */ from_html("<div class=\"select-bottom-content svelte-52lifo\"><!></div>"), root_8$14 = /* @__PURE__ */ from_html("<!> <!>", 1), root_9$11 = /* @__PURE__ */ from_html("<input type=\"hidden\"/>"), root_10$10 = /* @__PURE__ */ from_html("<input class=\"select-search svelte-52lifo\" type=\"text\" autocomplete=\"off\"/>"), root_11$9 = /* @__PURE__ */ from_html("<span class=\"select-placeholder svelte-52lifo\"> </span>"), root_12$8 = /* @__PURE__ */ from_html("<span> </span>"), root_13$7 = /* @__PURE__ */ from_html("<button type=\"button\" class=\"select-clear svelte-52lifo\" aria-label=\"Clear selection\"><span aria-hidden=\"true\">×</span></button>"), root_14$7 = /* @__PURE__ */ from_html("<div role=\"alert\" class=\"select-error-message svelte-52lifo\"> </div>"), root_15$7 = /* @__PURE__ */ from_html("<div><input class=\"select-menu-search svelte-52lifo\" type=\"search\" aria-label=\"Search options\" autocomplete=\"off\"/> <div class=\"select-menu-list svelte-52lifo\" role=\"listbox\" tabindex=\"-1\"><!></div> <!></div>"), root_16$6 = /* @__PURE__ */ from_html("<div role=\"listbox\"><!></div>"), root_17$5 = /* @__PURE__ */ from_html("<div><!> <div><div><!> <!> <span class=\"select-arrow svelte-52lifo\"></span></div> <!></div> <!> <!></div>"), $$css$38 = {
|
|
17007
17059
|
hash: "svelte-52lifo",
|
|
17008
17060
|
code: ".select.svelte-52lifo {position:relative;width:var(--select-width, 100%);font-family:var(--select-font-family, inherit);font-size:var(--select-font-size, 14px);color:var(--select-color, #333333);}.select.disabled.svelte-52lifo {opacity:var(--select-disabled-opacity, 0.5);cursor:var(--select-disabled-cursor, not-allowed);pointer-events:none;}.select-trigger.svelte-52lifo {display:flex;flex-wrap:wrap;align-items:center;gap:var(--select-trigger-gap, 4px);min-height:var(--select-trigger-min-height, 40px);padding:var(--select-trigger-padding, 8px 12px);background:var(--select-trigger-background, #ffffff);border:var(--select-trigger-border, 1px solid #cccccc);border-radius:var(--select-trigger-border-radius, var(--radius, 4px));cursor:pointer;outline:none;-webkit-tap-highlight-color:transparent;transition:var(--select-trigger-transition, border-color 0.15s, box-shadow 0.15s);}.select-trigger.svelte-52lifo .select-left-icon {--image-width: var(--select-left-icon-size, 16px);--image-height: var(--select-left-icon-size, 16px);--image-object-fit: contain;\n\n /* The icon inlines, so a currentColor asset resolves against this. Defaults to\n `inherit` — the trigger's text colour, which is what it already did — so this is\n a hook, not a change. Without it a consumer cannot tint the icon independently\n of the label, and an icon migrated to currentColor is forced to match its label\n exactly, flattening any deliberate muted-icon/strong-label hierarchy. */color:var(--select-left-icon-color, inherit);flex:none;}.select-trigger.svelte-52lifo:hover:not(.disabled:where(.svelte-52lifo) .select-trigger:where(.svelte-52lifo)) {border-color:var(--select-trigger-hover-border-color, #999999);}.select-trigger.svelte-52lifo:focus-within,\n .select.open.svelte-52lifo .select-trigger:where(.svelte-52lifo) {border-color:var(--select-trigger-focus-border-color, #2563eb);box-shadow:var(--select-trigger-focus-shadow, 0 0 0 2px rgba(37, 99, 235, 0.2));}\n\n /* Pressed feedback on the trigger. `:active` only, so it lasts exactly as\n long as the pointer is down and never lingers as a stuck state the way a\n class-driven one can. */.select.svelte-52lifo:not(.disabled) .select-trigger:where(.svelte-52lifo):active {background:var(--select-trigger-pressed-background, #ededed);}\n\n /* The error border has to outrank BOTH hover and focus/open, or the field\n stops reading as invalid the moment the user enters it -- which is the one\n moment they most need to see it. Listed after them, at equal or higher\n specificity, rather than reached for with !important. */.select.error.svelte-52lifo .select-trigger:where(.svelte-52lifo),\n .select.error.svelte-52lifo .select-trigger:where(.svelte-52lifo):hover,\n .select.error.svelte-52lifo .select-trigger:where(.svelte-52lifo):focus-within,\n .select.error.open.svelte-52lifo .select-trigger:where(.svelte-52lifo) {border-color:var(--select-trigger-error-border-color, #dc2626);}.select.error.svelte-52lifo .select-trigger:where(.svelte-52lifo):focus-within,\n .select.error.open.svelte-52lifo .select-trigger:where(.svelte-52lifo) {box-shadow:var(--select-trigger-error-shadow, 0 0 0 2px rgba(220, 38, 38, 0.2));}.select-error-message.svelte-52lifo {margin-top:var(--select-error-message-margin-top, 4px);font-size:var(--select-error-message-font-size, 12px);color:var(--select-error-message-color, #dc2626);}.select-control.svelte-52lifo {position:relative;}.select-control.has-clear.svelte-52lifo .select-trigger:where(.svelte-52lifo) {padding-inline-end:calc(var(--select-clear-size, 18px) + 36px);}.select-control.has-clear.svelte-52lifo .select-arrow:where(.svelte-52lifo) {position:absolute;right:12px;}.select-clear.svelte-52lifo {position:absolute;right:32px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;flex:none;width:var(--select-clear-size, 18px);height:var(--select-clear-size, 18px);margin:0;padding:0;border:none;border-radius:var(--select-clear-border-radius, var(--radius, 4px));background:var(--select-clear-background, transparent);color:var(--select-clear-color, #666666);font-size:var(--select-clear-font-size, 16px);line-height:1;cursor:pointer;}.select-clear.svelte-52lifo:focus-visible {outline:var(--select-clear-focus-outline, 2px solid currentColor);outline-offset:2px;}.select-clear.svelte-52lifo:hover {background:var(--select-clear-hover-background, #ededed);color:var(--select-clear-hover-color, #111111);}.select-clear.svelte-52lifo:active {background:var(--select-clear-pressed-background, #e0e0e0);}.select-value.svelte-52lifo {flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:var(--select-value-align, left);}.select-placeholder.svelte-52lifo {flex:1;color:var(--select-placeholder-color, #999999);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:var(--select-value-align, left);}.select-search.svelte-52lifo {flex:1;min-width:60px;border:none;outline:none;background:transparent;font-family:inherit;font-size:inherit;color:inherit;padding:0;cursor:text;}.select-search.svelte-52lifo::placeholder {color:var(--select-placeholder-color, #999999);}.select-arrow.svelte-52lifo {display:inline-flex;align-items:center;justify-content:center;width:var(--select-arrow-size, 16px);height:var(--select-arrow-size, 16px);color:var(--select-arrow-color, #666666);flex-shrink:0;transition:transform 0.15s;}.select.open.svelte-52lifo .select-arrow:where(.svelte-52lifo) {transform:rotate(180deg);}.select-arrow.svelte-52lifo svg {width:100%;height:100%;}.select-dropdown.svelte-52lifo {position:absolute;top:100%;left:var(--select-dropdown-left, 0);right:var(--select-dropdown-right, 0);min-width:var(--select-dropdown-min-width, auto);max-width:var(--select-dropdown-max-width, none);width:var(--select-dropdown-width, auto);margin-top:var(--select-dropdown-gap, 4px);background:var(--select-dropdown-background, #ffffff);border:var(--select-dropdown-border, 1px solid #cccccc);border-radius:var(--select-dropdown-border-radius, var(--radius, 4px));box-shadow:var(--select-dropdown-shadow, 0 4px 12px rgba(0, 0, 0, 0.1));max-height:var(--select-dropdown-max-height, 200px);overflow-y:auto;z-index:var(--select-dropdown-z-index, 10);}\n\n /* With the search box inside the panel, the PANEL must stop scrolling and\n the list scroll instead -- otherwise the search box scrolls away as soon\n as the user moves down the results, which is the one control they still\n need. The max-height moves down with the scrolling, so the panel keeps\n growing to fit the search box plus a list of the same height as before. */.select-dropdown.svelte-52lifo:has(> .select-menu-list:where(.svelte-52lifo)) {max-height:none;overflow-y:visible;display:flex;flex-direction:column;}.select-menu-list.svelte-52lifo {max-height:var(--select-dropdown-max-height, 200px);overflow-y:auto;}.select-menu-search.svelte-52lifo {flex:none;margin:var(--select-menu-search-margin, 6px);padding:var(--select-menu-search-padding, 6px 8px);border:var(--select-menu-search-border, 1px solid #cccccc);border-radius:var(--select-menu-search-border-radius, var(--radius, 4px));background:var(--select-menu-search-background, #ffffff);color:var(--select-menu-search-color, inherit);font-family:inherit;font-size:var(--select-menu-search-font-size, inherit);outline:none;}.select-menu-search.svelte-52lifo:focus-visible {border-color:var(--select-menu-search-focus-border-color, #2563eb);box-shadow:var(--select-menu-search-focus-shadow, 0 0 0 2px rgba(37, 99, 235, 0.2));}.select-dropdown-right.svelte-52lifo {left:auto;right:var(--select-dropdown-right, 0);min-width:var(--select-dropdown-min-width, 100%);max-width:var(--select-dropdown-max-width, none);width:var(--select-dropdown-width, max-content);}.select-dropdown.select-dropdown-portal.svelte-52lifo {\n /* Portaled to <body>: fixed positioning escapes overflow/scroll ancestors\n (e.g. a table cell). Placement (top/left/width/min-width) is set inline\n from the trigger rect, so neutralise the in-flow anchoring here. */position:fixed;right:auto;margin-top:0;\n /* In the root stacking context the panel competes with modals/sheets rather\n than painting above same-container siblings, so default it into the\n top-layer band (consumers still override via --select-dropdown-z-index). */z-index:var(--select-dropdown-z-index, 1000);}.select-option.svelte-52lifo {padding:var(--select-option-padding, 8px 12px);color:var(--select-option-color, #333333);font-size:var(--select-option-font-size, inherit);cursor:pointer;transition:background 0.1s;}\n\n /* Per-option leading icon (SelectItem.icon). Kept inline + vertically centred so\n it needs no change to the option's display and can't regress icon-less lists. */.select-option.svelte-52lifo .select-option-icon {--image-width: var(--select-option-icon-size, 16px);--image-height: var(--select-option-icon-size, 16px);--image-object-fit: contain;color:var(--select-option-icon-color, inherit);vertical-align:middle;margin-right:var(--select-option-icon-gap, 8px);}.select-option.multi.svelte-52lifo {display:flex;align-items:center;gap:var(--select-option-gap, 0);}.select-option.svelte-52lifo:hover,\n .select-option.highlighted.svelte-52lifo {background:var(--select-option-hover-background, #f0f0f0);color:var(--select-option-hover-color, var(--select-option-color, #333333));}.select-option.selected.svelte-52lifo {background:var(--select-option-selected-background, #e8f0fe);color:var(--select-option-selected-color, var(--select-option-color, #333333));}.select-option.selected.highlighted.svelte-52lifo {background:var(\n --select-option-selected-hover-background,\n var(--select-option-selected-background, #e8f0fe)\n );}\n\n /* Pressed feedback comes last, and each selector carries enough specificity\n to outrank its non-active counterpart above. An option is always hovered\n when pressed and is often selected too, so a single low-specificity rule\n earlier in the sheet would be correct in isolation and invisible in\n practice -- which is how a pressed state ends up shipping as dead CSS.\n A press on an already-selected row still has to confirm the tap landed. */.select-option.svelte-52lifo:active,\n .select-option.selected.svelte-52lifo:active,\n .select-option.selected.highlighted.svelte-52lifo:active {background:var(--select-option-pressed-background, #ededed);}.select-option-indicator.svelte-52lifo {display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;box-sizing:border-box;width:var(--select-option-indicator-size, 18px);height:var(--select-option-indicator-size, 18px);border:var(--select-option-indicator-border, 2px solid #757575);border-radius:var(--select-option-indicator-border-radius, var(--radius, 4px));background-color:var(--select-option-indicator-background, transparent);color:var(--select-option-indicator-color, currentColor);transition:background-color 0.15s,\n border-color 0.15s;}.select-option-indicator.checked.svelte-52lifo {background-color:var(--select-option-indicator-checked-background, #2196f3);border-color:var(--select-option-indicator-checked-border-color, #2196f3);}.select-option-check.svelte-52lifo {display:inline-flex;align-items:center;justify-content:center;width:var(--select-option-indicator-check-size, 12px);height:var(--select-option-indicator-check-size, 12px);color:var(--select-option-indicator-check-color, #ffffff);}.select-option-check.svelte-52lifo svg {width:100%;height:100%;}.select-option-indicator.indeterminate.svelte-52lifo {background-color:var(--select-option-indicator-checked-background, #2196f3);border-color:var(--select-option-indicator-checked-border-color, #2196f3);}.select-option-dash.svelte-52lifo {width:var(--select-option-indicator-dash-size, 10px);height:var(--select-option-indicator-dash-thickness, 2px);border-radius:1px;background-color:var(--select-option-indicator-dash-color, #ffffff);}.select-option.select-all.svelte-52lifo {border-bottom:var(--select-all-border, none);font-weight:var(--select-all-font-weight, inherit);}.select-empty.svelte-52lifo {padding:var(--select-empty-padding, 8px 12px);color:var(--select-empty-color, #999999);font-style:var(--select-empty-font-style, italic);font-size:var(--select-empty-font-size, inherit);}.select-bottom-content.svelte-52lifo {border-top:var(--select-bottom-content-border, none);padding:var(--select-bottom-content-padding, 8px 12px);}.select-trigger.svelte-52lifo .pill {--pill-background: var(--select-pill-background, #e0e0e0);--pill-color: var(--select-pill-color, #333333);--pill-border-radius: var(--select-pill-border-radius, 999px);--pill-padding: var(--select-pill-padding, 2px 8px);--pill-font-size: var(--select-pill-font-size, 13px);}\n\n /* Ghost hierarchy: transparent, borderless trigger */.select.ghost.svelte-52lifo .select-trigger:where(.svelte-52lifo) {background:var(--select-ghost-trigger-background, transparent);border-color:var(--select-ghost-trigger-border-color, transparent);box-shadow:none;}.select.ghost.svelte-52lifo .select-trigger:where(.svelte-52lifo):hover:not(.disabled:where(.svelte-52lifo) .select-trigger:where(.svelte-52lifo)) {border-color:var(--select-ghost-trigger-hover-border-color, transparent);background:var(--select-ghost-trigger-hover-background, rgba(0, 0, 0, 0.04));}.select.ghost.open.svelte-52lifo .select-trigger:where(.svelte-52lifo) {border-color:var(--select-ghost-trigger-open-border-color, transparent);background:var(--select-ghost-trigger-open-background, rgba(0, 0, 0, 0.06));box-shadow:none;}\n\n /* Single-select right-edge tick (showSelectedTick) */.select-option.tickable.svelte-52lifo {display:flex;align-items:center;gap:8px;}.select-option.tickable.svelte-52lifo .select-option-label:where(.svelte-52lifo) {flex:1 1 auto;min-width:0;}.select-option-tick.svelte-52lifo {display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--select-option-tick-size, 16px);height:var(--select-option-tick-size, 16px);color:var(--select-option-tick-color, #2563eb);}.select-option-tick.svelte-52lifo svg {width:100%;height:100%;}"
|
|
17009
17061
|
};
|
|
17010
17062
|
function Select(e, t) {
|
|
17011
17063
|
let n = props_id();
|
|
17012
17064
|
push(t, !0), append_styles$1(e, $$css$38);
|
|
17013
|
-
let i = prop(t, "items", 7), a = prop(t, "value", 31, () => proxy([])), o = prop(t, "multiple", 7, !1), s = prop(t, "searchable", 7, !1), c = prop(t, "searchPosition", 7, "trigger"), l = prop(t, "placeholder", 7, ""), u = prop(t, "disabled", 7, !1), f = prop(t, "error", 7, !1), p = prop(t, "errorMessage", 7), h = prop(t, "clearable", 7, !1), S = prop(t, "onclear", 7), C = prop(t, "bottomContent", 7), k = prop(t, "optionIndicator", 7), R = prop(t, "showSelectAll", 7, !1), te = prop(t, "selectAllLabel", 7, "Select all"), ne = prop(t, "showSelectedTick", 7, !1), re = prop(t, "triggerSummary", 7), G = prop(t, "testId", 7), be = prop(t, "itemTestId", 7), Me = prop(t, "onchange", 7), Re = prop(t, "onopen", 7), Ue = prop(t, "onclose", 7), it = prop(t, "classes", 7), at = prop(t, "open", 15, !1), ot = prop(t, "dropdownAlign", 7, "left"), ct = prop(t, "hierarchy", 7, "default"), lt = prop(t, "leftIcon", 7), ut = prop(t, "leftIconTestId", 7), dt = prop(t, "usePortal", 7, !1);
|
|
17014
|
-
function
|
|
17065
|
+
let i = prop(t, "items", 7), a = prop(t, "value", 31, () => proxy([])), o = prop(t, "multiple", 7, !1), s = prop(t, "searchable", 7, !1), c = prop(t, "searchPosition", 7, "trigger"), l = prop(t, "placeholder", 7, ""), u = prop(t, "disabled", 7, !1), f = prop(t, "error", 7, !1), p = prop(t, "errorMessage", 7), h = prop(t, "clearable", 7, !1), S = prop(t, "onclear", 7), C = prop(t, "bottomContent", 7), k = prop(t, "optionIndicator", 7), R = prop(t, "showSelectAll", 7, !1), te = prop(t, "selectAllLabel", 7, "Select all"), ne = prop(t, "showSelectedTick", 7, !1), re = prop(t, "triggerSummary", 7), G = prop(t, "testId", 7), be = prop(t, "itemTestId", 7), Me = prop(t, "onchange", 7), Re = prop(t, "onopen", 7), Ue = prop(t, "onclose", 7), it = prop(t, "classes", 7), at = prop(t, "open", 15, !1), ot = prop(t, "dropdownAlign", 7, "left"), ct = prop(t, "hierarchy", 7, "default"), lt = prop(t, "leftIcon", 7), ut = prop(t, "leftIconTestId", 7), dt = prop(t, "usePortal", 7, !1), ft = prop(t, "name", 7);
|
|
17066
|
+
function pt(e) {
|
|
17015
17067
|
return e.map((e) => typeof e == "string" ? {
|
|
17016
17068
|
id: e,
|
|
17017
17069
|
label: e
|
|
17018
17070
|
} : e);
|
|
17019
17071
|
}
|
|
17020
|
-
let
|
|
17021
|
-
function jt(e) {
|
|
17022
|
-
e.stopPropagation(), a().length !== 0 && (a([]), Me()?.(a()), S()?.(), s() && get(vt) !== null ? (ht = !0, get(vt).focus(), ht = !1) : get(yt)?.focus());
|
|
17023
|
-
}
|
|
17072
|
+
let mt = /* @__PURE__ */ user_derived(() => pt(i())), ht = /* @__PURE__ */ state(""), gt = !1, _t = /* @__PURE__ */ state(-1), vt = /* @__PURE__ */ state(null), yt = /* @__PURE__ */ state(null), bt = /* @__PURE__ */ state(null), xt = /* @__PURE__ */ state(null), St = /* @__PURE__ */ state(0), Ct = /* @__PURE__ */ state(0), wt = /* @__PURE__ */ state(0), Tt = 4, Et = `select-listbox-${n}`, Dt = `${Et}-error`, Ot = /* @__PURE__ */ user_derived(() => s() && c() !== "menu"), kt = /* @__PURE__ */ user_derived(() => s() && c() === "menu"), At = /* @__PURE__ */ user_derived(() => f() && typeof p() == "string" && p().trim().length > 0), jt = /* @__PURE__ */ user_derived(() => h() && !u() && a().length > 0);
|
|
17024
17073
|
function Mt(e) {
|
|
17025
|
-
|
|
17074
|
+
e.stopPropagation(), a().length !== 0 && (a([]), Me()?.(a()), S()?.(), s() && get(yt) !== null ? (gt = !0, get(yt).focus(), gt = !1) : get(bt)?.focus());
|
|
17075
|
+
}
|
|
17076
|
+
function Nt(e) {
|
|
17077
|
+
let t = get(mt).find((t) => t.id === e);
|
|
17026
17078
|
return typeof t == "object" ? t.label : e;
|
|
17027
17079
|
}
|
|
17028
|
-
let
|
|
17080
|
+
let Pt = /* @__PURE__ */ user_derived(() => s() && get(ht).length > 0 ? get(mt).filter((e) => e.label.toLowerCase().includes(get(ht).toLowerCase())) : get(mt)), It = /* @__PURE__ */ user_derived(() => o() && R() && get(Pt).length > 0), Lt = /* @__PURE__ */ user_derived(() => get(Pt).filter((e) => a().includes(e.id)).length), Rt = /* @__PURE__ */ user_derived(() => get(Pt).length > 0 && get(Lt) === get(Pt).length), zt = /* @__PURE__ */ user_derived(() => get(Lt) > 0 && get(Lt) < get(Pt).length), Bt = /* @__PURE__ */ user_derived(() => get(It) ? [{ kind: "select-all" }, ...get(Pt).map((e) => ({
|
|
17029
17081
|
kind: "item",
|
|
17030
17082
|
item: e
|
|
17031
|
-
}))] : get(
|
|
17083
|
+
}))] : get(Pt).map((e) => ({
|
|
17032
17084
|
kind: "item",
|
|
17033
17085
|
item: e
|
|
17034
|
-
}))),
|
|
17086
|
+
}))), Ht = /* @__PURE__ */ user_derived(() => {
|
|
17035
17087
|
let e = a().at(0);
|
|
17036
|
-
return typeof e == "string" ?
|
|
17037
|
-
}),
|
|
17088
|
+
return typeof e == "string" ? Nt(e) : "";
|
|
17089
|
+
}), Gt = /* @__PURE__ */ user_derived(() => get(_t) >= 0 ? `${Et}-option-${get(_t)}` : null), qt = /* @__PURE__ */ user_derived(() => at() && get(Ht).length > 0 ? get(Ht) : l());
|
|
17038
17090
|
user_effect(() => {
|
|
17039
17091
|
if (!dt() || !at() || typeof window > "u") return;
|
|
17040
17092
|
let e = null, t = () => {
|
|
17041
17093
|
e === null && (e = requestAnimationFrame(() => {
|
|
17042
|
-
e = null, set(
|
|
17094
|
+
e = null, set(wt, get(wt) + 1);
|
|
17043
17095
|
}));
|
|
17044
17096
|
};
|
|
17045
17097
|
return window.addEventListener("scroll", t, {
|
|
@@ -17049,12 +17101,12 @@ function Select(e, t) {
|
|
|
17049
17101
|
window.removeEventListener("scroll", t, { capture: !0 }), window.removeEventListener("resize", t), e !== null && cancelAnimationFrame(e);
|
|
17050
17102
|
};
|
|
17051
17103
|
});
|
|
17052
|
-
let
|
|
17104
|
+
let Zt = (e) => {
|
|
17053
17105
|
if (dt()) return document.body.appendChild(e), { destroy: () => e.remove() };
|
|
17054
|
-
},
|
|
17055
|
-
if (!dt() || !at() || get(
|
|
17056
|
-
get(
|
|
17057
|
-
let e = get(
|
|
17106
|
+
}, Qt = /* @__PURE__ */ user_derived(() => {
|
|
17107
|
+
if (!dt() || !at() || get(bt) === null) return "";
|
|
17108
|
+
get(wt);
|
|
17109
|
+
let e = get(bt).getBoundingClientRect(), t = typeof window > "u" ? {
|
|
17058
17110
|
width: Infinity,
|
|
17059
17111
|
height: Infinity
|
|
17060
17112
|
} : {
|
|
@@ -17069,8 +17121,8 @@ function Select(e, t) {
|
|
|
17069
17121
|
width: e.width
|
|
17070
17122
|
},
|
|
17071
17123
|
dropdown: {
|
|
17072
|
-
width: get(
|
|
17073
|
-
height: get(
|
|
17124
|
+
width: get(St),
|
|
17125
|
+
height: get(Ct)
|
|
17074
17126
|
},
|
|
17075
17127
|
viewport: t,
|
|
17076
17128
|
align: ot(),
|
|
@@ -17078,109 +17130,109 @@ function Select(e, t) {
|
|
|
17078
17130
|
}), i = n.width === null ? "" : `width:${n.width}px;`;
|
|
17079
17131
|
return `top:${n.top}px;left:${n.left}px;min-width:${n.minWidth}px;${i}`;
|
|
17080
17132
|
});
|
|
17081
|
-
async function
|
|
17082
|
-
u() || at() || (at(!0), Re()?.(), set(
|
|
17133
|
+
async function $t() {
|
|
17134
|
+
u() || at() || (at(!0), Re()?.(), set(_t, -1), set(ht, ""), get(Ot) && (await tick(), get(yt) !== null && get(yt).focus()));
|
|
17083
17135
|
}
|
|
17084
|
-
function
|
|
17085
|
-
at(!1), Ue()?.(), set(
|
|
17086
|
-
}
|
|
17087
|
-
function en(e) {
|
|
17088
|
-
u() || (o() ? a(a().includes(e) ? a().filter((t) => t !== e) : [...a(), e]) : (a([e]), $t(), get(Ot) && get(yt)?.focus()), Me()?.(a()));
|
|
17136
|
+
function en() {
|
|
17137
|
+
at(!1), Ue()?.(), set(ht, ""), set(_t, -1);
|
|
17089
17138
|
}
|
|
17090
17139
|
function tn(e) {
|
|
17091
|
-
u() || (a(a().filter((t) => t !== e)), Me()?.(a()));
|
|
17140
|
+
u() || (o() ? a(a().includes(e) ? a().filter((t) => t !== e) : [...a(), e]) : (a([e]), en(), get(kt) && get(bt)?.focus()), Me()?.(a()));
|
|
17092
17141
|
}
|
|
17093
|
-
function nn() {
|
|
17094
|
-
u() || (
|
|
17142
|
+
function nn(e) {
|
|
17143
|
+
u() || (a(a().filter((t) => t !== e)), Me()?.(a()));
|
|
17095
17144
|
}
|
|
17096
17145
|
function rn() {
|
|
17097
|
-
|
|
17098
|
-
|
|
17099
|
-
|
|
17100
|
-
|
|
17101
|
-
|
|
17102
|
-
|
|
17103
|
-
|
|
17104
|
-
|
|
17146
|
+
u() || (get(Rt) ? a(a().filter((e) => !get(Pt).some((t) => t.id === e))) : a([...new Set([...a(), ...get(Pt).map((e) => e.id)])]), Me()?.(a()));
|
|
17147
|
+
}
|
|
17148
|
+
function an() {
|
|
17149
|
+
if (get(_t) < 0 || get(_t) >= get(Bt).length) return;
|
|
17150
|
+
let e = get(Bt).at(get(_t));
|
|
17151
|
+
typeof e != "object" || !e || (e.kind === "select-all" ? rn() : tn(e.item.id));
|
|
17152
|
+
}
|
|
17153
|
+
async function on(e) {
|
|
17154
|
+
let t = get(_t) + e;
|
|
17155
|
+
if (!(t < 0 || t >= get(Bt).length) && (set(_t, t), await tick(), get(xt) !== null)) {
|
|
17156
|
+
let e = get(xt).querySelector(".select-option.highlighted");
|
|
17105
17157
|
e instanceof HTMLElement && e.scrollIntoView({ block: "nearest" });
|
|
17106
17158
|
}
|
|
17107
17159
|
}
|
|
17108
|
-
function
|
|
17160
|
+
function sn(e) {
|
|
17109
17161
|
if (e.target instanceof HTMLInputElement) {
|
|
17110
|
-
at() ||
|
|
17162
|
+
at() || $t();
|
|
17111
17163
|
return;
|
|
17112
17164
|
}
|
|
17113
|
-
at() ?
|
|
17114
|
-
}
|
|
17115
|
-
let sn = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
17116
|
-
function cn() {
|
|
17117
|
-
return get(bt) === null ? [] : [...get(bt).querySelectorAll(sn)];
|
|
17165
|
+
at() ? en() : $t();
|
|
17118
17166
|
}
|
|
17167
|
+
let cn = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
17119
17168
|
function ln() {
|
|
17120
|
-
|
|
17121
|
-
let e = [...document.querySelectorAll(sn)].filter((e) => e.closest(".select-dropdown") === null);
|
|
17122
|
-
e.at(e.indexOf(get(yt)) + 1)?.focus();
|
|
17169
|
+
return get(xt) === null ? [] : [...get(xt).querySelectorAll(cn)];
|
|
17123
17170
|
}
|
|
17124
|
-
function un(
|
|
17171
|
+
function un() {
|
|
17172
|
+
if (get(bt) === null || typeof document > "u") return;
|
|
17173
|
+
let e = [...document.querySelectorAll(cn)].filter((e) => e.closest(".select-dropdown") === null);
|
|
17174
|
+
e.at(e.indexOf(get(bt)) + 1)?.focus();
|
|
17175
|
+
}
|
|
17176
|
+
function dn(e) {
|
|
17125
17177
|
if (!u()) switch (e.key) {
|
|
17126
17178
|
case "Enter":
|
|
17127
|
-
e.preventDefault(), at() ?
|
|
17179
|
+
e.preventDefault(), at() ? an() : $t();
|
|
17128
17180
|
break;
|
|
17129
17181
|
case " ":
|
|
17130
|
-
e.target instanceof HTMLInputElement || (e.preventDefault(), at() ?
|
|
17182
|
+
e.target instanceof HTMLInputElement || (e.preventDefault(), at() ? an() : $t());
|
|
17131
17183
|
break;
|
|
17132
17184
|
case "ArrowDown":
|
|
17133
|
-
e.preventDefault(), at() ?
|
|
17185
|
+
e.preventDefault(), at() ? on(1) : $t();
|
|
17134
17186
|
break;
|
|
17135
17187
|
case "ArrowUp":
|
|
17136
|
-
e.preventDefault(),
|
|
17188
|
+
e.preventDefault(), on(-1);
|
|
17137
17189
|
break;
|
|
17138
17190
|
case "Escape":
|
|
17139
|
-
at() && (
|
|
17191
|
+
at() && (en(), !get(Ot) && get(bt) !== null && get(bt).focus());
|
|
17140
17192
|
break;
|
|
17141
17193
|
case "Backspace":
|
|
17142
|
-
if (o() && get(
|
|
17194
|
+
if (o() && get(ht) === "" && a().length > 0) {
|
|
17143
17195
|
let e = a().at(-1);
|
|
17144
|
-
typeof e == "string" &&
|
|
17196
|
+
typeof e == "string" && nn(e);
|
|
17145
17197
|
}
|
|
17146
17198
|
break;
|
|
17147
17199
|
case "Tab": {
|
|
17148
17200
|
if (!at()) break;
|
|
17149
|
-
if (!get(
|
|
17150
|
-
|
|
17201
|
+
if (!get(kt)) {
|
|
17202
|
+
en();
|
|
17151
17203
|
break;
|
|
17152
17204
|
}
|
|
17153
17205
|
let t = document.activeElement;
|
|
17154
17206
|
if (e.shiftKey) {
|
|
17155
|
-
t === get(
|
|
17207
|
+
t === get(bt) ? en() : t === get(yt) && (e.preventDefault(), get(bt)?.focus());
|
|
17156
17208
|
break;
|
|
17157
17209
|
}
|
|
17158
|
-
if (t === get(
|
|
17159
|
-
e.preventDefault(), get(
|
|
17210
|
+
if (t === get(bt)) {
|
|
17211
|
+
e.preventDefault(), get(yt)?.focus();
|
|
17160
17212
|
break;
|
|
17161
17213
|
}
|
|
17162
|
-
t ===
|
|
17214
|
+
t === ln().at(-1) && (e.preventDefault(), en(), un());
|
|
17163
17215
|
break;
|
|
17164
17216
|
}
|
|
17165
17217
|
}
|
|
17166
17218
|
}
|
|
17167
|
-
function
|
|
17168
|
-
e.target !== get(
|
|
17219
|
+
function fn(e) {
|
|
17220
|
+
e.target !== get(yt) && dn(e);
|
|
17169
17221
|
}
|
|
17170
|
-
let
|
|
17171
|
-
function
|
|
17172
|
-
e.target instanceof HTMLInputElement && (set(
|
|
17222
|
+
let pn = (e) => (e.addEventListener("keydown", fn), { destroy: () => e.removeEventListener("keydown", fn) });
|
|
17223
|
+
function mn(e) {
|
|
17224
|
+
e.target instanceof HTMLInputElement && (set(ht, e.target.value, !0), at() || $t(), set(_t, -1));
|
|
17173
17225
|
}
|
|
17174
|
-
function
|
|
17175
|
-
!at() && !
|
|
17226
|
+
function hn() {
|
|
17227
|
+
!at() && !gt && $t();
|
|
17176
17228
|
}
|
|
17177
|
-
function
|
|
17178
|
-
e.target instanceof Node && get(
|
|
17229
|
+
function gn(e) {
|
|
17230
|
+
e.target instanceof Node && get(vt) !== null && !get(vt).contains(e.target) && !(get(xt) !== null && get(xt).contains(e.target)) && en();
|
|
17179
17231
|
}
|
|
17180
|
-
onMount(() => (document.addEventListener("click",
|
|
17181
|
-
document.removeEventListener("click",
|
|
17232
|
+
onMount(() => (document.addEventListener("click", gn), () => {
|
|
17233
|
+
document.removeEventListener("click", gn), at() && Ue()?.();
|
|
17182
17234
|
}));
|
|
17183
|
-
var
|
|
17235
|
+
var _n = {
|
|
17184
17236
|
get items() {
|
|
17185
17237
|
return i();
|
|
17186
17238
|
},
|
|
@@ -17354,9 +17406,15 @@ function Select(e, t) {
|
|
|
17354
17406
|
},
|
|
17355
17407
|
set usePortal(e = !1) {
|
|
17356
17408
|
dt(e), flushSync();
|
|
17409
|
+
},
|
|
17410
|
+
get name() {
|
|
17411
|
+
return ft();
|
|
17412
|
+
},
|
|
17413
|
+
set name(e) {
|
|
17414
|
+
ft(e), flushSync();
|
|
17357
17415
|
}
|
|
17358
|
-
},
|
|
17359
|
-
attribute_effect(
|
|
17416
|
+
}, vn = root_17$5();
|
|
17417
|
+
attribute_effect(vn, () => ({
|
|
17360
17418
|
class: `select ${it() ?? "" ?? ""}`,
|
|
17361
17419
|
...typeof G() == "string" ? {
|
|
17362
17420
|
"data-pw": G(),
|
|
@@ -17375,33 +17433,33 @@ function Select(e, t) {
|
|
|
17375
17433
|
append(e, root$36());
|
|
17376
17434
|
}, s = (e) => {
|
|
17377
17435
|
var t = comment();
|
|
17378
|
-
each(first_child(t), 19, () => get(
|
|
17436
|
+
each(first_child(t), 19, () => get(Bt), (e) => e.kind === "select-all" ? "select-all" : e.item.id, (e, t, n) => {
|
|
17379
17437
|
var i = comment(), s = first_child(i), c = (e) => {
|
|
17380
|
-
var t = root_4$19(), i = () => set(
|
|
17438
|
+
var t = root_4$19(), i = () => set(_t, get(n), !0);
|
|
17381
17439
|
attribute_effect(t, () => ({
|
|
17382
17440
|
class: "select-option select-all",
|
|
17383
17441
|
role: "option",
|
|
17384
|
-
id: `${
|
|
17385
|
-
"aria-selected": get(
|
|
17386
|
-
"aria-label": get(
|
|
17442
|
+
id: `${Et}-option-${get(n)}`,
|
|
17443
|
+
"aria-selected": get(Rt),
|
|
17444
|
+
"aria-label": get(zt) ? `${te()}, ${get(Lt)} of ${get(Pt).length} selected` : te(),
|
|
17387
17445
|
tabindex: "-1",
|
|
17388
17446
|
...typeof G() == "string" ? {
|
|
17389
17447
|
"data-pw": `${G()}-select-all`,
|
|
17390
17448
|
testID: `${G()}-select-all`
|
|
17391
17449
|
} : {},
|
|
17392
|
-
onclick:
|
|
17450
|
+
onclick: rn,
|
|
17393
17451
|
onmouseenter: i,
|
|
17394
17452
|
[CLASS]: {
|
|
17395
17453
|
multi: o(),
|
|
17396
|
-
selected: get(
|
|
17397
|
-
highlighted: get(n) === get(
|
|
17454
|
+
selected: get(Rt),
|
|
17455
|
+
highlighted: get(n) === get(_t)
|
|
17398
17456
|
}
|
|
17399
17457
|
}), void 0, void 0, void 0, "svelte-52lifo");
|
|
17400
17458
|
var a = child(t), s = (e) => {
|
|
17401
17459
|
var t = comment();
|
|
17402
17460
|
snippet(first_child(t), k, () => ({
|
|
17403
|
-
checked: get(
|
|
17404
|
-
indeterminate: get(
|
|
17461
|
+
checked: get(Rt),
|
|
17462
|
+
indeterminate: get(zt)
|
|
17405
17463
|
})), append(e, t);
|
|
17406
17464
|
}, c = (e) => {
|
|
17407
17465
|
var t = root_3$24();
|
|
@@ -17416,12 +17474,12 @@ function Select(e, t) {
|
|
|
17416
17474
|
}), append(e, t);
|
|
17417
17475
|
};
|
|
17418
17476
|
if_block(i, (e) => {
|
|
17419
|
-
get(
|
|
17477
|
+
get(Rt) ? e(a) : get(zt) && e(o, 1);
|
|
17420
17478
|
}), reset(t), template_effect(() => {
|
|
17421
17479
|
n = set_class(t, 1, "select-option-indicator svelte-52lifo", null, n, {
|
|
17422
|
-
checked: get(
|
|
17423
|
-
indeterminate: get(
|
|
17424
|
-
}), set_attribute(t, "data-checked", get(
|
|
17480
|
+
checked: get(Rt),
|
|
17481
|
+
indeterminate: get(zt)
|
|
17482
|
+
}), set_attribute(t, "data-checked", get(Rt) ? "true" : "false"), set_attribute(t, "data-pw", typeof G() == "string" ? `${G()}-select-all-indicator` : null), set_attribute(t, "testid", typeof G() == "string" ? `${G()}-select-all-indicator` : null);
|
|
17425
17483
|
}), append(e, t);
|
|
17426
17484
|
};
|
|
17427
17485
|
if_block(a, (e) => {
|
|
@@ -17430,11 +17488,11 @@ function Select(e, t) {
|
|
|
17430
17488
|
var l = sibling(a);
|
|
17431
17489
|
reset(t), template_effect(() => set_text(l, ` ${te() ?? ""}`)), append(e, t);
|
|
17432
17490
|
}, l = (e) => {
|
|
17433
|
-
var i = root_6$16(), s = () =>
|
|
17491
|
+
var i = root_6$16(), s = () => tn(get(t).item.id), c = () => set(_t, get(n), !0);
|
|
17434
17492
|
attribute_effect(i, (e, i) => ({
|
|
17435
17493
|
class: "select-option",
|
|
17436
17494
|
role: "option",
|
|
17437
|
-
id: `${
|
|
17495
|
+
id: `${Et}-option-${get(n)}`,
|
|
17438
17496
|
"aria-selected": e,
|
|
17439
17497
|
tabindex: "-1",
|
|
17440
17498
|
...typeof get(t).item.testId == "string" ? {
|
|
@@ -17454,7 +17512,7 @@ function Select(e, t) {
|
|
|
17454
17512
|
multi: o(),
|
|
17455
17513
|
tickable: ne() && !o(),
|
|
17456
17514
|
selected: a().includes(get(t).item.id),
|
|
17457
|
-
highlighted: get(n) === get(
|
|
17515
|
+
highlighted: get(n) === get(_t)
|
|
17458
17516
|
})], void 0, void 0, "svelte-52lifo");
|
|
17459
17517
|
var l = child(i), u = (e) => {
|
|
17460
17518
|
var n = comment(), i = first_child(n), o = (e) => {
|
|
@@ -17517,33 +17575,45 @@ function Select(e, t) {
|
|
|
17517
17575
|
}), append(e, t);
|
|
17518
17576
|
};
|
|
17519
17577
|
if_block(n, (e) => {
|
|
17520
|
-
get(
|
|
17578
|
+
get(Pt).length === 0 ? e(i) : e(s, -1);
|
|
17521
17579
|
});
|
|
17522
17580
|
var c = sibling(n, 2), l = (e) => {
|
|
17523
17581
|
var t = root_7$15();
|
|
17524
17582
|
snippet(child(t), C), reset(t), append(e, t);
|
|
17525
17583
|
};
|
|
17526
17584
|
if_block(c, (e) => {
|
|
17527
|
-
typeof C() == "function" && !get(
|
|
17585
|
+
typeof C() == "function" && !get(kt) && e(l);
|
|
17586
|
+
}), append(e, t);
|
|
17587
|
+
};
|
|
17588
|
+
var yn = child(vn), bn = (e) => {
|
|
17589
|
+
var t = comment();
|
|
17590
|
+
each(first_child(t), 16, a, (e) => e, (e, t) => {
|
|
17591
|
+
var n = root_9$11();
|
|
17592
|
+
remove_input_defaults(n), template_effect(() => {
|
|
17593
|
+
set_attribute(n, "name", ft()), set_value(n, t), n.disabled = u();
|
|
17594
|
+
}), append(e, n);
|
|
17528
17595
|
}), append(e, t);
|
|
17529
17596
|
};
|
|
17530
|
-
|
|
17597
|
+
if_block(yn, (e) => {
|
|
17598
|
+
typeof ft() == "string" && ft().length > 0 && e(bn);
|
|
17599
|
+
});
|
|
17600
|
+
var xn = sibling(yn, 2);
|
|
17531
17601
|
let t;
|
|
17532
|
-
var
|
|
17533
|
-
attribute_effect(
|
|
17602
|
+
var Sn = child(xn);
|
|
17603
|
+
attribute_effect(Sn, () => ({
|
|
17534
17604
|
class: "select-trigger",
|
|
17535
|
-
onclick:
|
|
17536
|
-
onkeydown:
|
|
17605
|
+
onclick: sn,
|
|
17606
|
+
onkeydown: dn,
|
|
17537
17607
|
role: "combobox",
|
|
17538
17608
|
"aria-expanded": at(),
|
|
17539
17609
|
"aria-haspopup": "listbox",
|
|
17540
|
-
"aria-controls":
|
|
17610
|
+
"aria-controls": Et,
|
|
17541
17611
|
"aria-invalid": f() ? "true" : null,
|
|
17542
|
-
"aria-describedby": get(
|
|
17543
|
-
...get(
|
|
17544
|
-
tabindex: u() || get(
|
|
17612
|
+
"aria-describedby": get(At) ? Dt : null,
|
|
17613
|
+
...get(Gt) === null ? {} : { "aria-activedescendant": get(Gt) },
|
|
17614
|
+
tabindex: u() || get(Ot) ? -1 : 0
|
|
17545
17615
|
}), void 0, void 0, void 0, "svelte-52lifo");
|
|
17546
|
-
var
|
|
17616
|
+
var Cn = child(Sn), wn = (e) => {
|
|
17547
17617
|
Img(e, spread_props({
|
|
17548
17618
|
inlineSvg: !0,
|
|
17549
17619
|
get src() {
|
|
@@ -17554,30 +17624,30 @@ function Select(e, t) {
|
|
|
17554
17624
|
classes: "select-left-icon"
|
|
17555
17625
|
}, () => typeof ut() == "string" ? { testId: ut() } : {}));
|
|
17556
17626
|
};
|
|
17557
|
-
if_block(
|
|
17558
|
-
typeof lt() == "string" && lt().length > 0 && e(
|
|
17627
|
+
if_block(Cn, (e) => {
|
|
17628
|
+
typeof lt() == "string" && lt().length > 0 && e(wn);
|
|
17559
17629
|
});
|
|
17560
|
-
var
|
|
17630
|
+
var Tn = sibling(Cn, 2), En = (e) => {
|
|
17561
17631
|
var t = comment(), n = first_child(t), i = (e) => {
|
|
17562
17632
|
var t = root_8$14(), n = first_child(t);
|
|
17563
17633
|
snippet(n, re, () => ({
|
|
17564
17634
|
value: a(),
|
|
17565
|
-
items: get(
|
|
17635
|
+
items: get(mt)
|
|
17566
17636
|
}));
|
|
17567
17637
|
var i = sibling(n, 2), o = (e) => {
|
|
17568
|
-
var t =
|
|
17569
|
-
remove_input_defaults(t), bind_this(t, (e) => set(
|
|
17570
|
-
set_value(t, get(
|
|
17571
|
-
}), delegated("input", t,
|
|
17638
|
+
var t = root_10$10();
|
|
17639
|
+
remove_input_defaults(t), bind_this(t, (e) => set(yt, e), () => get(yt)), template_effect(() => {
|
|
17640
|
+
set_value(t, get(ht)), set_attribute(t, "placeholder", a().length === 0 ? l() : ""), t.disabled = u(), set_attribute(t, "aria-invalid", f() ? "true" : null), set_attribute(t, "aria-describedby", get(At) ? Dt : null), set_attribute(t, "tabindex", u() ? -1 : 0), set_attribute(t, "data-pw", typeof G() == "string" ? `${G()}-search` : null), set_attribute(t, "testid", typeof G() == "string" ? `${G()}-search` : null);
|
|
17641
|
+
}), delegated("input", t, mn), event("focus", t, hn), append(e, t);
|
|
17572
17642
|
};
|
|
17573
17643
|
if_block(i, (e) => {
|
|
17574
|
-
get(
|
|
17644
|
+
get(Ot) && e(o);
|
|
17575
17645
|
}), append(e, t);
|
|
17576
17646
|
}, o = (e) => {
|
|
17577
17647
|
var t = root_8$14(), n = first_child(t);
|
|
17578
17648
|
each(n, 16, a, (e) => e, (e, t) => {
|
|
17579
17649
|
{
|
|
17580
|
-
let n = /* @__PURE__ */ user_derived(() =>
|
|
17650
|
+
let n = /* @__PURE__ */ user_derived(() => Nt(t));
|
|
17581
17651
|
Pill(e, spread_props({
|
|
17582
17652
|
get text() {
|
|
17583
17653
|
return get(n);
|
|
@@ -17586,68 +17656,68 @@ function Select(e, t) {
|
|
|
17586
17656
|
get disabled() {
|
|
17587
17657
|
return u();
|
|
17588
17658
|
},
|
|
17589
|
-
ondismiss: () =>
|
|
17659
|
+
ondismiss: () => nn(t)
|
|
17590
17660
|
}, () => typeof G() == "string" ? { testId: `${G()}-pill-${t}` } : {}));
|
|
17591
17661
|
}
|
|
17592
17662
|
});
|
|
17593
17663
|
var i = sibling(n, 2), o = (e) => {
|
|
17594
|
-
var t =
|
|
17595
|
-
remove_input_defaults(t), bind_this(t, (e) => set(
|
|
17596
|
-
set_value(t, get(
|
|
17597
|
-
}), delegated("input", t,
|
|
17664
|
+
var t = root_10$10();
|
|
17665
|
+
remove_input_defaults(t), bind_this(t, (e) => set(yt, e), () => get(yt)), template_effect(() => {
|
|
17666
|
+
set_value(t, get(ht)), set_attribute(t, "placeholder", a().length === 0 ? l() : ""), t.disabled = u(), set_attribute(t, "aria-invalid", f() ? "true" : null), set_attribute(t, "aria-describedby", get(At) ? Dt : null), set_attribute(t, "tabindex", u() ? -1 : 0), set_attribute(t, "data-pw", typeof G() == "string" ? `${G()}-search` : null), set_attribute(t, "testid", typeof G() == "string" ? `${G()}-search` : null);
|
|
17667
|
+
}), delegated("input", t, mn), event("focus", t, hn), append(e, t);
|
|
17598
17668
|
}, s = (e) => {
|
|
17599
|
-
var t =
|
|
17669
|
+
var t = root_11$9(), n = child(t, !0);
|
|
17600
17670
|
reset(t), template_effect(() => set_text(n, l())), append(e, t);
|
|
17601
17671
|
};
|
|
17602
17672
|
if_block(i, (e) => {
|
|
17603
|
-
get(
|
|
17673
|
+
get(Ot) ? e(o) : a().length === 0 && e(s, 1);
|
|
17604
17674
|
}), append(e, t);
|
|
17605
17675
|
};
|
|
17606
17676
|
if_block(n, (e) => {
|
|
17607
17677
|
typeof re() == "function" ? e(i) : e(o, -1);
|
|
17608
17678
|
}), append(e, t);
|
|
17609
|
-
},
|
|
17610
|
-
var t =
|
|
17611
|
-
remove_input_defaults(t), bind_this(t, (e) => set(
|
|
17612
|
-
set_value(t, at() ? get(
|
|
17613
|
-
}), delegated("input", t,
|
|
17614
|
-
},
|
|
17615
|
-
var t =
|
|
17679
|
+
}, Dn = (e) => {
|
|
17680
|
+
var t = root_10$10();
|
|
17681
|
+
remove_input_defaults(t), bind_this(t, (e) => set(yt, e), () => get(yt)), template_effect(() => {
|
|
17682
|
+
set_value(t, at() ? get(ht) : get(Ht)), set_attribute(t, "placeholder", get(qt)), t.disabled = u(), set_attribute(t, "aria-invalid", f() ? "true" : null), set_attribute(t, "aria-describedby", get(At) ? Dt : null), set_attribute(t, "tabindex", u() ? -1 : 0), set_attribute(t, "data-pw", typeof G() == "string" ? `${G()}-search` : null), set_attribute(t, "testid", typeof G() == "string" ? `${G()}-search` : null);
|
|
17683
|
+
}), delegated("input", t, mn), event("focus", t, hn), append(e, t);
|
|
17684
|
+
}, On = (e) => {
|
|
17685
|
+
var t = root_12$8(), n = child(t, !0);
|
|
17616
17686
|
reset(t), template_effect(() => {
|
|
17617
|
-
set_class(t, 1, clsx(get(
|
|
17687
|
+
set_class(t, 1, clsx(get(Ht).length > 0 ? "select-value" : "select-placeholder"), "svelte-52lifo"), set_text(n, get(Ht).length > 0 ? get(Ht) : l());
|
|
17618
17688
|
}), append(e, t);
|
|
17619
17689
|
};
|
|
17620
|
-
if_block(
|
|
17621
|
-
o() ? e(
|
|
17690
|
+
if_block(Tn, (e) => {
|
|
17691
|
+
o() ? e(En) : get(Ot) ? e(Dn, 1) : e(On, -1);
|
|
17622
17692
|
});
|
|
17623
|
-
var
|
|
17624
|
-
html(
|
|
17625
|
-
var
|
|
17626
|
-
var t =
|
|
17693
|
+
var kn = sibling(Tn, 2);
|
|
17694
|
+
html(kn, () => chevron_down_default, !0), reset(kn), reset(Sn), bind_this(Sn, (e) => set(bt, e), () => get(bt));
|
|
17695
|
+
var An = sibling(Sn, 2), jn = (e) => {
|
|
17696
|
+
var t = root_13$7();
|
|
17627
17697
|
template_effect(() => {
|
|
17628
17698
|
set_attribute(t, "data-pw", typeof G() == "string" ? `${G()}-clear` : null), set_attribute(t, "testid", typeof G() == "string" ? `${G()}-clear` : null);
|
|
17629
17699
|
}), delegated("keydown", t, (e) => {
|
|
17630
17700
|
(e.key === "Enter" || e.key === " ") && e.stopPropagation();
|
|
17631
|
-
}), delegated("click", t,
|
|
17701
|
+
}), delegated("click", t, Mt), append(e, t);
|
|
17632
17702
|
};
|
|
17633
|
-
if_block(
|
|
17634
|
-
get(
|
|
17635
|
-
}), reset(
|
|
17636
|
-
var
|
|
17637
|
-
var t =
|
|
17703
|
+
if_block(An, (e) => {
|
|
17704
|
+
get(jt) && e(jn);
|
|
17705
|
+
}), reset(xn);
|
|
17706
|
+
var Mn = sibling(xn, 2), Nn = (e) => {
|
|
17707
|
+
var t = root_14$7(), n = child(t, !0);
|
|
17638
17708
|
reset(t), template_effect(() => {
|
|
17639
|
-
set_attribute(t, "id",
|
|
17709
|
+
set_attribute(t, "id", Dt), set_attribute(t, "data-pw", typeof G() == "string" ? `${G()}-error-message` : null), set_attribute(t, "testid", typeof G() == "string" ? `${G()}-error-message` : null), set_text(n, p());
|
|
17640
17710
|
}), append(e, t);
|
|
17641
17711
|
};
|
|
17642
|
-
if_block(
|
|
17643
|
-
get(
|
|
17712
|
+
if_block(Mn, (e) => {
|
|
17713
|
+
get(At) && e(Nn);
|
|
17644
17714
|
});
|
|
17645
|
-
var
|
|
17715
|
+
var Pn = sibling(Mn, 2), Fn = (t) => {
|
|
17646
17716
|
var n = comment(), i = first_child(n), a = (t) => {
|
|
17647
|
-
var n =
|
|
17717
|
+
var n = root_15$7();
|
|
17648
17718
|
let i;
|
|
17649
17719
|
var a = child(n);
|
|
17650
|
-
remove_input_defaults(a), bind_this(a, (e) => set(
|
|
17720
|
+
remove_input_defaults(a), bind_this(a, (e) => set(yt, e), () => get(yt));
|
|
17651
17721
|
var s = sibling(a, 2);
|
|
17652
17722
|
e(child(s)), reset(s);
|
|
17653
17723
|
var c = sibling(s, 2), u = (e) => {
|
|
@@ -17656,31 +17726,31 @@ function Select(e, t) {
|
|
|
17656
17726
|
};
|
|
17657
17727
|
if_block(c, (e) => {
|
|
17658
17728
|
typeof C() == "function" && e(u);
|
|
17659
|
-
}), reset(n), bind_this(n, (e) => set(
|
|
17729
|
+
}), reset(n), bind_this(n, (e) => set(xt, e), () => get(xt)), effect(() => bind_element_size(n, "clientWidth", (e) => set(St, e))), effect(() => bind_element_size(n, "clientHeight", (e) => set(Ct, e))), action(n, (e) => pn?.(e)), action(n, (e) => Zt?.(e)), template_effect(() => {
|
|
17660
17730
|
i = set_class(n, 1, "select-dropdown svelte-52lifo", null, i, {
|
|
17661
17731
|
"select-dropdown-right": ot() === "right",
|
|
17662
17732
|
"select-dropdown-portal": dt()
|
|
17663
|
-
}), set_style(n, get(
|
|
17664
|
-
}), delegated("input", a,
|
|
17733
|
+
}), set_style(n, get(Qt)), set_value(a, get(ht)), set_attribute(a, "placeholder", l().length > 0 ? l() : "Search"), set_attribute(a, "aria-controls", Et), set_attribute(a, "data-pw", typeof G() == "string" ? `${G()}-menu-search` : null), set_attribute(a, "testid", typeof G() == "string" ? `${G()}-menu-search` : null), set_attribute(s, "id", Et), set_attribute(s, "aria-multiselectable", o());
|
|
17734
|
+
}), delegated("input", a, mn), delegated("keydown", a, dn), append(t, n);
|
|
17665
17735
|
}, s = (t) => {
|
|
17666
|
-
var n =
|
|
17736
|
+
var n = root_16$6();
|
|
17667
17737
|
let i;
|
|
17668
|
-
e(child(n)), reset(n), bind_this(n, (e) => set(
|
|
17738
|
+
e(child(n)), reset(n), bind_this(n, (e) => set(xt, e), () => get(xt)), effect(() => bind_element_size(n, "clientWidth", (e) => set(St, e))), effect(() => bind_element_size(n, "clientHeight", (e) => set(Ct, e))), action(n, (e) => Zt?.(e)), template_effect(() => {
|
|
17669
17739
|
i = set_class(n, 1, "select-dropdown svelte-52lifo", null, i, {
|
|
17670
17740
|
"select-dropdown-right": ot() === "right",
|
|
17671
17741
|
"select-dropdown-portal": dt()
|
|
17672
|
-
}), set_attribute(n, "id",
|
|
17742
|
+
}), set_attribute(n, "id", Et), set_attribute(n, "aria-multiselectable", o()), set_style(n, get(Qt));
|
|
17673
17743
|
}), append(t, n);
|
|
17674
17744
|
};
|
|
17675
17745
|
if_block(i, (e) => {
|
|
17676
|
-
get(
|
|
17746
|
+
get(kt) ? e(a) : e(s, -1);
|
|
17677
17747
|
}), append(t, n);
|
|
17678
17748
|
};
|
|
17679
|
-
if_block(
|
|
17680
|
-
at() && !u() && e(
|
|
17681
|
-
}), reset(
|
|
17749
|
+
if_block(Pn, (e) => {
|
|
17750
|
+
at() && !u() && e(Fn);
|
|
17751
|
+
}), reset(vn), bind_this(vn, (e) => set(vt, e), () => get(vt)), template_effect(() => t = set_class(xn, 1, "select-control svelte-52lifo", null, t, { "has-clear": get(jt) }));
|
|
17682
17752
|
}
|
|
17683
|
-
return append(e,
|
|
17753
|
+
return append(e, vn), pop(_n);
|
|
17684
17754
|
}
|
|
17685
17755
|
delegate([
|
|
17686
17756
|
"input",
|
|
@@ -17715,7 +17785,8 @@ delegate([
|
|
|
17715
17785
|
hierarchy: {},
|
|
17716
17786
|
leftIcon: {},
|
|
17717
17787
|
leftIconTestId: {},
|
|
17718
|
-
usePortal: {}
|
|
17788
|
+
usePortal: {},
|
|
17789
|
+
name: {}
|
|
17719
17790
|
}, [], [], { mode: "open" });
|
|
17720
17791
|
//#endregion
|
|
17721
17792
|
//#region src/wc/components/Select.wc.svelte
|
|
@@ -17823,6 +17894,10 @@ customElements.define("sui-select", create_custom_element(Select_wc, {
|
|
|
17823
17894
|
usePortal: {
|
|
17824
17895
|
attribute: "use-portal",
|
|
17825
17896
|
type: "Boolean"
|
|
17897
|
+
},
|
|
17898
|
+
name: {
|
|
17899
|
+
reflect: !0,
|
|
17900
|
+
type: "String"
|
|
17826
17901
|
}
|
|
17827
17902
|
}, ["bottom-content"], [], { mode: "open" }));
|
|
17828
17903
|
//#endregion
|
|
@@ -40027,7 +40102,10 @@ function parseFragment(e, t, n) {
|
|
|
40027
40102
|
}
|
|
40028
40103
|
var init_dist = __esmMin((() => {
|
|
40029
40104
|
init_parser(), init_default(), init_serializer(), init_error_codes(), init_foreign_content(), init_html(), init_token(), init_tokenizer();
|
|
40030
|
-
})), markdown_exports = /* @__PURE__ */ __exportAll({
|
|
40105
|
+
})), markdown_exports = /* @__PURE__ */ __exportAll({
|
|
40106
|
+
renderMarkdown: () => renderMarkdown,
|
|
40107
|
+
unwrapMarkdownFence: () => unwrapMarkdownFence
|
|
40108
|
+
});
|
|
40031
40109
|
function normaliseForProtocolCheck(e) {
|
|
40032
40110
|
return e.replace(NUMERIC_REFERENCE, (e, t) => String.fromCodePoint(t[0].toLowerCase() === "x" ? parseInt(t.slice(1), 16) : parseInt(t, 10))).replace(NAMED_WHITESPACE_REFERENCE, " ").replace(STRIPPED_BY_URL_PARSER, "");
|
|
40033
40111
|
}
|
|
@@ -40058,8 +40136,9 @@ function resolveTagAllowList(e) {
|
|
|
40058
40136
|
function tagAllowed(e, t) {
|
|
40059
40137
|
return e === null || e.has(t);
|
|
40060
40138
|
}
|
|
40061
|
-
function
|
|
40062
|
-
|
|
40139
|
+
function resolveRawHtmlStrategy(e) {
|
|
40140
|
+
let t = e?.rawHtml;
|
|
40141
|
+
return t === "strip" ? "strip" : t === "sanitize" && typeof e?.htmlSanitizer == "function" ? "passthrough" : "escape";
|
|
40063
40142
|
}
|
|
40064
40143
|
function rawHtmlText(e) {
|
|
40065
40144
|
return "value" in e ? escapeHtml(e.value) : "content" in e ? rawHtmlText(e.content) : "childNodes" in e ? e.childNodes.map(rawHtmlText).join("") : "";
|
|
@@ -40067,7 +40146,7 @@ function rawHtmlText(e) {
|
|
|
40067
40146
|
function createSanitizingRenderer(e, t, n, i) {
|
|
40068
40147
|
return {
|
|
40069
40148
|
html(e) {
|
|
40070
|
-
return i === "strip" ? rawHtmlText(parseFragment(e.text)) : escapeHtml(e.text);
|
|
40149
|
+
return i === "strip" ? rawHtmlText(parseFragment(e.text)) : i === "passthrough" ? e.text : escapeHtml(e.text);
|
|
40071
40150
|
},
|
|
40072
40151
|
link(n) {
|
|
40073
40152
|
return hasSafeProtocol(n.href, e.links) && tagAllowed(t, "a") ? !1 : escapeHtml(n.text);
|
|
@@ -40119,34 +40198,57 @@ function wrapTables(e, t, n) {
|
|
|
40119
40198
|
let i = typeof n == "string" ? n.trim() : "", a = i.length > 0 ? `${DEFAULT_TABLE_WRAPPER_CLASS} ${escapeHtml(i)}` : DEFAULT_TABLE_WRAPPER_CLASS, o = typeof t == "string" && t.length > 0 ? `<div class="${a}" tabindex="0" role="region" aria-label="${escapeHtml(t)}">` : `<div class="${a}" tabindex="0">`;
|
|
40120
40199
|
return e.replace(TABLE_OPEN, `${o}<table>`).replace(TABLE_CLOSE, "</table></div>");
|
|
40121
40200
|
}
|
|
40122
|
-
function instanceFor(e) {
|
|
40123
|
-
let
|
|
40124
|
-
|
|
40125
|
-
[...
|
|
40126
|
-
[...
|
|
40127
|
-
|
|
40128
|
-
|
|
40129
|
-
|
|
40201
|
+
function instanceFor(e, t) {
|
|
40202
|
+
let n = e.breaks === !0, i = resolveProtocolSets(e.sanitize), a = resolveTagAllowList(e.sanitize?.allowedTags), o = e.sanitize?.disableTaskLists === !0, s = [
|
|
40203
|
+
n ? "breaks" : "default",
|
|
40204
|
+
[...i.links].sort().join(","),
|
|
40205
|
+
[...i.images].sort().join(","),
|
|
40206
|
+
a ? [...a].sort().join(",") : "*",
|
|
40207
|
+
o ? "no-tasks" : "tasks",
|
|
40208
|
+
t
|
|
40130
40209
|
].join("|"), c = instances.get(s);
|
|
40131
40210
|
return c || (c = new q({
|
|
40132
40211
|
gfm: !0,
|
|
40133
|
-
breaks:
|
|
40134
|
-
renderer: createSanitizingRenderer(
|
|
40212
|
+
breaks: n,
|
|
40213
|
+
renderer: createSanitizingRenderer(i, a, o, t)
|
|
40135
40214
|
}), instances.set(s, c)), c;
|
|
40136
40215
|
}
|
|
40216
|
+
function parseWith(e, t, n) {
|
|
40217
|
+
let i = instanceFor(t, n), a = t.inline === !0 ? i.parseInline(e) : i.parse(e);
|
|
40218
|
+
return typeof a == "string" ? a : null;
|
|
40219
|
+
}
|
|
40220
|
+
function runSanitizer(e, t) {
|
|
40221
|
+
try {
|
|
40222
|
+
let n = t(e);
|
|
40223
|
+
return typeof n == "string" ? n : null;
|
|
40224
|
+
} catch {
|
|
40225
|
+
return null;
|
|
40226
|
+
}
|
|
40227
|
+
}
|
|
40228
|
+
function unwrapMarkdownFence(e) {
|
|
40229
|
+
let t = WHOLE_BODY_MARKDOWN_FENCE.exec(e);
|
|
40230
|
+
if (t === null) return e;
|
|
40231
|
+
let n = t[1], i = t[3], a = t[4];
|
|
40232
|
+
return a[0] !== n[0] || a.length < n.length || (n[0] === "~" ? INNER_TILDE_FENCE : INNER_BACKTICK_FENCE).test(i) ? e : i;
|
|
40233
|
+
}
|
|
40137
40234
|
function renderMarkdown(e, t = {}) {
|
|
40138
|
-
let n =
|
|
40139
|
-
if (
|
|
40140
|
-
let
|
|
40141
|
-
|
|
40235
|
+
let n = t.unwrapFence === !0 ? unwrapMarkdownFence(e) : e, i = resolveRawHtmlStrategy(t.sanitize), a = parseWith(n, t, i);
|
|
40236
|
+
if (a === null) return "";
|
|
40237
|
+
let o = a;
|
|
40238
|
+
if (i === "passthrough") {
|
|
40239
|
+
let e = t.sanitize?.htmlSanitizer;
|
|
40240
|
+
o = (typeof e == "function" ? runSanitizer(a, e) : null) ?? parseWith(n, t, "escape") ?? "";
|
|
40241
|
+
}
|
|
40242
|
+
let s = annotateExternalLinks(o);
|
|
40243
|
+
return t.inline === !0 ? s : wrapTables(s, t.tableLabel, t.tableWrapperClass);
|
|
40142
40244
|
}
|
|
40143
|
-
var SAFE_LINK_PROTOCOLS, SAFE_IMAGE_PROTOCOLS, NUMERIC_REFERENCE, NAMED_WHITESPACE_REFERENCE, STRIPPED_BY_URL_PARSER, instances, EXTERNAL_ANCHOR_PATTERN, TABLE_OPEN, TABLE_CLOSE, DEFAULT_TABLE_WRAPPER_CLASS, init_markdown = __esmMin((() => {
|
|
40245
|
+
var SAFE_LINK_PROTOCOLS, SAFE_IMAGE_PROTOCOLS, NUMERIC_REFERENCE, NAMED_WHITESPACE_REFERENCE, STRIPPED_BY_URL_PARSER, instances, EXTERNAL_ANCHOR_PATTERN, TABLE_OPEN, TABLE_CLOSE, DEFAULT_TABLE_WRAPPER_CLASS, INNER_BACKTICK_FENCE, INNER_TILDE_FENCE, WHOLE_BODY_MARKDOWN_FENCE, init_markdown = __esmMin((() => {
|
|
40144
40246
|
init_marked_esm(), init_dist(), SAFE_LINK_PROTOCOLS = new Set([
|
|
40145
40247
|
"http:",
|
|
40146
40248
|
"https:",
|
|
40147
40249
|
"mailto:",
|
|
40148
40250
|
"tel:"
|
|
40149
|
-
]), SAFE_IMAGE_PROTOCOLS = new Set(["http:", "https:"]), NUMERIC_REFERENCE = /&#(x[0-9a-f]+|[0-9]+);?/gi, NAMED_WHITESPACE_REFERENCE = /&(tab|newline);/gi, STRIPPED_BY_URL_PARSER = /[\u0000-\u0020\u007f]/g, instances = /* @__PURE__ */ new Map(), EXTERNAL_ANCHOR_PATTERN = /<a href="(https?:\/\/[^"]*)"/g, TABLE_OPEN = /<table>/g, TABLE_CLOSE = /<\/table>/g, DEFAULT_TABLE_WRAPPER_CLASS = "markdown-table-wrapper";
|
|
40251
|
+
]), SAFE_IMAGE_PROTOCOLS = new Set(["http:", "https:"]), NUMERIC_REFERENCE = /&#(x[0-9a-f]+|[0-9]+);?/gi, NAMED_WHITESPACE_REFERENCE = /&(tab|newline);/gi, STRIPPED_BY_URL_PARSER = /[\u0000-\u0020\u007f]/g, instances = /* @__PURE__ */ new Map(), EXTERNAL_ANCHOR_PATTERN = /<a href="(https?:\/\/[^"]*)"/g, TABLE_OPEN = /<table>/g, TABLE_CLOSE = /<\/table>/g, DEFAULT_TABLE_WRAPPER_CLASS = "markdown-table-wrapper", INNER_BACKTICK_FENCE = /^[ \t]*`{3,}/m, INNER_TILDE_FENCE = /^[ \t]*~{3,}/m, WHOLE_BODY_MARKDOWN_FENCE = /^\s*(`{3,}|~{3,})[ \t]*(markdown|md)[ \t]*\r?\n([\s\S]*?)\r?\n?(`{3,}|~{3,})\s*$/i;
|
|
40150
40252
|
})), root$11 = /* @__PURE__ */ from_html("<div class=\"avatar svelte-ivh8u\"><!></div>"), root_1$10 = /* @__PURE__ */ from_html("<div class=\"header svelte-ivh8u\"><!></div>"), root_2$7 = /* @__PURE__ */ from_html("<span class=\"marker svelte-ivh8u\" aria-hidden=\"true\"></span>"), root_3$7 = /* @__PURE__ */ from_html("<div class=\"body svelte-ivh8u\"><!></div>"), root_4$6 = /* @__PURE__ */ from_html("<div class=\"body svelte-ivh8u\"></div>"), root_5$6 = /* @__PURE__ */ from_html("<div class=\"body text svelte-ivh8u\"> </div>"), root_6$6 = /* @__PURE__ */ from_html("<div class=\"clamp-toggle svelte-ivh8u\"><!></div>"), root_7$5 = /* @__PURE__ */ from_html("<span class=\"typing svelte-ivh8u\"><!></span>"), root_8$5 = /* @__PURE__ */ from_html("<div class=\"message-attachments svelte-ivh8u\"><!></div>"), root_9$3 = /* @__PURE__ */ from_html("<div class=\"action svelte-ivh8u\"><!></div>"), root_10$2 = /* @__PURE__ */ from_html("<div class=\"action svelte-ivh8u\"><!></div> <div class=\"action svelte-ivh8u\"><!></div>", 1), root_11$1 = /* @__PURE__ */ from_html("<div class=\"actions svelte-ivh8u\"><!> <!> <!> <!></div>"), root_12$1 = /* @__PURE__ */ from_html("<article><div class=\"row svelte-ivh8u\"><!> <div class=\"content svelte-ivh8u\"><!> <div><!> <!> <!> <!></div> <!> <!></div></div></article>"), $$css$12 = {
|
|
40151
40253
|
hash: "svelte-ivh8u",
|
|
40152
40254
|
code: ".chat-message.svelte-ivh8u {box-sizing:border-box;display:flex;flex-direction:column;max-width:var(--chat-message-max-width, 82%);margin:var(--chat-message-margin, 0);}.chat-message.party-sender.svelte-ivh8u {align-self:flex-end;align-items:flex-end;}.chat-message.party-responder.svelte-ivh8u {align-self:flex-start;align-items:flex-start;}.row.svelte-ivh8u {display:flex;gap:var(--chat-message-gap, 10px);align-items:flex-end;width:100%;}.chat-message.party-sender.svelte-ivh8u .row:where(.svelte-ivh8u) {flex-direction:row-reverse;}.avatar.svelte-ivh8u {display:flex;flex-shrink:0;align-items:center;justify-content:center;}.content.svelte-ivh8u {display:flex;flex-direction:column;gap:var(--chat-message-content-gap, 6px);min-width:0;}.header.svelte-ivh8u {font-size:var(--chat-message-header-font-size, 0.75rem);color:var(--chat-message-header-color, #71717a);}.bubble.svelte-ivh8u {box-sizing:border-box;padding:var(--chat-message-bubble-padding, 9px 13px);border-radius:var(--chat-message-bubble-border-radius, 16px);font-size:var(--chat-message-font-size, 0.9375rem);line-height:var(--chat-message-line-height, 1.5);color:var(--chat-message-color, #27272a);background:var(--chat-message-background, #f4f4f5);border:var(--chat-message-border, none);box-shadow:var(--chat-message-box-shadow, none);word-wrap:break-word;overflow-wrap:anywhere;}\n\n /* Only the marker variant becomes a containing block: making every bubble relative\n would silently re-base any absolutely-positioned content a consumer renders in a\n body snippet. */.bubble.has-marker.svelte-ivh8u {position:relative;}.marker.svelte-ivh8u {\n /* Decorative and absolutely positioned, so it sits over the bubble's leading\n padding — where a link at the start of a responder message also sits. Without\n this it silently eats those clicks. */pointer-events:none;position:absolute;inset-block:var(--chat-message-marker-inset-block, 0);\n /* Logical, so the bar follows `role` alignment into RTL instead of pinning left. */inset-inline-start:var(--chat-message-marker-offset, 0px);width:var(--chat-message-marker-width, 2px);border-radius:var(--chat-message-marker-border-radius, 0);background:var(--chat-message-marker-color, #6d28d9);}.chat-message.party-sender.svelte-ivh8u .bubble:where(.svelte-ivh8u) {color:var(--chat-message-sender-color, #ffffff);background:var(--chat-message-sender-background, #18181b);border:var(--chat-message-sender-border, none);border-radius:var(\n --chat-message-sender-border-radius,\n var(--chat-message-bubble-border-radius, 16px)\n );}.chat-message.party-responder.svelte-ivh8u .bubble:where(.svelte-ivh8u) {color:var(--chat-message-responder-color, var(--chat-message-color, #27272a));background:var(--chat-message-responder-background, transparent);border:var(--chat-message-responder-border, none);padding:var(--chat-message-responder-padding, 2px 0);}.chat-message.error.svelte-ivh8u .bubble:where(.svelte-ivh8u) {color:var(--chat-message-error-color, #e0334b);}.text.svelte-ivh8u {white-space:pre-wrap;}.typing.svelte-ivh8u {display:inline-flex;align-items:center;}.message-attachments.svelte-ivh8u {display:flex;flex-direction:column;gap:var(--chat-message-attachments-gap, 8px);margin:var(--chat-message-attachments-margin, 4px 0 0 0);}.message-attachments.svelte-ivh8u:empty {display:none;}.actions.svelte-ivh8u {display:flex;align-items:center;gap:var(--chat-message-actions-gap, 2px);opacity:var(--chat-message-actions-opacity, 0);transition:var(--chat-message-actions-transition, opacity 0.15s ease);--button-width: var(--chat-message-action-size, 28px);--button-height: var(--chat-message-action-size, 28px);--button-padding: var(--chat-message-action-padding, 6px);--button-border-radius: var(--chat-message-action-border-radius, 6px);--button-color: var(--chat-message-action-background-color, transparent);--button-text-color: var(--chat-message-action-color, #71717a);--button-content-gap: 0px;--button-hover-color: var(--chat-message-action-hover-background-color, #f4f4f5);}.chat-message.svelte-ivh8u:hover .actions:where(.svelte-ivh8u),\n .chat-message.svelte-ivh8u:focus-within .actions:where(.svelte-ivh8u) {opacity:1;}.action.svelte-ivh8u {display:flex;}.action.svelte-ivh8u svg {height:100%;width:100%;}\n\n @media (hover: none) {.actions.svelte-ivh8u {opacity:1;}\n }.clamp-toggle.svelte-ivh8u {display:flex;margin-top:var(--chat-message-clamp-toggle-margin-top, 4px);}\n\n /* Clamp the rendered body, not the source: the message keeps its markup and its\n copy text, and expanding is a state change rather than a re-render. */.bubble[data-clamped='true'].svelte-ivh8u .body:where(.svelte-ivh8u) {display:-webkit-box;line-clamp:var(--chat-message-clamp-lines, var(--chat-message-clamp-lines-prop, 2));-webkit-line-clamp:var(--chat-message-clamp-lines, var(--chat-message-clamp-lines-prop, 2));-webkit-box-orient:vertical;overflow:hidden;}.body.svelte-ivh8u p {margin:var(--chat-message-paragraph-margin, 0 0 0.5em 0);}.body.svelte-ivh8u p:last-child {margin-bottom:0;}.body.svelte-ivh8u a {color:var(--chat-message-link-color, #6d28d9);text-decoration:underline;text-underline-offset:2px;}.body.svelte-ivh8u code {font-family:var(--chat-message-code-font-family, ui-monospace, monospace);font-size:0.88em;background:var(--chat-message-code-background, rgba(0, 0, 0, 0.05));padding:1px 5px;border-radius:4px;}.body.svelte-ivh8u pre {background:var(--chat-message-pre-background, rgba(0, 0, 0, 0.05));padding:10px 12px;border-radius:8px;overflow-x:auto;margin:0.5em 0;}.body.svelte-ivh8u pre code {background:transparent;padding:0;}.body.svelte-ivh8u ul,\n .body.svelte-ivh8u ol {margin:var(--chat-message-list-margin, 0.4em 0);padding-left:var(--chat-message-list-padding, 1.4em);}.body.svelte-ivh8u li {margin:0.2em 0;}.body.svelte-ivh8u h1,\n .body.svelte-ivh8u h2,\n .body.svelte-ivh8u h3,\n .body.svelte-ivh8u h4,\n .body.svelte-ivh8u h5,\n .body.svelte-ivh8u h6 {margin:var(--chat-message-heading-margin, 0.8em 0 0.4em 0);line-height:1.3;}.body.svelte-ivh8u h1 {font-size:1.35em;}.body.svelte-ivh8u h2 {font-size:1.2em;}.body.svelte-ivh8u h3 {font-size:1.1em;}.body.svelte-ivh8u h4,\n .body.svelte-ivh8u h5,\n .body.svelte-ivh8u h6 {font-size:1em;}.body.svelte-ivh8u blockquote {margin:0.5em 0;padding:2px 0 2px 12px;border-left:3px solid var(--chat-message-blockquote-border-color, rgba(0, 0, 0, 0.15));opacity:var(--chat-message-blockquote-opacity, 0.85);}\n\n /* Fallback for a bare <table> in caller-supplied `html`, which has no scroll\n container of its own: it keeps the block treatment so a wide table scrolls\n rather than overflowing the message. A table that came from `markdown` (or\n from `renderMarkdown`) arrives inside `.markdown-table-wrapper`, and the\n rules below take it back out of block layout. */.body.svelte-ivh8u table {display:block;max-width:100%;overflow-x:auto;border-collapse:collapse;margin:0.5em 0;}\n\n /* The wrapper scrolls, not the table. `display: block` on a <table> is what\n makes `overflow-x` work on the element itself, but it strips the table's\n semantics for assistive technology -- a screen reader loses row and column\n navigation. MarkdownText separates the scroll container from the table for\n exactly that reason; this component rendered the same wrapper markup and\n styled the table instead, so a chat table was scrollable and no longer a\n table. Chat is where markdown tables overwhelmingly land. */.body.svelte-ivh8u .markdown-table-wrapper {display:block;max-width:100%;overflow-x:auto;margin:0.5em 0;}\n\n /* The wrapper is a tab stop (the renderer emits tabindex=\"0\" so the scroll is\n reachable by keyboard). The browser's default ring already applies; this\n replaces it with the same 2px treatment the rest of the library uses, since\n the 1px UA default is easy to miss against a message bubble. */.body.svelte-ivh8u .markdown-table-wrapper:focus-visible {outline:2px solid var(--chat-message-table-focus-outline-color, #3b82f6);outline-offset:2px;}\n\n /* Without an intrinsic width the table is exactly its container's width and a\n wide table compresses instead of scrolling. `max-content` supplies it;\n `min-width` keeps a narrow table filling the bubble. */.body.svelte-ivh8u .markdown-table-wrapper table {display:table;width:max-content;min-width:100%;overflow-x:visible;margin:0;}.body.svelte-ivh8u th,\n .body.svelte-ivh8u td {padding:5px 10px;border:1px solid var(--chat-message-table-border-color, rgba(0, 0, 0, 0.12));text-align:left;}.body.svelte-ivh8u th {background:var(--chat-message-table-header-background, rgba(0, 0, 0, 0.04));}.body.svelte-ivh8u img {max-width:100%;border-radius:var(--chat-message-image-border-radius, 8px);}.body.svelte-ivh8u hr {border:none;border-top:1px solid var(--chat-message-hr-color, rgba(0, 0, 0, 0.12));margin:0.8em 0;}"
|
|
@@ -43520,13 +43622,14 @@ var root$4 = /* @__PURE__ */ from_html("<div></div>"), $$css$5 = {
|
|
|
43520
43622
|
};
|
|
43521
43623
|
function MarkdownText(e, t) {
|
|
43522
43624
|
push(t, !0), append_styles$1(e, $$css$5);
|
|
43523
|
-
let n = prop(t, "markdown", 7), i = prop(t, "breaks", 7, !1), a = prop(t, "testId", 7), o = prop(t, "classes", 7), s = prop(t, "tableLabel", 7), c = prop(t, "tableWrapperClass", 7), l = prop(t, "sanitize", 7), u = /* @__PURE__ */ user_derived(() => renderMarkdown(n(), {
|
|
43625
|
+
let n = prop(t, "markdown", 7), i = prop(t, "breaks", 7, !1), a = prop(t, "testId", 7), o = prop(t, "classes", 7), s = prop(t, "tableLabel", 7), c = prop(t, "tableWrapperClass", 7), l = prop(t, "sanitize", 7), u = prop(t, "unwrapFence", 7, !1), f = /* @__PURE__ */ user_derived(() => renderMarkdown(n(), {
|
|
43524
43626
|
breaks: i(),
|
|
43525
43627
|
tableLabel: s(),
|
|
43526
43628
|
tableWrapperClass: c(),
|
|
43527
|
-
sanitize: l()
|
|
43629
|
+
sanitize: l(),
|
|
43630
|
+
unwrapFence: u()
|
|
43528
43631
|
}));
|
|
43529
|
-
var
|
|
43632
|
+
var p = {
|
|
43530
43633
|
get markdown() {
|
|
43531
43634
|
return n();
|
|
43532
43635
|
},
|
|
@@ -43568,11 +43671,17 @@ function MarkdownText(e, t) {
|
|
|
43568
43671
|
},
|
|
43569
43672
|
set sanitize(e) {
|
|
43570
43673
|
l(e), flushSync();
|
|
43674
|
+
},
|
|
43675
|
+
get unwrapFence() {
|
|
43676
|
+
return u();
|
|
43677
|
+
},
|
|
43678
|
+
set unwrapFence(e = !1) {
|
|
43679
|
+
u(e), flushSync();
|
|
43571
43680
|
}
|
|
43572
|
-
},
|
|
43573
|
-
return html(
|
|
43574
|
-
set_class(
|
|
43575
|
-
}), append(e,
|
|
43681
|
+
}, h = root$4();
|
|
43682
|
+
return html(h, () => get(f), !0), reset(h), template_effect(() => {
|
|
43683
|
+
set_class(h, 1, `markdown-text ${o() ?? "" ?? ""}`, "svelte-1d6q5h0"), set_attribute(h, "data-pw", typeof a() == "string" ? a() : null), set_attribute(h, "testid", typeof a() == "string" ? a() : null);
|
|
43684
|
+
}), append(e, h), pop(p);
|
|
43576
43685
|
}
|
|
43577
43686
|
create_custom_element(MarkdownText, {
|
|
43578
43687
|
markdown: {},
|
|
@@ -43581,7 +43690,8 @@ create_custom_element(MarkdownText, {
|
|
|
43581
43690
|
classes: {},
|
|
43582
43691
|
tableLabel: {},
|
|
43583
43692
|
tableWrapperClass: {},
|
|
43584
|
-
sanitize: {}
|
|
43693
|
+
sanitize: {},
|
|
43694
|
+
unwrapFence: {}
|
|
43585
43695
|
}, [], [], { mode: "open" });
|
|
43586
43696
|
//#endregion
|
|
43587
43697
|
//#region src/wc/components/MarkdownText.wc.svelte
|
|
@@ -43611,7 +43721,11 @@ customElements.define("sui-markdown-text", create_custom_element(MarkdownText_wc
|
|
|
43611
43721
|
attribute: "table-wrapper-class",
|
|
43612
43722
|
type: "String"
|
|
43613
43723
|
},
|
|
43614
|
-
sanitize: { type: "Object" }
|
|
43724
|
+
sanitize: { type: "Object" },
|
|
43725
|
+
unwrapFence: {
|
|
43726
|
+
attribute: "unwrap-fence",
|
|
43727
|
+
type: "Boolean"
|
|
43728
|
+
}
|
|
43615
43729
|
}, [], [], { mode: "open" }));
|
|
43616
43730
|
//#endregion
|
|
43617
43731
|
//#region src/wc/components/ChatComposer.wc.svelte
|