@pie-element/venn-classification 0.1.1-next.1 → 0.1.1-next.11
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/author.js +2 -0
- package/dist/author/index.d.ts +2 -10
- package/dist/author/index.js +23824 -18172
- package/dist/author/index.js.map +1 -1
- package/dist/browser/VennClassification-CijQL7Lf.js +3620 -0
- package/dist/browser/VennClassification-CijQL7Lf.js.map +1 -0
- package/dist/browser/author/index.js +5428 -4285
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js +2 -2
- package/dist/browser/controller-bkBJ6-j1.js +1779 -0
- package/dist/browser/controller-bkBJ6-j1.js.map +1 -0
- package/dist/browser/delivery/index.js +86 -27
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/editor-runtime/VennClassification-CijQL7Lf.js +3620 -0
- package/dist/browser/editor-runtime/VennClassification-CijQL7Lf.js.map +1 -0
- package/dist/browser/editor-runtime/author/index.js +950 -0
- package/dist/browser/editor-runtime/author/index.js.map +1 -0
- package/dist/browser/editor-runtime/controller/index.js +2 -0
- package/dist/browser/editor-runtime/controller-bkBJ6-j1.js +1779 -0
- package/dist/browser/editor-runtime/controller-bkBJ6-j1.js.map +1 -0
- package/dist/browser/editor-runtime/delivery/index.js +95 -0
- package/dist/browser/editor-runtime/delivery/index.js.map +1 -0
- package/dist/controller/defaults.d.ts +5 -0
- package/dist/controller/index.d.ts +21 -7
- package/dist/controller/index.js +2400 -50
- package/dist/controller/index.js.map +1 -1
- package/dist/controller/region.d.ts +2 -2
- package/dist/delivery/dnd.d.ts +9 -0
- package/dist/delivery/index.d.ts +2 -14
- package/dist/delivery/index.js +6672 -3644
- package/dist/delivery/index.js.map +1 -1
- package/dist/delivery/layout.d.ts +104 -34
- package/dist/delivery/tile-accessible-name.d.ts +13 -1
- package/dist/i18n.d.ts +9 -0
- package/dist/index.iife.js +17 -17
- package/dist/index.js +2 -6697
- package/dist/runtime-support.js +5 -5
- package/dist/runtime-support.js.map +1 -1
- package/dist/types.d.ts +7 -0
- package/package.json +20 -20
- package/dist/browser/VennClassification-C6roHfLf.js +0 -3412
- package/dist/browser/VennClassification-C6roHfLf.js.map +0 -1
- package/dist/browser/controller-Dt0dg5dA.js +0 -249
- package/dist/browser/controller-Dt0dg5dA.js.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,950 @@
|
|
|
1
|
+
import { A as e, B as t, C as n, D as r, E as i, F as a, H as o, I as s, L as c, M as l, N as u, O as d, P as f, R as p, S as m, T as h, U as g, V as _, _ as v, a as y, b, c as x, d as S, f as C, g as w, h as T, i as E, j as D, k as O, l as k, m as A, n as j, o as M, p as N, r as P, s as F, t as ee, u as I, v as L, w as R, x as z, y as te, z as B } from "../VennClassification-CijQL7Lf.js";
|
|
2
|
+
import { _ as ne, g as re, h as ie, i as ae, m as oe, n as se, p as V, v as H, y as ce } from "../controller-bkBJ6-j1.js";
|
|
3
|
+
import { Editor as le } from "@tiptap/core";
|
|
4
|
+
import ue from "@tiptap/starter-kit";
|
|
5
|
+
import { TextStyle as de } from "@tiptap/extension-text-style";
|
|
6
|
+
import { CharacterCount as U } from "@tiptap/extension-character-count";
|
|
7
|
+
import fe from "@tiptap/extension-superscript";
|
|
8
|
+
import W from "@tiptap/extension-subscript";
|
|
9
|
+
import pe from "@tiptap/extension-text-align";
|
|
10
|
+
import G from "@tiptap/extension-image";
|
|
11
|
+
import { Table as K } from "@tiptap/extension-table";
|
|
12
|
+
import { TableRow as me } from "@tiptap/extension-table-row";
|
|
13
|
+
import { TableCell as he } from "@tiptap/extension-table-cell";
|
|
14
|
+
import { TableHeader as ge } from "@tiptap/extension-table-header";
|
|
15
|
+
import { Placeholder as _e } from "@tiptap/extensions";
|
|
16
|
+
//#region ../../shared/configure-events/dist/index.js
|
|
17
|
+
var ve = class e extends CustomEvent {
|
|
18
|
+
static {
|
|
19
|
+
this.TYPE = "model.updated";
|
|
20
|
+
}
|
|
21
|
+
constructor(t, n = !1) {
|
|
22
|
+
super(e.TYPE, {
|
|
23
|
+
bubbles: !0,
|
|
24
|
+
detail: {
|
|
25
|
+
update: t,
|
|
26
|
+
reset: n
|
|
27
|
+
}
|
|
28
|
+
}), this.update = t, this.reset = n;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
(class e extends CustomEvent {
|
|
32
|
+
static {
|
|
33
|
+
this.TYPE = "delete.image";
|
|
34
|
+
}
|
|
35
|
+
constructor(t, n) {
|
|
36
|
+
super(e.TYPE, {
|
|
37
|
+
bubbles: !0,
|
|
38
|
+
detail: {
|
|
39
|
+
src: t,
|
|
40
|
+
done: n
|
|
41
|
+
}
|
|
42
|
+
}), this.src = t, this.done = n;
|
|
43
|
+
}
|
|
44
|
+
}), class e extends CustomEvent {
|
|
45
|
+
static {
|
|
46
|
+
this.TYPE = "insert.image";
|
|
47
|
+
}
|
|
48
|
+
constructor(t) {
|
|
49
|
+
super(e.TYPE, {
|
|
50
|
+
bubbles: !0,
|
|
51
|
+
detail: t
|
|
52
|
+
}), this.handler = t;
|
|
53
|
+
}
|
|
54
|
+
}, class e extends CustomEvent {
|
|
55
|
+
static {
|
|
56
|
+
this.TYPE = "delete.sound";
|
|
57
|
+
}
|
|
58
|
+
constructor(t, n) {
|
|
59
|
+
super(e.TYPE, {
|
|
60
|
+
bubbles: !0,
|
|
61
|
+
detail: {
|
|
62
|
+
src: t,
|
|
63
|
+
done: n
|
|
64
|
+
}
|
|
65
|
+
}), this.src = t, this.done = n;
|
|
66
|
+
}
|
|
67
|
+
}, class e extends CustomEvent {
|
|
68
|
+
static {
|
|
69
|
+
this.TYPE = "insert.sound";
|
|
70
|
+
}
|
|
71
|
+
constructor(t) {
|
|
72
|
+
super(e.TYPE, {
|
|
73
|
+
bubbles: !0,
|
|
74
|
+
detail: t
|
|
75
|
+
}), this.handler = t;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region ../../lib-svelte/config-ui-svelte/dist/index.js
|
|
80
|
+
var q = R("<aside class=\"pie-config-layout-settings svelte-9dr0jr\" aria-label=\"Settings\"><!></aside>"), J = R("<div class=\"pie-config-layout svelte-9dr0jr\"><div class=\"pie-config-layout-contents svelte-9dr0jr\"><div class=\"pie-config-layout-design svelte-9dr0jr\"><!></div> <!></div></div>"), ye = {
|
|
81
|
+
hash: "svelte-9dr0jr",
|
|
82
|
+
code: ".pie-config-layout.svelte-9dr0jr {container-type:inline-size;}.pie-config-layout-contents.svelte-9dr0jr {display:flex;flex-direction:column;gap:16px;}.pie-config-layout-design.svelte-9dr0jr {flex:1 1 auto;min-width:0;}\n\n @container (min-width: 1135px) {.pie-config-layout-contents.svelte-9dr0jr {flex-direction:row;align-items:flex-start;}.pie-config-layout-settings.svelte-9dr0jr {flex:0 0 300px;position:sticky;top:0;}\n }"
|
|
83
|
+
};
|
|
84
|
+
function be(t, n) {
|
|
85
|
+
N(t, ye);
|
|
86
|
+
let r = E(n, "hideSettings", 3, !1);
|
|
87
|
+
var i = J(), a = e(i), s = e(a);
|
|
88
|
+
b(e(s), () => n.children), o(s);
|
|
89
|
+
var c = u(s, 2), l = (t) => {
|
|
90
|
+
var r = q();
|
|
91
|
+
b(e(r), () => n.settings), o(r), m(t, r);
|
|
92
|
+
};
|
|
93
|
+
v(c, (e) => {
|
|
94
|
+
n.settings && !r() && e(l);
|
|
95
|
+
}), o(a), o(i), m(t, i);
|
|
96
|
+
}
|
|
97
|
+
var Y = (e) => typeof e == "object" && !!e && !Array.isArray(e);
|
|
98
|
+
function X(e, t) {
|
|
99
|
+
if (!Y(t)) return e;
|
|
100
|
+
let n = { ...e };
|
|
101
|
+
for (let [r, i] of Object.entries(t)) {
|
|
102
|
+
let t = e[r];
|
|
103
|
+
n[r] = Y(t) && Y(i) ? {
|
|
104
|
+
...t,
|
|
105
|
+
...i
|
|
106
|
+
} : i;
|
|
107
|
+
}
|
|
108
|
+
return n;
|
|
109
|
+
}
|
|
110
|
+
function xe(e) {
|
|
111
|
+
return Y(e) ? Object.values(e).some((e) => Y(e) && (e.settings === !0 || xe(e))) : !1;
|
|
112
|
+
}
|
|
113
|
+
var Z = (e, t = !1, n = !1) => ({
|
|
114
|
+
type: "toggle",
|
|
115
|
+
label: e,
|
|
116
|
+
isConfigProperty: t,
|
|
117
|
+
disabled: n
|
|
118
|
+
}), Se = (e, t, n = !1) => ({
|
|
119
|
+
type: "radio",
|
|
120
|
+
label: e,
|
|
121
|
+
choices: t.map((e) => typeof e == "string" ? {
|
|
122
|
+
label: e,
|
|
123
|
+
value: e
|
|
124
|
+
} : e),
|
|
125
|
+
isConfigProperty: n
|
|
126
|
+
});
|
|
127
|
+
function Q(e, t) {
|
|
128
|
+
let n = e;
|
|
129
|
+
for (let e of t.split(".")) {
|
|
130
|
+
if (!Y(n)) return;
|
|
131
|
+
n = n[e];
|
|
132
|
+
}
|
|
133
|
+
return n;
|
|
134
|
+
}
|
|
135
|
+
function $(e, t, n) {
|
|
136
|
+
let [r, ...i] = t.split("."), a = e[r], o = i.length === 0 ? n : $(Y(a) ? a : {}, i.join("."), n);
|
|
137
|
+
return {
|
|
138
|
+
...e,
|
|
139
|
+
[r]: o
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
var Ce = R("<label class=\"pie-settings-toggle svelte-1ang3sw\"><span> </span> <input type=\"checkbox\" role=\"switch\" class=\"svelte-1ang3sw\"/></label>"), we = R("<label class=\"pie-settings-choice-row svelte-1ang3sw\"><input type=\"radio\" class=\"svelte-1ang3sw\"/> <span> </span></label>"), Te = R("<fieldset class=\"pie-settings-choice svelte-1ang3sw\"><legend class=\"svelte-1ang3sw\"> </legend> <!></fieldset>"), Ee = R("<fieldset class=\"pie-settings-group svelte-1ang3sw\"><legend class=\"pie-settings-group-name svelte-1ang3sw\"> </legend> <!></fieldset>"), De = R("<div class=\"pie-settings-panel svelte-1ang3sw\"></div>"), Oe = {
|
|
143
|
+
hash: "svelte-1ang3sw",
|
|
144
|
+
code: ".pie-settings-panel.svelte-1ang3sw {display:flex;flex-direction:column;gap:16px;padding:16px;border:1px solid var(--pie-border-light, #ccc);border-radius:4px;color:var(--pie-text, #212121);}fieldset.svelte-1ang3sw {margin:0;padding:0;border:0;min-width:0;}.pie-settings-group.svelte-1ang3sw {display:flex;flex-direction:column;gap:8px;}.pie-settings-group-name.svelte-1ang3sw {margin-bottom:8px;font-weight:600;}.pie-settings-toggle.svelte-1ang3sw {display:flex;align-items:center;justify-content:space-between;gap:12px;}.pie-settings-choice.svelte-1ang3sw legend:where(.svelte-1ang3sw) {margin-bottom:4px;}.pie-settings-choice-row.svelte-1ang3sw {display:flex;align-items:center;gap:8px;}input.svelte-1ang3sw {accent-color:var(--pie-primary, #3f51b5);}input.svelte-1ang3sw:focus-visible {outline:2px solid var(--pie-focus-outline, #1a73e8);outline-offset:2px;}"
|
|
145
|
+
};
|
|
146
|
+
function ke(a, s) {
|
|
147
|
+
t(s, !0), N(a, Oe);
|
|
148
|
+
let c = E(s, "configuration", 19, () => ({})), f = Math.random().toString(36).slice(2, 10), h = p(() => Object.entries(s.groups).map(([e, t]) => [e, Object.entries(t).filter((e) => !!e[1])]).filter(([, e]) => e.length > 0)), _ = (e, t) => Q(t.isConfigProperty ? c() : s.model, e);
|
|
149
|
+
function y(e, t, n) {
|
|
150
|
+
t.isConfigProperty ? s.onChangeConfiguration?.($(c(), e, n), e) : s.onChangeModel($(s.model, e, n), e);
|
|
151
|
+
}
|
|
152
|
+
var b = De();
|
|
153
|
+
T(b, 21, () => r(h), ([e, t]) => e, (t, a) => {
|
|
154
|
+
var s = p(() => g(r(a), 2));
|
|
155
|
+
let c = () => r(s)[0], h = () => r(s)[1];
|
|
156
|
+
var b = Ee(), S = e(b), C = l(S, !0);
|
|
157
|
+
T(u(S, 2), 17, h, ([e, t]) => e, (t, a) => {
|
|
158
|
+
var s = p(() => g(r(a), 2));
|
|
159
|
+
let c = () => r(s)[0], h = () => r(s)[1];
|
|
160
|
+
var b = n(), S = D(b), C = (t) => {
|
|
161
|
+
var n = Ce(), r = e(n), a = l(r, !0), s = u(r, 2);
|
|
162
|
+
F(s), o(n), d((e) => {
|
|
163
|
+
z(a, h().label), k(s, e), s.disabled = h().disabled;
|
|
164
|
+
}, [() => !!_(c(), h())]), i("change", s, (e) => y(c(), h(), e.currentTarget.checked)), m(t, n);
|
|
165
|
+
}, w = (t) => {
|
|
166
|
+
var n = Te(), a = e(n), s = l(a, !0);
|
|
167
|
+
T(u(a, 2), 17, () => h().choices, (e) => e.value, (t, n) => {
|
|
168
|
+
var a = we(), s = e(a);
|
|
169
|
+
F(s);
|
|
170
|
+
var p = l(u(s, 2), !0);
|
|
171
|
+
o(a), d((e) => {
|
|
172
|
+
x(s, "name", `${f}-${c()}`), I(s, r(n).value), k(s, e), z(p, r(n).label);
|
|
173
|
+
}, [() => _(c(), h()) === r(n).value]), i("change", s, () => y(c(), h(), r(n).value)), m(t, a);
|
|
174
|
+
}), o(n), d(() => z(s, h().label)), m(t, n);
|
|
175
|
+
};
|
|
176
|
+
v(S, (e) => {
|
|
177
|
+
h().type === "toggle" ? e(C) : h().type === "radio" && e(w, 1);
|
|
178
|
+
}), m(t, b);
|
|
179
|
+
}), o(b), d(() => z(C, c())), m(t, b);
|
|
180
|
+
}), o(b), m(a, b), B();
|
|
181
|
+
}
|
|
182
|
+
h(["change"]);
|
|
183
|
+
var Ae = be, je = ke, Me = R("<button type=\"button\" class=\"pie-toolbar-btn\" title=\"Insert Table\"></button>"), Ne = R("<button type=\"button\" title=\"Add Row\"></button> <button type=\"button\" title=\"Delete Row\"></button> <button type=\"button\" title=\"Add Column\"></button> <button type=\"button\" title=\"Delete Column\"></button> <button type=\"button\" title=\"Delete Table\"></button> <button type=\"button\" title=\"Toggle Table Border\"></button>", 1), Pe = R("<div class=\"align-menu\"><button type=\"button\" class=\"align-menu-btn\" title=\"Align Left\"></button> <button type=\"button\" class=\"align-menu-btn\" title=\"Align Center\"></button> <button type=\"button\" class=\"align-menu-btn\" title=\"Align Right\"></button></div>"), Fe = R("<button type=\"button\" title=\"Bold\"></button> <button type=\"button\" title=\"Italic\"></button> <button type=\"button\" title=\"Strikethrough\"></button> <button type=\"button\" title=\"Code\"></button> <button type=\"button\" title=\"Underline\"></button> <button type=\"button\" title=\"Subscript\"></button> <button type=\"button\" title=\"Superscript\"></button> <button type=\"button\" title=\"Heading\"></button> <button type=\"button\" class=\"pie-toolbar-btn\" title=\"Insert Image\"></button> <div class=\"align-dropdown\"><button type=\"button\" class=\"pie-toolbar-btn\" title=\"Text Alignment\"><!> <span class=\"dropdown-arrow\">▼</span></button> <!></div> <button type=\"button\" title=\"Bullet List\"></button> <button type=\"button\" title=\"Numbered List\"></button> <button type=\"button\" class=\"pie-toolbar-btn\" title=\"Undo\"></button> <button type=\"button\" class=\"pie-toolbar-btn\" title=\"Redo\"></button>", 1), Ie = R("<div role=\"toolbar\" tabindex=\"-1\"><div class=\"toolbar-content\"><div class=\"toolbar-buttons\"><!> <!> <!></div> <button type=\"button\" class=\"done-btn\" title=\"Done\"></button></div></div>"), Le = R("<div class=\"pie-editable-html editor-container editable-html svelte-rx7so6\"><div><div class=\"editor-children\"><div class=\"editor\"></div></div></div> <!></div>"), Re = {
|
|
184
|
+
hash: "svelte-rx7so6",
|
|
185
|
+
code: ".pie-editable-html.svelte-rx7so6 {position:relative;padding:0px;border:1px solid #ccc;border-radius:4px;cursor:text;background-color:var(--pie-background, rgba(255, 255, 255, 0));width:100%;}.pie-editable-html.svelte-rx7so6 .editor-holder {position:relative;padding:0px;overflow-y:auto;color:var(--pie-text, black);background-color:var(--pie-background, rgba(255, 255, 255, 0));min-height:120px;}.pie-editable-html.svelte-rx7so6 .editor-holder.disabled {cursor:not-allowed;}.pie-editable-html.svelte-rx7so6 .editor-children {padding:10px 16px;}.pie-editable-html.svelte-rx7so6 .editor {padding:5px;min-height:100px;}\n\n /* Toolbar styles matching React version EXACTLY */.pie-editable-html.svelte-rx7so6 .toolbar {position:absolute;z-index:20;cursor:pointer;justify-content:space-between;background:var(--editable-html-toolbar-bg, #efefef);min-width:280px;margin:5px 0 0 0;padding:2px;box-shadow:0px 1px 5px 0px rgba(0, 0, 0, 0.2),\n 0px 2px 2px 0px rgba(0, 0, 0, 0.14),\n 0px 3px 1px -2px rgba(0, 0, 0, 0.12);box-sizing:border-box;display:flex;opacity:0;pointer-events:none;top:100%;left:0;}.pie-editable-html.svelte-rx7so6 .toolbar.focused {opacity:1;pointer-events:auto;}.pie-editable-html.svelte-rx7so6 .toolbar-content {display:flex;width:100%;justify-content:space-between;}.pie-editable-html.svelte-rx7so6 .toolbar-buttons {align-items:center;display:flex;width:100%;}.pie-editable-html.svelte-rx7so6 .toolbar button.pie-toolbar-btn {\n /* Reset all browser defaults */appearance:none;-webkit-appearance:none;-moz-appearance:none;\n\n /* Core button styling - matching React MenuBar exactly */color:grey !important;display:inline-flex !important;padding:2px !important;background:none !important;border:0 !important;border-width:0 !important;border-style:none !important;outline:none !important;box-shadow:none !important;cursor:pointer !important;align-items:center !important;justify-content:center !important;min-width:auto !important;width:auto !important;height:auto !important;margin:0 !important;font:inherit !important;text-align:inherit !important;text-transform:none !important;}.pie-editable-html.svelte-rx7so6 .pie-toolbar-btn:hover:not(:disabled) {color:black;}.pie-editable-html.svelte-rx7so6 .pie-toolbar-btn:focus {outline:2px solid #666;}.pie-editable-html.svelte-rx7so6 .pie-toolbar-btn:disabled {opacity:0.7;cursor:not-allowed;}.pie-editable-html.svelte-rx7so6 .pie-toolbar-btn:disabled:hover {color:grey;}.pie-editable-html.svelte-rx7so6 .pie-toolbar-btn.active {background:var(--pie-primary, #3f51b5);color:var(--pie-white, #ffffff);}.pie-editable-html.svelte-rx7so6 .pie-toolbar-btn svg {width:24px;height:24px;}\n\n /* Done Button - matching React DoneButton component */.pie-editable-html.svelte-rx7so6 .done-btn {vertical-align:top;width:28px;height:28px;color:var(--editable-html-toolbar-check, #00bb00);padding:4px;display:inline-flex;align-items:center;justify-content:center;background:none;border:none;cursor:pointer;}.pie-editable-html.svelte-rx7so6 .done-btn:hover {background-color:rgba(0, 187, 0, 0.08);border-radius:4px;}.pie-editable-html.svelte-rx7so6 .done-btn svg {width:24px;height:24px;}\n\n /* Text alignment dropdown */.pie-editable-html.svelte-rx7so6 .align-dropdown {position:relative;}.pie-editable-html.svelte-rx7so6 .dropdown-arrow {margin-left:2px;font-size:8px;}.pie-editable-html.svelte-rx7so6 .align-menu {position:absolute;top:100%;left:0;background:var(--pie-white, #ffffff);display:flex;flex-direction:row;padding:2px;box-shadow:0px 1px 5px 0px rgba(0, 0, 0, 0.2),\n 0px 2px 2px 0px rgba(0, 0, 0, 0.14),\n 0px 3px 1px -2px rgba(0, 0, 0, 0.12);z-index:30;}.pie-editable-html.svelte-rx7so6 .align-menu-btn {color:var(--pie-disabled, grey);display:inline-flex;padding:4px;background:none;border:none;cursor:pointer;align-items:center;justify-content:center;min-width:32px;min-height:32px;}.pie-editable-html.svelte-rx7so6 .align-menu-btn:hover {color:var(--pie-black, #000000);background-color:rgba(0, 0, 0, 0.04);}\n\n /* ProseMirror editor styles */.pie-editable-html.svelte-rx7so6 .ProseMirror {outline:none !important;min-height:100px;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:14px;line-height:1.6;color:var(--pie-text, black);}.pie-editable-html.svelte-rx7so6 .ProseMirror p {margin:0;}.pie-editable-html.svelte-rx7so6 .ProseMirror ul,\n .pie-editable-html.svelte-rx7so6 .ProseMirror ol {padding:0 1rem;margin:1.25rem 1rem 1.25rem 0.4rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror ul li p,\n .pie-editable-html.svelte-rx7so6 .ProseMirror ol li p {margin-top:0.25em;margin-bottom:0.25em;}.pie-editable-html.svelte-rx7so6 .ProseMirror h1,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h2,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h3,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h4,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h5,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h6 {line-height:1.1;margin-top:2.5rem;text-wrap:pretty;}.pie-editable-html.svelte-rx7so6 .ProseMirror h1,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h2 {margin-top:3.5rem;margin-bottom:1.5rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror h1 {font-size:1.4rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror h2 {font-size:1.2rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror h3 {font-size:1.1rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror h4,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h5,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h6 {font-size:1rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror code {background-color:rgba(88, 5, 255, 0.05);border-radius:0.4rem;color:#2e2b29;font-size:0.85rem;padding:0.25em 0.3em;}.pie-editable-html.svelte-rx7so6 .ProseMirror pre {background:#2e2b29;border-radius:0.5rem;color:#fff;font-family:'JetBrainsMono', monospace;margin:1.5rem 0;padding:0.75rem 1rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror pre code {background:none;color:inherit;font-size:0.8rem;padding:0;}.pie-editable-html.svelte-rx7so6 .ProseMirror blockquote {border-left:3px solid rgba(61, 37, 20, 0.12);margin:1.5rem 0;padding-left:1rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror hr {border:none;border-top:1px solid rgba(61, 37, 20, 0.08);margin:2rem 0;}.pie-editable-html.svelte-rx7so6 .ProseMirror img {max-width:100%;height:auto;}\n\n /* Table styles */.pie-editable-html.svelte-rx7so6 .ProseMirror table {table-layout:fixed;width:100%;border-collapse:collapse;color:var(--pie-text, black);background-color:var(--pie-background, rgba(255, 255, 255, 0));margin:1rem 0;}.pie-editable-html.svelte-rx7so6 .ProseMirror table:not([border=\"1\"]) tr {border-top:1px solid #dfe2e5;}.pie-editable-html.svelte-rx7so6 .ProseMirror td,\n .pie-editable-html.svelte-rx7so6 .ProseMirror th {padding:0.6em 1em;text-align:center;vertical-align:top;position:relative;}.pie-editable-html.svelte-rx7so6 .ProseMirror table:not([border=\"1\"]) td,\n .pie-editable-html.svelte-rx7so6 .ProseMirror table:not([border=\"1\"]) th {border:1px solid #dfe2e5;}.pie-editable-html.svelte-rx7so6 .ProseMirror table[border=\"1\"] {border:2px solid var(--pie-black, #000000);}.pie-editable-html.svelte-rx7so6 .ProseMirror table[border=\"1\"] td,\n .pie-editable-html.svelte-rx7so6 .ProseMirror table[border=\"1\"] th {border:1px solid var(--pie-black, #000000);}.pie-editable-html.svelte-rx7so6 .ProseMirror .selectedCell {background-color:rgba(200, 200, 255, 0.4);}\n\n /* Placeholder */.pie-editable-html.svelte-rx7so6 .ProseMirror p.is-editor-empty:first-child::before {content:attr(data-placeholder);float:left;color:#adb5bd;pointer-events:none;height:0;}.pie-editable-html.svelte-rx7so6 .ProseMirror:focus {outline:none;}"
|
|
186
|
+
};
|
|
187
|
+
function ze(c, l) {
|
|
188
|
+
t(l, !0), N(c, Re);
|
|
189
|
+
let p = E(l, "markup", 3, ""), h = E(l, "placeholder", 3, "Enter text here..."), g = E(l, "showToolbar", 3, !0), b = E(l, "disabled", 3, !1), x, S = s(null), w = s(!1), T = s(!1);
|
|
190
|
+
function k() {
|
|
191
|
+
return {
|
|
192
|
+
role: "textbox",
|
|
193
|
+
"aria-multiline": "true",
|
|
194
|
+
...l.ariaLabel ? { "aria-label": l.ariaLabel } : {}
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
let j = s(f({
|
|
198
|
+
isBold: !1,
|
|
199
|
+
canBold: !1,
|
|
200
|
+
isItalic: !1,
|
|
201
|
+
canItalic: !1,
|
|
202
|
+
isStrike: !1,
|
|
203
|
+
canStrike: !1,
|
|
204
|
+
isCode: !1,
|
|
205
|
+
canCode: !1,
|
|
206
|
+
isUnderline: !1,
|
|
207
|
+
isSubScript: !1,
|
|
208
|
+
isSuperScript: !1,
|
|
209
|
+
isHeading3: !1,
|
|
210
|
+
isBulletList: !1,
|
|
211
|
+
isOrderedList: !1,
|
|
212
|
+
canUndo: !1,
|
|
213
|
+
canRedo: !1,
|
|
214
|
+
isTable: !1,
|
|
215
|
+
canTable: !1,
|
|
216
|
+
tableHasBorder: !1,
|
|
217
|
+
textAlign: "left"
|
|
218
|
+
}));
|
|
219
|
+
function M() {
|
|
220
|
+
r(S) && a(j, {
|
|
221
|
+
isBold: r(S).isActive("bold"),
|
|
222
|
+
canBold: r(S).can().chain().focus().toggleBold().run(),
|
|
223
|
+
isItalic: r(S).isActive("italic"),
|
|
224
|
+
canItalic: r(S).can().chain().focus().toggleItalic().run(),
|
|
225
|
+
isStrike: r(S).isActive("strike"),
|
|
226
|
+
canStrike: r(S).can().chain().focus().toggleStrike().run(),
|
|
227
|
+
isCode: r(S).isActive("code"),
|
|
228
|
+
canCode: r(S).can().chain().focus().toggleCode().run(),
|
|
229
|
+
isUnderline: r(S).isActive("underline"),
|
|
230
|
+
isSubScript: r(S).isActive("subscript"),
|
|
231
|
+
isSuperScript: r(S).isActive("superscript"),
|
|
232
|
+
isHeading3: r(S).isActive("heading", { level: 3 }),
|
|
233
|
+
isBulletList: r(S).isActive("bulletList"),
|
|
234
|
+
isOrderedList: r(S).isActive("orderedList"),
|
|
235
|
+
canUndo: r(S).can().chain().focus().undo().run(),
|
|
236
|
+
canRedo: r(S).can().chain().focus().redo().run(),
|
|
237
|
+
isTable: r(S).isActive("table"),
|
|
238
|
+
canTable: r(S).can().chain().focus().insertTable().run(),
|
|
239
|
+
tableHasBorder: r(S).getAttributes("table")?.border === "1",
|
|
240
|
+
textAlign: r(S).isActive({ textAlign: "right" }) ? "right" : r(S).isActive({ textAlign: "center" }) ? "center" : r(S).isActive({ textAlign: "justify" }) ? "justify" : "left"
|
|
241
|
+
}, !0);
|
|
242
|
+
}
|
|
243
|
+
te(() => {
|
|
244
|
+
a(S, new le({
|
|
245
|
+
element: x,
|
|
246
|
+
extensions: [
|
|
247
|
+
ue.configure({
|
|
248
|
+
heading: { levels: [
|
|
249
|
+
1,
|
|
250
|
+
2,
|
|
251
|
+
3,
|
|
252
|
+
4,
|
|
253
|
+
5,
|
|
254
|
+
6
|
|
255
|
+
] },
|
|
256
|
+
link: {
|
|
257
|
+
autolink: !1,
|
|
258
|
+
linkOnPaste: !1,
|
|
259
|
+
shouldAutoLink: () => !1
|
|
260
|
+
}
|
|
261
|
+
}),
|
|
262
|
+
de,
|
|
263
|
+
U.configure({ limit: 1e6 }),
|
|
264
|
+
W,
|
|
265
|
+
fe,
|
|
266
|
+
pe.configure({
|
|
267
|
+
types: ["heading", "paragraph"],
|
|
268
|
+
alignments: [
|
|
269
|
+
"left",
|
|
270
|
+
"right",
|
|
271
|
+
"center"
|
|
272
|
+
]
|
|
273
|
+
}),
|
|
274
|
+
G,
|
|
275
|
+
K.configure({
|
|
276
|
+
resizable: !0,
|
|
277
|
+
HTMLAttributes: { border: "0" }
|
|
278
|
+
}),
|
|
279
|
+
me,
|
|
280
|
+
ge,
|
|
281
|
+
he,
|
|
282
|
+
_e.configure({ placeholder: () => h() })
|
|
283
|
+
],
|
|
284
|
+
content: p() || "",
|
|
285
|
+
editable: !b(),
|
|
286
|
+
autofocus: !1,
|
|
287
|
+
editorProps: { attributes: k() },
|
|
288
|
+
onUpdate: ({ editor: e }) => {
|
|
289
|
+
let t = e.getHTML();
|
|
290
|
+
l.onChange && l.onChange(t), M();
|
|
291
|
+
},
|
|
292
|
+
onSelectionUpdate: () => {
|
|
293
|
+
M();
|
|
294
|
+
},
|
|
295
|
+
onFocus: () => {
|
|
296
|
+
M();
|
|
297
|
+
}
|
|
298
|
+
}), !0), M();
|
|
299
|
+
}), L(() => {
|
|
300
|
+
r(S) && r(S).destroy();
|
|
301
|
+
}), O(() => {
|
|
302
|
+
r(S) && p() !== r(S).getHTML() && r(S).commands.setContent(p() || "", { emitUpdate: !1 });
|
|
303
|
+
}), O(() => {
|
|
304
|
+
let e = !b();
|
|
305
|
+
r(S) && r(S).isEditable !== e && r(S).setEditable(e, !1);
|
|
306
|
+
}), O(() => {
|
|
307
|
+
let e = k();
|
|
308
|
+
r(S) && r(S).view.dom.getAttribute("aria-label") !== (e["aria-label"] ?? null) && r(S).setOptions({ editorProps: { attributes: e } });
|
|
309
|
+
});
|
|
310
|
+
function P() {
|
|
311
|
+
a(w, !0);
|
|
312
|
+
}
|
|
313
|
+
function F(e) {
|
|
314
|
+
e.currentTarget.contains(e.relatedTarget) || (a(w, !1), a(T, !1));
|
|
315
|
+
}
|
|
316
|
+
function ee() {
|
|
317
|
+
r(S)?.chain().focus().toggleBold().run();
|
|
318
|
+
}
|
|
319
|
+
function I() {
|
|
320
|
+
r(S)?.chain().focus().toggleItalic().run();
|
|
321
|
+
}
|
|
322
|
+
function R() {
|
|
323
|
+
r(S)?.chain().focus().toggleStrike().run();
|
|
324
|
+
}
|
|
325
|
+
function z() {
|
|
326
|
+
r(S)?.chain().focus().toggleCode().run();
|
|
327
|
+
}
|
|
328
|
+
function ne() {
|
|
329
|
+
r(S)?.chain().focus().toggleUnderline().run();
|
|
330
|
+
}
|
|
331
|
+
function re() {
|
|
332
|
+
r(S)?.chain().focus().toggleSubscript().run();
|
|
333
|
+
}
|
|
334
|
+
function ie() {
|
|
335
|
+
r(S)?.chain().focus().toggleSuperscript().run();
|
|
336
|
+
}
|
|
337
|
+
function ae() {
|
|
338
|
+
r(S)?.chain().focus().toggleHeading({ level: 3 }).run();
|
|
339
|
+
}
|
|
340
|
+
function oe() {
|
|
341
|
+
r(S)?.chain().focus().toggleBulletList().run();
|
|
342
|
+
}
|
|
343
|
+
function se() {
|
|
344
|
+
r(S)?.chain().focus().toggleOrderedList().run();
|
|
345
|
+
}
|
|
346
|
+
function V() {
|
|
347
|
+
r(S)?.chain().focus().undo().run();
|
|
348
|
+
}
|
|
349
|
+
function H() {
|
|
350
|
+
r(S)?.chain().focus().redo().run();
|
|
351
|
+
}
|
|
352
|
+
function ce() {
|
|
353
|
+
r(S)?.chain().focus().insertTable({
|
|
354
|
+
rows: 2,
|
|
355
|
+
cols: 2,
|
|
356
|
+
withHeaderRow: !1
|
|
357
|
+
}).run();
|
|
358
|
+
}
|
|
359
|
+
function ve() {
|
|
360
|
+
r(S)?.chain().focus().addRowAfter().run();
|
|
361
|
+
}
|
|
362
|
+
function q() {
|
|
363
|
+
r(S)?.chain().focus().deleteRow().run();
|
|
364
|
+
}
|
|
365
|
+
function J() {
|
|
366
|
+
r(S)?.chain().focus().addColumnAfter().run();
|
|
367
|
+
}
|
|
368
|
+
function ye() {
|
|
369
|
+
r(S)?.chain().focus().deleteColumn().run();
|
|
370
|
+
}
|
|
371
|
+
function be() {
|
|
372
|
+
r(S)?.chain().focus().deleteTable().run();
|
|
373
|
+
}
|
|
374
|
+
function Y() {
|
|
375
|
+
if (!r(S)) return;
|
|
376
|
+
let e = r(S).getAttributes("table"), t = {
|
|
377
|
+
...e,
|
|
378
|
+
border: e.border === "0" ? "1" : "0"
|
|
379
|
+
};
|
|
380
|
+
r(S).commands.updateAttributes("table", t);
|
|
381
|
+
}
|
|
382
|
+
function X(e) {
|
|
383
|
+
r(S)?.chain().focus().setTextAlign(e).run(), a(T, !1);
|
|
384
|
+
}
|
|
385
|
+
function xe() {
|
|
386
|
+
let e = window.prompt("Enter image URL:");
|
|
387
|
+
e && r(S)?.chain().focus().setImage({ src: e }).run();
|
|
388
|
+
}
|
|
389
|
+
function Z(e) {
|
|
390
|
+
e.preventDefault();
|
|
391
|
+
}
|
|
392
|
+
function Se() {
|
|
393
|
+
if (r(S)) {
|
|
394
|
+
let e = r(S).getHTML();
|
|
395
|
+
e !== p() && l.onChange?.(e), r(S).commands.blur();
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
var Q = Le(), $ = e(Q);
|
|
399
|
+
let Ce;
|
|
400
|
+
var we = e($);
|
|
401
|
+
y(e(we), (e) => x = e, () => x), o(we), o($);
|
|
402
|
+
var Te = u($, 2), Ee = (t) => {
|
|
403
|
+
var s = Ie();
|
|
404
|
+
let c;
|
|
405
|
+
var l = e(s), f = e(l), p = e(f), h = (e) => {
|
|
406
|
+
var t = Me();
|
|
407
|
+
A(t, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5v11zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2zM3 19c0 1.1.9 2 2 2h3V10.02H3V19z\"/></svg>", !0), o(t), d(() => t.disabled = !r(j).canTable), i("click", t, ce), m(e, t);
|
|
408
|
+
};
|
|
409
|
+
v(p, (e) => {
|
|
410
|
+
r(j).isTable || e(h);
|
|
411
|
+
});
|
|
412
|
+
var g = u(p, 2), y = (e) => {
|
|
413
|
+
var t = Ne(), n = D(t);
|
|
414
|
+
let a;
|
|
415
|
+
A(n, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M22,10A2,2 0 0,1 20,12H4A2,2 0 0,1 2,10V3H4V5H8V3H10V5H14V3H16V5H20V3H22V10M4,10H8V7H4V10M10,10H14V7H10V10M20,10V7H16V10H20M11,14H13V17H16V19H13V22H11V19H8V17H11V14Z\"/></svg>", !0), o(n);
|
|
416
|
+
var s = u(n, 2);
|
|
417
|
+
let c;
|
|
418
|
+
A(s, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M9.41,13L12,15.59L14.59,13L16,14.41L13.41,17L16,19.59L14.59,21L12,18.41L9.41,21L8,19.59L10.59,17L8,14.41L9.41,13M22,9A2,2 0 0,1 20,11H4A2,2 0 0,1 2,9V6A2,2 0 0,1 4,4H20A2,2 0 0,1 22,6V9M4,9H8V6H4V9M10,9H14V6H10V9M16,9H20V6H16V9Z\"/></svg>", !0), o(s);
|
|
419
|
+
var l = u(s, 2);
|
|
420
|
+
let f;
|
|
421
|
+
A(l, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M11,2A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H2V2H11M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M15,11H18V8H20V11H23V13H20V16H18V13H15V11Z\"/></svg>", !0), o(l);
|
|
422
|
+
var p = u(l, 2);
|
|
423
|
+
let h;
|
|
424
|
+
A(p, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M4,2H11A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H4A2,2 0 0,1 2,20V4A2,2 0 0,1 4,2M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M17.59,12L15,9.41L16.41,8L19,10.59L21.59,8L23,9.41L20.41,12L23,14.59L21.59,16L19,13.41L16.41,16L15,14.59L17.59,12Z\"/></svg>", !0), o(p);
|
|
425
|
+
var g = u(p, 2);
|
|
426
|
+
let _;
|
|
427
|
+
A(g, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M15.46,15.88L16.88,14.46L19,16.59L21.12,14.46L22.54,15.88L20.41,18L22.54,20.12L21.12,21.54L19,19.41L16.88,21.54L15.46,20.12L17.59,18L15.46,15.88M4,3H18A2,2 0 0,1 20,5V12.08C18.45,11.82 16.92,12.18 15.68,13H12V17H13.08C12.97,17.68 12.97,18.35 13.08,19H4A2,2 0 0,1 2,17V5A2,2 0 0,1 4,3M4,7V11H10V7H4M12,7V11H18V7H12M4,13V17H10V13H4Z\"/></svg>", !0), o(g);
|
|
428
|
+
var v = u(g, 2);
|
|
429
|
+
let y;
|
|
430
|
+
A(v, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M3 3v18h18V3H3zm8 16H5v-6h6v6zm0-8H5V5h6v6zm8 8h-6v-6h6v6zm0-8h-6V5h6v6z\"/></svg>", !0), o(v), d(() => {
|
|
431
|
+
a = C(n, 1, "pie-toolbar-btn", null, a, { active: r(j).isTable }), n.disabled = !r(j).canTable, c = C(s, 1, "pie-toolbar-btn", null, c, { active: r(j).isTable }), s.disabled = !r(j).canTable, f = C(l, 1, "pie-toolbar-btn", null, f, { active: r(j).isTable }), l.disabled = !r(j).canTable, h = C(p, 1, "pie-toolbar-btn", null, h, { active: r(j).isTable }), p.disabled = !r(j).canTable, _ = C(g, 1, "pie-toolbar-btn", null, _, { active: r(j).isTable }), g.disabled = !r(j).canTable, y = C(v, 1, "pie-toolbar-btn", null, y, { active: r(j).tableHasBorder }), v.disabled = !r(j).canTable;
|
|
432
|
+
}), i("click", n, ve), i("click", s, q), i("click", l, J), i("click", p, ye), i("click", g, be), i("click", v, Y), m(e, t);
|
|
433
|
+
};
|
|
434
|
+
v(g, (e) => {
|
|
435
|
+
r(j).isTable && e(y);
|
|
436
|
+
});
|
|
437
|
+
var b = u(g, 2), x = (t) => {
|
|
438
|
+
var s = Fe(), c = D(s);
|
|
439
|
+
let l;
|
|
440
|
+
A(c, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z\"/></svg>", !0), o(c);
|
|
441
|
+
var f = u(c, 2);
|
|
442
|
+
let p;
|
|
443
|
+
A(f, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z\"/></svg>", !0), o(f);
|
|
444
|
+
var h = u(f, 2);
|
|
445
|
+
let g;
|
|
446
|
+
A(h, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z\"/></svg>", !0), o(h);
|
|
447
|
+
var y = u(h, 2);
|
|
448
|
+
let b;
|
|
449
|
+
A(y, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z\"/></svg>", !0), o(y);
|
|
450
|
+
var x = u(y, 2);
|
|
451
|
+
let S;
|
|
452
|
+
A(x, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z\"/></svg>", !0), o(x);
|
|
453
|
+
var w = u(x, 2);
|
|
454
|
+
let E;
|
|
455
|
+
A(w, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M22,18h-2v1h3v1h-4v-2c0-0.55,0.45-1,1-1h2v-1h-3v-1h3c0.55,0,1,0.45,1,1v1C23,17.55,22.55,18,22,18z M5.88,18h2.66 l3.4-5.42h0.12l3.4,5.42h2.66l-4.65-7.27L17.81,4h-2.68l-3.07,4.99h-0.12L8.85,4H6.19l4.32,6.73L5.88,18z\"/></svg>", !0), o(w);
|
|
456
|
+
var O = u(w, 2);
|
|
457
|
+
let k;
|
|
458
|
+
A(O, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M22,7h-2v1h3v1h-4V7c0-0.55,0.45-1,1-1h2V5h-3V4h3c0.55,0,1,0.45,1,1v1C23,6.55,22.55,7,22,7z M5.88,20h2.66l3.4-5.42h0.12 l3.4,5.42h2.66l-4.65-7.27L17.81,6h-2.68l-3.07,4.99h-0.12L8.85,6H6.19l4.32,6.73L5.88,20z\"/></svg>", !0), o(O);
|
|
459
|
+
var M = u(O, 2);
|
|
460
|
+
let N;
|
|
461
|
+
A(M, () => "<svg width=\"20\" height=\"18\" viewBox=\"0 0 30 28\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M27 4V24H29C29.5 24 30 24.5 30 25V27C30 27.5625 29.5 28 29 28H19C18.4375 28 18 27.5625 18 27V25C18 24.5 18.4375 24 19 24H21V16H9V24H11C11.5 24 12 24.5 12 25V27C12 27.5625 11.5 28 11 28H1C0.4375 28 0 27.5625 0 27V25C0 24.5 0.4375 24 1 24H3V4H1C0.4375 4 0 3.5625 0 3V1C0 0.5 0.4375 0 1 0H11C11.5 0 12 0.5 12 1V3C12 3.5625 11.5 4 11 4H9V12H21V4H19C18.4375 4 18 3.5625 18 3V1C18 0.5 18.4375 0 19 0H29C29.5 0 30 0.5 30 1V3C30 3.5625 29.5 4 29 4H27Z\"/></svg>", !0), o(M);
|
|
462
|
+
var P = u(M, 2);
|
|
463
|
+
A(P, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z\"/></svg>", !0), o(P);
|
|
464
|
+
var F = u(P, 2), L = e(F), te = e(L), B = (e) => {
|
|
465
|
+
var t = n();
|
|
466
|
+
A(D(t), () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M65.625 4.75C65.625 7.38672 63.4277 9.4375 60.9375 9.4375H28.125C25.4883 9.4375 23.4375 7.38672 23.4375 4.75C23.4375 2.25977 25.4883 0.0625 28.125 0.0625H60.9375C63.4277 0.0625 65.625 2.25977 65.625 4.75ZM65.625 42.25C65.625 44.8867 63.4277 46.9375 60.9375 46.9375H28.125C25.4883 46.9375 23.4375 44.8867 23.4375 42.25C23.4375 39.7598 25.4883 37.5625 28.125 37.5625H60.9375C63.4277 37.5625 65.625 39.7598 65.625 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z\"/></svg>"), m(e, t);
|
|
467
|
+
}, ce = (e) => {
|
|
468
|
+
var t = n();
|
|
469
|
+
A(D(t), () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M51.5625 4.75C51.5625 7.38672 49.3652 9.4375 46.875 9.4375H18.75C16.1133 9.4375 14.0625 7.38672 14.0625 4.75C14.0625 2.25977 16.1133 0.0625 18.75 0.0625H46.875C49.3652 0.0625 51.5625 2.25977 51.5625 4.75ZM65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5ZM0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61ZM51.5625 42.25C51.5625 44.8867 49.3652 46.9375 46.875 46.9375H18.75C16.1133 46.9375 14.0625 44.8867 14.0625 42.25C14.0625 39.7598 16.1133 37.5625 18.75 37.5625H46.875C49.3652 37.5625 51.5625 39.7598 51.5625 42.25Z\"/></svg>"), m(e, t);
|
|
470
|
+
}, le = (e) => {
|
|
471
|
+
var t = n();
|
|
472
|
+
A(D(t), () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M42.1875 4.75C42.1875 7.38672 39.9902 9.4375 37.5 9.4375H4.6875C2.05078 9.4375 0 7.38672 0 4.75C0 2.25977 2.05078 0.0625 4.6875 0.0625H37.5C39.9902 0.0625 42.1875 2.25977 42.1875 4.75ZM42.1875 42.25C42.1875 44.8867 39.9902 46.9375 37.5 46.9375H4.6875C2.05078 46.9375 0 44.8867 0 42.25C0 39.7598 2.05078 37.5625 4.6875 37.5625H37.5C39.9902 37.5625 42.1875 39.7598 42.1875 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z\"/></svg>"), m(e, t);
|
|
473
|
+
};
|
|
474
|
+
v(te, (e) => {
|
|
475
|
+
r(j).textAlign === "right" ? e(B) : r(j).textAlign === "center" ? e(ce, 1) : e(le, -1);
|
|
476
|
+
}), _(2), o(L);
|
|
477
|
+
var ue = u(L, 2), de = (t) => {
|
|
478
|
+
var n = Pe(), r = e(n);
|
|
479
|
+
A(r, () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M42.1875 4.75C42.1875 7.38672 39.9902 9.4375 37.5 9.4375H4.6875C2.05078 9.4375 0 7.38672 0 4.75C0 2.25977 2.05078 0.0625 4.6875 0.0625H37.5C39.9902 0.0625 42.1875 2.25977 42.1875 4.75ZM42.1875 42.25C42.1875 44.8867 39.9902 46.9375 37.5 46.9375H4.6875C2.05078 46.9375 0 44.8867 0 42.25C0 39.7598 2.05078 37.5625 4.6875 37.5625H37.5C39.9902 37.5625 42.1875 39.7598 42.1875 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z\"/></svg>", !0), o(r);
|
|
480
|
+
var a = u(r, 2);
|
|
481
|
+
A(a, () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M51.5625 4.75C51.5625 7.38672 49.3652 9.4375 46.875 9.4375H18.75C16.1133 9.4375 14.0625 7.38672 14.0625 4.75C14.0625 2.25977 16.1133 0.0625 18.75 0.0625H46.875C49.3652 0.0625 51.5625 2.25977 51.5625 4.75ZM65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5ZM0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61ZM51.5625 42.25C51.5625 44.8867 49.3652 46.9375 46.875 46.9375H18.75C16.1133 46.9375 14.0625 44.8867 14.0625 42.25C14.0625 39.7598 16.1133 37.5625 18.75 37.5625H46.875C49.3652 37.5625 51.5625 39.7598 51.5625 42.25Z\"/></svg>", !0), o(a);
|
|
482
|
+
var s = u(a, 2);
|
|
483
|
+
A(s, () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M65.625 4.75C65.625 7.38672 63.4277 9.4375 60.9375 9.4375H28.125C25.4883 9.4375 23.4375 7.38672 23.4375 4.75C23.4375 2.25977 25.4883 0.0625 28.125 0.0625H60.9375C63.4277 0.0625 65.625 2.25977 65.625 4.75ZM65.625 42.25C65.625 44.8867 63.4277 46.9375 60.9375 46.9375H28.125C25.4883 46.9375 23.4375 44.8867 23.4375 42.25C23.4375 39.7598 25.4883 37.5625 28.125 37.5625H60.9375C63.4277 37.5625 65.625 39.7598 65.625 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z\"/></svg>", !0), o(s), o(n), i("click", r, () => X("left")), i("click", a, () => X("center")), i("click", s, () => X("right")), m(t, n);
|
|
484
|
+
};
|
|
485
|
+
v(ue, (e) => {
|
|
486
|
+
r(T) && e(de);
|
|
487
|
+
}), o(F);
|
|
488
|
+
var U = u(F, 2);
|
|
489
|
+
let fe;
|
|
490
|
+
A(U, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z\"/></svg>", !0), o(U);
|
|
491
|
+
var W = u(U, 2);
|
|
492
|
+
let pe;
|
|
493
|
+
A(W, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z\"/></svg>", !0), o(W);
|
|
494
|
+
var G = u(W, 2);
|
|
495
|
+
A(G, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z\"/></svg>", !0), o(G);
|
|
496
|
+
var K = u(G, 2);
|
|
497
|
+
A(K, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z\"/></svg>", !0), o(K), d(() => {
|
|
498
|
+
l = C(c, 1, "pie-toolbar-btn", null, l, { active: r(j).isBold }), c.disabled = !r(j).canBold, p = C(f, 1, "pie-toolbar-btn", null, p, { active: r(j).isItalic }), f.disabled = !r(j).canItalic, g = C(h, 1, "pie-toolbar-btn", null, g, { active: r(j).isStrike }), h.disabled = !r(j).canStrike, b = C(y, 1, "pie-toolbar-btn", null, b, { active: r(j).isCode }), y.disabled = !r(j).canCode, S = C(x, 1, "pie-toolbar-btn", null, S, { active: r(j).isUnderline }), E = C(w, 1, "pie-toolbar-btn", null, E, { active: r(j).isSubScript }), k = C(O, 1, "pie-toolbar-btn", null, k, { active: r(j).isSuperScript }), N = C(M, 1, "pie-toolbar-btn", null, N, { active: r(j).isHeading3 }), fe = C(U, 1, "pie-toolbar-btn", null, fe, { active: r(j).isBulletList }), pe = C(W, 1, "pie-toolbar-btn", null, pe, { active: r(j).isOrderedList }), G.disabled = !r(j).canUndo, K.disabled = !r(j).canRedo;
|
|
499
|
+
}), i("click", c, ee), i("click", f, I), i("click", h, R), i("click", y, z), i("click", x, ne), i("click", w, re), i("click", O, ie), i("click", M, ae), i("click", P, xe), i("click", L, () => a(T, !r(T))), i("click", U, oe), i("click", W, se), i("click", G, V), i("click", K, H), m(t, s);
|
|
500
|
+
};
|
|
501
|
+
v(b, (e) => {
|
|
502
|
+
r(j).isTable || e(x);
|
|
503
|
+
}), o(f);
|
|
504
|
+
var S = u(f, 2);
|
|
505
|
+
A(S, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"/></svg>", !0), o(S), o(l), o(s), d(() => {
|
|
506
|
+
c = C(s, 1, "toolbar", null, c, { focused: r(w) }), s.inert = !r(w);
|
|
507
|
+
}), i("mousedown", s, Z), i("click", S, Se), m(t, s);
|
|
508
|
+
};
|
|
509
|
+
v(Te, (e) => {
|
|
510
|
+
g() && r(S) && e(Ee);
|
|
511
|
+
}), o(Q), d(() => Ce = C($, 1, "editor-holder", null, Ce, { disabled: b() })), i("focusin", Q, P), i("focusout", Q, F), m(c, Q), B();
|
|
512
|
+
}
|
|
513
|
+
h([
|
|
514
|
+
"focusin",
|
|
515
|
+
"focusout",
|
|
516
|
+
"mousedown",
|
|
517
|
+
"click"
|
|
518
|
+
]);
|
|
519
|
+
//#endregion
|
|
520
|
+
//#region ../../lib-svelte/editable-html-tiptap-svelte/dist/index.js
|
|
521
|
+
var Be = ze, Ve = R("<button type=\"button\" role=\"radio\"><span class=\"cell-key svelte-1u97j9p\"> </span> <span class=\"cell-label svelte-1u97j9p\"> </span></button>"), He = R("<div class=\"region-picker svelte-1u97j9p\" role=\"radiogroup\" aria-label=\"Correct region\"></div>"), Ue = {
|
|
522
|
+
hash: "svelte-1u97j9p",
|
|
523
|
+
code: ".region-picker.svelte-1u97j9p {display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:6px;}.region-cell.svelte-1u97j9p {display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:8px 10px;border:1.5px solid #cbd5e1;border-radius:6px;background:#ffffff;cursor:pointer;text-align:left;font-size:12px;}.region-cell.svelte-1u97j9p:hover {background:#f1f5f9;}.region-cell.selected.svelte-1u97j9p {border-color:#2563eb;background:#eff6ff;}.cell-key.svelte-1u97j9p {font-family:ui-monospace, SFMono-Regular, Menlo, monospace;font-size:11px;color:#64748b;}.cell-label.svelte-1u97j9p {font-weight:500;color:#0f172a;}"
|
|
524
|
+
};
|
|
525
|
+
function We(n, a) {
|
|
526
|
+
t(a, !0), N(n, Ue);
|
|
527
|
+
let s = E(a, "circles", 7), f = E(a, "regionLabels", 23, () => ({})), h = E(a, "value", 7), g = E(a, "onchange", 7), _ = p(() => ie(s()?.length || 0));
|
|
528
|
+
function v(e) {
|
|
529
|
+
let t = H(e), n = f()?.[t];
|
|
530
|
+
return n && n.trim().length > 0 ? n : oe(s() || [], e);
|
|
531
|
+
}
|
|
532
|
+
function y(e) {
|
|
533
|
+
return ce(e, h());
|
|
534
|
+
}
|
|
535
|
+
var b = {
|
|
536
|
+
get circles() {
|
|
537
|
+
return s();
|
|
538
|
+
},
|
|
539
|
+
set circles(e) {
|
|
540
|
+
s(e), c();
|
|
541
|
+
},
|
|
542
|
+
get regionLabels() {
|
|
543
|
+
return f();
|
|
544
|
+
},
|
|
545
|
+
set regionLabels(e = {}) {
|
|
546
|
+
f(e), c();
|
|
547
|
+
},
|
|
548
|
+
get value() {
|
|
549
|
+
return h();
|
|
550
|
+
},
|
|
551
|
+
set value(e) {
|
|
552
|
+
h(e), c();
|
|
553
|
+
},
|
|
554
|
+
get onchange() {
|
|
555
|
+
return g();
|
|
556
|
+
},
|
|
557
|
+
set onchange(e) {
|
|
558
|
+
g(e), c();
|
|
559
|
+
}
|
|
560
|
+
}, S = He();
|
|
561
|
+
return T(S, 21, () => r(_), (e) => H(e), (t, n) => {
|
|
562
|
+
var a = Ve();
|
|
563
|
+
let s;
|
|
564
|
+
var c = e(a), f = l(c, !0), p = l(u(c, 2), !0);
|
|
565
|
+
o(a), d((e, t, n, r) => {
|
|
566
|
+
s = C(a, 1, "region-cell svelte-1u97j9p", null, s, { selected: e }), x(a, "aria-checked", t), z(f, n), z(p, r);
|
|
567
|
+
}, [
|
|
568
|
+
() => y(r(n)),
|
|
569
|
+
() => y(r(n)),
|
|
570
|
+
() => H(r(n)) || "—",
|
|
571
|
+
() => v(r(n))
|
|
572
|
+
]), i("click", a, () => g()(r(n))), m(t, a);
|
|
573
|
+
}), o(S), m(n, S), B(b);
|
|
574
|
+
}
|
|
575
|
+
h(["click"]), P(We, {
|
|
576
|
+
circles: {},
|
|
577
|
+
regionLabels: {},
|
|
578
|
+
value: {},
|
|
579
|
+
onchange: {}
|
|
580
|
+
}, [], [], { mode: "open" });
|
|
581
|
+
//#endregion
|
|
582
|
+
//#region src/author/Author.svelte
|
|
583
|
+
var Ge = R("<div class=\"field-group svelte-13ppn6m\"><div class=\"field-header svelte-13ppn6m\"> </div> <!></div>"), Ke = R("<label class=\"circle-label-row svelte-13ppn6m\"><span></span> <input type=\"text\" class=\"svelte-13ppn6m\"/></label>"), qe = R("<div class=\"hint svelte-13ppn6m\">Add at least one tile; each tile needs a correct region and either a label (text or simple HTML) or an\n image URL plus short alt text.</div>"), Je = R("<div class=\"tile-field-full svelte-13ppn6m\"><button type=\"button\" class=\"btn-ghost svelte-13ppn6m\">Remove image</button></div>"), Ye = R("<li class=\"tile-row svelte-13ppn6m\"><div class=\"tile-row-header svelte-13ppn6m\"><div class=\"tile-inputs svelte-13ppn6m\"><label class=\"svelte-13ppn6m\"><span>ID</span> <input type=\"text\" class=\"svelte-13ppn6m\"/></label> <label class=\"label-input svelte-13ppn6m\"><span>Label</span> <input type=\"text\" class=\"svelte-13ppn6m\"/></label> <label class=\"label-input tile-field-full svelte-13ppn6m\"><span>Image URL (optional)</span> <input type=\"text\" placeholder=\"https://… or data:image/…\" class=\"svelte-13ppn6m\"/></label> <label class=\"label-input tile-field-full svelte-13ppn6m\"><span>Image alt (required if image URL is set)</span> <input type=\"text\" class=\"svelte-13ppn6m\"/></label> <!></div> <div class=\"tile-actions svelte-13ppn6m\"><button type=\"button\" class=\"btn-ghost svelte-13ppn6m\" aria-label=\"Move up\">↑</button> <button type=\"button\" class=\"btn-ghost svelte-13ppn6m\" aria-label=\"Move down\">↓</button> <button type=\"button\" class=\"btn-ghost danger svelte-13ppn6m\" aria-label=\"Remove\">✕</button></div></div> <div class=\"tile-region svelte-13ppn6m\"><div class=\"region-header svelte-13ppn6m\">Correct region</div> <!></div></li>"), Xe = R("<label class=\"override-row svelte-13ppn6m\"><span class=\"override-key svelte-13ppn6m\"> </span> <input type=\"text\" class=\"svelte-13ppn6m\"/></label>"), Ze = R("<div class=\"preview-diagram svelte-13ppn6m\"><!></div>"), Qe = R("<p class=\"hint preview-diagram-placeholder svelte-13ppn6m\">Add at least one tile to see the diagram.</p>"), $e = R("<p class=\"hint preview-diagram-placeholder svelte-13ppn6m\">Exactly two circles are required for the preview.</p>"), et = R("<img alt=\"\" class=\"preview-thumb svelte-13ppn6m\" aria-hidden=\"true\"/>"), tt = R("<li class=\"svelte-13ppn6m\"><span class=\"preview-tile svelte-13ppn6m\"><!> </span> <span class=\"preview-arrow svelte-13ppn6m\">→</span> <span class=\"preview-region svelte-13ppn6m\"> </span></li>"), nt = R("<div class=\"preview-list-heading svelte-13ppn6m\">Correct regions</div> <ol class=\"preview-list svelte-13ppn6m\"></ol>", 1), rt = R("<div class=\"author-shell svelte-13ppn6m\"><div class=\"editor-column svelte-13ppn6m\"><!> <!> <div class=\"field-group svelte-13ppn6m\"><div class=\"field-header svelte-13ppn6m\">Circles</div> <p class=\"hint circle-count-note svelte-13ppn6m\">2 circles (4 regions).</p> <div class=\"circle-labels svelte-13ppn6m\"></div></div> <div class=\"field-group svelte-13ppn6m\"><div class=\"field-header-row svelte-13ppn6m\"><span class=\"field-header svelte-13ppn6m\">Tiles</span> <button type=\"button\" class=\"btn-add svelte-13ppn6m\">+ Add tile</button></div> <!> <ul class=\"tile-list svelte-13ppn6m\"></ul></div> <details class=\"field-group svelte-13ppn6m\"><summary class=\"field-header svelte-13ppn6m\">Region labels (advanced)</summary> <p class=\"hint svelte-13ppn6m\">Override the auto-composed region labels that delivery uses for aria-labels and visible region chrome.</p> <!></details></div> <button type=\"button\" class=\"split-gutter svelte-13ppn6m\" role=\"slider\" aria-orientation=\"vertical\" aria-label=\"Resize editor and preview panels\"></button> <div class=\"preview-column svelte-13ppn6m\"><div class=\"preview-header svelte-13ppn6m\">Preview</div> <div class=\"preview-note svelte-13ppn6m\">Live diagram with each tile in its authored <em>correct region</em>. Drag the vertical handle (or use\n arrow keys when it is focused) to change the editor / preview split.</div> <div class=\"preview-summary svelte-13ppn6m\"><div><strong>Circles:</strong> </div> <div><strong>Scoring:</strong> </div> <div><strong>Tiles:</strong> </div></div> <!> <!></div></div>"), it = R("<div class=\"venn-author svelte-13ppn6m\"><!></div>"), at = {
|
|
584
|
+
hash: "svelte-13ppn6m",
|
|
585
|
+
code: ".venn-author.svelte-13ppn6m {padding:24px;font-family:system-ui, -apple-system, Segoe UI, Roboto, sans-serif;color:#0f172a;box-sizing:border-box;--vc-focus-ring: var(\n --pie-focus-outline,\n var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565c0))\n );}.author-shell.svelte-13ppn6m {display:flex;flex-direction:row;align-items:stretch;gap:0;width:100%;min-height:min(72vh, 720px);max-height:min(85vh, 960px);box-sizing:border-box;}.editor-column.svelte-13ppn6m {display:flex;flex-direction:column;gap:20px;flex-shrink:0;overflow:auto;min-width:0;}.split-gutter.svelte-13ppn6m {flex:0 0 6px;width:6px;margin:0;padding:0;border:none;border-left:1px solid #cbd5e1;border-right:1px solid #cbd5e1;cursor:col-resize;touch-action:none;background:#e2e8f0;align-self:stretch;}.split-gutter.svelte-13ppn6m:hover,\n .split-gutter.svelte-13ppn6m:focus-visible {background:#cbd5e1;}.split-gutter.svelte-13ppn6m:focus-visible {outline:2px solid var(--vc-focus-ring, #1565c0);outline-offset:2px;}\n @media (max-width: 900px) {.author-shell.svelte-13ppn6m {flex-direction:column;min-height:unset;max-height:unset;}.editor-column.svelte-13ppn6m {width:100% !important;flex:none;max-width:none;}.split-gutter.svelte-13ppn6m {display:none;}.preview-column.svelte-13ppn6m {flex:none;width:100%;}\n }.field-group.svelte-13ppn6m {border:1px solid #e2e8f0;border-radius:8px;padding:16px;background:#ffffff;}.field-header.svelte-13ppn6m,\n .field-header-row.svelte-13ppn6m {display:flex;align-items:center;justify-content:space-between;font-weight:600;font-size:14px;margin-bottom:12px;color:#0f172a;}.field-header-row.svelte-13ppn6m {gap:8px;}.btn-add.svelte-13ppn6m {background:#2563eb;color:#ffffff;border:none;padding:6px 10px;border-radius:6px;font-size:12px;cursor:pointer;}.btn-add.svelte-13ppn6m:hover {background:#1d4ed8;}.btn-ghost.svelte-13ppn6m {background:transparent;border:1px solid #cbd5e1;border-radius:4px;padding:2px 8px;cursor:pointer;font-size:13px;}.btn-ghost.svelte-13ppn6m:hover:not(:disabled) {background:#f1f5f9;}.btn-ghost.svelte-13ppn6m:disabled {opacity:0.4;cursor:not-allowed;}.btn-ghost.danger.svelte-13ppn6m {color:#bf0d00;}.circle-labels.svelte-13ppn6m {display:flex;flex-direction:column;gap:8px;}.circle-count-note.svelte-13ppn6m {margin:0 0 4px 0;}.circle-label-row.svelte-13ppn6m {display:grid;grid-template-columns:120px minmax(0, 1fr);align-items:center;gap:8px;font-size:13px;}.circle-label-row.svelte-13ppn6m input:where(.svelte-13ppn6m),\n .tile-inputs.svelte-13ppn6m input:where(.svelte-13ppn6m),\n .override-row.svelte-13ppn6m input:where(.svelte-13ppn6m) {padding:6px 8px;border:1px solid #cbd5e1;border-radius:4px;font-size:13px;width:100%;box-sizing:border-box;}.tile-list.svelte-13ppn6m {list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px;}.tile-row.svelte-13ppn6m {border:1px solid #e2e8f0;border-radius:6px;padding:10px 12px;background:#f8fafc;}.tile-row-header.svelte-13ppn6m {display:flex;gap:8px;align-items:center;}.tile-inputs.svelte-13ppn6m {flex:1;display:grid;grid-template-columns:140px 1fr;gap:8px;}.tile-inputs.svelte-13ppn6m label:where(.svelte-13ppn6m) {display:flex;flex-direction:column;gap:2px;font-size:12px;color:#475569;}.tile-inputs.svelte-13ppn6m .tile-field-full:where(.svelte-13ppn6m) {grid-column:1 / -1;}.tile-actions.svelte-13ppn6m {display:flex;gap:4px;}.tile-region.svelte-13ppn6m {margin-top:8px;}.region-header.svelte-13ppn6m {font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;}.override-row.svelte-13ppn6m {display:grid;grid-template-columns:100px minmax(0, 1fr);align-items:center;gap:8px;font-size:13px;margin-top:6px;}.override-key.svelte-13ppn6m {font-family:ui-monospace, SFMono-Regular, Menlo, monospace;font-size:12px;color:#64748b;}.hint.svelte-13ppn6m {font-size:12px;color:#64748b;margin:8px 0;}.preview-column.svelte-13ppn6m {flex:1 1 auto;min-width:0;overflow:auto;border:1px solid #e2e8f0;border-radius:8px;padding:16px;background:#ffffff;}.preview-diagram.svelte-13ppn6m {margin:12px 0 16px 0;max-width:100%;overflow-x:auto;}.preview-diagram.svelte-13ppn6m .venn-root {padding-top:8px;}.preview-list-heading.svelte-13ppn6m {font-size:12px;font-weight:600;color:#475569;margin:8px 0 6px 0;}.preview-diagram-placeholder.svelte-13ppn6m {margin:12px 0;}.preview-header.svelte-13ppn6m {font-weight:600;font-size:14px;margin-bottom:8px;}.preview-note.svelte-13ppn6m {font-size:12px;color:#64748b;margin-bottom:12px;}.preview-summary.svelte-13ppn6m {font-size:13px;line-height:1.5;color:#334155;margin-bottom:10px;}.preview-list.svelte-13ppn6m {list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:4px;}.preview-list.svelte-13ppn6m li:where(.svelte-13ppn6m) {display:flex;align-items:center;gap:6px;font-size:13px;}.preview-tile.svelte-13ppn6m {display:inline-flex;align-items:center;gap:6px;background:#eff6ff;border:1px solid #bfdbfe;border-radius:4px;padding:2px 6px;color:#1d4ed8;}.preview-thumb.svelte-13ppn6m {width:22px;height:22px;object-fit:contain;flex-shrink:0;}.preview-arrow.svelte-13ppn6m {color:#94a3b8;}.preview-region.svelte-13ppn6m {color:#0f172a;}"
|
|
586
|
+
};
|
|
587
|
+
function ot(n, f) {
|
|
588
|
+
t(f, !0), N(n, at);
|
|
589
|
+
let h = E(f, "model", 7), g = E(f, "configuration", 7), _ = p(() => X(V.configuration, g())), b = [{
|
|
590
|
+
label: "Partial credit per tile",
|
|
591
|
+
value: "partialPerTile"
|
|
592
|
+
}, {
|
|
593
|
+
label: "All or nothing",
|
|
594
|
+
value: "allOrNothing"
|
|
595
|
+
}];
|
|
596
|
+
function C(e) {
|
|
597
|
+
f.$$host.model = e, f.$$host.dispatchEvent(new ve(e));
|
|
598
|
+
}
|
|
599
|
+
function k() {
|
|
600
|
+
return ae(h() || void 0);
|
|
601
|
+
}
|
|
602
|
+
function A(e) {
|
|
603
|
+
C({
|
|
604
|
+
...k(),
|
|
605
|
+
...e
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
function P(e) {
|
|
609
|
+
A({ prompt: e });
|
|
610
|
+
}
|
|
611
|
+
function L(e, t) {
|
|
612
|
+
A({ circles: k().circles.map((n, r) => r === e ? {
|
|
613
|
+
...n,
|
|
614
|
+
label: t
|
|
615
|
+
} : n) });
|
|
616
|
+
}
|
|
617
|
+
function R() {
|
|
618
|
+
let e = k(), t = {
|
|
619
|
+
id: `tile-${Date.now().toString(36)}-${Math.floor(Math.random() * 1e3).toString(36)}`,
|
|
620
|
+
label: "New tile",
|
|
621
|
+
correctRegion: []
|
|
622
|
+
};
|
|
623
|
+
A({ tiles: [...e.tiles, t] });
|
|
624
|
+
}
|
|
625
|
+
function te(e) {
|
|
626
|
+
let t = k().tiles.slice();
|
|
627
|
+
t.splice(e, 1), A({ tiles: t });
|
|
628
|
+
}
|
|
629
|
+
function ce(e, t) {
|
|
630
|
+
let n = k(), r = e + t;
|
|
631
|
+
if (r < 0 || r >= n.tiles.length) return;
|
|
632
|
+
let i = n.tiles.slice();
|
|
633
|
+
[i[e], i[r]] = [i[r], i[e]], A({ tiles: i });
|
|
634
|
+
}
|
|
635
|
+
function le(e, t) {
|
|
636
|
+
A({ tiles: k().tiles.map((n, r) => r === e ? {
|
|
637
|
+
...n,
|
|
638
|
+
label: t
|
|
639
|
+
} : n) });
|
|
640
|
+
}
|
|
641
|
+
function ue(e, t) {
|
|
642
|
+
let n = k(), r = t.trim();
|
|
643
|
+
A({ tiles: n.tiles.map((t, n) => n === e ? {
|
|
644
|
+
...t,
|
|
645
|
+
...r ? { imageUrl: r } : {
|
|
646
|
+
imageUrl: void 0,
|
|
647
|
+
imageAlt: void 0
|
|
648
|
+
}
|
|
649
|
+
} : t) });
|
|
650
|
+
}
|
|
651
|
+
function de(e, t) {
|
|
652
|
+
A({ tiles: k().tiles.map((n, r) => r === e ? {
|
|
653
|
+
...n,
|
|
654
|
+
imageAlt: t.trim() || void 0
|
|
655
|
+
} : n) });
|
|
656
|
+
}
|
|
657
|
+
function U(e) {
|
|
658
|
+
A({ tiles: k().tiles.map((t, n) => {
|
|
659
|
+
if (n !== e) return t;
|
|
660
|
+
let { imageUrl: r, imageAlt: i, ...a } = t;
|
|
661
|
+
return a;
|
|
662
|
+
}) });
|
|
663
|
+
}
|
|
664
|
+
function fe(e, t) {
|
|
665
|
+
A({ tiles: k().tiles.map((n, r) => r === e ? {
|
|
666
|
+
...n,
|
|
667
|
+
id: t
|
|
668
|
+
} : n) });
|
|
669
|
+
}
|
|
670
|
+
function W(e, t) {
|
|
671
|
+
A({ tiles: k().tiles.map((n, r) => r === e ? {
|
|
672
|
+
...n,
|
|
673
|
+
correctRegion: ne(t)
|
|
674
|
+
} : n) });
|
|
675
|
+
}
|
|
676
|
+
function pe(e, t) {
|
|
677
|
+
let n = { ...k().regionLabels || {} };
|
|
678
|
+
t.trim().length === 0 ? delete n[e] : n[e] = t, A({ regionLabels: n });
|
|
679
|
+
}
|
|
680
|
+
let G = p(k), K = p(() => ie(r(G).circles?.length || 0)), me = p(() => {
|
|
681
|
+
let e = /* @__PURE__ */ new Set();
|
|
682
|
+
return r(G).tiles.filter((t) => e.has(t.id) ? !1 : (e.add(t.id), !0));
|
|
683
|
+
}), he = p(() => se({
|
|
684
|
+
...r(G),
|
|
685
|
+
tiles: r(me)
|
|
686
|
+
})), ge = p(() => ({
|
|
687
|
+
circles: r(G).circles,
|
|
688
|
+
tiles: r(me),
|
|
689
|
+
regionLabels: r(G).regionLabels ?? {},
|
|
690
|
+
prompt: r(G).promptEnabled === !1 ? null : r(G).prompt ?? null,
|
|
691
|
+
disabled: !0,
|
|
692
|
+
env: { mode: "view" }
|
|
693
|
+
})), _e = s(null), q = s(0), J = s(null);
|
|
694
|
+
O(() => {
|
|
695
|
+
r(q) > 0 && r(J) === null && a(J, Math.floor((r(q) - 6) / 2), !0);
|
|
696
|
+
}), O(() => {
|
|
697
|
+
if (r(q) <= 0 || r(J) === null) return;
|
|
698
|
+
let e = r(q) - 200 - 6;
|
|
699
|
+
r(J) > e && a(J, e), r(J) < 260 && a(J, 260);
|
|
700
|
+
});
|
|
701
|
+
let ye = p(() => {
|
|
702
|
+
let e = r(q);
|
|
703
|
+
if (!e) return "50%";
|
|
704
|
+
let t = e - 200 - 6, n = r(J) ?? Math.floor((e - 6) / 2);
|
|
705
|
+
return `${Math.min(Math.max(n, 260), t)}px`;
|
|
706
|
+
});
|
|
707
|
+
function be(e) {
|
|
708
|
+
let t = r(_e);
|
|
709
|
+
if (!t) return;
|
|
710
|
+
e.preventDefault();
|
|
711
|
+
let n = t, i = e.currentTarget;
|
|
712
|
+
i.setPointerCapture(e.pointerId);
|
|
713
|
+
let o = n.getBoundingClientRect(), s = e.clientX, c = r(J) ?? Math.floor((o.width - 6) / 2);
|
|
714
|
+
function l(e) {
|
|
715
|
+
let t = n.getBoundingClientRect().width - 200 - 6, r = e.clientX - s;
|
|
716
|
+
a(J, Math.min(Math.max(c + r, 260), t), !0);
|
|
717
|
+
}
|
|
718
|
+
function u(e) {
|
|
719
|
+
try {
|
|
720
|
+
i.releasePointerCapture(e.pointerId);
|
|
721
|
+
} catch {}
|
|
722
|
+
window.removeEventListener("pointermove", l), window.removeEventListener("pointerup", u), window.removeEventListener("pointercancel", u);
|
|
723
|
+
}
|
|
724
|
+
window.addEventListener("pointermove", l), window.addEventListener("pointerup", u), window.addEventListener("pointercancel", u);
|
|
725
|
+
}
|
|
726
|
+
function Y(e) {
|
|
727
|
+
let t = r(_e);
|
|
728
|
+
if (!t || r(J) === null) return;
|
|
729
|
+
let n = t.getBoundingClientRect().width - 200 - 6;
|
|
730
|
+
e.key === "ArrowLeft" ? (e.preventDefault(), a(J, Math.max(260, r(J) - 24), !0)) : e.key === "ArrowRight" && (e.preventDefault(), a(J, Math.min(n, r(J) + 24), !0));
|
|
731
|
+
}
|
|
732
|
+
var Q = {
|
|
733
|
+
get model() {
|
|
734
|
+
return h();
|
|
735
|
+
},
|
|
736
|
+
set model(e) {
|
|
737
|
+
h(e), c();
|
|
738
|
+
},
|
|
739
|
+
get configuration() {
|
|
740
|
+
return g();
|
|
741
|
+
},
|
|
742
|
+
set configuration(e) {
|
|
743
|
+
g(e), c();
|
|
744
|
+
}
|
|
745
|
+
}, $ = it(), Ce = e($);
|
|
746
|
+
{
|
|
747
|
+
let t = (e) => {
|
|
748
|
+
{
|
|
749
|
+
let t = p(() => ({
|
|
750
|
+
Settings: { promptEnabled: r(_).prompt?.settings && Z(r(_).prompt.label) },
|
|
751
|
+
Properties: {
|
|
752
|
+
teacherInstructionsEnabled: r(_).teacherInstructions?.settings && Z(r(_).teacherInstructions.label),
|
|
753
|
+
scoringPolicy: r(_).scoringPolicy?.settings && Se(r(_).scoringPolicy.label, b)
|
|
754
|
+
}
|
|
755
|
+
}));
|
|
756
|
+
je(e, {
|
|
757
|
+
get model() {
|
|
758
|
+
return r(G);
|
|
759
|
+
},
|
|
760
|
+
get configuration() {
|
|
761
|
+
return r(_);
|
|
762
|
+
},
|
|
763
|
+
get groups() {
|
|
764
|
+
return r(t);
|
|
765
|
+
},
|
|
766
|
+
onChangeModel: (e) => A(e)
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
}, n = p(() => r(_).settingsPanelDisabled === !0 || !xe(r(_)));
|
|
770
|
+
Ae(Ce, {
|
|
771
|
+
get hideSettings() {
|
|
772
|
+
return r(n);
|
|
773
|
+
},
|
|
774
|
+
settings: t,
|
|
775
|
+
children: (t, n) => {
|
|
776
|
+
var s = rt(), c = e(s);
|
|
777
|
+
let f;
|
|
778
|
+
var h = e(c), g = (t) => {
|
|
779
|
+
var n = Ge(), i = e(n), a = l(i, !0), s = u(i, 2);
|
|
780
|
+
{
|
|
781
|
+
let e = p(() => r(G).teacherInstructions || ""), t = p(() => r(_).teacherInstructions?.label);
|
|
782
|
+
Be(s, {
|
|
783
|
+
get markup() {
|
|
784
|
+
return r(e);
|
|
785
|
+
},
|
|
786
|
+
onChange: (e) => A({ teacherInstructions: e }),
|
|
787
|
+
get ariaLabel() {
|
|
788
|
+
return r(t);
|
|
789
|
+
}
|
|
790
|
+
});
|
|
791
|
+
}
|
|
792
|
+
o(n), d(() => z(a, r(_).teacherInstructions?.label)), m(t, n);
|
|
793
|
+
};
|
|
794
|
+
v(h, (e) => {
|
|
795
|
+
r(G).teacherInstructionsEnabled !== !1 && e(g);
|
|
796
|
+
});
|
|
797
|
+
var b = u(h, 2), C = (t) => {
|
|
798
|
+
var n = Ge(), i = e(n), a = l(i, !0), s = u(i, 2);
|
|
799
|
+
{
|
|
800
|
+
let e = p(() => r(G).prompt || ""), t = p(() => r(_).prompt?.label);
|
|
801
|
+
Be(s, {
|
|
802
|
+
get markup() {
|
|
803
|
+
return r(e);
|
|
804
|
+
},
|
|
805
|
+
onChange: P,
|
|
806
|
+
placeholder: "Enter a prompt for the Venn classification question...",
|
|
807
|
+
get ariaLabel() {
|
|
808
|
+
return r(t);
|
|
809
|
+
}
|
|
810
|
+
});
|
|
811
|
+
}
|
|
812
|
+
o(n), d(() => z(a, r(_).prompt?.label)), m(t, n);
|
|
813
|
+
};
|
|
814
|
+
v(b, (e) => {
|
|
815
|
+
r(G).promptEnabled !== !1 && e(C);
|
|
816
|
+
});
|
|
817
|
+
var E = u(b, 2), O = u(e(E), 4);
|
|
818
|
+
T(O, 21, () => r(G).circles, w, (t, n, a) => {
|
|
819
|
+
var s = Ke(), c = e(s);
|
|
820
|
+
c.textContent = `Circle ${a + 1} label`;
|
|
821
|
+
var l = u(c, 2);
|
|
822
|
+
F(l), o(s), d(() => I(l, r(n).label)), i("input", l, (e) => L(a, e.currentTarget.value)), m(t, s);
|
|
823
|
+
}), o(O), o(E);
|
|
824
|
+
var k = u(E, 2), N = e(k), B = u(e(N), 2);
|
|
825
|
+
o(N);
|
|
826
|
+
var ne = u(N, 2), ie = (e) => {
|
|
827
|
+
m(e, qe());
|
|
828
|
+
};
|
|
829
|
+
v(ne, (e) => {
|
|
830
|
+
r(G).tiles.length === 0 && e(ie);
|
|
831
|
+
});
|
|
832
|
+
var ae = u(ne, 2);
|
|
833
|
+
T(ae, 21, () => r(G).tiles, w, (t, n, a) => {
|
|
834
|
+
var s = Ye(), c = e(s), f = e(c), h = e(f), g = u(e(h), 2);
|
|
835
|
+
F(g), o(h);
|
|
836
|
+
var _ = u(h, 2), y = u(e(_), 2);
|
|
837
|
+
F(y), o(_);
|
|
838
|
+
var b = u(_, 2), x = u(e(b), 2);
|
|
839
|
+
F(x), o(b);
|
|
840
|
+
var S = u(b, 2), C = u(e(S), 2);
|
|
841
|
+
F(C), o(S);
|
|
842
|
+
var w = u(S, 2), T = (e) => {
|
|
843
|
+
var t = Je();
|
|
844
|
+
i("click", l(t), () => U(a)), m(e, t);
|
|
845
|
+
}, E = p(() => (r(n).imageUrl ?? "").trim());
|
|
846
|
+
v(w, (e) => {
|
|
847
|
+
r(E) && e(T);
|
|
848
|
+
}), o(f);
|
|
849
|
+
var D = u(f, 2), O = e(D);
|
|
850
|
+
O.disabled = a === 0;
|
|
851
|
+
var k = u(O, 2), A = u(k, 2);
|
|
852
|
+
o(D), o(c);
|
|
853
|
+
var j = u(c, 2);
|
|
854
|
+
We(u(e(j), 2), {
|
|
855
|
+
get circles() {
|
|
856
|
+
return r(G).circles;
|
|
857
|
+
},
|
|
858
|
+
get regionLabels() {
|
|
859
|
+
return r(G).regionLabels;
|
|
860
|
+
},
|
|
861
|
+
get value() {
|
|
862
|
+
return r(n).correctRegion;
|
|
863
|
+
},
|
|
864
|
+
onchange: (e) => W(a, e)
|
|
865
|
+
}), o(j), o(s), d(() => {
|
|
866
|
+
I(g, r(n).id), I(y, r(n).label), I(x, r(n).imageUrl ?? ""), I(C, r(n).imageAlt ?? ""), k.disabled = a === r(G).tiles.length - 1;
|
|
867
|
+
}), i("input", g, (e) => fe(a, e.currentTarget.value)), i("input", y, (e) => le(a, e.currentTarget.value)), i("input", x, (e) => ue(a, e.currentTarget.value)), i("input", C, (e) => de(a, e.currentTarget.value)), i("click", O, () => ce(a, -1)), i("click", k, () => ce(a, 1)), i("click", A, () => te(a)), m(t, s);
|
|
868
|
+
}), o(ae), o(k);
|
|
869
|
+
var se = u(k, 2);
|
|
870
|
+
T(u(e(se), 4), 17, () => r(K), (e) => H(e), (t, n) => {
|
|
871
|
+
let a = p(() => H(r(n))), s = p(() => oe(r(G).circles || [], r(n)));
|
|
872
|
+
var c = Xe(), f = e(c), h = l(f, !0), g = u(f, 2);
|
|
873
|
+
F(g), o(c), d(() => {
|
|
874
|
+
z(h, r(a) || "(outside)"), x(g, "placeholder", r(s)), I(g, r(G).regionLabels?.[r(a)] ?? "");
|
|
875
|
+
}), i("input", g, (e) => pe(r(a), e.currentTarget.value)), m(t, c);
|
|
876
|
+
}), o(se), o(c);
|
|
877
|
+
var V = u(c, 2);
|
|
878
|
+
x(V, "aria-valuemin", 260);
|
|
879
|
+
var me = u(V, 2), ve = u(e(me), 4), X = e(ve), xe = u(e(X));
|
|
880
|
+
o(X);
|
|
881
|
+
var Z = u(X, 2), Se = u(e(Z));
|
|
882
|
+
o(Z);
|
|
883
|
+
var Q = u(Z, 2), $ = u(e(Q));
|
|
884
|
+
o(Q), o(ve);
|
|
885
|
+
var Ce = u(ve, 2), we = (t) => {
|
|
886
|
+
var n = Ze();
|
|
887
|
+
ee(e(n), {
|
|
888
|
+
get model() {
|
|
889
|
+
return r(ge);
|
|
890
|
+
},
|
|
891
|
+
get session() {
|
|
892
|
+
return r(he);
|
|
893
|
+
}
|
|
894
|
+
}), o(n), m(t, n);
|
|
895
|
+
}, Te = (e) => {
|
|
896
|
+
m(e, Qe());
|
|
897
|
+
}, Ee = (e) => {
|
|
898
|
+
m(e, $e());
|
|
899
|
+
};
|
|
900
|
+
v(Ce, (e) => {
|
|
901
|
+
r(G).tiles.length > 0 && r(G).circles?.length === 2 ? e(we) : r(G).tiles.length === 0 ? e(Te, 1) : e(Ee, -1);
|
|
902
|
+
});
|
|
903
|
+
var De = u(Ce, 2), Oe = (t) => {
|
|
904
|
+
var n = nt(), i = u(D(n), 2);
|
|
905
|
+
T(i, 21, () => r(G).tiles, w, (t, n) => {
|
|
906
|
+
var i = tt(), a = e(i), s = e(a), c = (e) => {
|
|
907
|
+
var t = et();
|
|
908
|
+
d(() => x(t, "src", r(n).imageUrl)), m(e, t);
|
|
909
|
+
}, f = p(() => (r(n).imageUrl ?? "").trim());
|
|
910
|
+
v(s, (e) => {
|
|
911
|
+
r(f) && e(c);
|
|
912
|
+
});
|
|
913
|
+
var h = u(s);
|
|
914
|
+
o(a);
|
|
915
|
+
var g = l(u(a, 4), !0);
|
|
916
|
+
o(i), d((e, t) => {
|
|
917
|
+
z(h, ` ${e ?? ""}`), z(g, t);
|
|
918
|
+
}, [() => j(r(n).label) || (r(n).imageAlt ?? "").trim() || r(n).id, () => re(r(G), r(n).correctRegion)]), m(t, i);
|
|
919
|
+
}), o(i), m(t, n);
|
|
920
|
+
};
|
|
921
|
+
v(De, (e) => {
|
|
922
|
+
r(G).tiles.length > 0 && e(Oe);
|
|
923
|
+
}), o(me), o(s), y(s, (e) => a(_e, e), () => r(_e)), d((e, t) => {
|
|
924
|
+
f = S(c, "", f, { width: r(ye) }), x(V, "aria-valuemax", r(q) > 0 ? r(q) - 200 - 6 : 360), x(V, "aria-valuenow", e), z(xe, ` ${t ?? ""}`), z(Se, ` ${r(G).scoringPolicy === "allOrNothing" ? "All or nothing" : "Partial per tile"}`), z($, ` ${r(G).tiles.length ?? ""}`);
|
|
925
|
+
}, [() => r(J) ?? (r(q) > 0 ? Math.floor((r(q) - 6) / 2) : 260), () => r(G).circles.map((e) => e.label).join(", ")]), i("click", B, R), i("pointerdown", V, be), i("keydown", V, Y), M(s, "clientWidth", (e) => a(q, e)), m(t, s);
|
|
926
|
+
},
|
|
927
|
+
$$slots: {
|
|
928
|
+
settings: !0,
|
|
929
|
+
default: !0
|
|
930
|
+
}
|
|
931
|
+
});
|
|
932
|
+
}
|
|
933
|
+
return o($), m(n, $), B(Q);
|
|
934
|
+
}
|
|
935
|
+
h([
|
|
936
|
+
"input",
|
|
937
|
+
"click",
|
|
938
|
+
"pointerdown",
|
|
939
|
+
"keydown"
|
|
940
|
+
]), P(ot, {
|
|
941
|
+
model: { type: "Object" },
|
|
942
|
+
configuration: { type: "Object" }
|
|
943
|
+
}, [], []);
|
|
944
|
+
//#endregion
|
|
945
|
+
//#region src/author/index.ts
|
|
946
|
+
var st = ot.element;
|
|
947
|
+
//#endregion
|
|
948
|
+
export { st as default };
|
|
949
|
+
|
|
950
|
+
//# sourceMappingURL=index.js.map
|