blockly 13.0.0-beta.5 → 13.0.0-beta.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.
Files changed (272) hide show
  1. package/blockly.min.js +358 -311
  2. package/blockly_compressed.js +194 -204
  3. package/blockly_compressed.js.map +1 -1
  4. package/blocks_compressed.js +108 -101
  5. package/blocks_compressed.js.map +1 -1
  6. package/core/block.d.ts +0 -7
  7. package/core/block_aria_composer.d.ts +1 -1
  8. package/core/common.d.ts +7 -0
  9. package/core/dragging/block_drag_strategy.d.ts +27 -0
  10. package/core/grid.d.ts +1 -1
  11. package/core/inputs/input.d.ts +5 -2
  12. package/core/options.d.ts +3 -3
  13. package/core/procedures.d.ts +4 -6
  14. package/core/toolbox/category.d.ts +6 -0
  15. package/core/variable_map.d.ts +0 -33
  16. package/core/variables.d.ts +5 -6
  17. package/core/variables_dynamic.d.ts +4 -6
  18. package/core/workspace.d.ts +0 -81
  19. package/core/workspace_svg.d.ts +5 -0
  20. package/msg/ab.js +56 -6
  21. package/msg/ab.mjs +50 -0
  22. package/msg/ace.js +56 -6
  23. package/msg/ace.mjs +50 -0
  24. package/msg/af.js +56 -6
  25. package/msg/af.mjs +50 -0
  26. package/msg/am.js +56 -6
  27. package/msg/am.mjs +50 -0
  28. package/msg/ar.js +53 -3
  29. package/msg/ar.mjs +50 -0
  30. package/msg/ast.js +56 -6
  31. package/msg/ast.mjs +50 -0
  32. package/msg/az.js +56 -6
  33. package/msg/az.mjs +50 -0
  34. package/msg/ba.js +56 -6
  35. package/msg/ba.mjs +50 -0
  36. package/msg/bcc.js +56 -6
  37. package/msg/bcc.mjs +50 -0
  38. package/msg/be-tarask.js +56 -6
  39. package/msg/be-tarask.mjs +50 -0
  40. package/msg/be.js +56 -6
  41. package/msg/be.mjs +50 -0
  42. package/msg/bg.js +76 -26
  43. package/msg/bg.mjs +50 -0
  44. package/msg/bn.js +56 -6
  45. package/msg/bn.mjs +50 -0
  46. package/msg/br.js +56 -6
  47. package/msg/br.mjs +50 -0
  48. package/msg/bs.js +56 -6
  49. package/msg/bs.mjs +50 -0
  50. package/msg/ca.js +56 -6
  51. package/msg/ca.mjs +50 -0
  52. package/msg/ce.js +56 -6
  53. package/msg/ce.mjs +50 -0
  54. package/msg/cs.js +76 -26
  55. package/msg/cs.mjs +50 -0
  56. package/msg/da.js +53 -3
  57. package/msg/da.mjs +50 -0
  58. package/msg/de.js +56 -6
  59. package/msg/de.mjs +50 -0
  60. package/msg/diq.js +56 -6
  61. package/msg/diq.mjs +50 -0
  62. package/msg/dtp.js +56 -6
  63. package/msg/dtp.mjs +50 -0
  64. package/msg/dty.js +56 -6
  65. package/msg/dty.mjs +50 -0
  66. package/msg/ee.js +56 -6
  67. package/msg/ee.mjs +50 -0
  68. package/msg/el.js +53 -3
  69. package/msg/el.mjs +50 -0
  70. package/msg/en-gb.js +56 -6
  71. package/msg/en-gb.mjs +50 -0
  72. package/msg/en.js +56 -6
  73. package/msg/en.mjs +50 -0
  74. package/msg/eo.js +56 -6
  75. package/msg/eo.mjs +50 -0
  76. package/msg/es.js +53 -3
  77. package/msg/es.mjs +50 -0
  78. package/msg/et.js +56 -6
  79. package/msg/et.mjs +50 -0
  80. package/msg/eu.js +56 -6
  81. package/msg/eu.mjs +50 -0
  82. package/msg/fa.js +56 -6
  83. package/msg/fa.mjs +50 -0
  84. package/msg/fi.js +59 -9
  85. package/msg/fi.mjs +50 -0
  86. package/msg/fo.js +56 -6
  87. package/msg/fo.mjs +50 -0
  88. package/msg/fr.js +53 -3
  89. package/msg/fr.mjs +50 -0
  90. package/msg/frr.js +56 -6
  91. package/msg/frr.mjs +50 -0
  92. package/msg/ga.js +53 -3
  93. package/msg/ga.mjs +50 -0
  94. package/msg/gl.js +53 -3
  95. package/msg/gl.mjs +50 -0
  96. package/msg/gn.js +56 -6
  97. package/msg/gn.mjs +50 -0
  98. package/msg/gor.js +56 -6
  99. package/msg/gor.mjs +50 -0
  100. package/msg/ha.js +56 -6
  101. package/msg/ha.mjs +50 -0
  102. package/msg/hak.js +56 -6
  103. package/msg/hak.mjs +50 -0
  104. package/msg/he.js +56 -6
  105. package/msg/he.mjs +50 -0
  106. package/msg/hi.js +56 -6
  107. package/msg/hi.mjs +50 -0
  108. package/msg/hr.js +56 -6
  109. package/msg/hr.mjs +50 -0
  110. package/msg/hrx.js +56 -6
  111. package/msg/hrx.mjs +50 -0
  112. package/msg/hsb.js +56 -6
  113. package/msg/hsb.mjs +50 -0
  114. package/msg/hu.js +56 -6
  115. package/msg/hu.mjs +50 -0
  116. package/msg/hy.js +56 -6
  117. package/msg/hy.mjs +50 -0
  118. package/msg/ia.js +53 -3
  119. package/msg/ia.mjs +50 -0
  120. package/msg/id.js +53 -3
  121. package/msg/id.mjs +50 -0
  122. package/msg/ig.js +53 -3
  123. package/msg/ig.mjs +50 -0
  124. package/msg/inh.js +56 -6
  125. package/msg/inh.mjs +50 -0
  126. package/msg/is.js +56 -6
  127. package/msg/is.mjs +50 -0
  128. package/msg/it.js +53 -3
  129. package/msg/it.mjs +50 -0
  130. package/msg/ja.js +53 -3
  131. package/msg/ja.mjs +50 -0
  132. package/msg/ka.js +56 -6
  133. package/msg/ka.mjs +50 -0
  134. package/msg/kab.js +55 -5
  135. package/msg/kab.mjs +50 -0
  136. package/msg/kbd-cyrl.js +56 -6
  137. package/msg/kbd-cyrl.mjs +50 -0
  138. package/msg/km.js +56 -6
  139. package/msg/km.mjs +50 -0
  140. package/msg/kn.js +56 -6
  141. package/msg/kn.mjs +50 -0
  142. package/msg/ko.js +70 -20
  143. package/msg/ko.mjs +50 -0
  144. package/msg/krc.js +53 -3
  145. package/msg/krc.mjs +50 -0
  146. package/msg/ksh.js +56 -6
  147. package/msg/ksh.mjs +50 -0
  148. package/msg/ku-latn.js +56 -6
  149. package/msg/ku-latn.mjs +50 -0
  150. package/msg/ky.js +56 -6
  151. package/msg/ky.mjs +50 -0
  152. package/msg/la.js +56 -6
  153. package/msg/la.mjs +50 -0
  154. package/msg/lb.js +56 -6
  155. package/msg/lb.mjs +50 -0
  156. package/msg/lki.js +56 -6
  157. package/msg/lki.mjs +50 -0
  158. package/msg/lo.js +56 -6
  159. package/msg/lo.mjs +50 -0
  160. package/msg/lrc.js +56 -6
  161. package/msg/lrc.mjs +50 -0
  162. package/msg/lt.js +56 -6
  163. package/msg/lt.mjs +50 -0
  164. package/msg/lv.js +56 -6
  165. package/msg/lv.mjs +50 -0
  166. package/msg/mg.js +56 -6
  167. package/msg/mg.mjs +50 -0
  168. package/msg/mk.js +56 -6
  169. package/msg/mk.mjs +50 -0
  170. package/msg/ml.js +56 -6
  171. package/msg/ml.mjs +50 -0
  172. package/msg/mnw.js +56 -6
  173. package/msg/mnw.mjs +50 -0
  174. package/msg/ms.js +56 -6
  175. package/msg/ms.mjs +50 -0
  176. package/msg/my.js +56 -6
  177. package/msg/my.mjs +50 -0
  178. package/msg/mzn.js +56 -6
  179. package/msg/mzn.mjs +50 -0
  180. package/msg/nb.js +56 -6
  181. package/msg/nb.mjs +50 -0
  182. package/msg/ne.js +56 -6
  183. package/msg/ne.mjs +50 -0
  184. package/msg/nl.js +55 -5
  185. package/msg/nl.mjs +50 -0
  186. package/msg/oc.js +56 -6
  187. package/msg/oc.mjs +50 -0
  188. package/msg/olo.js +56 -6
  189. package/msg/olo.mjs +50 -0
  190. package/msg/pa.js +55 -5
  191. package/msg/pa.mjs +50 -0
  192. package/msg/pl.js +53 -3
  193. package/msg/pl.mjs +50 -0
  194. package/msg/pms.js +53 -3
  195. package/msg/pms.mjs +50 -0
  196. package/msg/ps.js +59 -9
  197. package/msg/ps.mjs +50 -0
  198. package/msg/pt-br.js +53 -3
  199. package/msg/pt-br.mjs +50 -0
  200. package/msg/pt.js +53 -3
  201. package/msg/pt.mjs +50 -0
  202. package/msg/ro.js +53 -3
  203. package/msg/ro.mjs +50 -0
  204. package/msg/ru.js +53 -3
  205. package/msg/ru.mjs +50 -0
  206. package/msg/sc.js +56 -6
  207. package/msg/sc.mjs +50 -0
  208. package/msg/sco.js +56 -6
  209. package/msg/sco.mjs +50 -0
  210. package/msg/sd.js +56 -6
  211. package/msg/sd.mjs +50 -0
  212. package/msg/shn.js +56 -6
  213. package/msg/shn.mjs +50 -0
  214. package/msg/si.js +56 -6
  215. package/msg/si.mjs +50 -0
  216. package/msg/sk.js +56 -6
  217. package/msg/sk.mjs +50 -0
  218. package/msg/skr-arab.js +56 -6
  219. package/msg/skr-arab.mjs +50 -0
  220. package/msg/sl.js +53 -3
  221. package/msg/sl.mjs +50 -0
  222. package/msg/smn.js +56 -6
  223. package/msg/smn.mjs +50 -0
  224. package/msg/sq.js +56 -6
  225. package/msg/sq.mjs +50 -0
  226. package/msg/sr-latn.js +56 -6
  227. package/msg/sr-latn.mjs +50 -0
  228. package/msg/sr.js +56 -6
  229. package/msg/sr.mjs +50 -0
  230. package/msg/sv.js +53 -3
  231. package/msg/sv.mjs +50 -0
  232. package/msg/sw.js +56 -6
  233. package/msg/sw.mjs +50 -0
  234. package/msg/ta.js +55 -5
  235. package/msg/ta.mjs +50 -0
  236. package/msg/tcy.js +53 -3
  237. package/msg/tcy.mjs +50 -0
  238. package/msg/tdd.js +56 -6
  239. package/msg/tdd.mjs +50 -0
  240. package/msg/te.js +56 -6
  241. package/msg/te.mjs +50 -0
  242. package/msg/th.js +56 -6
  243. package/msg/th.mjs +50 -0
  244. package/msg/ti.js +56 -6
  245. package/msg/ti.mjs +50 -0
  246. package/msg/tl.js +56 -6
  247. package/msg/tl.mjs +50 -0
  248. package/msg/tlh.js +56 -6
  249. package/msg/tlh.mjs +50 -0
  250. package/msg/tr.js +53 -3
  251. package/msg/tr.mjs +50 -0
  252. package/msg/ug-arab.js +56 -6
  253. package/msg/ug-arab.mjs +50 -0
  254. package/msg/uk.js +65 -15
  255. package/msg/uk.mjs +50 -0
  256. package/msg/ur.js +56 -6
  257. package/msg/ur.mjs +50 -0
  258. package/msg/uz.js +56 -6
  259. package/msg/uz.mjs +50 -0
  260. package/msg/vi.js +53 -3
  261. package/msg/vi.mjs +50 -0
  262. package/msg/xmf.js +56 -6
  263. package/msg/xmf.mjs +50 -0
  264. package/msg/yo.js +56 -6
  265. package/msg/yo.mjs +50 -0
  266. package/msg/zgh.js +56 -6
  267. package/msg/zgh.mjs +50 -0
  268. package/msg/zh-hans.js +53 -3
  269. package/msg/zh-hans.mjs +50 -0
  270. package/msg/zh-hant.js +53 -3
  271. package/msg/zh-hant.mjs +50 -0
  272. package/package.json +2 -2
@@ -19,22 +19,22 @@ isCommentDelete$$module$build$src$core$events$predicates,isCommentChange$$module
19
19
  fireNow$$module$build$src$core$events$utils,enqueueEvent$$module$build$src$core$events$utils,filter$$module$build$src$core$events$utils,clearPendingUndo$$module$build$src$core$events$utils,isEnabled$$module$build$src$core$events$utils,setGroupInternal$$module$build$src$core$events$utils,getDescendantIds$$module$build$src$core$events$utils,fromJson$$module$build$src$core$events$utils,get$$module$build$src$core$events$utils,disableOrphans$$module$build$src$core$events$utils,removeRole$$module$build$src$core$utils$aria,
20
20
  setRole$$module$build$src$core$utils$aria,getRole$$module$build$src$core$utils$aria,setState$$module$build$src$core$utils$aria,clearState$$module$build$src$core$utils$aria,getState$$module$build$src$core$utils$aria,initializeGlobalAriaLiveRegion$$module$build$src$core$utils$aria,announceDynamicAriaState$$module$build$src$core$utils$aria,mostAssertive$$module$build$src$core$utils$aria,createSvgElement$$module$build$src$core$utils$dom,addClass$$module$build$src$core$utils$dom,removeClasses$$module$build$src$core$utils$dom,
21
21
  removeClass$$module$build$src$core$utils$dom,hasClass$$module$build$src$core$utils$dom,removeNode$$module$build$src$core$utils$dom,insertAfter$$module$build$src$core$utils$dom,setCssTransform$$module$build$src$core$utils$dom,startTextWidthCache$$module$build$src$core$utils$dom,stopTextWidthCache$$module$build$src$core$utils$dom,getTextWidth$$module$build$src$core$utils$dom,getFastTextWidth$$module$build$src$core$utils$dom,getFastTextWidthWithSizeString$$module$build$src$core$utils$dom,measureFontMetrics$$module$build$src$core$utils$dom,
22
- isFocusableNode$$module$build$src$core$interfaces$i_focusable_node,isSelectable$$module$build$src$core$interfaces$i_selectable,deepMerge$$module$build$src$core$utils$object,getWorkspaceById$$module$build$src$core$common,getAllWorkspaces$$module$build$src$core$common,registerWorkspace$$module$build$src$core$common,unregisterWorkpace$$module$build$src$core$common,getMainWorkspace$$module$build$src$core$common,setMainWorkspace$$module$build$src$core$common,getSelected$$module$build$src$core$common,setSelected$$module$build$src$core$common,
23
- fireSelectedEvent$$module$build$src$core$common,getParentContainer$$module$build$src$core$common,setParentContainer$$module$build$src$core$common,svgResize$$module$build$src$core$common,getBlockTypeCounts$$module$build$src$core$common,jsonInitFactory$$module$build$src$core$common,defineBlocksWithJsonArray$$module$build$src$core$common,defineBlocksWithJsonArrayInternal$$module$build$src$core$common,globalShortcutHandler$$module$build$src$core$common,removeElem$$module$build$src$core$utils$array,register$$module$build$src$core$css,
24
- inject$$module$build$src$core$css,getSize$$module$build$src$core$utils$style,getSizeInternal$$module$build$src$core$utils$style,getSizeWithDisplay$$module$build$src$core$utils$style,getComputedStyle$$module$build$src$core$utils$style,getPageOffset$$module$build$src$core$utils$style,getViewportPageOffset$$module$build$src$core$utils$style,getBorderBox$$module$build$src$core$utils$style,scrollIntoContainerView$$module$build$src$core$utils$style,getContainerOffsetToScrollInto$$module$build$src$core$utils$style,
25
- getRelativeXY$$module$build$src$core$utils$svg_math,getInjectionDivXY$$module$build$src$core$utils$svg_math,getViewportBBox$$module$build$src$core$utils$svg_math,getDocumentScroll$$module$build$src$core$utils$svg_math,screenToWsCoordinates$$module$build$src$core$utils$svg_math,wsToScreenCoordinates$$module$build$src$core$utils$svg_math,injectDependencies$$module$build$src$core$utils$xml,domToText$$module$build$src$core$utils$xml,sanitizeText$$module$build$src$core$utils$xml,convertToolboxDefToJson$$module$build$src$core$utils$toolbox,
26
- validateToolbox$$module$build$src$core$utils$toolbox,convertFlyoutDefToJsonArray$$module$build$src$core$utils$toolbox,hasCategories$$module$build$src$core$utils$toolbox,hasCategoriesInternal$$module$build$src$core$utils$toolbox,isCategoryCollapsible$$module$build$src$core$utils$toolbox,convertToToolboxJson$$module$build$src$core$utils$toolbox,xmlToJsonArray$$module$build$src$core$utils$toolbox,addAttributes$$module$build$src$core$utils$toolbox,parseToolboxTree$$module$build$src$core$utils$toolbox,
27
- getStartPositionRect$$module$build$src$core$positionable_helpers,getCornerOppositeToolbox$$module$build$src$core$positionable_helpers,bumpPositionRect$$module$build$src$core$positionable_helpers,register$$module$build$src$core$serialization$registry,unregister$$module$build$src$core$serialization$registry,save$$module$build$src$core$serialization$workspace_comments,append$$module$build$src$core$serialization$workspace_comments,register$$module$build$src$core$clipboard$registry,unregister$$module$build$src$core$clipboard$registry,
28
- moveCommentToNotConflict$$module$build$src$core$clipboard$workspace_comment_paster,commentOverlapsOtherExactly$$module$build$src$core$clipboard$workspace_comment_paster,isSerializable$$module$build$src$core$interfaces$i_serializable,queueRender$$module$build$src$core$render_management,finishQueuedRenders$$module$build$src$core$render_management,triggerQueuedRenders$$module$build$src$core$render_management,alwaysImmediatelyRender$$module$build$src$core$render_management,queueBlock$$module$build$src$core$render_management,
29
- doRenders$$module$build$src$core$render_management,dequeueBlock$$module$build$src$core$render_management,shouldRenderRootBlock$$module$build$src$core$render_management,renderBlock$$module$build$src$core$render_management,alert$$module$build$src$core$dialog,setAlert$$module$build$src$core$dialog,confirm$$module$build$src$core$dialog,setConfirm$$module$build$src$core$dialog,prompt$$module$build$src$core$dialog,setPrompt$$module$build$src$core$dialog,toast$$module$build$src$core$dialog,setToast$$module$build$src$core$dialog,
30
- displayDialog$$module$build$src$core$dialog,hasBubble$$module$build$src$core$interfaces$i_has_bubble,isLegacyProcedureDefBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks,isLegacyProcedureCallBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks,isVariableBackedParameterModel$$module$build$src$core$interfaces$i_variable_backed_parameter_model,internalFlyoutCategory$$module$build$src$core$variables,flyoutCategory$$module$build$src$core$variables,generateVariableFieldJson$$module$build$src$core$variables,
31
- jsonFlyoutCategoryBlocks$$module$build$src$core$variables,xmlFlyoutCategory$$module$build$src$core$variables,flyoutCategoryBlocks$$module$build$src$core$variables,generateUniqueName$$module$build$src$core$variables,generateUniqueNameInternal$$module$build$src$core$variables,generateUniqueNameFromOptions$$module$build$src$core$variables,createVariableButtonHandler$$module$build$src$core$variables,promptName$$module$build$src$core$variables,nameUsedWithOtherType$$module$build$src$core$variables,nameUsedWithAnyType$$module$build$src$core$variables,
32
- nameUsedWithConflictingParam$$module$build$src$core$variables,checkForConflictingParamWithProcedureModels$$module$build$src$core$variables,checkForConflictingParamWithLegacyProcedures$$module$build$src$core$variables,generateVariableFieldDom$$module$build$src$core$variables,createVariable$$module$build$src$core$variables,getAddedVariables$$module$build$src$core$variables,compareByName$$module$build$src$core$variables,getVariableUsesById$$module$build$src$core$variables,save$$module$build$src$core$serialization$blocks,
33
- saveAttributes$$module$build$src$core$serialization$blocks,saveCoords$$module$build$src$core$serialization$blocks,saveExtraState$$module$build$src$core$serialization$blocks,saveIcons$$module$build$src$core$serialization$blocks,saveFields$$module$build$src$core$serialization$blocks,saveInputBlocks$$module$build$src$core$serialization$blocks,saveNextBlocks$$module$build$src$core$serialization$blocks,saveConnection$$module$build$src$core$serialization$blocks,append$$module$build$src$core$serialization$blocks,
34
- appendInternal$$module$build$src$core$serialization$blocks,appendPrivate$$module$build$src$core$serialization$blocks,checkNewVariables$$module$build$src$core$serialization$blocks,loadCoords$$module$build$src$core$serialization$blocks,loadAttributes$$module$build$src$core$serialization$blocks,loadExtraState$$module$build$src$core$serialization$blocks,tryToConnectParent$$module$build$src$core$serialization$blocks,loadIcons$$module$build$src$core$serialization$blocks,loadFields$$module$build$src$core$serialization$blocks,
35
- loadInputBlocks$$module$build$src$core$serialization$blocks,loadNextBlocks$$module$build$src$core$serialization$blocks,loadConnection$$module$build$src$core$serialization$blocks,initBlock$$module$build$src$core$serialization$blocks,getShortcutKeysShort$$module$build$src$core$utils$shortcut_formatting,getShortcutKeysLong$$module$build$src$core$utils$shortcut_formatting,getKeyName$$module$build$src$core$utils$shortcut_formatting,getShortcutKeys$$module$build$src$core$utils$shortcut_formatting,upperCaseFirst$$module$build$src$core$utils$shortcut_formatting,
36
- modifierOrder$$module$build$src$core$utils$shortcut_formatting,toRadians$$module$build$src$core$utils$math,toDegrees$$module$build$src$core$utils$math,clamp$$module$build$src$core$utils$math,createDom$$module$build$src$core$dropdowndiv,handleFocusLoss$$module$build$src$core$dropdowndiv,setBoundsElement$$module$build$src$core$dropdowndiv,getOwner$$module$build$src$core$dropdowndiv,getContentDiv$$module$build$src$core$dropdowndiv,clearContent$$module$build$src$core$dropdowndiv,setColour$$module$build$src$core$dropdowndiv,
37
- showPositionedByBlock$$module$build$src$core$dropdowndiv,showPositionedByField$$module$build$src$core$dropdowndiv,getScaledBboxOfBlock$$module$build$src$core$dropdowndiv,getScaledBboxOfField$$module$build$src$core$dropdowndiv,showPositionedByRect$$module$build$src$core$dropdowndiv,show$$module$build$src$core$dropdowndiv,getPositionBelowMetrics$$module$build$src$core$dropdowndiv,getPositionAboveMetrics$$module$build$src$core$dropdowndiv,getPositionTopOfPageMetrics$$module$build$src$core$dropdowndiv,
22
+ isFocusableNode$$module$build$src$core$interfaces$i_focusable_node,isSelectable$$module$build$src$core$interfaces$i_selectable,deepMerge$$module$build$src$core$utils$object,warn$$module$build$src$core$utils$deprecation,getWorkspaceById$$module$build$src$core$common,getAllWorkspaces$$module$build$src$core$common,registerWorkspace$$module$build$src$core$common,unregisterWorkspace$$module$build$src$core$common,unregisterWorkpace$$module$build$src$core$common,getMainWorkspace$$module$build$src$core$common,
23
+ setMainWorkspace$$module$build$src$core$common,getSelected$$module$build$src$core$common,setSelected$$module$build$src$core$common,fireSelectedEvent$$module$build$src$core$common,getParentContainer$$module$build$src$core$common,setParentContainer$$module$build$src$core$common,svgResize$$module$build$src$core$common,getBlockTypeCounts$$module$build$src$core$common,jsonInitFactory$$module$build$src$core$common,defineBlocksWithJsonArray$$module$build$src$core$common,defineBlocksWithJsonArrayInternal$$module$build$src$core$common,
24
+ globalShortcutHandler$$module$build$src$core$common,removeElem$$module$build$src$core$utils$array,register$$module$build$src$core$css,inject$$module$build$src$core$css,getSize$$module$build$src$core$utils$style,getSizeInternal$$module$build$src$core$utils$style,getSizeWithDisplay$$module$build$src$core$utils$style,getComputedStyle$$module$build$src$core$utils$style,getPageOffset$$module$build$src$core$utils$style,getViewportPageOffset$$module$build$src$core$utils$style,getBorderBox$$module$build$src$core$utils$style,
25
+ scrollIntoContainerView$$module$build$src$core$utils$style,getContainerOffsetToScrollInto$$module$build$src$core$utils$style,getRelativeXY$$module$build$src$core$utils$svg_math,getInjectionDivXY$$module$build$src$core$utils$svg_math,getViewportBBox$$module$build$src$core$utils$svg_math,getDocumentScroll$$module$build$src$core$utils$svg_math,screenToWsCoordinates$$module$build$src$core$utils$svg_math,wsToScreenCoordinates$$module$build$src$core$utils$svg_math,injectDependencies$$module$build$src$core$utils$xml,
26
+ domToText$$module$build$src$core$utils$xml,sanitizeText$$module$build$src$core$utils$xml,convertToolboxDefToJson$$module$build$src$core$utils$toolbox,validateToolbox$$module$build$src$core$utils$toolbox,convertFlyoutDefToJsonArray$$module$build$src$core$utils$toolbox,hasCategories$$module$build$src$core$utils$toolbox,hasCategoriesInternal$$module$build$src$core$utils$toolbox,isCategoryCollapsible$$module$build$src$core$utils$toolbox,convertToToolboxJson$$module$build$src$core$utils$toolbox,xmlToJsonArray$$module$build$src$core$utils$toolbox,
27
+ addAttributes$$module$build$src$core$utils$toolbox,parseToolboxTree$$module$build$src$core$utils$toolbox,getStartPositionRect$$module$build$src$core$positionable_helpers,getCornerOppositeToolbox$$module$build$src$core$positionable_helpers,bumpPositionRect$$module$build$src$core$positionable_helpers,register$$module$build$src$core$serialization$registry,unregister$$module$build$src$core$serialization$registry,save$$module$build$src$core$serialization$workspace_comments,append$$module$build$src$core$serialization$workspace_comments,
28
+ register$$module$build$src$core$clipboard$registry,unregister$$module$build$src$core$clipboard$registry,moveCommentToNotConflict$$module$build$src$core$clipboard$workspace_comment_paster,commentOverlapsOtherExactly$$module$build$src$core$clipboard$workspace_comment_paster,isSerializable$$module$build$src$core$interfaces$i_serializable,queueRender$$module$build$src$core$render_management,finishQueuedRenders$$module$build$src$core$render_management,triggerQueuedRenders$$module$build$src$core$render_management,
29
+ alwaysImmediatelyRender$$module$build$src$core$render_management,queueBlock$$module$build$src$core$render_management,doRenders$$module$build$src$core$render_management,dequeueBlock$$module$build$src$core$render_management,shouldRenderRootBlock$$module$build$src$core$render_management,renderBlock$$module$build$src$core$render_management,alert$$module$build$src$core$dialog,setAlert$$module$build$src$core$dialog,confirm$$module$build$src$core$dialog,setConfirm$$module$build$src$core$dialog,prompt$$module$build$src$core$dialog,
30
+ setPrompt$$module$build$src$core$dialog,toast$$module$build$src$core$dialog,setToast$$module$build$src$core$dialog,displayDialog$$module$build$src$core$dialog,hasBubble$$module$build$src$core$interfaces$i_has_bubble,isLegacyProcedureDefBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks,isLegacyProcedureCallBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks,isVariableBackedParameterModel$$module$build$src$core$interfaces$i_variable_backed_parameter_model,flyoutCategory$$module$build$src$core$variables,
31
+ generateVariableFieldJson$$module$build$src$core$variables,jsonFlyoutCategoryBlocks$$module$build$src$core$variables,flyoutCategoryBlocks$$module$build$src$core$variables,generateUniqueName$$module$build$src$core$variables,generateUniqueNameInternal$$module$build$src$core$variables,generateUniqueNameFromOptions$$module$build$src$core$variables,createVariableButtonHandler$$module$build$src$core$variables,promptName$$module$build$src$core$variables,nameUsedWithOtherType$$module$build$src$core$variables,
32
+ nameUsedWithAnyType$$module$build$src$core$variables,nameUsedWithConflictingParam$$module$build$src$core$variables,checkForConflictingParamWithProcedureModels$$module$build$src$core$variables,checkForConflictingParamWithLegacyProcedures$$module$build$src$core$variables,generateVariableFieldDom$$module$build$src$core$variables,createVariable$$module$build$src$core$variables,getAddedVariables$$module$build$src$core$variables,compareByName$$module$build$src$core$variables,getVariableUsesById$$module$build$src$core$variables,
33
+ save$$module$build$src$core$serialization$blocks,saveAttributes$$module$build$src$core$serialization$blocks,saveCoords$$module$build$src$core$serialization$blocks,saveExtraState$$module$build$src$core$serialization$blocks,saveIcons$$module$build$src$core$serialization$blocks,saveFields$$module$build$src$core$serialization$blocks,saveInputBlocks$$module$build$src$core$serialization$blocks,saveNextBlocks$$module$build$src$core$serialization$blocks,saveConnection$$module$build$src$core$serialization$blocks,
34
+ append$$module$build$src$core$serialization$blocks,appendInternal$$module$build$src$core$serialization$blocks,appendPrivate$$module$build$src$core$serialization$blocks,checkNewVariables$$module$build$src$core$serialization$blocks,loadCoords$$module$build$src$core$serialization$blocks,loadAttributes$$module$build$src$core$serialization$blocks,loadExtraState$$module$build$src$core$serialization$blocks,tryToConnectParent$$module$build$src$core$serialization$blocks,loadIcons$$module$build$src$core$serialization$blocks,
35
+ loadFields$$module$build$src$core$serialization$blocks,loadInputBlocks$$module$build$src$core$serialization$blocks,loadNextBlocks$$module$build$src$core$serialization$blocks,loadConnection$$module$build$src$core$serialization$blocks,initBlock$$module$build$src$core$serialization$blocks,getShortcutKeysShort$$module$build$src$core$utils$shortcut_formatting,getShortcutKeysLong$$module$build$src$core$utils$shortcut_formatting,getKeyName$$module$build$src$core$utils$shortcut_formatting,getShortcutKeys$$module$build$src$core$utils$shortcut_formatting,
36
+ upperCaseFirst$$module$build$src$core$utils$shortcut_formatting,modifierOrder$$module$build$src$core$utils$shortcut_formatting,toRadians$$module$build$src$core$utils$math,toDegrees$$module$build$src$core$utils$math,clamp$$module$build$src$core$utils$math,createDom$$module$build$src$core$dropdowndiv,handleFocusLoss$$module$build$src$core$dropdowndiv,setBoundsElement$$module$build$src$core$dropdowndiv,getOwner$$module$build$src$core$dropdowndiv,getContentDiv$$module$build$src$core$dropdowndiv,clearContent$$module$build$src$core$dropdowndiv,
37
+ setColour$$module$build$src$core$dropdowndiv,showPositionedByBlock$$module$build$src$core$dropdowndiv,showPositionedByField$$module$build$src$core$dropdowndiv,getScaledBboxOfBlock$$module$build$src$core$dropdowndiv,getScaledBboxOfField$$module$build$src$core$dropdowndiv,showPositionedByRect$$module$build$src$core$dropdowndiv,show$$module$build$src$core$dropdowndiv,getPositionBelowMetrics$$module$build$src$core$dropdowndiv,getPositionAboveMetrics$$module$build$src$core$dropdowndiv,getPositionTopOfPageMetrics$$module$build$src$core$dropdowndiv,
38
38
  getPositionX$$module$build$src$core$dropdowndiv,isVisible$$module$build$src$core$dropdowndiv,hideIfOwner$$module$build$src$core$dropdowndiv,hide$$module$build$src$core$dropdowndiv,hideWithoutAnimation$$module$build$src$core$dropdowndiv,positionInternal$$module$build$src$core$dropdowndiv,repositionForWindowResize$$module$build$src$core$dropdowndiv,shortestStringLength$$module$build$src$core$utils$string,commonWordPrefix$$module$build$src$core$utils$string,commonWordSuffix$$module$build$src$core$utils$string,
39
39
  wrapLine$$module$build$src$core$utils$string,wrapScore$$module$build$src$core$utils$string,wrapMutate$$module$build$src$core$utils$string,wrapToText$$module$build$src$core$utils$string,setCustomTooltip$$module$build$src$core$tooltip,getCustomTooltip$$module$build$src$core$tooltip,isVisible$$module$build$src$core$tooltip,getDiv$$module$build$src$core$tooltip,getTooltipOfObject$$module$build$src$core$tooltip,getTargetObject$$module$build$src$core$tooltip,createDom$$module$build$src$core$tooltip,bindMouseEvents$$module$build$src$core$tooltip,
40
40
  unbindMouseEvents$$module$build$src$core$tooltip,onMouseOver$$module$build$src$core$tooltip,onMouseOut$$module$build$src$core$tooltip,onMouseMove$$module$build$src$core$tooltip,dispose$$module$build$src$core$tooltip,hide$$module$build$src$core$tooltip,display$$module$build$src$core$tooltip,block$$module$build$src$core$tooltip,unblock$$module$build$src$core$tooltip,renderContent$$module$build$src$core$tooltip,renderDefaultContent$$module$build$src$core$tooltip,getPosition$$module$build$src$core$tooltip,
@@ -58,16 +58,15 @@ registerFocusToolbox$$module$build$src$core$shortcut_items,registerReadInformati
58
58
  registerShowTooltip$$module$build$src$core$shortcut_items,registerToggleScreenreaderMode$$module$build$src$core$shortcut_items,registerDefaultShortcuts$$module$build$src$core$shortcut_items,registerKeyboardNavigationShortcuts$$module$build$src$core$shortcut_items,registerScreenReaderShortcuts$$module$build$src$core$shortcut_items,showUnconstrainedMoveHint$$module$build$src$core$hints,showConstrainedMovementHint$$module$build$src$core$hints,clearMoveHints$$module$build$src$core$hints,showHelpHint$$module$build$src$core$hints,
59
59
  showBlockNavigationHint$$module$build$src$core$hints,showWorkspaceNavigationHint$$module$build$src$core$hints,showFlyoutLabelActionHint$$module$build$src$core$hints,showCopiedHint$$module$build$src$core$hints,showCutHint$$module$build$src$core$hints,clearPasteHints$$module$build$src$core$hints,showScreenreaderModeHint$$module$build$src$core$hints,getBlockNavigationCandidates$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy,navigateBlock$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy,
60
60
  isCollapsibleToolboxItem$$module$build$src$core$interfaces$i_collapsible_toolbox_item,getPhysicalToolboxPosition$$module$build$src$core$keyboard_nav$navigators$toolbox_navigator,isAutoHideable$$module$build$src$core$interfaces$i_autohideable,register$$module$build$src$core$icons$registry,unregister$$module$build$src$core$icons$registry,isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block,isObservable$$module$build$src$core$interfaces$i_observable,allProcedures$$module$build$src$core$procedures,
61
- procTupleComparator$$module$build$src$core$procedures,isLegalName$$module$build$src$core$procedures,isNameUsed$$module$build$src$core$procedures,xmlFlyoutCategory$$module$build$src$core$procedures,internalFlyoutCategory$$module$build$src$core$procedures,flyoutCategory$$module$build$src$core$procedures,updateMutatorFlyout$$module$build$src$core$procedures,mutatorOpenListener$$module$build$src$core$procedures,mutatorChangeListener$$module$build$src$core$procedures,getCallers$$module$build$src$core$procedures,
62
- blockIsModernCallerFor$$module$build$src$core$procedures,isDynamicShape$$module$build$src$core$renderers$common$constants,isPuzzleTab$$module$build$src$core$renderers$common$constants,isNotch$$module$build$src$core$renderers$common$constants,register$$module$build$src$core$renderers$common$block_rendering,unregister$$module$build$src$core$renderers$common$block_rendering,init$$module$build$src$core$renderers$common$block_rendering,stringButtonClickHandler$$module$build$src$core$variables_dynamic,
63
- numberButtonClickHandler$$module$build$src$core$variables_dynamic,colourButtonClickHandler$$module$build$src$core$variables_dynamic,internalFlyoutCategory$$module$build$src$core$variables_dynamic,flyoutCategory$$module$build$src$core$variables_dynamic,xmlFlyoutCategory$$module$build$src$core$variables_dynamic,flyoutCategoryBlocks$$module$build$src$core$variables_dynamic,resizeSvgContents$$module$build$src$core$workspace_svg,saveProcedure$$module$build$src$core$serialization$procedures,loadProcedure$$module$build$src$core$serialization$procedures,
64
- save$$module$build$src$core$serialization$workspaces,load$$module$build$src$core$serialization$workspaces,inject$$module$build$src$core$inject,createDom$$module$build$src$core$inject,createMainWorkspace$$module$build$src$core$inject,init$$module$build$src$core$inject,bindDocumentEvents$$module$build$src$core$inject,loadSounds$$module$build$src$core$inject,isFullBlockField$$module$build$src$core$contextmenu_items,registerUndo$$module$build$src$core$contextmenu_items,registerRedo$$module$build$src$core$contextmenu_items,
65
- registerCleanup$$module$build$src$core$contextmenu_items,toggleOption_$$module$build$src$core$contextmenu_items,registerCollapse$$module$build$src$core$contextmenu_items,registerExpand$$module$build$src$core$contextmenu_items,addDeletableBlocks_$$module$build$src$core$contextmenu_items,getDeletableBlocks_$$module$build$src$core$contextmenu_items,deleteNext_$$module$build$src$core$contextmenu_items,registerDeleteAll$$module$build$src$core$contextmenu_items,registerWorkspaceOptions_$$module$build$src$core$contextmenu_items,
66
- registerDuplicate$$module$build$src$core$contextmenu_items,registerComment$$module$build$src$core$contextmenu_items,registerInline$$module$build$src$core$contextmenu_items,registerCollapseExpandBlock$$module$build$src$core$contextmenu_items,registerDisable$$module$build$src$core$contextmenu_items,registerDelete$$module$build$src$core$contextmenu_items,registerHelp$$module$build$src$core$contextmenu_items,registerCommentDelete$$module$build$src$core$contextmenu_items,registerCommentDuplicate$$module$build$src$core$contextmenu_items,
67
- registerCommentCreate$$module$build$src$core$contextmenu_items,registerBlockOptions_$$module$build$src$core$contextmenu_items,registerCommentOptions$$module$build$src$core$contextmenu_items,registerDefaultOptions$$module$build$src$core$contextmenu_items,isBoundedElement$$module$build$src$core$interfaces$i_bounded_element,isPaster$$module$build$src$core$interfaces$i_paster,isRenderedElement$$module$build$src$core$interfaces$i_rendered_element,hideChaff$$module$build$src$core$blockly,isFocusableTree$$module$build$src$core$interfaces$i_focusable_tree,
68
- $jscomp;
69
- register$$module$build$src$core$registry=function(a,b,c,d){if(!(a instanceof Type$$module$build$src$core$registry)&&typeof a!=="string"||`${a}`.trim()==="")throw Error('Invalid type "'+a+'". The type must be a non-empty string or a Blockly.registry.Type.');a=`${a}`.toLowerCase();if(typeof b!=="string"||b.trim()==="")throw Error('Invalid name "'+b+'". The name must be a non-empty string.');var e=b.toLowerCase();if(!c)throw Error("Can not register a null value");var f=typeMap$$module$build$src$core$registry[a],g=
70
- nameMap$$module$build$src$core$registry[a];f||(f=typeMap$$module$build$src$core$registry[a]=Object.create(null),g=nameMap$$module$build$src$core$registry[a]=Object.create(null));validate$$module$build$src$core$registry(a,c);if(!d&&f[e]&&f[e]!==c)throw Error('Name "'+e+'" with type "'+a+'" already registered.');f[e]=c;g[e]=b};
61
+ procTupleComparator$$module$build$src$core$procedures,isLegalName$$module$build$src$core$procedures,isNameUsed$$module$build$src$core$procedures,flyoutCategory$$module$build$src$core$procedures,updateMutatorFlyout$$module$build$src$core$procedures,mutatorOpenListener$$module$build$src$core$procedures,mutatorChangeListener$$module$build$src$core$procedures,getCallers$$module$build$src$core$procedures,blockIsModernCallerFor$$module$build$src$core$procedures,isDynamicShape$$module$build$src$core$renderers$common$constants,
62
+ isPuzzleTab$$module$build$src$core$renderers$common$constants,isNotch$$module$build$src$core$renderers$common$constants,register$$module$build$src$core$renderers$common$block_rendering,unregister$$module$build$src$core$renderers$common$block_rendering,init$$module$build$src$core$renderers$common$block_rendering,stringButtonClickHandler$$module$build$src$core$variables_dynamic,numberButtonClickHandler$$module$build$src$core$variables_dynamic,colourButtonClickHandler$$module$build$src$core$variables_dynamic,
63
+ flyoutCategory$$module$build$src$core$variables_dynamic,flyoutCategoryBlocks$$module$build$src$core$variables_dynamic,resizeSvgContents$$module$build$src$core$workspace_svg,saveProcedure$$module$build$src$core$serialization$procedures,loadProcedure$$module$build$src$core$serialization$procedures,save$$module$build$src$core$serialization$workspaces,load$$module$build$src$core$serialization$workspaces,inject$$module$build$src$core$inject,createDom$$module$build$src$core$inject,createMainWorkspace$$module$build$src$core$inject,
64
+ init$$module$build$src$core$inject,bindDocumentEvents$$module$build$src$core$inject,loadSounds$$module$build$src$core$inject,isFullBlockField$$module$build$src$core$contextmenu_items,registerUndo$$module$build$src$core$contextmenu_items,registerRedo$$module$build$src$core$contextmenu_items,registerCleanup$$module$build$src$core$contextmenu_items,toggleOption_$$module$build$src$core$contextmenu_items,registerCollapse$$module$build$src$core$contextmenu_items,registerExpand$$module$build$src$core$contextmenu_items,
65
+ addDeletableBlocks_$$module$build$src$core$contextmenu_items,getDeletableBlocks_$$module$build$src$core$contextmenu_items,deleteNext_$$module$build$src$core$contextmenu_items,registerDeleteAll$$module$build$src$core$contextmenu_items,registerWorkspaceOptions_$$module$build$src$core$contextmenu_items,registerDuplicate$$module$build$src$core$contextmenu_items,registerComment$$module$build$src$core$contextmenu_items,registerInline$$module$build$src$core$contextmenu_items,registerCollapseExpandBlock$$module$build$src$core$contextmenu_items,
66
+ registerDisable$$module$build$src$core$contextmenu_items,registerDelete$$module$build$src$core$contextmenu_items,registerHelp$$module$build$src$core$contextmenu_items,registerCommentDelete$$module$build$src$core$contextmenu_items,registerCommentDuplicate$$module$build$src$core$contextmenu_items,registerCommentCreate$$module$build$src$core$contextmenu_items,registerBlockOptions_$$module$build$src$core$contextmenu_items,registerCommentOptions$$module$build$src$core$contextmenu_items,registerDefaultOptions$$module$build$src$core$contextmenu_items,
67
+ isBoundedElement$$module$build$src$core$interfaces$i_bounded_element,isPaster$$module$build$src$core$interfaces$i_paster,isRenderedElement$$module$build$src$core$interfaces$i_rendered_element,hideChaff$$module$build$src$core$blockly,isFocusableTree$$module$build$src$core$interfaces$i_focusable_tree,$jscomp;
68
+ register$$module$build$src$core$registry=function(a,b,c,d){if(!(a instanceof Type$$module$build$src$core$registry)&&typeof a!=="string"||`${a}`.trim()==="")throw Error('Invalid type "'+a+'". The type must be a non-empty string or a Blockly.registry.Type.');a=`${a}`.toLowerCase();if(typeof b!=="string"||b.trim()==="")throw Error('Invalid name "'+b+'". The name must be a non-empty string.');var e=b.toLowerCase();if(!c)throw Error("Can not register a null value");var f=typeMap$$module$build$src$core$registry[a],
69
+ g=nameMap$$module$build$src$core$registry[a];f||(f=typeMap$$module$build$src$core$registry[a]=Object.create(null),g=nameMap$$module$build$src$core$registry[a]=Object.create(null));validate$$module$build$src$core$registry(a,c);if(!d&&f[e]&&f[e]!==c)throw Error('Name "'+e+'" with type "'+a+'" already registered.');f[e]=c;g[e]=b};
71
70
  validate$$module$build$src$core$registry=function(a,b){switch(a){case String(Type$$module$build$src$core$registry.FIELD):if(typeof b.fromJson!=="function")throw Error('Type "'+a+'" must have a fromJson function');}};
72
71
  unregister$$module$build$src$core$registry=function(a,b){a=`${a}`.toLowerCase();b=b.toLowerCase();var c=typeMap$$module$build$src$core$registry[a];c&&c[b]?(delete typeMap$$module$build$src$core$registry[a][b],delete nameMap$$module$build$src$core$registry[a][b]):console.warn("Unable to unregister ["+b+"]["+a+"] from the registry.")};
73
72
  getItem$$module$build$src$core$registry=function(a,b,c){a=`${a}`.toLowerCase();b=b.toLowerCase();var d=typeMap$$module$build$src$core$registry[a];if(!d||!d[b]){b="Unable to find ["+b+"]["+a+"] in the registry.";if(c)throw Error(b+" You must require or register a "+a+" plugin.");console.warn(b);return null}return d[b]};hasItem$$module$build$src$core$registry=function(a,b){a=`${a}`.toLowerCase();b=b.toLowerCase();return(a=typeMap$$module$build$src$core$registry[a])?!!a[b]:!1};
@@ -121,9 +120,11 @@ getFastTextWidthWithSizeString$$module$build$src$core$utils$dom=function(a,b,c,d
121
120
  measureFontMetrics$$module$build$src$core$utils$dom=function(a,b,c,d){var e=document.createElement("span");e.style.font=c+" "+b+" "+d;e.textContent=a;a=document.createElement("div");a.style.width="1px";a.style.height="0";b=document.createElement("div");b.style.display="flex";b.style.position="fixed";b.style.top="0";b.style.left="0";b.appendChild(e);b.appendChild(a);document.body.appendChild(b);c={height:0,baseline:0};try{b.style.alignItems="baseline",c.baseline=a.offsetTop-e.offsetTop,b.style.alignItems=
122
121
  "flex-end",c.height=a.offsetTop-e.offsetTop}finally{document.body.removeChild(b)}return c};$.getFocusManager$$module$build$src$core$focus_manager=function(){return FocusManager$$module$build$src$core$focus_manager.getFocusManager()};isFocusableNode$$module$build$src$core$interfaces$i_focusable_node=function(a){return a&&typeof a.getFocusableElement==="function"&&typeof a.getFocusableTree==="function"&&typeof a.onNodeFocus==="function"&&typeof a.onNodeBlur==="function"&&typeof a.canBeFocused==="function"};
123
122
  isSelectable$$module$build$src$core$interfaces$i_selectable=function(a){return isFocusableNode$$module$build$src$core$interfaces$i_focusable_node(a)&&typeof a.id==="string"&&typeof a.workspace==="object"&&typeof a.select==="function"&&typeof a.unselect==="function"};
124
- deepMerge$$module$build$src$core$utils$object=function(a,b){for(let c in b)b[c]!==null&&Array.isArray(b[c])?a[c]=deepMerge$$module$build$src$core$utils$object(a[c]||[],b[c]):a[c]=b[c]!==null&&typeof b[c]==="object"?deepMerge$$module$build$src$core$utils$object(a[c]||Object.create(null),b[c]):b[c];return a};getWorkspaceById$$module$build$src$core$common=function(a){return WorkspaceDB_$$module$build$src$core$common[a]||null};
125
- getAllWorkspaces$$module$build$src$core$common=function(){var a=[];for(let b in WorkspaceDB_$$module$build$src$core$common)a.push(WorkspaceDB_$$module$build$src$core$common[b]);return a};registerWorkspace$$module$build$src$core$common=function(a){WorkspaceDB_$$module$build$src$core$common[a.id]=a};unregisterWorkpace$$module$build$src$core$common=function(a){delete WorkspaceDB_$$module$build$src$core$common[a.id]};getMainWorkspace$$module$build$src$core$common=function(){return mainWorkspace$$module$build$src$core$common};
126
- setMainWorkspace$$module$build$src$core$common=function(a){mainWorkspace$$module$build$src$core$common=a;a.rendered&&$.getFocusManager$$module$build$src$core$focus_manager().setPopoverFocusRoot(a.getInjectionDiv())};getSelected$$module$build$src$core$common=function(){var a=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode();return a&&isSelectable$$module$build$src$core$interfaces$i_selectable(a)?a:null};setSelected$$module$build$src$core$common=function(a){$.getFocusManager$$module$build$src$core$focus_manager().focusNode(a)};
123
+ deepMerge$$module$build$src$core$utils$object=function(a,b){for(let c in b)b[c]!==null&&Array.isArray(b[c])?a[c]=deepMerge$$module$build$src$core$utils$object(a[c]||[],b[c]):a[c]=b[c]!==null&&typeof b[c]==="object"?deepMerge$$module$build$src$core$utils$object(a[c]||Object.create(null),b[c]):b[c];return a};
124
+ warn$$module$build$src$core$utils$deprecation=function(a,b,c,d){a=a+" was deprecated in "+b+" and will be deleted in "+c+".";d&&(a+="\nUse "+d+" instead.");previousWarnings$$module$build$src$core$utils$deprecation.has(a)||(previousWarnings$$module$build$src$core$utils$deprecation.add(a),console.warn(a))};getWorkspaceById$$module$build$src$core$common=function(a){return WorkspaceDB_$$module$build$src$core$common[a]||null};
125
+ getAllWorkspaces$$module$build$src$core$common=function(){var a=[];for(let b in WorkspaceDB_$$module$build$src$core$common)a.push(WorkspaceDB_$$module$build$src$core$common[b]);return a};registerWorkspace$$module$build$src$core$common=function(a){WorkspaceDB_$$module$build$src$core$common[a.id]=a};unregisterWorkspace$$module$build$src$core$common=function(a){delete WorkspaceDB_$$module$build$src$core$common[a.id]};
126
+ unregisterWorkpace$$module$build$src$core$common=function(a){warn$$module$build$src$core$utils$deprecation("Blockly.common.unregisterWorkpace","v13","v14","Blockly.common.unregisterWorkspace");unregisterWorkspace$$module$build$src$core$common(a)};getMainWorkspace$$module$build$src$core$common=function(){return mainWorkspace$$module$build$src$core$common};setMainWorkspace$$module$build$src$core$common=function(a){mainWorkspace$$module$build$src$core$common=a;a.rendered&&$.getFocusManager$$module$build$src$core$focus_manager().setPopoverFocusRoot(a.getInjectionDiv())};
127
+ getSelected$$module$build$src$core$common=function(){var a=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode();return a&&isSelectable$$module$build$src$core$interfaces$i_selectable(a)?a:null};setSelected$$module$build$src$core$common=function(a){$.getFocusManager$$module$build$src$core$focus_manager().focusNode(a)};
127
128
  fireSelectedEvent$$module$build$src$core$common=function(a){var b=getSelected$$module$build$src$core$common(),c,d,e,f,g=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.SELECTED))((c=b==null?void 0:b.id)!=null?c:null,(d=a==null?void 0:a.id)!=null?d:null,(f=(e=a==null?void 0:a.workspace.id)!=null?e:b==null?void 0:b.workspace.id)!=null?f:"");fire$$module$build$src$core$events$utils(g)};
128
129
  getParentContainer$$module$build$src$core$common=function(a=getMainWorkspace$$module$build$src$core$common()){return parentContainer$$module$build$src$core$common?parentContainer$$module$build$src$core$common:a&&a.rendered?a.getInjectionDiv():null};setParentContainer$$module$build$src$core$common=function(a){parentContainer$$module$build$src$core$common=a};
129
130
  svgResize$$module$build$src$core$common=function(a){for(;a.options.parentWorkspace;)a=a.options.parentWorkspace;var b=a.getParentSvg(),c=a.getCachedParentSvgSize(),d=b.parentElement;if(d instanceof HTMLElement){var e=d.offsetWidth;d=d.offsetHeight;c.width!==e&&(b.setAttribute("width",e+"px"),a.setCachedParentSvgSize(e,null));c.height!==d&&(b.setAttribute("height",d+"px"),a.setCachedParentSvgSize(null,d));a.resize()}};
@@ -131,8 +132,8 @@ getBlockTypeCounts$$module$build$src$core$common=function(a,b){var c=Object.crea
131
132
  defineBlocksWithJsonArrayInternal$$module$build$src$core$common=function(a){$.defineBlocks$$module$build$src$core$common($.createBlockDefinitionsFromJsonArray$$module$build$src$core$common(a))};$.createBlockDefinitionsFromJsonArray$$module$build$src$core$common=function(a){var b={};for(let c=0;c<a.length;c++){let d=a[c];if(!d){console.warn(`Block definition #${c} in JSON array is ${d}. Skipping`);continue}let e=d.type;e?b[e]={init:jsonInitFactory$$module$build$src$core$common(d)}:console.warn(`Block definition #${c} in JSON array is missing a type attribute. Skipping.`)}return b};
132
133
  $.defineBlocks$$module$build$src$core$common=function(a){for(let b of Object.keys(a)){let c=a[b];b in Blocks$$module$build$src$core$blocks&&console.warn(`Block definition "${b}" overwrites previous definition.`);Blocks$$module$build$src$core$blocks[b]=c}};
133
134
  globalShortcutHandler$$module$build$src$core$common=function(a){var b=getMainWorkspace$$module$build$src$core$common(),c=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedTree();for(let d of getAllWorkspaces$$module$build$src$core$common())if(c===d){b=d;break}if(!isTargetInput$$module$build$src$core$browser_events(a)&&b&&(!b.rendered||b.isFlyout||b.isVisible()))ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.onKeyDown(b,a)};
134
- removeElem$$module$build$src$core$utils$array=function(a,b){b=a.indexOf(b);if(b===-1)return!1;a.splice(b,1);return!0};register$$module$build$src$core$css=function(a){if(typeof window!=="undefined"&&window.CSSStyleSheet){var b=new CSSStyleSheet;b.replace(a);registeredStyleSheets$$module$build$src$core$css.push(b)}};
135
- inject$$module$build$src$core$css=function(a,b,c){if(b&&typeof window!=="undefined"&&window.CSSStyleSheet){var d=a.getRootNode();injectionSites$$module$build$src$core$css.has(d)||(injectionSites$$module$build$src$core$css.add(d),a=c.replace(/[\\/]$/,""),a=content$$module$build$src$core$css.replace(/<<<PATH>>>/g,a),b=new CSSStyleSheet,b.replace(a),d.adoptedStyleSheets.push(b),registeredStyleSheets$$module$build$src$core$css.forEach(e=>d.adoptedStyleSheets.push(e)))}};
135
+ removeElem$$module$build$src$core$utils$array=function(a,b){b=a.indexOf(b);if(b===-1)return!1;a.splice(b,1);return!0};register$$module$build$src$core$css=function(a){registeredCss$$module$build$src$core$css.push(a)};
136
+ inject$$module$build$src$core$css=function(a,b,c){b&&typeof window!=="undefined"&&(a=a.getRootNode(),injectionSites$$module$build$src$core$css.has(a)||(injectionSites$$module$build$src$core$css.add(a),c=c.replace(/[\\/]$/,""),c=[content$$module$build$src$core$css,...registeredCss$$module$build$src$core$css].join("\n").replace(/<<<PATH>>>/g,c),b=document.createElement("style"),b.id="blockly-common-style",b.textContent=c,(a instanceof ShadowRoot?a:document.head).prepend(b)))};
136
137
  getSize$$module$build$src$core$utils$style=function(a){return TEST_ONLY$$module$build$src$core$utils$style.getSizeInternal(a)};
137
138
  getSizeInternal$$module$build$src$core$utils$style=function(a){if(getComputedStyle$$module$build$src$core$utils$style(a,"display")!=="none")return getSizeWithDisplay$$module$build$src$core$utils$style(a);var b=a.style,c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";var f=a.offsetWidth;a=a.offsetHeight;b.display=c;b.position=e;b.visibility=d;return new Size$$module$build$src$core$utils$size(f,a)};
138
139
  getSizeWithDisplay$$module$build$src$core$utils$style=function(a){return new Size$$module$build$src$core$utils$size(a.offsetWidth,a.offsetHeight)};getComputedStyle$$module$build$src$core$utils$style=function(a,b){a=window.getComputedStyle(a);return a[b]||a.getPropertyValue(b)};
@@ -186,14 +187,11 @@ displayDialog$$module$build$src$core$dialog=function(...[a,b,c,d]){var e=documen
186
187
  b.textContent=$.Msg$$module$build$src$core$msg.DIALOG_CANCEL,b.value="cancel",k.appendChild(b);f.appendChild(k);var m;activeDialogCount$$module$build$src$core$dialog===0&&(m=$.getFocusManager$$module$build$src$core$focus_manager().takeEphemeralFocus(e));activeDialogCount$$module$build$src$core$dialog++;e.addEventListener("close",()=>{activeDialogCount$$module$build$src$core$dialog--;if(!activeDialogCount$$module$build$src$core$dialog){let n;(n=m)==null||n()}e.remove();switch(a){case DialogType$$module$build$src$core$dialog.CONFIRM:c(e.returnValue===
187
188
  "ok");break;case DialogType$$module$build$src$core$dialog.PROMPT:c(e.returnValue==="ok"?h.value:null);break;case DialogType$$module$build$src$core$dialog.ALERT:c==null||c()}});document.body.appendChild(e);e.showModal()};hasBubble$$module$build$src$core$interfaces$i_has_bubble=function(a){return typeof a.bubbleIsVisible==="function"&&typeof a.setBubbleVisible==="function"&&typeof a.getBubble==="function"};
188
189
  isLegacyProcedureDefBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks=function(a){return a&&typeof a.getProcedureDef==="function"};isLegacyProcedureCallBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks=function(a){return a&&typeof a.getProcedureCall==="function"&&typeof a.renameProcedure==="function"};isVariableBackedParameterModel$$module$build$src$core$interfaces$i_variable_backed_parameter_model=function(a){return a.getVariableModel!==void 0};
189
- $.warn$$module$build$src$core$utils$deprecation=function(a,b,c,d){a=a+" was deprecated in "+b+" and will be deleted in "+c+".";d&&(a+="\nUse "+d+" instead.");previousWarnings$$module$build$src$core$utils$deprecation.has(a)||(previousWarnings$$module$build$src$core$utils$deprecation.add(a),console.warn(a))};
190
190
  $.allUsedVarModels$$module$build$src$core$variables=function(a){a=a.getAllBlocks(!1);var b=new Set;for(let c=0;c<a.length;c++){let d=a[c].getVarModels();if(d)for(let e=0;e<d.length;e++){let f=d[e];f.getId()&&b.add(f)}}return Array.from(b.values())};$.allDeveloperVariables$$module$build$src$core$variables=function(a){a=a.getAllBlocks(!1);var b=new Set;for(let d=0,e;e=a[d];d++){var c=e.getDeveloperVariables;if(c){c=c();for(let f=0;f<c.length;f++)b.add(c[f])}}return Array.from(b.values())};
191
- internalFlyoutCategory$$module$build$src$core$variables=function(a){return flyoutCategory$$module$build$src$core$variables(a,!1)};
192
- flyoutCategory$$module$build$src$core$variables=function(a,b=!0){Blocks$$module$build$src$core$blocks.variables_set||Blocks$$module$build$src$core$blocks.variables_get||console.warn("There are no variable blocks, but there is a variable category.");if(b)return $.warn$$module$build$src$core$utils$deprecation("The XML return value of Blockly.Variables.flyoutCategory()","v12","v13","the same method, but handle a return type of FlyoutItemInfo[] (JSON) instead."),xmlFlyoutCategory$$module$build$src$core$variables(a);
193
- a.registerButtonCallback("CREATE_VARIABLE",function(c){createVariableButtonHandler$$module$build$src$core$variables(c.getTargetWorkspace())});return[{kind:"button",text:"%{BKY_NEW_VARIABLE}",callbackkey:"CREATE_VARIABLE"},...jsonFlyoutCategoryBlocks$$module$build$src$core$variables(a,a.getVariableMap().getVariablesOfType(""),!0)]};generateVariableFieldJson$$module$build$src$core$variables=function(a){return{VAR:{name:a.getName(),type:a.getType()}}};
191
+ flyoutCategory$$module$build$src$core$variables=function(a){Blocks$$module$build$src$core$blocks.variables_set||Blocks$$module$build$src$core$blocks.variables_get||console.warn("There are no variable blocks, but there is a variable category.");a.registerButtonCallback("CREATE_VARIABLE",function(b){createVariableButtonHandler$$module$build$src$core$variables(b.getTargetWorkspace())});return[{kind:"button",text:"%{BKY_NEW_VARIABLE}",callbackkey:"CREATE_VARIABLE"},...jsonFlyoutCategoryBlocks$$module$build$src$core$variables(a,
192
+ a.getVariableMap().getVariablesOfType(""),!0)]};generateVariableFieldJson$$module$build$src$core$variables=function(a){return{VAR:{name:a.getName(),type:a.getType()}}};
194
193
  jsonFlyoutCategoryBlocks$$module$build$src$core$variables=function(a,b,c,d="variables_get",e="variables_set"){c&&(c=Blocks$$module$build$src$core$blocks.math_change);a=[];var f=b.slice(-1)[0];f&&(Blocks$$module$build$src$core$blocks[e]&&a.push({kind:"block",type:e,gap:c?8:24,fields:generateVariableFieldJson$$module$build$src$core$variables(f)}),c&&a.push({kind:"block",type:"math_change",gap:Blocks$$module$build$src$core$blocks[d]?20:8,fields:generateVariableFieldJson$$module$build$src$core$variables(f),
195
194
  inputs:{DELTA:{shadow:{type:"math_number",fields:{NUM:1}}}}}));Blocks$$module$build$src$core$blocks[d]&&a.push(...b.sort(compareByName$$module$build$src$core$variables).map(g=>({kind:"block",type:d,gap:8,fields:generateVariableFieldJson$$module$build$src$core$variables(g)})));return a};
196
- xmlFlyoutCategory$$module$build$src$core$variables=function(a){var b=[],c=document.createElement("button");c.setAttribute("text","%{BKY_NEW_VARIABLE}");c.setAttribute("callbackKey","CREATE_VARIABLE");a.registerButtonCallback("CREATE_VARIABLE",function(d){createVariableButtonHandler$$module$build$src$core$variables(d.getTargetWorkspace())});b.push(c);a=flyoutCategoryBlocks$$module$build$src$core$variables(a);return b=b.concat(a)};
197
195
  flyoutCategoryBlocks$$module$build$src$core$variables=function(a){a=a.getVariableMap().getVariablesOfType("");var b=[];if(a.length>0){var c=a[a.length-1];if(Blocks$$module$build$src$core$blocks.variables_set){var d=$.createElement$$module$build$src$core$utils$xml("block");d.setAttribute("type","variables_set");d.setAttribute("gap",Blocks$$module$build$src$core$blocks.math_change?"8":"24");d.appendChild(generateVariableFieldDom$$module$build$src$core$variables(c));b.push(d)}Blocks$$module$build$src$core$blocks.math_change&&
198
196
  (d=$.createElement$$module$build$src$core$utils$xml("block"),d.setAttribute("type","math_change"),d.setAttribute("gap",Blocks$$module$build$src$core$blocks.variables_get?"20":"8"),d.appendChild(generateVariableFieldDom$$module$build$src$core$variables(c)),c=$.textToDom$$module$build$src$core$utils$xml('<value name="DELTA"><shadow type="math_number"><field name="NUM">1</field></shadow></value>'),d.appendChild(c),b.push(d));if(Blocks$$module$build$src$core$blocks.variables_get){a.sort(compareByName$$module$build$src$core$variables);
199
197
  for(let e=0,f;f=a[e];e++)c=$.createElement$$module$build$src$core$utils$xml("block"),c.setAttribute("type","variables_get"),c.setAttribute("gap","8"),c.appendChild(generateVariableFieldDom$$module$build$src$core$variables(f)),b.push(c)}}return b};generateUniqueName$$module$build$src$core$variables=function(a){return TEST_ONLY$$module$build$src$core$variables.generateUniqueNameInternal(a)};
@@ -359,7 +357,7 @@ removeNode$$module$build$src$core$utils$dom(d))}return a};domToText$$module$buil
359
357
  domToPrettyText$$module$build$src$core$xml=function(a){a=domToText$$module$build$src$core$xml(a).split("<");var b="";for(let c=1;c<a.length;c++){let d=a[c];d[0]==="/"&&(b=b.substring(2));a[c]=b+"<"+d;d[0]!=="/"&&d.slice(-2)!=="/>"&&(b+=" ")}a=a.join("\n");a=a.replace(/(<(\w+)\b[^>]*>[^\n]*)\n *<\/\2>/g,"$1</$2>");return a.replace(/^\n/,"")};
360
358
  clearWorkspaceAndLoadFromXml$$module$build$src$core$xml=function(a,b){b.setResizesEnabled(!1);b.clear();a=$.domToWorkspace$$module$build$src$core$xml(a,b);b.setResizesEnabled(!0);return a};
361
359
  $.domToWorkspace$$module$build$src$core$xml=function(a,b){var c=0;b.RTL&&(c=b.getWidth());var d=[];startTextWidthCache$$module$build$src$core$utils$dom();var e=$.getGroup$$module$build$src$core$events$utils();e||$.setGroup$$module$build$src$core$events$utils(!0);b.setResizesEnabled&&b.setResizesEnabled(!1);var f=!0;try{for(let g=0,h;h=a.childNodes[g];g++){let k=h.nodeName.toLowerCase(),l=h;if(k==="block"||k==="shadow"&&!getRecordUndo$$module$build$src$core$events$utils()){let m=domToBlockInternal$$module$build$src$core$xml(l,
362
- b);d.push(m.id);let n,p=parseInt((n=l.getAttribute("x"))!=null?n:"10",10),r,q=parseInt((r=l.getAttribute("y"))!=null?r:"10",10);isNaN(p)||isNaN(q)||m.moveBy(b.RTL?c-p:p,q,["create"]);f=!1}else{if(k==="shadow")throw TypeError("Shadow block cannot be a top-level block.");if(k==="comment")loadWorkspaceComment$$module$build$src$core$xml(l,b);else if(k==="variables"){if(f)domToVariables$$module$build$src$core$xml(l,b);else throw Error("'variables' tag must exist once before block and shadow tag elements in the workspace XML, but it was found in another location.");
360
+ b);d.push(m.id);let n,p=parseInt((n=l.getAttribute("x"))!=null?n:"10",10),q,r=parseInt((q=l.getAttribute("y"))!=null?q:"10",10);isNaN(p)||isNaN(r)||m.moveBy(b.RTL?c-p:p,r,["create"]);f=!1}else{if(k==="shadow")throw TypeError("Shadow block cannot be a top-level block.");if(k==="comment")loadWorkspaceComment$$module$build$src$core$xml(l,b);else if(k==="variables"){if(f)domToVariables$$module$build$src$core$xml(l,b);else throw Error("'variables' tag must exist once before block and shadow tag elements in the workspace XML, but it was found in another location.");
363
361
  f=!1}}}}finally{$.setGroup$$module$build$src$core$events$utils(e),b.setResizesEnabled&&b.setResizesEnabled(!0),b.rendered&&triggerQueuedRenders$$module$build$src$core$render_management(),stopTextWidthCache$$module$build$src$core$utils$dom()}fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.FINISHED_LOADING))(b));return d};
364
362
  loadWorkspaceComment$$module$build$src$core$xml=function(a,b){var c,d=(c=a.getAttribute("id"))!=null?c:void 0;c=b.rendered?new RenderedWorkspaceComment$$module$build$src$core$comments$rendered_workspace_comment(b,d):new WorkspaceComment$$module$build$src$core$comments$workspace_comment(b,d);var e;c.setText((e=a.textContent)!=null?e:"");var f;e=parseInt((f=a.getAttribute("x"))!=null?f:"",10);var g;f=parseInt((g=a.getAttribute("y"))!=null?g:"",10);isNaN(e)||isNaN(f)||(e=b.RTL?b.getWidth()-e:e,c.moveTo(new Coordinate$$module$build$src$core$utils$coordinate(e,
365
363
  f)));var h;b=parseInt((h=a.getAttribute("w"))!=null?h:"",10);var k;h=parseInt((k=a.getAttribute("h"))!=null?k:"",10);isNaN(b)||isNaN(h)||c.setSize(new Size$$module$build$src$core$utils$size(b,h));a.getAttribute("collapsed")==="true"&&c.setCollapsed(!0);a.getAttribute("editable")==="false"&&c.setEditable(!1);a.getAttribute("movable")==="false"&&c.setMovable(!1);a.getAttribute("deletable")==="false"&&c.setDeletable(!1);return c};
@@ -370,8 +368,8 @@ e.length-1;f>=0;f--)e[f].initModel()}}finally{$.enable$$module$build$src$core$ev
370
368
  domToVariables$$module$build$src$core$xml=function(a,b){for(let d=0;d<a.children.length;d++){var c=a.children[d];let e=c.getAttribute("type"),f=c.getAttribute("id");c=c.textContent;if(!c)break;b.getVariableMap().createVariable(c,e!=null?e:void 0,f)}};
371
369
  mapSupportedXmlTags$$module$build$src$core$xml=function(a){var b={mutation:[],comment:[],data:[],field:[],input:[],next:[]};for(let c=0;c<a.children.length;c++){let d=a.children[c];if(d.nodeType!==NodeType$$module$build$src$core$utils$dom.TEXT_NODE)switch(d.nodeName.toLowerCase()){case "mutation":b.mutation.push(d);break;case "comment":b.comment.push(d);break;case "data":b.data.push(d);break;case "title":case "field":b.field.push(d);break;case "value":case "statement":b.input.push(d);break;case "next":b.next.push(d);
372
370
  break;default:console.warn("Ignoring unknown tag: "+d.nodeName)}}return b};applyMutationTagNodes$$module$build$src$core$xml=function(a,b){var c=!1;for(let d=0;d<a.length;d++){let e=a[d];b.domToMutation&&(b.domToMutation(e),b.initSvg&&(c=!0))}return c};
373
- applyCommentTagNodes$$module$build$src$core$xml=function(a,b){for(let c=0;c<a.length;c++){let d=a[c],e=d.textContent,f=d.getAttribute("pinned")==="true",g,h=parseInt((g=d.getAttribute("w"))!=null?g:"50",10),k,l=parseInt((k=d.getAttribute("h"))!=null?k:"50",10),m,n=parseInt((m=d.getAttribute("x"))!=null?m:"",10),p,r=parseInt((p=d.getAttribute("y"))!=null?p:"",10);b.setCommentText(e);let q=b.getIcon(IconType$$module$build$src$core$icons$icon_types.COMMENT);isNaN(h)||isNaN(l)||q.setBubbleSize(new Size$$module$build$src$core$utils$size(h,
374
- l));q.setBubbleVisible(f);setTimeout(()=>{isNaN(n)||isNaN(r)||(n=b.workspace.RTL?b.workspace.getWidth()-(n+h):n,q.setBubbleLocation(new Coordinate$$module$build$src$core$utils$coordinate(n,r)));q.setBubbleVisible(f)},1)}};applyDataTagNodes$$module$build$src$core$xml=function(a,b){for(let c=0;c<a.length;c++)b.data=a[c].textContent};
371
+ applyCommentTagNodes$$module$build$src$core$xml=function(a,b){for(let c=0;c<a.length;c++){let d=a[c],e=d.textContent,f=d.getAttribute("pinned")==="true",g,h=parseInt((g=d.getAttribute("w"))!=null?g:"50",10),k,l=parseInt((k=d.getAttribute("h"))!=null?k:"50",10),m,n=parseInt((m=d.getAttribute("x"))!=null?m:"",10),p,q=parseInt((p=d.getAttribute("y"))!=null?p:"",10);b.setCommentText(e);let r=b.getIcon(IconType$$module$build$src$core$icons$icon_types.COMMENT);isNaN(h)||isNaN(l)||r.setBubbleSize(new Size$$module$build$src$core$utils$size(h,
372
+ l));r.setBubbleVisible(f);setTimeout(()=>{isNaN(n)||isNaN(q)||(n=b.workspace.RTL?b.workspace.getWidth()-(n+h):n,r.setBubbleLocation(new Coordinate$$module$build$src$core$utils$coordinate(n,q)));r.setBubbleVisible(f)},1)}};applyDataTagNodes$$module$build$src$core$xml=function(a,b){for(let c=0;c<a.length;c++)b.data=a[c].textContent};
375
373
  applyFieldTagNodes$$module$build$src$core$xml=function(a,b){for(let c=0;c<a.length;c++){let d=a[c],e=d.getAttribute("name");e?domToField$$module$build$src$core$xml(b,e,d):console.warn(`Ignoring unnamed field in block ${b.type}`)}};
376
374
  findChildBlocks$$module$build$src$core$xml=function(a){var b=null,c=null;for(let d=0;d<a.childNodes.length;d++){let e=a.childNodes[d];isElement$$module$build$src$core$xml(e)&&(e.nodeName.toLowerCase()==="block"?b=e:e.nodeName.toLowerCase()==="shadow"&&(c=e))}return{childBlockElement:b,childShadowElement:c}};
377
375
  applyInputTagNodes$$module$build$src$core$xml=function(a,b,c,d){for(let f=0;f<a.length;f++){var e=a[f];let g=e.getAttribute("name"),h=g?c.getInput(g):null;if(!h){console.warn("Ignoring non-existent input "+g+" in block "+d);break}e=findChildBlocks$$module$build$src$core$xml(e);if(e.childBlockElement){if(!h.connection)throw TypeError("Input connection does not exist.");domToBlockHeadless$$module$build$src$core$xml(e.childBlockElement,b,h.connection,!1)}if(e.childShadowElement){let k;(k=h.connection)==
@@ -412,10 +410,10 @@ a.outputConnection?$.Msg$$module$build$src$core$msg.BLOCK_LABEL_VALUE:$.Msg$$mod
412
410
  computeFieldRowLabel$$module$build$src$core$block_aria_composer=function(a,b,c=Verbosity$$module$build$src$core$utils$aria.STANDARD){var d=c>=Verbosity$$module$build$src$core$utils$aria.LOQUACIOUS,e=[],f=a.fieldRow.filter(g=>g.isVisible()).flatMap((g,h,k)=>{if(g instanceof FieldLabel$$module$build$src$core$field_label){if(h<k.length-1&&k[h+1]instanceof FieldLabel$$module$build$src$core$field_label)return e.push(g.computeAriaLabel(d)),[];if(e.length>=1)return e.push(g.computeAriaLabel(d)),g=e.join(" "),
413
411
  e=[],g}return g.computeAriaLabel(d)});if(!f.length&&b){let g=a.getSourceBlock().inputList;a=g.indexOf(a);if(a>0)return computeFieldRowLabel$$module$build$src$core$block_aria_composer(g[a-1],b,c)}return f.filter(g=>!!g)};
414
412
  getParentInputLabel$$module$build$src$core$block_aria_composer=function(a){var b,c,d,e=(b=(d=a.outputConnection)!=null?d:a.previousConnection)==null?void 0:(c=b.targetConnection)==null?void 0:c.getParentInput();if(e&&(a=e.getSourceBlock(),!a.isInsertionMarker())){if(b=e.getAriaLabelText())a=b;else{if(!a.statementInputCount)return;a=a.inputList.find(f=>f.type===$.inputTypes$$module$build$src$core$inputs$input_types.STATEMENT);if(e===a)return;a=computeFieldRowLabel$$module$build$src$core$block_aria_composer(e,
415
- !0)}return e.type===$.inputTypes$$module$build$src$core$inputs$input_types.STATEMENT?(e=Array.isArray(a)?a.join(" "):a,$.Msg$$module$build$src$core$msg.BLOCK_LABEL_BEGIN_PREFIX.replace("%1",e)):a}};getBeginStackLabel$$module$build$src$core$block_aria_composer=function(a){if(!a.isInFlyout&&!a.workspace.isDragging())return a.getRootBlock()===a?$.Msg$$module$build$src$core$msg.BLOCK_LABEL_BEGIN_STACK:void 0};
416
- getInputLabels$$module$build$src$core$block_aria_composer=function(a,b=Verbosity$$module$build$src$core$utils$aria.STANDARD,c=!0){var d=a=a.inputList.filter(e=>e.isVisible());if(b<=Verbosity$$module$build$src$core$utils$aria.STANDARD){let e=a.filter(f=>f.type===$.inputTypes$$module$build$src$core$inputs$input_types.STATEMENT);e.length>1&&(d=a.slice(0,a.indexOf(e[0])+1))}return d.map(e=>{var f;return(f=c?e.getAriaLabelText():null)!=null?f:e.getLabel(b)})};
417
- getInputLabelsSubset$$module$build$src$core$block_aria_composer=function(a,b){var c=a.inputList.indexOf(b);if(c===-1)throw Error(`Input with name "${b.name}" not found on block with id "${a.id}".`);b=b.type===$.inputTypes$$module$build$src$core$inputs$input_types.STATEMENT?findStartOfStatementSection$$module$build$src$core$block_aria_composer(a.inputList,c):c;return a.inputList.slice(b,c+1).filter(d=>d.isVisible()).map(d=>d.getLabel(Verbosity$$module$build$src$core$utils$aria.TERSE)||$.Msg$$module$build$src$core$msg.INPUT_LABEL_INDEX.replace("%1",
418
- (d.getIndex()+1).toString()))};findStartOfStatementSection$$module$build$src$core$block_aria_composer=function(a,b){for(--b;b>=0;b--)if(a[b].type===$.inputTypes$$module$build$src$core$inputs$input_types.STATEMENT)return b+1;return 0};
413
+ !0)}return e.type===$.inputTypes$$module$build$src$core$inputs$input_types.STATEMENT?(e=Array.isArray(a)?a.join(" "):a,$.Msg$$module$build$src$core$msg.BLOCK_LABEL_BEGIN_PREFIX.replace("%1",e)):a}};getBeginStackLabel$$module$build$src$core$block_aria_composer=function(a){if(!a.isInFlyout&&!a.isDragging())return a.getRootBlock()===a?$.Msg$$module$build$src$core$msg.BLOCK_LABEL_BEGIN_STACK:void 0};
414
+ getInputLabels$$module$build$src$core$block_aria_composer=function(a,b=Verbosity$$module$build$src$core$utils$aria.STANDARD,c=!0){var d=a=a.inputList.filter(e=>e.isVisible());if(b<=Verbosity$$module$build$src$core$utils$aria.STANDARD){let e=a.filter(f=>f.type===$.inputTypes$$module$build$src$core$inputs$input_types.STATEMENT);e.length>1&&(d=a.slice(0,a.indexOf(e[0])+1))}return d.map(e=>{var f;return(f=c?e.getAriaLabelText():null)!=null?f:e.getLabel(b,c)})};
415
+ getInputLabelsSubset$$module$build$src$core$block_aria_composer=function(a,b,c=!0){var d=a.inputList.indexOf(b);if(d===-1)throw Error(`Input with name "${b.name}" not found on block with id "${a.id}".`);b=b.type===$.inputTypes$$module$build$src$core$inputs$input_types.STATEMENT?findStartOfStatementSection$$module$build$src$core$block_aria_composer(a.inputList,d):d;return a.inputList.slice(b,d+1).filter(e=>e.isVisible()).map(e=>e.getLabel(Verbosity$$module$build$src$core$utils$aria.TERSE,!1)||(c?$.Msg$$module$build$src$core$msg.INPUT_LABEL_INDEX.replace("%1",
416
+ (e.getIndex()+1).toString()):void 0)).filter(e=>e!==void 0)};findStartOfStatementSection$$module$build$src$core$block_aria_composer=function(a,b){for(--b;b>=0;b--)if(a[b].type===$.inputTypes$$module$build$src$core$inputs$input_types.STATEMENT)return b+1;return 0};
419
417
  getParentToolboxCategoryLabel$$module$build$src$core$block_aria_composer=function(a){var b=a.workspace.getToolbox();if(b){var c=void 0;for(let d of b.getToolboxItems()){if(!isSelectableToolboxItem$$module$build$src$core$interfaces$i_selectable_toolbox_item(d))continue;b=d.getContents();if(Array.isArray(b)&&b.some(e=>e.kind.toLowerCase()==="block"&&"type"in e&&e.type===a.type)){c=d;break}"getColour"in d&&typeof d.getColour==="function"&&d.getColour()===a.getColour()&&(c=d)}if(c)return $.Msg$$module$build$src$core$msg.BLOCK_LABEL_TOOLBOX_CATEGORY.replace("%1",
420
418
  c.getName())}};
421
419
  getAnnouncementTemplate$$module$build$src$core$block_aria_composer=function(a){switch(a){case ConnectionPreposition$$module$build$src$core$block_aria_composer.BEFORE:return $.Msg$$module$build$src$core$msg.ANNOUNCE_MOVE_BEFORE;case ConnectionPreposition$$module$build$src$core$block_aria_composer.AFTER:return $.Msg$$module$build$src$core$msg.ANNOUNCE_MOVE_AFTER;case ConnectionPreposition$$module$build$src$core$block_aria_composer.INSIDE:return $.Msg$$module$build$src$core$msg.ANNOUNCE_MOVE_INSIDE;case ConnectionPreposition$$module$build$src$core$block_aria_composer.AROUND:return $.Msg$$module$build$src$core$msg.ANNOUNCE_MOVE_AROUND;
@@ -425,7 +423,7 @@ e&&(d=computeMoveConnectionLabel$$module$build$src$core$block_aria_composer(a,d)
425
423
  getConnectionPreposition$$module$build$src$core$block_aria_composer=function(a,b){switch(a.type){case ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE:case ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE:return ConnectionPreposition$$module$build$src$core$block_aria_composer.TO;case ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT:return a===a.getSourceBlock().nextConnection?ConnectionPreposition$$module$build$src$core$block_aria_composer.BEFORE:
426
424
  ConnectionPreposition$$module$build$src$core$block_aria_composer.AROUND;case ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT:return b===b.getSourceBlock().nextConnection?ConnectionPreposition$$module$build$src$core$block_aria_composer.AFTER:ConnectionPreposition$$module$build$src$core$block_aria_composer.INSIDE}return ConnectionPreposition$$module$build$src$core$block_aria_composer.UNKNOWN};
427
425
  getDisabledLabel$$module$build$src$core$block_aria_composer=function(a){return a.isEnabled()?void 0:$.Msg$$module$build$src$core$msg.BLOCK_LABEL_DISABLED};getCollapsedLabel$$module$build$src$core$block_aria_composer=function(a){return a.isCollapsed()?$.Msg$$module$build$src$core$msg.BLOCK_LABEL_COLLAPSED:void 0};getShadowBlockLabel$$module$build$src$core$block_aria_composer=function(a){return a.isShadow()?$.Msg$$module$build$src$core$msg.BLOCK_LABEL_REPLACEABLE:void 0};
428
- getInputCountLabel$$module$build$src$core$block_aria_composer=function(a){var b=a.inputList.filter(c=>c.type===$.inputTypes$$module$build$src$core$inputs$input_types.STATEMENT).length;if(b>1)return $.Msg$$module$build$src$core$msg.BLOCK_LABEL_HAS_BRANCHES.replace("%1",b.toString());switch(a.inputList.reduce((c,d)=>{var e;return d.fieldRow.reduce((f,g)=>g.EDITABLE&&!g.isFullBlockField()?f++:f,c)+(((e=d.connection)==null?void 0:e.type)===ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE?
426
+ getInputCountLabel$$module$build$src$core$block_aria_composer=function(a){var b=a.inputList.filter(c=>c.type===$.inputTypes$$module$build$src$core$inputs$input_types.STATEMENT).length;if(b>1)return $.Msg$$module$build$src$core$msg.BLOCK_LABEL_HAS_BRANCHES.replace("%1",b.toString());switch(a.inputList.reduce((c,d)=>{var e;return d.fieldRow.reduce((f,g)=>g.EDITABLE&&!g.isFullBlockField()?++f:f,c)+(((e=d.connection)==null?void 0:e.type)===ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE?
429
427
  1:0)},0)){case 0:break;case 1:return $.Msg$$module$build$src$core$msg.BLOCK_LABEL_HAS_INPUT;default:return $.Msg$$module$build$src$core$msg.BLOCK_LABEL_HAS_INPUTS}};
430
428
  isIcon$$module$build$src$core$interfaces$i_icon=function(a){return isFocusableNode$$module$build$src$core$interfaces$i_focusable_node(a)&&typeof a.getType==="function"&&typeof a.initView==="function"&&typeof a.dispose==="function"&&typeof a.getWeight==="function"&&typeof a.getSize==="function"&&typeof a.applyColour==="function"&&typeof a.hideForInsertionMarker==="function"&&typeof a.updateEditable==="function"&&typeof a.updateCollapsed==="function"&&typeof a.isShownWhenCollapsed==="function"&&typeof a.setOffsetInBlock===
431
429
  "function"&&typeof a.onLocationChange==="function"&&typeof a.onClick==="function"};
@@ -454,20 +452,20 @@ pasteFromData$$module$build$src$core$clipboard=function(a,b,c){var d;b=b.isMutat
454
452
  isCopyable$$module$build$src$core$interfaces$i_copyable=function(a){return a&&typeof a.toCopyData==="function"};isDeletable$$module$build$src$core$interfaces$i_deletable=function(a){return a&&typeof a.isDeletable==="function"&&typeof a.dispose==="function"&&typeof a.setDeleteStyle==="function"};
455
453
  isDraggable$$module$build$src$core$interfaces$i_draggable=function(a){return a&&typeof a.getRelativeToSurfaceXY==="function"&&typeof a.isMovable==="function"&&typeof a.startDrag==="function"&&typeof a.drag==="function"&&typeof a.endDrag==="function"&&typeof a.revertDrag==="function"};
456
454
  registerEscape$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.ESCAPE,preconditionFn(a){return!a.isReadOnly()},callback(a){a.hideChaff();return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.ESC],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_ESCAPE})};
457
- registerDelete$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.DELETE,preconditionFn(a,b){b=b.focusedNode;return!a.isReadOnly()&&b!=null&&isDeletable$$module$build$src$core$interfaces$i_deletable(b)&&b.isDeletable()&&!a.isDragging()&&!$.getFocusManager$$module$build$src$core$focus_manager().ephemeralFocusTaken()},callback(a,b,c,d){b.preventDefault();b=d.focusedNode;b instanceof
458
- BlockSvg$$module$build$src$core$block_svg?b.checkAndDelete():isDeletable$$module$build$src$core$interfaces$i_deletable(b)&&b.isDeletable()&&($.setGroup$$module$build$src$core$events$utils(!0),b.dispose(),$.setGroup$$module$build$src$core$events$utils(!1),a.getAudioManager().play("delete"));return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.DELETE,KeyCodes$$module$build$src$core$utils$keycodes.BACKSPACE],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_DELETE})};
455
+ registerDelete$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.DELETE,preconditionFn(a,b){b=b.focusedNode;(b=!a.isReadOnly()&&b!=null&&isDeletable$$module$build$src$core$interfaces$i_deletable(b)&&b.isDeletable()&&!a.isDragging()&&!$.getFocusManager$$module$build$src$core$focus_manager().ephemeralFocusTaken())||a.getAudioManager().playErrorBeep();return b},callback(a,b,c,
456
+ d){b.preventDefault();b=d.focusedNode;b instanceof BlockSvg$$module$build$src$core$block_svg?b.checkAndDelete():isDeletable$$module$build$src$core$interfaces$i_deletable(b)&&b.isDeletable()&&($.setGroup$$module$build$src$core$events$utils(!0),b.dispose(),$.setGroup$$module$build$src$core$events$utils(!1),a.getAudioManager().play("delete"));return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.DELETE,KeyCodes$$module$build$src$core$utils$keycodes.BACKSPACE],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_DELETE})};
459
457
  isCopyable$$module$build$src$core$shortcut_items=function(a){return isCopyable$$module$build$src$core$interfaces$i_copyable(a)&&isDeletable$$module$build$src$core$interfaces$i_deletable(a)&&isDraggable$$module$build$src$core$interfaces$i_draggable(a)?a.isCopyable?a.isCopyable():a instanceof BlockSvg$$module$build$src$core$block_svg||a instanceof RenderedWorkspaceComment$$module$build$src$core$comments$rendered_workspace_comment?a.isOwnDeletable()&&a.isOwnMovable():a.isDeletable()&&a.isMovable():!1};
460
458
  isCuttable$$module$build$src$core$shortcut_items=function(a){return isCopyable$$module$build$src$core$shortcut_items(a)&&isDeletable$$module$build$src$core$interfaces$i_deletable(a)&&a.isDeletable()};
461
- registerCopy$$module$build$src$core$shortcut_items=function(){var a=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.C,[KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD]);ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.COPY,preconditionFn(b,c){c=c.focusedNode;b=b.isFlyout?b.targetWorkspace:b;return!!c&&!!b&&!b.isDragging()&&!$.getFocusManager$$module$build$src$core$focus_manager().ephemeralFocusTaken()&&
462
- isCopyable$$module$build$src$core$shortcut_items(c)},callback(b,c,d,e){c.preventDefault();c=e.focusedNode;if(!c||!isCopyable$$module$build$src$core$interfaces$i_copyable(c)||!isCopyable$$module$build$src$core$shortcut_items(c))return!1;d=b.isFlyout?b.targetWorkspace:b;if(!d)return!1;c.workspace.isFlyout||d.hideChaff();d=isDraggable$$module$build$src$core$interfaces$i_draggable(c)&&c.workspace==d?c.getRelativeToSurfaceXY():void 0;(c=!!copy$$module$build$src$core$clipboard(c,d))&&showCopiedHint$$module$build$src$core$hints(b);
463
- return c},keyCodes:[a],displayText:()=>$.Msg$$module$build$src$core$msg.COPY_SHORTCUT})};
464
- registerCut$$module$build$src$core$shortcut_items=function(){var a=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.X,[KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD]);ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.CUT,preconditionFn(b,c){c=c.focusedNode;return!!c&&!b.isReadOnly()&&!b.isDragging()&&!$.getFocusManager$$module$build$src$core$focus_manager().ephemeralFocusTaken()&&
465
- isCuttable$$module$build$src$core$shortcut_items(c)},callback(b,c,d,e){d=e.focusedNode;if(!d||!isCuttable$$module$build$src$core$shortcut_items(d)||!isCopyable$$module$build$src$core$interfaces$i_copyable(d))return!1;e=isDraggable$$module$build$src$core$interfaces$i_draggable(d)?d.getRelativeToSurfaceXY():void 0;e=copy$$module$build$src$core$clipboard(d,e);d instanceof BlockSvg$$module$build$src$core$block_svg?(d.checkAndDelete(),c.preventDefault()):isDeletable$$module$build$src$core$interfaces$i_deletable(d)&&
466
- ($.setGroup$$module$build$src$core$events$utils(!0),d.dispose(),$.setGroup$$module$build$src$core$events$utils(!1),b.getAudioManager().play("delete"),c.preventDefault());e&&showCutHint$$module$build$src$core$hints(b);return!!e},keyCodes:[a],displayText:()=>$.Msg$$module$build$src$core$msg.CUT_SHORTCUT})};
459
+ registerCopy$$module$build$src$core$shortcut_items=function(){var a=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.C,[KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD]);ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.COPY,preconditionFn(b,c){c=c.focusedNode;var d=b.isFlyout?b.targetWorkspace:b;(c=!!c&&!!d&&!d.isDragging()&&!$.getFocusManager$$module$build$src$core$focus_manager().ephemeralFocusTaken()&&
460
+ isCopyable$$module$build$src$core$shortcut_items(c))||b.getAudioManager().playErrorBeep();return c},callback(b,c,d,e){c.preventDefault();c=e.focusedNode;if(!c||!isCopyable$$module$build$src$core$interfaces$i_copyable(c)||!isCopyable$$module$build$src$core$shortcut_items(c))return!1;d=b.isFlyout?b.targetWorkspace:b;if(!d)return!1;c.workspace.isFlyout||d.hideChaff();d=isDraggable$$module$build$src$core$interfaces$i_draggable(c)&&c.workspace==d?c.getRelativeToSurfaceXY():void 0;(c=!!copy$$module$build$src$core$clipboard(c,
461
+ d))&&showCopiedHint$$module$build$src$core$hints(b);return c},keyCodes:[a],displayText:()=>$.Msg$$module$build$src$core$msg.COPY_SHORTCUT})};
462
+ registerCut$$module$build$src$core$shortcut_items=function(){var a=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.X,[KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD]);ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.CUT,preconditionFn(b,c){c=c.focusedNode;(c=!!c&&!b.isReadOnly()&&!b.isDragging()&&!$.getFocusManager$$module$build$src$core$focus_manager().ephemeralFocusTaken()&&
463
+ isCuttable$$module$build$src$core$shortcut_items(c))||b.getAudioManager().playErrorBeep();return c},callback(b,c,d,e){d=e.focusedNode;if(!d||!isCuttable$$module$build$src$core$shortcut_items(d)||!isCopyable$$module$build$src$core$interfaces$i_copyable(d))return!1;e=isDraggable$$module$build$src$core$interfaces$i_draggable(d)?d.getRelativeToSurfaceXY():void 0;e=copy$$module$build$src$core$clipboard(d,e);d instanceof BlockSvg$$module$build$src$core$block_svg?(d.checkAndDelete(),c.preventDefault()):
464
+ isDeletable$$module$build$src$core$interfaces$i_deletable(d)&&($.setGroup$$module$build$src$core$events$utils(!0),d.dispose(),$.setGroup$$module$build$src$core$events$utils(!1),b.getAudioManager().play("delete"),c.preventDefault());e&&showCutHint$$module$build$src$core$hints(b);return!!e},keyCodes:[a],displayText:()=>$.Msg$$module$build$src$core$msg.CUT_SHORTCUT})};
467
465
  registerPaste$$module$build$src$core$shortcut_items=function(){var a=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.V,[KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD]);ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.PASTE,preconditionFn(){var b=getLastCopiedWorkspace$$module$build$src$core$clipboard();if(!b||!b.rendered)return!1;
468
- b=b.isFlyout?b.targetWorkspace:b;return!!getLastCopiedData$$module$build$src$core$clipboard()&&!!b&&!b.isReadOnly()&&!b.isDragging()&&!$.getFocusManager$$module$build$src$core$focus_manager().ephemeralFocusTaken()},callback(b,c){var d=getLastCopiedData$$module$build$src$core$clipboard();if(!d)return!1;var e=getLastCopiedWorkspace$$module$build$src$core$clipboard();if(!e)return!1;clearPasteHints$$module$build$src$core$hints(b);b=e.isFlyout?e.targetWorkspace:e;if(!b||b.isReadOnly())return!1;if(c instanceof
469
- PointerEvent)return c=screenToWsCoordinates$$module$build$src$core$utils$svg_math(b,new Coordinate$$module$build$src$core$utils$coordinate(c.clientX,c.clientY)),!!paste$$module$build$src$core$clipboard(d,b,c);c=getLastCopiedLocation$$module$build$src$core$clipboard();if(!c)return!!paste$$module$build$src$core$clipboard(d,b);var {left:f,top:g,width:h,height:k}=b.getMetricsManager().getViewMetrics(!0);if((new Rect$$module$build$src$core$utils$rect(g,g+k,f,f+h)).contains(c.x,c.y))return!!paste$$module$build$src$core$clipboard(d,
470
- b);c=new Coordinate$$module$build$src$core$utils$coordinate(f+h/2,g+k/2);return!!paste$$module$build$src$core$clipboard(d,b,c)},keyCodes:[a],displayText:()=>$.Msg$$module$build$src$core$msg.PASTE_SHORTCUT})};
466
+ var c=b.isFlyout?b.targetWorkspace:b;(c=!!getLastCopiedData$$module$build$src$core$clipboard()&&!!c&&!c.isReadOnly()&&!c.isDragging()&&!$.getFocusManager$$module$build$src$core$focus_manager().ephemeralFocusTaken())||b.getAudioManager().playErrorBeep();return c},callback(b,c){var d=getLastCopiedData$$module$build$src$core$clipboard();if(!d)return!1;var e=getLastCopiedWorkspace$$module$build$src$core$clipboard();if(!e)return!1;clearPasteHints$$module$build$src$core$hints(b);b=e.isFlyout?e.targetWorkspace:
467
+ e;if(!b||b.isReadOnly())return!1;if(c instanceof PointerEvent)return c=screenToWsCoordinates$$module$build$src$core$utils$svg_math(b,new Coordinate$$module$build$src$core$utils$coordinate(c.clientX,c.clientY)),!!paste$$module$build$src$core$clipboard(d,b,c);c=getLastCopiedLocation$$module$build$src$core$clipboard();if(!c)return!!paste$$module$build$src$core$clipboard(d,b);var {left:f,top:g,width:h,height:k}=b.getMetricsManager().getViewMetrics(!0);if((new Rect$$module$build$src$core$utils$rect(g,
468
+ g+k,f,f+h)).contains(c.x,c.y))return!!paste$$module$build$src$core$clipboard(d,b);c=new Coordinate$$module$build$src$core$utils$coordinate(f+h/2,g+k/2);return!!paste$$module$build$src$core$clipboard(d,b,c)},keyCodes:[a],displayText:()=>$.Msg$$module$build$src$core$msg.PASTE_SHORTCUT})};
471
469
  registerUndo$$module$build$src$core$shortcut_items=function(){var a=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.Z,[KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD]);ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.UNDO,preconditionFn(b){return!b.isReadOnly()&&!b.isDragging()&&!$.getFocusManager$$module$build$src$core$focus_manager().ephemeralFocusTaken()},
472
470
  callback(b,c){b.hideChaff();b.undo();c.preventDefault();return!0},keyCodes:[a],displayText:()=>$.Msg$$module$build$src$core$msg.UNDO})};
473
471
  registerRedo$$module$build$src$core$shortcut_items=function(){var a=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.Z,[KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD,KeyCodes$$module$build$src$core$utils$keycodes.SHIFT]),b=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.Y,[KeyCodes$$module$build$src$core$utils$keycodes.CTRL]);
@@ -494,16 +492,17 @@ displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_NAVIGATE_DOWN},up:{na
494
492
  d.getNavigator().getPreviousNode();if(!c)return b.getAudioManager().playErrorBeep(),!1;b.getAudioManager().maybePlayScopeChangeAudioCue(c);$.getFocusManager$$module$build$src$core$focus_manager().focusNode(c);return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.UP],allowCollision:!0,displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_NAVIGATE_UP}};for(let b of Object.values(a))ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register(b)};
495
493
  registerFocusWorkspace$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.FOCUS_WORKSPACE,preconditionFn:a=>!a.isDragging(),callback:a=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);$.getFocusManager$$module$build$src$core$focus_manager().focusNode(resolveWorkspace$$module$build$src$core$shortcut_items(a));return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.W],
496
494
  displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_FOCUS_WORKSPACE})};
497
- registerFocusToolbox$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.FOCUS_TOOLBOX,preconditionFn:a=>!a.isDragging(),callback:a=>{var b=a.getToolbox();if(b)keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0),$.getFocusManager$$module$build$src$core$focus_manager().focusTree(b);else{a=a.getFlyout();if(!a)return!1;keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);
498
- $.getFocusManager$$module$build$src$core$focus_manager().focusTree(a.getWorkspace())}return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.T],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_FOCUS_TOOLBOX})};
495
+ registerFocusToolbox$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.FOCUS_TOOLBOX,preconditionFn:a=>!a.isDragging(),callback:(a,b)=>{var c=a.getToolbox();if(c)keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0),$.getFocusManager$$module$build$src$core$focus_manager().focusTree(c);else{a=a.getFlyout();if(!a)return!1;keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);
496
+ $.getFocusManager$$module$build$src$core$focus_manager().focusTree(a.getWorkspace())}b.preventDefault();return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.T],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_FOCUS_TOOLBOX})};
499
497
  registerReadInformation$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.INFORMATION,preconditionFn:()=>!0,callback:a=>{var b=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode(),c=a.getNavigator().getSourceBlockFromNode(b);if(c)return a=computeAriaLabel$$module$build$src$core$block_aria_composer(c,Verbosity$$module$build$src$core$utils$aria.LOQUACIOUS,
500
498
  !1),announceDynamicAriaState$$module$build$src$core$utils$aria(a),!0;if(b===a){b=resolveWorkspace$$module$build$src$core$shortcut_items(a);a=b.getTopBlocks().length;b=b.getTopComments().length;c=a===0?"WORKSPACE_CONTENTS_BLOCKS_ZERO":a===1?"WORKSPACE_CONTENTS_BLOCKS_ONE":"WORKSPACE_CONTENTS_BLOCKS_MANY";let d="";b>0&&(d=$.Msg$$module$build$src$core$msg[b===1?"WORKSPACE_CONTENTS_COMMENTS_ONE":"WORKSPACE_CONTENTS_COMMENTS_MANY"].replace("%1",String(b)));a=$.Msg$$module$build$src$core$msg[c].replace("%1",
501
499
  String(a)).replace("%2",d);announceDynamicAriaState$$module$build$src$core$utils$aria(a);return!0}return!1},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.I],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_INFORMATION})};
502
500
  registerReadExtendedInformation$$module$build$src$core$shortcut_items=function(){var a=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.I,[KeyCodes$$module$build$src$core$utils$keycodes.SHIFT]);ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.EXTENDED_INFORMATION,preconditionFn:()=>!0,callback:b=>{b=b.getNavigator().getSourceBlockFromNode($.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode());
503
501
  if(!b)return!1;for(var c=[],d=b,e;(e=d.outputConnection)==null?0:e.isConnected();)d=d.getParent();d!==b&&c.push(computeAriaLabel$$module$build$src$core$block_aria_composer(d,Verbosity$$module$build$src$core$utils$aria.TERSE,!1));for(e=d.getParent();e;)c.push(computeAriaLabel$$module$build$src$core$block_aria_composer(e,Verbosity$$module$build$src$core$utils$aria.TERSE,!1)),e=e.getParent();if(c.length){c.reverse();let f;((f=b.outputConnection)==null?0:f.isConnected())||c.push($.Msg$$module$build$src$core$msg.CURRENT_BLOCK_ANNOUNCEMENT.replace("%1",
504
502
  computeAriaLabel$$module$build$src$core$block_aria_composer(b,Verbosity$$module$build$src$core$utils$aria.TERSE,!1)));announceDynamicAriaState$$module$build$src$core$utils$aria($.Msg$$module$build$src$core$msg.PARENT_BLOCKS_ANNOUNCEMENT.replace("%1",c.join(",")))}else announceDynamicAriaState$$module$build$src$core$utils$aria($.Msg$$module$build$src$core$msg.NO_PARENT_ANNOUNCEMENT);return!0},keyCodes:[a],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_EXTENDED_INFORMATION})};
505
- registerDisconnectBlock$$module$build$src$core$shortcut_items=function(){var a=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.X,[KeyCodes$$module$build$src$core$utils$keycodes.SHIFT]);ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.DISCONNECT,preconditionFn:b=>!b.isDragging()&&!b.isReadOnly(),callback:(b,c)=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);
506
- b=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode();if(!(b instanceof BlockSvg$$module$build$src$core$block_svg))return!1;c=!(c instanceof KeyboardEvent&&c.shiftKey);$.setGroup$$module$build$src$core$events$utils(!0);b.unplug(c);$.setGroup$$module$build$src$core$events$utils(!1);return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.X,a],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_DISCONNECT})};
503
+ registerDisconnectBlock$$module$build$src$core$shortcut_items=function(){var a=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.X,[KeyCodes$$module$build$src$core$utils$keycodes.SHIFT]);ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.DISCONNECT,preconditionFn:(b,c)=>{(c=!b.isDragging()&&!b.isReadOnly()&&c.focusedNode instanceof BlockSvg$$module$build$src$core$block_svg)||
504
+ b.getAudioManager().playErrorBeep();return c},callback:(b,c)=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);b=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode();if(!(b instanceof BlockSvg$$module$build$src$core$block_svg))return!1;c=!(c instanceof KeyboardEvent&&c.shiftKey);$.setGroup$$module$build$src$core$events$utils(!0);b.unplug(c);$.setGroup$$module$build$src$core$events$utils(!1);return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.X,
505
+ a],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_DISCONNECT})};
507
506
  registerStackNavigation$$module$build$src$core$shortcut_items=function(){var a=(c,d=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode())=>{var e=c.getNavigator();for(let f=d;f&&f!==c;f=e.getParent(f))d=f;return isSelectable$$module$build$src$core$interfaces$i_selectable(d)?d:null},b={name:names$$module$build$src$core$shortcut_items.PREVIOUS_STACK,preconditionFn:c=>!c.isDragging()&&!!a(c)&&!isVisible$$module$build$src$core$dropdowndiv()&&!isVisible$$module$build$src$core$widgetdiv(),
508
507
  callback:c=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);var d=a(c);if(!d)return!1;c=a(c,c.getNavigator().navigateStacks(d,-1));if(!c)return!1;$.getFocusManager$$module$build$src$core$focus_manager().focusNode(c);return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.B],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_PREVIOUS_STACK};ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.NEXT_STACK,
509
508
  preconditionFn:c=>!c.isDragging()&&!!a(c)&&!isVisible$$module$build$src$core$dropdowndiv()&&!isVisible$$module$build$src$core$widgetdiv(),callback:c=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);var d=a(c);if(!d)return!1;c=c.getNavigator().navigateStacks(d,1);if(!c)return!1;$.getFocusManager$$module$build$src$core$focus_manager().focusNode(c);return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.N],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_NEXT_STACK});
@@ -515,8 +514,8 @@ ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({nam
515
514
  return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.H],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_NEXT_HEADING});ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register(d)};
516
515
  registerPerformAction$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.PERFORM_ACTION,preconditionFn:a=>!a.isDragging()&&!isVisible$$module$build$src$core$dropdowndiv()&&!isVisible$$module$build$src$core$widgetdiv()&&!$.getFocusManager$$module$build$src$core$focus_manager().ephemeralFocusTaken(),callback:(a,b)=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);
517
516
  if((a=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode())&&"performAction"in a){b.preventDefault();let c;(c=a.performAction)==null||c.call(a,b);return!0}return!1},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.ENTER,KeyCodes$$module$build$src$core$utils$keycodes.SPACE],allowCollision:!0,displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_PERFORM_ACTION})};
518
- registerDuplicate$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.DUPLICATE,preconditionFn:(a,b)=>{({focusedNode:b}=b);return!a.isDragging()&&!a.isReadOnly()&&!a.isFlyout&&(b instanceof BlockSvg$$module$build$src$core$block_svg?b.isDuplicatable():!0)},callback:(a,b,c,d)=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);b=
519
- isCopyable$$module$build$src$core$interfaces$i_copyable(d.focusedNode)&&d.focusedNode;return b?(b=b.toCopyData())?!!paste$$module$build$src$core$clipboard(b,a):!1:!1},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.D],allowCollision:!0,displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_DUPLICATE})};
517
+ registerDuplicate$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.DUPLICATE,preconditionFn:(a,b)=>{({focusedNode:b}=b);(b=!a.isDragging()&&!a.isReadOnly()&&!a.isFlyout&&(b instanceof BlockSvg$$module$build$src$core$block_svg?b.isDuplicatable():!0))||a.getAudioManager().playErrorBeep();return b},callback:(a,b,c,d)=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);
518
+ b=isCopyable$$module$build$src$core$interfaces$i_copyable(d.focusedNode)&&d.focusedNode;return b?(b=b.toCopyData())?!!paste$$module$build$src$core$clipboard(b,a):!1:!1},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.D],allowCollision:!0,displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_DUPLICATE})};
520
519
  registerCleanup$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.CLEANUP,preconditionFn:a=>!a.isDragging()&&!a.isReadOnly()&&!a.isFlyout,callback:a=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);a.cleanUp();return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.C],allowCollision:!0,displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_CLEANUP})};
521
520
  registerShowTooltip$$module$build$src$core$shortcut_items=function(){var a=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.J,[KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD]);ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.SHOW_TOOLTIP,preconditionFn:b=>!b.isDragging(),callback:b=>{var c=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode();
522
521
  c!==null&&(keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0),display$$module$build$src$core$tooltip(c,b));return!0},keyCodes:[a],allowCollision:!0,displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_SHOW_TOOLTIP})};
@@ -550,13 +549,8 @@ isLegalName$$module$build$src$core$procedures=function(a,b,c){return!isNameUsed$
550
549
  isNameUsed$$module$build$src$core$procedures=function(a,b,c){for(let d of b.getAllBlocks(!1))if(d!==c&&isLegacyProcedureDefBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks(d)&&$.Names$$module$build$src$core$names.equals(d.getProcedureDef()[0],a))return!0;c=c&&isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block(c)?c==null?void 0:c.getProcedureModel():void 0;for(let d of b.getProcedureMap().getProcedures())if(d!==c&&$.Names$$module$build$src$core$names.equals(d.getName(),
551
550
  a))return!0;return!1};
552
551
  $.rename$$module$build$src$core$procedures=function(a){var b=this.getSourceBlock();if(!b)throw new UnattachedFieldError$$module$build$src$core$field;a=a.trim();var c=$.findLegalName$$module$build$src$core$procedures(a,b);isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block(b)&&!b.isInsertionMarker()&&b.getProcedureModel().setName(c);var d=this.getValue();if(d!==a&&d!==c)for(a=b.workspace.getAllBlocks(!1),b=0;b<a.length;b++){let e=a[b];e.renameProcedure&&e.renameProcedure(d,c)}return c};
553
- xmlFlyoutCategory$$module$build$src$core$procedures=function(a){function b(f,g){for(let k=0;k<f.length;k++){var h=f[k][0];let l=f[k][1],m=$.createElement$$module$build$src$core$utils$xml("block");m.setAttribute("type",g);m.setAttribute("gap","16");let n=$.createElement$$module$build$src$core$utils$xml("mutation");n.setAttribute("name",h);m.appendChild(n);for(h=0;h<l.length;h++){let p=$.createElement$$module$build$src$core$utils$xml("arg");p.setAttribute("name",l[h]);n.appendChild(p)}c.push(m)}}var c=
554
- [];if(Blocks$$module$build$src$core$blocks.procedures_defnoreturn){var d=$.createElement$$module$build$src$core$utils$xml("block");d.setAttribute("type","procedures_defnoreturn");d.setAttribute("gap","16");var e=$.createElement$$module$build$src$core$utils$xml("field");e.setAttribute("name","NAME");e.appendChild($.createTextNode$$module$build$src$core$utils$xml($.Msg$$module$build$src$core$msg.PROCEDURES_DEFNORETURN_PROCEDURE));d.appendChild(e);c.push(d)}Blocks$$module$build$src$core$blocks.procedures_defreturn&&
555
- (d=$.createElement$$module$build$src$core$utils$xml("block"),d.setAttribute("type","procedures_defreturn"),d.setAttribute("gap","16"),e=$.createElement$$module$build$src$core$utils$xml("field"),e.setAttribute("name","NAME"),e.appendChild($.createTextNode$$module$build$src$core$utils$xml($.Msg$$module$build$src$core$msg.PROCEDURES_DEFRETURN_PROCEDURE)),d.appendChild(e),c.push(d));Blocks$$module$build$src$core$blocks.procedures_ifreturn&&(d=$.createElement$$module$build$src$core$utils$xml("block"),
556
- d.setAttribute("type","procedures_ifreturn"),d.setAttribute("gap","16"),c.push(d));c.length&&c[c.length-1].setAttribute("gap","24");a=allProcedures$$module$build$src$core$procedures(a);b(a[0],"procedures_callnoreturn");b(a[1],"procedures_callreturn");return c};internalFlyoutCategory$$module$build$src$core$procedures=function(a){return flyoutCategory$$module$build$src$core$procedures(a,!1)};
557
- flyoutCategory$$module$build$src$core$procedures=function(a,b=!0){function c(e,f){for(let [g,h]of e)d.push({kind:"block",type:f,gap:16,extraState:{name:g,params:h}})}if(b)return $.warn$$module$build$src$core$utils$deprecation("The XML return value of Blockly.Procedures.flyoutCategory()","v12","v13","the same method, but handle a return type of FlyoutItemInfo[] (JSON) instead."),xmlFlyoutCategory$$module$build$src$core$procedures(a);var d=[];Blocks$$module$build$src$core$blocks.procedures_defnoreturn&&
558
- d.push({kind:"block",type:"procedures_defnoreturn",gap:16,fields:{NAME:$.Msg$$module$build$src$core$msg.PROCEDURES_DEFNORETURN_PROCEDURE}});Blocks$$module$build$src$core$blocks.procedures_defreturn&&d.push({kind:"block",type:"procedures_defreturn",gap:16,fields:{NAME:$.Msg$$module$build$src$core$msg.PROCEDURES_DEFRETURN_PROCEDURE}});Blocks$$module$build$src$core$blocks.procedures_ifreturn&&d.push({kind:"block",type:"procedures_ifreturn",gap:16});d.length&&(d[d.length-1].gap=24);a=allProcedures$$module$build$src$core$procedures(a);
559
- c(a[0],"procedures_callnoreturn");c(a[1],"procedures_callreturn");return d};
552
+ flyoutCategory$$module$build$src$core$procedures=function(a){function b(d,e){for(let [f,g]of d)c.push({kind:"block",type:e,gap:16,extraState:{name:f,params:g}})}var c=[];Blocks$$module$build$src$core$blocks.procedures_defnoreturn&&c.push({kind:"block",type:"procedures_defnoreturn",gap:16,fields:{NAME:$.Msg$$module$build$src$core$msg.PROCEDURES_DEFNORETURN_PROCEDURE}});Blocks$$module$build$src$core$blocks.procedures_defreturn&&c.push({kind:"block",type:"procedures_defreturn",gap:16,fields:{NAME:$.Msg$$module$build$src$core$msg.PROCEDURES_DEFRETURN_PROCEDURE}});
553
+ Blocks$$module$build$src$core$blocks.procedures_ifreturn&&c.push({kind:"block",type:"procedures_ifreturn",gap:16});c.length&&(c[c.length-1].gap=24);a=allProcedures$$module$build$src$core$procedures(a);b(a[0],"procedures_callnoreturn");b(a[1],"procedures_callreturn");return c};
560
554
  updateMutatorFlyout$$module$build$src$core$procedures=function(a){var b=[],c=a.getBlocksByType("procedures_mutatorarg",!1);for(let f=0,g;g=c[f];f++)b.push(g.getFieldValue("NAME"));c=$.createElement$$module$build$src$core$utils$xml("xml");var d=$.createElement$$module$build$src$core$utils$xml("block");d.setAttribute("type","procedures_mutatorarg");var e=$.createElement$$module$build$src$core$utils$xml("field");e.setAttribute("name","NAME");b=generateUniqueNameFromOptions$$module$build$src$core$variables($.DEFAULT_ARG$$module$build$src$core$procedures,
561
555
  b);b=$.createTextNode$$module$build$src$core$utils$xml(b);e.appendChild(b);d.appendChild(e);c.appendChild(d);a.updateToolbox(c)};
562
556
  mutatorOpenListener$$module$build$src$core$procedures=function(a){if(isBubbleOpen$$module$build$src$core$events$predicates(a)&&a.bubbleType==="mutator"&&a.isOpen&&a.blockId){a=getWorkspaceById$$module$build$src$core$common(a.workspaceId).getBlockById(a.blockId);var b=a.type;if(b==="procedures_defnoreturn"||b==="procedures_defreturn")a=a.getIcon($.MutatorIcon$$module$build$src$core$icons$mutator_icon.TYPE).getWorkspace(),updateMutatorFlyout$$module$build$src$core$procedures(a),a.addChangeListener(mutatorChangeListener$$module$build$src$core$procedures)}};
@@ -570,12 +564,9 @@ isDynamicShape$$module$build$src$core$renderers$common$constants=function(a){ret
570
564
  register$$module$build$src$core$renderers$common$block_rendering=function(a,b){register$$module$build$src$core$registry(Type$$module$build$src$core$registry.RENDERER,a,b)};unregister$$module$build$src$core$renderers$common$block_rendering=function(a){unregister$$module$build$src$core$registry(Type$$module$build$src$core$registry.RENDERER,a)};
571
565
  init$$module$build$src$core$renderers$common$block_rendering=function(a,b,c){a=new (getClass$$module$build$src$core$registry(Type$$module$build$src$core$registry.RENDERER,a))(a);a.init(b,c);return a};stringButtonClickHandler$$module$build$src$core$variables_dynamic=function(a){createVariableButtonHandler$$module$build$src$core$variables(a.getTargetWorkspace(),void 0,"String")};
572
566
  numberButtonClickHandler$$module$build$src$core$variables_dynamic=function(a){createVariableButtonHandler$$module$build$src$core$variables(a.getTargetWorkspace(),void 0,"Number")};colourButtonClickHandler$$module$build$src$core$variables_dynamic=function(a){createVariableButtonHandler$$module$build$src$core$variables(a.getTargetWorkspace(),void 0,"Colour")};
573
- internalFlyoutCategory$$module$build$src$core$variables_dynamic=function(a){return flyoutCategory$$module$build$src$core$variables_dynamic(a,!1)};
574
- flyoutCategory$$module$build$src$core$variables_dynamic=function(a,b=!0){Blocks$$module$build$src$core$blocks.variables_set_dynamic||Blocks$$module$build$src$core$blocks.variables_get_dynamic||console.warn("There are no dynamic variable blocks, but there is a dynamic variable category.");if(b)return $.warn$$module$build$src$core$utils$deprecation("The XML return value of Blockly.VariablesDynamic.flyoutCategory()","v12","v13","the same method, but handle a return type of FlyoutItemInfo[] (JSON) instead."),
575
- xmlFlyoutCategory$$module$build$src$core$variables_dynamic(a);a.registerButtonCallback("CREATE_VARIABLE_STRING",stringButtonClickHandler$$module$build$src$core$variables_dynamic);a.registerButtonCallback("CREATE_VARIABLE_NUMBER",numberButtonClickHandler$$module$build$src$core$variables_dynamic);a.registerButtonCallback("CREATE_VARIABLE_COLOUR",colourButtonClickHandler$$module$build$src$core$variables_dynamic);return[{kind:"button",text:$.Msg$$module$build$src$core$msg.NEW_STRING_VARIABLE,callbackkey:"CREATE_VARIABLE_STRING"},
576
- {kind:"button",text:$.Msg$$module$build$src$core$msg.NEW_NUMBER_VARIABLE,callbackkey:"CREATE_VARIABLE_NUMBER"},{kind:"button",text:$.Msg$$module$build$src$core$msg.NEW_COLOUR_VARIABLE,callbackkey:"CREATE_VARIABLE_COLOUR"},...jsonFlyoutCategoryBlocks$$module$build$src$core$variables(a,a.getVariableMap().getAllVariables(),!1,"variables_get_dynamic","variables_set_dynamic")]};
577
- xmlFlyoutCategory$$module$build$src$core$variables_dynamic=function(a){var b=[],c=document.createElement("button");c.setAttribute("text",$.Msg$$module$build$src$core$msg.NEW_STRING_VARIABLE);c.setAttribute("callbackKey","CREATE_VARIABLE_STRING");b.push(c);c=document.createElement("button");c.setAttribute("text",$.Msg$$module$build$src$core$msg.NEW_NUMBER_VARIABLE);c.setAttribute("callbackKey","CREATE_VARIABLE_NUMBER");b.push(c);c=document.createElement("button");c.setAttribute("text",$.Msg$$module$build$src$core$msg.NEW_COLOUR_VARIABLE);
578
- c.setAttribute("callbackKey","CREATE_VARIABLE_COLOUR");b.push(c);a.registerButtonCallback("CREATE_VARIABLE_STRING",stringButtonClickHandler$$module$build$src$core$variables_dynamic);a.registerButtonCallback("CREATE_VARIABLE_NUMBER",numberButtonClickHandler$$module$build$src$core$variables_dynamic);a.registerButtonCallback("CREATE_VARIABLE_COLOUR",colourButtonClickHandler$$module$build$src$core$variables_dynamic);a=flyoutCategoryBlocks$$module$build$src$core$variables_dynamic(a);return b=b.concat(a)};
567
+ flyoutCategory$$module$build$src$core$variables_dynamic=function(a){Blocks$$module$build$src$core$blocks.variables_set_dynamic||Blocks$$module$build$src$core$blocks.variables_get_dynamic||console.warn("There are no dynamic variable blocks, but there is a dynamic variable category.");a.registerButtonCallback("CREATE_VARIABLE_STRING",stringButtonClickHandler$$module$build$src$core$variables_dynamic);a.registerButtonCallback("CREATE_VARIABLE_NUMBER",numberButtonClickHandler$$module$build$src$core$variables_dynamic);
568
+ a.registerButtonCallback("CREATE_VARIABLE_COLOUR",colourButtonClickHandler$$module$build$src$core$variables_dynamic);return[{kind:"button",text:$.Msg$$module$build$src$core$msg.NEW_STRING_VARIABLE,callbackkey:"CREATE_VARIABLE_STRING"},{kind:"button",text:$.Msg$$module$build$src$core$msg.NEW_NUMBER_VARIABLE,callbackkey:"CREATE_VARIABLE_NUMBER"},{kind:"button",text:$.Msg$$module$build$src$core$msg.NEW_COLOUR_VARIABLE,callbackkey:"CREATE_VARIABLE_COLOUR"},...jsonFlyoutCategoryBlocks$$module$build$src$core$variables(a,
569
+ a.getVariableMap().getAllVariables(),!1,"variables_get_dynamic","variables_set_dynamic")]};
579
570
  flyoutCategoryBlocks$$module$build$src$core$variables_dynamic=function(a){a=a.getVariableMap().getAllVariables();var b=[];if(a.length>0){if(Blocks$$module$build$src$core$blocks.variables_set_dynamic){var c=a[a.length-1];let d=$.createElement$$module$build$src$core$utils$xml("block");d.setAttribute("type","variables_set_dynamic");d.setAttribute("gap","24");d.appendChild(generateVariableFieldDom$$module$build$src$core$variables(c));b.push(d)}if(Blocks$$module$build$src$core$blocks.variables_get_dynamic){a.sort(compareByName$$module$build$src$core$variables);
580
571
  for(let d=0,e;e=a[d];d++)c=$.createElement$$module$build$src$core$utils$xml("block"),c.setAttribute("type","variables_get_dynamic"),c.setAttribute("gap","8"),c.appendChild(generateVariableFieldDom$$module$build$src$core$variables(e)),b.push(c)}}return b};resizeSvgContents$$module$build$src$core$workspace_svg=function(a){a.resizeContents()};
581
572
  saveProcedure$$module$build$src$core$serialization$procedures=function(a){var b=a.saveState();if(!a.getParameters().length)return b;b.parameters=a.getParameters().map(c=>c.saveState());return b};loadProcedure$$module$build$src$core$serialization$procedures=function(a,b,c,d){a=a.loadState(c,d);if(!c.parameters)return a;for(let [e,f]of c.parameters.entries())a.insertParameter(b.loadState(f,d),e);return a};
@@ -735,11 +726,11 @@ return!1}removeAllKeyMappings(a){for(let b of this.keyMap.keys())this.removeKeyM
735
726
  for(let d of c){c=this.shortcuts.get(d);let e;if(!c||c.preconditionFn&&!c.preconditionFn(a,{focusedNode:(e=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode())!=null?e:void 0}))continue;let f,g;if((f=c.callback)==null?0:f.call(c,a,b,c,{focusedNode:(g=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode())!=null?g:void 0}))return!0}return!1}getShortcutNamesByKeyCode(a){var b;return((b=this.keyMap.get(a))==null?void 0:b.slice())||[]}getKeyCodesByShortcutName(a){var b=
736
727
  [];for(let [c,d]of this.keyMap)d.indexOf(a)>-1&&b.push(c);return b}serializeKeyEvent(a){var b="";for(let c in ShortcutRegistry$$module$build$src$core$shortcut_registry.modifierKeys)a.getModifierState(c)&&(b!==""&&(b+="+"),b+=c);b!==""&&a.keyCode?b+="+"+a.keyCode:a.keyCode&&(b=String(a.keyCode));return b}checkModifiers(a){for(let b of a)if(!(b in ShortcutRegistry$$module$build$src$core$shortcut_registry.modifierKeys))throw Error(b+" is not a valid modifier key.");}createSerializedKey(a,b){var c="";
737
728
  if(b){this.checkModifiers(b);for(let d in ShortcutRegistry$$module$build$src$core$shortcut_registry.modifierKeys)b.includes(ShortcutRegistry$$module$build$src$core$shortcut_registry.modifierKeys[d])&&(c!==""&&(c+="+"),c+=d)}c!==""&&a?c+="+"+a:a&&(c=`${a}`);return c}};ShortcutRegistry$$module$build$src$core$shortcut_registry.registry=new ShortcutRegistry$$module$build$src$core$shortcut_registry;
738
- (function(a){a=a.modifierKeys||(a.modifierKeys={});a[a.Shift=16]="Shift";a[a.Control=17]="Control";a[a.Alt=18]="Alt";a[a.Meta=91]="Meta"})(ShortcutRegistry$$module$build$src$core$shortcut_registry||(ShortcutRegistry$$module$build$src$core$shortcut_registry={}));var module$build$src$core$shortcut_registry={};module$build$src$core$shortcut_registry.ShortcutRegistry=ShortcutRegistry$$module$build$src$core$shortcut_registry;var WorkspaceDB_$$module$build$src$core$common=Object.create(null),mainWorkspace$$module$build$src$core$common,parentContainer$$module$build$src$core$common,draggingConnections$$module$build$src$core$common=[],TEST_ONLY$$module$build$src$core$common={defineBlocksWithJsonArrayInternal:defineBlocksWithJsonArrayInternal$$module$build$src$core$common},module$build$src$core$common={TEST_ONLY:TEST_ONLY$$module$build$src$core$common};module$build$src$core$common.createBlockDefinitionsFromJsonArray=$.createBlockDefinitionsFromJsonArray$$module$build$src$core$common;
729
+ (function(a){a=a.modifierKeys||(a.modifierKeys={});a[a.Shift=16]="Shift";a[a.Control=17]="Control";a[a.Alt=18]="Alt";a[a.Meta=91]="Meta"})(ShortcutRegistry$$module$build$src$core$shortcut_registry||(ShortcutRegistry$$module$build$src$core$shortcut_registry={}));var module$build$src$core$shortcut_registry={};module$build$src$core$shortcut_registry.ShortcutRegistry=ShortcutRegistry$$module$build$src$core$shortcut_registry;var previousWarnings$$module$build$src$core$utils$deprecation=new Set,module$build$src$core$utils$deprecation={};module$build$src$core$utils$deprecation.warn=warn$$module$build$src$core$utils$deprecation;var WorkspaceDB_$$module$build$src$core$common=Object.create(null),mainWorkspace$$module$build$src$core$common,parentContainer$$module$build$src$core$common,draggingConnections$$module$build$src$core$common=[],TEST_ONLY$$module$build$src$core$common={defineBlocksWithJsonArrayInternal:defineBlocksWithJsonArrayInternal$$module$build$src$core$common},module$build$src$core$common={TEST_ONLY:TEST_ONLY$$module$build$src$core$common};module$build$src$core$common.createBlockDefinitionsFromJsonArray=$.createBlockDefinitionsFromJsonArray$$module$build$src$core$common;
739
730
  module$build$src$core$common.defineBlocks=$.defineBlocks$$module$build$src$core$common;module$build$src$core$common.defineBlocksWithJsonArray=defineBlocksWithJsonArray$$module$build$src$core$common;module$build$src$core$common.draggingConnections=draggingConnections$$module$build$src$core$common;module$build$src$core$common.fireSelectedEvent=fireSelectedEvent$$module$build$src$core$common;module$build$src$core$common.getAllWorkspaces=getAllWorkspaces$$module$build$src$core$common;
740
731
  module$build$src$core$common.getBlockTypeCounts=getBlockTypeCounts$$module$build$src$core$common;module$build$src$core$common.getMainWorkspace=getMainWorkspace$$module$build$src$core$common;module$build$src$core$common.getParentContainer=getParentContainer$$module$build$src$core$common;module$build$src$core$common.getSelected=getSelected$$module$build$src$core$common;module$build$src$core$common.getWorkspaceById=getWorkspaceById$$module$build$src$core$common;
741
732
  module$build$src$core$common.globalShortcutHandler=globalShortcutHandler$$module$build$src$core$common;module$build$src$core$common.registerWorkspace=registerWorkspace$$module$build$src$core$common;module$build$src$core$common.setMainWorkspace=setMainWorkspace$$module$build$src$core$common;module$build$src$core$common.setParentContainer=setParentContainer$$module$build$src$core$common;module$build$src$core$common.setSelected=setSelected$$module$build$src$core$common;
742
- module$build$src$core$common.svgResize=svgResize$$module$build$src$core$common;module$build$src$core$common.unregisterWorkpace=unregisterWorkpace$$module$build$src$core$common;var Abstract$$module$build$src$core$events$events_abstract=class{constructor(){this.workspaceId=void 0;this.isUiEvent=!1;this.type="";this.group=$.getGroup$$module$build$src$core$events$utils();this.recordUndo=getRecordUndo$$module$build$src$core$events$utils()}toJson(){return{type:this.type,group:this.group}}static fromJson(a,b,c){c.isBlank=!1;c.group=a.group||"";c.workspaceId=b.id;return c}isNull(){return!1}run(a){}getEventWorkspace_(){var a;this.workspaceId&&(a=getWorkspaceById$$module$build$src$core$common(this.workspaceId));
733
+ module$build$src$core$common.svgResize=svgResize$$module$build$src$core$common;module$build$src$core$common.unregisterWorkpace=unregisterWorkpace$$module$build$src$core$common;module$build$src$core$common.unregisterWorkspace=unregisterWorkspace$$module$build$src$core$common;var Abstract$$module$build$src$core$events$events_abstract=class{constructor(){this.workspaceId=void 0;this.isUiEvent=!1;this.type="";this.group=$.getGroup$$module$build$src$core$events$utils();this.recordUndo=getRecordUndo$$module$build$src$core$events$utils()}toJson(){return{type:this.type,group:this.group}}static fromJson(a,b,c){c.isBlank=!1;c.group=a.group||"";c.workspaceId=b.id;return c}isNull(){return!1}run(a){}getEventWorkspace_(){var a;this.workspaceId&&(a=getWorkspaceById$$module$build$src$core$common(this.workspaceId));
743
734
  if(!a)throw Error("Workspace is null. Event must have been generated from real Blockly events.");return a}},module$build$src$core$events$events_abstract={};module$build$src$core$events$events_abstract.Abstract=Abstract$$module$build$src$core$events$events_abstract;var UiBase$$module$build$src$core$events$events_ui_base=class extends Abstract$$module$build$src$core$events$events_abstract{constructor(a){super();this.isBlank=!0;this.recordUndo=!1;this.isUiEvent=!0;this.isBlank=typeof a==="undefined";this.workspaceId=a?a:""}},module$build$src$core$events$events_ui_base={};module$build$src$core$events$events_ui_base.UiBase=UiBase$$module$build$src$core$events$events_ui_base;var Click$$module$build$src$core$events$events_click=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b,c){b=a?a.workspace.id:b;b===null&&(b=void 0);super(b);this.type=EventType$$module$build$src$core$events$type.CLICK;this.blockId=a?a.id:void 0;this.targetType=c}toJson(){var a=super.toJson();if(!this.targetType)throw Error("The click target type is undefined. Either pass a block to the constructor, or call fromJson");a.targetType=this.targetType;a.blockId=this.blockId;
744
735
  return a}static fromJson(a,b,c){b=UiBase$$module$build$src$core$events$events_ui_base.fromJson(a,b,c!=null?c:new Click$$module$build$src$core$events$events_click);b.targetType=a.targetType;b.blockId=a.blockId;return b}},ClickTarget$$module$build$src$core$events$events_click;(function(a){a.BLOCK="block";a.WORKSPACE="workspace";a.ZOOM_CONTROLS="zoom_controls"})(ClickTarget$$module$build$src$core$events$events_click||(ClickTarget$$module$build$src$core$events$events_click={}));
745
736
  register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.CLICK,Click$$module$build$src$core$events$events_click);var module$build$src$core$events$events_click={};module$build$src$core$events$events_click.Click=Click$$module$build$src$core$events$events_click;module$build$src$core$events$events_click.ClickTarget=ClickTarget$$module$build$src$core$events$events_click;var module$build$src$core$utils$array={};module$build$src$core$utils$array.removeElem=removeElem$$module$build$src$core$utils$array;var Capability$$module$build$src$core$component_manager=class{constructor(a){this.name=a}toString(){return this.name}};Capability$$module$build$src$core$component_manager.POSITIONABLE=new Capability$$module$build$src$core$component_manager("positionable");Capability$$module$build$src$core$component_manager.DRAG_TARGET=new Capability$$module$build$src$core$component_manager("drag_target");Capability$$module$build$src$core$component_manager.DELETE_AREA=new Capability$$module$build$src$core$component_manager("delete_area");
@@ -750,7 +741,7 @@ a+'" has not been added to the ComponentManager');if(this.hasCapability(a,b))con
750
741
  b),removeElem$$module$build$src$core$utils$array(this.capabilityToComponentIds.get(b),a)):console.warn('Plugin "'+a+"doesn't have capability \""+b+'" to remove')}hasCapability(a,b){b=`${b}`.toLowerCase();return this.componentData.has(a)&&this.componentData.get(a).capabilities.includes(b)}getComponent(a){var b;return(b=this.componentData.get(a))==null?void 0:b.component}getComponents(a,b){a=`${a}`.toLowerCase();a=this.capabilityToComponentIds.get(a);if(!a)return[];var c=[];if(b){let d=[];a.forEach(e=>
751
742
  {d.push(this.componentData.get(e))});d.sort(function(e,f){return e.weight-f.weight});d.forEach(function(e){c.push(e.component)})}else a.forEach(d=>{c.push(this.componentData.get(d).component)});return c}};ComponentManager$$module$build$src$core$component_manager.Capability=Capability$$module$build$src$core$component_manager;
752
743
  (function(a){a=a.ComponentWeight||(a.ComponentWeight={});a[a.TOOLBOX_WEIGHT=0]="TOOLBOX_WEIGHT";a[a.FLYOUT_WEIGHT=1]="FLYOUT_WEIGHT";a[a.TRASHCAN_WEIGHT=2]="TRASHCAN_WEIGHT";a[a.ZOOM_CONTROLS_WEIGHT=3]="ZOOM_CONTROLS_WEIGHT"})(ComponentManager$$module$build$src$core$component_manager||(ComponentManager$$module$build$src$core$component_manager={}));
753
- var ComponentWeight$$module$build$src$core$component_manager=ComponentManager$$module$build$src$core$component_manager.ComponentWeight,module$build$src$core$component_manager={};module$build$src$core$component_manager.ComponentManager=ComponentManager$$module$build$src$core$component_manager;module$build$src$core$component_manager.ComponentWeight=ComponentWeight$$module$build$src$core$component_manager;var injectionSites$$module$build$src$core$css=new WeakSet,registeredStyleSheets$$module$build$src$core$css=[],content$$module$build$src$core$css=`
744
+ var ComponentWeight$$module$build$src$core$component_manager=ComponentManager$$module$build$src$core$component_manager.ComponentWeight,module$build$src$core$component_manager={};module$build$src$core$component_manager.ComponentManager=ComponentManager$$module$build$src$core$component_manager;module$build$src$core$component_manager.ComponentWeight=ComponentWeight$$module$build$src$core$component_manager;var injectionSites$$module$build$src$core$css=new WeakSet,registeredCss$$module$build$src$core$css=[],content$$module$build$src$core$css=`
754
745
  :is(
755
746
  .injectionDiv,
756
747
  .blocklyWidgetDiv,
@@ -1573,11 +1564,11 @@ module$build$src$core$events$events.clearPendingUndo=clearPendingUndo$$module$bu
1573
1564
  module$build$src$core$events$events.fire=fire$$module$build$src$core$events$utils;module$build$src$core$events$events.fromJson=fromJson$$module$build$src$core$events$utils;module$build$src$core$events$events.get=get$$module$build$src$core$events$utils;module$build$src$core$events$events.getDescendantIds=getDescendantIds$$module$build$src$core$events$utils;module$build$src$core$events$events.getGroup=$.getGroup$$module$build$src$core$events$utils;module$build$src$core$events$events.getRecordUndo=getRecordUndo$$module$build$src$core$events$utils;
1574
1565
  module$build$src$core$events$events.isEnabled=isEnabled$$module$build$src$core$events$utils;module$build$src$core$events$events.setGroup=$.setGroup$$module$build$src$core$events$utils;module$build$src$core$events$events.setRecordUndo=$.setRecordUndo$$module$build$src$core$events$utils;var module$build$src$core$interfaces$i_legacy_procedure_blocks={};module$build$src$core$interfaces$i_legacy_procedure_blocks.isLegacyProcedureCallBlock=isLegacyProcedureCallBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks;module$build$src$core$interfaces$i_legacy_procedure_blocks.isLegacyProcedureDefBlock=isLegacyProcedureDefBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks;var module$build$src$core$interfaces$i_variable_backed_parameter_model={};module$build$src$core$interfaces$i_variable_backed_parameter_model.isVariableBackedParameterModel=isVariableBackedParameterModel$$module$build$src$core$interfaces$i_variable_backed_parameter_model;var KeyboardNavigationController$$module$build$src$core$keyboard_navigation_controller=class{constructor(){this.scopeChangeAudioCuesEnabled=this.isActive=!1;this.activeClassName="blocklyKeyboardNavigation"}setIsActive(a=!0){this.isActive=a;this.updateActiveVisualization()}getIsActive(){return this.isActive}setScopeChangeAudioCuesEnabled(a){this.scopeChangeAudioCuesEnabled=a}getScopeChangeAudioCuesEnabled(){return this.scopeChangeAudioCuesEnabled}updateActiveVisualization(){this.isActive?document.body.classList.add(this.activeClassName):
1575
1566
  document.body.classList.remove(this.activeClassName)}},keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller=new KeyboardNavigationController$$module$build$src$core$keyboard_navigation_controller,module$build$src$core$keyboard_navigation_controller={};module$build$src$core$keyboard_navigation_controller.KeyboardNavigationController=KeyboardNavigationController$$module$build$src$core$keyboard_navigation_controller;
1576
- module$build$src$core$keyboard_navigation_controller.keyboardNavigationController=keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller;var previousWarnings$$module$build$src$core$utils$deprecation=new Set,module$build$src$core$utils$deprecation={};module$build$src$core$utils$deprecation.warn=$.warn$$module$build$src$core$utils$deprecation;var CATEGORY_NAME$$module$build$src$core$variables="VARIABLE",VAR_LETTER_OPTIONS$$module$build$src$core$variables="ijkmnopqrstuvwxyzabcdefgh",TEST_ONLY$$module$build$src$core$variables={generateUniqueNameInternal:generateUniqueNameInternal$$module$build$src$core$variables},module$build$src$core$variables={CATEGORY_NAME:CATEGORY_NAME$$module$build$src$core$variables,TEST_ONLY:TEST_ONLY$$module$build$src$core$variables,VAR_LETTER_OPTIONS:VAR_LETTER_OPTIONS$$module$build$src$core$variables};
1567
+ module$build$src$core$keyboard_navigation_controller.keyboardNavigationController=keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller;var CATEGORY_NAME$$module$build$src$core$variables="VARIABLE",VAR_LETTER_OPTIONS$$module$build$src$core$variables="ijkmnopqrstuvwxyzabcdefgh",TEST_ONLY$$module$build$src$core$variables={generateUniqueNameInternal:generateUniqueNameInternal$$module$build$src$core$variables},module$build$src$core$variables={CATEGORY_NAME:CATEGORY_NAME$$module$build$src$core$variables,TEST_ONLY:TEST_ONLY$$module$build$src$core$variables,VAR_LETTER_OPTIONS:VAR_LETTER_OPTIONS$$module$build$src$core$variables};
1577
1568
  module$build$src$core$variables.allDeveloperVariables=$.allDeveloperVariables$$module$build$src$core$variables;module$build$src$core$variables.allUsedVarModels=$.allUsedVarModels$$module$build$src$core$variables;module$build$src$core$variables.compareByName=compareByName$$module$build$src$core$variables;module$build$src$core$variables.createVariableButtonHandler=createVariableButtonHandler$$module$build$src$core$variables;module$build$src$core$variables.deleteVariable=$.deleteVariable$$module$build$src$core$variables;
1578
1569
  module$build$src$core$variables.flyoutCategory=flyoutCategory$$module$build$src$core$variables;module$build$src$core$variables.flyoutCategoryBlocks=flyoutCategoryBlocks$$module$build$src$core$variables;module$build$src$core$variables.generateUniqueName=generateUniqueName$$module$build$src$core$variables;module$build$src$core$variables.generateUniqueNameFromOptions=generateUniqueNameFromOptions$$module$build$src$core$variables;module$build$src$core$variables.generateVariableFieldDom=generateVariableFieldDom$$module$build$src$core$variables;
1579
- module$build$src$core$variables.getAddedVariables=getAddedVariables$$module$build$src$core$variables;module$build$src$core$variables.getOrCreateVariablePackage=$.getOrCreateVariablePackage$$module$build$src$core$variables;module$build$src$core$variables.getVariable=$.getVariable$$module$build$src$core$variables;module$build$src$core$variables.getVariableUsesById=getVariableUsesById$$module$build$src$core$variables;module$build$src$core$variables.internalFlyoutCategory=internalFlyoutCategory$$module$build$src$core$variables;
1580
- module$build$src$core$variables.jsonFlyoutCategoryBlocks=jsonFlyoutCategoryBlocks$$module$build$src$core$variables;module$build$src$core$variables.nameUsedWithAnyType=nameUsedWithAnyType$$module$build$src$core$variables;module$build$src$core$variables.nameUsedWithConflictingParam=nameUsedWithConflictingParam$$module$build$src$core$variables;module$build$src$core$variables.promptName=promptName$$module$build$src$core$variables;module$build$src$core$variables.renameVariable=$.renameVariable$$module$build$src$core$variables;var DeserializationError$$module$build$src$core$serialization$exceptions=class extends Error{},MissingBlockType$$module$build$src$core$serialization$exceptions=class extends DeserializationError$$module$build$src$core$serialization$exceptions{constructor(a){super("Expected to find a 'type' property, defining the block type");this.state=a}},MissingConnection$$module$build$src$core$serialization$exceptions=class extends DeserializationError$$module$build$src$core$serialization$exceptions{constructor(a,
1570
+ module$build$src$core$variables.getAddedVariables=getAddedVariables$$module$build$src$core$variables;module$build$src$core$variables.getOrCreateVariablePackage=$.getOrCreateVariablePackage$$module$build$src$core$variables;module$build$src$core$variables.getVariable=$.getVariable$$module$build$src$core$variables;module$build$src$core$variables.getVariableUsesById=getVariableUsesById$$module$build$src$core$variables;module$build$src$core$variables.jsonFlyoutCategoryBlocks=jsonFlyoutCategoryBlocks$$module$build$src$core$variables;
1571
+ module$build$src$core$variables.nameUsedWithAnyType=nameUsedWithAnyType$$module$build$src$core$variables;module$build$src$core$variables.nameUsedWithConflictingParam=nameUsedWithConflictingParam$$module$build$src$core$variables;module$build$src$core$variables.promptName=promptName$$module$build$src$core$variables;module$build$src$core$variables.renameVariable=$.renameVariable$$module$build$src$core$variables;var DeserializationError$$module$build$src$core$serialization$exceptions=class extends Error{},MissingBlockType$$module$build$src$core$serialization$exceptions=class extends DeserializationError$$module$build$src$core$serialization$exceptions{constructor(a){super("Expected to find a 'type' property, defining the block type");this.state=a}},MissingConnection$$module$build$src$core$serialization$exceptions=class extends DeserializationError$$module$build$src$core$serialization$exceptions{constructor(a,
1581
1572
  b,c){super(`The block ${b.toDevString()} is missing a(n) ${a}
1582
1573
  connection`);this.block=b;this.state=c}},BadConnectionCheck$$module$build$src$core$serialization$exceptions=class extends DeserializationError$$module$build$src$core$serialization$exceptions{constructor(a,b,c,d){super(`The block ${c.toDevString()} could not connect its
1583
1574
  ${b} to its parent, because: ${a}`);this.childBlock=c;this.childState=d}},RealChildOfShadow$$module$build$src$core$serialization$exceptions=class extends DeserializationError$$module$build$src$core$serialization$exceptions{constructor(a){super("Encountered a real block which is defined as a child of a shadow\nblock. It is an invariant of Blockly that shadow blocks only have shadow\nchildren");this.state=a}},UnregisteredIcon$$module$build$src$core$serialization$exceptions=class extends DeserializationError$$module$build$src$core$serialization$exceptions{constructor(a,
@@ -1725,8 +1716,8 @@ a.MAC_WK_CMD_LEFT:a.CTRL]="CTRL_CMD"})(KeyCodes$$module$build$src$core$utils$key
1725
1716
  20:-20)}, ${b-20})`)}dispose(){removeNode$$module$build$src$core$utils$dom(this.svgRoot)}},module$build$src$core$keyboard_nav$move_indicator={};module$build$src$core$keyboard_nav$move_indicator.MoveIndicator=MoveIndicator$$module$build$src$core$keyboard_nav$move_indicator;var Direction$$module$build$src$core$keyboard_nav$keyboard_mover;(function(a){a[a.NONE=0]="NONE";a[a.UP=1]="UP";a[a.DOWN=2]="DOWN";a[a.LEFT=3]="LEFT";a[a.RIGHT=4]="RIGHT"})(Direction$$module$build$src$core$keyboard_nav$keyboard_mover||(Direction$$module$build$src$core$keyboard_nav$keyboard_mover={}));
1726
1717
  var COMMIT_MOVE_SHORTCUT$$module$build$src$core$keyboard_nav$keyboard_mover="commitMove",KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover=class{constructor(){this.totalDelta=new Coordinate$$module$build$src$core$utils$coordinate(0,0);this.stepDistance=20;this.allowedShortcuts=[];this.blurListener=()=>{this.abortMove()}}canMove(a){return!a.workspace.isReadOnly()&&a.isMovable()}isMoving(){return!!this.draggable}startMove(a,b){if(!this.canMove(a)||this.isMoving())return!1;var c=getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.BLOCK_DRAGGER,
1727
1718
  a.workspace.options,!0);if(!c)throw Error("no Dragger registered");this.dragger=new c(a,a.workspace);this.draggable=this.dragger.onDragStart(b);this.startLocation=this.draggable.getRelativeToSurfaceXY();this.updateTotalDelta();this.draggable.getFocusableElement().addEventListener("blur",this.blurListener);a=Object.values(ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.getRegistry()).flatMap(d=>d.keyCodes).filter(d=>d&&![KeyCodes$$module$build$src$core$utils$keycodes.RIGHT,KeyCodes$$module$build$src$core$utils$keycodes.LEFT,
1728
- KeyCodes$$module$build$src$core$utils$keycodes.UP,KeyCodes$$module$build$src$core$utils$keycodes.DOWN,KeyCodes$$module$build$src$core$utils$keycodes.ENTER,KeyCodes$$module$build$src$core$utils$keycodes.ESC,KeyCodes$$module$build$src$core$utils$keycodes.M].includes(typeof d==="number"?d:parseInt(`${d.split("+").pop()}`))).filter(d=>!!d);ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:COMMIT_MOVE_SHORTCUT$$module$build$src$core$keyboard_nav$keyboard_mover,preconditionFn:()=>
1729
- this.isMoving(),callback:()=>{this.finishMove();return!1},keyCodes:a,allowCollision:!0},!0);this.scrollCurrentElementIntoView();this.moveIndicator=new MoveIndicator$$module$build$src$core$keyboard_nav$move_indicator(this.draggable.workspace);this.repositionMoveIndicator();return!0}move(a,b){switch(a){case Direction$$module$build$src$core$keyboard_nav$keyboard_mover.UP:this.totalDelta.y-=this.stepDistance;break;case Direction$$module$build$src$core$keyboard_nav$keyboard_mover.DOWN:this.totalDelta.y+=
1719
+ KeyCodes$$module$build$src$core$utils$keycodes.UP,KeyCodes$$module$build$src$core$utils$keycodes.DOWN,KeyCodes$$module$build$src$core$utils$keycodes.ENTER,KeyCodes$$module$build$src$core$utils$keycodes.SPACE,KeyCodes$$module$build$src$core$utils$keycodes.ESC,KeyCodes$$module$build$src$core$utils$keycodes.M].includes(typeof d==="number"?d:parseInt(`${d.split("+").pop()}`))).filter(d=>!!d);ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:COMMIT_MOVE_SHORTCUT$$module$build$src$core$keyboard_nav$keyboard_mover,
1720
+ preconditionFn:()=>this.isMoving(),callback:()=>{this.finishMove();return!1},keyCodes:a,allowCollision:!0},!0);this.scrollCurrentElementIntoView();this.moveIndicator=new MoveIndicator$$module$build$src$core$keyboard_nav$move_indicator(this.draggable.workspace);this.repositionMoveIndicator();return!0}move(a,b){switch(a){case Direction$$module$build$src$core$keyboard_nav$keyboard_mover.UP:this.totalDelta.y-=this.stepDistance;break;case Direction$$module$build$src$core$keyboard_nav$keyboard_mover.DOWN:this.totalDelta.y+=
1730
1721
  this.stepDistance;break;case Direction$$module$build$src$core$keyboard_nav$keyboard_mover.LEFT:this.totalDelta.x-=this.stepDistance;break;case Direction$$module$build$src$core$keyboard_nav$keyboard_mover.RIGHT:this.totalDelta.x+=this.stepDistance}var c;(c=this.dragger)==null||c.onDrag(b,this.totalPixelDelta());this.updateTotalDelta();this.scrollCurrentElementIntoView();this.repositionMoveIndicator();return!0}finishMove(a){this.preDragEndCleanup();var b;(b=this.dragger)==null||b.onDragEnd(a,this.totalPixelDelta());
1731
1722
  this.postDragEndCleanup();return!0}abortMove(a){this.preDragEndCleanup();var b;(b=this.dragger)==null||b.onDragRevert(a,this.totalPixelDelta());this.postDragEndCleanup();return!0}setMoveDistance(a){this.stepDistance=a}getAllowedShortcuts(){return this.allowedShortcuts}setAllowedShortcuts(a){this.allowedShortcuts=a}repositionMoveIndicator(){finishQueuedRenders$$module$build$src$core$render_management().then(()=>{var a,b=(a=this.draggable)==null?void 0:a.getBoundingRectangle();this.draggable&&"getBoundingRectangleWithoutChildren"in
1732
1723
  this.draggable&&(b=this.positionForBlockMoveIndicator(this.draggable));if(b){var c,d;(d=this.moveIndicator)==null||d.moveTo(((c=this.draggable)==null?0:c.workspace.RTL)?b.left:b.right,b.top)}})}positionForBlockMoveIndicator(a){for(var b=a.workspace.getNavigator(),c=a,d;d=b.getInNode(c);)c=d;b=b.getSourceBlockFromNode(c);c=a.getBoundingRectangleWithoutChildren().getOrigin().y;for(var e;((e=b)==null?void 0:e.getBoundingRectangleWithoutChildren().getOrigin().y)!==c;){let h,k;b=(k=(h=b)==null?void 0:
@@ -1737,9 +1728,9 @@ module$build$src$core$keyboard_nav$keyboard_mover.KeyboardMover=KeyboardMover$$m
1737
1728
  this.componentStyles[a];if(!a)return null;if(typeof a==="string"){let b=this.getComponentStyle(a);if(b)return b}return`${a}`}setComponentStyle(a,b){this.componentStyles[a]=b}setFontStyle(a){this.fontStyle=a}setStartHats(a){this.startHats=a}static defineTheme(a,b){a=a.toLowerCase();var c=new Theme$$module$build$src$core$theme(a),d=b.base;if(d){if(typeof d==="string"){let e;d=(e=getObject$$module$build$src$core$registry(Type$$module$build$src$core$registry.THEME,d))!=null?e:void 0}d instanceof Theme$$module$build$src$core$theme&&
1738
1729
  (deepMerge$$module$build$src$core$utils$object(c,d),c.name=a)}deepMerge$$module$build$src$core$utils$object(c.blockStyles,b.blockStyles);deepMerge$$module$build$src$core$utils$object(c.categoryStyles,b.categoryStyles);deepMerge$$module$build$src$core$utils$object(c.componentStyles,b.componentStyles);deepMerge$$module$build$src$core$utils$object(c.fontStyle,b.fontStyle);b.startHats!==null&&(c.startHats=b.startHats);return c}},module$build$src$core$theme={};module$build$src$core$theme.Theme=Theme$$module$build$src$core$theme;var defaultBlockStyles$$module$build$src$core$theme$classic={colour_blocks:{colourPrimary:"20"},list_blocks:{colourPrimary:"260"},logic_blocks:{colourPrimary:"210"},loop_blocks:{colourPrimary:"120"},math_blocks:{colourPrimary:"230"},procedure_blocks:{colourPrimary:"290"},text_blocks:{colourPrimary:"160"},variable_blocks:{colourPrimary:"330"},variable_dynamic_blocks:{colourPrimary:"310"},hat_blocks:{colourPrimary:"330",hat:"cap"}},categoryStyles$$module$build$src$core$theme$classic={colour_category:{colour:"20"},
1739
1730
  list_category:{colour:"260"},logic_category:{colour:"210"},loop_category:{colour:"120"},math_category:{colour:"230"},procedure_category:{colour:"290"},text_category:{colour:"160"},variable_category:{colour:"330"},variable_dynamic_category:{colour:"310"}},Classic$$module$build$src$core$theme$classic=new Theme$$module$build$src$core$theme("classic",defaultBlockStyles$$module$build$src$core$theme$classic,categoryStyles$$module$build$src$core$theme$classic),module$build$src$core$theme$classic={Classic:Classic$$module$build$src$core$theme$classic};var Options$$module$build$src$core$options=class{constructor(a){this.gridPattern=null;this.getMetrics=this.setMetrics=void 0;var b=null,c=!1,d=!1,e=!1,f=!1,g=!1,h=!1,k=!!a.readOnly;if(!k){var l;b=convertToolboxDefToJson$$module$build$src$core$utils$toolbox((l=a.toolbox)!=null?l:null);c=hasCategories$$module$build$src$core$utils$toolbox(b);d=a.trashcan;d=d===void 0?c:d;e=a.collapse;e=e===void 0?c:e;f=a.comments;f=f===void 0?c:f;g=a.disable;g=g===void 0?c:g;h=a.sounds;h=h===void 0?!0:h}l=a.maxTrashcanContents;
1740
- d?l===void 0&&(l=32):l=0;var m=!!a.rtl,n=a.horizontalLayout;n===void 0&&(n=!1);var p=a.toolboxPosition!=="end";p=n?p?Position$$module$build$src$core$utils$toolbox.TOP:Position$$module$build$src$core$utils$toolbox.BOTTOM:p===m?Position$$module$build$src$core$utils$toolbox.RIGHT:Position$$module$build$src$core$utils$toolbox.LEFT;var r=a.css;r===void 0&&(r=!0);var q="https://static.blockly.com/media/";a.media&&(q=a.media.endsWith("/")?a.media:a.media+"/");var u=a.oneBasedIndex,y=a.renderer||"geras",
1741
- z=a.plugins||{},t=a.modalInputs;t===void 0&&(t=!0);this.RTL=m;this.oneBasedIndex=u===void 0?!0:u;this.collapse=e;this.comments=f;this.disable=g;this.readOnly=k;this.maxBlocks=a.maxBlocks||Infinity;var v;this.maxInstances=(v=a.maxInstances)!=null?v:null;this.modalInputs=t;this.pathToMedia=q;this.hasCategories=c;this.moveOptions=Options$$module$build$src$core$options.parseMoveOptions(a,c);this.hasScrollbars=!!this.moveOptions.scrollbars;this.hasTrashcan=d;this.maxTrashcanContents=l;this.hasSounds=h;
1742
- this.hasCss=r;this.horizontalLayout=n;this.languageTree=b;this.gridOptions=Options$$module$build$src$core$options.parseGridOptions(a);this.zoomOptions=Options$$module$build$src$core$options.parseZoomOptions(a);this.toolboxPosition=p;this.theme=Options$$module$build$src$core$options.parseThemeOptions(a);this.renderer=y;var w;this.rendererOverrides=(w=a.rendererOverrides)!=null?w:null;var x;this.parentWorkspace=(x=a.parentWorkspace)!=null?x:null;this.plugins=z}static parseMoveOptions(a,b){var c=a.move||
1731
+ d?l===void 0&&(l=32):l=0;var m=!!a.rtl,n=a.horizontalLayout;n===void 0&&(n=!1);var p=a.toolboxPosition!=="end";p=n?p?Position$$module$build$src$core$utils$toolbox.TOP:Position$$module$build$src$core$utils$toolbox.BOTTOM:p===m?Position$$module$build$src$core$utils$toolbox.RIGHT:Position$$module$build$src$core$utils$toolbox.LEFT;var q=a.css;q===void 0&&(q=!0);var r="https://static.blockly.com/media/";a.media&&(r=a.media.endsWith("/")?a.media:a.media+"/");var u=a.oneBasedIndex,y=a.renderer||"geras",
1732
+ z=a.plugins||{},t=a.modalInputs;t===void 0&&(t=!0);this.RTL=m;this.oneBasedIndex=u===void 0?!0:u;this.collapse=e;this.comments=f;this.disable=g;this.readOnly=k;this.maxBlocks=a.maxBlocks||Infinity;var v;this.maxInstances=(v=a.maxInstances)!=null?v:null;this.modalInputs=t;this.pathToMedia=r;this.hasCategories=c;this.moveOptions=Options$$module$build$src$core$options.parseMoveOptions(a,c);this.hasScrollbars=!!this.moveOptions.scrollbars;this.hasTrashcan=d;this.maxTrashcanContents=l;this.hasSounds=h;
1733
+ this.hasCss=q;this.horizontalLayout=n;this.languageTree=b;this.gridOptions=Options$$module$build$src$core$options.parseGridOptions(a);this.zoomOptions=Options$$module$build$src$core$options.parseZoomOptions(a);this.toolboxPosition=p;this.theme=Options$$module$build$src$core$options.parseThemeOptions(a);this.renderer=y;var w;this.rendererOverrides=(w=a.rendererOverrides)!=null?w:null;var x;this.parentWorkspace=(x=a.parentWorkspace)!=null?x:null;this.plugins=z}static parseMoveOptions(a,b){var c=a.move||
1743
1734
  {},d={};c.scrollbars===void 0&&a.scrollbars===void 0?d.scrollbars=b:typeof c.scrollbars==="object"?(d.scrollbars={horizontal:!!c.scrollbars.horizontal,vertical:!!c.scrollbars.vertical},d.scrollbars.horizontal&&d.scrollbars.vertical?d.scrollbars=!0:d.scrollbars.horizontal||d.scrollbars.vertical||(d.scrollbars=!1)):d.scrollbars=!!c.scrollbars||!!a.scrollbars;d.wheel=d.scrollbars&&c.wheel!==void 0?!!c.wheel:typeof d.scrollbars==="object";d.drag=d.scrollbars?c.drag===void 0?!0:!!c.drag:!1;return d}static parseZoomOptions(a){a=
1744
1735
  a.zoom||{};var b={};b.controls=a.controls===void 0?!1:!!a.controls;b.wheel=a.wheel===void 0?!1:!!a.wheel;b.startScale=a.startScale===void 0?1:Number(a.startScale);b.maxScale=a.maxScale===void 0?3:Number(a.maxScale);b.minScale=a.minScale===void 0?.3:Number(a.minScale);b.scaleSpeed=a.scaleSpeed===void 0?1.2:Number(a.scaleSpeed);b.pinch=a.pinch===void 0?b.wheel||b.controls:!!a.pinch;return b}static parseGridOptions(a){a=a.grid||{};var b={};b.spacing=Number(a.spacing)||0;b.colour=a.colour||"#888";b.length=
1745
1736
  a.length===void 0?1:Number(a.length);b.snap=b.spacing>0&&!!a.snap;return b}static parseThemeOptions(a){a=a.theme||Classic$$module$build$src$core$theme$classic;return typeof a==="string"?getObject$$module$build$src$core$registry(Type$$module$build$src$core$registry.THEME,a):a instanceof Theme$$module$build$src$core$theme?a:Theme$$module$build$src$core$theme.defineTheme(a.name||"builtin"+getNextUniqueId$$module$build$src$core$utils$idgenerator(),a)}},module$build$src$core$options={};
@@ -1835,7 +1826,7 @@ a*a)}bumpAwayFrom(a,b=!1){if(!this.sourceBlock_.workspace.isDragging()){var c=$.
1835
1826
  else if(e.isMovable())g=!1,c=-c,d=-d;else return;b=g?a:this;a=g?this:a;e=g?f:e;e.RTL&&(c=-c);e.moveBy(b.x+c-a.x,b.y+d-a.y,["bump"])}}}moveTo(a,b){var c=!1;this.trackedState===RenderedConnection$$module$build$src$core$rendered_connection.TrackedState.WILL_TRACK?(this.db.addConnection(this,b),this.trackedState=RenderedConnection$$module$build$src$core$rendered_connection.TrackedState.TRACKED,c=!0):this.trackedState===RenderedConnection$$module$build$src$core$rendered_connection.TrackedState.TRACKED&&
1836
1827
  (this.db.removeConnection(this,this.y),this.db.addConnection(this,b),c=!0);this.x=a;this.y=b;return c}moveBy(a,b){return this.moveTo(this.x+a,this.y+b)}moveToOffset(a){return this.moveTo(a.x+this.offsetInBlock.x,a.y+this.offsetInBlock.y)}setOffsetInBlock(a,b){this.offsetInBlock.x=a;this.offsetInBlock.y=b}getOffsetInBlock(){return this.offsetInBlock}tightenEfficiently(){var a=this.targetConnection,b=this.targetBlock();a&&b&&(a=Coordinate$$module$build$src$core$utils$coordinate.difference(this.offsetInBlock,
1837
1828
  a.offsetInBlock),b.translate(a.x,a.y))}closest(a,b){return this.dbOpposite.searchForClosest(this,a,b)}recomputeAriaContext(a){var b=this.type===ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE?$.Msg$$module$build$src$core$msg.INPUT_LABEL_VALUE:$.Msg$$module$build$src$core$msg.INPUT_LABEL_STATEMENT;setRole$$module$build$src$core$utils$aria(a,Role$$module$build$src$core$utils$aria.FIGURE);setState$$module$build$src$core$utils$aria(a,State$$module$build$src$core$utils$aria.ROLEDESCRIPTION,
1838
- b);var c,d,e;if(b=(e=this.getParentInput())!=null?e:(c=this.getSourceBlock().getTopStackBlock().previousConnection)==null?void 0:(d=c.targetConnection)==null?void 0:d.getParentInput()){var f;c=(f=b==null?void 0:b.getAriaLabelText())!=null?f:getInputLabelsSubset$$module$build$src$core$block_aria_composer(b.getSourceBlock(),b).join(", ");this.type===ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT?setState$$module$build$src$core$utils$aria(a,State$$module$build$src$core$utils$aria.LABEL,
1829
+ b);var c,d,e;if(b=(e=this.getParentInput())!=null?e:(c=this.getSourceBlock().getTopStackBlock().previousConnection)==null?void 0:(d=c.targetConnection)==null?void 0:d.getParentInput()){var f;c=(f=b==null?void 0:b.getAriaLabelText())!=null?f:getInputLabelsSubset$$module$build$src$core$block_aria_composer(b.getSourceBlock(),b,!1).join(", ");this.type===ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT?setState$$module$build$src$core$utils$aria(a,State$$module$build$src$core$utils$aria.LABEL,
1839
1830
  $.Msg$$module$build$src$core$msg.INPUT_LABEL_END_STATEMENT.replace("%1",c)):setState$$module$build$src$core$utils$aria(a,State$$module$build$src$core$utils$aria.LABEL,c)}else setState$$module$build$src$core$utils$aria(a,State$$module$build$src$core$utils$aria.LABEL,$.Msg$$module$build$src$core$msg.INPUT_LABEL_EMPTY)}highlight(){this.highlighted=!0;var a=this.findHighlightSvg();if(a){a.style.display="";let b;(b=a.parentElement)==null||b.appendChild(a);this.recomputeAriaContext(a)}}unhighlight(){this.highlighted=
1840
1831
  !1;var a=this.findHighlightSvg();a&&(a.style.display="none")}isHighlighted(){return this.highlighted}setTracking(a){a&&this.trackedState===RenderedConnection$$module$build$src$core$rendered_connection.TrackedState.TRACKED||!a&&this.trackedState===RenderedConnection$$module$build$src$core$rendered_connection.TrackedState.UNTRACKED||this.sourceBlock_.isInFlyout||(a?(this.db.addConnection(this,this.y),this.trackedState=RenderedConnection$$module$build$src$core$rendered_connection.TrackedState.TRACKED):
1841
1832
  (this.trackedState===RenderedConnection$$module$build$src$core$rendered_connection.TrackedState.TRACKED&&this.db.removeConnection(this,this.y),this.trackedState=RenderedConnection$$module$build$src$core$rendered_connection.TrackedState.UNTRACKED))}stopTrackingAll(){this.setTracking(!1);if(this.targetConnection){let a=this.targetBlock().getDescendants(!1);for(let b=0;b<a.length;b++){let c=a[b],d=c.getConnections_(!0);for(let e=0;e<d.length;e++)d[e].setTracking(!1);for(let e of c.getIcons())hasBubble$$module$build$src$core$interfaces$i_has_bubble(e)&&
@@ -1850,9 +1841,9 @@ module$build$src$core$rendered_connection.RenderedConnection=RenderedConnection$
1850
1841
  a+" out of bounds.");if(!(b||b===""&&c))return a;typeof b==="string"&&(b=$.fromJson$$module$build$src$core$field_registry({type:"field_label",text:b}));b.setSourceBlock(this.sourceBlock);this.sourceBlock.initialized&&this.initField(b);b.name=c;b.setVisible(this.isVisible());b.prefixField&&(a=this.insertFieldAt(a,b.prefixField));this.fieldRow.splice(a,0,b);a++;b.suffixField&&(a=this.insertFieldAt(a,b.suffixField));this.sourceBlock.rendered&&this.sourceBlock.queueRender();return a}removeField(a,b){for(let c=
1851
1842
  0,d;d=this.fieldRow[c];c++)if(d.name===a)return d.dispose(),this.fieldRow.splice(c,1),this.sourceBlock.rendered&&this.sourceBlock.queueRender(),!0;if(b)return!1;throw Error('Field "'+a+'" not found.');}isVisible(){return this.visible}setVisible(a){var b=[];if(this.visible===a)return b;this.visible=a;for(let c=0,d;d=this.fieldRow[c];c++)d.setVisible(a);if(this.connection&&this.connection instanceof RenderedConnection$$module$build$src$core$rendered_connection){a?b=this.connection.startTrackingAll():
1852
1843
  this.connection.stopTrackingAll();let c=this.connection.targetBlock();c&&(c.getSvgRoot().style.display=a?"block":"none")}return b}markDirty(){for(let a=0,b;b=this.fieldRow[a];a++)b.markDirty()}setCheck(a){if(!this.connection)throw Error("This input does not have a connection.");this.connection.setCheck(a);return this}setAlign(a){this.align=a;this.sourceBlock.rendered&&this.sourceBlock.queueRender();return this}setShadowDom(a){if(!this.connection)throw Error("This input does not have a connection.");
1853
- this.connection.setShadowDom(a);return this}getShadowDom(){if(!this.connection)throw Error("This input does not have a connection.");return this.connection.getShadowDom()}init(){for(let a of this.fieldRow)a.init()}setAriaLabelProvider(a){this.ariaLabelProvider=a}getAriaLabelText(){return this.ariaLabelProvider?typeof this.ariaLabelProvider==="string"?replaceMessageReferences$$module$build$src$core$utils$parsing(this.ariaLabelProvider):this.ariaLabelProvider(this):null}initModel(){for(let a of this.fieldRow)a.initModel()}initField(a){this.sourceBlock.rendered?
1844
+ this.connection.setShadowDom(a);return this}getShadowDom(){if(!this.connection)throw Error("This input does not have a connection.");return this.connection.getShadowDom()}init(){for(let a of this.fieldRow)a.init()}setAriaLabelProvider(a){this.ariaLabelProvider=a;return this}getAriaLabelText(){return this.ariaLabelProvider?typeof this.ariaLabelProvider==="string"?replaceMessageReferences$$module$build$src$core$utils$parsing(this.ariaLabelProvider):this.ariaLabelProvider(this):null}initModel(){for(let a of this.fieldRow)a.initModel()}initField(a){this.sourceBlock.rendered?
1854
1845
  a.init():a.initModel()}dispose(){for(let a=0,b;b=this.fieldRow[a];a++)b.dispose();this.connection&&this.connection.dispose()}makeConnection(a){return this.sourceBlock.makeConnection_(a)}getRowId(){var a=this.getSourceBlock().inputList;if(this===a[0])return this.getSourceBlock().getRowId();var b=a.indexOf(this),c,d=((c=a[b-1].connection)==null?void 0:c.type)===ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT,e;return((e=this.connection)==null?void 0:e.type)===ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT||
1855
- d?`${this.getSourceBlock().id}-input${b}`:a[b-1].getRowId()}getLabel(a=Verbosity$$module$build$src$core$utils$aria.STANDARD){if(!this.isVisible())return"";var b=computeFieldRowLabel$$module$build$src$core$block_aria_composer(this,!1,a),c;((c=this.connection)==null?void 0:c.type)===ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE&&(c=this.connection.targetBlock())&&!c.isInsertionMarker()&&b.push(getInputLabels$$module$build$src$core$block_aria_composer(c,a).join(" "));return b.join(", ")}getIndex(){var a=
1846
+ d?`${this.getSourceBlock().id}-input${b}`:a[b-1].getRowId()}getLabel(a=Verbosity$$module$build$src$core$utils$aria.STANDARD,b=!0){if(!this.isVisible())return"";var c=computeFieldRowLabel$$module$build$src$core$block_aria_composer(this,!1,a),d;((d=this.connection)==null?void 0:d.type)===ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE&&(d=this.connection.targetBlock())&&!d.isInsertionMarker()&&c.push(getInputLabels$$module$build$src$core$block_aria_composer(d,a,b).join(", "));return c.join(", ")}getIndex(){var a=
1856
1847
  [$.inputTypes$$module$build$src$core$inputs$input_types.DUMMY,$.inputTypes$$module$build$src$core$inputs$input_types.END_ROW];return this.getSourceBlock().inputList.filter(b=>!a.includes(b.type)).indexOf(this)}},module$build$src$core$inputs$input={};module$build$src$core$inputs$input.Input=Input$$module$build$src$core$inputs$input;var DummyInput$$module$build$src$core$inputs$dummy_input=class extends Input$$module$build$src$core$inputs$input{constructor(a,b){super(a,b);this.name=a;this.type=$.inputTypes$$module$build$src$core$inputs$input_types.DUMMY}},module$build$src$core$inputs$dummy_input={};module$build$src$core$inputs$dummy_input.DummyInput=DummyInput$$module$build$src$core$inputs$dummy_input;var EndRowInput$$module$build$src$core$inputs$end_row_input=class extends Input$$module$build$src$core$inputs$input{constructor(a,b){super(a,b);this.name=a;this.type=$.inputTypes$$module$build$src$core$inputs$input_types.END_ROW}},module$build$src$core$inputs$end_row_input={};module$build$src$core$inputs$end_row_input.EndRowInput=EndRowInput$$module$build$src$core$inputs$end_row_input;var StatementInput$$module$build$src$core$inputs$statement_input=class extends Input$$module$build$src$core$inputs$input{constructor(a,b){if(!a)throw Error("Statement inputs must have a non-empty name");super(a,b);this.name=a;this.type=$.inputTypes$$module$build$src$core$inputs$input_types.STATEMENT;this.connection=this.makeConnection(ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT)}},module$build$src$core$inputs$statement_input={};
1857
1848
  module$build$src$core$inputs$statement_input.StatementInput=StatementInput$$module$build$src$core$inputs$statement_input;var module$build$src$core$inputs$value_input;$.ValueInput$$module$build$src$core$inputs$value_input=class extends Input$$module$build$src$core$inputs$input{constructor(a,b){if(!a)throw Error("Value inputs must have a non-empty name");super(a,b);this.name=a;this.type=$.inputTypes$$module$build$src$core$inputs$input_types.VALUE;this.connection=this.makeConnection(ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE)}};module$build$src$core$inputs$value_input={};
1858
1849
  module$build$src$core$inputs$value_input.ValueInput=$.ValueInput$$module$build$src$core$inputs$value_input;var module$build$src$core$interfaces$i_icon={};module$build$src$core$interfaces$i_icon.isIcon=isIcon$$module$build$src$core$interfaces$i_icon;var module$build$src$core$interfaces$i_comment_icon={};module$build$src$core$interfaces$i_comment_icon.isCommentIcon=isCommentIcon$$module$build$src$core$interfaces$i_comment_icon;var Block$$module$build$src$core$block=class{constructor(a,b,c){this.data=null;this.disposed=!1;this.hue=null;this.colour_="#000000";this.styleName_="";this.suppressPrefixSuffix=!1;this.previousConnection=this.nextConnection=this.outputConnection=null;this.inputList=[];this.icons=[];this.disabledReasons=new Set;this.tooltip="";this.contextMenu=!0;this.parentBlock_=null;this.childBlocks_=[];this.editable=this.movable=this.deletable=!0;this.collapsed_=this.shadow=!1;this.outputShape_=null;this.rendered=
@@ -1871,15 +1862,14 @@ if(!c&&a)throw Error("Block not connected to new parent.");if(c&&!a)throw Error(
1871
1862
  a}isInsertionMarker(){return this.isInsertionMarker_}setInsertionMarker(a){this.isInsertionMarker_=a}isEditable(){return this.editable&&!this.isDeadOrDying()&&!this.workspace.isReadOnly()}isOwnEditable(){return this.editable}setEditable(a){this.editable=a;for(let b of this.getFields())b.updateEditable()}isDisposed(){return this.disposed}getFullBlockField(){if(!this.isSimpleReporter())return null;var a,b=(a=this.inputList[0])==null?void 0:a.fieldRow[0];return(b==null?0:b.isFullBlockField())?b:null}isSimpleReporter(){if(!this.outputConnection)return!1;
1872
1863
  for(let a of this.inputList)if(a.connection||a.fieldRow.length>1)return!1;return!0}getMatchingConnection(a,b){var c=this.getConnections_(!0);a=a.getConnections_(!0);if(c.length!==a.length)throw Error("Connection lists did not match in length.");for(let d=0;d<a.length;d++)if(a[d]===b)return c[d];return null}setHelpUrl(a){this.helpUrl=a}setTooltip(a){this.tooltip=a}getTooltip(){return getTooltipOfObject$$module$build$src$core$tooltip(this)}getColour(){return this.colour_}getStyleName(){return this.styleName_}getHue(){return this.hue}setColour(a){a=
1873
1864
  parseBlockColour$$module$build$src$core$utils$parsing(a);this.hue=a.hue;this.colour_=a.hex}setStyle(a){this.styleName_=a}setOnChange(a){if(a&&typeof a!=="function")throw Error("onchange must be a function.");this.onchangeWrapper&&this.workspace.removeChangeListener(this.onchangeWrapper);this.onchange=a;this.onchangeWrapper=a.bind(this);this.workspace.addChangeListener(this.onchangeWrapper)}getField(a){if(typeof a!=="string")throw TypeError("Block.prototype.getField expects a string with the field name but received "+
1874
- (a===void 0?"nothing":a+" of type "+typeof a)+" instead");for(let b of this.getFields())if(b.name===a)return b;return null}*getFields(){for(let a of this.inputList)for(let b of a.fieldRow)yield b}getVars(){$.warn$$module$build$src$core$utils$deprecation("Blockly.Block.getVars()","v13","v14","Blockly.Block.getVarModels().map(model => model.getId())");var a=[];for(let b of this.getFields())b.referencesVariables()&&a.push(b.getValue());return a}getVarModels(){var a=[];for(let b of this.getFields())if(b.referencesVariables()){let c=
1875
- this.workspace.getVariableMap().getVariableById(b.getValue());c&&a.push(c)}return a}updateVarName(a){for(let b of this.getFields())b.referencesVariables()&&a.getId()===b.getValue()&&b.refreshVariableName()}renameVarById(a,b){for(let c of this.getFields())c.referencesVariables()&&a===c.getValue()&&c.setValue(b)}getFieldValue(a){return(a=this.getField(a))?a.getValue():null}setFieldValue(a,b){var c=this.getField(b);if(!c)throw Error('Field "'+b+'" not found.');c.setValue(a)}setPreviousStatement(a,b){if(a)b===
1876
- void 0&&(b=null),this.previousConnection||(this.previousConnection=this.makeConnection_(ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT)),this.previousConnection.setCheck(b);else if(this.previousConnection){if(this.previousConnection.isConnected())throw Error("Must disconnect previous statement before removing connection.");this.previousConnection.dispose();this.previousConnection=null}}setNextStatement(a,b){if(a)b===void 0&&(b=null),this.nextConnection||(this.nextConnection=
1877
- this.makeConnection_(ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT)),this.nextConnection.setCheck(b);else if(this.nextConnection){if(this.nextConnection.isConnected())throw Error("Must disconnect next statement before removing connection.");this.nextConnection.dispose();this.nextConnection=null}}setOutput(a,b){if(a)b===void 0&&(b=null),this.outputConnection||(this.outputConnection=this.makeConnection_(ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE)),this.outputConnection.setCheck(b);
1878
- else if(this.outputConnection){if(this.outputConnection.isConnected())throw Error("Must disconnect output value before removing connection.");this.outputConnection.dispose();this.outputConnection=null}}setInputsInline(a){this.inputsInline!==a&&(fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_CHANGE))(this,"inline",null,this.inputsInline,a)),this.inputsInline=a)}getInputsInline(){if(this.inputsInline!==void 0)return this.inputsInline;
1879
- for(var a=1;a<this.inputList.length;a++)if(this.inputList[a-1]instanceof DummyInput$$module$build$src$core$inputs$dummy_input&&this.inputList[a]instanceof DummyInput$$module$build$src$core$inputs$dummy_input)return!1;for(a=1;a<this.inputList.length;a++)if(this.inputList[a-1]instanceof $.ValueInput$$module$build$src$core$inputs$value_input&&this.inputList[a]instanceof DummyInput$$module$build$src$core$inputs$dummy_input)return!0;for(a=0;a<this.inputList.length;a++)if(this.inputList[a]instanceof EndRowInput$$module$build$src$core$inputs$end_row_input)return!0;
1880
- return!1}setOutputShape(a){this.outputShape_=a}getOutputShape(){return this.outputShape_}isEnabled(){return this.disabledReasons.size===0}setDisabledReason(a,b){a||this.workspace.options.disable||!this.hasDisabledReason(MANUALLY_DISABLED$$module$build$src$core$constants)||b==MANUALLY_DISABLED$$module$build$src$core$constants||this.setDisabledReason(!1,MANUALLY_DISABLED$$module$build$src$core$constants);this.disabledReasons.has(b)!==a&&(a?this.disabledReasons.add(b):this.disabledReasons.delete(b),
1881
- a=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_CHANGE))(this,"disabled",null,!a,a),a.setDisabledReason(b),fire$$module$build$src$core$events$utils(a))}getInheritedDisabled(){for(var a=this.getSurroundParent();a;){if(!a.isEnabled())return!0;a=a.getSurroundParent()}return!1}hasDisabledReason(a){return this.disabledReasons.has(a)}getDisabledReasons(){return this.disabledReasons}isCollapsed(){return this.collapsed_}setCollapsed(a){this.collapsed_!==a&&
1882
- (fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_CHANGE))(this,"collapsed",null,this.collapsed_,a)),this.collapsed_=a)}setAriaRoleDescriptionProvider(a){this.ariaRoleDescriptionProvider=a}getAriaRoleDescription(){if(this.ariaRoleDescriptionProvider)return typeof this.ariaRoleDescriptionProvider==="function"?this.ariaRoleDescriptionProvider():replaceMessageReferences$$module$build$src$core$utils$parsing(this.ariaRoleDescriptionProvider)}toString(a,
1865
+ (a===void 0?"nothing":a+" of type "+typeof a)+" instead");for(let b of this.getFields())if(b.name===a)return b;return null}*getFields(){for(let a of this.inputList)for(let b of a.fieldRow)yield b}getVarModels(){var a=[];for(let b of this.getFields())if(b.referencesVariables()){let c=this.workspace.getVariableMap().getVariableById(b.getValue());c&&a.push(c)}return a}updateVarName(a){for(let b of this.getFields())b.referencesVariables()&&a.getId()===b.getValue()&&b.refreshVariableName()}renameVarById(a,
1866
+ b){for(let c of this.getFields())c.referencesVariables()&&a===c.getValue()&&c.setValue(b)}getFieldValue(a){return(a=this.getField(a))?a.getValue():null}setFieldValue(a,b){var c=this.getField(b);if(!c)throw Error('Field "'+b+'" not found.');c.setValue(a)}setPreviousStatement(a,b){if(a)b===void 0&&(b=null),this.previousConnection||(this.previousConnection=this.makeConnection_(ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT)),this.previousConnection.setCheck(b);else if(this.previousConnection){if(this.previousConnection.isConnected())throw Error("Must disconnect previous statement before removing connection.");
1867
+ this.previousConnection.dispose();this.previousConnection=null}}setNextStatement(a,b){if(a)b===void 0&&(b=null),this.nextConnection||(this.nextConnection=this.makeConnection_(ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT)),this.nextConnection.setCheck(b);else if(this.nextConnection){if(this.nextConnection.isConnected())throw Error("Must disconnect next statement before removing connection.");this.nextConnection.dispose();this.nextConnection=null}}setOutput(a,b){if(a)b===void 0&&
1868
+ (b=null),this.outputConnection||(this.outputConnection=this.makeConnection_(ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE)),this.outputConnection.setCheck(b);else if(this.outputConnection){if(this.outputConnection.isConnected())throw Error("Must disconnect output value before removing connection.");this.outputConnection.dispose();this.outputConnection=null}}setInputsInline(a){this.inputsInline!==a&&(fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_CHANGE))(this,
1869
+ "inline",null,this.inputsInline,a)),this.inputsInline=a)}getInputsInline(){if(this.inputsInline!==void 0)return this.inputsInline;for(var a=1;a<this.inputList.length;a++)if(this.inputList[a-1]instanceof DummyInput$$module$build$src$core$inputs$dummy_input&&this.inputList[a]instanceof DummyInput$$module$build$src$core$inputs$dummy_input)return!1;for(a=1;a<this.inputList.length;a++)if(this.inputList[a-1]instanceof $.ValueInput$$module$build$src$core$inputs$value_input&&this.inputList[a]instanceof DummyInput$$module$build$src$core$inputs$dummy_input)return!0;
1870
+ for(a=0;a<this.inputList.length;a++)if(this.inputList[a]instanceof EndRowInput$$module$build$src$core$inputs$end_row_input)return!0;return!1}setOutputShape(a){this.outputShape_=a}getOutputShape(){return this.outputShape_}isEnabled(){return this.disabledReasons.size===0}setDisabledReason(a,b){a||this.workspace.options.disable||!this.hasDisabledReason(MANUALLY_DISABLED$$module$build$src$core$constants)||b==MANUALLY_DISABLED$$module$build$src$core$constants||this.setDisabledReason(!1,MANUALLY_DISABLED$$module$build$src$core$constants);
1871
+ this.disabledReasons.has(b)!==a&&(a?this.disabledReasons.add(b):this.disabledReasons.delete(b),a=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_CHANGE))(this,"disabled",null,!a,a),a.setDisabledReason(b),fire$$module$build$src$core$events$utils(a))}getInheritedDisabled(){for(var a=this.getSurroundParent();a;){if(!a.isEnabled())return!0;a=a.getSurroundParent()}return!1}hasDisabledReason(a){return this.disabledReasons.has(a)}getDisabledReasons(){return this.disabledReasons}isCollapsed(){return this.collapsed_}setCollapsed(a){this.collapsed_!==
1872
+ a&&(fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_CHANGE))(this,"collapsed",null,this.collapsed_,a)),this.collapsed_=a)}setAriaRoleDescriptionProvider(a){this.ariaRoleDescriptionProvider=a}getAriaRoleDescription(){if(this.ariaRoleDescriptionProvider)return typeof this.ariaRoleDescriptionProvider==="function"?this.ariaRoleDescriptionProvider():replaceMessageReferences$$module$build$src$core$utils$parsing(this.ariaRoleDescriptionProvider)}toString(a,
1883
1873
  b){b=this.toTokens(b);for(let d=2;d<b.length;d++)b[d-2]==="("&&b[d]===")"&&(b[d-2]=b[d-1],b.splice(d-1,2));var c="";b=b.reduce((d,e)=>{d=d+(c==="("||e===")"?"":" ")+e;c=e[e.length-1];return d},"");b=b.trim()||"???";a&&b.length>a&&(b=b.substring(0,a-3)+"...");return b}toTokens(a="?"){var b=[];for(let d of this.inputList)if(d.name!=COLLAPSED_INPUT_NAME$$module$build$src$core$constants){for(let e of d.fieldRow)b.push(e.getText());if(d.connection){let e=d.connection.targetBlock();if(e){var c=d.connection;
1884
1874
  let f=c.getCheck();!f&&c.targetConnection&&(f=c.targetConnection.getCheck());(c=!!f&&(f.includes("Boolean")||f.includes("Number")))&&b.push("(");b.push(...e.toTokens(a));c&&b.push(")")}else b.push(a)}}return b}appendValueInput(a){return this.appendInput(new $.ValueInput$$module$build$src$core$inputs$value_input(a,this))}appendStatementInput(a){this.statementInputCount++;return this.appendInput(new StatementInput$$module$build$src$core$inputs$statement_input(a,this))}appendDummyInput(a=""){return this.appendInput(new DummyInput$$module$build$src$core$inputs$dummy_input(a,
1885
1875
  this))}appendEndRowInput(a=""){return this.appendInput(new EndRowInput$$module$build$src$core$inputs$end_row_input(a,this))}appendInput(a){this.inputList.push(a);return a}appendInputFromRegistry(a,b){return(a=getClass$$module$build$src$core$registry(Type$$module$build$src$core$registry.INPUT,a,!1))?this.appendInput(new a(b,this)):null}jsonInit(a){var b=a.type?'Block "'+a.type+'": ':"";if(a.output&&a.previousStatement)throw Error(b+"Must not have both an output and a previousStatement.");for(var c=
@@ -1932,39 +1922,43 @@ module$build$src$core$shortcut_items.registerUndo=registerUndo$$module$build$src
1932
1922
  "cutHint",screenreaderHintId$$module$build$src$core$hints="screenreaderHint",module$build$src$core$hints={};module$build$src$core$hints.clearMoveHints=clearMoveHints$$module$build$src$core$hints;module$build$src$core$hints.clearPasteHints=clearPasteHints$$module$build$src$core$hints;module$build$src$core$hints.showBlockNavigationHint=showBlockNavigationHint$$module$build$src$core$hints;module$build$src$core$hints.showConstrainedMovementHint=showConstrainedMovementHint$$module$build$src$core$hints;
1933
1923
  module$build$src$core$hints.showCopiedHint=showCopiedHint$$module$build$src$core$hints;module$build$src$core$hints.showCutHint=showCutHint$$module$build$src$core$hints;module$build$src$core$hints.showFlyoutLabelActionHint=showFlyoutLabelActionHint$$module$build$src$core$hints;module$build$src$core$hints.showHelpHint=showHelpHint$$module$build$src$core$hints;module$build$src$core$hints.showScreenreaderModeHint=showScreenreaderModeHint$$module$build$src$core$hints;
1934
1924
  module$build$src$core$hints.showUnconstrainedMoveHint=showUnconstrainedMoveHint$$module$build$src$core$hints;module$build$src$core$hints.showWorkspaceNavigationHint=showWorkspaceNavigationHint$$module$build$src$core$hints;var MoveMode$$module$build$src$core$dragging$block_drag_strategy;(function(a){a[a.CONSTRAINED=1]="CONSTRAINED";a[a.UNCONSTRAINED=2]="UNCONSTRAINED"})(MoveMode$$module$build$src$core$dragging$block_drag_strategy||(MoveMode$$module$build$src$core$dragging$block_drag_strategy={}));
1935
- var BlockDragStrategy$$module$build$src$core$dragging$block_drag_strategy=class{constructor(a){this.block=a;this.connectionPreviewer=this.connectionCandidate=this.startLoc=this.startChildConn=this.startParentConn=null;this.dragging=!1;this.allConnectionPairs=[];this.moveMode=MoveMode$$module$build$src$core$dragging$block_drag_strategy.UNCONSTRAINED;this.originalEventGroup="";this.BLOCK_CONNECTION_OFFSET=10;this.workspace=a.workspace}isMovable(){var a;return this.block.isOwnMovable()&&!this.block.isDeadOrDying()&&
1936
- !this.workspace.isReadOnly()&&(!this.block.isInFlyout||this.block.isEnabled()&&!((a=this.block.workspace.targetWorkspace)==null?0:a.isReadOnly()))}positionNewBlock(a,b){a=wsToScreenCoordinates$$module$build$src$core$utils$svg_math(a.workspace,a.getRelativeToSurfaceXY());a=screenToWsCoordinates$$module$build$src$core$utils$svg_math(b.workspace,a);b.moveDuringDrag(a)}getTargetBlock(){if(this.block.isShadow()){var a=this.block.getParent();if(a)return a}else if(this.block.isInFlyout&&this.block.workspace.targetWorkspace&&
1937
- (a=this.block.getRootBlock(),a=save$$module$build$src$core$serialization$blocks(a)))return a=appendInternal$$module$build$src$core$serialization$blocks(a,this.block.workspace.targetWorkspace,{recordUndo:!0}),$.setRecordUndo$$module$build$src$core$events$utils(!1),this.positionNewBlock(this.block,a),$.setRecordUndo$$module$build$src$core$events$utils(!0),a;return this.block}announceMove(a=!1){if(this.connectionCandidate)a=computeMoveLabel$$module$build$src$core$block_aria_composer(this.connectionCandidate.local,
1925
+ var BlockDragStrategy$$module$build$src$core$dragging$block_drag_strategy=class{constructor(a){this.block=a;this.connectionPreviewer=this.connectionCandidate=this.startLoc=this.startChildConn=this.startParentConn=null;this.dragging=!1;this.allConnectionPairs=[];this.moveMode=MoveMode$$module$build$src$core$dragging$block_drag_strategy.UNCONSTRAINED;this.originalEventGroup="";this.lastBlockDisabledReasons=new Map;this.WORKSPACE_MARGIN=this.BLOCK_CONNECTION_OFFSET=10;this.workspace=a.workspace}isMovable(){var a;
1926
+ return this.block.isOwnMovable()&&!this.block.isDeadOrDying()&&!this.workspace.isReadOnly()&&(!this.block.isInFlyout||this.block.isEnabled()&&!((a=this.block.workspace.targetWorkspace)==null?0:a.isReadOnly()))}positionNewBlock(a,b){a=wsToScreenCoordinates$$module$build$src$core$utils$svg_math(a.workspace,a.getRelativeToSurfaceXY());a=screenToWsCoordinates$$module$build$src$core$utils$svg_math(b.workspace,a);b.moveDuringDrag(a);if(this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED){var c=
1927
+ b.workspace,d=this.WORKSPACE_MARGIN;a=this.WORKSPACE_MARGIN;var e=Math.max($.config$$module$build$src$core$config.connectingSnapRadius,$.config$$module$build$src$core$config.snapRadius)+2,f=c.getTopBlocks(!0).filter(p=>p.id!==b.id).map(p=>{p=p.getBoundingRectangle();return new Rect$$module$build$src$core$utils$rect(p.top-e,p.bottom+e,p.left-e,p.right+e)}),g,h=(g=c.getToolbox())==null?void 0:g.getWidth();g=c.getParentSvg().clientWidth-(h!=null?h:0);c.getParentSvg();({width:h}=b.getHeightWidth());var k=
1928
+ function(p){for(let q of f)if(p.intersects(q))return q;return null},l=a;c=c.getRenderer().getConstants().MIN_BLOCK_HEIGHT;var m=b.getBoundingRectangle();b.moveBy(l-m.left,d-m.top,["cleanup"]);m=b.getBoundingRectangle();for(var n=k(m);n!=null;)l=n.left+n.getWidth()+80,n=n.top+n.getHeight()+c,l+h<=g||(d=n,l=a),b.moveBy(l-m.left,d-m.top,["cleanup"]),m=b.getBoundingRectangle(),n=k(m)}}getTargetBlock(){if(this.block.isShadow()){var a=this.block.getParent();if(a)return a}else if(this.block.isInFlyout&&
1929
+ this.block.workspace.targetWorkspace&&(a=this.block.getRootBlock(),a=save$$module$build$src$core$serialization$blocks(a)))return a=appendInternal$$module$build$src$core$serialization$blocks(a,this.block.workspace.targetWorkspace,{recordUndo:!0}),$.setRecordUndo$$module$build$src$core$events$utils(!1),this.positionNewBlock(this.block,a),$.setRecordUndo$$module$build$src$core$events$utils(!0),a;return this.block}announceMove(a=!1){if(this.connectionCandidate)a=computeMoveLabel$$module$build$src$core$block_aria_composer(this.connectionCandidate.local,
1938
1930
  this.connectionCandidate.neighbour,this.hasMultipleCompatibleConnections.bind(this),a);else{let b=a?this.block.getStackBlocksCountLabel():"";a=$.Msg$$module$build$src$core$msg.ANNOUNCE_MOVE_WORKSPACE;a=a.replace("%1",b)}announceDynamicAriaState$$module$build$src$core$utils$aria(a.replace(/\s+/g," "))}hasMultipleCompatibleConnections(a=!0){var b=this.connectionCandidate;if(!b)return!1;var c=a?"local":"neighbour",d=a?"neighbour":"local";return this.allConnectionPairs.filter(e=>e[d]===b[d]&&e[c]!==b[c].getSourceBlock().nextConnection&&
1939
- e[c].getSourceBlock().id===b[c].getSourceBlock().id).length>1}startDrag(a){var b=this.getTargetBlock();if(b!==this.block)return b.startDrag(a);this.block.workspace.recordDragTargets();this.dragging=!0;this.fireDragStartEvent();this.startLoc=this.block.getRelativeToSurfaceXY();this.connectionCandidate=null;this.connectionPreviewer=new (getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.CONNECTION_PREVIEWER,this.workspace.options))(this.block);startTextWidthCache$$module$build$src$core$utils$dom();
1940
- this.workspace.setResizesEnabled(!1);disconnectUiStop$$module$build$src$core$block_animations();b=this.shouldHealStack(a);this.storeInitialConnections(b);this.shouldDisconnect(b)&&this.disconnectBlock(b);this.block.setDragging(!0);if(a instanceof KeyboardEvent){this.cacheAllConnectionPairs();if(a=this.updateConnectionPreview(this.block,new Coordinate$$module$build$src$core$utils$coordinate(0,0)))a=a.type===ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT?new Coordinate$$module$build$src$core$utils$coordinate(a.x,
1941
- a.y-this.block.getHeightWidth().height-this.BLOCK_CONNECTION_OFFSET):new Coordinate$$module$build$src$core$utils$coordinate(a.x+this.BLOCK_CONNECTION_OFFSET,a.y+this.BLOCK_CONNECTION_OFFSET),this.block.moveDuringDrag(a);this.allConnectionPairs.length?showConstrainedMovementHint$$module$build$src$core$hints(this.workspace):showUnconstrainedMoveHint$$module$build$src$core$hints(this.workspace)}else this.block.moveDuringDrag(this.startLoc);var c;(c=this.workspace.getLayerManager())==null||c.moveToDragLayer(this.block);
1942
- this.getVisibleBubbles(this.block).forEach(d=>{var e;(e=this.workspace.getLayerManager())==null||e.moveToDragLayer(d,!1)});this.announceMove(!0);return this.block}cacheAllConnectionPairs(){var a=this.block.workspace.connectionChecker,b=[];this.allConnectionPairs=[];var c=this.getLocalConnections(this.block);for(let d of this.block.workspace.getTopBlocks(!0))b.push(...this.getAllConnections(d));for(let d of b)for(let e of c){let f;!a.canConnect(e,d,!0,Infinity)||((f=d.targetBlock())==null?0:f.isInsertionMarker())||
1943
- this.allConnectionPairs.push({local:e,neighbour:d})}}getVisibleBubbles(a){return a.getDescendants(!1).flatMap(b=>b.getIcons()).filter(b=>hasBubble$$module$build$src$core$interfaces$i_has_bubble(b)&&b.bubbleIsVisible()).map(b=>b.getBubble()).filter(b=>!!b).sort((b,c)=>{b=b.getSvgRoot().compareDocumentPosition(c.getSvgRoot());return b&Node.DOCUMENT_POSITION_PRECEDING?1:b&Node.DOCUMENT_POSITION_FOLLOWING?-1:0})}shouldHealStack(a){return a instanceof PointerEvent?a.ctrlKey||a.metaKey:a instanceof KeyboardEvent?
1944
- !(a.shiftKey||!this.block.previousConnection):!1}shouldDisconnect(a){return!!(this.block.getParent()||a&&this.block.nextConnection&&this.block.nextConnection.targetBlock())}disconnectBlock(a){this.block.unplug(a);disconnectUiEffect$$module$build$src$core$block_animations(this.block)}storeInitialConnections(a){var b=null,c=null,d;if((d=this.block.outputConnection)==null?0:d.isConnected())b=this.block.outputConnection,c=this.block.outputConnection.targetConnection;else{let e;if((e=this.block.previousConnection)==
1945
- null?0:e.isConnected())b=this.block.previousConnection,c=this.block.previousConnection.targetConnection}this.startParentConn=c;b&&c?this.connectionCandidate={local:b,neighbour:c,distance:0}:a&&(a=this.block.nextConnection,b=a==null?void 0:a.targetConnection,a&&b&&(this.connectionCandidate={local:a,neighbour:b,distance:0}),this.startChildConn=b!=null?b:null)}fireDragStartEvent(){var a=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_DRAG))(this.block,
1931
+ e[c].getSourceBlock().id===b[c].getSourceBlock().id).length>1}startDrag(a){this.updateMoveMode(a);var b=this.getTargetBlock();if(b!==this.block)return b.startDrag(a);this.block.workspace.recordDragTargets();this.dragging=!0;this.fireDragStartEvent();this.startLoc=this.block.getRelativeToSurfaceXY();this.connectionCandidate=null;this.connectionPreviewer=new (getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.CONNECTION_PREVIEWER,this.workspace.options))(this.block);
1932
+ startTextWidthCache$$module$build$src$core$utils$dom();this.workspace.setResizesEnabled(!1);disconnectUiStop$$module$build$src$core$block_animations();b=this.shouldHealStack(a);this.storeInitialConnections(b);this.shouldDisconnect(b)&&this.disconnectBlock(b);this.block.setDragging(!0);this.enableAllDraggedBlocks(this.block);if(a instanceof KeyboardEvent){this.cacheAllConnectionPairs();if(a=this.updateConnectionPreview(this.block,new Coordinate$$module$build$src$core$utils$coordinate(0,0)))a=a.type===
1933
+ ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT?new Coordinate$$module$build$src$core$utils$coordinate(a.x,a.y-this.block.getHeightWidth().height-this.BLOCK_CONNECTION_OFFSET):new Coordinate$$module$build$src$core$utils$coordinate(a.x+this.BLOCK_CONNECTION_OFFSET,a.y+this.BLOCK_CONNECTION_OFFSET),this.block.moveDuringDrag(a);this.allConnectionPairs.length?showConstrainedMovementHint$$module$build$src$core$hints(this.workspace):showUnconstrainedMoveHint$$module$build$src$core$hints(this.workspace)}else this.block.moveDuringDrag(this.startLoc);
1934
+ var c;(c=this.workspace.getLayerManager())==null||c.moveToDragLayer(this.block);this.getVisibleBubbles(this.block).forEach(d=>{var e;(e=this.workspace.getLayerManager())==null||e.moveToDragLayer(d,!1)});this.announceMove(!0);return this.block}cacheAllConnectionPairs(){var a=this.block.workspace.connectionChecker,b=[];this.allConnectionPairs=[];var c=this.getLocalConnections(this.block);for(let d of this.block.workspace.getTopBlocks(!0))b.push(...this.getAllConnections(d));for(let d of b)for(let e of c){let f;
1935
+ !a.canConnect(e,d,!0,Infinity)||((f=d.targetBlock())==null?0:f.isInsertionMarker())||this.allConnectionPairs.push({local:e,neighbour:d})}}getVisibleBubbles(a){return a.getDescendants(!1).flatMap(b=>b.getIcons()).filter(b=>hasBubble$$module$build$src$core$interfaces$i_has_bubble(b)&&b.bubbleIsVisible()).map(b=>b.getBubble()).filter(b=>!!b).sort((b,c)=>{b=b.getSvgRoot().compareDocumentPosition(c.getSvgRoot());return b&Node.DOCUMENT_POSITION_PRECEDING?1:b&Node.DOCUMENT_POSITION_FOLLOWING?-1:0})}shouldHealStack(a){return a instanceof
1936
+ PointerEvent?a.ctrlKey||a.metaKey:a instanceof KeyboardEvent?!(a.shiftKey||!this.block.previousConnection):!1}shouldDisconnect(a){return!!(this.block.getParent()||a&&this.block.nextConnection&&this.block.nextConnection.targetBlock())}disconnectBlock(a){this.block.unplug(a);disconnectUiEffect$$module$build$src$core$block_animations(this.block)}storeInitialConnections(a){var b=null,c=null,d;if((d=this.block.outputConnection)==null?0:d.isConnected())b=this.block.outputConnection,c=this.block.outputConnection.targetConnection;
1937
+ else{let e;if((e=this.block.previousConnection)==null?0:e.isConnected())b=this.block.previousConnection,c=this.block.previousConnection.targetConnection}this.startParentConn=c;b&&c?this.connectionCandidate={local:b,neighbour:c,distance:0}:a&&(a=this.block.nextConnection,b=a==null?void 0:a.targetConnection,a&&b&&(this.connectionCandidate={local:a,neighbour:b,distance:0}),this.startChildConn=b!=null?b:null)}fireDragStartEvent(){var a=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_DRAG))(this.block,
1946
1938
  !0,this.block.getDescendants(!1));fire$$module$build$src$core$events$utils(a)}fireDragEndEvent(){var a=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_DRAG))(this.block,!1,this.block.getDescendants(!1));fire$$module$build$src$core$events$utils(a)}fireMoveEvent(){if(!this.block.isDeadOrDying()){var a=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_MOVE))(this.block);a.setReason(["drag"]);a.oldCoordinate=
1947
- this.startLoc;a.recordNew();fire$$module$build$src$core$events$utils(a)}}drag(a,b){this.moveMode=b instanceof KeyboardEvent&&!b.ctrlKey&&!b.metaKey?MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED:MoveMode$$module$build$src$core$dragging$block_drag_strategy.UNCONSTRAINED;this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.UNCONSTRAINED&&this.block.moveDuringDrag(a);b=!!this.connectionCandidate;this.updateConnectionPreview(this.block,Coordinate$$module$build$src$core$utils$coordinate.difference(a,
1948
- this.startLoc));if(this.connectionCandidate){if(this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED){let {local:c,neighbour:d}=this.connectionCandidate;a=this.startLoc.x+(d.x-c.x);b=this.startLoc.y+(d.y-c.y);let e=this.BLOCK_CONNECTION_OFFSET;c.type===ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT||c.type===ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE?(a+=e,b+=e):(a-=e,b-=e);this.block.moveDuringDrag(new Coordinate$$module$build$src$core$utils$coordinate(a,
1949
- b))}}else if(this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED){this.allConnectionPairs.length||showUnconstrainedMoveHint$$module$build$src$core$hints(this.workspace,!0);b||this.workspace.getAudioManager().playErrorBeep();return}this.announceMove()}updateConnectionPreview(a,b){var c=this.connectionCandidate,d,e=(d=this.getInitialCandidate())!=null?d:this.getConnectionCandidate(b);if(e){var f=c&&this.currCandidateIsBetter(c,b,e)?c:e;this.connectionCandidate=f;
1950
- var {local:g,neighbour:h}=f;f=g.type===ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE||g.type===ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT;var k,l=h.isConnected()&&!((k=h.targetBlock())==null?0:k.isInsertionMarker());if(f&&l&&!this.orphanCanConnectAtEnd(a,h.targetBlock(),g.type)){var m;(m=this.connectionPreviewer)==null||m.previewReplacement(g,h,h.targetBlock())}else{let p;(p=this.connectionPreviewer)==null||p.previewConnection(g,h)}return h}m=c==
1951
- null?void 0:c.neighbour.getSourceBlock();var n;k=(n=m==null?void 0:m.getRootBlock())!=null?n:m;k===a&&(k=m);m=this.getDirectionToNewLocation(Coordinate$$module$build$src$core$utils$coordinate.sum(this.startLoc,b));if(k=(l=k)==null?void 0:l.getBoundingRectangle()){switch(m){case Direction$$module$build$src$core$keyboard_nav$keyboard_mover.LEFT:case Direction$$module$build$src$core$keyboard_nav$keyboard_mover.UP:l=new Coordinate$$module$build$src$core$utils$coordinate(k.getOrigin().x,k.getOrigin().y-
1952
- this.BLOCK_CONNECTION_OFFSET*2-a.getHeightWidth().height);break;default:l=new Coordinate$$module$build$src$core$utils$coordinate(k.getOrigin().x,k.getOrigin().y+k.getHeight()+this.BLOCK_CONNECTION_OFFSET*2)}a.moveDuringDrag(l);(f=this.connectionPreviewer)==null||f.hidePreview();this.connectionCandidate=null}}orphanCanConnectAtEnd(a,b,c){return!!Connection$$module$build$src$core$connection.getConnectionForOrphanedConnection(a,c===ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE?b.outputConnection:
1953
- b.previousConnection)}currCandidateIsBetter(a,b,c){if(this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED)return!1;var {local:d,neighbour:e}=a;a=new Coordinate$$module$build$src$core$utils$coordinate(d.x,d.y);var f=new Coordinate$$module$build$src$core$utils$coordinate(e.x,e.y);b=Coordinate$$module$build$src$core$utils$coordinate.distance(Coordinate$$module$build$src$core$utils$coordinate.sum(a,b),f);return c.distance>b-$.config$$module$build$src$core$config.currentConnectionPreference}getConnectionCandidate(a){return this.moveMode===
1954
- MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED?this.findTraversalCandidate(a):this.getClosestCandidate(this.block,a)}getClosestCandidate(a,b){var c=this.getSearchRadius();a=this.getLocalConnections(a);var d=null;for(let e of a){let {connection:f,radius:g}=e.closest(c,b);f&&(d={local:e,neighbour:f,distance:g},c=g)}return d}getSearchRadius(){return this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED?Infinity:this.connectionCandidate?$.config$$module$build$src$core$config.connectingSnapRadius:
1955
- $.config$$module$build$src$core$config.snapRadius}getLocalConnections(a){var b=a.getConnections_(!1),c=a.lastConnectionInStack(!0);c&&c!==a.nextConnection&&b.push(c);a=[a.outputConnection,a.previousConnection,a.nextConnection].filter(d=>!!d);c=[];for(let d of b)a.includes(d)||c.push(d);c.reverse();return[...a,...c]}endDrag(a,b){b===DragDisposition$$module$build$src$core$interfaces$i_draggable.DELETE&&disposeUiEffect$$module$build$src$core$block_animations(this.block);this.originalEventGroup=$.getGroup$$module$build$src$core$events$utils();
1956
- this.fireDragEndEvent();this.fireMoveEvent();stopTextWidthCache$$module$build$src$core$utils$dom();disconnectUiStop$$module$build$src$core$block_animations();var c;(c=this.connectionPreviewer)==null||c.hidePreview();if(!this.block.isDeadOrDying()&&this.dragging){let d;(d=this.workspace.getLayerManager())==null||d.moveOffDragLayer(this.block,BLOCK$$module$build$src$core$layers);this.getVisibleBubbles(this.block).forEach(e=>{var f;return(f=this.workspace.getLayerManager())==null?void 0:f.moveOffDragLayer(e,
1957
- BUBBLE$$module$build$src$core$layers,!1)});this.block.setDragging(!1)}this.connectionCandidate?(this.applyConnections(this.connectionCandidate),this.disposeStep()):(b!==DragDisposition$$module$build$src$core$interfaces$i_draggable.DELETE&&this.workspace.getAudioManager().play("drop"),this.block.queueRender().then(()=>this.disposeStep()));this.allConnectionPairs=[]}disposeStep(){var a=$.getGroup$$module$build$src$core$events$utils();$.setGroup$$module$build$src$core$events$utils(this.originalEventGroup);
1939
+ this.startLoc;a.recordNew();fire$$module$build$src$core$events$utils(a)}}drag(a,b){this.updateMoveMode(b);this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.UNCONSTRAINED&&this.block.moveDuringDrag(a);b=!!this.connectionCandidate;this.updateConnectionPreview(this.block,Coordinate$$module$build$src$core$utils$coordinate.difference(a,this.startLoc));if(this.connectionCandidate){if(this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED){let {local:c,
1940
+ neighbour:d}=this.connectionCandidate;a=this.startLoc.x+(d.x-c.x);b=this.startLoc.y+(d.y-c.y);let e=this.BLOCK_CONNECTION_OFFSET;c.type===ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT||c.type===ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE?(a+=e,b+=e):(a-=e,b-=e);this.block.moveDuringDrag(new Coordinate$$module$build$src$core$utils$coordinate(a,b))}}else if(this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED&&(this.allConnectionPairs.length||
1941
+ showUnconstrainedMoveHint$$module$build$src$core$hints(this.workspace,!0),!b)){this.workspace.getAudioManager().playErrorBeep();return}this.announceMove()}updateConnectionPreview(a,b){var c=this.connectionCandidate,d,e=(d=this.getInitialCandidate())!=null?d:this.getConnectionCandidate(b);if(e){var f=c&&this.currCandidateIsBetter(c,b,e)?c:e;this.connectionCandidate=f;var {local:g,neighbour:h}=f;f=g.type===ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE||g.type===ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT;
1942
+ var k,l=h.isConnected()&&!((k=h.targetBlock())==null?0:k.isInsertionMarker());if(f&&l&&!this.orphanCanConnectAtEnd(a,h.targetBlock(),g.type)){var m;(m=this.connectionPreviewer)==null||m.previewReplacement(g,h,h.targetBlock())}else{let n;(n=this.connectionPreviewer)==null||n.previewConnection(g,h)}return h}if(this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED){m=c==null?void 0:c.neighbour.getSourceBlock();let n;k=(n=m==null?void 0:m.getRootBlock())!=null?n:m;k===
1943
+ a&&(k=m);m=this.getDirectionToNewLocation(Coordinate$$module$build$src$core$utils$coordinate.sum(this.startLoc,b));k=(l=k)==null?void 0:l.getBoundingRectangle();if(!k)return;switch(m){case Direction$$module$build$src$core$keyboard_nav$keyboard_mover.LEFT:case Direction$$module$build$src$core$keyboard_nav$keyboard_mover.UP:l=new Coordinate$$module$build$src$core$utils$coordinate(k.getOrigin().x,k.getOrigin().y-this.BLOCK_CONNECTION_OFFSET*2-a.getHeightWidth().height);break;default:l=new Coordinate$$module$build$src$core$utils$coordinate(k.getOrigin().x,
1944
+ k.getOrigin().y+k.getHeight()+this.BLOCK_CONNECTION_OFFSET*2)}a.moveDuringDrag(l)}(f=this.connectionPreviewer)==null||f.hidePreview();this.connectionCandidate=null}orphanCanConnectAtEnd(a,b,c){return!!Connection$$module$build$src$core$connection.getConnectionForOrphanedConnection(a,c===ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE?b.outputConnection:b.previousConnection)}currCandidateIsBetter(a,b,c){if(this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED)return!1;
1945
+ var {local:d,neighbour:e}=a;a=new Coordinate$$module$build$src$core$utils$coordinate(d.x,d.y);var f=new Coordinate$$module$build$src$core$utils$coordinate(e.x,e.y);b=Coordinate$$module$build$src$core$utils$coordinate.distance(Coordinate$$module$build$src$core$utils$coordinate.sum(a,b),f);return c.distance>b-$.config$$module$build$src$core$config.currentConnectionPreference}getConnectionCandidate(a){return this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED?this.findTraversalCandidate(a):
1946
+ this.getClosestCandidate(this.block,a)}getClosestCandidate(a,b){var c=this.getSearchRadius();a=this.getLocalConnections(a);var d=null;for(let e of a){let {connection:f,radius:g}=e.closest(c,b);f&&(d={local:e,neighbour:f,distance:g},c=g)}return d}getSearchRadius(){return this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED?Infinity:this.connectionCandidate?$.config$$module$build$src$core$config.connectingSnapRadius:$.config$$module$build$src$core$config.snapRadius}getLocalConnections(a){var b=
1947
+ a.getConnections_(!1),c=a.lastConnectionInStack(!0);c&&c!==a.nextConnection&&b.push(c);a=[a.outputConnection,a.previousConnection,a.nextConnection].filter(d=>!!d);c=[];for(let d of b)a.includes(d)||c.push(d);c.reverse();return[...a,...c]}endDrag(a,b){b===DragDisposition$$module$build$src$core$interfaces$i_draggable.DELETE&&disposeUiEffect$$module$build$src$core$block_animations(this.block);this.originalEventGroup=$.getGroup$$module$build$src$core$events$utils();this.fireDragEndEvent();this.fireMoveEvent();
1948
+ stopTextWidthCache$$module$build$src$core$utils$dom();disconnectUiStop$$module$build$src$core$block_animations();var c;(c=this.connectionPreviewer)==null||c.hidePreview();if(!this.block.isDeadOrDying()&&this.dragging){let d;(d=this.workspace.getLayerManager())==null||d.moveOffDragLayer(this.block,BLOCK$$module$build$src$core$layers);this.getVisibleBubbles(this.block).forEach(e=>{var f;return(f=this.workspace.getLayerManager())==null?void 0:f.moveOffDragLayer(e,BUBBLE$$module$build$src$core$layers,
1949
+ !1)});this.block.setDragging(!1);this.redisableAllDraggedBlocks(this.block)}this.connectionCandidate?(this.applyConnections(this.connectionCandidate),this.disposeStep()):(b!==DragDisposition$$module$build$src$core$interfaces$i_draggable.DELETE&&this.workspace.getAudioManager().play("drop"),this.block.queueRender().then(()=>this.disposeStep()));this.allConnectionPairs=[]}disposeStep(){var a=$.getGroup$$module$build$src$core$events$utils();$.setGroup$$module$build$src$core$events$utils(this.originalEventGroup);
1958
1950
  this.block.snapToGrid();var b;(b=this.connectionPreviewer)==null||b.dispose();this.workspace.setResizesEnabled(!0);$.setGroup$$module$build$src$core$events$utils(a)}applyConnections(a){var {local:b,neighbour:c}=a;b.connect(c);var d=b.isSuperior()?c:b,e=this.block.getRootBlock();finishQueuedRenders$$module$build$src$core$render_management().then(()=>{connectionUiEffect$$module$build$src$core$block_animations(d.getSourceBlock());setTimeout(()=>{e.bringToFront()},0)})}revertDrag(){var a;(a=this.connectionPreviewer)==
1959
1951
  null||a.hidePreview();this.connectionCandidate=null;if(this.block.nextConnection){let b;(b=this.startChildConn)==null||b.connect(this.block.nextConnection)}if(this.startParentConn)switch(this.startParentConn.type){case ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE:this.block.outputConnection&&this.startParentConn.connect(this.block.outputConnection);break;case ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT:this.block.previousConnection&&this.startParentConn.connect(this.block.previousConnection)}else{this.block.moveDuringDrag(this.startLoc);
1960
1952
  let b;(b=this.workspace.getLayerManager())==null||b.moveOffDragLayer(this.block,BLOCK$$module$build$src$core$layers);this.getVisibleBubbles(this.block).forEach(c=>{var d;return(d=this.workspace.getLayerManager())==null?void 0:d.moveOffDragLayer(c,BUBBLE$$module$build$src$core$layers,!1)});bumpObjectIntoBounds$$module$build$src$core$bump_objects(this.workspace,this.workspace.getMetricsManager().getScrollMetrics(!0),this.block)}this.startParentConn=this.startChildConn=null;this.block.setDragging(!1);
1961
- this.dragging=!1;announceDynamicAriaState$$module$build$src$core$utils$aria($.Msg$$module$build$src$core$msg.ANNOUNCE_MOVE_CANCELED)}findTraversalCandidate(a){var b=this.getDirectionToNewLocation(Coordinate$$module$build$src$core$utils$coordinate.sum(this.startLoc,a)),c=this.allConnectionPairs;if(b===Direction$$module$build$src$core$keyboard_nav$keyboard_mover.NONE||!c.length)return this.connectionCandidate;var d=b===Direction$$module$build$src$core$keyboard_nav$keyboard_mover.RIGHT||b===Direction$$module$build$src$core$keyboard_nav$keyboard_mover.DOWN,
1962
- e=c.findIndex(f=>{var g,h;return((g=this.connectionCandidate)==null?void 0:g.local)===f.local&&((h=this.connectionCandidate)==null?void 0:h.neighbour)===f.neighbour});b=this.block.workspace.getNavigator();return d?e===-1?(d=this.isInTerminalPosition(this.block,Direction$$module$build$src$core$keyboard_nav$keyboard_mover.DOWN),b.getNavigationLoops()?this.pairToCandidate(c[0]):d?null:this.getClosestCandidate(this.block,a)):e===c.length-1?null:this.pairToCandidate(c[e+1]):e===-1?(d=this.isInTerminalPosition(this.block,
1963
- Direction$$module$build$src$core$keyboard_nav$keyboard_mover.UP),b.getNavigationLoops()?this.pairToCandidate(c[c.length-1]):d?null:this.getClosestCandidate(this.block,a)):e===0?null:this.pairToCandidate(c[e-1])}isInTerminalPosition(a,b){if(a.getParent())return!1;var c=a.workspace.getTopBlocks(!0),d=c.indexOf(a);b=b===Direction$$module$build$src$core$keyboard_nav$keyboard_mover.UP?-1:1;var e=d+b;for(d=a.getConnections_(!1);e>=0&&e<c.length;e+=b){let f=c[e];for(let g of d)for(let h of f.getConnections_(!1))if(a.workspace.connectionChecker.canConnect(g,
1964
- h,!0,Infinity))return!1}return!0}pairToCandidate(a){return Object.assign({},a,{distance:0})}getDirectionToNewLocation(a){var b=this.block.getRelativeToSurfaceXY();a=Coordinate$$module$build$src$core$utils$coordinate.difference(a,b);var {x:c,y:d}=a;return c<0?Direction$$module$build$src$core$keyboard_nav$keyboard_mover.LEFT:c>0?Direction$$module$build$src$core$keyboard_nav$keyboard_mover.RIGHT:d<0?Direction$$module$build$src$core$keyboard_nav$keyboard_mover.UP:d>0?Direction$$module$build$src$core$keyboard_nav$keyboard_mover.DOWN:
1965
- Direction$$module$build$src$core$keyboard_nav$keyboard_mover.NONE}getAllConnections(a){if(a.isShadow())return[];var b=[];a.outputConnection&&b.push(a.outputConnection);a.previousConnection&&b.push(a.previousConnection);if(!a.isCollapsed())for(let c of a.inputList)if(c.connection&&c.isVisible()){b.push(c.connection);let d=c.connection.targetBlock();d&&b.push(...this.getAllConnections(d))}a.nextConnection&&(b.push(a.nextConnection),(a=a.nextConnection.targetBlock())&&b.push(...this.getAllConnections(a)));
1966
- return b}getInitialCandidate(){var a=this.workspace.getSvgGroup().querySelector(`.${FocusManager$$module$build$src$core$focus_manager.PASSIVE_FOCUS_NODE_CSS_CLASS_NAME}`);if(!a||!a.id||a===this.block.getFocusableElement())return null;a=this.workspace.lookUpFocusableNode(a.id);if(!a)return null;var b=this.workspace.getNavigator().getSourceBlockFromNode(a);if(!b)return null;var c=null;if(b.getConnections_(!1).includes(a)){c=a;let f=this.block.workspace.connectionChecker;if(a=this.block.getConnections_(!1).find(g=>
1967
- f.canConnect(g,c,!0,Infinity)))return{local:a,neighbour:c,distance:0}}if(a=this.allConnectionPairs.find(f=>f.neighbour.getSourceBlock()===b))return this.pairToCandidate(a);var d,e=(d=b.outputConnection)==null?void 0:d.targetConnection;return(d=this.allConnectionPairs.find(f=>f.neighbour===e))?this.pairToCandidate(d):null}},module$build$src$core$dragging$block_drag_strategy={};module$build$src$core$dragging$block_drag_strategy.BlockDragStrategy=BlockDragStrategy$$module$build$src$core$dragging$block_drag_strategy;var TextBubble$$module$build$src$core$bubbles$text_bubble=class extends Bubble$$module$build$src$core$bubbles$bubble{constructor(a,b,c,d,e){super(b,c,d,void 0,e);this.text=a;this.workspace=b;this.anchor=c;this.ownerRect=d;this.owner=e;this.paragraph=this.stringToSvg(a,this.contentContainer);this.updateBubbleSize();addClass$$module$build$src$core$utils$dom(this.svgRoot,"blocklyTextBubble")}getText(){return this.text}setText(a){this.text=a;removeNode$$module$build$src$core$utils$dom(this.paragraph);
1953
+ this.redisableAllDraggedBlocks(this.block);this.dragging=!1;announceDynamicAriaState$$module$build$src$core$utils$aria($.Msg$$module$build$src$core$msg.ANNOUNCE_MOVE_CANCELED)}findTraversalCandidate(a){var b=this.getDirectionToNewLocation(Coordinate$$module$build$src$core$utils$coordinate.sum(this.startLoc,a)),c=this.allConnectionPairs;if(b===Direction$$module$build$src$core$keyboard_nav$keyboard_mover.NONE||!c.length)return this.connectionCandidate;var d=b===Direction$$module$build$src$core$keyboard_nav$keyboard_mover.RIGHT||
1954
+ b===Direction$$module$build$src$core$keyboard_nav$keyboard_mover.DOWN,e=c.findIndex(f=>{var g,h;return((g=this.connectionCandidate)==null?void 0:g.local)===f.local&&((h=this.connectionCandidate)==null?void 0:h.neighbour)===f.neighbour});b=this.block.workspace.getNavigator();return d?e===-1?(d=this.isInTerminalPosition(this.block,Direction$$module$build$src$core$keyboard_nav$keyboard_mover.DOWN),b.getNavigationLoops()?this.pairToCandidate(c[0]):d?null:this.getClosestCandidate(this.block,a)):e===c.length-
1955
+ 1?null:this.pairToCandidate(c[e+1]):e===-1?(d=this.isInTerminalPosition(this.block,Direction$$module$build$src$core$keyboard_nav$keyboard_mover.UP),b.getNavigationLoops()?this.pairToCandidate(c[c.length-1]):d?null:this.getClosestCandidate(this.block,a)):e===0?null:this.pairToCandidate(c[e-1])}isInTerminalPosition(a,b){if(a.getParent())return!1;var c=a.workspace.getTopBlocks(!0),d=c.indexOf(a);b=b===Direction$$module$build$src$core$keyboard_nav$keyboard_mover.UP?-1:1;var e=d+b;for(d=a.getConnections_(!1);e>=
1956
+ 0&&e<c.length;e+=b){let f=c[e];for(let g of d){let h=this.getAllConnections(f);for(let k of h)if(a.workspace.connectionChecker.canConnect(g,k,!0,Infinity))return!1}}return!0}pairToCandidate(a){return Object.assign({},a,{distance:0})}getDirectionToNewLocation(a){var b=this.block.getRelativeToSurfaceXY();a=Coordinate$$module$build$src$core$utils$coordinate.difference(a,b);var {x:c,y:d}=a;return c<0?Direction$$module$build$src$core$keyboard_nav$keyboard_mover.LEFT:c>0?Direction$$module$build$src$core$keyboard_nav$keyboard_mover.RIGHT:
1957
+ d<0?Direction$$module$build$src$core$keyboard_nav$keyboard_mover.UP:d>0?Direction$$module$build$src$core$keyboard_nav$keyboard_mover.DOWN:Direction$$module$build$src$core$keyboard_nav$keyboard_mover.NONE}getAllConnections(a){if(a.isShadow())return[];var b=[];a.outputConnection&&b.push(a.outputConnection);a.previousConnection&&b.push(a.previousConnection);if(!a.isCollapsed())for(let c of a.inputList)if(c.connection&&c.isVisible()){b.push(c.connection);let d=c.connection.targetBlock();d&&b.push(...this.getAllConnections(d))}a.nextConnection&&
1958
+ (b.push(a.nextConnection),(a=a.nextConnection.targetBlock())&&b.push(...this.getAllConnections(a)));return b}getInitialCandidate(){var a=this.workspace.getSvgGroup().querySelector(`.${FocusManager$$module$build$src$core$focus_manager.PASSIVE_FOCUS_NODE_CSS_CLASS_NAME}`);if(!a||!a.id||a===this.block.getFocusableElement())return null;a=this.workspace.lookUpFocusableNode(a.id);if(!a)return null;var b=this.workspace.getNavigator().getSourceBlockFromNode(a);if(!b)return null;var c=null;if(b.getConnections_(!1).includes(a)){c=
1959
+ a;let f=this.block.workspace.connectionChecker;if(a=this.block.getConnections_(!1).find(g=>f.canConnect(g,c,!0,Infinity)))return{local:a,neighbour:c,distance:0}}if(a=this.allConnectionPairs.find(f=>f.neighbour.getSourceBlock()===b))return this.pairToCandidate(a);var d,e=(d=b.outputConnection)==null?void 0:d.targetConnection;return(d=this.allConnectionPairs.find(f=>f.neighbour===e))?this.pairToCandidate(d):null}updateMoveMode(a){this.moveMode=a instanceof KeyboardEvent&&!a.ctrlKey&&!a.metaKey?MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED:
1960
+ MoveMode$$module$build$src$core$dragging$block_drag_strategy.UNCONSTRAINED}enableAllDraggedBlocks(a){var b=getRecordUndo$$module$build$src$core$events$utils();$.setRecordUndo$$module$build$src$core$events$utils(!1);this.lastBlockDisabledReasons.clear();a.getDescendants(!1).forEach(c=>{var d=new Set(c.getDisabledReasons());this.lastBlockDisabledReasons.set(c.id,d);d.forEach(e=>c.setDisabledReason(!1,e))});$.setRecordUndo$$module$build$src$core$events$utils(b)}redisableAllDraggedBlocks(a){console.log("redisable");
1961
+ var b=getRecordUndo$$module$build$src$core$events$utils();$.setRecordUndo$$module$build$src$core$events$utils(!1);a.getDescendants(!1).forEach(c=>{var d;(d=this.lastBlockDisabledReasons.get(c.id))==null||d.forEach(e=>{c.setDisabledReason(!0,e)})});$.setRecordUndo$$module$build$src$core$events$utils(b)}},module$build$src$core$dragging$block_drag_strategy={};module$build$src$core$dragging$block_drag_strategy.BlockDragStrategy=BlockDragStrategy$$module$build$src$core$dragging$block_drag_strategy;var TextBubble$$module$build$src$core$bubbles$text_bubble=class extends Bubble$$module$build$src$core$bubbles$bubble{constructor(a,b,c,d,e){super(b,c,d,void 0,e);this.text=a;this.workspace=b;this.anchor=c;this.ownerRect=d;this.owner=e;this.paragraph=this.stringToSvg(a,this.contentContainer);this.updateBubbleSize();addClass$$module$build$src$core$utils$dom(this.svgRoot,"blocklyTextBubble")}getText(){return this.text}setText(a){this.text=a;removeNode$$module$build$src$core$utils$dom(this.paragraph);
1968
1962
  this.paragraph=this.stringToSvg(a,this.contentContainer);this.updateBubbleSize()}stringToSvg(a,b){b=this.createParagraph(b);a=this.createTextFragments(b,a);this.workspace.RTL&&this.rightAlignTextFragments(b.getBBox().width,a);return b}createParagraph(a){return createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{"class":"blocklyText blocklyBubbleText blocklyNoPointerEvents",transform:`translate(0,${Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH})`,style:`direction: ${this.workspace.RTL?
1969
1963
  "rtl":"ltr"}`},a)}createTextFragments(a,b){var c=1;return b.split("\n").map(d=>{var e=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.TEXT,{y:`${c}em`,x:Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH},a);d=document.createTextNode(d);e.appendChild(d);c+=1;return e})}rightAlignTextFragments(a,b){for(let c of b)c.setAttribute("text-anchor","start"),c.setAttribute("x",`${a+Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH}`)}updateBubbleSize(){var a=
1970
1964
  this.paragraph.getBBox();this.setSize(new Size$$module$build$src$core$utils$size(a.width+Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH*2,a.height+Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH*2),!0)}},module$build$src$core$bubbles$text_bubble={};module$build$src$core$bubbles$text_bubble.TextBubble=TextBubble$$module$build$src$core$bubbles$text_bubble;var SIZE$$module$build$src$core$icons$warning_icon=17,WarningIcon$$module$build$src$core$icons$warning_icon=class extends Icon$$module$build$src$core$icons$icon{constructor(a){super(a);this.sourceBlock=a;this.textMap=new Map;this.textBubble=null}getType(){return WarningIcon$$module$build$src$core$icons$warning_icon.TYPE}initView(a){this.svgRoot||(super.initView(a),createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.PATH,{"class":"blocklyIconShape",d:"M2,15Q-1,15 0.5,12L6.5,1.7Q8,-1 9.5,1.7L15.5,12Q17,15 14,15z"},
@@ -2012,7 +2006,7 @@ Object.assign({},{kind:"BLOCK"},save$$module$build$src$core$serialization$blocks
2012
2006
  this.pathObject.svgPath}getFocusableTree(){return this.workspace}onNodeFocus(){this.recomputeAriaContext();this.select();var a=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode();a&&a!==this&&finishQueuedRenders$$module$build$src$core$render_management().then(()=>{this.workspace.scrollBoundsIntoView(this.getBoundingRectangleWithoutChildren())})}onNodeBlur(){this.unselect()}canBeFocused(){return!0}performAction(a){if(this.workspace.isFlyout)KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.startMove(this,
2013
2007
  a);else{if(this.isSimpleReporter())for(let b of this.inputList)for(let c of b.fieldRow)if(c.isClickable()&&c.isFullBlockField()){c.showEditor();return}this.workspace.getNavigator().getInNode(this)?showBlockNavigationHint$$module$build$src$core$hints(this.workspace):showHelpHint$$module$build$src$core$hints(this.workspace)}}getParents(){for(var a=new Set,b=this.getParent();b;)a.add(b),b=b.getParent();return a}getOutputParents(){var a=new Set;a.add(this);for(var b,c=(b=this.outputConnection)==null?
2014
2008
  void 0:b.targetBlock();c;){a.add(c);let d;c=(d=c.outputConnection)==null?void 0:d.targetBlock()}return a}getRowId(){var a,b,c=(a=this.outputConnection)==null?void 0:(b=a.targetConnection)==null?void 0:b.getParentInput();return c?c.getRowId():this.id}recomputeAriaContext(){this.getFullBlockField()||(setState$$module$build$src$core$utils$aria(this.getFocusableElement(),State$$module$build$src$core$utils$aria.LABEL,this.getAriaLabel(Verbosity$$module$build$src$core$utils$aria.STANDARD)),configureAriaRole$$module$build$src$core$block_aria_composer(this))}getAriaLabel(a){return computeAriaLabel$$module$build$src$core$block_aria_composer(this,
2015
- a,!1)}getStackBlocksCountLabel(){for(var a=1,b=this.getNextBlock();b;)a++,b=b.getNextBlock();return a<=1?computeAriaLabel$$module$build$src$core$block_aria_composer(this,Verbosity$$module$build$src$core$utils$aria.TERSE):$.Msg$$module$build$src$core$msg.BLOCK_LABEL_STACK_BLOCKS.replace("%1",a.toString())}};BlockSvg$$module$build$src$core$block_svg.INLINE=-1;BlockSvg$$module$build$src$core$block_svg.COLLAPSED_WARNING_ID="TEMP_COLLAPSED_WARNING_";var module$build$src$core$block_svg={};
2009
+ a,!1)}getStackBlocksCountLabel(){for(var a=1,b=this.getNextBlock();b;)a++,b=b.getNextBlock();return a<=1?computeAriaLabel$$module$build$src$core$block_aria_composer(this,Verbosity$$module$build$src$core$utils$aria.TERSE,!1):$.Msg$$module$build$src$core$msg.BLOCK_LABEL_STACK_BLOCKS.replace("%1",a.toString())}};BlockSvg$$module$build$src$core$block_svg.INLINE=-1;BlockSvg$$module$build$src$core$block_svg.COLLAPSED_WARNING_ID="TEMP_COLLAPSED_WARNING_";var module$build$src$core$block_svg={};
2016
2010
  module$build$src$core$block_svg.BlockSvg=BlockSvg$$module$build$src$core$block_svg;var DragTarget$$module$build$src$core$drag_target=class{constructor(){}onDragEnter(a){}onDragOver(a){}onDragExit(a){}onDrop(a){}getClientRect(){return null}shouldPreventMove(a){return!1}},module$build$src$core$drag_target={};module$build$src$core$drag_target.DragTarget=DragTarget$$module$build$src$core$drag_target;var DeleteArea$$module$build$src$core$delete_area=class extends DragTarget$$module$build$src$core$drag_target{constructor(){super();this.wouldDelete_=!1}wouldDelete(a){KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving()?this.updateWouldDelete_(!1):a instanceof BlockSvg$$module$build$src$core$block_svg?(a=!a.getParent()&&a.isDeletable(),this.updateWouldDelete_(a)):this.updateWouldDelete_(isDeletable$$module$build$src$core$interfaces$i_deletable(a)&&a.isDeletable());return this.wouldDelete_}updateWouldDelete_(a){this.wouldDelete_=
2017
2011
  a}},module$build$src$core$delete_area={};module$build$src$core$delete_area.DeleteArea=DeleteArea$$module$build$src$core$delete_area;var FlyoutItem$$module$build$src$core$flyout_item=class{constructor(a,b){this.element=a;this.type=b}getElement(){return this.element}getType(){return this.type}},module$build$src$core$flyout_item={};module$build$src$core$flyout_item.FlyoutItem=FlyoutItem$$module$build$src$core$flyout_item;var MetricsManager$$module$build$src$core$metrics_manager=class{constructor(a){this.workspace_=a}getDimensionsPx_(a){var b=0,c=0;a&&(b=a.getWidth(),c=a.getHeight());return new Size$$module$build$src$core$utils$size(b,c)}getFlyoutMetrics(a){a=this.getDimensionsPx_(this.workspace_.getFlyout(a));return{width:a.width,height:a.height,position:this.workspace_.toolboxPosition}}getToolboxMetrics(){var a=this.getDimensionsPx_(this.workspace_.getToolbox());return{width:a.width,height:a.height,position:this.workspace_.toolboxPosition}}getSvgMetrics(){return this.workspace_.getCachedParentSvgSize()}getAbsoluteMetrics(){var a=
2018
2012
  0,b=0,c=this.getToolboxMetrics(),d=this.getFlyoutMetrics(),e=!!this.workspace_.getToolbox(),f,g=!((f=this.workspace_.getFlyout())==null?0:f.autoClose);f=e?c.position:d.position;var h=f===Position$$module$build$src$core$utils$toolbox.TOP;f===Position$$module$build$src$core$utils$toolbox.LEFT&&(e&&(a+=c.width),g&&(a+=d.width));h&&(e&&(b+=c.height),g&&(b+=d.height));return{top:b,left:a}}getViewMetrics(a){a=a?this.workspace_.scale:1;var b=this.getSvgMetrics(),c=this.getToolboxMetrics(),d=this.getFlyoutMetrics(),
@@ -2142,8 +2136,7 @@ null?f:"";this.dbReverse.add(a);return(b===$.NameType$$module$build$src$core$nam
2142
2136
  module$build$src$core$names.Names=$.Names$$module$build$src$core$names;var module$build$src$core$interfaces$i_observable={};module$build$src$core$interfaces$i_observable.isObservable=isObservable$$module$build$src$core$interfaces$i_observable;var ObservableProcedureMap$$module$build$src$core$observable_procedure_map=class extends Map{constructor(){super()}set(a,b){if(this.get(a)===b)return this;super.set(a,b);isObservable$$module$build$src$core$interfaces$i_observable(b)&&b.startPublishing();return this}delete(a){var b=this.get(a);a=super.delete(a);if(!a)return a;isObservable$$module$build$src$core$interfaces$i_observable(b)&&b.stopPublishing();return a}clear(){if(this.size)for(let a of this.keys())this.delete(a)}add(a){return this.set(a.getId(),
2143
2137
  a)}getProcedures(){return[...this.values()]}},module$build$src$core$observable_procedure_map={};module$build$src$core$observable_procedure_map.ObservableProcedureMap=ObservableProcedureMap$$module$build$src$core$observable_procedure_map;var CATEGORY_NAME$$module$build$src$core$procedures,module$build$src$core$procedures;CATEGORY_NAME$$module$build$src$core$procedures="PROCEDURE";$.DEFAULT_ARG$$module$build$src$core$procedures="x";module$build$src$core$procedures={CATEGORY_NAME:CATEGORY_NAME$$module$build$src$core$procedures,DEFAULT_ARG:$.DEFAULT_ARG$$module$build$src$core$procedures};module$build$src$core$procedures.ObservableProcedureMap=ObservableProcedureMap$$module$build$src$core$observable_procedure_map;
2144
2138
  module$build$src$core$procedures.allProcedures=allProcedures$$module$build$src$core$procedures;module$build$src$core$procedures.findLegalName=$.findLegalName$$module$build$src$core$procedures;module$build$src$core$procedures.flyoutCategory=flyoutCategory$$module$build$src$core$procedures;module$build$src$core$procedures.getCallers=getCallers$$module$build$src$core$procedures;module$build$src$core$procedures.getDefinition=$.getDefinition$$module$build$src$core$procedures;
2145
- module$build$src$core$procedures.internalFlyoutCategory=internalFlyoutCategory$$module$build$src$core$procedures;module$build$src$core$procedures.isNameUsed=isNameUsed$$module$build$src$core$procedures;module$build$src$core$procedures.isProcedureBlock=isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block;module$build$src$core$procedures.mutateCallers=$.mutateCallers$$module$build$src$core$procedures;module$build$src$core$procedures.mutatorOpenListener=mutatorOpenListener$$module$build$src$core$procedures;
2146
- module$build$src$core$procedures.rename=$.rename$$module$build$src$core$procedures;var TypesContainer$$module$build$src$core$renderers$measurables$types=class{constructor(){this.NONE=0;this.FIELD=1;this.HAT=2;this.ICON=4;this.SPACER=8;this.BETWEEN_ROW_SPACER=16;this.IN_ROW_SPACER=32;this.EXTERNAL_VALUE_INPUT=64;this.INPUT=128;this.INLINE_INPUT=256;this.STATEMENT_INPUT=512;this.CONNECTION=1024;this.PREVIOUS_CONNECTION=2048;this.NEXT_CONNECTION=4096;this.OUTPUT_CONNECTION=8192;this.CORNER=16384;this.LEFT_SQUARE_CORNER=32768;this.LEFT_ROUND_CORNER=65536;this.RIGHT_SQUARE_CORNER=131072;
2139
+ module$build$src$core$procedures.isNameUsed=isNameUsed$$module$build$src$core$procedures;module$build$src$core$procedures.isProcedureBlock=isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block;module$build$src$core$procedures.mutateCallers=$.mutateCallers$$module$build$src$core$procedures;module$build$src$core$procedures.mutatorOpenListener=mutatorOpenListener$$module$build$src$core$procedures;module$build$src$core$procedures.rename=$.rename$$module$build$src$core$procedures;var TypesContainer$$module$build$src$core$renderers$measurables$types=class{constructor(){this.NONE=0;this.FIELD=1;this.HAT=2;this.ICON=4;this.SPACER=8;this.BETWEEN_ROW_SPACER=16;this.IN_ROW_SPACER=32;this.EXTERNAL_VALUE_INPUT=64;this.INPUT=128;this.INLINE_INPUT=256;this.STATEMENT_INPUT=512;this.CONNECTION=1024;this.PREVIOUS_CONNECTION=2048;this.NEXT_CONNECTION=4096;this.OUTPUT_CONNECTION=8192;this.CORNER=16384;this.LEFT_SQUARE_CORNER=32768;this.LEFT_ROUND_CORNER=65536;this.RIGHT_SQUARE_CORNER=131072;
2147
2140
  this.RIGHT_ROUND_CORNER=262144;this.JAGGED_EDGE=524288;this.ROW=1048576;this.TOP_ROW=2097152;this.BOTTOM_ROW=4194304;this.INPUT_ROW=8388608;this.LEFT_CORNER=this.LEFT_SQUARE_CORNER|this.LEFT_ROUND_CORNER;this.RIGHT_CORNER=this.RIGHT_SQUARE_CORNER|this.RIGHT_ROUND_CORNER;this.nextTypeValue_=16777216}getType(a){Object.prototype.hasOwnProperty.call(this,a)||(this[a]=this.nextTypeValue_,this.nextTypeValue_<<=1);return this[a]}isField(a){return(a.type&this.FIELD)>=1}isHat(a){return(a.type&this.HAT)>=1}isIcon(a){return(a.type&
2148
2141
  this.ICON)>=1}isSpacer(a){return(a.type&this.SPACER)>=1}isInRowSpacer(a){return(a.type&this.IN_ROW_SPACER)>=1}isSpacerRow(a){return(a.type&this.BETWEEN_ROW_SPACER)>=1}isInput(a){return(a.type&this.INPUT)>=1}isExternalInput(a){return(a.type&this.EXTERNAL_VALUE_INPUT)>=1}isInlineInput(a){return(a.type&this.INLINE_INPUT)>=1}isStatementInput(a){return(a.type&this.STATEMENT_INPUT)>=1}isPreviousConnection(a){return(a.type&this.PREVIOUS_CONNECTION)>=1}isNextConnection(a){return(a.type&this.NEXT_CONNECTION)>=
2149
2142
  1}isPreviousOrNextConnection(a){return this.isPreviousConnection(a)||this.isNextConnection(a)}isRoundCorner(a){return(a.type&this.LEFT_ROUND_CORNER)>=1||(a.type&this.RIGHT_ROUND_CORNER)>=1}isLeftRoundedCorner(a){return this.isRoundCorner(a)&&(a.type&this.LEFT_ROUND_CORNER)>=1}isRightRoundedCorner(a){return this.isRoundCorner(a)&&(a.type&this.RIGHT_ROUND_CORNER)>=1}isLeftSquareCorner(a){return(a.type&this.LEFT_SQUARE_CORNER)>=1}isRightSquareCorner(a){return(a.type&this.RIGHT_SQUARE_CORNER)>=1}isCorner(a){return(a.type&
@@ -2189,11 +2182,12 @@ a));return{width:a,height:a,pathTop:b,pathBottom:c}}makeOutsideCorners(){var a=t
2189
2182
  {"in":"SourceGraphic",in2:"specOut",operator:"arithmetic",k1:0,k2:1,k3:1,k4:0},a);this.embossFilterId=a.id;this.embossFilter=a;a=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.PATTERN,{id:"blocklyDisabledPattern"+this.randomIdentifier,patternUnits:"userSpaceOnUse",width:10,height:10},this.defs);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{width:10,height:10,fill:"#aaa"},a);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.PATH,
2190
2183
  {d:"M 0 0 L 10 10 M 10 0 L 0 10",stroke:"#cc0"},a);this.disabledPatternId=a.id;this.disabledPattern=a;this.createDebugFilter();c&&(c.style.setProperty("--blocklyEmbossFilter",`url(#${this.embossFilterId})`),c.style.setProperty("--blocklyDisabledPattern",`url(#${this.disabledPatternId})`),c.style.setProperty("--blocklyDebugFilter",`url(#${this.debugFilterId})`))}createDebugFilter(){if(!this.debugFilter){let a=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.FILTER,
2191
2184
  {id:"blocklyDebugFilter"+this.randomIdentifier,height:"160%",width:"180%",y:"-30%",x:"-40%"},this.defs),b=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.FECOMPONENTTRANSFER,{result:"outBlur"},a);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.FEFUNCA,{type:"table",tableValues:"0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1"},b);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.FEFLOOD,{"flood-color":"#ff0000",
2192
- "flood-opacity":.5,result:"outColor"},a);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.FECOMPOSITE,{"in":"outColor",in2:"outBlur",operator:"in",result:"outGlow"},a);this.debugFilterId=a.id;this.debugFilter=a}}injectCSS_(a,b){var c;if(typeof window!=="undefined"&&window.CSSStyleSheet&&((c=injectionSites$$module$build$src$core$renderers$common$constants.get(b))==null||!c.has(a))){c=new CSSStyleSheet;c.replace(this.getCSS_(b).join("\n"));a.adoptedStyleSheets.push(c);
2193
- var d;c=(d=injectionSites$$module$build$src$core$renderers$common$constants.get(b))!=null?d:new WeakSet;c.add(a);injectionSites$$module$build$src$core$renderers$common$constants.set(b,c)}}getCSS_(a){return[`${a}.injectionDiv {`,"--blockly-active-node-color: #fc3;","}",`${a} .blocklyText, `,`${a} .blocklyFlyoutLabelText {`,`font: ${this.FIELD_TEXT_FONTWEIGHT} ${this.FIELD_TEXT_FONTSIZE}pt ${this.FIELD_TEXT_FONTFAMILY};`,"}",`${a} .blocklyText {`,"fill: #fff;","}",`${a} .blocklyNonEditableField>rect,`,
2194
- `${a} .blocklyEditableField>rect {`,`fill: ${this.FIELD_BORDER_RECT_COLOUR};`,"fill-opacity: .6;","stroke: none;","}",`${a} .blocklyNonEditableField>text,`,`${a} .blocklyEditableField>text {`,"fill: #000;","}",`${a} .blocklyFlyoutLabelText {`,"fill: #000;","}",`${a} .blocklyText.blocklyBubbleText {`,"fill: #000;","}",`${a} .blocklyEditableField:not(.blocklyEditing):hover>rect {`,"stroke: #fff;","stroke-width: 2;","}",`${a} .blocklyHtmlInput {`,`font-family: ${this.FIELD_TEXT_FONTFAMILY};`,`font-weight: ${this.FIELD_TEXT_FONTWEIGHT};`,
2195
- "}",`${a} .blocklySelected>.blocklyPath {`,"stroke: #fc3;","stroke-width: 3px;","}",`${a} .blocklyHighlightedConnectionPath {`,"stroke: #fc3;","}",`${a} .blocklyReplaceable .blocklyPath {`,"fill-opacity: .5;","}",`${a} .blocklyReplaceable .blocklyPathLight,`,`${a} .blocklyReplaceable .blocklyPathDark {`,"display: none;","}",`${a} .blocklyInsertionMarker>.blocklyPath {`,`fill-opacity: ${this.INSERTION_MARKER_OPACITY};`,"stroke: none;","}"]}},module$build$src$core$renderers$common$constants={};
2196
- module$build$src$core$renderers$common$constants.ConstantProvider=ConstantProvider$$module$build$src$core$renderers$common$constants;module$build$src$core$renderers$common$constants.isDynamicShape=isDynamicShape$$module$build$src$core$renderers$common$constants;module$build$src$core$renderers$common$constants.isNotch=isNotch$$module$build$src$core$renderers$common$constants;module$build$src$core$renderers$common$constants.isPuzzleTab=isPuzzleTab$$module$build$src$core$renderers$common$constants;var Drawer$$module$build$src$core$renderers$common$drawer=class{constructor(a,b){this.inlinePath_=this.outlinePath_="";this.block_=a;this.info_=b;this.topLeft_=a.getRelativeToSurfaceXY();this.constants_=b.getRenderer().getConstants()}draw(){this.drawOutline_();this.drawInternals_();this.updateConnectionHighlights();this.block_.pathObject.setPath(this.outlinePath_+"\n"+this.inlinePath_);this.info_.RTL&&this.block_.pathObject.flipRTL();this.recordSizeOnBlock_()}recordSizeOnBlock_(){this.block_.height=
2185
+ "flood-opacity":.5,result:"outColor"},a);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.FECOMPOSITE,{"in":"outColor",in2:"outBlur",operator:"in",result:"outGlow"},a);this.debugFilterId=a.id;this.debugFilter=a}}injectCSS_(a,b){if(typeof window!=="undefined"){var c;if((c=injectionSites$$module$build$src$core$renderers$common$constants.get(b))==null||!c.has(a)){c=document.createElement("style");c.className="blockly-renderer-style";c.textContent=this.getCSS_(b).join("\n");
2186
+ (a instanceof ShadowRoot?a:document.head).prepend(c);var d;c=(d=injectionSites$$module$build$src$core$renderers$common$constants.get(b))!=null?d:new WeakSet;c.add(a);injectionSites$$module$build$src$core$renderers$common$constants.set(b,c)}}}getCSS_(a){return[`${a}.injectionDiv {`,"--blockly-active-node-color: #fc3;","}",`${a} .blocklyText, `,`${a} .blocklyFlyoutLabelText {`,`font: ${this.FIELD_TEXT_FONTWEIGHT} ${this.FIELD_TEXT_FONTSIZE}pt ${this.FIELD_TEXT_FONTFAMILY};`,"}",`${a} .blocklyText {`,
2187
+ "fill: #fff;","}",`${a} .blocklyNonEditableField>rect,`,`${a} .blocklyEditableField>rect {`,`fill: ${this.FIELD_BORDER_RECT_COLOUR};`,"fill-opacity: .6;","stroke: none;","}",`${a} .blocklyNonEditableField>text,`,`${a} .blocklyEditableField>text {`,"fill: #000;","}",`${a} .blocklyFlyoutLabelText {`,"fill: #000;","}",`${a} .blocklyText.blocklyBubbleText {`,"fill: #000;","}",`${a} .blocklyEditableField:not(.blocklyEditing):hover>rect {`,"stroke: #fff;","stroke-width: 2;","}",`${a} .blocklyHtmlInput {`,
2188
+ `font-family: ${this.FIELD_TEXT_FONTFAMILY};`,`font-weight: ${this.FIELD_TEXT_FONTWEIGHT};`,"}",`${a} .blocklySelected>.blocklyPath {`,"stroke: #fc3;","stroke-width: 3px;","}",`${a} .blocklyHighlightedConnectionPath {`,"stroke: #fc3;","}",`${a} .blocklyReplaceable .blocklyPath {`,"fill-opacity: .5;","}",`${a} .blocklyReplaceable .blocklyPathLight,`,`${a} .blocklyReplaceable .blocklyPathDark {`,"display: none;","}",`${a} .blocklyInsertionMarker>.blocklyPath {`,`fill-opacity: ${this.INSERTION_MARKER_OPACITY};`,
2189
+ "stroke: none;","}"]}},module$build$src$core$renderers$common$constants={};module$build$src$core$renderers$common$constants.ConstantProvider=ConstantProvider$$module$build$src$core$renderers$common$constants;module$build$src$core$renderers$common$constants.isDynamicShape=isDynamicShape$$module$build$src$core$renderers$common$constants;module$build$src$core$renderers$common$constants.isNotch=isNotch$$module$build$src$core$renderers$common$constants;
2190
+ module$build$src$core$renderers$common$constants.isPuzzleTab=isPuzzleTab$$module$build$src$core$renderers$common$constants;var Drawer$$module$build$src$core$renderers$common$drawer=class{constructor(a,b){this.inlinePath_=this.outlinePath_="";this.block_=a;this.info_=b;this.topLeft_=a.getRelativeToSurfaceXY();this.constants_=b.getRenderer().getConstants()}draw(){this.drawOutline_();this.drawInternals_();this.updateConnectionHighlights();this.block_.pathObject.setPath(this.outlinePath_+"\n"+this.inlinePath_);this.info_.RTL&&this.block_.pathObject.flipRTL();this.recordSizeOnBlock_()}recordSizeOnBlock_(){this.block_.height=
2197
2191
  this.info_.height;this.block_.width=this.info_.widthWithChildren;this.block_.childlessWidth=this.info_.width}drawOutline_(){this.drawTop_();for(let a=1;a<this.info_.rows.length-1;a++){let b=this.info_.rows[a];b.hasJaggedEdge?this.drawJaggedEdge_(b):b.hasStatement?this.drawStatementInput_(b):b.hasExternalInput?this.drawValueInput_(b):this.drawRightSideRow_(b)}this.drawBottom_();this.drawLeft_()}drawTop_(){var a=this.info_.topRow,b=a.elements;this.positionPreviousConnection_();this.outlinePath_+=moveBy$$module$build$src$core$utils$svg_paths(a.xPos,
2198
2192
  this.info_.startY);for(let c=0,d;d=b[c];c++)Types$$module$build$src$core$renderers$measurables$types.isLeftRoundedCorner(d)?this.outlinePath_+=this.constants_.OUTSIDE_CORNERS.topLeft:Types$$module$build$src$core$renderers$measurables$types.isRightRoundedCorner(d)?this.outlinePath_+=this.constants_.OUTSIDE_CORNERS.topRight:Types$$module$build$src$core$renderers$measurables$types.isPreviousConnection(d)?this.outlinePath_+=d.shape.pathLeft:Types$$module$build$src$core$renderers$measurables$types.isHat(d)?
2199
2193
  this.outlinePath_+=this.constants_.START_HAT.path:Types$$module$build$src$core$renderers$measurables$types.isSpacer(d)&&(this.outlinePath_+=lineOnAxis$$module$build$src$core$utils$svg_paths("h",d.width));this.outlinePath_+=lineOnAxis$$module$build$src$core$utils$svg_paths("v",a.height-a.ascenderHeight)}drawJaggedEdge_(a){this.outlinePath_+=this.constants_.JAGGED_TEETH.path+lineOnAxis$$module$build$src$core$utils$svg_paths("v",a.height-this.constants_.JAGGED_TEETH.height)}drawValueInput_(a){var b=
@@ -2248,8 +2242,8 @@ module$build$src$core$renderers$common$block_rendering.SpacerRow=SpacerRow$$modu
2248
2242
  module$build$src$core$renderers$common$block_rendering.Types=Types$$module$build$src$core$renderers$measurables$types;module$build$src$core$renderers$common$block_rendering.init=init$$module$build$src$core$renderers$common$block_rendering;module$build$src$core$renderers$common$block_rendering.register=register$$module$build$src$core$renderers$common$block_rendering;module$build$src$core$renderers$common$block_rendering.unregister=unregister$$module$build$src$core$renderers$common$block_rendering;var ThemeManager$$module$build$src$core$theme_manager=class{constructor(a,b){this.workspace=a;this.theme=b;this.subscribedWorkspaces=[];this.componentDB=new Map}getTheme(){return this.theme}setTheme(a){var b=this.theme;this.theme=a;if(a=this.workspace.getInjectionDiv())b&&(b=b.getClassName())&&removeClass$$module$build$src$core$utils$dom(a,b),(b=this.theme.getClassName())&&addClass$$module$build$src$core$utils$dom(a,b);for(let c=0,d;d=this.subscribedWorkspaces[c];c++)d.refreshTheme();for(let [c,d]of this.componentDB)for(let e of d){a=
2249
2243
  e.element;b=e.propertyName;let f=this.theme&&this.theme.getComponentStyle(c);a.style.setProperty(b,f||"")}for(let c of this.subscribedWorkspaces)c.hideChaff()}subscribeWorkspace(a){this.subscribedWorkspaces.push(a)}unsubscribeWorkspace(a){if(!removeElem$$module$build$src$core$utils$array(this.subscribedWorkspaces,a))throw Error("Cannot unsubscribe a workspace that hasn't been subscribed.");}subscribe(a,b,c){this.componentDB.has(b)||this.componentDB.set(b,[]);this.componentDB.get(b).push({element:a,
2250
2244
  propertyName:c});b=this.theme&&this.theme.getComponentStyle(b);a.style.setProperty(c,b||"")}unsubscribe(a){if(a)for(let [b,c]of this.componentDB){for(let d=c.length-1;d>=0;d--)c[d].element===a&&c.splice(d,1);c.length||this.componentDB.delete(b)}}dispose(){this.subscribedWorkspaces.length=0;this.componentDB.clear()}},module$build$src$core$theme_manager={};module$build$src$core$theme_manager.ThemeManager=ThemeManager$$module$build$src$core$theme_manager;var CATEGORY_NAME$$module$build$src$core$variables_dynamic="VARIABLE_DYNAMIC",onCreateVariableButtonClick_String$$module$build$src$core$variables_dynamic=stringButtonClickHandler$$module$build$src$core$variables_dynamic,onCreateVariableButtonClick_Number$$module$build$src$core$variables_dynamic=numberButtonClickHandler$$module$build$src$core$variables_dynamic,onCreateVariableButtonClick_Colour$$module$build$src$core$variables_dynamic=colourButtonClickHandler$$module$build$src$core$variables_dynamic,
2251
- module$build$src$core$variables_dynamic={CATEGORY_NAME:CATEGORY_NAME$$module$build$src$core$variables_dynamic};module$build$src$core$variables_dynamic.flyoutCategory=flyoutCategory$$module$build$src$core$variables_dynamic;module$build$src$core$variables_dynamic.flyoutCategoryBlocks=flyoutCategoryBlocks$$module$build$src$core$variables_dynamic;module$build$src$core$variables_dynamic.internalFlyoutCategory=internalFlyoutCategory$$module$build$src$core$variables_dynamic;
2252
- module$build$src$core$variables_dynamic.onCreateVariableButtonClick_Colour=colourButtonClickHandler$$module$build$src$core$variables_dynamic;module$build$src$core$variables_dynamic.onCreateVariableButtonClick_Number=numberButtonClickHandler$$module$build$src$core$variables_dynamic;module$build$src$core$variables_dynamic.onCreateVariableButtonClick_String=stringButtonClickHandler$$module$build$src$core$variables_dynamic;var ConnectionChecker$$module$build$src$core$connection_checker=class{canConnect(a,b,c,d){return this.canConnectWithReason(a,b,c,d)===Connection$$module$build$src$core$connection.CAN_CONNECT}canConnectWithReason(a,b,c,d){var e=this.doSafetyChecks(a,b);return e!==Connection$$module$build$src$core$connection.CAN_CONNECT?e:this.doTypeChecks(a,b)?c&&!this.doDragChecks(a,b,d||0)?Connection$$module$build$src$core$connection.REASON_DRAG_CHECKS_FAILED:Connection$$module$build$src$core$connection.CAN_CONNECT:
2245
+ module$build$src$core$variables_dynamic={CATEGORY_NAME:CATEGORY_NAME$$module$build$src$core$variables_dynamic};module$build$src$core$variables_dynamic.flyoutCategory=flyoutCategory$$module$build$src$core$variables_dynamic;module$build$src$core$variables_dynamic.flyoutCategoryBlocks=flyoutCategoryBlocks$$module$build$src$core$variables_dynamic;module$build$src$core$variables_dynamic.onCreateVariableButtonClick_Colour=colourButtonClickHandler$$module$build$src$core$variables_dynamic;
2246
+ module$build$src$core$variables_dynamic.onCreateVariableButtonClick_Number=numberButtonClickHandler$$module$build$src$core$variables_dynamic;module$build$src$core$variables_dynamic.onCreateVariableButtonClick_String=stringButtonClickHandler$$module$build$src$core$variables_dynamic;var ConnectionChecker$$module$build$src$core$connection_checker=class{canConnect(a,b,c,d){return this.canConnectWithReason(a,b,c,d)===Connection$$module$build$src$core$connection.CAN_CONNECT}canConnectWithReason(a,b,c,d){var e=this.doSafetyChecks(a,b);return e!==Connection$$module$build$src$core$connection.CAN_CONNECT?e:this.doTypeChecks(a,b)?c&&!this.doDragChecks(a,b,d||0)?Connection$$module$build$src$core$connection.REASON_DRAG_CHECKS_FAILED:Connection$$module$build$src$core$connection.CAN_CONNECT:
2253
2247
  Connection$$module$build$src$core$connection.REASON_CHECKS_FAILED}getErrorMessage(a,b,c){switch(a){case Connection$$module$build$src$core$connection.REASON_SELF_CONNECTION:return"Attempted to connect a block to itself.";case Connection$$module$build$src$core$connection.REASON_DIFFERENT_WORKSPACES:return"Blocks not on same workspace.";case Connection$$module$build$src$core$connection.REASON_WRONG_TYPE:return"Attempt to connect incompatible types.";case Connection$$module$build$src$core$connection.REASON_TARGET_NULL:return"Target connection is null.";
2254
2248
  case Connection$$module$build$src$core$connection.REASON_CHECKS_FAILED:return"Connection checks failed. "+(b+" expected "+b.getCheck()+", found "+c.getCheck());case Connection$$module$build$src$core$connection.REASON_SHADOW_PARENT:return"Connecting non-shadow to shadow block.";case Connection$$module$build$src$core$connection.REASON_DRAG_CHECKS_FAILED:return"Drag checks failed.";case Connection$$module$build$src$core$connection.REASON_PREVIOUS_AND_OUTPUT:return"Block would have an output and a previous connection.";
2255
2249
  default:return"Unknown connection failure: this should never happen!"}}doSafetyChecks(a,b){if(!a||!b)return Connection$$module$build$src$core$connection.REASON_TARGET_NULL;if(a.isSuperior()){var c=a.getSourceBlock();var d=b.getSourceBlock();var e=b}else d=a.getSourceBlock(),c=b.getSourceBlock(),e=a,a=b;return c===d?Connection$$module$build$src$core$connection.REASON_SELF_CONNECTION:e.type!==OPPOSITE_TYPE$$module$build$src$core$internal_constants[a.type]?Connection$$module$build$src$core$connection.REASON_WRONG_TYPE:
@@ -2259,21 +2253,17 @@ Connection$$module$build$src$core$connection.CAN_CONNECT}doTypeChecks(a,b){a=a.g
2259
2253
  break;default:return!1}return draggingConnections$$module$build$src$core$common.includes(b)?!1:!0}canConnectToPrevious_(a,b){if(a.targetConnection||draggingConnections$$module$build$src$core$common.includes(b))return!1;if(!b.targetConnection)return!0;a=b.targetBlock();return a.isInsertionMarker()?!a.getPreviousBlock():!1}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.CONNECTION_CHECKER,DEFAULT$$module$build$src$core$registry,ConnectionChecker$$module$build$src$core$connection_checker);
2260
2254
  var module$build$src$core$connection_checker={};module$build$src$core$connection_checker.ConnectionChecker=ConnectionChecker$$module$build$src$core$connection_checker;var Workspace$$module$build$src$core$workspace=class{get isFlyout(){return this.internalIsFlyout}get isMutator(){return this.internalIsMutator}constructor(a){this.isClearing=this.internalIsMutator=this.internalIsFlyout=this.rendered=!1;this.MAX_UNDO=1024;this.connectionDBList=[];this.topBlocks=[];this.topComments=[];this.commentDB=new Map;this.listeners=[];this.undoStack_=[];this.redoStack_=[];this.blockDB=new Map;this.typedBlocksDB=new Map;this.procedureMap=new ObservableProcedureMap$$module$build$src$core$observable_procedure_map;
2261
2255
  this.readOnly=!1;this.potentialVariableMap=null;this.id=genUid$$module$build$src$core$utils$idgenerator();registerWorkspace$$module$build$src$core$common(this);this.options=a||new Options$$module$build$src$core$options({});this.RTL=!!this.options.RTL;this.horizontalLayout=!!this.options.horizontalLayout;this.toolboxPosition=this.options.toolboxPosition;this.connectionChecker=new (getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.CONNECTION_CHECKER,this.options,
2262
- !0))(this);this.variableMap=new (this.getVariableMapClass())(this);this.setIsReadOnly(this.options.readOnly)}dispose(){this.listeners.length=0;this.clear();unregisterWorkpace$$module$build$src$core$common(this)}sortObjects(a,b){var c=d=>({getBoundingRectangle:()=>{var e=d.getRelativeToSurfaceXY();return new Rect$$module$build$src$core$utils$rect(e.y,e.y,e.x,e.x)},moveBy:()=>{}});return this.sortByOrigin(c(a),c(b))}sortByOrigin(a,b){var c=Math.sin(toRadians$$module$build$src$core$utils$math(Workspace$$module$build$src$core$workspace.SCAN_ANGLE))*
2256
+ !0))(this);this.variableMap=new (this.getVariableMapClass())(this);this.setIsReadOnly(this.options.readOnly)}dispose(){this.listeners.length=0;this.clear();unregisterWorkspace$$module$build$src$core$common(this)}sortObjects(a,b){var c=d=>({getBoundingRectangle:()=>{var e=d.getRelativeToSurfaceXY();return new Rect$$module$build$src$core$utils$rect(e.y,e.y,e.x,e.x)},moveBy:()=>{}});return this.sortByOrigin(c(a),c(b))}sortByOrigin(a,b){var c=Math.sin(toRadians$$module$build$src$core$utils$math(Workspace$$module$build$src$core$workspace.SCAN_ANGLE))*
2263
2257
  (this.RTL?-1:1);a=a.getBoundingRectangle().getOrigin();b=b.getBoundingRectangle().getOrigin();return a.y+c*a.x-(b.y+c*b.x)}addTopBlock(a){this.topBlocks.push(a)}removeTopBlock(a){if(!removeElem$$module$build$src$core$utils$array(this.topBlocks,a))throw Error("Block not present in workspace's list of top-most blocks.");}getTopBlocks(a=!1){var b=[].concat(this.topBlocks);a&&b.length>1&&b.sort(this.sortObjects.bind(this));return b}addTypedBlock(a){this.typedBlocksDB.has(a.type)||this.typedBlocksDB.set(a.type,
2264
2258
  []);this.typedBlocksDB.get(a.type).push(a)}removeTypedBlock(a){removeElem$$module$build$src$core$utils$array(this.typedBlocksDB.get(a.type),a);this.typedBlocksDB.get(a.type).length||this.typedBlocksDB.delete(a.type)}getBlocksByType(a,b=!1){if(!this.typedBlocksDB.has(a))return[];a=this.typedBlocksDB.get(a).slice(0);b&&a&&a.length>1&&a.sort(this.sortObjects.bind(this));return a.filter(c=>!c.isInsertionMarker())}addTopComment(a){this.topComments.push(a);this.commentDB.has(a.id)&&console.warn('Overriding an existing comment on this workspace, with id "'+
2265
2259
  a.id+'"');this.commentDB.set(a.id,a)}removeTopComment(a){if(!removeElem$$module$build$src$core$utils$array(this.topComments,a))throw Error("Comment not present in workspace's list of top-most comments.");this.commentDB.delete(a.id)}getTopComments(a=!1){var b=[].concat(this.topComments);a&&b.length>1&&b.sort(this.sortObjects.bind(this));return b}getAllBlocks(a=!1){if(a){var b=this.getTopBlocks(!0);a=[];for(let c=0;c<b.length;c++)a.push(...b[c].getDescendants(!0))}else for(a=this.getTopBlocks(!1),b=
2266
2260
  0;b<a.length;b++)a.push(...a[b].getChildren(!1));return a.filter(c=>!c.isInsertionMarker())}clear(){this.isClearing=!0;try{let a=$.getGroup$$module$build$src$core$events$utils();for(a||$.setGroup$$module$build$src$core$events$utils(!0);this.topBlocks.length;)this.topBlocks[0].dispose(!1);for(;this.topComments.length;)this.topComments[this.topComments.length-1].dispose();$.setGroup$$module$build$src$core$events$utils(a);this.isFlyout||this.variableMap.clear();this.potentialVariableMap&&this.potentialVariableMap.clear()}finally{this.isClearing=
2267
- !1}}renameVariableById(a,b){$.warn$$module$build$src$core$utils$deprecation("Blockly.Workspace.renameVariableById","v12","v13","Blockly.Workspace.getVariableMap().renameVariable");(a=this.variableMap.getVariableById(a))&&this.variableMap.renameVariable(a,b)}createVariable(a,b,c){$.warn$$module$build$src$core$utils$deprecation("Blockly.Workspace.createVariable","v12","v13","Blockly.Workspace.getVariableMap().createVariable");return this.variableMap.createVariable(a,b!=null?b:void 0,c!=null?c:void 0)}getVariableUsesById(a){$.warn$$module$build$src$core$utils$deprecation("Blockly.Workspace.getVariableUsesById",
2268
- "v12","v13","Blockly.Variables.getVariableUsesById");return getVariableUsesById$$module$build$src$core$variables(this,a)}deleteVariableById(a){$.warn$$module$build$src$core$utils$deprecation("Blockly.Workspace.deleteVariableById","v12","v13","Blockly.Workspace.getVariableMap().deleteVariable");var b=this.variableMap.getVariableById(a);b?$.deleteVariable$$module$build$src$core$variables(this,b):console.warn(`Can't delete non-existent variable: ${a}`)}getVariable(a,b){$.warn$$module$build$src$core$utils$deprecation("Blockly.Workspace.getVariable",
2269
- "v12","v13","Blockly.Workspace.getVariableMap().getVariable");return this.variableMap.getVariable(a,b)}getVariableById(a){$.warn$$module$build$src$core$utils$deprecation("Blockly.Workspace.getVariableById","v12","v13","Blockly.Workspace.getVariableMap().getVariableById");return this.variableMap.getVariableById(a)}getVariablesOfType(a){$.warn$$module$build$src$core$utils$deprecation("Blockly.Workspace.getVariablesOfType","v12","v13","Blockly.Workspace.getVariableMap().getVariablesOfType");return this.variableMap.getVariablesOfType(a!=
2270
- null?a:"")}getAllVariables(){$.warn$$module$build$src$core$utils$deprecation("Blockly.Workspace.getAllVariables","v12","v13","Blockly.Workspace.getVariableMap().getAllVariables");return this.variableMap.getAllVariables()}getAllVariableNames(){$.warn$$module$build$src$core$utils$deprecation("Blockly.Workspace.getAllVariableNames","v12","v13","Blockly.Workspace.getVariableMap().getAllVariables");return this.variableMap.getAllVariables().map(a=>a.getName())}getWidth(){return 0}newBlock(a,b){throw Error("The implementation of newBlock should be monkey-patched in by blockly.ts");
2271
- }newComment(a){throw Error("The implementation of newComment should be monkey-patched in by blockly.ts");}remainingCapacity(){return isNaN(this.options.maxBlocks)?Infinity:this.options.maxBlocks-this.getAllBlocks(!1).length}remainingCapacityOfType(a){return this.options.maxInstances?(this.options.maxInstances[a]!==void 0?this.options.maxInstances[a]:Infinity)-this.getBlocksByType(a,!1).length:Infinity}isCapacityAvailable(a){if(!this.hasBlockLimits())return!0;var b=0;for(let c in a){if(a[c]>this.remainingCapacityOfType(c))return!1;
2272
- b+=a[c]}return b>this.remainingCapacity()?!1:!0}hasBlockLimits(){return this.options.maxBlocks!==Infinity||!!this.options.maxInstances}getUndoStack(){return this.undoStack_}getRedoStack(){return this.redoStack_}undo(a=!1){var b=a?this.redoStack_:this.undoStack_,c=a?this.undoStack_:this.redoStack_,d=b.pop();if(d){for(var e=[d];b.length&&d.group&&d.group===b[b.length-1].group;){let f=b.pop();f&&e.push(f)}for(b=0;b<e.length;b++)c.push(e[b]);$.setRecordUndo$$module$build$src$core$events$utils(!1);try{for(c=
2273
- 0;c<e.length;c++)e[c].run(a)}finally{$.setRecordUndo$$module$build$src$core$events$utils(!0)}}}redo(){this.undo(!0)}clearUndo(){this.undoStack_.length=0;this.redoStack_.length=0;clearPendingUndo$$module$build$src$core$events$utils()}addChangeListener(a){this.listeners.push(a);return a}removeChangeListener(a){removeElem$$module$build$src$core$utils$array(this.listeners,a)}fireChangeListener(a){if(a.recordUndo)for(this.undoStack_.push(a),this.redoStack_.length=0;this.undoStack_.length>this.MAX_UNDO&&
2274
- this.MAX_UNDO>=0;)this.undoStack_.shift();for(let b=0;b<this.listeners.length;b++)(0,this.listeners[b])(a)}getBlockById(a){return this.blockDB.get(a)||null}setBlockById(a,b){this.blockDB.set(a,b)}removeBlockById(a){this.blockDB.delete(a)}getCommentById(a){var b;return(b=this.commentDB.get(a))!=null?b:null}allInputsFilled(a){var b=this.getTopBlocks(!1);for(let c=0;c<b.length;c++)if(!b[c].allInputsFilled(a))return!1;return!0}getPotentialVariableMap(){return this.potentialVariableMap}createPotentialVariableMap(){this.potentialVariableMap=
2275
- new (this.getVariableMapClass())(this,!0)}getVariableMap(){return this.variableMap}setVariableMap(a){this.variableMap=a}getProcedureMap(){return this.procedureMap}getRootWorkspace(){var a=null,b=this.options.parentWorkspace;this.isFlyout?b&&b.options&&(a=b.options.parentWorkspace):b&&(a=b);return a}static getById(a){return getWorkspaceById$$module$build$src$core$common(a)}static getAll(){return getAllWorkspaces$$module$build$src$core$common()}getVariableMapClass(){var a=getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.VARIABLE_MAP,
2276
- this.options,!0);if(!a)throw Error("No variable map is registered.");return a}isReadOnly(){return this.readOnly}setIsReadOnly(a){this.readOnly=a;this.options.readOnly=a}};Workspace$$module$build$src$core$workspace.SCAN_ANGLE=3;var module$build$src$core$workspace={};module$build$src$core$workspace.Workspace=Workspace$$module$build$src$core$workspace;var SOUND_LIMIT$$module$build$src$core$workspace_audio=100,WorkspaceAudio$$module$build$src$core$workspace_audio=class{constructor(a){this.parentWorkspace=a;this.sounds=new Map;this.lastSound=null;this.muted=!1;window.AudioContext&&(this.context=new AudioContext)}dispose(){this.sounds.clear();var a;(a=this.context)==null||a.close()}load(a,b){var c=this;return(0,$jscomp.asyncExecutePromiseGeneratorFunction)(function*(){if(a.length){var d=yield(yield fetch(a[0])).arrayBuffer(),e;(e=c.context)==null||
2261
+ !1}}getWidth(){return 0}newBlock(a,b){throw Error("The implementation of newBlock should be monkey-patched in by blockly.ts");}newComment(a){throw Error("The implementation of newComment should be monkey-patched in by blockly.ts");}remainingCapacity(){return isNaN(this.options.maxBlocks)?Infinity:this.options.maxBlocks-this.getAllBlocks(!1).length}remainingCapacityOfType(a){return this.options.maxInstances?(this.options.maxInstances[a]!==void 0?this.options.maxInstances[a]:Infinity)-this.getBlocksByType(a,
2262
+ !1).length:Infinity}isCapacityAvailable(a){if(!this.hasBlockLimits())return!0;var b=0;for(let c in a){if(a[c]>this.remainingCapacityOfType(c))return!1;b+=a[c]}return b>this.remainingCapacity()?!1:!0}hasBlockLimits(){return this.options.maxBlocks!==Infinity||!!this.options.maxInstances}getUndoStack(){return this.undoStack_}getRedoStack(){return this.redoStack_}undo(a=!1){var b=a?this.redoStack_:this.undoStack_,c=a?this.undoStack_:this.redoStack_,d=b.pop();if(d){for(var e=[d];b.length&&d.group&&d.group===
2263
+ b[b.length-1].group;){let f=b.pop();f&&e.push(f)}for(b=0;b<e.length;b++)c.push(e[b]);$.setRecordUndo$$module$build$src$core$events$utils(!1);try{for(c=0;c<e.length;c++)e[c].run(a)}finally{$.setRecordUndo$$module$build$src$core$events$utils(!0)}}}redo(){this.undo(!0)}clearUndo(){this.undoStack_.length=0;this.redoStack_.length=0;clearPendingUndo$$module$build$src$core$events$utils()}addChangeListener(a){this.listeners.push(a);return a}removeChangeListener(a){removeElem$$module$build$src$core$utils$array(this.listeners,
2264
+ a)}fireChangeListener(a){if(a.recordUndo)for(this.undoStack_.push(a),this.redoStack_.length=0;this.undoStack_.length>this.MAX_UNDO&&this.MAX_UNDO>=0;)this.undoStack_.shift();for(let b=0;b<this.listeners.length;b++)(0,this.listeners[b])(a)}getBlockById(a){return this.blockDB.get(a)||null}setBlockById(a,b){this.blockDB.set(a,b)}removeBlockById(a){this.blockDB.delete(a)}getCommentById(a){var b;return(b=this.commentDB.get(a))!=null?b:null}allInputsFilled(a){var b=this.getTopBlocks(!1);for(let c=0;c<b.length;c++)if(!b[c].allInputsFilled(a))return!1;
2265
+ return!0}getPotentialVariableMap(){return this.potentialVariableMap}createPotentialVariableMap(){this.potentialVariableMap=new (this.getVariableMapClass())(this,!0)}getVariableMap(){return this.variableMap}setVariableMap(a){this.variableMap=a}getProcedureMap(){return this.procedureMap}getRootWorkspace(){var a=null,b=this.options.parentWorkspace;this.isFlyout?b&&b.options&&(a=b.options.parentWorkspace):b&&(a=b);return a}static getById(a){return getWorkspaceById$$module$build$src$core$common(a)}static getAll(){return getAllWorkspaces$$module$build$src$core$common()}getVariableMapClass(){var a=
2266
+ getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.VARIABLE_MAP,this.options,!0);if(!a)throw Error("No variable map is registered.");return a}isReadOnly(){return this.readOnly}setIsReadOnly(a){this.readOnly=a;this.options.readOnly=a}};Workspace$$module$build$src$core$workspace.SCAN_ANGLE=3;var module$build$src$core$workspace={};module$build$src$core$workspace.Workspace=Workspace$$module$build$src$core$workspace;var SOUND_LIMIT$$module$build$src$core$workspace_audio=100,WorkspaceAudio$$module$build$src$core$workspace_audio=class{constructor(a){this.parentWorkspace=a;this.sounds=new Map;this.lastSound=null;this.muted=!1;window.AudioContext&&(this.context=new AudioContext)}dispose(){this.sounds.clear();var a;(a=this.context)==null||a.close()}load(a,b){var c=this;return(0,$jscomp.asyncExecutePromiseGeneratorFunction)(function*(){if(a.length){var d=yield(yield fetch(a[0])).arrayBuffer(),e;(e=c.context)==null||
2277
2267
  e.decodeAudioData(d,f=>{c.sounds.set(b,f)})}})}play(a,b){var c=this;return(0,$jscomp.asyncExecutePromiseGeneratorFunction)(function*(){if(c.isPlayingAllowed()&&b!==0){var d=c.sounds.get(a);if(d){yield c.prepareToPlay();let e=c.context.createBufferSource(),f=c.context.createGain();f.gain.value=b!=null?b:1;f.connect(c.context.destination);e.buffer=d;e.connect(f);e.addEventListener("ended",()=>{e.disconnect();f.disconnect()});e.start()}else c.parentWorkspace&&c.parentWorkspace.getAudioManager().play(a,
2278
2268
  b)}})}beep(a,b=.2){var c=this;return(0,$jscomp.asyncExecutePromiseGeneratorFunction)(function*(){if(c.isPlayingAllowed()){yield c.prepareToPlay();var d=c.context.createOscillator();d.type="sine";d.frequency.setValueAtTime(a,c.context.currentTime);var e=c.context.createGain();e.gain.setValueAtTime(0,c.context.currentTime);e.gain.linearRampToValueAtTime(.5,c.context.currentTime+.01);e.gain.linearRampToValueAtTime(0,c.context.currentTime+b);d.connect(e);e.connect(c.context.destination);d.start(c.context.currentTime);
2279
2269
  d.stop(c.context.currentTime+b)}})}playErrorBeep(){var a=this;return(0,$jscomp.asyncExecutePromiseGeneratorFunction)(function*(){return a.beep(260)})}maybePlayScopeChangeAudioCue(a){if(keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.getScopeChangeAudioCuesEnabled()){var b=this.parentWorkspace.getNavigator(),c=b.getSourceBlockFromNode($.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode());a=b.getSourceBlockFromNode(a);b=0;c&&a&&c.getNestingLevel()!==
@@ -2281,44 +2271,45 @@ d.stop(c.context.currentTime+b)}})}playErrorBeep(){var a=this;return(0,$jscomp.a
2281
2271
  {};module$build$src$core$workspace_audio.WorkspaceAudio=WorkspaceAudio$$module$build$src$core$workspace_audio;var ZOOM_TO_FIT_MARGIN$$module$build$src$core$workspace_svg=20,WorkspaceSvg$$module$build$src$core$workspace_svg=class extends Workspace$$module$build$src$core$workspace{constructor(a){super(a);this.resizeHandlerWrapper=null;this.resizesEnabled=this.visible=this.rendered=!0;this.startScrollY=this.startScrollX=this.scrollY=this.scrollX=0;this.oldScale=this.scale=1;this.oldLeft=this.oldTop=0;this.inverseScreenCTM=this.targetWorkspace=this.dummyWheelListener=this.configureContextMenu=this.lastRecordedPageScroll=
2282
2272
  this.injectionDiv=this.currentGesture_=this.toolbox=this.flyout=this.scrollbar=this.trashcan=null;this.inverseScreenCTMDirty=!0;this.highlightedBlocks=[];this.toolboxCategoryCallbacks=new Map;this.flyoutButtonCallbacks=new Map;this.cachedParentSvg=null;this.topBoundedElements=[];this.dragTargetAreas=[];this.workspaceSelectionRing=this.workspaceFocusRing=this.zoomControls_=this.layerManager=null;this.navigator=new Navigator$$module$build$src$core$keyboard_nav$navigators$navigator;this.metricsManager=
2283
2273
  new (getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.METRICS_MANAGER,a,!0))(this);this.getMetrics=a.getMetrics||this.metricsManager.getMetrics.bind(this.metricsManager);this.setMetrics=a.setMetrics||WorkspaceSvg$$module$build$src$core$workspace_svg.setTopLevelWorkspaceMetrics;this.componentManager=new ComponentManager$$module$build$src$core$component_manager;this.connectionDBList=ConnectionDB$$module$build$src$core$connection_db.init(this.connectionChecker);
2284
- var b;this.audioManager=new WorkspaceAudio$$module$build$src$core$workspace_audio((b=a.parentWorkspace)!=null?b:this);this.grid=this.options.gridPattern?new Grid$$module$build$src$core$grid(this.options.gridPattern,a.gridOptions):null;module$build$src$core$variables&&internalFlyoutCategory$$module$build$src$core$variables&&this.registerToolboxCategoryCallback(CATEGORY_NAME$$module$build$src$core$variables,internalFlyoutCategory$$module$build$src$core$variables);module$build$src$core$variables_dynamic&&
2285
- internalFlyoutCategory$$module$build$src$core$variables_dynamic&&this.registerToolboxCategoryCallback(CATEGORY_NAME$$module$build$src$core$variables_dynamic,internalFlyoutCategory$$module$build$src$core$variables_dynamic);module$build$src$core$procedures&&internalFlyoutCategory$$module$build$src$core$procedures&&(this.registerToolboxCategoryCallback(CATEGORY_NAME$$module$build$src$core$procedures,internalFlyoutCategory$$module$build$src$core$procedures),this.addChangeListener(mutatorOpenListener$$module$build$src$core$procedures));
2286
- this.addChangeListener(this.variableChangeCallback.bind(this));this.themeManager_=this.options.parentWorkspace?this.options.parentWorkspace.getThemeManager():new ThemeManager$$module$build$src$core$theme_manager(this,this.options.theme||Classic$$module$build$src$core$theme$classic);this.themeManager_.subscribeWorkspace(this);var c;this.renderer=init$$module$build$src$core$renderers$common$block_rendering(this.options.renderer||"geras",this.getTheme(),(c=this.options.rendererOverrides)!=null?c:void 0);
2287
- this.cachedParentSvgSize=new Size$$module$build$src$core$utils$size(0,0)}getMetricsManager(){return this.metricsManager}setMetricsManager(a){this.metricsManager=a;this.getMetrics=this.metricsManager.getMetrics.bind(this.metricsManager)}getComponentManager(){return this.componentManager}getRenderer(){return this.renderer}getThemeManager(){return this.themeManager_}getTheme(){return this.themeManager_.getTheme()}setTheme(a){a||(a=Classic$$module$build$src$core$theme$classic);this.themeManager_.setTheme(a)}refreshTheme(){if(this.svgGroup_){var a=
2288
- this.options.parentWorkspace===null;this.renderer.refreshDom(this.svgGroup_,this.getTheme(),a?this.getInjectionDiv():void 0)}this.updateBlockStyles(this.getAllBlocks(!1).filter(b=>!!b.getStyleName()));this.refreshToolboxSelection();this.toolbox&&this.toolbox.refreshTheme();this.isVisible()&&this.setVisible(!0);a=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.THEME_CHANGE))(this.getTheme().name,this.id);fire$$module$build$src$core$events$utils(a)}updateBlockStyles(a){for(let b=
2289
- 0,c;c=a[b];b++){let d=c.getStyleName();d&&c.setStyle(d)}}getInverseScreenCTM(){if(this.inverseScreenCTMDirty){let a=this.getParentSvg().getScreenCTM();a&&(this.inverseScreenCTM=a.inverse(),this.inverseScreenCTMDirty=!1)}return this.inverseScreenCTM}updateInverseScreenCTM(){this.inverseScreenCTMDirty=!0}isVisible(){return this.visible}getSvgXY(a){var b=0,c=0,d=1;if(this.getCanvas().contains(a)||this.getBubbleCanvas().contains(a))d=this.scale;do{let e=getRelativeXY$$module$build$src$core$utils$svg_math(a);
2290
- if(a===this.getCanvas()||a===this.getBubbleCanvas())d=1;b+=e.x*d;c+=e.y*d;a=a.parentNode}while(a&&a!==this.getParentSvg()&&a!==this.getInjectionDiv());return new Coordinate$$module$build$src$core$utils$coordinate(b,c)}getCachedParentSvgSize(){var a=this.cachedParentSvgSize;return new Size$$module$build$src$core$utils$size(a.width,a.height)}getOriginOffsetInPixels(){return getInjectionDivXY$$module$build$src$core$utils$svg_math(this.getCanvas())}getInjectionDiv(){if(!this.injectionDiv){let a=this.svgGroup_;
2291
- for(;a;){if((" "+(a.getAttribute("class")||"")+" ").includes(" injectionDiv ")){this.injectionDiv=a;break}a=a.parentNode}}return this.injectionDiv}getSvgGroup(){return this.svgGroup_}getBlockCanvas(){return this.getCanvas()}setResizeHandlerWrapper(a){this.resizeHandlerWrapper=a}setInitialAriaContext(){if(!this.svgGroup_)throw Error("Must initialize svgGroup_ by calling `createDom` before calling setAriaContext");this.isFlyout||(setRole$$module$build$src$core$utils$aria(this.svgGroup_,Role$$module$build$src$core$utils$aria.REGION),
2292
- this.isMutator?setState$$module$build$src$core$utils$aria(this.svgGroup_,State$$module$build$src$core$utils$aria.LABEL,$.Msg$$module$build$src$core$msg.WORKSPACE_LABEL_MUTATOR_WORKSPACE):this.updateAriaLabel())}updateAriaLabel(){var a=this.getTopBlocks(!1).length;a==1?setState$$module$build$src$core$utils$aria(this.svgGroup_,State$$module$build$src$core$utils$aria.LABEL,$.Msg$$module$build$src$core$msg.WORKSPACE_LABEL_1_STACK):setState$$module$build$src$core$utils$aria(this.svgGroup_,State$$module$build$src$core$utils$aria.LABEL,
2293
- $.Msg$$module$build$src$core$msg.WORKSPACE_LABEL_MANY_STACKS.replace("%1",String(a)))}createDom(a,b){this.injectionDiv||(this.injectionDiv=b!=null?b:null);this.svgGroup_=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{"class":"blocklyWorkspace",id:this.id});a&&(this.svgBackground_=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{height:"100%",width:"100%","class":a},this.svgGroup_),a==="blocklyMainBackground"&&this.grid?
2294
- this.svgBackground_.style.fill="var(--blocklyGridPattern)":this.themeManager_.subscribe(this.svgBackground_,"workspaceBackgroundColour","fill"));this.workspaceSelectionRing=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{fill:"none",class:"blocklyWorkspaceSelectionRing"},this.svgGroup_);this.workspaceFocusRing=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{fill:"none",class:"blocklyWorkspaceFocusRing"},this.svgGroup_);
2295
- this.layerManager=new LayerManager$$module$build$src$core$layer_manager(this);this.svgBlockCanvas_=this.layerManager.getBlockLayer();this.svgBubbleCanvas_=this.layerManager.getBubbleLayer();this.setInitialAriaContext();this.isFlyout||(conditionalBind$$module$build$src$core$browser_events(this.svgGroup_,"pointerdown",this,this.onMouseDown,!1),this.dummyWheelListener=()=>{},document.body.addEventListener("wheel",this.dummyWheelListener,{passive:!0}),conditionalBind$$module$build$src$core$browser_events(this.svgGroup_,
2296
- "wheel",this,this.onMouseWheel,!1,{passive:!1}));this.options.hasCategories&&(this.toolbox=new (getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.TOOLBOX,this.options,!0))(this));this.grid&&this.grid.update(this.scale);this.recordDragTargets();a=this.options.parentWorkspace===null;this.renderer.createDom(this.svgGroup_,this.getTheme(),a?this.getInjectionDiv():void 0);$.getFocusManager$$module$build$src$core$focus_manager().registerTree(this,!!this.injectionDiv||
2297
- this.isFlyout);return this.svgGroup_}dispose(){this.rendered=!1;this.currentGesture_&&this.currentGesture_.cancel();this.svgGroup_&&removeNode$$module$build$src$core$utils$dom(this.svgGroup_);this.toolbox&&(this.toolbox.dispose(),this.toolbox=null);this.flyout&&(this.flyout.dispose(),this.flyout=null);this.trashcan&&(this.trashcan.dispose(),this.trashcan=null);this.scrollbar&&(this.scrollbar.dispose(),this.scrollbar=null);this.zoomControls_&&this.zoomControls_.dispose();this.audioManager&&this.audioManager.dispose();
2298
- this.grid&&(this.grid=null);this.renderer.dispose();super.dispose();this.themeManager_&&(this.themeManager_.unsubscribeWorkspace(this),this.themeManager_.unsubscribe(this.svgBackground_),this.options.parentWorkspace||this.themeManager_.dispose());this.connectionDBList.length=0;this.toolboxCategoryCallbacks.clear();this.flyoutButtonCallbacks.clear();if(!this.options.parentWorkspace){let c=this.getParentSvg();c&&c.parentNode&&removeNode$$module$build$src$core$utils$dom(c.parentNode)}this.resizeHandlerWrapper&&
2299
- (unbind$$module$build$src$core$browser_events(this.resizeHandlerWrapper),this.resizeHandlerWrapper=null);this.dummyWheelListener&&(document.body.removeEventListener("wheel",this.dummyWheelListener),this.dummyWheelListener=null);var a;(a=this.workspaceFocusRing)==null||a.remove();var b;(b=this.workspaceSelectionRing)==null||b.remove();$.getFocusManager$$module$build$src$core$focus_manager().isRegistered(this)&&$.getFocusManager$$module$build$src$core$focus_manager().unregisterTree(this)}addTrashcan(){this.trashcan=
2300
- WorkspaceSvg$$module$build$src$core$workspace_svg.newTrashcan(this);var a=this.trashcan.createDom();this.svgGroup_.insertBefore(a,this.getCanvas())}static newTrashcan(a){throw Error("The implementation of newTrashcan should be monkey-patched in by blockly.ts");}addZoomControls(){this.zoomControls_=new ZoomControls$$module$build$src$core$zoom_controls(this);var a=this.zoomControls_.createDom();this.svgGroup_.appendChild(a)}copyOptionsForFlyout(){return new Options$$module$build$src$core$options({parentWorkspace:this,
2301
- rtl:this.RTL,oneBasedIndex:this.options.oneBasedIndex,horizontalLayout:this.horizontalLayout,renderer:this.options.renderer,rendererOverrides:this.options.rendererOverrides,plugins:this.options.plugins,modalInputs:this.options.modalInputs,move:{scrollbars:!0}})}addFlyout(a){var b=this.copyOptionsForFlyout();b.toolboxPosition=this.options.toolboxPosition;this.flyout=this.horizontalLayout?new (getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.FLYOUTS_HORIZONTAL_TOOLBOX,
2302
- this.options,!0))(b):new (getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.FLYOUTS_VERTICAL_TOOLBOX,this.options,!0))(b);this.flyout.autoClose=!1;this.flyout.getWorkspace().setVisible(!0);return this.flyout.createDom(a)}getFlyout(a){return this.flyout||a?this.flyout:this.toolbox?this.toolbox.getFlyout():null}getToolbox(){return this.toolbox}updateScreenCalculations(){this.updateInverseScreenCTM();this.recordDragTargets()}resizeContents(){this.resizesEnabled&&
2303
- this.rendered&&(this.scrollbar&&this.scrollbar.resize(),this.updateInverseScreenCTM())}resize(){this.toolbox?this.toolbox.position():this.flyout&&this.flyout.position();var a=this.componentManager.getComponents(ComponentManager$$module$build$src$core$component_manager.Capability.POSITIONABLE,!0),b=this.getMetricsManager().getUiMetrics(),c=[];for(let d=0,e;e=a[d];d++){e.position(b,c);let f=e.getBoundingRectangle();f&&c.push(f)}this.scrollbar&&this.scrollbar.resize();this.updateScreenCalculations();
2304
- this.workspaceFocusRing&&this.workspaceSelectionRing&&(this.resizeWorkspaceRing(this.workspaceSelectionRing,5),this.resizeWorkspaceRing(this.workspaceFocusRing,0))}resizeWorkspaceRing(a,b){var c=this.getMetrics();a.setAttribute("x",`${c.absoluteLeft+b}`);a.setAttribute("y",`${c.absoluteTop+b}`);a.setAttribute("width",`${Math.max(0,c.viewWidth-b*2)}`);a.setAttribute("height",`${Math.max(0,c.svgHeight-b*2)}`)}updateScreenCalculationsIfScrolled(){var a=getDocumentScroll$$module$build$src$core$utils$svg_math();
2305
- Coordinate$$module$build$src$core$utils$coordinate.equals(this.lastRecordedPageScroll,a)||(this.lastRecordedPageScroll=a,this.updateScreenCalculations())}getLayerManager(){return this.layerManager}getCanvas(){return this.layerManager.getBlockLayer()}setCachedParentSvgSize(a,b){var c=this.getParentSvg();a!=null&&(this.cachedParentSvgSize.width=a,c.setAttribute("data-cached-width",`${a}`));b!=null&&(this.cachedParentSvgSize.height=b,c.setAttribute("data-cached-height",`${b}`))}getBubbleCanvas(){return this.layerManager.getBubbleLayer()}getParentSvg(){if(!this.cachedParentSvg){let a=
2306
- this.svgGroup_;for(;a;){if(a.tagName==="svg"){this.cachedParentSvg=a;break}a=a.parentNode}}return this.cachedParentSvg}maybeFireViewportChangeEvent(){if(isEnabled$$module$build$src$core$events$utils()){var a=this.scale,b=-this.scrollY,c=-this.scrollX;if(!(a===this.oldScale&&Math.abs(b-this.oldTop)<1&&Math.abs(c-this.oldLeft)<1)){var d=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.VIEWPORT_CHANGE))(b,c,a,this.id,this.oldScale);this.oldScale=a;this.oldTop=
2307
- b;this.oldLeft=c;fire$$module$build$src$core$events$utils(d)}}}translate(a,b){var c;(c=this.layerManager)==null||c.translateLayers(new Coordinate$$module$build$src$core$utils$coordinate(a,b),this.scale);var d;(d=this.grid)==null||d.moveTo(a,b);this.maybeFireViewportChangeEvent()}getWidth(){var a=this.getMetrics();return a?a.viewWidth/this.scale:0}setVisible(a){this.visible=a;this.svgGroup_&&(this.scrollbar&&this.scrollbar.setContainerVisible(a),this.getFlyout()&&this.getFlyout().setContainerVisible(a),
2308
- this.getParentSvg().style.display=a?"block":"none",this.toolbox&&this.toolbox.setVisible(a),a||this.hideChaff(!0))}render(){var a=this.getAllBlocks(!1);for(let b=a.length-1;b>=0;b--)a[b].queueRender();this.getTopBlocks().flatMap(b=>b.getDescendants(!1)).filter(b=>b.isInsertionMarker()).forEach(b=>b.queueRender())}highlightBlock(a,b){if(b===void 0){for(let c=0,d;d=this.highlightedBlocks[c];c++)d.setHighlighted(!1);this.highlightedBlocks.length=0}if(a=a?this.getBlockById(a):null)(b=b===void 0||b)?this.highlightedBlocks.includes(a)||
2309
- this.highlightedBlocks.push(a):removeElem$$module$build$src$core$utils$array(this.highlightedBlocks,a),a.setHighlighted(b)}variableChangeCallback(a){switch(a.type){case EventType$$module$build$src$core$events$type.VAR_CREATE:case EventType$$module$build$src$core$events$type.VAR_DELETE:case EventType$$module$build$src$core$events$type.VAR_RENAME:case EventType$$module$build$src$core$events$type.VAR_TYPE_CHANGE:this.refreshToolboxSelection()}}refreshToolboxSelection(){var a=this.isFlyout?this.targetWorkspace:
2310
- this;a&&!a.currentGesture_&&a.toolbox&&a.toolbox.getFlyout()&&a.toolbox.refreshSelection()}recordDragTargets(){var a=this.componentManager.getComponents(ComponentManager$$module$build$src$core$component_manager.Capability.DRAG_TARGET,!0);this.dragTargetAreas=[];for(let b=0,c;c=a[b];b++){let d=c.getClientRect();d&&this.dragTargetAreas.push({component:c,clientRect:d})}}newBlock(a,b){throw Error("The implementation of newBlock should be monkey-patched in by blockly.ts");}newComment(a){throw Error("The implementation of newComment should be monkey-patched in by blockly.ts");
2311
- }getDragTarget(a){a=a instanceof Coordinate$$module$build$src$core$utils$coordinate?wsToScreenCoordinates$$module$build$src$core$utils$svg_math(this,a):new Coordinate$$module$build$src$core$utils$coordinate(a.clientX,a.clientY);for(let b=0,c;c=this.dragTargetAreas[b];b++)if(c.clientRect.contains(a.x,a.y))return c.component;return null}onMouseDown(a){var b=this.getGesture(a);b&&b.handleWsStart(a,this)}startDrag(a,b){start$$module$build$src$core$utils$drag(this,a,b)}moveDrag(a){return move$$module$build$src$core$utils$drag(this,
2312
- a)}isDragging(){return KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving()||this.currentGesture_!==null&&this.currentGesture_.isDragging()}isDraggable(){return this.options.moveOptions&&this.options.moveOptions.drag}isMovable(){return this.options.moveOptions&&!!this.options.moveOptions.scrollbars||this.options.moveOptions&&this.options.moveOptions.wheel||this.options.moveOptions&&this.options.moveOptions.drag||this.options.zoomOptions&&this.options.zoomOptions.wheel||
2313
- this.options.zoomOptions&&this.options.zoomOptions.pinch}isMovableHorizontally(){var a=!!this.scrollbar;return this.isMovable()&&(!a||a&&this.scrollbar.canScrollHorizontally())}isMovableVertically(){var a=!!this.scrollbar;return this.isMovable()&&(!a||a&&this.scrollbar.canScrollVertically())}onMouseWheel(a){if(Gesture$$module$build$src$core$gesture.inProgress())a.preventDefault(),a.stopPropagation();else{var b=this.options.zoomOptions&&this.options.zoomOptions.wheel,c=this.options.moveOptions&&this.options.moveOptions.wheel;
2314
- if(b||c){var d=getScrollDeltaPixels$$module$build$src$core$browser_events(a);if(MAC$$module$build$src$core$utils$useragent)var e=a.metaKey;b&&(a.ctrlKey||e||!c)?(d=-d.y/50,b=mouseToSvg$$module$build$src$core$browser_events(a,this.getParentSvg(),this.getInverseScreenCTM()),this.zoom(b.x,b.y,d)):(b=this.scrollX-d.x,c=this.scrollY-d.y,a.shiftKey&&!d.x&&(b=this.scrollX-d.y,c=this.scrollY),this.scroll(b,c));a.preventDefault()}}}getBlocksBoundingBox(){var a=this.getTopBoundedElements();if(!a.length)return new Rect$$module$build$src$core$utils$rect(0,
2315
- 0,0,0);var b=a[0].getBoundingRectangle();for(let d=1;d<a.length;d++){var c=a[d];if(c.isInsertionMarker&&c.isInsertionMarker())continue;c=c.getBoundingRectangle();c.top<b.top&&(b.top=c.top);c.bottom>b.bottom&&(b.bottom=c.bottom);c.left<b.left&&(b.left=c.left);c.right>b.right&&(b.right=c.right)}return b}cleanUp(){this.setResizesEnabled(!1);var a=$.getGroup$$module$build$src$core$events$utils();a||$.setGroup$$module$build$src$core$events$utils(!0);var b=this.getTopBlocks(!0),c=b.filter(g=>g.isMovable()),
2316
- d=b.filter(g=>!g.isMovable()).map(g=>g.getBoundingRectangle());b=function(g){for(let h of d)if(g.intersects(h))return h;return null};var e=0,f=this.renderer.getConstants().MIN_BLOCK_HEIGHT;for(let g of c){c=g.getBoundingRectangle();g.moveBy(-c.left,e-c.top,["cleanup"]);g.snapToGrid();c=g.getBoundingRectangle();for(e=b(c);e!=null;)e=e.top+e.getHeight()+f,g.moveBy(0,e-c.top,["cleanup"]),g.snapToGrid(),c=g.getBoundingRectangle(),e=b(c);e=g.getRelativeToSurfaceXY().y+g.getHeightWidth().height+f}$.setGroup$$module$build$src$core$events$utils(a);
2317
- this.setResizesEnabled(!0)}showContextMenu(a){if(!this.isReadOnly()&&!this.isFlyout){var b=ContextMenuRegistry$$module$build$src$core$contextmenu_registry.registry.getContextMenuOptions({workspace:this,focusedNode:this},a);this.configureContextMenu&&this.configureContextMenu(b,a);if(a instanceof PointerEvent)var c=new Coordinate$$module$build$src$core$utils$coordinate(a.clientX,a.clientY);else c=this.RTL?this.getWidth()-5:5,c=wsToScreenCoordinates$$module$build$src$core$utils$svg_math(this,new Coordinate$$module$build$src$core$utils$coordinate(c,
2318
- 5));show$$module$build$src$core$contextmenu(a,b,this.RTL,this,c)}}updateToolbox(a){if(a=convertToolboxDefToJson$$module$build$src$core$utils$toolbox(a)){if(!this.options.languageTree)throw Error("Existing toolbox is null. Can't create new toolbox.");if(hasCategories$$module$build$src$core$utils$toolbox(a)){if(!this.toolbox)throw Error("Existing toolbox has no categories. Can't change mode.");this.options.languageTree=a;this.toolbox.render(a)}else{if(!this.flyout)throw Error("Existing toolbox has categories. Can't change mode.");
2319
- this.options.languageTree=a;this.flyout.show(a)}}else if(this.options.languageTree)throw Error("Can't nullify an existing toolbox.");}markFocused(){this.options.parentWorkspace?this.options.parentWorkspace.markFocused():(setMainWorkspace$$module$build$src$core$common(this),this.getParentSvg().focus({preventScroll:!0}))}zoom(a,b,c){c=Math.pow(this.options.zoomOptions.scaleSpeed,c);var d=this.scale*c;if(this.scale!==d){d>this.options.zoomOptions.maxScale?c=this.options.zoomOptions.maxScale/this.scale:
2320
- d<this.options.zoomOptions.minScale&&(c=this.options.zoomOptions.minScale/this.scale);var e=this.getCanvas().getCTM(),f=this.getParentSvg().createSVGPoint();f.x=a;f.y=b;f=f.matrixTransform(e.inverse());a=f.x;b=f.y;e=e.translate(a*(1-c),b*(1-c)).scale(c);this.scrollX=e.e;this.scrollY=e.f;this.setScale(d)}}zoomCenter(a){var b=this.getMetrics();if(this.flyout){var c=b.svgWidth?b.svgWidth/2:0;b=b.svgHeight?b.svgHeight/2:0}else c=b.viewWidth/2+b.absoluteLeft,b=b.viewHeight/2+b.absoluteTop;this.zoom(c,
2321
- b,a)}zoomToFit(){if(this.isMovable()){var a=this.getMetrics(),b=a.viewWidth;a=a.viewHeight;var c=this.getBlocksBoundingBox(),d=ZOOM_TO_FIT_MARGIN$$module$build$src$core$workspace_svg*2,e=c.right-c.left+d;c=c.bottom-c.top+d;if(e){this.flyout&&(this.horizontalLayout?(a+=this.flyout.getHeight(),c+=this.flyout.getHeight()/this.scale):(b+=this.flyout.getWidth(),e+=this.flyout.getWidth()/this.scale));b/=e;a/=c;$.disable$$module$build$src$core$events$utils();try{this.setScale(Math.min(b,a)),this.scrollCenter()}finally{$.enable$$module$build$src$core$events$utils()}this.maybeFireViewportChangeEvent()}}else console.warn("Tried to move a non-movable workspace. This could result in blocks becoming inaccessible.")}beginCanvasTransition(){addClass$$module$build$src$core$utils$dom(this.getCanvas(),
2274
+ var b;this.audioManager=new WorkspaceAudio$$module$build$src$core$workspace_audio((b=a.parentWorkspace)!=null?b:this);this.grid=this.options.gridPattern?new Grid$$module$build$src$core$grid(this.options.gridPattern,a.gridOptions):null;module$build$src$core$variables&&flyoutCategory$$module$build$src$core$variables&&this.registerToolboxCategoryCallback(CATEGORY_NAME$$module$build$src$core$variables,flyoutCategory$$module$build$src$core$variables);module$build$src$core$variables_dynamic&&flyoutCategory$$module$build$src$core$variables_dynamic&&
2275
+ this.registerToolboxCategoryCallback(CATEGORY_NAME$$module$build$src$core$variables_dynamic,flyoutCategory$$module$build$src$core$variables_dynamic);module$build$src$core$procedures&&flyoutCategory$$module$build$src$core$procedures&&(this.registerToolboxCategoryCallback(CATEGORY_NAME$$module$build$src$core$procedures,flyoutCategory$$module$build$src$core$procedures),this.addChangeListener(mutatorOpenListener$$module$build$src$core$procedures));this.addChangeListener(this.variableChangeCallback.bind(this));
2276
+ this.themeManager_=this.options.parentWorkspace?this.options.parentWorkspace.getThemeManager():new ThemeManager$$module$build$src$core$theme_manager(this,this.options.theme||Classic$$module$build$src$core$theme$classic);this.themeManager_.subscribeWorkspace(this);var c;this.renderer=init$$module$build$src$core$renderers$common$block_rendering(this.options.renderer||"geras",this.getTheme(),(c=this.options.rendererOverrides)!=null?c:void 0);this.cachedParentSvgSize=new Size$$module$build$src$core$utils$size(0,
2277
+ 0)}getMetricsManager(){return this.metricsManager}setMetricsManager(a){this.metricsManager=a;this.getMetrics=this.metricsManager.getMetrics.bind(this.metricsManager)}getComponentManager(){return this.componentManager}getRenderer(){return this.renderer}getThemeManager(){return this.themeManager_}getTheme(){return this.themeManager_.getTheme()}setTheme(a){a||(a=Classic$$module$build$src$core$theme$classic);this.themeManager_.setTheme(a)}refreshTheme(){if(this.svgGroup_){var a=this.options.parentWorkspace===
2278
+ null;this.renderer.refreshDom(this.svgGroup_,this.getTheme(),a?this.getInjectionDiv():void 0)}this.updateBlockStyles(this.getAllBlocks(!1).filter(b=>!!b.getStyleName()));this.refreshToolboxSelection();this.toolbox&&this.toolbox.refreshTheme();this.isVisible()&&this.setVisible(!0);a=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.THEME_CHANGE))(this.getTheme().name,this.id);fire$$module$build$src$core$events$utils(a)}updateBlockStyles(a){for(let b=0,c;c=a[b];b++){let d=
2279
+ c.getStyleName();d&&c.setStyle(d)}}getInverseScreenCTM(){if(this.inverseScreenCTMDirty){let a=this.getParentSvg().getScreenCTM();a&&(this.inverseScreenCTM=a.inverse(),this.inverseScreenCTMDirty=!1)}return this.inverseScreenCTM}updateInverseScreenCTM(){this.inverseScreenCTMDirty=!0}isVisible(){return this.visible}getSvgXY(a){var b=0,c=0,d=1;if(this.getCanvas().contains(a)||this.getBubbleCanvas().contains(a))d=this.scale;do{let e=getRelativeXY$$module$build$src$core$utils$svg_math(a);if(a===this.getCanvas()||
2280
+ a===this.getBubbleCanvas())d=1;b+=e.x*d;c+=e.y*d;a=a.parentNode}while(a&&a!==this.getParentSvg()&&a!==this.getInjectionDiv());return new Coordinate$$module$build$src$core$utils$coordinate(b,c)}getCachedParentSvgSize(){var a=this.cachedParentSvgSize;return new Size$$module$build$src$core$utils$size(a.width,a.height)}getOriginOffsetInPixels(){return getInjectionDivXY$$module$build$src$core$utils$svg_math(this.getCanvas())}getInjectionDiv(){if(!this.injectionDiv){let a=this.svgGroup_;for(;a;){if((" "+
2281
+ (a.getAttribute("class")||"")+" ").includes(" injectionDiv ")){this.injectionDiv=a;break}a=a.parentNode}}return this.injectionDiv}getSvgGroup(){return this.svgGroup_}getBlockCanvas(){return this.getCanvas()}setResizeHandlerWrapper(a){this.resizeHandlerWrapper=a}setInitialAriaContext(){if(!this.svgGroup_)throw Error("Must initialize svgGroup_ by calling `createDom` before calling setAriaContext");this.isFlyout||(setRole$$module$build$src$core$utils$aria(this.svgGroup_,Role$$module$build$src$core$utils$aria.REGION),
2282
+ this.isMutator?setState$$module$build$src$core$utils$aria(this.svgGroup_,State$$module$build$src$core$utils$aria.LABEL,$.Msg$$module$build$src$core$msg.WORKSPACE_LABEL_MUTATOR_WORKSPACE):this.updateAriaLabel())}updateAriaLabel(){if(APPLE$$module$build$src$core$utils$useragent)setState$$module$build$src$core$utils$aria(this.svgGroup_,State$$module$build$src$core$utils$aria.LABEL,$.Msg$$module$build$src$core$msg.WORKSPACE_LABEL_PLAIN);else{var a=this.getTopBlocks(!1).length;a==1?setState$$module$build$src$core$utils$aria(this.svgGroup_,
2283
+ State$$module$build$src$core$utils$aria.LABEL,$.Msg$$module$build$src$core$msg.WORKSPACE_LABEL_1_STACK):setState$$module$build$src$core$utils$aria(this.svgGroup_,State$$module$build$src$core$utils$aria.LABEL,$.Msg$$module$build$src$core$msg.WORKSPACE_LABEL_MANY_STACKS.replace("%1",String(a)))}}createDom(a,b){this.injectionDiv||(this.injectionDiv=b!=null?b:null);this.svgGroup_=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{"class":"blocklyWorkspace",id:this.id});
2284
+ a&&(this.svgBackground_=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{height:"100%",width:"100%","class":a},this.svgGroup_),a==="blocklyMainBackground"&&this.grid?this.svgBackground_.style.fill="var(--blocklyGridPattern)":this.themeManager_.subscribe(this.svgBackground_,"workspaceBackgroundColour","fill"));this.workspaceSelectionRing=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{fill:"none",class:"blocklyWorkspaceSelectionRing"},
2285
+ this.svgGroup_);this.workspaceFocusRing=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{fill:"none",class:"blocklyWorkspaceFocusRing"},this.svgGroup_);this.layerManager=new LayerManager$$module$build$src$core$layer_manager(this);this.svgBlockCanvas_=this.layerManager.getBlockLayer();this.svgBubbleCanvas_=this.layerManager.getBubbleLayer();this.setInitialAriaContext();this.isFlyout||(conditionalBind$$module$build$src$core$browser_events(this.svgGroup_,"pointerdown",
2286
+ this,this.onMouseDown,!1),this.dummyWheelListener=()=>{},document.body.addEventListener("wheel",this.dummyWheelListener,{passive:!0}),conditionalBind$$module$build$src$core$browser_events(this.svgGroup_,"wheel",this,this.onMouseWheel,!1,{passive:!1}));this.options.hasCategories&&(this.toolbox=new (getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.TOOLBOX,this.options,!0))(this));this.grid&&this.grid.update(this.scale);this.recordDragTargets();a=this.options.parentWorkspace===
2287
+ null;this.renderer.createDom(this.svgGroup_,this.getTheme(),a?this.getInjectionDiv():void 0);$.getFocusManager$$module$build$src$core$focus_manager().registerTree(this,!!this.injectionDiv||this.isFlyout);return this.svgGroup_}dispose(){this.rendered=!1;this.currentGesture_&&this.currentGesture_.cancel();this.svgGroup_&&removeNode$$module$build$src$core$utils$dom(this.svgGroup_);this.toolbox&&(this.toolbox.dispose(),this.toolbox=null);this.flyout&&(this.flyout.dispose(),this.flyout=null);this.trashcan&&
2288
+ (this.trashcan.dispose(),this.trashcan=null);this.scrollbar&&(this.scrollbar.dispose(),this.scrollbar=null);this.zoomControls_&&this.zoomControls_.dispose();this.audioManager&&this.audioManager.dispose();this.grid&&(this.grid=null);this.renderer.dispose();super.dispose();this.themeManager_&&(this.themeManager_.unsubscribeWorkspace(this),this.themeManager_.unsubscribe(this.svgBackground_),this.options.parentWorkspace||this.themeManager_.dispose());this.connectionDBList.length=0;this.toolboxCategoryCallbacks.clear();
2289
+ this.flyoutButtonCallbacks.clear();if(!this.options.parentWorkspace){let c=this.getParentSvg();c&&c.parentNode&&removeNode$$module$build$src$core$utils$dom(c.parentNode)}this.resizeHandlerWrapper&&(unbind$$module$build$src$core$browser_events(this.resizeHandlerWrapper),this.resizeHandlerWrapper=null);this.dummyWheelListener&&(document.body.removeEventListener("wheel",this.dummyWheelListener),this.dummyWheelListener=null);var a;(a=this.workspaceFocusRing)==null||a.remove();var b;(b=this.workspaceSelectionRing)==
2290
+ null||b.remove();$.getFocusManager$$module$build$src$core$focus_manager().isRegistered(this)&&$.getFocusManager$$module$build$src$core$focus_manager().unregisterTree(this)}addTrashcan(){this.trashcan=WorkspaceSvg$$module$build$src$core$workspace_svg.newTrashcan(this);var a=this.trashcan.createDom();this.svgGroup_.insertBefore(a,this.getCanvas())}static newTrashcan(a){throw Error("The implementation of newTrashcan should be monkey-patched in by blockly.ts");}addZoomControls(){this.zoomControls_=new ZoomControls$$module$build$src$core$zoom_controls(this);
2291
+ var a=this.zoomControls_.createDom();this.svgGroup_.appendChild(a)}copyOptionsForFlyout(){return new Options$$module$build$src$core$options({parentWorkspace:this,rtl:this.RTL,oneBasedIndex:this.options.oneBasedIndex,horizontalLayout:this.horizontalLayout,renderer:this.options.renderer,rendererOverrides:this.options.rendererOverrides,plugins:this.options.plugins,modalInputs:this.options.modalInputs,move:{scrollbars:!0}})}addFlyout(a){var b=this.copyOptionsForFlyout();b.toolboxPosition=this.options.toolboxPosition;
2292
+ this.flyout=this.horizontalLayout?new (getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.FLYOUTS_HORIZONTAL_TOOLBOX,this.options,!0))(b):new (getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.FLYOUTS_VERTICAL_TOOLBOX,this.options,!0))(b);this.flyout.autoClose=!1;this.flyout.getWorkspace().setVisible(!0);return this.flyout.createDom(a)}getFlyout(a){return this.flyout||a?this.flyout:this.toolbox?this.toolbox.getFlyout():null}getToolbox(){return this.toolbox}updateScreenCalculations(){this.updateInverseScreenCTM();
2293
+ this.recordDragTargets()}resizeContents(){this.resizesEnabled&&this.rendered&&(this.scrollbar&&this.scrollbar.resize(),this.updateInverseScreenCTM())}resize(){this.toolbox?this.toolbox.position():this.flyout&&this.flyout.position();var a=this.componentManager.getComponents(ComponentManager$$module$build$src$core$component_manager.Capability.POSITIONABLE,!0),b=this.getMetricsManager().getUiMetrics(),c=[];for(let d=0,e;e=a[d];d++){e.position(b,c);let f=e.getBoundingRectangle();f&&c.push(f)}this.scrollbar&&
2294
+ this.scrollbar.resize();this.updateScreenCalculations();this.workspaceFocusRing&&this.workspaceSelectionRing&&(this.resizeWorkspaceRing(this.workspaceSelectionRing,5),this.resizeWorkspaceRing(this.workspaceFocusRing,0))}resizeWorkspaceRing(a,b){var c=this.getMetrics();a.setAttribute("x",`${c.absoluteLeft+b}`);a.setAttribute("y",`${c.absoluteTop+b}`);a.setAttribute("width",`${Math.max(0,c.viewWidth-b*2)}`);a.setAttribute("height",`${Math.max(0,c.svgHeight-b*2)}`)}updateScreenCalculationsIfScrolled(){var a=
2295
+ getDocumentScroll$$module$build$src$core$utils$svg_math();Coordinate$$module$build$src$core$utils$coordinate.equals(this.lastRecordedPageScroll,a)||(this.lastRecordedPageScroll=a,this.updateScreenCalculations())}getLayerManager(){return this.layerManager}getCanvas(){return this.layerManager.getBlockLayer()}setCachedParentSvgSize(a,b){var c=this.getParentSvg();a!=null&&(this.cachedParentSvgSize.width=a,c.setAttribute("data-cached-width",`${a}`));b!=null&&(this.cachedParentSvgSize.height=b,c.setAttribute("data-cached-height",
2296
+ `${b}`))}getBubbleCanvas(){return this.layerManager.getBubbleLayer()}getParentSvg(){if(!this.cachedParentSvg){let a=this.svgGroup_;for(;a;){if(a.tagName==="svg"){this.cachedParentSvg=a;break}a=a.parentNode}}return this.cachedParentSvg}maybeFireViewportChangeEvent(){if(isEnabled$$module$build$src$core$events$utils()){var a=this.scale,b=-this.scrollY,c=-this.scrollX;if(!(a===this.oldScale&&Math.abs(b-this.oldTop)<1&&Math.abs(c-this.oldLeft)<1)){var d=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.VIEWPORT_CHANGE))(b,
2297
+ c,a,this.id,this.oldScale);this.oldScale=a;this.oldTop=b;this.oldLeft=c;fire$$module$build$src$core$events$utils(d)}}}translate(a,b){var c;(c=this.layerManager)==null||c.translateLayers(new Coordinate$$module$build$src$core$utils$coordinate(a,b),this.scale);var d;(d=this.grid)==null||d.moveTo(a,b);this.maybeFireViewportChangeEvent()}getWidth(){var a=this.getMetrics();return a?a.viewWidth/this.scale:0}setVisible(a){this.visible=a;this.svgGroup_&&(this.scrollbar&&this.scrollbar.setContainerVisible(a),
2298
+ this.getFlyout()&&this.getFlyout().setContainerVisible(a),this.getParentSvg().style.display=a?"block":"none",this.toolbox&&this.toolbox.setVisible(a),a||this.hideChaff(!0))}render(){var a=this.getAllBlocks(!1);for(let b=a.length-1;b>=0;b--)a[b].queueRender();this.getTopBlocks().flatMap(b=>b.getDescendants(!1)).filter(b=>b.isInsertionMarker()).forEach(b=>b.queueRender())}highlightBlock(a,b){if(b===void 0){for(let c=0,d;d=this.highlightedBlocks[c];c++)d.setHighlighted(!1);this.highlightedBlocks.length=
2299
+ 0}if(a=a?this.getBlockById(a):null)(b=b===void 0||b)?this.highlightedBlocks.includes(a)||this.highlightedBlocks.push(a):removeElem$$module$build$src$core$utils$array(this.highlightedBlocks,a),a.setHighlighted(b)}variableChangeCallback(a){switch(a.type){case EventType$$module$build$src$core$events$type.VAR_CREATE:case EventType$$module$build$src$core$events$type.VAR_DELETE:case EventType$$module$build$src$core$events$type.VAR_RENAME:case EventType$$module$build$src$core$events$type.VAR_TYPE_CHANGE:this.refreshToolboxSelection()}}refreshToolboxSelection(){var a=
2300
+ this.isFlyout?this.targetWorkspace:this;a&&!a.currentGesture_&&a.toolbox&&a.toolbox.getFlyout()&&a.toolbox.refreshSelection()}recordDragTargets(){var a=this.componentManager.getComponents(ComponentManager$$module$build$src$core$component_manager.Capability.DRAG_TARGET,!0);this.dragTargetAreas=[];for(let b=0,c;c=a[b];b++){let d=c.getClientRect();d&&this.dragTargetAreas.push({component:c,clientRect:d})}}newBlock(a,b){throw Error("The implementation of newBlock should be monkey-patched in by blockly.ts");
2301
+ }newComment(a){throw Error("The implementation of newComment should be monkey-patched in by blockly.ts");}getDragTarget(a){a=a instanceof Coordinate$$module$build$src$core$utils$coordinate?wsToScreenCoordinates$$module$build$src$core$utils$svg_math(this,a):new Coordinate$$module$build$src$core$utils$coordinate(a.clientX,a.clientY);for(let b=0,c;c=this.dragTargetAreas[b];b++)if(c.clientRect.contains(a.x,a.y))return c.component;return null}onMouseDown(a){var b=this.getGesture(a);b&&b.handleWsStart(a,
2302
+ this)}startDrag(a,b){start$$module$build$src$core$utils$drag(this,a,b)}moveDrag(a){return move$$module$build$src$core$utils$drag(this,a)}isDragging(){return KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving()||this.currentGesture_!==null&&this.currentGesture_.isDragging()}isDraggable(){return this.options.moveOptions&&this.options.moveOptions.drag}isMovable(){return this.options.moveOptions&&!!this.options.moveOptions.scrollbars||this.options.moveOptions&&this.options.moveOptions.wheel||
2303
+ this.options.moveOptions&&this.options.moveOptions.drag||this.options.zoomOptions&&this.options.zoomOptions.wheel||this.options.zoomOptions&&this.options.zoomOptions.pinch}isMovableHorizontally(){var a=!!this.scrollbar;return this.isMovable()&&(!a||a&&this.scrollbar.canScrollHorizontally())}isMovableVertically(){var a=!!this.scrollbar;return this.isMovable()&&(!a||a&&this.scrollbar.canScrollVertically())}onMouseWheel(a){if(Gesture$$module$build$src$core$gesture.inProgress())a.preventDefault(),a.stopPropagation();
2304
+ else{var b=this.options.zoomOptions&&this.options.zoomOptions.wheel,c=this.options.moveOptions&&this.options.moveOptions.wheel;if(b||c){var d=getScrollDeltaPixels$$module$build$src$core$browser_events(a);if(MAC$$module$build$src$core$utils$useragent)var e=a.metaKey;b&&(a.ctrlKey||e||!c)?(d=-d.y/50,b=mouseToSvg$$module$build$src$core$browser_events(a,this.getParentSvg(),this.getInverseScreenCTM()),this.zoom(b.x,b.y,d)):(b=this.scrollX-d.x,c=this.scrollY-d.y,a.shiftKey&&!d.x&&(b=this.scrollX-d.y,c=
2305
+ this.scrollY),this.scroll(b,c));a.preventDefault()}}}getBlocksBoundingBox(){var a=this.getTopBoundedElements();if(!a.length)return new Rect$$module$build$src$core$utils$rect(0,0,0,0);var b=a[0].getBoundingRectangle();for(let d=1;d<a.length;d++){var c=a[d];if(c.isInsertionMarker&&c.isInsertionMarker())continue;c=c.getBoundingRectangle();c.top<b.top&&(b.top=c.top);c.bottom>b.bottom&&(b.bottom=c.bottom);c.left<b.left&&(b.left=c.left);c.right>b.right&&(b.right=c.right)}return b}cleanUp(){this.setResizesEnabled(!1);
2306
+ var a=$.getGroup$$module$build$src$core$events$utils();a||$.setGroup$$module$build$src$core$events$utils(!0);var b=this.getTopBlocks(!0),c=b.filter(g=>g.isMovable()),d=b.filter(g=>!g.isMovable()).map(g=>g.getBoundingRectangle());b=function(g){for(let h of d)if(g.intersects(h))return h;return null};var e=0,f=this.renderer.getConstants().MIN_BLOCK_HEIGHT;for(let g of c){c=g.getBoundingRectangle();g.moveBy(-c.left,e-c.top,["cleanup"]);g.snapToGrid();c=g.getBoundingRectangle();for(e=b(c);e!=null;)e=e.top+
2307
+ e.getHeight()+f,g.moveBy(0,e-c.top,["cleanup"]),g.snapToGrid(),c=g.getBoundingRectangle(),e=b(c);e=g.getRelativeToSurfaceXY().y+g.getHeightWidth().height+f}$.setGroup$$module$build$src$core$events$utils(a);this.setResizesEnabled(!0)}showContextMenu(a){if(!this.isReadOnly()&&!this.isFlyout){var b=ContextMenuRegistry$$module$build$src$core$contextmenu_registry.registry.getContextMenuOptions({workspace:this,focusedNode:this},a);this.configureContextMenu&&this.configureContextMenu(b,a);if(a instanceof
2308
+ PointerEvent)var c=new Coordinate$$module$build$src$core$utils$coordinate(a.clientX,a.clientY);else c=this.RTL?this.getWidth()-5:5,c=wsToScreenCoordinates$$module$build$src$core$utils$svg_math(this,new Coordinate$$module$build$src$core$utils$coordinate(c,5));show$$module$build$src$core$contextmenu(a,b,this.RTL,this,c)}}updateToolbox(a){if(a=convertToolboxDefToJson$$module$build$src$core$utils$toolbox(a)){if(!this.options.languageTree)throw Error("Existing toolbox is null. Can't create new toolbox.");
2309
+ if(hasCategories$$module$build$src$core$utils$toolbox(a)){if(!this.toolbox)throw Error("Existing toolbox has no categories. Can't change mode.");this.options.languageTree=a;this.toolbox.render(a)}else{if(!this.flyout)throw Error("Existing toolbox has categories. Can't change mode.");this.options.languageTree=a;this.flyout.show(a)}}else if(this.options.languageTree)throw Error("Can't nullify an existing toolbox.");}markFocused(){this.options.parentWorkspace?this.options.parentWorkspace.markFocused():
2310
+ (setMainWorkspace$$module$build$src$core$common(this),this.getParentSvg().focus({preventScroll:!0}))}zoom(a,b,c){c=Math.pow(this.options.zoomOptions.scaleSpeed,c);var d=this.scale*c;if(this.scale!==d){d>this.options.zoomOptions.maxScale?c=this.options.zoomOptions.maxScale/this.scale:d<this.options.zoomOptions.minScale&&(c=this.options.zoomOptions.minScale/this.scale);var e=this.getCanvas().getCTM(),f=this.getParentSvg().createSVGPoint();f.x=a;f.y=b;f=f.matrixTransform(e.inverse());a=f.x;b=f.y;e=e.translate(a*
2311
+ (1-c),b*(1-c)).scale(c);this.scrollX=e.e;this.scrollY=e.f;this.setScale(d)}}zoomCenter(a){var b=this.getMetrics();if(this.flyout){var c=b.svgWidth?b.svgWidth/2:0;b=b.svgHeight?b.svgHeight/2:0}else c=b.viewWidth/2+b.absoluteLeft,b=b.viewHeight/2+b.absoluteTop;this.zoom(c,b,a)}zoomToFit(){if(this.isMovable()){var a=this.getMetrics(),b=a.viewWidth;a=a.viewHeight;var c=this.getBlocksBoundingBox(),d=ZOOM_TO_FIT_MARGIN$$module$build$src$core$workspace_svg*2,e=c.right-c.left+d;c=c.bottom-c.top+d;if(e){this.flyout&&
2312
+ (this.horizontalLayout?(a+=this.flyout.getHeight(),c+=this.flyout.getHeight()/this.scale):(b+=this.flyout.getWidth(),e+=this.flyout.getWidth()/this.scale));b/=e;a/=c;$.disable$$module$build$src$core$events$utils();try{this.setScale(Math.min(b,a)),this.scrollCenter()}finally{$.enable$$module$build$src$core$events$utils()}this.maybeFireViewportChangeEvent()}}else console.warn("Tried to move a non-movable workspace. This could result in blocks becoming inaccessible.")}beginCanvasTransition(){addClass$$module$build$src$core$utils$dom(this.getCanvas(),
2322
2313
  "blocklyCanvasTransitioning");addClass$$module$build$src$core$utils$dom(this.getBubbleCanvas(),"blocklyCanvasTransitioning")}endCanvasTransition(){removeClass$$module$build$src$core$utils$dom(this.getCanvas(),"blocklyCanvasTransitioning");removeClass$$module$build$src$core$utils$dom(this.getBubbleCanvas(),"blocklyCanvasTransitioning")}scrollCenter(){if(this.isMovable()){var a=this.getMetrics(),b=(a.scrollWidth-a.viewWidth)/2,c=(a.scrollHeight-a.viewHeight)/2;b=-b-a.scrollLeft;c=-c-a.scrollTop;this.scroll(b,
2323
2314
  c)}else console.warn("Tried to move a non-movable workspace. This could result in blocks becoming inaccessible.")}centerOnBlock(a,b){if(this.isMovable()){var c=a?this.getBlockById(a):null;if(c){a=c.getRelativeToSurfaceXY();c=b?{height:c.height,width:c.width}:c.getHeightWidth();var d=this.scale;b=(a.x+(this.RTL?-1:1)*c.width/2)*d;a=(a.y+c.height/2)*d;c=this.getMetrics();this.scroll(-(b-c.viewWidth/2),-(a-c.viewHeight/2))}}else console.warn("Tried to move a non-movable workspace. This could result in blocks becoming inaccessible.")}setScale(a){this.options.zoomOptions.maxScale&&
2324
2315
  a>this.options.zoomOptions.maxScale?a=this.options.zoomOptions.maxScale:this.options.zoomOptions.minScale&&a<this.options.zoomOptions.minScale&&(a=this.options.zoomOptions.minScale);this.scale=a;this.hideChaff(!1);(a=this.getFlyout(!1))&&a.isVisible()&&(a.reflow(),this.recordDragTargets());this.grid&&this.grid.update(this.scale);a=this.getMetrics();this.scrollX-=a.absoluteLeft;this.scrollY-=a.absoluteTop;a.viewLeft+=a.absoluteLeft;a.viewTop+=a.absoluteTop;this.scroll(this.scrollX,this.scrollY);this.scrollbar&&
@@ -2331,25 +2322,24 @@ null||a.preventDefault(),a==null||a.stopPropagation(),null;var b=(a==null?void 0
2331
2322
  !1){hide$$module$build$src$core$tooltip();hideIfOwnerIsInWorkspace$$module$build$src$core$widgetdiv(this);hideWithoutAnimation$$module$build$src$core$dropdowndiv();this.hideComponents(a)}hideComponents(a=!1){this.getComponentManager().getComponents(ComponentManager$$module$build$src$core$component_manager.Capability.AUTOHIDEABLE,!0).forEach(b=>b.autoHide(a))}static setTopLevelWorkspaceMetrics(a){var b=this.getMetrics();typeof a.x==="number"&&(this.scrollX=-(b.scrollLeft+(b.scrollWidth-b.viewWidth)*
2332
2323
  a.x));typeof a.y==="number"&&(this.scrollY=-(b.scrollTop+(b.scrollHeight-b.viewHeight)*a.y));this.translate(this.scrollX+b.absoluteLeft,this.scrollY+b.absoluteTop)}addClass(a){this.injectionDiv&&addClass$$module$build$src$core$utils$dom(this.injectionDiv,a)}removeClass(a){this.injectionDiv&&removeClass$$module$build$src$core$utils$dom(this.injectionDiv,a)}setIsReadOnly(a){super.setIsReadOnly(a);a?this.addClass("blocklyReadOnly"):this.removeClass("blocklyReadOnly")}scrollBoundsIntoView(a,b=10){if(!Gesture$$module$build$src$core$gesture.inProgress()){var c=
2333
2324
  this.getScale(),d=this.getMetricsManager().getViewMetrics(!0);d=new Rect$$module$build$src$core$utils$rect(d.top,d.top+d.height,d.left,d.left+d.width);if(!(a.left>=d.left&&a.top>=d.top&&a.right<=d.right&&a.bottom<=d.bottom)){a=a.clone();a.top-=b;a.bottom+=b;a.left-=b;a.right+=b;var e=b=0;a.left<d.left?b=this.RTL?Math.min(d.left-a.left,d.right-a.right):d.left-a.left:a.right>d.right&&(b=this.RTL?d.right-a.right:Math.max(d.right-a.right,d.left-a.left));a.top<d.top?e=d.top-a.top:a.bottom>d.bottom&&(e=
2334
- Math.max(d.bottom-a.bottom,d.top-a.top));this.scroll(this.scrollX+b*c,this.scrollY+e*c)}}}getFocusableElement(){return this.svgGroup_}getFocusableTree(){return this.isMutator&&this.options.parentWorkspace||this}onNodeFocus(){this.isFlyout||this.isMutator||this.updateAriaLabel()}onNodeBlur(){}canBeFocused(){return!0}getRootFocusableNode(){return this}getRestoredFocusableNode(a){if(a)return null;var b;a=(b=this.targetWorkspace)==null?void 0:b.getFlyout();if(this.isFlyout&&a){let d,e;return(e=(d=a.getContents().find(f=>
2335
- {f=f.getElement();return isFocusableNode$$module$build$src$core$interfaces$i_focusable_node(f)&&f.canBeFocused()}))==null?void 0:d.getElement())!=null?e:null}var c;return(c=this.getTopBlocks(!0)[0])!=null?c:null}getNestedTrees(){var a=this.getAllBlocks().map(c=>c.getIcons()).flat().filter(c=>c instanceof $.MutatorIcon$$module$build$src$core$icons$mutator_icon&&c.bubbleIsVisible()).map(c=>{var d;return(d=c.getBubble())==null?void 0:d.getWorkspace()}).filter(c=>!!c),b=this.getFlyout(!0);b&&a.push(b.getWorkspace());
2336
- return a}searchForWorkspaceComment(a){for(let b of this.getTopComments())if(b instanceof RenderedWorkspaceComment$$module$build$src$core$comments$rendered_workspace_comment&&b.canBeFocused()&&b.getFocusableElement().id===a)return b}lookUpFocusableNode(a){var b,c=(b=this.targetWorkspace)==null?void 0:b.getFlyout();if(this.isFlyout&&c)for(var d of c.getContents())if(b=d.getElement(),isFocusableNode$$module$build$src$core$interfaces$i_focusable_node(b)&&b.canBeFocused()&&b.getFocusableElement().id===
2337
- a)return b;d=a.indexOf("_field_");b=a.indexOf("_connection_");if(d!==-1){var e=a.substring(0,d);if(e=this.getBlockById(e))for(var f of e.getFields())if(f.canBeFocused()&&f.getFocusableElement().id===a)return f;return null}if(b!==-1){e=a.substring(0,b);if(e=this.getBlockById(e))for(let k of e.getConnections_(!0))if(k.id===a)return k;return null}f=Math.max(a.indexOf(COMMENT_EDITOR_FOCUS_IDENTIFIER$$module$build$src$core$comments$comment_editor),a.indexOf(COMMENT_COLLAPSE_BAR_BUTTON_FOCUS_IDENTIFIER$$module$build$src$core$comments$collapse_comment_bar_button),
2338
- a.indexOf(COMMENT_DELETE_BAR_BUTTON_FOCUS_IDENTIFIER$$module$build$src$core$comments$delete_comment_bar_button));if(f!==-1&&(f=a.substring(0,f),f=this.searchForWorkspaceComment(f))){if(a.indexOf(COMMENT_EDITOR_FOCUS_IDENTIFIER$$module$build$src$core$comments$comment_editor)>-1)return f.getEditorFocusableNode();var g;return(g=f.view.getCommentBarButtons().find(k=>k.getFocusableElement().id.includes(a)))!=null?g:null}if((g=this.getAllBlocks(!1).find(k=>k.getFocusableElement().id===a))||(g=this.searchForWorkspaceComment(a)))return g;
2339
- g=this.getAllBlocks().map(k=>k.getIcons()).flat();for(let k of g){if(k.canBeFocused()&&k.getFocusableElement().id===a)return k;if(hasBubble$$module$build$src$core$interfaces$i_has_bubble(k)){if((g=k.getBubble())&&g.canBeFocused()&&g.getFocusableElement().id===a)return g;if(g instanceof TextInputBubble$$module$build$src$core$bubbles$textinput_bubble&&g.getEditor().getFocusableElement().id===a)return g.getEditor()}}var h;return((h=this.trashcan)==null?void 0:h.getGloballyUniqueId())===a?this.trashcan:
2340
- (h=(e=this.zoomControls_)==null?void 0:e.getControlWithId(a))?h:null}onTreeFocus(a,b){}onTreeBlur(a){if(this.isFlyout&&this.targetWorkspace&&!$.getFocusManager$$module$build$src$core$focus_manager().ephemeralFocusTaken()){var b=this.targetWorkspace.getToolbox();b&&a===b||isAutoHideable$$module$build$src$core$interfaces$i_autohideable(b)&&b.autoHide(!1)}}performAction(){showWorkspaceNavigationHint$$module$build$src$core$hints(this)}getNavigator(){return this.navigator}setNavigator(a){this.navigator=
2341
- a}},module$build$src$core$workspace_svg={};module$build$src$core$workspace_svg.WorkspaceSvg=WorkspaceSvg$$module$build$src$core$workspace_svg;module$build$src$core$workspace_svg.resizeSvgContents=resizeSvgContents$$module$build$src$core$workspace_svg;var VariableModel$$module$build$src$core$variable_model=class{constructor(a,b,c,d){this.workspace=a;this.name=b;this.type=c||"";this.id=d||genUid$$module$build$src$core$utils$idgenerator()}getId(){return this.id}getName(){return this.name}setName(a){this.name=a;return this}getType(){return this.type}setType(a){this.type=a;return this}getWorkspace(){return this.workspace}save(){var a={name:this.getName(),id:this.getId()},b=this.getType();b&&(a.type=b);return a}static load(a,b){a=new this(b,a.name,
2325
+ Math.max(d.bottom-a.bottom,d.top-a.top));this.scroll(this.scrollX+b*c,this.scrollY+e*c)}}}getFocusableElement(){return this.svgGroup_}getFocusableTree(){return this.isMutator&&this.options.parentWorkspace||this}onNodeFocus(){this.isFlyout||this.isMutator||this.updateAriaLabel();WorkspaceSvg$$module$build$src$core$workspace_svg.everFocused||this.options.parentWorkspace||(announceDynamicAriaState$$module$build$src$core$utils$aria($.Msg$$module$build$src$core$msg.SCREENREADER_HINT.replace("%1",getShortcutKeysShort$$module$build$src$core$utils$shortcut_formatting(names$$module$build$src$core$shortcut_items.TOGGLE_SCREENREADER))),
2326
+ WorkspaceSvg$$module$build$src$core$workspace_svg.everFocused=!0)}onNodeBlur(){}canBeFocused(){return!0}getRootFocusableNode(){return this}getRestoredFocusableNode(a){if(a)return null;var b;a=(b=this.targetWorkspace)==null?void 0:b.getFlyout();if(this.isFlyout&&a){let d,e;return(e=(d=a.getContents().find(f=>{f=f.getElement();return isFocusableNode$$module$build$src$core$interfaces$i_focusable_node(f)&&f.canBeFocused()}))==null?void 0:d.getElement())!=null?e:null}var c;return(c=this.getTopBlocks(!0)[0])!=
2327
+ null?c:null}getNestedTrees(){var a=this.getAllBlocks().map(c=>c.getIcons()).flat().filter(c=>c instanceof $.MutatorIcon$$module$build$src$core$icons$mutator_icon&&c.bubbleIsVisible()).map(c=>{var d;return(d=c.getBubble())==null?void 0:d.getWorkspace()}).filter(c=>!!c),b=this.getFlyout(!0);b&&a.push(b.getWorkspace());return a}searchForWorkspaceComment(a){for(let b of this.getTopComments())if(b instanceof RenderedWorkspaceComment$$module$build$src$core$comments$rendered_workspace_comment&&b.canBeFocused()&&
2328
+ b.getFocusableElement().id===a)return b}lookUpFocusableNode(a){var b,c=(b=this.targetWorkspace)==null?void 0:b.getFlyout();if(this.isFlyout&&c)for(var d of c.getContents())if(b=d.getElement(),isFocusableNode$$module$build$src$core$interfaces$i_focusable_node(b)&&b.canBeFocused()&&b.getFocusableElement().id===a)return b;d=a.indexOf("_field_");b=a.indexOf("_connection_");if(d!==-1){var e=a.substring(0,d);if(e=this.getBlockById(e))for(var f of e.getFields())if(f.canBeFocused()&&f.getFocusableElement().id===
2329
+ a)return f;return null}if(b!==-1){e=a.substring(0,b);if(e=this.getBlockById(e))for(let k of e.getConnections_(!0))if(k.id===a)return k;return null}f=Math.max(a.indexOf(COMMENT_EDITOR_FOCUS_IDENTIFIER$$module$build$src$core$comments$comment_editor),a.indexOf(COMMENT_COLLAPSE_BAR_BUTTON_FOCUS_IDENTIFIER$$module$build$src$core$comments$collapse_comment_bar_button),a.indexOf(COMMENT_DELETE_BAR_BUTTON_FOCUS_IDENTIFIER$$module$build$src$core$comments$delete_comment_bar_button));if(f!==-1&&(f=a.substring(0,
2330
+ f),f=this.searchForWorkspaceComment(f))){if(a.indexOf(COMMENT_EDITOR_FOCUS_IDENTIFIER$$module$build$src$core$comments$comment_editor)>-1)return f.getEditorFocusableNode();var g;return(g=f.view.getCommentBarButtons().find(k=>k.getFocusableElement().id.includes(a)))!=null?g:null}if((g=this.getAllBlocks(!1).find(k=>k.getFocusableElement().id===a))||(g=this.searchForWorkspaceComment(a)))return g;g=this.getAllBlocks().map(k=>k.getIcons()).flat();for(let k of g){if(k.canBeFocused()&&k.getFocusableElement().id===
2331
+ a)return k;if(hasBubble$$module$build$src$core$interfaces$i_has_bubble(k)){if((g=k.getBubble())&&g.canBeFocused()&&g.getFocusableElement().id===a)return g;if(g instanceof TextInputBubble$$module$build$src$core$bubbles$textinput_bubble&&g.getEditor().getFocusableElement().id===a)return g.getEditor()}}var h;return((h=this.trashcan)==null?void 0:h.getGloballyUniqueId())===a?this.trashcan:(h=(e=this.zoomControls_)==null?void 0:e.getControlWithId(a))?h:null}onTreeFocus(a,b){}onTreeBlur(a){if(this.isFlyout&&
2332
+ this.targetWorkspace&&!$.getFocusManager$$module$build$src$core$focus_manager().ephemeralFocusTaken()){var b=this.targetWorkspace.getToolbox();b&&a===b||isAutoHideable$$module$build$src$core$interfaces$i_autohideable(b)&&b.autoHide(!1)}}performAction(){showWorkspaceNavigationHint$$module$build$src$core$hints(this)}getNavigator(){return this.navigator}setNavigator(a){this.navigator=a}};WorkspaceSvg$$module$build$src$core$workspace_svg.everFocused=!1;var module$build$src$core$workspace_svg={};
2333
+ module$build$src$core$workspace_svg.WorkspaceSvg=WorkspaceSvg$$module$build$src$core$workspace_svg;module$build$src$core$workspace_svg.resizeSvgContents=resizeSvgContents$$module$build$src$core$workspace_svg;var VariableModel$$module$build$src$core$variable_model=class{constructor(a,b,c,d){this.workspace=a;this.name=b;this.type=c||"";this.id=d||genUid$$module$build$src$core$utils$idgenerator()}getId(){return this.id}getName(){return this.name}setName(a){this.name=a;return this}getType(){return this.type}setType(a){this.type=a;return this}getWorkspace(){return this.workspace}save(){var a={name:this.getName(),id:this.getId()},b=this.getType();b&&(a.type=b);return a}static load(a,b){a=new this(b,a.name,
2342
2334
  a.type,a.id);b.getVariableMap().addVariable(a);fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.VAR_CREATE))(a))}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.VARIABLE_MODEL,DEFAULT$$module$build$src$core$registry,VariableModel$$module$build$src$core$variable_model);var module$build$src$core$variable_model={};module$build$src$core$variable_model.VariableModel=VariableModel$$module$build$src$core$variable_model;var VariableMap$$module$build$src$core$variable_map=class{constructor(a,b=!1){this.workspace=a;this.potentialMap=b;this.variableMap=new Map}clear(){for(let a of this.variableMap.values())for(let b of a.values())this.deleteVariable(b);if(this.variableMap.size!==0)throw Error("Non-empty variable map");}renameVariable(a,b){if(a.getName()===b)return a;var c=a.getType();c=this.getVariable(b,c);var d=this.workspace.getAllBlocks(!1),e="";this.potentialMap||(e=$.getGroup$$module$build$src$core$events$utils())||
2343
2335
  $.setGroup$$module$build$src$core$events$utils(!0);try{c&&c.getId()!==a.getId()?this.renameVariableWithConflict(a,b,c,d):this.renameVariableAndUses(a,b,d)}finally{this.potentialMap||$.setGroup$$module$build$src$core$events$utils(e)}return a}changeVariableType(a,b){var c=a.getType();if(c===b)return a;var d=this.variableMap.get(c);d==null||d.delete(a.getId());(d==null?void 0:d.size)===0&&this.variableMap.delete(c);a.setType(b);var e;d=(e=this.variableMap.get(b))!=null?e:new Map;d.set(a.getId(),a);this.variableMap.has(b)||
2344
- this.variableMap.set(b,d);fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.VAR_TYPE_CHANGE))(a,c,b));return a}renameVariableById(a,b){$.warn$$module$build$src$core$utils$deprecation("VariableMap.renameVariableById","v12","v13","VariableMap.renameVariable");var c=this.getVariableById(a);if(!c)throw Error("Tried to rename a variable that didn't exist. ID: "+a);this.renameVariable(c,b)}renameVariableAndUses(a,b,c){this.potentialMap||
2345
- fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.VAR_RENAME))(a,b));a.setName(b);for(b=0;b<c.length;b++)c[b].updateVarName(a)}renameVariableWithConflict(a,b,c,d){var e=a.getType(),f=c.getName();b!==f&&this.renameVariableAndUses(c,b,d);for(b=0;b<d.length;b++)d[b].renameVarById(a.getId(),c.getId());this.potentialMap||fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.VAR_DELETE))(a));
2346
- var g;(g=this.variableMap.get(e))==null||g.delete(a.getId())}createVariable(a,b,c){var d=this.getVariable(a,b);if(d){if(c&&d.getId()!==c)throw Error('Variable "'+a+'" is already in use and its id is "'+d.getId()+'" which conflicts with the passed in id, "'+c+'".');return d}if(c&&this.getVariableById(c))throw Error('Variable id, "'+c+'", is already in use.');d=c||genUid$$module$build$src$core$utils$idgenerator();b=b||"";c=getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.VARIABLE_MODEL,
2347
- this.workspace.options,!0);if(!c)throw Error("No variable model is registered.");d=new c(this.workspace,a,b,d);var e;a=(e=this.variableMap.get(b))!=null?e:new Map;a.set(d.getId(),d);this.variableMap.has(b)||this.variableMap.set(b,a);this.potentialMap||fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.VAR_CREATE))(d));return d}addVariable(a){var b=a.getType();this.variableMap.has(b)||this.variableMap.set(b,new Map);var c;
2348
- (c=this.variableMap.get(b))==null||c.set(a.getId(),a)}deleteVariable(a){var b=getVariableUsesById$$module$build$src$core$variables(this.workspace,a.getId()),c="";this.potentialMap||(c=$.getGroup$$module$build$src$core$events$utils())||$.setGroup$$module$build$src$core$events$utils(!0);try{for(let e=0;e<b.length;e++)b[e].isDeadOrDying()||b[e].dispose(!0);let d=this.variableMap.get(a.getType());d&&d.has(a.getId())&&(d.delete(a.getId()),this.potentialMap||fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.VAR_DELETE))(a)),
2349
- d.size===0&&this.variableMap.delete(a.getType()))}finally{this.potentialMap||$.setGroup$$module$build$src$core$events$utils(c)}}deleteVariableById(a){$.warn$$module$build$src$core$utils$deprecation("VariableMap.deleteVariableById","v12","v13","Blockly.Variables.deleteVariable");(a=this.getVariableById(a))&&$.deleteVariable$$module$build$src$core$variables(this.workspace,a)}getVariable(a,b){b=this.variableMap.get(b||"");if(!b)return null;var c;return(c=[...b.values()].find(d=>$.Names$$module$build$src$core$names.equals(d.getName(),
2350
- a)))!=null?c:null}getVariableById(a){for(let b of this.variableMap.values())if(b.has(a)){let c;return(c=b.get(a))!=null?c:null}return null}getVariablesOfType(a){return(a=this.variableMap.get(a||""))?[...a.values()]:[]}getTypes(){return[...this.variableMap.keys()]}getAllVariables(){var a=[];for(let b of this.variableMap.values())a=a.concat(...b.values());return a}getAllVariableNames(){$.warn$$module$build$src$core$utils$deprecation("VariableMap.getAllVariableNames","v12","v13","Blockly.Variables.getAllVariables");
2351
- var a=[];for(let b of this.variableMap.values())for(let c of b.values())a.push(c.getName());return a}getVariableUsesById(a){$.warn$$module$build$src$core$utils$deprecation("VariableMap.getVariableUsesById","v12","v13","Blockly.Variables.getVariableUsesById");return getVariableUsesById$$module$build$src$core$variables(this.workspace,a)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.VARIABLE_MAP,DEFAULT$$module$build$src$core$registry,VariableMap$$module$build$src$core$variable_map);
2352
- var module$build$src$core$variable_map={};module$build$src$core$variable_map.VariableMap=VariableMap$$module$build$src$core$variable_map;var Trashcan$$module$build$src$core$trashcan=class extends DeleteArea$$module$build$src$core$delete_area{constructor(a){super();this.workspace=a;this.id="trashcan";this.uniqueId=getNextUniqueId$$module$build$src$core$utils$idgenerator();this.contents=[];this.flyout=null;this.isLidOpen=!1;this.svgGroup=null;this.top=this.left=0;this.initialized=!1;this.workspace.options.maxTrashcanContents<=0||(a=this.workspace.copyOptionsForFlyout(),this.workspace.horizontalLayout?(a.toolboxPosition=this.workspace.toolboxPosition===
2336
+ this.variableMap.set(b,d);fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.VAR_TYPE_CHANGE))(a,c,b));return a}renameVariableAndUses(a,b,c){this.potentialMap||fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.VAR_RENAME))(a,b));a.setName(b);for(b=0;b<c.length;b++)c[b].updateVarName(a)}renameVariableWithConflict(a,b,c,d){var e=a.getType(),
2337
+ f=c.getName();b!==f&&this.renameVariableAndUses(c,b,d);for(b=0;b<d.length;b++)d[b].renameVarById(a.getId(),c.getId());this.potentialMap||fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.VAR_DELETE))(a));var g;(g=this.variableMap.get(e))==null||g.delete(a.getId())}createVariable(a,b,c){var d=this.getVariable(a,b);if(d){if(c&&d.getId()!==c)throw Error('Variable "'+a+'" is already in use and its id is "'+d.getId()+'" which conflicts with the passed in id, "'+
2338
+ c+'".');return d}if(c&&this.getVariableById(c))throw Error('Variable id, "'+c+'", is already in use.');d=c||genUid$$module$build$src$core$utils$idgenerator();b=b||"";c=getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.VARIABLE_MODEL,this.workspace.options,!0);if(!c)throw Error("No variable model is registered.");d=new c(this.workspace,a,b,d);var e;a=(e=this.variableMap.get(b))!=null?e:new Map;a.set(d.getId(),d);this.variableMap.has(b)||this.variableMap.set(b,
2339
+ a);this.potentialMap||fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.VAR_CREATE))(d));return d}addVariable(a){var b=a.getType();this.variableMap.has(b)||this.variableMap.set(b,new Map);var c;(c=this.variableMap.get(b))==null||c.set(a.getId(),a)}deleteVariable(a){var b=getVariableUsesById$$module$build$src$core$variables(this.workspace,a.getId()),c="";this.potentialMap||(c=$.getGroup$$module$build$src$core$events$utils())||
2340
+ $.setGroup$$module$build$src$core$events$utils(!0);try{for(let e=0;e<b.length;e++)b[e].isDeadOrDying()||b[e].dispose(!0);let d=this.variableMap.get(a.getType());d&&d.has(a.getId())&&(d.delete(a.getId()),this.potentialMap||fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.VAR_DELETE))(a)),d.size===0&&this.variableMap.delete(a.getType()))}finally{this.potentialMap||$.setGroup$$module$build$src$core$events$utils(c)}}getVariable(a,
2341
+ b){b=this.variableMap.get(b||"");if(!b)return null;var c;return(c=[...b.values()].find(d=>$.Names$$module$build$src$core$names.equals(d.getName(),a)))!=null?c:null}getVariableById(a){for(let b of this.variableMap.values())if(b.has(a)){let c;return(c=b.get(a))!=null?c:null}return null}getVariablesOfType(a){return(a=this.variableMap.get(a||""))?[...a.values()]:[]}getTypes(){return[...this.variableMap.keys()]}getAllVariables(){var a=[];for(let b of this.variableMap.values())a=a.concat(...b.values());
2342
+ return a}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.VARIABLE_MAP,DEFAULT$$module$build$src$core$registry,VariableMap$$module$build$src$core$variable_map);var module$build$src$core$variable_map={};module$build$src$core$variable_map.VariableMap=VariableMap$$module$build$src$core$variable_map;var Trashcan$$module$build$src$core$trashcan=class extends DeleteArea$$module$build$src$core$delete_area{constructor(a){super();this.workspace=a;this.id="trashcan";this.uniqueId=getNextUniqueId$$module$build$src$core$utils$idgenerator();this.contents=[];this.flyout=null;this.isLidOpen=!1;this.svgGroup=null;this.top=this.left=0;this.initialized=!1;this.workspace.options.maxTrashcanContents<=0||(a=this.workspace.copyOptionsForFlyout(),this.workspace.horizontalLayout?(a.toolboxPosition=this.workspace.toolboxPosition===
2353
2343
  Position$$module$build$src$core$utils$toolbox.TOP?Position$$module$build$src$core$utils$toolbox.BOTTOM:Position$$module$build$src$core$utils$toolbox.TOP,this.flyout=new (getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.FLYOUTS_HORIZONTAL_TOOLBOX,this.workspace.options,!0))(a)):(a.toolboxPosition=this.workspace.toolboxPosition===Position$$module$build$src$core$utils$toolbox.RIGHT?Position$$module$build$src$core$utils$toolbox.LEFT:Position$$module$build$src$core$utils$toolbox.RIGHT,
2354
2344
  this.flyout=new (getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.FLYOUTS_VERTICAL_TOOLBOX,this.workspace.options,!0))(a)),this.workspace.addChangeListener(this.onDelete.bind(this)))}createDom(){this.svgGroup=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{"class":"blocklyTrash",tabindex:"0",id:this.uniqueId});createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{width:WIDTH$$module$build$src$core$trashcan+
2355
2345
  8,height:BODY_HEIGHT$$module$build$src$core$trashcan+LID_HEIGHT$$module$build$src$core$trashcan+8,x:-4,y:-4,rx:2,ry:2,fill:"none","class":"blocklyFocusRing"},this.svgGroup);setRole$$module$build$src$core$utils$aria(this.svgGroup,Role$$module$build$src$core$utils$aria.BUTTON);setState$$module$build$src$core$utils$aria(this.svgGroup,State$$module$build$src$core$utils$aria.LABEL,$.Msg$$module$build$src$core$msg.OPEN_TRASH);var a=String(Math.random()).substring(2);var b=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.CLIPPATH,
@@ -2601,8 +2591,8 @@ State$$module$build$src$core$utils$aria.SELECTED,!1);setState$$module$build$src$
2601
2591
  Role$$module$build$src$core$utils$aria.PRESENTATION);this.rowContents_.appendChild(this.iconDom_);this.labelDom_=this.createLabelDom_(this.name_);this.rowContents_.appendChild(this.labelDom_);var a=this.labelDom_.getAttribute("id");a&&setState$$module$build$src$core$utils$aria(this.htmlDiv_,State$$module$build$src$core$utils$aria.LABELLEDBY,a);this.addColourBorder_(this.colour_);return this.htmlDiv_}createContainer_(){var a=document.createElement("div");a.tabIndex=-1;a.id=this.getId();var b=this.cssConfig_.container;
2602
2592
  b&&addClass$$module$build$src$core$utils$dom(a,b);return a}createRowContainer_(){var a=document.createElement("div"),b=this.cssConfig_.row;b&&addClass$$module$build$src$core$utils$dom(a,b);b=`${ToolboxCategory$$module$build$src$core$toolbox$category.nestedPadding*this.getLevel()}px`;this.workspace_.RTL?a.style.paddingRight=b:a.style.paddingLeft=b;return a}createRowContentsContainer_(){var a=document.createElement("div"),b=this.cssConfig_.rowcontentcontainer;b&&addClass$$module$build$src$core$utils$dom(a,
2603
2593
  b);return a}createIconDom_(){var a=document.createElement("span");if(!this.parentToolbox_.isHorizontal()){let b=this.cssConfig_.icon;b&&addClass$$module$build$src$core$utils$dom(a,b)}a.style.display="inline-block";return a}createLabelDom_(a){var b=document.createElement("span");b.setAttribute("id",this.getId()+".label");b.textContent=a;(a=this.cssConfig_.label)&&addClass$$module$build$src$core$utils$dom(b,a);return b}refreshTheme(){this.colour_=this.getColour_(this.toolboxItemDef_);this.addColourBorder_(this.colour_)}addColourBorder_(a){a&&
2604
- (a=ToolboxCategory$$module$build$src$core$toolbox$category.borderWidth+"px solid "+(a||"#ddd"),this.workspace_.RTL?this.rowDiv_.style.borderRight=a:this.rowDiv_.style.borderLeft=a)}getColour_(a){var b=a.categorystyle||a.categoryStyle;if((a=a.colour)&&b)console.warn('Toolbox category "'+this.name_+'" must not have both a style and a colour');else{if(b)return this.getColourfromStyle(b);if(a)return this.parseColour(a)}return""}getColourfromStyle(a){var b=this.workspace_.getTheme();if(a&&b){if((b=b.categoryStyles[a])&&
2605
- b.colour)return this.parseColour(b.colour);console.warn('Style "'+a+'" must exist and contain a colour value')}return""}getClickTarget(){return this.rowDiv_}parseColour(a){a=replaceMessageReferences$$module$build$src$core$utils$parsing(a);if(a==null||a==="")return"";var b=Number(a);if(isNaN(b)){if(b=parse$$module$build$src$core$utils$colour(a))return b;console.warn('Toolbox category "'+this.name_+'" has unrecognized colour attribute: '+a);return""}return hueToHex$$module$build$src$core$utils$colour(b)}openIcon_(a){if(a){var b=
2594
+ (a=ToolboxCategory$$module$build$src$core$toolbox$category.borderWidth+"px solid "+(a||"#ddd"),this.workspace_.RTL?this.rowDiv_.style.borderRight=a:this.rowDiv_.style.borderLeft=a)}getColour_(a){var b=a.categorystyle||a.categoryStyle;if((a=a.colour)&&b)console.warn('Toolbox category "'+this.name_+'" must not have both a style and a colour');else{if(b)return this.getColourfromStyle(b);if(a)return this.parseColour(a)}return""}getColour(){return this.colour_}getColourfromStyle(a){var b=this.workspace_.getTheme();
2595
+ if(a&&b){if((b=b.categoryStyles[a])&&b.colour)return this.parseColour(b.colour);console.warn('Style "'+a+'" must exist and contain a colour value')}return""}getClickTarget(){return this.rowDiv_}parseColour(a){a=replaceMessageReferences$$module$build$src$core$utils$parsing(a);if(a==null||a==="")return"";var b=Number(a);if(isNaN(b)){if(b=parse$$module$build$src$core$utils$colour(a))return b;console.warn('Toolbox category "'+this.name_+'" has unrecognized colour attribute: '+a);return""}return hueToHex$$module$build$src$core$utils$colour(b)}openIcon_(a){if(a){var b=
2606
2596
  this.cssConfig_.closedicon;b&&removeClasses$$module$build$src$core$utils$dom(a,b);(b=this.cssConfig_.openicon)&&addClass$$module$build$src$core$utils$dom(a,b)}}closeIcon_(a){if(a){var b=this.cssConfig_.openicon;b&&removeClasses$$module$build$src$core$utils$dom(a,b);(b=this.cssConfig_.closedicon)&&addClass$$module$build$src$core$utils$dom(a,b)}}setVisible_(a){this.htmlDiv_.style.display=a?"block":"none";this.isHidden_=!a;this.parentToolbox_.getSelectedItem()===this&&this.parentToolbox_.clearSelection()}hide(){this.setVisible_(!1)}show(){this.setVisible_(!0)}isVisible(){return!this.isHidden_&&
2607
2597
  this.allAncestorsExpanded_()}allAncestorsExpanded_(){for(var a=this;a.getParent();)if(a=a.getParent(),!a.isExpanded())return!1;return!0}isSelectable(){return this.isVisible()&&!this.isDisabled_}onClick(a){}setSelected(a){if(this.rowDiv_){var b=this.cssConfig_.selected;if(a){let c=this.parseColour(ToolboxCategory$$module$build$src$core$toolbox$category.defaultBackgroundColour);this.rowDiv_.style.backgroundColor=this.colour_||c;b&&addClass$$module$build$src$core$utils$dom(this.rowDiv_,b)}else this.rowDiv_.style.backgroundColor=
2608
2598
  "",b&&removeClass$$module$build$src$core$utils$dom(this.rowDiv_,b);setState$$module$build$src$core$utils$aria(this.htmlDiv_,State$$module$build$src$core$utils$aria.SELECTED,a)}}setDisabled(a){this.isDisabled_=a;this.getDiv().setAttribute("disabled",`${a}`);a?this.getDiv().setAttribute("disabled","true"):this.getDiv().removeAttribute("disabled")}getName(){return this.name_}getParent(){return this.parent_}getDiv(){return this.htmlDiv_}onNodeFocus(){this.getParentToolbox().getSelectedItem()!==this&&
@@ -2640,7 +2630,7 @@ null||d.scrollToStart()}else{let c;(c=this.flyout)==null||c.hide()}}fireSelectEv
2640
2630
  b.isCollapsible())&&((c=this.selectedItem_)==null?void 0:c.isExpanded())!==a?(this.selectedItem_.toggleExpanded(),!0):!1}dispose(){this.workspace_.getComponentManager().removeComponent("toolbox");var a;(a=this.flyout)==null||a.dispose();this.contents.forEach(b=>b.dispose());for(a=0;a<this.boundEvents_.length;a++)unbind$$module$build$src$core$browser_events(this.boundEvents_[a]);this.boundEvents_=[];this.contents.clear();this.HtmlDiv&&(this.workspace_.getThemeManager().unsubscribe(this.HtmlDiv),removeNode$$module$build$src$core$utils$dom(this.HtmlDiv));
2641
2631
  $.getFocusManager$$module$build$src$core$focus_manager().unregisterTree(this)}getFocusableElement(){if(!this.HtmlDiv)throw Error("Toolbox DOM has not yet been created.");return this.HtmlDiv}getFocusableTree(){return this}onNodeFocus(){}onNodeBlur(){}canBeFocused(){return!0}getRootFocusableNode(){return this}getRestoredFocusableNode(a){if(!a||a===this){let b;return(b=this.getToolboxItems().find(c=>c.isSelectable()))!=null?b:null}return null}getNestedTrees(){return[]}lookUpFocusableNode(a){return this.getToolboxItemById(a)}onTreeFocus(a,
2642
2632
  b){a!==this?this.getSelectedItem()===a||this.mouseDown||this.setSelectedItem(a):this.clearSelection()}onTreeBlur(a){var b;a&&a===((b=this.flyout)==null?void 0:b.getWorkspace())||this.autoHide(!1)}getNavigator(){return this.navigator}};register$$module$build$src$core$css('\n.blocklyToolboxDelete {\n cursor: url("<<<PATH>>>/handdelete.cur"), auto;\n}\n\n.blocklyToolboxGrab {\n cursor: url("<<<PATH>>>/handclosed.cur"), auto;\n cursor: grabbing;\n cursor: -webkit-grabbing;\n}\n\n/* Category tree in Toolbox. */\n.blocklyToolbox {\n box-sizing: border-box;\n user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n background-color: #ddd;\n overflow-x: visible;\n overflow-y: auto;\n padding: 4px 0 4px 0;\n position: absolute;\n z-index: 70; /* so blocks go under toolbox when dragging */\n -webkit-tap-highlight-color: transparent; /* issue #1345 */\n}\n\n.blocklyToolboxCategoryGroup {\n display: flex;\n flex-wrap: wrap;\n flex-direction: column;\n}\n\n.blocklyToolboxCategoryGroup:focus {\n outline: none;\n}\n');
2643
- register$$module$build$src$core$registry(Type$$module$build$src$core$registry.TOOLBOX,DEFAULT$$module$build$src$core$registry,Toolbox$$module$build$src$core$toolbox$toolbox);var module$build$src$core$toolbox$toolbox={};module$build$src$core$toolbox$toolbox.Toolbox=Toolbox$$module$build$src$core$toolbox$toolbox;var module$build$src$core$interfaces$i_navigation_policy={};var VERSION$$module$build$src$core$blockly="13.0.0-beta.5",INPUT_VALUE$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE,OUTPUT_VALUE$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE,NEXT_STATEMENT$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT,PREVIOUS_STATEMENT$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT,
2633
+ register$$module$build$src$core$registry(Type$$module$build$src$core$registry.TOOLBOX,DEFAULT$$module$build$src$core$registry,Toolbox$$module$build$src$core$toolbox$toolbox);var module$build$src$core$toolbox$toolbox={};module$build$src$core$toolbox$toolbox.Toolbox=Toolbox$$module$build$src$core$toolbox$toolbox;var module$build$src$core$interfaces$i_navigation_policy={};var VERSION$$module$build$src$core$blockly="13.0.0-beta.7",INPUT_VALUE$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE,OUTPUT_VALUE$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE,NEXT_STATEMENT$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT,PREVIOUS_STATEMENT$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT,
2644
2634
  TOOLBOX_AT_TOP$$module$build$src$core$blockly=Position$$module$build$src$core$utils$toolbox.TOP,TOOLBOX_AT_BOTTOM$$module$build$src$core$blockly=Position$$module$build$src$core$utils$toolbox.BOTTOM,TOOLBOX_AT_LEFT$$module$build$src$core$blockly=Position$$module$build$src$core$utils$toolbox.LEFT,TOOLBOX_AT_RIGHT$$module$build$src$core$blockly=Position$$module$build$src$core$utils$toolbox.RIGHT,svgResize$$module$build$src$core$blockly=svgResize$$module$build$src$core$common,getMainWorkspace$$module$build$src$core$blockly=
2645
2635
  getMainWorkspace$$module$build$src$core$common,getSelected$$module$build$src$core$blockly=getSelected$$module$build$src$core$common,defineBlocksWithJsonArray$$module$build$src$core$blockly=defineBlocksWithJsonArray$$module$build$src$core$common,setParentContainer$$module$build$src$core$blockly=setParentContainer$$module$build$src$core$common,COLLAPSE_CHARS$$module$build$src$core$blockly=COLLAPSE_CHARS$$module$build$src$core$internal_constants,OPPOSITE_TYPE$$module$build$src$core$blockly=OPPOSITE_TYPE$$module$build$src$core$internal_constants,
2646
2636
  RENAME_VARIABLE_ID$$module$build$src$core$blockly=RENAME_VARIABLE_ID$$module$build$src$core$internal_constants,DELETE_VARIABLE_ID$$module$build$src$core$blockly=DELETE_VARIABLE_ID$$module$build$src$core$internal_constants,COLLAPSED_INPUT_NAME$$module$build$src$core$blockly=COLLAPSED_INPUT_NAME$$module$build$src$core$constants,COLLAPSED_FIELD_NAME$$module$build$src$core$blockly=COLLAPSED_FIELD_NAME$$module$build$src$core$constants,VARIABLE_CATEGORY_NAME$$module$build$src$core$blockly=CATEGORY_NAME$$module$build$src$core$variables,