@elmethis/vue 0.13.0 → 0.15.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/lib/index.vue.mjs
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import "@elmethis/core/tokens.css";
|
|
2
2
|
import { Fragment as e, computed as t, createTextVNode as n, createVNode as r, defineComponent as i, h as a, inject as o, isVNode as s, mergeProps as c, normalizeStyle as l, onBeforeUnmount as u, onMounted as d, onUnmounted as f, provide as p, ref as m, shallowRef as h, useId as g, watch as _ } from "vue";
|
|
3
3
|
import { Catalog as ee, ComponentContext as te, MessageProcessor as v } from "@a2ui/web_core/v0_9";
|
|
4
|
-
import { AudioPlayerApi as ne, BASIC_COMPONENTS as
|
|
5
|
-
import { clsx as
|
|
6
|
-
import { useClipboard as
|
|
4
|
+
import { AudioPlayerApi as ne, BASIC_COMPONENTS as re, BASIC_FUNCTIONS as y, ButtonApi as ie, CardApi as ae, CheckBoxApi as oe, ChoicePickerApi as se, ColumnApi as ce, DateTimeInputApi as le, DividerApi as ue, IconApi as de, ImageApi as fe, ListApi as pe, ModalApi as me, RowApi as he, SliderApi as ge, TabsApi as _e, TextApi as ve, TextFieldApi as ye, VideoApi as be } from "@a2ui/web_core/v0_9/basic_catalog";
|
|
5
|
+
import { clsx as b } from "clsx";
|
|
6
|
+
import { useClipboard as xe, useClipboardItems as Se, useVModel as Ce } from "@vueuse/core";
|
|
7
7
|
import "zod";
|
|
8
|
-
import { renderToString as
|
|
9
|
-
import { mdiAlert as
|
|
10
|
-
import { AudioApi as
|
|
11
|
-
import { codeToHtml as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { marked as
|
|
15
|
-
var
|
|
8
|
+
import { renderToString as we } from "katex";
|
|
9
|
+
import { mdiAlert as Te, mdiAlertCircleOutline as Ee, mdiAlertOctagram as De, mdiApplicationOutline as Oe, mdiArrowDownDropCircleOutline as ke, mdiCheckCircle as Ae, mdiCheckCircleOutline as je, mdiChevronRight as Me, mdiClipboardCheckOutline as Ne, mdiClipboardOutline as Pe, mdiCodeTags as Fe, mdiDownload as Ie, mdiEyeOffOutline as Le, mdiEyeOutline as Re, mdiFastForward10 as ze, mdiFile as Be, mdiFolderOpen as Ve, mdiFormatColorFill as He, mdiFormatQuoteClose as Ue, mdiFormatQuoteOpen as We, mdiHexadecimal as Ge, mdiHome as Ke, mdiInformation as qe, mdiLightbulbOn as Je, mdiLinkVariant as Ye, mdiMenuDown as Xe, mdiMessageImageOutline as Ze, mdiMusicNote as Qe, mdiOpenInNew as $e, mdiPause as et, mdiPlay as tt, mdiPlus as nt, mdiRewind10 as rt, mdiShieldAlert as it, mdiText as at, mdiTextLong as ot, mdiTrashCanOutline as st, mdiVolumeHigh as ct, mdiVolumeLow as lt, mdiVolumeMedium as ut, mdiVolumeOff as dt } from "@mdi/js";
|
|
10
|
+
import { AudioApi as ft, BlockImageApi as pt, BlockQuoteApi as mt, BookmarkApi as ht, CalloutApi as gt, CodeBlockApi as _t, ColumnApi as vt, ColumnListApi as yt, ContentTabApi as bt, ContentTabsApi as xt, DividerApi as St, FileApi as Ct, HeadingApi as wt, HtmlApi as Tt, IconApi as Et, KatexApi as Dt, LANGUAGES as Ot, LinkTextApi as kt, ListApi as At, ListItemApi as jt, MermaidApi as Mt, NotionCalloutApi as Nt, ParagraphApi as Pt, RichTextApi as Ft, TableApi as It, TableCellApi as Lt, TableRowApi as Rt, ToggleApi as zt, UnsupportedApi as Bt, VideoApi as Vt, languageIcons as Ht, normalizeLanguage as Ut } from "@elmethis/core";
|
|
11
|
+
import { codeToHtml as Wt } from "shiki";
|
|
12
|
+
import Gt from "@46ki75/ikuma-theme/dark";
|
|
13
|
+
import Kt from "@46ki75/ikuma-theme/light";
|
|
14
|
+
import { marked as qt } from "marked";
|
|
15
|
+
var x = {
|
|
16
16
|
"elm-tabs": "_elm-tabs_whoym_1",
|
|
17
17
|
"tab-container": "_tab-container_whoym_13",
|
|
18
18
|
tab: "_tab_whoym_13",
|
|
19
19
|
active: "_active_whoym_41",
|
|
20
20
|
"tab-content": "_tab-content_whoym_52",
|
|
21
21
|
"tab-content-inner": "_tab-content-inner_whoym_57"
|
|
22
|
-
},
|
|
22
|
+
}, S = {
|
|
23
23
|
"elm-collapse": "_elm-collapse_12wiu_1",
|
|
24
24
|
row: "_row_12wiu_5",
|
|
25
25
|
open: "_open_12wiu_11",
|
|
@@ -44,16 +44,16 @@ var S = {
|
|
|
44
44
|
},
|
|
45
45
|
setup(e, { slots: t }) {
|
|
46
46
|
return () => r("div", {
|
|
47
|
-
class:
|
|
47
|
+
class: b(S["elm-collapse"], e.isOpen && S.open, e.direction === "row" && S.row, e.direction === "column" && S.column, e.direction === "both" && S.both),
|
|
48
48
|
style: { "--elmethis-scoped-transition-timing-function": e.transitionTimingFunction }
|
|
49
|
-
}, [r("div", { class:
|
|
49
|
+
}, [r("div", { class: S.inner }, [t.default?.()])]);
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
52
|
//#endregion
|
|
53
53
|
//#region src/hooks/use-bindable-signal.ts
|
|
54
54
|
function Yt(e) {
|
|
55
55
|
let { props: t, key: n, emit: r, defaultValue: i } = e;
|
|
56
|
-
return
|
|
56
|
+
return Ce(t, n, r, {
|
|
57
57
|
passive: !0,
|
|
58
58
|
defaultValue: i
|
|
59
59
|
});
|
|
@@ -95,12 +95,12 @@ var Xt = Symbol("elm.tabs"), Zt = (e) => {
|
|
|
95
95
|
get transitionTimingFunction() {
|
|
96
96
|
return e.transitionTimingFunction;
|
|
97
97
|
}
|
|
98
|
-
}), () => r("div", { class: x
|
|
98
|
+
}), () => r("div", { class: b(x["elm-tabs"]) }, [n.default?.()]);
|
|
99
99
|
}
|
|
100
100
|
}), $t = /* @__PURE__ */ i({
|
|
101
101
|
name: "ElmTabList",
|
|
102
102
|
setup(e, { slots: t }) {
|
|
103
|
-
return () => r("div", { class: x
|
|
103
|
+
return () => r("div", { class: b(x["tab-container"]) }, [t.default?.()]);
|
|
104
104
|
}
|
|
105
105
|
}), en = /* @__PURE__ */ i({
|
|
106
106
|
name: "ElmTab",
|
|
@@ -111,7 +111,7 @@ var Xt = Symbol("elm.tabs"), Zt = (e) => {
|
|
|
111
111
|
setup(e, { slots: t }) {
|
|
112
112
|
let n = Zt(o(Xt));
|
|
113
113
|
return () => r("div", {
|
|
114
|
-
class: x
|
|
114
|
+
class: b(x.tab, n.selectedValue.value === e.value && x.active),
|
|
115
115
|
onClick: () => n.setSelectedValue(e.value)
|
|
116
116
|
}, [t.default?.()]);
|
|
117
117
|
}
|
|
@@ -123,11 +123,11 @@ var Xt = Symbol("elm.tabs"), Zt = (e) => {
|
|
|
123
123
|
} },
|
|
124
124
|
setup(e, { slots: t }) {
|
|
125
125
|
let n = Zt(o(Xt));
|
|
126
|
-
return () => r("div", { class: x
|
|
126
|
+
return () => r("div", { class: b(x["tab-content"]) }, [r(Jt, {
|
|
127
127
|
direction: "row",
|
|
128
128
|
isOpen: n.selectedValue.value === e.value,
|
|
129
129
|
transitionTimingFunction: n.transitionTimingFunction
|
|
130
|
-
}, { default: () => [r("div", { class:
|
|
130
|
+
}, { default: () => [r("div", { class: x["tab-content-inner"] }, [t.default?.()])] })]);
|
|
131
131
|
}
|
|
132
132
|
}), nn = {
|
|
133
133
|
"elm-heading": "_elm-heading_1fuld_1",
|
|
@@ -153,7 +153,7 @@ var Xt = Symbol("elm.tabs"), Zt = (e) => {
|
|
|
153
153
|
return () => {
|
|
154
154
|
let { class: a, ...o } = t;
|
|
155
155
|
return r("span", c({
|
|
156
|
-
class:
|
|
156
|
+
class: b(rn["elm-fragment-identifier"], a),
|
|
157
157
|
onClick: () => i(e.id)
|
|
158
158
|
}, o), [n("#")]);
|
|
159
159
|
};
|
|
@@ -183,7 +183,7 @@ var Xt = Symbol("elm.tabs"), Zt = (e) => {
|
|
|
183
183
|
},
|
|
184
184
|
setup(e, { slots: t }) {
|
|
185
185
|
return () => r(`h${e.level}`, {
|
|
186
|
-
class:
|
|
186
|
+
class: b(nn["elm-heading"], C.text, nn[`h${e.level}`]),
|
|
187
187
|
style: { "--elmethis-scoped-font-size": `${on[e.level]}em` },
|
|
188
188
|
id: e.id
|
|
189
189
|
}, { default: () => [
|
|
@@ -233,7 +233,7 @@ var Xt = Symbol("elm.tabs"), Zt = (e) => {
|
|
|
233
233
|
setup(e, { attrs: t }) {
|
|
234
234
|
return () => {
|
|
235
235
|
let { class: n, ...i } = t;
|
|
236
|
-
return r("span", c({ class:
|
|
236
|
+
return r("span", c({ class: b(ln["elm-inline-icon"], n) }, i), [r("img", {
|
|
237
237
|
src: e.src,
|
|
238
238
|
alt: e.alt,
|
|
239
239
|
class: ln["elm-inline-icon"],
|
|
@@ -319,7 +319,7 @@ var Xt = Symbol("elm.tabs"), Zt = (e) => {
|
|
|
319
319
|
})(), s = r("strong", null, [s])), e.code && ((function() {
|
|
320
320
|
return s;
|
|
321
321
|
})(), s = r("code", { class: cn.code }, [s])), e.ruby && (s = r("ruby", { class: cn["elm-inline-text"] }, [r("span", null, [s]), r("rt", null, [e.ruby])])), r("span", c({
|
|
322
|
-
class:
|
|
322
|
+
class: b(cn["elm-inline-text"], C.text, i),
|
|
323
323
|
style: [a, {
|
|
324
324
|
"--elmethis-scoped-color": e.color,
|
|
325
325
|
"--elmethis-scoped-font-size": e.size,
|
|
@@ -345,7 +345,7 @@ var Xt = Symbol("elm.tabs"), Zt = (e) => {
|
|
|
345
345
|
return () => {
|
|
346
346
|
let { class: i, style: a, ...o } = t;
|
|
347
347
|
return r("p", c({
|
|
348
|
-
class:
|
|
348
|
+
class: b(un["elm-paragraph"], C.text, i),
|
|
349
349
|
style: [a, {
|
|
350
350
|
"--elmethis-scoped-color": e.color,
|
|
351
351
|
"--elmethis-scoped-background-color": e.backgroundColor
|
|
@@ -498,11 +498,11 @@ function Sn(e) {
|
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
500
|
var Cn = new gn([
|
|
501
|
-
D(
|
|
501
|
+
D(ve, ({ props: e, resolve: t }) => {
|
|
502
502
|
let n = t(e.text), i = e.variant ?? "body";
|
|
503
503
|
return i === "caption" ? r(T, null, bn(n) ? n : { default: () => [n] }) : i === "body" ? r(dn, null, bn(n) ? n : { default: () => [n] }) : r(sn, { level: Sn(i) }, bn(n) ? n : { default: () => [n] });
|
|
504
504
|
}),
|
|
505
|
-
D(
|
|
505
|
+
D(he, ({ props: e, childRefs: t, renderChild: n }) => r("div", {
|
|
506
506
|
class: E.row,
|
|
507
507
|
style: {
|
|
508
508
|
justifyContent: _n[e.justify ?? "start"],
|
|
@@ -512,31 +512,31 @@ var Cn = new gn([
|
|
|
512
512
|
key: `${e}:${i}`,
|
|
513
513
|
class: E["child-wrap"]
|
|
514
514
|
}, [n(e, t, i)]))])),
|
|
515
|
-
D(
|
|
515
|
+
D(ce, ({ props: e, childRefs: t, renderChild: n }) => r("div", { class: E.column }, [t(e.children).map(({ id: e, path: t }, i) => r("span", {
|
|
516
516
|
key: `${e}:${i}`,
|
|
517
517
|
class: E["child-wrap"]
|
|
518
518
|
}, [n(e, t, i)]))])),
|
|
519
|
-
D(
|
|
519
|
+
D(pe, ({ props: e, childRefs: t, renderChild: n }) => r("div", { class: b(E.list, e.direction === "horizontal" && E["list-horizontal"]) }, [t(e.children).map(({ id: e, path: t }, i) => r("div", {
|
|
520
520
|
key: `${e}:${i}`,
|
|
521
521
|
class: E["list-item"]
|
|
522
522
|
}, [n(e, t, i)]))])),
|
|
523
|
-
D(
|
|
524
|
-
D(
|
|
523
|
+
D(ae, ({ props: e, renderChild: t }) => r("div", { class: E.card }, [t(e.child)])),
|
|
524
|
+
D(ie, ({ props: e, renderChild: t, dispatchAction: n }) => r("div", {
|
|
525
525
|
role: "button",
|
|
526
526
|
tabindex: 0,
|
|
527
|
-
class:
|
|
527
|
+
class: b(E.button, e.variant === "primary" && E["button-primary"]),
|
|
528
528
|
onClick: e.action ? () => n("action") : void 0,
|
|
529
529
|
onKeydown: e.action ? (e) => {
|
|
530
530
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), n("action"));
|
|
531
531
|
} : void 0
|
|
532
532
|
}, [t(e.child)])),
|
|
533
|
-
D(
|
|
533
|
+
D(fe, ({ props: e, resolve: t }) => r("img", {
|
|
534
534
|
class: E.image,
|
|
535
535
|
src: t(e.url),
|
|
536
536
|
alt: e.description ? t(e.description) : "",
|
|
537
537
|
style: { objectFit: yn[e.fit ?? "cover"] }
|
|
538
538
|
}, null)),
|
|
539
|
-
D(
|
|
539
|
+
D(de, ({ props: e, resolve: t }) => {
|
|
540
540
|
let n = t(e.name);
|
|
541
541
|
return r("span", {
|
|
542
542
|
class: E.icon,
|
|
@@ -544,11 +544,11 @@ var Cn = new gn([
|
|
|
544
544
|
"data-icon": n
|
|
545
545
|
}, null);
|
|
546
546
|
}),
|
|
547
|
-
D(
|
|
548
|
-
class:
|
|
547
|
+
D(ue, ({ props: e }) => r("div", {
|
|
548
|
+
class: b(E.divider, e.axis === "vertical" && E["divider-vertical"]),
|
|
549
549
|
role: "separator"
|
|
550
550
|
}, null)),
|
|
551
|
-
D(
|
|
551
|
+
D(ye, ({ props: e, resolve: t, setBinding: n }) => {
|
|
552
552
|
let i = e.variant ?? "shortText", a = e.value ? t(e.value) : "";
|
|
553
553
|
return r("div", { class: E["text-field"] }, [r("label", { class: E.label }, [t(e.label)]), i === "longText" ? r("textarea", {
|
|
554
554
|
class: E.input,
|
|
@@ -563,7 +563,7 @@ var Cn = new gn([
|
|
|
563
563
|
onChange: (e) => n("value", e.target.value)
|
|
564
564
|
}, null)]);
|
|
565
565
|
}),
|
|
566
|
-
D(
|
|
566
|
+
D(oe, ({ props: e, ctx: t, resolve: n, setBinding: i }) => {
|
|
567
567
|
let a = e.value, o = typeof a == "boolean" ? a : !!(t.dataContext.resolveDynamicValue(a) ?? !1);
|
|
568
568
|
return r("label", { class: E.checkbox }, [r("input", {
|
|
569
569
|
type: "checkbox",
|
|
@@ -571,7 +571,7 @@ var Cn = new gn([
|
|
|
571
571
|
onChange: (e) => i("value", e.target.checked)
|
|
572
572
|
}, null), r("span", { class: E["checkbox-label"] }, [n(e.label)])]);
|
|
573
573
|
}),
|
|
574
|
-
D(
|
|
574
|
+
D(ge, ({ props: e, ctx: t, setBinding: n }) => {
|
|
575
575
|
let i = e.value, a = typeof i == "number" ? i : Number(t.dataContext.resolveDynamicValue(i) ?? 0);
|
|
576
576
|
return r("input", {
|
|
577
577
|
class: E.slider,
|
|
@@ -583,7 +583,7 @@ var Cn = new gn([
|
|
|
583
583
|
onChange: (e) => n("value", Number(e.target.value))
|
|
584
584
|
}, null);
|
|
585
585
|
}),
|
|
586
|
-
D(
|
|
586
|
+
D(_e, ({ props: e, resolve: t, renderChild: n }) => {
|
|
587
587
|
let i;
|
|
588
588
|
return r(Qt, { defaultValue: "0" }, { default: () => [r($t, null, bn(i = e.tabs.map((e, n) => {
|
|
589
589
|
let i;
|
|
@@ -599,8 +599,8 @@ var Cn = new gn([
|
|
|
599
599
|
}, bn(i = n(e.child)) ? i : { default: () => [i] });
|
|
600
600
|
})] });
|
|
601
601
|
}),
|
|
602
|
-
D(
|
|
603
|
-
D(
|
|
602
|
+
D(me, ({ props: e, renderChild: t }) => r("div", { class: E.modal }, [t(e.trigger), r("div", { class: E["modal-content"] }, [t(e.content)])])),
|
|
603
|
+
D(be, ({ props: e, resolve: t }) => r("video", {
|
|
604
604
|
class: E.video,
|
|
605
605
|
controls: !0,
|
|
606
606
|
src: t(e.url)
|
|
@@ -610,7 +610,7 @@ var Cn = new gn([
|
|
|
610
610
|
controls: !0,
|
|
611
611
|
src: t(e.url)
|
|
612
612
|
}, null)),
|
|
613
|
-
D(
|
|
613
|
+
D(se, ({ props: e, componentId: t, ctx: n, resolve: i, setBinding: a }) => {
|
|
614
614
|
let o = e.value, s = Array.isArray(o) ? o : n.dataContext.resolveDynamicValue(o) ?? [], c = Array.isArray(s) ? s : [], l = (e.variant ?? "mutuallyExclusive") === "multipleSelection";
|
|
615
615
|
return r("div", {
|
|
616
616
|
class: E["choice-picker"],
|
|
@@ -629,7 +629,7 @@ var Cn = new gn([
|
|
|
629
629
|
checked: c.includes(e.value)
|
|
630
630
|
}, null), r("span", null, [i(e.label)])]))])]);
|
|
631
631
|
}),
|
|
632
|
-
D(
|
|
632
|
+
D(le, ({ props: e, resolve: t, setBinding: n }) => {
|
|
633
633
|
let i = e.enableDate ?? !1, a = e.enableTime ?? !1, o = i && a ? "datetime-local" : i ? "date" : a ? "time" : "text";
|
|
634
634
|
return r("div", { class: E["datetime-input"] }, [e.label ? r("label", { class: E.label }, [t(e.label)]) : null, r("input", {
|
|
635
635
|
class: E.input,
|
|
@@ -880,7 +880,7 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
880
880
|
let t = e.createSurface?.catalogId;
|
|
881
881
|
typeof t == "string" && c.add(t);
|
|
882
882
|
}
|
|
883
|
-
let l = new v(Array.from(c).map((e) => new ee(e,
|
|
883
|
+
let l = new v(Array.from(c).map((e) => new ee(e, re, y))), u = /* @__PURE__ */ new Map(), d = [];
|
|
884
884
|
d.push(l.model.onSurfaceCreated.subscribe((e) => {
|
|
885
885
|
u.set(e.id, e), n.value++;
|
|
886
886
|
})), d.push(l.model.onSurfaceDeleted.subscribe((e) => {
|
|
@@ -950,12 +950,12 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
950
950
|
}
|
|
951
951
|
},
|
|
952
952
|
setup(e) {
|
|
953
|
-
let n = t(() =>
|
|
953
|
+
let n = t(() => we(e.expression, {
|
|
954
954
|
displayMode: e.block,
|
|
955
955
|
output: "mathml"
|
|
956
956
|
}));
|
|
957
957
|
return () => r("div", {
|
|
958
|
-
class:
|
|
958
|
+
class: b(C.text, e.block ? Pn["elm-katex"] : void 0),
|
|
959
959
|
innerHTML: n.value
|
|
960
960
|
}, null);
|
|
961
961
|
}
|
|
@@ -1021,7 +1021,7 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1021
1021
|
return () => {
|
|
1022
1022
|
let { class: n, style: i, ...a } = t;
|
|
1023
1023
|
return r("svg", c({
|
|
1024
|
-
class:
|
|
1024
|
+
class: b(Bn["elm-mdi-icon"], n),
|
|
1025
1025
|
style: [{
|
|
1026
1026
|
"--elmethis-scoped-color": e.lightColor ?? e.color,
|
|
1027
1027
|
"--dark-color": e.darkColor ?? e.color
|
|
@@ -1050,12 +1050,12 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1050
1050
|
},
|
|
1051
1051
|
setup(e) {
|
|
1052
1052
|
return () => {
|
|
1053
|
-
let t =
|
|
1053
|
+
let t = Ut(e.language);
|
|
1054
1054
|
return t === "file" ? r(O, {
|
|
1055
|
-
d:
|
|
1055
|
+
d: Fe,
|
|
1056
1056
|
size: String(e.size)
|
|
1057
1057
|
}, null) : a(zn, {
|
|
1058
|
-
icon:
|
|
1058
|
+
icon: Ht[t],
|
|
1059
1059
|
size: e.size
|
|
1060
1060
|
});
|
|
1061
1061
|
};
|
|
@@ -1080,11 +1080,11 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1080
1080
|
return;
|
|
1081
1081
|
}
|
|
1082
1082
|
try {
|
|
1083
|
-
let i = await
|
|
1083
|
+
let i = await Wt(e, {
|
|
1084
1084
|
lang: t,
|
|
1085
1085
|
themes: {
|
|
1086
|
-
dark:
|
|
1087
|
-
light:
|
|
1086
|
+
dark: Gt,
|
|
1087
|
+
light: Kt
|
|
1088
1088
|
},
|
|
1089
1089
|
defaultColor: !1,
|
|
1090
1090
|
colorReplacements: {
|
|
@@ -1105,7 +1105,7 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1105
1105
|
}, { immediate: !0 }), () => {
|
|
1106
1106
|
let { class: e, ...i } = t;
|
|
1107
1107
|
return r("pre", c({
|
|
1108
|
-
class:
|
|
1108
|
+
class: b(Hn["elm-shiki-highlighter"], e),
|
|
1109
1109
|
innerHTML: n.value
|
|
1110
1110
|
}, i), null);
|
|
1111
1111
|
};
|
|
@@ -1114,7 +1114,7 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1114
1114
|
"use-clipboard": "_use-clipboard_mb0qt_1",
|
|
1115
1115
|
"use-clipboard-icon-copied": "_use-clipboard-icon-copied_mb0qt_15"
|
|
1116
1116
|
}, Gn = (e) => {
|
|
1117
|
-
let n = e.delay ?? 1500, a =
|
|
1117
|
+
let n = e.delay ?? 1500, a = xe({ copiedDuring: n }), o = Se({ copiedDuring: n }), s = t(() => a.copied.value || o.copied.value), c = async () => {
|
|
1118
1118
|
let t = e.content;
|
|
1119
1119
|
typeof t == "string" ? await a.copy(t) : await o.copy(t.map((e) => new ClipboardItem(e)));
|
|
1120
1120
|
};
|
|
@@ -1124,12 +1124,12 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1124
1124
|
name: "CopyButton",
|
|
1125
1125
|
setup() {
|
|
1126
1126
|
return () => r("span", {
|
|
1127
|
-
class:
|
|
1127
|
+
class: b(Wn["use-clipboard"], e.class),
|
|
1128
1128
|
style: e.style,
|
|
1129
1129
|
onClick: c
|
|
1130
1130
|
}, [r(O, {
|
|
1131
|
-
class:
|
|
1132
|
-
d: s.value ?
|
|
1131
|
+
class: b(s.value && Wn["use-clipboard-icon-copied"]),
|
|
1132
|
+
d: s.value ? Ne : Pe,
|
|
1133
1133
|
size: "1.25rem"
|
|
1134
1134
|
}, null)]);
|
|
1135
1135
|
}
|
|
@@ -1153,7 +1153,7 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1153
1153
|
},
|
|
1154
1154
|
setup(e, { slots: t }) {
|
|
1155
1155
|
let { CopyButton: n } = Gn({ content: e.code });
|
|
1156
|
-
return () => r("figure", { class:
|
|
1156
|
+
return () => r("figure", { class: b(In["elm-code-block"]) }, [
|
|
1157
1157
|
r("span", { class: In["language-icon"] }, [r(Vn, { language: e.language }, null)]),
|
|
1158
1158
|
r("span", { class: In.caption }, [r(T, null, { default: () => [e.caption || e.language, t.default?.()] })]),
|
|
1159
1159
|
r("div", { class: In["copy-icon"] }, [a(n)]),
|
|
@@ -1194,7 +1194,11 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1194
1194
|
props: {
|
|
1195
1195
|
html: {
|
|
1196
1196
|
type: String,
|
|
1197
|
-
|
|
1197
|
+
default: void 0
|
|
1198
|
+
},
|
|
1199
|
+
src: {
|
|
1200
|
+
type: String,
|
|
1201
|
+
default: void 0
|
|
1198
1202
|
},
|
|
1199
1203
|
autoHeight: {
|
|
1200
1204
|
type: Boolean,
|
|
@@ -1204,6 +1208,10 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1204
1208
|
type: String,
|
|
1205
1209
|
default: void 0
|
|
1206
1210
|
},
|
|
1211
|
+
allowScripts: {
|
|
1212
|
+
type: Boolean,
|
|
1213
|
+
default: !1
|
|
1214
|
+
},
|
|
1207
1215
|
height: {
|
|
1208
1216
|
type: [Number, String],
|
|
1209
1217
|
default: void 0
|
|
@@ -1214,46 +1222,57 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1214
1222
|
}
|
|
1215
1223
|
},
|
|
1216
1224
|
setup(e, { attrs: t }) {
|
|
1217
|
-
let n = m(null), i = m(void 0);
|
|
1218
|
-
_(() => [
|
|
1225
|
+
let n = m(null), i = m(void 0), a = () => e.src !== void 0;
|
|
1226
|
+
_(() => [
|
|
1227
|
+
e.html,
|
|
1228
|
+
e.src,
|
|
1229
|
+
e.autoHeight
|
|
1230
|
+
], ([, , e]) => {
|
|
1219
1231
|
e && (i.value = void 0);
|
|
1220
1232
|
}, { flush: "pre" });
|
|
1221
|
-
let
|
|
1233
|
+
let o, s = (e) => {
|
|
1234
|
+
if (a()) return;
|
|
1222
1235
|
let t = n.value;
|
|
1223
1236
|
if (!t) return;
|
|
1224
|
-
let r,
|
|
1237
|
+
let r, s = () => {
|
|
1225
1238
|
let e = t.contentDocument?.documentElement;
|
|
1226
1239
|
e && (i.value = e.scrollHeight);
|
|
1227
|
-
}, s = () => {
|
|
1228
|
-
let e = t.contentDocument?.documentElement;
|
|
1229
|
-
e && (r?.disconnect(), r = new ResizeObserver(o), r.observe(e));
|
|
1230
1240
|
}, c = () => {
|
|
1231
|
-
e
|
|
1241
|
+
let e = t.contentDocument?.documentElement;
|
|
1242
|
+
e && (r?.disconnect(), r = new ResizeObserver(s), r.observe(e));
|
|
1243
|
+
}, l = () => {
|
|
1244
|
+
e && (s(), c());
|
|
1232
1245
|
};
|
|
1233
|
-
t.addEventListener("load",
|
|
1234
|
-
t.removeEventListener("load",
|
|
1246
|
+
t.addEventListener("load", l), o = () => {
|
|
1247
|
+
t.removeEventListener("load", l), r?.disconnect();
|
|
1235
1248
|
};
|
|
1236
1249
|
};
|
|
1237
|
-
return d(() =>
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1250
|
+
return d(() => s(e.autoHeight)), _(() => [
|
|
1251
|
+
e.html,
|
|
1252
|
+
e.src,
|
|
1253
|
+
e.autoHeight
|
|
1254
|
+
], ([, , e]) => {
|
|
1255
|
+
o?.(), s(e);
|
|
1256
|
+
}, { flush: "post" }), u(() => o?.()), () => {
|
|
1257
|
+
let o = a(), { class: s, style: l, srcDoc: u, srcdoc: d, referrerPolicy: f, referrerpolicy: p, ...m } = t, h = Xn(l), g = h?.height, _ = new Set(e.sandbox?.split(/\s+/).filter(Boolean) ?? []);
|
|
1258
|
+
if (e.allowScripts && _.add("allow-scripts"), [..._].some((e) => e.toLowerCase() === "allow-scripts")) for (let e of _) e.toLowerCase() === "allow-same-origin" && _.delete(e);
|
|
1259
|
+
else e.autoHeight && !o && _.add("allow-same-origin");
|
|
1260
|
+
let ee = [..._].join(" ");
|
|
1244
1261
|
return r("iframe", c({
|
|
1245
1262
|
key: String(e.autoHeight),
|
|
1246
1263
|
ref: n,
|
|
1247
1264
|
title: e.title ?? "Embedded HTML content",
|
|
1248
|
-
class:
|
|
1265
|
+
class: b(qn["elm-html"], s),
|
|
1249
1266
|
style: e.autoHeight ? {
|
|
1250
|
-
...
|
|
1251
|
-
height: i.value === void 0 ?
|
|
1252
|
-
} :
|
|
1253
|
-
height: e.autoHeight ? i.value === void 0 &&
|
|
1254
|
-
},
|
|
1255
|
-
|
|
1256
|
-
|
|
1267
|
+
...h,
|
|
1268
|
+
height: i.value === void 0 ? g : `${i.value}px`
|
|
1269
|
+
} : h,
|
|
1270
|
+
height: e.autoHeight ? i.value === void 0 && g === void 0 ? e.height : void 0 : e.height
|
|
1271
|
+
}, m, {
|
|
1272
|
+
src: o ? e.src : void 0,
|
|
1273
|
+
srcdoc: o ? void 0 : e.html ?? "",
|
|
1274
|
+
sandbox: ee,
|
|
1275
|
+
referrerpolicy: o ? "no-referrer" : void 0
|
|
1257
1276
|
}), null);
|
|
1258
1277
|
};
|
|
1259
1278
|
}
|
|
@@ -1331,7 +1350,7 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1331
1350
|
}
|
|
1332
1351
|
},
|
|
1333
1352
|
setup(n) {
|
|
1334
|
-
let i = m(null), a = m(null), o = null, s = m(!1), c = m(!0), l = m(!1), d = m(0), f = m(0), p = m(1), h = m(!1), g = m(null), _ = t(() => d.value > 0 ? Math.min(1, f.value / d.value) : 0), ee = t(() => h.value || p.value === 0 ?
|
|
1353
|
+
let i = m(null), a = m(null), o = null, s = m(!1), c = m(!0), l = m(!1), d = m(0), f = m(0), p = m(1), h = m(!1), g = m(null), _ = t(() => d.value > 0 ? Math.min(1, f.value / d.value) : 0), ee = t(() => h.value || p.value === 0 ? dt : p.value < .34 ? lt : p.value < .67 ? ut : ct), te = t(() => n.title ?? $n(n.src)), v = () => {
|
|
1335
1354
|
if (o != null) return;
|
|
1336
1355
|
let e = () => {
|
|
1337
1356
|
i.value && (f.value = i.value.currentTime), o = requestAnimationFrame(e);
|
|
@@ -1341,37 +1360,37 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1341
1360
|
o != null && (cancelAnimationFrame(o), o = null);
|
|
1342
1361
|
};
|
|
1343
1362
|
u(ne);
|
|
1344
|
-
let
|
|
1363
|
+
let re = () => {
|
|
1345
1364
|
let e = i.value;
|
|
1346
1365
|
e && (e.paused ? e.play().catch(() => s.value = !1) : e.pause());
|
|
1347
|
-
},
|
|
1366
|
+
}, y = (e) => {
|
|
1348
1367
|
let t = i.value;
|
|
1349
1368
|
if (!t || !Number.isFinite(d.value) || d.value <= 0) return;
|
|
1350
1369
|
let n = Math.max(0, Math.min(d.value, e));
|
|
1351
1370
|
t.currentTime = n, f.value = n;
|
|
1352
|
-
},
|
|
1371
|
+
}, ie = (e) => {
|
|
1353
1372
|
let t = a.value;
|
|
1354
1373
|
if (!t) return 0;
|
|
1355
1374
|
let n = t.getBoundingClientRect();
|
|
1356
1375
|
return n.width === 0 ? 0 : Math.max(0, Math.min(1, (e - n.left) / n.width));
|
|
1357
|
-
}, ie = (e) => {
|
|
1358
|
-
e.currentTarget.setPointerCapture(e.pointerId), b(re(e.clientX) * d.value);
|
|
1359
1376
|
}, ae = (e) => {
|
|
1360
|
-
|
|
1361
|
-
g.value = t, e.currentTarget.hasPointerCapture(e.pointerId) && b(t * d.value);
|
|
1377
|
+
e.currentTarget.setPointerCapture(e.pointerId), y(ie(e.clientX) * d.value);
|
|
1362
1378
|
}, oe = (e) => {
|
|
1363
|
-
|
|
1379
|
+
let t = ie(e.clientX);
|
|
1380
|
+
g.value = t, e.currentTarget.hasPointerCapture(e.pointerId) && y(t * d.value);
|
|
1364
1381
|
}, se = (e) => {
|
|
1382
|
+
e.key === "ArrowRight" ? (e.preventDefault(), y(f.value + n.seekStep)) : e.key === "ArrowLeft" ? (e.preventDefault(), y(f.value - n.seekStep)) : e.key === "Home" ? (e.preventDefault(), y(0)) : e.key === "End" && (e.preventDefault(), y(d.value));
|
|
1383
|
+
}, ce = (e) => {
|
|
1365
1384
|
let t = i.value, n = Math.max(0, Math.min(1, e));
|
|
1366
1385
|
t && (t.volume = n, t.muted = n === 0), p.value = n, h.value = n === 0;
|
|
1367
|
-
},
|
|
1386
|
+
}, le = () => {
|
|
1368
1387
|
let e = i.value;
|
|
1369
1388
|
if (!e) return;
|
|
1370
1389
|
let t = !e.muted;
|
|
1371
1390
|
e.muted = t, h.value = t;
|
|
1372
1391
|
};
|
|
1373
1392
|
return () => r("div", {
|
|
1374
|
-
class:
|
|
1393
|
+
class: b(k["elm-audio-player"], s.value && k.playing, c.value && k.loading, l.value && k.errored),
|
|
1375
1394
|
style: {
|
|
1376
1395
|
"--elmethis-scoped-progress": _.value,
|
|
1377
1396
|
"--elmethis-scoped-hover": g.value ?? 0
|
|
@@ -1415,10 +1434,10 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1415
1434
|
}, null),
|
|
1416
1435
|
r("div", { class: k.header }, [
|
|
1417
1436
|
r("span", {
|
|
1418
|
-
class:
|
|
1437
|
+
class: b(k.artwork, l.value && k["artwork-error"]),
|
|
1419
1438
|
"aria-hidden": "true"
|
|
1420
1439
|
}, [r(O, {
|
|
1421
|
-
d: l.value ?
|
|
1440
|
+
d: l.value ? Ee : Qe,
|
|
1422
1441
|
size: "1.25rem"
|
|
1423
1442
|
}, null)]),
|
|
1424
1443
|
r("div", { class: k.meta }, [r("span", {
|
|
@@ -1439,7 +1458,7 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1439
1458
|
class: k["error-notice"],
|
|
1440
1459
|
role: "alert"
|
|
1441
1460
|
}, [r(O, {
|
|
1442
|
-
d:
|
|
1461
|
+
d: Ee,
|
|
1443
1462
|
size: "1.25rem"
|
|
1444
1463
|
}, null), r("span", { class: k["error-message"] }, [n.errorMessage])]) : r(e, null, [r("div", {
|
|
1445
1464
|
ref: a,
|
|
@@ -1451,10 +1470,10 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1451
1470
|
"aria-valuemax": Math.round(d.value) || 0,
|
|
1452
1471
|
"aria-valuenow": Math.round(f.value),
|
|
1453
1472
|
"aria-valuetext": `${Qn(f.value)} of ${Qn(d.value)}`,
|
|
1454
|
-
onPointerdown:
|
|
1455
|
-
onPointermove:
|
|
1473
|
+
onPointerdown: ae,
|
|
1474
|
+
onPointermove: oe,
|
|
1456
1475
|
onPointerleave: () => g.value = null,
|
|
1457
|
-
onKeydown:
|
|
1476
|
+
onKeydown: se
|
|
1458
1477
|
}, [
|
|
1459
1478
|
r("div", {
|
|
1460
1479
|
class: k.track,
|
|
@@ -1469,41 +1488,41 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1469
1488
|
"aria-hidden": "true"
|
|
1470
1489
|
}, null)
|
|
1471
1490
|
]), r("div", { class: k.controls }, [
|
|
1472
|
-
r("span", { class:
|
|
1491
|
+
r("span", { class: b(k.time, k["time-current"]) }, [Qn(f.value)]),
|
|
1473
1492
|
r("div", { class: k.transport }, [
|
|
1474
1493
|
r("button", {
|
|
1475
1494
|
type: "button",
|
|
1476
1495
|
class: k["icon-button"],
|
|
1477
|
-
onClick: () =>
|
|
1496
|
+
onClick: () => y(f.value - n.seekStep),
|
|
1478
1497
|
"aria-label": `Back ${n.seekStep} seconds`
|
|
1479
1498
|
}, [r(O, {
|
|
1480
|
-
d:
|
|
1499
|
+
d: rt,
|
|
1481
1500
|
size: "1.25rem"
|
|
1482
1501
|
}, null)]),
|
|
1483
1502
|
r("button", {
|
|
1484
1503
|
type: "button",
|
|
1485
1504
|
class: k["play-button"],
|
|
1486
|
-
onClick:
|
|
1505
|
+
onClick: re,
|
|
1487
1506
|
"aria-label": s.value ? "Pause" : "Play",
|
|
1488
1507
|
"aria-pressed": s.value
|
|
1489
1508
|
}, [r(O, {
|
|
1490
|
-
d: s.value ?
|
|
1509
|
+
d: s.value ? et : tt,
|
|
1491
1510
|
size: "1.5rem"
|
|
1492
1511
|
}, null)]),
|
|
1493
1512
|
r("button", {
|
|
1494
1513
|
type: "button",
|
|
1495
1514
|
class: k["icon-button"],
|
|
1496
|
-
onClick: () =>
|
|
1515
|
+
onClick: () => y(f.value + n.seekStep),
|
|
1497
1516
|
"aria-label": `Forward ${n.seekStep} seconds`
|
|
1498
1517
|
}, [r(O, {
|
|
1499
|
-
d:
|
|
1518
|
+
d: ze,
|
|
1500
1519
|
size: "1.25rem"
|
|
1501
1520
|
}, null)])
|
|
1502
1521
|
]),
|
|
1503
1522
|
r("div", { class: k.volume }, [r("button", {
|
|
1504
1523
|
type: "button",
|
|
1505
1524
|
class: k["icon-button"],
|
|
1506
|
-
onClick:
|
|
1525
|
+
onClick: le,
|
|
1507
1526
|
"aria-label": h.value ? "Unmute" : "Mute",
|
|
1508
1527
|
"aria-pressed": h.value
|
|
1509
1528
|
}, [r(O, {
|
|
@@ -1517,10 +1536,10 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1517
1536
|
step: .01,
|
|
1518
1537
|
value: h.value ? 0 : p.value,
|
|
1519
1538
|
"aria-label": "Volume",
|
|
1520
|
-
onInput: (e) =>
|
|
1539
|
+
onInput: (e) => ce(e.target.valueAsNumber),
|
|
1521
1540
|
style: { "--elmethis-scoped-volume": h.value ? 0 : p.value }
|
|
1522
1541
|
}, null)]),
|
|
1523
|
-
r("span", { class:
|
|
1542
|
+
r("span", { class: b(k.time, k["time-total"]) }, [Qn(d.value)])
|
|
1524
1543
|
])])
|
|
1525
1544
|
]);
|
|
1526
1545
|
}
|
|
@@ -1539,7 +1558,7 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1539
1558
|
setup() {
|
|
1540
1559
|
return () => r("div", {
|
|
1541
1560
|
"aria-hidden": "true",
|
|
1542
|
-
class:
|
|
1561
|
+
class: b(tr["elm-rectangle-wave"])
|
|
1543
1562
|
}, null);
|
|
1544
1563
|
}
|
|
1545
1564
|
}), rr = {
|
|
@@ -1583,7 +1602,7 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1583
1602
|
let { class: o, style: s, ...u } = t;
|
|
1584
1603
|
return r("dialog", c({
|
|
1585
1604
|
ref: i,
|
|
1586
|
-
class:
|
|
1605
|
+
class: b(rr["elm-modal"], a.value && rr.shown, o),
|
|
1587
1606
|
onClick: l,
|
|
1588
1607
|
style: [{ "--elmethis-scoped-modal-delay": `${e.delay}ms` }, s]
|
|
1589
1608
|
}, { closedby: "none" }, u), [r("div", { onClick: (e) => e.stopPropagation() }, [n.default?.()])]);
|
|
@@ -1674,7 +1693,7 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1674
1693
|
"--elmethis-scoped-aspect-ratio": e.width && e.height ? `${e.width} / ${e.height}` : "auto"
|
|
1675
1694
|
}
|
|
1676
1695
|
}, { fetchpriority: n ? "low" : "auto" }), null);
|
|
1677
|
-
return () => r("figure", { class:
|
|
1696
|
+
return () => r("figure", { class: b(A["elm-block-image"]) }, [
|
|
1678
1697
|
r("div", {
|
|
1679
1698
|
class: A["image-container"],
|
|
1680
1699
|
style: { "--elmethis-scoped-opacity": t.value ? 1 : .01 },
|
|
@@ -1684,7 +1703,7 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1684
1703
|
class: A["caption-box"],
|
|
1685
1704
|
style: { "--elmethis-scoped-opacity": t.value ? .01 : 1 }
|
|
1686
1705
|
}, [r("span", { class: A["caption-icon"] }, [r(O, {
|
|
1687
|
-
d:
|
|
1706
|
+
d: Ze,
|
|
1688
1707
|
size: "1.25rem"
|
|
1689
1708
|
}, null)]), r(T, { size: "1rem" }, { default: () => [e.caption] })]),
|
|
1690
1709
|
a(n, null, { default: () => i.value ? h(!0) : null })
|
|
@@ -1731,9 +1750,9 @@ var lr = /* @__PURE__ */ i({
|
|
|
1731
1750
|
t && URL.revokeObjectURL(t.href);
|
|
1732
1751
|
}
|
|
1733
1752
|
};
|
|
1734
|
-
return () => r("div", { class:
|
|
1753
|
+
return () => r("div", { class: b(sr["elm-file"]) }, [
|
|
1735
1754
|
r("div", null, [r(O, {
|
|
1736
|
-
d:
|
|
1755
|
+
d: Be,
|
|
1737
1756
|
size: "1.25rem"
|
|
1738
1757
|
}, null)]),
|
|
1739
1758
|
r("div", null, [r(T, null, { default: () => [e.name ?? cr(e.src)] })]),
|
|
@@ -1742,7 +1761,7 @@ var lr = /* @__PURE__ */ i({
|
|
|
1742
1761
|
class: sr["download-icon"],
|
|
1743
1762
|
onClick: t
|
|
1744
1763
|
}, [r(O, {
|
|
1745
|
-
d:
|
|
1764
|
+
d: Ie,
|
|
1746
1765
|
size: "1.25rem"
|
|
1747
1766
|
}, null)])
|
|
1748
1767
|
]);
|
|
@@ -1784,7 +1803,7 @@ var lr = /* @__PURE__ */ i({
|
|
|
1784
1803
|
},
|
|
1785
1804
|
setup(e) {
|
|
1786
1805
|
let t = m(!1);
|
|
1787
|
-
return () => r("div", { class:
|
|
1806
|
+
return () => r("div", { class: b(j["elm-bookmark"]) }, [r("a", {
|
|
1788
1807
|
class: j.container,
|
|
1789
1808
|
href: e.url,
|
|
1790
1809
|
target: "_blank",
|
|
@@ -1799,7 +1818,7 @@ var lr = /* @__PURE__ */ i({
|
|
|
1799
1818
|
r("div", { class: j.title }, [r(T, { bold: !0 }, { default: () => [e.title] })]),
|
|
1800
1819
|
r("div", { class: j.description }, [r(T, { size: "0.75rem" }, { default: () => [e.description] })]),
|
|
1801
1820
|
r("div", { class: j.link }, [e.favicon ? r(w, { src: e.favicon }, null) : r(O, {
|
|
1802
|
-
d:
|
|
1821
|
+
d: Ye,
|
|
1803
1822
|
color: "var(--elmethis-color-accent-info)"
|
|
1804
1823
|
}, null), r(T, { size: "0.75rem" }, { default: () => [e.url] })])
|
|
1805
1824
|
])])]);
|
|
@@ -1842,45 +1861,45 @@ var lr = /* @__PURE__ */ i({
|
|
|
1842
1861
|
emit: t,
|
|
1843
1862
|
defaultValue: e.defaultIsOpen ?? !1
|
|
1844
1863
|
});
|
|
1845
|
-
return () => r("div", { class:
|
|
1864
|
+
return () => r("div", { class: b(M["elm-toggle"], i.value && M.open) }, [
|
|
1846
1865
|
r("div", {
|
|
1847
1866
|
class: M.summary,
|
|
1848
1867
|
onClick: (e) => {
|
|
1849
1868
|
e.preventDefault(), i.value = !i.value;
|
|
1850
1869
|
}
|
|
1851
1870
|
}, [
|
|
1852
|
-
r("div", { class: M["summary-left"] }, [r("span", { class:
|
|
1853
|
-
d:
|
|
1871
|
+
r("div", { class: M["summary-left"] }, [r("span", { class: b(M.chevron, i.value && M.open) }, [r(O, {
|
|
1872
|
+
d: Me,
|
|
1854
1873
|
color: e.monochrome ? "var(--elmethis-color-neutral-weak)" : "var(--elmethis-color-primary)",
|
|
1855
1874
|
size: "1rem"
|
|
1856
1875
|
}, null)]), r("div", null, [e.summary == null ? n.summary?.() : r(T, null, { default: () => [e.summary] })])]),
|
|
1857
1876
|
r("hr", { class: M.divider }, null),
|
|
1858
|
-
r("span", { class:
|
|
1859
|
-
d:
|
|
1877
|
+
r("span", { class: b(M.cross, i.value && M.open) }, [r(O, {
|
|
1878
|
+
d: nt,
|
|
1860
1879
|
size: "1rem",
|
|
1861
1880
|
color: e.monochrome ? "var(--elmethis-color-neutral-weak)" : i.value ? "var(--elmethis-color-accent-error)" : "var(--elmethis-color-primary)"
|
|
1862
1881
|
}, null)])
|
|
1863
1882
|
]),
|
|
1864
1883
|
r("div", { class: M.border }, null),
|
|
1865
|
-
r("div", { class:
|
|
1884
|
+
r("div", { class: b(M.content, i.value && M.open) }, [n.default?.()])
|
|
1866
1885
|
]);
|
|
1867
1886
|
}
|
|
1868
|
-
}),
|
|
1887
|
+
}), N = {
|
|
1869
1888
|
"elm-block-quote": "_elm-block-quote_xzf6a_1",
|
|
1870
1889
|
body: "_body_xzf6a_19",
|
|
1871
1890
|
icon: "_icon_xzf6a_27",
|
|
1872
1891
|
"icon-top-left": "_icon-top-left_xzf6a_32",
|
|
1873
1892
|
"icon-bottom-right": "_icon-bottom-right_xzf6a_36"
|
|
1874
|
-
},
|
|
1893
|
+
}, pr = /* @__PURE__ */ i({
|
|
1875
1894
|
name: "ElmBlockQuote",
|
|
1876
1895
|
setup(e, { slots: t }) {
|
|
1877
|
-
return () => r("blockquote", { class:
|
|
1878
|
-
r("div", { class:
|
|
1879
|
-
r("div", { class:
|
|
1880
|
-
r("div", { class:
|
|
1896
|
+
return () => r("blockquote", { class: b(N["elm-block-quote"], C.text) }, [
|
|
1897
|
+
r("div", { class: b(N.icon, N["icon-top-left"]) }, [r(O, { d: We }, null)]),
|
|
1898
|
+
r("div", { class: N.body }, [t.default?.()]),
|
|
1899
|
+
r("div", { class: b(N.icon, N["icon-bottom-right"]) }, [r(O, { d: Ue }, null)])
|
|
1881
1900
|
]);
|
|
1882
1901
|
}
|
|
1883
|
-
}),
|
|
1902
|
+
}), mr = {
|
|
1884
1903
|
"elm-callout": "_elm-callout_1nsmp_1",
|
|
1885
1904
|
header: "_header_1nsmp_26",
|
|
1886
1905
|
content: "_content_1nsmp_35",
|
|
@@ -1890,26 +1909,26 @@ var lr = /* @__PURE__ */ i({
|
|
|
1890
1909
|
important: "_important_1nsmp_55",
|
|
1891
1910
|
warning: "_warning_1nsmp_59",
|
|
1892
1911
|
caution: "_caution_1nsmp_63"
|
|
1893
|
-
},
|
|
1894
|
-
note:
|
|
1895
|
-
tip:
|
|
1896
|
-
important:
|
|
1897
|
-
warning:
|
|
1898
|
-
caution:
|
|
1899
|
-
}),
|
|
1912
|
+
}, hr = Object.freeze({
|
|
1913
|
+
note: qe,
|
|
1914
|
+
tip: Je,
|
|
1915
|
+
important: it,
|
|
1916
|
+
warning: Te,
|
|
1917
|
+
caution: De
|
|
1918
|
+
}), gr = /* @__PURE__ */ i({
|
|
1900
1919
|
name: "ElmCallout",
|
|
1901
1920
|
props: { type: {
|
|
1902
1921
|
type: String,
|
|
1903
1922
|
default: "note"
|
|
1904
1923
|
} },
|
|
1905
1924
|
setup(e, { slots: t }) {
|
|
1906
|
-
return () => r("aside", { class:
|
|
1907
|
-
class:
|
|
1908
|
-
d:
|
|
1925
|
+
return () => r("aside", { class: b(mr["elm-callout"], mr[e.type]) }, [r("div", { class: mr.header }, [r(O, {
|
|
1926
|
+
class: mr.icon,
|
|
1927
|
+
d: hr[e.type],
|
|
1909
1928
|
size: "1.25rem"
|
|
1910
|
-
}, null), r("span", null, [e.type])]), r("div", { class:
|
|
1929
|
+
}, null), r("span", null, [e.type])]), r("div", { class: mr.content }, [t.default?.()])]);
|
|
1911
1930
|
}
|
|
1912
|
-
}),
|
|
1931
|
+
}), _r = {
|
|
1913
1932
|
"elm-notion-callout": "_elm-notion-callout_15idh_1",
|
|
1914
1933
|
icon: "_icon_15idh_9",
|
|
1915
1934
|
content: "_content_15idh_15",
|
|
@@ -1945,15 +1964,15 @@ var lr = /* @__PURE__ */ i({
|
|
|
1945
1964
|
setup(e, { slots: t, attrs: n }) {
|
|
1946
1965
|
return () => {
|
|
1947
1966
|
let { class: i, ...a } = n;
|
|
1948
|
-
return r("div", c({ class:
|
|
1949
|
-
class:
|
|
1967
|
+
return r("div", c({ class: b(_r["elm-notion-callout"], _r[e.color], _r[e.variant], i) }, a), [e.icon !== void 0 && (e.icon.kind === "emoji" ? r("span", {
|
|
1968
|
+
class: _r.icon,
|
|
1950
1969
|
role: "img"
|
|
1951
1970
|
}, [e.icon.emoji]) : r(w, {
|
|
1952
|
-
class:
|
|
1971
|
+
class: _r.icon,
|
|
1953
1972
|
src: e.icon.src,
|
|
1954
1973
|
alt: e.icon.alt,
|
|
1955
1974
|
size: 20
|
|
1956
|
-
}, null)), r("div", { class:
|
|
1975
|
+
}, null)), r("div", { class: _r.content }, [t.default?.()])]);
|
|
1957
1976
|
};
|
|
1958
1977
|
}
|
|
1959
1978
|
}), yr = { "elm-divider": "_elm-divider_9m6gb_1" }, br = /* @__PURE__ */ i({
|
|
@@ -1962,7 +1981,7 @@ var lr = /* @__PURE__ */ i({
|
|
|
1962
1981
|
setup(e, { attrs: t }) {
|
|
1963
1982
|
return () => {
|
|
1964
1983
|
let { class: e, ...n } = t;
|
|
1965
|
-
return r("hr", c({ class:
|
|
1984
|
+
return r("hr", c({ class: b(yr["elm-divider"], e) }, n), null);
|
|
1966
1985
|
};
|
|
1967
1986
|
}
|
|
1968
1987
|
}), xr = {
|
|
@@ -1976,7 +1995,7 @@ var lr = /* @__PURE__ */ i({
|
|
|
1976
1995
|
default: "unordered"
|
|
1977
1996
|
} },
|
|
1978
1997
|
setup(e, { slots: t }) {
|
|
1979
|
-
return () => e.listStyle === "ordered" ? r("ol", { class:
|
|
1998
|
+
return () => e.listStyle === "ordered" ? r("ol", { class: b(C.text, xr["elm-list"], xr.numbered) }, [t.default?.()]) : r("ul", { class: b(C.text, xr["elm-list"], xr.bulleted) }, [t.default?.()]);
|
|
1980
1999
|
}
|
|
1981
2000
|
}), P = {
|
|
1982
2001
|
"elm-table-frame": "_elm-table-frame_1b7h2_3",
|
|
@@ -2024,7 +2043,7 @@ var lr = /* @__PURE__ */ i({
|
|
|
2024
2043
|
tabindex: o.value ? 0 : void 0,
|
|
2025
2044
|
role: o.value && e.caption != null ? "region" : void 0,
|
|
2026
2045
|
"aria-label": o.value && e.caption != null ? e.caption : void 0
|
|
2027
|
-
}, [r("table", c({ class:
|
|
2046
|
+
}, [r("table", c({ class: b(P["elm-table"], C.text, e.hasRowHeader && P["sticky-row-header"], t) }, u), [e.caption && r("caption", null, [r("span", { class: P.caption }, [
|
|
2028
2047
|
r("span", { class: P.spacing }, null),
|
|
2029
2048
|
r("span", { class: P["caption-inner"] }, [r(T, null, { default: () => [e.caption] })]),
|
|
2030
2049
|
r("span", { class: P.spacing }, null)
|
|
@@ -2066,11 +2085,11 @@ var lr = /* @__PURE__ */ i({
|
|
|
2066
2085
|
return () => {
|
|
2067
2086
|
let { class: o, style: s, ...l } = t, u = i === "head", d = !u && !e.isHeader && e.columnIndex === 0 && a.value, f = u || e.isHeader || d, p = e.scope ?? (u ? "col" : d ? "row" : void 0), m = e.text == null ? n.default?.() : e.text;
|
|
2068
2087
|
return f ? r("th", c({
|
|
2069
|
-
class:
|
|
2088
|
+
class: b(Dr["elm-table-cell"], Dr.th, o),
|
|
2070
2089
|
style: s,
|
|
2071
2090
|
scope: p
|
|
2072
2091
|
}, l), [m]) : r("td", c({
|
|
2073
|
-
class:
|
|
2092
|
+
class: b(Dr["elm-table-cell"], Dr.td, o),
|
|
2074
2093
|
style: s
|
|
2075
2094
|
}, l), [m]);
|
|
2076
2095
|
};
|
|
@@ -2078,12 +2097,12 @@ var lr = /* @__PURE__ */ i({
|
|
|
2078
2097
|
}), kr = { "elm-table-header": "_elm-table-header_jhft7_1" }, Ar = /* @__PURE__ */ i({
|
|
2079
2098
|
name: "ElmTableHeader",
|
|
2080
2099
|
setup(e, { slots: t }) {
|
|
2081
|
-
return p(wr, "head"), () => r("thead", { class:
|
|
2100
|
+
return p(wr, "head"), () => r("thead", { class: b(kr["elm-table-header"]) }, [t.default?.()]);
|
|
2082
2101
|
}
|
|
2083
2102
|
}), jr = { "elm-table-row": "_elm-table-row_mkm0q_1" }, Mr = /* @__PURE__ */ i({
|
|
2084
2103
|
name: "ElmTableRow",
|
|
2085
2104
|
setup(e, { slots: t }) {
|
|
2086
|
-
return () => r("tr", { class:
|
|
2105
|
+
return () => r("tr", { class: b(jr["elm-table-row"]) }, [t.default?.()]);
|
|
2087
2106
|
}
|
|
2088
2107
|
}), Nr = {
|
|
2089
2108
|
"elm-unsupported-block": "_elm-unsupported-block_8bkk1_1",
|
|
@@ -2100,7 +2119,7 @@ var lr = /* @__PURE__ */ i({
|
|
|
2100
2119
|
setup(e, { attrs: t }) {
|
|
2101
2120
|
return () => {
|
|
2102
2121
|
let { class: i, ...a } = t;
|
|
2103
|
-
return r("div", c({ class:
|
|
2122
|
+
return r("div", c({ class: b(Nr["elm-unsupported-block"], i) }, a), [r("div", { class: Nr.message }, [r("svg", {
|
|
2104
2123
|
viewBox: "0 0 24 24",
|
|
2105
2124
|
width: "1.25rem",
|
|
2106
2125
|
height: "1.25rem",
|
|
@@ -2126,7 +2145,7 @@ var Ir = {
|
|
|
2126
2145
|
gap: "0.25rem",
|
|
2127
2146
|
justifyContent: "space-around",
|
|
2128
2147
|
overflowX: "auto"
|
|
2129
|
-
}, Lr = Cn.extend(D(
|
|
2148
|
+
}, Lr = Cn.extend(D(Ft, ({ props: e, resolve: t }) => {
|
|
2130
2149
|
let n = t(e.text), i = e.decoration ?? [];
|
|
2131
2150
|
return i.includes("katex") ? r(Fn, {
|
|
2132
2151
|
expression: n,
|
|
@@ -2140,16 +2159,16 @@ var Ir = {
|
|
|
2140
2159
|
color: e.color,
|
|
2141
2160
|
ruby: e.ruby
|
|
2142
2161
|
}, F(n) ? n : { default: () => [n] });
|
|
2143
|
-
}), D(
|
|
2162
|
+
}), D(kt, ({ props: e, resolve: t }) => {
|
|
2144
2163
|
let n;
|
|
2145
2164
|
return r(T, {
|
|
2146
2165
|
href: e.href,
|
|
2147
2166
|
favicon: e.favicon
|
|
2148
2167
|
}, F(n = t(e.text)) ? n : { default: () => [n] });
|
|
2149
|
-
}), D(
|
|
2168
|
+
}), D(Et, ({ props: e, resolve: t }) => r(w, {
|
|
2150
2169
|
src: t(e.src),
|
|
2151
2170
|
alt: e.alt
|
|
2152
|
-
}, null)), D(
|
|
2171
|
+
}, null)), D(vt, ({ props: e, childRefs: t, renderChild: n }) => r("div", { style: {
|
|
2153
2172
|
display: "flex",
|
|
2154
2173
|
flexDirection: "column",
|
|
2155
2174
|
justifyContent: _n[e.justify ?? "start"],
|
|
@@ -2158,50 +2177,50 @@ var Ir = {
|
|
|
2158
2177
|
boxSizing: "border-box",
|
|
2159
2178
|
padding: "0.125rem",
|
|
2160
2179
|
gap: "var(--elmethis-stack-gap)"
|
|
2161
|
-
} }, [t(e.children).map(({ id: e, path: t }, i) => r("span", { key: `${e}:${i}` }, [n(e, t, i)]))])), D(
|
|
2180
|
+
} }, [t(e.children).map(({ id: e, path: t }, i) => r("span", { key: `${e}:${i}` }, [n(e, t, i)]))])), D(yt, ({ props: t, childRefs: n, renderChild: i }) => r("div", { style: Ir }, [n(t.children).map(({ id: t, path: n }, a) => r(e, { key: `${t}:${a}` }, [i(t, n, a)]))])), D(wt, ({ props: t, childRefs: n, renderChild: i }) => {
|
|
2162
2181
|
let a;
|
|
2163
2182
|
return r(sn, { level: t.level }, F(a = n(t.children).map(({ id: t, path: n }, a) => r(e, { key: `${t}:${a}` }, [i(t, n, a)]))) ? a : { default: () => [a] });
|
|
2164
|
-
}), D(
|
|
2183
|
+
}), D(Pt, ({ props: e, childRefs: t, renderChild: n }) => {
|
|
2165
2184
|
let i;
|
|
2166
2185
|
return r(dn, {
|
|
2167
2186
|
color: e.color,
|
|
2168
2187
|
backgroundColor: e.backgroundColor
|
|
2169
2188
|
}, F(i = t(e.children).map(({ id: e, path: t }, i) => r("span", { key: `${e}:${i}` }, [n(e, t, i)]))) ? i : { default: () => [i] });
|
|
2170
|
-
}), D(
|
|
2189
|
+
}), D(At, ({ props: e, childRefs: t, renderChild: n }) => {
|
|
2171
2190
|
let i;
|
|
2172
2191
|
return r(Sr, { listStyle: e.style ?? "unordered" }, F(i = t(e.children).map(({ id: e, path: t }, i) => r("li", { key: `${e}:${i}` }, [n(e, t, i)]))) ? i : { default: () => [i] });
|
|
2173
|
-
}), D(
|
|
2192
|
+
}), D(jt, ({ props: t, childRefs: n, renderChild: i }) => r(e, null, [n(t.children).map(({ id: t, path: n }, a) => r(e, { key: `${t}:${a}` }, [i(t, n, a)]))])), D(mt, ({ props: t, childRefs: n, renderChild: i }) => {
|
|
2174
2193
|
let a;
|
|
2175
|
-
return r(
|
|
2176
|
-
}), D(
|
|
2194
|
+
return r(pr, { cite: t.cite }, F(a = n(t.children).map(({ id: t, path: n }, a) => r(e, { key: `${t}:${a}` }, [i(t, n, a)]))) ? a : { default: () => [a] });
|
|
2195
|
+
}), D(gt, ({ props: t, childRefs: n, renderChild: i }) => {
|
|
2177
2196
|
let a;
|
|
2178
|
-
return r(
|
|
2179
|
-
}), D(
|
|
2197
|
+
return r(gr, { type: t.type }, F(a = n(t.children).map(({ id: t, path: n }, a) => r(e, { key: `${t}:${a}` }, [i(t, n, a)]))) ? a : { default: () => [a] });
|
|
2198
|
+
}), D(Nt, ({ props: t, childRefs: n, renderChild: i }) => {
|
|
2180
2199
|
let a;
|
|
2181
2200
|
return r(vr, {
|
|
2182
2201
|
icon: t.icon,
|
|
2183
2202
|
color: t.color,
|
|
2184
2203
|
variant: t.variant
|
|
2185
2204
|
}, F(a = n(t.children).map(({ id: t, path: n }, a) => r(e, { key: `${t}:${a}` }, [i(t, n, a)]))) ? a : { default: () => [a] });
|
|
2186
|
-
}), D(
|
|
2205
|
+
}), D(St, () => r(br, null, null)), D(zt, ({ props: t, childRefs: n, renderChild: i }) => r(fr, null, {
|
|
2187
2206
|
summary: () => n(t.summary).map(({ id: e, path: t }, n) => r("span", { key: `${e}:${n}` }, [i(e, t, n)])),
|
|
2188
2207
|
default: () => n(t.children).map(({ id: t, path: n }, a) => r(e, { key: `${t}:${a}` }, [i(t, n, a)]))
|
|
2189
|
-
})), D(
|
|
2208
|
+
})), D(ht, ({ props: e, resolve: t }) => r(dr, {
|
|
2190
2209
|
url: t(e.url),
|
|
2191
2210
|
title: e.title ? t(e.title) : void 0,
|
|
2192
2211
|
description: e.description ? t(e.description) : void 0,
|
|
2193
2212
|
image: e.image ? t(e.image) : void 0
|
|
2194
|
-
}, null)), D(
|
|
2213
|
+
}, null)), D(Ct, ({ props: e, resolve: t }) => r(lr, {
|
|
2195
2214
|
src: t(e.src),
|
|
2196
2215
|
name: e.name ? t(e.name) : void 0
|
|
2197
|
-
}, null)), D(
|
|
2216
|
+
}, null)), D(ft, ({ props: e, resolve: t }) => r(er, {
|
|
2198
2217
|
src: t(e.src),
|
|
2199
2218
|
title: e.title ? t(e.title) : void 0,
|
|
2200
2219
|
artist: e.artist ? t(e.artist) : void 0,
|
|
2201
2220
|
seekStep: e.seekStep,
|
|
2202
2221
|
loop: e.loop,
|
|
2203
2222
|
autoplay: e.autoPlay
|
|
2204
|
-
}, null)), D(
|
|
2223
|
+
}, null)), D(Vt, ({ props: e, resolve: t }) => {
|
|
2205
2224
|
let n = e.caption ? t(e.caption) : void 0;
|
|
2206
2225
|
return r("figure", { style: { margin: 0 } }, [r("video", {
|
|
2207
2226
|
src: t(e.src),
|
|
@@ -2218,7 +2237,7 @@ var Ir = {
|
|
|
2218
2237
|
height: "auto"
|
|
2219
2238
|
}
|
|
2220
2239
|
}, null), n ? r("figcaption", null, [n]) : null]);
|
|
2221
|
-
}), D(
|
|
2240
|
+
}), D(pt, ({ props: e, resolve: t }) => r(or, {
|
|
2222
2241
|
src: t(e.src),
|
|
2223
2242
|
alt: e.alt ? t(e.alt) : void 0,
|
|
2224
2243
|
width: e.width,
|
|
@@ -2227,20 +2246,22 @@ var Ir = {
|
|
|
2227
2246
|
sizes: e.sizes ? t(e.sizes) : void 0,
|
|
2228
2247
|
caption: e.caption ? t(e.caption) : void 0,
|
|
2229
2248
|
enableModal: !0
|
|
2230
|
-
}, null)), D(
|
|
2231
|
-
html: t(e.html),
|
|
2232
|
-
|
|
2233
|
-
|
|
2249
|
+
}, null)), D(Tt, ({ props: e, resolve: t }) => r(Zn, {
|
|
2250
|
+
html: e.html ? t(e.html) : void 0,
|
|
2251
|
+
src: e.src ? t(e.src) : void 0,
|
|
2252
|
+
autoHeight: e.autoHeight,
|
|
2253
|
+
allowScripts: e.allowScripts
|
|
2254
|
+
}, null)), D(_t, ({ props: e, resolve: t }) => r(Kn, {
|
|
2234
2255
|
code: t(e.code),
|
|
2235
2256
|
language: e.language ? t(e.language) : void 0,
|
|
2236
2257
|
caption: e.caption ? t(e.caption) : void 0
|
|
2237
|
-
}, null)), D(
|
|
2258
|
+
}, null)), D(Dt, ({ props: e, resolve: t }) => r(Fn, {
|
|
2238
2259
|
expression: t(e.expression),
|
|
2239
2260
|
block: !0
|
|
2240
|
-
}, null)), D(
|
|
2261
|
+
}, null)), D(Mt, ({ props: e, resolve: t }) => r(Kn, {
|
|
2241
2262
|
code: t(e.code),
|
|
2242
2263
|
language: "mermaid"
|
|
2243
|
-
}, null)), D(
|
|
2264
|
+
}, null)), D(bt, () => null), D(xt, ({ props: t, surface: n, renderChild: i }) => {
|
|
2244
2265
|
let a, o = (Array.isArray(t.children) ? t.children : []).map((e) => {
|
|
2245
2266
|
let t = n.componentsModel.get(e);
|
|
2246
2267
|
return {
|
|
@@ -2262,28 +2283,28 @@ var Ir = {
|
|
|
2262
2283
|
value: String(a)
|
|
2263
2284
|
}, F(o = n.map((t, n) => r(e, { key: `${t}:${n}` }, [i(t, "/", n)]))) ? o : { default: () => [o] });
|
|
2264
2285
|
})] });
|
|
2265
|
-
}), D(
|
|
2286
|
+
}), D(It, ({ props: t, childRefs: n, renderChild: i }) => {
|
|
2266
2287
|
let a, o;
|
|
2267
2288
|
return r(Tr, {
|
|
2268
2289
|
caption: t.caption ? String(t.caption) : void 0,
|
|
2269
2290
|
hasRowHeader: t.hasRowHeader
|
|
2270
2291
|
}, { default: () => [t.header && t.header.length > 0 && r(Ar, null, F(a = n(t.header).map(({ id: t, path: n }, a) => r(e, { key: `${t}:${a}` }, [i(t, n, a)]))) ? a : { default: () => [a] }), r(Er, null, F(o = n(t.body).map(({ id: t, path: n }, a) => r(e, { key: `${t}:${a}` }, [i(t, n, a)]))) ? o : { default: () => [o] })] });
|
|
2271
|
-
}), D(
|
|
2292
|
+
}), D(Rt, ({ props: t, childRefs: n, renderChild: i }) => {
|
|
2272
2293
|
let a;
|
|
2273
2294
|
return r(Mr, null, F(a = n(t.children).map(({ id: t, path: n }, a) => r(e, { key: `${t}:${a}` }, [i(t, n, a)]))) ? a : { default: () => [a] });
|
|
2274
|
-
}), D(
|
|
2295
|
+
}), D(Lt, ({ props: e, index: t, childRefs: n, renderChild: i }) => {
|
|
2275
2296
|
let a;
|
|
2276
2297
|
return r(Or, {
|
|
2277
2298
|
isHeader: e.isHeader,
|
|
2278
2299
|
columnIndex: t
|
|
2279
2300
|
}, F(a = n(e.children).map(({ id: e, path: t }, n) => r("span", { key: `${e}:${n}` }, [i(e, t, n)]))) ? a : { default: () => [a] });
|
|
2280
|
-
}), D(
|
|
2301
|
+
}), D(Bt, ({ props: e }) => r(Pr, { details: e.details ? `Unsupported component type: ${String(e.details)}` : "Unsupported component type" }, null))), Rr = {
|
|
2281
2302
|
"elm-html-viewer": "_elm-html-viewer_jde0x_1",
|
|
2282
2303
|
header: "_header_jde0x_15",
|
|
2283
2304
|
"icon-button": "_icon-button_jde0x_23",
|
|
2284
2305
|
divider: "_divider_jde0x_49",
|
|
2285
2306
|
content: "_content_jde0x_57"
|
|
2286
|
-
},
|
|
2307
|
+
}, zr = /* @__PURE__ */ i({
|
|
2287
2308
|
name: "ElmHtmlViewer",
|
|
2288
2309
|
props: {
|
|
2289
2310
|
html: {
|
|
@@ -2335,36 +2356,36 @@ var Ir = {
|
|
|
2335
2356
|
n?.remove(), t && URL.revokeObjectURL(t);
|
|
2336
2357
|
}
|
|
2337
2358
|
};
|
|
2338
|
-
return () => r("figure", { class:
|
|
2339
|
-
r("div", { class:
|
|
2359
|
+
return () => r("figure", { class: b(Rr["elm-html-viewer"]) }, [
|
|
2360
|
+
r("div", { class: Rr.header }, [r("button", {
|
|
2340
2361
|
type: "button",
|
|
2341
|
-
class:
|
|
2362
|
+
class: Rr["icon-button"],
|
|
2342
2363
|
onClick: n,
|
|
2343
2364
|
"aria-label": "Download"
|
|
2344
2365
|
}, [r(O, {
|
|
2345
|
-
d:
|
|
2366
|
+
d: Ie,
|
|
2346
2367
|
size: "1.25rem"
|
|
2347
2368
|
}, null)]), r("button", {
|
|
2348
2369
|
type: "button",
|
|
2349
|
-
class:
|
|
2370
|
+
class: Rr["icon-button"],
|
|
2350
2371
|
onClick: t,
|
|
2351
2372
|
"aria-label": "Open in new tab"
|
|
2352
2373
|
}, [r(O, {
|
|
2353
|
-
d:
|
|
2374
|
+
d: $e,
|
|
2354
2375
|
size: "1.25rem"
|
|
2355
2376
|
}, null)])]),
|
|
2356
|
-
r("hr", { class:
|
|
2357
|
-
r("div", { class:
|
|
2377
|
+
r("hr", { class: Rr.divider }, null),
|
|
2378
|
+
r("div", { class: Rr.content }, [r(Zn, {
|
|
2358
2379
|
html: e.html,
|
|
2359
2380
|
sandbox: e.sandbox,
|
|
2360
2381
|
autoHeight: e.autoHeight
|
|
2361
2382
|
}, null)])
|
|
2362
2383
|
]);
|
|
2363
2384
|
}
|
|
2364
|
-
}),
|
|
2385
|
+
}), Br = {
|
|
2365
2386
|
"parallax-watcher": "_parallax-watcher_z693a_1",
|
|
2366
2387
|
parallax: "_parallax_z693a_1"
|
|
2367
|
-
},
|
|
2388
|
+
}, Vr = /* @__PURE__ */ i({
|
|
2368
2389
|
name: "ElmParallax",
|
|
2369
2390
|
props: { images: {
|
|
2370
2391
|
type: Array,
|
|
@@ -2374,9 +2395,9 @@ var Ir = {
|
|
|
2374
2395
|
let t = m(0), n = () => {
|
|
2375
2396
|
t.value = window.scrollY;
|
|
2376
2397
|
};
|
|
2377
|
-
return d(() => window.addEventListener("scroll", n)), u(() => window.removeEventListener("scroll", n)), () => r("div", null, [r("div", { class:
|
|
2398
|
+
return d(() => window.addEventListener("scroll", n)), u(() => window.removeEventListener("scroll", n)), () => r("div", null, [r("div", { class: Br["parallax-watcher"] }, null), e.images.map((e, n) => r("div", {
|
|
2378
2399
|
key: n,
|
|
2379
|
-
class:
|
|
2400
|
+
class: Br.parallax,
|
|
2380
2401
|
style: {
|
|
2381
2402
|
backgroundImage: `url(${e})`,
|
|
2382
2403
|
transform: `scale(1.2) translateY(${t.value / (1e3 * (n + 1))}%)`,
|
|
@@ -2384,11 +2405,11 @@ var Ir = {
|
|
|
2384
2405
|
}
|
|
2385
2406
|
}, null))]);
|
|
2386
2407
|
}
|
|
2387
|
-
}),
|
|
2408
|
+
}), Hr = {
|
|
2388
2409
|
"elm-tooltip": "_elm-tooltip_1b13f_1",
|
|
2389
2410
|
tooltip: "_tooltip_1b13f_5",
|
|
2390
2411
|
show: "_show_1b13f_18"
|
|
2391
|
-
},
|
|
2412
|
+
}, Ur = /* @__PURE__ */ i({
|
|
2392
2413
|
name: "ElmTooltip",
|
|
2393
2414
|
setup(e, { slots: t }) {
|
|
2394
2415
|
let n = m(null), i = m(!1), a = !1, o, s = m({}), c = () => {
|
|
@@ -2410,19 +2431,19 @@ var Ir = {
|
|
|
2410
2431
|
};
|
|
2411
2432
|
return () => r("span", {
|
|
2412
2433
|
ref: n,
|
|
2413
|
-
class:
|
|
2434
|
+
class: b(Hr["elm-tooltip"]),
|
|
2414
2435
|
onMouseover: c,
|
|
2415
2436
|
onMouseleave: l
|
|
2416
2437
|
}, [t.original?.(), r("div", {
|
|
2417
|
-
class:
|
|
2438
|
+
class: b(Hr.tooltip, i.value && Hr.show),
|
|
2418
2439
|
style: s.value
|
|
2419
2440
|
}, [t.tooltip?.()])]);
|
|
2420
2441
|
}
|
|
2421
|
-
}),
|
|
2442
|
+
}), Wr = { "elm-block-fallback": "_elm-block-fallback_1sx02_1" }, Gr = {
|
|
2422
2443
|
"elm-dot-loading-icon": "_elm-dot-loading-icon_qjgj2_15",
|
|
2423
2444
|
dot: "_dot_qjgj2_25",
|
|
2424
2445
|
bounce: "_bounce_qjgj2_1"
|
|
2425
|
-
},
|
|
2446
|
+
}, Kr = /* @__PURE__ */ i({
|
|
2426
2447
|
name: "ElmDotLoadingIcon",
|
|
2427
2448
|
inheritAttrs: !1,
|
|
2428
2449
|
props: { size: {
|
|
@@ -2433,25 +2454,25 @@ var Ir = {
|
|
|
2433
2454
|
return () => {
|
|
2434
2455
|
let { class: n, style: i, ...a } = t;
|
|
2435
2456
|
return r("span", c({
|
|
2436
|
-
class:
|
|
2457
|
+
class: b(Gr["elm-dot-loading-icon"], n),
|
|
2437
2458
|
style: [{ "--elmethis-scoped-size": e.size }, i]
|
|
2438
2459
|
}, a), [
|
|
2439
2460
|
r("span", {
|
|
2440
|
-
class:
|
|
2461
|
+
class: Gr.dot,
|
|
2441
2462
|
"aria-hidden": "true"
|
|
2442
2463
|
}, null),
|
|
2443
2464
|
r("span", {
|
|
2444
|
-
class:
|
|
2465
|
+
class: Gr.dot,
|
|
2445
2466
|
"aria-hidden": "true"
|
|
2446
2467
|
}, null),
|
|
2447
2468
|
r("span", {
|
|
2448
|
-
class:
|
|
2469
|
+
class: Gr.dot,
|
|
2449
2470
|
"aria-hidden": "true"
|
|
2450
2471
|
}, null)
|
|
2451
2472
|
]);
|
|
2452
2473
|
};
|
|
2453
2474
|
}
|
|
2454
|
-
}),
|
|
2475
|
+
}), qr = /* @__PURE__ */ i({
|
|
2455
2476
|
name: "ElmBlockFallback",
|
|
2456
2477
|
props: { height: {
|
|
2457
2478
|
type: String,
|
|
@@ -2459,11 +2480,11 @@ var Ir = {
|
|
|
2459
2480
|
} },
|
|
2460
2481
|
setup(e) {
|
|
2461
2482
|
return () => r("div", {
|
|
2462
|
-
class:
|
|
2483
|
+
class: b(Wr["elm-block-fallback"]),
|
|
2463
2484
|
style: { "--elmethis-scoped-height": e.height }
|
|
2464
|
-
}, [r(
|
|
2485
|
+
}, [r(Kr, null, null), r(nr, null, null)]);
|
|
2465
2486
|
}
|
|
2466
|
-
}),
|
|
2487
|
+
}), I = {
|
|
2467
2488
|
"elm-button": "_elm-button_9qh0y_1",
|
|
2468
2489
|
normal: "_normal_9qh0y_22",
|
|
2469
2490
|
primary: "_primary_9qh0y_29",
|
|
@@ -2472,7 +2493,7 @@ var Ir = {
|
|
|
2472
2493
|
flex: "_flex_9qh0y_59",
|
|
2473
2494
|
ripple: "_ripple_9qh0y_83",
|
|
2474
2495
|
"button-ripple": "_button-ripple_9qh0y_1"
|
|
2475
|
-
},
|
|
2496
|
+
}, Jr = /* @__PURE__ */ i({
|
|
2476
2497
|
name: "ElmButton",
|
|
2477
2498
|
inheritAttrs: !1,
|
|
2478
2499
|
props: {
|
|
@@ -2506,7 +2527,7 @@ var Ir = {
|
|
|
2506
2527
|
!e.isLoading && !e.disabled && typeof l == "function" && (i.value = !0, clearTimeout(a), a = setTimeout(() => i.value = !1, 300), l(t));
|
|
2507
2528
|
},
|
|
2508
2529
|
disabled: e.disabled,
|
|
2509
|
-
class:
|
|
2530
|
+
class: b(I["elm-button"], !e.isLoading && !e.disabled && I.enable, e.color && I.colored, !e.color && !e.primary && I.normal, !e.color && e.primary && I.primary, o),
|
|
2510
2531
|
style: [{
|
|
2511
2532
|
display: e.block ? "flex" : "inline-flex",
|
|
2512
2533
|
width: e.block ? "100%" : "auto",
|
|
@@ -2514,10 +2535,10 @@ var Ir = {
|
|
|
2514
2535
|
"--elmethis-scoped-opacity": e.disabled || e.isLoading ? .6 : void 0,
|
|
2515
2536
|
"--elmethis-scoped-color": e.color
|
|
2516
2537
|
}, s]
|
|
2517
|
-
}, u), [i.value && r("span", { class:
|
|
2538
|
+
}, u), [i.value && r("span", { class: I.ripple }, null), e.isLoading ? r(Kr, { size: "1.5rem" }, null) : r("span", { class: I.flex }, [n.default?.()])]);
|
|
2518
2539
|
};
|
|
2519
2540
|
}
|
|
2520
|
-
}),
|
|
2541
|
+
}), L = {
|
|
2521
2542
|
"elm-button-dropdown": "_elm-button-dropdown_hhp3p_1",
|
|
2522
2543
|
block: "_block_hhp3p_7",
|
|
2523
2544
|
main: "_main_hhp3p_11",
|
|
@@ -2530,10 +2551,10 @@ var Ir = {
|
|
|
2530
2551
|
};
|
|
2531
2552
|
//#endregion
|
|
2532
2553
|
//#region src/components/form/elm-button-dropdown.tsx
|
|
2533
|
-
function
|
|
2554
|
+
function Yr(e) {
|
|
2534
2555
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !s(e);
|
|
2535
2556
|
}
|
|
2536
|
-
var
|
|
2557
|
+
var Xr = /* @__PURE__ */ i({
|
|
2537
2558
|
name: "ElmButtonDropdown",
|
|
2538
2559
|
props: {
|
|
2539
2560
|
label: {
|
|
@@ -2586,7 +2607,7 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2586
2607
|
},
|
|
2587
2608
|
dropdownIcon: {
|
|
2588
2609
|
type: String,
|
|
2589
|
-
default:
|
|
2610
|
+
default: Xe
|
|
2590
2611
|
}
|
|
2591
2612
|
},
|
|
2592
2613
|
emits: [
|
|
@@ -2596,7 +2617,7 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2596
2617
|
"openChange"
|
|
2597
2618
|
],
|
|
2598
2619
|
setup(t, { emit: n, slots: i }) {
|
|
2599
|
-
let a =
|
|
2620
|
+
let a = Ce(t, "selectedOptionId", n, {
|
|
2600
2621
|
passive: !0,
|
|
2601
2622
|
defaultValue: t.defaultSelectedOptionId ?? null
|
|
2602
2623
|
}), o = m(!1), s = m(null), c = (e) => {
|
|
@@ -2606,14 +2627,14 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2606
2627
|
};
|
|
2607
2628
|
return d(() => document.addEventListener("click", l)), u(() => document.removeEventListener("click", l)), () => {
|
|
2608
2629
|
let l, u = t.items.find((e) => e.id === a.value) ?? null, d = t.disabled || t.disableDropdown || t.isLoading, f = t.disabled || t.disableMainButton, p = {
|
|
2609
|
-
class:
|
|
2630
|
+
class: b(L.main, L.segment),
|
|
2610
2631
|
primary: t.primary,
|
|
2611
2632
|
color: t.color,
|
|
2612
2633
|
isLoading: t.isLoading,
|
|
2613
2634
|
disabled: f,
|
|
2614
2635
|
onClick: () => n("click", u)
|
|
2615
2636
|
}, m = {
|
|
2616
|
-
class:
|
|
2637
|
+
class: b(L.caret, L.segment),
|
|
2617
2638
|
primary: t.primary,
|
|
2618
2639
|
color: t.color,
|
|
2619
2640
|
disabled: d,
|
|
@@ -2623,26 +2644,26 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2623
2644
|
};
|
|
2624
2645
|
return r("div", {
|
|
2625
2646
|
ref: s,
|
|
2626
|
-
class:
|
|
2647
|
+
class: b(L["elm-button-dropdown"], t.block && L.block)
|
|
2627
2648
|
}, [
|
|
2628
|
-
r(
|
|
2629
|
-
r(
|
|
2649
|
+
r(Jr, p, { default: () => [u ? r(e, null, [u.icon && r(w, { src: u.icon }, null), u.label]) : r(e, null, [i.icon?.(), t.label])] }),
|
|
2650
|
+
r(Jr, m, { default: () => [r(O, {
|
|
2630
2651
|
d: t.dropdownIcon,
|
|
2631
2652
|
size: "1.25rem"
|
|
2632
2653
|
}, null)] }),
|
|
2633
2654
|
r(Jt, {
|
|
2634
2655
|
isOpen: o.value,
|
|
2635
|
-
class:
|
|
2636
|
-
},
|
|
2656
|
+
class: L.menu
|
|
2657
|
+
}, Yr(l = t.items.map((e) => r("div", {
|
|
2637
2658
|
key: e.id,
|
|
2638
|
-
class:
|
|
2659
|
+
class: b(L.item, C.text, e.id === a.value && L.selected, e.disabled && L["item-disabled"]),
|
|
2639
2660
|
"aria-selected": e.id === a.value,
|
|
2640
2661
|
onClick: (r) => {
|
|
2641
2662
|
r.stopPropagation(), !e.disabled && (a.value = e.id, e.onClick?.(), n("itemClick", e), t.autoClose && c(!1));
|
|
2642
2663
|
}
|
|
2643
2664
|
}, [
|
|
2644
2665
|
r(O, {
|
|
2645
|
-
d:
|
|
2666
|
+
d: Me,
|
|
2646
2667
|
color: "var(--elmethis-color-primary-weak)",
|
|
2647
2668
|
size: "0.75em"
|
|
2648
2669
|
}, null),
|
|
@@ -2652,7 +2673,7 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2652
2673
|
]);
|
|
2653
2674
|
};
|
|
2654
2675
|
}
|
|
2655
|
-
}),
|
|
2676
|
+
}), R = {
|
|
2656
2677
|
"elm-checkbox": "_elm-checkbox_18dfs_1",
|
|
2657
2678
|
disabled: "_disabled_18dfs_12",
|
|
2658
2679
|
checkbox: "_checkbox_18dfs_22",
|
|
@@ -2662,7 +2683,7 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2662
2683
|
"loading-dot": "_loading-dot_18dfs_39",
|
|
2663
2684
|
"check-line": "_check-line_18dfs_54",
|
|
2664
2685
|
"elmethis-checkbox-check-line": "_elmethis-checkbox-check-line_18dfs_1"
|
|
2665
|
-
},
|
|
2686
|
+
}, Zr = /* @__PURE__ */ i({
|
|
2666
2687
|
name: "ElmCheckbox",
|
|
2667
2688
|
inheritAttrs: !1,
|
|
2668
2689
|
props: {
|
|
@@ -2698,7 +2719,7 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2698
2719
|
return () => {
|
|
2699
2720
|
let { class: n, ...a } = t;
|
|
2700
2721
|
return r("div", c({
|
|
2701
|
-
class:
|
|
2722
|
+
class: b(R["elm-checkbox"], e.disabled && R.disabled, n),
|
|
2702
2723
|
onClick: () => {
|
|
2703
2724
|
!e.isLoading && !e.disabled && (i.value = !i.value);
|
|
2704
2725
|
}
|
|
@@ -2709,13 +2730,13 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2709
2730
|
} }, [r("svg", {
|
|
2710
2731
|
width: "24",
|
|
2711
2732
|
height: "24",
|
|
2712
|
-
class:
|
|
2733
|
+
class: R.checkbox
|
|
2713
2734
|
}, [
|
|
2714
2735
|
r("circle", {
|
|
2715
2736
|
cx: "0",
|
|
2716
2737
|
cy: "0",
|
|
2717
2738
|
r: "2",
|
|
2718
|
-
class:
|
|
2739
|
+
class: R["loading-dot"],
|
|
2719
2740
|
style: { opacity: +!!e.isLoading }
|
|
2720
2741
|
}, [r("animate", {
|
|
2721
2742
|
attributeName: "cx",
|
|
@@ -2736,7 +2757,7 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2736
2757
|
cx: "20",
|
|
2737
2758
|
cy: "20",
|
|
2738
2759
|
r: "2",
|
|
2739
|
-
class:
|
|
2760
|
+
class: R["loading-dot"],
|
|
2740
2761
|
style: { opacity: +!!e.isLoading }
|
|
2741
2762
|
}, [r("animate", {
|
|
2742
2763
|
attributeName: "cx",
|
|
@@ -2758,11 +2779,11 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2758
2779
|
y: "4",
|
|
2759
2780
|
width: "16",
|
|
2760
2781
|
height: "16",
|
|
2761
|
-
class:
|
|
2782
|
+
class: b(R.rect, i.value && R.checked, e.isLoading && R.loading),
|
|
2762
2783
|
"stroke-width": "0.8"
|
|
2763
2784
|
}, null),
|
|
2764
2785
|
i.value && r("polyline", {
|
|
2765
|
-
class:
|
|
2786
|
+
class: R["check-line"],
|
|
2766
2787
|
points: "5,12 10,17 19,8",
|
|
2767
2788
|
"stroke-width": "1.5",
|
|
2768
2789
|
fill: "transparent"
|
|
@@ -2826,7 +2847,7 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2826
2847
|
]), r(T, null, { default: () => [e.label] })])]);
|
|
2827
2848
|
};
|
|
2828
2849
|
}
|
|
2829
|
-
}),
|
|
2850
|
+
}), z = {
|
|
2830
2851
|
"elm-select": "_elm-select_1u7w1_1",
|
|
2831
2852
|
disabled: "_disabled_1u7w1_23",
|
|
2832
2853
|
active: "_active_1u7w1_27",
|
|
@@ -2841,10 +2862,10 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2841
2862
|
};
|
|
2842
2863
|
//#endregion
|
|
2843
2864
|
//#region src/components/form/elm-select.tsx
|
|
2844
|
-
function
|
|
2865
|
+
function Qr(e) {
|
|
2845
2866
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !s(e);
|
|
2846
2867
|
}
|
|
2847
|
-
var
|
|
2868
|
+
var $r = /* @__PURE__ */ i({
|
|
2848
2869
|
name: "ElmSelect",
|
|
2849
2870
|
props: {
|
|
2850
2871
|
label: {
|
|
@@ -2878,7 +2899,7 @@ var Qr = /* @__PURE__ */ i({
|
|
|
2878
2899
|
},
|
|
2879
2900
|
emits: ["update:selectedOptionId"],
|
|
2880
2901
|
setup(e, { emit: t, slots: n }) {
|
|
2881
|
-
let i =
|
|
2902
|
+
let i = Ce(e, "selectedOptionId", t, {
|
|
2882
2903
|
passive: !0,
|
|
2883
2904
|
defaultValue: e.defaultSelectedOptionId ?? null
|
|
2884
2905
|
}), a = m(!1), o = m(null), s = (e) => {
|
|
@@ -2892,29 +2913,29 @@ var Qr = /* @__PURE__ */ i({
|
|
|
2892
2913
|
let t, s = e.options.find((e) => e.id === i.value) ?? null;
|
|
2893
2914
|
return r("div", {
|
|
2894
2915
|
ref: o,
|
|
2895
|
-
class:
|
|
2916
|
+
class: b(z["elm-select"], a.value && z.active, (e.disabled || e.isLoading) && z.disabled),
|
|
2896
2917
|
onClick: c
|
|
2897
|
-
}, [r("span", { class:
|
|
2898
|
-
d:
|
|
2918
|
+
}, [r("span", { class: b(z.label, a.value && z["label-active"]) }, [n.icon?.() ?? r(O, {
|
|
2919
|
+
d: ke,
|
|
2899
2920
|
size: "0.75rem"
|
|
2900
|
-
}, null), e.label]), r("div", { class:
|
|
2901
|
-
r("div", { class:
|
|
2921
|
+
}, null), e.label]), r("div", { class: z.body }, [
|
|
2922
|
+
r("div", { class: b(z["selected-option"], C.text) }, [s ? r("div", { class: z["option-content"] }, [s.icon && r(w, { src: s.icon }, null), r(T, null, { default: () => [s.label] })]) : r("div", { class: z.fallback }, [r("span", null, [e.placeholder ?? "Select an option"])])]),
|
|
2902
2923
|
r(O, {
|
|
2903
|
-
d:
|
|
2924
|
+
d: Xe,
|
|
2904
2925
|
size: "1.5rem"
|
|
2905
2926
|
}, null),
|
|
2906
2927
|
r(Jt, {
|
|
2907
2928
|
isOpen: a.value,
|
|
2908
|
-
class:
|
|
2909
|
-
},
|
|
2929
|
+
class: z.pulldown
|
|
2930
|
+
}, Qr(t = e.options.map((e) => r("div", {
|
|
2910
2931
|
key: e.id,
|
|
2911
|
-
class:
|
|
2932
|
+
class: b(z.option, C.text),
|
|
2912
2933
|
onClick: (t) => {
|
|
2913
2934
|
t.stopPropagation(), i.value = e.id, a.value = !1;
|
|
2914
2935
|
}
|
|
2915
2936
|
}, [
|
|
2916
2937
|
r(O, {
|
|
2917
|
-
d:
|
|
2938
|
+
d: Me,
|
|
2918
2939
|
color: "var(--elmethis-color-primary-weak)",
|
|
2919
2940
|
size: "0.75em"
|
|
2920
2941
|
}, null),
|
|
@@ -2924,7 +2945,7 @@ var Qr = /* @__PURE__ */ i({
|
|
|
2924
2945
|
])]);
|
|
2925
2946
|
};
|
|
2926
2947
|
}
|
|
2927
|
-
}),
|
|
2948
|
+
}), B = {
|
|
2928
2949
|
"elm-slider": "_elm-slider_1cmd9_1",
|
|
2929
2950
|
vertical: "_vertical_1cmd9_7",
|
|
2930
2951
|
disabled: "_disabled_1cmd9_12",
|
|
@@ -2943,7 +2964,7 @@ var Qr = /* @__PURE__ */ i({
|
|
|
2943
2964
|
tick: "_tick_1cmd9_274",
|
|
2944
2965
|
"mark-restricted": "_mark-restricted_1cmd9_287",
|
|
2945
2966
|
"mark-label": "_mark-label_1cmd9_207"
|
|
2946
|
-
},
|
|
2967
|
+
}, V = (e, t, n) => Math.min(n, Math.max(t, e)), H = (e) => Math.round(e * 1e9) / 1e9, ei = 500, ti = (e) => e == null || typeof e == "boolean" ? "" : typeof e == "string" ? e : typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(ti).join("") : s(e) ? ti(e.children) : "", ni = /* @__PURE__ */ i({
|
|
2947
2968
|
name: "ElmSlider",
|
|
2948
2969
|
inheritAttrs: !1,
|
|
2949
2970
|
props: {
|
|
@@ -2998,24 +3019,24 @@ var Qr = /* @__PURE__ */ i({
|
|
|
2998
3019
|
},
|
|
2999
3020
|
emits: ["update:value"],
|
|
3000
3021
|
setup(e, { attrs: n, emit: i }) {
|
|
3001
|
-
let a = m(null), o = t(() => e.orientation === "vertical"), s = t(() => Math.min(e.min, e.max)), l = t(() => Math.max(e.min, e.max)), u = t(() =>
|
|
3022
|
+
let a = m(null), o = t(() => e.orientation === "vertical"), s = t(() => Math.min(e.min, e.max)), l = t(() => Math.max(e.min, e.max)), u = t(() => V(e.innerMin ?? s.value, s.value, l.value)), d = t(() => V(e.innerMax ?? l.value, u.value, l.value)), f = (t) => {
|
|
3002
3023
|
let n = Math.abs(e.step);
|
|
3003
|
-
return H(
|
|
3004
|
-
}, p = (e) => H(
|
|
3024
|
+
return V(H(n > 0 ? e.min + Math.round((t - e.min) / n) * n : t), u.value, d.value);
|
|
3025
|
+
}, p = (e) => V(H(e), u.value, d.value), h = Yt({
|
|
3005
3026
|
props: e,
|
|
3006
3027
|
key: "value",
|
|
3007
3028
|
emit: i,
|
|
3008
3029
|
defaultValue: p(e.defaultValue ?? (u.value + d.value) / 2)
|
|
3009
|
-
}), g = (t) => e.max === e.min ? 0 :
|
|
3030
|
+
}), g = (t) => e.max === e.min ? 0 : V((t - e.min) / (e.max - e.min), 0, 1), _ = (t, n) => {
|
|
3010
3031
|
let r = a.value;
|
|
3011
3032
|
if (!r) return h.value;
|
|
3012
|
-
let i = r.getBoundingClientRect(), s = o.value ? i.height === 0 ? 0 :
|
|
3033
|
+
let i = r.getBoundingClientRect(), s = o.value ? i.height === 0 ? 0 : V((i.bottom - n) / i.height, 0, 1) : i.width === 0 ? 0 : V((t - i.left) / i.width, 0, 1);
|
|
3013
3034
|
return f(e.min + s * (e.max - e.min));
|
|
3014
3035
|
}, ee = (t) => {
|
|
3015
3036
|
e.disabled || (t.currentTarget.setPointerCapture(t.pointerId), h.value = _(t.clientX, t.clientY));
|
|
3016
3037
|
}, te = (t) => {
|
|
3017
3038
|
e.disabled || t.currentTarget.hasPointerCapture(t.pointerId) && (h.value = _(t.clientX, t.clientY));
|
|
3018
|
-
}, v = t(() =>
|
|
3039
|
+
}, v = t(() => V(h.value, u.value, d.value)), ne = (t) => {
|
|
3019
3040
|
if (e.disabled) return;
|
|
3020
3041
|
let n = Math.abs(e.step);
|
|
3021
3042
|
switch (t.key) {
|
|
@@ -3040,27 +3061,27 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3040
3061
|
t.preventDefault(), h.value = d.value;
|
|
3041
3062
|
break;
|
|
3042
3063
|
}
|
|
3043
|
-
},
|
|
3064
|
+
}, re = t(() => {
|
|
3044
3065
|
if (!e.markers && !e.markerLabels) return [];
|
|
3045
3066
|
let t = Math.abs(e.step);
|
|
3046
3067
|
if (t <= 0 || e.max <= e.min) return [];
|
|
3047
|
-
let n = Math.floor(
|
|
3048
|
-
if (n <=
|
|
3068
|
+
let n = Math.floor(H((e.max - e.min) / t)), r = [];
|
|
3069
|
+
if (n <= ei) {
|
|
3049
3070
|
for (let i = 0; i <= n; i++) {
|
|
3050
|
-
let n =
|
|
3071
|
+
let n = H(e.min + i * t);
|
|
3051
3072
|
r.push({
|
|
3052
3073
|
value: n,
|
|
3053
3074
|
ratio: g(n)
|
|
3054
3075
|
});
|
|
3055
3076
|
}
|
|
3056
|
-
|
|
3077
|
+
H(e.min + n * t) !== H(e.max) && r.push({
|
|
3057
3078
|
value: e.max,
|
|
3058
3079
|
ratio: g(e.max)
|
|
3059
3080
|
});
|
|
3060
3081
|
} else {
|
|
3061
|
-
let t = (e.max - e.min) /
|
|
3062
|
-
for (let n = 0; n <=
|
|
3063
|
-
let i = n ===
|
|
3082
|
+
let t = (e.max - e.min) / ei;
|
|
3083
|
+
for (let n = 0; n <= ei; n++) {
|
|
3084
|
+
let i = n === ei ? e.max : H(e.min + n * t);
|
|
3064
3085
|
r.push({
|
|
3065
3086
|
value: i,
|
|
3066
3087
|
ratio: g(i)
|
|
@@ -3068,11 +3089,11 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3068
3089
|
}
|
|
3069
3090
|
}
|
|
3070
3091
|
return r;
|
|
3071
|
-
}),
|
|
3092
|
+
}), y = t(() => {
|
|
3072
3093
|
if (!e.markerLabels) return 0;
|
|
3073
3094
|
let t = 0;
|
|
3074
|
-
for (let n of
|
|
3075
|
-
let r =
|
|
3095
|
+
for (let n of re.value) {
|
|
3096
|
+
let r = ti(e.formatMarkerLabel?.(n.value) ?? n.value);
|
|
3076
3097
|
r.length > t && (t = r.length);
|
|
3077
3098
|
}
|
|
3078
3099
|
return t;
|
|
@@ -3080,17 +3101,17 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3080
3101
|
return () => {
|
|
3081
3102
|
let { class: t, style: i, onKeydown: s, ...l } = n, f = g(v.value), p = g(u.value), m = g(d.value);
|
|
3082
3103
|
return r("div", {
|
|
3083
|
-
class:
|
|
3104
|
+
class: b(B["elm-slider"], o.value && B.vertical, e.disabled && B.disabled, e.markers && B["has-markers"], e.markerLabels && B["has-marker-labels"], t),
|
|
3084
3105
|
style: {
|
|
3085
3106
|
"--elmethis-scoped-value-ratio": f,
|
|
3086
3107
|
"--elmethis-scoped-inner-min-ratio": p,
|
|
3087
3108
|
"--elmethis-scoped-inner-max-ratio": m,
|
|
3088
|
-
"--elmethis-scoped-max-marker-label-chars":
|
|
3109
|
+
"--elmethis-scoped-max-marker-label-chars": y.value,
|
|
3089
3110
|
...i
|
|
3090
3111
|
}
|
|
3091
3112
|
}, [r("div", c({
|
|
3092
3113
|
ref: a,
|
|
3093
|
-
class:
|
|
3114
|
+
class: B.track,
|
|
3094
3115
|
tabindex: e.disabled ? -1 : 0,
|
|
3095
3116
|
onPointerdown: ee,
|
|
3096
3117
|
onPointermove: te,
|
|
@@ -3106,35 +3127,35 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3106
3127
|
"aria-disabled": e.disabled || void 0
|
|
3107
3128
|
}), [
|
|
3108
3129
|
r("div", {
|
|
3109
|
-
class:
|
|
3130
|
+
class: B.rail,
|
|
3110
3131
|
"aria-hidden": "true"
|
|
3111
3132
|
}, [
|
|
3112
|
-
r("div", { class:
|
|
3113
|
-
r("div", { class:
|
|
3114
|
-
r("div", { class:
|
|
3133
|
+
r("div", { class: B["restricted-start"] }, null),
|
|
3134
|
+
r("div", { class: B.fill }, null),
|
|
3135
|
+
r("div", { class: B["restricted-end"] }, null)
|
|
3115
3136
|
]),
|
|
3116
|
-
|
|
3117
|
-
class:
|
|
3137
|
+
re.value.length > 0 && r("div", {
|
|
3138
|
+
class: B.marks,
|
|
3118
3139
|
"aria-hidden": "true"
|
|
3119
|
-
}, [
|
|
3140
|
+
}, [re.value.map((t, n) => r("span", {
|
|
3120
3141
|
key: t.value,
|
|
3121
|
-
class:
|
|
3142
|
+
class: b(B.mark, n === 0 && B["mark-start"], n === re.value.length - 1 && B["mark-end"], (t.value < u.value || t.value > d.value) && B["mark-restricted"]),
|
|
3122
3143
|
style: { "--elmethis-scoped-marker-ratio": t.ratio }
|
|
3123
|
-
}, [e.markers && r("i", { class:
|
|
3144
|
+
}, [e.markers && r("i", { class: B.tick }, null), e.markerLabels && r("span", { class: B["mark-label"] }, [e.formatMarkerLabel?.(t.value) ?? t.value])]))]),
|
|
3124
3145
|
r("span", {
|
|
3125
|
-
class:
|
|
3146
|
+
class: B.thumb,
|
|
3126
3147
|
"aria-hidden": "true"
|
|
3127
3148
|
}, null)
|
|
3128
3149
|
])]);
|
|
3129
3150
|
};
|
|
3130
3151
|
}
|
|
3131
|
-
}),
|
|
3152
|
+
}), U = {
|
|
3132
3153
|
switch: "_switch_9s4vz_1",
|
|
3133
3154
|
bar: "_bar_9s4vz_5",
|
|
3134
3155
|
checked: "_checked_9s4vz_21",
|
|
3135
3156
|
disabled: "_disabled_9s4vz_26",
|
|
3136
3157
|
circle: "_circle_9s4vz_31"
|
|
3137
|
-
},
|
|
3158
|
+
}, ri = /* @__PURE__ */ i({
|
|
3138
3159
|
name: "ElmSwitch",
|
|
3139
3160
|
props: {
|
|
3140
3161
|
color: {
|
|
@@ -3167,13 +3188,13 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3167
3188
|
"--elmethis-scoped-width": "calc(var(--elmethis-scoped-size) * 2 + var(--elmethis-scoped-padding) * 2)"
|
|
3168
3189
|
}
|
|
3169
3190
|
}, [r("input", {
|
|
3170
|
-
class:
|
|
3191
|
+
class: U.switch,
|
|
3171
3192
|
type: "checkbox",
|
|
3172
3193
|
checked: e.checked,
|
|
3173
3194
|
disabled: e.disabled
|
|
3174
|
-
}, null), r("div", { class:
|
|
3195
|
+
}, null), r("div", { class: b(U.bar, e.checked && U.checked, e.disabled && U.disabled) }, [r("div", { class: b(U.circle, e.checked && U.checked, e.disabled && U.disabled) }, null)])]);
|
|
3175
3196
|
}
|
|
3176
|
-
}),
|
|
3197
|
+
}), W = {
|
|
3177
3198
|
loading: "_loading_lgmx3_23",
|
|
3178
3199
|
"elm-text-area": "_elm-text-area_lgmx3_37",
|
|
3179
3200
|
disabled: "_disabled_lgmx3_63",
|
|
@@ -3183,7 +3204,7 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3183
3204
|
requierd: "_requierd_lgmx3_90",
|
|
3184
3205
|
body: "_body_lgmx3_96",
|
|
3185
3206
|
textarea: "_textarea_lgmx3_101"
|
|
3186
|
-
},
|
|
3207
|
+
}, ii = /* @__PURE__ */ i({
|
|
3187
3208
|
name: "ElmTextArea",
|
|
3188
3209
|
inheritAttrs: !1,
|
|
3189
3210
|
props: {
|
|
@@ -3230,25 +3251,25 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3230
3251
|
return () => {
|
|
3231
3252
|
let { class: t, style: p, onFocus: m, onBlur: h, ...g } = i;
|
|
3232
3253
|
return r("label", {
|
|
3233
|
-
class:
|
|
3254
|
+
class: b(W["elm-text-area"], s.value && W.active, (e.disabled || e.isLoading) && W.disabled, t),
|
|
3234
3255
|
style: p
|
|
3235
3256
|
}, [
|
|
3236
|
-
r("span", { class:
|
|
3257
|
+
r("span", { class: b(W.header, s.value && W["label-active"]) }, [
|
|
3237
3258
|
o.icon?.() ?? r(O, {
|
|
3238
|
-
d:
|
|
3259
|
+
d: ot,
|
|
3239
3260
|
size: "0.75rem"
|
|
3240
3261
|
}, null),
|
|
3241
|
-
r("span", null, [e.label, e.required && r("span", { class:
|
|
3262
|
+
r("span", null, [e.label, e.required && r("span", { class: W.requierd }, [n("*")])]),
|
|
3242
3263
|
d.value && r(T, {
|
|
3243
3264
|
color: e.maxLength != null && f.value > e.maxLength ? "var(--elmethis-color-accent-error)" : "gray",
|
|
3244
3265
|
size: "0.75rem"
|
|
3245
3266
|
}, { default: () => [e.maxLength == null ? `${f.value}` : `${f.value} / ${e.maxLength}`] })
|
|
3246
3267
|
]),
|
|
3247
|
-
r("div", { class:
|
|
3268
|
+
r("div", { class: W.body }, [r("textarea", c({
|
|
3248
3269
|
value: u.value,
|
|
3249
3270
|
rows: e.rows,
|
|
3250
3271
|
maxlength: e.maxLength,
|
|
3251
|
-
class:
|
|
3272
|
+
class: W.textarea,
|
|
3252
3273
|
placeholder: e.placeholder,
|
|
3253
3274
|
onFocus: (e) => {
|
|
3254
3275
|
s.value = !0, m?.(e);
|
|
@@ -3265,13 +3286,13 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3265
3286
|
}
|
|
3266
3287
|
}, g), null)]),
|
|
3267
3288
|
r("div", {
|
|
3268
|
-
class:
|
|
3289
|
+
class: W.loading,
|
|
3269
3290
|
style: { opacity: +!!e.isLoading }
|
|
3270
3291
|
}, null)
|
|
3271
3292
|
]);
|
|
3272
3293
|
};
|
|
3273
3294
|
}
|
|
3274
|
-
}),
|
|
3295
|
+
}), G = {
|
|
3275
3296
|
loading: "_loading_11box_23",
|
|
3276
3297
|
"elm-text-field": "_elm-text-field_11box_37",
|
|
3277
3298
|
disabled: "_disabled_11box_59",
|
|
@@ -3284,7 +3305,7 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3284
3305
|
"right-icon-box": "_right-icon-box_11box_121",
|
|
3285
3306
|
"clickable-icon": "_clickable-icon_11box_126",
|
|
3286
3307
|
"prefix-suffix": "_prefix-suffix_11box_142"
|
|
3287
|
-
},
|
|
3308
|
+
}, ai = /* @__PURE__ */ i({
|
|
3288
3309
|
name: "ElmTextField",
|
|
3289
3310
|
inheritAttrs: !1,
|
|
3290
3311
|
props: {
|
|
@@ -3338,27 +3359,27 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3338
3359
|
return () => {
|
|
3339
3360
|
let { class: d, style: f, onFocus: p, onBlur: m, ...h } = t, g = e.value == null ? 0 : String(e.value).length;
|
|
3340
3361
|
return r("label", {
|
|
3341
|
-
class:
|
|
3362
|
+
class: b(G["elm-text-field"], s.value && G.active, (e.disabled || e.isLoading) && G.disabled, d),
|
|
3342
3363
|
style: f
|
|
3343
3364
|
}, [
|
|
3344
|
-
r("span", { class:
|
|
3365
|
+
r("span", { class: b(G.header, s.value && G["label-active"]) }, [
|
|
3345
3366
|
a.icon?.() ?? r(O, {
|
|
3346
|
-
d:
|
|
3367
|
+
d: at,
|
|
3347
3368
|
size: "0.75rem"
|
|
3348
3369
|
}, null),
|
|
3349
|
-
r("span", null, [e.label, e.required && r("span", { class:
|
|
3370
|
+
r("span", null, [e.label, e.required && r("span", { class: G.requierd }, [n("*")])]),
|
|
3350
3371
|
e.value != null && r(T, {
|
|
3351
3372
|
color: e.maxLength != null && g > e.maxLength ? "var(--elmethis-color-accent-error)" : "gray",
|
|
3352
3373
|
size: "0.75rem"
|
|
3353
3374
|
}, { default: () => [e.maxLength == null ? `${g}` : `${g} / ${e.maxLength}`] })
|
|
3354
3375
|
]),
|
|
3355
|
-
r("div", { class:
|
|
3356
|
-
e.prefix && r("span", { class:
|
|
3376
|
+
r("div", { class: G.body }, [
|
|
3377
|
+
e.prefix && r("span", { class: G["prefix-suffix"] }, [e.prefix]),
|
|
3357
3378
|
r("input", c({
|
|
3358
3379
|
ref: o,
|
|
3359
3380
|
value: e.value,
|
|
3360
3381
|
type: l.value,
|
|
3361
|
-
class:
|
|
3382
|
+
class: G.input,
|
|
3362
3383
|
placeholder: e.placeholder,
|
|
3363
3384
|
onInput: (e) => {
|
|
3364
3385
|
i("update:value", e.target.value);
|
|
@@ -3373,38 +3394,38 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3373
3394
|
style: { cursor: e.disabled ? "not-allowed" : e.isLoading ? "progress" : "auto" },
|
|
3374
3395
|
"aria-required": e.required
|
|
3375
3396
|
}, h), null),
|
|
3376
|
-
r("div", { class:
|
|
3377
|
-
r("span", { class:
|
|
3397
|
+
r("div", { class: G["right-icon-box"] }, [
|
|
3398
|
+
r("span", { class: G["prefix-suffix"] }, [e.suffix != null && r(T, null, { default: () => [e.suffix] })]),
|
|
3378
3399
|
r("div", {
|
|
3379
|
-
class:
|
|
3400
|
+
class: G["clickable-icon"],
|
|
3380
3401
|
onClick: () => {
|
|
3381
3402
|
!e.isLoading && !e.disabled && (l.value = l.value === "text" ? "password" : "text");
|
|
3382
3403
|
}
|
|
3383
3404
|
}, [r(O, {
|
|
3384
|
-
d: l.value === "text" ?
|
|
3405
|
+
d: l.value === "text" ? Re : Le,
|
|
3385
3406
|
size: "1.25rem",
|
|
3386
3407
|
color: "gray"
|
|
3387
3408
|
}, null)]),
|
|
3388
3409
|
r("div", {
|
|
3389
|
-
class:
|
|
3410
|
+
class: G["clickable-icon"],
|
|
3390
3411
|
onClick: () => {
|
|
3391
3412
|
!e.isLoading && !e.disabled && u("");
|
|
3392
3413
|
}
|
|
3393
3414
|
}, [r(O, {
|
|
3394
|
-
d:
|
|
3415
|
+
d: st,
|
|
3395
3416
|
size: "1.25rem",
|
|
3396
3417
|
color: "gray"
|
|
3397
3418
|
}, null)])
|
|
3398
3419
|
])
|
|
3399
3420
|
]),
|
|
3400
3421
|
r("div", {
|
|
3401
|
-
class:
|
|
3422
|
+
class: G.loading,
|
|
3402
3423
|
style: { opacity: +!!e.isLoading }
|
|
3403
3424
|
}, null)
|
|
3404
3425
|
]);
|
|
3405
3426
|
};
|
|
3406
3427
|
}
|
|
3407
|
-
}),
|
|
3428
|
+
}), oi = { "elm-validation": "_elm-validation_1cigg_1" }, si = /* @__PURE__ */ i({
|
|
3408
3429
|
name: "ElmValidation",
|
|
3409
3430
|
props: {
|
|
3410
3431
|
text: {
|
|
@@ -3422,14 +3443,14 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3422
3443
|
},
|
|
3423
3444
|
setup(e) {
|
|
3424
3445
|
return () => r("div", {
|
|
3425
|
-
class:
|
|
3446
|
+
class: b(oi["elm-validation"]),
|
|
3426
3447
|
style: { "--elmethis-scoped-opacity": e.isValid ? 1 : .5 }
|
|
3427
3448
|
}, [r(O, {
|
|
3428
|
-
d: e.isValid ?
|
|
3449
|
+
d: e.isValid ? Ae : je,
|
|
3429
3450
|
color: e.isValid ? e.validColor : void 0
|
|
3430
3451
|
}, null), r(T, { color: e.isValid ? e.validColor : void 0 }, { default: () => [e.text] })]);
|
|
3431
3452
|
}
|
|
3432
|
-
}),
|
|
3453
|
+
}), ci = /* @__PURE__ */ i({
|
|
3433
3454
|
name: "ElmCopyIcon",
|
|
3434
3455
|
inheritAttrs: !1,
|
|
3435
3456
|
props: { content: {
|
|
@@ -3444,11 +3465,11 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3444
3465
|
});
|
|
3445
3466
|
return () => a(n);
|
|
3446
3467
|
}
|
|
3447
|
-
}),
|
|
3468
|
+
}), li = {
|
|
3448
3469
|
"elm-square-loading-icon": "_elm-square-loading-icon_m72nq_19",
|
|
3449
3470
|
square: "_square_m72nq_28",
|
|
3450
3471
|
appear: "_appear_m72nq_1"
|
|
3451
|
-
},
|
|
3472
|
+
}, ui = /* @__PURE__ */ i({
|
|
3452
3473
|
name: "ElmSquareLoadingIcon",
|
|
3453
3474
|
inheritAttrs: !1,
|
|
3454
3475
|
props: {
|
|
@@ -3466,11 +3487,11 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3466
3487
|
let { class: n, style: i, ...a } = t, o = 1200, s = o / (e.dimensions * 3), l = [];
|
|
3467
3488
|
for (let t = 0; t < e.dimensions; t++) for (let n = 0; n < e.dimensions; n++) l.push(r("span", {
|
|
3468
3489
|
key: `${t}-${n}`,
|
|
3469
|
-
class:
|
|
3490
|
+
class: li.square,
|
|
3470
3491
|
style: { "--elmethis-scoped-delay": `${s * (t + n)}ms` }
|
|
3471
3492
|
}, null));
|
|
3472
3493
|
return r("span", c({
|
|
3473
|
-
class:
|
|
3494
|
+
class: b(li["elm-square-loading-icon"], n),
|
|
3474
3495
|
style: [{
|
|
3475
3496
|
"--elmethis-scoped-size": e.size,
|
|
3476
3497
|
"--elmethis-scoped-dimensions": e.dimensions,
|
|
@@ -3479,12 +3500,12 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3479
3500
|
}, a), [l]);
|
|
3480
3501
|
};
|
|
3481
3502
|
}
|
|
3482
|
-
}),
|
|
3503
|
+
}), K = "elmethis-theme", di = "elmethis-theme-change", fi = (e) => e === "dark" ? "dark" : e === "light" ? "light" : null, pi = () => typeof matchMedia < "u" && matchMedia("(prefers-color-scheme: dark)").matches, mi = (e, t) => {
|
|
3483
3504
|
let n = document.documentElement;
|
|
3484
|
-
e == null ? (n.style.removeProperty("color-scheme"), n.removeAttribute("data-theme"), t && typeof localStorage < "u" && localStorage.removeItem(
|
|
3505
|
+
e == null ? (n.style.removeProperty("color-scheme"), n.removeAttribute("data-theme"), t && typeof localStorage < "u" && localStorage.removeItem(K)) : (n.style.colorScheme = e, n.setAttribute("data-theme", e), t && typeof localStorage < "u" && localStorage.setItem(K, e)), window.dispatchEvent(new CustomEvent(di, { detail: e }));
|
|
3485
3506
|
}, hi = () => {
|
|
3486
3507
|
if (typeof window > "u") return !1;
|
|
3487
|
-
let e = fi(localStorage.getItem(
|
|
3508
|
+
let e = fi(localStorage.getItem(K));
|
|
3488
3509
|
return e == null ? pi() : e === "dark";
|
|
3489
3510
|
};
|
|
3490
3511
|
function gi() {
|
|
@@ -3494,15 +3515,15 @@ function gi() {
|
|
|
3494
3515
|
let n = t.detail;
|
|
3495
3516
|
e.value = n == null ? pi() : n === "dark";
|
|
3496
3517
|
}, r = (t) => {
|
|
3497
|
-
if (t.key !==
|
|
3518
|
+
if (t.key !== K) return;
|
|
3498
3519
|
let n = fi(t.newValue);
|
|
3499
3520
|
e.value = n == null ? pi() : n === "dark", mi(n, !1);
|
|
3500
3521
|
}, i, a = (t) => {
|
|
3501
|
-
fi(localStorage.getItem(
|
|
3522
|
+
fi(localStorage.getItem(K)) ?? (e.value = t.matches);
|
|
3502
3523
|
};
|
|
3503
3524
|
return d(() => {
|
|
3504
3525
|
window.addEventListener(di, n), window.addEventListener("storage", r);
|
|
3505
|
-
let e = fi(localStorage.getItem(
|
|
3526
|
+
let e = fi(localStorage.getItem(K));
|
|
3506
3527
|
e != null && mi(e, !1), typeof matchMedia < "u" && (i = matchMedia("(prefers-color-scheme: dark)"), i.addEventListener("change", a));
|
|
3507
3528
|
}), u(() => {
|
|
3508
3529
|
window.removeEventListener(di, n), window.removeEventListener("storage", r), i?.removeEventListener("change", a);
|
|
@@ -3526,7 +3547,7 @@ var _i = { "elm-toggle-theme": "_elm-toggle-theme_11awq_1" }, vi = /* @__PURE__
|
|
|
3526
3547
|
width: e.size,
|
|
3527
3548
|
height: e.size,
|
|
3528
3549
|
viewBox: "0 0 24 24",
|
|
3529
|
-
class:
|
|
3550
|
+
class: b(_i["elm-toggle-theme"]),
|
|
3530
3551
|
onClick: n
|
|
3531
3552
|
}, [
|
|
3532
3553
|
r("path", {
|
|
@@ -3738,7 +3759,7 @@ var _i = { "elm-toggle-theme": "_elm-toggle-theme_11awq_1" }, vi = /* @__PURE__
|
|
|
3738
3759
|
width: e.size,
|
|
3739
3760
|
height: e.size,
|
|
3740
3761
|
viewBox: "0 0 24 24",
|
|
3741
|
-
class:
|
|
3762
|
+
class: b(_i["elm-toggle-theme"]),
|
|
3742
3763
|
onClick: n
|
|
3743
3764
|
}, [
|
|
3744
3765
|
r("g", {
|
|
@@ -3923,7 +3944,7 @@ var _i = { "elm-toggle-theme": "_elm-toggle-theme_11awq_1" }, vi = /* @__PURE__
|
|
|
3923
3944
|
required: !0
|
|
3924
3945
|
} },
|
|
3925
3946
|
setup(e) {
|
|
3926
|
-
return () => r("nav", { class:
|
|
3947
|
+
return () => r("nav", { class: b(yi["elm-breadcrumb"]) }, [e.links.map((t, n) => r("span", {
|
|
3927
3948
|
key: n,
|
|
3928
3949
|
style: { display: "contents" }
|
|
3929
3950
|
}, [r("span", {
|
|
@@ -3931,11 +3952,11 @@ var _i = { "elm-toggle-theme": "_elm-toggle-theme_11awq_1" }, vi = /* @__PURE__
|
|
|
3931
3952
|
onClick: t.onClick
|
|
3932
3953
|
}, [r(O, {
|
|
3933
3954
|
class: yi.icon,
|
|
3934
|
-
d: n === 0 ?
|
|
3955
|
+
d: n === 0 ? Ke : n === e.links.length - 1 ? Oe : Ve,
|
|
3935
3956
|
size: "1rem"
|
|
3936
3957
|
}, null), r("span", { class: yi.chunk }, [t.text])]), e.links.length !== n + 1 && r(O, {
|
|
3937
3958
|
class: yi.chevron,
|
|
3938
|
-
d:
|
|
3959
|
+
d: Me,
|
|
3939
3960
|
size: "1rem"
|
|
3940
3961
|
}, null)]))]);
|
|
3941
3962
|
}
|
|
@@ -3965,7 +3986,7 @@ var _i = { "elm-toggle-theme": "_elm-toggle-theme_11awq_1" }, vi = /* @__PURE__
|
|
|
3965
3986
|
});
|
|
3966
3987
|
};
|
|
3967
3988
|
return () => r("nav", {
|
|
3968
|
-
class:
|
|
3989
|
+
class: b(xi["elm-page-top"], t.value && xi.visible),
|
|
3969
3990
|
style: {
|
|
3970
3991
|
"--elmethis-scoped-size": "64px",
|
|
3971
3992
|
left: e.position === "left" ? "0" : "auto",
|
|
@@ -4081,7 +4102,7 @@ var _i = { "elm-toggle-theme": "_elm-toggle-theme_11awq_1" }, vi = /* @__PURE__
|
|
|
4081
4102
|
}, 1500);
|
|
4082
4103
|
};
|
|
4083
4104
|
return () => r("div", {
|
|
4084
|
-
class:
|
|
4105
|
+
class: b(q["elm-color-primitive-sample"]),
|
|
4085
4106
|
onClick: (e) => {
|
|
4086
4107
|
a(e);
|
|
4087
4108
|
}
|
|
@@ -4094,7 +4115,7 @@ var _i = { "elm-toggle-theme": "_elm-toggle-theme_11awq_1" }, vi = /* @__PURE__
|
|
|
4094
4115
|
}, [
|
|
4095
4116
|
r(O, {
|
|
4096
4117
|
class: q["mode-toggle-icon"],
|
|
4097
|
-
d: t.value === "hex" ?
|
|
4118
|
+
d: t.value === "hex" ? Ge : He,
|
|
4098
4119
|
size: "1.25rem"
|
|
4099
4120
|
}, null),
|
|
4100
4121
|
n("Copy: "),
|
|
@@ -4262,7 +4283,7 @@ var _i = { "elm-toggle-theme": "_elm-toggle-theme_11awq_1" }, vi = /* @__PURE__
|
|
|
4262
4283
|
}
|
|
4263
4284
|
}, [r("span", { "data-copy-token": e }, [o(e)]), r("span", { "data-copy-token": t }, [o(t)])]))])
|
|
4264
4285
|
])])]);
|
|
4265
|
-
return () => r("div", { class:
|
|
4286
|
+
return () => r("div", { class: b(Y["elm-color-semantic-sample"]) }, [r("div", { class: Y.toolbar }, [r("button", {
|
|
4266
4287
|
type: "button",
|
|
4267
4288
|
class: Y["mode-toggle"],
|
|
4268
4289
|
onClick: () => {
|
|
@@ -4271,7 +4292,7 @@ var _i = { "elm-toggle-theme": "_elm-toggle-theme_11awq_1" }, vi = /* @__PURE__
|
|
|
4271
4292
|
}, [
|
|
4272
4293
|
r(O, {
|
|
4273
4294
|
class: Y["mode-toggle-icon"],
|
|
4274
|
-
d: t.value === "hex" ?
|
|
4295
|
+
d: t.value === "hex" ? Ge : He,
|
|
4275
4296
|
size: "1.25rem"
|
|
4276
4297
|
}, null),
|
|
4277
4298
|
n("Copy: "),
|
|
@@ -4297,7 +4318,7 @@ var Z = (e) => {
|
|
|
4297
4318
|
case "blockquote":
|
|
4298
4319
|
if (c.tokens && c.tokens.length !== 0) {
|
|
4299
4320
|
let e;
|
|
4300
|
-
o.push(r(
|
|
4321
|
+
o.push(r(pr, { key: s }, X(e = Z(c.tokens)) ? e : { default: () => [e] }));
|
|
4301
4322
|
}
|
|
4302
4323
|
break;
|
|
4303
4324
|
case "br":
|
|
@@ -4438,7 +4459,7 @@ var Z = (e) => {
|
|
|
4438
4459
|
setup(e) {
|
|
4439
4460
|
let t = h([]), n = h([]);
|
|
4440
4461
|
return _(() => e.markdown, (r) => {
|
|
4441
|
-
let i =
|
|
4462
|
+
let i = qt.setOptions({ gfm: !0 }).lexer(r);
|
|
4442
4463
|
if (e.isStreaming && i.length > 0) {
|
|
4443
4464
|
let e = i.slice(0, -1);
|
|
4444
4465
|
e.length !== t.value.length && (t.value = e), n.value = i.slice(-1);
|
|
@@ -4601,7 +4622,7 @@ var qi = (e) => {
|
|
|
4601
4622
|
let n = "", o = "empty";
|
|
4602
4623
|
return a ? (n = a[t].letter.toUpperCase(), o = a[t].status) : s && (n = (i[t] ?? "").toUpperCase(), o = n ? "tbd" : "empty"), r("div", {
|
|
4603
4624
|
key: t,
|
|
4604
|
-
class:
|
|
4625
|
+
class: b(Q.cell, o === "correct" && Q.correct, o === "present" && Q.present, o === "absent" && Q.absent, o === "tbd" && Q.tbd, o === "empty" && Q.empty)
|
|
4605
4626
|
}, [n]);
|
|
4606
4627
|
});
|
|
4607
4628
|
return r("div", {
|
|
@@ -4611,7 +4632,7 @@ var qi = (e) => {
|
|
|
4611
4632
|
});
|
|
4612
4633
|
return r("div", { class: Q["elm-wordle"] }, [
|
|
4613
4634
|
r("div", {
|
|
4614
|
-
class:
|
|
4635
|
+
class: b(Q["message-area"], d ? Q.error : o === "playing" ? void 0 : Q.status),
|
|
4615
4636
|
"aria-live": "polite"
|
|
4616
4637
|
}, [d || (o === "won" ? `🎉 You won in ${t.length} ${t.length === 1 ? "guess" : "guesses"}!` : o === "lost" ? `😢 The word was "${e.toUpperCase()}"` : null)]),
|
|
4617
4638
|
r("div", { class: Q.board }, [p]),
|
|
@@ -4629,10 +4650,10 @@ var qi = (e) => {
|
|
|
4629
4650
|
return r("button", {
|
|
4630
4651
|
key: e,
|
|
4631
4652
|
"data-key": e,
|
|
4632
|
-
class:
|
|
4653
|
+
class: b(Q.key, e === "Enter" && Q.wide, e === "⌫" && Q.wide, t === "correct" && Q.correct, t === "present" && Q.present, t === "absent" && Q.absent)
|
|
4633
4654
|
}, [e]);
|
|
4634
4655
|
})]))]),
|
|
4635
|
-
r("div", { class:
|
|
4656
|
+
r("div", { class: b(Q["reset-container"], o === "playing" && Q.hidden) }, [r("button", {
|
|
4636
4657
|
class: Q["reset-button"],
|
|
4637
4658
|
onClick: f
|
|
4638
4659
|
}, [n("Play Again")])])
|
|
@@ -4655,4 +4676,4 @@ var qi = (e) => {
|
|
|
4655
4676
|
};
|
|
4656
4677
|
};
|
|
4657
4678
|
//#endregion
|
|
4658
|
-
export { Mn as A2uiSurface, gn as CatalogRenderer, Nn as ElmA2ui, er as ElmAudioPlayer,
|
|
4679
|
+
export { Mn as A2uiSurface, gn as CatalogRenderer, Nn as ElmA2ui, er as ElmAudioPlayer, qr as ElmBlockFallback, or as ElmBlockImage, pr as ElmBlockQuote, dr as ElmBookmark, bi as ElmBreadcrumb, Jr as ElmButton, Xr as ElmButtonDropdown, gr as ElmCallout, Zr as ElmCheckbox, Kn as ElmCodeBlock, Jt as ElmCollapse, Ei as ElmColorPrimitiveSample, Pi as ElmColorSemanticSample, ci as ElmCopyIcon, br as ElmDivider, Kr as ElmDotLoadingIcon, lr as ElmFile, an as ElmFragmentIdentifier, sn as ElmHeading, Zn as ElmHtml, zr as ElmHtmlViewer, w as ElmInlineIcon, T as ElmInlineText, Fn as ElmKatex, Vn as ElmLanguageIcon, Sr as ElmList, Li as ElmMarkdown, O as ElmMdiIcon, ir as ElmModal, vr as ElmNotionCallout, Si as ElmPageTop, dn as ElmParagraph, Vr as ElmParallax, nr as ElmRectangleWave, $r as ElmSelect, Un as ElmShikiHighlighter, ni as ElmSlider, ui as ElmSquareLoadingIcon, ri as ElmSwitch, en as ElmTab, $t as ElmTabList, tn as ElmTabPanel, Tr as ElmTable, Er as ElmTableBody, Or as ElmTableCell, Ar as ElmTableHeader, Mr as ElmTableRow, Qt as ElmTabs, ii as ElmTextArea, ai as ElmTextField, fr as ElmToggle, vi as ElmToggleTheme, Ur as ElmTooltip, Pr as ElmUnsupportedBlock, si as ElmValidation, Cr as HasRowHeaderContext, Ot as LANGUAGES, di as THEME_CHANGE_EVENT, wr as TableSectionContext, Cn as basicCatalog, Lr as blockCatalog, D as defineRenderer, Gn as useClipboard, gi as useElmethisTheme, ar as useModal, qi as useWordle };
|