* @returns {Array<Array<string>>} its words, each the codes of its letters, case-folded; a letter with an accent and no code of its own keys its base letter, any other character without a code is skipped and a word left without one is dropped.
* @returns {Array<Array<string>>} one word holding one sign: the codes of its letters keyed without the gap between letters; none for a text without a code.
*/
functionjoined(text){
constsign=words(text).flat().join("");
returnsign?[[sign]]:[];
}
/**
* @param {number} wpm the speed in words per minute.
* @returns {number} the length of one dot in ms after PARIS: a word is 50 dot units.
*/
functiondot(wpm){
returnMINUTE/(PARIS*wpm);
}
functionletterUnits(code,at,tones){
letend=at;
[...code].forEach((mark,index)=>{
constlength=mark==="-"?UNITS.dash:UNITS.dot;
tones.push([end,length]);
end+=length+(index<code.length-1?UNITS.inner:0);
});
returnend;
}
/**
* @param {Array<Array<string>>} signs words of letter codes, as words and joined give them.
* @param {number} wpm the speed in words per minute.
* @returns {object} tones, every tone as [start, length] in ms, and ms, the whole length in ms, each word closed by the gap between words as PARIS counts it.