@doenet/v06-to-v07 0.7.21-dev.374 → 0.7.21-dev.376

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.
@@ -39402,7 +39402,7 @@ class Indent {
39402
39402
  }
39403
39403
  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";
39404
39404
  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';
39405
- 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\n## Building components from the source\n\n# Raised while the source is being turned into components, by throwing rather\n# than by building a record: the thrower is caught, the component becomes an\n# `_error`, and the diagnostic is re-raised from it.\n\ncomponent-type-invalid = Invalid component type: `<{ $componentType }>`\n\nattribute-repeated = Cannot repeat attribute { $attribute }.\n\nattribute-invalid-for-component = Invalid attribute "{ $attribute }" for a component of type `<{ $componentType }>`.\n\n## Style definition contrast\n\n# $context names the pair being compared, $mode which colour scheme it was\n# rendered in. Both are symbolic — the phrase is chosen here so a translator\n# can rewrite it, rather than being handed over already in English.\nstyle-definition-insufficient-contrast =\n Style definition { $styleNumber } has insufficient contrast for { $context ->\n [text-on-background] text color against background color\n [high-contrast] high-contrast color against the canvas\n [line] line color against the canvas\n [marker] marker color against the canvas\n *[text-on-canvas] text color against the canvas\n }{ $mode ->\n [dark] { " (dark mode)" }\n *[light] { "" }\n } ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; requires at least { $threshold }:1).\n\n# $suggestion says whether a concrete replacement colour could be computed.\n# The attribute names and colour values in the `available` branch are\n# DoenetML source, not prose, and stay as they are in every language.\nstyle-definition-dark-mode-text-background-contrast =\n Although style definition { $styleNumber } has specified colors that provide sufficient contrast for light mode, the dark-mode colors derived from these values have insufficient contrast for the text color against the background color ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; requires at least { $threshold }:1). { $suggestion ->\n [available] To ensure sufficient contrast in dark mode, either increase the light-mode contrast (e.g., set { $lightAttribute }="{ $lightColor }") or override the dark-mode color (e.g., set { $darkAttribute }="{ $darkColor }").\n *[none] To ensure sufficient contrast in dark mode, increase the light-mode contrast or override the derived colors with textColorDarkMode and/or backgroundColorDarkMode.\n }\n\nstyle-definition-dark-mode-text-canvas-contrast =\n Although style definition { $styleNumber } has a specified text color that provides sufficient contrast for light mode, the dark-mode text color derived from this value has insufficient contrast against the canvas ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; requires at least { $threshold }:1). { $suggestion ->\n [available] To ensure sufficient contrast in dark mode, either increase the light-mode contrast (e.g., set textColor="{ $lightColor }") or override the dark-mode color (e.g., set textColorDarkMode="{ $darkColor }").\n *[none] To ensure sufficient contrast in dark mode, increase the light-mode contrast or override the derived color with textColorDarkMode.\n }\n\nsection-multiple-style-palettes = A section can select only one <stylePalette>; using the last one.\n';
39405
+ 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# $reference is the reference exactly as the author wrote it, `$` and all —\n# the `$p.styleDescription[1]` of `<text extend="$p.styleDescription[1]" />`.\n# An index only means something applied to an array, and the thing named here\n# is not one. The reference is quoted back rather than explained because the\n# text in front of the author is the only part of this they can act on: the\n# state variable and component index the core knows about are its own business\n# and go to the console instead.\nreference-index-unavailable = Cannot reference index `{ $reference }`\n\n## `<callAction>`\n\n# $action is the `actionName` the author asked for, part of the DoenetML\n# language, so it stays in English. $reference is the `target` as written.\ncomponent-action-unavailable = Cannot call { $action } on component `{ $reference }`\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\n## Building components from the source\n\n# Raised while the source is being turned into components, by throwing rather\n# than by building a record: the thrower is caught, the component becomes an\n# `_error`, and the diagnostic is re-raised from it.\n\ncomponent-type-invalid = Invalid component type: `<{ $componentType }>`\n\nattribute-repeated = Cannot repeat attribute { $attribute }.\n\nattribute-invalid-for-component = Invalid attribute "{ $attribute }" for a component of type `<{ $componentType }>`.\n\n## Style definition contrast\n\n# $context names the pair being compared, $mode which colour scheme it was\n# rendered in. Both are symbolic — the phrase is chosen here so a translator\n# can rewrite it, rather than being handed over already in English.\nstyle-definition-insufficient-contrast =\n Style definition { $styleNumber } has insufficient contrast for { $context ->\n [text-on-background] text color against background color\n [high-contrast] high-contrast color against the canvas\n [line] line color against the canvas\n [marker] marker color against the canvas\n *[text-on-canvas] text color against the canvas\n }{ $mode ->\n [dark] { " (dark mode)" }\n *[light] { "" }\n } ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; requires at least { $threshold }:1).\n\n# $suggestion says whether a concrete replacement colour could be computed.\n# The attribute names and colour values in the `available` branch are\n# DoenetML source, not prose, and stay as they are in every language.\nstyle-definition-dark-mode-text-background-contrast =\n Although style definition { $styleNumber } has specified colors that provide sufficient contrast for light mode, the dark-mode colors derived from these values have insufficient contrast for the text color against the background color ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; requires at least { $threshold }:1). { $suggestion ->\n [available] To ensure sufficient contrast in dark mode, either increase the light-mode contrast (e.g., set { $lightAttribute }="{ $lightColor }") or override the dark-mode color (e.g., set { $darkAttribute }="{ $darkColor }").\n *[none] To ensure sufficient contrast in dark mode, increase the light-mode contrast or override the derived colors with textColorDarkMode and/or backgroundColorDarkMode.\n }\n\nstyle-definition-dark-mode-text-canvas-contrast =\n Although style definition { $styleNumber } has a specified text color that provides sufficient contrast for light mode, the dark-mode text color derived from this value has insufficient contrast against the canvas ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; requires at least { $threshold }:1). { $suggestion ->\n [available] To ensure sufficient contrast in dark mode, either increase the light-mode contrast (e.g., set textColor="{ $lightColor }") or override the dark-mode color (e.g., set textColorDarkMode="{ $darkColor }").\n *[none] To ensure sufficient contrast in dark mode, increase the light-mode contrast or override the derived color with textColorDarkMode.\n }\n\nsection-multiple-style-palettes = A section can select only one <stylePalette>; using the last one.\n\n## Unique variants\n\n# Explanations of why a component\'s unique variants could not be worked out.\n# $component is the tag that could not be analyzed and stays as written; the\n# reason is a separate message per situation, so a host can tell them apart by\n# code and a translator sees a whole sentence rather than a fragment.\n\nvariant-num-to-select-not-non-negative-integer = cannot determine unique variants of { $component } as numToSelect isn\'t a non-negative integer.\n\nvariant-num-to-select-not-constant-number = cannot determine unique variants of { $component } as numToSelect isn\'t constant number.\n\nvariant-with-replacement-not-constant-boolean = cannot determine unique variants of { $component } as withReplacement isn\'t constant boolean.\n\nvariant-select-weight-disables-unique = Unique variants for select disabled if have an option with selectWeight or selectForVariants specified\n\nvariant-coprime-undetermined = cannot determine unique variants of { $component } as cannot determine coprime is always false.\n\n# $attribute is an attribute name (`from`, `to`, `step`, `sort`, `length`) and\n# stays as written.\nvariant-attribute-not-constant = cannot determine unique variants of { $component } as { $attribute } isn\'t a constant.\n\nvariant-attribute-not-number = cannot determine unique variants of { $component } as { $attribute } isn\'t a number.\n\n# $type is the sequence type the component was declared with. $expected names\n# what the value had to be, symbolically, because which one applies depends on\n# both the type and the attribute.\nvariant-attribute-wrong-type-for-sequence =\n cannot determine unique variants of { $component } of { $type } type as { $attribute } isn\'t { $expected ->\n [letters-combination] a combination of letters\n [math-expression] a valid math expression\n [integer] an integer\n *[number] a number\n }.\n\nvariant-length-not-integer = cannot determine unique variants of { $component } as length isn\'t an integer.\n\nvariant-sort-not-implemented = have not implemented unique variants of a { $component } with sort\n\nvariant-exclude-combinations-not-implemented = have not implemented unique variants of a { $component } with excludeCombinations\n\nvariant-math-exclude-not-implemented = have not implemented unique variants of a { $component } of type math with exclude\n\nvariant-non-constant-exclude-not-implemented = have not implemented unique variants of a { $component } with non-constant exclude\n\n## PreFigure conversion\n\n# $subject identifies the component the warning is about, already written as\n# `<tag>` or `<tag> (name)`. It is composed in code rather than here because\n# Fluent terms cannot take a variable as an argument, so a shared subject\n# fragment cannot be parameterized from the catalog. It holds only a tag name,\n# a component name and punctuation — never a word — which is why a descendant\n# with no type reads `<?>` rather than `<unknown>`.\n\nprefigure-descendant-unsupported = { $subject }: unsupported in graph prefigure renderer; descendant skipped.\n\nprefigure-descendant-invalid-geometry = { $subject }: non-finite or incomplete geometry; descendant skipped.\n\nprefigure-curve-label-omitted = { $subject }: labels are not supported on converted curve elements; label omitted.\n\nprefigure-curve-unsupported-definition-type = { $subject }: unsupported curve function definition type \'{ $definitionType }\'; descendant skipped.\n\nprefigure-region-flip-functions-unsupported = { $subject }: unsupported flipFunctions attribute on regionBetweenCurves; descendant skipped.\n\nprefigure-region-non-formula-child = { $subject }: only formula-typed child functions are supported on regionBetweenCurves; descendant skipped.\n\n# $labelKind says which family of object carried the label, since the advice\n# is the same but the object is not.\nprefigure-label-position-unsupported =\n { $subject }: unsupported labelPosition \'{ $labelPosition }\' for { $labelKind ->\n [line-family] line-family label\n *[point] point label\n }; default PreFigure alignment used.\n\nprefigure-fill-style-unsupported = { $subject }: fill style \'{ $fillStyle }\' is unsupported by PreFigure; falling back to a solid fill.\n\nprefigure-line-style-unknown = { $subject }: unknown line style \'{ $lineStyle }\' omitted from PreFigure output.\n\nprefigure-marker-style-mapped-to-diamond = { $subject }: marker style \'{ $markerStyle }\' mapped to PreFigure style \'diamond\'.\n\nprefigure-marker-style-unsupported = { $subject }: marker style \'{ $markerStyle }\' is unsupported by PreFigure; default style used.\n\n## PreFigure annotations\n\nannotation-ref-unresolvable = `<annotation>`: invalid `ref`; cannot resolve target. Annotation omitted.\n\nannotation-ref-multiple-targets = `<annotation>`: `ref` resolved to multiple targets; using the first target.\n\nannotation-ref-outside-graph = `<annotation>`: invalid `ref`; target is outside the containing graph. Annotation omitted.\n\nannotation-ref-unsupported-target = `<annotation>`: invalid `ref`; target is not a supported graphical object in prefigure conversion. Annotation omitted.\n\nannotation-text-missing = `<annotation>`: missing or empty `text`; emitting empty text.\n';
39406
39406
  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";
