@pie-element/mc-populated-blank 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/controller/index.js +2 -2
- package/dist/controller/index.js.map +1 -1
- package/dist/delivery/index.js +402 -204
- package/dist/delivery/index.js.map +1 -1
- package/dist/index.iife.js +5 -4
- package/dist/index.js +402 -204
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/src/controller/index.ts +2 -2
- package/src/delivery/McPopulatedBlank.svelte +242 -32
package/dist/delivery/index.js
CHANGED
|
@@ -3242,19 +3242,50 @@ function from_html(content, flags) {
|
|
|
3242
3242
|
};
|
|
3243
3243
|
}
|
|
3244
3244
|
/**
|
|
3245
|
-
* @
|
|
3245
|
+
* @param {string} content
|
|
3246
|
+
* @param {number} flags
|
|
3247
|
+
* @param {'svg' | 'math'} ns
|
|
3248
|
+
* @returns {() => Node | Node[]}
|
|
3246
3249
|
*/
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
var
|
|
3254
|
-
var
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3250
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
3251
|
+
function from_namespace(content, flags, ns = "svg") {
|
|
3252
|
+
/**
|
|
3253
|
+
* Whether or not the first item is a text/element node. If not, we need to
|
|
3254
|
+
* create an additional comment node to act as `effect.nodes.start`
|
|
3255
|
+
*/
|
|
3256
|
+
var has_start = !content.startsWith("<!>");
|
|
3257
|
+
var is_fragment = (flags & 1) !== 0;
|
|
3258
|
+
var wrapped = `<${ns}>${has_start ? content : "<!>" + content}</${ns}>`;
|
|
3259
|
+
/** @type {Element | DocumentFragment} */
|
|
3260
|
+
var node;
|
|
3261
|
+
return () => {
|
|
3262
|
+
if (hydrating) {
|
|
3263
|
+
assign_nodes(hydrate_node, null);
|
|
3264
|
+
return hydrate_node;
|
|
3265
|
+
}
|
|
3266
|
+
if (!node) {
|
|
3267
|
+
var root = /* @__PURE__ */ get_first_child(create_fragment_from_html(wrapped));
|
|
3268
|
+
if (is_fragment) {
|
|
3269
|
+
node = document.createDocumentFragment();
|
|
3270
|
+
while (/* @__PURE__ */ get_first_child(root)) node.appendChild(/* @__PURE__ */ get_first_child(root));
|
|
3271
|
+
} else node = /* @__PURE__ */ get_first_child(root);
|
|
3272
|
+
}
|
|
3273
|
+
var clone = node.cloneNode(true);
|
|
3274
|
+
if (is_fragment) {
|
|
3275
|
+
var start = /* @__PURE__ */ get_first_child(clone);
|
|
3276
|
+
var end = clone.lastChild;
|
|
3277
|
+
assign_nodes(start, end);
|
|
3278
|
+
} else assign_nodes(clone, clone);
|
|
3279
|
+
return clone;
|
|
3280
|
+
};
|
|
3281
|
+
}
|
|
3282
|
+
/**
|
|
3283
|
+
* @param {string} content
|
|
3284
|
+
* @param {number} flags
|
|
3285
|
+
*/
|
|
3286
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
3287
|
+
function from_svg(content, flags) {
|
|
3288
|
+
return /* @__PURE__ */ from_namespace(content, flags, "svg");
|
|
3258
3289
|
}
|
|
3259
3290
|
/**
|
|
3260
3291
|
* Assign the created (or in hydration mode, traversed) dom elements to the current block
|
|
@@ -4999,34 +5030,141 @@ function create_custom_element(Component, props_definition, slots, exports, shad
|
|
|
4999
5030
|
return Class;
|
|
5000
5031
|
}
|
|
5001
5032
|
//#endregion
|
|
5033
|
+
//#region ../../lib-svelte/styling/dist/index2.js
|
|
5034
|
+
var e = {
|
|
5035
|
+
50: "#e8f5e9",
|
|
5036
|
+
500: "#4caf50"
|
|
5037
|
+
}, t = {
|
|
5038
|
+
200: "#9fa8da",
|
|
5039
|
+
500: "#3f51b5",
|
|
5040
|
+
800: "#283593"
|
|
5041
|
+
}, n = { 500: "#ff9800" }, r = {
|
|
5042
|
+
200: "#f48fb1",
|
|
5043
|
+
900: "#880e4f",
|
|
5044
|
+
A400: "#f50057"
|
|
5045
|
+
}, i = {
|
|
5046
|
+
50: "#ffebee",
|
|
5047
|
+
700: "#d32f2f"
|
|
5048
|
+
}, a = {
|
|
5049
|
+
TEXT: "black",
|
|
5050
|
+
DISABLED: "grey",
|
|
5051
|
+
DISABLED_SECONDARY: "#ABABAB",
|
|
5052
|
+
CORRECT: e[500],
|
|
5053
|
+
CORRECT_SECONDARY: e[50],
|
|
5054
|
+
CORRECT_TERTIARY: "#0EA449",
|
|
5055
|
+
CORRECT_WITH_ICON: "#087D38",
|
|
5056
|
+
INCORRECT: n[500],
|
|
5057
|
+
INCORRECT_SECONDARY: i[50],
|
|
5058
|
+
INCORRECT_WITH_ICON: "#BF0D00",
|
|
5059
|
+
MISSING: i[700],
|
|
5060
|
+
MISSING_WITH_ICON: "#6A78A1",
|
|
5061
|
+
PRIMARY: t[500],
|
|
5062
|
+
PRIMARY_LIGHT: t[200],
|
|
5063
|
+
PRIMARY_DARK: t[800],
|
|
5064
|
+
SECONDARY: r.A400,
|
|
5065
|
+
SECONDARY_LIGHT: r[200],
|
|
5066
|
+
SECONDARY_DARK: r[900],
|
|
5067
|
+
TERTIARY: "#146EB3",
|
|
5068
|
+
TERTIARY_LIGHT: "#D0E2F0",
|
|
5069
|
+
BACKGROUND: "rgba(255,255,255,0)",
|
|
5070
|
+
BACKGROUND_DARK: "#ECEDF1",
|
|
5071
|
+
DROPDOWN_BACKGROUND: "#E0E1E6",
|
|
5072
|
+
SECONDARY_BACKGROUND: "rgba(241,241,241,1)",
|
|
5073
|
+
BORDER: "#9A9A9A",
|
|
5074
|
+
BORDER_LIGHT: "#D1D1D1",
|
|
5075
|
+
BORDER_DARK: "#646464",
|
|
5076
|
+
BORDER_GRAY: "#7E8494",
|
|
5077
|
+
BLACK: "#000000",
|
|
5078
|
+
WHITE: "#ffffff",
|
|
5079
|
+
TRANSPARENT: "transparent",
|
|
5080
|
+
FOCUS_CHECKED: "#BBDEFB",
|
|
5081
|
+
FOCUS_CHECKED_BORDER: "#1565C0",
|
|
5082
|
+
FOCUS_UNCHECKED: "#E0E0E0",
|
|
5083
|
+
FOCUS_UNCHECKED_BORDER: "#757575",
|
|
5084
|
+
BLUE_GREY100: "#F3F5F7",
|
|
5085
|
+
BLUE_GREY300: "#C0C3CF",
|
|
5086
|
+
BLUE_GREY600: "#7E8494",
|
|
5087
|
+
BLUE_GREY900: "#152452",
|
|
5088
|
+
FADED_PRIMARY: "#DCDAFB"
|
|
5089
|
+
};
|
|
5090
|
+
Object.freeze(a);
|
|
5091
|
+
var o = (e) => (...t) => {
|
|
5092
|
+
let n = t.pop();
|
|
5093
|
+
return t.reduceRight((t, n) => `var(--${e}-${n}, ${t})`, n);
|
|
5094
|
+
}, s = o("pie"), c = () => s("text", a.TEXT), l = () => s("disabled", a.DISABLED), u = () => s("disabled-secondary", a.DISABLED_SECONDARY), d = () => s("correct", a.CORRECT), f = () => s("correct-secondary", a.CORRECT_SECONDARY), p = () => s("correct-tertiary", a.CORRECT_TERTIARY), m = () => s("correct-icon", a.CORRECT_WITH_ICON), h = () => s("incorrect", a.INCORRECT), g = () => s("incorrect-icon", a.INCORRECT_WITH_ICON), _ = () => s("incorrect-secondary", a.INCORRECT_SECONDARY), v = () => s("missing", a.MISSING), y = () => s("missing-icon", a.MISSING_WITH_ICON), b = () => s("primary", a.PRIMARY), x = () => s("primary-light", a.PRIMARY_LIGHT), S = () => s("primary-dark", a.PRIMARY_DARK), C = () => s("primary-text", "text", a.TEXT), w = () => s("faded-primary", a.FADED_PRIMARY), T = () => s("secondary", a.SECONDARY), E = () => s("secondary-light", a.SECONDARY_LIGHT), D = () => s("secondary-dark", a.SECONDARY_DARK), O = () => s("secondary-text", "text", a.TEXT), k = () => s("background", a.BACKGROUND), A = () => s("background-dark", a.BACKGROUND_DARK), j = () => s("secondary-background", a.SECONDARY_BACKGROUND), M = () => s("dropdown-background", a.DROPDOWN_BACKGROUND), N = () => s("tertiary", a.TERTIARY), P = () => s("tertiary-light", a.TERTIARY_LIGHT), F = () => s("border", a.BORDER), I = () => s("border-light", a.BORDER_LIGHT), L = () => s("border-dark", a.BORDER_DARK), R = () => s("border-gray", a.BORDER_GRAY), z = () => s("black", a.BLACK), B = () => s("white", a.WHITE), V = () => a.TRANSPARENT, H = () => s("focus-checked", a.FOCUS_CHECKED), U = () => s("focus-checked-border", a.FOCUS_CHECKED_BORDER), W = () => s("focus-unchecked", a.FOCUS_UNCHECKED), G = () => s("focus-unchecked-border", a.FOCUS_UNCHECKED_BORDER), K = () => s("blue-grey-100", a.BLUE_GREY100), q = () => s("blue-grey-300", a.BLUE_GREY300), J = () => s("blue-grey-600", a.BLUE_GREY600), Y = () => s("blue-grey-900", a.BLUE_GREY900), Z = {
|
|
5095
|
+
text: c,
|
|
5096
|
+
disabled: l,
|
|
5097
|
+
disabledSecondary: u,
|
|
5098
|
+
correct: d,
|
|
5099
|
+
correctSecondary: f,
|
|
5100
|
+
correctTertiary: p,
|
|
5101
|
+
correctWithIcon: m,
|
|
5102
|
+
incorrect: h,
|
|
5103
|
+
incorrectWithIcon: g,
|
|
5104
|
+
incorrectSecondary: _,
|
|
5105
|
+
missing: v,
|
|
5106
|
+
missingWithIcon: y,
|
|
5107
|
+
primary: b,
|
|
5108
|
+
primaryLight: x,
|
|
5109
|
+
primaryDark: S,
|
|
5110
|
+
primaryText: C,
|
|
5111
|
+
fadedPrimary: w,
|
|
5112
|
+
secondary: T,
|
|
5113
|
+
secondaryLight: E,
|
|
5114
|
+
secondaryDark: D,
|
|
5115
|
+
secondaryText: O,
|
|
5116
|
+
background: k,
|
|
5117
|
+
backgroundDark: A,
|
|
5118
|
+
secondaryBackground: j,
|
|
5119
|
+
dropdownBackground: M,
|
|
5120
|
+
tertiary: N,
|
|
5121
|
+
tertiaryLight: P,
|
|
5122
|
+
border: F,
|
|
5123
|
+
borderLight: I,
|
|
5124
|
+
borderDark: L,
|
|
5125
|
+
borderGray: R,
|
|
5126
|
+
black: z,
|
|
5127
|
+
white: B,
|
|
5128
|
+
transparent: V,
|
|
5129
|
+
focusChecked: H,
|
|
5130
|
+
focusCheckedBorder: U,
|
|
5131
|
+
focusUnchecked: W,
|
|
5132
|
+
focusUncheckedBorder: G,
|
|
5133
|
+
blueGrey100: K,
|
|
5134
|
+
blueGrey300: q,
|
|
5135
|
+
blueGrey600: J,
|
|
5136
|
+
blueGrey900: Y
|
|
5137
|
+
};
|
|
5138
|
+
//#endregion
|
|
5002
5139
|
//#region src/delivery/McPopulatedBlank.svelte
|
|
5003
5140
|
var root_1 = /* @__PURE__ */ from_html(`<div class="mb-4 prose pie-prompt"></div>`);
|
|
5004
|
-
var root_3 = /* @__PURE__ */
|
|
5005
|
-
var
|
|
5006
|
-
var
|
|
5007
|
-
var root_6 = /* @__PURE__ */ from_html(`<
|
|
5008
|
-
var
|
|
5009
|
-
var
|
|
5010
|
-
var
|
|
5011
|
-
var root_10 = /* @__PURE__ */ from_html(`<
|
|
5012
|
-
var
|
|
5013
|
-
var
|
|
5014
|
-
var
|
|
5015
|
-
var
|
|
5016
|
-
var
|
|
5017
|
-
var
|
|
5018
|
-
var
|
|
5019
|
-
var
|
|
5020
|
-
var root_20 = /* @__PURE__ */ from_html(`<
|
|
5021
|
-
var
|
|
5022
|
-
var
|
|
5023
|
-
var root_23 = /* @__PURE__ */ from_html(`<span class="
|
|
5024
|
-
var
|
|
5025
|
-
var
|
|
5141
|
+
var root_3 = /* @__PURE__ */ from_svg(`<svg class="pie-correct-answer-toggle-svg svelte-6wlbb4" preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-283 359 34 35"><circle cx="-266" cy="375.9" r="14" fill="var(--pie-correct-answer-toggle-icon-open-bg, #bce2ff)"></circle><path d="M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z" fill="var(--pie-correct-answer-toggle-icon-open-bg, #bce2ff)"></path><polygon points="-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6" fill="var(--pie-correct-answer-toggle-icon-glyph-color, #1a9cff)"></polygon></svg>`);
|
|
5142
|
+
var root_4 = /* @__PURE__ */ from_svg(`<svg class="pie-correct-answer-toggle-svg svelte-6wlbb4" preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-129.5 127 34 35"><path d="M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z" fill="#D0CAC5" stroke="#E6E3E0" stroke-width="0.75"></path><path d="M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z" fill="#B3ABA4" stroke="#CDC7C2" stroke-width="0.5"></path><circle cx="-114.2" cy="143.5" r="14" fill="white"></circle><path d="M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z" fill="var(--pie-correct-answer-toggle-icon-closed-bg, #bce2ff)"></path><polygon points="-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2" fill="var(--pie-correct-answer-toggle-icon-glyph-color, #1a9cff)"></polygon></svg>`);
|
|
5143
|
+
var root_2 = /* @__PURE__ */ from_html(`<div class="pie-correct-answer-toggle-row svelte-6wlbb4"><button type="button" class="mb-3 pie-toggle-correct-answer svelte-6wlbb4" style="gap:var(--mpb-toggle-button-gap, 0.5rem);" data-testid="show-correct-answer"><span class="pie-correct-answer-toggle-content svelte-6wlbb4"><span class="pie-correct-answer-toggle-icon-holder svelte-6wlbb4" aria-hidden="true"><!></span> <span class="pie-correct-answer-toggle-label svelte-6wlbb4"> </span></span></button></div>`);
|
|
5144
|
+
var root_6 = /* @__PURE__ */ from_html(`<audio class="sr-only pie-audio-player svelte-6wlbb4" preload="metadata" aria-hidden="true" tabindex="-1"></audio> <button class="listen-button pie-listen-button rli-feature-audio svelte-6wlbb4" type="button"><img alt="" aria-hidden="true"/> <img alt="" aria-hidden="true"/></button>`, 1);
|
|
5145
|
+
var root_8 = /* @__PURE__ */ from_html(`<button class="mt-2 text-sm underline pie-audio-autoplay-enable" type="button"> </button>`);
|
|
5146
|
+
var root_7 = /* @__PURE__ */ from_html(`<audio controls="" class="w-full max-w-md pie-audio-player" preload="metadata"><track kind="captions"/></audio> <!>`, 1);
|
|
5147
|
+
var root_9 = /* @__PURE__ */ from_html(`<p class="text-sm text-red-700 pie-audio-error" role="alert"> </p>`);
|
|
5148
|
+
var root_10 = /* @__PURE__ */ from_html(`<p><strong> </strong> </p>`);
|
|
5149
|
+
var root_5 = /* @__PURE__ */ from_html(`<div class="mb-4 audio-container pie-audio-container svelte-6wlbb4"><!> <!></div>`);
|
|
5150
|
+
var root_11 = /* @__PURE__ */ from_html(`<div class="mb-3 prose prose-p:my-1 sentence-line pie-sentence-line svelte-6wlbb4"></div>`);
|
|
5151
|
+
var root_13 = /* @__PURE__ */ from_html(`<img class="w-auto object-contain pie-blank-image" style="max-height:var(--mpb-selected-image-max-height, 4rem);"/>`);
|
|
5152
|
+
var root_14 = /* @__PURE__ */ from_html(`<span class="blank-inner choice-label pie-blank-value svelte-6wlbb4"></span>`);
|
|
5153
|
+
var root_15 = /* @__PURE__ */ from_html(`<span class="blank-inner-empty svelte-6wlbb4" aria-hidden="true"> </span>`);
|
|
5154
|
+
var root_12 = /* @__PURE__ */ from_html(`<div class="mb-4 template-line pie-template-line svelte-6wlbb4"><!> <span role="status" aria-live="polite" aria-atomic="true"><!></span> <!></div>`);
|
|
5155
|
+
var root_16 = /* @__PURE__ */ from_html(`<p class="sr-only pie-result-feedback svelte-6wlbb4" role="status" aria-live="polite"> </p>`);
|
|
5156
|
+
var root_19 = /* @__PURE__ */ from_html(`<img class="object-contain mx-auto pie-choice-image" style="max-height:var(--mpb-choice-image-max-height, 5rem);"/>`);
|
|
5157
|
+
var root_20 = /* @__PURE__ */ from_html(`<span class="choice-label pie-choice-label svelte-6wlbb4"></span>`);
|
|
5158
|
+
var root_18 = /* @__PURE__ */ from_html(`<label class="cursor-pointer choice-tile text-center pie-choice-tile svelte-6wlbb4"><span class="choice-tile-content pie-choice-tile-content svelte-6wlbb4"><!></span> <input type="radio" class="choice-radio-bottom pie-choice-radio pie-choice-radio-bottom svelte-6wlbb4"/></label>`);
|
|
5159
|
+
var root_22 = /* @__PURE__ */ from_html(`<img class="object-contain pie-choice-image" style="max-height:var(--mpb-choice-image-max-height, 5rem);"/>`);
|
|
5160
|
+
var root_23 = /* @__PURE__ */ from_html(`<span class="choice-label pie-choice-label svelte-6wlbb4"></span>`);
|
|
5161
|
+
var root_21 = /* @__PURE__ */ from_html(`<input type="radio" class="choice-radio-inline pie-choice-radio pie-choice-radio-inline svelte-6wlbb4"/> <label class="cursor-pointer flex-1 pie-choice-label-wrap"><!></label>`, 1);
|
|
5162
|
+
var root_24 = /* @__PURE__ */ from_html(`<span aria-hidden="true"> </span>`);
|
|
5163
|
+
var root_17 = /* @__PURE__ */ from_html(`<div style="gap:var(--mpb-choice-row-gap, 0.5rem);"><!> <!></div>`);
|
|
5026
5164
|
var root = /* @__PURE__ */ from_html(`<div><!> <!> <!> <!> <!> <!> <fieldset class="border-0 p-0 m-0 pie-choices-fieldset svelte-6wlbb4"><legend class="sr-only pie-choices-legend svelte-6wlbb4"> </legend> <div style="gap:var(--mpb-choice-group-gap, 0.5rem);" role="radiogroup" tabindex="-1"></div></fieldset></div>`);
|
|
5027
5165
|
var $$css = {
|
|
5028
5166
|
hash: "svelte-6wlbb4",
|
|
5029
|
-
code: ".sr-only.svelte-6wlbb4 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}.mc-populated-blank-root.svelte-6wlbb4 .prose {max-width:none;}.blank-slot.svelte-6wlbb4:focus-within {outline:2px solid var(--pie-focus, #2563eb);outline-offset:2px;}.blank-slot.svelte-6wlbb4 {display:inline-flex;align-items:center;justify-content:center;text-align:center;vertical-align:baseline;}.template-line.svelte-6wlbb4 {white-space:pre-wrap;}.template-line.svelte-6wlbb4 p {margin:0;}.blank-inner-empty.svelte-6wlbb4 {display:inline-block;min-width:4ch;}.blank-slot-standalone.svelte-6wlbb4 {width:var(--mpb-blank-standalone-width, 7rem);}.listen-button.svelte-6wlbb4 {width:var(--mpb-listen-button-size, 128px);height:var(--mpb-listen-button-size, 128px);border:0;padding:0;background-color:transparent;cursor:pointer;z-index:1;}.listen-button.svelte-6wlbb4:hover {background-color:#e2f1fe;}.listen-feature-icon.svelte-6wlbb4 {width:var(--mpb-listen-button-size, 128px);height:var(--mpb-listen-button-size, 128px);object-fit:contain;display:none;}.listen-feature-icon.listen-active.svelte-6wlbb4 {display:block;}.choice-row-horizontal.svelte-6wlbb4 {flex-direction:column;align-items:center;width:min(var(--mpb-choice-width-px, 170px), var(--mpb-choice-width-vw, 30vw));gap:0;}.choice-tile.svelte-6wlbb4 {display:flex;flex-direction:column;justify-content:space-between;align-items:center;width:100%;min-height:var(--mpb-choice-tile-min-height, 11rem);padding:0.8rem 0.65rem 0.5rem;border-radius:8px;background:transparent;transition:background-color 120ms ease-in-out;}.choice-tile-content.svelte-6wlbb4 {width:100%;display:flex;align-items:center;justify-content:center;min-height:var(--mpb-choice-content-min-height, 7.5rem);}.choice-row-horizontal.svelte-6wlbb4:hover .choice-tile:where(.svelte-6wlbb4) {background:#ececec;}.choice-row-horizontal.is-selected.svelte-6wlbb4 .choice-tile:where(.svelte-6wlbb4) {background:#eceabf;}.choice-row-horizontal.is-selected.svelte-6wlbb4:hover .choice-tile:where(.svelte-6wlbb4) {background:#eceabf;}.choice-row-horizontal.svelte-6wlbb4 p {margin:0;text-align:center;}.choice-label.svelte-6wlbb4 p,\n .blank-inner.svelte-6wlbb4 p {margin:0;}.blank-inner.svelte-6wlbb4 {width:100%;display:inline-flex;align-items:center;justify-content:center;text-align:center;}.choice-radio-bottom.svelte-6wlbb4 {margin-top:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem);}.choice-radio-inline.svelte-6wlbb4 {margin-top:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem);}.layout-audio_blank_only.svelte-6wlbb4 .audio-container:where(.svelte-6wlbb4),\n .layout-stimulus_image_blank.svelte-6wlbb4 .audio-container:where(.svelte-6wlbb4) {display:flex;width:min(100%, var(--mpb-audio-instructions-max-width, 875px));margin-left:auto;margin-right:auto;justify-content:flex-end;}.layout-audio_blank_only.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4),\n .layout-stimulus_image_blank.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {text-align:center;margin:var(--mpb-audio-blank-template-margin-top, 0.8rem) 0\n var(--mpb-audio-blank-template-margin-bottom, 1.8rem);}.layout-audio_blank_only.svelte-6wlbb4 .blank-slot:where(.svelte-6wlbb4),\n .layout-stimulus_image_blank.svelte-6wlbb4 .blank-slot:where(.svelte-6wlbb4) {width:var(--mpb-blank-wide-width, 10rem);border-bottom-width:var(--mpb-blank-underline-wide-width, 4px);}.layout-stimulus_image_blank.svelte-6wlbb4 {display:grid;grid-template-columns:minmax(var(--mpb-stimulus-min-column, 210px), 1fr) auto;grid-template-areas:'sentence audio'\n '. template'\n 'choices choices';column-gap:var(--mpb-stimulus-grid-column-gap, 2rem);row-gap:var(--mpb-stimulus-grid-row-gap, 0.7rem);align-items:start;}.layout-stimulus_image_blank.svelte-6wlbb4 .audio-container:where(.svelte-6wlbb4) {grid-area:audio;margin:0;}.layout-stimulus_image_blank.svelte-6wlbb4 .sentence-line:where(.svelte-6wlbb4) {grid-area:sentence;margin:var(--mpb-stimulus-sentence-margin-top, 0.2rem) 0 0;}.layout-stimulus_image_blank.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {grid-area:template;margin:0;text-align:center;justify-self:center;}.layout-stimulus_image_blank.svelte-6wlbb4 fieldset:where(.svelte-6wlbb4) {grid-area:choices;margin-top:var(--mpb-stimulus-choices-margin-top, 0.9rem);}.layout-token_sequence.svelte-6wlbb4 {display:grid;grid-template-columns:minmax(var(--mpb-text-min-column, 260px), 1fr) auto;grid-template-areas:'template audio'\n 'choices choices';column-gap:var(--mpb-token-grid-column-gap, 1.5rem);row-gap:var(--mpb-token-grid-row-gap, 0.8rem);align-items:start;}.layout-token_sequence.svelte-6wlbb4 .audio-container:where(.svelte-6wlbb4) {grid-area:audio;margin:0;justify-self:end;}.layout-token_sequence.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {grid-area:template;margin:var(--mpb-token-template-margin-top, 0.6rem) 0 0;justify-self:center;text-align:center;}.layout-token_sequence.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) span + span {margin-left:var(--mpb-token-inline-token-gap, 0.35rem);}.layout-token_sequence.svelte-6wlbb4 .blank-slot:where(.svelte-6wlbb4) {width:var(--mpb-blank-standalone-width, 7rem);border-bottom-width:var(--mpb-blank-underline-wide-width, 4px);margin-left:var(--mpb-token-inline-token-gap, 0.35rem);}.layout-token_sequence.svelte-6wlbb4 fieldset:where(.svelte-6wlbb4) {grid-area:choices;margin-top:var(--mpb-token-choices-margin-top, 0.2rem);}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 {display:grid;grid-template-columns:minmax(var(--mpb-text-min-column, 260px), 1fr) auto;grid-template-areas:'template audio'\n 'choices choices';column-gap:var(--mpb-inline-grid-column-gap, 1.5rem);row-gap:var(--mpb-inline-grid-row-gap, 0.65rem);align-items:start;}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .audio-container:where(.svelte-6wlbb4) {grid-area:audio;margin:0;justify-self:end;}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {grid-area:template;margin:var(--mpb-inline-template-margin-top, 0.45rem) 0 0;text-align:center;justify-self:center;}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 fieldset:where(.svelte-6wlbb4) {grid-area:choices;margin-top:var(--mpb-inline-choices-margin-top, 0.25rem);}\n\n /* Match Learnosity responsive behavior for CQT audio-blank layouts:\n at smaller widths, audio control shifts left and answer tiles stack. */\n @media (max-width: 760px) {.layout-audio_blank_only.svelte-6wlbb4 .audio-container:where(.svelte-6wlbb4),\n .layout-stimulus_image_blank.svelte-6wlbb4 .audio-container:where(.svelte-6wlbb4),\n .layout-token_sequence.svelte-6wlbb4 .audio-container:where(.svelte-6wlbb4),\n .layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .audio-container:where(.svelte-6wlbb4) {width:100%;margin-left:0;margin-right:0;justify-content:flex-start;justify-self:start;}.layout-audio_blank_only.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4),\n .layout-token_sequence.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4),\n .layout-stimulus_image_blank.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4),\n .layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4) {flex-direction:column;align-items:flex-start;justify-content:flex-start;}.layout-audio_blank_only.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4),\n .layout-token_sequence.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4),\n .layout-stimulus_image_blank.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4),\n .layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4) {width:min(100%, var(--mpb-narrow-choice-max-width, 230px));align-items:flex-start;}\n }"
|
|
5167
|
+
code: ".sr-only.svelte-6wlbb4 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}.mc-populated-blank-root.svelte-6wlbb4 .prose {max-width:none;}.blank-slot.svelte-6wlbb4:focus-within {outline:2px solid var(--pie-focus, #2563eb);outline-offset:2px;}.blank-slot.svelte-6wlbb4 {display:inline-flex;align-items:center;justify-content:center;text-align:center;vertical-align:baseline;}.pie-toggle-correct-answer.svelte-6wlbb4 {width:100%;cursor:pointer;border:0;background:transparent;padding:0;display:flex;justify-content:center;text-align:center;color:var(--pie-correct-answer-toggle-label-color, var(--pie-text, black));}.pie-correct-answer-toggle-row.svelte-6wlbb4 {width:100%;display:flex;justify-content:flex-end;}.pie-correct-answer-toggle-content.svelte-6wlbb4 {display:flex;margin:0 auto;align-items:center;}.pie-correct-answer-toggle-icon-holder.svelte-6wlbb4 {width:25px;margin-right:5px;display:inline-flex;align-items:center;justify-content:center;}.pie-correct-answer-toggle-svg.svelte-6wlbb4 {width:25px;height:25px;}.pie-correct-answer-toggle-label.svelte-6wlbb4 {width:fit-content;min-width:140px;align-self:center;vertical-align:middle;font-weight:400;user-select:none;}.pie-toggle-correct-answer.svelte-6wlbb4:hover .pie-correct-answer-toggle-label:where(.svelte-6wlbb4),\n .pie-toggle-correct-answer.svelte-6wlbb4:focus-visible .pie-correct-answer-toggle-label:where(.svelte-6wlbb4) {text-decoration:underline;}.template-line.svelte-6wlbb4 {white-space:pre-wrap;}.template-line.svelte-6wlbb4 p {margin:0;}.blank-inner-empty.svelte-6wlbb4 {display:inline-block;min-width:4ch;}.blank-slot-standalone.svelte-6wlbb4 {width:var(--mpb-blank-standalone-width, 7rem);}.listen-button.svelte-6wlbb4 {width:var(--mpb-listen-button-size, 128px);height:var(--mpb-listen-button-size, 128px);border:0;padding:0;background-color:transparent;cursor:pointer;z-index:1;}.listen-button.svelte-6wlbb4:hover {background-color:#e2f1fe;}.listen-feature-icon.svelte-6wlbb4 {width:var(--mpb-listen-button-size, 128px);height:var(--mpb-listen-button-size, 128px);object-fit:contain;display:none;}.listen-feature-icon.listen-active.svelte-6wlbb4 {display:block;}.choice-row-horizontal.svelte-6wlbb4 {flex-direction:column;align-items:center;width:min(var(--mpb-choice-width-px, 170px), var(--mpb-choice-width-vw, 30vw));gap:0;}.choice-tile.svelte-6wlbb4 {display:flex;flex-direction:column;justify-content:space-between;align-items:center;width:100%;min-height:var(--mpb-choice-tile-min-height, 11rem);padding:0.8rem 0.65rem 0.5rem;border-radius:8px;background:transparent;transition:background-color 120ms ease-in-out;}.choice-tile-content.svelte-6wlbb4 {width:100%;display:flex;align-items:center;justify-content:center;min-height:var(--mpb-choice-content-min-height, 7.5rem);}.choice-row-horizontal.svelte-6wlbb4:hover .choice-tile:where(.svelte-6wlbb4) {background:var(--pie-correct-answer-choice-hover-bg, #ececec);}.choice-row-horizontal.is-selected.svelte-6wlbb4 .choice-tile:where(.svelte-6wlbb4) {background:var(--pie-correct-answer-choice-selected-bg, #f1f1f1);}.choice-row-horizontal.is-selected.svelte-6wlbb4:hover .choice-tile:where(.svelte-6wlbb4) {background:var(--pie-correct-answer-choice-selected-bg, #f1f1f1);}.pie-choice.choice-correct.svelte-6wlbb4 {border-left:3px solid var(--pie-correct-answer-choice-correct-border, #0ea449);}.pie-choice.choice-incorrect.svelte-6wlbb4 {border-left:3px solid var(--pie-correct-answer-choice-incorrect-border, #bf0d00);}.pie-choice-horizontal.choice-correct.svelte-6wlbb4 .choice-tile:where(.svelte-6wlbb4) {background:var(--pie-correct-answer-choice-correct-bg, #e8f5e9);}.pie-choice-horizontal.choice-incorrect.svelte-6wlbb4 .choice-tile:where(.svelte-6wlbb4) {background:var(--pie-correct-answer-choice-incorrect-bg, #ffebee);}.pie-choice-feedback-badge.svelte-6wlbb4 {margin-left:auto;display:inline-flex;align-items:center;justify-content:center;width:1.1rem;height:1.1rem;border-radius:9999px;font-size:0.72rem;line-height:1;font-weight:700;color:var(--pie-correct-answer-feedback-glyph-color, #fff);}.pie-choice-feedback-correct.svelte-6wlbb4 {background:var(--pie-correct-answer-feedback-correct-bg, #087d38);}.pie-choice-feedback-incorrect.svelte-6wlbb4 {background:var(--pie-correct-answer-feedback-incorrect-bg, #bf0d00);}.choice-row-horizontal.svelte-6wlbb4 p {margin:0;text-align:center;}.choice-label.svelte-6wlbb4 p,\n .blank-inner.svelte-6wlbb4 p {margin:0;}.blank-inner.svelte-6wlbb4 {width:100%;display:inline-flex;align-items:center;justify-content:center;text-align:center;}.choice-radio-bottom.svelte-6wlbb4 {margin-top:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem);}.choice-radio-inline.svelte-6wlbb4 {margin-top:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem);}.layout-audio_blank_only.svelte-6wlbb4 .audio-container:where(.svelte-6wlbb4),\n .layout-stimulus_image_blank.svelte-6wlbb4 .audio-container:where(.svelte-6wlbb4) {display:flex;width:min(100%, var(--mpb-audio-instructions-max-width, 875px));margin-left:auto;margin-right:auto;justify-content:flex-end;}.layout-audio_blank_only.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4),\n .layout-stimulus_image_blank.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {text-align:center;margin:var(--mpb-audio-blank-template-margin-top, 0.8rem) 0\n var(--mpb-audio-blank-template-margin-bottom, 1.8rem);}.layout-audio_blank_only.svelte-6wlbb4 .blank-slot:where(.svelte-6wlbb4),\n .layout-stimulus_image_blank.svelte-6wlbb4 .blank-slot:where(.svelte-6wlbb4) {width:var(--mpb-blank-wide-width, 10rem);border-bottom-width:var(--mpb-blank-underline-wide-width, 4px);}.layout-stimulus_image_blank.svelte-6wlbb4 {display:grid;grid-template-columns:minmax(var(--mpb-stimulus-min-column, 210px), 1fr) auto;grid-template-areas:'sentence audio'\n '. template'\n 'choices choices';column-gap:var(--mpb-stimulus-grid-column-gap, 2rem);row-gap:var(--mpb-stimulus-grid-row-gap, 0.7rem);align-items:start;}.layout-stimulus_image_blank.svelte-6wlbb4 .audio-container:where(.svelte-6wlbb4) {grid-area:audio;margin:0;}.layout-stimulus_image_blank.svelte-6wlbb4 .sentence-line:where(.svelte-6wlbb4) {grid-area:sentence;margin:var(--mpb-stimulus-sentence-margin-top, 0.2rem) 0 0;}.layout-stimulus_image_blank.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {grid-area:template;margin:0;text-align:center;justify-self:center;}.layout-stimulus_image_blank.svelte-6wlbb4 fieldset:where(.svelte-6wlbb4) {grid-area:choices;margin-top:var(--mpb-stimulus-choices-margin-top, 0.9rem);}.layout-token_sequence.svelte-6wlbb4 {display:grid;grid-template-columns:minmax(var(--mpb-text-min-column, 260px), 1fr) auto;grid-template-areas:'template audio'\n 'choices choices';column-gap:var(--mpb-token-grid-column-gap, 1.5rem);row-gap:var(--mpb-token-grid-row-gap, 0.8rem);align-items:start;}.layout-token_sequence.svelte-6wlbb4 .audio-container:where(.svelte-6wlbb4) {grid-area:audio;margin:0;justify-self:end;}.layout-token_sequence.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {grid-area:template;margin:var(--mpb-token-template-margin-top, 0.6rem) 0 0;justify-self:center;text-align:center;}.layout-token_sequence.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) span + span {margin-left:var(--mpb-token-inline-token-gap, 0.35rem);}.layout-token_sequence.svelte-6wlbb4 .blank-slot:where(.svelte-6wlbb4) {width:var(--mpb-blank-standalone-width, 7rem);border-bottom-width:var(--mpb-blank-underline-wide-width, 4px);margin-left:var(--mpb-token-inline-token-gap, 0.35rem);}.layout-token_sequence.svelte-6wlbb4 fieldset:where(.svelte-6wlbb4) {grid-area:choices;margin-top:var(--mpb-token-choices-margin-top, 0.2rem);}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 {display:grid;grid-template-columns:minmax(var(--mpb-text-min-column, 260px), 1fr) auto;grid-template-areas:'template audio'\n 'choices choices';column-gap:var(--mpb-inline-grid-column-gap, 1.5rem);row-gap:var(--mpb-inline-grid-row-gap, 0.65rem);align-items:start;}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .audio-container:where(.svelte-6wlbb4) {grid-area:audio;margin:0;justify-self:end;}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {grid-area:template;margin:var(--mpb-inline-template-margin-top, 0.45rem) 0 0;text-align:center;justify-self:center;}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 fieldset:where(.svelte-6wlbb4) {grid-area:choices;margin-top:var(--mpb-inline-choices-margin-top, 0.25rem);}\n\n /* Match Learnosity responsive behavior for CQT audio-blank layouts:\n at smaller widths, audio control shifts left and answer tiles stack. */\n @media (max-width: 760px) {.layout-audio_blank_only.svelte-6wlbb4 .audio-container:where(.svelte-6wlbb4),\n .layout-stimulus_image_blank.svelte-6wlbb4 .audio-container:where(.svelte-6wlbb4),\n .layout-token_sequence.svelte-6wlbb4 .audio-container:where(.svelte-6wlbb4),\n .layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .audio-container:where(.svelte-6wlbb4) {width:100%;margin-left:0;margin-right:0;justify-content:flex-start;justify-self:start;}.layout-audio_blank_only.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4),\n .layout-token_sequence.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4),\n .layout-stimulus_image_blank.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4),\n .layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4) {flex-direction:column;align-items:flex-start;justify-content:flex-start;}.layout-audio_blank_only.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4),\n .layout-token_sequence.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4),\n .layout-stimulus_image_blank.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4),\n .layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4) {width:min(100%, var(--mpb-narrow-choice-max-width, 230px));align-items:flex-start;}\n }"
|
|
5030
5168
|
};
|
|
5031
5169
|
function McPopulatedBlank($$anchor, $$props) {
|
|
5032
5170
|
push($$props, true);
|
|
@@ -5116,8 +5254,10 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
5116
5254
|
let toggleCorrectAnswerButtonEl = /* @__PURE__ */ state(null);
|
|
5117
5255
|
let choicesGroupEl = /* @__PURE__ */ state(null);
|
|
5118
5256
|
const instanceId = `mc-populated-blank-${Math.random().toString(36).slice(2, 10)}`;
|
|
5119
|
-
const
|
|
5257
|
+
const deliveryMode = /* @__PURE__ */ user_derived(() => (model()?.mode || model()?.env?.mode || "").toString());
|
|
5258
|
+
const isEvaluateMode = /* @__PURE__ */ user_derived(() => get(deliveryMode) === "evaluate");
|
|
5120
5259
|
const correctness = /* @__PURE__ */ user_derived(() => model()?.correctness);
|
|
5260
|
+
const isResponseCorrect = /* @__PURE__ */ user_derived(() => typeof model()?.responseCorrect === "boolean" ? model().responseCorrect : get(correctness) === "correct");
|
|
5121
5261
|
const isCorrect = /* @__PURE__ */ user_derived(() => get(correctness) === "correct");
|
|
5122
5262
|
const isIncorrect = /* @__PURE__ */ user_derived(() => get(correctness) === "incorrect");
|
|
5123
5263
|
const isAudioOnlyMode = /* @__PURE__ */ user_derived(() => model()?.interactionMode === "audio_mc_only");
|
|
@@ -5155,6 +5295,21 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
5155
5295
|
...configured
|
|
5156
5296
|
};
|
|
5157
5297
|
});
|
|
5298
|
+
const correctAnswerStyleVars = /* @__PURE__ */ user_derived(() => [
|
|
5299
|
+
`--pie-correct-answer-toggle-label-color:${Z.text()}`,
|
|
5300
|
+
`--pie-correct-answer-toggle-icon-open-bg:${Z.tertiaryLight()}`,
|
|
5301
|
+
`--pie-correct-answer-toggle-icon-closed-bg:${Z.backgroundDark()}`,
|
|
5302
|
+
`--pie-correct-answer-toggle-icon-glyph-color:${Z.tertiary()}`,
|
|
5303
|
+
`--pie-correct-answer-choice-hover-bg:${Z.backgroundDark()}`,
|
|
5304
|
+
`--pie-correct-answer-choice-selected-bg:${Z.secondaryBackground()}`,
|
|
5305
|
+
`--pie-correct-answer-choice-correct-bg:${Z.correctSecondary()}`,
|
|
5306
|
+
`--pie-correct-answer-choice-incorrect-bg:${Z.incorrectSecondary()}`,
|
|
5307
|
+
`--pie-correct-answer-choice-correct-border:${Z.correctTertiary()}`,
|
|
5308
|
+
`--pie-correct-answer-choice-incorrect-border:${Z.incorrectWithIcon()}`,
|
|
5309
|
+
`--pie-correct-answer-feedback-correct-bg:${Z.correctWithIcon()}`,
|
|
5310
|
+
`--pie-correct-answer-feedback-incorrect-bg:${Z.incorrectWithIcon()}`,
|
|
5311
|
+
`--pie-correct-answer-feedback-glyph-color:${Z.white()}`
|
|
5312
|
+
].join(";"));
|
|
5158
5313
|
const rootStyle = /* @__PURE__ */ user_derived(() => [
|
|
5159
5314
|
`--mpb-listen-button-size:${get(layoutLimits).listenButtonSizePx}px`,
|
|
5160
5315
|
`--mpb-blank-standalone-width:${get(layoutLimits).blankStandaloneWidthRem}rem`,
|
|
@@ -5189,7 +5344,8 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
5189
5344
|
`--mpb-inline-grid-column-gap:${get(layoutLimits).inlineGridColumnGapRem}rem`,
|
|
5190
5345
|
`--mpb-inline-grid-row-gap:${get(layoutLimits).inlineGridRowGapRem}rem`,
|
|
5191
5346
|
`--mpb-inline-template-margin-top:${get(layoutLimits).inlineTemplateMarginTopRem}rem`,
|
|
5192
|
-
`--mpb-inline-choices-margin-top:${get(layoutLimits).inlineChoicesMarginTopRem}rem
|
|
5347
|
+
`--mpb-inline-choices-margin-top:${get(layoutLimits).inlineChoicesMarginTopRem}rem`,
|
|
5348
|
+
get(correctAnswerStyleVars)
|
|
5193
5349
|
].join(";"));
|
|
5194
5350
|
const useFeatureButtonAudio = /* @__PURE__ */ user_derived(() => {
|
|
5195
5351
|
if (typeof model()?.useFeatureButtonAudio === "boolean") return !!model().useFeatureButtonAudio;
|
|
@@ -5222,8 +5378,12 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
5222
5378
|
const selectedId = /* @__PURE__ */ user_derived(() => session()?.choiceId || get(localChoiceId) || "");
|
|
5223
5379
|
const radioGroupName = /* @__PURE__ */ user_derived(() => `${instanceId}-choice-group-${model()?.id || "1"}`);
|
|
5224
5380
|
let showCorrectAnswer = /* @__PURE__ */ state(false);
|
|
5381
|
+
const alwaysShowCorrect = /* @__PURE__ */ user_derived(() => !!model()?.alwaysShowCorrect || !!options()?.alwaysShowCorrect || !!options()?.addCorrectResponse);
|
|
5382
|
+
const canRevealCorrectAnswer = /* @__PURE__ */ user_derived(() => !!model()?.correctChoiceId && (get(isEvaluateMode) || get(alwaysShowCorrect)));
|
|
5383
|
+
const shouldShowCorrectAnswer = /* @__PURE__ */ user_derived(() => get(alwaysShowCorrect) || get(showCorrectAnswer));
|
|
5384
|
+
const shouldShowCorrectAnswerToggle = /* @__PURE__ */ user_derived(() => get(isEvaluateMode) && !get(isResponseCorrect) && !!model()?.correctChoiceId && !get(alwaysShowCorrect));
|
|
5225
5385
|
const displayChoiceId = /* @__PURE__ */ user_derived(() => {
|
|
5226
|
-
if (get(
|
|
5386
|
+
if (get(canRevealCorrectAnswer) && get(shouldShowCorrectAnswer) && model()?.correctChoiceId) return model().correctChoiceId;
|
|
5227
5387
|
return get(selectedId);
|
|
5228
5388
|
});
|
|
5229
5389
|
const displayChoice = /* @__PURE__ */ user_derived(() => get(choices).find((c) => c.id === get(displayChoiceId)));
|
|
@@ -5255,11 +5415,32 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
5255
5415
|
});
|
|
5256
5416
|
const audioErrorMessage = /* @__PURE__ */ user_derived(() => get(hasAudioButMissingResource) ? get(uiText).audioResourceUnavailable : "");
|
|
5257
5417
|
const resultText = /* @__PURE__ */ user_derived(() => {
|
|
5258
|
-
if (!get(isEvaluateMode) || get(
|
|
5418
|
+
if (!get(isEvaluateMode) || get(shouldShowCorrectAnswer)) return "";
|
|
5259
5419
|
if (get(isCorrect)) return "Correct answer selected";
|
|
5260
5420
|
if (get(isIncorrect) && get(selectedId)) return "Incorrect answer selected";
|
|
5261
5421
|
return "";
|
|
5262
5422
|
});
|
|
5423
|
+
const choiceCorrectnessById = /* @__PURE__ */ user_derived(() => {
|
|
5424
|
+
const map = /* @__PURE__ */ new Map();
|
|
5425
|
+
const correctChoiceId = String(model()?.correctChoiceId || "");
|
|
5426
|
+
const activeSelectedId = String(get(selectedId) || "");
|
|
5427
|
+
if (!get(isEvaluateMode) || !correctChoiceId) return map;
|
|
5428
|
+
if (get(shouldShowCorrectAnswer) && get(canRevealCorrectAnswer)) {
|
|
5429
|
+
map.set(correctChoiceId, "correct");
|
|
5430
|
+
return map;
|
|
5431
|
+
}
|
|
5432
|
+
if (!activeSelectedId) {
|
|
5433
|
+
map.set(correctChoiceId, "incorrect");
|
|
5434
|
+
return map;
|
|
5435
|
+
}
|
|
5436
|
+
if (activeSelectedId === correctChoiceId) {
|
|
5437
|
+
map.set(correctChoiceId, "correct");
|
|
5438
|
+
return map;
|
|
5439
|
+
}
|
|
5440
|
+
map.set(activeSelectedId, "incorrect");
|
|
5441
|
+
map.set(correctChoiceId, "incorrect");
|
|
5442
|
+
return map;
|
|
5443
|
+
});
|
|
5263
5444
|
function emitSession(updatedSession, sourceEl) {
|
|
5264
5445
|
const host = getHostElement(sourceEl);
|
|
5265
5446
|
if (host?.onSessionChange) {
|
|
@@ -5288,8 +5469,12 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
5288
5469
|
}, input);
|
|
5289
5470
|
}
|
|
5290
5471
|
function toggleCorrectAnswer() {
|
|
5472
|
+
if (!get(shouldShowCorrectAnswerToggle)) return;
|
|
5291
5473
|
set(showCorrectAnswer, !get(showCorrectAnswer));
|
|
5292
5474
|
}
|
|
5475
|
+
user_effect(() => {
|
|
5476
|
+
if (!get(isEvaluateMode) || get(isResponseCorrect) || get(alwaysShowCorrect)) set(showCorrectAnswer, false);
|
|
5477
|
+
});
|
|
5293
5478
|
function onRadioGroupKeydown(e) {
|
|
5294
5479
|
if (model()?.disabled) return;
|
|
5295
5480
|
const key = e.key;
|
|
@@ -5452,21 +5637,55 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
5452
5637
|
if (model()?.prompt) $$render(consequent);
|
|
5453
5638
|
});
|
|
5454
5639
|
var node_1 = sibling(node, 2);
|
|
5455
|
-
var
|
|
5640
|
+
var consequent_2 = ($$anchor) => {
|
|
5456
5641
|
var div_2 = root_2();
|
|
5457
|
-
var
|
|
5642
|
+
var button = child(div_2);
|
|
5643
|
+
var span = child(button);
|
|
5644
|
+
var span_1 = child(span);
|
|
5645
|
+
var node_2 = child(span_1);
|
|
5458
5646
|
var consequent_1 = ($$anchor) => {
|
|
5459
|
-
|
|
5647
|
+
append($$anchor, root_3());
|
|
5648
|
+
};
|
|
5649
|
+
var alternate = ($$anchor) => {
|
|
5650
|
+
append($$anchor, root_4());
|
|
5651
|
+
};
|
|
5652
|
+
if_block(node_2, ($$render) => {
|
|
5653
|
+
if (get(shouldShowCorrectAnswer)) $$render(consequent_1);
|
|
5654
|
+
else $$render(alternate, -1);
|
|
5655
|
+
});
|
|
5656
|
+
reset(span_1);
|
|
5657
|
+
var span_2 = sibling(span_1, 2);
|
|
5658
|
+
var text = child(span_2, true);
|
|
5659
|
+
reset(span_2);
|
|
5660
|
+
reset(span);
|
|
5661
|
+
reset(button);
|
|
5662
|
+
bind_this(button, ($$value) => set(toggleCorrectAnswerButtonEl, $$value), () => get(toggleCorrectAnswerButtonEl));
|
|
5663
|
+
reset(div_2);
|
|
5664
|
+
template_effect(() => {
|
|
5665
|
+
set_attribute(button, "aria-pressed", get(shouldShowCorrectAnswer));
|
|
5666
|
+
set_text(text, get(shouldShowCorrectAnswer) ? get(uiText).hideCorrectAnswer : get(uiText).showCorrectAnswer);
|
|
5667
|
+
});
|
|
5668
|
+
append($$anchor, div_2);
|
|
5669
|
+
};
|
|
5670
|
+
if_block(node_1, ($$render) => {
|
|
5671
|
+
if (get(shouldShowCorrectAnswerToggle)) $$render(consequent_2);
|
|
5672
|
+
});
|
|
5673
|
+
var node_3 = sibling(node_1, 2);
|
|
5674
|
+
var consequent_8 = ($$anchor) => {
|
|
5675
|
+
var div_3 = root_5();
|
|
5676
|
+
var node_4 = child(div_3);
|
|
5677
|
+
var consequent_3 = ($$anchor) => {
|
|
5678
|
+
var fragment = root_6();
|
|
5460
5679
|
var audio = first_child(fragment);
|
|
5461
5680
|
bind_this(audio, ($$value) => set(audioEl, $$value), () => get(audioEl));
|
|
5462
|
-
var
|
|
5463
|
-
var img = child(
|
|
5681
|
+
var button_1 = sibling(audio, 2);
|
|
5682
|
+
var img = child(button_1);
|
|
5464
5683
|
var img_1 = sibling(img, 2);
|
|
5465
|
-
reset(
|
|
5466
|
-
bind_this(
|
|
5684
|
+
reset(button_1);
|
|
5685
|
+
bind_this(button_1, ($$value) => set(featureAudioButtonEl, $$value), () => get(featureAudioButtonEl));
|
|
5467
5686
|
template_effect(($0) => {
|
|
5468
5687
|
set_attribute(audio, "src", model().audioUrl);
|
|
5469
|
-
set_attribute(
|
|
5688
|
+
set_attribute(button_1, "aria-label", $0);
|
|
5470
5689
|
set_class(img, 1, `listen-feature-icon pie-listen-icon rli-feature-listen ${get(isMediaPlaying) ? "" : "listen-active"}`, "svelte-6wlbb4");
|
|
5471
5690
|
set_attribute(img, "src", get(featureAudioSkin).silentUrl);
|
|
5472
5691
|
set_class(img_1, 1, `listen-feature-icon pie-listen-icon rli-feature-listen ${get(isMediaPlaying) ? "listen-active" : ""}`, "svelte-6wlbb4");
|
|
@@ -5474,21 +5693,21 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
5474
5693
|
}, [() => speechButtonLabel(model()?.locale)]);
|
|
5475
5694
|
append($$anchor, fragment);
|
|
5476
5695
|
};
|
|
5477
|
-
var
|
|
5478
|
-
var fragment_1 =
|
|
5696
|
+
var consequent_5 = ($$anchor) => {
|
|
5697
|
+
var fragment_1 = root_7();
|
|
5479
5698
|
var audio_1 = first_child(fragment_1);
|
|
5480
5699
|
bind_this(audio_1, ($$value) => set(audioEl, $$value), () => get(audioEl));
|
|
5481
|
-
var
|
|
5482
|
-
var
|
|
5483
|
-
var
|
|
5484
|
-
var
|
|
5485
|
-
reset(
|
|
5486
|
-
bind_this(
|
|
5487
|
-
template_effect(() => set_text(
|
|
5488
|
-
append($$anchor,
|
|
5700
|
+
var node_5 = sibling(audio_1, 2);
|
|
5701
|
+
var consequent_4 = ($$anchor) => {
|
|
5702
|
+
var button_2 = root_8();
|
|
5703
|
+
var text_1 = child(button_2, true);
|
|
5704
|
+
reset(button_2);
|
|
5705
|
+
bind_this(button_2, ($$value) => set(autoplayEnableButtonEl, $$value), () => get(autoplayEnableButtonEl));
|
|
5706
|
+
template_effect(() => set_text(text_1, get(uiText).clickToEnableAutoplay));
|
|
5707
|
+
append($$anchor, button_2);
|
|
5489
5708
|
};
|
|
5490
|
-
if_block(
|
|
5491
|
-
if (get(autoPlayPromptOpen)) $$render(
|
|
5709
|
+
if_block(node_5, ($$render) => {
|
|
5710
|
+
if (get(autoPlayPromptOpen)) $$render(consequent_4);
|
|
5492
5711
|
});
|
|
5493
5712
|
template_effect(() => {
|
|
5494
5713
|
set_attribute(audio_1, "src", model().audioUrl);
|
|
@@ -5496,117 +5715,100 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
5496
5715
|
});
|
|
5497
5716
|
append($$anchor, fragment_1);
|
|
5498
5717
|
};
|
|
5499
|
-
var
|
|
5500
|
-
var p =
|
|
5501
|
-
var
|
|
5718
|
+
var consequent_6 = ($$anchor) => {
|
|
5719
|
+
var p = root_9();
|
|
5720
|
+
var text_2 = child(p, true);
|
|
5502
5721
|
reset(p);
|
|
5503
|
-
template_effect(() => set_text(
|
|
5722
|
+
template_effect(() => set_text(text_2, get(audioErrorMessage)));
|
|
5504
5723
|
append($$anchor, p);
|
|
5505
5724
|
};
|
|
5506
|
-
if_block(
|
|
5507
|
-
if (get(hasPlayableAudio) && get(useFeatureButtonAudio)) $$render(
|
|
5508
|
-
else if (get(hasPlayableAudio)) $$render(
|
|
5509
|
-
else if (get(hasAudioButMissingResource)) $$render(
|
|
5725
|
+
if_block(node_4, ($$render) => {
|
|
5726
|
+
if (get(hasPlayableAudio) && get(useFeatureButtonAudio)) $$render(consequent_3);
|
|
5727
|
+
else if (get(hasPlayableAudio)) $$render(consequent_5, 1);
|
|
5728
|
+
else if (get(hasAudioButMissingResource)) $$render(consequent_6, 2);
|
|
5510
5729
|
});
|
|
5511
|
-
var
|
|
5512
|
-
var
|
|
5513
|
-
var p_1 =
|
|
5730
|
+
var node_6 = sibling(node_4, 2);
|
|
5731
|
+
var consequent_7 = ($$anchor) => {
|
|
5732
|
+
var p_1 = root_10();
|
|
5514
5733
|
var strong = child(p_1);
|
|
5515
|
-
var
|
|
5734
|
+
var text_3 = child(strong);
|
|
5516
5735
|
reset(strong);
|
|
5517
|
-
var
|
|
5736
|
+
var text_4 = sibling(strong);
|
|
5518
5737
|
reset(p_1);
|
|
5519
5738
|
template_effect(() => {
|
|
5520
5739
|
set_class(p_1, 1, `text-sm mt-2 text-gray-700 pie-audio-transcript ${get(showVisibleTranscript) ? "" : "sr-only"}`, "svelte-6wlbb4");
|
|
5521
5740
|
set_attribute(p_1, "id", get(transcriptId));
|
|
5522
|
-
set_text(
|
|
5523
|
-
set_text(
|
|
5741
|
+
set_text(text_3, `${get(uiText).transcriptLabel ?? ""}:`);
|
|
5742
|
+
set_text(text_4, ` ${model().audioTranscript ?? ""}`);
|
|
5524
5743
|
});
|
|
5525
5744
|
append($$anchor, p_1);
|
|
5526
5745
|
};
|
|
5527
|
-
if_block(
|
|
5528
|
-
if (model()?.audioTranscript) $$render(
|
|
5746
|
+
if_block(node_6, ($$render) => {
|
|
5747
|
+
if (model()?.audioTranscript) $$render(consequent_7);
|
|
5529
5748
|
});
|
|
5530
|
-
reset(div_2);
|
|
5531
|
-
append($$anchor, div_2);
|
|
5532
|
-
};
|
|
5533
|
-
if_block(node_1, ($$render) => {
|
|
5534
|
-
if (model()?.hasAudio) $$render(consequent_6);
|
|
5535
|
-
});
|
|
5536
|
-
var node_5 = sibling(node_1, 2);
|
|
5537
|
-
var consequent_7 = ($$anchor) => {
|
|
5538
|
-
var div_3 = root_8();
|
|
5539
|
-
html(div_3, () => model().sentenceHtml, true);
|
|
5540
5749
|
reset(div_3);
|
|
5541
|
-
template_effect(() => set_attribute(div_3, "aria-describedby", get(templateDescribedBy)));
|
|
5542
5750
|
append($$anchor, div_3);
|
|
5543
5751
|
};
|
|
5544
|
-
if_block(
|
|
5545
|
-
if (model()?.
|
|
5752
|
+
if_block(node_3, ($$render) => {
|
|
5753
|
+
if (model()?.hasAudio) $$render(consequent_8);
|
|
5754
|
+
});
|
|
5755
|
+
var node_7 = sibling(node_3, 2);
|
|
5756
|
+
var consequent_9 = ($$anchor) => {
|
|
5757
|
+
var div_4 = root_11();
|
|
5758
|
+
html(div_4, () => model().sentenceHtml, true);
|
|
5759
|
+
reset(div_4);
|
|
5760
|
+
template_effect(() => set_attribute(div_4, "aria-describedby", get(templateDescribedBy)));
|
|
5761
|
+
append($$anchor, div_4);
|
|
5762
|
+
};
|
|
5763
|
+
if_block(node_7, ($$render) => {
|
|
5764
|
+
if (model()?.sentenceHtml) $$render(consequent_9);
|
|
5546
5765
|
});
|
|
5547
|
-
var
|
|
5548
|
-
var
|
|
5549
|
-
var
|
|
5550
|
-
var
|
|
5551
|
-
html(
|
|
5552
|
-
var
|
|
5553
|
-
var
|
|
5554
|
-
var
|
|
5555
|
-
var img_2 =
|
|
5766
|
+
var node_8 = sibling(node_7, 2);
|
|
5767
|
+
var consequent_12 = ($$anchor) => {
|
|
5768
|
+
var div_5 = root_12();
|
|
5769
|
+
var node_9 = child(div_5);
|
|
5770
|
+
html(node_9, () => get(templateParts).before);
|
|
5771
|
+
var span_3 = sibling(node_9, 2);
|
|
5772
|
+
var node_10 = child(span_3);
|
|
5773
|
+
var consequent_10 = ($$anchor) => {
|
|
5774
|
+
var img_2 = root_13();
|
|
5556
5775
|
template_effect(() => {
|
|
5557
5776
|
set_attribute(img_2, "src", get(displayChoice).imageUrl);
|
|
5558
5777
|
set_attribute(img_2, "alt", get(displayChoice).imageAlt || "Selected answer image");
|
|
5559
5778
|
});
|
|
5560
5779
|
append($$anchor, img_2);
|
|
5561
5780
|
};
|
|
5562
|
-
var
|
|
5563
|
-
var
|
|
5564
|
-
html(
|
|
5565
|
-
reset(
|
|
5566
|
-
append($$anchor,
|
|
5781
|
+
var consequent_11 = ($$anchor) => {
|
|
5782
|
+
var span_4 = root_14();
|
|
5783
|
+
html(span_4, () => get(displayChoice).labelHtml, true);
|
|
5784
|
+
reset(span_4);
|
|
5785
|
+
append($$anchor, span_4);
|
|
5567
5786
|
};
|
|
5568
|
-
var
|
|
5569
|
-
append($$anchor,
|
|
5787
|
+
var alternate_1 = ($$anchor) => {
|
|
5788
|
+
append($$anchor, root_15());
|
|
5570
5789
|
};
|
|
5571
|
-
if_block(
|
|
5572
|
-
if (get(choiceMode) === "image" && get(displayChoice)?.imageUrl) $$render(
|
|
5573
|
-
else if (get(displayChoice)?.labelHtml) $$render(
|
|
5574
|
-
else $$render(
|
|
5575
|
-
});
|
|
5576
|
-
reset(span);
|
|
5577
|
-
html(sibling(span, 2), () => get(templateParts).after);
|
|
5578
|
-
reset(div_4);
|
|
5579
|
-
template_effect(() => {
|
|
5580
|
-
set_attribute(div_4, "aria-describedby", get(templateDescribedBy));
|
|
5581
|
-
set_class(span, 1, `inline-flex items-center min-h-[1.5em] px-2 mx-1 border-b-2 border-gray-500 align-baseline blank-slot pie-blank-slot ${get(isBlankOnlyTemplate) ? "blank-slot-standalone pie-blank-slot-standalone" : ""}`, "svelte-6wlbb4");
|
|
5582
|
-
set_style(span, `width:${get(blankWidth)};border-bottom-width:${get(blankBorderWidth)};`);
|
|
5583
|
-
set_attribute(span, "aria-label", get(uiText).selectedAnswerInSentence);
|
|
5790
|
+
if_block(node_10, ($$render) => {
|
|
5791
|
+
if (get(choiceMode) === "image" && get(displayChoice)?.imageUrl) $$render(consequent_10);
|
|
5792
|
+
else if (get(displayChoice)?.labelHtml) $$render(consequent_11, 1);
|
|
5793
|
+
else $$render(alternate_1, -1);
|
|
5584
5794
|
});
|
|
5585
|
-
append($$anchor, div_4);
|
|
5586
|
-
};
|
|
5587
|
-
if_block(node_6, ($$render) => {
|
|
5588
|
-
if (!get(isAudioOnlyMode)) $$render(consequent_10);
|
|
5589
|
-
});
|
|
5590
|
-
var node_10 = sibling(node_6, 2);
|
|
5591
|
-
var consequent_11 = ($$anchor) => {
|
|
5592
|
-
var button_2 = root_13();
|
|
5593
|
-
var span_3 = child(button_2);
|
|
5594
|
-
var text_4 = child(span_3, true);
|
|
5595
5795
|
reset(span_3);
|
|
5596
|
-
|
|
5597
|
-
|
|
5796
|
+
html(sibling(span_3, 2), () => get(templateParts).after);
|
|
5797
|
+
reset(div_5);
|
|
5598
5798
|
template_effect(() => {
|
|
5599
|
-
set_attribute(
|
|
5600
|
-
|
|
5799
|
+
set_attribute(div_5, "aria-describedby", get(templateDescribedBy));
|
|
5800
|
+
set_class(span_3, 1, `inline-flex items-center min-h-[1.5em] px-2 mx-1 border-b-2 border-gray-500 align-baseline blank-slot pie-blank-slot ${get(isBlankOnlyTemplate) ? "blank-slot-standalone pie-blank-slot-standalone" : ""}`, "svelte-6wlbb4");
|
|
5801
|
+
set_style(span_3, `width:${get(blankWidth)};border-bottom-width:${get(blankBorderWidth)};`);
|
|
5802
|
+
set_attribute(span_3, "aria-label", get(uiText).selectedAnswerInSentence);
|
|
5601
5803
|
});
|
|
5602
|
-
append($$anchor,
|
|
5804
|
+
append($$anchor, div_5);
|
|
5603
5805
|
};
|
|
5604
|
-
if_block(
|
|
5605
|
-
if (get(
|
|
5806
|
+
if_block(node_8, ($$render) => {
|
|
5807
|
+
if (!get(isAudioOnlyMode)) $$render(consequent_12);
|
|
5606
5808
|
});
|
|
5607
|
-
var
|
|
5608
|
-
var
|
|
5609
|
-
var p_2 =
|
|
5809
|
+
var node_12 = sibling(node_8, 2);
|
|
5810
|
+
var consequent_13 = ($$anchor) => {
|
|
5811
|
+
var p_2 = root_16();
|
|
5610
5812
|
var text_5 = child(p_2, true);
|
|
5611
5813
|
reset(p_2);
|
|
5612
5814
|
template_effect(() => {
|
|
@@ -5615,41 +5817,42 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
5615
5817
|
});
|
|
5616
5818
|
append($$anchor, p_2);
|
|
5617
5819
|
};
|
|
5618
|
-
if_block(
|
|
5619
|
-
if (get(resultText)) $$render(
|
|
5820
|
+
if_block(node_12, ($$render) => {
|
|
5821
|
+
if (get(resultText)) $$render(consequent_13);
|
|
5620
5822
|
});
|
|
5621
|
-
var fieldset = sibling(
|
|
5823
|
+
var fieldset = sibling(node_12, 2);
|
|
5622
5824
|
var legend = child(fieldset);
|
|
5623
5825
|
var text_6 = child(legend, true);
|
|
5624
5826
|
reset(legend);
|
|
5625
|
-
var
|
|
5626
|
-
each(
|
|
5627
|
-
|
|
5628
|
-
var
|
|
5629
|
-
var
|
|
5630
|
-
|
|
5631
|
-
var
|
|
5632
|
-
var
|
|
5633
|
-
var
|
|
5634
|
-
|
|
5827
|
+
var div_6 = sibling(legend, 2);
|
|
5828
|
+
each(div_6, 21, () => get(choices), (c) => c.id, ($$anchor, c) => {
|
|
5829
|
+
const choiceCorrectness = /* @__PURE__ */ user_derived(() => get(choiceCorrectnessById).get(get(c).id));
|
|
5830
|
+
var div_7 = root_17();
|
|
5831
|
+
var node_13 = child(div_7);
|
|
5832
|
+
var consequent_15 = ($$anchor) => {
|
|
5833
|
+
var label = root_18();
|
|
5834
|
+
var span_6 = child(label);
|
|
5835
|
+
var node_14 = child(span_6);
|
|
5836
|
+
var consequent_14 = ($$anchor) => {
|
|
5837
|
+
var img_3 = root_19();
|
|
5635
5838
|
template_effect(() => {
|
|
5636
5839
|
set_attribute(img_3, "src", get(c).imageUrl);
|
|
5637
5840
|
set_attribute(img_3, "alt", get(c).imageAlt || `Choice ${get(c).id}`);
|
|
5638
5841
|
});
|
|
5639
5842
|
append($$anchor, img_3);
|
|
5640
5843
|
};
|
|
5641
|
-
var
|
|
5642
|
-
var
|
|
5643
|
-
html(
|
|
5644
|
-
reset(
|
|
5645
|
-
append($$anchor,
|
|
5844
|
+
var alternate_2 = ($$anchor) => {
|
|
5845
|
+
var span_7 = root_20();
|
|
5846
|
+
html(span_7, () => get(c).labelHtml || "", true);
|
|
5847
|
+
reset(span_7);
|
|
5848
|
+
append($$anchor, span_7);
|
|
5646
5849
|
};
|
|
5647
|
-
if_block(
|
|
5648
|
-
if (get(choiceMode) === "image" && get(c).imageUrl) $$render(
|
|
5649
|
-
else $$render(
|
|
5850
|
+
if_block(node_14, ($$render) => {
|
|
5851
|
+
if (get(choiceMode) === "image" && get(c).imageUrl) $$render(consequent_14);
|
|
5852
|
+
else $$render(alternate_2, -1);
|
|
5650
5853
|
});
|
|
5651
|
-
reset(
|
|
5652
|
-
var input_1 = sibling(
|
|
5854
|
+
reset(span_6);
|
|
5855
|
+
var input_1 = sibling(span_6, 2);
|
|
5653
5856
|
remove_input_defaults(input_1);
|
|
5654
5857
|
reset(label);
|
|
5655
5858
|
template_effect(() => {
|
|
@@ -5657,75 +5860,70 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
5657
5860
|
set_attribute(input_1, "name", get(radioGroupName));
|
|
5658
5861
|
set_attribute(input_1, "id", `${instanceId}-opt-${get(c).id}`);
|
|
5659
5862
|
set_value(input_1, get(c).id);
|
|
5660
|
-
set_checked(input_1, (get(
|
|
5863
|
+
set_checked(input_1, (get(shouldShowCorrectAnswer) && get(canRevealCorrectAnswer) ? model()?.correctChoiceId : get(selectedId)) === get(c).id);
|
|
5661
5864
|
input_1.disabled = model()?.disabled;
|
|
5662
5865
|
});
|
|
5663
5866
|
append($$anchor, label);
|
|
5664
5867
|
};
|
|
5665
|
-
var
|
|
5666
|
-
var fragment_2 =
|
|
5868
|
+
var alternate_4 = ($$anchor) => {
|
|
5869
|
+
var fragment_2 = root_21();
|
|
5667
5870
|
var input_2 = first_child(fragment_2);
|
|
5668
5871
|
remove_input_defaults(input_2);
|
|
5669
5872
|
var label_1 = sibling(input_2, 2);
|
|
5670
|
-
var
|
|
5671
|
-
var
|
|
5672
|
-
var img_4 =
|
|
5873
|
+
var node_15 = child(label_1);
|
|
5874
|
+
var consequent_16 = ($$anchor) => {
|
|
5875
|
+
var img_4 = root_22();
|
|
5673
5876
|
template_effect(() => {
|
|
5674
5877
|
set_attribute(img_4, "src", get(c).imageUrl);
|
|
5675
5878
|
set_attribute(img_4, "alt", get(c).imageAlt || `Choice ${get(c).id}`);
|
|
5676
5879
|
});
|
|
5677
5880
|
append($$anchor, img_4);
|
|
5678
5881
|
};
|
|
5679
|
-
var
|
|
5680
|
-
var
|
|
5681
|
-
html(
|
|
5682
|
-
reset(
|
|
5683
|
-
append($$anchor,
|
|
5882
|
+
var alternate_3 = ($$anchor) => {
|
|
5883
|
+
var span_8 = root_23();
|
|
5884
|
+
html(span_8, () => get(c).labelHtml || "", true);
|
|
5885
|
+
reset(span_8);
|
|
5886
|
+
append($$anchor, span_8);
|
|
5684
5887
|
};
|
|
5685
|
-
if_block(
|
|
5686
|
-
if (get(choiceMode) === "image" && get(c).imageUrl) $$render(
|
|
5687
|
-
else $$render(
|
|
5888
|
+
if_block(node_15, ($$render) => {
|
|
5889
|
+
if (get(choiceMode) === "image" && get(c).imageUrl) $$render(consequent_16);
|
|
5890
|
+
else $$render(alternate_3, -1);
|
|
5688
5891
|
});
|
|
5689
5892
|
reset(label_1);
|
|
5690
5893
|
template_effect(() => {
|
|
5691
5894
|
set_attribute(input_2, "name", get(radioGroupName));
|
|
5692
5895
|
set_attribute(input_2, "id", `${instanceId}-opt-${get(c).id}`);
|
|
5693
5896
|
set_value(input_2, get(c).id);
|
|
5694
|
-
set_checked(input_2, (get(
|
|
5897
|
+
set_checked(input_2, (get(shouldShowCorrectAnswer) && get(canRevealCorrectAnswer) ? model()?.correctChoiceId : get(selectedId)) === get(c).id);
|
|
5695
5898
|
input_2.disabled = model()?.disabled;
|
|
5696
5899
|
set_attribute(label_1, "for", `${instanceId}-opt-${get(c).id}`);
|
|
5697
5900
|
});
|
|
5698
5901
|
append($$anchor, fragment_2);
|
|
5699
5902
|
};
|
|
5700
|
-
if_block(
|
|
5701
|
-
if (get(isHorizontalChoices)) $$render(
|
|
5702
|
-
else $$render(
|
|
5903
|
+
if_block(node_13, ($$render) => {
|
|
5904
|
+
if (get(isHorizontalChoices)) $$render(consequent_15);
|
|
5905
|
+
else $$render(alternate_4, -1);
|
|
5703
5906
|
});
|
|
5704
|
-
var
|
|
5705
|
-
var
|
|
5706
|
-
var
|
|
5707
|
-
var
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
append($$anchor, root_24());
|
|
5713
|
-
};
|
|
5714
|
-
if_block(node_16, ($$render) => {
|
|
5715
|
-
if (get(selectedId) === get(c).id && get(isCorrect)) $$render(consequent_16);
|
|
5716
|
-
else if (get(selectedId) === get(c).id && get(isIncorrect)) $$render(consequent_17, 1);
|
|
5907
|
+
var node_16 = sibling(node_13, 2);
|
|
5908
|
+
var consequent_17 = ($$anchor) => {
|
|
5909
|
+
var span_9 = root_24();
|
|
5910
|
+
var text_7 = child(span_9, true);
|
|
5911
|
+
reset(span_9);
|
|
5912
|
+
template_effect(() => {
|
|
5913
|
+
set_class(span_9, 1, `pie-choice-feedback-badge ${get(choiceCorrectness) === "correct" ? "pie-choice-feedback-correct" : "pie-choice-feedback-incorrect"}`, "svelte-6wlbb4");
|
|
5914
|
+
set_text(text_7, get(choiceCorrectness) === "correct" ? "✓" : "✕");
|
|
5717
5915
|
});
|
|
5718
|
-
append($$anchor,
|
|
5916
|
+
append($$anchor, span_9);
|
|
5719
5917
|
};
|
|
5720
|
-
if_block(
|
|
5721
|
-
if (get(isEvaluateMode) &&
|
|
5918
|
+
if_block(node_16, ($$render) => {
|
|
5919
|
+
if (get(isEvaluateMode) && get(choiceCorrectness)) $$render(consequent_17);
|
|
5722
5920
|
});
|
|
5723
|
-
reset(
|
|
5724
|
-
template_effect(() => set_class(
|
|
5725
|
-
append($$anchor,
|
|
5921
|
+
reset(div_7);
|
|
5922
|
+
template_effect(() => set_class(div_7, 1, `flex items-start choice-row pie-choice ${get(isHorizontalChoices) ? "choice-row-horizontal pie-choice-horizontal" : ""} ${(get(shouldShowCorrectAnswer) && get(canRevealCorrectAnswer) ? model()?.correctChoiceId : get(selectedId)) === get(c).id ? "is-selected pie-choice-selected" : ""} ${get(choiceCorrectness) ? `choice-${get(choiceCorrectness)} pie-choice-${get(choiceCorrectness)}` : ""}`, "svelte-6wlbb4"));
|
|
5923
|
+
append($$anchor, div_7);
|
|
5726
5924
|
});
|
|
5727
|
-
reset(
|
|
5728
|
-
bind_this(
|
|
5925
|
+
reset(div_6);
|
|
5926
|
+
bind_this(div_6, ($$value) => set(choicesGroupEl, $$value), () => get(choicesGroupEl));
|
|
5729
5927
|
reset(fieldset);
|
|
5730
5928
|
reset(div);
|
|
5731
5929
|
template_effect(() => {
|
|
@@ -5735,10 +5933,10 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
5735
5933
|
fieldset.disabled = model()?.disabled;
|
|
5736
5934
|
set_attribute(legend, "id", get(legendId));
|
|
5737
5935
|
set_text(text_6, get(legendText));
|
|
5738
|
-
set_class(
|
|
5739
|
-
set_attribute(
|
|
5740
|
-
set_attribute(
|
|
5741
|
-
set_attribute(
|
|
5936
|
+
set_class(div_6, 1, `pie-choices ${get(isHorizontalChoices) ? "flex flex-row flex-wrap items-start justify-center" : "flex flex-col"}`, "svelte-6wlbb4");
|
|
5937
|
+
set_attribute(div_6, "aria-labelledby", get(choicesGroupLabelledBy));
|
|
5938
|
+
set_attribute(div_6, "aria-label", get(choicesGroupAriaLabel));
|
|
5939
|
+
set_attribute(div_6, "aria-describedby", get(resultText) ? get(resultId) : void 0);
|
|
5742
5940
|
});
|
|
5743
5941
|
append($$anchor, div);
|
|
5744
5942
|
return pop($$exports);
|