pxt-core 8.3.5 → 8.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/built/pxt.js +10 -3
- package/built/pxteditor.d.ts +2 -0
- package/built/pxtlib.js +10 -3
- package/built/target.js +1 -1
- package/built/web/main.js +1 -1
- package/built/web/pxtapp.js +1 -1
- package/built/web/pxtembed.js +1 -1
- package/built/web/pxtlib.js +1 -1
- package/built/web/pxtworker.js +1 -1
- package/built/web/rtlsemantic.css +1 -1
- package/built/web/semantic.css +1 -1
- package/built/web/skillmap/js/main.6eec9e0f.chunk.js +1 -0
- package/localtypings/projectheader.d.ts +1 -0
- package/package.json +1 -1
- package/react-common/components/share/Share.tsx +6 -2
- package/react-common/components/share/ShareInfo.tsx +12 -3
- package/theme/tutorial-sidebar.less +5 -3
- package/theme/tutorial.less +2 -2
- package/webapp/public/skillmap.html +1 -1
- package/built/web/skillmap/js/main.6fa0eaff.chunk.js +0 -1
package/built/pxt.js
CHANGED
|
@@ -105222,6 +105222,7 @@ var pxt;
|
|
|
105222
105222
|
.then(resp => handleResponseAsync(resp));
|
|
105223
105223
|
}
|
|
105224
105224
|
function handleResponseAsync(resp) {
|
|
105225
|
+
var _a, _b, _c;
|
|
105225
105226
|
const code = resp.statusCode;
|
|
105226
105227
|
const errorData = pxt.Util.jsonTryParse(resp.text) || {};
|
|
105227
105228
|
pxt.debug(`upload result: ${code}`);
|
|
@@ -105229,16 +105230,22 @@ var pxt;
|
|
|
105229
105230
|
pxt.log(`create new translation file: ${filename}`);
|
|
105230
105231
|
return uploadAsync("add-file", {});
|
|
105231
105232
|
}
|
|
105232
|
-
else if (code == 404 && errorData.error
|
|
105233
|
+
else if (code == 404 && ((_a = errorData.error) === null || _a === void 0 ? void 0 : _a.code) == 17) {
|
|
105233
105234
|
return createDirectoryAsync(branch, prj, key, filename.replace(/\/[^\/]+$/, ""), incr)
|
|
105234
105235
|
.then(() => startAsync());
|
|
105235
105236
|
}
|
|
105236
|
-
else if (!errorData.success && errorData.error
|
|
105237
|
+
else if (!errorData.success && ((_b = errorData.error) === null || _b === void 0 ? void 0 : _b.code) == 53) {
|
|
105237
105238
|
// file is being updated
|
|
105238
105239
|
pxt.log(`${filename} being updated, waiting 5s and retry...`);
|
|
105239
105240
|
return pxt.U.delay(5000) // wait 5s and try again
|
|
105240
105241
|
.then(() => uploadTranslationAsync(branch, prj, key, filename, data));
|
|
105241
105242
|
}
|
|
105243
|
+
else if (code == 429 && ((_c = errorData.error) === null || _c === void 0 ? void 0 : _c.code) == 55) {
|
|
105244
|
+
// Too many concurrent requests
|
|
105245
|
+
pxt.log(`Maximum concurrent requests reached, waiting 10s and retry...`);
|
|
105246
|
+
return pxt.U.delay(10 * 1000) // wait 10s and try again
|
|
105247
|
+
.then(() => uploadTranslationAsync(branch, prj, key, filename, data));
|
|
105248
|
+
}
|
|
105242
105249
|
else if (code == 200 || errorData.success) {
|
|
105243
105250
|
// something crowdin reports 500 with success=true
|
|
105244
105251
|
return Promise.resolve();
|
|
@@ -120724,7 +120731,7 @@ var pxt;
|
|
|
120724
120731
|
return undefined;
|
|
120725
120732
|
if (scriptid[0] == "_" && scriptid.length == 13)
|
|
120726
120733
|
return scriptid;
|
|
120727
|
-
if (scriptid.length == 23 && /^[0-9\-]+$/.test(scriptid))
|
|
120734
|
+
if (scriptid.length == 23 && /^[0-9\-]+$/.test(scriptid) || scriptid.length == 24 && /^S[0-9\-]+$/.test(scriptid))
|
|
120728
120735
|
return scriptid;
|
|
120729
120736
|
return undefined;
|
|
120730
120737
|
}
|
package/built/pxteditor.d.ts
CHANGED
|
@@ -344,6 +344,8 @@ declare namespace pxt.editor {
|
|
|
344
344
|
convertCloudProjectsToLocal(userId: string): Promise<void>;
|
|
345
345
|
setLanguageRestrictionAsync(restriction: pxt.editor.LanguageRestriction): Promise<void>;
|
|
346
346
|
hasHeaderBeenPersistentShared(): boolean;
|
|
347
|
+
getSharePreferenceForHeader(): boolean;
|
|
348
|
+
saveSharePreferenceForHeaderAsync(anonymousByDefault: boolean): Promise<void>;
|
|
347
349
|
}
|
|
348
350
|
interface IHexFileImporter {
|
|
349
351
|
id: string;
|
package/built/pxtlib.js
CHANGED
|
@@ -7536,6 +7536,7 @@ var pxt;
|
|
|
7536
7536
|
.then(resp => handleResponseAsync(resp));
|
|
7537
7537
|
}
|
|
7538
7538
|
function handleResponseAsync(resp) {
|
|
7539
|
+
var _a, _b, _c;
|
|
7539
7540
|
const code = resp.statusCode;
|
|
7540
7541
|
const errorData = pxt.Util.jsonTryParse(resp.text) || {};
|
|
7541
7542
|
pxt.debug(`upload result: ${code}`);
|
|
@@ -7543,16 +7544,22 @@ var pxt;
|
|
|
7543
7544
|
pxt.log(`create new translation file: ${filename}`);
|
|
7544
7545
|
return uploadAsync("add-file", {});
|
|
7545
7546
|
}
|
|
7546
|
-
else if (code == 404 && errorData.error
|
|
7547
|
+
else if (code == 404 && ((_a = errorData.error) === null || _a === void 0 ? void 0 : _a.code) == 17) {
|
|
7547
7548
|
return createDirectoryAsync(branch, prj, key, filename.replace(/\/[^\/]+$/, ""), incr)
|
|
7548
7549
|
.then(() => startAsync());
|
|
7549
7550
|
}
|
|
7550
|
-
else if (!errorData.success && errorData.error
|
|
7551
|
+
else if (!errorData.success && ((_b = errorData.error) === null || _b === void 0 ? void 0 : _b.code) == 53) {
|
|
7551
7552
|
// file is being updated
|
|
7552
7553
|
pxt.log(`${filename} being updated, waiting 5s and retry...`);
|
|
7553
7554
|
return pxt.U.delay(5000) // wait 5s and try again
|
|
7554
7555
|
.then(() => uploadTranslationAsync(branch, prj, key, filename, data));
|
|
7555
7556
|
}
|
|
7557
|
+
else if (code == 429 && ((_c = errorData.error) === null || _c === void 0 ? void 0 : _c.code) == 55) {
|
|
7558
|
+
// Too many concurrent requests
|
|
7559
|
+
pxt.log(`Maximum concurrent requests reached, waiting 10s and retry...`);
|
|
7560
|
+
return pxt.U.delay(10 * 1000) // wait 10s and try again
|
|
7561
|
+
.then(() => uploadTranslationAsync(branch, prj, key, filename, data));
|
|
7562
|
+
}
|
|
7556
7563
|
else if (code == 200 || errorData.success) {
|
|
7557
7564
|
// something crowdin reports 500 with success=true
|
|
7558
7565
|
return Promise.resolve();
|
|
@@ -23038,7 +23045,7 @@ var pxt;
|
|
|
23038
23045
|
return undefined;
|
|
23039
23046
|
if (scriptid[0] == "_" && scriptid.length == 13)
|
|
23040
23047
|
return scriptid;
|
|
23041
|
-
if (scriptid.length == 23 && /^[0-9\-]+$/.test(scriptid))
|
|
23048
|
+
if (scriptid.length == 23 && /^[0-9\-]+$/.test(scriptid) || scriptid.length == 24 && /^S[0-9\-]+$/.test(scriptid))
|
|
23042
23049
|
return scriptid;
|
|
23043
23050
|
return undefined;
|
|
23044
23051
|
}
|
package/built/target.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var pxtTargetBundle = {"id":"core","name":"Microsoft MakeCode","title":"Microsoft MakeCode","description":"A toolkit to build JavaScript Blocks editors.","bundleddirs":[],"compile":{"hasHex":false,"jsRefCounting":false,"switches":{},"noSourceInFlash":true,"utf8":true},"appTheme":{"logoUrl":"https://makecode.com/","logo":"@cdnUrl@/blob/4d9a6c8b1fa4c75911b2c468cb3ca1cdfb61fcb6/static/logo.svg","docsLogo":"@cdnUrl@/blob/4d9a6c8b1fa4c75911b2c468cb3ca1cdfb61fcb6/static/logo.svg","portraitLogo":"@cdnUrl@/blob/4d9a6c8b1fa4c75911b2c468cb3ca1cdfb61fcb6/static/logo.svg","organizationLogo":"@cdnUrl@/blob/106597ae039a275897661651b96856220c9b0fad/static/orglogo.png","organizationWideLogo":"@cdnUrl@/blob/d6139e3d0af51f02aa5f8765ecb0985acbd98551/static/orglogowide.png","homeUrl":"https://makecode.com/","cardLogo":"@cdnUrl@/blob/4d9a6c8b1fa4c75911b2c468cb3ca1cdfb61fcb6/static/logo.svg","appLogo":"@cdnUrl@/blob/4d9a6c8b1fa4c75911b2c468cb3ca1cdfb61fcb6/static/logo.svg","crowdinProject":"makecode","docMenu":[{"name":"About","path":"/about"},{"name":"Docs","path":"/docs"},{"name":"Blog","path":"/blog"}],"hideDocsEdit":true,"hideDocsSimulator":true,"TOC":[{"name":"About MakeCode","path":"/about","subitems":[]},{"name":"Blog","path":"/blog","subitems":[]},{"name":"Online Learning","path":"/online-learning","subitems":[]},{"name":"Contact Us","path":"/contact","subitems":[]},{"name":"Tools","path":"/tools","subitems":[]},{"name":"Technical Docs","path":"/docs","subitems":[{"name":"JS Editor Features","path":"/js/editor","subitems":[]},{"name":"Programming Language","path":"/language","subitems":[]},{"name":"Async Functions","path":"/async","subitems":[]},{"name":"Partial Flashing","path":"/partial-flashing","subitems":[]},{"name":"Source Embedding","path":"/source-embedding","subitems":[]},{"name":"Updating Blockly Version","path":"/develop/blocklyupgrade","subitems":[]},{"name":"Accessibility","path":"/develop/accessibility","subitems":[]},{"name":"Profiling","path":"/js/profiling","subitems":[]},{"name":"Debugging Hardware","path":"/develop/hw-debugging","subitems":[]}]},{"name":"Creating Targets","path":"/target-creation","subitems":[{"name":"pxtarget.json","path":"/targets/pxtarget","subitems":[]},{"name":"Defining Blocks","path":"/defining-blocks","subitems":[]},{"name":"Auto-generation of .d.ts","path":"/simshim","subitems":[]},{"name":"Static File Drops","path":"/cli/staticpkg","subitems":[]},{"name":"Simulator","path":"/targets/simulator","subitems":[]},{"name":"Theming Editor","path":"/targets/theming","subitems":[]},{"name":"Embedding resources","path":"/jres","subitems":[]}]},{"name":"Creating Extensions","path":"/extensions","subitems":[{"name":"Getting started","path":"/extensions/getting-started","subitems":[]},{"name":"pxt.json","path":"/extensions/pxt-json","subitems":[]},{"name":"Extension versioning","path":"/extensions/versioning","subitems":[]},{"name":"Extension localization","path":"/extensions/localization","subitems":[]},{"name":"Extension approval","path":"/extensions/approval","subitems":[]},{"name":"Editor extensions","path":"/extensions/extensions","subitems":[]},{"name":"GitHub Extension Authoring","path":"/extensions/github-authoring","subitems":[]}]},{"name":"Writing Docs","path":"/writing-docs","subitems":[{"name":"Macros","path":"/writing-docs/macros","subitems":[]},{"name":"Anchors","path":"/writing-docs/anchors","subitems":[]},{"name":"Tutorials","path":"/writing-docs/tutorials","subitems":[]},{"name":"User Tutorials","path":"/writing-docs/user-tutorials","subitems":[]},{"name":"Skillmaps","path":"/writing-docs/skillmaps","subitems":[]},{"name":"Routing","path":"/writing-docs/routing","subitems":[]},{"name":"Testing","path":"/writing-docs/testing","subitems":[]}]},{"name":"Translations","path":"/translate","subitems":[{"name":"Translation languages","path":"/translate/languages","subitems":[]},{"name":"Localization files","path":"/translate/files","subitems":[]},{"name":"Parts to translate","path":"/translate/parts","subitems":[]},{"name":"Translator roles","path":"/translate/roles","subitems":[]},{"name":"In context translation","path":"/translate/in-context","subitems":[]}]},{"name":"Blocks Embedding","path":"/blocks-embed","subitems":[]},{"name":"Command Line Interface","path":"/cli","subitems":[{"name":"install","path":"/cli/install","subitems":[]},{"name":"build","path":"/cli/build","subitems":[]},{"name":"bump","path":"/cli/bump","subitems":[]},{"name":"deploy","path":"/cli/deploy","subitems":[]},{"name":"console","path":"/cli/console","subitems":[]},{"name":"gdb","path":"/cli/gdb","subitems":[]},{"name":"staticpkg","path":"/cli/staticpkg","subitems":[]},{"name":"update","path":"/cli/update","subitems":[]},{"name":"pyconv","path":"/cli/pyconv","subitems":[]},{"name":"hidserial","path":"/cli/hidserial","subitems":[]},{"name":"hiddmesg","path":"/cli/hiddmesg","subitems":[]},{"name":"login","path":"/cli/login","subitems":[]}]},{"name":"Labs","path":"/labs","subitems":[]},{"name":"UF2 File Format","path":"https://github.com/microsoft/uf2","subitems":[]},{"name":"Accessibility","path":"/accessibility","subitems":[]},{"name":"Telemetry","path":"/telemetry","subitems":[]}],"embedUrl":"https://makecode.com/","id":"core","title":"Microsoft MakeCode","name":"Microsoft MakeCode","description":"A toolkit to build JavaScript Blocks editors.","htmlDocIncludes":{}},"uploadDocs":true,"versions":{"branch":"v8.3.5","tag":"v8.3.5","commits":"https://github.com/microsoft/pxt/commits/fe177e6d8e189462642acd7cd3128eedb634490e","target":"8.3.5","pxt":"8.3.5"},"blocksprj":{"id":"blocksprj","config":{"name":"empty","description":"An empty project for docs rendering","dependencies":{},"files":["main.ts","pxt-core.d.ts","pxt-helpers.ts"],"public":true,"additionalFilePaths":[]},"files":{"main.ts":"\n"}},"tsprj":{"id":"tsprj","config":{"name":"empty","description":"An empty project for docs rendering","dependencies":{},"files":["main.ts","pxt-core.d.ts","pxt-helpers.ts"],"public":true,"additionalFilePaths":[]},"files":{"main.ts":"\n"}},"bundledpkgs":{},"apiInfo":{"libs/blocksprj":{"apis":{"byQName":{"Array":{"kind":5,"retType":"","attributes":{"blockNamespace":"Arrays","jsDoc":"Add, remove, and replace items in lists."}},"Array.length":{"kind":2,"retType":"number","attributes":{"weight":84,"blockId":"lists_length","block":"length of %VALUE","blockBuiltin":"true","blockNamespace":"arrays","jsDoc":"Get or set the length of an array. This number is one more than the index of the last element the array.","_def":{"parts":[{"kind":"label","text":"length of ","style":[]},{"kind":"param","name":"VALUE","ref":false}],"parameters":[{"kind":"param","name":"VALUE","ref":false}]}},"isInstance":true},"Array.push":{"kind":-1,"attributes":{"help":"arrays/push","weight":50,"blockId":"array_push","block":"%list| add value %value| to end","blockNamespace":"arrays","group":"Modify","paramHelp":{"items":"New elements of the Array."},"jsDoc":"Append a new element to an array.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" add value ","style":[]},{"kind":"param","name":"value","ref":false},{"kind":"break"},{"kind":"label","text":" to end","style":[]}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"item","type":"T"}],"isInstance":true,"pyQName":"Array.append"},"Array.concat":{"kind":-1,"retType":"T[]","attributes":{"helper":"arrayConcat","weight":40,"paramHelp":{"arr":"The other array that is being concatenated with"},"jsDoc":"Concatenates the values with another array."},"parameters":[{"name":"arr","description":"The other array that is being concatenated with","type":"T[]"}],"isInstance":true},"Array.pop":{"kind":-1,"retType":"T","attributes":{"help":"arrays/pop","weight":45,"blockId":"array_pop","block":"get and remove last value from %list","blockNamespace":"arrays","group":"Read","jsDoc":"Remove the last element from an array and return it.","_def":{"parts":[{"kind":"label","text":"get and remove last value from ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true},"Array.reverse":{"kind":-1,"attributes":{"help":"arrays/reverse","helper":"arrayReverse","weight":10,"blockId":"array_reverse","block":"reverse %list","blockNamespace":"arrays","group":"Operations","jsDoc":"Reverse the elements in an array. The first array element becomes the last, and the last array element becomes the first.","_def":{"parts":[{"kind":"label","text":"reverse ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true},"Array.shift":{"kind":-1,"retType":"T","attributes":{"help":"arrays/shift","helper":"arrayShift","weight":30,"blockId":"array_shift","block":"get and remove first value from %list","blockNamespace":"arrays","group":"Read","jsDoc":"Remove the first element from an array and return it. This method changes the length of the array.","_def":{"parts":[{"kind":"label","text":"get and remove first value from ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true},"Array.unshift":{"kind":-1,"retType":"number","attributes":{"help":"arrays/unshift","helper":"arrayUnshift","weight":25,"blockId":"array_unshift","block":"%list| insert %value| at beginning","blockNamespace":"arrays","group":"Modify","paramHelp":{"element":"to insert at the start of the Array."},"jsDoc":"Add one element to the beginning of an array and return the new length of the array.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" insert ","style":[]},{"kind":"param","name":"value","ref":false},{"kind":"break"},{"kind":"label","text":" at beginning","style":[]}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"value","type":"T"}],"isInstance":true},"Array.slice":{"kind":-1,"retType":"T[]","attributes":{"paramDefl":{"start":"0","end":"0"},"help":"arrays/slice","helper":"arraySlice","weight":41,"blockNamespace":"arrays","paramHelp":{"start":"The beginning of the specified portion of the array. eg: 0","end":"The end of the specified portion of the array. eg: 0"},"jsDoc":"Return a section of an array."},"parameters":[{"name":"start","description":"The beginning of the specified portion of the array. eg: 0","initializer":"undefined","default":"0"},{"name":"end","description":"The end of the specified portion of the array. eg: 0","initializer":"undefined","default":"0"}],"isInstance":true},"Array.splice":{"kind":-1,"attributes":{"paramDefl":{"start":"0","deleteCount":"0"},"helper":"arraySplice","weight":40,"paramHelp":{"start":"The zero-based location in the array from which to start removing elements. eg: 0","deleteCount":"The number of elements to remove. eg: 0"},"jsDoc":"Remove elements from an array."},"parameters":[{"name":"start","description":"The zero-based location in the array from which to start removing elements. eg: 0","default":"0"},{"name":"deleteCount","description":"The number of elements to remove. eg: 0","default":"0"}],"isInstance":true},"Array.join":{"kind":-1,"retType":"string","attributes":{"helper":"arrayJoin","weight":40,"paramHelp":{"sep":"the string separator"},"jsDoc":"joins all elements of an array into a string and returns this string."},"parameters":[{"name":"sep","description":"the string separator","type":"string","initializer":"undefined"}],"isInstance":true},"Array.some":{"kind":-1,"retType":"boolean","attributes":{"helper":"arraySome","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to two arguments. The some method calls the callbackfn function one time for each element in the array."},"jsDoc":"Tests whether at least one element in the array passes the test implemented by the provided function."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to two arguments. The some method calls the callbackfn function one time for each element in the array.","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true},"Array.every":{"kind":-1,"retType":"boolean","attributes":{"helper":"arrayEvery","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to two arguments. The every method calls the callbackfn function one time for each element in the array."},"jsDoc":"Tests whether all elements in the array pass the test implemented by the provided function."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to two arguments. The every method calls the callbackfn function one time for each element in the array.","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true},"Array.sort":{"kind":-1,"retType":"T[]","attributes":{"helper":"arraySort","weight":40,"paramHelp":{"specifies":"a function that defines the sort order. If omitted, the array is sorted according to the prmitive type"},"jsDoc":"Sort the elements of an array in place and returns the array. The sort is not necessarily stable."},"parameters":[{"name":"callbackfn","type":"(value1: T, value2: T) => number","initializer":"undefined","handlerParameters":[{"name":"value1","type":"T"},{"name":"value2","type":"T"}]}],"isInstance":true},"Array.map":{"kind":-1,"retType":"U[]","attributes":{"helper":"arrayMap","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to two arguments. The map method calls the callbackfn function one time for each element in the array."},"jsDoc":"Call a defined callback function on each element of an array, and return an array containing the results."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to two arguments. The map method calls the callbackfn function one time for each element in the array.","type":"(value: T, index: number) => U","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true},"Array.forEach":{"kind":-1,"attributes":{"helper":"arrayForEach","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to two arguments. The forEach method calls the callbackfn function one time for each element in the array."},"jsDoc":"Call a defined callback function on each element of an array."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to two arguments. The forEach method calls the callbackfn function one time for each element in the array.","type":"(value: T, index: number) => void","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true,"pyQName":"Array.for_each"},"Array.filter":{"kind":-1,"retType":"T[]","attributes":{"helper":"arrayFilter","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to two arguments. The filter method calls the callbackfn function one time for each element in the array."},"jsDoc":"Return the elements of an array that meet the condition specified in a callback function."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to two arguments. The filter method calls the callbackfn function one time for each element in the array.","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true},"Array.fill":{"kind":-1,"retType":"T[]","attributes":{"helper":"arrayFill","weight":39,"jsDoc":"Fills all the elements of an array from a start index to an end index with a static value. The end index is not included."},"parameters":[{"name":"value","type":"T"},{"name":"start","initializer":"undefined"},{"name":"end","initializer":"undefined"}],"isInstance":true},"Array.find":{"kind":-1,"retType":"T","attributes":{"helper":"arrayFind","weight":40,"paramHelp":{"callbackfn":""},"jsDoc":"Returns the value of the first element in the array that satisfies the provided testing function. Otherwise undefined is returned."},"parameters":[{"name":"callbackfn","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true},"Array.reduce":{"kind":-1,"retType":"U","attributes":{"helper":"arrayReduce","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to three arguments. The reduce method calls the callbackfn function one time for each element in the array.","initialValue":"Initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value."},"jsDoc":"Call the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to three arguments. The reduce method calls the callbackfn function one time for each element in the array.","type":"(previousValue: U, currentValue: T, currentIndex: number) => U","handlerParameters":[{"name":"previousValue","type":"U"},{"name":"currentValue","type":"T"},{"name":"currentIndex","type":"number"}]},{"name":"initialValue","description":"Initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.","type":"U"}],"isInstance":true},"Array.removeElement":{"kind":-1,"retType":"boolean","attributes":{"weight":48,"jsDoc":"Remove the first occurence of an object. Returns true if removed."},"parameters":[{"name":"element","type":"T"}],"isInstance":true,"pyQName":"Array.remove_element"},"Array.removeAt":{"kind":-1,"retType":"T","attributes":{"help":"arrays/remove-at","weight":47,"blockId":"array_removeat","block":"%list| get and remove value at %index","blockNamespace":"arrays","group":"Read","jsDoc":"Remove the element at a certain index.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" get and remove value at ","style":[]},{"kind":"param","name":"index","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"index","ref":false}]}},"parameters":[{"name":"index"}],"isInstance":true,"pyQName":"Array.remove_at"},"Array.insertAt":{"kind":-1,"attributes":{"paramDefl":{"index":"0","the":"0"},"help":"arrays/insert-at","weight":20,"blockId":"array_insertAt","block":"%list| insert at %index| value %value","blockNamespace":"arrays","group":"Modify","paramHelp":{"index":"the zero-based position in the list to insert the value, eg: 0","the":"value to insert, eg: 0"},"jsDoc":"Insert the value at a particular index, increases length by 1","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" insert at ","style":[]},{"kind":"param","name":"index","ref":false},{"kind":"break"},{"kind":"label","text":" value ","style":[]},{"kind":"param","name":"value","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"index","ref":false},{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"index","description":"the zero-based position in the list to insert the value, eg: 0","default":"0"},{"name":"value","type":"T"}],"isInstance":true,"pyQName":"Array.insert_at"},"Array.indexOf":{"kind":-1,"retType":"number","attributes":{"help":"arrays/index-of","weight":40,"blockId":"array_indexof","block":"%list| find index of %value","blockNamespace":"arrays","group":"Operations","paramHelp":{"item":"The value to locate in the array.","fromIndex":"The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0."},"jsDoc":"Return the index of the first occurrence of a value in an array.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" find index of ","style":[]},{"kind":"param","name":"value","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"item","description":"The value to locate in the array.","type":"T"},{"name":"fromIndex","description":"The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.","initializer":"undefined"}],"isInstance":true,"pyQName":"Array.index"},"Array.get":{"kind":-1,"retType":"T","attributes":{"paramDefl":{"index":"0"},"help":"arrays/get","weight":85,"paramHelp":{"index":"the zero-based position in the list of the item, eg: 0"},"jsDoc":"Get the value at a particular index"},"parameters":[{"name":"index","description":"the zero-based position in the list of the item, eg: 0","default":"0"}],"isInstance":true},"Array.set":{"kind":-1,"attributes":{"paramDefl":{"index":"0","value":"0"},"help":"arrays/set","weight":84,"paramHelp":{"index":"the zero-based position in the list to store the value, eg: 0","value":"the value to insert, eg: 0"},"jsDoc":"Store a value at a particular index"},"parameters":[{"name":"index","description":"the zero-based position in the list to store the value, eg: 0","default":"0"},{"name":"value","description":"the value to insert, eg: 0","type":"T","default":"0"}],"isInstance":true},"Array._pickRandom":{"kind":-1,"retType":"T","attributes":{"help":"arrays/pick-random","helper":"arrayPickRandom","weight":25,"blockId":"array_pickRandom","block":"get random value from %list","blockNamespace":"arrays","group":"Read","jsDoc":"Return a random value from the array","_def":{"parts":[{"kind":"label","text":"get random value from ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true,"pyQName":"Array._pick_random"},"Array._unshiftStatement":{"kind":-1,"attributes":{"help":"arrays/unshift","helper":"arrayUnshift","weight":24,"blockId":"array_unshift_statement","block":"%list| insert %value| at beginning","blockNamespace":"arrays","blockAliasFor":"Array.unshift","group":"Modify","paramHelp":{"element":"to insert at the start of the Array."},"jsDoc":"Add one element to the beginning of an array and return the new length of the array.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" insert ","style":[]},{"kind":"param","name":"value","ref":false},{"kind":"break"},{"kind":"label","text":" at beginning","style":[]}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"value","type":"T"}],"isInstance":true,"pyQName":"Array._unshift_statement"},"Array._popStatement":{"kind":-1,"attributes":{"help":"arrays/pop","weight":44,"blockId":"array_pop_statement","block":"remove last value from %list","blockNamespace":"arrays","blockAliasFor":"Array.pop","group":"Modify","jsDoc":"Remove the last element from an array and return it.","_def":{"parts":[{"kind":"label","text":"remove last value from ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true,"pyQName":"Array._pop_statement"},"Array._shiftStatement":{"kind":-1,"attributes":{"help":"arrays/shift","helper":"arrayShift","weight":29,"blockId":"array_shift_statement","block":"remove first value from %list","blockNamespace":"arrays","blockAliasFor":"Array.shift","group":"Modify","jsDoc":"Remove the first element from an array and return it. This method changes the length of the array.","_def":{"parts":[{"kind":"label","text":"remove first value from ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true,"pyQName":"Array._shift_statement"},"Array._removeAtStatement":{"kind":-1,"attributes":{"help":"arrays/remove-at","weight":14,"blockId":"array_removeat_statement","block":"%list| remove value at %index","blockNamespace":"arrays","blockAliasFor":"Array.removeAt","group":"Modify","jsDoc":"Remove the element at a certain index.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" remove value at ","style":[]},{"kind":"param","name":"index","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"index","ref":false}]}},"parameters":[{"name":"index"}],"isInstance":true,"pyQName":"Array._remove_at_statement"},"String":{"kind":5,"retType":"","attributes":{"blockNamespace":"text","jsDoc":"Combine, split, and search text strings."}},"String.concat":{"kind":-1,"retType":"string","attributes":{"weight":49,"blockId":"string_concat","blockNamespace":"text","paramHelp":{"other":"The string to append to the end of the string."},"jsDoc":"Returns a string that contains the concatenation of two or more strings."},"parameters":[{"name":"other","description":"The string to append to the end of the string.","type":"string"}],"isInstance":true},"String.charAt":{"kind":-1,"retType":"string","attributes":{"weight":48,"help":"text/char-at","blockId":"string_get","block":"char from %this=text|at %pos","blockNamespace":"text","paramHelp":{"index":"The zero-based index of the desired character."},"jsDoc":"Return the character at the specified index.","_def":{"parts":[{"kind":"label","text":"char from ","style":[]},{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":"at ","style":[]},{"kind":"param","name":"pos","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"pos","ref":false}]}},"parameters":[{"name":"index","description":"The zero-based index of the desired character."}],"isInstance":true,"pyQName":"String.char_at"},"String.length":{"kind":2,"retType":"number","attributes":{"property":"true","weight":47,"blockId":"text_length","block":"length of %VALUE","blockBuiltin":"true","blockNamespace":"text","jsDoc":"Returns the length of a String object.","_def":{"parts":[{"kind":"label","text":"length of ","style":[]},{"kind":"param","name":"VALUE","ref":false}],"parameters":[{"kind":"param","name":"VALUE","ref":false}]}},"isInstance":true},"String.charCodeAt":{"kind":-1,"retType":"number","attributes":{"paramHelp":{"index":"The zero-based index of the desired character. If there is no character at the specified index, NaN is returned."},"jsDoc":"Return the Unicode value of the character at the specified location."},"parameters":[{"name":"index","description":"The zero-based index of the desired character. If there is no character at the specified index, NaN is returned."}],"isInstance":true,"pyQName":"String.char_code_at"},"String.compare":{"kind":-1,"retType":"number","attributes":{"help":"text/compare","blockId":"string_compare","block":"compare %this=text| to %that","blockNamespace":"text","paramHelp":{"that":"String to compare to target string"},"jsDoc":"See how the order of characters in two strings is different (in ASCII encoding).","_def":{"parts":[{"kind":"label","text":"compare ","style":[]},{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":" to ","style":[]},{"kind":"param","name":"that","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"that","ref":false}]}},"parameters":[{"name":"that","description":"String to compare to target string","type":"string"}],"isInstance":true},"String.substr":{"kind":-1,"retType":"string","attributes":{"paramDefl":{"start":"0","length":"10"},"helper":"stringSubstr","help":"text/substr","blockId":"string_substr","block":"substring of %this=text|from %start|of length %length","blockNamespace":"text","paramHelp":{"start":"first character index; can be negative from counting from the end, eg:0","length":"number of characters to extract, eg: 10"},"jsDoc":"Return a substring of the current string.","_def":{"parts":[{"kind":"label","text":"substring of ","style":[]},{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":"from ","style":[]},{"kind":"param","name":"start","ref":false},{"kind":"break"},{"kind":"label","text":"of length ","style":[]},{"kind":"param","name":"length","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"start","ref":false},{"kind":"param","name":"length","ref":false}]}},"parameters":[{"name":"start","description":"first character index; can be negative from counting from the end, eg:0","default":"0"},{"name":"length","description":"number of characters to extract, eg: 10","initializer":"undefined","default":"10"}],"isInstance":true},"String.replace":{"kind":-1,"retType":"string","attributes":{"helper":"stringReplace","paramHelp":{"toReplace":"the substring to replace in the current string","replacer":"either the string that replaces toReplace in the current string,"},"jsDoc":"Return the current string with the first occurence of toReplace\nreplaced with the replacer\n\n\nor a function that accepts the substring and returns the replacement string."},"parameters":[{"name":"toReplace","description":"the substring to replace in the current string","type":"string"},{"name":"replacer","description":"either the string that replaces toReplace in the current string,","type":"string | ((sub: string) => string)"}],"isInstance":true},"String.replaceAll":{"kind":-1,"retType":"string","attributes":{"helper":"stringReplaceAll","paramHelp":{"toReplace":"the substring to replace in the current string","replacer":"either the string that replaces toReplace in the current string,"},"jsDoc":"Return the current string with each occurence of toReplace\nreplaced with the replacer\n\n\nor a function that accepts the substring and returns the replacement string."},"parameters":[{"name":"toReplace","description":"the substring to replace in the current string","type":"string"},{"name":"replacer","description":"either the string that replaces toReplace in the current string,","type":"string | ((sub: string) => string)"}],"isInstance":true,"pyQName":"String.replace_all"},"String.slice":{"kind":-1,"retType":"string","attributes":{"paramDefl":{"start":"0"},"helper":"stringSlice","paramHelp":{"start":"first character index; can be negative from counting from the end, eg:0","end":"one-past-last character index"},"jsDoc":"Return a substring of the current string."},"parameters":[{"name":"start","description":"first character index; can be negative from counting from the end, eg:0","default":"0"},{"name":"end","description":"one-past-last character index","initializer":"undefined"}],"isInstance":true},"String.isEmpty":{"kind":-1,"retType":"boolean","attributes":{"helper":"stringEmpty","help":"text/is-empty","blockId":"string_isempty","blockNamespace":"text","block":"%this=text| is empty","jsDoc":"Returns a value indicating if the string is empty","_def":{"parts":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":" is empty","style":[]}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false}]}},"parameters":[],"isInstance":true,"pyQName":"String.is_empty"},"String.indexOf":{"kind":-1,"retType":"number","attributes":{"help":"text/index-of","blockId":"string_indexof","blockNamespace":"text","block":"%this=text|find index of %searchValue","paramHelp":{"searchValue":"the text to find","start":"optional start index for the search"},"jsDoc":"Returns the position of the first occurrence of a specified value in a string.","_def":{"parts":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":"find index of ","style":[]},{"kind":"param","name":"searchValue","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"searchValue","ref":false}]}},"parameters":[{"name":"searchValue","description":"the text to find","type":"string"},{"name":"start","description":"optional start index for the search","initializer":"undefined"}],"isInstance":true,"pyQName":"String.index_of"},"String.includes":{"kind":-1,"retType":"boolean","attributes":{"help":"text/includes","blockId":"string_includes","blockNamespace":"text","block":"%this=text|includes %searchValue","paramHelp":{"searchValue":"the text to find","start":"optional start index for the search"},"jsDoc":"Determines whether a string contains the characters of a specified string.","_def":{"parts":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":"includes ","style":[]},{"kind":"param","name":"searchValue","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"searchValue","ref":false}]}},"parameters":[{"name":"searchValue","description":"the text to find","type":"string"},{"name":"start","description":"optional start index for the search","initializer":"undefined"}],"isInstance":true},"String.split":{"kind":-1,"retType":"string[]","attributes":{"helper":"stringSplit","help":"text/split","blockId":"string_split","blockNamespace":"text","block":"split %this=text|at %separator","paramHelp":{"separator":"@param limit"},"jsDoc":"Splits the string according to the separators","_def":{"parts":[{"kind":"label","text":"split ","style":[]},{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":"at ","style":[]},{"kind":"param","name":"separator","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"separator","ref":false}]}},"parameters":[{"name":"separator","description":"@param limit","type":"string","initializer":"undefined"},{"name":"limit","initializer":"undefined"}],"isInstance":true},"String.trim":{"kind":-1,"retType":"string","attributes":{"helper":"stringTrim","jsDoc":"Return a substring of the current string with whitespace removed from both ends"},"parameters":[],"isInstance":true},"String.toUpperCase":{"kind":-1,"retType":"string","attributes":{"helper":"stringToUpperCase","help":"text/to-upper-case","jsDoc":"Converts the string to upper case characters."},"parameters":[],"isInstance":true,"pyQName":"String.to_upper_case"},"String.toLowerCase":{"kind":-1,"retType":"string","attributes":{"helper":"stringToLowerCase","help":"text/to-lower-case","jsDoc":"Converts the string to lower case characters."},"parameters":[],"isInstance":true,"pyQName":"String.to_lower_case"},"parseFloat":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"text":"123","s":"123"},"help":"text/parse-float","blockId":"string_parsefloat","block":"parse to number %text","blockNamespace":"text","explicitDefaults":["text"],"paramHelp":{"s":"A string to convert into a number. eg: 123"},"jsDoc":"Convert a string to a number.","_def":{"parts":[{"kind":"label","text":"parse to number ","style":[]},{"kind":"param","name":"text","ref":false}],"parameters":[{"kind":"param","name":"text","ref":false}]}},"parameters":[{"name":"text","type":"string","initializer":"123","default":"123"}],"pyQName":"parse_float"},"randint":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"min":"0","max":"10"},"blockId":"device_random","block":"pick random %min|to %limit","blockNamespace":"Math","help":"math/randint","paramHelp":{"min":"the lower inclusive bound, eg: 0","max":"the upper inclusive bound, eg: 10"},"jsDoc":"Returns a pseudorandom number between min and max included.\nIf both numbers are integral, the result is integral.","_def":{"parts":[{"kind":"label","text":"pick random ","style":[]},{"kind":"param","name":"min","ref":false},{"kind":"break"},{"kind":"label","text":"to ","style":[]},{"kind":"param","name":"limit","ref":false}],"parameters":[{"kind":"param","name":"min","ref":false},{"kind":"param","name":"limit","ref":false}]}},"parameters":[{"name":"min","description":"the lower inclusive bound, eg: 0","default":"0"},{"name":"max","description":"the upper inclusive bound, eg: 10","default":"10"}]},"Object":{"kind":5,"retType":""},"Function":{"kind":9,"retType":"Function","extendsTypes":[]},"Function.__assignableToFunction":{"kind":2,"retType":"Function","isInstance":true},"IArguments":{"kind":9,"retType":"IArguments","extendsTypes":[]},"IArguments.__assignableToIArguments":{"kind":2,"retType":"IArguments","isInstance":true},"RegExp":{"kind":9,"retType":"RegExp","extendsTypes":[]},"RegExp.__assignableToRegExp":{"kind":2,"retType":"RegExp","isInstance":true},"Boolean":{"kind":9,"retType":"Boolean","extendsTypes":[]},"Boolean.toString":{"kind":-1,"retType":"string","attributes":{"jsDoc":"Returns a string representation of an object."},"parameters":[],"isInstance":true,"pyQName":"Boolean.to_string"},"String@type":{"kind":9,"retType":"String","attributes":{"blockNamespace":"text","jsDoc":"Combine, split, and search text strings."},"extendsTypes":[],"pyQName":"String"},"String.fromCharCode":{"kind":-3,"retType":"string","attributes":{"help":"math/from-char-code","weight":1,"blockNamespace":"text","blockId":"stringFromCharCode","block":"text from char code %code","jsDoc":"Make a string from the given ASCII character code.","_def":{"parts":[{"kind":"label","text":"text from char code ","style":[]},{"kind":"param","name":"code","ref":false}],"parameters":[{"kind":"param","name":"code","ref":false}]}},"parameters":[{"name":"code"}],"pyQName":"String.from_char_code"},"Number":{"kind":5,"retType":""},"Number.toString":{"kind":-1,"retType":"string","attributes":{"jsDoc":"Returns a string representation of a number."},"parameters":[],"isInstance":true,"pyQName":"Number.to_string"},"Array@type":{"kind":9,"retType":"T[]","attributes":{"blockNamespace":"Arrays","jsDoc":"Add, remove, and replace items in lists."},"extendsTypes":[],"pyQName":"Array"},"Array.isArray":{"kind":-3,"retType":"boolean","attributes":{"jsDoc":"Check if a given object is an array."},"parameters":[{"name":"obj","type":"any"}],"pyQName":"Array.is_array"},"Object@type":{"kind":9,"retType":"Object","extendsTypes":[],"pyQName":"Object"},"Object.keys":{"kind":-3,"retType":"string[]","attributes":{"jsDoc":"Return the field names in an object."},"parameters":[{"name":"obj","type":"any"}]},"Math":{"kind":5,"retType":"","attributes":{"jsDoc":"More complex operations with numbers."}},"Math.pow":{"kind":-3,"retType":"number","attributes":{"paramHelp":{"x":"The base value of the expression.","y":"The exponent value of the expression."},"jsDoc":"Returns the value of a base expression taken to a specified power."},"parameters":[{"name":"x","description":"The base value of the expression."},{"name":"y","description":"The exponent value of the expression."}]},"Math.random":{"kind":-3,"retType":"number","attributes":{"help":"math/random","jsDoc":"Returns a pseudorandom number between 0 and 1."},"parameters":[]},"Math.randomRange":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"min":"0","max":"10"},"blockId":"device_random_deprecated","block":"pick random %min|to %limit","help":"math/random-range","deprecated":"true","paramHelp":{"min":"the lower inclusive bound, eg: 0","max":"the upper inclusive bound, eg: 10"},"jsDoc":"Returns a pseudorandom number between min and max included.\nIf both numbers are integral, the result is integral.","_def":{"parts":[{"kind":"label","text":"pick random ","style":[]},{"kind":"param","name":"min","ref":false},{"kind":"break"},{"kind":"label","text":"to ","style":[]},{"kind":"param","name":"limit","ref":false}],"parameters":[{"kind":"param","name":"min","ref":false},{"kind":"param","name":"limit","ref":false}]}},"parameters":[{"name":"min","description":"the lower inclusive bound, eg: 0","default":"0"},{"name":"max","description":"the upper inclusive bound, eg: 10","default":"10"}],"pyQName":"Math.random_range"},"Math.log":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A number"},"jsDoc":"Returns the natural logarithm (base e) of a number."},"parameters":[{"name":"x","description":"A number"}]},"Math.exp":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A number"},"jsDoc":"Returns returns ``e^x``."},"parameters":[{"name":"x","description":"A number"}]},"Math.sin":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"An angle in radians"},"jsDoc":"Returns the sine of a number."},"parameters":[{"name":"x","description":"An angle in radians"}]},"Math.cos":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"An angle in radians"},"jsDoc":"Returns the cosine of a number."},"parameters":[{"name":"x","description":"An angle in radians"}]},"Math.tan":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"An angle in radians"},"jsDoc":"Returns the tangent of a number."},"parameters":[{"name":"x","description":"An angle in radians"}]},"Math.asin":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"A number"},"jsDoc":"Returns the arcsine (in radians) of a number"},"parameters":[{"name":"x","description":"A number"}]},"Math.acos":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"A number"},"jsDoc":"Returns the arccosine (in radians) of a number"},"parameters":[{"name":"x","description":"A number"}]},"Math.atan":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"A number"},"jsDoc":"Returns the arctangent (in radians) of a number"},"parameters":[{"name":"x","description":"A number"}]},"Math.atan2":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"y":"A number","x":"A number"},"jsDoc":"Returns the arctangent of the quotient of its arguments."},"parameters":[{"name":"y","description":"A number"},{"name":"x","description":"A number"}]},"Math.sqrt":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A numeric expression."},"jsDoc":"Returns the square root of a number."},"parameters":[{"name":"x","description":"A numeric expression."}]},"Math.ceil":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A numeric expression."},"jsDoc":"Returns the smallest number greater than or equal to its numeric argument."},"parameters":[{"name":"x","description":"A numeric expression."}]},"Math.floor":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A numeric expression."},"jsDoc":"Returns the greatest number less than or equal to its numeric argument."},"parameters":[{"name":"x","description":"A numeric expression."}]},"Math.trunc":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A numeric expression."},"jsDoc":"Returns the number with the decimal part truncated."},"parameters":[{"name":"x","description":"A numeric expression."}],"pyQName":"int"},"Math.round":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"The value to be rounded to the nearest number."},"jsDoc":"Returns a supplied numeric expression rounded to the nearest number."},"parameters":[{"name":"x","description":"The value to be rounded to the nearest number."}]},"Math.imul":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"The first number","y":"The second number"},"jsDoc":"Returns the value of integer signed 32 bit multiplication of two numbers."},"parameters":[{"name":"x","description":"The first number"},{"name":"y","description":"The second number"}]},"Math.idiv":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"The first number","y":"The second number"},"jsDoc":"Returns the value of integer signed 32 bit division of two numbers."},"parameters":[{"name":"x","description":"The first number"},{"name":"y","description":"The second number"}]},"control":{"kind":5,"retType":""},"control._onCodeStart":{"kind":-3,"parameters":[{"name":"arg","type":"any"}],"pyQName":"control._on_code_start"},"control._onCodeStop":{"kind":-3,"parameters":[{"name":"arg","type":"any"}],"pyQName":"control._on_code_stop"},"NaN":{"kind":4,"retType":"number","attributes":{"jsDoc":"Constant representing Not-A-Number."},"pyQName":"na_n"},"Infinity":{"kind":4,"retType":"number","attributes":{"jsDoc":"Constant representing positive infinity."},"pyQName":"infinity"},"isNaN":{"kind":-3,"retType":"boolean","parameters":[{"name":"x"}],"pyQName":"is_na_n"},"Number@type":{"kind":9,"retType":"Number","extendsTypes":[],"pyQName":"Number"},"Number.isNaN":{"kind":-3,"retType":"boolean","attributes":{"jsDoc":"Check if a given value is of type Number and it is a NaN."},"parameters":[{"name":"x","type":"any"}],"pyQName":"Number.is_na_n"},"StringMap":{"kind":9,"retType":"StringMap","attributes":{"jsDoc":"A dictionary from string key to string values"},"extendsTypes":[]},"parseInt":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"text":"123"},"help":"text/parse-int","blockId":"string_parseint","block":"parse to integer %text","blockNamespace":"text","explicitDefaults":["text"],"blockHidden":true,"paramHelp":{"text":"A string to convert into an integral number. eg: \"123\"","radix":"optional A value between 2 and 36 that specifies the base of the number in text."},"jsDoc":"Convert a string to an integer.\n\n\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\nAll other strings are considered decimal.","_def":{"parts":[{"kind":"label","text":"parse to integer ","style":[]},{"kind":"param","name":"text","ref":false}],"parameters":[{"kind":"param","name":"text","ref":false}]}},"parameters":[{"name":"text","description":"A string to convert into an integral number. eg: \"123\"","type":"string","initializer":"123","default":"123"},{"name":"radix","description":"optional A value between 2 and 36 that specifies the base of the number in text.","initializer":"undefined"}],"pyQName":"int"},"helpers":{"kind":5,"retType":""},"helpers.arrayFill":{"kind":-3,"retType":"T[]","parameters":[{"name":"O","type":"T[]"},{"name":"value","type":"T"},{"name":"start","initializer":"undefined"},{"name":"end","initializer":"undefined"}],"pyQName":"helpers.array_fill"},"helpers.arraySplice":{"kind":-3,"parameters":[{"name":"arr","type":"T[]"},{"name":"start"},{"name":"len"}],"pyQName":"helpers.array_splice"},"helpers.arrayReverse":{"kind":-3,"parameters":[{"name":"arr","type":"T[]"}],"pyQName":"helpers.array_reverse"},"helpers.arrayShift":{"kind":-3,"retType":"T","parameters":[{"name":"arr","type":"T[]"}],"pyQName":"helpers.array_shift"},"helpers.arrayJoin":{"kind":-3,"retType":"string","parameters":[{"name":"arr","type":"T[]"},{"name":"sep","type":"string","initializer":"undefined"}],"pyQName":"helpers.array_join"},"helpers.arrayUnshift":{"kind":-3,"retType":"number","parameters":[{"name":"arr","type":"T[]"},{"name":"value","type":"T"}],"pyQName":"helpers.array_unshift"},"helpers.arraySort":{"kind":-3,"retType":"T[]","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value1: T, value2: T) => number","initializer":"undefined","handlerParameters":[{"name":"value1","type":"T"},{"name":"value2","type":"T"}]}],"pyQName":"helpers.array_sort"},"helpers.arrayMap":{"kind":-3,"retType":"U[]","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => U","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_map"},"helpers.arraySome":{"kind":-3,"retType":"boolean","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_some"},"helpers.arrayEvery":{"kind":-3,"retType":"boolean","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_every"},"helpers.arrayForEach":{"kind":-3,"parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => void","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_for_each"},"helpers.arrayFilter":{"kind":-3,"retType":"T[]","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_filter"},"helpers.arrayFind":{"kind":-3,"retType":"T","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_find"},"helpers.arrayReduce":{"kind":-3,"retType":"U","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(previousValue: U, currentValue: T, currentIndex: number) => U","handlerParameters":[{"name":"previousValue","type":"U"},{"name":"currentValue","type":"T"},{"name":"currentIndex","type":"number"}]},{"name":"initialValue","type":"U"}],"pyQName":"helpers.array_reduce"},"helpers.arrayConcat":{"kind":-3,"retType":"T[]","parameters":[{"name":"arr","type":"T[]"},{"name":"otherArr","type":"T[]"}],"pyQName":"helpers.array_concat"},"helpers.arrayPickRandom":{"kind":-3,"retType":"T","parameters":[{"name":"arr","type":"T[]"}],"pyQName":"helpers.array_pick_random"},"helpers.arraySlice":{"kind":-3,"retType":"T[]","parameters":[{"name":"arr","type":"T[]"},{"name":"start","initializer":"undefined"},{"name":"end","initializer":"undefined"}],"pyQName":"helpers.array_slice"},"helpers.stringReplace":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"},{"name":"toReplace","type":"string"},{"name":"replacer","type":"string | ((sub: string) => string)"}],"pyQName":"helpers.string_replace"},"helpers.stringReplaceAll":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"},{"name":"toReplace","type":"string"},{"name":"replacer","type":"string | ((sub: string) => string)"}],"pyQName":"helpers.string_replace_all"},"helpers.stringSubstr":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"},{"name":"start"},{"name":"length","initializer":"undefined"}],"pyQName":"helpers.string_substr"},"helpers.stringSlice":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"},{"name":"start"},{"name":"end","initializer":"undefined"}],"pyQName":"helpers.string_slice"},"helpers.stringToUpperCase":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"}],"pyQName":"helpers.string_to_upper_case"},"helpers.stringToLowerCase":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"}],"pyQName":"helpers.string_to_lower_case"},"helpers.stringSplit":{"kind":-3,"retType":"string[]","parameters":[{"name":"S","type":"string"},{"name":"separator","type":"string","initializer":"undefined"},{"name":"limit","initializer":"undefined"}],"pyQName":"helpers.string_split"},"helpers.stringTrim":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"}],"pyQName":"helpers.string_trim"},"helpers.isWhitespace":{"kind":-3,"retType":"boolean","parameters":[{"name":"c"}],"pyQName":"helpers.is_whitespace"},"helpers.stringEmpty":{"kind":-3,"retType":"boolean","parameters":[{"name":"S","type":"string"}],"pyQName":"helpers.string_empty"},"Math.clamp":{"kind":-3,"retType":"number","parameters":[{"name":"min"},{"name":"max"},{"name":"value"}]},"Math.abs":{"kind":-3,"retType":"number","attributes":{"blockId":"math_op3","help":"math/abs","paramHelp":{"x":"A numeric expression for which the absolute value is needed."},"jsDoc":"Returns the absolute value of a number (the value without regard to whether it is positive or negative).\nFor example, the absolute value of -5 is the same as the absolute value of 5."},"parameters":[{"name":"x","description":"A numeric expression for which the absolute value is needed."}],"pyQName":"abs"},"Math.sign":{"kind":-3,"retType":"number","attributes":{"paramHelp":{"x":"The numeric expression to test"},"jsDoc":"Returns the sign of the x, indicating whether x is positive, negative or zero."},"parameters":[{"name":"x","description":"The numeric expression to test"}]},"Math.max":{"kind":-3,"retType":"number","attributes":{"blockId":"math_op2","help":"math/max","jsDoc":"Returns the larger of two supplied numeric expressions."},"parameters":[{"name":"a"},{"name":"b"}],"pyQName":"max"},"Math.min":{"kind":-3,"retType":"number","attributes":{"blockId":"math_op2","help":"math/min","jsDoc":"Returns the smaller of two supplied numeric expressions."},"parameters":[{"name":"a"},{"name":"b"}],"pyQName":"min"},"Math.roundWithPrecision":{"kind":-3,"retType":"number","attributes":{"paramHelp":{"x":"the number to round","digits":"the number of resulting digits"},"jsDoc":"Rounds ``x`` to a number with the given number of ``digits``"},"parameters":[{"name":"x","description":"the number to round"},{"name":"digits","description":"the number of resulting digits"}],"pyQName":"Math.round_with_precision"},"__internal":{"kind":5,"retType":"","attributes":{"blockHidden":true}},"__internal.__downUp":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleDownUp","block":"%down","paramFieldEditor":{"down":"toggledownup"},"paramFieldEditorOptions":{"down":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a down/up toggle","_def":{"parts":[{"kind":"param","name":"down","ref":false}],"parameters":[{"kind":"param","name":"down","ref":false}]}},"parameters":[{"name":"down","type":"boolean"}]},"__internal.__upDown":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleUpDown","block":"%up","paramFieldEditor":{"up":"toggleupdown"},"paramFieldEditorOptions":{"up":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a up/down toggle","_def":{"parts":[{"kind":"param","name":"up","ref":false}],"parameters":[{"kind":"param","name":"up","ref":false}]}},"parameters":[{"name":"up","type":"boolean"}]},"__internal.__highLow":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleHighLow","block":"%high","paramFieldEditor":{"high":"togglehighlow"},"paramFieldEditorOptions":{"high":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a high/low toggle","_def":{"parts":[{"kind":"param","name":"high","ref":false}],"parameters":[{"kind":"param","name":"high","ref":false}]}},"parameters":[{"name":"high","type":"boolean"}]},"__internal.__onOff":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleOnOff","block":"%on","paramFieldEditor":{"on":"toggleonoff"},"paramFieldEditorOptions":{"on":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a on/off toggle","_def":{"parts":[{"kind":"param","name":"on","ref":false}],"parameters":[{"kind":"param","name":"on","ref":false}]}},"parameters":[{"name":"on","type":"boolean"}]},"__internal.__yesNo":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleYesNo","block":"%yes","paramFieldEditor":{"yes":"toggleyesno"},"paramFieldEditorOptions":{"yes":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a yes/no toggle","_def":{"parts":[{"kind":"param","name":"yes","ref":false}],"parameters":[{"kind":"param","name":"yes","ref":false}]}},"parameters":[{"name":"yes","type":"boolean"}]},"__internal.__winLose":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleWinLose","block":"%win","paramFieldEditor":{"win":"togglewinlose"},"paramFieldEditorOptions":{"win":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a win/lose toggle","_def":{"parts":[{"kind":"param","name":"win","ref":false}],"parameters":[{"kind":"param","name":"win","ref":false}]}},"parameters":[{"name":"win","type":"boolean"}]},"__internal.__colorNumberPicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"value":"0xff0000"},"blockId":"colorNumberPicker","block":"%value","blockHidden":true,"shim":"TD_ID","colorSecondary":"#FFFFFF","paramFieldEditor":{"value":"colornumber"},"paramFieldEditorOptions":{"value":{"decompileLiterals":"true","colours":"[\"#ff0000\",\"#ff8000\",\"#ffff00\",\"#ff9da5\",\"#00ff00\",\"#b09eff\",\"#00ffff\",\"#007fff\",\"#65471f\",\"#0000ff\",\"#7f00ff\",\"#ff0080\",\"#ff00ff\",\"#ffffff\",\"#999999\",\"#000000\"]","columns":"4","className":"rgbColorPicker"}},"explicitDefaults":["value"],"paramHelp":{"color":"color"},"jsDoc":"Get the color wheel field editor","_def":{"parts":[{"kind":"param","name":"value","ref":false}],"parameters":[{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"value","initializer":"0xff0000","default":"0xff0000"}]},"__internal.__colorWheelPicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"value":"10"},"blockId":"colorWheelPicker","block":"%value","blockHidden":true,"shim":"TD_ID","colorSecondary":"#FFFFFF","paramFieldEditor":{"value":"colorwheel"},"paramFieldEditorOptions":{"value":{"decompileLiterals":"true","sliderWidth":"200","min":"0","max":"255"}},"paramHelp":{"value":"value between 0 to 255 to get a color value, eg: 10"},"jsDoc":"Get the color wheel field editor","_def":{"parts":[{"kind":"param","name":"value","ref":false}],"parameters":[{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"value","description":"value between 0 to 255 to get a color value, eg: 10","default":"10"}]},"__internal.__colorWheelHsvPicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"value":"10"},"blockId":"colorWheelHsvPicker","block":"%value","blockHidden":true,"shim":"TD_ID","colorSecondary":"#FFFFFF","paramFieldEditor":{"value":"colorwheel"},"paramFieldEditorOptions":{"value":{"decompileLiterals":"true","sliderWidth":"200","min":"0","max":"255","channel":"hsvfast"}},"paramHelp":{"value":"value between 0 to 255 to get a color value, eg: 10"},"jsDoc":"Get the color wheel field editor using HSV values","_def":{"parts":[{"kind":"param","name":"value","ref":false}],"parameters":[{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"value","description":"value between 0 to 255 to get a color value, eg: 10","default":"10"}]},"__internal.__speedPicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"speed":"50"},"blockId":"speedPicker","block":"%speed","shim":"TD_ID","paramFieldEditor":{"speed":"speed"},"colorSecondary":"#FFFFFF","weight":0,"blockHidden":true,"paramFieldEditorOptions":{"speed":{"decompileLiterals":"1"}},"paramHelp":{"speed":"the speed, eg: 50"},"jsDoc":"A speed picker","_def":{"parts":[{"kind":"param","name":"speed","ref":false}],"parameters":[{"kind":"param","name":"speed","ref":false}]}},"parameters":[{"name":"speed","description":"the speed, eg: 50","default":"50"}]},"__internal.__turnRatioPicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"turnratio":"0"},"blockId":"turnRatioPicker","block":"%turnratio","shim":"TD_ID","paramFieldEditor":{"turnratio":"turnratio"},"colorSecondary":"#FFFFFF","weight":0,"blockHidden":true,"paramFieldEditorOptions":{"turnRatio":{"decompileLiterals":"1"}},"paramHelp":{"turnratio":"the turn ratio, eg: 0"},"jsDoc":"A turn ratio picker","_def":{"parts":[{"kind":"param","name":"turnratio","ref":false}],"parameters":[{"kind":"param","name":"turnratio","ref":false}]}},"parameters":[{"name":"turnratio","description":"the turn ratio, eg: 0","default":"0"}]},"__internal.__protractor":{"kind":-3,"retType":"number","attributes":{"blockId":"protractorPicker","block":"%angle","shim":"TD_ID","paramFieldEditor":{"angle":"protractor"},"paramFieldEditorOptions":{"angle":{"decompileLiterals":"1"}},"colorSecondary":"#FFFFFF","blockHidden":true,"jsDoc":"A field editor that displays a protractor","_def":{"parts":[{"kind":"param","name":"angle","ref":false}],"parameters":[{"kind":"param","name":"angle","ref":false}]}},"parameters":[{"name":"angle"}]},"__internal.__timePicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"ms":"500"},"blockId":"timePicker","block":"%ms","blockHidden":true,"shim":"TD_ID","colorSecondary":"#FFFFFF","paramFieldEditor":{"ms":"numberdropdown"},"paramFieldEditorOptions":{"ms":{"decompileLiterals":"true","data":"[[\"100 ms\", 100], [\"200 ms\", 200], [\"500 ms\", 500], [\"1 second\", 1000], [\"2 seconds\", 2000], [\"5 seconds\", 5000]]"}},"paramHelp":{"ms":"time duration in milliseconds, eg: 500, 1000"},"jsDoc":"Get the time field editor","_def":{"parts":[{"kind":"param","name":"ms","ref":false}],"parameters":[{"kind":"param","name":"ms","ref":false}]}},"parameters":[{"name":"ms","description":"time duration in milliseconds, eg: 500, 1000","default":"500"}]}}},"sha":"b6bd83bb06721e8a0dbea5f935031328eb502e2a72f49239e9ee783ef6a4f569"}}}
|
|
1
|
+
var pxtTargetBundle = {"id":"core","name":"Microsoft MakeCode","title":"Microsoft MakeCode","description":"A toolkit to build JavaScript Blocks editors.","bundleddirs":[],"compile":{"hasHex":false,"jsRefCounting":false,"switches":{},"noSourceInFlash":true,"utf8":true},"appTheme":{"logoUrl":"https://makecode.com/","logo":"@cdnUrl@/blob/4d9a6c8b1fa4c75911b2c468cb3ca1cdfb61fcb6/static/logo.svg","docsLogo":"@cdnUrl@/blob/4d9a6c8b1fa4c75911b2c468cb3ca1cdfb61fcb6/static/logo.svg","portraitLogo":"@cdnUrl@/blob/4d9a6c8b1fa4c75911b2c468cb3ca1cdfb61fcb6/static/logo.svg","organizationLogo":"@cdnUrl@/blob/106597ae039a275897661651b96856220c9b0fad/static/orglogo.png","organizationWideLogo":"@cdnUrl@/blob/d6139e3d0af51f02aa5f8765ecb0985acbd98551/static/orglogowide.png","homeUrl":"https://makecode.com/","cardLogo":"@cdnUrl@/blob/4d9a6c8b1fa4c75911b2c468cb3ca1cdfb61fcb6/static/logo.svg","appLogo":"@cdnUrl@/blob/4d9a6c8b1fa4c75911b2c468cb3ca1cdfb61fcb6/static/logo.svg","crowdinProject":"makecode","docMenu":[{"name":"About","path":"/about"},{"name":"Docs","path":"/docs"},{"name":"Blog","path":"/blog"}],"hideDocsEdit":true,"hideDocsSimulator":true,"TOC":[{"name":"About MakeCode","path":"/about","subitems":[]},{"name":"Blog","path":"/blog","subitems":[]},{"name":"Online Learning","path":"/online-learning","subitems":[]},{"name":"Contact Us","path":"/contact","subitems":[]},{"name":"Tools","path":"/tools","subitems":[]},{"name":"Technical Docs","path":"/docs","subitems":[{"name":"JS Editor Features","path":"/js/editor","subitems":[]},{"name":"Programming Language","path":"/language","subitems":[]},{"name":"Async Functions","path":"/async","subitems":[]},{"name":"Partial Flashing","path":"/partial-flashing","subitems":[]},{"name":"Source Embedding","path":"/source-embedding","subitems":[]},{"name":"Updating Blockly Version","path":"/develop/blocklyupgrade","subitems":[]},{"name":"Accessibility","path":"/develop/accessibility","subitems":[]},{"name":"Profiling","path":"/js/profiling","subitems":[]},{"name":"Debugging Hardware","path":"/develop/hw-debugging","subitems":[]}]},{"name":"Creating Targets","path":"/target-creation","subitems":[{"name":"pxtarget.json","path":"/targets/pxtarget","subitems":[]},{"name":"Defining Blocks","path":"/defining-blocks","subitems":[]},{"name":"Auto-generation of .d.ts","path":"/simshim","subitems":[]},{"name":"Static File Drops","path":"/cli/staticpkg","subitems":[]},{"name":"Simulator","path":"/targets/simulator","subitems":[]},{"name":"Theming Editor","path":"/targets/theming","subitems":[]},{"name":"Embedding resources","path":"/jres","subitems":[]}]},{"name":"Creating Extensions","path":"/extensions","subitems":[{"name":"Getting started","path":"/extensions/getting-started","subitems":[]},{"name":"pxt.json","path":"/extensions/pxt-json","subitems":[]},{"name":"Extension versioning","path":"/extensions/versioning","subitems":[]},{"name":"Extension localization","path":"/extensions/localization","subitems":[]},{"name":"Extension approval","path":"/extensions/approval","subitems":[]},{"name":"Editor extensions","path":"/extensions/extensions","subitems":[]},{"name":"GitHub Extension Authoring","path":"/extensions/github-authoring","subitems":[]}]},{"name":"Writing Docs","path":"/writing-docs","subitems":[{"name":"Macros","path":"/writing-docs/macros","subitems":[]},{"name":"Anchors","path":"/writing-docs/anchors","subitems":[]},{"name":"Tutorials","path":"/writing-docs/tutorials","subitems":[]},{"name":"User Tutorials","path":"/writing-docs/user-tutorials","subitems":[]},{"name":"Skillmaps","path":"/writing-docs/skillmaps","subitems":[]},{"name":"Routing","path":"/writing-docs/routing","subitems":[]},{"name":"Testing","path":"/writing-docs/testing","subitems":[]}]},{"name":"Translations","path":"/translate","subitems":[{"name":"Translation languages","path":"/translate/languages","subitems":[]},{"name":"Localization files","path":"/translate/files","subitems":[]},{"name":"Parts to translate","path":"/translate/parts","subitems":[]},{"name":"Translator roles","path":"/translate/roles","subitems":[]},{"name":"In context translation","path":"/translate/in-context","subitems":[]}]},{"name":"Blocks Embedding","path":"/blocks-embed","subitems":[]},{"name":"Command Line Interface","path":"/cli","subitems":[{"name":"install","path":"/cli/install","subitems":[]},{"name":"build","path":"/cli/build","subitems":[]},{"name":"bump","path":"/cli/bump","subitems":[]},{"name":"deploy","path":"/cli/deploy","subitems":[]},{"name":"console","path":"/cli/console","subitems":[]},{"name":"gdb","path":"/cli/gdb","subitems":[]},{"name":"staticpkg","path":"/cli/staticpkg","subitems":[]},{"name":"update","path":"/cli/update","subitems":[]},{"name":"pyconv","path":"/cli/pyconv","subitems":[]},{"name":"hidserial","path":"/cli/hidserial","subitems":[]},{"name":"hiddmesg","path":"/cli/hiddmesg","subitems":[]},{"name":"login","path":"/cli/login","subitems":[]}]},{"name":"Labs","path":"/labs","subitems":[]},{"name":"UF2 File Format","path":"https://github.com/microsoft/uf2","subitems":[]},{"name":"Accessibility","path":"/accessibility","subitems":[]},{"name":"Telemetry","path":"/telemetry","subitems":[]}],"embedUrl":"https://makecode.com/","id":"core","title":"Microsoft MakeCode","name":"Microsoft MakeCode","description":"A toolkit to build JavaScript Blocks editors.","htmlDocIncludes":{}},"uploadDocs":true,"versions":{"branch":"v8.3.7","tag":"v8.3.7","commits":"https://github.com/microsoft/pxt/commits/f5078a9e992739c5c4ae9b22c13cda090069d96b","target":"8.3.7","pxt":"8.3.7"},"blocksprj":{"id":"blocksprj","config":{"name":"empty","description":"An empty project for docs rendering","dependencies":{},"files":["main.ts","pxt-core.d.ts","pxt-helpers.ts"],"public":true,"additionalFilePaths":[]},"files":{"main.ts":"\n"}},"tsprj":{"id":"tsprj","config":{"name":"empty","description":"An empty project for docs rendering","dependencies":{},"files":["main.ts","pxt-core.d.ts","pxt-helpers.ts"],"public":true,"additionalFilePaths":[]},"files":{"main.ts":"\n"}},"bundledpkgs":{},"apiInfo":{"libs/blocksprj":{"apis":{"byQName":{"Array":{"kind":5,"retType":"","attributes":{"blockNamespace":"Arrays","jsDoc":"Add, remove, and replace items in lists."}},"Array.length":{"kind":2,"retType":"number","attributes":{"weight":84,"blockId":"lists_length","block":"length of %VALUE","blockBuiltin":"true","blockNamespace":"arrays","jsDoc":"Get or set the length of an array. This number is one more than the index of the last element the array.","_def":{"parts":[{"kind":"label","text":"length of ","style":[]},{"kind":"param","name":"VALUE","ref":false}],"parameters":[{"kind":"param","name":"VALUE","ref":false}]}},"isInstance":true},"Array.push":{"kind":-1,"attributes":{"help":"arrays/push","weight":50,"blockId":"array_push","block":"%list| add value %value| to end","blockNamespace":"arrays","group":"Modify","paramHelp":{"items":"New elements of the Array."},"jsDoc":"Append a new element to an array.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" add value ","style":[]},{"kind":"param","name":"value","ref":false},{"kind":"break"},{"kind":"label","text":" to end","style":[]}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"item","type":"T"}],"isInstance":true,"pyQName":"Array.append"},"Array.concat":{"kind":-1,"retType":"T[]","attributes":{"helper":"arrayConcat","weight":40,"paramHelp":{"arr":"The other array that is being concatenated with"},"jsDoc":"Concatenates the values with another array."},"parameters":[{"name":"arr","description":"The other array that is being concatenated with","type":"T[]"}],"isInstance":true},"Array.pop":{"kind":-1,"retType":"T","attributes":{"help":"arrays/pop","weight":45,"blockId":"array_pop","block":"get and remove last value from %list","blockNamespace":"arrays","group":"Read","jsDoc":"Remove the last element from an array and return it.","_def":{"parts":[{"kind":"label","text":"get and remove last value from ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true},"Array.reverse":{"kind":-1,"attributes":{"help":"arrays/reverse","helper":"arrayReverse","weight":10,"blockId":"array_reverse","block":"reverse %list","blockNamespace":"arrays","group":"Operations","jsDoc":"Reverse the elements in an array. The first array element becomes the last, and the last array element becomes the first.","_def":{"parts":[{"kind":"label","text":"reverse ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true},"Array.shift":{"kind":-1,"retType":"T","attributes":{"help":"arrays/shift","helper":"arrayShift","weight":30,"blockId":"array_shift","block":"get and remove first value from %list","blockNamespace":"arrays","group":"Read","jsDoc":"Remove the first element from an array and return it. This method changes the length of the array.","_def":{"parts":[{"kind":"label","text":"get and remove first value from ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true},"Array.unshift":{"kind":-1,"retType":"number","attributes":{"help":"arrays/unshift","helper":"arrayUnshift","weight":25,"blockId":"array_unshift","block":"%list| insert %value| at beginning","blockNamespace":"arrays","group":"Modify","paramHelp":{"element":"to insert at the start of the Array."},"jsDoc":"Add one element to the beginning of an array and return the new length of the array.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" insert ","style":[]},{"kind":"param","name":"value","ref":false},{"kind":"break"},{"kind":"label","text":" at beginning","style":[]}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"value","type":"T"}],"isInstance":true},"Array.slice":{"kind":-1,"retType":"T[]","attributes":{"paramDefl":{"start":"0","end":"0"},"help":"arrays/slice","helper":"arraySlice","weight":41,"blockNamespace":"arrays","paramHelp":{"start":"The beginning of the specified portion of the array. eg: 0","end":"The end of the specified portion of the array. eg: 0"},"jsDoc":"Return a section of an array."},"parameters":[{"name":"start","description":"The beginning of the specified portion of the array. eg: 0","initializer":"undefined","default":"0"},{"name":"end","description":"The end of the specified portion of the array. eg: 0","initializer":"undefined","default":"0"}],"isInstance":true},"Array.splice":{"kind":-1,"attributes":{"paramDefl":{"start":"0","deleteCount":"0"},"helper":"arraySplice","weight":40,"paramHelp":{"start":"The zero-based location in the array from which to start removing elements. eg: 0","deleteCount":"The number of elements to remove. eg: 0"},"jsDoc":"Remove elements from an array."},"parameters":[{"name":"start","description":"The zero-based location in the array from which to start removing elements. eg: 0","default":"0"},{"name":"deleteCount","description":"The number of elements to remove. eg: 0","default":"0"}],"isInstance":true},"Array.join":{"kind":-1,"retType":"string","attributes":{"helper":"arrayJoin","weight":40,"paramHelp":{"sep":"the string separator"},"jsDoc":"joins all elements of an array into a string and returns this string."},"parameters":[{"name":"sep","description":"the string separator","type":"string","initializer":"undefined"}],"isInstance":true},"Array.some":{"kind":-1,"retType":"boolean","attributes":{"helper":"arraySome","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to two arguments. The some method calls the callbackfn function one time for each element in the array."},"jsDoc":"Tests whether at least one element in the array passes the test implemented by the provided function."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to two arguments. The some method calls the callbackfn function one time for each element in the array.","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true},"Array.every":{"kind":-1,"retType":"boolean","attributes":{"helper":"arrayEvery","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to two arguments. The every method calls the callbackfn function one time for each element in the array."},"jsDoc":"Tests whether all elements in the array pass the test implemented by the provided function."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to two arguments. The every method calls the callbackfn function one time for each element in the array.","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true},"Array.sort":{"kind":-1,"retType":"T[]","attributes":{"helper":"arraySort","weight":40,"paramHelp":{"specifies":"a function that defines the sort order. If omitted, the array is sorted according to the prmitive type"},"jsDoc":"Sort the elements of an array in place and returns the array. The sort is not necessarily stable."},"parameters":[{"name":"callbackfn","type":"(value1: T, value2: T) => number","initializer":"undefined","handlerParameters":[{"name":"value1","type":"T"},{"name":"value2","type":"T"}]}],"isInstance":true},"Array.map":{"kind":-1,"retType":"U[]","attributes":{"helper":"arrayMap","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to two arguments. The map method calls the callbackfn function one time for each element in the array."},"jsDoc":"Call a defined callback function on each element of an array, and return an array containing the results."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to two arguments. The map method calls the callbackfn function one time for each element in the array.","type":"(value: T, index: number) => U","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true},"Array.forEach":{"kind":-1,"attributes":{"helper":"arrayForEach","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to two arguments. The forEach method calls the callbackfn function one time for each element in the array."},"jsDoc":"Call a defined callback function on each element of an array."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to two arguments. The forEach method calls the callbackfn function one time for each element in the array.","type":"(value: T, index: number) => void","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true,"pyQName":"Array.for_each"},"Array.filter":{"kind":-1,"retType":"T[]","attributes":{"helper":"arrayFilter","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to two arguments. The filter method calls the callbackfn function one time for each element in the array."},"jsDoc":"Return the elements of an array that meet the condition specified in a callback function."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to two arguments. The filter method calls the callbackfn function one time for each element in the array.","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true},"Array.fill":{"kind":-1,"retType":"T[]","attributes":{"helper":"arrayFill","weight":39,"jsDoc":"Fills all the elements of an array from a start index to an end index with a static value. The end index is not included."},"parameters":[{"name":"value","type":"T"},{"name":"start","initializer":"undefined"},{"name":"end","initializer":"undefined"}],"isInstance":true},"Array.find":{"kind":-1,"retType":"T","attributes":{"helper":"arrayFind","weight":40,"paramHelp":{"callbackfn":""},"jsDoc":"Returns the value of the first element in the array that satisfies the provided testing function. Otherwise undefined is returned."},"parameters":[{"name":"callbackfn","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true},"Array.reduce":{"kind":-1,"retType":"U","attributes":{"helper":"arrayReduce","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to three arguments. The reduce method calls the callbackfn function one time for each element in the array.","initialValue":"Initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value."},"jsDoc":"Call the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to three arguments. The reduce method calls the callbackfn function one time for each element in the array.","type":"(previousValue: U, currentValue: T, currentIndex: number) => U","handlerParameters":[{"name":"previousValue","type":"U"},{"name":"currentValue","type":"T"},{"name":"currentIndex","type":"number"}]},{"name":"initialValue","description":"Initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.","type":"U"}],"isInstance":true},"Array.removeElement":{"kind":-1,"retType":"boolean","attributes":{"weight":48,"jsDoc":"Remove the first occurence of an object. Returns true if removed."},"parameters":[{"name":"element","type":"T"}],"isInstance":true,"pyQName":"Array.remove_element"},"Array.removeAt":{"kind":-1,"retType":"T","attributes":{"help":"arrays/remove-at","weight":47,"blockId":"array_removeat","block":"%list| get and remove value at %index","blockNamespace":"arrays","group":"Read","jsDoc":"Remove the element at a certain index.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" get and remove value at ","style":[]},{"kind":"param","name":"index","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"index","ref":false}]}},"parameters":[{"name":"index"}],"isInstance":true,"pyQName":"Array.remove_at"},"Array.insertAt":{"kind":-1,"attributes":{"paramDefl":{"index":"0","the":"0"},"help":"arrays/insert-at","weight":20,"blockId":"array_insertAt","block":"%list| insert at %index| value %value","blockNamespace":"arrays","group":"Modify","paramHelp":{"index":"the zero-based position in the list to insert the value, eg: 0","the":"value to insert, eg: 0"},"jsDoc":"Insert the value at a particular index, increases length by 1","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" insert at ","style":[]},{"kind":"param","name":"index","ref":false},{"kind":"break"},{"kind":"label","text":" value ","style":[]},{"kind":"param","name":"value","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"index","ref":false},{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"index","description":"the zero-based position in the list to insert the value, eg: 0","default":"0"},{"name":"value","type":"T"}],"isInstance":true,"pyQName":"Array.insert_at"},"Array.indexOf":{"kind":-1,"retType":"number","attributes":{"help":"arrays/index-of","weight":40,"blockId":"array_indexof","block":"%list| find index of %value","blockNamespace":"arrays","group":"Operations","paramHelp":{"item":"The value to locate in the array.","fromIndex":"The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0."},"jsDoc":"Return the index of the first occurrence of a value in an array.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" find index of ","style":[]},{"kind":"param","name":"value","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"item","description":"The value to locate in the array.","type":"T"},{"name":"fromIndex","description":"The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.","initializer":"undefined"}],"isInstance":true,"pyQName":"Array.index"},"Array.get":{"kind":-1,"retType":"T","attributes":{"paramDefl":{"index":"0"},"help":"arrays/get","weight":85,"paramHelp":{"index":"the zero-based position in the list of the item, eg: 0"},"jsDoc":"Get the value at a particular index"},"parameters":[{"name":"index","description":"the zero-based position in the list of the item, eg: 0","default":"0"}],"isInstance":true},"Array.set":{"kind":-1,"attributes":{"paramDefl":{"index":"0","value":"0"},"help":"arrays/set","weight":84,"paramHelp":{"index":"the zero-based position in the list to store the value, eg: 0","value":"the value to insert, eg: 0"},"jsDoc":"Store a value at a particular index"},"parameters":[{"name":"index","description":"the zero-based position in the list to store the value, eg: 0","default":"0"},{"name":"value","description":"the value to insert, eg: 0","type":"T","default":"0"}],"isInstance":true},"Array._pickRandom":{"kind":-1,"retType":"T","attributes":{"help":"arrays/pick-random","helper":"arrayPickRandom","weight":25,"blockId":"array_pickRandom","block":"get random value from %list","blockNamespace":"arrays","group":"Read","jsDoc":"Return a random value from the array","_def":{"parts":[{"kind":"label","text":"get random value from ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true,"pyQName":"Array._pick_random"},"Array._unshiftStatement":{"kind":-1,"attributes":{"help":"arrays/unshift","helper":"arrayUnshift","weight":24,"blockId":"array_unshift_statement","block":"%list| insert %value| at beginning","blockNamespace":"arrays","blockAliasFor":"Array.unshift","group":"Modify","paramHelp":{"element":"to insert at the start of the Array."},"jsDoc":"Add one element to the beginning of an array and return the new length of the array.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" insert ","style":[]},{"kind":"param","name":"value","ref":false},{"kind":"break"},{"kind":"label","text":" at beginning","style":[]}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"value","type":"T"}],"isInstance":true,"pyQName":"Array._unshift_statement"},"Array._popStatement":{"kind":-1,"attributes":{"help":"arrays/pop","weight":44,"blockId":"array_pop_statement","block":"remove last value from %list","blockNamespace":"arrays","blockAliasFor":"Array.pop","group":"Modify","jsDoc":"Remove the last element from an array and return it.","_def":{"parts":[{"kind":"label","text":"remove last value from ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true,"pyQName":"Array._pop_statement"},"Array._shiftStatement":{"kind":-1,"attributes":{"help":"arrays/shift","helper":"arrayShift","weight":29,"blockId":"array_shift_statement","block":"remove first value from %list","blockNamespace":"arrays","blockAliasFor":"Array.shift","group":"Modify","jsDoc":"Remove the first element from an array and return it. This method changes the length of the array.","_def":{"parts":[{"kind":"label","text":"remove first value from ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true,"pyQName":"Array._shift_statement"},"Array._removeAtStatement":{"kind":-1,"attributes":{"help":"arrays/remove-at","weight":14,"blockId":"array_removeat_statement","block":"%list| remove value at %index","blockNamespace":"arrays","blockAliasFor":"Array.removeAt","group":"Modify","jsDoc":"Remove the element at a certain index.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" remove value at ","style":[]},{"kind":"param","name":"index","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"index","ref":false}]}},"parameters":[{"name":"index"}],"isInstance":true,"pyQName":"Array._remove_at_statement"},"String":{"kind":5,"retType":"","attributes":{"blockNamespace":"text","jsDoc":"Combine, split, and search text strings."}},"String.concat":{"kind":-1,"retType":"string","attributes":{"weight":49,"blockId":"string_concat","blockNamespace":"text","paramHelp":{"other":"The string to append to the end of the string."},"jsDoc":"Returns a string that contains the concatenation of two or more strings."},"parameters":[{"name":"other","description":"The string to append to the end of the string.","type":"string"}],"isInstance":true},"String.charAt":{"kind":-1,"retType":"string","attributes":{"weight":48,"help":"text/char-at","blockId":"string_get","block":"char from %this=text|at %pos","blockNamespace":"text","paramHelp":{"index":"The zero-based index of the desired character."},"jsDoc":"Return the character at the specified index.","_def":{"parts":[{"kind":"label","text":"char from ","style":[]},{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":"at ","style":[]},{"kind":"param","name":"pos","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"pos","ref":false}]}},"parameters":[{"name":"index","description":"The zero-based index of the desired character."}],"isInstance":true,"pyQName":"String.char_at"},"String.length":{"kind":2,"retType":"number","attributes":{"property":"true","weight":47,"blockId":"text_length","block":"length of %VALUE","blockBuiltin":"true","blockNamespace":"text","jsDoc":"Returns the length of a String object.","_def":{"parts":[{"kind":"label","text":"length of ","style":[]},{"kind":"param","name":"VALUE","ref":false}],"parameters":[{"kind":"param","name":"VALUE","ref":false}]}},"isInstance":true},"String.charCodeAt":{"kind":-1,"retType":"number","attributes":{"paramHelp":{"index":"The zero-based index of the desired character. If there is no character at the specified index, NaN is returned."},"jsDoc":"Return the Unicode value of the character at the specified location."},"parameters":[{"name":"index","description":"The zero-based index of the desired character. If there is no character at the specified index, NaN is returned."}],"isInstance":true,"pyQName":"String.char_code_at"},"String.compare":{"kind":-1,"retType":"number","attributes":{"help":"text/compare","blockId":"string_compare","block":"compare %this=text| to %that","blockNamespace":"text","paramHelp":{"that":"String to compare to target string"},"jsDoc":"See how the order of characters in two strings is different (in ASCII encoding).","_def":{"parts":[{"kind":"label","text":"compare ","style":[]},{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":" to ","style":[]},{"kind":"param","name":"that","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"that","ref":false}]}},"parameters":[{"name":"that","description":"String to compare to target string","type":"string"}],"isInstance":true},"String.substr":{"kind":-1,"retType":"string","attributes":{"paramDefl":{"start":"0","length":"10"},"helper":"stringSubstr","help":"text/substr","blockId":"string_substr","block":"substring of %this=text|from %start|of length %length","blockNamespace":"text","paramHelp":{"start":"first character index; can be negative from counting from the end, eg:0","length":"number of characters to extract, eg: 10"},"jsDoc":"Return a substring of the current string.","_def":{"parts":[{"kind":"label","text":"substring of ","style":[]},{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":"from ","style":[]},{"kind":"param","name":"start","ref":false},{"kind":"break"},{"kind":"label","text":"of length ","style":[]},{"kind":"param","name":"length","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"start","ref":false},{"kind":"param","name":"length","ref":false}]}},"parameters":[{"name":"start","description":"first character index; can be negative from counting from the end, eg:0","default":"0"},{"name":"length","description":"number of characters to extract, eg: 10","initializer":"undefined","default":"10"}],"isInstance":true},"String.replace":{"kind":-1,"retType":"string","attributes":{"helper":"stringReplace","paramHelp":{"toReplace":"the substring to replace in the current string","replacer":"either the string that replaces toReplace in the current string,"},"jsDoc":"Return the current string with the first occurence of toReplace\nreplaced with the replacer\n\n\nor a function that accepts the substring and returns the replacement string."},"parameters":[{"name":"toReplace","description":"the substring to replace in the current string","type":"string"},{"name":"replacer","description":"either the string that replaces toReplace in the current string,","type":"string | ((sub: string) => string)"}],"isInstance":true},"String.replaceAll":{"kind":-1,"retType":"string","attributes":{"helper":"stringReplaceAll","paramHelp":{"toReplace":"the substring to replace in the current string","replacer":"either the string that replaces toReplace in the current string,"},"jsDoc":"Return the current string with each occurence of toReplace\nreplaced with the replacer\n\n\nor a function that accepts the substring and returns the replacement string."},"parameters":[{"name":"toReplace","description":"the substring to replace in the current string","type":"string"},{"name":"replacer","description":"either the string that replaces toReplace in the current string,","type":"string | ((sub: string) => string)"}],"isInstance":true,"pyQName":"String.replace_all"},"String.slice":{"kind":-1,"retType":"string","attributes":{"paramDefl":{"start":"0"},"helper":"stringSlice","paramHelp":{"start":"first character index; can be negative from counting from the end, eg:0","end":"one-past-last character index"},"jsDoc":"Return a substring of the current string."},"parameters":[{"name":"start","description":"first character index; can be negative from counting from the end, eg:0","default":"0"},{"name":"end","description":"one-past-last character index","initializer":"undefined"}],"isInstance":true},"String.isEmpty":{"kind":-1,"retType":"boolean","attributes":{"helper":"stringEmpty","help":"text/is-empty","blockId":"string_isempty","blockNamespace":"text","block":"%this=text| is empty","jsDoc":"Returns a value indicating if the string is empty","_def":{"parts":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":" is empty","style":[]}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false}]}},"parameters":[],"isInstance":true,"pyQName":"String.is_empty"},"String.indexOf":{"kind":-1,"retType":"number","attributes":{"help":"text/index-of","blockId":"string_indexof","blockNamespace":"text","block":"%this=text|find index of %searchValue","paramHelp":{"searchValue":"the text to find","start":"optional start index for the search"},"jsDoc":"Returns the position of the first occurrence of a specified value in a string.","_def":{"parts":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":"find index of ","style":[]},{"kind":"param","name":"searchValue","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"searchValue","ref":false}]}},"parameters":[{"name":"searchValue","description":"the text to find","type":"string"},{"name":"start","description":"optional start index for the search","initializer":"undefined"}],"isInstance":true,"pyQName":"String.index_of"},"String.includes":{"kind":-1,"retType":"boolean","attributes":{"help":"text/includes","blockId":"string_includes","blockNamespace":"text","block":"%this=text|includes %searchValue","paramHelp":{"searchValue":"the text to find","start":"optional start index for the search"},"jsDoc":"Determines whether a string contains the characters of a specified string.","_def":{"parts":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":"includes ","style":[]},{"kind":"param","name":"searchValue","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"searchValue","ref":false}]}},"parameters":[{"name":"searchValue","description":"the text to find","type":"string"},{"name":"start","description":"optional start index for the search","initializer":"undefined"}],"isInstance":true},"String.split":{"kind":-1,"retType":"string[]","attributes":{"helper":"stringSplit","help":"text/split","blockId":"string_split","blockNamespace":"text","block":"split %this=text|at %separator","paramHelp":{"separator":"@param limit"},"jsDoc":"Splits the string according to the separators","_def":{"parts":[{"kind":"label","text":"split ","style":[]},{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":"at ","style":[]},{"kind":"param","name":"separator","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"separator","ref":false}]}},"parameters":[{"name":"separator","description":"@param limit","type":"string","initializer":"undefined"},{"name":"limit","initializer":"undefined"}],"isInstance":true},"String.trim":{"kind":-1,"retType":"string","attributes":{"helper":"stringTrim","jsDoc":"Return a substring of the current string with whitespace removed from both ends"},"parameters":[],"isInstance":true},"String.toUpperCase":{"kind":-1,"retType":"string","attributes":{"helper":"stringToUpperCase","help":"text/to-upper-case","jsDoc":"Converts the string to upper case characters."},"parameters":[],"isInstance":true,"pyQName":"String.to_upper_case"},"String.toLowerCase":{"kind":-1,"retType":"string","attributes":{"helper":"stringToLowerCase","help":"text/to-lower-case","jsDoc":"Converts the string to lower case characters."},"parameters":[],"isInstance":true,"pyQName":"String.to_lower_case"},"parseFloat":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"text":"123","s":"123"},"help":"text/parse-float","blockId":"string_parsefloat","block":"parse to number %text","blockNamespace":"text","explicitDefaults":["text"],"paramHelp":{"s":"A string to convert into a number. eg: 123"},"jsDoc":"Convert a string to a number.","_def":{"parts":[{"kind":"label","text":"parse to number ","style":[]},{"kind":"param","name":"text","ref":false}],"parameters":[{"kind":"param","name":"text","ref":false}]}},"parameters":[{"name":"text","type":"string","initializer":"123","default":"123"}],"pyQName":"parse_float"},"randint":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"min":"0","max":"10"},"blockId":"device_random","block":"pick random %min|to %limit","blockNamespace":"Math","help":"math/randint","paramHelp":{"min":"the lower inclusive bound, eg: 0","max":"the upper inclusive bound, eg: 10"},"jsDoc":"Returns a pseudorandom number between min and max included.\nIf both numbers are integral, the result is integral.","_def":{"parts":[{"kind":"label","text":"pick random ","style":[]},{"kind":"param","name":"min","ref":false},{"kind":"break"},{"kind":"label","text":"to ","style":[]},{"kind":"param","name":"limit","ref":false}],"parameters":[{"kind":"param","name":"min","ref":false},{"kind":"param","name":"limit","ref":false}]}},"parameters":[{"name":"min","description":"the lower inclusive bound, eg: 0","default":"0"},{"name":"max","description":"the upper inclusive bound, eg: 10","default":"10"}]},"Object":{"kind":5,"retType":""},"Function":{"kind":9,"retType":"Function","extendsTypes":[]},"Function.__assignableToFunction":{"kind":2,"retType":"Function","isInstance":true},"IArguments":{"kind":9,"retType":"IArguments","extendsTypes":[]},"IArguments.__assignableToIArguments":{"kind":2,"retType":"IArguments","isInstance":true},"RegExp":{"kind":9,"retType":"RegExp","extendsTypes":[]},"RegExp.__assignableToRegExp":{"kind":2,"retType":"RegExp","isInstance":true},"Boolean":{"kind":9,"retType":"Boolean","extendsTypes":[]},"Boolean.toString":{"kind":-1,"retType":"string","attributes":{"jsDoc":"Returns a string representation of an object."},"parameters":[],"isInstance":true,"pyQName":"Boolean.to_string"},"String@type":{"kind":9,"retType":"String","attributes":{"blockNamespace":"text","jsDoc":"Combine, split, and search text strings."},"extendsTypes":[],"pyQName":"String"},"String.fromCharCode":{"kind":-3,"retType":"string","attributes":{"help":"math/from-char-code","weight":1,"blockNamespace":"text","blockId":"stringFromCharCode","block":"text from char code %code","jsDoc":"Make a string from the given ASCII character code.","_def":{"parts":[{"kind":"label","text":"text from char code ","style":[]},{"kind":"param","name":"code","ref":false}],"parameters":[{"kind":"param","name":"code","ref":false}]}},"parameters":[{"name":"code"}],"pyQName":"String.from_char_code"},"Number":{"kind":5,"retType":""},"Number.toString":{"kind":-1,"retType":"string","attributes":{"jsDoc":"Returns a string representation of a number."},"parameters":[],"isInstance":true,"pyQName":"Number.to_string"},"Array@type":{"kind":9,"retType":"T[]","attributes":{"blockNamespace":"Arrays","jsDoc":"Add, remove, and replace items in lists."},"extendsTypes":[],"pyQName":"Array"},"Array.isArray":{"kind":-3,"retType":"boolean","attributes":{"jsDoc":"Check if a given object is an array."},"parameters":[{"name":"obj","type":"any"}],"pyQName":"Array.is_array"},"Object@type":{"kind":9,"retType":"Object","extendsTypes":[],"pyQName":"Object"},"Object.keys":{"kind":-3,"retType":"string[]","attributes":{"jsDoc":"Return the field names in an object."},"parameters":[{"name":"obj","type":"any"}]},"Math":{"kind":5,"retType":"","attributes":{"jsDoc":"More complex operations with numbers."}},"Math.pow":{"kind":-3,"retType":"number","attributes":{"paramHelp":{"x":"The base value of the expression.","y":"The exponent value of the expression."},"jsDoc":"Returns the value of a base expression taken to a specified power."},"parameters":[{"name":"x","description":"The base value of the expression."},{"name":"y","description":"The exponent value of the expression."}]},"Math.random":{"kind":-3,"retType":"number","attributes":{"help":"math/random","jsDoc":"Returns a pseudorandom number between 0 and 1."},"parameters":[]},"Math.randomRange":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"min":"0","max":"10"},"blockId":"device_random_deprecated","block":"pick random %min|to %limit","help":"math/random-range","deprecated":"true","paramHelp":{"min":"the lower inclusive bound, eg: 0","max":"the upper inclusive bound, eg: 10"},"jsDoc":"Returns a pseudorandom number between min and max included.\nIf both numbers are integral, the result is integral.","_def":{"parts":[{"kind":"label","text":"pick random ","style":[]},{"kind":"param","name":"min","ref":false},{"kind":"break"},{"kind":"label","text":"to ","style":[]},{"kind":"param","name":"limit","ref":false}],"parameters":[{"kind":"param","name":"min","ref":false},{"kind":"param","name":"limit","ref":false}]}},"parameters":[{"name":"min","description":"the lower inclusive bound, eg: 0","default":"0"},{"name":"max","description":"the upper inclusive bound, eg: 10","default":"10"}],"pyQName":"Math.random_range"},"Math.log":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A number"},"jsDoc":"Returns the natural logarithm (base e) of a number."},"parameters":[{"name":"x","description":"A number"}]},"Math.exp":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A number"},"jsDoc":"Returns returns ``e^x``."},"parameters":[{"name":"x","description":"A number"}]},"Math.sin":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"An angle in radians"},"jsDoc":"Returns the sine of a number."},"parameters":[{"name":"x","description":"An angle in radians"}]},"Math.cos":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"An angle in radians"},"jsDoc":"Returns the cosine of a number."},"parameters":[{"name":"x","description":"An angle in radians"}]},"Math.tan":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"An angle in radians"},"jsDoc":"Returns the tangent of a number."},"parameters":[{"name":"x","description":"An angle in radians"}]},"Math.asin":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"A number"},"jsDoc":"Returns the arcsine (in radians) of a number"},"parameters":[{"name":"x","description":"A number"}]},"Math.acos":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"A number"},"jsDoc":"Returns the arccosine (in radians) of a number"},"parameters":[{"name":"x","description":"A number"}]},"Math.atan":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"A number"},"jsDoc":"Returns the arctangent (in radians) of a number"},"parameters":[{"name":"x","description":"A number"}]},"Math.atan2":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"y":"A number","x":"A number"},"jsDoc":"Returns the arctangent of the quotient of its arguments."},"parameters":[{"name":"y","description":"A number"},{"name":"x","description":"A number"}]},"Math.sqrt":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A numeric expression."},"jsDoc":"Returns the square root of a number."},"parameters":[{"name":"x","description":"A numeric expression."}]},"Math.ceil":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A numeric expression."},"jsDoc":"Returns the smallest number greater than or equal to its numeric argument."},"parameters":[{"name":"x","description":"A numeric expression."}]},"Math.floor":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A numeric expression."},"jsDoc":"Returns the greatest number less than or equal to its numeric argument."},"parameters":[{"name":"x","description":"A numeric expression."}]},"Math.trunc":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A numeric expression."},"jsDoc":"Returns the number with the decimal part truncated."},"parameters":[{"name":"x","description":"A numeric expression."}],"pyQName":"int"},"Math.round":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"The value to be rounded to the nearest number."},"jsDoc":"Returns a supplied numeric expression rounded to the nearest number."},"parameters":[{"name":"x","description":"The value to be rounded to the nearest number."}]},"Math.imul":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"The first number","y":"The second number"},"jsDoc":"Returns the value of integer signed 32 bit multiplication of two numbers."},"parameters":[{"name":"x","description":"The first number"},{"name":"y","description":"The second number"}]},"Math.idiv":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"The first number","y":"The second number"},"jsDoc":"Returns the value of integer signed 32 bit division of two numbers."},"parameters":[{"name":"x","description":"The first number"},{"name":"y","description":"The second number"}]},"control":{"kind":5,"retType":""},"control._onCodeStart":{"kind":-3,"parameters":[{"name":"arg","type":"any"}],"pyQName":"control._on_code_start"},"control._onCodeStop":{"kind":-3,"parameters":[{"name":"arg","type":"any"}],"pyQName":"control._on_code_stop"},"NaN":{"kind":4,"retType":"number","attributes":{"jsDoc":"Constant representing Not-A-Number."},"pyQName":"na_n"},"Infinity":{"kind":4,"retType":"number","attributes":{"jsDoc":"Constant representing positive infinity."},"pyQName":"infinity"},"isNaN":{"kind":-3,"retType":"boolean","parameters":[{"name":"x"}],"pyQName":"is_na_n"},"Number@type":{"kind":9,"retType":"Number","extendsTypes":[],"pyQName":"Number"},"Number.isNaN":{"kind":-3,"retType":"boolean","attributes":{"jsDoc":"Check if a given value is of type Number and it is a NaN."},"parameters":[{"name":"x","type":"any"}],"pyQName":"Number.is_na_n"},"StringMap":{"kind":9,"retType":"StringMap","attributes":{"jsDoc":"A dictionary from string key to string values"},"extendsTypes":[]},"parseInt":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"text":"123"},"help":"text/parse-int","blockId":"string_parseint","block":"parse to integer %text","blockNamespace":"text","explicitDefaults":["text"],"blockHidden":true,"paramHelp":{"text":"A string to convert into an integral number. eg: \"123\"","radix":"optional A value between 2 and 36 that specifies the base of the number in text."},"jsDoc":"Convert a string to an integer.\n\n\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\nAll other strings are considered decimal.","_def":{"parts":[{"kind":"label","text":"parse to integer ","style":[]},{"kind":"param","name":"text","ref":false}],"parameters":[{"kind":"param","name":"text","ref":false}]}},"parameters":[{"name":"text","description":"A string to convert into an integral number. eg: \"123\"","type":"string","initializer":"123","default":"123"},{"name":"radix","description":"optional A value between 2 and 36 that specifies the base of the number in text.","initializer":"undefined"}],"pyQName":"int"},"helpers":{"kind":5,"retType":""},"helpers.arrayFill":{"kind":-3,"retType":"T[]","parameters":[{"name":"O","type":"T[]"},{"name":"value","type":"T"},{"name":"start","initializer":"undefined"},{"name":"end","initializer":"undefined"}],"pyQName":"helpers.array_fill"},"helpers.arraySplice":{"kind":-3,"parameters":[{"name":"arr","type":"T[]"},{"name":"start"},{"name":"len"}],"pyQName":"helpers.array_splice"},"helpers.arrayReverse":{"kind":-3,"parameters":[{"name":"arr","type":"T[]"}],"pyQName":"helpers.array_reverse"},"helpers.arrayShift":{"kind":-3,"retType":"T","parameters":[{"name":"arr","type":"T[]"}],"pyQName":"helpers.array_shift"},"helpers.arrayJoin":{"kind":-3,"retType":"string","parameters":[{"name":"arr","type":"T[]"},{"name":"sep","type":"string","initializer":"undefined"}],"pyQName":"helpers.array_join"},"helpers.arrayUnshift":{"kind":-3,"retType":"number","parameters":[{"name":"arr","type":"T[]"},{"name":"value","type":"T"}],"pyQName":"helpers.array_unshift"},"helpers.arraySort":{"kind":-3,"retType":"T[]","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value1: T, value2: T) => number","initializer":"undefined","handlerParameters":[{"name":"value1","type":"T"},{"name":"value2","type":"T"}]}],"pyQName":"helpers.array_sort"},"helpers.arrayMap":{"kind":-3,"retType":"U[]","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => U","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_map"},"helpers.arraySome":{"kind":-3,"retType":"boolean","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_some"},"helpers.arrayEvery":{"kind":-3,"retType":"boolean","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_every"},"helpers.arrayForEach":{"kind":-3,"parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => void","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_for_each"},"helpers.arrayFilter":{"kind":-3,"retType":"T[]","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_filter"},"helpers.arrayFind":{"kind":-3,"retType":"T","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_find"},"helpers.arrayReduce":{"kind":-3,"retType":"U","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(previousValue: U, currentValue: T, currentIndex: number) => U","handlerParameters":[{"name":"previousValue","type":"U"},{"name":"currentValue","type":"T"},{"name":"currentIndex","type":"number"}]},{"name":"initialValue","type":"U"}],"pyQName":"helpers.array_reduce"},"helpers.arrayConcat":{"kind":-3,"retType":"T[]","parameters":[{"name":"arr","type":"T[]"},{"name":"otherArr","type":"T[]"}],"pyQName":"helpers.array_concat"},"helpers.arrayPickRandom":{"kind":-3,"retType":"T","parameters":[{"name":"arr","type":"T[]"}],"pyQName":"helpers.array_pick_random"},"helpers.arraySlice":{"kind":-3,"retType":"T[]","parameters":[{"name":"arr","type":"T[]"},{"name":"start","initializer":"undefined"},{"name":"end","initializer":"undefined"}],"pyQName":"helpers.array_slice"},"helpers.stringReplace":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"},{"name":"toReplace","type":"string"},{"name":"replacer","type":"string | ((sub: string) => string)"}],"pyQName":"helpers.string_replace"},"helpers.stringReplaceAll":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"},{"name":"toReplace","type":"string"},{"name":"replacer","type":"string | ((sub: string) => string)"}],"pyQName":"helpers.string_replace_all"},"helpers.stringSubstr":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"},{"name":"start"},{"name":"length","initializer":"undefined"}],"pyQName":"helpers.string_substr"},"helpers.stringSlice":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"},{"name":"start"},{"name":"end","initializer":"undefined"}],"pyQName":"helpers.string_slice"},"helpers.stringToUpperCase":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"}],"pyQName":"helpers.string_to_upper_case"},"helpers.stringToLowerCase":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"}],"pyQName":"helpers.string_to_lower_case"},"helpers.stringSplit":{"kind":-3,"retType":"string[]","parameters":[{"name":"S","type":"string"},{"name":"separator","type":"string","initializer":"undefined"},{"name":"limit","initializer":"undefined"}],"pyQName":"helpers.string_split"},"helpers.stringTrim":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"}],"pyQName":"helpers.string_trim"},"helpers.isWhitespace":{"kind":-3,"retType":"boolean","parameters":[{"name":"c"}],"pyQName":"helpers.is_whitespace"},"helpers.stringEmpty":{"kind":-3,"retType":"boolean","parameters":[{"name":"S","type":"string"}],"pyQName":"helpers.string_empty"},"Math.clamp":{"kind":-3,"retType":"number","parameters":[{"name":"min"},{"name":"max"},{"name":"value"}]},"Math.abs":{"kind":-3,"retType":"number","attributes":{"blockId":"math_op3","help":"math/abs","paramHelp":{"x":"A numeric expression for which the absolute value is needed."},"jsDoc":"Returns the absolute value of a number (the value without regard to whether it is positive or negative).\nFor example, the absolute value of -5 is the same as the absolute value of 5."},"parameters":[{"name":"x","description":"A numeric expression for which the absolute value is needed."}],"pyQName":"abs"},"Math.sign":{"kind":-3,"retType":"number","attributes":{"paramHelp":{"x":"The numeric expression to test"},"jsDoc":"Returns the sign of the x, indicating whether x is positive, negative or zero."},"parameters":[{"name":"x","description":"The numeric expression to test"}]},"Math.max":{"kind":-3,"retType":"number","attributes":{"blockId":"math_op2","help":"math/max","jsDoc":"Returns the larger of two supplied numeric expressions."},"parameters":[{"name":"a"},{"name":"b"}],"pyQName":"max"},"Math.min":{"kind":-3,"retType":"number","attributes":{"blockId":"math_op2","help":"math/min","jsDoc":"Returns the smaller of two supplied numeric expressions."},"parameters":[{"name":"a"},{"name":"b"}],"pyQName":"min"},"Math.roundWithPrecision":{"kind":-3,"retType":"number","attributes":{"paramHelp":{"x":"the number to round","digits":"the number of resulting digits"},"jsDoc":"Rounds ``x`` to a number with the given number of ``digits``"},"parameters":[{"name":"x","description":"the number to round"},{"name":"digits","description":"the number of resulting digits"}],"pyQName":"Math.round_with_precision"},"__internal":{"kind":5,"retType":"","attributes":{"blockHidden":true}},"__internal.__downUp":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleDownUp","block":"%down","paramFieldEditor":{"down":"toggledownup"},"paramFieldEditorOptions":{"down":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a down/up toggle","_def":{"parts":[{"kind":"param","name":"down","ref":false}],"parameters":[{"kind":"param","name":"down","ref":false}]}},"parameters":[{"name":"down","type":"boolean"}]},"__internal.__upDown":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleUpDown","block":"%up","paramFieldEditor":{"up":"toggleupdown"},"paramFieldEditorOptions":{"up":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a up/down toggle","_def":{"parts":[{"kind":"param","name":"up","ref":false}],"parameters":[{"kind":"param","name":"up","ref":false}]}},"parameters":[{"name":"up","type":"boolean"}]},"__internal.__highLow":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleHighLow","block":"%high","paramFieldEditor":{"high":"togglehighlow"},"paramFieldEditorOptions":{"high":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a high/low toggle","_def":{"parts":[{"kind":"param","name":"high","ref":false}],"parameters":[{"kind":"param","name":"high","ref":false}]}},"parameters":[{"name":"high","type":"boolean"}]},"__internal.__onOff":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleOnOff","block":"%on","paramFieldEditor":{"on":"toggleonoff"},"paramFieldEditorOptions":{"on":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a on/off toggle","_def":{"parts":[{"kind":"param","name":"on","ref":false}],"parameters":[{"kind":"param","name":"on","ref":false}]}},"parameters":[{"name":"on","type":"boolean"}]},"__internal.__yesNo":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleYesNo","block":"%yes","paramFieldEditor":{"yes":"toggleyesno"},"paramFieldEditorOptions":{"yes":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a yes/no toggle","_def":{"parts":[{"kind":"param","name":"yes","ref":false}],"parameters":[{"kind":"param","name":"yes","ref":false}]}},"parameters":[{"name":"yes","type":"boolean"}]},"__internal.__winLose":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleWinLose","block":"%win","paramFieldEditor":{"win":"togglewinlose"},"paramFieldEditorOptions":{"win":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a win/lose toggle","_def":{"parts":[{"kind":"param","name":"win","ref":false}],"parameters":[{"kind":"param","name":"win","ref":false}]}},"parameters":[{"name":"win","type":"boolean"}]},"__internal.__colorNumberPicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"value":"0xff0000"},"blockId":"colorNumberPicker","block":"%value","blockHidden":true,"shim":"TD_ID","colorSecondary":"#FFFFFF","paramFieldEditor":{"value":"colornumber"},"paramFieldEditorOptions":{"value":{"decompileLiterals":"true","colours":"[\"#ff0000\",\"#ff8000\",\"#ffff00\",\"#ff9da5\",\"#00ff00\",\"#b09eff\",\"#00ffff\",\"#007fff\",\"#65471f\",\"#0000ff\",\"#7f00ff\",\"#ff0080\",\"#ff00ff\",\"#ffffff\",\"#999999\",\"#000000\"]","columns":"4","className":"rgbColorPicker"}},"explicitDefaults":["value"],"paramHelp":{"color":"color"},"jsDoc":"Get the color wheel field editor","_def":{"parts":[{"kind":"param","name":"value","ref":false}],"parameters":[{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"value","initializer":"0xff0000","default":"0xff0000"}]},"__internal.__colorWheelPicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"value":"10"},"blockId":"colorWheelPicker","block":"%value","blockHidden":true,"shim":"TD_ID","colorSecondary":"#FFFFFF","paramFieldEditor":{"value":"colorwheel"},"paramFieldEditorOptions":{"value":{"decompileLiterals":"true","sliderWidth":"200","min":"0","max":"255"}},"paramHelp":{"value":"value between 0 to 255 to get a color value, eg: 10"},"jsDoc":"Get the color wheel field editor","_def":{"parts":[{"kind":"param","name":"value","ref":false}],"parameters":[{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"value","description":"value between 0 to 255 to get a color value, eg: 10","default":"10"}]},"__internal.__colorWheelHsvPicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"value":"10"},"blockId":"colorWheelHsvPicker","block":"%value","blockHidden":true,"shim":"TD_ID","colorSecondary":"#FFFFFF","paramFieldEditor":{"value":"colorwheel"},"paramFieldEditorOptions":{"value":{"decompileLiterals":"true","sliderWidth":"200","min":"0","max":"255","channel":"hsvfast"}},"paramHelp":{"value":"value between 0 to 255 to get a color value, eg: 10"},"jsDoc":"Get the color wheel field editor using HSV values","_def":{"parts":[{"kind":"param","name":"value","ref":false}],"parameters":[{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"value","description":"value between 0 to 255 to get a color value, eg: 10","default":"10"}]},"__internal.__speedPicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"speed":"50"},"blockId":"speedPicker","block":"%speed","shim":"TD_ID","paramFieldEditor":{"speed":"speed"},"colorSecondary":"#FFFFFF","weight":0,"blockHidden":true,"paramFieldEditorOptions":{"speed":{"decompileLiterals":"1"}},"paramHelp":{"speed":"the speed, eg: 50"},"jsDoc":"A speed picker","_def":{"parts":[{"kind":"param","name":"speed","ref":false}],"parameters":[{"kind":"param","name":"speed","ref":false}]}},"parameters":[{"name":"speed","description":"the speed, eg: 50","default":"50"}]},"__internal.__turnRatioPicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"turnratio":"0"},"blockId":"turnRatioPicker","block":"%turnratio","shim":"TD_ID","paramFieldEditor":{"turnratio":"turnratio"},"colorSecondary":"#FFFFFF","weight":0,"blockHidden":true,"paramFieldEditorOptions":{"turnRatio":{"decompileLiterals":"1"}},"paramHelp":{"turnratio":"the turn ratio, eg: 0"},"jsDoc":"A turn ratio picker","_def":{"parts":[{"kind":"param","name":"turnratio","ref":false}],"parameters":[{"kind":"param","name":"turnratio","ref":false}]}},"parameters":[{"name":"turnratio","description":"the turn ratio, eg: 0","default":"0"}]},"__internal.__protractor":{"kind":-3,"retType":"number","attributes":{"blockId":"protractorPicker","block":"%angle","shim":"TD_ID","paramFieldEditor":{"angle":"protractor"},"paramFieldEditorOptions":{"angle":{"decompileLiterals":"1"}},"colorSecondary":"#FFFFFF","blockHidden":true,"jsDoc":"A field editor that displays a protractor","_def":{"parts":[{"kind":"param","name":"angle","ref":false}],"parameters":[{"kind":"param","name":"angle","ref":false}]}},"parameters":[{"name":"angle"}]},"__internal.__timePicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"ms":"500"},"blockId":"timePicker","block":"%ms","blockHidden":true,"shim":"TD_ID","colorSecondary":"#FFFFFF","paramFieldEditor":{"ms":"numberdropdown"},"paramFieldEditorOptions":{"ms":{"decompileLiterals":"true","data":"[[\"100 ms\", 100], [\"200 ms\", 200], [\"500 ms\", 500], [\"1 second\", 1000], [\"2 seconds\", 2000], [\"5 seconds\", 5000]]"}},"paramHelp":{"ms":"time duration in milliseconds, eg: 500, 1000"},"jsDoc":"Get the time field editor","_def":{"parts":[{"kind":"param","name":"ms","ref":false}],"parameters":[{"kind":"param","name":"ms","ref":false}]}},"parameters":[{"name":"ms","description":"time duration in milliseconds, eg: 500, 1000","default":"500"}]}}},"sha":"06ba1f182ae3ff4272b722346da578235fd9c34984599bf7e668f377e7b56f01"}}}
|