39407
39407
  const CATALOG_NAMESPACES = [
39408
39408
  "chrome",
@@ -39762,7 +39762,7 @@ function normalizeLocaleTag(tag2) {
39762
39762
  }
39763
39763
  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";
39764
39764
  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";
39765
- 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\n## Construcción de componentes a partir del código fuente\n\ncomponent-type-invalid = Tipo de componente no válido: `<{ $componentType }>`\n\nattribute-repeated = No se puede repetir el atributo { $attribute }.\n\nattribute-invalid-for-component = Atributo "{ $attribute }" no válido para un componente de tipo `<{ $componentType }>`.\n\n## Contraste de las definiciones de estilo\n\nstyle-definition-insufficient-contrast =\n La definición de estilo { $styleNumber } no tiene suficiente contraste para { $context ->\n [text-on-background] el color del texto sobre el color de fondo\n [high-contrast] el color de alto contraste sobre el lienzo\n [line] el color de las líneas sobre el lienzo\n [marker] el color de los marcadores sobre el lienzo\n *[text-on-canvas] el color del texto sobre el lienzo\n }{ $mode ->\n [dark] { " (modo oscuro)" }\n *[light] { "" }\n } ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; se requiere al menos { $threshold }:1).\n\nstyle-definition-dark-mode-text-background-contrast =\n Aunque la definición de estilo { $styleNumber } especifica colores con suficiente contraste en modo claro, los colores de modo oscuro derivados de esos valores no tienen suficiente contraste entre el color del texto y el color de fondo ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; se requiere al menos { $threshold }:1). { $suggestion ->\n [available] Para lograr suficiente contraste en modo oscuro, aumenta el contraste en modo claro (por ejemplo, con { $lightAttribute }="{ $lightColor }") o define el color de modo oscuro (por ejemplo, con { $darkAttribute }="{ $darkColor }").\n *[none] Para lograr suficiente contraste en modo oscuro, aumenta el contraste en modo claro o sustituye los colores derivados mediante textColorDarkMode o backgroundColorDarkMode.\n }\n\nstyle-definition-dark-mode-text-canvas-contrast =\n Aunque la definición de estilo { $styleNumber } especifica un color de texto con suficiente contraste en modo claro, el color de texto de modo oscuro derivado de ese valor no tiene suficiente contraste sobre el lienzo ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; se requiere al menos { $threshold }:1). { $suggestion ->\n [available] Para lograr suficiente contraste en modo oscuro, aumenta el contraste en modo claro (por ejemplo, con textColor="{ $lightColor }") o define el color de modo oscuro (por ejemplo, con textColorDarkMode="{ $darkColor }").\n *[none] Para lograr suficiente contraste en modo oscuro, aumenta el contraste en modo claro o sustituye el color derivado mediante textColorDarkMode.\n }\n\nsection-multiple-style-palettes = Una sección solo puede seleccionar un <stylePalette>; se usará el último.\n';
39765
+ 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\nreference-index-unavailable = No se puede referenciar el índice `{ $reference }`\n\n## `<callAction>`\n\ncomponent-action-unavailable = No se puede llamar a { $action } en el componente `{ $reference }`\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\n## Construcción de componentes a partir del código fuente\n\ncomponent-type-invalid = Tipo de componente no válido: `<{ $componentType }>`\n\nattribute-repeated = No se puede repetir el atributo { $attribute }.\n\nattribute-invalid-for-component = Atributo "{ $attribute }" no válido para un componente de tipo `<{ $componentType }>`.\n\n## Contraste de las definiciones de estilo\n\nstyle-definition-insufficient-contrast =\n La definición de estilo { $styleNumber } no tiene suficiente contraste para { $context ->\n [text-on-background] el color del texto sobre el color de fondo\n [high-contrast] el color de alto contraste sobre el lienzo\n [line] el color de las líneas sobre el lienzo\n [marker] el color de los marcadores sobre el lienzo\n *[text-on-canvas] el color del texto sobre el lienzo\n }{ $mode ->\n [dark] { " (modo oscuro)" }\n *[light] { "" }\n } ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; se requiere al menos { $threshold }:1).\n\nstyle-definition-dark-mode-text-background-contrast =\n Aunque la definición de estilo { $styleNumber } especifica colores con suficiente contraste en modo claro, los colores de modo oscuro derivados de esos valores no tienen suficiente contraste entre el color del texto y el color de fondo ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; se requiere al menos { $threshold }:1). { $suggestion ->\n [available] Para lograr suficiente contraste en modo oscuro, aumenta el contraste en modo claro (por ejemplo, con { $lightAttribute }="{ $lightColor }") o define el color de modo oscuro (por ejemplo, con { $darkAttribute }="{ $darkColor }").\n *[none] Para lograr suficiente contraste en modo oscuro, aumenta el contraste en modo claro o sustituye los colores derivados mediante textColorDarkMode o backgroundColorDarkMode.\n }\n\nstyle-definition-dark-mode-text-canvas-contrast =\n Aunque la definición de estilo { $styleNumber } especifica un color de texto con suficiente contraste en modo claro, el color de texto de modo oscuro derivado de ese valor no tiene suficiente contraste sobre el lienzo ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; se requiere al menos { $threshold }:1). { $suggestion ->\n [available] Para lograr suficiente contraste en modo oscuro, aumenta el contraste en modo claro (por ejemplo, con textColor="{ $lightColor }") o define el color de modo oscuro (por ejemplo, con textColorDarkMode="{ $darkColor }").\n *[none] Para lograr suficiente contraste en modo oscuro, aumenta el contraste en modo claro o sustituye el color derivado mediante textColorDarkMode.\n }\n\nsection-multiple-style-palettes = Una sección solo puede seleccionar un <stylePalette>; se usará el último.\n\n## Variantes únicas\n\nvariant-num-to-select-not-non-negative-integer = no se pueden determinar las variantes únicas de { $component } porque numToSelect no es un entero no negativo.\n\nvariant-num-to-select-not-constant-number = no se pueden determinar las variantes únicas de { $component } porque numToSelect no es un número constante.\n\nvariant-with-replacement-not-constant-boolean = no se pueden determinar las variantes únicas de { $component } porque withReplacement no es un booleano constante.\n\nvariant-select-weight-disables-unique = Las variantes únicas quedan desactivadas en select si alguna opción especifica selectWeight o selectForVariants\n\nvariant-coprime-undetermined = no se pueden determinar las variantes únicas de { $component } porque no se puede determinar si coprime es siempre falso.\n\nvariant-attribute-not-constant = no se pueden determinar las variantes únicas de { $component } porque { $attribute } no es constante.\n\nvariant-attribute-not-number = no se pueden determinar las variantes únicas de { $component } porque { $attribute } no es un número.\n\nvariant-attribute-wrong-type-for-sequence =\n no se pueden determinar las variantes únicas de { $component } de tipo { $type } porque { $attribute } no es { $expected ->\n [letters-combination] una combinación de letras\n [math-expression] una expresión matemática válida\n [integer] un entero\n *[number] un número\n }.\n\nvariant-length-not-integer = no se pueden determinar las variantes únicas de { $component } porque length no es un entero.\n\nvariant-sort-not-implemented = no se han implementado las variantes únicas de un { $component } con sort\n\nvariant-exclude-combinations-not-implemented = no se han implementado las variantes únicas de un { $component } con excludeCombinations\n\nvariant-math-exclude-not-implemented = no se han implementado las variantes únicas de un { $component } de tipo math con exclude\n\nvariant-non-constant-exclude-not-implemented = no se han implementado las variantes únicas de un { $component } con exclude no constante\n\n## Conversión a PreFigure\n\nprefigure-descendant-unsupported = { $subject }: no se admite en el renderizador prefigure de gráficos; se omite el descendiente.\n\nprefigure-descendant-invalid-geometry = { $subject }: geometría no finita o incompleta; se omite el descendiente.\n\nprefigure-curve-label-omitted = { $subject }: las etiquetas no se admiten en los elementos de curva convertidos; se omite la etiqueta.\n\nprefigure-curve-unsupported-definition-type = { $subject }: tipo de definición de función de curva no admitido \'{ $definitionType }\'; se omite el descendiente.\n\nprefigure-region-flip-functions-unsupported = { $subject }: atributo flipFunctions no admitido en regionBetweenCurves; se omite el descendiente.\n\nprefigure-region-non-formula-child = { $subject }: en regionBetweenCurves solo se admiten funciones hijas de tipo fórmula; se omite el descendiente.\n\nprefigure-label-position-unsupported =\n { $subject }: labelPosition \'{ $labelPosition }\' no admitido para { $labelKind ->\n [line-family] una etiqueta de la familia de líneas\n *[point] una etiqueta de punto\n }; se usa la alineación predeterminada de PreFigure.\n\nprefigure-fill-style-unsupported = { $subject }: PreFigure no admite el estilo de relleno \'{ $fillStyle }\'; se usa un relleno sólido.\n\nprefigure-line-style-unknown = { $subject }: estilo de línea desconocido \'{ $lineStyle }\'; se omite de la salida de PreFigure.\n\nprefigure-marker-style-mapped-to-diamond = { $subject }: el estilo de marcador \'{ $markerStyle }\' se asigna al estilo \'diamond\' de PreFigure.\n\nprefigure-marker-style-unsupported = { $subject }: PreFigure no admite el estilo de marcador \'{ $markerStyle }\'; se usa el estilo predeterminado.\n\n## Anotaciones de PreFigure\n\nannotation-ref-unresolvable = `<annotation>`: `ref` no válido; no se puede resolver el destino. Se omite la anotación.\n\nannotation-ref-multiple-targets = `<annotation>`: `ref` se resolvió a varios destinos; se usa el primero.\n\nannotation-ref-outside-graph = `<annotation>`: `ref` no válido; el destino está fuera del gráfico que lo contiene. Se omite la anotación.\n\nannotation-ref-unsupported-target = `<annotation>`: `ref` no válido; el destino no es un objeto gráfico admitido en la conversión a prefigure. Se omite la anotación.\n\nannotation-text-missing = `<annotation>`: falta `text` o está vacío; se emite texto vacío.\n';
39766
39766
  const BUNDLED_TRANSLATIONS = {
39767
39767
  es: {
39768
39768
  chrome: esChrome,
@@ -39826,6 +39826,19 @@ const DIAGNOSTIC_CODES = {
39826
39826
  "doenet-i0019": "prefigure-annotations-not-rendered",
39827
39827
  "doenet-i0020": "multiple-annotations-children",
39828
39828
  "doenet-i0021": "attribute-invalid-values",
39829
+ "doenet-i0022": "variant-num-to-select-not-non-negative-integer",
39830
+ "doenet-i0023": "variant-num-to-select-not-constant-number",
39831
+ "doenet-i0024": "variant-with-replacement-not-constant-boolean",
39832
+ "doenet-i0025": "variant-select-weight-disables-unique",
39833
+ "doenet-i0026": "variant-coprime-undetermined",
39834
+ "doenet-i0027": "variant-attribute-not-constant",
39835
+ "doenet-i0028": "variant-attribute-not-number",
39836
+ "doenet-i0029": "variant-attribute-wrong-type-for-sequence",
39837
+ "doenet-i0030": "variant-length-not-integer",
39838
+ "doenet-i0031": "variant-sort-not-implemented",
39839
+ "doenet-i0032": "variant-exclude-combinations-not-implemented",
39840
+ "doenet-i0033": "variant-math-exclude-not-implemented",
39841
+ "doenet-i0034": "variant-non-constant-exclude-not-implemented",
39829
39842
  "doenet-w0001": "line-points-undetermined-dimensions",
39830
39843
  "doenet-w0002": "line-points-too-few-dimensions",
39831
39844
  "doenet-w0003": "line-points-depend-on-variables",
@@ -39909,6 +39922,24 @@ const DIAGNOSTIC_CODES = {
39909
39922
  "doenet-w0081": "nested-section-wide-check-work-max-num-attempts",
39910
39923
  "doenet-w0082": "math-input-invalid-function-names",
39911
39924
  "doenet-w0083": "section-multiple-style-palettes",
39925
+ "doenet-w0084": "prefigure-descendant-unsupported",
39926
+ "doenet-w0085": "prefigure-descendant-invalid-geometry",
39927
+ "doenet-w0086": "prefigure-curve-label-omitted",
39928
+ "doenet-w0087": "prefigure-curve-unsupported-definition-type",
39929
+ "doenet-w0088": "prefigure-region-flip-functions-unsupported",
39930
+ "doenet-w0089": "prefigure-region-non-formula-child",
39931
+ "doenet-w0090": "prefigure-label-position-unsupported",
39932
+ "doenet-w0091": "prefigure-fill-style-unsupported",
39933
+ "doenet-w0092": "prefigure-line-style-unknown",
39934
+ "doenet-w0093": "prefigure-marker-style-mapped-to-diamond",
39935
+ "doenet-w0094": "prefigure-marker-style-unsupported",
39936
+ "doenet-w0095": "annotation-ref-unresolvable",
39937
+ "doenet-w0096": "annotation-ref-multiple-targets",
39938
+ "doenet-w0097": "annotation-ref-outside-graph",
39939
+ "doenet-w0098": "annotation-ref-unsupported-target",
39940
+ "doenet-w0099": "annotation-text-missing",
39941
+ "doenet-w0100": "reference-index-unavailable",
39942
+ "doenet-w0102": "component-action-unavailable",
39912
39943
  "doenet-e0001": "pretzel-circuit-first-problem-distractor",
39913
39944
  "doenet-e0002": "component-type-invalid",
39914
39945
  "doenet-e0003": "attribute-repeated",
@@ -44222,7 +44253,7 @@ async function cidFromArrayBuffer(data) {
44222
44253
  await crypto.subtle.digest("SHA-256", new Uint8Array());
44223
44254
  digest = (data2) => crypto.subtle.digest("SHA-256", data2);
44224
44255
  } catch (e22) {
44225
- const sha256 = (await import("./sha256-AuWkkb03-Jj_6adih-B5k5eFO5.js").then((n2) => n2.s)).default;
44256
+ const sha256 = (await import("./sha256-AuWkkb03-CU-I2iKi-DM1OqGoJ.js").then((n2) => n2.s)).default;
44226
44257
  digest = (data2) => sha256(data2, {
44227
44258
  asBytes: true
44228
44259
  });
@@ -47340,7 +47371,11 @@ function extractConstantSortAttribute(serializedComponent, componentName, numToS
47340
47371
  } else {
47341
47372
  pushVariantInfo(
47342
47373
  infoDiagnostics,
47343
- `cannot determine unique variants of ${componentName} as sort isn't a constant.`,
47374
+ {
47375
+ code: "doenet-i0027",
47376
+ component: componentName,
47377
+ args: { attribute: "sort" }
47378
+ },
47344
47379
  serializedComponent
47345
47380
  );
47346
47381
  return { success: false };
@@ -47351,23 +47386,30 @@ function extractConstantSortAttribute(serializedComponent, componentName, numToS
47351
47386
  if (sort !== "unsorted" && numToSelect > 1) {
47352
47387
  pushVariantInfo(
47353
47388
  infoDiagnostics,
47354
- `have not implemented unique variants of a ${componentName} with sort`,
47389
+ { code: "doenet-i0031", component: componentName },
47355
47390
  serializedComponent
47356
47391
  );
47357
47392
  return { success: false };
47358
47393
  }
47359
47394
  return { success: true, sort };
47360
47395
  }
47361
- function pushVariantInfo(infoDiagnostics, message, serializedComponent) {
47396
+ function pushVariantInfo(infoDiagnostics, {
47397
+ code,
47398
+ component,
47399
+ args
47400
+ }, serializedComponent) {
47362
47401
  if (!infoDiagnostics) {
47363
47402
  return;
47364
47403
  }
47365
- infoDiagnostics.push({
47366
- type: "info",
47367
- message,
47368
- position: serializedComponent?.position,
47369
- sourceDoc: serializedComponent?.sourceDoc
47370
- });
47404
+ infoDiagnostics.push(
47405
+ codedDiagnostic({
47406
+ type: "info",
47407
+ code,
47408
+ args: component === void 0 ? args : { component, ...args ?? {} },
47409
+ position: serializedComponent?.position,
47410
+ sourceDoc: serializedComponent?.sourceDoc
47411
+ })
47412
+ );
47371
47413
  }
47372
47414
  var appliedFunctionSymbolsDefault = [
47373
47415
  "abs",
@@ -48399,6 +48441,18 @@ function getSourceLocationForComponent(component, components) {
48399
48441
  }
48400
48442
  return { position: position2, sourceDoc };
48401
48443
  }
48444
+ function doenetMLStringForReference(originalPath, allDoenetMLs) {
48445
+ if (!originalPath || originalPath.length === 0) {
48446
+ return "";
48447
+ }
48448
+ const startOffset = originalPath[0].position?.start.offset;
48449
+ const endOffset = originalPath[originalPath.length - 1].position?.end.offset;
48450
+ const sourceDoc = originalPath[0].sourceDoc ?? 0;
48451
+ if (startOffset == void 0 || endOffset == void 0) {
48452
+ return "";
48453
+ }
48454
+ return allDoenetMLs?.[sourceDoc]?.substring(startOffset, endOffset) ?? "";
48455
+ }
48402
48456
  const TAG_NAME_REGEX = /^[A-Za-z0-9_:-]+/;
48403
48457
  function narrowPositionToOpeningTag(position2, source) {
48404
48458
  if (!position2 || !source) {
@@ -48424,6 +48478,9 @@ function narrowPositionToOpeningTag(position2, source) {
48424
48478
  }
48425
48479
  };
48426
48480
  }
48481
+ function reportInternalError(message) {
48482
+ console.warn(`DoenetML internal: ${message}`);
48483
+ }
48427
48484
  class DiagnosticError extends Error {
48428
48485
  constructor({
48429
48486
  code,
@@ -53043,18 +53100,13 @@ function defaultReturnEntryDimensions() {
53043
53100
  return 0;
53044
53101
  }
53045
53102
  function multiDimSetArrayValue({ value, arrayKey, arraySize: arraySize2, arrayValues = this.arrayValues }) {
53046
- const component = this.svComponent;
53047
- const addDiagnostic = component.coreFunctions.addDiagnostic;
53048
53103
  const numDimensions = this.numDimensions;
53049
53104
  let index2 = this.keyToIndex(arrayKey);
53050
53105
  let numDimensionsInArrayKey = index2.length;
53051
53106
  if (numDimensionsInArrayKey > numDimensions) {
53052
- addDiagnostic({
53053
- type: "info",
53054
- message: "Cannot set array value. Number of dimensions is too large.",
53055
- position: component.position,
53056
- sourceDoc: component.sourceDoc
53057
- });
53107
+ reportInternalError(
53108
+ "Cannot set array value. Number of dimensions is too large."
53109
+ );
53058
53110
  return { nFailures: 1 };
53059
53111
  }
53060
53112
  let arrayValuesDrillDown = arrayValues;
@@ -53067,12 +53119,7 @@ function multiDimSetArrayValue({ value, arrayKey, arraySize: arraySize2, arrayVa
53067
53119
  arrayValuesDrillDown = arrayValuesDrillDown[indComponent];
53068
53120
  arraySizeDrillDown = arraySizeDrillDown.slice(1);
53069
53121
  } else {
53070
- addDiagnostic({
53071
- type: "info",
53072
- message: "ignore setting array value out of bounds",
53073
- position: component.position,
53074
- sourceDoc: component.sourceDoc
53075
- });
53122
+ reportInternalError("ignore setting array value out of bounds");
53076
53123
  return { nFailures: 1 };
53077
53124
  }
53078
53125
  }
@@ -53080,23 +53127,15 @@ function multiDimSetArrayValue({ value, arrayKey, arraySize: arraySize2, arrayVa
53080
53127
  if (numDimensionsInArrayKey < numDimensions) {
53081
53128
  let setArrayValuesPiece = function(desiredValue, arrayValuesPiece, arraySizePiece) {
53082
53129
  if (!Array.isArray(desiredValue)) {
53083
- addDiagnostic({
53084
- type: "info",
53085
- message: "ignoring array values with insufficient dimensions",
53086
- position: component.position,
53087
- sourceDoc: component.sourceDoc
53088
- });
53130
+ reportInternalError(
53131
+ "ignoring array values with insufficient dimensions"
53132
+ );
53089
53133
  return { nFailures: 1 };
53090
53134
  }
53091
53135
  let nFailuresSub = 0;
53092
53136
  let currentSize = arraySizePiece[0];
53093
53137
  if (desiredValue.length > currentSize) {
53094
- addDiagnostic({
53095
- type: "info",
53096
- message: "ignoring array values out of bounds",
53097
- position: component.position,
53098
- sourceDoc: component.sourceDoc
53099
- });
53138
+ reportInternalError("ignoring array values out of bounds");
53100
53139
  nFailuresSub += desiredValue.length - currentSize;
53101
53140
  desiredValue = desiredValue.slice(0, currentSize);
53102
53141
  }
@@ -53136,13 +53175,9 @@ function oneDimSetArrayValue({ value, arrayKey, arraySize: arraySize2, arrayValu
53136
53175
  arrayValues[ind] = value;
53137
53176
  return { nFailures: 0 };
53138
53177
  } else {
53139
- const component = this.svComponent;
53140
- component.coreFunctions.addDiagnostic({
53141
- type: "info",
53142
- message: `Ignoring setting array values out of bounds: ${arrayKey} of ${this.svVarName}`,
53143
- position: component.position,
53144
- sourceDoc: component.sourceDoc
53145
- });
53178
+ reportInternalError(
53179
+ `Ignoring setting array values out of bounds: ${arrayKey} of ${this.svVarName}`
53180
+ );
53146
53181
  return { nFailures: 1 };
53147
53182
  }
53148
53183
  }
@@ -54145,8 +54180,25 @@ async function arrayEntryNamesFromPropIndex({
54145
54180
  core: core2,
54146
54181
  stateVariables,
54147
54182
  component,
54148
- propIndex
54183
+ propIndex,
54184
+ reference
54149
54185
  }) {
54186
+ function reportPropIndexFailure(varName, detail) {
54187
+ reportInternalError(
54188
+ `Cannot get propIndex from ${varName} of ${component.componentIdx}${detail}`
54189
+ );
54190
+ if (reference) {
54191
+ core2.addDiagnostic(
54192
+ codedDiagnostic({
54193
+ type: "warning",
54194
+ code: "doenet-w0100",
54195
+ args: { reference: reference.text },
54196
+ position: reference.position,
54197
+ sourceDoc: reference.sourceDoc
54198
+ })
54199
+ );
54200
+ }
54201
+ }
54150
54202
  let newVarNames = [];
54151
54203
  for (let varName of stateVariables) {
54152
54204
  let stateVarObj = component.state[varName];
@@ -54174,23 +54226,16 @@ async function arrayEntryNamesFromPropIndex({
54174
54226
  varName
54175
54227
  );
54176
54228
  } else {
54177
- core2.addDiagnostic({
54178
- type: "warning",
54179
- message: `Cannot get propIndex from ${varName} of ${component.componentIdx} as it is not an array or array entry state variable`,
54180
- position: component.position,
54181
- sourceDoc: component.sourceDoc
54182
- });
54229
+ reportPropIndexFailure(
54230
+ varName,
54231
+ " as it is not an array or array entry state variable"
54232
+ );
54183
54233
  newName = varName;
54184
54234
  }
54185
54235
  if (newName) {
54186
54236
  newVarNames.push(newName);
54187
54237
  } else {
54188
- core2.addDiagnostic({
54189
- type: "warning",
54190
- message: `Cannot get propIndex from ${varName} of ${component.componentIdx}`,
54191
- position: component.position,
54192
- sourceDoc: component.sourceDoc
54193
- });
54238
+ reportPropIndexFailure(varName, "");
54194
54239
  newVarNames.push(varName);
54195
54240
  }
54196
54241
  }
@@ -55308,10 +55353,9 @@ async function addComponents({
55308
55353
  if (!initialAdd) {
55309
55354
  parent = core2._components[parentIdx];
55310
55355
  if (!parent) {
55311
- core2.addDiagnostic({
55312
- type: "warning",
55313
- message: `Cannot add children to parent ${parentIdx} as ${parentIdx} does not exist`
55314
- });
55356
+ reportInternalError(
55357
+ `Cannot add children to parent ${parentIdx} as ${parentIdx} does not exist`
55358
+ );
55315
55359
  return [];
55316
55360
  }
55317
55361
  ancestors = ancestorsForChild(parent);
@@ -56805,11 +56849,22 @@ const _Dependency = class _Dependency2 {
56805
56849
  mappedVarNames = convertedVarNames;
56806
56850
  }
56807
56851
  if (this.propIndex !== void 0) {
56852
+ const referringComponent = this.dependencyHandler.core._components[this.upstreamComponentIdx];
56853
+ const referenceText = doenetMLStringForReference(
56854
+ referringComponent?.refResolution?.originalPath,
56855
+ this.dependencyHandler.core.allDoenetMLs
56856
+ );
56808
56857
  mappedVarNames = await arrayEntryNamesFromPropIndex({
56809
56858
  core: this.dependencyHandler.core,
56810
56859
  stateVariables: mappedVarNames,
56811
56860
  component: downComponent,
56812
- propIndex: this.propIndex
56861
+ propIndex: this.propIndex,
56862
+ reference: referenceText ? {
56863
+ text: `$${referenceText}`,
56864
+ // Marked where the index was written.
56865
+ position: referringComponent.position,
56866
+ sourceDoc: referringComponent.sourceDoc
56867
+ } : void 0
56813
56868
  });
56814
56869
  }
56815
56870
  let downVarNames = mappedVarNames;
@@ -59952,17 +60007,10 @@ const _RefResolutionDependency = class _RefResolutionDependency2 extends Depende
59952
60007
  ]);
59953
60008
  }
59954
60009
  let refResolution;
59955
- const getDoenetMLStringForReference = () => {
59956
- const originalPath = composite.refResolution.originalPath;
59957
- const startOffset = originalPath[0].position?.start.offset;
59958
- const endOffset = originalPath[originalPath.length - 1].position?.end.offset;
59959
- const sourceDoc = originalPath[0].sourceDoc ?? 0;
59960
- let doenetMLString = "";
59961
- if (startOffset != void 0 && endOffset != void 0) {
59962
- doenetMLString = this.dependencyHandler.core.allDoenetMLs?.[sourceDoc]?.substring(startOffset, endOffset) ?? "";
59963
- }
59964
- return doenetMLString;
59965
- };
60010
+ const getDoenetMLStringForReference = () => doenetMLStringForReference(
60011
+ composite.refResolution.originalPath,
60012
+ this.dependencyHandler.core.allDoenetMLs
60013
+ );
59966
60014
  const skip_parent_search = resolveComponentResult.path[0].name === "";
59967
60015
  try {
59968
60016
  refResolution = this.dependencyHandler.core.resolvePath(
@@ -65969,21 +66017,15 @@ class EssentialValueWriter {
65969
66017
  continue;
65970
66018
  }
65971
66019
  }
65972
- this.core.addDiagnostic({
65973
- type: "info",
65974
- message: `can't update state variable ${vName} of component ${cIdx}, as it doesn't exist.`,
65975
- position: this.core._components[cIdx].position,
65976
- sourceDoc: this.core._components[cIdx].sourceDoc
65977
- });
66020
+ reportInternalError(
66021
+ `can't update state variable ${vName} of component ${cIdx}, as it doesn't exist.`
66022
+ );
65978
66023
  continue;
65979
66024
  }
65980
66025
  if (!compStateObj.hasEssential) {
65981
- this.core.addDiagnostic({
65982
- type: "info",
65983
- message: `can't update state variable ${vName} of component ${cIdx}, as it does not have an essential state variable.`,
65984
- position: this.core._components[cIdx].position,
65985
- sourceDoc: this.core._components[cIdx].sourceDoc
65986
- });
66026
+ reportInternalError(
66027
+ `can't update state variable ${vName} of component ${cIdx}, as it does not have an essential state variable.`
66028
+ );
65987
66029
  continue;
65988
66030
  }
65989
66031
  let essentialVarName = vName;
@@ -66204,51 +66246,36 @@ class EssentialValueWriter {
66204
66246
  if (!stateVarObj.additionalStateVariablesDefined.includes(
66205
66247
  varName2
66206
66248
  )) {
66207
- this.core.addDiagnostic({
66208
- type: "info",
66209
- message: `Can't invert ${varName2} at the same time as ${stateVariable}, as not an additional state variable defined`,
66210
- position: component.position,
66211
- sourceDoc: component.sourceDoc
66212
- });
66249
+ reportInternalError(
66250
+ `Can't invert ${varName2} at the same time as ${stateVariable}, as not an additional state variable defined`
66251
+ );
66213
66252
  continue;
66214
66253
  }
66215
66254
  inverseDefinitionArgs.desiredStateVariableValues[varName2] = instruction.additionalStateVariableValues[varName2];
66216
66255
  }
66217
66256
  }
66218
66257
  if (!stateVarObj.inverseDefinition) {
66219
- this.core.addDiagnostic({
66220
- type: "info",
66221
- message: `Cannot change state variable ${stateVariable} of ${component.componentIdx} as it doesn't have an inverse definition`,
66222
- position: component.position,
66223
- sourceDoc: component.sourceDoc
66224
- });
66258
+ reportInternalError(
66259
+ `Cannot change state variable ${stateVariable} of ${component.componentIdx} as it doesn't have an inverse definition`
66260
+ );
66225
66261
  return;
66226
66262
  }
66227
66263
  if (!instruction.overrideFixed && !stateVarObj.ignoreFixed && await component.stateValues.fixed) {
66228
- this.core.addDiagnostic({
66229
- type: "info",
66230
- message: `Changing ${stateVariable} of ${component.componentIdx} did not succeed because fixed is true.`,
66231
- position: component.position,
66232
- sourceDoc: component.sourceDoc
66233
- });
66264
+ reportInternalError(
66265
+ `Changing ${stateVariable} of ${component.componentIdx} did not succeed because fixed is true.`
66266
+ );
66234
66267
  return;
66235
66268
  }
66236
66269
  if (!instruction.overrideFixed && stateVarObj.isLocation && await component.stateValues.fixLocation) {
66237
- this.core.addDiagnostic({
66238
- type: "info",
66239
- message: `Changing ${stateVariable} of ${component.componentIdx} did not succeed because fixLocation is true.`,
66240
- position: component.position,
66241
- sourceDoc: component.sourceDoc
66242
- });
66270
+ reportInternalError(
66271
+ `Changing ${stateVariable} of ${component.componentIdx} did not succeed because fixLocation is true.`
66272
+ );
66243
66273
  return;
66244
66274
  }
66245
66275
  if (!(initialChange || await component.stateValues.modifyIndirectly !== false)) {
66246
- this.core.addDiagnostic({
66247
- type: "info",
66248
- message: `Changing ${stateVariable} of ${component.componentIdx} did not succeed because modifyIndirectly is false.`,
66249
- position: component.position,
66250
- sourceDoc: component.sourceDoc
66251
- });
66276
+ reportInternalError(
66277
+ `Changing ${stateVariable} of ${component.componentIdx} did not succeed because modifyIndirectly is false.`
66278
+ );
66252
66279
  return;
66253
66280
  }
66254
66281
  let inverseResult = await stateVarObj.inverseDefinition(
@@ -66432,21 +66459,15 @@ class EssentialValueWriter {
66432
66459
  while (baseComponent.shadows && (baseComponent.shadows.propVariable === void 0 || baseComponent.doenetAttributes.fromImplicitProp && this.core._components[baseComponent.shadows.componentIdx].constructor.implicitPropReturnsSameType)) {
66433
66460
  baseComponent = this.core._components[baseComponent.shadows.componentIdx];
66434
66461
  if (!instruction.overrideFixed && !stateVarObj.ignoreFixed && await baseComponent.stateValues.fixed) {
66435
- this.core.addDiagnostic({
66436
- type: "info",
66437
- message: `Changing ${stateVariable} of ${baseComponent.componentIdx} did not succeed because fixed is true.`,
66438
- position: baseComponent.position,
66439
- sourceDoc: baseComponent.sourceDoc
66440
- });
66462
+ reportInternalError(
66463
+ `Changing ${stateVariable} of ${baseComponent.componentIdx} did not succeed because fixed is true.`
66464
+ );
66441
66465
  return;
66442
66466
  }
66443
66467
  if (!instruction.overrideFixed && !stateVarObj.isLocation && await baseComponent.stateValues.fixLocation) {
66444
- this.core.addDiagnostic({
66445
- type: "info",
66446
- message: `Changing ${stateVariable} of ${baseComponent.componentIdx} did not succeed because fixLocation is true.`,
66447
- position: baseComponent.position,
66448
- sourceDoc: baseComponent.sourceDoc
66449
- });
66468
+ reportInternalError(
66469
+ `Changing ${stateVariable} of ${baseComponent.componentIdx} did not succeed because fixLocation is true.`
66470
+ );
66450
66471
  return;
66451
66472
  }
66452
66473
  }
@@ -66580,24 +66601,18 @@ class EssentialValueWriter {
66580
66601
  "stateVariable",
66581
66602
  "parentStateVariable"
66582
66603
  ].includes(dep2.dependencyType) && dep2.downstreamComponentIndices.length === 1)) {
66583
- this.core.addDiagnostic({
66584
- type: "info",
66585
- message: `Can't simultaneously set additional dependency value ${dependencyName2} if it isn't a state variable`,
66586
- position: this.core._components[dComponentIdx].position,
66587
- sourceDoc: this.core._components[dComponentIdx].sourceDoc
66588
- });
66604
+ reportInternalError(
66605
+ `Can't simultaneously set additional dependency value ${dependencyName2} if it isn't a state variable`
66606
+ );
66589
66607
  continue;
66590
66608
  }
66591
66609
  let varName2 = dep2.mappedDownstreamVariableNamesByComponent[0][0];
66592
66610
  if (dep2.downstreamComponentIndices[0] !== dComponentIdx || !stateVarObj2.additionalStateVariablesDefined.includes(
66593
66611
  varName2
66594
66612
  )) {
66595
- this.core.addDiagnostic({
66596
- type: "info",
66597
- message: `Can't simultaneously set additional dependency value ${dependencyName2} if it doesn't correspond to additional state variable defined of ${dependencyName}'s state variable`,
66598
- position: this.core._components[dComponentIdx].position,
66599
- sourceDoc: this.core._components[dComponentIdx].sourceDoc
66600
- });
66613
+ reportInternalError(
66614
+ `Can't simultaneously set additional dependency value ${dependencyName2} if it doesn't correspond to additional state variable defined of ${dependencyName}'s state variable`
66615
+ );
66601
66616
  continue;
66602
66617
  }
66603
66618
  if (!inst.additionalStateVariableValues) {
@@ -68942,8 +68957,13 @@ class UpdateExecutor {
68942
68957
  * Main path: look up `component.actions[actionName]` (with optional
68943
68958
  * case-insensitive fallback when `caseInsensitiveMatch` is set), record
68944
68959
  * the `event` if provided, and `await` the action. Returns
68945
- * `{ actionId }` on success. If the component exists but the action
68946
- * does not, a warning diagnostic is added and `{}` is returned.
68960
+ * `{ actionId }` on success. If the component exists but the action does
68961
+ * not, `{ actionUnavailable: true }` is returned: what an author can be
68962
+ * told about that depends on how the action was asked for, and only the
68963
+ * caller knows. `<callAction>` turns it into a warning naming the
68964
+ * `target` the author wrote; everything else reaches here from a
68965
+ * renderer or from the core itself, where there is nothing an author
68966
+ * wrote to name, so all that is left is a line on the console.
68947
68967
  */
68948
68968
  async performAction({
68949
68969
  componentIdx,
@@ -69019,12 +69039,10 @@ class UpdateExecutor {
69019
69039
  return { actionId: args.actionId };
69020
69040
  }
69021
69041
  if (component) {
69022
- this.core.addDiagnostic({
69023
- type: "warning",
69024
- message: `Cannot run action ${actionName} on component ${componentIdx}`,
69025
- position: component.position,
69026
- sourceDoc: component.sourceDoc
69027
- });
69042
+ reportInternalError(
69043
+ `Cannot run action ${actionName} on component ${componentIdx}`
69044
+ );
69045
+ return { actionUnavailable: true };
69028
69046
  }
69029
69047
  return {};
69030
69048
  }
@@ -69127,10 +69145,9 @@ class UpdateExecutor {
69127
69145
  if (component) {
69128
69146
  componentsToDelete.push(component);
69129
69147
  } else {
69130
- this.core.addDiagnostic({
69131
- type: "info",
69132
- message: `Cannot delete ${componentIdx} as it doesn't exist.`
69133
- });
69148
+ reportInternalError(
69149
+ `Cannot delete ${componentIdx} as it doesn't exist.`
69150
+ );
69134
69151
  }
69135
69152
  }
69136
69153
  if (componentsToDelete.length > 0) {
@@ -71222,6 +71239,11 @@ class Core {
71222
71239
  requestComponentDoenetML: this.requestComponentDoenetML.bind(this),
71223
71240
  copyToClipboard: this.copyToClipboard.bind(this),
71224
71241
  navigateToTarget: (args) => navigateToTarget({ core: this, args }),
71242
+ // The DoenetML behind a reference a component holds, so a
71243
+ // component can name a `target` back to the author as they wrote
71244
+ // it. The source text lives on core; the resolved path a
71245
+ // component has is the half that needs looking up in it.
71246
+ doenetMLStringForReference: (originalPath) => doenetMLStringForReference(originalPath, this.allDoenetMLs),
71225
71247
  // State-variable runtime plumbing, not component-facing API:
71226
71248
  // the shared state-variable functions in StateVariableInitializer
71227
71249
  // reach core through `svComponent.coreFunctions`.
@@ -148687,25 +148709,21 @@ function createStableHandle(descendant, index2, usedHandles) {
148687
148709
  usedHandles.add(handle);
148688
148710
  return handle;
148689
148711
  }
148690
- function warningMessageForDescendant(descendant) {
148712
+ function warningSubjectForDescendant(descendant) {
148691
148713
  if (descendant?.componentName) {
148692
148714
  return `<${descendant.componentType}> (${descendant.componentName})`;
148693
148715
  }
148694
- return `<${descendant?.componentType ?? "unknown"}>`;
148716
+ return `<${descendant?.componentType ?? "?"}>`;
148695
148717
  }
148696
148718
  function pushWarning({
148697
148719
  diagnostics: diagnostics2,
148698
- message,
148720
+ code,
148721
+ args,
148699
148722
  position: position2
148700
148723
  }) {
148701
- const warning = {
148702
- type: "warning",
148703
- message
148704
- };
148705
- if (position2) {
148706
- warning.position = position2;
148707
- }
148708
- diagnostics2.push(warning);
148724
+ diagnostics2.push(
148725
+ codedDiagnostic({ type: "warning", code, args, position: position2 })
148726
+ );
148709
148727
  }
148710
148728
  function sortDescendantsByOrder(a2, b2) {
148711
148729
  if (Number.isFinite(a2.componentIdx) && Number.isFinite(b2.componentIdx)) {
@@ -149204,7 +149222,12 @@ function pointLabelAttributes({
149204
149222
  } else {
149205
149223
  pushWarning({
149206
149224
  diagnostics: diagnostics2,
149207
- message: `${warningPrefix}: unsupported labelPosition '${rawPosition}' for point label; default PreFigure alignment used.`,
149225
+ code: "doenet-w0090",
149226
+ args: {
149227
+ subject: warningPrefix,
149228
+ labelPosition: rawPosition,
149229
+ labelKind: "point"
149230
+ },
149208
149231
  position: warningPosition
149209
149232
  });
149210
149233
  }
@@ -149331,7 +149354,12 @@ function getLabelForLine({
149331
149354
  } else if (!KNOWN_LINE_POSITIONS.has(normalizedPosition)) {
149332
149355
  pushWarning({
149333
149356
  diagnostics: diagnostics2,
149334
- message: `${warningPrefix}: unsupported labelPosition '${rawPosition}' for line-family label; default PreFigure alignment used.`,
149357
+ code: "doenet-w0090",
149358
+ args: {
149359
+ subject: warningPrefix,
149360
+ labelPosition: rawPosition,
149361
+ labelKind: "line-family"
149362
+ },
149335
149363
  position: warningPosition
149336
149364
  });
149337
149365
  }
@@ -149429,7 +149457,8 @@ function styleAttributes({
149429
149457
  if (fillStyle && fillStyle !== "solid") {
149430
149458
  pushWarning({
149431
149459
  diagnostics: diagnostics2,
149432
- message: `${warningPrefix}: fill style '${fillStyle}' is unsupported by PreFigure; falling back to a solid fill.`,
149460
+ code: "doenet-w0091",
149461
+ args: { subject: warningPrefix, fillStyle },
149433
149462
  position: warningPosition
149434
149463
  });
149435
149464
  }
@@ -149447,7 +149476,8 @@ function styleAttributes({
149447
149476
  } else if (!(lineStyle in prefigureDashByLineStyle)) {
149448
149477
  pushWarning({
149449
149478
  diagnostics: diagnostics2,
149450
- message: `${warningPrefix}: unknown line style '${lineStyle}' omitted from PreFigure output.`,
149479
+ code: "doenet-w0092",
149480
+ args: { subject: warningPrefix, lineStyle },
149451
149481
  position: warningPosition
149452
149482
  });
149453
149483
  }
@@ -149472,13 +149502,21 @@ function pointStyleAttributes({
149472
149502
  attrs.push('style="diamond"');
149473
149503
  pushWarning({
149474
149504
  diagnostics: diagnostics2,
149475
- message: `${warningPrefix}: marker style '${markerStyleString}' mapped to PreFigure style 'diamond'.`,
149505
+ code: "doenet-w0093",
149506
+ args: {
149507
+ subject: warningPrefix,
149508
+ markerStyle: markerStyleString
149509
+ },
149476
149510
  position: warningPosition
149477
149511
  });
149478
149512
  } else {
149479
149513
  pushWarning({
149480
149514
  diagnostics: diagnostics2,
149481
- message: `${warningPrefix}: marker style '${markerStyleString}' is unsupported by PreFigure; default style used.`,
149515
+ code: "doenet-w0094",
149516
+ args: {
149517
+ subject: warningPrefix,
149518
+ markerStyle: markerStyleString
149519
+ },
149482
149520
  position: warningPosition
149483
149521
  });
149484
149522
  }
@@ -150575,12 +150613,16 @@ function parsedFormulaPiecesFromDefinition({
150575
150613
  if (!childPiecesResult) {
150576
150614
  const typeLabel = definitionTypeLabel(childDefinition);
150577
150615
  const message = SUPPORTED_CURVE_FUNCTION_TYPES.has(typeLabel) ? `${warningPrefix}: ${pieceRole} piecewise child ${i2 + 1} failed to build curve pieces (type '${typeLabel}'); child skipped.` : `${warningPrefix}: ${pieceRole} piecewise child ${i2 + 1} has unsupported function definition type '${typeLabel}'; child skipped.`;
150578
- pushWarning({ diagnostics: diagnostics2, message, position: warningPosition });
150616
+ diagnostics2.push({
150617
+ type: "warning",
150618
+ message,
150619
+ position: warningPosition
150620
+ });
150579
150621
  continue;
150580
150622
  }
150581
150623
  if (childPiecesResult.pieces.length === 0) {
150582
- pushWarning({
150583
- diagnostics: diagnostics2,
150624
+ diagnostics2.push({
150625
+ type: "warning",
150584
150626
  message: `${warningPrefix}: ${pieceRole} piecewise child ${i2 + 1} has no pieces overlapping the active domain/bounds; child skipped.`,
150585
150627
  position: warningPosition
150586
150628
  });
@@ -150638,7 +150680,8 @@ function warnCurveLabelOmitted({
150638
150680
  })) {
150639
150681
  pushWarning({
150640
150682
  diagnostics: diagnostics2,
150641
- message: `${warningPrefix}: labels are not supported on converted curve elements; label omitted.`,
150683
+ code: "doenet-w0086",
150684
+ args: { subject: warningPrefix },
150642
150685
  position: warningPosition
150643
150686
  });
150644
150687
  }
@@ -150649,7 +150692,11 @@ function validatePiecesResult(result2, diagnostics2, warningPrefix, warningPosit
150649
150692
  if (hasUnsupportedType) {
150650
150693
  pushWarning({
150651
150694
  diagnostics: diagnostics2,
150652
- message: `${warningPrefix}: unsupported curve function definition type '${definitionTypeLabel2}'; descendant skipped.`,
150695
+ code: "doenet-w0087",
150696
+ args: {
150697
+ subject: warningPrefix,
150698
+ definitionType: definitionTypeLabel2
150699
+ },
150653
150700
  position: warningPosition
150654
150701
  });
150655
150702
  }
@@ -150893,7 +150940,8 @@ function convertRegionBetweenCurvesToPrefigure({
150893
150940
  if (sv.flipFunctions) {
150894
150941
  pushWarning({
150895
150942
  diagnostics: diagnostics2,
150896
- message: `${warningPrefix}: unsupported flipFunctions attribute on regionBetweenCurves; descendant skipped.`,
150943
+ code: "doenet-w0088",
150944
+ args: { subject: warningPrefix },
150897
150945
  position: warningPosition
150898
150946
  });
150899
150947
  return null;
@@ -150907,7 +150955,8 @@ function convertRegionBetweenCurvesToPrefigure({
150907
150955
  if (!f1 || !f2) {
150908
150956
  pushWarning({
150909
150957
  diagnostics: diagnostics2,
150910
- message: `${warningPrefix}: only formula-typed child functions are supported on regionBetweenCurves; descendant skipped.`,
150958
+ code: "doenet-w0089",
150959
+ args: { subject: warningPrefix },
150911
150960
  position: warningPosition
150912
150961
  });
150913
150962
  return null;
@@ -150983,7 +151032,7 @@ function convertGraphicalDescendantToPrefigure({
150983
151032
  if (sv.hidden) {
150984
151033
  return null;
150985
151034
  }
150986
- const warningPrefix = warningMessageForDescendant(descendant);
151035
+ const warningPrefix = warningSubjectForDescendant(descendant);
150987
151036
  const warningPosition = descendant?.position;
150988
151037
  const handle = createStableHandle(descendant, index2, usedHandles);
150989
151038
  const styleAttrs = styleAttributes({
@@ -150997,7 +151046,8 @@ function convertGraphicalDescendantToPrefigure({
150997
151046
  if (!converter) {
150998
151047
  pushWarning({
150999
151048
  diagnostics: diagnostics2,
151000
- message: `${warningPrefix}: unsupported in graph prefigure renderer; descendant skipped.`,
151049
+ code: "doenet-w0084",
151050
+ args: { subject: warningPrefix },
151001
151051
  position: warningPosition
151002
151052
  });
151003
151053
  return null;
@@ -151015,7 +151065,8 @@ function convertGraphicalDescendantToPrefigure({
151015
151065
  if (diagnostics2.length === diagnosticsCountBeforeConvert) {
151016
151066
  pushWarning({
151017
151067
  diagnostics: diagnostics2,
151018
- message: `${warningPrefix}: non-finite or incomplete geometry; descendant skipped.`,
151068
+ code: "doenet-w0085",
151069
+ args: { subject: warningPrefix },
151019
151070
  position: warningPosition
151020
151071
  });
151021
151072
  }
@@ -151026,7 +151077,6 @@ function convertGraphicalDescendantToPrefigure({
151026
151077
  handle
151027
151078
  };
151028
151079
  }
151029
- const INVALID_REF_WARNING = "`<annotation>`: invalid `ref`; cannot resolve target. Annotation omitted.";
151030
151080
  function nextAvailableConceptualAnnotationRef({
151031
151081
  initialCounter,
151032
151082
  usedRefs
@@ -151073,21 +151123,23 @@ function convertDoenetMLAnnotationsToPreFigureXml({
151073
151123
  }
151074
151124
  function pushAnnotationWarning({
151075
151125
  diagnostics: diagnostics2,
151076
- message,
151126
+ code,
151077
151127
  annotation
151078
151128
  }) {
151079
- const warning = {
151080
- type: "warning",
151081
- message,
151129
+ pushWarning({
151130
+ diagnostics: diagnostics2,
151131
+ code,
151082
151132
  position: annotation?.refResolutions?.[0]?.position
151083
- };
151084
- diagnostics2.push(warning);
151133
+ });
151085
151134
  }
151086
151135
  function pushInvalidRefWarning(annotation, state) {
151087
151136
  pushAnnotationWarning({
151088
151137
  diagnostics: state.diagnostics,
151089
151138
  annotation,
151090
- message: INVALID_REF_WARNING
151139
+ // Inlined rather than held in a constant: `lint:i18n` finds raised
151140
+ // codes by scanning for a `code:` property, and a code reached
151141
+ // through a variable reads to it as a code nothing raises.
151142
+ code: "doenet-w0095"
151091
151143
  });
151092
151144
  return null;
151093
151145
  }
@@ -151103,7 +151155,7 @@ function resolveAnnotationRef(annotation, state) {
151103
151155
  pushAnnotationWarning({
151104
151156
  diagnostics: state.diagnostics,
151105
151157
  annotation,
151106
- message: "`<annotation>`: `ref` resolved to multiple targets; using the first target."
151158
+ code: "doenet-w0096"
151107
151159
  });
151108
151160
  }
151109
151161
  const unresolvedPath = firstResolution.unresolvedPath;
@@ -151127,7 +151179,7 @@ function resolveAnnotationRef(annotation, state) {
151127
151179
  pushAnnotationWarning({
151128
151180
  diagnostics: state.diagnostics,
151129
151181
  annotation,
151130
- message: "`<annotation>`: invalid `ref`; target is outside the containing graph. Annotation omitted."
151182
+ code: "doenet-w0097"
151131
151183
  });
151132
151184
  return null;
151133
151185
  }
@@ -151136,7 +151188,7 @@ function resolveAnnotationRef(annotation, state) {
151136
151188
  pushAnnotationWarning({
151137
151189
  diagnostics: state.diagnostics,
151138
151190
  annotation,
151139
- message: "`<annotation>`: invalid `ref`; target is not a supported graphical object in prefigure conversion. Annotation omitted."
151191
+ code: "doenet-w0098"
151140
151192
  });
151141
151193
  return null;
151142
151194
  }
@@ -151153,7 +151205,7 @@ function convertAnnotationNodeToPreFigureXml(annotation, state) {
151153
151205
  pushAnnotationWarning({
151154
151206
  diagnostics: state.diagnostics,
151155
151207
  annotation,
151156
- message: "`<annotation>`: missing or empty `text`; emitting empty text."
151208
+ code: "doenet-w0099"
151157
151209
  });
151158
151210
  }
151159
151211
  const attrs = [`ref="${escapeXml(ref)}"`, `text="${escapeXml(text)}"`];
@@ -151285,7 +151337,8 @@ function createPrefigureXML({
151285
151337
  for (const descendant of unsupported ?? []) {
151286
151338
  pushWarning({
151287
151339
  diagnostics: diagnostics2,
151288
- message: `${warningMessageForDescendant(descendant)}: unsupported in graph prefigure renderer; descendant skipped.`,
151340
+ code: "doenet-w0084",
151341
+ args: { subject: warningSubjectForDescendant(descendant) },
151289
151342
  position: descendant?.position
151290
151343
  });
151291
151344
  }
@@ -202770,7 +202823,7 @@ class SelectFromSequence extends Sequence {
202770
202823
  serializedComponent,
202771
202824
  infoDiagnostics
202772
202825
  }) {
202773
- const info = (message) => pushVariantInfo(infoDiagnostics, message, serializedComponent);
202826
+ const info = (diagnostic) => pushVariantInfo(infoDiagnostics, diagnostic, serializedComponent);
202774
202827
  let numToSelect = 1, withReplacement = false;
202775
202828
  let sequenceType = serializedComponent.attributes.type.primitive.value;
202776
202829
  let numToSelectComponent = serializedComponent.attributes.numToSelect?.component;
@@ -202778,24 +202831,21 @@ class SelectFromSequence extends Sequence {
202778
202831
  if (numToSelectComponent.componentType === "integer" && numToSelectComponent.children?.length === 1 && typeof numToSelectComponent.children[0] === "string") {
202779
202832
  numToSelect = Number(numToSelectComponent.children[0]);
202780
202833
  if (!(Number.isInteger(numToSelect) && numToSelect >= 0)) {
202781
- info(
202782
- `cannot determine unique variants of selectFromSequence as numToSelect isn't a non-negative integer.`
202783
- );
202834
+ info({
202835
+ code: "doenet-i0022",
202836
+ component: "selectFromSequence"
202837
+ });
202784
202838
  return { success: false };
202785
202839
  }
202786
202840
  } else {
202787
- info(
202788
- `cannot determine unique variants of selectFromSequence as numToSelect isn't constant number.`
202789
- );
202841
+ info({ code: "doenet-i0023", component: "selectFromSequence" });
202790
202842
  return { success: false };
202791
202843
  }
202792
202844
  }
202793
202845
  let coprimeCombinationsComponent = serializedComponent.attributes.coprime?.component;
202794
202846
  if (coprimeCombinationsComponent) {
202795
202847
  if (!(coprimeCombinationsComponent.componentType === "boolean" && coprimeCombinationsComponent.children?.length === 1 && typeof coprimeCombinationsComponent.children[0] === "string" && coprimeCombinationsComponent.children[0].trim().toLowerCase() === "false")) {
202796
- info(
202797
- `cannot determine unique variants of selectFromSequence as cannot determine coprime is always false.`
202798
- );
202848
+ info({ code: "doenet-i0026", component: "selectFromSequence" });
202799
202849
  return { success: false };
202800
202850
  }
202801
202851
  }
@@ -202807,15 +202857,14 @@ class SelectFromSequence extends Sequence {
202807
202857
  } else if ((withReplacementComponent.children === void 0 || withReplacementComponent.children.length === 0) && typeof withReplacementComponent.state?.value === "boolean") {
202808
202858
  withReplacement = withReplacementComponent.state.value;
202809
202859
  } else {
202810
- info(
202811
- `cannot determine unique variants of selectFromSequence as withReplacement isn't constant boolean.`
202812
- );
202860
+ info({
202861
+ code: "doenet-i0024",
202862
+ component: "selectFromSequence"
202863
+ });
202813
202864
  return { success: false };
202814
202865
  }
202815
202866
  } else {
202816
- info(
202817
- `cannot determine unique variants of selectFromSequence as withReplacement isn't constant boolean.`
202818
- );
202867
+ info({ code: "doenet-i0024", component: "selectFromSequence" });
202819
202868
  return { success: false };
202820
202869
  }
202821
202870
  }
@@ -202833,17 +202882,29 @@ class SelectFromSequence extends Sequence {
202833
202882
  if (sequenceType === "number") {
202834
202883
  from = Number(fromComponent2.children[0]);
202835
202884
  if (!Number.isFinite(from)) {
202836
- info(
202837
- `cannot determine unique variants of selectFromSequence of number type as from isn't a number.`
202838
- );
202885
+ info({
202886
+ code: "doenet-i0029",
202887
+ component: "selectFromSequence",
202888
+ args: {
202889
+ type: "number",
202890
+ attribute: "from",
202891
+ expected: "number"
202892
+ }
202893
+ });
202839
202894
  return { success: false };
202840
202895
  }
202841
202896
  } else if (sequenceType === "letters") {
202842
202897
  from = lettersToNumber(fromComponent2.children[0]);
202843
202898
  if (!Number.isFinite(from)) {
202844
- info(
202845
- `cannot determine unique variants of selectFromSequence of letters type as from isn't a combination of letters.`
202846
- );
202899
+ info({
202900
+ code: "doenet-i0029",
202901
+ component: "selectFromSequence",
202902
+ args: {
202903
+ type: "letters",
202904
+ attribute: "from",
202905
+ expected: "letters-combination"
202906
+ }
202907
+ });
202847
202908
  return { success: false };
202848
202909
  }
202849
202910
  } else {
@@ -202853,17 +202914,25 @@ class SelectFromSequence extends Sequence {
202853
202914
  try {
202854
202915
  from = fromText(fromComponent2.children[0]);
202855
202916
  } catch (e32) {
202856
- info(
202857
- `cannot determine unique variants of selectFromSequence of math type as from isn't a valid math expression.`
202858
- );
202917
+ info({
202918
+ code: "doenet-i0029",
202919
+ component: "selectFromSequence",
202920
+ args: {
202921
+ type: "math",
202922
+ attribute: "from",
202923
+ expected: "math-expression"
202924
+ }
202925
+ });
202859
202926
  return { success: false };
202860
202927
  }
202861
202928
  }
202862
202929
  sequencePars.from = from;
202863
202930
  } else {
202864
- info(
202865
- `cannot determine unique variants of selectFromSequence as from isn't a constant.`
202866
- );
202931
+ info({
202932
+ code: "doenet-i0027",
202933
+ component: "selectFromSequence",
202934
+ args: { attribute: "from" }
202935
+ });
202867
202936
  return { success: false };
202868
202937
  }
202869
202938
  }
@@ -202875,17 +202944,29 @@ class SelectFromSequence extends Sequence {
202875
202944
  if (sequenceType === "number") {
202876
202945
  to2 = Number(toComponent2.children[0]);
202877
202946
  if (!Number.isFinite(to2)) {
202878
- info(
202879
- `cannot determine unique variants of selectFromSequence of number type as to isn't a number.`
202880
- );
202947
+ info({
202948
+ code: "doenet-i0029",
202949
+ component: "selectFromSequence",
202950
+ args: {
202951
+ type: "number",
202952
+ attribute: "to",
202953
+ expected: "number"
202954
+ }
202955
+ });
202881
202956
  return { success: false };
202882
202957
  }
202883
202958
  } else if (sequenceType === "letters") {
202884
202959
  to2 = lettersToNumber(toComponent2.children[0]);
202885
202960
  if (!Number.isFinite(to2)) {
202886
- info(
202887
- `cannot determine unique variants of selectFromSequence of letters type as to isn't a combination of letters.`
202888
- );
202961
+ info({
202962
+ code: "doenet-i0029",
202963
+ component: "selectFromSequence",
202964
+ args: {
202965
+ type: "letters",
202966
+ attribute: "to",
202967
+ expected: "letters-combination"
202968
+ }
202969
+ });
202889
202970
  return { success: false };
202890
202971
  }
202891
202972
  } else {
@@ -202895,17 +202976,25 @@ class SelectFromSequence extends Sequence {
202895
202976
  try {
202896
202977
  to2 = fromText(toComponent2.children[0]);
202897
202978
  } catch (e32) {
202898
- info(
202899
- `cannot determine unique variants of selectFromSequence of math type as to isn't a valid math expression.`
202900
- );
202979
+ info({
202980
+ code: "doenet-i0029",
202981
+ component: "selectFromSequence",
202982
+ args: {
202983
+ type: "math",
202984
+ attribute: "to",
202985
+ expected: "math-expression"
202986
+ }
202987
+ });
202901
202988
  return { success: false };
202902
202989
  }
202903
202990
  }
202904
202991
  sequencePars.to = to2;
202905
202992
  } else {
202906
- info(
202907
- `cannot determine unique variants of selectFromSequence as to isn't a constant.`
202908
- );
202993
+ info({
202994
+ code: "doenet-i0027",
202995
+ component: "selectFromSequence",
202996
+ args: { attribute: "to" }
202997
+ });
202909
202998
  return { success: false };
202910
202999
  }
202911
203000
  }
@@ -202916,17 +203005,29 @@ class SelectFromSequence extends Sequence {
202916
203005
  if (sequenceType === "number") {
202917
203006
  step = Number(stepComponent.children[0]);
202918
203007
  if (!Number.isFinite(step)) {
202919
- info(
202920
- `cannot determine unique variants of selectFromSequence of number type as step isn't a number.`
202921
- );
203008
+ info({
203009
+ code: "doenet-i0029",
203010
+ component: "selectFromSequence",
203011
+ args: {
203012
+ type: "number",
203013
+ attribute: "step",
203014
+ expected: "number"
203015
+ }
203016
+ });
202922
203017
  return { success: false };
202923
203018
  }
202924
203019
  } else if (sequenceType === "letters") {
202925
203020
  step = Number(stepComponent.children[0]);
202926
203021
  if (!Number.isInteger(step)) {
202927
- info(
202928
- `cannot determine unique variants of selectFromSequence of letters type as step isn't an integer.`
202929
- );
203022
+ info({
203023
+ code: "doenet-i0029",
203024
+ component: "selectFromSequence",
203025
+ args: {
203026
+ type: "letters",
203027
+ attribute: "step",
203028
+ expected: "integer"
203029
+ }
203030
+ });
202930
203031
  return { success: false };
202931
203032
  }
202932
203033
  } else {
@@ -202936,17 +203037,25 @@ class SelectFromSequence extends Sequence {
202936
203037
  try {
202937
203038
  step = fromText(stepComponent.children[0]);
202938
203039
  } catch (e32) {
202939
- info(
202940
- `cannot determine unique variants of selectFromSequence of math type as step isn't a valid math expression.`
202941
- );
203040
+ info({
203041
+ code: "doenet-i0029",
203042
+ component: "selectFromSequence",
203043
+ args: {
203044
+ type: "math",
203045
+ attribute: "step",
203046
+ expected: "math-expression"
203047
+ }
203048
+ });
202942
203049
  return { success: false };
202943
203050
  }
202944
203051
  }
202945
203052
  sequencePars.step = step;
202946
203053
  } else {
202947
- info(
202948
- `cannot determine unique variants of selectFromSequence as step isn't a constant.`
202949
- );
203054
+ info({
203055
+ code: "doenet-i0027",
203056
+ component: "selectFromSequence",
203057
+ args: { attribute: "step" }
203058
+ });
202950
203059
  return { success: false };
202951
203060
  }
202952
203061
  }
@@ -202955,40 +203064,37 @@ class SelectFromSequence extends Sequence {
202955
203064
  if (lengthComponent.children?.length === 1 && typeof lengthComponent.children[0] === "string") {
202956
203065
  let length = Number(lengthComponent.children[0]);
202957
203066
  if (!Number.isInteger(length)) {
202958
- info(
202959
- `cannot determine unique variants of selectFromSequence as length isn't an integer.`
202960
- );
203067
+ info({
203068
+ code: "doenet-i0030",
203069
+ component: "selectFromSequence"
203070
+ });
202961
203071
  return { success: false };
202962
203072
  }
202963
203073
  sequencePars.length = length;
202964
203074
  } else {
202965
- info(
202966
- `cannot determine unique variants of selectFromSequence as length isn't a constant.`
202967
- );
203075
+ info({
203076
+ code: "doenet-i0027",
203077
+ component: "selectFromSequence",
203078
+ args: { attribute: "length" }
203079
+ });
202968
203080
  return { success: false };
202969
203081
  }
202970
203082
  }
202971
203083
  if (serializedComponent.attributes.excludeCombinations) {
202972
- info(
202973
- "have not implemented unique variants of a selectFromSequence with excludeCombinations"
202974
- );
203084
+ info({ code: "doenet-i0032", component: "selectFromSequence" });
202975
203085
  return { success: false };
202976
203086
  }
202977
203087
  let excludes = [];
202978
203088
  let excludeComponent = serializedComponent.attributes.exclude?.component;
202979
203089
  if (excludeComponent) {
202980
203090
  if (sequenceType === "math") {
202981
- info(
202982
- "have not implemented unique variants of a selectFromSequence of type math with exclude"
202983
- );
203091
+ info({ code: "doenet-i0033", component: "selectFromSequence" });
202984
203092
  return { success: false };
202985
203093
  }
202986
203094
  if (!excludeComponent.children.every(
202987
203095
  (x2) => x2.children?.length === 1 && typeof x2.children[0] === "string"
202988
203096
  )) {
202989
- info(
202990
- "have not implemented unique variants of a selectFromSequence with non-constant exclude"
202991
- );
203097
+ info({ code: "doenet-i0034", component: "selectFromSequence" });
202992
203098
  return { success: false };
202993
203099
  }
202994
203100
  if (sequenceType === "letters") {
@@ -203001,9 +203107,7 @@ class SelectFromSequence extends Sequence {
203001
203107
  );
203002
203108
  }
203003
203109
  if (!excludes.every(Number.isFinite)) {
203004
- info(
203005
- "have not implemented unique variants of a selectFromSequence with non-constant exclude"
203006
- );
203110
+ info({ code: "doenet-i0034", component: "selectFromSequence" });
203007
203111
  return { success: false };
203008
203112
  }
203009
203113
  }
@@ -204108,7 +204212,7 @@ class Select extends CompositeComponent {
204108
204212
  if (!(Number.isInteger(numToSelect) && numToSelect >= 0)) {
204109
204213
  pushVariantInfo(
204110
204214
  infoDiagnostics,
204111
- `cannot determine unique variants of select as numToSelect isn't a non-negative integer.`,
204215
+ { code: "doenet-i0022", component: "select" },
204112
204216
  serializedComponent
204113
204217
  );
204114
204218
  return { success: false };
@@ -204116,7 +204220,7 @@ class Select extends CompositeComponent {
204116
204220
  } else {
204117
204221
  pushVariantInfo(
204118
204222
  infoDiagnostics,
204119
- `cannot determine unique variants of select as numToSelect isn't constant number.`,
204223
+ { code: "doenet-i0023", component: "select" },
204120
204224
  serializedComponent
204121
204225
  );
204122
204226
  return { success: false };
@@ -204132,7 +204236,7 @@ class Select extends CompositeComponent {
204132
204236
  } else {
204133
204237
  pushVariantInfo(
204134
204238
  infoDiagnostics,
204135
- `cannot determine unique variants of select as withReplacement isn't constant boolean.`,
204239
+ { code: "doenet-i0024", component: "select" },
204136
204240
  serializedComponent
204137
204241
  );
204138
204242
  return { success: false };
@@ -204140,7 +204244,7 @@ class Select extends CompositeComponent {
204140
204244
  } else {
204141
204245
  pushVariantInfo(
204142
204246
  infoDiagnostics,
204143
- `cannot determine unique variants of select as withReplacement isn't constant boolean.`,
204247
+ { code: "doenet-i0024", component: "select" },
204144
204248
  serializedComponent
204145
204249
  );
204146
204250
  return { success: false };
@@ -204150,7 +204254,7 @@ class Select extends CompositeComponent {
204150
204254
  if (child.attributes?.selectWeight || child.attributes?.selectForVariants) {
204151
204255
  pushVariantInfo(
204152
204256
  infoDiagnostics,
204153
- `Unique variants for select disabled if have an option with selectWeight or selectForVariants specified`,
204257
+ { code: "doenet-i0025" },
204154
204258
  serializedComponent
204155
204259
  );
204156
204260
  return { success: false };
@@ -207156,22 +207260,21 @@ class SelectPrimeNumbers extends CompositeComponent {
207156
207260
  serializedComponent,
207157
207261
  infoDiagnostics
207158
207262
  }) {
207159
- const info = (message) => pushVariantInfo(infoDiagnostics, message, serializedComponent);
207263
+ const info = (diagnostic) => pushVariantInfo(infoDiagnostics, diagnostic, serializedComponent);
207160
207264
  let numToSelect = 1, withReplacement = false;
207161
207265
  let numToSelectComponent = serializedComponent.attributes.numToSelect?.component;
207162
207266
  if (numToSelectComponent) {
207163
207267
  if (numToSelectComponent.componentType === "integer" && numToSelectComponent.children?.length === 1 && typeof numToSelectComponent.children[0] === "string") {
207164
207268
  numToSelect = Number(numToSelectComponent.children[0]);
207165
207269
  if (!(Number.isInteger(numToSelect) && numToSelect >= 0)) {
207166
- info(
207167
- `cannot determine unique variants of selectPrimeNumbers as numToSelect isn't a non-negative integer.`
207168
- );
207270
+ info({
207271
+ code: "doenet-i0022",
207272
+ component: "selectPrimeNumbers"
207273
+ });
207169
207274
  return { success: false };
207170
207275
  }
207171
207276
  } else {
207172
- info(
207173
- `cannot determine unique variants of selectPrimeNumbers as numToSelect isn't constant number.`
207174
- );
207277
+ info({ code: "doenet-i0023", component: "selectPrimeNumbers" });
207175
207278
  return { success: false };
207176
207279
  }
207177
207280
  }
@@ -207183,15 +207286,14 @@ class SelectPrimeNumbers extends CompositeComponent {
207183
207286
  } else if ((withReplacementComponent.children === void 0 || withReplacementComponent.children.length === 0) && typeof withReplacementComponent.state?.value === "boolean") {
207184
207287
  withReplacement = withReplacementComponent.state.value;
207185
207288
  } else {
207186
- info(
207187
- `cannot determine unique variants of selectPrimeNumbers as withReplacement isn't constant boolean.`
207188
- );
207289
+ info({
207290
+ code: "doenet-i0024",
207291
+ component: "selectPrimeNumbers"
207292
+ });
207189
207293
  return { success: false };
207190
207294
  }
207191
207295
  } else {
207192
- info(
207193
- `cannot determine unique variants of selectPrimeNumbers as withReplacement isn't constant boolean.`
207194
- );
207296
+ info({ code: "doenet-i0024", component: "selectPrimeNumbers" });
207195
207297
  return { success: false };
207196
207298
  }
207197
207299
  }
@@ -207201,16 +207303,20 @@ class SelectPrimeNumbers extends CompositeComponent {
207201
207303
  if (fromComponent.children?.length === 1 && typeof fromComponent.children[0] === "string") {
207202
207304
  let from = Number(fromComponent.children[0]);
207203
207305
  if (!Number.isFinite(from)) {
207204
- info(
207205
- `cannot determine unique variants of selectPrimeNumbers as from isn't a number.`
207206
- );
207306
+ info({
207307
+ code: "doenet-i0028",
207308
+ component: "selectPrimeNumbers",
207309
+ args: { attribute: "from" }
207310
+ });
207207
207311
  return { success: false };
207208
207312
  }
207209
207313
  primePars.from = from;
207210
207314
  } else {
207211
- info(
207212
- `cannot determine unique variants of selectPrimeNumbers as from isn't a constant.`
207213
- );
207315
+ info({
207316
+ code: "doenet-i0027",
207317
+ component: "selectPrimeNumbers",
207318
+ args: { attribute: "from" }
207319
+ });
207214
207320
  return { success: false };
207215
207321
  }
207216
207322
  }
@@ -207219,23 +207325,25 @@ class SelectPrimeNumbers extends CompositeComponent {
207219
207325
  if (toComponent.children?.length === 1 && typeof toComponent.children[0] === "string") {
207220
207326
  let to2 = Number(toComponent.children[0]);
207221
207327
  if (!Number.isFinite(to2)) {
207222
- info(
207223
- `cannot determine unique variants of selectPrimeNumbers as to isn't a number.`
207224
- );
207328
+ info({
207329
+ code: "doenet-i0028",
207330
+ component: "selectPrimeNumbers",
207331
+ args: { attribute: "to" }
207332
+ });
207225
207333
  return { success: false };
207226
207334
  }
207227
207335
  primePars.to = to2;
207228
207336
  } else {
207229
- info(
207230
- `cannot determine unique variants of selectPrimeNumbers as to isn't a constant.`
207231
- );
207337
+ info({
207338
+ code: "doenet-i0027",
207339
+ component: "selectPrimeNumbers",
207340
+ args: { attribute: "to" }
207341
+ });
207232
207342
  return { success: false };
207233
207343
  }
207234
207344
  }
207235
207345
  if (serializedComponent.attributes.excludeCombinations) {
207236
- info(
207237
- "have not implemented unique variants of a selectPrimeNumbers with excludeCombinations"
207238
- );
207346
+ info({ code: "doenet-i0032", component: "selectPrimeNumbers" });
207239
207347
  return { success: false };
207240
207348
  }
207241
207349
  let excludeComponent = serializedComponent.attributes.exclude?.component;
@@ -207243,18 +207351,14 @@ class SelectPrimeNumbers extends CompositeComponent {
207243
207351
  if (!excludeComponent.children.every(
207244
207352
  (x2) => x2.children?.length === 1 && typeof x2.children[0] === "string"
207245
207353
  )) {
207246
- info(
207247
- "have not implemented unique variants of a selectPrimeNumbers with non-constant exclude"
207248
- );
207354
+ info({ code: "doenet-i0034", component: "selectPrimeNumbers" });
207249
207355
  return { success: false };
207250
207356
  }
207251
207357
  let exclude = excludeComponent.children.map(
207252
207358
  (x2) => Number(x2.children[0])
207253
207359
  );
207254
207360
  if (!exclude.every(Number.isFinite)) {
207255
- info(
207256
- "have not implemented unique variants of a selectPrimeNumbers with non-constant exclude"
207257
- );
207361
+ info({ code: "doenet-i0034", component: "selectPrimeNumbers" });
207258
207362
  return { success: false };
207259
207363
  }
207260
207364
  primePars.exclude = exclude;
@@ -215942,7 +216046,14 @@ class CallAction extends InlineComponent {
215942
216046
  definition: () => ({ setValue: { clickAction: "callAction" } })
215943
216047
  };
215944
216048
  stateVariableDefinitions.targetComponentIdx = {
215945
- additionalStateVariablesDefined: ["unresolvedPath"],
216049
+ // `targetOriginalPath` is the resolved path of the `target`
216050
+ // reference, kept so that a failure can quote back the `$…` the
216051
+ // author typed. The component index alone is no use for that:
216052
+ // it never appeared in the document.
216053
+ additionalStateVariablesDefined: [
216054
+ "unresolvedPath",
216055
+ "targetOriginalPath"
216056
+ ],
215946
216057
  returnDependencies: () => ({
215947
216058
  target: {
215948
216059
  dependencyType: "attributeRefResolutions",
@@ -215956,7 +216067,8 @@ class CallAction extends InlineComponent {
215956
216067
  return {
215957
216068
  setValue: {
215958
216069
  targetComponentIdx: target.componentIdx,
215959
- unresolvedPath: target.unresolvedPath
216070
+ unresolvedPath: target.unresolvedPath,
216071
+ targetOriginalPath: target.originalPath
215960
216072
  }
215961
216073
  };
215962
216074
  }
@@ -215964,7 +216076,8 @@ class CallAction extends InlineComponent {
215964
216076
  return {
215965
216077
  setValue: {
215966
216078
  targetComponentIdx: null,
215967
- unresolvedPath: null
216079
+ unresolvedPath: null,
216080
+ targetOriginalPath: null
215968
216081
  }
215969
216082
  };
215970
216083
  }
@@ -215992,7 +216105,7 @@ class CallAction extends InlineComponent {
215992
216105
  if (actionId) {
215993
216106
  args.actionId = actionId;
215994
216107
  }
215995
- await this.coreFunctions.performAction({
216108
+ const result2 = await this.coreFunctions.performAction({
215996
216109
  componentIdx: targetIdx,
215997
216110
  actionName,
215998
216111
  args,
@@ -216005,6 +216118,9 @@ class CallAction extends InlineComponent {
216005
216118
  },
216006
216119
  caseInsensitiveMatch: true
216007
216120
  });
216121
+ if (result2?.actionUnavailable) {
216122
+ await this.warnActionUnavailable(actionName);
216123
+ }
216008
216124
  await this.coreFunctions.triggerChainedActions({
216009
216125
  componentIdx: this.componentIdx,
216010
216126
  actionId,
@@ -216013,6 +216129,32 @@ class CallAction extends InlineComponent {
216013
216129
  });
216014
216130
  }
216015
216131
  }
216132
+ /**
216133
+ * Warn that `actionName` is not an action of the component `target`
216134
+ * names, quoting the reference as the author wrote it.
216135
+ *
216136
+ * Says nothing when the reference has no source behind it — a `target`
216137
+ * a composite built rather than a document supplied. There is no text to
216138
+ * quote then, and a warning that names an empty reference tells an author
216139
+ * less than the console line `performAction` has already written.
216140
+ */
216141
+ async warnActionUnavailable(actionName) {
216142
+ const referenceText = this.coreFunctions.doenetMLStringForReference(
216143
+ await this.stateValues.targetOriginalPath
216144
+ );
216145
+ if (!referenceText) {
216146
+ return;
216147
+ }
216148
+ this.coreFunctions.addDiagnostic(
216149
+ codedDiagnostic({
216150
+ type: "warning",
216151
+ code: "doenet-w0102",
216152
+ args: { action: actionName, reference: `$${referenceText}` },
216153
+ position: this.position,
216154
+ sourceDoc: this.sourceDoc
216155
+ })
216156
+ );
216157
+ }
216016
216158
  async callActionIfTriggerNewlyTrue({
216017
216159
  stateValues,
216018
216160
  previousValues,
@@ -233341,4 +233483,4 @@ export {
233341
233483
  getDefaultExportFromCjs as g,
233342
233484
  updateSyntaxFromV06toV07 as u
233343
233485
  };
233344
- //# sourceMappingURL=index-Beuf9VU2.js.map
233486
+ //# sourceMappingURL=index-R_p56uGO.js.map