@doenet/v06-to-v07 0.7.21-dev.367 → 0.7.21-dev.370

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.
@@ -42123,6 +42123,108 @@ function returnTextStyleDescriptionDefinitions() {
42123
42123
  )
42124
42124
  };
42125
42125
  }
42126
+ const DEFAULT_MATH_INPUT_FUNCTION_NAMES = [
42127
+ "arg",
42128
+ "deg",
42129
+ "det",
42130
+ "dim",
42131
+ "exp",
42132
+ "gcd",
42133
+ "hom",
42134
+ "ker",
42135
+ "lg",
42136
+ "lim",
42137
+ "ln",
42138
+ "log",
42139
+ "max",
42140
+ "min",
42141
+ "Pr",
42142
+ "cos",
42143
+ "cosh",
42144
+ "acos",
42145
+ "acosh",
42146
+ "arccos",
42147
+ "arccosh",
42148
+ "cot",
42149
+ "coth",
42150
+ "acot",
42151
+ "acoth",
42152
+ "arccot",
42153
+ "arccoth",
42154
+ "csc",
42155
+ "csch",
42156
+ "acsc",
42157
+ "acsch",
42158
+ "arccsc",
42159
+ "arccsch",
42160
+ "sec",
42161
+ "sech",
42162
+ "asec",
42163
+ "asech",
42164
+ "arcsec",
42165
+ "arcsech",
42166
+ "sin",
42167
+ "sinh",
42168
+ "asin",
42169
+ "asinh",
42170
+ "arcsin",
42171
+ "arcsinh",
42172
+ "tan",
42173
+ "tanh",
42174
+ "atan",
42175
+ "atanh",
42176
+ "arctan",
42177
+ "arctanh",
42178
+ "nPr",
42179
+ "nCr"
42180
+ ];
42181
+ function isValidMathQuillFunctionName(token) {
42182
+ if (!/^[a-z|-]+$/i.test(token)) return false;
42183
+ const parts = token.split("|");
42184
+ if (parts.length > 2) return false;
42185
+ if (parts[0].length < 2) return false;
42186
+ return true;
42187
+ }
42188
+ function buildEffectiveMathInputFunctionNames({
42189
+ additional = [],
42190
+ removed = [],
42191
+ reset = null
42192
+ }) {
42193
+ if (reset !== null) {
42194
+ const seen2 = /* @__PURE__ */ new Set();
42195
+ const out2 = [];
42196
+ const droppedFromReset = [];
42197
+ for (const name2 of reset) {
42198
+ if (seen2.has(name2)) continue;
42199
+ seen2.add(name2);
42200
+ if (!isValidMathQuillFunctionName(name2)) {
42201
+ droppedFromReset.push(name2);
42202
+ continue;
42203
+ }
42204
+ out2.push(name2);
42205
+ }
42206
+ return { names: out2, droppedFromAdditional: [], droppedFromReset };
42207
+ }
42208
+ const removedSet = new Set(removed);
42209
+ const seen = /* @__PURE__ */ new Set();
42210
+ const out = [];
42211
+ for (const name2 of DEFAULT_MATH_INPUT_FUNCTION_NAMES) {
42212
+ if (removedSet.has(name2) || seen.has(name2)) continue;
42213
+ seen.add(name2);
42214
+ out.push(name2);
42215
+ }
42216
+ const droppedFromAdditional = [];
42217
+ for (const name2 of additional) {
42218
+ if (removedSet.has(name2) || seen.has(name2)) continue;
42219
+ seen.add(name2);
42220
+ if (!isValidMathQuillFunctionName(name2)) {
42221
+ droppedFromAdditional.push(name2);
42222
+ continue;
42223
+ }
42224
+ out.push(name2);
42225
+ }
42226
+ return { names: out, droppedFromAdditional, droppedFromReset: [] };
42227
+ }
42126
42228
  function printDoenetMLrange(position2) {
42127
42229
  if (position2.start.line === position2.end.line) {
42128
42230
  return `line ${position2.start.line}`;
@@ -42591,7 +42693,7 @@ async function cidFromArrayBuffer(data) {
42591
42693
  await crypto.subtle.digest("SHA-256", new Uint8Array());
42592
42694
  digest = (data2) => crypto.subtle.digest("SHA-256", data2);
42593
42695
  } catch (e22) {
42594
- const sha256 = (await import("./sha256-1m3pbIuR-doXkfhnK-DnBnHZ9g.js").then((n2) => n2.s)).default;
42696
+ const sha256 = (await import("./sha256-1m3pbIuR-CIaVvm-f-BdIg-uUF.js").then((n2) => n2.s)).default;
42595
42697
  digest = (data2) => sha256(data2, {
42596
42698
  asBytes: true
42597
42699
  });
@@ -45034,108 +45136,6 @@ const functionOperatorDefinitions = {
45034
45136
  }
45035
45137
  }
45036
45138
  };
45037
- const DEFAULT_MATH_INPUT_FUNCTION_NAMES = [
45038
- "arg",
45039
- "deg",
45040
- "det",
45041
- "dim",
45042
- "exp",
45043
- "gcd",
45044
- "hom",
45045
- "ker",
45046
- "lg",
45047
- "lim",
45048
- "ln",
45049
- "log",
45050
- "max",
45051
- "min",
45052
- "Pr",
45053
- "cos",
45054
- "cosh",
45055
- "acos",
45056
- "acosh",
45057
- "arccos",
45058
- "arccosh",
45059
- "cot",
45060
- "coth",
45061
- "acot",
45062
- "acoth",
45063
- "arccot",
45064
- "arccoth",
45065
- "csc",
45066
- "csch",
45067
- "acsc",
45068
- "acsch",
45069
- "arccsc",
45070
- "arccsch",
45071
- "sec",
45072
- "sech",
45073
- "asec",
45074
- "asech",
45075
- "arcsec",
45076
- "arcsech",
45077
- "sin",
45078
- "sinh",
45079
- "asin",
45080
- "asinh",
45081
- "arcsin",
45082
- "arcsinh",
45083
- "tan",
45084
- "tanh",
45085
- "atan",
45086
- "atanh",
45087
- "arctan",
45088
- "arctanh",
45089
- "nPr",
45090
- "nCr"
45091
- ];
45092
- function isValidMathQuillFunctionName(token) {
45093
- if (!/^[a-z|-]+$/i.test(token)) return false;
45094
- const parts = token.split("|");
45095
- if (parts.length > 2) return false;
45096
- if (parts[0].length < 2) return false;
45097
- return true;
45098
- }
45099
- function buildEffectiveMathInputFunctionNames({
45100
- additional = [],
45101
- removed = [],
45102
- reset = null
45103
- }) {
45104
- if (reset !== null) {
45105
- const seen2 = /* @__PURE__ */ new Set();
45106
- const out2 = [];
45107
- const droppedFromReset = [];
45108
- for (const name2 of reset) {
45109
- if (seen2.has(name2)) continue;
45110
- seen2.add(name2);
45111
- if (!isValidMathQuillFunctionName(name2)) {
45112
- droppedFromReset.push(name2);
45113
- continue;
45114
- }
45115
- out2.push(name2);
45116
- }
45117
- return { names: out2, droppedFromAdditional: [], droppedFromReset };
45118
- }
45119
- const removedSet = new Set(removed);
45120
- const seen = /* @__PURE__ */ new Set();
45121
- const out = [];
45122
- for (const name2 of DEFAULT_MATH_INPUT_FUNCTION_NAMES) {
45123
- if (removedSet.has(name2) || seen.has(name2)) continue;
45124
- seen.add(name2);
45125
- out.push(name2);
45126
- }
45127
- const droppedFromAdditional = [];
45128
- for (const name2 of additional) {
45129
- if (removedSet.has(name2) || seen.has(name2)) continue;
45130
- seen.add(name2);
45131
- if (!isValidMathQuillFunctionName(name2)) {
45132
- droppedFromAdditional.push(name2);
45133
- continue;
45134
- }
45135
- out.push(name2);
45136
- }
45137
- return { names: out, droppedFromAdditional, droppedFromReset: [] };
45138
- }
45139
45139
  const creativeCommonsVersions = [
45140
45140
  "1.0",
45141
45141
  "2.0",
@@ -46357,7 +46357,7 @@ class Indent {
46357
46357
  }
46358
46358
  const chrome$1 = "# Viewer chrome: buttons, panel headers, and other UI the reader interacts\n# with. Rendered on the main thread and selected by `uiLocale`.\n#\n# Message ids are lower-kebab-case Fluent identifiers, optionally with a\n# single `.attribute` suffix (`submit-button`, `answer-status.correct`).\n#\n# This catalog is the source of truth for every other locale: `lint:i18n`\n# rejects a translation that defines a key missing here. Run\n# `npm run codegen -w @doenet/i18n` after editing.\n\n\n## Answer submission — the check-work button and the status it reports.\n\nanswer-checking = Checking...\nanswer-submitting = Submitting...\n\n# Announced to a screen reader while the submission is in flight. Separate\n# from the button's own text, which is abbreviated.\nanswer-checking-status = Checking answer\nanswer-submitting-status = Submitting answer\n\nanswer-correct = Correct\nanswer-incorrect = Incorrect\n\n# Shown instead of a correctness verdict when the activity withholds\n# correctness: the response was recorded, nothing is claimed about it.\nanswer-response-saved = Response Saved\n\n# Partial credit. `-credit` is used when repeated attempts reduce the credit\n# available, `-correct` when they do not, and `-short` on a button too narrow\n# for a word.\nanswer-percent-credit = { $percent }% Credit\nanswer-percent-correct = { $percent }% Correct\nanswer-percent-short = { $percent } %\n\nmax-credit-available = Max credit available: { $percent }%\n\n# Fluent formats `{ $count }` with `Intl.NumberFormat`, so a four-digit\n# attempt count renders as \"1,000\" where the hand-built string said \"1000\".\n# That is the one place English output is not byte-identical to what this\n# replaced, and grouping is the locale-correct rendering, so it stands.\nattempts-remaining =\n { $count ->\n [0] no attempts remaining\n [one] { $count } attempt remaining\n *[other] { $count } attempts remaining\n }\n\n# Appended to an input's accessible name once its response has been graded,\n# so a screen reader reports the verdict along with the field.\nvalidation-correct = (Correct)\nvalidation-incorrect = (Incorrect)\nvalidation-partially-correct = (Partially correct)\n\n# Tooltip on the badge that reports how many responses have been submitted to\n# one answer, shown only to a host that asked for it. `$answerId` is the\n# answer's authored name and is never translated.\nanswer-show-responses =\n { $count ->\n [one] Show { $count } response to { $answerId }\n *[other] Show { $count } responses to { $answerId }\n }\n\n\n## Disclosure panels\n\nfeedback-heading = Feedback\n\n# Follows a disclosure panel's own heading — \"Solution (click to open)\" — and\n# is shared by `<solution>`, `<hint>`, and a collapsible `<section>`. The whole\n# parenthetical is one message: where the word for open or close falls inside\n# it is the translator's business.\ncollapsible-click-to-open = (click to open)\ncollapsible-click-to-close = (click to close)\n\n# Placeholder inside a panel that has been opened before its contents have\n# arrived from the core. Shared by `<solution>` and a collapsible `<section>`.\ncollapsible-initializing = Initializing...\n\n# Tooltip on a footnote marker, naming what activating it will do.\nfootnote-show = Show footnote\nfootnote-hide = Hide footnote\n\n# Tooltip on the ⓘ affordance that reveals an input's description.\ndescription-more-information = more information\n\n\n## Controls\n\nslider-previous = Prev\nslider-next = Next\n\nkeyboard-open = Open Keyboard\nkeyboard-close = Close Keyboard\n\n# Accessible names of a matrix input's size controls, whose visible labels are\n# the symbols `r-` `r+` `c-` `c+`.\nmatrix-remove-row = Remove row\nmatrix-add-row = Add row\nmatrix-remove-column = Remove column\nmatrix-add-column = Add column\n\n# Modes and actions of the subset-of-reals input's control strip. The button\n# that selects all of the reals is the symbol `R`, not a word, and stays in\n# place.\nsubset-add-remove-points = Add/Remove points\nsubset-toggle-points-intervals = Toggle points and intervals\nsubset-move-points = Move Points\nsubset-clear = Clear\n\n# Buttons that edit an orbital diagram: rows hold boxes, boxes hold up to\n# three spin arrows.\norbital-add-row = Add Row\norbital-remove-row = Remove Row\norbital-add-box = Add Box\norbital-remove-box = Remove Box\norbital-add-up-arrow = Add Up Arrow\norbital-add-down-arrow = Add Down Arrow\norbital-remove-arrow = Remove Arrow\n\n# Accessible name of the text field naming one row of an orbital diagram,\n# counting from 1.\norbital-row-label = Label for row { $row }\n\n# Labels the answer column of a pretzel exercise's grid.\npretzel-answer = Answer\n\n# Caption above the table a `<summaryStatistics>` renders. `$column` is the\n# authored name of the data column being summarized and is never translated.\n# The table's own headings (`mean`, `stdev`, `quartile1`, …) are the statistic\n# ids an author references, not prose, and stay in place.\nsummary-statistics-caption = Summary statistics of { $column }\n\n\n## Math input\n\n# Accessible name of the popover that previews the typed expression, and of\n# the rendered expression inside it.\nmath-input-preview-region = math expression preview\nmath-input-preview = Preview\nmath-input-invalid-expression = Invalid expression:\n\n\n## Document status\n\n# Shown while the core is still starting up and nothing can be rendered yet.\nviewer-initializing = Initializing...\n\n\n## Errors\n\n# Prefixes an error message wherever one is shown in place of content: an\n# `<error>` the core reported, the error boundary's fallback, and the\n# placeholder left where a renderer chunk failed to load.\nerror-heading = Error\n\n# Banner above a document that compiled with at least one error in it.\ndocument-contains-errors = This document contains errors!\n\n# Shown in place of the document when a renderer threw and the error boundary\n# caught it.\nsomething-went-wrong = Something went wrong.\n\n# Shown in place of a single renderer whose code chunk never arrived.\nrenderer-load-failed = a renderer failed to load. Please reload the page.\n\n# Shown in place of the document when the core worker could not be started\n# after retries, rather than leaving the pane blank.\ncore-start-failed = The document viewer could not be started. Please reload the page.\n";
46359
46359
  const content = '# Worker-generated content: style descriptions ("thick red line"), boolean\n# words, and other prose the core computes into the document. Selected by\n# `documentLocale`, which follows the content\'s language rather than the\n# reader\'s UI language.\n#\n# Message ids are lower-kebab-case Fluent identifiers, optionally with a\n# single `.attribute` suffix (`color.blue`, `noun.line-segment`).\n\n\n## Style vocabulary\n##\n## The words the style pipeline derives from a component\'s numeric and\n## enumerated style values. A word an author writes directly — `lineColorWord`,\n## `markerStyleWord`, and their siblings — passes through untranslated: the\n## author chose those words, and rewriting them would be a surprise. So does a\n## CSS named color asked for by name ("rebeccapurple"), which\n## `resolveColorWord` deliberately preserves.\n##\n## Every adjective here is handed `$gender`, the grammatical gender of the noun\n## it describes (see `noun-gender`). English has no agreement and ignores it; a\n## language that inflects selects on it.\n\n# The canonical color families a color value resolves to.\ncolor =\n .black = black\n .white = white\n .gray = gray\n .red = red\n .orange = orange\n .yellow = yellow\n .green = green\n .cyan = cyan\n .blue = blue\n .purple = purple\n .pink = pink\n .brown = brown\n\n# Stroke widths. Only the extremes are named — a middling width is described by\n# its color alone.\nline-width =\n .thick = thick\n .thin = thin\n\n# Dash patterns. A solid stroke is described by its color alone.\nline-style =\n .dashed = dashed\n .dotted = dotted\n\n# Patterns a shape\'s interior can be filled with. A solid fill is described by\n# its color alone.\nfill-style =\n .horizontal = horizontal lines\n .vertical = vertical lines\n .diagonal = diagonal lines\n .backdiagonal = reverse diagonal lines\n .dots = dots\n .diamonds = diamonds\n\n# The things being described. The shapes a point can be drawn as ("square",\n# "cross") are nouns too: a point\'s description names its marker shape rather\n# than always saying "point".\nnoun =\n .line = line\n .line-segment = line segment\n .ray = ray\n .vector = vector\n .curve = curve\n .function = function\n .parabola = parabola\n .polyline = polyline\n .polygon = polygon\n .triangle = triangle\n .rectangle = rectangle\n .circle = circle\n .region = region\n .point = point\n .square = square\n .diamond = diamond\n .cross = cross\n .plus = plus\n\n# A regular polygon names its side count, so it is a message of its own rather\n# than one of `noun`\'s attributes.\n#\n# `$part` splits the noun where a language needs it split: `head` is the word\n# the adjectives attach to, `tail` a complement that follows them. English\n# folds the side count into the head and has no tail; Spanish says "polígono\n# regular" and puts "de 5 lados" after the adjectives, so that they stay beside\n# the noun they agree with. `style-with-noun` and `style-filled-with-noun`\n# place the two halves.\n#\n# `$numSides` is a real number, so it is formatted by the locale\'s own rules —\n# a 1000-gon reads "1,000-sided" here and "de 1000 lados" in Spanish. That is\n# the number-formatting policy in the README, and the one place a description\n# is not character-for-character what the pre-catalog code produced.\nnoun-regular-polygon =\n { $part ->\n [tail] { "" }\n *[head] { $numSides }-sided regular polygon\n }\n\n# The grammatical gender of the noun being described, passed to every adjective\n# describing it so that translations can agree. English has no grammatical\n# gender, so every noun answers the same and the answer goes unused.\n#\n# `$noun` is one of `noun`\'s attribute names, `regular-polygon` for the shape\n# `noun-regular-polygon` names, or the head of a phrase the description builds\n# without naming it as a noun: `border`, `fill`, `text`, or `background`. A\n# word this message does not list falls to its default gender — which is also\n# what an author\'s own `markerStyleWord` gets, since the catalog has never seen\n# it.\nnoun-gender = neuter\n\n\n## Style composition\n##\n## `$parts` names which pieces the style actually supplies, so that a\n## translation can order and inflect each combination on its own terms instead\n## of substituting into a fixed English frame. An absent piece is a different\n## branch, never an empty placeable.\n\n# The adjectives describing a stroke: its width, its dash pattern, and its\n# color. Also describes a shape\'s border, where the color is dropped when it\n# matches the fill it surrounds.\nstyle-stroke =\n { $parts ->\n [width-style-color] { $width } { $lineStyle } { $color }\n [width-color] { $width } { $color }\n [style-color] { $lineStyle } { $color }\n [width-style] { $width } { $lineStyle }\n [width] { $width }\n [style] { $lineStyle }\n *[color] { $color }\n }\n\n# A style description followed by what it describes: "thick red line".\n#\n# `$nounTail` is the noun\'s trailing complement, for the nouns whose\n# translation splits around the adjectives (see `noun-regular-polygon`).\n# English has none today, so it only ever selects `noun` for itself — the other\n# variant is still what a partly-translated locale falls back to, and dropping\n# it would drop that locale\'s side count.\nstyle-with-noun =\n { $parts ->\n [noun-tail] { $description } { $noun } { $nounTail }\n *[noun] { $description } { $noun }\n }\n\n# The word marking a shape as filled.\n#\n# A key of its own, looked up by the code and handed to the messages below as\n# `$filled`, rather than literal text inside them: a language that inflects it\n# has to agree it with the shape. Referencing it from those messages would not\n# do — a term reference (`{ -filled }`) gets an empty scope and never sees\n# `$gender`, and a message reference resolves only inside its own bundle, so a\n# locale that translated `style-filled` but not this word would render the\n# reference literally instead of falling back to English.\nstyle-filled-word = filled\n\n# A filled shape, and the pattern its interior is drawn with, if any.\nstyle-filled =\n { $parts ->\n [pattern] { $filled } { $color } with { $pattern }\n *[plain] { $filled } { $color }\n }\n\n# The same, naming the shape: "filled blue circle with diamonds".\n#\n# The `-tail` variants carry the noun\'s trailing complement, as\n# `style-with-noun` does.\nstyle-filled-with-noun =\n { $parts ->\n [pattern] { $filled } { $color } { $noun } with { $pattern }\n [plain-tail] { $filled } { $color } { $noun } { $nounTail }\n [pattern-tail] { $filled } { $color } { $noun } { $nounTail } with { $pattern }\n *[plain] { $filled } { $color } { $noun }\n }\n\n# The border clause appended to a filled shape: "with a thick red border".\n#\n# `$parts` carries two distinctions English cares about: whether a fill pattern\n# was already mentioned, which makes this a further clause ("and") rather than\n# the first ("with"), and whether the surrounding description named the shape,\n# which is where English wants an article.\nstyle-border-clause =\n { $parts ->\n [with-article] with a { $border } border\n [and] and { $border } border\n [and-article] and a { $border } border\n *[with] with { $border } border\n }\n\n# How a shape\'s interior is filled, on its own: "blue diamonds".\nstyle-fill =\n { $parts ->\n [pattern] { $color } { $pattern }\n *[plain] { $color }\n }\n\nstyle-unfilled = unfilled\n\n# How a piece of text is styled: its color, and the background behind it.\nstyle-text =\n { $parts ->\n [background] { $color } with a { $background } background\n *[plain] { $color }\n }\n\n# What `backgroundColor` answers when nothing is drawn behind the text.\nstyle-background-none = none\n';
46360
- const diagnostics = '# Errors and warnings surfaced to the reader or author. Produced by the worker\n# but addressed to whoever is looking at the screen, so these are selected by\n# `uiLocale`, not `documentLocale`.\n#\n# Message ids are lower-kebab-case Fluent identifiers, optionally with a\n# single `.attribute` suffix (`invalid-attribute-value`).\n#\n# Reached by stable diagnostic code rather than by a literal `t("key")` call:\n# `DIAGNOSTIC_CODES` in `src/diagnostics.ts` maps `doenet-w0001` to the id\n# below, and `lint:i18n` treats that registry as the call site. Adding a\n# message here without registering a code for it fails the lint as an orphan.\n#\n# Translators: `through`, `endpoint`, `midpointOffset`, `numDimensions` and the\n# like are DoenetML attribute names. They are part of the language, not prose,\n# and must be left in English exactly as written.\n\n## `<lineSegment>`\n\n# $attributes is a list of attribute names; $attributesCount is its length.\nline-segment-attributes-ignored-with-endpoints =\n { $attributesCount ->\n [one] { $attributes } is ignored when two endpoints are specified\n *[other] { $attributes } are ignored when two endpoints are specified\n }\n\n# $attributes is a list of attribute names; $attributesCount is its length.\nline-segment-attributes-ignored-with-endpoint-and-midpoint =\n { $attributesCount ->\n [one] { $attributes } is ignored when an endpoint and a midpoint are both specified\n *[other] { $attributes } are ignored when an endpoint and a midpoint are both specified\n }\n\nline-segment-midpoint-offset-without-midpoint = midpointOffset has no effect without a midpoint\n\n## `<line>`\n\nline-points-undetermined-dimensions = Line through points of undetermined dimensions.\n\nline-points-too-few-dimensions = Line must be through points of at least two dimensions.\n\n# $variables is a bare enumeration of variable names, not an "and" list.\nline-points-depend-on-variables = Line is through points that depend on variables: { $variables }.\n\nline-equation-invalid-format = Invalid format for equation of line in variables { $variable1 } and { $variable2 }.\n\n## `<ray>`\n\nray-overprescribed-through = Ray is prescribed by through, endpoint, and direction. Ignoring specified through.\n\nray-dimension-mismatch = numDimensions mismatch in ray.\n\n## `<vector>`\n\nvector-overprescribed-head = Vector is prescribed by head, tail, and displacement. Ignoring specified head.\n\nvector-dimension-mismatch = numDimensions mismatch in vector.\n\n## Attracting and constraining\n\n# $component is the DoenetML tag of the child that was named, e.g. "polygon".\nattract-to-without-nearest-point = Cannot attract to a `<{ $component }>` as it doesn\'t have a nearestPoint state variable.\n\nconstrain-to-without-nearest-point = Cannot constrain to a `<{ $component }>` as it doesn\'t have a nearestPoint state variable.\n\nconstrain-to-interior-without-nearest-point = Cannot constrain to interior of a `<{ $component }>` as it doesn\'t have a nearestPoint state variable.\n\n## `<choiceInput>`\n\n# Translators: `labelPosition` is an attribute name and stays in English.\nchoice-input-label-position-ignored = labelPosition is ignored for non-inline choiceInput\n\n## Ordering children by index\n##\n## These name the component in prose rather than as a tag, matching how the\n## messages have always read. The component names stay in English; the nouns\n## around them are prose and should be translated.\n\nchoice-input-indices-count-mismatch = Ignoring indices specified for choiceInput as number of indices doesn\'t match number of choice children.\n\npretzel-indices-count-mismatch = Ignoring indices specified for problem as number of indices doesn\'t match number of problem children.\n\nshuffle-indices-count-mismatch = Ignoring indices specified for shuffle as number of indices doesn\'t match number of components.\n\n# $component is `choiceInput`, `pretzel` or `shuffle` — a DoenetML component\n# name, so it stays in English.\nindices-ignored-out-of-range = Ignoring indices specified for { $component } as some indices out of range.\n\npretzel-indices-repeated = Ignoring indices specified for pretzel as some indices are repeated.\n\npretzel-circuit-first-index = Ignoring indices specified for pretzel in circuit mode as the first index must be 1.\n\n## `<shuffle>` and `<sort>`\n\n# $component is `shuffle` or `sort`. These two components accept the same\n# children and fail the same ways, so they share their messages.\nstring-children-need-type = For `<{ $component }>` to work with string children, a `type` attribute must be specified.\n\n# $type is what the author wrote; math, text, number and boolean are attribute\n# values and stay in English.\ninvalid-type-defaulting-to-math = Invalid type { $type } for { $component } component. Must be one of math, text, number, or boolean. Defaulting to math.\n\n# $value is the string child that could not be used.\nstring-not-valid-component-to-arrange = String "{ $value }" is not a valid component to { $component }. Ignoring.\n\n## Types and variables\n\ninvalid-type-defaulting-to-number = Invalid type { $type }, setting type to number.\n\ninvalid-variable-value = Invalid value of a variable: `{ $value }`\n\n## Variants\n\n# $index is what the author wrote, reproduced verbatim rather than as a number:\n# it reached this message precisely because it was not one.\nvariant-index-must-be-number = Variant index { $index } must be a number\n\nvariant-index-must-be-integer = Variant index { $index } must be an integer\n\n## `<sideBySide>`\n\n# $component is `sideBySide` or `sbsGroup`.\nside-by-side-absolute-widths = `<{ $component }>` is not implemented for absolute measurements. Setting widths to relative.\n\nside-by-side-absolute-margins = `<{ $component }>` is not implemented for absolute measurements. Setting margins to relative.\n\nside-by-side-no-block-child = Invalid `<{ $component }>`: it must have at least one block child.\n\n## `<label>`\n\n# Translators: `for` is an attribute name and stays in English.\nlabel-for-ignored-on-graphical = The `for` attribute on graphical `<label>` is ignored.\n\nlabel-for-must-resolve-to-one = The `for` attribute on `<label>` must resolve to exactly one component.\n\nlabel-for-unresolved = The `for` attribute on `<label>` could not be resolved to a component.\n\nlabel-for-answer-with-authored-inputs = The `for` attribute on `<label>` references an `<answer>` with explicitly authored inputs; reference the input directly.\n\nlabel-for-answer-without-input = The `for` attribute on `<label>` references an `<answer>` without an input to label.\n\nlabel-for-must-reference-input-or-answer = The `for` attribute on `<label>` must reference an input or an answer.\n\n## Accessibility\n\n# $component is a DoenetML tag, e.g. "graph" or "image".\naccessibility-short-description-or-decorative = For accessibility, `<{ $component }>` must either have a short description or be specified as decorative.\n\naccessibility-video-short-description = For accessibility, `<video>` must have a short description.\n\naccessibility-input-short-description-or-label = For accessibility, `<{ $component }>` must have a short description or a label.\n\n# The companion to the message above, for the input an `<answer>` creates on the\n# author\'s behalf. Two messages rather than one with the subject passed in: the\n# subject is a phrase here, not a name, and a phrase handed over as an argument\n# would never reach a translator.\naccessibility-answer-input-short-description-or-label = For accessibility, an `<answer>` creating an input must have a short description or a label.\n\naccessibility-short-description-contains-math = Short descriptions should not contain math components such as `<{ $component }>`. Spell out any math with words.\n\n# $colorName is an attribute name and stays in English. $ratio and $threshold\n# are contrast ratios; $mode says which theme the shortfall was measured in,\n# and is `dark` or `light`.\naccessibility-section-title-insufficient-contrast =\n { $mode ->\n [dark] { $colorName } has insufficient contrast for the section heading text (dark mode) ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; requires at least { $threshold }:1).\n *[other] { $colorName } has insufficient contrast for the section heading text ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; requires at least { $threshold }:1).\n }\n';
46360
+ const diagnostics = '# Errors and warnings surfaced to the reader or author. Produced by the worker\n# but addressed to whoever is looking at the screen, so these are selected by\n# `uiLocale`, not `documentLocale`.\n#\n# Message ids are lower-kebab-case Fluent identifiers, optionally with a\n# single `.attribute` suffix (`invalid-attribute-value`).\n#\n# Reached by stable diagnostic code rather than by a literal `t("key")` call:\n# `DIAGNOSTIC_CODES` in `src/diagnostics.ts` maps `doenet-w0001` to the id\n# below, and `lint:i18n` treats that registry as the call site. Adding a\n# message here without registering a code for it fails the lint as an orphan.\n#\n# Translators: `through`, `endpoint`, `midpointOffset`, `numDimensions` and the\n# like are DoenetML attribute names. They are part of the language, not prose,\n# and must be left in English exactly as written.\n\n## `<lineSegment>`\n\n# $attributes is a list of attribute names; $attributesCount is its length.\nline-segment-attributes-ignored-with-endpoints =\n { $attributesCount ->\n [one] { $attributes } is ignored when two endpoints are specified\n *[other] { $attributes } are ignored when two endpoints are specified\n }\n\n# $attributes is a list of attribute names; $attributesCount is its length.\nline-segment-attributes-ignored-with-endpoint-and-midpoint =\n { $attributesCount ->\n [one] { $attributes } is ignored when an endpoint and a midpoint are both specified\n *[other] { $attributes } are ignored when an endpoint and a midpoint are both specified\n }\n\nline-segment-midpoint-offset-without-midpoint = midpointOffset has no effect without a midpoint\n\n## `<line>`\n\nline-points-undetermined-dimensions = Line through points of undetermined dimensions.\n\nline-points-too-few-dimensions = Line must be through points of at least two dimensions.\n\n# $variables is a bare enumeration of variable names, not an "and" list.\nline-points-depend-on-variables = Line is through points that depend on variables: { $variables }.\n\nline-equation-invalid-format = Invalid format for equation of line in variables { $variable1 } and { $variable2 }.\n\n## `<ray>`\n\nray-overprescribed-through = Ray is prescribed by through, endpoint, and direction. Ignoring specified through.\n\nray-dimension-mismatch = numDimensions mismatch in ray.\n\n## `<vector>`\n\nvector-overprescribed-head = Vector is prescribed by head, tail, and displacement. Ignoring specified head.\n\nvector-dimension-mismatch = numDimensions mismatch in vector.\n\n## Attracting and constraining\n\n# $component is the DoenetML tag of the child that was named, e.g. "polygon".\nattract-to-without-nearest-point = Cannot attract to a `<{ $component }>` as it doesn\'t have a nearestPoint state variable.\n\nconstrain-to-without-nearest-point = Cannot constrain to a `<{ $component }>` as it doesn\'t have a nearestPoint state variable.\n\nconstrain-to-interior-without-nearest-point = Cannot constrain to interior of a `<{ $component }>` as it doesn\'t have a nearestPoint state variable.\n\n## `<choiceInput>`\n\n# Translators: `labelPosition` is an attribute name and stays in English.\nchoice-input-label-position-ignored = labelPosition is ignored for non-inline choiceInput\n\n## Ordering children by index\n##\n## These name the component in prose rather than as a tag, matching how the\n## messages have always read. The component names stay in English; the nouns\n## around them are prose and should be translated.\n\nchoice-input-indices-count-mismatch = Ignoring indices specified for choiceInput as number of indices doesn\'t match number of choice children.\n\npretzel-indices-count-mismatch = Ignoring indices specified for problem as number of indices doesn\'t match number of problem children.\n\nshuffle-indices-count-mismatch = Ignoring indices specified for shuffle as number of indices doesn\'t match number of components.\n\n# $component is `choiceInput`, `pretzel` or `shuffle` — a DoenetML component\n# name, so it stays in English.\nindices-ignored-out-of-range = Ignoring indices specified for { $component } as some indices out of range.\n\npretzel-indices-repeated = Ignoring indices specified for pretzel as some indices are repeated.\n\npretzel-circuit-first-index = Ignoring indices specified for pretzel in circuit mode as the first index must be 1.\n\n## `<shuffle>` and `<sort>`\n\n# $component is `shuffle` or `sort`. These two components accept the same\n# children and fail the same ways, so they share their messages.\nstring-children-need-type = For `<{ $component }>` to work with string children, a `type` attribute must be specified.\n\n# $type is what the author wrote; math, text, number and boolean are attribute\n# values and stay in English.\ninvalid-type-defaulting-to-math = Invalid type { $type } for { $component } component. Must be one of math, text, number, or boolean. Defaulting to math.\n\n# $value is the string child that could not be used.\nstring-not-valid-component-to-arrange = String "{ $value }" is not a valid component to { $component }. Ignoring.\n\n## Types and variables\n\ninvalid-type-defaulting-to-number = Invalid type { $type }, setting type to number.\n\ninvalid-variable-value = Invalid value of a variable: `{ $value }`\n\n## Variants\n\n# $index is what the author wrote, reproduced verbatim rather than as a number:\n# it reached this message precisely because it was not one.\nvariant-index-must-be-number = Variant index { $index } must be a number\n\nvariant-index-must-be-integer = Variant index { $index } must be an integer\n\n## `<sideBySide>`\n\n# $component is `sideBySide` or `sbsGroup`.\nside-by-side-absolute-widths = `<{ $component }>` is not implemented for absolute measurements. Setting widths to relative.\n\nside-by-side-absolute-margins = `<{ $component }>` is not implemented for absolute measurements. Setting margins to relative.\n\nside-by-side-no-block-child = Invalid `<{ $component }>`: it must have at least one block child.\n\n## `<label>`\n\n# Translators: `for` is an attribute name and stays in English.\nlabel-for-ignored-on-graphical = The `for` attribute on graphical `<label>` is ignored.\n\nlabel-for-must-resolve-to-one = The `for` attribute on `<label>` must resolve to exactly one component.\n\nlabel-for-unresolved = The `for` attribute on `<label>` could not be resolved to a component.\n\nlabel-for-answer-with-authored-inputs = The `for` attribute on `<label>` references an `<answer>` with explicitly authored inputs; reference the input directly.\n\nlabel-for-answer-without-input = The `for` attribute on `<label>` references an `<answer>` without an input to label.\n\nlabel-for-must-reference-input-or-answer = The `for` attribute on `<label>` must reference an input or an answer.\n\n## Accessibility\n\n# $component is a DoenetML tag, e.g. "graph" or "image".\naccessibility-short-description-or-decorative = For accessibility, `<{ $component }>` must either have a short description or be specified as decorative.\n\naccessibility-video-short-description = For accessibility, `<video>` must have a short description.\n\naccessibility-input-short-description-or-label = For accessibility, `<{ $component }>` must have a short description or a label.\n\n# The companion to the message above, for the input an `<answer>` creates on the\n# author\'s behalf. Two messages rather than one with the subject passed in: the\n# subject is a phrase here, not a name, and a phrase handed over as an argument\n# would never reach a translator.\naccessibility-answer-input-short-description-or-label = For accessibility, an `<answer>` creating an input must have a short description or a label.\n\naccessibility-short-description-contains-math = Short descriptions should not contain math components such as `<{ $component }>`. Spell out any math with words.\n\n# $colorName is an attribute name and stays in English. $ratio and $threshold\n# are contrast ratios; $mode says which theme the shortfall was measured in,\n# and is `dark` or `light`.\naccessibility-section-title-insufficient-contrast =\n { $mode ->\n [dark] { $colorName } has insufficient contrast for the section heading text (dark mode) ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; requires at least { $threshold }:1).\n *[other] { $colorName } has insufficient contrast for the section heading text ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; requires at least { $threshold }:1).\n }\n\n## `<circle>`\n\n# $count is the number of through points.\ncircle-through-points-non-numerical = Haven\'t implemented `<circle>` through { $count } points in case where the points don\'t have numerical values.\n\ncircle-too-many-through-points = Cannot calculate circle through more than 3 points.\n\ncircle-overprescribed-radius-center-points = Cannot calculate circle with specified radius, center and through points.\n\ncircle-center-with-multiple-points = Cannot calculate circle with specified center through more than 1 point.\n\n# $distance and $radius arrive as strings, not numbers: $radius is the author\'s\n# own value echoed back for diagnosis, and formatting it as a quantity would\n# round a radius of 0.0001 away to 0.\ncircle-radius-too-small = Cannot calculate circle: given that the distance between the two points is { $distance }, the specified radius { $radius } is too small.\n\ncircle-radius-with-many-points = Cannot create circle through more than two points with a specified radius.\n\ncircle-invalid-center-or-through-points = Invalid center or through points of circle.\n\ncircle-radius-center-with-multiple-points = Cannot calculate radius of circle with specified center through more than 1 point.\n\ncircle-change-radius-non-numerical = Cannot change radius of circle with non-numerical through points\n\ncircle-radius-with-points-non-numerical = Cannot create circle through more than one point with specified radius when don\'t have numerical values.\n\ncircle-change-center-non-numerical = Haven\'t implemented changing center of circle through points with non numerical values.\n\n## `<function>`\n\n# Two independent counts in one sentence, so the variants multiply out. A\n# select\'s variants each need their own line, so the inner one spans lines too;\n# that is safe because newlines inside a placeable never reach the rendered\n# value. Only text continuing onto a further line would.\nfunction-domain-insufficient-dimensions =\n { $intervals ->\n [one] Insufficient dimensions for domain for function. Domain has { $intervals } interval but the function has { $inputs ->\n [one] { $inputs } input\n *[other] { $inputs } inputs\n }.\n *[other] Insufficient dimensions for domain for function. Domain has { $intervals } intervals but the function has { $inputs ->\n [one] { $inputs } input\n *[other] { $inputs } inputs\n }.\n }\n\nfunction-domain-invalid-format = Invalid format for domain for function.\n\n# $type is what was being read off the point. It selects the wording rather\n# than being substituted into it: "maximum", "slope" and the rest are English\n# nouns, and a noun handed over as an argument would never reach a translator.\n# The catch-all reproduces the pre-catalog behavior for a value not listed here.\nfunction-ignoring-non-numerical =\n { $type ->\n [maximum] Ignoring non-numerical maximum of function.\n [minimum] Ignoring non-numerical minimum of function.\n [extremum] Ignoring non-numerical extremum of function.\n [point] Ignoring non-numerical point of function.\n [slope] Ignoring non-numerical slope of function.\n *[other] Ignoring non-numerical { $type } of function.\n }\n\nfunction-ignoring-empty =\n { $type ->\n [maximum] Ignoring empty maximum of function.\n [minimum] Ignoring empty minimum of function.\n [extremum] Ignoring empty extremum of function.\n [point] Ignoring empty point of function.\n *[other] Ignoring empty { $type } of function.\n }\n\nfunction-points-too-close = Function contains two points with locations too close together. Can\'t define function.\n\nfunction-iterates-input-output-mismatch =\n { $inputs ->\n [one] Function iterates are possible only if the number of inputs of the function is equal to the number of outputs. This function has { $inputs } input and { $outputs ->\n [one] { $outputs } output\n *[other] { $outputs } outputs\n }.\n *[other] Function iterates are possible only if the number of inputs of the function is equal to the number of outputs. This function has { $inputs } inputs and { $outputs ->\n [one] { $outputs } output\n *[other] { $outputs } outputs\n }.\n }\n\n## `<sequence>`\n\nsequence-invalid-length = Invalid length of sequence. Must be a non-negative integer.\n\n# $type is a sequence type: number, letters, or math.\nsequence-invalid-step = Invalid step of sequence. Must be a number for sequence of type { $type }.\n\n# $attribute is `from` or `to` — an attribute name, so it stays in English.\nsequence-invalid-endpoint-number = Invalid "{ $attribute }" of number sequence. Must be a number.\n\nsequence-invalid-endpoint-letters = Invalid "{ $attribute }" of letters sequence. Must be a letter combination.\n\nsequence-invalid-endpoint = Invalid "{ $attribute }" of sequence.\n\nselect-from-sequence-coprime-not-numbers = coprime ignored since not selecting numbers\n\nselect-from-sequence-coprime-with-exclude-combinations = coprime ignored since excludeCombinations specified\n\n## Resolving a `target`\n##\n## Raised by the components that take a `target` attribute. They resolve it\n## through the same code and fail the same two ways, so they share these two\n## messages rather than spelling each one out per component: $source is the tag\n## of the component that raised it, part of the DoenetML language, so it stays\n## in English.\n\ntarget-not-found = Invalid target for `<{ $source }>`: cannot find target.\n\n# $property is the state variable that was looked for; $component is the tag it\n# was looked for on.\ntarget-state-variable-not-found = Invalid target for `<{ $source }>`: cannot find a state variable named "{ $property }" on a `<{ $component }>`.\n\n## `<odeSystem>`\n\node-system-variables-match-independent = Variables of `<odeSystem>` must be different than independent variable.\n\node-system-duplicate-variable-names = Can\'t define ODE RHS functions with duplicate dependent variable names.\n\node-system-rhs-function-error = Cannot define ODE RHS function. Error creating mathjs function.\n\n## `<angle>`, `<parabola>`, and `<intersection>`\n\n# $count is how many line children were found.\nangle-too-many-lines = Cannot define an angle between { $count } lines\n\nangle-invalid-through-point = Invalid point in through of `<angle>`\n\nparabola-vertex-too-many-points = Haven\'t implemented parabola with vertex through more than 1 point.\n\nparabola-too-many-points = Haven\'t implemented parabola through more than 3 points.\n\nintersection-too-many-items = Haven\'t implemented intersection for more than two items\n\n## Other math components\n\nionic-compound-not-two-ions = Have not implemented ionic compound for anything other than two ions.\n\nionic-compound-needs-cation-and-anion = Ionic compound implemented only for one cation and one anion.\n\n# $equation is the equation as the author wrote it.\nsolve-equations-cannot-evaluate = Cannot solve equation as could not evaluate equation: { $equation }\n\n# Translators: `operandNumber` is an attribute name and stays in English.\nmath-operators-operand-number-required = Must specify a operandNumber when extracting a math operand.\n\neigen-decomposition-failed = Could not calculate eigenvalues of matrix\n\n## PreFigure renderer\n\n# Translators: xLabelPosition, yLabelPosition and their values are attribute\n# names and stay in English, as does the renderer\'s name.\nprefigure-x-label-position-unsupported = `<graph>`: xLabelPosition="left" is not supported in prefigure renderer; using right-position behavior.\n\nprefigure-y-label-position-unsupported = `<graph>`: yLabelPosition="bottom" is not supported in prefigure renderer; using top-position behavior.\n\nprefigure-invalid-axis-bounds = `<graph>`: invalid axis bounds for prefigure conversion; using default bbox (-10,-10,10,10).\n\nprefigure-invalid-width = `<graph>`: invalid width for prefigure conversion; using default diagram width 425.\n\nprefigure-invalid-aspect-ratio = `<graph>`: invalid aspectRatio for prefigure conversion; using default aspect ratio 1.\n\nprefigure-annotations-not-rendered = `<graph>`: annotations will not be rendered when not using the PreFigure renderer.\n\nmultiple-annotations-children = Multiple `<annotations>` children found in `<graph>`; all but the last one are ignored.\n\n## Referring to other components\n##\n## `<updateValue>`\'s own "cannot find target" messages are not here: it\n## resolves a target the same way `<animateFromSequence>` does and fails the\n## same ways, so the two share `target-not-found` and\n## `target-state-variable-not-found` above.\n\ncopy-unrecognized-component-type = Cannot extend or copy an unrecognized component type: { $type }.\n\ncopy-prop-not-found = Could not find prop { $property } on a component of type { $component }\n\ncollect-no-source = No source found for collect.\n\ncollect-invalid-component-type = Cannot collect components of type `<{ $component }>` as it is an invalid component type.\n\n## `<dataFrame>`\n\n# $componentIdx is an internal index, passed as a string so it is not grouped\n# like a quantity; the odd spacing before the colon is reproduced from the\n# original message.\ndata-frame-inconsistent-row-lengths = Data has invalid shape. Rows has inconsistent lengths. Found in componentIdx :{ $componentIdx }\n\ndata-frame-duplicate-column-names = Data has duplicate column names. Found in componentIdx :{ $componentIdx }\n\ndata-frame-missing-column-name = Data is missing a column name. Found in componentIdx :{ $componentIdx }\n\n## `<answer>` and scoring\n\nanswer-award-depends-on-own-response = An award for this answer is based on the answer tag\'s own submitted response, which will lead to unexpected behavior.\n\n# Translators: maxNumAttempts and sectionWideCheckWork are attribute names.\nanswer-max-num-attempts-in-section-wide-check-work = Setting `maxNumAttempts` on an `<answer>` inside a container with `sectionWideCheckWork` has no effect, as the number of attempts is controlled by the container. Set `maxNumAttempts` on the container instead.\n\nnested-section-wide-check-work-max-num-attempts = Setting `maxNumAttempts` on a container with `sectionWideCheckWork` that is inside another container with `sectionWideCheckWork` has no effect, as the number of attempts is controlled by the outer container. Set `maxNumAttempts` on the outer container instead.\n\n# $attributes is a list of attribute names; $attributesCount is its length.\nanswer-attributes-need-symbolic-equality =\n { $attributesCount ->\n [one] The { $attributes } attribute will have no effect without symbolicEquality set.\n *[other] The { $attributes } attributes will have no effect without symbolicEquality set.\n }\n\nanswer-invalid-type = Invalid type for answer: { $type }\n\n## `<module>`, `<conditionalContent>`, `<slider>`, `<pretzel>`\n\nmodule-attribute-child-needs-name = Since the component `<{ $component }>` does not have a name, it cannot be used for a module attribute\n\nmodule-attribute-name-already-defined = The component `<{ $component } name="{ $name }">` cannot be used as an attribute for a module because the `<module>` component type already has a "{ $name }" attribute defined.\n\nconditional-content-condition-ignored = Attribute `condition` is ignored on a `<conditionalContent>` component with case or else children.\n\nslider-markers-type-mismatch = Markers type doesn\'t match slider type.\n\npretzel-problem-needs-statement-and-answer = Invalid pretzel: each `<problem>` must contain one `<statement>` and one `<answer>`.\n\npretzel-circuit-first-problem-distractor = Invalid pretzel: in mode="circuit", the first `<problem>` cannot be a distractor.\n\n## Attribute values\n\n# $values is a list of the values that were rejected, each already in\n# backticks; $valuesCount is how many there were.\nattribute-invalid-values =\n { $valuesCount ->\n [one] Invalid value { $values } for attribute `{ $attribute }`; ignoring.\n *[other] Invalid values { $values } for attribute `{ $attribute }`; ignoring.\n }\n\nattribute-must-be-references = Invalid value `{ $value }` for attribute `{ $attribute }`. Attribute must be composed of references that begin with a `$`.\n\n# $names is a list of the rejected names, each already in single quotes.\nmath-input-invalid-function-names = <mathInput>: ignored invalid function name(s) in { $attribute }: { $names }. Each name\'s display segment must be at least 2 characters (letters or dashes); an optional `|<mathspeak alternative>` suffix may follow.\n';
46361
46361
  const editor = "# Editor and language-server surfaces: formatter labels, completion detail\n# text, hover help. Selected by `uiLocale`.\n#\n# Intentionally empty in i18n Phase 0 (#1515). A later phase moves the editor\n# strings into this file; note that the LSP ships bundled with its DoenetML\n# version, so these catalogs are version-correct rather than always-latest.\n#\n# Message ids are lower-kebab-case Fluent identifiers, optionally with a\n# single `.attribute` suffix (`format-document`).\n";
46362
46362
  const CATALOG_NAMESPACES = [
46363
46363
  "chrome",
@@ -46717,7 +46717,7 @@ function normalizeLocaleTag(tag2) {
46717
46717
  }
46718
46718
  const esChrome = "# Spanish viewer chrome. Translated from `locales/en/chrome.ftl`, which is the\n# source of truth: `lint:i18n` rejects a key that does not exist there, and\n# reports a key that exists there but not here as missing coverage.\n#\n# Message ids are never translated — only the text to the right of `=`.\n#\n# Register: impersonal throughout — infinitives and bare nouns, never a `tú`\n# or `usted` verb form. The viewer does not know how formally a deployment\n# addresses its readers, and an impersonal label is correct for both.\n\n\n## Answer submission\n\nanswer-checking = Comprobando...\nanswer-submitting = Enviando...\n\nanswer-checking-status = Comprobando la respuesta\nanswer-submitting-status = Enviando la respuesta\n\nanswer-correct = Correcto\nanswer-incorrect = Incorrecto\n\nanswer-response-saved = Respuesta guardada\n\n# Spanish typographic convention puts a space before the percent sign.\nanswer-percent-credit = { $percent } % de crédito\nanswer-percent-correct = { $percent } % correcto\nanswer-percent-short = { $percent } %\n\nmax-credit-available = Crédito máximo disponible: { $percent } %\n\nattempts-remaining =\n { $count ->\n [0] no quedan intentos\n [one] queda { $count } intento\n *[other] quedan { $count } intentos\n }\n\nvalidation-correct = (Correcto)\nvalidation-incorrect = (Incorrecto)\nvalidation-partially-correct = (Parcialmente correcto)\n\n# `Mostrar` is the infinitive, per the register note above.\nanswer-show-responses =\n { $count ->\n [one] Mostrar { $count } respuesta a { $answerId }\n *[other] Mostrar { $count } respuestas a { $answerId }\n }\n\n\n## Disclosure panels\n\nfeedback-heading = Comentarios\n\ncollapsible-click-to-open = (clic para abrir)\ncollapsible-click-to-close = (clic para cerrar)\ncollapsible-initializing = Inicializando...\n\nfootnote-show = Mostrar la nota al pie\nfootnote-hide = Ocultar la nota al pie\n\ndescription-more-information = más información\n\n\n## Controls\n\nslider-previous = Anterior\nslider-next = Siguiente\n\nkeyboard-open = Abrir el teclado\nkeyboard-close = Cerrar el teclado\n\nmatrix-remove-row = Eliminar fila\nmatrix-add-row = Añadir fila\nmatrix-remove-column = Eliminar columna\nmatrix-add-column = Añadir columna\n\nsubset-add-remove-points = Añadir/Eliminar puntos\nsubset-toggle-points-intervals = Alternar puntos e intervalos\nsubset-move-points = Mover puntos\nsubset-clear = Borrar\n\norbital-add-row = Añadir fila\norbital-remove-row = Eliminar fila\norbital-add-box = Añadir casilla\norbital-remove-box = Eliminar casilla\norbital-add-up-arrow = Añadir flecha hacia arriba\norbital-add-down-arrow = Añadir flecha hacia abajo\norbital-remove-arrow = Eliminar flecha\n\norbital-row-label = Etiqueta de la fila { $row }\n\npretzel-answer = Respuesta\n\nsummary-statistics-caption = Resumen estadístico de { $column }\n\n\n## Math input\n\nmath-input-preview-region = vista previa de la expresión matemática\nmath-input-preview = Vista previa\nmath-input-invalid-expression = Expresión no válida:\n\n\n## Document status\n\nviewer-initializing = Inicializando...\n\n\n## Errors\n\nerror-heading = Error\n\ndocument-contains-errors = ¡Este documento contiene errores!\n\nsomething-went-wrong = Algo salió mal.\n\n# Follows `error-heading` and a colon, so it begins in lower case, as in\n# English. The instruction is an infinitive, per the register note above.\nrenderer-load-failed = no se pudo cargar un componente. Recargar la página.\n\ncore-start-failed = No se pudo iniciar el visor del documento. Recargar la página.\n";
46719
46719
  const esContent = "# Spanish content catalog: the prose the core computes into the document.\n# Selected by `documentLocale` — the language the activity was written in.\n#\n# Spanish inflects. Adjectives follow their noun and agree with it in gender,\n# so every adjective below selects on `$gender`, the gender of the noun it\n# describes, and the composition messages put the noun first. Neither is\n# expressible by substituting into the English word order, which is why the\n# catalog controls the order and not the code.\n\n\n## Vocabulario de estilos\n\ncolor =\n .black =\n { $gender ->\n [f] negra\n *[m] negro\n }\n .white =\n { $gender ->\n [f] blanca\n *[m] blanco\n }\n .gray = gris\n .red =\n { $gender ->\n [f] roja\n *[m] rojo\n }\n .orange = naranja\n .yellow =\n { $gender ->\n [f] amarilla\n *[m] amarillo\n }\n .green = verde\n .cyan = cian\n .blue = azul\n .purple =\n { $gender ->\n [f] morada\n *[m] morado\n }\n .pink = rosa\n .brown = marrón\n\nline-width =\n .thick =\n { $gender ->\n [f] gruesa\n *[m] grueso\n }\n .thin =\n { $gender ->\n [f] delgada\n *[m] delgado\n }\n\nline-style =\n .dashed =\n { $gender ->\n [f] discontinua\n *[m] discontinuo\n }\n .dotted =\n { $gender ->\n [f] punteada\n *[m] punteado\n }\n\n# Sintagmas nominales: van detrás de «con» y no concuerdan con nada.\nfill-style =\n .horizontal = líneas horizontales\n .vertical = líneas verticales\n .diagonal = líneas diagonales\n .backdiagonal = líneas diagonales inversas\n .dots = puntos\n .diamonds = rombos\n\nnoun =\n .line = línea\n .line-segment = segmento\n .ray = semirrecta\n .vector = vector\n .curve = curva\n .function = función\n .parabola = parábola\n .polyline = polilínea\n .polygon = polígono\n .triangle = triángulo\n .rectangle = rectángulo\n .circle = círculo\n .region = región\n .point = punto\n .square = cuadrado\n .diamond = rombo\n .cross = cruz\n .plus = signo más\n\n# El nombre se parte: «polígono regular» lleva los adjetivos y «de 5 lados»\n# cierra el sintagma detrás de ellos. Si el complemento fuera delante, los\n# adjetivos quedarían separados del nombre con el que concuerdan («polígono\n# regular de 5 lados grueso rojo»).\nnoun-regular-polygon =\n { $part ->\n [tail] de { $numSides } lados\n *[head] polígono regular\n }\n\n# Además de los nombres de arriba, `$noun` puede ser «regular-polygon» (el\n# nombre que compone `noun-regular-polygon`) o el núcleo de un sintagma que no\n# se nombra en la descripción: «border», «fill», «text» y «background». Todos\n# ellos son masculinos en español —polígono, borde, relleno, texto, fondo—, así\n# que caen en el caso por defecto.\nnoun-gender =\n { $noun ->\n [line] f\n [ray] f\n [curve] f\n [function] f\n [parabola] f\n [polyline] f\n [region] f\n [cross] f\n *[other] m\n }\n\n\n## Composición de estilos\n\nstyle-stroke =\n { $parts ->\n [width-style-color] { $lineStyle } { $width } { $color }\n [width-color] { $width } { $color }\n [style-color] { $lineStyle } { $color }\n [width-style] { $lineStyle } { $width }\n [width] { $width }\n [style] { $lineStyle }\n *[color] { $color }\n }\n\n# El nombre va delante y los adjetivos detrás: «línea discontinua gruesa roja».\n# El complemento del nombre, si lo hay, cierra el sintagma: «polígono regular\n# grueso rojo de 5 lados».\nstyle-with-noun =\n { $parts ->\n [noun-tail] { $noun } { $description } { $nounTail }\n *[noun] { $noun } { $description }\n }\n\nstyle-filled-word =\n { $gender ->\n [f] rellena\n *[m] relleno\n }\n\nstyle-filled =\n { $parts ->\n [pattern] { $color } { $filled } con { $pattern }\n *[plain] { $color } { $filled }\n }\n\n# Aquí el complemento va pegado al nombre, y no al final como en\n# `style-with-noun`: «relleno de …» se lee como «lleno de …», así que «relleno\n# de 5 lados» diría otra cosa. «Polígono regular de 5 lados azul relleno».\nstyle-filled-with-noun =\n { $parts ->\n [pattern] { $noun } { $color } { $filled } con { $pattern }\n [plain-tail] { $noun } { $nounTail } { $color } { $filled }\n [pattern-tail] { $noun } { $nounTail } { $color } { $filled } con { $pattern }\n *[plain] { $noun } { $color } { $filled }\n }\n\n# «borde» es masculino, así que los adjetivos del borde concuerdan con él y no\n# con la figura que rodea.\nstyle-border-clause =\n { $parts ->\n [with-article] con un borde { $border }\n [and] y borde { $border }\n [and-article] y un borde { $border }\n *[with] con borde { $border }\n }\n\n# «de color» evita tener que concordar el color con un patrón en plural.\nstyle-fill =\n { $parts ->\n [pattern] { $pattern } de color { $color }\n *[plain] { $color }\n }\n\nstyle-unfilled = sin relleno\n\nstyle-text =\n { $parts ->\n [background] { $color } con un fondo { $background }\n *[plain] { $color }\n }\n\nstyle-background-none = ninguno\n";
46720
- const esDiagnostics = '# Advertencias y errores mostrados a quien lee o escribe el documento.\n# Seleccionados por `uiLocale`.\n#\n# Los nombres de atributos y componentes de DoenetML (`through`, `endpoint`,\n# `numDimensions`, …) forman parte del lenguaje y se dejan en inglés.\n\n## `<lineSegment>`\n\nline-segment-attributes-ignored-with-endpoints =\n { $attributesCount ->\n [one] { $attributes } se ignora cuando se especifican los dos extremos\n *[other] { $attributes } se ignoran cuando se especifican los dos extremos\n }\n\nline-segment-attributes-ignored-with-endpoint-and-midpoint =\n { $attributesCount ->\n [one] { $attributes } se ignora cuando se especifican un extremo y el punto medio\n *[other] { $attributes } se ignoran cuando se especifican un extremo y el punto medio\n }\n\nline-segment-midpoint-offset-without-midpoint = midpointOffset no tiene efecto sin un punto medio\n\n## `<line>`\n\n# «Recta», no «línea», aunque `noun.line` en content.ftl diga «línea»: no es\n# una incoherencia, sino la diferencia entre describir el trazo dibujado («una\n# línea azul gruesa») y hablar del objeto geométrico, que en matemáticas es\n# una recta —de ahí «la ecuación de la recta».\n\nline-points-undetermined-dimensions = La recta pasa por puntos de dimensiones indeterminadas.\n\nline-points-too-few-dimensions = La recta debe pasar por puntos de al menos dos dimensiones.\n\nline-points-depend-on-variables = La recta pasa por puntos que dependen de las variables: { $variables }.\n\n# Enumeradas con coma en vez de «y»: las variables de <line> son `x` e `y` por\n# omisión, y «en las variables x y y» sería a la vez incorrecto (ante el sonido\n# /i/ la conjunción es «e») e ilegible. La coma es correcta sea cual sea el\n# nombre de la variable, que aquí no se conoce de antemano.\nline-equation-invalid-format = Formato no válido para la ecuación de la recta en las variables { $variable1 }, { $variable2 }.\n\n## `<ray>`\n\nray-overprescribed-through = La semirrecta está determinada por through, endpoint y direction. Se ignora el through especificado.\n\nray-dimension-mismatch = Discrepancia de numDimensions en la semirrecta.\n\n## `<vector>`\n\nvector-overprescribed-head = El vector está determinado por head, tail y displacement. Se ignora el head especificado.\n\nvector-dimension-mismatch = Discrepancia de numDimensions en el vector.\n\n## Atraer y restringir\n\nattract-to-without-nearest-point = No se puede atraer a un `<{ $component }>` porque no tiene la variable de estado nearestPoint.\n\nconstrain-to-without-nearest-point = No se puede restringir a un `<{ $component }>` porque no tiene la variable de estado nearestPoint.\n\nconstrain-to-interior-without-nearest-point = No se puede restringir al interior de un `<{ $component }>` porque no tiene la variable de estado nearestPoint.\n\n## `<choiceInput>`\n\nchoice-input-label-position-ignored = labelPosition se ignora en un choiceInput que no es inline\n\n## Ordenar hijos por índice\n\nchoice-input-indices-count-mismatch = Se ignoran los índices especificados para choiceInput porque su cantidad no coincide con la cantidad de hijos choice.\n\npretzel-indices-count-mismatch = Se ignoran los índices especificados para problem porque su cantidad no coincide con la cantidad de hijos problem.\n\nshuffle-indices-count-mismatch = Se ignoran los índices especificados para shuffle porque su cantidad no coincide con la cantidad de componentes.\n\nindices-ignored-out-of-range = Se ignoran los índices especificados para { $component } porque algunos están fuera de rango.\n\npretzel-indices-repeated = Se ignoran los índices especificados para pretzel porque algunos están repetidos.\n\npretzel-circuit-first-index = Se ignoran los índices especificados para pretzel en modo circuit porque el primer índice debe ser 1.\n\n## `<shuffle>` y `<sort>`\n\nstring-children-need-type = Para que `<{ $component }>` funcione con hijos de texto, se debe especificar el atributo `type`.\n\ninvalid-type-defaulting-to-math = Tipo no válido { $type } para el componente { $component }. Debe ser math, text, number o boolean. Se usa math.\n\nstring-not-valid-component-to-arrange = La cadena "{ $value }" no es un componente válido para { $component }. Se ignora.\n\n## Tipos y variables\n\ninvalid-type-defaulting-to-number = Tipo no válido { $type }, se establece el tipo en number.\n\ninvalid-variable-value = Valor no válido de una variable: `{ $value }`\n\n## Variantes\n\nvariant-index-must-be-number = El índice de variante { $index } debe ser un número\n\nvariant-index-must-be-integer = El índice de variante { $index } debe ser un número entero\n\n## `<sideBySide>`\n\nside-by-side-absolute-widths = `<{ $component }>` no está implementado para medidas absolutas. Los anchos se establecen como relativos.\n\nside-by-side-absolute-margins = `<{ $component }>` no está implementado para medidas absolutas. Los márgenes se establecen como relativos.\n\nside-by-side-no-block-child = `<{ $component }>` no es válido: debe tener al menos un hijo de bloque.\n\n## `<label>`\n\nlabel-for-ignored-on-graphical = Se ignora el atributo `for` en un `<label>` gráfico.\n\nlabel-for-must-resolve-to-one = El atributo `for` de `<label>` debe corresponder exactamente a un componente.\n\nlabel-for-unresolved = No se pudo resolver el atributo `for` de `<label>` a un componente.\n\nlabel-for-answer-with-authored-inputs = El atributo `for` de `<label>` hace referencia a un `<answer>` con entradas escritas explícitamente; haz referencia a la entrada directamente.\n\nlabel-for-answer-without-input = El atributo `for` de `<label>` hace referencia a un `<answer>` que no tiene ninguna entrada que etiquetar.\n\nlabel-for-must-reference-input-or-answer = El atributo `for` de `<label>` debe hacer referencia a una entrada o a un `<answer>`.\n\n## Accesibilidad\n\naccessibility-short-description-or-decorative = Por accesibilidad, `<{ $component }>` debe tener una descripción breve o estar marcado como decorativo.\n\naccessibility-video-short-description = Por accesibilidad, `<video>` debe tener una descripción breve.\n\naccessibility-input-short-description-or-label = Por accesibilidad, `<{ $component }>` debe tener una descripción breve o una etiqueta.\n\naccessibility-answer-input-short-description-or-label = Por accesibilidad, la entrada creada por un `<answer>` debe tener una descripción breve o una etiqueta.\n\naccessibility-short-description-contains-math = Las descripciones breves no deben contener componentes matemáticos como `<{ $component }>`. Expresa las matemáticas con palabras.\n\naccessibility-section-title-insufficient-contrast =\n { $mode ->\n [dark] { $colorName } no tiene suficiente contraste con el texto del encabezado de sección (modo oscuro) ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; se requiere al menos { $threshold }:1).\n *[other] { $colorName } no tiene suficiente contraste con el texto del encabezado de sección ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; se requiere al menos { $threshold }:1).\n }\n';
46720
+ const esDiagnostics = '# Advertencias y errores mostrados a quien lee o escribe el documento.\n# Seleccionados por `uiLocale`.\n#\n# Los nombres de atributos y componentes de DoenetML (`through`, `endpoint`,\n# `numDimensions`, …) forman parte del lenguaje y se dejan en inglés.\n\n## `<lineSegment>`\n\nline-segment-attributes-ignored-with-endpoints =\n { $attributesCount ->\n [one] { $attributes } se ignora cuando se especifican los dos extremos\n *[other] { $attributes } se ignoran cuando se especifican los dos extremos\n }\n\nline-segment-attributes-ignored-with-endpoint-and-midpoint =\n { $attributesCount ->\n [one] { $attributes } se ignora cuando se especifican un extremo y el punto medio\n *[other] { $attributes } se ignoran cuando se especifican un extremo y el punto medio\n }\n\nline-segment-midpoint-offset-without-midpoint = midpointOffset no tiene efecto sin un punto medio\n\n## `<line>`\n\n# «Recta», no «línea», aunque `noun.line` en content.ftl diga «línea»: no es\n# una incoherencia, sino la diferencia entre describir el trazo dibujado («una\n# línea azul gruesa») y hablar del objeto geométrico, que en matemáticas es\n# una recta —de ahí «la ecuación de la recta».\n\nline-points-undetermined-dimensions = La recta pasa por puntos de dimensiones indeterminadas.\n\nline-points-too-few-dimensions = La recta debe pasar por puntos de al menos dos dimensiones.\n\nline-points-depend-on-variables = La recta pasa por puntos que dependen de las variables: { $variables }.\n\n# Enumeradas con coma en vez de «y»: las variables de <line> son `x` e `y` por\n# omisión, y «en las variables x y y» sería a la vez incorrecto (ante el sonido\n# /i/ la conjunción es «e») e ilegible. La coma es correcta sea cual sea el\n# nombre de la variable, que aquí no se conoce de antemano.\nline-equation-invalid-format = Formato no válido para la ecuación de la recta en las variables { $variable1 }, { $variable2 }.\n\n## `<ray>`\n\nray-overprescribed-through = La semirrecta está determinada por through, endpoint y direction. Se ignora el through especificado.\n\nray-dimension-mismatch = Discrepancia de numDimensions en la semirrecta.\n\n## `<vector>`\n\nvector-overprescribed-head = El vector está determinado por head, tail y displacement. Se ignora el head especificado.\n\nvector-dimension-mismatch = Discrepancia de numDimensions en el vector.\n\n## Atraer y restringir\n\nattract-to-without-nearest-point = No se puede atraer a un `<{ $component }>` porque no tiene la variable de estado nearestPoint.\n\nconstrain-to-without-nearest-point = No se puede restringir a un `<{ $component }>` porque no tiene la variable de estado nearestPoint.\n\nconstrain-to-interior-without-nearest-point = No se puede restringir al interior de un `<{ $component }>` porque no tiene la variable de estado nearestPoint.\n\n## `<choiceInput>`\n\nchoice-input-label-position-ignored = labelPosition se ignora en un choiceInput que no es inline\n\n## Ordenar hijos por índice\n\nchoice-input-indices-count-mismatch = Se ignoran los índices especificados para choiceInput porque su cantidad no coincide con la cantidad de hijos choice.\n\npretzel-indices-count-mismatch = Se ignoran los índices especificados para problem porque su cantidad no coincide con la cantidad de hijos problem.\n\nshuffle-indices-count-mismatch = Se ignoran los índices especificados para shuffle porque su cantidad no coincide con la cantidad de componentes.\n\nindices-ignored-out-of-range = Se ignoran los índices especificados para { $component } porque algunos están fuera de rango.\n\npretzel-indices-repeated = Se ignoran los índices especificados para pretzel porque algunos están repetidos.\n\npretzel-circuit-first-index = Se ignoran los índices especificados para pretzel en modo circuit porque el primer índice debe ser 1.\n\n## `<shuffle>` y `<sort>`\n\nstring-children-need-type = Para que `<{ $component }>` funcione con hijos de texto, se debe especificar el atributo `type`.\n\ninvalid-type-defaulting-to-math = Tipo no válido { $type } para el componente { $component }. Debe ser math, text, number o boolean. Se usa math.\n\nstring-not-valid-component-to-arrange = La cadena "{ $value }" no es un componente válido para { $component }. Se ignora.\n\n## Tipos y variables\n\ninvalid-type-defaulting-to-number = Tipo no válido { $type }, se establece el tipo en number.\n\ninvalid-variable-value = Valor no válido de una variable: `{ $value }`\n\n## Variantes\n\nvariant-index-must-be-number = El índice de variante { $index } debe ser un número\n\nvariant-index-must-be-integer = El índice de variante { $index } debe ser un número entero\n\n## `<sideBySide>`\n\nside-by-side-absolute-widths = `<{ $component }>` no está implementado para medidas absolutas. Los anchos se establecen como relativos.\n\nside-by-side-absolute-margins = `<{ $component }>` no está implementado para medidas absolutas. Los márgenes se establecen como relativos.\n\nside-by-side-no-block-child = `<{ $component }>` no es válido: debe tener al menos un hijo de bloque.\n\n## `<label>`\n\nlabel-for-ignored-on-graphical = Se ignora el atributo `for` en un `<label>` gráfico.\n\nlabel-for-must-resolve-to-one = El atributo `for` de `<label>` debe corresponder exactamente a un componente.\n\nlabel-for-unresolved = No se pudo resolver el atributo `for` de `<label>` a un componente.\n\nlabel-for-answer-with-authored-inputs = El atributo `for` de `<label>` hace referencia a un `<answer>` con entradas escritas explícitamente; haz referencia a la entrada directamente.\n\nlabel-for-answer-without-input = El atributo `for` de `<label>` hace referencia a un `<answer>` que no tiene ninguna entrada que etiquetar.\n\nlabel-for-must-reference-input-or-answer = El atributo `for` de `<label>` debe hacer referencia a una entrada o a un `<answer>`.\n\n## Accesibilidad\n\naccessibility-short-description-or-decorative = Por accesibilidad, `<{ $component }>` debe tener una descripción breve o estar marcado como decorativo.\n\naccessibility-video-short-description = Por accesibilidad, `<video>` debe tener una descripción breve.\n\naccessibility-input-short-description-or-label = Por accesibilidad, `<{ $component }>` debe tener una descripción breve o una etiqueta.\n\naccessibility-answer-input-short-description-or-label = Por accesibilidad, la entrada creada por un `<answer>` debe tener una descripción breve o una etiqueta.\n\naccessibility-short-description-contains-math = Las descripciones breves no deben contener componentes matemáticos como `<{ $component }>`. Expresa las matemáticas con palabras.\n\naccessibility-section-title-insufficient-contrast =\n { $mode ->\n [dark] { $colorName } no tiene suficiente contraste con el texto del encabezado de sección (modo oscuro) ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; se requiere al menos { $threshold }:1).\n *[other] { $colorName } no tiene suficiente contraste con el texto del encabezado de sección ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; se requiere al menos { $threshold }:1).\n }\n\n## `<circle>`\n\ncircle-through-points-non-numerical = No está implementado un `<circle>` que pase por { $count } puntos cuando los puntos no tienen valores numéricos.\n\ncircle-too-many-through-points = No se puede calcular una circunferencia que pase por más de 3 puntos.\n\ncircle-overprescribed-radius-center-points = No se puede calcular una circunferencia con radio, centro y puntos de paso especificados a la vez.\n\ncircle-center-with-multiple-points = No se puede calcular una circunferencia con centro especificado que pase por más de 1 punto.\n\ncircle-radius-too-small = No se puede calcular la circunferencia: dado que la distancia entre los dos puntos es { $distance }, el radio especificado { $radius } es demasiado pequeño.\n\ncircle-radius-with-many-points = No se puede crear una circunferencia que pase por más de dos puntos con un radio especificado.\n\ncircle-invalid-center-or-through-points = El centro o los puntos de paso de la circunferencia no son válidos.\n\ncircle-radius-center-with-multiple-points = No se puede calcular el radio de una circunferencia con centro especificado que pase por más de 1 punto.\n\ncircle-change-radius-non-numerical = No se puede cambiar el radio de una circunferencia con puntos de paso no numéricos\n\ncircle-radius-with-points-non-numerical = No se puede crear una circunferencia que pase por más de un punto con un radio especificado cuando no hay valores numéricos.\n\ncircle-change-center-non-numerical = No está implementado cambiar el centro de una circunferencia que pasa por puntos con valores no numéricos.\n\n## `<function>`\n\nfunction-domain-insufficient-dimensions =\n { $intervals ->\n [one] Dimensiones insuficientes para el dominio de la función. El dominio tiene { $intervals } intervalo pero la función tiene { $inputs ->\n [one] { $inputs } entrada\n *[other] { $inputs } entradas\n }.\n *[other] Dimensiones insuficientes para el dominio de la función. El dominio tiene { $intervals } intervalos pero la función tiene { $inputs ->\n [one] { $inputs } entrada\n *[other] { $inputs } entradas\n }.\n }\n\nfunction-domain-invalid-format = Formato no válido para el dominio de la función.\n\nfunction-ignoring-non-numerical =\n { $type ->\n [maximum] Se ignora el máximo no numérico de la función.\n [minimum] Se ignora el mínimo no numérico de la función.\n [extremum] Se ignora el extremo no numérico de la función.\n [point] Se ignora el punto no numérico de la función.\n [slope] Se ignora la pendiente no numérica de la función.\n *[other] Se ignora { $type } no numérico de la función.\n }\n\nfunction-ignoring-empty =\n { $type ->\n [maximum] Se ignora el máximo vacío de la función.\n [minimum] Se ignora el mínimo vacío de la función.\n [extremum] Se ignora el extremo vacío de la función.\n [point] Se ignora el punto vacío de la función.\n *[other] Se ignora { $type } vacío de la función.\n }\n\nfunction-points-too-close = La función contiene dos puntos demasiado próximos entre sí. No se puede definir la función.\n\nfunction-iterates-input-output-mismatch =\n { $inputs ->\n [one] Las iteraciones de una función solo son posibles si el número de entradas es igual al número de salidas. Esta función tiene { $inputs } entrada y { $outputs ->\n [one] { $outputs } salida\n *[other] { $outputs } salidas\n }.\n *[other] Las iteraciones de una función solo son posibles si el número de entradas es igual al número de salidas. Esta función tiene { $inputs } entradas y { $outputs ->\n [one] { $outputs } salida\n *[other] { $outputs } salidas\n }.\n }\n\n## `<sequence>`\n\nsequence-invalid-length = Longitud de la secuencia no válida. Debe ser un entero no negativo.\n\nsequence-invalid-step = Paso de la secuencia no válido. Debe ser un número para una secuencia de tipo { $type }.\n\nsequence-invalid-endpoint-number = El valor de "{ $attribute }" de la secuencia numérica no es válido. Debe ser un número.\n\nsequence-invalid-endpoint-letters = El valor de "{ $attribute }" de la secuencia de letras no es válido. Debe ser una combinación de letras.\n\nsequence-invalid-endpoint = El valor de "{ $attribute }" de la secuencia no es válido.\n\nselect-from-sequence-coprime-not-numbers = Se ignora coprime porque no se están seleccionando números\n\nselect-from-sequence-coprime-with-exclude-combinations = Se ignora coprime porque se especificó excludeCombinations\n\n## Resolución de `target`\n\ntarget-not-found = Destino no válido para `<{ $source }>`: no se encuentra el destino.\n\ntarget-state-variable-not-found = Destino no válido para `<{ $source }>`: no se encuentra una variable de estado llamada "{ $property }" en un `<{ $component }>`.\n\n## `<odeSystem>`\n\node-system-variables-match-independent = Las variables de `<odeSystem>` deben ser distintas de la variable independiente.\n\node-system-duplicate-variable-names = No se pueden definir las funciones del lado derecho de la EDO con nombres de variables dependientes repetidos.\n\node-system-rhs-function-error = No se puede definir la función del lado derecho de la EDO. Error al crear la función de mathjs.\n\n## `<angle>`, `<parabola>` e `<intersection>`\n\nangle-too-many-lines = No se puede definir un ángulo entre { $count } rectas\n\nangle-invalid-through-point = Punto no válido en through de `<angle>`\n\nparabola-vertex-too-many-points = No está implementada una parábola con vértice que pase por más de 1 punto.\n\nparabola-too-many-points = No está implementada una parábola que pase por más de 3 puntos.\n\nintersection-too-many-items = No está implementada la intersección de más de dos objetos\n\n## Otros componentes matemáticos\n\nionic-compound-not-two-ions = No está implementado el compuesto iónico para algo distinto de dos iones.\n\nionic-compound-needs-cation-and-anion = El compuesto iónico solo está implementado para un catión y un anión.\n\nsolve-equations-cannot-evaluate = No se puede resolver la ecuación porque no se pudo evaluar: { $equation }\n\nmath-operators-operand-number-required = Se debe especificar operandNumber al extraer un operando matemático.\n\neigen-decomposition-failed = No se pudieron calcular los valores propios de la matriz\n\n## Renderizador PreFigure\n\nprefigure-x-label-position-unsupported = `<graph>`: xLabelPosition="left" no es compatible con el renderizador prefigure; se usa el comportamiento de posición derecha.\n\nprefigure-y-label-position-unsupported = `<graph>`: yLabelPosition="bottom" no es compatible con el renderizador prefigure; se usa el comportamiento de posición superior.\n\nprefigure-invalid-axis-bounds = `<graph>`: los límites de los ejes no son válidos para la conversión a prefigure; se usa el bbox predeterminado (-10,-10,10,10).\n\nprefigure-invalid-width = `<graph>`: el ancho no es válido para la conversión a prefigure; se usa el ancho de diagrama predeterminado 425.\n\nprefigure-invalid-aspect-ratio = `<graph>`: aspectRatio no es válido para la conversión a prefigure; se usa la relación de aspecto predeterminada 1.\n\nprefigure-annotations-not-rendered = `<graph>`: las anotaciones no se representan si no se usa el renderizador PreFigure.\n\nmultiple-annotations-children = Se encontraron varios hijos `<annotations>` en `<graph>`; se ignoran todos menos el último.\n\n## Referencias a otros componentes\n\ncopy-unrecognized-component-type = No se puede extender ni copiar un tipo de componente desconocido: { $type }.\n\ncopy-prop-not-found = No se encontró la propiedad { $property } en un componente de tipo { $component }\n\ncollect-no-source = No se encontró ninguna fuente para collect.\n\ncollect-invalid-component-type = No se pueden recolectar componentes de tipo `<{ $component }>` porque no es un tipo de componente válido.\n\n## `<dataFrame>`\n\ndata-frame-inconsistent-row-lengths = Los datos tienen una forma no válida. Las filas tienen longitudes distintas. Encontrado en componentIdx :{ $componentIdx }\n\ndata-frame-duplicate-column-names = Los datos tienen nombres de columna repetidos. Encontrado en componentIdx :{ $componentIdx }\n\ndata-frame-missing-column-name = A los datos les falta el nombre de una columna. Encontrado en componentIdx :{ $componentIdx }\n\n## `<answer>` y puntuación\n\nanswer-award-depends-on-own-response = Un award de esta respuesta depende de la respuesta enviada por el propio answer, lo que provocará un comportamiento inesperado.\n\nanswer-max-num-attempts-in-section-wide-check-work = Establecer `maxNumAttempts` en un `<answer>` dentro de un contenedor con `sectionWideCheckWork` no tiene efecto, porque el número de intentos lo controla el contenedor. Establece `maxNumAttempts` en el contenedor.\n\nnested-section-wide-check-work-max-num-attempts = Establecer `maxNumAttempts` en un contenedor con `sectionWideCheckWork` que está dentro de otro contenedor con `sectionWideCheckWork` no tiene efecto, porque el número de intentos lo controla el contenedor exterior. Establece `maxNumAttempts` en el contenedor exterior.\n\nanswer-attributes-need-symbolic-equality =\n { $attributesCount ->\n [one] El atributo { $attributes } no tendrá efecto si no se establece symbolicEquality.\n *[other] Los atributos { $attributes } no tendrán efecto si no se establece symbolicEquality.\n }\n\nanswer-invalid-type = Tipo no válido para answer: { $type }\n\n## `<module>`, `<conditionalContent>`, `<slider>` y pretzel\n\nmodule-attribute-child-needs-name = Como el componente `<{ $component }>` no tiene nombre, no se puede usar como atributo de módulo\n\nmodule-attribute-name-already-defined = El componente `<{ $component } name="{ $name }">` no se puede usar como atributo de un módulo porque el tipo de componente `<module>` ya tiene definido un atributo "{ $name }".\n\nconditional-content-condition-ignored = Se ignora el atributo `condition` en un `<conditionalContent>` que tiene hijos case o else.\n\nslider-markers-type-mismatch = El tipo de los marcadores no coincide con el tipo del slider.\n\npretzel-problem-needs-statement-and-answer = Pretzel no válido: cada `<problem>` debe contener un `<statement>` y un `<answer>`.\n\npretzel-circuit-first-problem-distractor = Pretzel no válido: en mode="circuit", el primer `<problem>` no puede ser un distractor.\n\n## Valores de atributos\n\nattribute-invalid-values =\n { $valuesCount ->\n [one] Valor no válido { $values } para el atributo `{ $attribute }`; se ignora.\n *[other] Valores no válidos { $values } para el atributo `{ $attribute }`; se ignoran.\n }\n\nattribute-must-be-references = Valor no válido `{ $value }` para el atributo `{ $attribute }`. El atributo debe estar compuesto de referencias que empiecen por `$`.\n\nmath-input-invalid-function-names = <mathInput>: se ignoran nombres de función no válidos en { $attribute }: { $names }. El segmento visible de cada nombre debe tener al menos 2 caracteres (letras o guiones); puede añadirse un sufijo opcional `|<alternativa de mathspeak>`.\n';
46721
46721
  const BUNDLED_TRANSLATIONS = {
46722
46722
  es: {
46723
46723
  chrome: esChrome,
@@ -46771,6 +46771,16 @@ const DIAGNOSTIC_CODES = {
46771
46771
  "doenet-i0009": "pretzel-circuit-first-index",
46772
46772
  "doenet-i0010": "variant-index-must-be-number",
46773
46773
  "doenet-i0011": "variant-index-must-be-integer",
46774
+ "doenet-i0012": "sequence-invalid-length",
46775
+ "doenet-i0013": "sequence-invalid-step",
46776
+ "doenet-i0014": "sequence-invalid-endpoint-number",
46777
+ "doenet-i0015": "sequence-invalid-endpoint-letters",
46778
+ "doenet-i0016": "sequence-invalid-endpoint",
46779
+ "doenet-i0017": "angle-too-many-lines",
46780
+ "doenet-i0018": "copy-prop-not-found",
46781
+ "doenet-i0019": "prefigure-annotations-not-rendered",
46782
+ "doenet-i0020": "multiple-annotations-children",
46783
+ "doenet-i0021": "attribute-invalid-values",
46774
46784
  "doenet-w0001": "line-points-undetermined-dimensions",
46775
46785
  "doenet-w0002": "line-points-too-few-dimensions",
46776
46786
  "doenet-w0003": "line-points-depend-on-variables",
@@ -46797,6 +46807,63 @@ const DIAGNOSTIC_CODES = {
46797
46807
  "doenet-w0024": "label-for-answer-with-authored-inputs",
46798
46808
  "doenet-w0025": "label-for-answer-without-input",
46799
46809
  "doenet-w0026": "label-for-must-reference-input-or-answer",
46810
+ "doenet-w0027": "circle-through-points-non-numerical",
46811
+ "doenet-w0028": "circle-too-many-through-points",
46812
+ "doenet-w0029": "circle-overprescribed-radius-center-points",
46813
+ "doenet-w0030": "circle-center-with-multiple-points",
46814
+ "doenet-w0031": "circle-radius-too-small",
46815
+ "doenet-w0032": "circle-radius-with-many-points",
46816
+ "doenet-w0033": "circle-invalid-center-or-through-points",
46817
+ "doenet-w0034": "circle-radius-center-with-multiple-points",
46818
+ "doenet-w0035": "circle-change-radius-non-numerical",
46819
+ "doenet-w0036": "circle-radius-with-points-non-numerical",
46820
+ "doenet-w0037": "circle-change-center-non-numerical",
46821
+ "doenet-w0038": "function-domain-insufficient-dimensions",
46822
+ "doenet-w0039": "function-domain-invalid-format",
46823
+ "doenet-w0040": "function-ignoring-non-numerical",
46824
+ "doenet-w0041": "function-ignoring-empty",
46825
+ "doenet-w0042": "function-points-too-close",
46826
+ "doenet-w0043": "target-not-found",
46827
+ "doenet-w0044": "target-state-variable-not-found",
46828
+ "doenet-w0045": "ode-system-variables-match-independent",
46829
+ "doenet-w0046": "ode-system-duplicate-variable-names",
46830
+ "doenet-w0047": "ode-system-rhs-function-error",
46831
+ "doenet-w0048": "angle-invalid-through-point",
46832
+ "doenet-w0049": "parabola-vertex-too-many-points",
46833
+ "doenet-w0050": "parabola-too-many-points",
46834
+ "doenet-w0051": "select-from-sequence-coprime-not-numbers",
46835
+ "doenet-w0052": "select-from-sequence-coprime-with-exclude-combinations",
46836
+ "doenet-w0053": "ionic-compound-not-two-ions",
46837
+ "doenet-w0054": "ionic-compound-needs-cation-and-anion",
46838
+ "doenet-w0055": "intersection-too-many-items",
46839
+ "doenet-w0056": "function-iterates-input-output-mismatch",
46840
+ "doenet-w0057": "solve-equations-cannot-evaluate",
46841
+ "doenet-w0058": "math-operators-operand-number-required",
46842
+ "doenet-w0059": "eigen-decomposition-failed",
46843
+ "doenet-w0060": "prefigure-x-label-position-unsupported",
46844
+ "doenet-w0061": "prefigure-y-label-position-unsupported",
46845
+ "doenet-w0062": "prefigure-invalid-axis-bounds",
46846
+ "doenet-w0063": "prefigure-invalid-width",
46847
+ "doenet-w0064": "prefigure-invalid-aspect-ratio",
46848
+ "doenet-w0065": "copy-unrecognized-component-type",
46849
+ "doenet-w0066": "data-frame-inconsistent-row-lengths",
46850
+ "doenet-w0067": "data-frame-duplicate-column-names",
46851
+ "doenet-w0068": "data-frame-missing-column-name",
46852
+ "doenet-w0069": "answer-award-depends-on-own-response",
46853
+ "doenet-w0070": "answer-max-num-attempts-in-section-wide-check-work",
46854
+ "doenet-w0071": "answer-attributes-need-symbolic-equality",
46855
+ "doenet-w0072": "collect-no-source",
46856
+ "doenet-w0073": "collect-invalid-component-type",
46857
+ "doenet-w0074": "module-attribute-child-needs-name",
46858
+ "doenet-w0075": "module-attribute-name-already-defined",
46859
+ "doenet-w0076": "pretzel-problem-needs-statement-and-answer",
46860
+ "doenet-w0077": "attribute-must-be-references",
46861
+ "doenet-w0078": "answer-invalid-type",
46862
+ "doenet-w0079": "conditional-content-condition-ignored",
46863
+ "doenet-w0080": "slider-markers-type-mismatch",
46864
+ "doenet-w0081": "nested-section-wide-check-work-max-num-attempts",
46865
+ "doenet-w0082": "math-input-invalid-function-names",
46866
+ "doenet-e0001": "pretzel-circuit-first-problem-distractor",
46800
46867
  "doenet-a0001": "accessibility-short-description-or-decorative",
46801
46868
  "doenet-a0002": "accessibility-video-short-description",
46802
46869
  "doenet-a0003": "accessibility-input-short-description-or-label",
@@ -49048,6 +49115,24 @@ function convertEvaluate({
49048
49115
  evaluateComponent.children = [];
49049
49116
  return { newComponent: evaluateComponent, nComponents };
49050
49117
  }
49118
+ function codedDiagnostic({
49119
+ type,
49120
+ code,
49121
+ args,
49122
+ position: position2,
49123
+ sourceDoc,
49124
+ level
49125
+ }) {
49126
+ return {
49127
+ type,
49128
+ message: formatEnglishDiagnostic(code, args),
49129
+ code,
49130
+ ...args === void 0 ? {} : { args },
49131
+ ...position2 === void 0 ? {} : { position: position2 },
49132
+ ...sourceDoc === void 0 ? {} : { sourceDoc },
49133
+ ...level === void 0 ? {} : { level }
49134
+ };
49135
+ }
49051
49136
  async function normalizedDastToSerializedComponents(normalized_root, componentInfoObjects2, addNodesToResolver) {
49052
49137
  function unflattenDastNodes(indicesOrStrings, diagnostics22) {
49053
49138
  const unflattenedNodes = [];
@@ -49592,12 +49677,18 @@ function expandAttribute({
49592
49677
  if (child.trim() !== "") {
49593
49678
  stringChildren.push(child);
49594
49679
  if (!attrDef.allowStrings) {
49595
- diagnostics2.push({
49596
- type: "warning",
49597
- message: `Invalid value \`${child.trim()}\` for attribute \`${attribute.name}\`. Attribute must be composed of references that begin with a \`$\`.`,
49598
- position: attribute.position,
49599
- sourceDoc: attribute.sourceDoc
49600
- });
49680
+ diagnostics2.push(
49681
+ codedDiagnostic({
49682
+ type: "warning",
49683
+ code: "doenet-w0077",
49684
+ args: {
49685
+ value: child.trim(),
49686
+ attribute: attribute.name
49687
+ },
49688
+ position: attribute.position,
49689
+ sourceDoc: attribute.sourceDoc
49690
+ })
49691
+ );
49601
49692
  }
49602
49693
  }
49603
49694
  }
@@ -51779,11 +51870,22 @@ function validateListItemsAgainstValidValues({
51779
51870
  }
51780
51871
  const diagnostics2 = [];
51781
51872
  if (invalidItems.length > 0) {
51782
- const invalidList = invalidItems.map((v2) => `\`${v2}\``).join(", ");
51783
- diagnostics2.push({
51784
- message: `Invalid value${invalidItems.length > 1 ? "s" : ""} ${invalidList} for attribute \`${attribute}\`; ignoring.`,
51785
- type: "info"
51786
- });
51873
+ diagnostics2.push(
51874
+ codedDiagnostic({
51875
+ type: "info",
51876
+ code: "doenet-i0021",
51877
+ args: {
51878
+ // Each value keeps the backticks it was rendered with; the
51879
+ // join is `unit` so the list reads "`a`, `b`" rather than
51880
+ // gaining an "and" the original never had.
51881
+ values: {
51882
+ list: invalidItems.map((v2) => `\`${v2}\``),
51883
+ type: "unit"
51884
+ },
51885
+ attribute
51886
+ }
51887
+ })
51888
+ );
51787
51889
  }
51788
51890
  return { value: validItems, diagnostics: diagnostics2 };
51789
51891
  }
@@ -70599,10 +70701,12 @@ function returnStandardAnswerStateVariableDefinition() {
70599
70701
  if (Object.keys(selfDependencies.stateValues).find(
70600
70702
  (x2) => x2.substring(0, 17) === "submittedResponse"
70601
70703
  )) {
70602
- diagnostics2.push({
70603
- message: "An award for this answer is based on the answer tag's own submitted response, which will lead to unexpected behavior.",
70604
- type: "warning"
70605
- });
70704
+ diagnostics2.push(
70705
+ codedDiagnostic({
70706
+ type: "warning",
70707
+ code: "doenet-w0069"
70708
+ })
70709
+ );
70606
70710
  }
70607
70711
  }
70608
70712
  let stringified = stringify(
@@ -70778,11 +70882,13 @@ function returnStandardAnswerStateVariableDefinition() {
70778
70882
  let sendDiagnostics = [];
70779
70883
  let insideSectionWideCheckWork = dependencyValues.ancestorSuppressingAnswerSubmitButtons?.stateValues.suppressAnswerSubmitButtons;
70780
70884
  if (!usedDefault.maxNumAttempts && insideSectionWideCheckWork) {
70781
- sendDiagnostics.push({
70782
- type: "warning",
70783
- message: "Setting `maxNumAttempts` on an `<answer>` inside a container with `sectionWideCheckWork` has no effect, as the number of attempts is controlled by the container. Set `maxNumAttempts` on the container instead.",
70784
- position: dependencyValues.maxNumAttemptsAttr?.position
70785
- });
70885
+ sendDiagnostics.push(
70886
+ codedDiagnostic({
70887
+ type: "warning",
70888
+ code: "doenet-w0070",
70889
+ position: dependencyValues.maxNumAttemptsAttr?.position
70890
+ })
70891
+ );
70786
70892
  }
70787
70893
  const numAttemptsLeft = insideSectionWideCheckWork ? dependencyValues.ancestorSuppressingAnswerSubmitButtons.stateValues.numAttemptsLeft : Math.max(
70788
70894
  0,
@@ -70906,12 +71012,13 @@ function returnSimplifyExpandOnCompareWarning() {
70906
71012
  attributesSpecified.push("simplifyOnCompare");
70907
71013
  }
70908
71014
  if (attributesSpecified.length > 0) {
70909
- sendDiagnostics.push({
70910
- message: `The ${attributesSpecified.join(
70911
- " and "
70912
- )} attribute${attributesSpecified.length > 1 ? "s" : ""} will have no effect without symbolicEquality set.`,
70913
- type: "warning"
70914
- });
71015
+ sendDiagnostics.push(
71016
+ codedDiagnostic({
71017
+ type: "warning",
71018
+ code: "doenet-w0071",
71019
+ args: { attributes: attributesSpecified }
71020
+ })
71021
+ );
70915
71022
  }
70916
71023
  }
70917
71024
  return {
@@ -77068,24 +77175,6 @@ function exprContainsVector(tree) {
77068
77175
  }
77069
77176
  return operands.some(exprContainsVector);
77070
77177
  }
77071
- function codedDiagnostic({
77072
- type,
77073
- code,
77074
- args,
77075
- position: position2,
77076
- sourceDoc,
77077
- level
77078
- }) {
77079
- return {
77080
- type,
77081
- message: formatEnglishDiagnostic(code, args),
77082
- code,
77083
- ...args === void 0 ? {} : { args },
77084
- ...position2 === void 0 ? {} : { position: position2 },
77085
- ...sourceDoc === void 0 ? {} : { sourceDoc },
77086
- ...level === void 0 ? {} : { level }
77087
- };
77088
- }
77089
77178
  class Label extends InlineComponent {
77090
77179
  constructor(args) {
77091
77180
  super(args);
@@ -79095,11 +79184,13 @@ function returnScoredSectionStateVariableDefinition() {
79095
79184
  let sendDiagnostics = [];
79096
79185
  let insideSectionWideCheckWork = dependencyValues.ancestorSuppressingAnswerSubmitButtons?.stateValues.suppressAnswerSubmitButtons;
79097
79186
  if (!usedDefault.maxNumAttempts && dependencyValues.sectionWideCheckWork && insideSectionWideCheckWork) {
79098
- sendDiagnostics.push({
79099
- type: "warning",
79100
- message: "Setting `maxNumAttempts` on a container with `sectionWideCheckWork` that is inside another container with `sectionWideCheckWork` has no effect, as the number of attempts is controlled by the outer container. Set `maxNumAttempts` on the outer container instead.",
79101
- position: dependencyValues.maxNumAttemptsAttr?.position
79102
- });
79187
+ sendDiagnostics.push(
79188
+ codedDiagnostic({
79189
+ type: "warning",
79190
+ code: "doenet-w0081",
79191
+ position: dependencyValues.maxNumAttemptsAttr?.position
79192
+ })
79193
+ );
79103
79194
  }
79104
79195
  let numAttemptsLeft;
79105
79196
  if (insideSectionWideCheckWork) {
@@ -85040,10 +85131,10 @@ class ExtractMath extends MathOperatorOneInput {
85040
85131
  definition({ dependencyValues }) {
85041
85132
  if (dependencyValues.type === "operand") {
85042
85133
  if (dependencyValues.operandNumber === null) {
85043
- let warning = {
85044
- message: `Must specify a operandNumber when extracting a math operand.`,
85045
- type: "warning"
85046
- };
85134
+ let warning = codedDiagnostic({
85135
+ type: "warning",
85136
+ code: "doenet-w0058"
85137
+ });
85047
85138
  return {
85048
85139
  setValue: {
85049
85140
  mathOperator: () => Context.fromAst("_")
@@ -87076,13 +87167,15 @@ let Function$1 = class Function2 extends InlineComponent {
87076
87167
  numInputs
87077
87168
  );
87078
87169
  if (specifiedDomain.length !== numInputs) {
87079
- let warning = {
87170
+ let warning = codedDiagnostic({
87080
87171
  type: "warning",
87081
- message: `Insufficient dimensions for domain for function. Domain has ${specifiedDomain.length} interval${specifiedDomain.length === 1 ? "" : "s"} but the function has ${numInputs} input${numInputs === 1 ? "" : "s"}.`
87082
- };
87083
- if (globalDependencyValues.domainAttr.position) {
87084
- warning.position = globalDependencyValues.domainAttr.position;
87085
- }
87172
+ code: "doenet-w0038",
87173
+ args: {
87174
+ intervals: specifiedDomain.length,
87175
+ inputs: numInputs
87176
+ },
87177
+ position: globalDependencyValues.domainAttr.position || void 0
87178
+ });
87086
87179
  let infDomain = Context.fromAst([
87087
87180
  "interval",
87088
87181
  ["tuple", -Infinity, Infinity],
@@ -87102,13 +87195,11 @@ let Function$1 = class Function2 extends InlineComponent {
87102
87195
  Array.isArray(interval.tree) && interval.tree[0] === "interval"
87103
87196
  )
87104
87197
  )) {
87105
- let warning = {
87198
+ let warning = codedDiagnostic({
87106
87199
  type: "warning",
87107
- message: `Invalid format for domain for function.`
87108
- };
87109
- if (globalDependencyValues.domainAttr.position) {
87110
- warning.position = globalDependencyValues.domainAttr.position;
87111
- }
87200
+ code: "doenet-w0039",
87201
+ position: globalDependencyValues.domainAttr.position || void 0
87202
+ });
87112
87203
  let infDomain = Context.fromAst([
87113
87204
  "interval",
87114
87205
  ["tuple", -Infinity, Infinity],
@@ -90402,39 +90493,51 @@ function calculateInterpolationPoints({ dependencyValues, numerics }) {
90402
90493
  if (point2.x !== null) {
90403
90494
  x2 = point2.x.evaluate_to_constant();
90404
90495
  if (!Number.isFinite(x2)) {
90405
- diagnostics2.push({
90406
- message: `Ignoring non-numerical ${type} of function.`,
90407
- type: "warning"
90408
- });
90496
+ diagnostics2.push(
90497
+ codedDiagnostic({
90498
+ type: "warning",
90499
+ code: "doenet-w0040",
90500
+ args: { type }
90501
+ })
90502
+ );
90409
90503
  continue;
90410
90504
  }
90411
90505
  }
90412
90506
  if (point2.y !== null) {
90413
90507
  y2 = point2.y.evaluate_to_constant();
90414
90508
  if (!Number.isFinite(y2)) {
90415
- diagnostics2.push({
90416
- message: `Ignoring non-numerical ${type} of function.`,
90417
- type: "warning"
90418
- });
90509
+ diagnostics2.push(
90510
+ codedDiagnostic({
90511
+ type: "warning",
90512
+ code: "doenet-w0040",
90513
+ args: { type }
90514
+ })
90515
+ );
90419
90516
  continue;
90420
90517
  }
90421
90518
  }
90422
90519
  if (point2.slope !== null && point2.slope !== void 0) {
90423
90520
  slope = point2.slope.evaluate_to_constant();
90424
90521
  if (!Number.isFinite(slope)) {
90425
- diagnostics2.push({
90426
- message: `Ignoring non-numerical slope of function.`,
90427
- type: "warning"
90428
- });
90522
+ diagnostics2.push(
90523
+ codedDiagnostic({
90524
+ type: "warning",
90525
+ code: "doenet-w0040",
90526
+ args: { type: "slope" }
90527
+ })
90528
+ );
90429
90529
  slope = null;
90430
90530
  }
90431
90531
  }
90432
90532
  if (x2 === null) {
90433
90533
  if (y2 === null) {
90434
- diagnostics2.push({
90435
- message: `Ignoring empty ${type} of function.`,
90436
- type: "warning"
90437
- });
90534
+ diagnostics2.push(
90535
+ codedDiagnostic({
90536
+ type: "warning",
90537
+ code: "doenet-w0041",
90538
+ args: { type }
90539
+ })
90540
+ );
90438
90541
  continue;
90439
90542
  }
90440
90543
  pointsWithoutX.push({
@@ -90459,10 +90562,12 @@ function calculateInterpolationPoints({ dependencyValues, numerics }) {
90459
90562
  for (let ind = 0; ind < pointsWithX.length; ind++) {
90460
90563
  let p2 = pointsWithX[ind];
90461
90564
  if (p2.x <= xPrev + eps) {
90462
- diagnostics2.push({
90463
- message: `Function contains two points with locations too close together. Can't define function.`,
90464
- type: "warning"
90465
- });
90565
+ diagnostics2.push(
90566
+ codedDiagnostic({
90567
+ type: "warning",
90568
+ code: "doenet-w0042"
90569
+ })
90570
+ );
90466
90571
  return {
90467
90572
  setValue: { interpolationPoints: null },
90468
90573
  sendDiagnostics: diagnostics2
@@ -95965,14 +96070,13 @@ class ODESystem extends InlineComponent {
95965
96070
  if (variables2.some(
95966
96071
  (x2) => x2.equals(globalDependencyValues.independentVariable)
95967
96072
  )) {
95968
- const warning = {
95969
- type: "warning",
95970
- message: "Variables of `<odeSystem>` must be different than independent variable."
95971
- };
95972
- if (globalDependencyValues.variables?.position) {
95973
- warning.position = globalDependencyValues.variables.position;
95974
- }
95975
- diagnostics2.push(warning);
96073
+ diagnostics2.push(
96074
+ codedDiagnostic({
96075
+ type: "warning",
96076
+ code: "doenet-w0045",
96077
+ position: globalDependencyValues.variables?.position || void 0
96078
+ })
96079
+ );
95976
96080
  }
95977
96081
  if (validVariables.length < numDims) {
95978
96082
  validVariables.push(
@@ -96297,10 +96401,12 @@ class ODESystem extends InlineComponent {
96297
96401
  valid = false;
96298
96402
  }
96299
96403
  if ([...new Set(varNames)].length !== varNames.length) {
96300
- diagnostics2.push({
96301
- message: "Can't define ODE RHS functions with duplicate dependent variable names.",
96302
- type: "warning"
96303
- });
96404
+ diagnostics2.push(
96405
+ codedDiagnostic({
96406
+ type: "warning",
96407
+ code: "doenet-w0046"
96408
+ })
96409
+ );
96304
96410
  valid = false;
96305
96411
  }
96306
96412
  let fs;
@@ -96309,10 +96415,12 @@ class ODESystem extends InlineComponent {
96309
96415
  (x2) => x2.subscripts_to_strings().f()
96310
96416
  );
96311
96417
  } catch (e32) {
96312
- diagnostics2.push({
96313
- message: "Cannot define ODE RHS function. Error creating mathjs function.",
96314
- type: "warning"
96315
- });
96418
+ diagnostics2.push(
96419
+ codedDiagnostic({
96420
+ type: "warning",
96421
+ code: "doenet-w0047"
96422
+ })
96423
+ );
96316
96424
  valid = false;
96317
96425
  }
96318
96426
  if (!valid) {
@@ -110509,20 +110617,20 @@ class IonicCompound extends InlineComponent {
110509
110617
  (child) => child.stateValues.charge
110510
110618
  );
110511
110619
  if (charges.length !== 2) {
110512
- let warning = {
110513
- message: "Have not implemented ionic compound for anything other than two ions.",
110514
- type: "warning"
110515
- };
110620
+ let warning = codedDiagnostic({
110621
+ type: "warning",
110622
+ code: "doenet-w0053"
110623
+ });
110516
110624
  return {
110517
110625
  setValue: { ionicCompound: null },
110518
110626
  sendDiagnostics: [warning]
110519
110627
  };
110520
110628
  }
110521
110629
  if (!(charges[0] * charges[1] < 0)) {
110522
- let warning = {
110523
- message: "Ionic compound implemented only for one cation and one anion.",
110524
- type: "warning"
110525
- };
110630
+ let warning = codedDiagnostic({
110631
+ type: "warning",
110632
+ code: "doenet-w0054"
110633
+ });
110526
110634
  return {
110527
110635
  setValue: { ionicCompound: null },
110528
110636
  sendDiagnostics: [warning]
@@ -122668,10 +122776,10 @@ class Collect extends CompositeComponent {
122668
122776
  }),
122669
122777
  definition: function({ dependencyValues }) {
122670
122778
  if (dependencyValues.sourceComponent === null) {
122671
- let warning = {
122672
- message: "No source found for collect.",
122673
- type: "warning"
122674
- };
122779
+ let warning = codedDiagnostic({
122780
+ type: "warning",
122781
+ code: "doenet-w0072"
122782
+ });
122675
122783
  return {
122676
122784
  setValue: { sourceName: "" },
122677
122785
  sendDiagnostics: [warning]
@@ -122703,14 +122811,14 @@ class Collect extends CompositeComponent {
122703
122811
  if (cClass) {
122704
122812
  componentTypeToCollect = componentType;
122705
122813
  } else {
122706
- const warning = {
122707
- type: "warning",
122708
- message: `Cannot collect components of type \`<${cType}>\` as it is an invalid component type.`
122709
- };
122710
- if (dependencyValues.componentTypeAttr.position) {
122711
- warning.position = dependencyValues.componentTypeAttr.position;
122712
- }
122713
- diagnostics2.push(warning);
122814
+ diagnostics2.push(
122815
+ codedDiagnostic({
122816
+ type: "warning",
122817
+ code: "doenet-w0073",
122818
+ args: { component: cType },
122819
+ position: dependencyValues.componentTypeAttr.position || void 0
122820
+ })
122821
+ );
122714
122822
  }
122715
122823
  }
122716
122824
  return {
@@ -131504,9 +131612,11 @@ class Circle extends Curve {
131504
131612
  }),
131505
131613
  definition: function({ dependencyValues }) {
131506
131614
  if (dependencyValues.haveNonNumericalThroughPoints) {
131507
- let message = "Haven't implemented `<circle>` through " + dependencyValues.numThroughPoints + " points";
131508
- message += " in case where the points don't have numerical values.";
131509
- let warning = { message, type: "warning" };
131615
+ let warning = codedDiagnostic({
131616
+ type: "warning",
131617
+ code: "doenet-w0027",
131618
+ args: { count: dependencyValues.numThroughPoints }
131619
+ });
131510
131620
  return {
131511
131621
  setValue: {
131512
131622
  numericalRadiusCalculatedWithCenter: null,
@@ -131578,10 +131688,10 @@ class Circle extends Curve {
131578
131688
  }
131579
131689
  };
131580
131690
  } else if (dependencyValues.numThroughPoints > 3) {
131581
- let warning = {
131582
- message: "Cannot calculate circle through more than 3 points.",
131583
- type: "warning"
131584
- };
131691
+ let warning = codedDiagnostic({
131692
+ type: "warning",
131693
+ code: "doenet-w0028"
131694
+ });
131585
131695
  return {
131586
131696
  setValue: {
131587
131697
  numericalRadiusCalculatedWithCenter: null,
@@ -131616,10 +131726,10 @@ class Circle extends Curve {
131616
131726
  }),
131617
131727
  definition({ dependencyValues }) {
131618
131728
  if (dependencyValues.havePrescribedCenter && dependencyValues.havePrescribedRadius && dependencyValues.numThroughPoints > 0) {
131619
- let warning = {
131620
- message: "Cannot calculate circle with specified radius, center and through points.",
131621
- type: "warning"
131622
- };
131729
+ let warning = codedDiagnostic({
131730
+ type: "warning",
131731
+ code: "doenet-w0029"
131732
+ });
131623
131733
  return {
131624
131734
  setValue: { haveCenterRadiusPoints: true },
131625
131735
  sendDiagnostics: [warning]
@@ -131763,10 +131873,10 @@ class Circle extends Curve {
131763
131873
  );
131764
131874
  return { setValue: { numericalRadius } };
131765
131875
  } else {
131766
- let warning = {
131767
- message: "Cannot calculate circle with specified center through more than 1 point.",
131768
- type: "warning"
131769
- };
131876
+ let warning = codedDiagnostic({
131877
+ type: "warning",
131878
+ code: "doenet-w0030"
131879
+ });
131770
131880
  return {
131771
131881
  setValue: { numericalRadius: NaN },
131772
131882
  sendDiagnostics: [warning]
@@ -132068,10 +132178,18 @@ class Circle extends Curve {
132068
132178
  let r22 = r2 * r2;
132069
132179
  if (r2 < 0 || 4 * r22 < dist2) {
132070
132180
  let dist3 = Math.round(Math.sqrt(dist2) * 100) / 100;
132071
- let warning = {
132072
- message: `Cannot calculate circle: given that the distance between the two points is ${dist3}, the specified radius ${r2} is too small.`,
132073
- type: "warning"
132074
- };
132181
+ let warning = codedDiagnostic({
132182
+ type: "warning",
132183
+ code: "doenet-w0031",
132184
+ // Strings rather than numbers: the radius is
132185
+ // the author's own value quoted back, and a
132186
+ // number argument is formatted as a quantity,
132187
+ // which would round 0.0001 away to 0.
132188
+ args: {
132189
+ distance: String(dist3),
132190
+ radius: String(r2)
132191
+ }
132192
+ });
132075
132193
  return {
132076
132194
  setValue: { numericalCenter: [NaN, NaN] },
132077
132195
  sendDiagnostics: [warning]
@@ -132088,10 +132206,10 @@ class Circle extends Curve {
132088
132206
  setValue: { numericalCenter: [centerx, centery] }
132089
132207
  };
132090
132208
  } else {
132091
- let warning = {
132092
- message: "Cannot create circle through more than two points with a specified radius.",
132093
- type: "warning"
132094
- };
132209
+ let warning = codedDiagnostic({
132210
+ type: "warning",
132211
+ code: "doenet-w0032"
132212
+ });
132095
132213
  return {
132096
132214
  setValue: { numericalCenter: [NaN, NaN] },
132097
132215
  sendDiagnostics: [warning]
@@ -132345,20 +132463,20 @@ class Circle extends Curve {
132345
132463
  let radius = ptx.subtract(ctx).pow(2).add(pty.subtract(cty).pow(2)).pow(0.5).simplify();
132346
132464
  return { setValue: { radius } };
132347
132465
  } catch (e32) {
132348
- let warning = {
132349
- message: "Invalid center or through points of circle.",
132350
- type: "warning"
132351
- };
132466
+ let warning = codedDiagnostic({
132467
+ type: "warning",
132468
+ code: "doenet-w0033"
132469
+ });
132352
132470
  return {
132353
132471
  setValue: { radius: Context.fromAst("_") },
132354
132472
  sendDiagnostics: [warning]
132355
132473
  };
132356
132474
  }
132357
132475
  } else {
132358
- let warning = {
132359
- message: "Cannot calculate radius of circle with specified center through more than 1 point.",
132360
- type: "warning"
132361
- };
132476
+ let warning = codedDiagnostic({
132477
+ type: "warning",
132478
+ code: "doenet-w0034"
132479
+ });
132362
132480
  return {
132363
132481
  setValue: { radius: Context.fromAst("_") },
132364
132482
  sendDiagnostics: [warning]
@@ -132422,10 +132540,10 @@ class Circle extends Curve {
132422
132540
  instructions
132423
132541
  };
132424
132542
  } else {
132425
- let warning = {
132426
- message: "Cannot change radius of circle with non-numerical through points",
132427
- type: "warning"
132428
- };
132543
+ let warning = codedDiagnostic({
132544
+ type: "warning",
132545
+ code: "doenet-w0035"
132546
+ });
132429
132547
  return { success: false, sendDiagnostics: [warning] };
132430
132548
  }
132431
132549
  }
@@ -132696,10 +132814,12 @@ class Circle extends Curve {
132696
132814
  } else {
132697
132815
  let diagnostics2 = [];
132698
132816
  if (globalDependencyValues.haveNonNumericalPrescribedRadius || globalDependencyValues.haveNonNumericalThroughPoints) {
132699
- diagnostics2.push({
132700
- message: "Cannot create circle through more than one point with specified radius when don't have numerical values.",
132701
- type: "warning"
132702
- });
132817
+ diagnostics2.push(
132818
+ codedDiagnostic({
132819
+ type: "warning",
132820
+ code: "doenet-w0036"
132821
+ })
132822
+ );
132703
132823
  }
132704
132824
  return {
132705
132825
  setValue: {
@@ -132805,10 +132925,10 @@ class Circle extends Curve {
132805
132925
  instructions
132806
132926
  };
132807
132927
  } else {
132808
- let warning = {
132809
- message: "Haven't implemented changing center of circle through points with non numerical values.",
132810
- type: "warning"
132811
- };
132928
+ let warning = codedDiagnostic({
132929
+ type: "warning",
132930
+ code: "doenet-w0037"
132931
+ });
132812
132932
  return { success: false, sendDiagnostics: [warning] };
132813
132933
  }
132814
132934
  }
@@ -133709,10 +133829,10 @@ class Parabola extends Curve {
133709
133829
  }
133710
133830
  return { setValue: { a: a2, b: b2, c: c2, realValued } };
133711
133831
  } else {
133712
- let warning = {
133713
- message: "Haven't implemented parabola with vertex through more than 1 point.",
133714
- type: "warning"
133715
- };
133832
+ let warning = codedDiagnostic({
133833
+ type: "warning",
133834
+ code: "doenet-w0049"
133835
+ });
133716
133836
  return {
133717
133837
  setValue: {
133718
133838
  a: NaN,
@@ -133855,10 +133975,10 @@ class Parabola extends Curve {
133855
133975
  }
133856
133976
  return { setValue: { a: a2, b: b2, c: c2, realValued } };
133857
133977
  } else {
133858
- let warning = {
133859
- message: "Haven't implemented parabola through more than 3 points.",
133860
- type: "warning"
133861
- };
133978
+ let warning = codedDiagnostic({
133979
+ type: "warning",
133980
+ code: "doenet-w0050"
133981
+ });
133862
133982
  return {
133863
133983
  setValue: {
133864
133984
  a: NaN,
@@ -139675,10 +139795,13 @@ class Angle extends GraphicalComponent {
139675
139795
  arrayDefinitionByKey({ globalDependencyValues }) {
139676
139796
  if (globalDependencyValues.lineChildren) {
139677
139797
  if (globalDependencyValues.lineChildren.length > 2) {
139678
- let warning = {
139679
- message: `Cannot define an angle between ${globalDependencyValues.lineChildren.length} lines`,
139680
- type: "info"
139681
- };
139798
+ let warning = codedDiagnostic({
139799
+ type: "info",
139800
+ code: "doenet-i0017",
139801
+ args: {
139802
+ count: globalDependencyValues.lineChildren.length
139803
+ }
139804
+ });
139682
139805
  let points2 = {};
139683
139806
  for (let i2 = 0; i2 < 3; i2++) {
139684
139807
  for (let j2 = 0; j2 < 2; j2++) {
@@ -139818,13 +139941,13 @@ class Angle extends GraphicalComponent {
139818
139941
  }
139819
139942
  const diagnostics2 = [];
139820
139943
  if (foundBadThroughPoint) {
139821
- diagnostics2.push({
139822
- message: "Invalid point in through of `<angle>`",
139823
- type: "warning"
139824
- });
139825
- if (globalDependencyValues.throughAttr.position) {
139826
- diagnostics2[diagnostics2.length - 1].position = globalDependencyValues.throughAttr.position;
139827
- }
139944
+ diagnostics2.push(
139945
+ codedDiagnostic({
139946
+ type: "warning",
139947
+ code: "doenet-w0048",
139948
+ position: globalDependencyValues.throughAttr.position || void 0
139949
+ })
139950
+ );
139828
139951
  }
139829
139952
  if (numPointsSpecified === 0) {
139830
139953
  points["0,0"] = Context.fromAst(1);
@@ -140730,10 +140853,13 @@ class Answer extends InlineComponent {
140730
140853
  if (type.toLowerCase() === "videowatched") {
140731
140854
  return { success: false };
140732
140855
  }
140733
- diagnostics2.push({
140734
- message: `Invalid type for answer: ${type}`,
140735
- type: "warning"
140736
- });
140856
+ diagnostics2.push(
140857
+ codedDiagnostic({
140858
+ type: "warning",
140859
+ code: "doenet-w0078",
140860
+ args: { type }
140861
+ })
140862
+ );
140737
140863
  type = "math";
140738
140864
  }
140739
140865
  } else {
@@ -143658,26 +143784,37 @@ class MathInput extends Input {
143658
143784
  });
143659
143785
  const result2 = { setValue: { effectiveFunctionNames: names } };
143660
143786
  const diagnostics2 = [];
143661
- const buildMessage = (attr, list) => `<mathInput>: ignored invalid function name(s) in ${attr}: ${list.map((n2) => `'${n2}'`).join(", ")}. Each name's display segment must be at least 2 characters (letters or dashes); an optional \`|<mathspeak alternative>\` suffix may follow.`;
143787
+ const invalidNames = (attr, list, position2) => codedDiagnostic({
143788
+ type: "warning",
143789
+ code: "doenet-w0082",
143790
+ args: {
143791
+ attribute: attr,
143792
+ // Quoted here and joined at format time, so the
143793
+ // separator follows the reader's language.
143794
+ names: {
143795
+ list: list.map((n2) => `'${n2}'`),
143796
+ type: "unit"
143797
+ }
143798
+ },
143799
+ position: position2
143800
+ });
143662
143801
  if (droppedFromAdditional.length > 0) {
143663
- diagnostics2.push({
143664
- type: "warning",
143665
- message: buildMessage(
143802
+ diagnostics2.push(
143803
+ invalidNames(
143666
143804
  "additionalFunctionNames",
143667
- droppedFromAdditional
143668
- ),
143669
- position: dependencyValues.additionalFunctionNamesAttr?.position
143670
- });
143805
+ droppedFromAdditional,
143806
+ dependencyValues.additionalFunctionNamesAttr?.position
143807
+ )
143808
+ );
143671
143809
  }
143672
143810
  if (droppedFromReset.length > 0) {
143673
- diagnostics2.push({
143674
- type: "warning",
143675
- message: buildMessage(
143811
+ diagnostics2.push(
143812
+ invalidNames(
143676
143813
  "resetFunctionNames",
143677
- droppedFromReset
143678
- ),
143679
- position: dependencyValues.resetFunctionNamesAttr?.position
143680
- });
143814
+ droppedFromReset,
143815
+ dependencyValues.resetFunctionNamesAttr?.position
143816
+ )
143817
+ );
143681
143818
  }
143682
143819
  if (diagnostics2.length > 0)
143683
143820
  result2.sendDiagnostics = diagnostics2;
@@ -150981,16 +151118,20 @@ function pushUnsupportedAxisPositionWarnings({
150981
151118
  diagnostics: diagnostics2
150982
151119
  }) {
150983
151120
  if (dependencyValues.xLabelPosition === "left") {
150984
- diagnostics2.push({
150985
- type: "warning",
150986
- message: '`<graph>`: xLabelPosition="left" is not supported in prefigure renderer; using right-position behavior.'
150987
- });
151121
+ diagnostics2.push(
151122
+ codedDiagnostic({
151123
+ type: "warning",
151124
+ code: "doenet-w0060"
151125
+ })
151126
+ );
150988
151127
  }
150989
151128
  if (dependencyValues.yLabelPosition === "bottom") {
150990
- diagnostics2.push({
150991
- type: "warning",
150992
- message: '`<graph>`: yLabelPosition="bottom" is not supported in prefigure renderer; using top-position behavior.'
150993
- });
151129
+ diagnostics2.push(
151130
+ codedDiagnostic({
151131
+ type: "warning",
151132
+ code: "doenet-w0061"
151133
+ })
151134
+ );
150994
151135
  }
150995
151136
  }
150996
151137
  const PREFIGURE_DARK_AXIS_COLOR = "#ffffff";
@@ -151038,26 +151179,32 @@ function createPrefigureXML({
151038
151179
  const rawXMax = asFiniteNumber(dependencyValues.xMax);
151039
151180
  const rawYMax = asFiniteNumber(dependencyValues.yMax);
151040
151181
  if ([rawXMin, rawYMin, rawXMax, rawYMax].some((x2) => x2 === null)) {
151041
- diagnostics2.push({
151042
- type: "warning",
151043
- message: "`<graph>`: invalid axis bounds for prefigure conversion; using default bbox (-10,-10,10,10)."
151044
- });
151182
+ diagnostics2.push(
151183
+ codedDiagnostic({
151184
+ type: "warning",
151185
+ code: "doenet-w0062"
151186
+ })
151187
+ );
151045
151188
  }
151046
151189
  const graphBounds = rawXMin === null || rawYMin === null || rawXMax === null || rawYMax === null ? [-10, -10, 10, 10] : [rawXMin, rawYMin, rawXMax, rawYMax];
151047
151190
  let dimensionWidth = asFiniteNumber(dependencyValues.width?.size);
151048
151191
  if (dimensionWidth === null || dimensionWidth <= 0) {
151049
- diagnostics2.push({
151050
- type: "warning",
151051
- message: "`<graph>`: invalid width for prefigure conversion; using default diagram width 425."
151052
- });
151192
+ diagnostics2.push(
151193
+ codedDiagnostic({
151194
+ type: "warning",
151195
+ code: "doenet-w0063"
151196
+ })
151197
+ );
151053
151198
  dimensionWidth = 425;
151054
151199
  }
151055
151200
  let diagramAspectRatio = asFiniteNumber(dependencyValues.aspectRatio);
151056
151201
  if (diagramAspectRatio === null || diagramAspectRatio <= 0) {
151057
- diagnostics2.push({
151058
- type: "warning",
151059
- message: "`<graph>`: invalid aspectRatio for prefigure conversion; using default aspect ratio 1."
151060
- });
151202
+ diagnostics2.push(
151203
+ codedDiagnostic({
151204
+ type: "warning",
151205
+ code: "doenet-w0064"
151206
+ })
151207
+ );
151061
151208
  diagramAspectRatio = 1;
151062
151209
  }
151063
151210
  const dimensionHeight = dimensionWidth / diagramAspectRatio;
@@ -151507,10 +151654,12 @@ function returnGraphPrefigureXMLStateVariableDefinition() {
151507
151654
  if (dependencyValues.effectiveRenderer !== "prefigure") {
151508
151655
  const diagnostics22 = [];
151509
151656
  if (dependencyValues.annotationsChildren && dependencyValues.annotationsChildren.length > 0) {
151510
- diagnostics22.push({
151511
- type: "info",
151512
- message: "`<graph>`: annotations will not be rendered when not using the PreFigure renderer."
151513
- });
151657
+ diagnostics22.push(
151658
+ codedDiagnostic({
151659
+ type: "info",
151660
+ code: "doenet-i0019"
151661
+ })
151662
+ );
151514
151663
  }
151515
151664
  return {
151516
151665
  setValue: { prefigureXML: null },
@@ -151542,11 +151691,13 @@ function returnGraphPrefigureXMLStateVariableDefinition() {
151542
151691
  });
151543
151692
  if (dependencyValues.annotationsChildren && dependencyValues.annotationsChildren.length > 1) {
151544
151693
  const secondToLastAnnotationsChild = dependencyValues.annotationsChildren[dependencyValues.annotationsChildren.length - 2];
151545
- diagnostics2.push({
151546
- type: "info",
151547
- message: "Multiple `<annotations>` children found in `<graph>`; all but the last one are ignored.",
151548
- position: secondToLastAnnotationsChild?.position
151549
- });
151694
+ diagnostics2.push(
151695
+ codedDiagnostic({
151696
+ type: "info",
151697
+ code: "doenet-i0020",
151698
+ position: secondToLastAnnotationsChild?.position
151699
+ })
151700
+ );
151550
151701
  }
151551
151702
  return {
151552
151703
  setValue: { prefigureXML: xml },
@@ -154957,10 +155108,12 @@ function returnStandardSequenceStateVariableDefinitions() {
154957
155108
  let validSequence = true;
154958
155109
  if (dependencyValues.specifiedLength !== null) {
154959
155110
  if (!Number.isInteger(dependencyValues.specifiedLength) || dependencyValues.specifiedLength < 0) {
154960
- diagnostics2.push({
154961
- message: "Invalid length of sequence. Must be a non-negative integer.",
154962
- type: "info"
154963
- });
155111
+ diagnostics2.push(
155112
+ codedDiagnostic({
155113
+ type: "info",
155114
+ code: "doenet-i0012"
155115
+ })
155116
+ );
154964
155117
  validSequence = false;
154965
155118
  }
154966
155119
  }
@@ -154970,10 +155123,13 @@ function returnStandardSequenceStateVariableDefinitions() {
154970
155123
  dependencyValues.specifiedStep
154971
155124
  );
154972
155125
  if (!Number.isFinite(numericalStep)) {
154973
- diagnostics2.push({
154974
- message: "Invalid step of sequence. Must be a number for sequence of type " + dependencyValues.type + ".",
154975
- type: "info"
154976
- });
155126
+ diagnostics2.push(
155127
+ codedDiagnostic({
155128
+ type: "info",
155129
+ code: "doenet-i0013",
155130
+ args: { type: dependencyValues.type }
155131
+ })
155132
+ );
154977
155133
  validSequence = false;
154978
155134
  }
154979
155135
  }
@@ -154984,26 +155140,35 @@ function returnStandardSequenceStateVariableDefinitions() {
154984
155140
  dependencyValues.specifiedFrom
154985
155141
  );
154986
155142
  if (!Number.isFinite(numericalFrom)) {
154987
- diagnostics2.push({
154988
- message: `Invalid "from" of number sequence. Must be a number.`,
154989
- type: "info"
154990
- });
155143
+ diagnostics2.push(
155144
+ codedDiagnostic({
155145
+ type: "info",
155146
+ code: "doenet-i0014",
155147
+ args: { attribute: "from" }
155148
+ })
155149
+ );
154991
155150
  validSequence = false;
154992
155151
  }
154993
155152
  } else if (dependencyValues.type === "letters") {
154994
155153
  if (lettersToNumber(dependencyValues.specifiedFrom) === void 0) {
154995
- diagnostics2.push({
154996
- message: `Invalid "from" of letters sequence. Must be a letter combination.`,
154997
- type: "info"
154998
- });
155154
+ diagnostics2.push(
155155
+ codedDiagnostic({
155156
+ type: "info",
155157
+ code: "doenet-i0015",
155158
+ args: { attribute: "from" }
155159
+ })
155160
+ );
154999
155161
  validSequence = false;
155000
155162
  }
155001
155163
  } else {
155002
155164
  if (Number.isNaN(dependencyValues.specifiedFrom.tree)) {
155003
- diagnostics2.push({
155004
- message: `Invalid "from" of sequence.`,
155005
- type: "info"
155006
- });
155165
+ diagnostics2.push(
155166
+ codedDiagnostic({
155167
+ type: "info",
155168
+ code: "doenet-i0016",
155169
+ args: { attribute: "from" }
155170
+ })
155171
+ );
155007
155172
  validSequence = false;
155008
155173
  }
155009
155174
  }
@@ -155014,26 +155179,35 @@ function returnStandardSequenceStateVariableDefinitions() {
155014
155179
  dependencyValues.specifiedTo
155015
155180
  );
155016
155181
  if (!Number.isFinite(numericalTo)) {
155017
- diagnostics2.push({
155018
- message: `Invalid "to" of number sequence. Must be a number.`,
155019
- type: "info"
155020
- });
155182
+ diagnostics2.push(
155183
+ codedDiagnostic({
155184
+ type: "info",
155185
+ code: "doenet-i0014",
155186
+ args: { attribute: "to" }
155187
+ })
155188
+ );
155021
155189
  validSequence = false;
155022
155190
  }
155023
155191
  } else if (dependencyValues.type === "letters") {
155024
155192
  if (lettersToNumber(dependencyValues.specifiedTo) === void 0) {
155025
- diagnostics2.push({
155026
- message: `Invalid "to" of letters sequence. Must be a letter combination.`,
155027
- type: "info"
155028
- });
155193
+ diagnostics2.push(
155194
+ codedDiagnostic({
155195
+ type: "info",
155196
+ code: "doenet-i0015",
155197
+ args: { attribute: "to" }
155198
+ })
155199
+ );
155029
155200
  validSequence = false;
155030
155201
  }
155031
155202
  } else {
155032
155203
  if (Number.isNaN(dependencyValues.specifiedTo.tree)) {
155033
- diagnostics2.push({
155034
- message: `Invalid "to" of sequence.`,
155035
- type: "info"
155036
- });
155204
+ diagnostics2.push(
155205
+ codedDiagnostic({
155206
+ type: "info",
155207
+ code: "doenet-i0016",
155208
+ args: { attribute: "to" }
155209
+ })
155210
+ );
155037
155211
  validSequence = false;
155038
155212
  }
155039
155213
  }
@@ -157750,14 +157924,13 @@ class Slider extends BaseComponent {
157750
157924
  if (markerType === "empty") {
157751
157925
  markers = [...dependencyValues.items];
157752
157926
  } else if (markerType !== dependencyValues.type) {
157753
- const warning = {
157754
- type: "warning",
157755
- message: "Markers type doesn't match slider type."
157756
- };
157757
- if (dependencyValues.markersChild[0].position) {
157758
- warning.position = dependencyValues.markersChild[0].position;
157759
- }
157760
- diagnostics2.push(warning);
157927
+ diagnostics2.push(
157928
+ codedDiagnostic({
157929
+ type: "warning",
157930
+ code: "doenet-w0080",
157931
+ position: dependencyValues.markersChild[0].position || void 0
157932
+ })
157933
+ );
157761
157934
  markers = [];
157762
157935
  } else {
157763
157936
  markers = dependencyValues.markersChild[0].stateValues.markers;
@@ -159538,10 +159711,12 @@ class Intersection extends CompositeComponent {
159538
159711
  if (totNums < 2) {
159539
159712
  return { replacements: [], diagnostics: diagnostics2, nComponents };
159540
159713
  } else if (totNums > 2) {
159541
- diagnostics2.push({
159542
- message: "Haven't implemented intersection for more than two items",
159543
- type: "warning"
159544
- });
159714
+ diagnostics2.push(
159715
+ codedDiagnostic({
159716
+ type: "warning",
159717
+ code: "doenet-w0055"
159718
+ })
159719
+ );
159545
159720
  return { replacements: [], diagnostics: diagnostics2, nComponents };
159546
159721
  }
159547
159722
  let points = [];
@@ -160488,14 +160663,13 @@ class ConditionalContent extends CompositeComponent {
160488
160663
  definition({ dependencyValues }) {
160489
160664
  const diagnostics2 = [];
160490
160665
  if (dependencyValues.conditionAttribute) {
160491
- const warning = {
160492
- type: "warning",
160493
- message: "Attribute `condition` is ignored on a `<conditionalContent>` component with case or else children."
160494
- };
160495
- if (dependencyValues.conditionAttribute.position) {
160496
- warning.position = dependencyValues.conditionAttribute.position;
160497
- }
160498
- diagnostics2.push(warning);
160666
+ diagnostics2.push(
160667
+ codedDiagnostic({
160668
+ type: "warning",
160669
+ code: "doenet-w0079",
160670
+ position: dependencyValues.conditionAttribute.position || void 0
160671
+ })
160672
+ );
160499
160673
  }
160500
160674
  return {
160501
160675
  sendDiagnostics: diagnostics2,
@@ -202276,10 +202450,12 @@ class SelectFromSequence extends Sequence {
202276
202450
  definition: function({ dependencyValues }) {
202277
202451
  const diagnostics2 = [];
202278
202452
  if (dependencyValues.coprime && dependencyValues.type !== "number") {
202279
- diagnostics2.push({
202280
- message: "coprime ignored since not selecting numbers",
202281
- type: "warning"
202282
- });
202453
+ diagnostics2.push(
202454
+ codedDiagnostic({
202455
+ type: "warning",
202456
+ code: "doenet-w0051"
202457
+ })
202458
+ );
202283
202459
  }
202284
202460
  if (dependencyValues.excludeCombinations !== null) {
202285
202461
  let excludedCombinations = dependencyValues.excludeCombinations.stateValues.lists.map(
@@ -202299,10 +202475,12 @@ class SelectFromSequence extends Sequence {
202299
202475
  }
202300
202476
  }
202301
202477
  if (dependencyValues.coprime) {
202302
- diagnostics2.push({
202303
- message: "coprime ignored since excludeCombinations specified",
202304
- type: "warning"
202305
- });
202478
+ diagnostics2.push(
202479
+ codedDiagnostic({
202480
+ type: "warning",
202481
+ code: "doenet-w0052"
202482
+ })
202483
+ );
202306
202484
  }
202307
202485
  }
202308
202486
  return {
@@ -204809,10 +204987,13 @@ class AnimateFromSequence extends BaseComponent {
204809
204987
  }
204810
204988
  let diagnostics2 = [];
204811
204989
  if (targetIdentities === null || targetIdentities.length === 0) {
204812
- diagnostics2.push({
204813
- message: "Invalid target for `<animateFromSequence>`: cannot find target.",
204814
- type: "warning"
204815
- });
204990
+ diagnostics2.push(
204991
+ codedDiagnostic({
204992
+ type: "warning",
204993
+ code: "doenet-w0043",
204994
+ args: { source: "animateFromSequence" }
204995
+ })
204996
+ );
204816
204997
  }
204817
204998
  return {
204818
204999
  setValue: { targetIdentities },
@@ -204879,11 +205060,13 @@ class AnimateFromSequence extends BaseComponent {
204879
205060
  for (let ind in dependencyValues.targetIdentities) {
204880
205061
  let target = dependencyValues["target" + ind];
204881
205062
  if (target == null) {
204882
- let message = "Invalid target for `<animateFromSequence>`: cannot find target.";
204883
- diagnostics2.push({
204884
- message,
204885
- type: "warning"
204886
- });
205063
+ diagnostics2.push(
205064
+ codedDiagnostic({
205065
+ type: "warning",
205066
+ code: "doenet-w0043",
205067
+ args: { source: "animateFromSequence" }
205068
+ })
205069
+ );
204887
205070
  continue;
204888
205071
  }
204889
205072
  targets.push(target);
@@ -204895,17 +205078,29 @@ class AnimateFromSequence extends BaseComponent {
204895
205078
  prop += `[idx]`;
204896
205079
  }
204897
205080
  }
204898
- let message = `Invalid target for \`<animateFromSequence>\`: cannot find a state variable named "${prop}" on a \`<${target.componentType}>\`.`;
204899
- diagnostics2.push({
204900
- message,
204901
- type: "warning"
204902
- });
205081
+ diagnostics2.push(
205082
+ codedDiagnostic({
205083
+ type: "warning",
205084
+ code: "doenet-w0044",
205085
+ args: {
205086
+ source: "animateFromSequence",
205087
+ property: prop,
205088
+ component: target.componentType
205089
+ }
205090
+ })
205091
+ );
204903
205092
  } else {
204904
- let message = `Invalid target for \`<animateFromSequence>\`: cannot find a state variable named "value" on a \`<${target.componentType}>\`.`;
204905
- diagnostics2.push({
204906
- message,
204907
- type: "warning"
204908
- });
205093
+ diagnostics2.push(
205094
+ codedDiagnostic({
205095
+ type: "warning",
205096
+ code: "doenet-w0044",
205097
+ args: {
205098
+ source: "animateFromSequence",
205099
+ property: "value",
205100
+ component: target.componentType
205101
+ }
205102
+ })
205103
+ );
204909
205104
  }
204910
205105
  }
204911
205106
  }
@@ -215331,10 +215526,13 @@ class UpdateValue extends InlineComponent {
215331
215526
  }
215332
215527
  let diagnostics2 = [];
215333
215528
  if (targetIdentities === null || targetIdentities.length === 0) {
215334
- diagnostics2.push({
215335
- message: "Invalid target for `<updateValue>`: cannot find target.",
215336
- type: "warning"
215337
- });
215529
+ diagnostics2.push(
215530
+ codedDiagnostic({
215531
+ type: "warning",
215532
+ code: "doenet-w0043",
215533
+ args: { source: "updateValue" }
215534
+ })
215535
+ );
215338
215536
  }
215339
215537
  return {
215340
215538
  setValue: { targetIdentities },
@@ -215401,11 +215599,13 @@ class UpdateValue extends InlineComponent {
215401
215599
  for (let ind in dependencyValues.targetIdentities) {
215402
215600
  let target = dependencyValues["target" + ind];
215403
215601
  if (target == null) {
215404
- let message = "Invalid target for `<updateValue>`: cannot find target.";
215405
- diagnostics2.push({
215406
- message,
215407
- type: "warning"
215408
- });
215602
+ diagnostics2.push(
215603
+ codedDiagnostic({
215604
+ type: "warning",
215605
+ code: "doenet-w0043",
215606
+ args: { source: "updateValue" }
215607
+ })
215608
+ );
215409
215609
  continue;
215410
215610
  }
215411
215611
  targets.push(target);
@@ -215417,17 +215617,29 @@ class UpdateValue extends InlineComponent {
215417
215617
  prop += `[idx]`;
215418
215618
  }
215419
215619
  }
215420
- let message = `Invalid target for \`<updateValue>\`: cannot find a state variable named "${prop}" on a \`<${target.componentType}>\`.`;
215421
- diagnostics2.push({
215422
- message,
215423
- type: "warning"
215424
- });
215620
+ diagnostics2.push(
215621
+ codedDiagnostic({
215622
+ type: "warning",
215623
+ code: "doenet-w0044",
215624
+ args: {
215625
+ source: "updateValue",
215626
+ property: prop,
215627
+ component: target.componentType
215628
+ }
215629
+ })
215630
+ );
215425
215631
  } else {
215426
- let message = `Invalid target for \`<updateValue>\`: cannot find a state variable named "value" on a \`<${target.componentType}>\`.`;
215427
- diagnostics2.push({
215428
- message,
215429
- type: "warning"
215430
- });
215632
+ diagnostics2.push(
215633
+ codedDiagnostic({
215634
+ type: "warning",
215635
+ code: "doenet-w0044",
215636
+ args: {
215637
+ source: "updateValue",
215638
+ property: "value",
215639
+ component: target.componentType
215640
+ }
215641
+ })
215642
+ );
215431
215643
  }
215432
215644
  }
215433
215645
  }
@@ -215981,16 +216193,13 @@ class FunctionIterates extends InlineComponent {
215981
216193
  return { setValue: { numDimensions: 0 } };
215982
216194
  } else if (dependencyValues.functionAttr.stateValues.numInputs !== dependencyValues.functionAttr.stateValues.numOutputs) {
215983
216195
  let numInputs = dependencyValues.functionAttr.stateValues.numInputs;
215984
- let numInputsPhrase = numInputs.toString() + (numInputs === 1 ? " input" : " inputs");
215985
216196
  let numOutputs = dependencyValues.functionAttr.stateValues.numOutputs;
215986
- let numOutputsPhrase = numOutputs.toString() + (numOutputs === 1 ? " output" : " outputs");
215987
- let warning = {
216197
+ let warning = codedDiagnostic({
215988
216198
  type: "warning",
215989
- message: `Function iterates are possible only if the number of inputs of the function is equal to the number of outputs. This function has ${numInputsPhrase} and ${numOutputsPhrase}.`
215990
- };
215991
- if (dependencyValues.functionAttr.position) {
215992
- warning.position = dependencyValues.functionAttr.position;
215993
- }
216199
+ code: "doenet-w0056",
216200
+ args: { inputs: numInputs, outputs: numOutputs },
216201
+ position: dependencyValues.functionAttr.position || void 0
216202
+ });
215994
216203
  return {
215995
216204
  setValue: { numDimensions: 0 },
215996
216205
  sendDiagnostics: [warning]
@@ -216308,11 +216517,14 @@ class ModuleAttributes extends CompositeComponent {
216308
216517
  const childName = child.attributes.name?.primitive?.value;
216309
216518
  if (!childName) {
216310
216519
  componentsForModuleAttributes.push(child);
216311
- diagnostics2.push({
216312
- type: "warning",
216313
- message: `Since the component \`<${child.componentType}>\` does not have a name, it cannot be used for a module attribute`,
216314
- position: child.position
216315
- });
216520
+ diagnostics2.push(
216521
+ codedDiagnostic({
216522
+ type: "warning",
216523
+ code: "doenet-w0074",
216524
+ args: { component: child.componentType },
216525
+ position: child.position
216526
+ })
216527
+ );
216316
216528
  continue;
216317
216529
  }
216318
216530
  let attributeName = attributeLowerCaseMapping[childName.toLowerCase()];
@@ -216322,11 +216534,17 @@ class ModuleAttributes extends CompositeComponent {
216322
216534
  continue;
216323
216535
  }
216324
216536
  if (existingModuleAttrNames.includes(attributeName)) {
216325
- diagnostics2.push({
216326
- type: "warning",
216327
- message: `The component \`<${child.componentType} name="${childName}">\` cannot be used as an attribute for a module because the \`<module>\` component type already has a "${childName}" attribute defined.`,
216328
- position: child.position
216329
- });
216537
+ diagnostics2.push(
216538
+ codedDiagnostic({
216539
+ type: "warning",
216540
+ code: "doenet-w0075",
216541
+ args: {
216542
+ component: child.componentType,
216543
+ name: childName
216544
+ },
216545
+ position: child.position
216546
+ })
216547
+ );
216330
216548
  componentsForModuleAttributes.push(child);
216331
216549
  continue;
216332
216550
  }
@@ -217686,8 +217904,13 @@ class SolveEquations extends InlineComponent {
217686
217904
  try {
217687
217905
  f_base = formula.f();
217688
217906
  } catch (e32) {
217689
- let message = "Cannot solve equation as could not evaluate equation: " + expression.toString();
217690
- let diagnostics2 = [{ message, type: "warning" }];
217907
+ let diagnostics2 = [
217908
+ codedDiagnostic({
217909
+ type: "warning",
217910
+ code: "doenet-w0057",
217911
+ args: { equation: expression.toString() }
217912
+ })
217913
+ ];
217691
217914
  return {
217692
217915
  setValue: { allSolutions: [] },
217693
217916
  sendDiagnostics: diagnostics2
@@ -221334,10 +221557,14 @@ class DataFrame extends BaseComponent {
221334
221557
  }
221335
221558
  }
221336
221559
  if (foundInconsistentRow) {
221337
- let warning = {
221338
- message: `Data has invalid shape. Rows has inconsistent lengths. Found in componentIdx :${componentIdx}`,
221339
- type: "warning"
221340
- };
221560
+ let warning = codedDiagnostic({
221561
+ type: "warning",
221562
+ code: "doenet-w0066",
221563
+ // A string, not a number: an internal index is a
221564
+ // name, and formatting it as a quantity would print
221565
+ // componentIdx 1234 as "1,234".
221566
+ args: { componentIdx: String(componentIdx) }
221567
+ });
221341
221568
  return {
221342
221569
  setValue: {
221343
221570
  dataFrame: null,
@@ -221366,10 +221593,14 @@ class DataFrame extends BaseComponent {
221366
221593
  data = originalData;
221367
221594
  }
221368
221595
  if ([...new Set(dataFrame.columnNames)].length < dataFrame.columnNames) {
221369
- let warning = {
221370
- message: `Data has duplicate column names. Found in componentIdx :${componentIdx}`,
221371
- type: "warning"
221372
- };
221596
+ let warning = codedDiagnostic({
221597
+ type: "warning",
221598
+ code: "doenet-w0067",
221599
+ // A string, not a number: an internal index is a
221600
+ // name, and formatting it as a quantity would print
221601
+ // componentIdx 1234 as "1,234".
221602
+ args: { componentIdx: String(componentIdx) }
221603
+ });
221373
221604
  return {
221374
221605
  setValue: {
221375
221606
  dataFrame: null,
@@ -221382,10 +221613,14 @@ class DataFrame extends BaseComponent {
221382
221613
  };
221383
221614
  }
221384
221615
  if (dataFrame.columnNames.includes("")) {
221385
- let warning = {
221386
- message: `Data is missing a column name. Found in componentIdx :${componentIdx}`,
221387
- type: "warning"
221388
- };
221616
+ let warning = codedDiagnostic({
221617
+ type: "warning",
221618
+ code: "doenet-w0068",
221619
+ // A string, not a number: an internal index is a
221620
+ // name, and formatting it as a quantity would print
221621
+ // componentIdx 1234 as "1,234".
221622
+ args: { componentIdx: String(componentIdx) }
221623
+ });
221389
221624
  return {
221390
221625
  setValue: {
221391
221626
  dataFrame: null,
@@ -223324,10 +223559,10 @@ class EigenDecomposition extends BaseComponent {
223324
223559
  "Could nt calculate eigenvalues of matrix",
223325
223560
  e32
223326
223561
  );
223327
- let warning = {
223328
- message: "Could not calculate eigenvalues of matrix",
223329
- type: "warning"
223330
- };
223562
+ let warning = codedDiagnostic({
223563
+ type: "warning",
223564
+ code: "doenet-w0059"
223565
+ });
223331
223566
  return {
223332
223567
  setValue: { decomposition: null, numEigenvectors: 0 },
223333
223568
  sendDiagnostics: [warning]
@@ -225686,16 +225921,20 @@ class PretzelArranger extends CompositeComponent {
225686
225921
  }
225687
225922
  }
225688
225923
  if (!validProblems) {
225689
- diagnostics2.push({
225690
- message: "Invalid pretzel: each `<problem>` must contain one `<statement>` and one `<answer>`.",
225691
- type: "warning"
225692
- });
225924
+ diagnostics2.push(
225925
+ codedDiagnostic({
225926
+ type: "warning",
225927
+ code: "doenet-w0076"
225928
+ })
225929
+ );
225693
225930
  }
225694
225931
  if (dependencyValues.mode === "circuit" && distractors.includes(0)) {
225695
- diagnostics2.push({
225696
- message: 'Invalid pretzel: in mode="circuit", the first `<problem>` cannot be a distractor.',
225697
- type: "error"
225698
- });
225932
+ diagnostics2.push(
225933
+ codedDiagnostic({
225934
+ type: "error",
225935
+ code: "doenet-e0001"
225936
+ })
225937
+ );
225699
225938
  }
225700
225939
  return {
225701
225940
  setValue: {
@@ -227755,10 +227994,11 @@ class Copy extends CompositeComponent {
227755
227994
  return {
227756
227995
  setValue: { numComponentsSpecified: null },
227757
227996
  sendDiagnostics: [
227758
- {
227997
+ codedDiagnostic({
227759
227998
  type: "warning",
227760
- message: `Cannot extend or copy an unrecognized component type: ${dependencyValues.typeAttr}.`
227761
- }
227999
+ code: "doenet-w0065",
228000
+ args: { type: dependencyValues.typeAttr }
228001
+ })
227762
228002
  ]
227763
228003
  };
227764
228004
  }
@@ -228939,15 +229179,27 @@ async function replacementFromProp({
228939
229179
  endOffset
228940
229180
  );
228941
229181
  }
228942
- diagnostics2.push({
228943
- message: `Could not find prop ${unresolvedPropName} on a component of type ${replacementSource.componentType}`,
228944
- type: "info"
228945
- });
229182
+ diagnostics2.push(
229183
+ codedDiagnostic({
229184
+ type: "info",
229185
+ code: "doenet-i0018",
229186
+ args: {
229187
+ property: unresolvedPropName,
229188
+ component: replacementSource.componentType
229189
+ }
229190
+ })
229191
+ );
228946
229192
  } else if (propName !== "__prop_name_not_found") {
228947
- diagnostics2.push({
228948
- message: `Could not find prop ${propName} on a component of type ${replacementSource.componentType}`,
228949
- type: "info"
228950
- });
229193
+ diagnostics2.push(
229194
+ codedDiagnostic({
229195
+ type: "info",
229196
+ code: "doenet-i0018",
229197
+ args: {
229198
+ property: propName,
229199
+ component: replacementSource.componentType
229200
+ }
229201
+ })
229202
+ );
228951
229203
  }
228952
229204
  return {
228953
229205
  serializedReplacements: [],
@@ -233016,4 +233268,4 @@ export {
233016
233268
  getDefaultExportFromCjs as g,
233017
233269
  updateSyntaxFromV06toV07 as u
233018
233270
  };
233019
- //# sourceMappingURL=index-RygVZ98K.js.map
233271
+ //# sourceMappingURL=index-Dn1ihOWf.js.map